builder.io 1.6.1 → 1.6.2
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/cli/index.cjs +12 -12
- package/cli/index.cjs.map +3 -3
- package/core/index.cjs +1 -1
- package/core/index.mjs +1 -1
- package/node/index.cjs +1 -1
- package/node/index.mjs +1 -1
- package/package.json +1 -1
- package/server/index.cjs +5 -5
- package/server/index.mjs +5 -5
package/cli/index.cjs
CHANGED
|
@@ -19,7 +19,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),I=F,v=M),X===void 0&&(
|
|
|
19
19
|
`);case 114:return a("\r");case 120:{let u;return{code:u,pos:r}=Ac(e,r,t,n,2,!1,o,s),a(u===null?null:String.fromCharCode(u))}case 117:{let u;return{code:u,pos:r}=Wy(e,r,t,n,o,s),a(u===null?null:String.fromCodePoint(u))}case 116:return a(" ");case 98:return a("\b");case 118:return a("\v");case 102:return a("\f");case 13:e.charCodeAt(r)===10&&++r;case 10:t=r,++n;case 8232:case 8233:return a("");case 56:case 57:if(i)return a(null);s.strictNumericEscape(r-1,t,n);default:if(l>=48&&l<=55){let u=r-1,p=/^[0-7]+/.exec(e.slice(u,r+2))[0],d=parseInt(p,8);d>255&&(p=p.slice(0,-1),d=parseInt(p,8)),r+=p.length-1;let f=e.charCodeAt(r);if(p!=="0"||f===56||f===57){if(i)return a(null);s.strictNumericEscape(u,t,n)}return a(String.fromCharCode(d))}return a(String.fromCharCode(l))}}function Ac(e,r,t,n,i,s,o,a){let l=r,u;return{n:u,pos:r}=qy(e,r,t,n,16,i,s,!1,a,!o),u===null&&(o?a.invalidEscapeSequence(l,t,n):r=l-1),{code:u,pos:r}}function qy(e,r,t,n,i,s,o,a,l,u){let c=r,p=i===16?Py.hex:Py.decBinOct,d=i===16?Ta.hex:i===10?Ta.dec:i===8?Ta.oct:Ta.bin,f=!1,m=0;for(let h=0,g=s??1/0;h<g;++h){let y=e.charCodeAt(r),b;if(y===95&&a!=="bail"){let C=e.charCodeAt(r-1),x=e.charCodeAt(r+1);if(a){if(Number.isNaN(x)||!d(x)||p.has(C)||p.has(x)){if(u)return{n:null,pos:r};l.unexpectedNumericSeparator(r,t,n)}}else{if(u)return{n:null,pos:r};l.numericSeparatorInEscapeSequence(r,t,n)}++r;continue}if(y>=97?b=y-97+10:y>=65?b=y-65+10:Bv(y)?b=y-48:b=1/0,b>=i){if(b<=9&&u)return{n:null,pos:r};if(b<=9&&l.invalidDigit(r,t,n,i))b=0;else if(o)b=0,f=!0;else break}++r,m=m*i+b}return r===c||s!=null&&r-c!==s||f?{n:null,pos:r}:{n:m,pos:r}}function Wy(e,r,t,n,i,s){let o=e.charCodeAt(r),a;if(o===123){if(++r,{code:a,pos:r}=Ac(e,r,t,n,e.indexOf("}",r)-r,!0,i,s),++r,a!==null&&a>1114111)if(i)s.invalidCodePoint(r,t,n);else return{code:null,pos:r}}else({code:a,pos:r}=Ac(e,r,t,n,4,!1,i,s));return{code:a,pos:r}}function Vs(e,r,t){return new Lr(t,e-r,e)}var Uv=new Set([103,109,115,105,121,117,100,118]),Rr=class{constructor(r){let t=r.startIndex||0;this.type=r.type,this.value=r.value,this.start=t+r.start,this.end=t+r.end,this.loc=new Vi(r.startLoc,r.endLoc)}},vc=class extends Tc{constructor(r,t){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(n,i,s,o)=>this.optionFlags&1024?(this.raise(S.InvalidDigit,Vs(n,i,s),{radix:o}),!0):!1,numericSeparatorInEscapeSequence:this.errorBuilder(S.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(S.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(S.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(S.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(n,i,s)=>{this.recordStrictModeErrors(S.StrictNumericEscape,Vs(n,i,s))},unterminated:(n,i,s)=>{throw this.raise(S.UnterminatedString,Vs(n-1,i,s))}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(S.StrictNumericEscape),unterminated:(n,i,s)=>{throw this.raise(S.UnterminatedTemplate,Vs(n,i,s))}}),this.state=new wc,this.state.init(r),this.input=t,this.length=t.length,this.comments=[],this.isLookahead=!1}pushToken(r){this.tokens.length=this.state.tokensLength,this.tokens.push(r),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.optionFlags&128&&this.pushToken(new Rr(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(r){return this.match(r)?(this.next(),!0):!1}match(r){return this.state.type===r}createLookaheadState(r){return{pos:r.pos,value:null,type:r.type,start:r.start,end:r.end,context:[this.curContext()],inType:r.inType,startLoc:r.startLoc,lastTokEndLoc:r.lastTokEndLoc,curLine:r.curLine,lineStart:r.lineStart,curPosition:r.curPosition}}lookahead(){let r=this.state;this.state=this.createLookaheadState(r),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;let t=this.state;return this.state=r,t}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(r){return hc.lastIndex=r,hc.test(this.input)?hc.lastIndex:r}lookaheadCharCode(){return this.input.charCodeAt(this.nextTokenStart())}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(r){return gc.lastIndex=r,gc.test(this.input)?gc.lastIndex:r}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(r){let t=this.input.charCodeAt(r);if((t&64512)===55296&&++r<this.input.length){let n=this.input.charCodeAt(r);(n&64512)===56320&&(t=65536+((t&1023)<<10)+(n&1023))}return t}setStrict(r){this.state.strict=r,r&&(this.state.strictErrors.forEach(([t,n])=>this.raise(t,n)),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){if(this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length){this.finishToken(140);return}this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(r){let t;this.isLookahead||(t=this.state.curPosition());let n=this.state.pos,i=this.input.indexOf(r,n+2);if(i===-1)throw this.raise(S.UnterminatedComment,this.state.curPosition());for(this.state.pos=i+r.length,Sa.lastIndex=n+2;Sa.test(this.input)&&Sa.lastIndex<=i;)++this.state.curLine,this.state.lineStart=Sa.lastIndex;if(this.isLookahead)return;let s={type:"CommentBlock",value:this.input.slice(n+2,i),start:this.sourceToOffsetPos(n),end:this.sourceToOffsetPos(i+r.length),loc:new Vi(t,this.state.curPosition())};return this.optionFlags&128&&this.pushToken(s),s}skipLineComment(r){let t=this.state.pos,n;this.isLookahead||(n=this.state.curPosition());let i=this.input.charCodeAt(this.state.pos+=r);if(this.state.pos<this.length)for(;!ji(i)&&++this.state.pos<this.length;)i=this.input.charCodeAt(this.state.pos);if(this.isLookahead)return;let s=this.state.pos,a={type:"CommentLine",value:this.input.slice(t+r,s),start:this.sourceToOffsetPos(t),end:this.sourceToOffsetPos(s),loc:new Vi(n,this.state.curPosition())};return this.optionFlags&128&&this.pushToken(a),a}skipSpace(){let r=this.state.pos,t=this.optionFlags&2048?[]:null;e:for(;this.state.pos<this.length;){let n=this.input.charCodeAt(this.state.pos);switch(n){case 32:case 160:case 9:++this.state.pos;break;case 13:this.input.charCodeAt(this.state.pos+1)===10&&++this.state.pos;case 10:case 8232:case 8233:++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;break;case 47:switch(this.input.charCodeAt(this.state.pos+1)){case 42:{let i=this.skipBlockComment("*/");i!==void 0&&(this.addComment(i),t?.push(i));break}case 47:{let i=this.skipLineComment(2);i!==void 0&&(this.addComment(i),t?.push(i));break}default:break e}break;default:if(Lv(n))++this.state.pos;else if(n===45&&!this.inModule&&this.optionFlags&4096){let i=this.state.pos;if(this.input.charCodeAt(i+1)===45&&this.input.charCodeAt(i+2)===62&&(r===0||this.state.lineStart>r)){let s=this.skipLineComment(3);s!==void 0&&(this.addComment(s),t?.push(s))}else break e}else if(n===60&&!this.inModule&&this.optionFlags&4096){let i=this.state.pos;if(this.input.charCodeAt(i+1)===33&&this.input.charCodeAt(i+2)===45&&this.input.charCodeAt(i+3)===45){let s=this.skipLineComment(4);s!==void 0&&(this.addComment(s),t?.push(s))}else break e}else break e}}if(t?.length>0){let n=this.state.pos,i={start:this.sourceToOffsetPos(r),end:this.sourceToOffsetPos(n),comments:t,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(i)}}finishToken(r,t){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();let n=this.state.type;this.state.type=r,this.state.value=t,this.isLookahead||this.updateContext(n)}replaceToken(r){this.state.type=r,this.updateContext()}readToken_numberSign(){if(this.state.pos===0&&this.readToken_interpreter())return;let r=this.state.pos+1,t=this.codePointAtPos(r);if(t>=48&&t<=57)throw this.raise(S.UnexpectedDigitAfterHash,this.state.curPosition());if(t===123||t===91&&this.hasPlugin("recordAndTuple")){if(this.expectPlugin("recordAndTuple"),this.getPluginOption("recordAndTuple","syntaxType")==="bar")throw this.raise(t===123?S.RecordExpressionHashIncorrectStartSyntaxType:S.TupleExpressionHashIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,t===123?this.finishToken(7):this.finishToken(1)}else an(t)?(++this.state.pos,this.finishToken(139,this.readWord1(t))):t===92?(++this.state.pos,this.finishToken(139,this.readWord1())):this.finishOp(27,1)}readToken_dot(){let r=this.input.charCodeAt(this.state.pos+1);if(r>=48&&r<=57){this.readNumber(!0);return}r===46&&this.input.charCodeAt(this.state.pos+2)===46?(this.state.pos+=3,this.finishToken(21)):(++this.state.pos,this.finishToken(16))}readToken_slash(){this.input.charCodeAt(this.state.pos+1)===61?this.finishOp(31,2):this.finishOp(56,1)}readToken_interpreter(){if(this.state.pos!==0||this.length<2)return!1;let r=this.input.charCodeAt(this.state.pos+1);if(r!==33)return!1;let t=this.state.pos;for(this.state.pos+=1;!ji(r)&&++this.state.pos<this.length;)r=this.input.charCodeAt(this.state.pos);let n=this.input.slice(t+2,this.state.pos);return this.finishToken(28,n),!0}readToken_mult_modulo(r){let t=r===42?55:54,n=1,i=this.input.charCodeAt(this.state.pos+1);r===42&&i===42&&(n++,i=this.input.charCodeAt(this.state.pos+2),t=57),i===61&&!this.state.inType&&(n++,t=r===37?33:30),this.finishOp(t,n)}readToken_pipe_amp(r){let t=this.input.charCodeAt(this.state.pos+1);if(t===r){this.input.charCodeAt(this.state.pos+2)===61?this.finishOp(30,3):this.finishOp(r===124?41:42,2);return}if(r===124){if(t===62){this.finishOp(39,2);return}if(this.hasPlugin("recordAndTuple")&&t===125){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(S.RecordExpressionBarIncorrectEndSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(9);return}if(this.hasPlugin("recordAndTuple")&&t===93){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(S.TupleExpressionBarIncorrectEndSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(4);return}}if(t===61){this.finishOp(30,2);return}this.finishOp(r===124?43:45,1)}readToken_caret(){let r=this.input.charCodeAt(this.state.pos+1);r===61&&!this.state.inType?this.finishOp(32,2):r===94&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"^^"}])?(this.finishOp(37,2),this.input.codePointAt(this.state.pos)===94&&this.unexpected()):this.finishOp(44,1)}readToken_atSign(){this.input.charCodeAt(this.state.pos+1)===64&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"@@"}])?this.finishOp(38,2):this.finishOp(26,1)}readToken_plus_min(r){let t=this.input.charCodeAt(this.state.pos+1);if(t===r){this.finishOp(34,2);return}t===61?this.finishOp(30,2):this.finishOp(53,1)}readToken_lt(){let{pos:r}=this.state,t=this.input.charCodeAt(r+1);if(t===60){if(this.input.charCodeAt(r+2)===61){this.finishOp(30,3);return}this.finishOp(51,2);return}if(t===61){this.finishOp(49,2);return}this.finishOp(47,1)}readToken_gt(){let{pos:r}=this.state,t=this.input.charCodeAt(r+1);if(t===62){let n=this.input.charCodeAt(r+2)===62?3:2;if(this.input.charCodeAt(r+n)===61){this.finishOp(30,n+1);return}this.finishOp(52,n);return}if(t===61){this.finishOp(49,2);return}this.finishOp(48,1)}readToken_eq_excl(r){let t=this.input.charCodeAt(this.state.pos+1);if(t===61){this.finishOp(46,this.input.charCodeAt(this.state.pos+2)===61?3:2);return}if(r===61&&t===62){this.state.pos+=2,this.finishToken(19);return}this.finishOp(r===61?29:35,1)}readToken_question(){let r=this.input.charCodeAt(this.state.pos+1),t=this.input.charCodeAt(this.state.pos+2);r===63?t===61?this.finishOp(30,3):this.finishOp(40,2):r===46&&!(t>=48&&t<=57)?(this.state.pos+=2,this.finishToken(18)):(++this.state.pos,this.finishToken(17))}getTokenFromCode(r){switch(r){case 46:this.readToken_dot();return;case 40:++this.state.pos,this.finishToken(10);return;case 41:++this.state.pos,this.finishToken(11);return;case 59:++this.state.pos,this.finishToken(13);return;case 44:++this.state.pos,this.finishToken(12);return;case 91:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(S.TupleExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(2)}else++this.state.pos,this.finishToken(0);return;case 93:++this.state.pos,this.finishToken(3);return;case 123:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(S.RecordExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(6)}else++this.state.pos,this.finishToken(5);return;case 125:++this.state.pos,this.finishToken(8);return;case 58:this.hasPlugin("functionBind")&&this.input.charCodeAt(this.state.pos+1)===58?this.finishOp(15,2):(++this.state.pos,this.finishToken(14));return;case 63:this.readToken_question();return;case 96:this.readTemplateToken();return;case 48:{let t=this.input.charCodeAt(this.state.pos+1);if(t===120||t===88){this.readRadixNumber(16);return}if(t===111||t===79){this.readRadixNumber(8);return}if(t===98||t===66){this.readRadixNumber(2);return}}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:this.readNumber(!1);return;case 34:case 39:this.readString(r);return;case 47:this.readToken_slash();return;case 37:case 42:this.readToken_mult_modulo(r);return;case 124:case 38:this.readToken_pipe_amp(r);return;case 94:this.readToken_caret();return;case 43:case 45:this.readToken_plus_min(r);return;case 60:this.readToken_lt();return;case 62:this.readToken_gt();return;case 61:case 33:this.readToken_eq_excl(r);return;case 126:this.finishOp(36,1);return;case 64:this.readToken_atSign();return;case 35:this.readToken_numberSign();return;case 92:this.readWord();return;default:if(an(r)){this.readWord(r);return}}throw this.raise(S.InvalidOrUnexpectedToken,this.state.curPosition(),{unexpected:String.fromCodePoint(r)})}finishOp(r,t){let n=this.input.slice(this.state.pos,this.state.pos+t);this.state.pos+=t,this.finishToken(r,n)}readRegexp(){let r=this.state.startLoc,t=this.state.start+1,n,i,{pos:s}=this.state;for(;;++s){if(s>=this.length)throw this.raise(S.UnterminatedRegExp,_t(r,1));let u=this.input.charCodeAt(s);if(ji(u))throw this.raise(S.UnterminatedRegExp,_t(r,1));if(n)n=!1;else{if(u===91)i=!0;else if(u===93&&i)i=!1;else if(u===47&&!i)break;n=u===92}}let o=this.input.slice(t,s);++s;let a="",l=()=>_t(r,s+2-t);for(;s<this.length;){let u=this.codePointAtPos(s),c=String.fromCharCode(u);if(Uv.has(u))u===118?a.includes("u")&&this.raise(S.IncompatibleRegExpUVFlags,l()):u===117&&a.includes("v")&&this.raise(S.IncompatibleRegExpUVFlags,l()),a.includes(c)&&this.raise(S.DuplicateRegExpFlags,l());else if(Ui(u)||u===92)this.raise(S.MalformedRegExpFlags,l());else break;++s,a+=c}this.state.pos=s,this.finishToken(138,{pattern:o,flags:a})}readInt(r,t,n=!1,i=!0){let{n:s,pos:o}=qy(this.input,this.state.pos,this.state.lineStart,this.state.curLine,r,t,n,i,this.errorHandlers_readInt,!1);return this.state.pos=o,s}readRadixNumber(r){let t=this.state.pos,n=this.state.curPosition(),i=!1;this.state.pos+=2;let s=this.readInt(r);s==null&&this.raise(S.InvalidDigit,_t(n,2),{radix:r});let o=this.input.charCodeAt(this.state.pos);if(o===110)++this.state.pos,i=!0;else if(o===109)throw this.raise(S.InvalidDecimal,n);if(an(this.codePointAtPos(this.state.pos)))throw this.raise(S.NumberIdentifier,this.state.curPosition());if(i){let a=this.input.slice(t,this.state.pos).replace(/[_n]/g,"");this.finishToken(136,a);return}this.finishToken(135,s)}readNumber(r){let t=this.state.pos,n=this.state.curPosition(),i=!1,s=!1,o=!1,a=!1;!r&&this.readInt(10)===null&&this.raise(S.InvalidNumber,this.state.curPosition());let l=this.state.pos-t>=2&&this.input.charCodeAt(t)===48;if(l){let f=this.input.slice(t,this.state.pos);if(this.recordStrictModeErrors(S.StrictOctalLiteral,n),!this.state.strict){let m=f.indexOf("_");m>0&&this.raise(S.ZeroDigitNumericSeparator,_t(n,m))}a=l&&!/[89]/.test(f)}let u=this.input.charCodeAt(this.state.pos);if(u===46&&!a&&(++this.state.pos,this.readInt(10),i=!0,u=this.input.charCodeAt(this.state.pos)),(u===69||u===101)&&!a&&(u=this.input.charCodeAt(++this.state.pos),(u===43||u===45)&&++this.state.pos,this.readInt(10)===null&&this.raise(S.InvalidOrMissingExponent,n),i=!0,o=!0,u=this.input.charCodeAt(this.state.pos)),u===110&&((i||l)&&this.raise(S.InvalidBigIntLiteral,n),++this.state.pos,s=!0),u===109){this.expectPlugin("decimal",this.state.curPosition()),(o||l)&&this.raise(S.InvalidDecimal,n),++this.state.pos;var c=!0}if(an(this.codePointAtPos(this.state.pos)))throw this.raise(S.NumberIdentifier,this.state.curPosition());let p=this.input.slice(t,this.state.pos).replace(/[_mn]/g,"");if(s){this.finishToken(136,p);return}if(c){this.finishToken(137,p);return}let d=a?parseInt(p,8):parseFloat(p);this.finishToken(135,d)}readCodePoint(r){let{code:t,pos:n}=Wy(this.input,this.state.pos,this.state.lineStart,this.state.curLine,r,this.errorHandlers_readCodePoint);return this.state.pos=n,t}readString(r){let{str:t,pos:n,curLine:i,lineStart:s}=Iy(r===34?"double":"single",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_string);this.state.pos=n+1,this.state.lineStart=s,this.state.curLine=i,this.finishToken(134,t)}readTemplateContinuation(){this.match(8)||this.unexpected(null,8),this.state.pos--,this.readTemplateToken()}readTemplateToken(){let r=this.input[this.state.pos],{str:t,firstInvalidLoc:n,pos:i,curLine:s,lineStart:o}=Iy("template",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);this.state.pos=i+1,this.state.lineStart=o,this.state.curLine=s,n&&(this.state.firstInvalidTemplateEscapePos=new Lr(n.curLine,n.pos-n.lineStart,this.sourceToOffsetPos(n.pos))),this.input.codePointAt(i)===96?this.finishToken(24,n?null:r+t+"`"):(this.state.pos++,this.finishToken(25,n?null:r+t+"${"))}recordStrictModeErrors(r,t){let n=t.index;this.state.strict&&!this.state.strictErrors.has(n)?this.raise(r,t):this.state.strictErrors.set(n,[r,t])}readWord1(r){this.state.containsEsc=!1;let t="",n=this.state.pos,i=this.state.pos;for(r!==void 0&&(this.state.pos+=r<=65535?1:2);this.state.pos<this.length;){let s=this.codePointAtPos(this.state.pos);if(Ui(s))this.state.pos+=s<=65535?1:2;else if(s===92){this.state.containsEsc=!0,t+=this.input.slice(i,this.state.pos);let o=this.state.curPosition(),a=this.state.pos===n?an:Ui;if(this.input.charCodeAt(++this.state.pos)!==117){this.raise(S.MissingUnicodeEscape,this.state.curPosition()),i=this.state.pos-1;continue}++this.state.pos;let l=this.readCodePoint(!0);l!==null&&(a(l)||this.raise(S.EscapedCharNotAnIdentifier,o),t+=String.fromCodePoint(l)),i=this.state.pos}else break}return t+this.input.slice(i,this.state.pos)}readWord(r){let t=this.readWord1(r),n=$c.get(t);n!==void 0?this.finishToken(n,Nn(n)):this.finishToken(132,t)}checkKeywordEscapes(){let{type:r}=this.state;qc(r)&&this.state.containsEsc&&this.raise(S.InvalidEscapedReservedWord,this.state.startLoc,{reservedWord:Nn(r)})}raise(r,t,n={}){let i=t instanceof Lr?t:t.loc.start,s=r(i,n);if(!(this.optionFlags&1024))throw s;return this.isLookahead||this.state.errors.push(s),s}raiseOverwrite(r,t,n={}){let i=t instanceof Lr?t:t.loc.start,s=i.index,o=this.state.errors;for(let a=o.length-1;a>=0;a--){let l=o[a];if(l.loc.index===s)return o[a]=r(i,n);if(l.loc.index<s)break}return this.raise(r,t,n)}updateContext(r){}unexpected(r,t){throw this.raise(S.UnexpectedToken,r??this.state.startLoc,{expected:t?Nn(t):null})}expectPlugin(r,t){if(this.hasPlugin(r))return!0;throw this.raise(S.MissingPlugin,t??this.state.startLoc,{missingPlugin:[r]})}expectOnePlugin(r){if(!r.some(t=>this.hasPlugin(t)))throw this.raise(S.MissingOneOfPlugins,this.state.startLoc,{missingPlugin:r})}errorBuilder(r){return(t,n,i)=>{this.raise(r,Vs(t,n,i))}}},Pc=class{constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}},Ic=class{constructor(r){this.parser=void 0,this.stack=[],this.undefinedPrivateNames=new Map,this.parser=r}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new Pc)}exit(){let r=this.stack.pop(),t=this.current();for(let[n,i]of Array.from(r.undefinedPrivateNames))t?t.undefinedPrivateNames.has(n)||t.undefinedPrivateNames.set(n,i):this.parser.raise(S.InvalidPrivateFieldResolution,i,{identifierName:n})}declarePrivateName(r,t,n){let{privateNames:i,loneAccessors:s,undefinedPrivateNames:o}=this.current(),a=i.has(r);if(t&3){let l=a&&s.get(r);if(l){let u=l&4,c=t&4,p=l&3,d=t&3;a=p===d||u!==c,a||s.delete(r)}else a||s.set(r,t)}a&&this.parser.raise(S.PrivateNameRedeclaration,n,{identifierName:r}),i.add(r),o.delete(r)}usePrivateName(r,t){let n;for(n of this.stack)if(n.privateNames.has(r))return;n?n.undefinedPrivateNames.set(r,t):this.parser.raise(S.InvalidPrivateFieldResolution,t,{identifierName:r})}},zi=class{constructor(r=0){this.type=r}canBeArrowParameterDeclaration(){return this.type===2||this.type===1}isCertainlyParameterDeclaration(){return this.type===3}},Na=class extends zi{constructor(r){super(r),this.declarationErrors=new Map}recordDeclarationError(r,t){let n=t.index;this.declarationErrors.set(n,[r,t])}clearDeclarationError(r){this.declarationErrors.delete(r)}iterateErrors(r){this.declarationErrors.forEach(r)}},Nc=class{constructor(r){this.parser=void 0,this.stack=[new zi],this.parser=r}enter(r){this.stack.push(r)}exit(){this.stack.pop()}recordParameterInitializerError(r,t){let n=t.loc.start,{stack:i}=this,s=i.length-1,o=i[s];for(;!o.isCertainlyParameterDeclaration();){if(o.canBeArrowParameterDeclaration())o.recordDeclarationError(r,n);else return;o=i[--s]}this.parser.raise(r,n)}recordArrowParameterBindingError(r,t){let{stack:n}=this,i=n[n.length-1],s=t.loc.start;if(i.isCertainlyParameterDeclaration())this.parser.raise(r,s);else if(i.canBeArrowParameterDeclaration())i.recordDeclarationError(r,s);else return}recordAsyncArrowParametersError(r){let{stack:t}=this,n=t.length-1,i=t[n];for(;i.canBeArrowParameterDeclaration();)i.type===2&&i.recordDeclarationError(S.AwaitBindingIdentifier,r),i=t[--n]}validateAsPattern(){let{stack:r}=this,t=r[r.length-1];t.canBeArrowParameterDeclaration()&&t.iterateErrors(([n,i])=>{this.parser.raise(n,i);let s=r.length-2,o=r[s];for(;o.canBeArrowParameterDeclaration();)o.clearDeclarationError(i.index),o=r[--s]})}};function jv(){return new zi(3)}function Kv(){return new Na(1)}function Vv(){return new Na(2)}function Gy(){return new zi}var Fc=class{constructor(){this.stacks=[]}enter(r){this.stacks.push(r)}exit(){this.stacks.pop()}currentFlags(){return this.stacks[this.stacks.length-1]}get hasAwait(){return(this.currentFlags()&2)>0}get hasYield(){return(this.currentFlags()&1)>0}get hasReturn(){return(this.currentFlags()&4)>0}get hasIn(){return(this.currentFlags()&8)>0}};function va(e,r){return(e?2:0)|(r?1:0)}var _c=class extends vc{addExtra(r,t,n,i=!0){if(!r)return;let{extra:s}=r;s==null&&(s={},r.extra=s),i?s[t]=n:Object.defineProperty(s,t,{enumerable:i,value:n})}isContextual(r){return this.state.type===r&&!this.state.containsEsc}isUnparsedContextual(r,t){let n=r+t.length;if(this.input.slice(r,n)===t){let i=this.input.charCodeAt(n);return!(Ui(i)||(i&64512)===55296)}return!1}isLookaheadContextual(r){let t=this.nextTokenStart();return this.isUnparsedContextual(t,r)}eatContextual(r){return this.isContextual(r)?(this.next(),!0):!1}expectContextual(r,t){if(!this.eatContextual(r)){if(t!=null)throw this.raise(t,this.state.startLoc);this.unexpected(null,r)}}canInsertSemicolon(){return this.match(140)||this.match(8)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return vy(this.input,this.offsetToSourcePos(this.state.lastTokEndLoc.index),this.state.start)}hasFollowingLineBreak(){return vy(this.input,this.state.end,this.nextTokenStart())}isLineTerminator(){return this.eat(13)||this.canInsertSemicolon()}semicolon(r=!0){(r?this.isLineTerminator():this.eat(13))||this.raise(S.MissingSemicolon,this.state.lastTokEndLoc)}expect(r,t){this.eat(r)||this.unexpected(t,r)}tryParse(r,t=this.state.clone()){let n={node:null};try{let i=r((s=null)=>{throw n.node=s,n});if(this.state.errors.length>t.errors.length){let s=this.state;return this.state=t,this.state.tokensLength=s.tokensLength,{node:i,error:s.errors[t.errors.length],thrown:!1,aborted:!1,failState:s}}return{node:i,error:null,thrown:!1,aborted:!1,failState:null}}catch(i){let s=this.state;if(this.state=t,i instanceof SyntaxError)return{node:null,error:i,thrown:!0,aborted:!1,failState:s};if(i===n)return{node:n.node,error:null,thrown:!1,aborted:!0,failState:s};throw i}}checkExpressionErrors(r,t){if(!r)return!1;let{shorthandAssignLoc:n,doubleProtoLoc:i,privateKeyLoc:s,optionalParametersLoc:o}=r,a=!!n||!!i||!!o||!!s;if(!t)return a;n!=null&&this.raise(S.InvalidCoverInitializedName,n),i!=null&&this.raise(S.DuplicateProto,i),s!=null&&this.raise(S.UnexpectedPrivateField,s),o!=null&&this.unexpected(o)}isLiteralPropertyName(){return By(this.state.type)}isPrivateName(r){return r.type==="PrivateName"}getPrivateNameSV(r){return r.id.name}hasPropertyAsPrivateName(r){return(r.type==="MemberExpression"||r.type==="OptionalMemberExpression")&&this.isPrivateName(r.property)}isObjectProperty(r){return r.type==="ObjectProperty"}isObjectMethod(r){return r.type==="ObjectMethod"}initializeScopes(r=this.options.sourceType==="module"){let t=this.state.labels;this.state.labels=[];let n=this.exportedIdentifiers;this.exportedIdentifiers=new Set;let i=this.inModule;this.inModule=r;let s=this.scope,o=this.getScopeHandler();this.scope=new o(this,r);let a=this.prodParam;this.prodParam=new Fc;let l=this.classScope;this.classScope=new Ic(this);let u=this.expressionScope;return this.expressionScope=new Nc(this),()=>{this.state.labels=t,this.exportedIdentifiers=n,this.inModule=i,this.scope=s,this.prodParam=a,this.classScope=l,this.expressionScope=u}}enterInitialScopes(){let r=0;this.inModule&&(r|=2),this.scope.enter(1),this.prodParam.enter(r)}checkDestructuringPrivate(r){let{privateKeyLoc:t}=r;t!==null&&this.expectPlugin("destructuringPrivate",t)}},Ki=class{constructor(){this.shorthandAssignLoc=null,this.doubleProtoLoc=null,this.privateKeyLoc=null,this.optionalParametersLoc=null}},qi=class{constructor(r,t,n){this.type="",this.start=t,this.end=0,this.loc=new Vi(n),r?.optionFlags&64&&(this.range=[t,0]),r!=null&&r.filename&&(this.loc.filename=r.filename)}},Hc=qi.prototype;Hc.__clone=function(){let e=new qi(void 0,this.start,this.loc.start),r=Object.keys(this);for(let t=0,n=r.length;t<n;t++){let i=r[t];i!=="leadingComments"&&i!=="trailingComments"&&i!=="innerComments"&&(e[i]=this[i])}return e};function zv(e){return un(e)}function un(e){let{type:r,start:t,end:n,loc:i,range:s,extra:o,name:a}=e,l=Object.create(Hc);return l.type=r,l.start=t,l.end=n,l.loc=i,l.range=s,l.extra=o,l.name=a,r==="Placeholder"&&(l.expectedNode=e.expectedNode),l}function qv(e){let{type:r,start:t,end:n,loc:i,range:s,extra:o}=e;if(r==="Placeholder")return zv(e);let a=Object.create(Hc);return a.type=r,a.start=t,a.end=n,a.loc=i,a.range=s,e.raw!==void 0?a.raw=e.raw:a.extra=o,a.value=e.value,a}var kc=class extends _c{startNode(){let r=this.state.startLoc;return new qi(this,r.index,r)}startNodeAt(r){return new qi(this,r.index,r)}startNodeAtNode(r){return this.startNodeAt(r.loc.start)}finishNode(r,t){return this.finishNodeAt(r,t,this.state.lastTokEndLoc)}finishNodeAt(r,t,n){return r.type=t,r.end=n.index,r.loc.end=n,this.optionFlags&64&&(r.range[1]=n.index),this.optionFlags&2048&&this.processComment(r),r}resetStartLocation(r,t){r.start=t.index,r.loc.start=t,this.optionFlags&64&&(r.range[0]=t.index)}resetEndLocation(r,t=this.state.lastTokEndLoc){r.end=t.index,r.loc.end=t,this.optionFlags&64&&(r.range[1]=t.index)}resetStartLocationFromNode(r,t){this.resetStartLocation(r,t.loc.start)}},Wv=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),Q=ln`flow`({AmbiguousConditionalArrow:"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.",AmbiguousDeclareModuleKind:"Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.",AssignReservedType:({reservedType:e})=>`Cannot overwrite reserved type ${e}.`,DeclareClassElement:"The `declare` modifier can only appear on class fields.",DeclareClassFieldInitializer:"Initializers are not allowed in fields with the `declare` modifier.",DuplicateDeclareModuleExports:"Duplicate `declare module.exports` statement.",EnumBooleanMemberNotInitialized:({memberName:e,enumName:r})=>`Boolean enum members need to be initialized. Use either \`${e} = true,\` or \`${e} = false,\` in enum \`${r}\`.`,EnumDuplicateMemberName:({memberName:e,enumName:r})=>`Enum member names need to be unique, but the name \`${e}\` has already been used before in enum \`${r}\`.`,EnumInconsistentMemberValues:({enumName:e})=>`Enum \`${e}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:e,enumName:r})=>`Enum type \`${e}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${r}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:e})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${e}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:e,memberName:r,explicitType:t})=>`Enum \`${e}\` has type \`${t}\`, so the initializer of \`${r}\` needs to be a ${t} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:e,memberName:r})=>`Symbol enum members cannot be initialized. Use \`${r},\` in enum \`${e}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:e,memberName:r})=>`The enum member initializer for \`${r}\` needs to be a literal (either a boolean, number, or string) in enum \`${e}\`.`,EnumInvalidMemberName:({enumName:e,memberName:r,suggestion:t})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${r}\`, consider using \`${t}\`, in enum \`${e}\`.`,EnumNumberMemberNotInitialized:({enumName:e,memberName:r})=>`Number enum members need to be initialized, e.g. \`${r} = 1\` in enum \`${e}\`.`,EnumStringMemberInconsistentlyInitialized:({enumName:e})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${e}\`.`,GetterMayNotHaveThisParam:"A getter cannot have a `this` parameter.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` or `typeof` keyword.",ImportTypeShorthandOnlyInPureImport:"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",InexactInsideExact:"Explicit inexact syntax cannot appear inside an explicit exact object type.",InexactInsideNonObject:"Explicit inexact syntax cannot appear in class or interface definitions.",InexactVariance:"Explicit inexact syntax cannot have variance.",InvalidNonTypeImportInDeclareModule:"Imports within a `declare module` body must always be `import type` or `import typeof`.",MissingTypeParamDefault:"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",NestedDeclareModule:"`declare module` cannot be used inside another `declare module`.",NestedFlowComment:"Cannot have a flow comment inside another flow comment.",PatternIsOptional:Object.assign({message:"A binding pattern parameter cannot be optional in an implementation signature."},{reasonCode:"OptionalBindingPattern"}),SetterMayNotHaveThisParam:"A setter cannot have a `this` parameter.",SpreadVariance:"Spread properties cannot have variance.",ThisParamAnnotationRequired:"A type annotation is required for the `this` parameter.",ThisParamBannedInConstructor:"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",ThisParamMayNotBeOptional:"The `this` parameter cannot be optional.",ThisParamMustBeFirst:"The `this` parameter must be the first function parameter.",ThisParamNoDefault:"The `this` parameter may not have a default value.",TypeBeforeInitializer:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeCastInPattern:"The type cast expression is expected to be wrapped with parenthesis.",UnexpectedExplicitInexactInObject:"Explicit inexact syntax must appear at the end of an inexact object.",UnexpectedReservedType:({reservedType:e})=>`Unexpected reserved type ${e}.`,UnexpectedReservedUnderscore:"`_` is only allowed as a type argument to call or new.",UnexpectedSpaceBetweenModuloChecks:"Spaces between `%` and `checks` are not allowed here.",UnexpectedSpreadType:"Spread operator cannot appear in class or interface definitions.",UnexpectedSubtractionOperand:'Unexpected token, expected "number" or "bigint".',UnexpectedTokenAfterTypeParameter:"Expected an arrow function after this type parameter declaration.",UnexpectedTypeParameterBeforeAsyncArrowFunction:"Type parameters must come after the async keyword, e.g. instead of `<T> async () => {}`, use `async <T>() => {}`.",UnsupportedDeclareExportKind:({unsupportedExportKind:e,suggestion:r})=>`\`declare export ${e}\` is not supported. Use \`${r}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."});function Gv(e){return e.type==="DeclareExportAllDeclaration"||e.type==="DeclareExportDeclaration"&&(!e.declaration||e.declaration.type!=="TypeAlias"&&e.declaration.type!=="InterfaceDeclaration")}function Ny(e){return e.importKind==="type"||e.importKind==="typeof"}var Hv={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};function Jv(e,r){let t=[],n=[];for(let i=0;i<e.length;i++)(r(e[i],i,e)?t:n).push(e[i]);return[t,n]}var Yv=/\*?\s*@((?:no)?flow)\b/,Xv=e=>class extends e{constructor(...t){super(...t),this.flowPragma=void 0}getScopeHandler(){return Cc}shouldParseTypes(){return this.getPluginOption("flow","all")||this.flowPragma==="flow"}finishToken(t,n){t!==134&&t!==13&&t!==28&&this.flowPragma===void 0&&(this.flowPragma=null),super.finishToken(t,n)}addComment(t){if(this.flowPragma===void 0){let n=Yv.exec(t.value);if(n)if(n[1]==="flow")this.flowPragma="flow";else if(n[1]==="noflow")this.flowPragma="noflow";else throw new Error("Unexpected flow pragma")}super.addComment(t)}flowParseTypeInitialiser(t){let n=this.state.inType;this.state.inType=!0,this.expect(t||14);let i=this.flowParseType();return this.state.inType=n,i}flowParsePredicate(){let t=this.startNode(),n=this.state.startLoc;return this.next(),this.expectContextual(110),this.state.lastTokStartLoc.index>n.index+1&&this.raise(Q.UnexpectedSpaceBetweenModuloChecks,n),this.eat(10)?(t.value=super.parseExpression(),this.expect(11),this.finishNode(t,"DeclaredPredicate")):this.finishNode(t,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){let t=this.state.inType;this.state.inType=!0,this.expect(14);let n=null,i=null;return this.match(54)?(this.state.inType=t,i=this.flowParsePredicate()):(n=this.flowParseType(),this.state.inType=t,this.match(54)&&(i=this.flowParsePredicate())),[n,i]}flowParseDeclareClass(t){return this.next(),this.flowParseInterfaceish(t,!0),this.finishNode(t,"DeclareClass")}flowParseDeclareFunction(t){this.next();let n=t.id=this.parseIdentifier(),i=this.startNode(),s=this.startNode();this.match(47)?i.typeParameters=this.flowParseTypeParameterDeclaration():i.typeParameters=null,this.expect(10);let o=this.flowParseFunctionTypeParams();return i.params=o.params,i.rest=o.rest,i.this=o._this,this.expect(11),[i.returnType,t.predicate]=this.flowParseTypeAndPredicateInitialiser(),s.typeAnnotation=this.finishNode(i,"FunctionTypeAnnotation"),n.typeAnnotation=this.finishNode(s,"TypeAnnotation"),this.resetEndLocation(n),this.semicolon(),this.scope.declareName(t.id.name,2048,t.id.loc.start),this.finishNode(t,"DeclareFunction")}flowParseDeclare(t,n){if(this.match(80))return this.flowParseDeclareClass(t);if(this.match(68))return this.flowParseDeclareFunction(t);if(this.match(74))return this.flowParseDeclareVariable(t);if(this.eatContextual(127))return this.match(16)?this.flowParseDeclareModuleExports(t):(n&&this.raise(Q.NestedDeclareModule,this.state.lastTokStartLoc),this.flowParseDeclareModule(t));if(this.isContextual(130))return this.flowParseDeclareTypeAlias(t);if(this.isContextual(131))return this.flowParseDeclareOpaqueType(t);if(this.isContextual(129))return this.flowParseDeclareInterface(t);if(this.match(82))return this.flowParseDeclareExportDeclaration(t,n);this.unexpected()}flowParseDeclareVariable(t){return this.next(),t.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(t.id.name,5,t.id.loc.start),this.semicolon(),this.finishNode(t,"DeclareVariable")}flowParseDeclareModule(t){this.scope.enter(0),this.match(134)?t.id=super.parseExprAtom():t.id=this.parseIdentifier();let n=t.body=this.startNode(),i=n.body=[];for(this.expect(5);!this.match(8);){let a=this.startNode();this.match(83)?(this.next(),!this.isContextual(130)&&!this.match(87)&&this.raise(Q.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc),super.parseImport(a)):(this.expectContextual(125,Q.UnsupportedStatementInDeclareModule),a=this.flowParseDeclare(a,!0)),i.push(a)}this.scope.exit(),this.expect(8),this.finishNode(n,"BlockStatement");let s=null,o=!1;return i.forEach(a=>{Gv(a)?(s==="CommonJS"&&this.raise(Q.AmbiguousDeclareModuleKind,a),s="ES"):a.type==="DeclareModuleExports"&&(o&&this.raise(Q.DuplicateDeclareModuleExports,a),s==="ES"&&this.raise(Q.AmbiguousDeclareModuleKind,a),s="CommonJS",o=!0)}),t.kind=s||"CommonJS",this.finishNode(t,"DeclareModule")}flowParseDeclareExportDeclaration(t,n){if(this.expect(82),this.eat(65))return this.match(68)||this.match(80)?t.declaration=this.flowParseDeclare(this.startNode()):(t.declaration=this.flowParseType(),this.semicolon()),t.default=!0,this.finishNode(t,"DeclareExportDeclaration");if(this.match(75)||this.isLet()||(this.isContextual(130)||this.isContextual(129))&&!n){let i=this.state.value;throw this.raise(Q.UnsupportedDeclareExportKind,this.state.startLoc,{unsupportedExportKind:i,suggestion:Hv[i]})}if(this.match(74)||this.match(68)||this.match(80)||this.isContextual(131))return t.declaration=this.flowParseDeclare(this.startNode()),t.default=!1,this.finishNode(t,"DeclareExportDeclaration");if(this.match(55)||this.match(5)||this.isContextual(129)||this.isContextual(130)||this.isContextual(131))return t=this.parseExport(t,null),t.type==="ExportNamedDeclaration"&&(t.type="ExportDeclaration",t.default=!1,delete t.exportKind),t.type="Declare"+t.type,t;this.unexpected()}flowParseDeclareModuleExports(t){return this.next(),this.expectContextual(111),t.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(t,"DeclareModuleExports")}flowParseDeclareTypeAlias(t){this.next();let n=this.flowParseTypeAlias(t);return n.type="DeclareTypeAlias",n}flowParseDeclareOpaqueType(t){this.next();let n=this.flowParseOpaqueType(t,!0);return n.type="DeclareOpaqueType",n}flowParseDeclareInterface(t){return this.next(),this.flowParseInterfaceish(t,!1),this.finishNode(t,"DeclareInterface")}flowParseInterfaceish(t,n){if(t.id=this.flowParseRestrictedIdentifier(!n,!0),this.scope.declareName(t.id.name,n?17:8201,t.id.loc.start),this.match(47)?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.extends=[],this.eat(81))do t.extends.push(this.flowParseInterfaceExtends());while(!n&&this.eat(12));if(n){if(t.implements=[],t.mixins=[],this.eatContextual(117))do t.mixins.push(this.flowParseInterfaceExtends());while(this.eat(12));if(this.eatContextual(113))do t.implements.push(this.flowParseInterfaceExtends());while(this.eat(12))}t.body=this.flowParseObjectType({allowStatic:n,allowExact:!1,allowSpread:!1,allowProto:n,allowInexact:!1})}flowParseInterfaceExtends(){let t=this.startNode();return t.id=this.flowParseQualifiedTypeIdentifier(),this.match(47)?t.typeParameters=this.flowParseTypeParameterInstantiation():t.typeParameters=null,this.finishNode(t,"InterfaceExtends")}flowParseInterface(t){return this.flowParseInterfaceish(t,!1),this.finishNode(t,"InterfaceDeclaration")}checkNotUnderscore(t){t==="_"&&this.raise(Q.UnexpectedReservedUnderscore,this.state.startLoc)}checkReservedType(t,n,i){Wv.has(t)&&this.raise(i?Q.AssignReservedType:Q.UnexpectedReservedType,n,{reservedType:t})}flowParseRestrictedIdentifier(t,n){return this.checkReservedType(this.state.value,this.state.startLoc,n),this.parseIdentifier(t)}flowParseTypeAlias(t){return t.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(t.id.name,8201,t.id.loc.start),this.match(47)?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.right=this.flowParseTypeInitialiser(29),this.semicolon(),this.finishNode(t,"TypeAlias")}flowParseOpaqueType(t,n){return this.expectContextual(130),t.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(t.id.name,8201,t.id.loc.start),this.match(47)?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.supertype=null,this.match(14)&&(t.supertype=this.flowParseTypeInitialiser(14)),t.impltype=null,n||(t.impltype=this.flowParseTypeInitialiser(29)),this.semicolon(),this.finishNode(t,"OpaqueType")}flowParseTypeParameter(t=!1){let n=this.state.startLoc,i=this.startNode(),s=this.flowParseVariance(),o=this.flowParseTypeAnnotatableIdentifier();return i.name=o.name,i.variance=s,i.bound=o.typeAnnotation,this.match(29)?(this.eat(29),i.default=this.flowParseType()):t&&this.raise(Q.MissingTypeParamDefault,n),this.finishNode(i,"TypeParameter")}flowParseTypeParameterDeclaration(){let t=this.state.inType,n=this.startNode();n.params=[],this.state.inType=!0,this.match(47)||this.match(143)?this.next():this.unexpected();let i=!1;do{let s=this.flowParseTypeParameter(i);n.params.push(s),s.default&&(i=!0),this.match(48)||this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=t,this.finishNode(n,"TypeParameterDeclaration")}flowInTopLevelContext(t){if(this.curContext()!==Te.brace){let n=this.state.context;this.state.context=[n[0]];try{return t()}finally{this.state.context=n}}else return t()}flowParseTypeParameterInstantiationInExpression(){if(this.reScan_lt()===47)return this.flowParseTypeParameterInstantiation()}flowParseTypeParameterInstantiation(){let t=this.startNode(),n=this.state.inType;return this.state.inType=!0,t.params=[],this.flowInTopLevelContext(()=>{this.expect(47);let i=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(48);)t.params.push(this.flowParseType()),this.match(48)||this.expect(12);this.state.noAnonFunctionType=i}),this.state.inType=n,!this.state.inType&&this.curContext()===Te.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(t,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){if(this.reScan_lt()!==47)return;let t=this.startNode(),n=this.state.inType;for(t.params=[],this.state.inType=!0,this.expect(47);!this.match(48);)t.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(48)||this.expect(12);return this.expect(48),this.state.inType=n,this.finishNode(t,"TypeParameterInstantiation")}flowParseInterfaceType(){let t=this.startNode();if(this.expectContextual(129),t.extends=[],this.eat(81))do t.extends.push(this.flowParseInterfaceExtends());while(this.eat(12));return t.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(t,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(135)||this.match(134)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(t,n,i){return t.static=n,this.lookahead().type===14?(t.id=this.flowParseObjectPropertyKey(),t.key=this.flowParseTypeInitialiser()):(t.id=null,t.key=this.flowParseType()),this.expect(3),t.value=this.flowParseTypeInitialiser(),t.variance=i,this.finishNode(t,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(t,n){return t.static=n,t.id=this.flowParseObjectPropertyKey(),this.expect(3),this.expect(3),this.match(47)||this.match(10)?(t.method=!0,t.optional=!1,t.value=this.flowParseObjectTypeMethodish(this.startNodeAt(t.loc.start))):(t.method=!1,this.eat(17)&&(t.optional=!0),t.value=this.flowParseTypeInitialiser()),this.finishNode(t,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(t){for(t.params=[],t.rest=null,t.typeParameters=null,t.this=null,this.match(47)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(10),this.match(78)&&(t.this=this.flowParseFunctionTypeParam(!0),t.this.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)t.params.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(t.rest=this.flowParseFunctionTypeParam(!1)),this.expect(11),t.returnType=this.flowParseTypeInitialiser(),this.finishNode(t,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(t,n){let i=this.startNode();return t.static=n,t.value=this.flowParseObjectTypeMethodish(i),this.finishNode(t,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:t,allowExact:n,allowSpread:i,allowProto:s,allowInexact:o}){let a=this.state.inType;this.state.inType=!0;let l=this.startNode();l.callProperties=[],l.properties=[],l.indexers=[],l.internalSlots=[];let u,c,p=!1;for(n&&this.match(6)?(this.expect(6),u=9,c=!0):(this.expect(5),u=8,c=!1),l.exact=c;!this.match(u);){let f=!1,m=null,h=null,g=this.startNode();if(s&&this.isContextual(118)){let b=this.lookahead();b.type!==14&&b.type!==17&&(this.next(),m=this.state.startLoc,t=!1)}if(t&&this.isContextual(106)){let b=this.lookahead();b.type!==14&&b.type!==17&&(this.next(),f=!0)}let y=this.flowParseVariance();if(this.eat(0))m!=null&&this.unexpected(m),this.eat(0)?(y&&this.unexpected(y.loc.start),l.internalSlots.push(this.flowParseObjectTypeInternalSlot(g,f))):l.indexers.push(this.flowParseObjectTypeIndexer(g,f,y));else if(this.match(10)||this.match(47))m!=null&&this.unexpected(m),y&&this.unexpected(y.loc.start),l.callProperties.push(this.flowParseObjectTypeCallProperty(g,f));else{let b="init";if(this.isContextual(99)||this.isContextual(104)){let x=this.lookahead();By(x.type)&&(b=this.state.value,this.next())}let C=this.flowParseObjectTypeProperty(g,f,m,y,b,i,o??!c);C===null?(p=!0,h=this.state.lastTokStartLoc):l.properties.push(C)}this.flowObjectTypeSemicolon(),h&&!this.match(8)&&!this.match(9)&&this.raise(Q.UnexpectedExplicitInexactInObject,h)}this.expect(u),i&&(l.inexact=p);let d=this.finishNode(l,"ObjectTypeAnnotation");return this.state.inType=a,d}flowParseObjectTypeProperty(t,n,i,s,o,a,l){if(this.eat(21))return this.match(12)||this.match(13)||this.match(8)||this.match(9)?(a?l||this.raise(Q.InexactInsideExact,this.state.lastTokStartLoc):this.raise(Q.InexactInsideNonObject,this.state.lastTokStartLoc),s&&this.raise(Q.InexactVariance,s),null):(a||this.raise(Q.UnexpectedSpreadType,this.state.lastTokStartLoc),i!=null&&this.unexpected(i),s&&this.raise(Q.SpreadVariance,s),t.argument=this.flowParseType(),this.finishNode(t,"ObjectTypeSpreadProperty"));{t.key=this.flowParseObjectPropertyKey(),t.static=n,t.proto=i!=null,t.kind=o;let u=!1;return this.match(47)||this.match(10)?(t.method=!0,i!=null&&this.unexpected(i),s&&this.unexpected(s.loc.start),t.value=this.flowParseObjectTypeMethodish(this.startNodeAt(t.loc.start)),(o==="get"||o==="set")&&this.flowCheckGetterSetterParams(t),!a&&t.key.name==="constructor"&&t.value.this&&this.raise(Q.ThisParamBannedInConstructor,t.value.this)):(o!=="init"&&this.unexpected(),t.method=!1,this.eat(17)&&(u=!0),t.value=this.flowParseTypeInitialiser(),t.variance=s),t.optional=u,this.finishNode(t,"ObjectTypeProperty")}}flowCheckGetterSetterParams(t){let n=t.kind==="get"?0:1,i=t.value.params.length+(t.value.rest?1:0);t.value.this&&this.raise(t.kind==="get"?Q.GetterMayNotHaveThisParam:Q.SetterMayNotHaveThisParam,t.value.this),i!==n&&this.raise(t.kind==="get"?S.BadGetterArity:S.BadSetterArity,t),t.kind==="set"&&t.value.rest&&this.raise(S.BadSetterRestParameter,t)}flowObjectTypeSemicolon(){!this.eat(13)&&!this.eat(12)&&!this.match(8)&&!this.match(9)&&this.unexpected()}flowParseQualifiedTypeIdentifier(t,n){var i;(i=t)!=null||(t=this.state.startLoc);let s=n||this.flowParseRestrictedIdentifier(!0);for(;this.eat(16);){let o=this.startNodeAt(t);o.qualification=s,o.id=this.flowParseRestrictedIdentifier(!0),s=this.finishNode(o,"QualifiedTypeIdentifier")}return s}flowParseGenericType(t,n){let i=this.startNodeAt(t);return i.typeParameters=null,i.id=this.flowParseQualifiedTypeIdentifier(t,n),this.match(47)&&(i.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(i,"GenericTypeAnnotation")}flowParseTypeofType(){let t=this.startNode();return this.expect(87),t.argument=this.flowParsePrimaryType(),this.finishNode(t,"TypeofTypeAnnotation")}flowParseTupleType(){let t=this.startNode();for(t.types=[],this.expect(0);this.state.pos<this.length&&!this.match(3)&&(t.types.push(this.flowParseType()),!this.match(3));)this.expect(12);return this.expect(3),this.finishNode(t,"TupleTypeAnnotation")}flowParseFunctionTypeParam(t){let n=null,i=!1,s=null,o=this.startNode(),a=this.lookahead(),l=this.state.type===78;return a.type===14||a.type===17?(l&&!t&&this.raise(Q.ThisParamMustBeFirst,o),n=this.parseIdentifier(l),this.eat(17)&&(i=!0,l&&this.raise(Q.ThisParamMayNotBeOptional,o)),s=this.flowParseTypeInitialiser()):s=this.flowParseType(),o.name=n,o.optional=i,o.typeAnnotation=s,this.finishNode(o,"FunctionTypeParam")}reinterpretTypeAsFunctionTypeParam(t){let n=this.startNodeAt(t.loc.start);return n.name=null,n.optional=!1,n.typeAnnotation=t,this.finishNode(n,"FunctionTypeParam")}flowParseFunctionTypeParams(t=[]){let n=null,i=null;for(this.match(78)&&(i=this.flowParseFunctionTypeParam(!0),i.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)t.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(n=this.flowParseFunctionTypeParam(!1)),{params:t,rest:n,_this:i}}flowIdentToTypeAnnotation(t,n,i){switch(i.name){case"any":return this.finishNode(n,"AnyTypeAnnotation");case"bool":case"boolean":return this.finishNode(n,"BooleanTypeAnnotation");case"mixed":return this.finishNode(n,"MixedTypeAnnotation");case"empty":return this.finishNode(n,"EmptyTypeAnnotation");case"number":return this.finishNode(n,"NumberTypeAnnotation");case"string":return this.finishNode(n,"StringTypeAnnotation");case"symbol":return this.finishNode(n,"SymbolTypeAnnotation");default:return this.checkNotUnderscore(i.name),this.flowParseGenericType(t,i)}}flowParsePrimaryType(){let t=this.state.startLoc,n=this.startNode(),i,s,o=!1,a=this.state.noAnonFunctionType;switch(this.state.type){case 5:return this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!0,allowProto:!1,allowInexact:!0});case 6:return this.flowParseObjectType({allowStatic:!1,allowExact:!0,allowSpread:!0,allowProto:!1,allowInexact:!1});case 0:return this.state.noAnonFunctionType=!1,s=this.flowParseTupleType(),this.state.noAnonFunctionType=a,s;case 47:{let l=this.startNode();return l.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(10),i=this.flowParseFunctionTypeParams(),l.params=i.params,l.rest=i.rest,l.this=i._this,this.expect(11),this.expect(19),l.returnType=this.flowParseType(),this.finishNode(l,"FunctionTypeAnnotation")}case 10:{let l=this.startNode();if(this.next(),!this.match(11)&&!this.match(21))if(we(this.state.type)||this.match(78)){let u=this.lookahead().type;o=u!==17&&u!==14}else o=!0;if(o){if(this.state.noAnonFunctionType=!1,s=this.flowParseType(),this.state.noAnonFunctionType=a,this.state.noAnonFunctionType||!(this.match(12)||this.match(11)&&this.lookahead().type===19))return this.expect(11),s;this.eat(12)}return s?i=this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(s)]):i=this.flowParseFunctionTypeParams(),l.params=i.params,l.rest=i.rest,l.this=i._this,this.expect(11),this.expect(19),l.returnType=this.flowParseType(),l.typeParameters=null,this.finishNode(l,"FunctionTypeAnnotation")}case 134:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case 85:case 86:return n.value=this.match(85),this.next(),this.finishNode(n,"BooleanLiteralTypeAnnotation");case 53:if(this.state.value==="-"){if(this.next(),this.match(135))return this.parseLiteralAtNode(-this.state.value,"NumberLiteralTypeAnnotation",n);if(this.match(136))return this.parseLiteralAtNode(-this.state.value,"BigIntLiteralTypeAnnotation",n);throw this.raise(Q.UnexpectedSubtractionOperand,this.state.startLoc)}this.unexpected();return;case 135:return this.parseLiteral(this.state.value,"NumberLiteralTypeAnnotation");case 136:return this.parseLiteral(this.state.value,"BigIntLiteralTypeAnnotation");case 88:return this.next(),this.finishNode(n,"VoidTypeAnnotation");case 84:return this.next(),this.finishNode(n,"NullLiteralTypeAnnotation");case 78:return this.next(),this.finishNode(n,"ThisTypeAnnotation");case 55:return this.next(),this.finishNode(n,"ExistsTypeAnnotation");case 87:return this.flowParseTypeofType();default:if(qc(this.state.type)){let l=Nn(this.state.type);return this.next(),super.createIdentifier(n,l)}else if(we(this.state.type))return this.isContextual(129)?this.flowParseInterfaceType():this.flowIdentToTypeAnnotation(t,n,this.parseIdentifier())}this.unexpected()}flowParsePostfixType(){let t=this.state.startLoc,n=this.flowParsePrimaryType(),i=!1;for(;(this.match(0)||this.match(18))&&!this.canInsertSemicolon();){let s=this.startNodeAt(t),o=this.eat(18);i=i||o,this.expect(0),!o&&this.match(3)?(s.elementType=n,this.next(),n=this.finishNode(s,"ArrayTypeAnnotation")):(s.objectType=n,s.indexType=this.flowParseType(),this.expect(3),i?(s.optional=o,n=this.finishNode(s,"OptionalIndexedAccessType")):n=this.finishNode(s,"IndexedAccessType"))}return n}flowParsePrefixType(){let t=this.startNode();return this.eat(17)?(t.typeAnnotation=this.flowParsePrefixType(),this.finishNode(t,"NullableTypeAnnotation")):this.flowParsePostfixType()}flowParseAnonFunctionWithoutParens(){let t=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(19)){let n=this.startNodeAt(t.loc.start);return n.params=[this.reinterpretTypeAsFunctionTypeParam(t)],n.rest=null,n.this=null,n.returnType=this.flowParseType(),n.typeParameters=null,this.finishNode(n,"FunctionTypeAnnotation")}return t}flowParseIntersectionType(){let t=this.startNode();this.eat(45);let n=this.flowParseAnonFunctionWithoutParens();for(t.types=[n];this.eat(45);)t.types.push(this.flowParseAnonFunctionWithoutParens());return t.types.length===1?n:this.finishNode(t,"IntersectionTypeAnnotation")}flowParseUnionType(){let t=this.startNode();this.eat(43);let n=this.flowParseIntersectionType();for(t.types=[n];this.eat(43);)t.types.push(this.flowParseIntersectionType());return t.types.length===1?n:this.finishNode(t,"UnionTypeAnnotation")}flowParseType(){let t=this.state.inType;this.state.inType=!0;let n=this.flowParseUnionType();return this.state.inType=t,n}flowParseTypeOrImplicitInstantiation(){if(this.state.type===132&&this.state.value==="_"){let t=this.state.startLoc,n=this.parseIdentifier();return this.flowParseGenericType(t,n)}else return this.flowParseType()}flowParseTypeAnnotation(){let t=this.startNode();return t.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(t,"TypeAnnotation")}flowParseTypeAnnotatableIdentifier(t){let n=t?this.parseIdentifier():this.flowParseRestrictedIdentifier();return this.match(14)&&(n.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(n)),n}typeCastToParameter(t){return t.expression.typeAnnotation=t.typeAnnotation,this.resetEndLocation(t.expression,t.typeAnnotation.loc.end),t.expression}flowParseVariance(){let t=null;return this.match(53)?(t=this.startNode(),this.state.value==="+"?t.kind="plus":t.kind="minus",this.next(),this.finishNode(t,"Variance")):t}parseFunctionBody(t,n,i=!1){if(n){this.forwardNoArrowParamsConversionAt(t,()=>super.parseFunctionBody(t,!0,i));return}super.parseFunctionBody(t,!1,i)}parseFunctionBodyAndFinish(t,n,i=!1){if(this.match(14)){let s=this.startNode();[s.typeAnnotation,t.predicate]=this.flowParseTypeAndPredicateInitialiser(),t.returnType=s.typeAnnotation?this.finishNode(s,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(t,n,i)}parseStatementLike(t){if(this.state.strict&&this.isContextual(129)){let i=this.lookahead();if(hr(i.type)){let s=this.startNode();return this.next(),this.flowParseInterface(s)}}else if(this.isContextual(126)){let i=this.startNode();return this.next(),this.flowParseEnumDeclaration(i)}let n=super.parseStatementLike(t);return this.flowPragma===void 0&&!this.isValidDirective(n)&&(this.flowPragma=null),n}parseExpressionStatement(t,n,i){if(n.type==="Identifier"){if(n.name==="declare"){if(this.match(80)||we(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(t)}else if(we(this.state.type)){if(n.name==="interface")return this.flowParseInterface(t);if(n.name==="type")return this.flowParseTypeAlias(t);if(n.name==="opaque")return this.flowParseOpaqueType(t,!1)}}return super.parseExpressionStatement(t,n,i)}shouldParseExportDeclaration(){let{type:t}=this.state;return t===126||Ay(t)?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){let{type:t}=this.state;return t===126||Ay(t)?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.isContextual(126)){let t=this.startNode();return this.next(),this.flowParseEnumDeclaration(t)}return super.parseExportDefaultExpression()}parseConditional(t,n,i){if(!this.match(17))return t;if(this.state.maybeInArrowParameters){let d=this.lookaheadCharCode();if(d===44||d===61||d===58||d===41)return this.setOptionalParametersError(i),t}this.expect(17);let s=this.state.clone(),o=this.state.noArrowAt,a=this.startNodeAt(n),{consequent:l,failed:u}=this.tryParseConditionalConsequent(),[c,p]=this.getArrowLikeExpressions(l);if(u||p.length>0){let d=[...o];if(p.length>0){this.state=s,this.state.noArrowAt=d;for(let f=0;f<p.length;f++)d.push(p[f].start);({consequent:l,failed:u}=this.tryParseConditionalConsequent()),[c,p]=this.getArrowLikeExpressions(l)}u&&c.length>1&&this.raise(Q.AmbiguousConditionalArrow,s.startLoc),u&&c.length===1&&(this.state=s,d.push(c[0].start),this.state.noArrowAt=d,{consequent:l,failed:u}=this.tryParseConditionalConsequent())}return this.getArrowLikeExpressions(l,!0),this.state.noArrowAt=o,this.expect(14),a.test=t,a.consequent=l,a.alternate=this.forwardNoArrowParamsConversionAt(a,()=>this.parseMaybeAssign(void 0,void 0)),this.finishNode(a,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);let t=this.parseMaybeAssignAllowIn(),n=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:t,failed:n}}getArrowLikeExpressions(t,n){let i=[t],s=[];for(;i.length!==0;){let o=i.pop();o.type==="ArrowFunctionExpression"&&o.body.type!=="BlockStatement"?(o.typeParameters||!o.returnType?this.finishArrowValidation(o):s.push(o),i.push(o.body)):o.type==="ConditionalExpression"&&(i.push(o.consequent),i.push(o.alternate))}return n?(s.forEach(o=>this.finishArrowValidation(o)),[s,[]]):Jv(s,o=>o.params.every(a=>this.isAssignable(a,!0)))}finishArrowValidation(t){var n;this.toAssignableList(t.params,(n=t.extra)==null?void 0:n.trailingCommaLoc,!1),this.scope.enter(6),super.checkParams(t,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(t,n){let i;return this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(t.start))?(this.state.noArrowParamsConversionAt.push(this.state.start),i=n(),this.state.noArrowParamsConversionAt.pop()):i=n(),i}parseParenItem(t,n){let i=super.parseParenItem(t,n);if(this.eat(17)&&(i.optional=!0,this.resetEndLocation(t)),this.match(14)){let s=this.startNodeAt(n);return s.expression=i,s.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(s,"TypeCastExpression")}return i}assertModuleNodeAllowed(t){t.type==="ImportDeclaration"&&(t.importKind==="type"||t.importKind==="typeof")||t.type==="ExportNamedDeclaration"&&t.exportKind==="type"||t.type==="ExportAllDeclaration"&&t.exportKind==="type"||super.assertModuleNodeAllowed(t)}parseExportDeclaration(t){if(this.isContextual(130)){t.exportKind="type";let n=this.startNode();return this.next(),this.match(5)?(t.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(t),null):this.flowParseTypeAlias(n)}else if(this.isContextual(131)){t.exportKind="type";let n=this.startNode();return this.next(),this.flowParseOpaqueType(n,!1)}else if(this.isContextual(129)){t.exportKind="type";let n=this.startNode();return this.next(),this.flowParseInterface(n)}else if(this.isContextual(126)){t.exportKind="value";let n=this.startNode();return this.next(),this.flowParseEnumDeclaration(n)}else return super.parseExportDeclaration(t)}eatExportStar(t){return super.eatExportStar(t)?!0:this.isContextual(130)&&this.lookahead().type===55?(t.exportKind="type",this.next(),this.next(),!0):!1}maybeParseExportNamespaceSpecifier(t){let{startLoc:n}=this.state,i=super.maybeParseExportNamespaceSpecifier(t);return i&&t.exportKind==="type"&&this.unexpected(n),i}parseClassId(t,n,i){super.parseClassId(t,n,i),this.match(47)&&(t.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(t,n,i){let{startLoc:s}=this.state;if(this.isContextual(125)){if(super.parseClassMemberFromModifier(t,n))return;n.declare=!0}super.parseClassMember(t,n,i),n.declare&&(n.type!=="ClassProperty"&&n.type!=="ClassPrivateProperty"&&n.type!=="PropertyDefinition"?this.raise(Q.DeclareClassElement,s):n.value&&this.raise(Q.DeclareClassFieldInitializer,n.value))}isIterator(t){return t==="iterator"||t==="asyncIterator"}readIterator(){let t=super.readWord1(),n="@@"+t;(!this.isIterator(t)||!this.state.inType)&&this.raise(S.InvalidIdentifier,this.state.curPosition(),{identifierName:n}),this.finishToken(132,n)}getTokenFromCode(t){let n=this.input.charCodeAt(this.state.pos+1);t===123&&n===124?this.finishOp(6,2):this.state.inType&&(t===62||t===60)?this.finishOp(t===62?48:47,1):this.state.inType&&t===63?n===46?this.finishOp(18,2):this.finishOp(17,1):Fv(t,n,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(t)}isAssignable(t,n){return t.type==="TypeCastExpression"?this.isAssignable(t.expression,n):super.isAssignable(t,n)}toAssignable(t,n=!1){!n&&t.type==="AssignmentExpression"&&t.left.type==="TypeCastExpression"&&(t.left=this.typeCastToParameter(t.left)),super.toAssignable(t,n)}toAssignableList(t,n,i){for(let s=0;s<t.length;s++){let o=t[s];o?.type==="TypeCastExpression"&&(t[s]=this.typeCastToParameter(o))}super.toAssignableList(t,n,i)}toReferencedList(t,n){for(let s=0;s<t.length;s++){var i;let o=t[s];o&&o.type==="TypeCastExpression"&&!((i=o.extra)!=null&&i.parenthesized)&&(t.length>1||!n)&&this.raise(Q.TypeCastInPattern,o.typeAnnotation)}return t}parseArrayLike(t,n,i,s){let o=super.parseArrayLike(t,n,i,s);return n&&!this.state.maybeInArrowParameters&&this.toReferencedList(o.elements),o}isValidLVal(t,n,i){return t==="TypeCastExpression"||super.isValidLVal(t,n,i)}parseClassProperty(t){return this.match(14)&&(t.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(t)}parseClassPrivateProperty(t){return this.match(14)&&(t.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(t)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(14)||super.isClassProperty()}isNonstaticConstructor(t){return!this.match(14)&&super.isNonstaticConstructor(t)}pushClassMethod(t,n,i,s,o,a){if(n.variance&&this.unexpected(n.variance.loc.start),delete n.variance,this.match(47)&&(n.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(t,n,i,s,o,a),n.params&&o){let l=n.params;l.length>0&&this.isThisParam(l[0])&&this.raise(Q.ThisParamBannedInConstructor,n)}else if(n.type==="MethodDefinition"&&o&&n.value.params){let l=n.value.params;l.length>0&&this.isThisParam(l[0])&&this.raise(Q.ThisParamBannedInConstructor,n)}}pushClassPrivateMethod(t,n,i,s){n.variance&&this.unexpected(n.variance.loc.start),delete n.variance,this.match(47)&&(n.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(t,n,i,s)}parseClassSuper(t){if(super.parseClassSuper(t),t.superClass&&(this.match(47)||this.match(51))&&(t.superTypeParameters=this.flowParseTypeParameterInstantiationInExpression()),this.isContextual(113)){this.next();let n=t.implements=[];do{let i=this.startNode();i.id=this.flowParseRestrictedIdentifier(!0),this.match(47)?i.typeParameters=this.flowParseTypeParameterInstantiation():i.typeParameters=null,n.push(this.finishNode(i,"ClassImplements"))}while(this.eat(12))}}checkGetterSetterParams(t){super.checkGetterSetterParams(t);let n=this.getObjectOrClassMethodParams(t);if(n.length>0){let i=n[0];this.isThisParam(i)&&t.kind==="get"?this.raise(Q.GetterMayNotHaveThisParam,i):this.isThisParam(i)&&this.raise(Q.SetterMayNotHaveThisParam,i)}}parsePropertyNamePrefixOperator(t){t.variance=this.flowParseVariance()}parseObjPropValue(t,n,i,s,o,a,l){t.variance&&this.unexpected(t.variance.loc.start),delete t.variance;let u;this.match(47)&&!a&&(u=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());let c=super.parseObjPropValue(t,n,i,s,o,a,l);return u&&((c.value||c).typeParameters=u),c}parseFunctionParamType(t){return this.eat(17)&&(t.type!=="Identifier"&&this.raise(Q.PatternIsOptional,t),this.isThisParam(t)&&this.raise(Q.ThisParamMayNotBeOptional,t),t.optional=!0),this.match(14)?t.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(t)&&this.raise(Q.ThisParamAnnotationRequired,t),this.match(29)&&this.isThisParam(t)&&this.raise(Q.ThisParamNoDefault,t),this.resetEndLocation(t),t}parseMaybeDefault(t,n){let i=super.parseMaybeDefault(t,n);return i.type==="AssignmentPattern"&&i.typeAnnotation&&i.right.start<i.typeAnnotation.start&&this.raise(Q.TypeBeforeInitializer,i.typeAnnotation),i}checkImportReflection(t){super.checkImportReflection(t),t.module&&t.importKind!=="value"&&this.raise(Q.ImportReflectionHasImportType,t.specifiers[0].loc.start)}parseImportSpecifierLocal(t,n,i){n.local=Ny(t)?this.flowParseRestrictedIdentifier(!0,!0):this.parseIdentifier(),t.specifiers.push(this.finishImportSpecifier(n,i))}isPotentialImportPhase(t){if(super.isPotentialImportPhase(t))return!0;if(this.isContextual(130)){if(!t)return!0;let n=this.lookaheadCharCode();return n===123||n===42}return!t&&this.isContextual(87)}applyImportPhase(t,n,i,s){if(super.applyImportPhase(t,n,i,s),n){if(!i&&this.match(65))return;t.exportKind=i==="type"?i:"value"}else i==="type"&&this.match(55)&&this.unexpected(),t.importKind=i==="type"||i==="typeof"?i:"value"}parseImportSpecifier(t,n,i,s,o){let a=t.imported,l=null;a.type==="Identifier"&&(a.name==="type"?l="type":a.name==="typeof"&&(l="typeof"));let u=!1;if(this.isContextual(93)&&!this.isLookaheadContextual("as")){let p=this.parseIdentifier(!0);l!==null&&!hr(this.state.type)?(t.imported=p,t.importKind=l,t.local=un(p)):(t.imported=a,t.importKind=null,t.local=this.parseIdentifier())}else{if(l!==null&&hr(this.state.type))t.imported=this.parseIdentifier(!0),t.importKind=l;else{if(n)throw this.raise(S.ImportBindingIsString,t,{importName:a.value});t.imported=a,t.importKind=null}this.eatContextual(93)?t.local=this.parseIdentifier():(u=!0,t.local=un(t.imported))}let c=Ny(t);return i&&c&&this.raise(Q.ImportTypeShorthandOnlyInPureImport,t),(i||c)&&this.checkReservedType(t.local.name,t.local.loc.start,!0),u&&!i&&!c&&this.checkReservedWord(t.local.name,t.loc.start,!0,!0),this.finishImportSpecifier(t,"ImportSpecifier")}parseBindingAtom(){switch(this.state.type){case 78:return this.parseIdentifier(!0);default:return super.parseBindingAtom()}}parseFunctionParams(t,n){let i=t.kind;i!=="get"&&i!=="set"&&this.match(47)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.parseFunctionParams(t,n)}parseVarId(t,n){super.parseVarId(t,n),this.match(14)&&(t.id.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(t.id))}parseAsyncArrowFromCallExpression(t,n){if(this.match(14)){let i=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,t.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=i}return super.parseAsyncArrowFromCallExpression(t,n)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}parseMaybeAssign(t,n){var i;let s=null,o;if(this.hasPlugin("jsx")&&(this.match(143)||this.match(47))){if(s=this.state.clone(),o=this.tryParse(()=>super.parseMaybeAssign(t,n),s),!o.error)return o.node;let{context:u}=this.state,c=u[u.length-1];(c===Te.j_oTag||c===Te.j_expr)&&u.pop()}if((i=o)!=null&&i.error||this.match(47)){var a,l;s=s||this.state.clone();let u,c=this.tryParse(d=>{var f;u=this.flowParseTypeParameterDeclaration();let m=this.forwardNoArrowParamsConversionAt(u,()=>{let g=super.parseMaybeAssign(t,n);return this.resetStartLocationFromNode(g,u),g});(f=m.extra)!=null&&f.parenthesized&&d();let h=this.maybeUnwrapTypeCastExpression(m);return h.type!=="ArrowFunctionExpression"&&d(),h.typeParameters=u,this.resetStartLocationFromNode(h,u),m},s),p=null;if(c.node&&this.maybeUnwrapTypeCastExpression(c.node).type==="ArrowFunctionExpression"){if(!c.error&&!c.aborted)return c.node.async&&this.raise(Q.UnexpectedTypeParameterBeforeAsyncArrowFunction,u),c.node;p=c.node}if((a=o)!=null&&a.node)return this.state=o.failState,o.node;if(p)return this.state=c.failState,p;throw(l=o)!=null&&l.thrown?o.error:c.thrown?c.error:this.raise(Q.UnexpectedTokenAfterTypeParameter,u)}return super.parseMaybeAssign(t,n)}parseArrow(t){if(this.match(14)){let n=this.tryParse(()=>{let i=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;let s=this.startNode();return[s.typeAnnotation,t.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=i,this.canInsertSemicolon()&&this.unexpected(),this.match(19)||this.unexpected(),s});if(n.thrown)return null;n.error&&(this.state=n.failState),t.returnType=n.node.typeAnnotation?this.finishNode(n.node,"TypeAnnotation"):null}return super.parseArrow(t)}shouldParseArrow(t){return this.match(14)||super.shouldParseArrow(t)}setArrowFunctionParameters(t,n){this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(t.start))?t.params=n:super.setArrowFunctionParameters(t,n)}checkParams(t,n,i,s=!0){if(!(i&&this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(t.start)))){for(let o=0;o<t.params.length;o++)this.isThisParam(t.params[o])&&o>0&&this.raise(Q.ThisParamMustBeFirst,t.params[o]);super.checkParams(t,n,i,s)}}parseParenAndDistinguishExpression(t){return super.parseParenAndDistinguishExpression(t&&!this.state.noArrowAt.includes(this.sourceToOffsetPos(this.state.start)))}parseSubscripts(t,n,i){if(t.type==="Identifier"&&t.name==="async"&&this.state.noArrowAt.includes(n.index)){this.next();let s=this.startNodeAt(n);s.callee=t,s.arguments=super.parseCallExpressionArguments(11),t=this.finishNode(s,"CallExpression")}else if(t.type==="Identifier"&&t.name==="async"&&this.match(47)){let s=this.state.clone(),o=this.tryParse(l=>this.parseAsyncArrowWithTypeParameters(n)||l(),s);if(!o.error&&!o.aborted)return o.node;let a=this.tryParse(()=>super.parseSubscripts(t,n,i),s);if(a.node&&!a.error)return a.node;if(o.node)return this.state=o.failState,o.node;if(a.node)return this.state=a.failState,a.node;throw o.error||a.error}return super.parseSubscripts(t,n,i)}parseSubscript(t,n,i,s){if(this.match(18)&&this.isLookaheadToken_lt()){if(s.optionalChainMember=!0,i)return s.stop=!0,t;this.next();let o=this.startNodeAt(n);return o.callee=t,o.typeArguments=this.flowParseTypeParameterInstantiationInExpression(),this.expect(10),o.arguments=this.parseCallExpressionArguments(11),o.optional=!0,this.finishCallExpression(o,!0)}else if(!i&&this.shouldParseTypes()&&(this.match(47)||this.match(51))){let o=this.startNodeAt(n);o.callee=t;let a=this.tryParse(()=>(o.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),o.arguments=super.parseCallExpressionArguments(11),s.optionalChainMember&&(o.optional=!1),this.finishCallExpression(o,s.optionalChainMember)));if(a.node)return a.error&&(this.state=a.failState),a.node}return super.parseSubscript(t,n,i,s)}parseNewCallee(t){super.parseNewCallee(t);let n=null;this.shouldParseTypes()&&this.match(47)&&(n=this.tryParse(()=>this.flowParseTypeParameterInstantiationCallOrNew()).node),t.typeArguments=n}parseAsyncArrowWithTypeParameters(t){let n=this.startNodeAt(t);if(this.parseFunctionParams(n,!1),!!this.parseArrow(n))return super.parseArrowExpression(n,void 0,!0)}readToken_mult_modulo(t){let n=this.input.charCodeAt(this.state.pos+1);if(t===42&&n===47&&this.state.hasFlowComment){this.state.hasFlowComment=!1,this.state.pos+=2,this.nextToken();return}super.readToken_mult_modulo(t)}readToken_pipe_amp(t){let n=this.input.charCodeAt(this.state.pos+1);if(t===124&&n===125){this.finishOp(9,2);return}super.readToken_pipe_amp(t)}parseTopLevel(t,n){let i=super.parseTopLevel(t,n);return this.state.hasFlowComment&&this.raise(Q.UnterminatedFlowComment,this.state.curPosition()),i}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(Q.NestedFlowComment,this.state.startLoc);this.hasFlowCommentCompletion();let t=this.skipFlowComment();t&&(this.state.pos+=t,this.state.hasFlowComment=!0);return}return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/")}skipFlowComment(){let{pos:t}=this.state,n=2;for(;[32,9].includes(this.input.charCodeAt(t+n));)n++;let i=this.input.charCodeAt(n+t),s=this.input.charCodeAt(n+t+1);return i===58&&s===58?n+2:this.input.slice(n+t,n+t+12)==="flow-include"?n+12:i===58&&s!==58?n:!1}hasFlowCommentCompletion(){if(this.input.indexOf("*/",this.state.pos)===-1)throw this.raise(S.UnterminatedComment,this.state.curPosition())}flowEnumErrorBooleanMemberNotInitialized(t,{enumName:n,memberName:i}){this.raise(Q.EnumBooleanMemberNotInitialized,t,{memberName:i,enumName:n})}flowEnumErrorInvalidMemberInitializer(t,n){return this.raise(n.explicitType?n.explicitType==="symbol"?Q.EnumInvalidMemberInitializerSymbolType:Q.EnumInvalidMemberInitializerPrimaryType:Q.EnumInvalidMemberInitializerUnknownType,t,n)}flowEnumErrorNumberMemberNotInitialized(t,n){this.raise(Q.EnumNumberMemberNotInitialized,t,n)}flowEnumErrorStringMemberInconsistentlyInitialized(t,n){this.raise(Q.EnumStringMemberInconsistentlyInitialized,t,n)}flowEnumMemberInit(){let t=this.state.startLoc,n=()=>this.match(12)||this.match(8);switch(this.state.type){case 135:{let i=this.parseNumericLiteral(this.state.value);return n()?{type:"number",loc:i.loc.start,value:i}:{type:"invalid",loc:t}}case 134:{let i=this.parseStringLiteral(this.state.value);return n()?{type:"string",loc:i.loc.start,value:i}:{type:"invalid",loc:t}}case 85:case 86:{let i=this.parseBooleanLiteral(this.match(85));return n()?{type:"boolean",loc:i.loc.start,value:i}:{type:"invalid",loc:t}}default:return{type:"invalid",loc:t}}}flowEnumMemberRaw(){let t=this.state.startLoc,n=this.parseIdentifier(!0),i=this.eat(29)?this.flowEnumMemberInit():{type:"none",loc:t};return{id:n,init:i}}flowEnumCheckExplicitTypeMismatch(t,n,i){let{explicitType:s}=n;s!==null&&s!==i&&this.flowEnumErrorInvalidMemberInitializer(t,n)}flowEnumMembers({enumName:t,explicitType:n}){let i=new Set,s={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]},o=!1;for(;!this.match(8);){if(this.eat(21)){o=!0;break}let a=this.startNode(),{id:l,init:u}=this.flowEnumMemberRaw(),c=l.name;if(c==="")continue;/^[a-z]/.test(c)&&this.raise(Q.EnumInvalidMemberName,l,{memberName:c,suggestion:c[0].toUpperCase()+c.slice(1),enumName:t}),i.has(c)&&this.raise(Q.EnumDuplicateMemberName,l,{memberName:c,enumName:t}),i.add(c);let p={enumName:t,explicitType:n,memberName:c};switch(a.id=l,u.type){case"boolean":{this.flowEnumCheckExplicitTypeMismatch(u.loc,p,"boolean"),a.init=u.value,s.booleanMembers.push(this.finishNode(a,"EnumBooleanMember"));break}case"number":{this.flowEnumCheckExplicitTypeMismatch(u.loc,p,"number"),a.init=u.value,s.numberMembers.push(this.finishNode(a,"EnumNumberMember"));break}case"string":{this.flowEnumCheckExplicitTypeMismatch(u.loc,p,"string"),a.init=u.value,s.stringMembers.push(this.finishNode(a,"EnumStringMember"));break}case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(u.loc,p);case"none":switch(n){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(u.loc,p);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(u.loc,p);break;default:s.defaultedMembers.push(this.finishNode(a,"EnumDefaultedMember"))}}this.match(8)||this.expect(12)}return{members:s,hasUnknownMembers:o}}flowEnumStringMembers(t,n,{enumName:i}){if(t.length===0)return n;if(n.length===0)return t;if(n.length>t.length){for(let s of t)this.flowEnumErrorStringMemberInconsistentlyInitialized(s,{enumName:i});return n}else{for(let s of n)this.flowEnumErrorStringMemberInconsistentlyInitialized(s,{enumName:i});return t}}flowEnumParseExplicitType({enumName:t}){if(!this.eatContextual(102))return null;if(!we(this.state.type))throw this.raise(Q.EnumInvalidExplicitTypeUnknownSupplied,this.state.startLoc,{enumName:t});let{value:n}=this.state;return this.next(),n!=="boolean"&&n!=="number"&&n!=="string"&&n!=="symbol"&&this.raise(Q.EnumInvalidExplicitType,this.state.startLoc,{enumName:t,invalidEnumType:n}),n}flowEnumBody(t,n){let i=n.name,s=n.loc.start,o=this.flowEnumParseExplicitType({enumName:i});this.expect(5);let{members:a,hasUnknownMembers:l}=this.flowEnumMembers({enumName:i,explicitType:o});switch(t.hasUnknownMembers=l,o){case"boolean":return t.explicitType=!0,t.members=a.booleanMembers,this.expect(8),this.finishNode(t,"EnumBooleanBody");case"number":return t.explicitType=!0,t.members=a.numberMembers,this.expect(8),this.finishNode(t,"EnumNumberBody");case"string":return t.explicitType=!0,t.members=this.flowEnumStringMembers(a.stringMembers,a.defaultedMembers,{enumName:i}),this.expect(8),this.finishNode(t,"EnumStringBody");case"symbol":return t.members=a.defaultedMembers,this.expect(8),this.finishNode(t,"EnumSymbolBody");default:{let u=()=>(t.members=[],this.expect(8),this.finishNode(t,"EnumStringBody"));t.explicitType=!1;let c=a.booleanMembers.length,p=a.numberMembers.length,d=a.stringMembers.length,f=a.defaultedMembers.length;if(!c&&!p&&!d&&!f)return u();if(!c&&!p)return t.members=this.flowEnumStringMembers(a.stringMembers,a.defaultedMembers,{enumName:i}),this.expect(8),this.finishNode(t,"EnumStringBody");if(!p&&!d&&c>=f){for(let m of a.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(m.loc.start,{enumName:i,memberName:m.id.name});return t.members=a.booleanMembers,this.expect(8),this.finishNode(t,"EnumBooleanBody")}else if(!c&&!d&&p>=f){for(let m of a.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(m.loc.start,{enumName:i,memberName:m.id.name});return t.members=a.numberMembers,this.expect(8),this.finishNode(t,"EnumNumberBody")}else return this.raise(Q.EnumInconsistentMemberValues,s,{enumName:i}),u()}}}flowParseEnumDeclaration(t){let n=this.parseIdentifier();return t.id=n,t.body=this.flowEnumBody(this.startNode(),n),this.finishNode(t,"EnumDeclaration")}jsxParseOpeningElementAfterName(t){return this.shouldParseTypes()&&(this.match(47)||this.match(51))&&(t.typeArguments=this.flowParseTypeParameterInstantiationInExpression()),super.jsxParseOpeningElementAfterName(t)}isLookaheadToken_lt(){let t=this.nextTokenStart();if(this.input.charCodeAt(t)===60){let n=this.input.charCodeAt(t+1);return n!==60&&n!==61}return!1}reScan_lt_gt(){let{type:t}=this.state;t===47?(this.state.pos-=1,this.readToken_lt()):t===48&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){let{type:t}=this.state;return t===51?(this.state.pos-=2,this.finishOp(47,1),47):t}maybeUnwrapTypeCastExpression(t){return t.type==="TypeCastExpression"?t.expression:t}},Qv={__proto__:null,quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02C6",tilde:"\u02DC",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203A",oline:"\u203E",frasl:"\u2044",euro:"\u20AC",image:"\u2111",weierp:"\u2118",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",lang:"\u2329",rang:"\u232A",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666"},ti=ln`jsx`({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:({openingTagName:e})=>`Expected corresponding JSX closing tag for <${e}>.`,MissingClosingTagFragment:"Expected corresponding JSX closing tag for <>.",UnexpectedSequenceExpression:"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",UnexpectedToken:({unexpected:e,HTMLEntity:r})=>`Unexpected token \`${e}\`. Did you mean \`${r}\` or \`{'${e}'}\`?`,UnsupportedJsxValue:"JSX value should be either an expression or a quoted JSX text.",UnterminatedJsxContent:"Unterminated JSX contents.",UnwrappedAdjacentJSXElements:"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?"});function In(e){return e?e.type==="JSXOpeningFragment"||e.type==="JSXClosingFragment":!1}function $i(e){if(e.type==="JSXIdentifier")return e.name;if(e.type==="JSXNamespacedName")return e.namespace.name+":"+e.name.name;if(e.type==="JSXMemberExpression")return $i(e.object)+"."+$i(e.property);throw new Error("Node had unexpected type: "+e.type)}var Zv=e=>class extends e{jsxReadToken(){let t="",n=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(ti.UnterminatedJsxContent,this.state.startLoc);let i=this.input.charCodeAt(this.state.pos);switch(i){case 60:case 123:if(this.state.pos===this.state.start){i===60&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(143)):super.getTokenFromCode(i);return}t+=this.input.slice(n,this.state.pos),this.finishToken(142,t);return;case 38:t+=this.input.slice(n,this.state.pos),t+=this.jsxReadEntity(),n=this.state.pos;break;case 62:case 125:default:ji(i)?(t+=this.input.slice(n,this.state.pos),t+=this.jsxReadNewLine(!0),n=this.state.pos):++this.state.pos}}}jsxReadNewLine(t){let n=this.input.charCodeAt(this.state.pos),i;return++this.state.pos,n===13&&this.input.charCodeAt(this.state.pos)===10?(++this.state.pos,i=t?`
|
|
20
20
|
`:`\r
|
|
21
21
|
`):i=String.fromCharCode(n),++this.state.curLine,this.state.lineStart=this.state.pos,i}jsxReadString(t){let n="",i=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(S.UnterminatedString,this.state.startLoc);let s=this.input.charCodeAt(this.state.pos);if(s===t)break;s===38?(n+=this.input.slice(i,this.state.pos),n+=this.jsxReadEntity(),i=this.state.pos):ji(s)?(n+=this.input.slice(i,this.state.pos),n+=this.jsxReadNewLine(!1),i=this.state.pos):++this.state.pos}n+=this.input.slice(i,this.state.pos++),this.finishToken(134,n)}jsxReadEntity(){let t=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let n=10;this.codePointAtPos(this.state.pos)===120&&(n=16,++this.state.pos);let i=this.readInt(n,void 0,!1,"bail");if(i!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(i)}else{let n=0,i=!1;for(;n++<10&&this.state.pos<this.length&&!(i=this.codePointAtPos(this.state.pos)===59);)++this.state.pos;if(i){let s=this.input.slice(t,this.state.pos),o=Qv[s];if(++this.state.pos,o)return o}}return this.state.pos=t,"&"}jsxReadWord(){let t,n=this.state.pos;do t=this.input.charCodeAt(++this.state.pos);while(Ui(t)||t===45);this.finishToken(141,this.input.slice(n,this.state.pos))}jsxParseIdentifier(){let t=this.startNode();return this.match(141)?t.name=this.state.value:qc(this.state.type)?t.name=Nn(this.state.type):this.unexpected(),this.next(),this.finishNode(t,"JSXIdentifier")}jsxParseNamespacedName(){let t=this.state.startLoc,n=this.jsxParseIdentifier();if(!this.eat(14))return n;let i=this.startNodeAt(t);return i.namespace=n,i.name=this.jsxParseIdentifier(),this.finishNode(i,"JSXNamespacedName")}jsxParseElementName(){let t=this.state.startLoc,n=this.jsxParseNamespacedName();if(n.type==="JSXNamespacedName")return n;for(;this.eat(16);){let i=this.startNodeAt(t);i.object=n,i.property=this.jsxParseIdentifier(),n=this.finishNode(i,"JSXMemberExpression")}return n}jsxParseAttributeValue(){let t;switch(this.state.type){case 5:return t=this.startNode(),this.setContext(Te.brace),this.next(),t=this.jsxParseExpressionContainer(t,Te.j_oTag),t.expression.type==="JSXEmptyExpression"&&this.raise(ti.AttributeIsEmpty,t),t;case 143:case 134:return this.parseExprAtom();default:throw this.raise(ti.UnsupportedJsxValue,this.state.startLoc)}}jsxParseEmptyExpression(){let t=this.startNodeAt(this.state.lastTokEndLoc);return this.finishNodeAt(t,"JSXEmptyExpression",this.state.startLoc)}jsxParseSpreadChild(t){return this.next(),t.expression=this.parseExpression(),this.setContext(Te.j_expr),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(t,"JSXSpreadChild")}jsxParseExpressionContainer(t,n){if(this.match(8))t.expression=this.jsxParseEmptyExpression();else{let i=this.parseExpression();t.expression=i}return this.setContext(n),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(t,"JSXExpressionContainer")}jsxParseAttribute(){let t=this.startNode();return this.match(5)?(this.setContext(Te.brace),this.next(),this.expect(21),t.argument=this.parseMaybeAssignAllowIn(),this.setContext(Te.j_oTag),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(t,"JSXSpreadAttribute")):(t.name=this.jsxParseNamespacedName(),t.value=this.eat(29)?this.jsxParseAttributeValue():null,this.finishNode(t,"JSXAttribute"))}jsxParseOpeningElementAt(t){let n=this.startNodeAt(t);return this.eat(144)?this.finishNode(n,"JSXOpeningFragment"):(n.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(n))}jsxParseOpeningElementAfterName(t){let n=[];for(;!this.match(56)&&!this.match(144);)n.push(this.jsxParseAttribute());return t.attributes=n,t.selfClosing=this.eat(56),this.expect(144),this.finishNode(t,"JSXOpeningElement")}jsxParseClosingElementAt(t){let n=this.startNodeAt(t);return this.eat(144)?this.finishNode(n,"JSXClosingFragment"):(n.name=this.jsxParseElementName(),this.expect(144),this.finishNode(n,"JSXClosingElement"))}jsxParseElementAt(t){let n=this.startNodeAt(t),i=[],s=this.jsxParseOpeningElementAt(t),o=null;if(!s.selfClosing){e:for(;;)switch(this.state.type){case 143:if(t=this.state.startLoc,this.next(),this.eat(56)){o=this.jsxParseClosingElementAt(t);break e}i.push(this.jsxParseElementAt(t));break;case 142:i.push(this.parseLiteral(this.state.value,"JSXText"));break;case 5:{let a=this.startNode();this.setContext(Te.brace),this.next(),this.match(21)?i.push(this.jsxParseSpreadChild(a)):i.push(this.jsxParseExpressionContainer(a,Te.j_expr));break}default:this.unexpected()}In(s)&&!In(o)&&o!==null?this.raise(ti.MissingClosingTagFragment,o):!In(s)&&In(o)?this.raise(ti.MissingClosingTagElement,o,{openingTagName:$i(s.name)}):!In(s)&&!In(o)&&$i(o.name)!==$i(s.name)&&this.raise(ti.MissingClosingTagElement,o,{openingTagName:$i(s.name)})}if(In(s)?(n.openingFragment=s,n.closingFragment=o):(n.openingElement=s,n.closingElement=o),n.children=i,this.match(47))throw this.raise(ti.UnwrappedAdjacentJSXElements,this.state.startLoc);return In(s)?this.finishNode(n,"JSXFragment"):this.finishNode(n,"JSXElement")}jsxParseElement(){let t=this.state.startLoc;return this.next(),this.jsxParseElementAt(t)}setContext(t){let{context:n}=this.state;n[n.length-1]=t}parseExprAtom(t){return this.match(143)?this.jsxParseElement():this.match(47)&&this.input.charCodeAt(this.state.pos)!==33?(this.replaceToken(143),this.jsxParseElement()):super.parseExprAtom(t)}skipSpace(){this.curContext().preserveSpace||super.skipSpace()}getTokenFromCode(t){let n=this.curContext();if(n===Te.j_expr){this.jsxReadToken();return}if(n===Te.j_oTag||n===Te.j_cTag){if(an(t)){this.jsxReadWord();return}if(t===62){++this.state.pos,this.finishToken(144);return}if((t===34||t===39)&&n===Te.j_oTag){this.jsxReadString(t);return}}if(t===60&&this.state.canStartJSXElement&&this.input.charCodeAt(this.state.pos+1)!==33){++this.state.pos,this.finishToken(143);return}super.getTokenFromCode(t)}updateContext(t){let{context:n,type:i}=this.state;if(i===56&&t===143)n.splice(-2,2,Te.j_cTag),this.state.canStartJSXElement=!1;else if(i===143)n.push(Te.j_oTag);else if(i===144){let s=n[n.length-1];s===Te.j_oTag&&t===56||s===Te.j_cTag?(n.pop(),this.state.canStartJSXElement=n[n.length-1]===Te.j_expr):(this.setContext(Te.j_expr),this.state.canStartJSXElement=!0)}else this.state.canStartJSXElement=hv(i)}},Oc=class extends Ws{constructor(...r){super(...r),this.tsNames=new Map}},Rc=class extends Gs{constructor(...r){super(...r),this.importsStack=[]}createScope(r){return this.importsStack.push(new Set),new Oc(r)}enter(r){r===256&&this.importsStack.push(new Set),super.enter(r)}exit(){let r=super.exit();return r===256&&this.importsStack.pop(),r}hasImport(r,t){let n=this.importsStack.length;if(this.importsStack[n-1].has(r))return!0;if(!t&&n>1){for(let i=0;i<n-1;i++)if(this.importsStack[i].has(r))return!0}return!1}declareName(r,t,n){if(t&4096){this.hasImport(r,!0)&&this.parser.raise(S.VarRedeclaration,n,{identifierName:r}),this.importsStack[this.importsStack.length-1].add(r);return}let i=this.currentScope(),s=i.tsNames.get(r)||0;if(t&1024){this.maybeExportDefined(i,r),i.tsNames.set(r,s|16);return}super.declareName(r,t,n),t&2&&(t&1||(this.checkRedeclarationInScope(i,r,t,n),this.maybeExportDefined(i,r)),s=s|1),t&256&&(s=s|2),t&512&&(s=s|4),t&128&&(s=s|8),s&&i.tsNames.set(r,s)}isRedeclaredInScope(r,t,n){let i=r.tsNames.get(t);if((i&2)>0){if(n&256){let s=!!(n&512),o=(i&4)>0;return s!==o}return!0}return n&128&&(i&8)>0?r.names.get(t)&2?!!(n&1):!1:n&2&&(i&1)>0?!0:super.isRedeclaredInScope(r,t,n)}checkLocalExport(r){let{name:t}=r;if(this.hasImport(t))return;let n=this.scopeStack.length;for(let i=n-1;i>=0;i--){let o=this.scopeStack[i].tsNames.get(t);if((o&1)>0||(o&16)>0)return}super.checkLocalExport(r)}},Hy=e=>e.type==="ParenthesizedExpression"?Hy(e.expression):e,Lc=class extends kc{toAssignable(r,t=!1){var n,i;let s;switch((r.type==="ParenthesizedExpression"||(n=r.extra)!=null&&n.parenthesized)&&(s=Hy(r),t?s.type==="Identifier"?this.expressionScope.recordArrowParameterBindingError(S.InvalidParenthesizedAssignment,r):s.type!=="MemberExpression"&&!this.isOptionalMemberExpression(s)&&this.raise(S.InvalidParenthesizedAssignment,r):this.raise(S.InvalidParenthesizedAssignment,r)),r.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":r.type="ObjectPattern";for(let a=0,l=r.properties.length,u=l-1;a<l;a++){var o;let c=r.properties[a],p=a===u;this.toAssignableObjectExpressionProp(c,p,t),p&&c.type==="RestElement"&&(o=r.extra)!=null&&o.trailingCommaLoc&&this.raise(S.RestTrailingComma,r.extra.trailingCommaLoc)}break;case"ObjectProperty":{let{key:a,value:l}=r;this.isPrivateName(a)&&this.classScope.usePrivateName(this.getPrivateNameSV(a),a.loc.start),this.toAssignable(l,t);break}case"SpreadElement":throw new Error("Internal @babel/parser error (this is a bug, please report it). SpreadElement should be converted by .toAssignable's caller.");case"ArrayExpression":r.type="ArrayPattern",this.toAssignableList(r.elements,(i=r.extra)==null?void 0:i.trailingCommaLoc,t);break;case"AssignmentExpression":r.operator!=="="&&this.raise(S.MissingEqInAssignment,r.left.loc.end),r.type="AssignmentPattern",delete r.operator,this.toAssignable(r.left,t);break;case"ParenthesizedExpression":this.toAssignable(s,t);break}}toAssignableObjectExpressionProp(r,t,n){if(r.type==="ObjectMethod")this.raise(r.kind==="get"||r.kind==="set"?S.PatternHasAccessor:S.PatternHasMethod,r.key);else if(r.type==="SpreadElement"){r.type="RestElement";let i=r.argument;this.checkToRestConversion(i,!1),this.toAssignable(i,n),t||this.raise(S.RestTrailingComma,r)}else this.toAssignable(r,n)}toAssignableList(r,t,n){let i=r.length-1;for(let s=0;s<=i;s++){let o=r[s];if(o){if(o.type==="SpreadElement"){o.type="RestElement";let a=o.argument;this.checkToRestConversion(a,!0),this.toAssignable(a,n)}else this.toAssignable(o,n);o.type==="RestElement"&&(s<i?this.raise(S.RestTrailingComma,o):t&&this.raise(S.RestTrailingComma,t))}}}isAssignable(r,t){switch(r.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":return!0;case"ObjectExpression":{let n=r.properties.length-1;return r.properties.every((i,s)=>i.type!=="ObjectMethod"&&(s===n||i.type!=="SpreadElement")&&this.isAssignable(i))}case"ObjectProperty":return this.isAssignable(r.value);case"SpreadElement":return this.isAssignable(r.argument);case"ArrayExpression":return r.elements.every(n=>n===null||this.isAssignable(n));case"AssignmentExpression":return r.operator==="=";case"ParenthesizedExpression":return this.isAssignable(r.expression);case"MemberExpression":case"OptionalMemberExpression":return!t;default:return!1}}toReferencedList(r,t){return r}toReferencedListDeep(r,t){this.toReferencedList(r,t);for(let n of r)n?.type==="ArrayExpression"&&this.toReferencedListDeep(n.elements)}parseSpread(r){let t=this.startNode();return this.next(),t.argument=this.parseMaybeAssignAllowIn(r,void 0),this.finishNode(t,"SpreadElement")}parseRestBinding(){let r=this.startNode();return this.next(),r.argument=this.parseBindingAtom(),this.finishNode(r,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{let r=this.startNode();return this.next(),r.elements=this.parseBindingList(3,93,1),this.finishNode(r,"ArrayPattern")}case 5:return this.parseObjectLike(8,!0)}return this.parseIdentifier()}parseBindingList(r,t,n){let i=n&1,s=[],o=!0;for(;!this.eat(r);)if(o?o=!1:this.expect(12),i&&this.match(12))s.push(null);else{if(this.eat(r))break;if(this.match(21)){let a=this.parseRestBinding();if((this.hasPlugin("flow")||n&2)&&(a=this.parseFunctionParamType(a)),s.push(a),!this.checkCommaAfterRest(t)){this.expect(r);break}}else{let a=[];for(this.match(26)&&this.hasPlugin("decorators")&&this.raise(S.UnsupportedParameterDecorator,this.state.startLoc);this.match(26);)a.push(this.parseDecorator());s.push(this.parseAssignableListItem(n,a))}}return s}parseBindingRestProperty(r){return this.next(),r.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(r,"RestElement")}parseBindingProperty(){let{type:r,startLoc:t}=this.state;if(r===21)return this.parseBindingRestProperty(this.startNode());let n=this.startNode();return r===139?(this.expectPlugin("destructuringPrivate",t),this.classScope.usePrivateName(this.state.value,t),n.key=this.parsePrivateName()):this.parsePropertyName(n),n.method=!1,this.parseObjPropValue(n,t,!1,!1,!0,!1)}parseAssignableListItem(r,t){let n=this.parseMaybeDefault();(this.hasPlugin("flow")||r&2)&&this.parseFunctionParamType(n);let i=this.parseMaybeDefault(n.loc.start,n);return t.length&&(n.decorators=t),i}parseFunctionParamType(r){return r}parseMaybeDefault(r,t){var n,i;if((n=r)!=null||(r=this.state.startLoc),t=(i=t)!=null?i:this.parseBindingAtom(),!this.eat(29))return t;let s=this.startNodeAt(r);return s.left=t,s.right=this.parseMaybeAssignAllowIn(),this.finishNode(s,"AssignmentPattern")}isValidLVal(r,t,n){switch(r){case"AssignmentPattern":return"left";case"RestElement":return"argument";case"ObjectProperty":return"value";case"ParenthesizedExpression":return"expression";case"ArrayPattern":return"elements";case"ObjectPattern":return"properties"}return!1}isOptionalMemberExpression(r){return r.type==="OptionalMemberExpression"}checkLVal(r,t,n=64,i=!1,s=!1,o=!1){var a;let l=r.type;if(this.isObjectMethod(r))return;let u=this.isOptionalMemberExpression(r);if(u||l==="MemberExpression"){u&&(this.expectPlugin("optionalChainingAssign",r.loc.start),t.type!=="AssignmentExpression"&&this.raise(S.InvalidLhsOptionalChaining,r,{ancestor:t})),n!==64&&this.raise(S.InvalidPropertyBindingPattern,r);return}if(l==="Identifier"){this.checkIdentifier(r,n,s);let{name:h}=r;i&&(i.has(h)?this.raise(S.ParamDupe,r):i.add(h));return}let c=this.isValidLVal(l,!(o||(a=r.extra)!=null&&a.parenthesized)&&t.type==="AssignmentExpression",n);if(c===!0)return;if(c===!1){let h=n===64?S.InvalidLhs:S.InvalidLhsBinding;this.raise(h,r,{ancestor:t});return}let p,d;typeof c=="string"?(p=c,d=l==="ParenthesizedExpression"):[p,d]=c;let f=l==="ArrayPattern"||l==="ObjectPattern"?{type:l}:t,m=r[p];if(Array.isArray(m))for(let h of m)h&&this.checkLVal(h,f,n,i,s,d);else m&&this.checkLVal(m,f,n,i,s,d)}checkIdentifier(r,t,n=!1){this.state.strict&&(n?Vy(r.name,this.inModule):Ky(r.name))&&(t===64?this.raise(S.StrictEvalArguments,r,{referenceName:r.name}):this.raise(S.StrictEvalArgumentsBinding,r,{bindingName:r.name})),t&8192&&r.name==="let"&&this.raise(S.LetInLexicalBinding,r),t&64||this.declareNameFromIdentifier(r,t)}declareNameFromIdentifier(r,t){this.scope.declareName(r.name,t,r.loc.start)}checkToRestConversion(r,t){switch(r.type){case"ParenthesizedExpression":this.checkToRestConversion(r.expression,t);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(t)break;default:this.raise(S.InvalidRestAssignmentPattern,r)}}checkCommaAfterRest(r){return this.match(12)?(this.raise(this.lookaheadCharCode()===r?S.RestTrailingComma:S.ElementAfterRest,this.state.startLoc),!0):!1}};function eP(e){if(e==null)throw new Error(`Unexpected ${e} value.`);return e}function Fy(e){if(!e)throw new Error("Assert fail")}var q=ln`typescript`({AbstractMethodHasImplementation:({methodName:e})=>`Method '${e}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:e})=>`Property '${e}' cannot have an initializer because it is marked abstract.`,AccessorCannotBeOptional:"An 'accessor' property cannot be declared optional.",AccessorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccessorCannotHaveTypeParameters:"An accessor cannot have type parameters.",ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareAccessor:({kind:e})=>`'declare' is not allowed in ${e}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:({modifier:e})=>"Accessibility modifier already seen.",DuplicateModifier:({modifier:e})=>`Duplicate modifier: '${e}'.`,EmptyHeritageClauseType:({token:e})=>`'${e}' list cannot be empty.`,EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ImportAliasHasImportType:"An import alias can not use 'import type'.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` modifier",IncompatibleModifiers:({modifiers:e})=>`'${e[0]}' modifier cannot be used with '${e[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:e})=>`Index signatures cannot have an accessibility modifier ('${e}').`,IndexSignatureHasDeclare:"Index signatures cannot have the 'declare' modifier.",IndexSignatureHasOverride:"'override' modifier cannot appear on an index signature.",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier.",InitializerNotAllowedInAmbientContext:"Initializers are not allowed in ambient contexts.",InvalidModifierOnTypeMember:({modifier:e})=>`'${e}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:e})=>`'${e}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:e})=>`'${e}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifiersOrder:({orderedModifiers:e})=>`'${e[0]}' modifier must precede '${e[1]}' modifier.`,InvalidPropertyAccessAfterInstantiationExpression:"Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MissingInterfaceName:"'interface' declarations must be followed by an identifier.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifer:"'abstract' modifier can only appear on a class, method, or property declaration.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",OverrideNotInSubClass:"This member cannot have an 'override' modifier because its containing class does not extend another class.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:({modifier:e})=>`Private elements cannot have an accessibility modifier ('${e}').`,ReadonlyForMethodSignature:"'readonly' modifier can only appear on a property declaration or index signature.",ReservedArrowTypeParam:"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `<T,>() => ...`.",ReservedTypeAssertion:"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",SetAccessorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccessorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccessorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:({typeParameterName:e})=>`Single type parameter ${e} should have a trailing comma. Example usage: <${e},>.`,StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TupleOptionalAfterType:"A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeImportCannotSpecifyDefaultAndNamed:"A type-only import can specify a default import or named bindings, but not both.",TypeModifierIsUsedInTypeExports:"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.",TypeModifierIsUsedInTypeImports:"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.",UnexpectedParameterModifier:"A parameter property is only allowed in a constructor implementation.",UnexpectedReadonly:"'readonly' type modifier is only permitted on array and tuple literal types.",UnexpectedTypeAnnotation:"Did not expect a type annotation here.",UnexpectedTypeCastInParameter:"Unexpected type cast in parameter position.",UnsupportedImportTypeArgument:"Argument in a type import must be a string literal.",UnsupportedParameterPropertyKind:"A parameter property may not be declared using a binding pattern.",UnsupportedSignatureParameterKind:({type:e})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${e}.`});function tP(e){switch(e){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"bigint":return"TSBigIntKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return}}function _y(e){return e==="private"||e==="public"||e==="protected"}function rP(e){return e==="in"||e==="out"}var nP=e=>class extends e{constructor(...t){super(...t),this.tsParseInOutModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out"],disallowedModifiers:["const","public","private","protected","readonly","declare","abstract","override"],errorTemplate:q.InvalidModifierOnTypeParameter}),this.tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:q.InvalidModifierOnTypeParameterPositions}),this.tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out","const"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:q.InvalidModifierOnTypeParameter})}getScopeHandler(){return Rc}tsIsIdentifier(){return we(this.state.type)}tsTokenCanFollowModifier(){return this.match(0)||this.match(5)||this.match(55)||this.match(21)||this.match(139)||this.isLiteralPropertyName()}tsNextTokenOnSameLineAndCanFollowModifier(){return this.next(),this.hasPrecedingLineBreak()?!1:this.tsTokenCanFollowModifier()}tsNextTokenCanFollowModifier(){return this.match(106)?(this.next(),this.tsTokenCanFollowModifier()):this.tsNextTokenOnSameLineAndCanFollowModifier()}tsParseModifier(t,n){if(!we(this.state.type)&&this.state.type!==58&&this.state.type!==75)return;let i=this.state.value;if(t.includes(i)){if(n&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return i}}tsParseModifiers({allowedModifiers:t,disallowedModifiers:n,stopOnStartOfClassStaticBlock:i,errorTemplate:s=q.InvalidModifierOnTypeMember},o){let a=(u,c,p,d)=>{c===p&&o[d]&&this.raise(q.InvalidModifiersOrder,u,{orderedModifiers:[p,d]})},l=(u,c,p,d)=>{(o[p]&&c===d||o[d]&&c===p)&&this.raise(q.IncompatibleModifiers,u,{modifiers:[p,d]})};for(;;){let{startLoc:u}=this.state,c=this.tsParseModifier(t.concat(n??[]),i);if(!c)break;_y(c)?o.accessibility?this.raise(q.DuplicateAccessibilityModifier,u,{modifier:c}):(a(u,c,c,"override"),a(u,c,c,"static"),a(u,c,c,"readonly"),o.accessibility=c):rP(c)?(o[c]&&this.raise(q.DuplicateModifier,u,{modifier:c}),o[c]=!0,a(u,c,"in","out")):(hasOwnProperty.call(o,c)?this.raise(q.DuplicateModifier,u,{modifier:c}):(a(u,c,"static","readonly"),a(u,c,"static","override"),a(u,c,"override","readonly"),a(u,c,"abstract","override"),l(u,c,"declare","override"),l(u,c,"static","abstract")),o[c]=!0),n!=null&&n.includes(c)&&this.raise(s,u,{modifier:c})}}tsIsListTerminator(t){switch(t){case"EnumMembers":case"TypeMembers":return this.match(8);case"HeritageClauseElement":return this.match(5);case"TupleElementTypes":return this.match(3);case"TypeParametersOrArguments":return this.match(48)}}tsParseList(t,n){let i=[];for(;!this.tsIsListTerminator(t);)i.push(n());return i}tsParseDelimitedList(t,n,i){return eP(this.tsParseDelimitedListWorker(t,n,!0,i))}tsParseDelimitedListWorker(t,n,i,s){let o=[],a=-1;for(;!this.tsIsListTerminator(t);){a=-1;let l=n();if(l==null)return;if(o.push(l),this.eat(12)){a=this.state.lastTokStartLoc.index;continue}if(this.tsIsListTerminator(t))break;i&&this.expect(12);return}return s&&(s.value=a),o}tsParseBracketedList(t,n,i,s,o){s||(i?this.expect(0):this.expect(47));let a=this.tsParseDelimitedList(t,n,o);return i?this.expect(3):this.expect(48),a}tsParseImportType(){let t=this.startNode();return this.expect(83),this.expect(10),this.match(134)?t.argument=this.parseStringLiteral(this.state.value):(this.raise(q.UnsupportedImportTypeArgument,this.state.startLoc),t.argument=super.parseExprAtom()),this.eat(12)&&!this.match(11)?(t.options=super.parseMaybeAssignAllowIn(),this.eat(12)):t.options=null,this.expect(11),this.eat(16)&&(t.qualifier=this.tsParseEntityName(3)),this.match(47)&&(t.typeParameters=this.tsParseTypeArguments()),this.finishNode(t,"TSImportType")}tsParseEntityName(t){let n;if(t&1&&this.match(78))if(t&2)n=this.parseIdentifier(!0);else{let i=this.startNode();this.next(),n=this.finishNode(i,"ThisExpression")}else n=this.parseIdentifier(!!(t&1));for(;this.eat(16);){let i=this.startNodeAtNode(n);i.left=n,i.right=this.parseIdentifier(!!(t&1)),n=this.finishNode(i,"TSQualifiedName")}return n}tsParseTypeReference(){let t=this.startNode();return t.typeName=this.tsParseEntityName(1),!this.hasPrecedingLineBreak()&&this.match(47)&&(t.typeParameters=this.tsParseTypeArguments()),this.finishNode(t,"TSTypeReference")}tsParseThisTypePredicate(t){this.next();let n=this.startNodeAtNode(t);return n.parameterName=t,n.typeAnnotation=this.tsParseTypeAnnotation(!1),n.asserts=!1,this.finishNode(n,"TSTypePredicate")}tsParseThisTypeNode(){let t=this.startNode();return this.next(),this.finishNode(t,"TSThisType")}tsParseTypeQuery(){let t=this.startNode();return this.expect(87),this.match(83)?t.exprName=this.tsParseImportType():t.exprName=this.tsParseEntityName(3),!this.hasPrecedingLineBreak()&&this.match(47)&&(t.typeParameters=this.tsParseTypeArguments()),this.finishNode(t,"TSTypeQuery")}tsParseTypeParameter(t){let n=this.startNode();return t(n),n.name=this.tsParseTypeParameterName(),n.constraint=this.tsEatThenParseType(81),n.default=this.tsEatThenParseType(29),this.finishNode(n,"TSTypeParameter")}tsTryParseTypeParameters(t){if(this.match(47))return this.tsParseTypeParameters(t)}tsParseTypeParameters(t){let n=this.startNode();this.match(47)||this.match(143)?this.next():this.unexpected();let i={value:-1};return n.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,t),!1,!0,i),n.params.length===0&&this.raise(q.EmptyTypeParameters,n),i.value!==-1&&this.addExtra(n,"trailingComma",i.value),this.finishNode(n,"TSTypeParameterDeclaration")}tsFillSignature(t,n){let i=t===19,s="parameters",o="typeAnnotation";n.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(10),n[s]=this.tsParseBindingListForSignature(),i?n[o]=this.tsParseTypeOrTypePredicateAnnotation(t):this.match(t)&&(n[o]=this.tsParseTypeOrTypePredicateAnnotation(t))}tsParseBindingListForSignature(){let t=super.parseBindingList(11,41,2);for(let n of t){let{type:i}=n;(i==="AssignmentPattern"||i==="TSParameterProperty")&&this.raise(q.UnsupportedSignatureParameterKind,n,{type:i})}return t}tsParseTypeMemberSemicolon(){!this.eat(12)&&!this.isLineTerminator()&&this.expect(13)}tsParseSignatureMember(t,n){return this.tsFillSignature(14,n),this.tsParseTypeMemberSemicolon(),this.finishNode(n,t)}tsIsUnambiguouslyIndexSignature(){return this.next(),we(this.state.type)?(this.next(),this.match(14)):!1}tsTryParseIndexSignature(t){if(!(this.match(0)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))))return;this.expect(0);let n=this.parseIdentifier();n.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(n),this.expect(3),t.parameters=[n];let i=this.tsTryParseTypeAnnotation();return i&&(t.typeAnnotation=i),this.tsParseTypeMemberSemicolon(),this.finishNode(t,"TSIndexSignature")}tsParsePropertyOrMethodSignature(t,n){this.eat(17)&&(t.optional=!0);let i=t;if(this.match(10)||this.match(47)){n&&this.raise(q.ReadonlyForMethodSignature,t);let s=i;s.kind&&this.match(47)&&this.raise(q.AccessorCannotHaveTypeParameters,this.state.curPosition()),this.tsFillSignature(14,s),this.tsParseTypeMemberSemicolon();let o="parameters",a="typeAnnotation";if(s.kind==="get")s[o].length>0&&(this.raise(S.BadGetterArity,this.state.curPosition()),this.isThisParam(s[o][0])&&this.raise(q.AccessorCannotDeclareThisParameter,this.state.curPosition()));else if(s.kind==="set"){if(s[o].length!==1)this.raise(S.BadSetterArity,this.state.curPosition());else{let l=s[o][0];this.isThisParam(l)&&this.raise(q.AccessorCannotDeclareThisParameter,this.state.curPosition()),l.type==="Identifier"&&l.optional&&this.raise(q.SetAccessorCannotHaveOptionalParameter,this.state.curPosition()),l.type==="RestElement"&&this.raise(q.SetAccessorCannotHaveRestParameter,this.state.curPosition())}s[a]&&this.raise(q.SetAccessorCannotHaveReturnType,s[a])}else s.kind="method";return this.finishNode(s,"TSMethodSignature")}else{let s=i;n&&(s.readonly=!0);let o=this.tsTryParseTypeAnnotation();return o&&(s.typeAnnotation=o),this.tsParseTypeMemberSemicolon(),this.finishNode(s,"TSPropertySignature")}}tsParseTypeMember(){let t=this.startNode();if(this.match(10)||this.match(47))return this.tsParseSignatureMember("TSCallSignatureDeclaration",t);if(this.match(77)){let i=this.startNode();return this.next(),this.match(10)||this.match(47)?this.tsParseSignatureMember("TSConstructSignatureDeclaration",t):(t.key=this.createIdentifier(i,"new"),this.tsParsePropertyOrMethodSignature(t,!1))}this.tsParseModifiers({allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]},t);let n=this.tsTryParseIndexSignature(t);return n||(super.parsePropertyName(t),!t.computed&&t.key.type==="Identifier"&&(t.key.name==="get"||t.key.name==="set")&&this.tsTokenCanFollowModifier()&&(t.kind=t.key.name,super.parsePropertyName(t)),this.tsParsePropertyOrMethodSignature(t,!!t.readonly))}tsParseTypeLiteral(){let t=this.startNode();return t.members=this.tsParseObjectTypeMembers(),this.finishNode(t,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(5);let t=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(8),t}tsIsStartOfMappedType(){return this.next(),this.eat(53)?this.isContextual(122):(this.isContextual(122)&&this.next(),!this.match(0)||(this.next(),!this.tsIsIdentifier())?!1:(this.next(),this.match(58)))}tsParseMappedType(){let t=this.startNode();this.expect(5),this.match(53)?(t.readonly=this.state.value,this.next(),this.expectContextual(122)):this.eatContextual(122)&&(t.readonly=!0),this.expect(0);{let n=this.startNode();n.name=this.tsParseTypeParameterName(),n.constraint=this.tsExpectThenParseType(58),t.typeParameter=this.finishNode(n,"TSTypeParameter")}return t.nameType=this.eatContextual(93)?this.tsParseType():null,this.expect(3),this.match(53)?(t.optional=this.state.value,this.next(),this.expect(17)):this.eat(17)&&(t.optional=!0),t.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(8),this.finishNode(t,"TSMappedType")}tsParseTupleType(){let t=this.startNode();t.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let n=!1;return t.elementTypes.forEach(i=>{let{type:s}=i;n&&s!=="TSRestType"&&s!=="TSOptionalType"&&!(s==="TSNamedTupleMember"&&i.optional)&&this.raise(q.OptionalTypeBeforeRequired,i),n||(n=s==="TSNamedTupleMember"&&i.optional||s==="TSOptionalType")}),this.finishNode(t,"TSTupleType")}tsParseTupleElementType(){let t=this.state.startLoc,n=this.eat(21),{startLoc:i}=this.state,s,o,a,l,c=hr(this.state.type)?this.lookaheadCharCode():null;if(c===58)s=!0,a=!1,o=this.parseIdentifier(!0),this.expect(14),l=this.tsParseType();else if(c===63){a=!0;let p=this.state.value,d=this.tsParseNonArrayType();this.lookaheadCharCode()===58?(s=!0,o=this.createIdentifier(this.startNodeAt(i),p),this.expect(17),this.expect(14),l=this.tsParseType()):(s=!1,l=d,this.expect(17))}else l=this.tsParseType(),a=this.eat(17),s=this.eat(14);if(s){let p;o?(p=this.startNodeAt(i),p.optional=a,p.label=o,p.elementType=l,this.eat(17)&&(p.optional=!0,this.raise(q.TupleOptionalAfterType,this.state.lastTokStartLoc))):(p=this.startNodeAt(i),p.optional=a,this.raise(q.InvalidTupleMemberLabel,l),p.label=l,p.elementType=this.tsParseType()),l=this.finishNode(p,"TSNamedTupleMember")}else if(a){let p=this.startNodeAt(i);p.typeAnnotation=l,l=this.finishNode(p,"TSOptionalType")}if(n){let p=this.startNodeAt(t);p.typeAnnotation=l,l=this.finishNode(p,"TSRestType")}return l}tsParseParenthesizedType(){let t=this.startNode();return this.expect(10),t.typeAnnotation=this.tsParseType(),this.expect(11),this.finishNode(t,"TSParenthesizedType")}tsParseFunctionOrConstructorType(t,n){let i=this.startNode();return t==="TSConstructorType"&&(i.abstract=!!n,n&&this.next(),this.next()),this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(19,i)),this.finishNode(i,t)}tsParseLiteralTypeNode(){let t=this.startNode();switch(this.state.type){case 135:case 136:case 134:case 85:case 86:t.literal=super.parseExprAtom();break;default:this.unexpected()}return this.finishNode(t,"TSLiteralType")}tsParseTemplateLiteralType(){{let t=this.startNode();return t.literal=super.parseTemplate(!1),this.finishNode(t,"TSLiteralType")}}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){let t=this.tsParseThisTypeNode();return this.isContextual(116)&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(t):t}tsParseNonArrayType(){switch(this.state.type){case 134:case 135:case 136:case 85:case 86:return this.tsParseLiteralTypeNode();case 53:if(this.state.value==="-"){let t=this.startNode(),n=this.lookahead();return n.type!==135&&n.type!==136&&this.unexpected(),t.literal=this.parseMaybeUnary(),this.finishNode(t,"TSLiteralType")}break;case 78:return this.tsParseThisTypeOrThisTypePredicate();case 87:return this.tsParseTypeQuery();case 83:return this.tsParseImportType();case 5:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case 0:return this.tsParseTupleType();case 10:return this.tsParseParenthesizedType();case 25:case 24:return this.tsParseTemplateLiteralType();default:{let{type:t}=this.state;if(we(t)||t===88||t===84){let n=t===88?"TSVoidKeyword":t===84?"TSNullKeyword":tP(this.state.value);if(n!==void 0&&this.lookaheadCharCode()!==46){let i=this.startNode();return this.next(),this.finishNode(i,n)}return this.tsParseTypeReference()}}}this.unexpected()}tsParseArrayTypeOrHigher(){let{startLoc:t}=this.state,n=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(3)){let i=this.startNodeAt(t);i.elementType=n,this.expect(3),n=this.finishNode(i,"TSArrayType")}else{let i=this.startNodeAt(t);i.objectType=n,i.indexType=this.tsParseType(),this.expect(3),n=this.finishNode(i,"TSIndexedAccessType")}return n}tsParseTypeOperator(){let t=this.startNode(),n=this.state.value;return this.next(),t.operator=n,t.typeAnnotation=this.tsParseTypeOperatorOrHigher(),n==="readonly"&&this.tsCheckTypeAnnotationForReadOnly(t),this.finishNode(t,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(t){switch(t.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(q.UnexpectedReadonly,t)}}tsParseInferType(){let t=this.startNode();this.expectContextual(115);let n=this.startNode();return n.name=this.tsParseTypeParameterName(),n.constraint=this.tsTryParse(()=>this.tsParseConstraintForInferType()),t.typeParameter=this.finishNode(n,"TSTypeParameter"),this.finishNode(t,"TSInferType")}tsParseConstraintForInferType(){if(this.eat(81)){let t=this.tsInDisallowConditionalTypesContext(()=>this.tsParseType());if(this.state.inDisallowConditionalTypesContext||!this.match(17))return t}}tsParseTypeOperatorOrHigher(){return Ev(this.state.type)&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(115)?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseUnionOrIntersectionType(t,n,i){let s=this.startNode(),o=this.eat(i),a=[];do a.push(n());while(this.eat(i));return a.length===1&&!o?a[0]:(s.types=a,this.finishNode(s,t))}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),45)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),43)}tsIsStartOfFunctionType(){return this.match(47)?!0:this.match(10)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(we(this.state.type)||this.match(78))return this.next(),!0;if(this.match(5)){let{errors:t}=this.state,n=t.length;try{return this.parseObjectLike(8,!0),t.length===n}catch{return!1}}if(this.match(0)){this.next();let{errors:t}=this.state,n=t.length;try{return super.parseBindingList(3,93,1),t.length===n}catch{return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){return this.next(),!!(this.match(11)||this.match(21)||this.tsSkipParameterStart()&&(this.match(14)||this.match(12)||this.match(17)||this.match(29)||this.match(11)&&(this.next(),this.match(19))))}tsParseTypeOrTypePredicateAnnotation(t){return this.tsInType(()=>{let n=this.startNode();this.expect(t);let i=this.startNode(),s=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(s&&this.match(78)){let l=this.tsParseThisTypeOrThisTypePredicate();return l.type==="TSThisType"?(i.parameterName=l,i.asserts=!0,i.typeAnnotation=null,l=this.finishNode(i,"TSTypePredicate")):(this.resetStartLocationFromNode(l,i),l.asserts=!0),n.typeAnnotation=l,this.finishNode(n,"TSTypeAnnotation")}let o=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!o)return s?(i.parameterName=this.parseIdentifier(),i.asserts=s,i.typeAnnotation=null,n.typeAnnotation=this.finishNode(i,"TSTypePredicate"),this.finishNode(n,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,n);let a=this.tsParseTypeAnnotation(!1);return i.parameterName=o,i.typeAnnotation=a,i.asserts=s,n.typeAnnotation=this.finishNode(i,"TSTypePredicate"),this.finishNode(n,"TSTypeAnnotation")})}tsTryParseTypeOrTypePredicateAnnotation(){if(this.match(14))return this.tsParseTypeOrTypePredicateAnnotation(14)}tsTryParseTypeAnnotation(){if(this.match(14))return this.tsParseTypeAnnotation()}tsTryParseType(){return this.tsEatThenParseType(14)}tsParseTypePredicatePrefix(){let t=this.parseIdentifier();if(this.isContextual(116)&&!this.hasPrecedingLineBreak())return this.next(),t}tsParseTypePredicateAsserts(){if(this.state.type!==109)return!1;let t=this.state.containsEsc;return this.next(),!we(this.state.type)&&!this.match(78)?!1:(t&&this.raise(S.InvalidEscapedReservedWord,this.state.lastTokStartLoc,{reservedWord:"asserts"}),!0)}tsParseTypeAnnotation(t=!0,n=this.startNode()){return this.tsInType(()=>{t&&this.expect(14),n.typeAnnotation=this.tsParseType()}),this.finishNode(n,"TSTypeAnnotation")}tsParseType(){Fy(this.state.inType);let t=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(81))return t;let n=this.startNodeAtNode(t);return n.checkType=t,n.extendsType=this.tsInDisallowConditionalTypesContext(()=>this.tsParseNonConditionalType()),this.expect(17),n.trueType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.expect(14),n.falseType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.finishNode(n,"TSConditionalType")}isAbstractConstructorSignature(){return this.isContextual(124)&&this.lookahead().type===77}tsParseNonConditionalType(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(77)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.isAbstractConstructorSignature()?this.tsParseFunctionOrConstructorType("TSConstructorType",!0):this.tsParseUnionTypeOrHigher()}tsParseTypeAssertion(){this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(q.ReservedTypeAssertion,this.state.startLoc);let t=this.startNode();return t.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?this.tsParseTypeReference():this.tsParseType())),this.expect(48),t.expression=this.parseMaybeUnary(),this.finishNode(t,"TSTypeAssertion")}tsParseHeritageClause(t){let n=this.state.startLoc,i=this.tsParseDelimitedList("HeritageClauseElement",()=>{let s=this.startNode();return s.expression=this.tsParseEntityName(3),this.match(47)&&(s.typeParameters=this.tsParseTypeArguments()),this.finishNode(s,"TSExpressionWithTypeArguments")});return i.length||this.raise(q.EmptyHeritageClauseType,n,{token:t}),i}tsParseInterfaceDeclaration(t,n={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(129),n.declare&&(t.declare=!0),we(this.state.type)?(t.id=this.parseIdentifier(),this.checkIdentifier(t.id,130)):(t.id=null,this.raise(q.MissingInterfaceName,this.state.startLoc)),t.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(81)&&(t.extends=this.tsParseHeritageClause("extends"));let i=this.startNode();return i.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),t.body=this.finishNode(i,"TSInterfaceBody"),this.finishNode(t,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(t){return t.id=this.parseIdentifier(),this.checkIdentifier(t.id,2),t.typeAnnotation=this.tsInType(()=>{if(t.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers),this.expect(29),this.isContextual(114)&&this.lookahead().type!==16){let n=this.startNode();return this.next(),this.finishNode(n,"TSIntrinsicKeyword")}return this.tsParseType()}),this.semicolon(),this.finishNode(t,"TSTypeAliasDeclaration")}tsInTopLevelContext(t){if(this.curContext()!==Te.brace){let n=this.state.context;this.state.context=[n[0]];try{return t()}finally{this.state.context=n}}else return t()}tsInType(t){let n=this.state.inType;this.state.inType=!0;try{return t()}finally{this.state.inType=n}}tsInDisallowConditionalTypesContext(t){let n=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return t()}finally{this.state.inDisallowConditionalTypesContext=n}}tsInAllowConditionalTypesContext(t){let n=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return t()}finally{this.state.inDisallowConditionalTypesContext=n}}tsEatThenParseType(t){if(this.match(t))return this.tsNextThenParseType()}tsExpectThenParseType(t){return this.tsInType(()=>(this.expect(t),this.tsParseType()))}tsNextThenParseType(){return this.tsInType(()=>(this.next(),this.tsParseType()))}tsParseEnumMember(){let t=this.startNode();return t.id=this.match(134)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(29)&&(t.initializer=super.parseMaybeAssignAllowIn()),this.finishNode(t,"TSEnumMember")}tsParseEnumDeclaration(t,n={}){return n.const&&(t.const=!0),n.declare&&(t.declare=!0),this.expectContextual(126),t.id=this.parseIdentifier(),this.checkIdentifier(t.id,t.const?8971:8459),this.expect(5),t.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(t,"TSEnumDeclaration")}tsParseEnumBody(){let t=this.startNode();return this.expect(5),t.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(t,"TSEnumBody")}tsParseModuleBlock(){let t=this.startNode();return this.scope.enter(0),this.expect(5),super.parseBlockOrModuleBlockBody(t.body=[],void 0,!0,8),this.scope.exit(),this.finishNode(t,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(t,n=!1){if(t.id=this.parseIdentifier(),n||this.checkIdentifier(t.id,1024),this.eat(16)){let i=this.startNode();this.tsParseModuleOrNamespaceDeclaration(i,!0),t.body=i}else this.scope.enter(256),this.prodParam.enter(0),t.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(t,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(t){return this.isContextual(112)?(t.kind="global",t.global=!0,t.id=this.parseIdentifier()):this.match(134)?(t.kind="module",t.id=super.parseStringLiteral(this.state.value)):this.unexpected(),this.match(5)?(this.scope.enter(256),this.prodParam.enter(0),t.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(t,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(t,n,i){t.isExport=i||!1,t.id=n||this.parseIdentifier(),this.checkIdentifier(t.id,4096),this.expect(29);let s=this.tsParseModuleReference();return t.importKind==="type"&&s.type!=="TSExternalModuleReference"&&this.raise(q.ImportAliasHasImportType,s),t.moduleReference=s,this.semicolon(),this.finishNode(t,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual(119)&&this.lookaheadCharCode()===40}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(0)}tsParseExternalModuleReference(){let t=this.startNode();return this.expectContextual(119),this.expect(10),this.match(134)||this.unexpected(),t.expression=super.parseExprAtom(),this.expect(11),this.sawUnambiguousESM=!0,this.finishNode(t,"TSExternalModuleReference")}tsLookAhead(t){let n=this.state.clone(),i=t();return this.state=n,i}tsTryParseAndCatch(t){let n=this.tryParse(i=>t()||i());if(!(n.aborted||!n.node))return n.error&&(this.state=n.failState),n.node}tsTryParse(t){let n=this.state.clone(),i=t();if(i!==void 0&&i!==!1)return i;this.state=n}tsTryParseDeclare(t){if(this.isLineTerminator())return;let n=this.state.type,i;return this.isContextual(100)&&(n=74,i="let"),this.tsInAmbientContext(()=>{switch(n){case 68:return t.declare=!0,super.parseFunctionStatement(t,!1,!1);case 80:return t.declare=!0,this.parseClass(t,!0,!1);case 126:return this.tsParseEnumDeclaration(t,{declare:!0});case 112:return this.tsParseAmbientExternalModuleDeclaration(t);case 75:case 74:return!this.match(75)||!this.isLookaheadContextual("enum")?(t.declare=!0,this.parseVarStatement(t,i||this.state.value,!0)):(this.expect(75),this.tsParseEnumDeclaration(t,{const:!0,declare:!0}));case 129:{let s=this.tsParseInterfaceDeclaration(t,{declare:!0});if(s)return s}default:if(we(n))return this.tsParseDeclaration(t,this.state.value,!0,null)}})}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0,null)}tsParseExpressionStatement(t,n,i){switch(n.name){case"declare":{let s=this.tsTryParseDeclare(t);return s&&(s.declare=!0),s}case"global":if(this.match(5)){this.scope.enter(256),this.prodParam.enter(0);let s=t;return s.kind="global",t.global=!0,s.id=n,s.body=this.tsParseModuleBlock(),this.scope.exit(),this.prodParam.exit(),this.finishNode(s,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(t,n.name,!1,i)}}tsParseDeclaration(t,n,i,s){switch(n){case"abstract":if(this.tsCheckLineTerminator(i)&&(this.match(80)||we(this.state.type)))return this.tsParseAbstractDeclaration(t,s);break;case"module":if(this.tsCheckLineTerminator(i)){if(this.match(134))return this.tsParseAmbientExternalModuleDeclaration(t);if(we(this.state.type))return t.kind="module",this.tsParseModuleOrNamespaceDeclaration(t)}break;case"namespace":if(this.tsCheckLineTerminator(i)&&we(this.state.type))return t.kind="namespace",this.tsParseModuleOrNamespaceDeclaration(t);break;case"type":if(this.tsCheckLineTerminator(i)&&we(this.state.type))return this.tsParseTypeAliasDeclaration(t);break}}tsCheckLineTerminator(t){return t?this.hasFollowingLineBreak()?!1:(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(t){if(!this.match(47))return;let n=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;let i=this.tsTryParseAndCatch(()=>{let s=this.startNodeAt(t);return s.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(s),s.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(19),s});if(this.state.maybeInArrowParameters=n,!!i)return super.parseArrowExpression(i,null,!0)}tsParseTypeArgumentsInExpression(){if(this.reScan_lt()===47)return this.tsParseTypeArguments()}tsParseTypeArguments(){let t=this.startNode();return t.params=this.tsInType(()=>this.tsInTopLevelContext(()=>(this.expect(47),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))),t.params.length===0?this.raise(q.EmptyTypeArguments,t):!this.state.inType&&this.curContext()===Te.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(t,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return Cv(this.state.type)}isExportDefaultSpecifier(){return this.tsIsDeclarationStart()?!1:super.isExportDefaultSpecifier()}parseAssignableListItem(t,n){let i=this.state.startLoc,s={};this.tsParseModifiers({allowedModifiers:["public","private","protected","override","readonly"]},s);let o=s.accessibility,a=s.override,l=s.readonly;!(t&4)&&(o||l||a)&&this.raise(q.UnexpectedParameterModifier,i);let u=this.parseMaybeDefault();t&2&&this.parseFunctionParamType(u);let c=this.parseMaybeDefault(u.loc.start,u);if(o||l||a){let p=this.startNodeAt(i);return n.length&&(p.decorators=n),o&&(p.accessibility=o),l&&(p.readonly=l),a&&(p.override=a),c.type!=="Identifier"&&c.type!=="AssignmentPattern"&&this.raise(q.UnsupportedParameterPropertyKind,p),p.parameter=c,this.finishNode(p,"TSParameterProperty")}return n.length&&(u.decorators=n),c}isSimpleParameter(t){return t.type==="TSParameterProperty"&&super.isSimpleParameter(t.parameter)||super.isSimpleParameter(t)}tsDisallowOptionalPattern(t){for(let n of t.params)n.type!=="Identifier"&&n.optional&&!this.state.isAmbientContext&&this.raise(q.PatternIsOptional,n)}setArrowFunctionParameters(t,n,i){super.setArrowFunctionParameters(t,n,i),this.tsDisallowOptionalPattern(t)}parseFunctionBodyAndFinish(t,n,i=!1){this.match(14)&&(t.returnType=this.tsParseTypeOrTypePredicateAnnotation(14));let s=n==="FunctionDeclaration"?"TSDeclareFunction":n==="ClassMethod"||n==="ClassPrivateMethod"?"TSDeclareMethod":void 0;return s&&!this.match(5)&&this.isLineTerminator()?this.finishNode(t,s):s==="TSDeclareFunction"&&this.state.isAmbientContext&&(this.raise(q.DeclareFunctionHasImplementation,t),t.declare)?super.parseFunctionBodyAndFinish(t,s,i):(this.tsDisallowOptionalPattern(t),super.parseFunctionBodyAndFinish(t,n,i))}registerFunctionStatementId(t){!t.body&&t.id?this.checkIdentifier(t.id,1024):super.registerFunctionStatementId(t)}tsCheckForInvalidTypeCasts(t){t.forEach(n=>{n?.type==="TSTypeCastExpression"&&this.raise(q.UnexpectedTypeAnnotation,n.typeAnnotation)})}toReferencedList(t,n){return this.tsCheckForInvalidTypeCasts(t),t}parseArrayLike(t,n,i,s){let o=super.parseArrayLike(t,n,i,s);return o.type==="ArrayExpression"&&this.tsCheckForInvalidTypeCasts(o.elements),o}parseSubscript(t,n,i,s){if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();let a=this.startNodeAt(n);return a.expression=t,this.finishNode(a,"TSNonNullExpression")}let o=!1;if(this.match(18)&&this.lookaheadCharCode()===60){if(i)return s.stop=!0,t;s.optionalChainMember=o=!0,this.next()}if(this.match(47)||this.match(51)){let a,l=this.tsTryParseAndCatch(()=>{if(!i&&this.atPossibleAsyncArrow(t)){let d=this.tsTryParseGenericAsyncArrowFunction(n);if(d)return d}let u=this.tsParseTypeArgumentsInExpression();if(!u)return;if(o&&!this.match(10)){a=this.state.curPosition();return}if(Ia(this.state.type)){let d=super.parseTaggedTemplateExpression(t,n,s);return d.typeParameters=u,d}if(!i&&this.eat(10)){let d=this.startNodeAt(n);return d.callee=t,d.arguments=this.parseCallExpressionArguments(11),this.tsCheckForInvalidTypeCasts(d.arguments),d.typeParameters=u,s.optionalChainMember&&(d.optional=o),this.finishCallExpression(d,s.optionalChainMember)}let c=this.state.type;if(c===48||c===52||c!==10&&Dc(c)&&!this.hasPrecedingLineBreak())return;let p=this.startNodeAt(n);return p.expression=t,p.typeParameters=u,this.finishNode(p,"TSInstantiationExpression")});if(a&&this.unexpected(a,10),l)return l.type==="TSInstantiationExpression"&&(this.match(16)||this.match(18)&&this.lookaheadCharCode()!==40)&&this.raise(q.InvalidPropertyAccessAfterInstantiationExpression,this.state.startLoc),l}return super.parseSubscript(t,n,i,s)}parseNewCallee(t){var n;super.parseNewCallee(t);let{callee:i}=t;i.type==="TSInstantiationExpression"&&!((n=i.extra)!=null&&n.parenthesized)&&(t.typeParameters=i.typeParameters,t.callee=i.expression)}parseExprOp(t,n,i){let s;if(Aa(58)>i&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(s=this.isContextual(120)))){let o=this.startNodeAt(n);return o.expression=t,o.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?(s&&this.raise(S.UnexpectedKeyword,this.state.startLoc,{keyword:"const"}),this.tsParseTypeReference()):this.tsParseType())),this.finishNode(o,s?"TSSatisfiesExpression":"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(o,n,i)}return super.parseExprOp(t,n,i)}checkReservedWord(t,n,i,s){this.state.isAmbientContext||super.checkReservedWord(t,n,i,s)}checkImportReflection(t){super.checkImportReflection(t),t.module&&t.importKind!=="value"&&this.raise(q.ImportReflectionHasImportType,t.specifiers[0].loc.start)}checkDuplicateExports(){}isPotentialImportPhase(t){if(super.isPotentialImportPhase(t))return!0;if(this.isContextual(130)){let n=this.lookaheadCharCode();return t?n===123||n===42:n!==61}return!t&&this.isContextual(87)}applyImportPhase(t,n,i,s){super.applyImportPhase(t,n,i,s),n?t.exportKind=i==="type"?"type":"value":t.importKind=i==="type"||i==="typeof"?i:"value"}parseImport(t){if(this.match(134))return t.importKind="value",super.parseImport(t);let n;if(we(this.state.type)&&this.lookaheadCharCode()===61)return t.importKind="value",this.tsParseImportEqualsDeclaration(t);if(this.isContextual(130)){let i=this.parseMaybeImportPhase(t,!1);if(this.lookaheadCharCode()===61)return this.tsParseImportEqualsDeclaration(t,i);n=super.parseImportSpecifiersAndAfter(t,i)}else n=super.parseImport(t);return n.importKind==="type"&&n.specifiers.length>1&&n.specifiers[0].type==="ImportDefaultSpecifier"&&this.raise(q.TypeImportCannotSpecifyDefaultAndNamed,n),n}parseExport(t,n){if(this.match(83)){let i=t;this.next();let s=null;return this.isContextual(130)&&this.isPotentialImportPhase(!1)?s=this.parseMaybeImportPhase(i,!1):i.importKind="value",this.tsParseImportEqualsDeclaration(i,s,!0)}else if(this.eat(29)){let i=t;return i.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(i,"TSExportAssignment")}else if(this.eatContextual(93)){let i=t;return this.expectContextual(128),i.id=this.parseIdentifier(),this.semicolon(),this.finishNode(i,"TSNamespaceExportDeclaration")}else return super.parseExport(t,n)}isAbstractClass(){return this.isContextual(124)&&this.lookahead().type===80}parseExportDefaultExpression(){if(this.isAbstractClass()){let t=this.startNode();return this.next(),t.abstract=!0,this.parseClass(t,!0,!0)}if(this.match(129)){let t=this.tsParseInterfaceDeclaration(this.startNode());if(t)return t}return super.parseExportDefaultExpression()}parseVarStatement(t,n,i=!1){let{isAmbientContext:s}=this.state,o=super.parseVarStatement(t,n,i||s);if(!s)return o;for(let{id:a,init:l}of o.declarations)l&&(n!=="const"||a.typeAnnotation?this.raise(q.InitializerNotAllowedInAmbientContext,l):sP(l,this.hasPlugin("estree"))||this.raise(q.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference,l));return o}parseStatementContent(t,n){if(this.match(75)&&this.isLookaheadContextual("enum")){let i=this.startNode();return this.expect(75),this.tsParseEnumDeclaration(i,{const:!0})}if(this.isContextual(126))return this.tsParseEnumDeclaration(this.startNode());if(this.isContextual(129)){let i=this.tsParseInterfaceDeclaration(this.startNode());if(i)return i}return super.parseStatementContent(t,n)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(t,n){return n.some(i=>_y(i)?t.accessibility===i:!!t[i])}tsIsStartOfStaticBlocks(){return this.isContextual(106)&&this.lookaheadCharCode()===123}parseClassMember(t,n,i){let s=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({allowedModifiers:s,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:q.InvalidModifierOnTypeParameterPositions},n);let o=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(n,s)&&this.raise(q.StaticBlockCannotHaveModifier,this.state.curPosition()),super.parseClassStaticBlock(t,n)):this.parseClassMemberWithIsStatic(t,n,i,!!n.static)};n.declare?this.tsInAmbientContext(o):o()}parseClassMemberWithIsStatic(t,n,i,s){let o=this.tsTryParseIndexSignature(n);if(o){t.body.push(o),n.abstract&&this.raise(q.IndexSignatureHasAbstract,n),n.accessibility&&this.raise(q.IndexSignatureHasAccessibility,n,{modifier:n.accessibility}),n.declare&&this.raise(q.IndexSignatureHasDeclare,n),n.override&&this.raise(q.IndexSignatureHasOverride,n);return}!this.state.inAbstractClass&&n.abstract&&this.raise(q.NonAbstractClassHasAbstractMethod,n),n.override&&(i.hadSuperClass||this.raise(q.OverrideNotInSubClass,n)),super.parseClassMemberWithIsStatic(t,n,i,s)}parsePostMemberNameModifiers(t){this.eat(17)&&(t.optional=!0),t.readonly&&this.match(10)&&this.raise(q.ClassMethodHasReadonly,t),t.declare&&this.match(10)&&this.raise(q.ClassMethodHasDeclare,t)}parseExpressionStatement(t,n,i){return(n.type==="Identifier"?this.tsParseExpressionStatement(t,n,i):void 0)||super.parseExpressionStatement(t,n,i)}shouldParseExportDeclaration(){return this.tsIsDeclarationStart()?!0:super.shouldParseExportDeclaration()}parseConditional(t,n,i){if(!this.state.maybeInArrowParameters||!this.match(17))return super.parseConditional(t,n,i);let s=this.tryParse(()=>super.parseConditional(t,n));return s.node?(s.error&&(this.state=s.failState),s.node):(s.error&&super.setOptionalParametersError(i,s.error),t)}parseParenItem(t,n){let i=super.parseParenItem(t,n);if(this.eat(17)&&(i.optional=!0,this.resetEndLocation(t)),this.match(14)){let s=this.startNodeAt(n);return s.expression=t,s.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(s,"TSTypeCastExpression")}return t}parseExportDeclaration(t){if(!this.state.isAmbientContext&&this.isContextual(125))return this.tsInAmbientContext(()=>this.parseExportDeclaration(t));let n=this.state.startLoc,i=this.eatContextual(125);if(i&&(this.isContextual(125)||!this.shouldParseExportDeclaration()))throw this.raise(q.ExpectedAmbientAfterExportDeclare,this.state.startLoc);let o=we(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(t);return o?((o.type==="TSInterfaceDeclaration"||o.type==="TSTypeAliasDeclaration"||i)&&(t.exportKind="type"),i&&o.type!=="TSImportEqualsDeclaration"&&(this.resetStartLocation(o,n),o.declare=!0),o):null}parseClassId(t,n,i,s){if((!n||i)&&this.isContextual(113))return;super.parseClassId(t,n,i,t.declare?1024:8331);let o=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);o&&(t.typeParameters=o)}parseClassPropertyAnnotation(t){t.optional||(this.eat(35)?t.definite=!0:this.eat(17)&&(t.optional=!0));let n=this.tsTryParseTypeAnnotation();n&&(t.typeAnnotation=n)}parseClassProperty(t){if(this.parseClassPropertyAnnotation(t),this.state.isAmbientContext&&!(t.readonly&&!t.typeAnnotation)&&this.match(29)&&this.raise(q.DeclareClassFieldHasInitializer,this.state.startLoc),t.abstract&&this.match(29)){let{key:n}=t;this.raise(q.AbstractPropertyHasInitializer,this.state.startLoc,{propertyName:n.type==="Identifier"&&!t.computed?n.name:`[${this.input.slice(this.offsetToSourcePos(n.start),this.offsetToSourcePos(n.end))}]`})}return super.parseClassProperty(t)}parseClassPrivateProperty(t){return t.abstract&&this.raise(q.PrivateElementHasAbstract,t),t.accessibility&&this.raise(q.PrivateElementHasAccessibility,t,{modifier:t.accessibility}),this.parseClassPropertyAnnotation(t),super.parseClassPrivateProperty(t)}parseClassAccessorProperty(t){return this.parseClassPropertyAnnotation(t),t.optional&&this.raise(q.AccessorCannotBeOptional,t),super.parseClassAccessorProperty(t)}pushClassMethod(t,n,i,s,o,a){let l=this.tsTryParseTypeParameters(this.tsParseConstModifier);l&&o&&this.raise(q.ConstructorHasTypeParameters,l);let{declare:u=!1,kind:c}=n;u&&(c==="get"||c==="set")&&this.raise(q.DeclareAccessor,n,{kind:c}),l&&(n.typeParameters=l),super.pushClassMethod(t,n,i,s,o,a)}pushClassPrivateMethod(t,n,i,s){let o=this.tsTryParseTypeParameters(this.tsParseConstModifier);o&&(n.typeParameters=o),super.pushClassPrivateMethod(t,n,i,s)}declareClassPrivateMethodInScope(t,n){t.type!=="TSDeclareMethod"&&(t.type==="MethodDefinition"&&!hasOwnProperty.call(t.value,"body")||super.declareClassPrivateMethodInScope(t,n))}parseClassSuper(t){super.parseClassSuper(t),t.superClass&&(this.match(47)||this.match(51))&&(t.superTypeParameters=this.tsParseTypeArgumentsInExpression()),this.eatContextual(113)&&(t.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(t,n,i,s,o,a,l){let u=this.tsTryParseTypeParameters(this.tsParseConstModifier);return u&&(t.typeParameters=u),super.parseObjPropValue(t,n,i,s,o,a,l)}parseFunctionParams(t,n){let i=this.tsTryParseTypeParameters(this.tsParseConstModifier);i&&(t.typeParameters=i),super.parseFunctionParams(t,n)}parseVarId(t,n){super.parseVarId(t,n),t.id.type==="Identifier"&&!this.hasPrecedingLineBreak()&&this.eat(35)&&(t.definite=!0);let i=this.tsTryParseTypeAnnotation();i&&(t.id.typeAnnotation=i,this.resetEndLocation(t.id))}parseAsyncArrowFromCallExpression(t,n){return this.match(14)&&(t.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(t,n)}parseMaybeAssign(t,n){var i,s,o,a,l;let u,c,p;if(this.hasPlugin("jsx")&&(this.match(143)||this.match(47))){if(u=this.state.clone(),c=this.tryParse(()=>super.parseMaybeAssign(t,n),u),!c.error)return c.node;let{context:m}=this.state,h=m[m.length-1];(h===Te.j_oTag||h===Te.j_expr)&&m.pop()}if(!((i=c)!=null&&i.error)&&!this.match(47))return super.parseMaybeAssign(t,n);(!u||u===this.state)&&(u=this.state.clone());let d,f=this.tryParse(m=>{var h,g;d=this.tsParseTypeParameters(this.tsParseConstModifier);let y=super.parseMaybeAssign(t,n);return(y.type!=="ArrowFunctionExpression"||(h=y.extra)!=null&&h.parenthesized)&&m(),((g=d)==null?void 0:g.params.length)!==0&&this.resetStartLocationFromNode(y,d),y.typeParameters=d,y},u);if(!f.error&&!f.aborted)return d&&this.reportReservedArrowTypeParam(d),f.node;if(!c&&(Fy(!this.hasPlugin("jsx")),p=this.tryParse(()=>super.parseMaybeAssign(t,n),u),!p.error))return p.node;if((s=c)!=null&&s.node)return this.state=c.failState,c.node;if(f.node)return this.state=f.failState,d&&this.reportReservedArrowTypeParam(d),f.node;if((o=p)!=null&&o.node)return this.state=p.failState,p.node;throw((a=c)==null?void 0:a.error)||f.error||((l=p)==null?void 0:l.error)}reportReservedArrowTypeParam(t){var n;t.params.length===1&&!t.params[0].constraint&&!((n=t.extra)!=null&&n.trailingComma)&&this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(q.ReservedArrowTypeParam,t)}parseMaybeUnary(t,n){return!this.hasPlugin("jsx")&&this.match(47)?this.tsParseTypeAssertion():super.parseMaybeUnary(t,n)}parseArrow(t){if(this.match(14)){let n=this.tryParse(i=>{let s=this.tsParseTypeOrTypePredicateAnnotation(14);return(this.canInsertSemicolon()||!this.match(19))&&i(),s});if(n.aborted)return;n.thrown||(n.error&&(this.state=n.failState),t.returnType=n.node)}return super.parseArrow(t)}parseFunctionParamType(t){this.eat(17)&&(t.optional=!0);let n=this.tsTryParseTypeAnnotation();return n&&(t.typeAnnotation=n),this.resetEndLocation(t),t}isAssignable(t,n){switch(t.type){case"TSTypeCastExpression":return this.isAssignable(t.expression,n);case"TSParameterProperty":return!0;default:return super.isAssignable(t,n)}}toAssignable(t,n=!1){switch(t.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(t,n);break;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":n?this.expressionScope.recordArrowParameterBindingError(q.UnexpectedTypeCastInParameter,t):this.raise(q.UnexpectedTypeCastInParameter,t),this.toAssignable(t.expression,n);break;case"AssignmentExpression":!n&&t.left.type==="TSTypeCastExpression"&&(t.left=this.typeCastToParameter(t.left));default:super.toAssignable(t,n)}}toAssignableParenthesizedExpression(t,n){switch(t.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":this.toAssignable(t.expression,n);break;default:super.toAssignable(t,n)}}checkToRestConversion(t,n){switch(t.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(t.expression,!1);break;default:super.checkToRestConversion(t,n)}}isValidLVal(t,n,i){switch(t){case"TSTypeCastExpression":return!0;case"TSParameterProperty":return"parameter";case"TSNonNullExpression":case"TSInstantiationExpression":return"expression";case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":return(i!==64||!n)&&["expression",!0];default:return super.isValidLVal(t,n,i)}}parseBindingAtom(){return this.state.type===78?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(t,n){if(this.match(47)||this.match(51)){let i=this.tsParseTypeArgumentsInExpression();if(this.match(10)){let s=super.parseMaybeDecoratorArguments(t,n);return s.typeParameters=i,s}this.unexpected(null,10)}return super.parseMaybeDecoratorArguments(t,n)}checkCommaAfterRest(t){return this.state.isAmbientContext&&this.match(12)&&this.lookaheadCharCode()===t?(this.next(),!1):super.checkCommaAfterRest(t)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(35)||this.match(14)||super.isClassProperty()}parseMaybeDefault(t,n){let i=super.parseMaybeDefault(t,n);return i.type==="AssignmentPattern"&&i.typeAnnotation&&i.right.start<i.typeAnnotation.start&&this.raise(q.TypeAnnotationAfterAssign,i.typeAnnotation),i}getTokenFromCode(t){if(this.state.inType){if(t===62){this.finishOp(48,1);return}if(t===60){this.finishOp(47,1);return}}super.getTokenFromCode(t)}reScan_lt_gt(){let{type:t}=this.state;t===47?(this.state.pos-=1,this.readToken_lt()):t===48&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){let{type:t}=this.state;return t===51?(this.state.pos-=2,this.finishOp(47,1),47):t}toAssignableList(t,n,i){for(let s=0;s<t.length;s++){let o=t[s];o?.type==="TSTypeCastExpression"&&(t[s]=this.typeCastToParameter(o))}super.toAssignableList(t,n,i)}typeCastToParameter(t){return t.expression.typeAnnotation=t.typeAnnotation,this.resetEndLocation(t.expression,t.typeAnnotation.loc.end),t.expression}shouldParseArrow(t){return this.match(14)?t.every(n=>this.isAssignable(n,!0)):super.shouldParseArrow(t)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(t){if(this.match(47)||this.match(51)){let n=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());n&&(t.typeParameters=n)}return super.jsxParseOpeningElementAfterName(t)}getGetterSetterExpectedParamCount(t){let n=super.getGetterSetterExpectedParamCount(t),s=this.getObjectOrClassMethodParams(t)[0];return s&&this.isThisParam(s)?n+1:n}parseCatchClauseParam(){let t=super.parseCatchClauseParam(),n=this.tsTryParseTypeAnnotation();return n&&(t.typeAnnotation=n,this.resetEndLocation(t)),t}tsInAmbientContext(t){let{isAmbientContext:n,strict:i}=this.state;this.state.isAmbientContext=!0,this.state.strict=!1;try{return t()}finally{this.state.isAmbientContext=n,this.state.strict=i}}parseClass(t,n,i){let s=this.state.inAbstractClass;this.state.inAbstractClass=!!t.abstract;try{return super.parseClass(t,n,i)}finally{this.state.inAbstractClass=s}}tsParseAbstractDeclaration(t,n){if(this.match(80))return t.abstract=!0,this.maybeTakeDecorators(n,this.parseClass(t,!0,!1));if(this.isContextual(129)){if(!this.hasFollowingLineBreak())return t.abstract=!0,this.raise(q.NonClassMethodPropertyHasAbstractModifer,t),this.tsParseInterfaceDeclaration(t)}else this.unexpected(null,80)}parseMethod(t,n,i,s,o,a,l){let u=super.parseMethod(t,n,i,s,o,a,l);if(u.abstract&&(this.hasPlugin("estree")?u.value:u).body){let{key:d}=u;this.raise(q.AbstractMethodHasImplementation,u,{methodName:d.type==="Identifier"&&!u.computed?d.name:`[${this.input.slice(this.offsetToSourcePos(d.start),this.offsetToSourcePos(d.end))}]`})}return u}tsParseTypeParameterName(){return this.parseIdentifier().name}shouldParseAsAmbientContext(){return!!this.getPluginOption("typescript","dts")}parse(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.parse()}getExpression(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.getExpression()}parseExportSpecifier(t,n,i,s){return!n&&s?(this.parseTypeOnlyImportExportSpecifier(t,!1,i),this.finishNode(t,"ExportSpecifier")):(t.exportKind="value",super.parseExportSpecifier(t,n,i,s))}parseImportSpecifier(t,n,i,s,o){return!n&&s?(this.parseTypeOnlyImportExportSpecifier(t,!0,i),this.finishNode(t,"ImportSpecifier")):(t.importKind="value",super.parseImportSpecifier(t,n,i,s,i?4098:4096))}parseTypeOnlyImportExportSpecifier(t,n,i){let s=n?"imported":"local",o=n?"local":"exported",a=t[s],l,u=!1,c=!0,p=a.loc.start;if(this.isContextual(93)){let f=this.parseIdentifier();if(this.isContextual(93)){let m=this.parseIdentifier();hr(this.state.type)?(u=!0,a=f,l=n?this.parseIdentifier():this.parseModuleExportName(),c=!1):(l=m,c=!1)}else hr(this.state.type)?(c=!1,l=n?this.parseIdentifier():this.parseModuleExportName()):(u=!0,a=f)}else hr(this.state.type)&&(u=!0,n?(a=this.parseIdentifier(!0),this.isContextual(93)||this.checkReservedWord(a.name,a.loc.start,!0,!0)):a=this.parseModuleExportName());u&&i&&this.raise(n?q.TypeModifierIsUsedInTypeImports:q.TypeModifierIsUsedInTypeExports,p),t[s]=a,t[o]=l;let d=n?"importKind":"exportKind";t[d]=u?"type":"value",c&&this.eatContextual(93)&&(t[o]=n?this.parseIdentifier():this.parseModuleExportName()),t[o]||(t[o]=un(t[s])),n&&this.checkIdentifier(t[o],u?4098:4096)}};function iP(e){if(e.type!=="MemberExpression")return!1;let{computed:r,property:t}=e;return r&&t.type!=="StringLiteral"&&(t.type!=="TemplateLiteral"||t.expressions.length>0)?!1:Yy(e.object)}function sP(e,r){var t;let{type:n}=e;if((t=e.extra)!=null&&t.parenthesized)return!1;if(r){if(n==="Literal"){let{value:i}=e;if(typeof i=="string"||typeof i=="boolean")return!0}}else if(n==="StringLiteral"||n==="BooleanLiteral")return!0;return!!(Jy(e,r)||oP(e,r)||n==="TemplateLiteral"&&e.expressions.length===0||iP(e))}function Jy(e,r){return r?e.type==="Literal"&&(typeof e.value=="number"||"bigint"in e):e.type==="NumericLiteral"||e.type==="BigIntLiteral"}function oP(e,r){if(e.type==="UnaryExpression"){let{operator:t,argument:n}=e;if(t==="-"&&Jy(n,r))return!0}return!1}function Yy(e){return e.type==="Identifier"?!0:e.type!=="MemberExpression"||e.computed?!1:Yy(e.object)}var ky=ln`placeholders`({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."}),aP=e=>class extends e{parsePlaceholder(t){if(this.match(133)){let n=this.startNode();return this.next(),this.assertNoSpace(),n.name=super.parseIdentifier(!0),this.assertNoSpace(),this.expect(133),this.finishPlaceholder(n,t)}}finishPlaceholder(t,n){let i=t;return(!i.expectedNode||!i.type)&&(i=this.finishNode(i,"Placeholder")),i.expectedNode=n,i}getTokenFromCode(t){t===37&&this.input.charCodeAt(this.state.pos+1)===37?this.finishOp(133,2):super.getTokenFromCode(t)}parseExprAtom(t){return this.parsePlaceholder("Expression")||super.parseExprAtom(t)}parseIdentifier(t){return this.parsePlaceholder("Identifier")||super.parseIdentifier(t)}checkReservedWord(t,n,i,s){t!==void 0&&super.checkReservedWord(t,n,i,s)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(t,n,i){return t==="Placeholder"||super.isValidLVal(t,n,i)}toAssignable(t,n){t&&t.type==="Placeholder"&&t.expectedNode==="Expression"?t.expectedNode="Pattern":super.toAssignable(t,n)}chStartsBindingIdentifier(t,n){return!!(super.chStartsBindingIdentifier(t,n)||this.lookahead().type===133)}verifyBreakContinue(t,n){t.label&&t.label.type==="Placeholder"||super.verifyBreakContinue(t,n)}parseExpressionStatement(t,n){var i;if(n.type!=="Placeholder"||(i=n.extra)!=null&&i.parenthesized)return super.parseExpressionStatement(t,n);if(this.match(14)){let o=t;return o.label=this.finishPlaceholder(n,"Identifier"),this.next(),o.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(o,"LabeledStatement")}this.semicolon();let s=t;return s.name=n.name,this.finishPlaceholder(s,"Statement")}parseBlock(t,n,i){return this.parsePlaceholder("BlockStatement")||super.parseBlock(t,n,i)}parseFunctionId(t){return this.parsePlaceholder("Identifier")||super.parseFunctionId(t)}parseClass(t,n,i){let s=n?"ClassDeclaration":"ClassExpression";this.next();let o=this.state.strict,a=this.parsePlaceholder("Identifier");if(a)if(this.match(81)||this.match(133)||this.match(5))t.id=a;else{if(i||!n)return t.id=null,t.body=this.finishPlaceholder(a,"ClassBody"),this.finishNode(t,s);throw this.raise(ky.ClassNameIsRequired,this.state.startLoc)}else this.parseClassId(t,n,i);return super.parseClassSuper(t),t.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!t.superClass,o),this.finishNode(t,s)}parseExport(t,n){let i=this.parsePlaceholder("Identifier");if(!i)return super.parseExport(t,n);let s=t;if(!this.isContextual(98)&&!this.match(12))return s.specifiers=[],s.source=null,s.declaration=this.finishPlaceholder(i,"Declaration"),this.finishNode(s,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");let o=this.startNode();return o.exported=i,s.specifiers=[this.finishNode(o,"ExportDefaultSpecifier")],super.parseExport(s,n)}isExportDefaultSpecifier(){if(this.match(65)){let t=this.nextTokenStart();if(this.isUnparsedContextual(t,"from")&&this.input.startsWith(Nn(133),this.nextTokenStartSince(t+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(t,n){var i;return(i=t.specifiers)!=null&&i.length?!0:super.maybeParseExportDefaultSpecifier(t,n)}checkExport(t){let{specifiers:n}=t;n!=null&&n.length&&(t.specifiers=n.filter(i=>i.exported.type==="Placeholder")),super.checkExport(t),t.specifiers=n}parseImport(t){let n=this.parsePlaceholder("Identifier");if(!n)return super.parseImport(t);if(t.specifiers=[],!this.isContextual(98)&&!this.match(12))return t.source=this.finishPlaceholder(n,"StringLiteral"),this.semicolon(),this.finishNode(t,"ImportDeclaration");let i=this.startNodeAtNode(n);return i.local=n,t.specifiers.push(this.finishNode(i,"ImportDefaultSpecifier")),this.eat(12)&&(this.maybeParseStarImportSpecifier(t)||this.parseNamedImportSpecifiers(t)),this.expectContextual(98),t.source=this.parseImportSource(),this.semicolon(),this.finishNode(t,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource()}assertNoSpace(){this.state.start>this.offsetToSourcePos(this.state.lastTokEndLoc.index)&&this.raise(ky.UnexpectedSpace,this.state.lastTokEndLoc)}},lP=e=>class extends e{parseV8Intrinsic(){if(this.match(54)){let t=this.state.startLoc,n=this.startNode();if(this.next(),we(this.state.type)){let i=this.parseIdentifierName(),s=this.createIdentifier(n,i);if(s.type="V8IntrinsicIdentifier",this.match(10))return s}this.unexpected(t)}}parseExprAtom(t){return this.parseV8Intrinsic()||super.parseExprAtom(t)}},Oy=["minimal","fsharp","hack","smart"],Ry=["^^","@@","^","%","#"];function uP(e){if(e.has("decorators")){if(e.has("decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");let t=e.get("decorators").decoratorsBeforeExport;if(t!=null&&typeof t!="boolean")throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");let n=e.get("decorators").allowCallParenthesized;if(n!=null&&typeof n!="boolean")throw new Error("'allowCallParenthesized' must be a boolean.")}if(e.has("flow")&&e.has("typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(e.has("placeholders")&&e.has("v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(e.has("pipelineOperator")){var r;let t=e.get("pipelineOperator").proposal;if(!Oy.includes(t)){let i=Oy.map(s=>`"${s}"`).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${i}.`)}let n=((r=e.get("recordAndTuple"))==null?void 0:r.syntaxType)==="hash";if(t==="hack"){if(e.has("placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(e.has("v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");let i=e.get("pipelineOperator").topicToken;if(!Ry.includes(i)){let s=Ry.map(o=>`"${o}"`).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${s}.`)}if(i==="#"&&n)throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "hack", topicToken: "#" }]\` and \`${JSON.stringify(["recordAndTuple",e.get("recordAndTuple")])}\`.`)}else if(t==="smart"&&n)throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "smart" }]\` and \`${JSON.stringify(["recordAndTuple",e.get("recordAndTuple")])}\`.`)}if(e.has("moduleAttributes")){if(e.has("deprecatedImportAssert")||e.has("importAssertions"))throw new Error("Cannot combine importAssertions, deprecatedImportAssert and moduleAttributes plugins.");if(e.get("moduleAttributes").version!=="may-2020")throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.")}if(e.has("importAssertions")&&e.has("deprecatedImportAssert"))throw new Error("Cannot combine importAssertions and deprecatedImportAssert plugins.");if(!e.has("deprecatedImportAssert")&&e.has("importAttributes")&&e.get("importAttributes").deprecatedAssertSyntax&&e.set("deprecatedImportAssert",{}),e.has("recordAndTuple")){let t=e.get("recordAndTuple").syntaxType;if(t!=null){let n=["hash","bar"];if(!n.includes(t))throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: "+n.map(i=>`'${i}'`).join(", "))}}if(e.has("asyncDoExpressions")&&!e.has("doExpressions")){let t=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw t.missingPlugins="doExpressions",t}if(e.has("optionalChainingAssign")&&e.get("optionalChainingAssign").version!=="2023-07")throw new Error("The 'optionalChainingAssign' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is '2023-07'.")}var Xy={estree:pv,jsx:Zv,flow:Xv,typescript:nP,v8intrinsic:lP,placeholders:aP},cP=Object.keys(Xy),Bc=class extends Lc{checkProto(r,t,n,i){if(r.type==="SpreadElement"||this.isObjectMethod(r)||r.computed||r.shorthand)return;let s=r.key;if((s.type==="Identifier"?s.name:s.value)==="__proto__"){if(t){this.raise(S.RecordNoProto,s);return}n.used&&(i?i.doubleProtoLoc===null&&(i.doubleProtoLoc=s.loc.start):this.raise(S.DuplicateProto,s)),n.used=!0}}shouldExitDescending(r,t){return r.type==="ArrowFunctionExpression"&&this.offsetToSourcePos(r.start)===t}getExpression(){this.enterInitialScopes(),this.nextToken();let r=this.parseExpression();return this.match(140)||this.unexpected(),this.finalizeRemainingComments(),r.comments=this.comments,r.errors=this.state.errors,this.optionFlags&128&&(r.tokens=this.tokens),r}parseExpression(r,t){return r?this.disallowInAnd(()=>this.parseExpressionBase(t)):this.allowInAnd(()=>this.parseExpressionBase(t))}parseExpressionBase(r){let t=this.state.startLoc,n=this.parseMaybeAssign(r);if(this.match(12)){let i=this.startNodeAt(t);for(i.expressions=[n];this.eat(12);)i.expressions.push(this.parseMaybeAssign(r));return this.toReferencedList(i.expressions),this.finishNode(i,"SequenceExpression")}return n}parseMaybeAssignDisallowIn(r,t){return this.disallowInAnd(()=>this.parseMaybeAssign(r,t))}parseMaybeAssignAllowIn(r,t){return this.allowInAnd(()=>this.parseMaybeAssign(r,t))}setOptionalParametersError(r,t){var n;r.optionalParametersLoc=(n=t?.loc)!=null?n:this.state.startLoc}parseMaybeAssign(r,t){let n=this.state.startLoc;if(this.isContextual(108)&&this.prodParam.hasYield){let a=this.parseYield();return t&&(a=t.call(this,a,n)),a}let i;r?i=!1:(r=new Ki,i=!0);let{type:s}=this.state;(s===10||we(s))&&(this.state.potentialArrowAt=this.state.start);let o=this.parseMaybeConditional(r);if(t&&(o=t.call(this,o,n)),gv(this.state.type)){let a=this.startNodeAt(n),l=this.state.value;if(a.operator=l,this.match(29)){this.toAssignable(o,!0),a.left=o;let u=n.index;r.doubleProtoLoc!=null&&r.doubleProtoLoc.index>=u&&(r.doubleProtoLoc=null),r.shorthandAssignLoc!=null&&r.shorthandAssignLoc.index>=u&&(r.shorthandAssignLoc=null),r.privateKeyLoc!=null&&r.privateKeyLoc.index>=u&&(this.checkDestructuringPrivate(r),r.privateKeyLoc=null)}else a.left=o;return this.next(),a.right=this.parseMaybeAssign(),this.checkLVal(o,this.finishNode(a,"AssignmentExpression")),a}else i&&this.checkExpressionErrors(r,!0);return o}parseMaybeConditional(r){let t=this.state.startLoc,n=this.state.potentialArrowAt,i=this.parseExprOps(r);return this.shouldExitDescending(i,n)?i:this.parseConditional(i,t,r)}parseConditional(r,t,n){if(this.eat(17)){let i=this.startNodeAt(t);return i.test=r,i.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),i.alternate=this.parseMaybeAssign(),this.finishNode(i,"ConditionalExpression")}return r}parseMaybeUnaryOrPrivate(r){return this.match(139)?this.parsePrivateName():this.parseMaybeUnary(r)}parseExprOps(r){let t=this.state.startLoc,n=this.state.potentialArrowAt,i=this.parseMaybeUnaryOrPrivate(r);return this.shouldExitDescending(i,n)?i:this.parseExprOp(i,t,-1)}parseExprOp(r,t,n){if(this.isPrivateName(r)){let s=this.getPrivateNameSV(r);(n>=Aa(58)||!this.prodParam.hasIn||!this.match(58))&&this.raise(S.PrivateInExpectedIn,r,{identifierName:s}),this.classScope.usePrivateName(s,r.loc.start)}let i=this.state.type;if(bv(i)&&(this.prodParam.hasIn||!this.match(58))){let s=Aa(i);if(s>n){if(i===39){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return r;this.checkPipelineAtInfixOperator(r,t)}let o=this.startNodeAt(t);o.left=r,o.operator=this.state.value;let a=i===41||i===42,l=i===40;if(l&&(s=Aa(42)),this.next(),i===39&&this.hasPlugin(["pipelineOperator",{proposal:"minimal"}])&&this.state.type===96&&this.prodParam.hasAwait)throw this.raise(S.UnexpectedAwaitAfterPipelineBody,this.state.startLoc);o.right=this.parseExprOpRightExpr(i,s);let u=this.finishNode(o,a||l?"LogicalExpression":"BinaryExpression"),c=this.state.type;if(l&&(c===41||c===42)||a&&c===40)throw this.raise(S.MixingCoalesceWithLogical,this.state.startLoc);return this.parseExprOp(u,t,n)}}return r}parseExprOpRightExpr(r,t){let n=this.state.startLoc;switch(r){case 39:switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext(()=>this.parseHackPipeBody());case"fsharp":return this.withSoloAwaitPermittingContext(()=>this.parseFSharpPipelineBody(t))}if(this.getPluginOption("pipelineOperator","proposal")==="smart")return this.withTopicBindingContext(()=>{if(this.prodParam.hasYield&&this.isContextual(108))throw this.raise(S.PipeBodyIsTighter,this.state.startLoc);return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(r,t),n)});default:return this.parseExprOpBaseRightExpr(r,t)}}parseExprOpBaseRightExpr(r,t){let n=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),n,Sv(r)?t-1:t)}parseHackPipeBody(){var r;let{startLoc:t}=this.state,n=this.parseMaybeAssign();return iv.has(n.type)&&!((r=n.extra)!=null&&r.parenthesized)&&this.raise(S.PipeUnparenthesizedBody,t,{type:n.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(S.PipeTopicUnused,t),n}checkExponentialAfterUnary(r){this.match(57)&&this.raise(S.UnexpectedTokenUnaryExponentiation,r.argument)}parseMaybeUnary(r,t){let n=this.state.startLoc,i=this.isContextual(96);if(i&&this.recordAwaitIfAllowed()){this.next();let l=this.parseAwait(n);return t||this.checkExponentialAfterUnary(l),l}let s=this.match(34),o=this.startNode();if(xv(this.state.type)){o.operator=this.state.value,o.prefix=!0,this.match(72)&&this.expectPlugin("throwExpressions");let l=this.match(89);if(this.next(),o.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(r,!0),this.state.strict&&l){let u=o.argument;u.type==="Identifier"?this.raise(S.StrictDelete,o):this.hasPropertyAsPrivateName(u)&&this.raise(S.DeletePrivateField,o)}if(!s)return t||this.checkExponentialAfterUnary(o),this.finishNode(o,"UnaryExpression")}let a=this.parseUpdate(o,s,r);if(i){let{type:l}=this.state;if((this.hasPlugin("v8intrinsic")?Dc(l):Dc(l)&&!this.match(54))&&!this.isAmbiguousAwait())return this.raiseOverwrite(S.AwaitNotInAsyncContext,n),this.parseAwait(n)}return a}parseUpdate(r,t,n){if(t){let o=r;return this.checkLVal(o.argument,this.finishNode(o,"UpdateExpression")),r}let i=this.state.startLoc,s=this.parseExprSubscripts(n);if(this.checkExpressionErrors(n,!1))return s;for(;Dv(this.state.type)&&!this.canInsertSemicolon();){let o=this.startNodeAt(i);o.operator=this.state.value,o.prefix=!1,o.argument=s,this.next(),this.checkLVal(s,s=this.finishNode(o,"UpdateExpression"))}return s}parseExprSubscripts(r){let t=this.state.startLoc,n=this.state.potentialArrowAt,i=this.parseExprAtom(r);return this.shouldExitDescending(i,n)?i:this.parseSubscripts(i,t)}parseSubscripts(r,t,n){let i={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(r),stop:!1};do r=this.parseSubscript(r,t,n,i),i.maybeAsyncArrow=!1;while(!i.stop);return r}parseSubscript(r,t,n,i){let{type:s}=this.state;if(!n&&s===15)return this.parseBind(r,t,n,i);if(Ia(s))return this.parseTaggedTemplateExpression(r,t,i);let o=!1;if(s===18){if(n&&(this.raise(S.OptionalChainingNoNew,this.state.startLoc),this.lookaheadCharCode()===40))return i.stop=!0,r;i.optionalChainMember=o=!0,this.next()}if(!n&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(r,t,i,o);{let a=this.eat(0);return a||o||this.eat(16)?this.parseMember(r,t,i,a,o):(i.stop=!0,r)}}parseMember(r,t,n,i,s){let o=this.startNodeAt(t);return o.object=r,o.computed=i,i?(o.property=this.parseExpression(),this.expect(3)):this.match(139)?(r.type==="Super"&&this.raise(S.SuperPrivateField,t),this.classScope.usePrivateName(this.state.value,this.state.startLoc),o.property=this.parsePrivateName()):o.property=this.parseIdentifier(!0),n.optionalChainMember?(o.optional=s,this.finishNode(o,"OptionalMemberExpression")):this.finishNode(o,"MemberExpression")}parseBind(r,t,n,i){let s=this.startNodeAt(t);return s.object=r,this.next(),s.callee=this.parseNoCallExpr(),i.stop=!0,this.parseSubscripts(this.finishNode(s,"BindExpression"),t,n)}parseCoverCallAndAsyncArrowHead(r,t,n,i){let s=this.state.maybeInArrowParameters,o=null;this.state.maybeInArrowParameters=!0,this.next();let a=this.startNodeAt(t);a.callee=r;let{maybeAsyncArrow:l,optionalChainMember:u}=n;l&&(this.expressionScope.enter(Vv()),o=new Ki),u&&(a.optional=i),i?a.arguments=this.parseCallExpressionArguments(11):a.arguments=this.parseCallExpressionArguments(11,r.type!=="Super",a,o);let c=this.finishCallExpression(a,u);return l&&this.shouldParseAsyncArrow()&&!i?(n.stop=!0,this.checkDestructuringPrivate(o),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),c=this.parseAsyncArrowFromCallExpression(this.startNodeAt(t),c)):(l&&(this.checkExpressionErrors(o,!0),this.expressionScope.exit()),this.toReferencedArguments(c)),this.state.maybeInArrowParameters=s,c}toReferencedArguments(r,t){this.toReferencedListDeep(r.arguments,t)}parseTaggedTemplateExpression(r,t,n){let i=this.startNodeAt(t);return i.tag=r,i.quasi=this.parseTemplate(!0),n.optionalChainMember&&this.raise(S.OptionalChainingNoTemplate,t),this.finishNode(i,"TaggedTemplateExpression")}atPossibleAsyncArrow(r){return r.type==="Identifier"&&r.name==="async"&&this.state.lastTokEndLoc.index===r.end&&!this.canInsertSemicolon()&&r.end-r.start===5&&this.offsetToSourcePos(r.start)===this.state.potentialArrowAt}finishCallExpression(r,t){if(r.callee.type==="Import")if(r.arguments.length===0||r.arguments.length>2)this.raise(S.ImportCallArity,r);else for(let n of r.arguments)n.type==="SpreadElement"&&this.raise(S.ImportCallSpreadArgument,n);return this.finishNode(r,t?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(r,t,n,i){let s=[],o=!0,a=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(r);){if(o)o=!1;else if(this.expect(12),this.match(r)){n&&this.addTrailingCommaExtraToNode(n),this.next();break}s.push(this.parseExprListItem(!1,i,t))}return this.state.inFSharpPipelineDirectBody=a,s}shouldParseAsyncArrow(){return this.match(19)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(r,t){var n;return this.resetPreviousNodeTrailingComments(t),this.expect(19),this.parseArrowExpression(r,t.arguments,!0,(n=t.extra)==null?void 0:n.trailingCommaLoc),t.innerComments&&Hs(r,t.innerComments),t.callee.trailingComments&&Hs(r,t.callee.trailingComments),r}parseNoCallExpr(){let r=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),r,!0)}parseExprAtom(r){let t,n=null,{type:i}=this.state;switch(i){case 79:return this.parseSuper();case 83:return t=this.startNode(),this.next(),this.match(16)?this.parseImportMetaProperty(t):this.match(10)?this.optionFlags&256?this.parseImportCall(t):this.finishNode(t,"Import"):(this.raise(S.UnsupportedImport,this.state.lastTokStartLoc),this.finishNode(t,"Import"));case 78:return t=this.startNode(),this.next(),this.finishNode(t,"ThisExpression");case 90:return this.parseDo(this.startNode(),!1);case 56:case 31:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 135:return this.parseNumericLiteral(this.state.value);case 136:return this.parseBigIntLiteral(this.state.value);case 134:return this.parseStringLiteral(this.state.value);case 84:return this.parseNullLiteral();case 85:return this.parseBooleanLiteral(!0);case 86:return this.parseBooleanLiteral(!1);case 10:{let s=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(s)}case 2:case 1:return this.parseArrayLike(this.state.type===2?4:3,!1,!0);case 0:return this.parseArrayLike(3,!0,!1,r);case 6:case 7:return this.parseObjectLike(this.state.type===6?9:8,!1,!0);case 5:return this.parseObjectLike(8,!1,!1,r);case 68:return this.parseFunctionOrFunctionSent();case 26:n=this.parseDecorators();case 80:return this.parseClass(this.maybeTakeDecorators(n,this.startNode()),!1);case 77:return this.parseNewOrNewTarget();case 25:case 24:return this.parseTemplate(!1);case 15:{t=this.startNode(),this.next(),t.object=null;let s=t.callee=this.parseNoCallExpr();if(s.type==="MemberExpression")return this.finishNode(t,"BindExpression");throw this.raise(S.UnsupportedBind,s)}case 139:return this.raise(S.PrivateInExpectedIn,this.state.startLoc,{identifierName:this.state.value}),this.parsePrivateName();case 33:return this.parseTopicReferenceThenEqualsSign(54,"%");case 32:return this.parseTopicReferenceThenEqualsSign(44,"^");case 37:case 38:return this.parseTopicReference("hack");case 44:case 54:case 27:{let s=this.getPluginOption("pipelineOperator","proposal");if(s)return this.parseTopicReference(s);this.unexpected();break}case 47:{let s=this.input.codePointAt(this.nextTokenStart());an(s)||s===62?this.expectOnePlugin(["jsx","flow","typescript"]):this.unexpected();break}default:if(i===137)return this.parseDecimalLiteral(this.state.value);if(we(i)){if(this.isContextual(127)&&this.lookaheadInLineCharCode()===123)return this.parseModuleExpression();let s=this.state.potentialArrowAt===this.state.start,o=this.state.containsEsc,a=this.parseIdentifier();if(!o&&a.name==="async"&&!this.canInsertSemicolon()){let{type:l}=this.state;if(l===68)return this.resetPreviousNodeTrailingComments(a),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(a));if(we(l))return this.lookaheadCharCode()===61?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(a)):a;if(l===90)return this.resetPreviousNodeTrailingComments(a),this.parseDo(this.startNodeAtNode(a),!0)}return s&&this.match(19)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(a),[a],!1)):a}else this.unexpected()}}parseTopicReferenceThenEqualsSign(r,t){let n=this.getPluginOption("pipelineOperator","proposal");if(n)return this.state.type=r,this.state.value=t,this.state.pos--,this.state.end--,this.state.endLoc=_t(this.state.endLoc,-1),this.parseTopicReference(n);this.unexpected()}parseTopicReference(r){let t=this.startNode(),n=this.state.startLoc,i=this.state.type;return this.next(),this.finishTopicReference(t,n,r,i)}finishTopicReference(r,t,n,i){if(this.testTopicReferenceConfiguration(n,t,i))return n==="hack"?(this.topicReferenceIsAllowedInCurrentContext()||this.raise(S.PipeTopicUnbound,t),this.registerTopicReference(),this.finishNode(r,"TopicReference")):(this.topicReferenceIsAllowedInCurrentContext()||this.raise(S.PrimaryTopicNotAllowed,t),this.registerTopicReference(),this.finishNode(r,"PipelinePrimaryTopicReference"));throw this.raise(S.PipeTopicUnconfiguredToken,t,{token:Nn(i)})}testTopicReferenceConfiguration(r,t,n){switch(r){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:Nn(n)}]);case"smart":return n===27;default:throw this.raise(S.PipeTopicRequiresHackPipes,t)}}parseAsyncArrowUnaryFunction(r){this.prodParam.enter(va(!0,this.prodParam.hasYield));let t=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(S.LineTerminatorBeforeArrow,this.state.curPosition()),this.expect(19),this.parseArrowExpression(r,t,!0)}parseDo(r,t){this.expectPlugin("doExpressions"),t&&this.expectPlugin("asyncDoExpressions"),r.async=t,this.next();let n=this.state.labels;return this.state.labels=[],t?(this.prodParam.enter(2),r.body=this.parseBlock(),this.prodParam.exit()):r.body=this.parseBlock(),this.state.labels=n,this.finishNode(r,"DoExpression")}parseSuper(){let r=this.startNode();return this.next(),this.match(10)&&!this.scope.allowDirectSuper&&!(this.optionFlags&16)?this.raise(S.SuperNotAllowed,r):!this.scope.allowSuper&&!(this.optionFlags&16)&&this.raise(S.UnexpectedSuper,r),!this.match(10)&&!this.match(0)&&!this.match(16)&&this.raise(S.UnsupportedSuper,r),this.finishNode(r,"Super")}parsePrivateName(){let r=this.startNode(),t=this.startNodeAt(_t(this.state.startLoc,1)),n=this.state.value;return this.next(),r.id=this.createIdentifier(t,n),this.finishNode(r,"PrivateName")}parseFunctionOrFunctionSent(){let r=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(16)){let t=this.createIdentifier(this.startNodeAtNode(r),"function");return this.next(),this.match(103)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected(),this.parseMetaProperty(r,t,"sent")}return this.parseFunction(r)}parseMetaProperty(r,t,n){r.meta=t;let i=this.state.containsEsc;return r.property=this.parseIdentifier(!0),(r.property.name!==n||i)&&this.raise(S.UnsupportedMetaProperty,r.property,{target:t.name,onlyValidPropertyName:n}),this.finishNode(r,"MetaProperty")}parseImportMetaProperty(r){let t=this.createIdentifier(this.startNodeAtNode(r),"import");if(this.next(),this.isContextual(101))this.inModule||this.raise(S.ImportMetaOutsideModule,t),this.sawUnambiguousESM=!0;else if(this.isContextual(105)||this.isContextual(97)){let n=this.isContextual(105);if(this.expectPlugin(n?"sourcePhaseImports":"deferredImportEvaluation"),!(this.optionFlags&256))throw this.raise(S.DynamicImportPhaseRequiresImportExpressions,this.state.startLoc,{phase:this.state.value});return this.next(),r.phase=n?"source":"defer",this.parseImportCall(r)}return this.parseMetaProperty(r,t,"meta")}parseLiteralAtNode(r,t,n){return this.addExtra(n,"rawValue",r),this.addExtra(n,"raw",this.input.slice(this.offsetToSourcePos(n.start),this.state.end)),n.value=r,this.next(),this.finishNode(n,t)}parseLiteral(r,t){let n=this.startNode();return this.parseLiteralAtNode(r,t,n)}parseStringLiteral(r){return this.parseLiteral(r,"StringLiteral")}parseNumericLiteral(r){return this.parseLiteral(r,"NumericLiteral")}parseBigIntLiteral(r){return this.parseLiteral(r,"BigIntLiteral")}parseDecimalLiteral(r){return this.parseLiteral(r,"DecimalLiteral")}parseRegExpLiteral(r){let t=this.startNode();return this.addExtra(t,"raw",this.input.slice(this.offsetToSourcePos(t.start),this.state.end)),t.pattern=r.pattern,t.flags=r.flags,this.next(),this.finishNode(t,"RegExpLiteral")}parseBooleanLiteral(r){let t=this.startNode();return t.value=r,this.next(),this.finishNode(t,"BooleanLiteral")}parseNullLiteral(){let r=this.startNode();return this.next(),this.finishNode(r,"NullLiteral")}parseParenAndDistinguishExpression(r){let t=this.state.startLoc,n;this.next(),this.expressionScope.enter(Kv());let i=this.state.maybeInArrowParameters,s=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;let o=this.state.startLoc,a=[],l=new Ki,u=!0,c,p;for(;!this.match(11);){if(u)u=!1;else if(this.expect(12,l.optionalParametersLoc===null?null:l.optionalParametersLoc),this.match(11)){p=this.state.startLoc;break}if(this.match(21)){let m=this.state.startLoc;if(c=this.state.startLoc,a.push(this.parseParenItem(this.parseRestBinding(),m)),!this.checkCommaAfterRest(41))break}else a.push(this.parseMaybeAssignAllowIn(l,this.parseParenItem))}let d=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=i,this.state.inFSharpPipelineDirectBody=s;let f=this.startNodeAt(t);return r&&this.shouldParseArrow(a)&&(f=this.parseArrow(f))?(this.checkDestructuringPrivate(l),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(f,a,!1),f):(this.expressionScope.exit(),a.length||this.unexpected(this.state.lastTokStartLoc),p&&this.unexpected(p),c&&this.unexpected(c),this.checkExpressionErrors(l,!0),this.toReferencedListDeep(a,!0),a.length>1?(n=this.startNodeAt(o),n.expressions=a,this.finishNode(n,"SequenceExpression"),this.resetEndLocation(n,d)):n=a[0],this.wrapParenthesis(t,n))}wrapParenthesis(r,t){if(!(this.optionFlags&512))return this.addExtra(t,"parenthesized",!0),this.addExtra(t,"parenStart",r.index),this.takeSurroundingComments(t,r.index,this.state.lastTokEndLoc.index),t;let n=this.startNodeAt(r);return n.expression=t,this.finishNode(n,"ParenthesizedExpression")}shouldParseArrow(r){return!this.canInsertSemicolon()}parseArrow(r){if(this.eat(19))return r}parseParenItem(r,t){return r}parseNewOrNewTarget(){let r=this.startNode();if(this.next(),this.match(16)){let t=this.createIdentifier(this.startNodeAtNode(r),"new");this.next();let n=this.parseMetaProperty(r,t,"target");return!this.scope.inNonArrowFunction&&!this.scope.inClass&&!(this.optionFlags&4)&&this.raise(S.UnexpectedNewTarget,n),n}return this.parseNew(r)}parseNew(r){if(this.parseNewCallee(r),this.eat(10)){let t=this.parseExprList(11);this.toReferencedList(t),r.arguments=t}else r.arguments=[];return this.finishNode(r,"NewExpression")}parseNewCallee(r){let t=this.match(83),n=this.parseNoCallExpr();r.callee=n,t&&(n.type==="Import"||n.type==="ImportExpression")&&this.raise(S.ImportCallNotNewExpression,n)}parseTemplateElement(r){let{start:t,startLoc:n,end:i,value:s}=this.state,o=t+1,a=this.startNodeAt(_t(n,1));s===null&&(r||this.raise(S.InvalidEscapeSequenceTemplate,_t(this.state.firstInvalidTemplateEscapePos,1)));let l=this.match(24),u=l?-1:-2,c=i+u;a.value={raw:this.input.slice(o,c).replace(/\r\n?/g,`
|
|
22
|
-
`),cooked:s===null?null:s.slice(1,u)},a.tail=l,this.next();let p=this.finishNode(a,"TemplateElement");return this.resetEndLocation(p,_t(this.state.lastTokEndLoc,u)),p}parseTemplate(r){let t=this.startNode(),n=this.parseTemplateElement(r),i=[n],s=[];for(;!n.tail;)s.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),i.push(n=this.parseTemplateElement(r));return t.expressions=s,t.quasis=i,this.finishNode(t,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(r,t,n,i){n&&this.expectPlugin("recordAndTuple");let s=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let o=Object.create(null),a=!0,l=this.startNode();for(l.properties=[],this.next();!this.match(r);){if(a)a=!1;else if(this.expect(12),this.match(r)){this.addTrailingCommaExtraToNode(l);break}let c;t?c=this.parseBindingProperty():(c=this.parsePropertyDefinition(i),this.checkProto(c,n,o,i)),n&&!this.isObjectProperty(c)&&c.type!=="SpreadElement"&&this.raise(S.InvalidRecordProperty,c),c.shorthand&&this.addExtra(c,"shorthand",!0),l.properties.push(c)}this.next(),this.state.inFSharpPipelineDirectBody=s;let u="ObjectExpression";return t?u="ObjectPattern":n&&(u="RecordExpression"),this.finishNode(l,u)}addTrailingCommaExtraToNode(r){this.addExtra(r,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(r,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(r){return!r.computed&&r.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(r){let t=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(S.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)t.push(this.parseDecorator());let n=this.startNode(),i=!1,s=!1,o;if(this.match(21))return t.length&&this.unexpected(),this.parseSpread();t.length&&(n.decorators=t,t=[]),n.method=!1,r&&(o=this.state.startLoc);let a=this.eat(55);this.parsePropertyNamePrefixOperator(n);let l=this.state.containsEsc;if(this.parsePropertyName(n,r),!a&&!l&&this.maybeAsyncOrAccessorProp(n)){let{key:u}=n,c=u.name;c==="async"&&!this.hasPrecedingLineBreak()&&(i=!0,this.resetPreviousNodeTrailingComments(u),a=this.eat(55),this.parsePropertyName(n)),(c==="get"||c==="set")&&(s=!0,this.resetPreviousNodeTrailingComments(u),n.kind=c,this.match(55)&&(a=!0,this.raise(S.AccessorIsGenerator,this.state.curPosition(),{kind:c}),this.next()),this.parsePropertyName(n))}return this.parseObjPropValue(n,o,a,i,!1,s,r)}getGetterSetterExpectedParamCount(r){return r.kind==="get"?0:1}getObjectOrClassMethodParams(r){return r.params}checkGetterSetterParams(r){var t;let n=this.getGetterSetterExpectedParamCount(r),i=this.getObjectOrClassMethodParams(r);i.length!==n&&this.raise(r.kind==="get"?S.BadGetterArity:S.BadSetterArity,r),r.kind==="set"&&((t=i[i.length-1])==null?void 0:t.type)==="RestElement"&&this.raise(S.BadSetterRestParameter,r)}parseObjectMethod(r,t,n,i,s){if(s){let o=this.parseMethod(r,t,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(o),o}if(n||t||this.match(10))return i&&this.unexpected(),r.kind="method",r.method=!0,this.parseMethod(r,t,n,!1,!1,"ObjectMethod")}parseObjectProperty(r,t,n,i){if(r.shorthand=!1,this.eat(14))return r.value=n?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowIn(i),this.finishNode(r,"ObjectProperty");if(!r.computed&&r.key.type==="Identifier"){if(this.checkReservedWord(r.key.name,r.key.loc.start,!0,!1),n)r.value=this.parseMaybeDefault(t,un(r.key));else if(this.match(29)){let s=this.state.startLoc;i!=null?i.shorthandAssignLoc===null&&(i.shorthandAssignLoc=s):this.raise(S.InvalidCoverInitializedName,s),r.value=this.parseMaybeDefault(t,un(r.key))}else r.value=un(r.key);return r.shorthand=!0,this.finishNode(r,"ObjectProperty")}}parseObjPropValue(r,t,n,i,s,o,a){let l=this.parseObjectMethod(r,n,i,s,o)||this.parseObjectProperty(r,t,s,a);return l||this.unexpected(),l}parsePropertyName(r,t){if(this.eat(0))r.computed=!0,r.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{let{type:n,value:i}=this.state,s;if(hr(n))s=this.parseIdentifier(!0);else switch(n){case 135:s=this.parseNumericLiteral(i);break;case 134:s=this.parseStringLiteral(i);break;case 136:s=this.parseBigIntLiteral(i);break;case 139:{let o=this.state.startLoc;t!=null?t.privateKeyLoc===null&&(t.privateKeyLoc=o):this.raise(S.UnexpectedPrivateField,o),s=this.parsePrivateName();break}default:if(n===137){s=this.parseDecimalLiteral(i);break}this.unexpected()}r.key=s,n!==139&&(r.computed=!1)}}initFunction(r,t){r.id=null,r.generator=!1,r.async=t}parseMethod(r,t,n,i,s,o,a=!1){this.initFunction(r,n),r.generator=t,this.scope.enter(18|(a?64:0)|(s?32:0)),this.prodParam.enter(va(n,r.generator)),this.parseFunctionParams(r,i);let l=this.parseFunctionBodyAndFinish(r,o,!0);return this.prodParam.exit(),this.scope.exit(),l}parseArrayLike(r,t,n,i){n&&this.expectPlugin("recordAndTuple");let s=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let o=this.startNode();return this.next(),o.elements=this.parseExprList(r,!n,i,o),this.state.inFSharpPipelineDirectBody=s,this.finishNode(o,n?"TupleExpression":"ArrayExpression")}parseArrowExpression(r,t,n,i){this.scope.enter(6);let s=va(n,!1);!this.match(5)&&this.prodParam.hasIn&&(s|=8),this.prodParam.enter(s),this.initFunction(r,n);let o=this.state.maybeInArrowParameters;return t&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(r,t,i)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(r,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=o,this.finishNode(r,"ArrowFunctionExpression")}setArrowFunctionParameters(r,t,n){this.toAssignableList(t,n,!1),r.params=t}parseFunctionBodyAndFinish(r,t,n=!1){return this.parseFunctionBody(r,!1,n),this.finishNode(r,t)}parseFunctionBody(r,t,n=!1){let i=t&&!this.match(5);if(this.expressionScope.enter(Gy()),i)r.body=this.parseMaybeAssign(),this.checkParams(r,!1,t,!1);else{let s=this.state.strict,o=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|4),r.body=this.parseBlock(!0,!1,a=>{let l=!this.isSimpleParamList(r.params);a&&l&&this.raise(S.IllegalLanguageModeDirective,(r.kind==="method"||r.kind==="constructor")&&r.key?r.key.loc.end:r);let u=!s&&this.state.strict;this.checkParams(r,!this.state.strict&&!t&&!n&&!l,t,u),this.state.strict&&r.id&&this.checkIdentifier(r.id,65,u)}),this.prodParam.exit(),this.state.labels=o}this.expressionScope.exit()}isSimpleParameter(r){return r.type==="Identifier"}isSimpleParamList(r){for(let t=0,n=r.length;t<n;t++)if(!this.isSimpleParameter(r[t]))return!1;return!0}checkParams(r,t,n,i=!0){let s=!t&&new Set,o={type:"FormalParameters"};for(let a of r.params)this.checkLVal(a,o,5,s,i)}parseExprList(r,t,n,i){let s=[],o=!0;for(;!this.eat(r);){if(o)o=!1;else if(this.expect(12),this.match(r)){i&&this.addTrailingCommaExtraToNode(i),this.next();break}s.push(this.parseExprListItem(t,n))}return s}parseExprListItem(r,t,n){let i;if(this.match(12))r||this.raise(S.UnexpectedToken,this.state.curPosition(),{unexpected:","}),i=null;else if(this.match(21)){let s=this.state.startLoc;i=this.parseParenItem(this.parseSpread(t),s)}else if(this.match(17)){this.expectPlugin("partialApplication"),n||this.raise(S.UnexpectedArgumentPlaceholder,this.state.startLoc);let s=this.startNode();this.next(),i=this.finishNode(s,"ArgumentPlaceholder")}else i=this.parseMaybeAssignAllowIn(t,this.parseParenItem);return i}parseIdentifier(r){let t=this.startNode(),n=this.parseIdentifierName(r);return this.createIdentifier(t,n)}createIdentifier(r,t){return r.name=t,r.loc.identifierName=t,this.finishNode(r,"Identifier")}parseIdentifierName(r){let t,{startLoc:n,type:i}=this.state;hr(i)?t=this.state.value:this.unexpected();let s=mv(i);return r?s&&this.replaceToken(132):this.checkReservedWord(t,n,s,!1),this.next(),t}checkReservedWord(r,t,n,i){if(r.length>10||!kv(r))return;if(n&&Nv(r)){this.raise(S.UnexpectedKeyword,t,{keyword:r});return}if((this.state.strict?i?Vy:jy:Uy)(r,this.inModule)){this.raise(S.UnexpectedReservedWord,t,{reservedWord:r});return}else if(r==="yield"){if(this.prodParam.hasYield){this.raise(S.YieldBindingIdentifier,t);return}}else if(r==="await"){if(this.prodParam.hasAwait){this.raise(S.AwaitBindingIdentifier,t);return}if(this.scope.inStaticBlock){this.raise(S.AwaitBindingIdentifierInStaticBlock,t);return}this.expressionScope.recordAsyncArrowParametersError(t)}else if(r==="arguments"&&this.scope.inClassAndNotInNonArrowFunction){this.raise(S.ArgumentsInClass,t);return}}recordAwaitIfAllowed(){let r=this.prodParam.hasAwait||this.optionFlags&1&&!this.scope.inFunction;return r&&!this.scope.inFunction&&(this.state.hasTopLevelAwait=!0),r}parseAwait(r){let t=this.startNodeAt(r);return this.expressionScope.recordParameterInitializerError(S.AwaitExpressionFormalParameter,t),this.eat(55)&&this.raise(S.ObsoleteAwaitStar,t),!this.scope.inFunction&&!(this.optionFlags&1)&&(this.isAmbiguousAwait()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(t.argument=this.parseMaybeUnary(null,!0)),this.finishNode(t,"AwaitExpression")}isAmbiguousAwait(){if(this.hasPrecedingLineBreak())return!0;let{type:r}=this.state;return r===53||r===10||r===0||Ia(r)||r===102&&!this.state.containsEsc||r===138||r===56||this.hasPlugin("v8intrinsic")&&r===54}parseYield(){let r=this.startNode();this.expressionScope.recordParameterInitializerError(S.YieldInParameter,r),this.next();let t=!1,n=null;if(!this.hasPrecedingLineBreak())switch(t=this.eat(55),this.state.type){case 13:case 140:case 8:case 11:case 3:case 9:case 14:case 12:if(!t)break;default:n=this.parseMaybeAssign()}return r.delegate=t,r.argument=n,this.finishNode(r,"YieldExpression")}parseImportCall(r){if(this.next(),r.source=this.parseMaybeAssignAllowIn(),r.options=null,this.eat(12)&&!this.match(11)&&(r.options=this.parseMaybeAssignAllowIn(),this.eat(12)&&!this.match(11))){do this.parseMaybeAssignAllowIn();while(this.eat(12)&&!this.match(11));this.raise(S.ImportCallArity,r)}return this.expect(11),this.finishNode(r,"ImportExpression")}checkPipelineAtInfixOperator(r,t){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&r.type==="SequenceExpression"&&this.raise(S.PipelineHeadSequenceExpression,t)}parseSmartPipelineBodyInStyle(r,t){if(this.isSimpleReference(r)){let n=this.startNodeAt(t);return n.callee=r,this.finishNode(n,"PipelineBareFunction")}else{let n=this.startNodeAt(t);return this.checkSmartPipeTopicBodyEarlyErrors(t),n.expression=r,this.finishNode(n,"PipelineTopicExpression")}}isSimpleReference(r){switch(r.type){case"MemberExpression":return!r.computed&&this.isSimpleReference(r.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(r){if(this.match(19))throw this.raise(S.PipelineBodyNoArrow,this.state.startLoc);this.topicReferenceWasUsedInCurrentContext()||this.raise(S.PipelineTopicUnused,r)}withTopicBindingContext(r){let t=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return r()}finally{this.state.topicContext=t}}withSmartMixTopicForbiddingContext(r){if(this.hasPlugin(["pipelineOperator",{proposal:"smart"}])){let t=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return r()}finally{this.state.topicContext=t}}else return r()}withSoloAwaitPermittingContext(r){let t=this.state.soloAwait;this.state.soloAwait=!0;try{return r()}finally{this.state.soloAwait=t}}allowInAnd(r){let t=this.prodParam.currentFlags();if(8&~t){this.prodParam.enter(t|8);try{return r()}finally{this.prodParam.exit()}}return r()}disallowInAnd(r){let t=this.prodParam.currentFlags();if(8&t){this.prodParam.enter(t&-9);try{return r()}finally{this.prodParam.exit()}}return r()}registerTopicReference(){this.state.topicContext.maxTopicIndex=0}topicReferenceIsAllowedInCurrentContext(){return this.state.topicContext.maxNumOfResolvableTopics>=1}topicReferenceWasUsedInCurrentContext(){return this.state.topicContext.maxTopicIndex!=null&&this.state.topicContext.maxTopicIndex>=0}parseFSharpPipelineBody(r){let t=this.state.startLoc;this.state.potentialArrowAt=this.state.start;let n=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;let i=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),t,r);return this.state.inFSharpPipelineDirectBody=n,i}parseModuleExpression(){this.expectPlugin("moduleBlocks");let r=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);let t=this.startNodeAt(this.state.endLoc);this.next();let n=this.initializeScopes(!0);this.enterInitialScopes();try{r.body=this.parseProgram(t,8,"module")}finally{n()}return this.finishNode(r,"ModuleExpression")}parsePropertyNamePrefixOperator(r){}},yc={kind:1},pP={kind:2},dP=/[\uD800-\uDFFF]/u,bc=/in(?:stanceof)?/y;function fP(e,r,t){for(let n=0;n<e.length;n++){let i=e[n],{type:s}=i;if(typeof s=="number"){{if(s===139){let{loc:o,start:a,value:l,end:u}=i,c=a+1,p=_t(o.start,1);e.splice(n,1,new Rr({type:sn(27),value:"#",start:a,end:c,startLoc:o.start,endLoc:p}),new Rr({type:sn(132),value:l,start:c,end:u,startLoc:p,endLoc:o.end})),n++;continue}if(Ia(s)){let{loc:o,start:a,value:l,end:u}=i,c=a+1,p=_t(o.start,1),d;r.charCodeAt(a-t)===96?d=new Rr({type:sn(22),value:"`",start:a,end:c,startLoc:o.start,endLoc:p}):d=new Rr({type:sn(8),value:"}",start:a,end:c,startLoc:o.start,endLoc:p});let f,m,h,g;s===24?(m=u-1,h=_t(o.end,-1),f=l===null?null:l.slice(1,-1),g=new Rr({type:sn(22),value:"`",start:m,end:u,startLoc:h,endLoc:o.end})):(m=u-2,h=_t(o.end,-2),f=l===null?null:l.slice(1,-2),g=new Rr({type:sn(23),value:"${",start:m,end:u,startLoc:h,endLoc:o.end})),e.splice(n,1,d,new Rr({type:sn(20),value:f,start:c,end:m,startLoc:p,endLoc:h}),g),n+=2;continue}}i.type=sn(s)}}return e}var Mc=class extends Bc{parseTopLevel(r,t){return r.program=this.parseProgram(t),r.comments=this.comments,this.optionFlags&128&&(r.tokens=fP(this.tokens,this.input,this.startIndex)),this.finishNode(r,"File")}parseProgram(r,t=140,n=this.options.sourceType){if(r.sourceType=n,r.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(r,!0,!0,t),this.inModule){if(!(this.optionFlags&32)&&this.scope.undefinedExports.size>0)for(let[s,o]of Array.from(this.scope.undefinedExports))this.raise(S.ModuleExportUndefined,o,{localName:s});this.addExtra(r,"topLevelAwait",this.state.hasTopLevelAwait)}let i;return t===140?i=this.finishNode(r,"Program"):i=this.finishNodeAt(r,"Program",_t(this.state.startLoc,-1)),i}stmtToDirective(r){let t=r;t.type="Directive",t.value=t.expression,delete t.expression;let n=t.value,i=n.value,s=this.input.slice(this.offsetToSourcePos(n.start),this.offsetToSourcePos(n.end)),o=n.value=s.slice(1,-1);return this.addExtra(n,"raw",s),this.addExtra(n,"rawValue",o),this.addExtra(n,"expressionValue",i),n.type="DirectiveLiteral",t}parseInterpreterDirective(){if(!this.match(28))return null;let r=this.startNode();return r.value=this.state.value,this.next(),this.finishNode(r,"InterpreterDirective")}isLet(){return this.isContextual(100)?this.hasFollowingBindingAtom():!1}chStartsBindingIdentifier(r,t){if(an(r)){if(bc.lastIndex=t,bc.test(this.input)){let n=this.codePointAtPos(bc.lastIndex);if(!Ui(n)&&n!==92)return!1}return!0}else return r===92}chStartsBindingPattern(r){return r===91||r===123}hasFollowingBindingAtom(){let r=this.nextTokenStart(),t=this.codePointAtPos(r);return this.chStartsBindingPattern(t)||this.chStartsBindingIdentifier(t,r)}hasInLineFollowingBindingIdentifierOrBrace(){let r=this.nextTokenInLineStart(),t=this.codePointAtPos(r);return t===123||this.chStartsBindingIdentifier(t,r)}startsUsingForOf(){let{type:r,containsEsc:t}=this.lookahead();if(r===102&&!t)return!1;if(we(r)&&!this.hasFollowingLineBreak())return this.expectPlugin("explicitResourceManagement"),!0}startsAwaitUsing(){let r=this.nextTokenInLineStart();if(this.isUnparsedContextual(r,"using")){r=this.nextTokenInLineStartSince(r+5);let t=this.codePointAtPos(r);if(this.chStartsBindingIdentifier(t,r))return this.expectPlugin("explicitResourceManagement"),!0}return!1}parseModuleItem(){return this.parseStatementLike(15)}parseStatementListItem(){return this.parseStatementLike(6|(!this.options.annexB||this.state.strict?0:8))}parseStatementOrSloppyAnnexBFunctionDeclaration(r=!1){let t=0;return this.options.annexB&&!this.state.strict&&(t|=4,r&&(t|=8)),this.parseStatementLike(t)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(r){let t=null;return this.match(26)&&(t=this.parseDecorators(!0)),this.parseStatementContent(r,t)}parseStatementContent(r,t){let n=this.state.type,i=this.startNode(),s=!!(r&2),o=!!(r&4),a=r&1;switch(n){case 60:return this.parseBreakContinueStatement(i,!0);case 63:return this.parseBreakContinueStatement(i,!1);case 64:return this.parseDebuggerStatement(i);case 90:return this.parseDoWhileStatement(i);case 91:return this.parseForStatement(i);case 68:if(this.lookaheadCharCode()===46)break;return o||this.raise(this.state.strict?S.StrictFunction:this.options.annexB?S.SloppyFunctionAnnexB:S.SloppyFunction,this.state.startLoc),this.parseFunctionStatement(i,!1,!s&&o);case 80:return s||this.unexpected(),this.parseClass(this.maybeTakeDecorators(t,i),!0);case 69:return this.parseIfStatement(i);case 70:return this.parseReturnStatement(i);case 71:return this.parseSwitchStatement(i);case 72:return this.parseThrowStatement(i);case 73:return this.parseTryStatement(i);case 96:if(!this.state.containsEsc&&this.startsAwaitUsing())return this.recordAwaitIfAllowed()?s||this.raise(S.UnexpectedLexicalDeclaration,i):this.raise(S.AwaitUsingNotInAsyncContext,i),this.next(),this.parseVarStatement(i,"await using");break;case 107:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifierOrBrace())break;return this.expectPlugin("explicitResourceManagement"),!this.scope.inModule&&this.scope.inTopLevel?this.raise(S.UnexpectedUsingDeclaration,this.state.startLoc):s||this.raise(S.UnexpectedLexicalDeclaration,this.state.startLoc),this.parseVarStatement(i,"using");case 100:{if(this.state.containsEsc)break;let c=this.nextTokenStart(),p=this.codePointAtPos(c);if(p!==91&&(!s&&this.hasFollowingLineBreak()||!this.chStartsBindingIdentifier(p,c)&&p!==123))break}case 75:s||this.raise(S.UnexpectedLexicalDeclaration,this.state.startLoc);case 74:{let c=this.state.value;return this.parseVarStatement(i,c)}case 92:return this.parseWhileStatement(i);case 76:return this.parseWithStatement(i);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(i);case 83:{let c=this.lookaheadCharCode();if(c===40||c===46)break}case 82:{!(this.optionFlags&8)&&!a&&this.raise(S.UnexpectedImportExport,this.state.startLoc),this.next();let c;return n===83?(c=this.parseImport(i),c.type==="ImportDeclaration"&&(!c.importKind||c.importKind==="value")&&(this.sawUnambiguousESM=!0)):(c=this.parseExport(i,t),(c.type==="ExportNamedDeclaration"&&(!c.exportKind||c.exportKind==="value")||c.type==="ExportAllDeclaration"&&(!c.exportKind||c.exportKind==="value")||c.type==="ExportDefaultDeclaration")&&(this.sawUnambiguousESM=!0)),this.assertModuleNodeAllowed(c),c}default:if(this.isAsyncFunction())return s||this.raise(S.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement(i,!0,!s&&o)}let l=this.state.value,u=this.parseExpression();return we(n)&&u.type==="Identifier"&&this.eat(14)?this.parseLabeledStatement(i,l,u,r):this.parseExpressionStatement(i,u,t)}assertModuleNodeAllowed(r){!(this.optionFlags&8)&&!this.inModule&&this.raise(S.ImportOutsideModule,r)}decoratorsEnabledBeforeExport(){return this.hasPlugin("decorators-legacy")?!0:this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")!==!1}maybeTakeDecorators(r,t,n){if(r){var i;(i=t.decorators)!=null&&i.length?(typeof this.getPluginOption("decorators","decoratorsBeforeExport")!="boolean"&&this.raise(S.DecoratorsBeforeAfterExport,t.decorators[0]),t.decorators.unshift(...r)):t.decorators=r,this.resetStartLocationFromNode(t,r[0]),n&&this.resetStartLocationFromNode(n,t)}return t}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(r){let t=[];do t.push(this.parseDecorator());while(this.match(26));if(this.match(82))r||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(S.DecoratorExportClass,this.state.startLoc);else if(!this.canHaveLeadingDecorator())throw this.raise(S.UnexpectedLeadingDecorator,this.state.startLoc);return t}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);let r=this.startNode();if(this.next(),this.hasPlugin("decorators")){let t=this.state.startLoc,n;if(this.match(10)){let i=this.state.startLoc;this.next(),n=this.parseExpression(),this.expect(11),n=this.wrapParenthesis(i,n);let s=this.state.startLoc;r.expression=this.parseMaybeDecoratorArguments(n,i),this.getPluginOption("decorators","allowCallParenthesized")===!1&&r.expression!==n&&this.raise(S.DecoratorArgumentsOutsideParentheses,s)}else{for(n=this.parseIdentifier(!1);this.eat(16);){let i=this.startNodeAt(t);i.object=n,this.match(139)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),i.property=this.parsePrivateName()):i.property=this.parseIdentifier(!0),i.computed=!1,n=this.finishNode(i,"MemberExpression")}r.expression=this.parseMaybeDecoratorArguments(n,t)}}else r.expression=this.parseExprSubscripts();return this.finishNode(r,"Decorator")}parseMaybeDecoratorArguments(r,t){if(this.eat(10)){let n=this.startNodeAt(t);return n.callee=r,n.arguments=this.parseCallExpressionArguments(11),this.toReferencedList(n.arguments),this.finishNode(n,"CallExpression")}return r}parseBreakContinueStatement(r,t){return this.next(),this.isLineTerminator()?r.label=null:(r.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(r,t),this.finishNode(r,t?"BreakStatement":"ContinueStatement")}verifyBreakContinue(r,t){let n;for(n=0;n<this.state.labels.length;++n){let i=this.state.labels[n];if((r.label==null||i.name===r.label.name)&&(i.kind!=null&&(t||i.kind===1)||r.label&&t))break}if(n===this.state.labels.length){let i=t?"BreakStatement":"ContinueStatement";this.raise(S.IllegalBreakContinue,r,{type:i})}}parseDebuggerStatement(r){return this.next(),this.semicolon(),this.finishNode(r,"DebuggerStatement")}parseHeaderExpression(){this.expect(10);let r=this.parseExpression();return this.expect(11),r}parseDoWhileStatement(r){return this.next(),this.state.labels.push(yc),r.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.expect(92),r.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(r,"DoWhileStatement")}parseForStatement(r){this.next(),this.state.labels.push(yc);let t=null;if(this.isContextual(96)&&this.recordAwaitIfAllowed()&&(t=this.state.startLoc,this.next()),this.scope.enter(0),this.expect(10),this.match(13))return t!==null&&this.unexpected(t),this.parseFor(r,null);let n=this.isContextual(100);{let l=this.isContextual(96)&&this.startsAwaitUsing(),u=l||this.isContextual(107)&&this.startsUsingForOf(),c=n&&this.hasFollowingBindingAtom()||u;if(this.match(74)||this.match(75)||c){let p=this.startNode(),d;l?(d="await using",this.recordAwaitIfAllowed()||this.raise(S.AwaitUsingNotInAsyncContext,this.state.startLoc),this.next()):d=this.state.value,this.next(),this.parseVar(p,!0,d);let f=this.finishNode(p,"VariableDeclaration"),m=this.match(58);return m&&u&&this.raise(S.ForInUsing,f),(m||this.isContextual(102))&&f.declarations.length===1?this.parseForIn(r,f,t):(t!==null&&this.unexpected(t),this.parseFor(r,f))}}let i=this.isContextual(95),s=new Ki,o=this.parseExpression(!0,s),a=this.isContextual(102);if(a&&(n&&this.raise(S.ForOfLet,o),t===null&&i&&o.type==="Identifier"&&this.raise(S.ForOfAsync,o)),a||this.match(58)){this.checkDestructuringPrivate(s),this.toAssignable(o,!0);let l=a?"ForOfStatement":"ForInStatement";return this.checkLVal(o,{type:l}),this.parseForIn(r,o,t)}else this.checkExpressionErrors(s,!0);return t!==null&&this.unexpected(t),this.parseFor(r,o)}parseFunctionStatement(r,t,n){return this.next(),this.parseFunction(r,1|(n?2:0)|(t?8:0))}parseIfStatement(r){return this.next(),r.test=this.parseHeaderExpression(),r.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),r.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(r,"IfStatement")}parseReturnStatement(r){return!this.prodParam.hasReturn&&!(this.optionFlags&2)&&this.raise(S.IllegalReturn,this.state.startLoc),this.next(),this.isLineTerminator()?r.argument=null:(r.argument=this.parseExpression(),this.semicolon()),this.finishNode(r,"ReturnStatement")}parseSwitchStatement(r){this.next(),r.discriminant=this.parseHeaderExpression();let t=r.cases=[];this.expect(5),this.state.labels.push(pP),this.scope.enter(0);let n;for(let i;!this.match(8);)if(this.match(61)||this.match(65)){let s=this.match(61);n&&this.finishNode(n,"SwitchCase"),t.push(n=this.startNode()),n.consequent=[],this.next(),s?n.test=this.parseExpression():(i&&this.raise(S.MultipleDefaultsInSwitch,this.state.lastTokStartLoc),i=!0,n.test=null),this.expect(14)}else n?n.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),n&&this.finishNode(n,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(r,"SwitchStatement")}parseThrowStatement(r){return this.next(),this.hasPrecedingLineBreak()&&this.raise(S.NewlineAfterThrow,this.state.lastTokEndLoc),r.argument=this.parseExpression(),this.semicolon(),this.finishNode(r,"ThrowStatement")}parseCatchClauseParam(){let r=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&r.type==="Identifier"?8:0),this.checkLVal(r,{type:"CatchClause"},9),r}parseTryStatement(r){if(this.next(),r.block=this.parseBlock(),r.handler=null,this.match(62)){let t=this.startNode();this.next(),this.match(10)?(this.expect(10),t.param=this.parseCatchClauseParam(),this.expect(11)):(t.param=null,this.scope.enter(0)),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseBlock(!1,!1)),this.scope.exit(),r.handler=this.finishNode(t,"CatchClause")}return r.finalizer=this.eat(67)?this.parseBlock():null,!r.handler&&!r.finalizer&&this.raise(S.NoCatchOrFinally,r),this.finishNode(r,"TryStatement")}parseVarStatement(r,t,n=!1){return this.next(),this.parseVar(r,!1,t,n),this.semicolon(),this.finishNode(r,"VariableDeclaration")}parseWhileStatement(r){return this.next(),r.test=this.parseHeaderExpression(),this.state.labels.push(yc),r.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.finishNode(r,"WhileStatement")}parseWithStatement(r){return this.state.strict&&this.raise(S.StrictWith,this.state.startLoc),this.next(),r.object=this.parseHeaderExpression(),r.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.finishNode(r,"WithStatement")}parseEmptyStatement(r){return this.next(),this.finishNode(r,"EmptyStatement")}parseLabeledStatement(r,t,n,i){for(let o of this.state.labels)o.name===t&&this.raise(S.LabelRedeclaration,n,{labelName:t});let s=yv(this.state.type)?1:this.match(71)?2:null;for(let o=this.state.labels.length-1;o>=0;o--){let a=this.state.labels[o];if(a.statementStart===r.start)a.statementStart=this.sourceToOffsetPos(this.state.start),a.kind=s;else break}return this.state.labels.push({name:t,kind:s,statementStart:this.sourceToOffsetPos(this.state.start)}),r.body=i&8?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),r.label=n,this.finishNode(r,"LabeledStatement")}parseExpressionStatement(r,t,n){return r.expression=t,this.semicolon(),this.finishNode(r,"ExpressionStatement")}parseBlock(r=!1,t=!0,n){let i=this.startNode();return r&&this.state.strictErrors.clear(),this.expect(5),t&&this.scope.enter(0),this.parseBlockBody(i,r,!1,8,n),t&&this.scope.exit(),this.finishNode(i,"BlockStatement")}isValidDirective(r){return r.type==="ExpressionStatement"&&r.expression.type==="StringLiteral"&&!r.expression.extra.parenthesized}parseBlockBody(r,t,n,i,s){let o=r.body=[],a=r.directives=[];this.parseBlockOrModuleBlockBody(o,t?a:void 0,n,i,s)}parseBlockOrModuleBlockBody(r,t,n,i,s){let o=this.state.strict,a=!1,l=!1;for(;!this.match(i);){let u=n?this.parseModuleItem():this.parseStatementListItem();if(t&&!l){if(this.isValidDirective(u)){let c=this.stmtToDirective(u);t.push(c),!a&&c.value.value==="use strict"&&(a=!0,this.setStrict(!0));continue}l=!0,this.state.strictErrors.clear()}r.push(u)}s?.call(this,a),o||this.setStrict(!1),this.next()}parseFor(r,t){return r.init=t,this.semicolon(!1),r.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),r.update=this.match(11)?null:this.parseExpression(),this.expect(11),r.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(r,"ForStatement")}parseForIn(r,t,n){let i=this.match(58);return this.next(),i?n!==null&&this.unexpected(n):r.await=n!==null,t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!i||!this.options.annexB||this.state.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier")&&this.raise(S.ForInOfLoopInitializer,t,{type:i?"ForInStatement":"ForOfStatement"}),t.type==="AssignmentPattern"&&this.raise(S.InvalidLhs,t,{ancestor:{type:"ForStatement"}}),r.left=t,r.right=i?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),r.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(r,i?"ForInStatement":"ForOfStatement")}parseVar(r,t,n,i=!1){let s=r.declarations=[];for(r.kind=n;;){let o=this.startNode();if(this.parseVarId(o,n),o.init=this.eat(29)?t?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,o.init===null&&!i&&(o.id.type!=="Identifier"&&!(t&&(this.match(58)||this.isContextual(102)))?this.raise(S.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"destructuring"}):(n==="const"||n==="using"||n==="await using")&&!(this.match(58)||this.isContextual(102))&&this.raise(S.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:n})),s.push(this.finishNode(o,"VariableDeclarator")),!this.eat(12))break}return r}parseVarId(r,t){let n=this.parseBindingAtom();(t==="using"||t==="await using")&&(n.type==="ArrayPattern"||n.type==="ObjectPattern")&&this.raise(S.UsingDeclarationHasBindingPattern,n.loc.start),this.checkLVal(n,{type:"VariableDeclarator"},t==="var"?5:8201),r.id=n}parseAsyncFunctionExpression(r){return this.parseFunction(r,8)}parseFunction(r,t=0){let n=t&2,i=!!(t&1),s=i&&!(t&4),o=!!(t&8);this.initFunction(r,o),this.match(55)&&(n&&this.raise(S.GeneratorInSingleStatementContext,this.state.startLoc),this.next(),r.generator=!0),i&&(r.id=this.parseFunctionId(s));let a=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(2),this.prodParam.enter(va(o,r.generator)),i||(r.id=this.parseFunctionId()),this.parseFunctionParams(r,!1),this.withSmartMixTopicForbiddingContext(()=>{this.parseFunctionBodyAndFinish(r,i?"FunctionDeclaration":"FunctionExpression")}),this.prodParam.exit(),this.scope.exit(),i&&!n&&this.registerFunctionStatementId(r),this.state.maybeInArrowParameters=a,r}parseFunctionId(r){return r||we(this.state.type)?this.parseIdentifier():null}parseFunctionParams(r,t){this.expect(10),this.expressionScope.enter(jv()),r.params=this.parseBindingList(11,41,2|(t?4:0)),this.expressionScope.exit()}registerFunctionStatementId(r){r.id&&this.scope.declareName(r.id.name,!this.options.annexB||this.state.strict||r.generator||r.async?this.scope.treatFunctionsAsVar?5:8201:17,r.id.loc.start)}parseClass(r,t,n){this.next();let i=this.state.strict;return this.state.strict=!0,this.parseClassId(r,t,n),this.parseClassSuper(r),r.body=this.parseClassBody(!!r.superClass,i),this.finishNode(r,t?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}nameIsConstructor(r){return r.type==="Identifier"&&r.name==="constructor"||r.type==="StringLiteral"&&r.value==="constructor"}isNonstaticConstructor(r){return!r.computed&&!r.static&&this.nameIsConstructor(r.key)}parseClassBody(r,t){this.classScope.enter();let n={hadConstructor:!1,hadSuperClass:r},i=[],s=this.startNode();if(s.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext(()=>{for(;!this.match(8);){if(this.eat(13)){if(i.length>0)throw this.raise(S.DecoratorSemicolon,this.state.lastTokEndLoc);continue}if(this.match(26)){i.push(this.parseDecorator());continue}let o=this.startNode();i.length&&(o.decorators=i,this.resetStartLocationFromNode(o,i[0]),i=[]),this.parseClassMember(s,o,n),o.kind==="constructor"&&o.decorators&&o.decorators.length>0&&this.raise(S.DecoratorConstructor,o)}}),this.state.strict=t,this.next(),i.length)throw this.raise(S.TrailingDecorator,this.state.startLoc);return this.classScope.exit(),this.finishNode(s,"ClassBody")}parseClassMemberFromModifier(r,t){let n=this.parseIdentifier(!0);if(this.isClassMethod()){let i=t;return i.kind="method",i.computed=!1,i.key=n,i.static=!1,this.pushClassMethod(r,i,!1,!1,!1,!1),!0}else if(this.isClassProperty()){let i=t;return i.computed=!1,i.key=n,i.static=!1,r.body.push(this.parseClassProperty(i)),!0}return this.resetPreviousNodeTrailingComments(n),!1}parseClassMember(r,t,n){let i=this.isContextual(106);if(i){if(this.parseClassMemberFromModifier(r,t))return;if(this.eat(5)){this.parseClassStaticBlock(r,t);return}}this.parseClassMemberWithIsStatic(r,t,n,i)}parseClassMemberWithIsStatic(r,t,n,i){let s=t,o=t,a=t,l=t,u=t,c=s,p=s;if(t.static=i,this.parsePropertyNamePrefixOperator(t),this.eat(55)){c.kind="method";let y=this.match(139);if(this.parseClassElementName(c),y){this.pushClassPrivateMethod(r,o,!0,!1);return}this.isNonstaticConstructor(s)&&this.raise(S.ConstructorIsGenerator,s.key),this.pushClassMethod(r,s,!0,!1,!1,!1);return}let d=!this.state.containsEsc&&we(this.state.type),f=this.parseClassElementName(t),m=d?f.name:null,h=this.isPrivateName(f),g=this.state.startLoc;if(this.parsePostMemberNameModifiers(p),this.isClassMethod()){if(c.kind="method",h){this.pushClassPrivateMethod(r,o,!1,!1);return}let y=this.isNonstaticConstructor(s),b=!1;y&&(s.kind="constructor",n.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(S.DuplicateConstructor,f),y&&this.hasPlugin("typescript")&&t.override&&this.raise(S.OverrideOnConstructor,f),n.hadConstructor=!0,b=n.hadSuperClass),this.pushClassMethod(r,s,!1,!1,y,b)}else if(this.isClassProperty())h?this.pushClassPrivateProperty(r,l):this.pushClassProperty(r,a);else if(m==="async"&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(f);let y=this.eat(55);p.optional&&this.unexpected(g),c.kind="method";let b=this.match(139);this.parseClassElementName(c),this.parsePostMemberNameModifiers(p),b?this.pushClassPrivateMethod(r,o,y,!0):(this.isNonstaticConstructor(s)&&this.raise(S.ConstructorIsAsync,s.key),this.pushClassMethod(r,s,y,!0,!1,!1))}else if((m==="get"||m==="set")&&!(this.match(55)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(f),c.kind=m;let y=this.match(139);this.parseClassElementName(s),y?this.pushClassPrivateMethod(r,o,!1,!1):(this.isNonstaticConstructor(s)&&this.raise(S.ConstructorIsAccessor,s.key),this.pushClassMethod(r,s,!1,!1,!1,!1)),this.checkGetterSetterParams(s)}else if(m==="accessor"&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(f);let y=this.match(139);this.parseClassElementName(a),this.pushClassAccessorProperty(r,u,y)}else this.isLineTerminator()?h?this.pushClassPrivateProperty(r,l):this.pushClassProperty(r,a):this.unexpected()}parseClassElementName(r){let{type:t,value:n}=this.state;if((t===132||t===134)&&r.static&&n==="prototype"&&this.raise(S.StaticPrototype,this.state.startLoc),t===139){n==="constructor"&&this.raise(S.ConstructorClassPrivateField,this.state.startLoc);let i=this.parsePrivateName();return r.key=i,i}return this.parsePropertyName(r),r.key}parseClassStaticBlock(r,t){var n;this.scope.enter(208);let i=this.state.labels;this.state.labels=[],this.prodParam.enter(0);let s=t.body=[];this.parseBlockOrModuleBlockBody(s,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=i,r.body.push(this.finishNode(t,"StaticBlock")),(n=t.decorators)!=null&&n.length&&this.raise(S.DecoratorStaticBlock,t)}pushClassProperty(r,t){!t.computed&&this.nameIsConstructor(t.key)&&this.raise(S.ConstructorClassField,t.key),r.body.push(this.parseClassProperty(t))}pushClassPrivateProperty(r,t){let n=this.parseClassPrivateProperty(t);r.body.push(n),this.classScope.declarePrivateName(this.getPrivateNameSV(n.key),0,n.key.loc.start)}pushClassAccessorProperty(r,t,n){!n&&!t.computed&&this.nameIsConstructor(t.key)&&this.raise(S.ConstructorClassField,t.key);let i=this.parseClassAccessorProperty(t);r.body.push(i),n&&this.classScope.declarePrivateName(this.getPrivateNameSV(i.key),0,i.key.loc.start)}pushClassMethod(r,t,n,i,s,o){r.body.push(this.parseMethod(t,n,i,s,o,"ClassMethod",!0))}pushClassPrivateMethod(r,t,n,i){let s=this.parseMethod(t,n,i,!1,!1,"ClassPrivateMethod",!0);r.body.push(s);let o=s.kind==="get"?s.static?6:2:s.kind==="set"?s.static?5:1:0;this.declareClassPrivateMethodInScope(s,o)}declareClassPrivateMethodInScope(r,t){this.classScope.declarePrivateName(this.getPrivateNameSV(r.key),t,r.key.loc.start)}parsePostMemberNameModifiers(r){}parseClassPrivateProperty(r){return this.parseInitializer(r),this.semicolon(),this.finishNode(r,"ClassPrivateProperty")}parseClassProperty(r){return this.parseInitializer(r),this.semicolon(),this.finishNode(r,"ClassProperty")}parseClassAccessorProperty(r){return this.parseInitializer(r),this.semicolon(),this.finishNode(r,"ClassAccessorProperty")}parseInitializer(r){this.scope.enter(80),this.expressionScope.enter(Gy()),this.prodParam.enter(0),r.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(r,t,n,i=8331){if(we(this.state.type))r.id=this.parseIdentifier(),t&&this.declareNameFromIdentifier(r.id,i);else if(n||!t)r.id=null;else throw this.raise(S.MissingClassName,this.state.startLoc)}parseClassSuper(r){r.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(r,t){let n=this.parseMaybeImportPhase(r,!0),i=this.maybeParseExportDefaultSpecifier(r,n),s=!i||this.eat(12),o=s&&this.eatExportStar(r),a=o&&this.maybeParseExportNamespaceSpecifier(r),l=s&&(!a||this.eat(12)),u=i||o;if(o&&!a){if(i&&this.unexpected(),t)throw this.raise(S.UnsupportedDecoratorExport,r);return this.parseExportFrom(r,!0),this.finishNode(r,"ExportAllDeclaration")}let c=this.maybeParseExportNamedSpecifiers(r);i&&s&&!o&&!c&&this.unexpected(null,5),a&&l&&this.unexpected(null,98);let p;if(u||c){if(p=!1,t)throw this.raise(S.UnsupportedDecoratorExport,r);this.parseExportFrom(r,u)}else p=this.maybeParseExportDeclaration(r);if(u||c||p){var d;let f=r;if(this.checkExport(f,!0,!1,!!f.source),((d=f.declaration)==null?void 0:d.type)==="ClassDeclaration")this.maybeTakeDecorators(t,f.declaration,f);else if(t)throw this.raise(S.UnsupportedDecoratorExport,r);return this.finishNode(f,"ExportNamedDeclaration")}if(this.eat(65)){let f=r,m=this.parseExportDefaultExpression();if(f.declaration=m,m.type==="ClassDeclaration")this.maybeTakeDecorators(t,m,f);else if(t)throw this.raise(S.UnsupportedDecoratorExport,r);return this.checkExport(f,!0,!0),this.finishNode(f,"ExportDefaultDeclaration")}this.unexpected(null,5)}eatExportStar(r){return this.eat(55)}maybeParseExportDefaultSpecifier(r,t){if(t||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",t?.loc.start);let n=t||this.parseIdentifier(!0),i=this.startNodeAtNode(n);return i.exported=n,r.specifiers=[this.finishNode(i,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(r){if(this.isContextual(93)){var t,n;(n=(t=r).specifiers)!=null||(t.specifiers=[]);let i=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),i.exported=this.parseModuleExportName(),r.specifiers.push(this.finishNode(i,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(r){if(this.match(5)){let t=r;t.specifiers||(t.specifiers=[]);let n=t.exportKind==="type";return t.specifiers.push(...this.parseExportSpecifiers(n)),t.source=null,t.declaration=null,this.hasPlugin("importAssertions")&&(t.assertions=[]),!0}return!1}maybeParseExportDeclaration(r){return this.shouldParseExportDeclaration()?(r.specifiers=[],r.source=null,this.hasPlugin("importAssertions")&&(r.assertions=[]),r.declaration=this.parseExportDeclaration(r),!0):!1}isAsyncFunction(){if(!this.isContextual(95))return!1;let r=this.nextTokenInLineStart();return this.isUnparsedContextual(r,"function")}parseExportDefaultExpression(){let r=this.startNode();if(this.match(68))return this.next(),this.parseFunction(r,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(r,13);if(this.match(80))return this.parseClass(r,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(S.DecoratorBeforeExport,this.state.startLoc),this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0);if(this.match(75)||this.match(74)||this.isLet())throw this.raise(S.UnsupportedDefaultExport,this.state.startLoc);let t=this.parseMaybeAssignAllowIn();return this.semicolon(),t}parseExportDeclaration(r){return this.match(80)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){let{type:r}=this.state;if(we(r)){if(r===95&&!this.state.containsEsc||r===100)return!1;if((r===130||r===129)&&!this.state.containsEsc){let{type:i}=this.lookahead();if(we(i)&&i!==98||i===5)return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;let t=this.nextTokenStart(),n=this.isUnparsedContextual(t,"from");if(this.input.charCodeAt(t)===44||we(this.state.type)&&n)return!0;if(this.match(65)&&n){let i=this.input.charCodeAt(this.nextTokenStartSince(t+4));return i===34||i===39}return!1}parseExportFrom(r,t){this.eatContextual(98)?(r.source=this.parseImportSource(),this.checkExport(r),this.maybeParseImportAttributes(r),this.checkJSONModuleImport(r)):t&&this.unexpected(),this.semicolon()}shouldParseExportDeclaration(){let{type:r}=this.state;return r===26&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))?(this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(S.DecoratorBeforeExport,this.state.startLoc),!0):this.isContextual(107)?(this.raise(S.UsingDeclarationExport,this.state.startLoc),!0):this.isContextual(96)&&this.startsAwaitUsing()?(this.raise(S.UsingDeclarationExport,this.state.startLoc),!0):r===74||r===75||r===68||r===80||this.isLet()||this.isAsyncFunction()}checkExport(r,t,n,i){if(t){var s;if(n){if(this.checkDuplicateExports(r,"default"),this.hasPlugin("exportDefaultFrom")){var o;let a=r.declaration;a.type==="Identifier"&&a.name==="from"&&a.end-a.start===4&&!((o=a.extra)!=null&&o.parenthesized)&&this.raise(S.ExportDefaultFromAsIdentifier,a)}}else if((s=r.specifiers)!=null&&s.length)for(let a of r.specifiers){let{exported:l}=a,u=l.type==="Identifier"?l.name:l.value;if(this.checkDuplicateExports(a,u),!i&&a.local){let{local:c}=a;c.type!=="Identifier"?this.raise(S.ExportBindingIsString,a,{localName:c.value,exportName:u}):(this.checkReservedWord(c.name,c.loc.start,!0,!1),this.scope.checkLocalExport(c))}}else if(r.declaration){let a=r.declaration;if(a.type==="FunctionDeclaration"||a.type==="ClassDeclaration"){let{id:l}=a;if(!l)throw new Error("Assertion failure");this.checkDuplicateExports(r,l.name)}else if(a.type==="VariableDeclaration")for(let l of a.declarations)this.checkDeclaration(l.id)}}}checkDeclaration(r){if(r.type==="Identifier")this.checkDuplicateExports(r,r.name);else if(r.type==="ObjectPattern")for(let t of r.properties)this.checkDeclaration(t);else if(r.type==="ArrayPattern")for(let t of r.elements)t&&this.checkDeclaration(t);else r.type==="ObjectProperty"?this.checkDeclaration(r.value):r.type==="RestElement"?this.checkDeclaration(r.argument):r.type==="AssignmentPattern"&&this.checkDeclaration(r.left)}checkDuplicateExports(r,t){this.exportedIdentifiers.has(t)&&(t==="default"?this.raise(S.DuplicateDefaultExport,r):this.raise(S.DuplicateExport,r,{exportName:t})),this.exportedIdentifiers.add(t)}parseExportSpecifiers(r){let t=[],n=!0;for(this.expect(5);!this.eat(8);){if(n)n=!1;else if(this.expect(12),this.eat(8))break;let i=this.isContextual(130),s=this.match(134),o=this.startNode();o.local=this.parseModuleExportName(),t.push(this.parseExportSpecifier(o,s,r,i))}return t}parseExportSpecifier(r,t,n,i){return this.eatContextual(93)?r.exported=this.parseModuleExportName():t?r.exported=qv(r.local):r.exported||(r.exported=un(r.local)),this.finishNode(r,"ExportSpecifier")}parseModuleExportName(){if(this.match(134)){let r=this.parseStringLiteral(this.state.value),t=dP.exec(r.value);return t&&this.raise(S.ModuleExportNameHasLoneSurrogate,r,{surrogateCharCode:t[0].charCodeAt(0)}),r}return this.parseIdentifier(!0)}isJSONModuleImport(r){return r.assertions!=null?r.assertions.some(({key:t,value:n})=>n.value==="json"&&(t.type==="Identifier"?t.name==="type":t.value==="type")):!1}checkImportReflection(r){let{specifiers:t}=r,n=t.length===1?t[0].type:null;if(r.phase==="source")n!=="ImportDefaultSpecifier"&&this.raise(S.SourcePhaseImportRequiresDefault,t[0].loc.start);else if(r.phase==="defer")n!=="ImportNamespaceSpecifier"&&this.raise(S.DeferImportRequiresNamespace,t[0].loc.start);else if(r.module){var i;n!=="ImportDefaultSpecifier"&&this.raise(S.ImportReflectionNotBinding,t[0].loc.start),((i=r.assertions)==null?void 0:i.length)>0&&this.raise(S.ImportReflectionHasAssertion,t[0].loc.start)}}checkJSONModuleImport(r){if(this.isJSONModuleImport(r)&&r.type!=="ExportAllDeclaration"){let{specifiers:t}=r;if(t!=null){let n=t.find(i=>{let s;if(i.type==="ExportSpecifier"?s=i.local:i.type==="ImportSpecifier"&&(s=i.imported),s!==void 0)return s.type==="Identifier"?s.name!=="default":s.value!=="default"});n!==void 0&&this.raise(S.ImportJSONBindingNotDefault,n.loc.start)}}}isPotentialImportPhase(r){return r?!1:this.isContextual(105)||this.isContextual(97)||this.isContextual(127)}applyImportPhase(r,t,n,i){t||(n==="module"?(this.expectPlugin("importReflection",i),r.module=!0):this.hasPlugin("importReflection")&&(r.module=!1),n==="source"?(this.expectPlugin("sourcePhaseImports",i),r.phase="source"):n==="defer"?(this.expectPlugin("deferredImportEvaluation",i),r.phase="defer"):this.hasPlugin("sourcePhaseImports")&&(r.phase=null))}parseMaybeImportPhase(r,t){if(!this.isPotentialImportPhase(t))return this.applyImportPhase(r,t,null),null;let n=this.parseIdentifier(!0),{type:i}=this.state;return(hr(i)?i!==98||this.lookaheadCharCode()===102:i!==12)?(this.resetPreviousIdentifierLeadingComments(n),this.applyImportPhase(r,t,n.name,n.loc.start),null):(this.applyImportPhase(r,t,null),n)}isPrecedingIdImportPhase(r){let{type:t}=this.state;return we(t)?t!==98||this.lookaheadCharCode()===102:t!==12}parseImport(r){return this.match(134)?this.parseImportSourceAndAttributes(r):this.parseImportSpecifiersAndAfter(r,this.parseMaybeImportPhase(r,!1))}parseImportSpecifiersAndAfter(r,t){r.specifiers=[];let i=!this.maybeParseDefaultImportSpecifier(r,t)||this.eat(12),s=i&&this.maybeParseStarImportSpecifier(r);return i&&!s&&this.parseNamedImportSpecifiers(r),this.expectContextual(98),this.parseImportSourceAndAttributes(r)}parseImportSourceAndAttributes(r){var t;return(t=r.specifiers)!=null||(r.specifiers=[]),r.source=this.parseImportSource(),this.maybeParseImportAttributes(r),this.checkImportReflection(r),this.checkJSONModuleImport(r),this.semicolon(),this.finishNode(r,"ImportDeclaration")}parseImportSource(){return this.match(134)||this.unexpected(),this.parseExprAtom()}parseImportSpecifierLocal(r,t,n){t.local=this.parseIdentifier(),r.specifiers.push(this.finishImportSpecifier(t,n))}finishImportSpecifier(r,t,n=8201){return this.checkLVal(r.local,{type:t},n),this.finishNode(r,t)}parseImportAttributes(){this.expect(5);let r=[],t=new Set;do{if(this.match(8))break;let n=this.startNode(),i=this.state.value;if(t.has(i)&&this.raise(S.ModuleAttributesWithDuplicateKeys,this.state.startLoc,{key:i}),t.add(i),this.match(134)?n.key=this.parseStringLiteral(i):n.key=this.parseIdentifier(!0),this.expect(14),!this.match(134))throw this.raise(S.ModuleAttributeInvalidValue,this.state.startLoc);n.value=this.parseStringLiteral(this.state.value),r.push(this.finishNode(n,"ImportAttribute"))}while(this.eat(12));return this.expect(8),r}parseModuleAttributes(){let r=[],t=new Set;do{let n=this.startNode();if(n.key=this.parseIdentifier(!0),n.key.name!=="type"&&this.raise(S.ModuleAttributeDifferentFromType,n.key),t.has(n.key.name)&&this.raise(S.ModuleAttributesWithDuplicateKeys,n.key,{key:n.key.name}),t.add(n.key.name),this.expect(14),!this.match(134))throw this.raise(S.ModuleAttributeInvalidValue,this.state.startLoc);n.value=this.parseStringLiteral(this.state.value),r.push(this.finishNode(n,"ImportAttribute"))}while(this.eat(12));return r}maybeParseImportAttributes(r){let t;var n=!1;if(this.match(76)){if(this.hasPrecedingLineBreak()&&this.lookaheadCharCode()===40)return;this.next(),this.hasPlugin("moduleAttributes")?t=this.parseModuleAttributes():t=this.parseImportAttributes(),n=!0}else this.isContextual(94)&&!this.hasPrecedingLineBreak()?(!this.hasPlugin("deprecatedImportAssert")&&!this.hasPlugin("importAssertions")&&this.raise(S.ImportAttributesUseAssert,this.state.startLoc),this.hasPlugin("importAssertions")||this.addExtra(r,"deprecatedAssertSyntax",!0),this.next(),t=this.parseImportAttributes()):t=[];!n&&this.hasPlugin("importAssertions")?r.assertions=t:r.attributes=t}maybeParseDefaultImportSpecifier(r,t){if(t){let n=this.startNodeAtNode(t);return n.local=t,r.specifiers.push(this.finishImportSpecifier(n,"ImportDefaultSpecifier")),!0}else if(hr(this.state.type))return this.parseImportSpecifierLocal(r,this.startNode(),"ImportDefaultSpecifier"),!0;return!1}maybeParseStarImportSpecifier(r){if(this.match(55)){let t=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(r,t,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(r){let t=!0;for(this.expect(5);!this.eat(8);){if(t)t=!1;else{if(this.eat(14))throw this.raise(S.DestructureNamedImport,this.state.startLoc);if(this.expect(12),this.eat(8))break}let n=this.startNode(),i=this.match(134),s=this.isContextual(130);n.imported=this.parseModuleExportName();let o=this.parseImportSpecifier(n,i,r.importKind==="type"||r.importKind==="typeof",s,void 0);r.specifiers.push(o)}}parseImportSpecifier(r,t,n,i,s){if(this.eatContextual(93))r.local=this.parseIdentifier();else{let{imported:o}=r;if(t)throw this.raise(S.ImportBindingIsString,r,{importName:o.value});this.checkReservedWord(o.name,r.loc.start,!0,!0),r.local||(r.local=un(o))}return this.finishImportSpecifier(r,"ImportSpecifier",s)}isThisParam(r){return r.type==="Identifier"&&r.name==="this"}},Fa=class extends Mc{constructor(r,t,n){r=uv(r),super(r,t),this.options=r,this.initializeScopes(),this.plugins=n,this.filename=r.sourceFilename,this.startIndex=r.startIndex;let i=0;r.allowAwaitOutsideFunction&&(i|=1),r.allowReturnOutsideFunction&&(i|=2),r.allowImportExportEverywhere&&(i|=8),r.allowSuperOutsideMethod&&(i|=16),r.allowUndeclaredExports&&(i|=32),r.allowNewTargetOutsideFunction&&(i|=4),r.ranges&&(i|=64),r.tokens&&(i|=128),r.createImportExpressions&&(i|=256),r.createParenthesizedExpressions&&(i|=512),r.errorRecovery&&(i|=1024),r.attachComment&&(i|=2048),r.annexB&&(i|=4096),this.optionFlags=i}getScopeHandler(){return Gs}parse(){this.enterInitialScopes();let r=this.startNode(),t=this.startNode();return this.nextToken(),r.errors=null,this.parseTopLevel(r,t),r.errors=this.state.errors,r.comments.length=this.state.commentsLen,r}};function mP(e,r){var t;if(((t=r)==null?void 0:t.sourceType)==="unambiguous"){r=Object.assign({},r);try{r.sourceType="module";let n=zs(r,e),i=n.parse();if(n.sawUnambiguousESM)return i;if(n.ambiguousScriptDifferentAst)try{return r.sourceType="script",zs(r,e).parse()}catch{}else i.program.sourceType="script";return i}catch(n){try{return r.sourceType="script",zs(r,e).parse()}catch{}throw n}}else return zs(r,e).parse()}function hP(e,r){let t=zs(r,e);return t.options.strictMode&&(t.state.strict=!0),t.getExpression()}function gP(e){let r={};for(let t of Object.keys(e))r[t]=sn(e[t]);return r}var yP=gP(fv);function zs(e,r){let t=Fa,n=new Map;if(e!=null&&e.plugins){for(let i of e.plugins){let s,o;typeof i=="string"?s=i:[s,o]=i,n.has(s)||n.set(s,o||{})}uP(n),t=bP(n)}return new t(e,r,n)}var Ly=new Map;function bP(e){let r=[];for(let i of cP)e.has(i)&&r.push(i);let t=r.join("|"),n=Ly.get(t);if(!n){n=Fa;for(let i of r)n=Xy[i](n);Ly.set(t,n)}return n}Js.parse=mP;Js.parseExpression=hP;Js.tokTypes=yP});var ax=se((m4,ox)=>{ox.exports=sx;sx.sync=$I;var nx=require("fs");function MI(e,r){var t=r.pathExt!==void 0?r.pathExt:process.env.PATHEXT;if(!t||(t=t.split(";"),t.indexOf("")!==-1))return!0;for(var n=0;n<t.length;n++){var i=t[n].toLowerCase();if(i&&e.substr(-i.length).toLowerCase()===i)return!0}return!1}function ix(e,r,t){return!e.isSymbolicLink()&&!e.isFile()?!1:MI(r,t)}function sx(e,r,t){nx.stat(e,function(n,i){t(n,n?!1:ix(i,e,r))})}function $I(e,r){return ix(nx.statSync(e),e,r)}});var dx=se((h4,px)=>{px.exports=ux;ux.sync=UI;var lx=require("fs");function ux(e,r,t){lx.stat(e,function(n,i){t(n,n?!1:cx(i,r))})}function UI(e,r){return cx(lx.statSync(e),r)}function cx(e,r){return e.isFile()&&jI(e,r)}function jI(e,r){var t=e.mode,n=e.uid,i=e.gid,s=r.uid!==void 0?r.uid:process.getuid&&process.getuid(),o=r.gid!==void 0?r.gid:process.getgid&&process.getgid(),a=parseInt("100",8),l=parseInt("010",8),u=parseInt("001",8),c=a|l,p=t&u||t&l&&i===o||t&a&&n===s||t&c&&s===0;return p}});var mx=se((y4,fx)=>{var g4=require("fs"),pl;process.platform==="win32"||global.TESTING_WINDOWS?pl=ax():pl=dx();fx.exports=Bp;Bp.sync=KI;function Bp(e,r,t){if(typeof r=="function"&&(t=r,r={}),!t){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(n,i){Bp(e,r||{},function(s,o){s?i(s):n(o)})})}pl(e,r||{},function(n,i){n&&(n.code==="EACCES"||r&&r.ignoreErrors)&&(n=null,i=!1),t(n,i)})}function KI(e,r){try{return pl.sync(e,r||{})}catch(t){if(r&&r.ignoreErrors||t.code==="EACCES")return!1;throw t}}});var Ex=se((b4,xx)=>{var ss=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",hx=require("path"),VI=ss?";":":",gx=mx(),yx=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),bx=(e,r)=>{let t=r.colon||VI,n=e.match(/\//)||ss&&e.match(/\\/)?[""]:[...ss?[process.cwd()]:[],...(r.path||process.env.PATH||"").split(t)],i=ss?r.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=ss?i.split(t):[""];return ss&&e.indexOf(".")!==-1&&s[0]!==""&&s.unshift(""),{pathEnv:n,pathExt:s,pathExtExe:i}},Dx=(e,r,t)=>{typeof r=="function"&&(t=r,r={}),r||(r={});let{pathEnv:n,pathExt:i,pathExtExe:s}=bx(e,r),o=[],a=u=>new Promise((c,p)=>{if(u===n.length)return r.all&&o.length?c(o):p(yx(e));let d=n[u],f=/^".*"$/.test(d)?d.slice(1,-1):d,m=hx.join(f,e),h=!f&&/^\.[\\\/]/.test(e)?e.slice(0,2)+m:m;c(l(h,u,0))}),l=(u,c,p)=>new Promise((d,f)=>{if(p===i.length)return d(a(c+1));let m=i[p];gx(u+m,{pathExt:s},(h,g)=>{if(!h&&g)if(r.all)o.push(u+m);else return d(u+m);return d(l(u,c,p+1))})});return t?a(0).then(u=>t(null,u),t):a(0)},zI=(e,r)=>{r=r||{};let{pathEnv:t,pathExt:n,pathExtExe:i}=bx(e,r),s=[];for(let o=0;o<t.length;o++){let a=t[o],l=/^".*"$/.test(a)?a.slice(1,-1):a,u=hx.join(l,e),c=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+u:u;for(let p=0;p<n.length;p++){let d=c+n[p];try{if(gx.sync(d,{pathExt:i}))if(r.all)s.push(d);else return d}catch{}}}if(r.all&&s.length)return s;if(r.nothrow)return null;throw yx(e)};xx.exports=Dx;Dx.sync=zI});var Sx=se((D4,Mp)=>{"use strict";var Cx=(e={})=>{let r=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(r).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"};Mp.exports=Cx;Mp.exports.default=Cx});var vx=se((x4,Ax)=>{"use strict";var Tx=require("path"),qI=Ex(),WI=Sx();function wx(e,r){let t=e.options.env||process.env,n=process.cwd(),i=e.options.cwd!=null,s=i&&process.chdir!==void 0&&!process.chdir.disabled;if(s)try{process.chdir(e.options.cwd)}catch{}let o;try{o=qI.sync(e.command,{path:t[WI({env:t})],pathExt:r?Tx.delimiter:void 0})}catch{}finally{s&&process.chdir(n)}return o&&(o=Tx.resolve(i?e.options.cwd:"",o)),o}function GI(e){return wx(e)||wx(e,!0)}Ax.exports=GI});var Px=se((E4,Up)=>{"use strict";var $p=/([()\][%!^"`<>&|;, *?])/g;function HI(e){return e=e.replace($p,"^$1"),e}function JI(e,r){return e=`${e}`,e=e.replace(/(\\*)"/g,'$1$1\\"'),e=e.replace(/(\\*)$/,"$1$1"),e=`"${e}"`,e=e.replace($p,"^$1"),r&&(e=e.replace($p,"^$1")),e}Up.exports.command=HI;Up.exports.argument=JI});var Nx=se((C4,Ix)=>{"use strict";Ix.exports=/^#!(.*)/});var _x=se((S4,Fx)=>{"use strict";var YI=Nx();Fx.exports=(e="")=>{let r=e.match(YI);if(!r)return null;let[t,n]=r[0].replace(/#! ?/,"").split(" "),i=t.split("/").pop();return i==="env"?n:n?`${i} ${n}`:i}});var Ox=se((T4,kx)=>{"use strict";var jp=require("fs"),XI=_x();function QI(e){let t=Buffer.alloc(150),n;try{n=jp.openSync(e,"r"),jp.readSync(n,t,0,150,0),jp.closeSync(n)}catch{}return XI(t.toString())}kx.exports=QI});var Mx=se((w4,Bx)=>{"use strict";var ZI=require("path"),Rx=vx(),Lx=Px(),eN=Ox(),tN=process.platform==="win32",rN=/\.(?:com|exe)$/i,nN=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function iN(e){e.file=Rx(e);let r=e.file&&eN(e.file);return r?(e.args.unshift(e.file),e.command=r,Rx(e)):e.file}function sN(e){if(!tN)return e;let r=iN(e),t=!rN.test(r);if(e.options.forceShell||t){let n=nN.test(r);e.command=ZI.normalize(e.command),e.command=Lx.command(e.command),e.args=e.args.map(s=>Lx.argument(s,n));let i=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${i}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}function oN(e,r,t){r&&!Array.isArray(r)&&(t=r,r=null),r=r?r.slice(0):[],t=Object.assign({},t);let n={command:e,args:r,options:t,file:void 0,original:{command:e,args:r}};return t.shell?n:sN(n)}Bx.exports=oN});var jx=se((A4,Ux)=>{"use strict";var Kp=process.platform==="win32";function Vp(e,r){return Object.assign(new Error(`${r} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${r} ${e.command}`,path:e.command,spawnargs:e.args})}function aN(e,r){if(!Kp)return;let t=e.emit;e.emit=function(n,i){if(n==="exit"){let s=$x(i,r,"spawn");if(s)return t.call(e,"error",s)}return t.apply(e,arguments)}}function $x(e,r){return Kp&&e===1&&!r.file?Vp(r.original,"spawn"):null}function lN(e,r){return Kp&&e===1&&!r.file?Vp(r.original,"spawnSync"):null}Ux.exports={hookChildProcess:aN,verifyENOENT:$x,verifyENOENTSync:lN,notFoundError:Vp}});var zx=se((v4,os)=>{"use strict";var Kx=require("child_process"),zp=Mx(),qp=jx();function Vx(e,r,t){let n=zp(e,r,t),i=Kx.spawn(n.command,n.args,n.options);return qp.hookChildProcess(i,n),i}function uN(e,r,t){let n=zp(e,r,t),i=Kx.spawnSync(n.command,n.args,n.options);return i.error=i.error||qp.verifyENOENTSync(i.status,n),i}os.exports=Vx;os.exports.spawn=Vx;os.exports.sync=uN;os.exports._parse=zp;os.exports._enoent=qp});var vE=se(ls=>{"use strict";ls.__esModule=!0;ls.distance=ls.closest=void 0;var hn=new Uint32Array(65536),AF=function(e,r){for(var t=e.length,n=r.length,i=1<<t-1,s=-1,o=0,a=t,l=t;l--;)hn[e.charCodeAt(l)]|=1<<l;for(l=0;l<n;l++){var u=hn[r.charCodeAt(l)],c=u|o;u|=(u&s)+s^s,o|=~(u|s),s&=u,o&i&&a++,s&i&&a--,o=o<<1|1,s=s<<1|~(c|o),o&=c}for(l=t;l--;)hn[e.charCodeAt(l)]=0;return a},vF=function(e,r){for(var t=r.length,n=e.length,i=[],s=[],o=Math.ceil(t/32),a=Math.ceil(n/32),l=0;l<o;l++)s[l]=-1,i[l]=0;for(var u=0;u<a-1;u++){for(var c=0,p=-1,d=u*32,f=Math.min(32,n)+d,m=d;m<f;m++)hn[e.charCodeAt(m)]|=1<<m;for(var l=0;l<t;l++){var h=hn[r.charCodeAt(l)],g=s[l/32|0]>>>l&1,y=i[l/32|0]>>>l&1,b=h|c,C=((h|y)&p)+p^p|h|y,x=c|~(C|p),D=p&C;x>>>31^g&&(s[l/32|0]^=1<<l),D>>>31^y&&(i[l/32|0]^=1<<l),x=x<<1|g,D=D<<1|y,p=D|~(b|x),c=x&b}for(var m=d;m<f;m++)hn[e.charCodeAt(m)]=0}for(var E=0,w=-1,O=u*32,B=Math.min(32,n-O)+O,m=O;m<B;m++)hn[e.charCodeAt(m)]|=1<<m;for(var N=n,l=0;l<t;l++){var h=hn[r.charCodeAt(l)],g=s[l/32|0]>>>l&1,y=i[l/32|0]>>>l&1,b=h|E,C=((h|y)&w)+w^w|h|y,x=E|~(C|w),D=w&C;N+=x>>>n-1&1,N-=D>>>n-1&1,x>>>31^g&&(s[l/32|0]^=1<<l),D>>>31^y&&(i[l/32|0]^=1<<l),x=x<<1|g,D=D<<1|y,w=D|~(b|x),E=x&b}for(var m=O;m<B;m++)hn[e.charCodeAt(m)]=0;return N},AE=function(e,r){if(e.length<r.length){var t=r;r=e,e=t}return r.length===0?e.length:e.length<=32?AF(e,r):vF(e,r)};ls.distance=AE;var PF=function(e,r){for(var t=1/0,n=0,i=0;i<r.length;i++){var s=AE(e,r[i]);s<t&&(t=s,n=i)}return r[n]};ls.closest=PF});var UF={};module.exports=QE(UF);var OE=require("../core/index.cjs"),RE=require("../node/index.cjs"),LE=require("../server/index.cjs"),BE=V(Ed(),1);var wl=require("fs/promises");var pi=V(require("prettier"),1);async function ar(e,r,t){try{if(t){let i=await pi.default.getFileInfo(t);if(i.ignored||i.inferredParser==null)return e}let n=await pi.default.resolveConfigFile(process.cwd());if(n){let i=await pi.default.resolveConfig(n);return await pi.default.format(e,{...i,filepath:t,parser:r})}else return await pi.default.format(e,{filepath:t,parser:r})}catch(n){return console.warn("Error formatting code",n),e}}var xE=require("http");var Fl="preview-url";var di="framework",To="platform",wo="node",Cd="/~builder-connect",Mn="/~builder-connected",_l="/~builder-dev-tools",kl="/~builder-dev-tools.js",$n="/~builder-dev-tools-close",Sd="/mappings";var EE=require("os"),Tl=require("path"),Kr=require("fs");var St=V(Ao(),1),mi=require("node:process"),yn=V(require("node:readline"),1),$l=V(require("node:readline"),1),Ld=require("node:tty"),No=V(Ze(),1);function o0({onlyFirst:e=!1}={}){let r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(r,e?void 0:"g")}var a0=o0();function Bd(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(a0,"")}function Md(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $d={exports:{}};(function(e){var r={};e.exports=r,r.eastAsianWidth=function(n){var i=n.charCodeAt(0),s=n.length==2?n.charCodeAt(1):0,o=i;return 55296<=i&&i<=56319&&56320<=s&&s<=57343&&(i&=1023,s&=1023,o=i<<10|s,o+=65536),o==12288||65281<=o&&o<=65376||65504<=o&&o<=65510?"F":o==8361||65377<=o&&o<=65470||65474<=o&&o<=65479||65482<=o&&o<=65487||65490<=o&&o<=65495||65498<=o&&o<=65500||65512<=o&&o<=65518?"H":4352<=o&&o<=4447||4515<=o&&o<=4519||4602<=o&&o<=4607||9001<=o&&o<=9002||11904<=o&&o<=11929||11931<=o&&o<=12019||12032<=o&&o<=12245||12272<=o&&o<=12283||12289<=o&&o<=12350||12353<=o&&o<=12438||12441<=o&&o<=12543||12549<=o&&o<=12589||12593<=o&&o<=12686||12688<=o&&o<=12730||12736<=o&&o<=12771||12784<=o&&o<=12830||12832<=o&&o<=12871||12880<=o&&o<=13054||13056<=o&&o<=19903||19968<=o&&o<=42124||42128<=o&&o<=42182||43360<=o&&o<=43388||44032<=o&&o<=55203||55216<=o&&o<=55238||55243<=o&&o<=55291||63744<=o&&o<=64255||65040<=o&&o<=65049||65072<=o&&o<=65106||65108<=o&&o<=65126||65128<=o&&o<=65131||110592<=o&&o<=110593||127488<=o&&o<=127490||127504<=o&&o<=127546||127552<=o&&o<=127560||127568<=o&&o<=127569||131072<=o&&o<=194367||177984<=o&&o<=196605||196608<=o&&o<=262141?"W":32<=o&&o<=126||162<=o&&o<=163||165<=o&&o<=166||o==172||o==175||10214<=o&&o<=10221||10629<=o&&o<=10630?"Na":o==161||o==164||167<=o&&o<=168||o==170||173<=o&&o<=174||176<=o&&o<=180||182<=o&&o<=186||188<=o&&o<=191||o==198||o==208||215<=o&&o<=216||222<=o&&o<=225||o==230||232<=o&&o<=234||236<=o&&o<=237||o==240||242<=o&&o<=243||247<=o&&o<=250||o==252||o==254||o==257||o==273||o==275||o==283||294<=o&&o<=295||o==299||305<=o&&o<=307||o==312||319<=o&&o<=322||o==324||328<=o&&o<=331||o==333||338<=o&&o<=339||358<=o&&o<=359||o==363||o==462||o==464||o==466||o==468||o==470||o==472||o==474||o==476||o==593||o==609||o==708||o==711||713<=o&&o<=715||o==717||o==720||728<=o&&o<=731||o==733||o==735||768<=o&&o<=879||913<=o&&o<=929||931<=o&&o<=937||945<=o&&o<=961||963<=o&&o<=969||o==1025||1040<=o&&o<=1103||o==1105||o==8208||8211<=o&&o<=8214||8216<=o&&o<=8217||8220<=o&&o<=8221||8224<=o&&o<=8226||8228<=o&&o<=8231||o==8240||8242<=o&&o<=8243||o==8245||o==8251||o==8254||o==8308||o==8319||8321<=o&&o<=8324||o==8364||o==8451||o==8453||o==8457||o==8467||o==8470||8481<=o&&o<=8482||o==8486||o==8491||8531<=o&&o<=8532||8539<=o&&o<=8542||8544<=o&&o<=8555||8560<=o&&o<=8569||o==8585||8592<=o&&o<=8601||8632<=o&&o<=8633||o==8658||o==8660||o==8679||o==8704||8706<=o&&o<=8707||8711<=o&&o<=8712||o==8715||o==8719||o==8721||o==8725||o==8730||8733<=o&&o<=8736||o==8739||o==8741||8743<=o&&o<=8748||o==8750||8756<=o&&o<=8759||8764<=o&&o<=8765||o==8776||o==8780||o==8786||8800<=o&&o<=8801||8804<=o&&o<=8807||8810<=o&&o<=8811||8814<=o&&o<=8815||8834<=o&&o<=8835||8838<=o&&o<=8839||o==8853||o==8857||o==8869||o==8895||o==8978||9312<=o&&o<=9449||9451<=o&&o<=9547||9552<=o&&o<=9587||9600<=o&&o<=9615||9618<=o&&o<=9621||9632<=o&&o<=9633||9635<=o&&o<=9641||9650<=o&&o<=9651||9654<=o&&o<=9655||9660<=o&&o<=9661||9664<=o&&o<=9665||9670<=o&&o<=9672||o==9675||9678<=o&&o<=9681||9698<=o&&o<=9701||o==9711||9733<=o&&o<=9734||o==9737||9742<=o&&o<=9743||9748<=o&&o<=9749||o==9756||o==9758||o==9792||o==9794||9824<=o&&o<=9825||9827<=o&&o<=9829||9831<=o&&o<=9834||9836<=o&&o<=9837||o==9839||9886<=o&&o<=9887||9918<=o&&o<=9919||9924<=o&&o<=9933||9935<=o&&o<=9953||o==9955||9960<=o&&o<=9983||o==10045||o==10071||10102<=o&&o<=10111||11093<=o&&o<=11097||12872<=o&&o<=12879||57344<=o&&o<=63743||65024<=o&&o<=65039||o==65533||127232<=o&&o<=127242||127248<=o&&o<=127277||127280<=o&&o<=127337||127344<=o&&o<=127386||917760<=o&&o<=917999||983040<=o&&o<=1048573||1048576<=o&&o<=1114109?"A":"N"},r.characterLength=function(n){var i=this.eastAsianWidth(n);return i=="F"||i=="W"||i=="A"?2:1};function t(n){return n.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}r.length=function(n){for(var i=t(n),s=0,o=0;o<i.length;o++)s=s+this.characterLength(i[o]);return s},r.slice=function(n,i,s){textLen=r.length(n),i=i||0,s=s||1,i<0&&(i=textLen+i),s<0&&(s=textLen+s);for(var o="",a=0,l=t(n),u=0;u<l.length;u++){var c=l[u],p=r.length(c);if(a>=i-(p==2?1:0))if(a+p<=s)o+=c;else break;a+=p}return o}})($d);var l0=$d.exports,u0=Md(l0),c0=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g},p0=Md(c0);function ms(e,r={}){if(typeof e!="string"||e.length===0||(r={ambiguousIsNarrow:!0,...r},e=Bd(e),e.length===0))return 0;e=e.replace(p0()," ");let t=r.ambiguousIsNarrow?1:2,n=0;for(let i of e){let s=i.codePointAt(0);if(!(s<=31||s>=127&&s<=159||s>=768&&s<=879))switch(u0.eastAsianWidth(i)){case"F":case"W":n+=2;break;case"A":n+=t;break;default:n+=1}}return n}var Bl=10,vd=(e=0)=>r=>`\x1B[${r+e}m`,Pd=(e=0)=>r=>`\x1B[${38+e};5;${r}m`,Id=(e=0)=>(r,t,n)=>`\x1B[${38+e};2;${r};${t};${n}m`,ze={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(ze.modifier);var d0=Object.keys(ze.color),f0=Object.keys(ze.bgColor);[...d0,...f0];function m0(){let e=new Map;for(let[r,t]of Object.entries(ze)){for(let[n,i]of Object.entries(t))ze[n]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},t[n]=ze[n],e.set(i[0],i[1]);Object.defineProperty(ze,r,{value:t,enumerable:!1})}return Object.defineProperty(ze,"codes",{value:e,enumerable:!1}),ze.color.close="\x1B[39m",ze.bgColor.close="\x1B[49m",ze.color.ansi=vd(),ze.color.ansi256=Pd(),ze.color.ansi16m=Id(),ze.bgColor.ansi=vd(Bl),ze.bgColor.ansi256=Pd(Bl),ze.bgColor.ansi16m=Id(Bl),Object.defineProperties(ze,{rgbToAnsi256:{value:(r,t,n)=>r===t&&t===n?r<8?16:r>248?231:Math.round((r-8)/247*24)+232:16+36*Math.round(r/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value:r=>{let t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(r.toString(16));if(!t)return[0,0,0];let[n]=t;n.length===3&&(n=[...n].map(s=>s+s).join(""));let i=Number.parseInt(n,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:r=>ze.rgbToAnsi256(...ze.hexToRgb(r)),enumerable:!1},ansi256ToAnsi:{value:r=>{if(r<8)return 30+r;if(r<16)return 90+(r-8);let t,n,i;if(r>=232)t=((r-232)*10+8)/255,n=t,i=t;else{r-=16;let a=r%36;t=Math.floor(r/36)/5,n=Math.floor(a/6)/5,i=a%6/5}let s=Math.max(t,n,i)*2;if(s===0)return 30;let o=30+(Math.round(i)<<2|Math.round(n)<<1|Math.round(t));return s===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(r,t,n)=>ze.ansi256ToAnsi(ze.rgbToAnsi256(r,t,n)),enumerable:!1},hexToAnsi:{value:r=>ze.ansi256ToAnsi(ze.hexToAnsi256(r)),enumerable:!1}}),ze}var h0=m0(),ko=new Set(["\x1B","\x9B"]),g0=39,Ul="\x07",Ud="[",y0="]",jd="m",jl=`${y0}8;;`,Nd=e=>`${ko.values().next().value}${Ud}${e}${jd}`,Fd=e=>`${ko.values().next().value}${jl}${e}${Ul}`,b0=e=>e.split(" ").map(r=>ms(r)),Ml=(e,r,t)=>{let n=[...r],i=!1,s=!1,o=ms(Bd(e[e.length-1]));for(let[a,l]of n.entries()){let u=ms(l);if(o+u<=t?e[e.length-1]+=l:(e.push(l),o=0),ko.has(l)&&(i=!0,s=n.slice(a+1).join("").startsWith(jl)),i){s?l===Ul&&(i=!1,s=!1):l===jd&&(i=!1);continue}o+=u,o===t&&a<n.length-1&&(e.push(""),o=0)}!o&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop())},D0=e=>{let r=e.split(" "),t=r.length;for(;t>0&&!(ms(r[t-1])>0);)t--;return t===r.length?e:r.slice(0,t).join(" ")+r.slice(t).join("")},x0=(e,r,t={})=>{if(t.trim!==!1&&e.trim()==="")return"";let n="",i,s,o=b0(e),a=[""];for(let[u,c]of e.split(" ").entries()){t.trim!==!1&&(a[a.length-1]=a[a.length-1].trimStart());let p=ms(a[a.length-1]);if(u!==0&&(p>=r&&(t.wordWrap===!1||t.trim===!1)&&(a.push(""),p=0),(p>0||t.trim===!1)&&(a[a.length-1]+=" ",p++)),t.hard&&o[u]>r){let d=r-p,f=1+Math.floor((o[u]-d-1)/r);Math.floor((o[u]-1)/r)<f&&a.push(""),Ml(a,c,r);continue}if(p+o[u]>r&&p>0&&o[u]>0){if(t.wordWrap===!1&&p<r){Ml(a,c,r);continue}a.push("")}if(p+o[u]>r&&t.wordWrap===!1){Ml(a,c,r);continue}a[a.length-1]+=c}t.trim!==!1&&(a=a.map(u=>D0(u)));let l=[...a.join(`
|
|
22
|
+
`),cooked:s===null?null:s.slice(1,u)},a.tail=l,this.next();let p=this.finishNode(a,"TemplateElement");return this.resetEndLocation(p,_t(this.state.lastTokEndLoc,u)),p}parseTemplate(r){let t=this.startNode(),n=this.parseTemplateElement(r),i=[n],s=[];for(;!n.tail;)s.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),i.push(n=this.parseTemplateElement(r));return t.expressions=s,t.quasis=i,this.finishNode(t,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(r,t,n,i){n&&this.expectPlugin("recordAndTuple");let s=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let o=Object.create(null),a=!0,l=this.startNode();for(l.properties=[],this.next();!this.match(r);){if(a)a=!1;else if(this.expect(12),this.match(r)){this.addTrailingCommaExtraToNode(l);break}let c;t?c=this.parseBindingProperty():(c=this.parsePropertyDefinition(i),this.checkProto(c,n,o,i)),n&&!this.isObjectProperty(c)&&c.type!=="SpreadElement"&&this.raise(S.InvalidRecordProperty,c),c.shorthand&&this.addExtra(c,"shorthand",!0),l.properties.push(c)}this.next(),this.state.inFSharpPipelineDirectBody=s;let u="ObjectExpression";return t?u="ObjectPattern":n&&(u="RecordExpression"),this.finishNode(l,u)}addTrailingCommaExtraToNode(r){this.addExtra(r,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(r,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(r){return!r.computed&&r.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(r){let t=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(S.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)t.push(this.parseDecorator());let n=this.startNode(),i=!1,s=!1,o;if(this.match(21))return t.length&&this.unexpected(),this.parseSpread();t.length&&(n.decorators=t,t=[]),n.method=!1,r&&(o=this.state.startLoc);let a=this.eat(55);this.parsePropertyNamePrefixOperator(n);let l=this.state.containsEsc;if(this.parsePropertyName(n,r),!a&&!l&&this.maybeAsyncOrAccessorProp(n)){let{key:u}=n,c=u.name;c==="async"&&!this.hasPrecedingLineBreak()&&(i=!0,this.resetPreviousNodeTrailingComments(u),a=this.eat(55),this.parsePropertyName(n)),(c==="get"||c==="set")&&(s=!0,this.resetPreviousNodeTrailingComments(u),n.kind=c,this.match(55)&&(a=!0,this.raise(S.AccessorIsGenerator,this.state.curPosition(),{kind:c}),this.next()),this.parsePropertyName(n))}return this.parseObjPropValue(n,o,a,i,!1,s,r)}getGetterSetterExpectedParamCount(r){return r.kind==="get"?0:1}getObjectOrClassMethodParams(r){return r.params}checkGetterSetterParams(r){var t;let n=this.getGetterSetterExpectedParamCount(r),i=this.getObjectOrClassMethodParams(r);i.length!==n&&this.raise(r.kind==="get"?S.BadGetterArity:S.BadSetterArity,r),r.kind==="set"&&((t=i[i.length-1])==null?void 0:t.type)==="RestElement"&&this.raise(S.BadSetterRestParameter,r)}parseObjectMethod(r,t,n,i,s){if(s){let o=this.parseMethod(r,t,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(o),o}if(n||t||this.match(10))return i&&this.unexpected(),r.kind="method",r.method=!0,this.parseMethod(r,t,n,!1,!1,"ObjectMethod")}parseObjectProperty(r,t,n,i){if(r.shorthand=!1,this.eat(14))return r.value=n?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowIn(i),this.finishNode(r,"ObjectProperty");if(!r.computed&&r.key.type==="Identifier"){if(this.checkReservedWord(r.key.name,r.key.loc.start,!0,!1),n)r.value=this.parseMaybeDefault(t,un(r.key));else if(this.match(29)){let s=this.state.startLoc;i!=null?i.shorthandAssignLoc===null&&(i.shorthandAssignLoc=s):this.raise(S.InvalidCoverInitializedName,s),r.value=this.parseMaybeDefault(t,un(r.key))}else r.value=un(r.key);return r.shorthand=!0,this.finishNode(r,"ObjectProperty")}}parseObjPropValue(r,t,n,i,s,o,a){let l=this.parseObjectMethod(r,n,i,s,o)||this.parseObjectProperty(r,t,s,a);return l||this.unexpected(),l}parsePropertyName(r,t){if(this.eat(0))r.computed=!0,r.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{let{type:n,value:i}=this.state,s;if(hr(n))s=this.parseIdentifier(!0);else switch(n){case 135:s=this.parseNumericLiteral(i);break;case 134:s=this.parseStringLiteral(i);break;case 136:s=this.parseBigIntLiteral(i);break;case 139:{let o=this.state.startLoc;t!=null?t.privateKeyLoc===null&&(t.privateKeyLoc=o):this.raise(S.UnexpectedPrivateField,o),s=this.parsePrivateName();break}default:if(n===137){s=this.parseDecimalLiteral(i);break}this.unexpected()}r.key=s,n!==139&&(r.computed=!1)}}initFunction(r,t){r.id=null,r.generator=!1,r.async=t}parseMethod(r,t,n,i,s,o,a=!1){this.initFunction(r,n),r.generator=t,this.scope.enter(18|(a?64:0)|(s?32:0)),this.prodParam.enter(va(n,r.generator)),this.parseFunctionParams(r,i);let l=this.parseFunctionBodyAndFinish(r,o,!0);return this.prodParam.exit(),this.scope.exit(),l}parseArrayLike(r,t,n,i){n&&this.expectPlugin("recordAndTuple");let s=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let o=this.startNode();return this.next(),o.elements=this.parseExprList(r,!n,i,o),this.state.inFSharpPipelineDirectBody=s,this.finishNode(o,n?"TupleExpression":"ArrayExpression")}parseArrowExpression(r,t,n,i){this.scope.enter(6);let s=va(n,!1);!this.match(5)&&this.prodParam.hasIn&&(s|=8),this.prodParam.enter(s),this.initFunction(r,n);let o=this.state.maybeInArrowParameters;return t&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(r,t,i)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(r,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=o,this.finishNode(r,"ArrowFunctionExpression")}setArrowFunctionParameters(r,t,n){this.toAssignableList(t,n,!1),r.params=t}parseFunctionBodyAndFinish(r,t,n=!1){return this.parseFunctionBody(r,!1,n),this.finishNode(r,t)}parseFunctionBody(r,t,n=!1){let i=t&&!this.match(5);if(this.expressionScope.enter(Gy()),i)r.body=this.parseMaybeAssign(),this.checkParams(r,!1,t,!1);else{let s=this.state.strict,o=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|4),r.body=this.parseBlock(!0,!1,a=>{let l=!this.isSimpleParamList(r.params);a&&l&&this.raise(S.IllegalLanguageModeDirective,(r.kind==="method"||r.kind==="constructor")&&r.key?r.key.loc.end:r);let u=!s&&this.state.strict;this.checkParams(r,!this.state.strict&&!t&&!n&&!l,t,u),this.state.strict&&r.id&&this.checkIdentifier(r.id,65,u)}),this.prodParam.exit(),this.state.labels=o}this.expressionScope.exit()}isSimpleParameter(r){return r.type==="Identifier"}isSimpleParamList(r){for(let t=0,n=r.length;t<n;t++)if(!this.isSimpleParameter(r[t]))return!1;return!0}checkParams(r,t,n,i=!0){let s=!t&&new Set,o={type:"FormalParameters"};for(let a of r.params)this.checkLVal(a,o,5,s,i)}parseExprList(r,t,n,i){let s=[],o=!0;for(;!this.eat(r);){if(o)o=!1;else if(this.expect(12),this.match(r)){i&&this.addTrailingCommaExtraToNode(i),this.next();break}s.push(this.parseExprListItem(t,n))}return s}parseExprListItem(r,t,n){let i;if(this.match(12))r||this.raise(S.UnexpectedToken,this.state.curPosition(),{unexpected:","}),i=null;else if(this.match(21)){let s=this.state.startLoc;i=this.parseParenItem(this.parseSpread(t),s)}else if(this.match(17)){this.expectPlugin("partialApplication"),n||this.raise(S.UnexpectedArgumentPlaceholder,this.state.startLoc);let s=this.startNode();this.next(),i=this.finishNode(s,"ArgumentPlaceholder")}else i=this.parseMaybeAssignAllowIn(t,this.parseParenItem);return i}parseIdentifier(r){let t=this.startNode(),n=this.parseIdentifierName(r);return this.createIdentifier(t,n)}createIdentifier(r,t){return r.name=t,r.loc.identifierName=t,this.finishNode(r,"Identifier")}parseIdentifierName(r){let t,{startLoc:n,type:i}=this.state;hr(i)?t=this.state.value:this.unexpected();let s=mv(i);return r?s&&this.replaceToken(132):this.checkReservedWord(t,n,s,!1),this.next(),t}checkReservedWord(r,t,n,i){if(r.length>10||!kv(r))return;if(n&&Nv(r)){this.raise(S.UnexpectedKeyword,t,{keyword:r});return}if((this.state.strict?i?Vy:jy:Uy)(r,this.inModule)){this.raise(S.UnexpectedReservedWord,t,{reservedWord:r});return}else if(r==="yield"){if(this.prodParam.hasYield){this.raise(S.YieldBindingIdentifier,t);return}}else if(r==="await"){if(this.prodParam.hasAwait){this.raise(S.AwaitBindingIdentifier,t);return}if(this.scope.inStaticBlock){this.raise(S.AwaitBindingIdentifierInStaticBlock,t);return}this.expressionScope.recordAsyncArrowParametersError(t)}else if(r==="arguments"&&this.scope.inClassAndNotInNonArrowFunction){this.raise(S.ArgumentsInClass,t);return}}recordAwaitIfAllowed(){let r=this.prodParam.hasAwait||this.optionFlags&1&&!this.scope.inFunction;return r&&!this.scope.inFunction&&(this.state.hasTopLevelAwait=!0),r}parseAwait(r){let t=this.startNodeAt(r);return this.expressionScope.recordParameterInitializerError(S.AwaitExpressionFormalParameter,t),this.eat(55)&&this.raise(S.ObsoleteAwaitStar,t),!this.scope.inFunction&&!(this.optionFlags&1)&&(this.isAmbiguousAwait()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(t.argument=this.parseMaybeUnary(null,!0)),this.finishNode(t,"AwaitExpression")}isAmbiguousAwait(){if(this.hasPrecedingLineBreak())return!0;let{type:r}=this.state;return r===53||r===10||r===0||Ia(r)||r===102&&!this.state.containsEsc||r===138||r===56||this.hasPlugin("v8intrinsic")&&r===54}parseYield(){let r=this.startNode();this.expressionScope.recordParameterInitializerError(S.YieldInParameter,r),this.next();let t=!1,n=null;if(!this.hasPrecedingLineBreak())switch(t=this.eat(55),this.state.type){case 13:case 140:case 8:case 11:case 3:case 9:case 14:case 12:if(!t)break;default:n=this.parseMaybeAssign()}return r.delegate=t,r.argument=n,this.finishNode(r,"YieldExpression")}parseImportCall(r){if(this.next(),r.source=this.parseMaybeAssignAllowIn(),r.options=null,this.eat(12)&&!this.match(11)&&(r.options=this.parseMaybeAssignAllowIn(),this.eat(12)&&!this.match(11))){do this.parseMaybeAssignAllowIn();while(this.eat(12)&&!this.match(11));this.raise(S.ImportCallArity,r)}return this.expect(11),this.finishNode(r,"ImportExpression")}checkPipelineAtInfixOperator(r,t){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&r.type==="SequenceExpression"&&this.raise(S.PipelineHeadSequenceExpression,t)}parseSmartPipelineBodyInStyle(r,t){if(this.isSimpleReference(r)){let n=this.startNodeAt(t);return n.callee=r,this.finishNode(n,"PipelineBareFunction")}else{let n=this.startNodeAt(t);return this.checkSmartPipeTopicBodyEarlyErrors(t),n.expression=r,this.finishNode(n,"PipelineTopicExpression")}}isSimpleReference(r){switch(r.type){case"MemberExpression":return!r.computed&&this.isSimpleReference(r.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(r){if(this.match(19))throw this.raise(S.PipelineBodyNoArrow,this.state.startLoc);this.topicReferenceWasUsedInCurrentContext()||this.raise(S.PipelineTopicUnused,r)}withTopicBindingContext(r){let t=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return r()}finally{this.state.topicContext=t}}withSmartMixTopicForbiddingContext(r){if(this.hasPlugin(["pipelineOperator",{proposal:"smart"}])){let t=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return r()}finally{this.state.topicContext=t}}else return r()}withSoloAwaitPermittingContext(r){let t=this.state.soloAwait;this.state.soloAwait=!0;try{return r()}finally{this.state.soloAwait=t}}allowInAnd(r){let t=this.prodParam.currentFlags();if(8&~t){this.prodParam.enter(t|8);try{return r()}finally{this.prodParam.exit()}}return r()}disallowInAnd(r){let t=this.prodParam.currentFlags();if(8&t){this.prodParam.enter(t&-9);try{return r()}finally{this.prodParam.exit()}}return r()}registerTopicReference(){this.state.topicContext.maxTopicIndex=0}topicReferenceIsAllowedInCurrentContext(){return this.state.topicContext.maxNumOfResolvableTopics>=1}topicReferenceWasUsedInCurrentContext(){return this.state.topicContext.maxTopicIndex!=null&&this.state.topicContext.maxTopicIndex>=0}parseFSharpPipelineBody(r){let t=this.state.startLoc;this.state.potentialArrowAt=this.state.start;let n=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;let i=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),t,r);return this.state.inFSharpPipelineDirectBody=n,i}parseModuleExpression(){this.expectPlugin("moduleBlocks");let r=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);let t=this.startNodeAt(this.state.endLoc);this.next();let n=this.initializeScopes(!0);this.enterInitialScopes();try{r.body=this.parseProgram(t,8,"module")}finally{n()}return this.finishNode(r,"ModuleExpression")}parsePropertyNamePrefixOperator(r){}},yc={kind:1},pP={kind:2},dP=/[\uD800-\uDFFF]/u,bc=/in(?:stanceof)?/y;function fP(e,r,t){for(let n=0;n<e.length;n++){let i=e[n],{type:s}=i;if(typeof s=="number"){{if(s===139){let{loc:o,start:a,value:l,end:u}=i,c=a+1,p=_t(o.start,1);e.splice(n,1,new Rr({type:sn(27),value:"#",start:a,end:c,startLoc:o.start,endLoc:p}),new Rr({type:sn(132),value:l,start:c,end:u,startLoc:p,endLoc:o.end})),n++;continue}if(Ia(s)){let{loc:o,start:a,value:l,end:u}=i,c=a+1,p=_t(o.start,1),d;r.charCodeAt(a-t)===96?d=new Rr({type:sn(22),value:"`",start:a,end:c,startLoc:o.start,endLoc:p}):d=new Rr({type:sn(8),value:"}",start:a,end:c,startLoc:o.start,endLoc:p});let f,m,h,g;s===24?(m=u-1,h=_t(o.end,-1),f=l===null?null:l.slice(1,-1),g=new Rr({type:sn(22),value:"`",start:m,end:u,startLoc:h,endLoc:o.end})):(m=u-2,h=_t(o.end,-2),f=l===null?null:l.slice(1,-2),g=new Rr({type:sn(23),value:"${",start:m,end:u,startLoc:h,endLoc:o.end})),e.splice(n,1,d,new Rr({type:sn(20),value:f,start:c,end:m,startLoc:p,endLoc:h}),g),n+=2;continue}}i.type=sn(s)}}return e}var Mc=class extends Bc{parseTopLevel(r,t){return r.program=this.parseProgram(t),r.comments=this.comments,this.optionFlags&128&&(r.tokens=fP(this.tokens,this.input,this.startIndex)),this.finishNode(r,"File")}parseProgram(r,t=140,n=this.options.sourceType){if(r.sourceType=n,r.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(r,!0,!0,t),this.inModule){if(!(this.optionFlags&32)&&this.scope.undefinedExports.size>0)for(let[s,o]of Array.from(this.scope.undefinedExports))this.raise(S.ModuleExportUndefined,o,{localName:s});this.addExtra(r,"topLevelAwait",this.state.hasTopLevelAwait)}let i;return t===140?i=this.finishNode(r,"Program"):i=this.finishNodeAt(r,"Program",_t(this.state.startLoc,-1)),i}stmtToDirective(r){let t=r;t.type="Directive",t.value=t.expression,delete t.expression;let n=t.value,i=n.value,s=this.input.slice(this.offsetToSourcePos(n.start),this.offsetToSourcePos(n.end)),o=n.value=s.slice(1,-1);return this.addExtra(n,"raw",s),this.addExtra(n,"rawValue",o),this.addExtra(n,"expressionValue",i),n.type="DirectiveLiteral",t}parseInterpreterDirective(){if(!this.match(28))return null;let r=this.startNode();return r.value=this.state.value,this.next(),this.finishNode(r,"InterpreterDirective")}isLet(){return this.isContextual(100)?this.hasFollowingBindingAtom():!1}chStartsBindingIdentifier(r,t){if(an(r)){if(bc.lastIndex=t,bc.test(this.input)){let n=this.codePointAtPos(bc.lastIndex);if(!Ui(n)&&n!==92)return!1}return!0}else return r===92}chStartsBindingPattern(r){return r===91||r===123}hasFollowingBindingAtom(){let r=this.nextTokenStart(),t=this.codePointAtPos(r);return this.chStartsBindingPattern(t)||this.chStartsBindingIdentifier(t,r)}hasInLineFollowingBindingIdentifierOrBrace(){let r=this.nextTokenInLineStart(),t=this.codePointAtPos(r);return t===123||this.chStartsBindingIdentifier(t,r)}startsUsingForOf(){let{type:r,containsEsc:t}=this.lookahead();if(r===102&&!t)return!1;if(we(r)&&!this.hasFollowingLineBreak())return this.expectPlugin("explicitResourceManagement"),!0}startsAwaitUsing(){let r=this.nextTokenInLineStart();if(this.isUnparsedContextual(r,"using")){r=this.nextTokenInLineStartSince(r+5);let t=this.codePointAtPos(r);if(this.chStartsBindingIdentifier(t,r))return this.expectPlugin("explicitResourceManagement"),!0}return!1}parseModuleItem(){return this.parseStatementLike(15)}parseStatementListItem(){return this.parseStatementLike(6|(!this.options.annexB||this.state.strict?0:8))}parseStatementOrSloppyAnnexBFunctionDeclaration(r=!1){let t=0;return this.options.annexB&&!this.state.strict&&(t|=4,r&&(t|=8)),this.parseStatementLike(t)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(r){let t=null;return this.match(26)&&(t=this.parseDecorators(!0)),this.parseStatementContent(r,t)}parseStatementContent(r,t){let n=this.state.type,i=this.startNode(),s=!!(r&2),o=!!(r&4),a=r&1;switch(n){case 60:return this.parseBreakContinueStatement(i,!0);case 63:return this.parseBreakContinueStatement(i,!1);case 64:return this.parseDebuggerStatement(i);case 90:return this.parseDoWhileStatement(i);case 91:return this.parseForStatement(i);case 68:if(this.lookaheadCharCode()===46)break;return o||this.raise(this.state.strict?S.StrictFunction:this.options.annexB?S.SloppyFunctionAnnexB:S.SloppyFunction,this.state.startLoc),this.parseFunctionStatement(i,!1,!s&&o);case 80:return s||this.unexpected(),this.parseClass(this.maybeTakeDecorators(t,i),!0);case 69:return this.parseIfStatement(i);case 70:return this.parseReturnStatement(i);case 71:return this.parseSwitchStatement(i);case 72:return this.parseThrowStatement(i);case 73:return this.parseTryStatement(i);case 96:if(!this.state.containsEsc&&this.startsAwaitUsing())return this.recordAwaitIfAllowed()?s||this.raise(S.UnexpectedLexicalDeclaration,i):this.raise(S.AwaitUsingNotInAsyncContext,i),this.next(),this.parseVarStatement(i,"await using");break;case 107:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifierOrBrace())break;return this.expectPlugin("explicitResourceManagement"),!this.scope.inModule&&this.scope.inTopLevel?this.raise(S.UnexpectedUsingDeclaration,this.state.startLoc):s||this.raise(S.UnexpectedLexicalDeclaration,this.state.startLoc),this.parseVarStatement(i,"using");case 100:{if(this.state.containsEsc)break;let c=this.nextTokenStart(),p=this.codePointAtPos(c);if(p!==91&&(!s&&this.hasFollowingLineBreak()||!this.chStartsBindingIdentifier(p,c)&&p!==123))break}case 75:s||this.raise(S.UnexpectedLexicalDeclaration,this.state.startLoc);case 74:{let c=this.state.value;return this.parseVarStatement(i,c)}case 92:return this.parseWhileStatement(i);case 76:return this.parseWithStatement(i);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(i);case 83:{let c=this.lookaheadCharCode();if(c===40||c===46)break}case 82:{!(this.optionFlags&8)&&!a&&this.raise(S.UnexpectedImportExport,this.state.startLoc),this.next();let c;return n===83?(c=this.parseImport(i),c.type==="ImportDeclaration"&&(!c.importKind||c.importKind==="value")&&(this.sawUnambiguousESM=!0)):(c=this.parseExport(i,t),(c.type==="ExportNamedDeclaration"&&(!c.exportKind||c.exportKind==="value")||c.type==="ExportAllDeclaration"&&(!c.exportKind||c.exportKind==="value")||c.type==="ExportDefaultDeclaration")&&(this.sawUnambiguousESM=!0)),this.assertModuleNodeAllowed(c),c}default:if(this.isAsyncFunction())return s||this.raise(S.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement(i,!0,!s&&o)}let l=this.state.value,u=this.parseExpression();return we(n)&&u.type==="Identifier"&&this.eat(14)?this.parseLabeledStatement(i,l,u,r):this.parseExpressionStatement(i,u,t)}assertModuleNodeAllowed(r){!(this.optionFlags&8)&&!this.inModule&&this.raise(S.ImportOutsideModule,r)}decoratorsEnabledBeforeExport(){return this.hasPlugin("decorators-legacy")?!0:this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")!==!1}maybeTakeDecorators(r,t,n){if(r){var i;(i=t.decorators)!=null&&i.length?(typeof this.getPluginOption("decorators","decoratorsBeforeExport")!="boolean"&&this.raise(S.DecoratorsBeforeAfterExport,t.decorators[0]),t.decorators.unshift(...r)):t.decorators=r,this.resetStartLocationFromNode(t,r[0]),n&&this.resetStartLocationFromNode(n,t)}return t}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(r){let t=[];do t.push(this.parseDecorator());while(this.match(26));if(this.match(82))r||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(S.DecoratorExportClass,this.state.startLoc);else if(!this.canHaveLeadingDecorator())throw this.raise(S.UnexpectedLeadingDecorator,this.state.startLoc);return t}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);let r=this.startNode();if(this.next(),this.hasPlugin("decorators")){let t=this.state.startLoc,n;if(this.match(10)){let i=this.state.startLoc;this.next(),n=this.parseExpression(),this.expect(11),n=this.wrapParenthesis(i,n);let s=this.state.startLoc;r.expression=this.parseMaybeDecoratorArguments(n,i),this.getPluginOption("decorators","allowCallParenthesized")===!1&&r.expression!==n&&this.raise(S.DecoratorArgumentsOutsideParentheses,s)}else{for(n=this.parseIdentifier(!1);this.eat(16);){let i=this.startNodeAt(t);i.object=n,this.match(139)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),i.property=this.parsePrivateName()):i.property=this.parseIdentifier(!0),i.computed=!1,n=this.finishNode(i,"MemberExpression")}r.expression=this.parseMaybeDecoratorArguments(n,t)}}else r.expression=this.parseExprSubscripts();return this.finishNode(r,"Decorator")}parseMaybeDecoratorArguments(r,t){if(this.eat(10)){let n=this.startNodeAt(t);return n.callee=r,n.arguments=this.parseCallExpressionArguments(11),this.toReferencedList(n.arguments),this.finishNode(n,"CallExpression")}return r}parseBreakContinueStatement(r,t){return this.next(),this.isLineTerminator()?r.label=null:(r.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(r,t),this.finishNode(r,t?"BreakStatement":"ContinueStatement")}verifyBreakContinue(r,t){let n;for(n=0;n<this.state.labels.length;++n){let i=this.state.labels[n];if((r.label==null||i.name===r.label.name)&&(i.kind!=null&&(t||i.kind===1)||r.label&&t))break}if(n===this.state.labels.length){let i=t?"BreakStatement":"ContinueStatement";this.raise(S.IllegalBreakContinue,r,{type:i})}}parseDebuggerStatement(r){return this.next(),this.semicolon(),this.finishNode(r,"DebuggerStatement")}parseHeaderExpression(){this.expect(10);let r=this.parseExpression();return this.expect(11),r}parseDoWhileStatement(r){return this.next(),this.state.labels.push(yc),r.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.expect(92),r.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(r,"DoWhileStatement")}parseForStatement(r){this.next(),this.state.labels.push(yc);let t=null;if(this.isContextual(96)&&this.recordAwaitIfAllowed()&&(t=this.state.startLoc,this.next()),this.scope.enter(0),this.expect(10),this.match(13))return t!==null&&this.unexpected(t),this.parseFor(r,null);let n=this.isContextual(100);{let l=this.isContextual(96)&&this.startsAwaitUsing(),u=l||this.isContextual(107)&&this.startsUsingForOf(),c=n&&this.hasFollowingBindingAtom()||u;if(this.match(74)||this.match(75)||c){let p=this.startNode(),d;l?(d="await using",this.recordAwaitIfAllowed()||this.raise(S.AwaitUsingNotInAsyncContext,this.state.startLoc),this.next()):d=this.state.value,this.next(),this.parseVar(p,!0,d);let f=this.finishNode(p,"VariableDeclaration"),m=this.match(58);return m&&u&&this.raise(S.ForInUsing,f),(m||this.isContextual(102))&&f.declarations.length===1?this.parseForIn(r,f,t):(t!==null&&this.unexpected(t),this.parseFor(r,f))}}let i=this.isContextual(95),s=new Ki,o=this.parseExpression(!0,s),a=this.isContextual(102);if(a&&(n&&this.raise(S.ForOfLet,o),t===null&&i&&o.type==="Identifier"&&this.raise(S.ForOfAsync,o)),a||this.match(58)){this.checkDestructuringPrivate(s),this.toAssignable(o,!0);let l=a?"ForOfStatement":"ForInStatement";return this.checkLVal(o,{type:l}),this.parseForIn(r,o,t)}else this.checkExpressionErrors(s,!0);return t!==null&&this.unexpected(t),this.parseFor(r,o)}parseFunctionStatement(r,t,n){return this.next(),this.parseFunction(r,1|(n?2:0)|(t?8:0))}parseIfStatement(r){return this.next(),r.test=this.parseHeaderExpression(),r.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),r.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(r,"IfStatement")}parseReturnStatement(r){return!this.prodParam.hasReturn&&!(this.optionFlags&2)&&this.raise(S.IllegalReturn,this.state.startLoc),this.next(),this.isLineTerminator()?r.argument=null:(r.argument=this.parseExpression(),this.semicolon()),this.finishNode(r,"ReturnStatement")}parseSwitchStatement(r){this.next(),r.discriminant=this.parseHeaderExpression();let t=r.cases=[];this.expect(5),this.state.labels.push(pP),this.scope.enter(0);let n;for(let i;!this.match(8);)if(this.match(61)||this.match(65)){let s=this.match(61);n&&this.finishNode(n,"SwitchCase"),t.push(n=this.startNode()),n.consequent=[],this.next(),s?n.test=this.parseExpression():(i&&this.raise(S.MultipleDefaultsInSwitch,this.state.lastTokStartLoc),i=!0,n.test=null),this.expect(14)}else n?n.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),n&&this.finishNode(n,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(r,"SwitchStatement")}parseThrowStatement(r){return this.next(),this.hasPrecedingLineBreak()&&this.raise(S.NewlineAfterThrow,this.state.lastTokEndLoc),r.argument=this.parseExpression(),this.semicolon(),this.finishNode(r,"ThrowStatement")}parseCatchClauseParam(){let r=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&r.type==="Identifier"?8:0),this.checkLVal(r,{type:"CatchClause"},9),r}parseTryStatement(r){if(this.next(),r.block=this.parseBlock(),r.handler=null,this.match(62)){let t=this.startNode();this.next(),this.match(10)?(this.expect(10),t.param=this.parseCatchClauseParam(),this.expect(11)):(t.param=null,this.scope.enter(0)),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseBlock(!1,!1)),this.scope.exit(),r.handler=this.finishNode(t,"CatchClause")}return r.finalizer=this.eat(67)?this.parseBlock():null,!r.handler&&!r.finalizer&&this.raise(S.NoCatchOrFinally,r),this.finishNode(r,"TryStatement")}parseVarStatement(r,t,n=!1){return this.next(),this.parseVar(r,!1,t,n),this.semicolon(),this.finishNode(r,"VariableDeclaration")}parseWhileStatement(r){return this.next(),r.test=this.parseHeaderExpression(),this.state.labels.push(yc),r.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.finishNode(r,"WhileStatement")}parseWithStatement(r){return this.state.strict&&this.raise(S.StrictWith,this.state.startLoc),this.next(),r.object=this.parseHeaderExpression(),r.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.finishNode(r,"WithStatement")}parseEmptyStatement(r){return this.next(),this.finishNode(r,"EmptyStatement")}parseLabeledStatement(r,t,n,i){for(let o of this.state.labels)o.name===t&&this.raise(S.LabelRedeclaration,n,{labelName:t});let s=yv(this.state.type)?1:this.match(71)?2:null;for(let o=this.state.labels.length-1;o>=0;o--){let a=this.state.labels[o];if(a.statementStart===r.start)a.statementStart=this.sourceToOffsetPos(this.state.start),a.kind=s;else break}return this.state.labels.push({name:t,kind:s,statementStart:this.sourceToOffsetPos(this.state.start)}),r.body=i&8?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),r.label=n,this.finishNode(r,"LabeledStatement")}parseExpressionStatement(r,t,n){return r.expression=t,this.semicolon(),this.finishNode(r,"ExpressionStatement")}parseBlock(r=!1,t=!0,n){let i=this.startNode();return r&&this.state.strictErrors.clear(),this.expect(5),t&&this.scope.enter(0),this.parseBlockBody(i,r,!1,8,n),t&&this.scope.exit(),this.finishNode(i,"BlockStatement")}isValidDirective(r){return r.type==="ExpressionStatement"&&r.expression.type==="StringLiteral"&&!r.expression.extra.parenthesized}parseBlockBody(r,t,n,i,s){let o=r.body=[],a=r.directives=[];this.parseBlockOrModuleBlockBody(o,t?a:void 0,n,i,s)}parseBlockOrModuleBlockBody(r,t,n,i,s){let o=this.state.strict,a=!1,l=!1;for(;!this.match(i);){let u=n?this.parseModuleItem():this.parseStatementListItem();if(t&&!l){if(this.isValidDirective(u)){let c=this.stmtToDirective(u);t.push(c),!a&&c.value.value==="use strict"&&(a=!0,this.setStrict(!0));continue}l=!0,this.state.strictErrors.clear()}r.push(u)}s?.call(this,a),o||this.setStrict(!1),this.next()}parseFor(r,t){return r.init=t,this.semicolon(!1),r.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),r.update=this.match(11)?null:this.parseExpression(),this.expect(11),r.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(r,"ForStatement")}parseForIn(r,t,n){let i=this.match(58);return this.next(),i?n!==null&&this.unexpected(n):r.await=n!==null,t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!i||!this.options.annexB||this.state.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier")&&this.raise(S.ForInOfLoopInitializer,t,{type:i?"ForInStatement":"ForOfStatement"}),t.type==="AssignmentPattern"&&this.raise(S.InvalidLhs,t,{ancestor:{type:"ForStatement"}}),r.left=t,r.right=i?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),r.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(r,i?"ForInStatement":"ForOfStatement")}parseVar(r,t,n,i=!1){let s=r.declarations=[];for(r.kind=n;;){let o=this.startNode();if(this.parseVarId(o,n),o.init=this.eat(29)?t?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,o.init===null&&!i&&(o.id.type!=="Identifier"&&!(t&&(this.match(58)||this.isContextual(102)))?this.raise(S.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"destructuring"}):(n==="const"||n==="using"||n==="await using")&&!(this.match(58)||this.isContextual(102))&&this.raise(S.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:n})),s.push(this.finishNode(o,"VariableDeclarator")),!this.eat(12))break}return r}parseVarId(r,t){let n=this.parseBindingAtom();(t==="using"||t==="await using")&&(n.type==="ArrayPattern"||n.type==="ObjectPattern")&&this.raise(S.UsingDeclarationHasBindingPattern,n.loc.start),this.checkLVal(n,{type:"VariableDeclarator"},t==="var"?5:8201),r.id=n}parseAsyncFunctionExpression(r){return this.parseFunction(r,8)}parseFunction(r,t=0){let n=t&2,i=!!(t&1),s=i&&!(t&4),o=!!(t&8);this.initFunction(r,o),this.match(55)&&(n&&this.raise(S.GeneratorInSingleStatementContext,this.state.startLoc),this.next(),r.generator=!0),i&&(r.id=this.parseFunctionId(s));let a=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(2),this.prodParam.enter(va(o,r.generator)),i||(r.id=this.parseFunctionId()),this.parseFunctionParams(r,!1),this.withSmartMixTopicForbiddingContext(()=>{this.parseFunctionBodyAndFinish(r,i?"FunctionDeclaration":"FunctionExpression")}),this.prodParam.exit(),this.scope.exit(),i&&!n&&this.registerFunctionStatementId(r),this.state.maybeInArrowParameters=a,r}parseFunctionId(r){return r||we(this.state.type)?this.parseIdentifier():null}parseFunctionParams(r,t){this.expect(10),this.expressionScope.enter(jv()),r.params=this.parseBindingList(11,41,2|(t?4:0)),this.expressionScope.exit()}registerFunctionStatementId(r){r.id&&this.scope.declareName(r.id.name,!this.options.annexB||this.state.strict||r.generator||r.async?this.scope.treatFunctionsAsVar?5:8201:17,r.id.loc.start)}parseClass(r,t,n){this.next();let i=this.state.strict;return this.state.strict=!0,this.parseClassId(r,t,n),this.parseClassSuper(r),r.body=this.parseClassBody(!!r.superClass,i),this.finishNode(r,t?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}nameIsConstructor(r){return r.type==="Identifier"&&r.name==="constructor"||r.type==="StringLiteral"&&r.value==="constructor"}isNonstaticConstructor(r){return!r.computed&&!r.static&&this.nameIsConstructor(r.key)}parseClassBody(r,t){this.classScope.enter();let n={hadConstructor:!1,hadSuperClass:r},i=[],s=this.startNode();if(s.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext(()=>{for(;!this.match(8);){if(this.eat(13)){if(i.length>0)throw this.raise(S.DecoratorSemicolon,this.state.lastTokEndLoc);continue}if(this.match(26)){i.push(this.parseDecorator());continue}let o=this.startNode();i.length&&(o.decorators=i,this.resetStartLocationFromNode(o,i[0]),i=[]),this.parseClassMember(s,o,n),o.kind==="constructor"&&o.decorators&&o.decorators.length>0&&this.raise(S.DecoratorConstructor,o)}}),this.state.strict=t,this.next(),i.length)throw this.raise(S.TrailingDecorator,this.state.startLoc);return this.classScope.exit(),this.finishNode(s,"ClassBody")}parseClassMemberFromModifier(r,t){let n=this.parseIdentifier(!0);if(this.isClassMethod()){let i=t;return i.kind="method",i.computed=!1,i.key=n,i.static=!1,this.pushClassMethod(r,i,!1,!1,!1,!1),!0}else if(this.isClassProperty()){let i=t;return i.computed=!1,i.key=n,i.static=!1,r.body.push(this.parseClassProperty(i)),!0}return this.resetPreviousNodeTrailingComments(n),!1}parseClassMember(r,t,n){let i=this.isContextual(106);if(i){if(this.parseClassMemberFromModifier(r,t))return;if(this.eat(5)){this.parseClassStaticBlock(r,t);return}}this.parseClassMemberWithIsStatic(r,t,n,i)}parseClassMemberWithIsStatic(r,t,n,i){let s=t,o=t,a=t,l=t,u=t,c=s,p=s;if(t.static=i,this.parsePropertyNamePrefixOperator(t),this.eat(55)){c.kind="method";let y=this.match(139);if(this.parseClassElementName(c),y){this.pushClassPrivateMethod(r,o,!0,!1);return}this.isNonstaticConstructor(s)&&this.raise(S.ConstructorIsGenerator,s.key),this.pushClassMethod(r,s,!0,!1,!1,!1);return}let d=!this.state.containsEsc&&we(this.state.type),f=this.parseClassElementName(t),m=d?f.name:null,h=this.isPrivateName(f),g=this.state.startLoc;if(this.parsePostMemberNameModifiers(p),this.isClassMethod()){if(c.kind="method",h){this.pushClassPrivateMethod(r,o,!1,!1);return}let y=this.isNonstaticConstructor(s),b=!1;y&&(s.kind="constructor",n.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(S.DuplicateConstructor,f),y&&this.hasPlugin("typescript")&&t.override&&this.raise(S.OverrideOnConstructor,f),n.hadConstructor=!0,b=n.hadSuperClass),this.pushClassMethod(r,s,!1,!1,y,b)}else if(this.isClassProperty())h?this.pushClassPrivateProperty(r,l):this.pushClassProperty(r,a);else if(m==="async"&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(f);let y=this.eat(55);p.optional&&this.unexpected(g),c.kind="method";let b=this.match(139);this.parseClassElementName(c),this.parsePostMemberNameModifiers(p),b?this.pushClassPrivateMethod(r,o,y,!0):(this.isNonstaticConstructor(s)&&this.raise(S.ConstructorIsAsync,s.key),this.pushClassMethod(r,s,y,!0,!1,!1))}else if((m==="get"||m==="set")&&!(this.match(55)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(f),c.kind=m;let y=this.match(139);this.parseClassElementName(s),y?this.pushClassPrivateMethod(r,o,!1,!1):(this.isNonstaticConstructor(s)&&this.raise(S.ConstructorIsAccessor,s.key),this.pushClassMethod(r,s,!1,!1,!1,!1)),this.checkGetterSetterParams(s)}else if(m==="accessor"&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(f);let y=this.match(139);this.parseClassElementName(a),this.pushClassAccessorProperty(r,u,y)}else this.isLineTerminator()?h?this.pushClassPrivateProperty(r,l):this.pushClassProperty(r,a):this.unexpected()}parseClassElementName(r){let{type:t,value:n}=this.state;if((t===132||t===134)&&r.static&&n==="prototype"&&this.raise(S.StaticPrototype,this.state.startLoc),t===139){n==="constructor"&&this.raise(S.ConstructorClassPrivateField,this.state.startLoc);let i=this.parsePrivateName();return r.key=i,i}return this.parsePropertyName(r),r.key}parseClassStaticBlock(r,t){var n;this.scope.enter(208);let i=this.state.labels;this.state.labels=[],this.prodParam.enter(0);let s=t.body=[];this.parseBlockOrModuleBlockBody(s,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=i,r.body.push(this.finishNode(t,"StaticBlock")),(n=t.decorators)!=null&&n.length&&this.raise(S.DecoratorStaticBlock,t)}pushClassProperty(r,t){!t.computed&&this.nameIsConstructor(t.key)&&this.raise(S.ConstructorClassField,t.key),r.body.push(this.parseClassProperty(t))}pushClassPrivateProperty(r,t){let n=this.parseClassPrivateProperty(t);r.body.push(n),this.classScope.declarePrivateName(this.getPrivateNameSV(n.key),0,n.key.loc.start)}pushClassAccessorProperty(r,t,n){!n&&!t.computed&&this.nameIsConstructor(t.key)&&this.raise(S.ConstructorClassField,t.key);let i=this.parseClassAccessorProperty(t);r.body.push(i),n&&this.classScope.declarePrivateName(this.getPrivateNameSV(i.key),0,i.key.loc.start)}pushClassMethod(r,t,n,i,s,o){r.body.push(this.parseMethod(t,n,i,s,o,"ClassMethod",!0))}pushClassPrivateMethod(r,t,n,i){let s=this.parseMethod(t,n,i,!1,!1,"ClassPrivateMethod",!0);r.body.push(s);let o=s.kind==="get"?s.static?6:2:s.kind==="set"?s.static?5:1:0;this.declareClassPrivateMethodInScope(s,o)}declareClassPrivateMethodInScope(r,t){this.classScope.declarePrivateName(this.getPrivateNameSV(r.key),t,r.key.loc.start)}parsePostMemberNameModifiers(r){}parseClassPrivateProperty(r){return this.parseInitializer(r),this.semicolon(),this.finishNode(r,"ClassPrivateProperty")}parseClassProperty(r){return this.parseInitializer(r),this.semicolon(),this.finishNode(r,"ClassProperty")}parseClassAccessorProperty(r){return this.parseInitializer(r),this.semicolon(),this.finishNode(r,"ClassAccessorProperty")}parseInitializer(r){this.scope.enter(80),this.expressionScope.enter(Gy()),this.prodParam.enter(0),r.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(r,t,n,i=8331){if(we(this.state.type))r.id=this.parseIdentifier(),t&&this.declareNameFromIdentifier(r.id,i);else if(n||!t)r.id=null;else throw this.raise(S.MissingClassName,this.state.startLoc)}parseClassSuper(r){r.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(r,t){let n=this.parseMaybeImportPhase(r,!0),i=this.maybeParseExportDefaultSpecifier(r,n),s=!i||this.eat(12),o=s&&this.eatExportStar(r),a=o&&this.maybeParseExportNamespaceSpecifier(r),l=s&&(!a||this.eat(12)),u=i||o;if(o&&!a){if(i&&this.unexpected(),t)throw this.raise(S.UnsupportedDecoratorExport,r);return this.parseExportFrom(r,!0),this.finishNode(r,"ExportAllDeclaration")}let c=this.maybeParseExportNamedSpecifiers(r);i&&s&&!o&&!c&&this.unexpected(null,5),a&&l&&this.unexpected(null,98);let p;if(u||c){if(p=!1,t)throw this.raise(S.UnsupportedDecoratorExport,r);this.parseExportFrom(r,u)}else p=this.maybeParseExportDeclaration(r);if(u||c||p){var d;let f=r;if(this.checkExport(f,!0,!1,!!f.source),((d=f.declaration)==null?void 0:d.type)==="ClassDeclaration")this.maybeTakeDecorators(t,f.declaration,f);else if(t)throw this.raise(S.UnsupportedDecoratorExport,r);return this.finishNode(f,"ExportNamedDeclaration")}if(this.eat(65)){let f=r,m=this.parseExportDefaultExpression();if(f.declaration=m,m.type==="ClassDeclaration")this.maybeTakeDecorators(t,m,f);else if(t)throw this.raise(S.UnsupportedDecoratorExport,r);return this.checkExport(f,!0,!0),this.finishNode(f,"ExportDefaultDeclaration")}this.unexpected(null,5)}eatExportStar(r){return this.eat(55)}maybeParseExportDefaultSpecifier(r,t){if(t||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",t?.loc.start);let n=t||this.parseIdentifier(!0),i=this.startNodeAtNode(n);return i.exported=n,r.specifiers=[this.finishNode(i,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(r){if(this.isContextual(93)){var t,n;(n=(t=r).specifiers)!=null||(t.specifiers=[]);let i=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),i.exported=this.parseModuleExportName(),r.specifiers.push(this.finishNode(i,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(r){if(this.match(5)){let t=r;t.specifiers||(t.specifiers=[]);let n=t.exportKind==="type";return t.specifiers.push(...this.parseExportSpecifiers(n)),t.source=null,t.declaration=null,this.hasPlugin("importAssertions")&&(t.assertions=[]),!0}return!1}maybeParseExportDeclaration(r){return this.shouldParseExportDeclaration()?(r.specifiers=[],r.source=null,this.hasPlugin("importAssertions")&&(r.assertions=[]),r.declaration=this.parseExportDeclaration(r),!0):!1}isAsyncFunction(){if(!this.isContextual(95))return!1;let r=this.nextTokenInLineStart();return this.isUnparsedContextual(r,"function")}parseExportDefaultExpression(){let r=this.startNode();if(this.match(68))return this.next(),this.parseFunction(r,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(r,13);if(this.match(80))return this.parseClass(r,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(S.DecoratorBeforeExport,this.state.startLoc),this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0);if(this.match(75)||this.match(74)||this.isLet())throw this.raise(S.UnsupportedDefaultExport,this.state.startLoc);let t=this.parseMaybeAssignAllowIn();return this.semicolon(),t}parseExportDeclaration(r){return this.match(80)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){let{type:r}=this.state;if(we(r)){if(r===95&&!this.state.containsEsc||r===100)return!1;if((r===130||r===129)&&!this.state.containsEsc){let{type:i}=this.lookahead();if(we(i)&&i!==98||i===5)return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;let t=this.nextTokenStart(),n=this.isUnparsedContextual(t,"from");if(this.input.charCodeAt(t)===44||we(this.state.type)&&n)return!0;if(this.match(65)&&n){let i=this.input.charCodeAt(this.nextTokenStartSince(t+4));return i===34||i===39}return!1}parseExportFrom(r,t){this.eatContextual(98)?(r.source=this.parseImportSource(),this.checkExport(r),this.maybeParseImportAttributes(r),this.checkJSONModuleImport(r)):t&&this.unexpected(),this.semicolon()}shouldParseExportDeclaration(){let{type:r}=this.state;return r===26&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))?(this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(S.DecoratorBeforeExport,this.state.startLoc),!0):this.isContextual(107)?(this.raise(S.UsingDeclarationExport,this.state.startLoc),!0):this.isContextual(96)&&this.startsAwaitUsing()?(this.raise(S.UsingDeclarationExport,this.state.startLoc),!0):r===74||r===75||r===68||r===80||this.isLet()||this.isAsyncFunction()}checkExport(r,t,n,i){if(t){var s;if(n){if(this.checkDuplicateExports(r,"default"),this.hasPlugin("exportDefaultFrom")){var o;let a=r.declaration;a.type==="Identifier"&&a.name==="from"&&a.end-a.start===4&&!((o=a.extra)!=null&&o.parenthesized)&&this.raise(S.ExportDefaultFromAsIdentifier,a)}}else if((s=r.specifiers)!=null&&s.length)for(let a of r.specifiers){let{exported:l}=a,u=l.type==="Identifier"?l.name:l.value;if(this.checkDuplicateExports(a,u),!i&&a.local){let{local:c}=a;c.type!=="Identifier"?this.raise(S.ExportBindingIsString,a,{localName:c.value,exportName:u}):(this.checkReservedWord(c.name,c.loc.start,!0,!1),this.scope.checkLocalExport(c))}}else if(r.declaration){let a=r.declaration;if(a.type==="FunctionDeclaration"||a.type==="ClassDeclaration"){let{id:l}=a;if(!l)throw new Error("Assertion failure");this.checkDuplicateExports(r,l.name)}else if(a.type==="VariableDeclaration")for(let l of a.declarations)this.checkDeclaration(l.id)}}}checkDeclaration(r){if(r.type==="Identifier")this.checkDuplicateExports(r,r.name);else if(r.type==="ObjectPattern")for(let t of r.properties)this.checkDeclaration(t);else if(r.type==="ArrayPattern")for(let t of r.elements)t&&this.checkDeclaration(t);else r.type==="ObjectProperty"?this.checkDeclaration(r.value):r.type==="RestElement"?this.checkDeclaration(r.argument):r.type==="AssignmentPattern"&&this.checkDeclaration(r.left)}checkDuplicateExports(r,t){this.exportedIdentifiers.has(t)&&(t==="default"?this.raise(S.DuplicateDefaultExport,r):this.raise(S.DuplicateExport,r,{exportName:t})),this.exportedIdentifiers.add(t)}parseExportSpecifiers(r){let t=[],n=!0;for(this.expect(5);!this.eat(8);){if(n)n=!1;else if(this.expect(12),this.eat(8))break;let i=this.isContextual(130),s=this.match(134),o=this.startNode();o.local=this.parseModuleExportName(),t.push(this.parseExportSpecifier(o,s,r,i))}return t}parseExportSpecifier(r,t,n,i){return this.eatContextual(93)?r.exported=this.parseModuleExportName():t?r.exported=qv(r.local):r.exported||(r.exported=un(r.local)),this.finishNode(r,"ExportSpecifier")}parseModuleExportName(){if(this.match(134)){let r=this.parseStringLiteral(this.state.value),t=dP.exec(r.value);return t&&this.raise(S.ModuleExportNameHasLoneSurrogate,r,{surrogateCharCode:t[0].charCodeAt(0)}),r}return this.parseIdentifier(!0)}isJSONModuleImport(r){return r.assertions!=null?r.assertions.some(({key:t,value:n})=>n.value==="json"&&(t.type==="Identifier"?t.name==="type":t.value==="type")):!1}checkImportReflection(r){let{specifiers:t}=r,n=t.length===1?t[0].type:null;if(r.phase==="source")n!=="ImportDefaultSpecifier"&&this.raise(S.SourcePhaseImportRequiresDefault,t[0].loc.start);else if(r.phase==="defer")n!=="ImportNamespaceSpecifier"&&this.raise(S.DeferImportRequiresNamespace,t[0].loc.start);else if(r.module){var i;n!=="ImportDefaultSpecifier"&&this.raise(S.ImportReflectionNotBinding,t[0].loc.start),((i=r.assertions)==null?void 0:i.length)>0&&this.raise(S.ImportReflectionHasAssertion,t[0].loc.start)}}checkJSONModuleImport(r){if(this.isJSONModuleImport(r)&&r.type!=="ExportAllDeclaration"){let{specifiers:t}=r;if(t!=null){let n=t.find(i=>{let s;if(i.type==="ExportSpecifier"?s=i.local:i.type==="ImportSpecifier"&&(s=i.imported),s!==void 0)return s.type==="Identifier"?s.name!=="default":s.value!=="default"});n!==void 0&&this.raise(S.ImportJSONBindingNotDefault,n.loc.start)}}}isPotentialImportPhase(r){return r?!1:this.isContextual(105)||this.isContextual(97)||this.isContextual(127)}applyImportPhase(r,t,n,i){t||(n==="module"?(this.expectPlugin("importReflection",i),r.module=!0):this.hasPlugin("importReflection")&&(r.module=!1),n==="source"?(this.expectPlugin("sourcePhaseImports",i),r.phase="source"):n==="defer"?(this.expectPlugin("deferredImportEvaluation",i),r.phase="defer"):this.hasPlugin("sourcePhaseImports")&&(r.phase=null))}parseMaybeImportPhase(r,t){if(!this.isPotentialImportPhase(t))return this.applyImportPhase(r,t,null),null;let n=this.parseIdentifier(!0),{type:i}=this.state;return(hr(i)?i!==98||this.lookaheadCharCode()===102:i!==12)?(this.resetPreviousIdentifierLeadingComments(n),this.applyImportPhase(r,t,n.name,n.loc.start),null):(this.applyImportPhase(r,t,null),n)}isPrecedingIdImportPhase(r){let{type:t}=this.state;return we(t)?t!==98||this.lookaheadCharCode()===102:t!==12}parseImport(r){return this.match(134)?this.parseImportSourceAndAttributes(r):this.parseImportSpecifiersAndAfter(r,this.parseMaybeImportPhase(r,!1))}parseImportSpecifiersAndAfter(r,t){r.specifiers=[];let i=!this.maybeParseDefaultImportSpecifier(r,t)||this.eat(12),s=i&&this.maybeParseStarImportSpecifier(r);return i&&!s&&this.parseNamedImportSpecifiers(r),this.expectContextual(98),this.parseImportSourceAndAttributes(r)}parseImportSourceAndAttributes(r){var t;return(t=r.specifiers)!=null||(r.specifiers=[]),r.source=this.parseImportSource(),this.maybeParseImportAttributes(r),this.checkImportReflection(r),this.checkJSONModuleImport(r),this.semicolon(),this.finishNode(r,"ImportDeclaration")}parseImportSource(){return this.match(134)||this.unexpected(),this.parseExprAtom()}parseImportSpecifierLocal(r,t,n){t.local=this.parseIdentifier(),r.specifiers.push(this.finishImportSpecifier(t,n))}finishImportSpecifier(r,t,n=8201){return this.checkLVal(r.local,{type:t},n),this.finishNode(r,t)}parseImportAttributes(){this.expect(5);let r=[],t=new Set;do{if(this.match(8))break;let n=this.startNode(),i=this.state.value;if(t.has(i)&&this.raise(S.ModuleAttributesWithDuplicateKeys,this.state.startLoc,{key:i}),t.add(i),this.match(134)?n.key=this.parseStringLiteral(i):n.key=this.parseIdentifier(!0),this.expect(14),!this.match(134))throw this.raise(S.ModuleAttributeInvalidValue,this.state.startLoc);n.value=this.parseStringLiteral(this.state.value),r.push(this.finishNode(n,"ImportAttribute"))}while(this.eat(12));return this.expect(8),r}parseModuleAttributes(){let r=[],t=new Set;do{let n=this.startNode();if(n.key=this.parseIdentifier(!0),n.key.name!=="type"&&this.raise(S.ModuleAttributeDifferentFromType,n.key),t.has(n.key.name)&&this.raise(S.ModuleAttributesWithDuplicateKeys,n.key,{key:n.key.name}),t.add(n.key.name),this.expect(14),!this.match(134))throw this.raise(S.ModuleAttributeInvalidValue,this.state.startLoc);n.value=this.parseStringLiteral(this.state.value),r.push(this.finishNode(n,"ImportAttribute"))}while(this.eat(12));return r}maybeParseImportAttributes(r){let t;var n=!1;if(this.match(76)){if(this.hasPrecedingLineBreak()&&this.lookaheadCharCode()===40)return;this.next(),this.hasPlugin("moduleAttributes")?t=this.parseModuleAttributes():t=this.parseImportAttributes(),n=!0}else this.isContextual(94)&&!this.hasPrecedingLineBreak()?(!this.hasPlugin("deprecatedImportAssert")&&!this.hasPlugin("importAssertions")&&this.raise(S.ImportAttributesUseAssert,this.state.startLoc),this.hasPlugin("importAssertions")||this.addExtra(r,"deprecatedAssertSyntax",!0),this.next(),t=this.parseImportAttributes()):t=[];!n&&this.hasPlugin("importAssertions")?r.assertions=t:r.attributes=t}maybeParseDefaultImportSpecifier(r,t){if(t){let n=this.startNodeAtNode(t);return n.local=t,r.specifiers.push(this.finishImportSpecifier(n,"ImportDefaultSpecifier")),!0}else if(hr(this.state.type))return this.parseImportSpecifierLocal(r,this.startNode(),"ImportDefaultSpecifier"),!0;return!1}maybeParseStarImportSpecifier(r){if(this.match(55)){let t=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(r,t,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(r){let t=!0;for(this.expect(5);!this.eat(8);){if(t)t=!1;else{if(this.eat(14))throw this.raise(S.DestructureNamedImport,this.state.startLoc);if(this.expect(12),this.eat(8))break}let n=this.startNode(),i=this.match(134),s=this.isContextual(130);n.imported=this.parseModuleExportName();let o=this.parseImportSpecifier(n,i,r.importKind==="type"||r.importKind==="typeof",s,void 0);r.specifiers.push(o)}}parseImportSpecifier(r,t,n,i,s){if(this.eatContextual(93))r.local=this.parseIdentifier();else{let{imported:o}=r;if(t)throw this.raise(S.ImportBindingIsString,r,{importName:o.value});this.checkReservedWord(o.name,r.loc.start,!0,!0),r.local||(r.local=un(o))}return this.finishImportSpecifier(r,"ImportSpecifier",s)}isThisParam(r){return r.type==="Identifier"&&r.name==="this"}},Fa=class extends Mc{constructor(r,t,n){r=uv(r),super(r,t),this.options=r,this.initializeScopes(),this.plugins=n,this.filename=r.sourceFilename,this.startIndex=r.startIndex;let i=0;r.allowAwaitOutsideFunction&&(i|=1),r.allowReturnOutsideFunction&&(i|=2),r.allowImportExportEverywhere&&(i|=8),r.allowSuperOutsideMethod&&(i|=16),r.allowUndeclaredExports&&(i|=32),r.allowNewTargetOutsideFunction&&(i|=4),r.ranges&&(i|=64),r.tokens&&(i|=128),r.createImportExpressions&&(i|=256),r.createParenthesizedExpressions&&(i|=512),r.errorRecovery&&(i|=1024),r.attachComment&&(i|=2048),r.annexB&&(i|=4096),this.optionFlags=i}getScopeHandler(){return Gs}parse(){this.enterInitialScopes();let r=this.startNode(),t=this.startNode();return this.nextToken(),r.errors=null,this.parseTopLevel(r,t),r.errors=this.state.errors,r.comments.length=this.state.commentsLen,r}};function mP(e,r){var t;if(((t=r)==null?void 0:t.sourceType)==="unambiguous"){r=Object.assign({},r);try{r.sourceType="module";let n=zs(r,e),i=n.parse();if(n.sawUnambiguousESM)return i;if(n.ambiguousScriptDifferentAst)try{return r.sourceType="script",zs(r,e).parse()}catch{}else i.program.sourceType="script";return i}catch(n){try{return r.sourceType="script",zs(r,e).parse()}catch{}throw n}}else return zs(r,e).parse()}function hP(e,r){let t=zs(r,e);return t.options.strictMode&&(t.state.strict=!0),t.getExpression()}function gP(e){let r={};for(let t of Object.keys(e))r[t]=sn(e[t]);return r}var yP=gP(fv);function zs(e,r){let t=Fa,n=new Map;if(e!=null&&e.plugins){for(let i of e.plugins){let s,o;typeof i=="string"?s=i:[s,o]=i,n.has(s)||n.set(s,o||{})}uP(n),t=bP(n)}return new t(e,r,n)}var Ly=new Map;function bP(e){let r=[];for(let i of cP)e.has(i)&&r.push(i);let t=r.join("|"),n=Ly.get(t);if(!n){n=Fa;for(let i of r)n=Xy[i](n);Ly.set(t,n)}return n}Js.parse=mP;Js.parseExpression=hP;Js.tokTypes=yP});var ax=se((m4,ox)=>{ox.exports=sx;sx.sync=$I;var nx=require("fs");function MI(e,r){var t=r.pathExt!==void 0?r.pathExt:process.env.PATHEXT;if(!t||(t=t.split(";"),t.indexOf("")!==-1))return!0;for(var n=0;n<t.length;n++){var i=t[n].toLowerCase();if(i&&e.substr(-i.length).toLowerCase()===i)return!0}return!1}function ix(e,r,t){return!e.isSymbolicLink()&&!e.isFile()?!1:MI(r,t)}function sx(e,r,t){nx.stat(e,function(n,i){t(n,n?!1:ix(i,e,r))})}function $I(e,r){return ix(nx.statSync(e),e,r)}});var dx=se((h4,px)=>{px.exports=ux;ux.sync=UI;var lx=require("fs");function ux(e,r,t){lx.stat(e,function(n,i){t(n,n?!1:cx(i,r))})}function UI(e,r){return cx(lx.statSync(e),r)}function cx(e,r){return e.isFile()&&jI(e,r)}function jI(e,r){var t=e.mode,n=e.uid,i=e.gid,s=r.uid!==void 0?r.uid:process.getuid&&process.getuid(),o=r.gid!==void 0?r.gid:process.getgid&&process.getgid(),a=parseInt("100",8),l=parseInt("010",8),u=parseInt("001",8),c=a|l,p=t&u||t&l&&i===o||t&a&&n===s||t&c&&s===0;return p}});var mx=se((y4,fx)=>{var g4=require("fs"),pl;process.platform==="win32"||global.TESTING_WINDOWS?pl=ax():pl=dx();fx.exports=Bp;Bp.sync=KI;function Bp(e,r,t){if(typeof r=="function"&&(t=r,r={}),!t){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(n,i){Bp(e,r||{},function(s,o){s?i(s):n(o)})})}pl(e,r||{},function(n,i){n&&(n.code==="EACCES"||r&&r.ignoreErrors)&&(n=null,i=!1),t(n,i)})}function KI(e,r){try{return pl.sync(e,r||{})}catch(t){if(r&&r.ignoreErrors||t.code==="EACCES")return!1;throw t}}});var Ex=se((b4,xx)=>{var ss=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",hx=require("path"),VI=ss?";":":",gx=mx(),yx=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),bx=(e,r)=>{let t=r.colon||VI,n=e.match(/\//)||ss&&e.match(/\\/)?[""]:[...ss?[process.cwd()]:[],...(r.path||process.env.PATH||"").split(t)],i=ss?r.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=ss?i.split(t):[""];return ss&&e.indexOf(".")!==-1&&s[0]!==""&&s.unshift(""),{pathEnv:n,pathExt:s,pathExtExe:i}},Dx=(e,r,t)=>{typeof r=="function"&&(t=r,r={}),r||(r={});let{pathEnv:n,pathExt:i,pathExtExe:s}=bx(e,r),o=[],a=u=>new Promise((c,p)=>{if(u===n.length)return r.all&&o.length?c(o):p(yx(e));let d=n[u],f=/^".*"$/.test(d)?d.slice(1,-1):d,m=hx.join(f,e),h=!f&&/^\.[\\\/]/.test(e)?e.slice(0,2)+m:m;c(l(h,u,0))}),l=(u,c,p)=>new Promise((d,f)=>{if(p===i.length)return d(a(c+1));let m=i[p];gx(u+m,{pathExt:s},(h,g)=>{if(!h&&g)if(r.all)o.push(u+m);else return d(u+m);return d(l(u,c,p+1))})});return t?a(0).then(u=>t(null,u),t):a(0)},zI=(e,r)=>{r=r||{};let{pathEnv:t,pathExt:n,pathExtExe:i}=bx(e,r),s=[];for(let o=0;o<t.length;o++){let a=t[o],l=/^".*"$/.test(a)?a.slice(1,-1):a,u=hx.join(l,e),c=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+u:u;for(let p=0;p<n.length;p++){let d=c+n[p];try{if(gx.sync(d,{pathExt:i}))if(r.all)s.push(d);else return d}catch{}}}if(r.all&&s.length)return s;if(r.nothrow)return null;throw yx(e)};xx.exports=Dx;Dx.sync=zI});var Sx=se((D4,Mp)=>{"use strict";var Cx=(e={})=>{let r=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(r).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"};Mp.exports=Cx;Mp.exports.default=Cx});var vx=se((x4,Ax)=>{"use strict";var Tx=require("path"),qI=Ex(),WI=Sx();function wx(e,r){let t=e.options.env||process.env,n=process.cwd(),i=e.options.cwd!=null,s=i&&process.chdir!==void 0&&!process.chdir.disabled;if(s)try{process.chdir(e.options.cwd)}catch{}let o;try{o=qI.sync(e.command,{path:t[WI({env:t})],pathExt:r?Tx.delimiter:void 0})}catch{}finally{s&&process.chdir(n)}return o&&(o=Tx.resolve(i?e.options.cwd:"",o)),o}function GI(e){return wx(e)||wx(e,!0)}Ax.exports=GI});var Px=se((E4,Up)=>{"use strict";var $p=/([()\][%!^"`<>&|;, *?])/g;function HI(e){return e=e.replace($p,"^$1"),e}function JI(e,r){return e=`${e}`,e=e.replace(/(\\*)"/g,'$1$1\\"'),e=e.replace(/(\\*)$/,"$1$1"),e=`"${e}"`,e=e.replace($p,"^$1"),r&&(e=e.replace($p,"^$1")),e}Up.exports.command=HI;Up.exports.argument=JI});var Nx=se((C4,Ix)=>{"use strict";Ix.exports=/^#!(.*)/});var _x=se((S4,Fx)=>{"use strict";var YI=Nx();Fx.exports=(e="")=>{let r=e.match(YI);if(!r)return null;let[t,n]=r[0].replace(/#! ?/,"").split(" "),i=t.split("/").pop();return i==="env"?n:n?`${i} ${n}`:i}});var Ox=se((T4,kx)=>{"use strict";var jp=require("fs"),XI=_x();function QI(e){let t=Buffer.alloc(150),n;try{n=jp.openSync(e,"r"),jp.readSync(n,t,0,150,0),jp.closeSync(n)}catch{}return XI(t.toString())}kx.exports=QI});var Mx=se((w4,Bx)=>{"use strict";var ZI=require("path"),Rx=vx(),Lx=Px(),eN=Ox(),tN=process.platform==="win32",rN=/\.(?:com|exe)$/i,nN=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function iN(e){e.file=Rx(e);let r=e.file&&eN(e.file);return r?(e.args.unshift(e.file),e.command=r,Rx(e)):e.file}function sN(e){if(!tN)return e;let r=iN(e),t=!rN.test(r);if(e.options.forceShell||t){let n=nN.test(r);e.command=ZI.normalize(e.command),e.command=Lx.command(e.command),e.args=e.args.map(s=>Lx.argument(s,n));let i=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${i}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}function oN(e,r,t){r&&!Array.isArray(r)&&(t=r,r=null),r=r?r.slice(0):[],t=Object.assign({},t);let n={command:e,args:r,options:t,file:void 0,original:{command:e,args:r}};return t.shell?n:sN(n)}Bx.exports=oN});var jx=se((A4,Ux)=>{"use strict";var Kp=process.platform==="win32";function Vp(e,r){return Object.assign(new Error(`${r} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${r} ${e.command}`,path:e.command,spawnargs:e.args})}function aN(e,r){if(!Kp)return;let t=e.emit;e.emit=function(n,i){if(n==="exit"){let s=$x(i,r,"spawn");if(s)return t.call(e,"error",s)}return t.apply(e,arguments)}}function $x(e,r){return Kp&&e===1&&!r.file?Vp(r.original,"spawn"):null}function lN(e,r){return Kp&&e===1&&!r.file?Vp(r.original,"spawnSync"):null}Ux.exports={hookChildProcess:aN,verifyENOENT:$x,verifyENOENTSync:lN,notFoundError:Vp}});var zx=se((v4,os)=>{"use strict";var Kx=require("child_process"),zp=Mx(),qp=jx();function Vx(e,r,t){let n=zp(e,r,t),i=Kx.spawn(n.command,n.args,n.options);return qp.hookChildProcess(i,n),i}function uN(e,r,t){let n=zp(e,r,t),i=Kx.spawnSync(n.command,n.args,n.options);return i.error=i.error||qp.verifyENOENTSync(i.status,n),i}os.exports=Vx;os.exports.spawn=Vx;os.exports.sync=uN;os.exports._parse=zp;os.exports._enoent=qp});var vE=se(ls=>{"use strict";ls.__esModule=!0;ls.distance=ls.closest=void 0;var hn=new Uint32Array(65536),AF=function(e,r){for(var t=e.length,n=r.length,i=1<<t-1,s=-1,o=0,a=t,l=t;l--;)hn[e.charCodeAt(l)]|=1<<l;for(l=0;l<n;l++){var u=hn[r.charCodeAt(l)],c=u|o;u|=(u&s)+s^s,o|=~(u|s),s&=u,o&i&&a++,s&i&&a--,o=o<<1|1,s=s<<1|~(c|o),o&=c}for(l=t;l--;)hn[e.charCodeAt(l)]=0;return a},vF=function(e,r){for(var t=r.length,n=e.length,i=[],s=[],o=Math.ceil(t/32),a=Math.ceil(n/32),l=0;l<o;l++)s[l]=-1,i[l]=0;for(var u=0;u<a-1;u++){for(var c=0,p=-1,d=u*32,f=Math.min(32,n)+d,m=d;m<f;m++)hn[e.charCodeAt(m)]|=1<<m;for(var l=0;l<t;l++){var h=hn[r.charCodeAt(l)],g=s[l/32|0]>>>l&1,y=i[l/32|0]>>>l&1,b=h|c,C=((h|y)&p)+p^p|h|y,x=c|~(C|p),D=p&C;x>>>31^g&&(s[l/32|0]^=1<<l),D>>>31^y&&(i[l/32|0]^=1<<l),x=x<<1|g,D=D<<1|y,p=D|~(b|x),c=x&b}for(var m=d;m<f;m++)hn[e.charCodeAt(m)]=0}for(var E=0,w=-1,O=u*32,B=Math.min(32,n-O)+O,m=O;m<B;m++)hn[e.charCodeAt(m)]|=1<<m;for(var N=n,l=0;l<t;l++){var h=hn[r.charCodeAt(l)],g=s[l/32|0]>>>l&1,y=i[l/32|0]>>>l&1,b=h|E,C=((h|y)&w)+w^w|h|y,x=E|~(C|w),D=w&C;N+=x>>>n-1&1,N-=D>>>n-1&1,x>>>31^g&&(s[l/32|0]^=1<<l),D>>>31^y&&(i[l/32|0]^=1<<l),x=x<<1|g,D=D<<1|y,w=D|~(b|x),E=x&b}for(var m=O;m<B;m++)hn[e.charCodeAt(m)]=0;return N},AE=function(e,r){if(e.length<r.length){var t=r;r=e,e=t}return r.length===0?e.length:e.length<=32?AF(e,r):vF(e,r)};ls.distance=AE;var PF=function(e,r){for(var t=1/0,n=0,i=0;i<r.length;i++){var s=AE(e,r[i]);s<t&&(t=s,n=i)}return r[n]};ls.closest=PF});var UF={};module.exports=QE(UF);var OE=require("../core/index.cjs"),RE=require("../node/index.cjs"),LE=require("../server/index.cjs"),BE=V(Ed(),1);var wl=require("fs/promises");var pi=V(require("prettier"),1);async function ar(e,r,t){try{if(t){let i=await pi.default.getFileInfo(t);if(i.ignored||i.inferredParser==null)return e}let n=await pi.default.resolveConfigFile(process.cwd());if(n){let i=await pi.default.resolveConfig(n);return await pi.default.format(e,{...i,filepath:t,parser:r})}else return await pi.default.format(e,{filepath:t,parser:r})}catch(n){return console.warn("Error formatting code",n),e}}var xE=require("http");var Fl="preview-url";var di="framework",To="platform",wo="node",Cd="/~builder-connect",Mn="/~builder-connected",_l="/~builder-dev-tools",kl="/~builder-dev-tools.js",$n="/~builder-dev-tools-close",Sd="/mappings";var EE=require("node:os"),Tl=require("node:path"),Kr=require("node:fs");var St=V(Ao(),1),mi=require("node:process"),yn=V(require("node:readline"),1),$l=V(require("node:readline"),1),Ld=require("node:tty"),No=V(Ze(),1);function o0({onlyFirst:e=!1}={}){let r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(r,e?void 0:"g")}var a0=o0();function Bd(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(a0,"")}function Md(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $d={exports:{}};(function(e){var r={};e.exports=r,r.eastAsianWidth=function(n){var i=n.charCodeAt(0),s=n.length==2?n.charCodeAt(1):0,o=i;return 55296<=i&&i<=56319&&56320<=s&&s<=57343&&(i&=1023,s&=1023,o=i<<10|s,o+=65536),o==12288||65281<=o&&o<=65376||65504<=o&&o<=65510?"F":o==8361||65377<=o&&o<=65470||65474<=o&&o<=65479||65482<=o&&o<=65487||65490<=o&&o<=65495||65498<=o&&o<=65500||65512<=o&&o<=65518?"H":4352<=o&&o<=4447||4515<=o&&o<=4519||4602<=o&&o<=4607||9001<=o&&o<=9002||11904<=o&&o<=11929||11931<=o&&o<=12019||12032<=o&&o<=12245||12272<=o&&o<=12283||12289<=o&&o<=12350||12353<=o&&o<=12438||12441<=o&&o<=12543||12549<=o&&o<=12589||12593<=o&&o<=12686||12688<=o&&o<=12730||12736<=o&&o<=12771||12784<=o&&o<=12830||12832<=o&&o<=12871||12880<=o&&o<=13054||13056<=o&&o<=19903||19968<=o&&o<=42124||42128<=o&&o<=42182||43360<=o&&o<=43388||44032<=o&&o<=55203||55216<=o&&o<=55238||55243<=o&&o<=55291||63744<=o&&o<=64255||65040<=o&&o<=65049||65072<=o&&o<=65106||65108<=o&&o<=65126||65128<=o&&o<=65131||110592<=o&&o<=110593||127488<=o&&o<=127490||127504<=o&&o<=127546||127552<=o&&o<=127560||127568<=o&&o<=127569||131072<=o&&o<=194367||177984<=o&&o<=196605||196608<=o&&o<=262141?"W":32<=o&&o<=126||162<=o&&o<=163||165<=o&&o<=166||o==172||o==175||10214<=o&&o<=10221||10629<=o&&o<=10630?"Na":o==161||o==164||167<=o&&o<=168||o==170||173<=o&&o<=174||176<=o&&o<=180||182<=o&&o<=186||188<=o&&o<=191||o==198||o==208||215<=o&&o<=216||222<=o&&o<=225||o==230||232<=o&&o<=234||236<=o&&o<=237||o==240||242<=o&&o<=243||247<=o&&o<=250||o==252||o==254||o==257||o==273||o==275||o==283||294<=o&&o<=295||o==299||305<=o&&o<=307||o==312||319<=o&&o<=322||o==324||328<=o&&o<=331||o==333||338<=o&&o<=339||358<=o&&o<=359||o==363||o==462||o==464||o==466||o==468||o==470||o==472||o==474||o==476||o==593||o==609||o==708||o==711||713<=o&&o<=715||o==717||o==720||728<=o&&o<=731||o==733||o==735||768<=o&&o<=879||913<=o&&o<=929||931<=o&&o<=937||945<=o&&o<=961||963<=o&&o<=969||o==1025||1040<=o&&o<=1103||o==1105||o==8208||8211<=o&&o<=8214||8216<=o&&o<=8217||8220<=o&&o<=8221||8224<=o&&o<=8226||8228<=o&&o<=8231||o==8240||8242<=o&&o<=8243||o==8245||o==8251||o==8254||o==8308||o==8319||8321<=o&&o<=8324||o==8364||o==8451||o==8453||o==8457||o==8467||o==8470||8481<=o&&o<=8482||o==8486||o==8491||8531<=o&&o<=8532||8539<=o&&o<=8542||8544<=o&&o<=8555||8560<=o&&o<=8569||o==8585||8592<=o&&o<=8601||8632<=o&&o<=8633||o==8658||o==8660||o==8679||o==8704||8706<=o&&o<=8707||8711<=o&&o<=8712||o==8715||o==8719||o==8721||o==8725||o==8730||8733<=o&&o<=8736||o==8739||o==8741||8743<=o&&o<=8748||o==8750||8756<=o&&o<=8759||8764<=o&&o<=8765||o==8776||o==8780||o==8786||8800<=o&&o<=8801||8804<=o&&o<=8807||8810<=o&&o<=8811||8814<=o&&o<=8815||8834<=o&&o<=8835||8838<=o&&o<=8839||o==8853||o==8857||o==8869||o==8895||o==8978||9312<=o&&o<=9449||9451<=o&&o<=9547||9552<=o&&o<=9587||9600<=o&&o<=9615||9618<=o&&o<=9621||9632<=o&&o<=9633||9635<=o&&o<=9641||9650<=o&&o<=9651||9654<=o&&o<=9655||9660<=o&&o<=9661||9664<=o&&o<=9665||9670<=o&&o<=9672||o==9675||9678<=o&&o<=9681||9698<=o&&o<=9701||o==9711||9733<=o&&o<=9734||o==9737||9742<=o&&o<=9743||9748<=o&&o<=9749||o==9756||o==9758||o==9792||o==9794||9824<=o&&o<=9825||9827<=o&&o<=9829||9831<=o&&o<=9834||9836<=o&&o<=9837||o==9839||9886<=o&&o<=9887||9918<=o&&o<=9919||9924<=o&&o<=9933||9935<=o&&o<=9953||o==9955||9960<=o&&o<=9983||o==10045||o==10071||10102<=o&&o<=10111||11093<=o&&o<=11097||12872<=o&&o<=12879||57344<=o&&o<=63743||65024<=o&&o<=65039||o==65533||127232<=o&&o<=127242||127248<=o&&o<=127277||127280<=o&&o<=127337||127344<=o&&o<=127386||917760<=o&&o<=917999||983040<=o&&o<=1048573||1048576<=o&&o<=1114109?"A":"N"},r.characterLength=function(n){var i=this.eastAsianWidth(n);return i=="F"||i=="W"||i=="A"?2:1};function t(n){return n.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}r.length=function(n){for(var i=t(n),s=0,o=0;o<i.length;o++)s=s+this.characterLength(i[o]);return s},r.slice=function(n,i,s){textLen=r.length(n),i=i||0,s=s||1,i<0&&(i=textLen+i),s<0&&(s=textLen+s);for(var o="",a=0,l=t(n),u=0;u<l.length;u++){var c=l[u],p=r.length(c);if(a>=i-(p==2?1:0))if(a+p<=s)o+=c;else break;a+=p}return o}})($d);var l0=$d.exports,u0=Md(l0),c0=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g},p0=Md(c0);function ms(e,r={}){if(typeof e!="string"||e.length===0||(r={ambiguousIsNarrow:!0,...r},e=Bd(e),e.length===0))return 0;e=e.replace(p0()," ");let t=r.ambiguousIsNarrow?1:2,n=0;for(let i of e){let s=i.codePointAt(0);if(!(s<=31||s>=127&&s<=159||s>=768&&s<=879))switch(u0.eastAsianWidth(i)){case"F":case"W":n+=2;break;case"A":n+=t;break;default:n+=1}}return n}var Bl=10,vd=(e=0)=>r=>`\x1B[${r+e}m`,Pd=(e=0)=>r=>`\x1B[${38+e};5;${r}m`,Id=(e=0)=>(r,t,n)=>`\x1B[${38+e};2;${r};${t};${n}m`,ze={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(ze.modifier);var d0=Object.keys(ze.color),f0=Object.keys(ze.bgColor);[...d0,...f0];function m0(){let e=new Map;for(let[r,t]of Object.entries(ze)){for(let[n,i]of Object.entries(t))ze[n]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},t[n]=ze[n],e.set(i[0],i[1]);Object.defineProperty(ze,r,{value:t,enumerable:!1})}return Object.defineProperty(ze,"codes",{value:e,enumerable:!1}),ze.color.close="\x1B[39m",ze.bgColor.close="\x1B[49m",ze.color.ansi=vd(),ze.color.ansi256=Pd(),ze.color.ansi16m=Id(),ze.bgColor.ansi=vd(Bl),ze.bgColor.ansi256=Pd(Bl),ze.bgColor.ansi16m=Id(Bl),Object.defineProperties(ze,{rgbToAnsi256:{value:(r,t,n)=>r===t&&t===n?r<8?16:r>248?231:Math.round((r-8)/247*24)+232:16+36*Math.round(r/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value:r=>{let t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(r.toString(16));if(!t)return[0,0,0];let[n]=t;n.length===3&&(n=[...n].map(s=>s+s).join(""));let i=Number.parseInt(n,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:r=>ze.rgbToAnsi256(...ze.hexToRgb(r)),enumerable:!1},ansi256ToAnsi:{value:r=>{if(r<8)return 30+r;if(r<16)return 90+(r-8);let t,n,i;if(r>=232)t=((r-232)*10+8)/255,n=t,i=t;else{r-=16;let a=r%36;t=Math.floor(r/36)/5,n=Math.floor(a/6)/5,i=a%6/5}let s=Math.max(t,n,i)*2;if(s===0)return 30;let o=30+(Math.round(i)<<2|Math.round(n)<<1|Math.round(t));return s===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(r,t,n)=>ze.ansi256ToAnsi(ze.rgbToAnsi256(r,t,n)),enumerable:!1},hexToAnsi:{value:r=>ze.ansi256ToAnsi(ze.hexToAnsi256(r)),enumerable:!1}}),ze}var h0=m0(),ko=new Set(["\x1B","\x9B"]),g0=39,Ul="\x07",Ud="[",y0="]",jd="m",jl=`${y0}8;;`,Nd=e=>`${ko.values().next().value}${Ud}${e}${jd}`,Fd=e=>`${ko.values().next().value}${jl}${e}${Ul}`,b0=e=>e.split(" ").map(r=>ms(r)),Ml=(e,r,t)=>{let n=[...r],i=!1,s=!1,o=ms(Bd(e[e.length-1]));for(let[a,l]of n.entries()){let u=ms(l);if(o+u<=t?e[e.length-1]+=l:(e.push(l),o=0),ko.has(l)&&(i=!0,s=n.slice(a+1).join("").startsWith(jl)),i){s?l===Ul&&(i=!1,s=!1):l===jd&&(i=!1);continue}o+=u,o===t&&a<n.length-1&&(e.push(""),o=0)}!o&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop())},D0=e=>{let r=e.split(" "),t=r.length;for(;t>0&&!(ms(r[t-1])>0);)t--;return t===r.length?e:r.slice(0,t).join(" ")+r.slice(t).join("")},x0=(e,r,t={})=>{if(t.trim!==!1&&e.trim()==="")return"";let n="",i,s,o=b0(e),a=[""];for(let[u,c]of e.split(" ").entries()){t.trim!==!1&&(a[a.length-1]=a[a.length-1].trimStart());let p=ms(a[a.length-1]);if(u!==0&&(p>=r&&(t.wordWrap===!1||t.trim===!1)&&(a.push(""),p=0),(p>0||t.trim===!1)&&(a[a.length-1]+=" ",p++)),t.hard&&o[u]>r){let d=r-p,f=1+Math.floor((o[u]-d-1)/r);Math.floor((o[u]-1)/r)<f&&a.push(""),Ml(a,c,r);continue}if(p+o[u]>r&&p>0&&o[u]>0){if(t.wordWrap===!1&&p<r){Ml(a,c,r);continue}a.push("")}if(p+o[u]>r&&t.wordWrap===!1){Ml(a,c,r);continue}a[a.length-1]+=c}t.trim!==!1&&(a=a.map(u=>D0(u)));let l=[...a.join(`
|
|
23
23
|
`)];for(let[u,c]of l.entries()){if(n+=c,ko.has(c)){let{groups:d}=new RegExp(`(?:\\${Ud}(?<code>\\d+)m|\\${jl}(?<uri>.*)${Ul})`).exec(l.slice(u).join(""))||{groups:{}};if(d.code!==void 0){let f=Number.parseFloat(d.code);i=f===g0?void 0:f}else d.uri!==void 0&&(s=d.uri.length===0?void 0:d.uri)}let p=h0.codes.get(Number(i));l[u+1]===`
|
|
24
24
|
`?(s&&(n+=Fd("")),i&&p&&(n+=Nd(p))):c===`
|
|
25
25
|
`&&(i&&p&&(n+=Nd(i)),s&&(n+=Fd(s)))}return n};function _d(e,r,t){return String(e).normalize().replace(/\r\n/g,`
|
|
@@ -988,7 +988,7 @@ module.exports = nextConfig
|
|
|
988
988
|
`:`
|
|
989
989
|
`)+t,i=n+1,n=e.indexOf(`
|
|
990
990
|
`,i)}while(n!==-1);return s+=e.slice(i),s}var{stdout:Kg,stderr:Vg}=$g,Qu=Symbol("GENERATOR"),ki=Symbol("STYLER"),Ls=Symbol("IS_EMPTY"),zg=["ansi","ansi","ansi256","ansi16m"],Oi=Object.create(null),TA=(e,r={})=>{if(r.level&&!(Number.isInteger(r.level)&&r.level>=0&&r.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let t=Kg?Kg.level:0;e.level=r.level===void 0?t:r.level},ga=class{constructor(r){return qg(r)}},qg=e=>{let r=(...t)=>t.join(" ");return TA(r,e),Object.setPrototypeOf(r,Bs.prototype),r};function Bs(e){return qg(e)}Object.setPrototypeOf(Bs.prototype,Function.prototype);for(let[e,r]of Object.entries(fr))Oi[e]={get(){let t=ya(this,ec(r.open,r.close,this[ki]),this[Ls]);return Object.defineProperty(this,e,{value:t}),t}};Oi.visible={get(){let e=ya(this,this[ki],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var Zu=(e,r,t,...n)=>e==="rgb"?r==="ansi16m"?fr[t].ansi16m(...n):r==="ansi256"?fr[t].ansi256(fr.rgbToAnsi256(...n)):fr[t].ansi(fr.rgbToAnsi(...n)):e==="hex"?Zu("rgb",r,t,...fr.hexToRgb(...n)):fr[t][e](...n),wA=["rgb","hex","ansi256"];for(let e of wA){Oi[e]={get(){let{level:t}=this;return function(...n){let i=ec(Zu(e,zg[t],"color",...n),fr.color.close,this[ki]);return ya(this,i,this[Ls])}}};let r="bg"+e[0].toUpperCase()+e.slice(1);Oi[r]={get(){let{level:t}=this;return function(...n){let i=ec(Zu(e,zg[t],"bgColor",...n),fr.bgColor.close,this[ki]);return ya(this,i,this[Ls])}}}}var AA=Object.defineProperties(()=>{},{...Oi,level:{enumerable:!0,get(){return this[Qu].level},set(e){this[Qu].level=e}}}),ec=(e,r,t)=>{let n,i;return t===void 0?(n=e,i=r):(n=t.openAll+e,i=r+t.closeAll),{open:e,close:r,openAll:n,closeAll:i,parent:t}},ya=(e,r,t)=>{let n=(...i)=>vA(n,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(n,AA),n[Qu]=e,n[ki]=r,n[Ls]=t,n},vA=(e,r)=>{if(e.level<=0||!r)return e[Ls]?"":r;let t=e[ki];if(t===void 0)return r;let{openAll:n,closeAll:i}=t;if(r.includes("\x1B"))for(;t!==void 0;)r=Ug(r,t.close,t.open),t=t.parent;let s=r.indexOf(`
|
|
991
|
-
`);return s!==-1&&(r=jg(r,i,n,s)),n+r+i};Object.defineProperties(Bs.prototype,Oi);var M3=Bs(),$3=Bs({level:Vg?Vg.level:0});var be=new ga({level:2}),Wg={comment:be.gray,quote:be.gray,keyword:be.green,"selector-tag":be.green,addition:be.green,number:be.cyan,string:be.cyan,"meta meta-string":be.cyan,literal:be.cyan,doctag:be.cyan,regexp:be.cyan,title:be.blue,section:be.blue,name:be.blue,"selector-id":be.blue,"selector-class":be.blue,attribute:be.yellow,attr:be.yellow,variable:be.yellow,"template-variable":be.yellow,"class title":be.yellow,type:be.yellow,symbol:be.magenta,bullet:be.magenta,subst:be.magenta,meta:be.magenta,"meta keyword":be.magenta,"selector-attr":be.magenta,"selector-pseudo":be.magenta,link:be.magenta,built_in:be.red,deletion:be.red,emphasis:be.italic,strong:be.bold,formula:be.inverse};function Xn(e){let r=Yu(e);return{highlight:t,highlightAuto:n,listLanguages:r.listLanguages,register:r.register,registerAlias:r.registerAlias,registered:r.registered};function t(i,s,o){let a=r.highlight(i,s),l=a.data;return{language:l.language,relevance:l.relevance,value:tc(o||Wg,a)}}function n(i,s){let o,a;if(s&&("subset"in s||"sheet"in s)){let c=s;a={subset:c.subset},o=c.sheet}else o=s;let l=r.highlightAuto(i,a),u=l.data;return{language:u.language,relevance:u.relevance,value:tc(o||Wg,l)}}}function tc(e,r){let t=new Set(r.type==="element"&&Array.isArray(r.properties.className)?r.properties.className.map(function(a){return String(a).replace(/^hljs-/,"")}):[]),n={},i,s="",o;for(o in e)if(Object.hasOwn(e,o)){let a=o.split(" "),l=e[o];t.has(a[0])?a.length===1?i=l:n[a.slice(1).join(" ")]=l:n[o]=l}return"value"in r?s=r.value:"children"in r&&(s=PA(n,r.children)),i&&(s=i(s)),s}function PA(e,r){let t=[],n=-1;for(;++n<r.length;)t.push(tc(e,r[n]));return t.join("")}var Gg=V(require("@sentry/node"),1),Hg=V(require("@amplitude/analytics-node"),1);async function ee(e){if(process.env.NODE_ENV!=="test")try{await Promise.allSettled([Gg.flush(2e3),Hg.flush().promise])}catch(r){console.error(r)}process.exit(e)}var Gt=process.env.AIR_HOST||"https://air-layout-v2-tk43uighdq-uc.a.run.app";var Mr=V(require("@amplitude/analytics-node"),1),$r=V(require("@sentry/node"),1);var Jg="1.6.1";var ht=require("node:fs/promises"),Yb=require("node:crypto"),Ye=require("node:fs"),uo=require("node:os"),ve=V(require("node:path"),1),mp=V(require("prettier"),1),Xb=V(require("typescript"),1),Qb=V(require("launch-editor"),1);var es=require("node:child_process");var fp={};XE(fp,{MagicastError:()=>wt,builders:()=>H1,detectCodeFormat:()=>Gb,generateCode:()=>dp,loadFile:()=>W1,parseExpression:()=>Jb,parseModule:()=>Hb,writeFile:()=>G1});var ja=require("node:fs");var Ja=V(Ey(),1),fb=V(Qy(),1);function Yt(e){var r=e.use(Qe),t=r.Type,n=r.builtInTypes,i=n.number;function s(u){return t.from(c=>i.check(c)&&c>=u,i+" >= "+u)}let o={null:function(){return null},emptyArray:function(){return[]},false:function(){return!1},true:function(){return!0},undefined:function(){},"use strict":function(){return"use strict"}};var a=t.or(n.string,n.number,n.boolean,n.null,n.undefined);let l=t.from(u=>{if(u===null)return!0;var c=typeof u;return!(c==="object"||c==="function")},a.toString());return{geq:s,defaults:o,isPrimitive:l}}function Oe(e){try{var r=e(),t=r.exports,n=t.default}catch{return}n&&n!==t&&typeof t=="object"&&(Object.assign(n,t,{default:n}),t.__esModule&&Object.defineProperty(n,"__esModule",{value:!0}),r.exports=n)}var DP=Object.defineProperty,xP=(e,r,t)=>r in e?DP(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,kt=(e,r,t)=>(xP(e,typeof r!="symbol"?r+"":r,t),t),mb=Object.prototype,Ka=mb.toString,sr=mb.hasOwnProperty,oi=class{assert(r,t){if(!this.check(r,t)){var n=ap(r);throw new Error(n+" does not match type "+this)}return!0}arrayOf(){let r=this;return new io(r)}},io=class extends oi{constructor(r){super(),this.elemType=r,kt(this,"kind","ArrayType")}toString(){return"["+this.elemType+"]"}check(r,t){return Array.isArray(r)&&r.every(n=>this.elemType.check(n,t))}},Va=class extends oi{constructor(r){super(),this.value=r,kt(this,"kind","IdentityType")}toString(){return String(this.value)}check(r,t){let n=r===this.value;return!n&&typeof t=="function"&&t(this,r),n}},za=class extends oi{constructor(r){super(),this.fields=r,kt(this,"kind","ObjectType")}toString(){return"{ "+this.fields.join(", ")+" }"}check(r,t){return Ka.call(r)===Ka.call({})&&this.fields.every(n=>n.type.check(r[n.name],t))}},qa=class extends oi{constructor(r){super(),this.types=r,kt(this,"kind","OrType")}toString(){return this.types.join(" | ")}check(r,t){return this.types.some(n=>n.check(r,!!t))?!0:(typeof t=="function"&&t(this,r),!1)}},si=class extends oi{constructor(r,t){super(),this.name=r,this.predicate=t,kt(this,"kind","PredicateType")}toString(){return this.name}check(r,t){let n=this.predicate(r,t);return!n&&typeof t=="function"&&t(this,r),n}},ro=class e{constructor(r,t){this.type=r,this.typeName=t,kt(this,"baseNames",[]),kt(this,"ownFields",Object.create(null)),kt(this,"allSupertypes",Object.create(null)),kt(this,"supertypeList",[]),kt(this,"allFields",Object.create(null)),kt(this,"fieldNames",[]),kt(this,"finalized",!1),kt(this,"buildable",!1),kt(this,"buildParams",[])}isSupertypeOf(r){if(r instanceof e){if(this.finalized!==!0||r.finalized!==!0)throw new Error("");return sr.call(r.allSupertypes,this.typeName)}else throw new Error(r+" is not a Def")}checkAllFields(r,t){var n=this.allFields;if(this.finalized!==!0)throw new Error(""+this.typeName);function i(s){var o=n[s],a=o.type,l=o.getValue(r);return a.check(l,t)}return r!==null&&typeof r=="object"&&Object.keys(n).every(i)}bases(...r){var t=this.baseNames;if(this.finalized){if(r.length!==t.length)throw new Error("");for(var n=0;n<r.length;n++)if(r[n]!==t[n])throw new Error("");return this}return r.forEach(i=>{t.indexOf(i)<0&&t.push(i)}),this}},Wa=class{constructor(r,t,n,i){this.name=r,this.type=t,this.defaultFn=n,kt(this,"hidden"),this.hidden=!!i}toString(){return JSON.stringify(this.name)+": "+this.type}getValue(r){var t=r[this.name];return typeof t<"u"||typeof this.defaultFn=="function"&&(t=this.defaultFn.call(r)),t}};function ap(e){return Array.isArray(e)?"["+e.map(ap).join(", ")+"]":e&&typeof e=="object"?"{ "+Object.keys(e).map(function(r){return r+": "+e[r]}).join(", ")+" }":JSON.stringify(e)}function Qe(e){let r={or(...v){return new qa(v.map(I=>r.from(I)))},from(v,I){if(v instanceof io||v instanceof Va||v instanceof za||v instanceof qa||v instanceof si)return v;if(v instanceof ro)return v.type;if(a.check(v)){if(v.length!==1)throw new Error("only one element type is permitted for typed arrays");return new io(r.from(v[0]))}if(l.check(v))return new za(Object.keys(v).map(H=>new Wa(H,r.from(v[H],H))));if(typeof v=="function"){var $=t.indexOf(v);if($>=0)return n[$];if(typeof I!="string")throw new Error("missing name");return new si(I,v)}return new Va(v)},def(v){return sr.call(y,v)?y[v]:y[v]=new C(v)},hasDef(v){return sr.call(y,v)}};var t=[],n=[];function i(v,I){let $=Ka.call(I),H=new si(v,xe=>Ka.call(xe)===$);return I&&typeof I.constructor=="function"&&(t.push(I.constructor),n.push(H)),H}let s=i("string","truthy"),o=i("function",function(){}),a=i("array",[]),l=i("object",{}),u=i("RegExp",/./),c=i("Date",new Date),p=i("number",3),d=i("boolean",!0),f=i("null",null),m=i("undefined",void 0),h=typeof BigInt=="function"?i("BigInt",BigInt(1234)):new si("BigInt",()=>!1),g={string:s,function:o,array:a,object:l,RegExp:u,Date:c,number:p,boolean:d,null:f,undefined:m,BigInt:h};var y=Object.create(null);function b(v){if(v&&typeof v=="object"){var I=v.type;if(typeof I=="string"&&sr.call(y,I)){var $=y[I];if($.finalized)return $}}return null}class C extends ro{constructor(I){super(new si(I,($,H)=>this.check($,H)),I)}check(I,$){if(this.finalized!==!0)throw new Error("prematurely checking unfinalized type "+this.typeName);if(I===null||typeof I!="object")return!1;var H=b(I);return H?$&&H===this?this.checkAllFields(I,$):this.isSupertypeOf(H)?$?H.checkAllFields(I,$)&&this.checkAllFields(I,!1):!0:!1:this.typeName==="SourceLocation"||this.typeName==="Position"?this.checkAllFields(I,$):!1}build(...I){if(this.buildParams=I,this.buildable)return this;this.field("type",String,()=>this.typeName),this.buildable=!0;let $=(xe,ae,me,yt)=>{if(!sr.call(xe,ae)){var Pt=this.allFields;if(!sr.call(Pt,ae))throw new Error(""+ae);var Vr=Pt[ae],ps=Vr.type,zr;if(yt)zr=me;else if(Vr.defaultFn)zr=Vr.defaultFn.call(xe);else{var ds="no value or default function given for field "+JSON.stringify(ae)+" of "+this.typeName+"("+this.buildParams.map(function(Pe){return Pt[Pe]}).join(", ")+")";throw new Error(ds)}if(!ps.check(zr))throw new Error(ap(zr)+" does not match field "+Vr+" of type "+this.typeName);xe[ae]=zr}},H=(...xe)=>{var ae=xe.length;if(!this.finalized)throw new Error("attempting to instantiate unfinalized type "+this.typeName);var me=Object.create(w);if(this.buildParams.forEach(function(yt,Pt){Pt<ae?$(me,yt,xe[Pt],!0):$(me,yt,null,!1)}),Object.keys(this.allFields).forEach(function(yt){$(me,yt,null,!1)}),me.type!==this.typeName)throw new Error("");return me};return H.from=xe=>{if(!this.finalized)throw new Error("attempting to instantiate unfinalized type "+this.typeName);var ae=Object.create(w);if(Object.keys(this.allFields).forEach(function(me){sr.call(xe,me)?$(ae,me,xe[me],!0):$(ae,me,null,!1)}),ae.type!==this.typeName)throw new Error("");return ae},Object.defineProperty(E,B(this.typeName),{enumerable:!0,value:H}),this}field(I,$,H,xe){return this.finalized?(console.error("Ignoring attempt to redefine field "+JSON.stringify(I)+" of finalized type "+JSON.stringify(this.typeName)),this):(this.ownFields[I]=new Wa(I,r.from($),H,xe),this)}finalize(){if(!this.finalized){var I=this.allFields,$=this.allSupertypes;this.baseNames.forEach(xe=>{var ae=y[xe];if(ae instanceof ro)ae.finalize(),M(I,ae.allFields),M($,ae.allSupertypes);else{var me="unknown supertype name "+JSON.stringify(xe)+" for subtype "+JSON.stringify(this.typeName);throw new Error(me)}}),M(I,this.ownFields),$[this.typeName]=this,this.fieldNames.length=0;for(var H in I)sr.call(I,H)&&!I[H].hidden&&this.fieldNames.push(H);Object.defineProperty(U,this.typeName,{enumerable:!0,value:this.type}),this.finalized=!0,F(this.typeName,this.supertypeList),this.buildable&&this.supertypeList.lastIndexOf("Expression")>=0&&re(this.typeName)}}}function x(v){if(!sr.call(y,v))throw new Error("");var I=y[v];if(I.finalized!==!0)throw new Error("");return I.supertypeList.slice(1)}function D(v){for(var I={},$=Object.keys(y),H=$.length,xe=0;xe<H;++xe){var ae=$[xe],me=y[ae];if(me.finalized!==!0)throw new Error(""+ae);for(var yt=0;yt<me.supertypeList.length;++yt){var Pt=me.supertypeList[yt];if(sr.call(v,Pt)){I[ae]=Pt;break}}}return I}var E=Object.create(null),w={};function O(v,I){var $=w[v];return m.check(I)?delete w[v]:(o.assert(I),Object.defineProperty(w,v,{enumerable:!0,configurable:!0,value:I})),$}function B(v){return v.replace(/^[A-Z]+/,function(I){var $=I.length;switch($){case 0:return"";case 1:return I.toLowerCase();default:return I.slice(0,$-1).toLowerCase()+I.charAt($-1)}})}function N(v){return v=B(v),v.replace(/(Expression)?$/,"Statement")}var U={};function oe(v){var I=b(v);if(I)return I.fieldNames.slice(0);if("type"in v)throw new Error("did not recognize object of type "+JSON.stringify(v.type));return Object.keys(v)}function G(v,I){var $=b(v);if($){var H=$.allFields[I];if(H)return H.getValue(v)}return v&&v[I]}function P(v,I,$){oe(v).forEach(function(H){I.call(this,H,G(v,H))},$)}function L(v,I,$){return oe(v).some(function(H){return I.call(this,H,G(v,H))},$)}function re(v){var I=N(v);if(E[I])return;var $=E[B(v)];if(!$)return;let H=function(...xe){return E.expressionStatement($.apply(E,xe))};H.from=function(...xe){return E.expressionStatement($.from.apply(E,xe))},E[I]=H}function F(v,I){I.length=0,I.push(v);for(var $=Object.create(null),H=0;H<I.length;++H){v=I[H];var xe=y[v];if(xe.finalized!==!0)throw new Error("");sr.call($,v)&&delete I[$[v]],$[v]=H,I.push.apply(I,xe.baseNames)}for(var ae=0,me=ae,yt=I.length;me<yt;++me)sr.call(I,me)&&(I[ae++]=I[me]);I.length=ae}function M(v,I){return Object.keys(I).forEach(function($){v[$]=I[$]}),v}function X(){Object.keys(y).forEach(function(v){y[v].finalize()})}return{Type:r,builtInTypes:g,getSupertypeNames:x,computeSupertypeLookupTable:D,builders:E,defineMethod:O,getBuilderName:B,getStatementBuilderName:N,namedTypes:U,getFieldNames:oe,getFieldValue:G,eachField:P,someField:L,finalize:X}}Oe(()=>module);var EP=Object.prototype,_a=EP.hasOwnProperty;function hb(e){var r=e.use(Qe),t=r.builtInTypes.array,n=r.builtInTypes.number;let i=function p(d,f,m){if(!(this instanceof p))throw new Error("Path constructor cannot be invoked without 'new'");if(f){if(!(f instanceof p))throw new Error("")}else f=null,m=null;this.value=d,this.parentPath=f,this.name=m,this.__childCache=null};var s=i.prototype;function o(p){return p.__childCache||(p.__childCache=Object.create(null))}function a(p,d){var f=o(p),m=p.getValueProperty(d),h=f[d];return(!_a.call(f,d)||h.value!==m)&&(h=f[d]=new p.constructor(m,p,d)),h}s.getValueProperty=function(d){return this.value[d]},s.get=function(...d){for(var f=this,m=d.length,h=0;h<m;++h)f=a(f,d[h]);return f},s.each=function(d,f){for(var m=[],h=this.value.length,g=0,g=0;g<h;++g)_a.call(this.value,g)&&(m[g]=this.get(g));for(f=f||this,g=0;g<h;++g)_a.call(m,g)&&d.call(f,m[g])},s.map=function(d,f){var m=[];return this.each(function(h){m.push(d.call(this,h))},f),m},s.filter=function(d,f){var m=[];return this.each(function(h){d.call(this,h)&&m.push(h)},f),m};function l(){}function u(p,d,f,m){if(t.assert(p.value),d===0)return l;var h=p.value.length;if(h<1)return l;var g=arguments.length;g===2?(f=0,m=h):g===3?(f=Math.max(f,0),m=h):(f=Math.max(f,0),m=Math.min(m,h)),n.assert(f),n.assert(m);for(var y=Object.create(null),b=o(p),C=f;C<m;++C)if(_a.call(p.value,C)){var x=p.get(C);if(x.name!==C)throw new Error("");var D=C+d;x.name=D,y[D]=x,delete b[C]}return delete b.length,function(){for(var E in y){var w=y[E];if(w.name!==+E)throw new Error("");b[E]=w,p.value[E]=w.value}}}s.shift=function(){var d=u(this,-1),f=this.value.shift();return d(),f},s.unshift=function(...d){var f=u(this,d.length),m=this.value.unshift.apply(this.value,d);return f(),m},s.push=function(...d){return t.assert(this.value),delete o(this).length,this.value.push.apply(this.value,d)},s.pop=function(){t.assert(this.value);var d=o(this);return delete d[this.value.length-1],delete d.length,this.value.pop()},s.insertAt=function(d){var f=arguments.length,m=u(this,f-1,d);if(m===l&&f<=1)return this;d=Math.max(d,0);for(var h=1;h<f;++h)this.value[d+h-1]=arguments[h];return m(),this},s.insertBefore=function(...d){for(var f=this.parentPath,m=d.length,h=[this.name],g=0;g<m;++g)h.push(d[g]);return f.insertAt.apply(f,h)},s.insertAfter=function(...d){for(var f=this.parentPath,m=d.length,h=[this.name+1],g=0;g<m;++g)h.push(d[g]);return f.insertAt.apply(f,h)};function c(p){if(!(p instanceof i))throw new Error("");var d=p.parentPath;if(!d)return p;var f=d.value,m=o(d);if(f[p.name]===p.value)m[p.name]=p;else if(t.check(f)){var h=f.indexOf(p.value);h>=0&&(m[p.name=h]=p)}else f[p.name]=p.value,m[p.name]=p;if(f[p.name]!==p.value)throw new Error("");if(p.parentPath.get(p.name)!==p)throw new Error("");return p}return s.replace=function(d){var f=[],m=this.parentPath.value,h=o(this.parentPath),g=arguments.length;if(c(this),t.check(m)){for(var y=m.length,b=u(this.parentPath,g-1,this.name+1),C=[this.name,1],x=0;x<g;++x)C.push(arguments[x]);var D=m.splice.apply(m,C);if(D[0]!==this.value)throw new Error("");if(m.length!==y-1+g)throw new Error("");if(b(),g===0)delete this.value,delete h[this.name],this.__childCache=null;else{if(m[this.name]!==d)throw new Error("");for(this.value!==d&&(this.value=d,this.__childCache=null),x=0;x<g;++x)f.push(this.parentPath.get(this.name+x));if(f[0]!==this)throw new Error("")}}else if(g===1)this.value!==d&&(this.__childCache=null),this.value=m[this.name]=d,f.push(this);else if(g===0)delete m[this.name],delete this.value,this.__childCache=null;else throw new Error("Could not replace path");return f},i}Oe(()=>module);var Wi=Object.prototype.hasOwnProperty;function CP(e){var r=e.use(Qe),t=r.Type,n=r.namedTypes,i=n.Node,s=n.Expression,o=r.builtInTypes.array,a=r.builders;let l=function x(D,E){if(!(this instanceof x))throw new Error("Scope constructor cannot be invoked without 'new'");c.check(D.value)||u.assert(D.value);var w;if(E){if(!(E instanceof x))throw new Error("");w=E.depth+1}else E=null,w=0;Object.defineProperties(this,{path:{value:D},node:{value:D.value},isGlobal:{value:!E,enumerable:!0},depth:{value:w},parent:{value:E},bindings:{value:{}},types:{value:{}}})};var u=t.or(n.Program,n.Function,n.CatchClause),c=t.or(n.Function,n.ClassDeclaration,n.ClassExpression,n.InterfaceDeclaration,n.TSInterfaceDeclaration,n.TypeAlias,n.TSTypeAliasDeclaration),p=t.or(n.TypeParameter,n.TSTypeParameter);l.isEstablishedBy=function(x){return u.check(x)||c.check(x)};var d=l.prototype;d.didScan=!1,d.declares=function(x){return this.scan(),Wi.call(this.bindings,x)},d.declaresType=function(x){return this.scan(),Wi.call(this.types,x)},d.declareTemporary=function(x){if(x){if(!/^[a-z$_]/i.test(x))throw new Error("")}else x="t$";x+=this.depth.toString(36)+"$",this.scan();for(var D=0;this.declares(x+D);)++D;var E=x+D;return this.bindings[E]=r.builders.identifier(E)},d.injectTemporary=function(x,D){x||(x=this.declareTemporary());var E=this.path.get("body");return n.BlockStatement.check(E.value)&&(E=E.get("body")),E.unshift(a.variableDeclaration("var",[a.variableDeclarator(x,D||null)])),x},d.scan=function(x){if(x||!this.didScan){for(var D in this.bindings)delete this.bindings[D];for(var D in this.types)delete this.types[D];f(this.path,this.bindings,this.types),this.didScan=!0}},d.getBindings=function(){return this.scan(),this.bindings},d.getTypes=function(){return this.scan(),this.types};function f(x,D,E){var w=x.value;if(c.check(w)){let O=x.get("typeParameters","params");o.check(O.value)&&O.each(B=>{C(B,E)})}u.check(w)&&(n.CatchClause.check(w)?y(x.get("param"),D):m(x,D,E))}function m(x,D,E){var w=x.value;x.parent&&n.FunctionExpression.check(x.parent.node)&&x.parent.node.id&&y(x.parent.get("id"),D),w&&(o.check(w)?x.each(O=>{g(O,D,E)}):n.Function.check(w)?(x.get("params").each(O=>{y(O,D)}),g(x.get("body"),D,E),m(x.get("typeParameters"),D,E)):n.TypeAlias&&n.TypeAlias.check(w)||n.InterfaceDeclaration&&n.InterfaceDeclaration.check(w)||n.TSTypeAliasDeclaration&&n.TSTypeAliasDeclaration.check(w)||n.TSInterfaceDeclaration&&n.TSInterfaceDeclaration.check(w)?b(x.get("id"),E):n.VariableDeclarator.check(w)?(y(x.get("id"),D),g(x.get("init"),D,E)):w.type==="ImportSpecifier"||w.type==="ImportNamespaceSpecifier"||w.type==="ImportDefaultSpecifier"?y(x.get(w.local?"local":w.name?"name":"id"),D):i.check(w)&&!s.check(w)&&r.eachField(w,function(O,B){var N=x.get(O);if(!h(N,B))throw new Error("");g(N,D,E)}))}function h(x,D){return!!(x.value===D||Array.isArray(x.value)&&x.value.length===0&&Array.isArray(D)&&D.length===0)}function g(x,D,E){var w=x.value;if(!(!w||s.check(w)))if(n.FunctionDeclaration.check(w)&&w.id!==null)y(x.get("id"),D);else if(n.ClassDeclaration&&n.ClassDeclaration.check(w)&&w.id!==null)y(x.get("id"),D),m(x.get("typeParameters"),D,E);else if(n.InterfaceDeclaration&&n.InterfaceDeclaration.check(w)||n.TSInterfaceDeclaration&&n.TSInterfaceDeclaration.check(w))b(x.get("id"),E);else if(u.check(w)){if(n.CatchClause.check(w)&&n.Identifier.check(w.param)){var O=w.param.name,B=Wi.call(D,O);m(x.get("body"),D,E),B||delete D[O]}}else m(x,D,E)}function y(x,D){var E=x.value;n.Pattern.assert(E),n.Identifier.check(E)?Wi.call(D,E.name)?D[E.name].push(x):D[E.name]=[x]:n.AssignmentPattern&&n.AssignmentPattern.check(E)?y(x.get("left"),D):n.ObjectPattern&&n.ObjectPattern.check(E)?x.get("properties").each(function(w){var O=w.value;n.Pattern.check(O)?y(w,D):n.Property.check(O)||n.ObjectProperty&&n.ObjectProperty.check(O)?y(w.get("value"),D):n.SpreadProperty&&n.SpreadProperty.check(O)&&y(w.get("argument"),D)}):n.ArrayPattern&&n.ArrayPattern.check(E)?x.get("elements").each(function(w){var O=w.value;n.Pattern.check(O)?y(w,D):n.SpreadElement&&n.SpreadElement.check(O)&&y(w.get("argument"),D)}):n.PropertyPattern&&n.PropertyPattern.check(E)?y(x.get("pattern"),D):(n.SpreadElementPattern&&n.SpreadElementPattern.check(E)||n.RestElement&&n.RestElement.check(E)||n.SpreadPropertyPattern&&n.SpreadPropertyPattern.check(E))&&y(x.get("argument"),D)}function b(x,D){var E=x.value;n.Pattern.assert(E),n.Identifier.check(E)&&(Wi.call(D,E.name)?D[E.name].push(x):D[E.name]=[x])}function C(x,D){var E=x.value;p.assert(E),Wi.call(D,E.name)?D[E.name].push(x):D[E.name]=[x]}return d.lookup=function(x){for(var D=this;D&&!D.declares(x);D=D.parent);return D},d.lookupType=function(x){for(var D=this;D&&!D.declaresType(x);D=D.parent);return D},d.getGlobalScope=function(){for(var x=this;!x.isGlobal;)x=x.parent;return x},l}Oe(()=>module);function gb(e){var r=e.use(Qe),t=r.namedTypes,n=r.builders,i=r.builtInTypes.number,s=r.builtInTypes.array,o=e.use(hb),a=e.use(CP);let l=function g(y,b,C){if(!(this instanceof g))throw new Error("NodePath constructor cannot be invoked without 'new'");o.call(this,y,b,C)};var u=l.prototype=Object.create(o.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}});Object.defineProperties(u,{node:{get:function(){return Object.defineProperty(this,"node",{configurable:!0,value:this._computeNode()}),this.node}},parent:{get:function(){return Object.defineProperty(this,"parent",{configurable:!0,value:this._computeParent()}),this.parent}},scope:{get:function(){return Object.defineProperty(this,"scope",{configurable:!0,value:this._computeScope()}),this.scope}}}),u.replace=function(){return delete this.node,delete this.parent,delete this.scope,o.prototype.replace.apply(this,arguments)},u.prune=function(){var g=this.parent;return this.replace(),m(g)},u._computeNode=function(){var g=this.value;if(t.Node.check(g))return g;var y=this.parentPath;return y&&y.node||null},u._computeParent=function(){var g=this.value,y=this.parentPath;if(!t.Node.check(g)){for(;y&&!t.Node.check(y.value);)y=y.parentPath;y&&(y=y.parentPath)}for(;y&&!t.Node.check(y.value);)y=y.parentPath;return y||null},u._computeScope=function(){var g=this.value,y=this.parentPath,b=y&&y.scope;return t.Node.check(g)&&a.isEstablishedBy(g)&&(b=new a(this,b)),b||null},u.getValueProperty=function(g){return r.getFieldValue(this.value,g)},u.needsParens=function(g){var y=this.parentPath;if(!y)return!1;var b=this.value;if(!t.Expression.check(b)||b.type==="Identifier")return!1;for(;!t.Node.check(y.value);)if(y=y.parentPath,!y)return!1;var C=y.value;switch(b.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return C.type==="MemberExpression"&&this.name==="object"&&C.object===b;case"BinaryExpression":case"LogicalExpression":switch(C.type){case"CallExpression":return this.name==="callee"&&C.callee===b;case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return!0;case"MemberExpression":return this.name==="object"&&C.object===b;case"BinaryExpression":case"LogicalExpression":{let x=b,D=C.operator,E=p[D],w=x.operator,O=p[w];if(E>O)return!0;if(E===O&&this.name==="right"){if(C.right!==x)throw new Error("Nodes must be equal");return!0}}default:return!1}case"SequenceExpression":switch(C.type){case"ForStatement":return!1;case"ExpressionStatement":return this.name!=="expression";default:return!0}case"YieldExpression":switch(C.type){case"BinaryExpression":case"LogicalExpression":case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"CallExpression":case"MemberExpression":case"NewExpression":case"ConditionalExpression":case"YieldExpression":return!0;default:return!1}case"Literal":return C.type==="MemberExpression"&&i.check(b.value)&&this.name==="object"&&C.object===b;case"AssignmentExpression":case"ConditionalExpression":switch(C.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return!0;case"CallExpression":return this.name==="callee"&&C.callee===b;case"ConditionalExpression":return this.name==="test"&&C.test===b;case"MemberExpression":return this.name==="object"&&C.object===b;default:return!1}default:if(C.type==="NewExpression"&&this.name==="callee"&&C.callee===b)return d(b)}return!!(g!==!0&&!this.canBeFirstInStatement()&&this.firstInStatement())};function c(g){return t.BinaryExpression.check(g)||t.LogicalExpression.check(g)}var p={};[["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"]].forEach(function(g,y){g.forEach(function(b){p[b]=y})});function d(g){return t.CallExpression.check(g)?!0:s.check(g)?g.some(d):t.Node.check(g)?r.someField(g,function(y,b){return d(b)}):!1}u.canBeFirstInStatement=function(){var g=this.node;return!t.FunctionExpression.check(g)&&!t.ObjectExpression.check(g)},u.firstInStatement=function(){return f(this)};function f(g){for(var y,b;g.parent;g=g.parent){if(y=g.node,b=g.parent.node,t.BlockStatement.check(b)&&g.parent.name==="body"&&g.name===0){if(b.body[0]!==y)throw new Error("Nodes must be equal");return!0}if(t.ExpressionStatement.check(b)&&g.name==="expression"){if(b.expression!==y)throw new Error("Nodes must be equal");return!0}if(t.SequenceExpression.check(b)&&g.parent.name==="expressions"&&g.name===0){if(b.expressions[0]!==y)throw new Error("Nodes must be equal");continue}if(t.CallExpression.check(b)&&g.name==="callee"){if(b.callee!==y)throw new Error("Nodes must be equal");continue}if(t.MemberExpression.check(b)&&g.name==="object"){if(b.object!==y)throw new Error("Nodes must be equal");continue}if(t.ConditionalExpression.check(b)&&g.name==="test"){if(b.test!==y)throw new Error("Nodes must be equal");continue}if(c(b)&&g.name==="left"){if(b.left!==y)throw new Error("Nodes must be equal");continue}if(t.UnaryExpression.check(b)&&!b.prefix&&g.name==="argument"){if(b.argument!==y)throw new Error("Nodes must be equal");continue}return!1}return!0}function m(g){if(t.VariableDeclaration.check(g.node)){var y=g.get("declarations").value;if(!y||y.length===0)return g.prune()}else if(t.ExpressionStatement.check(g.node)){if(!g.get("expression").value)return g.prune()}else t.IfStatement.check(g.node)&&h(g);return g}function h(g){var y=g.get("test").value,b=g.get("alternate").value,C=g.get("consequent").value;if(!C&&!b){var x=n.expressionStatement(y);g.replace(x)}else if(!C&&b){var D=n.unaryExpression("!",y,!0);t.UnaryExpression.check(y)&&y.operator==="!"&&(D=y.argument),g.get("test").replace(D),g.get("consequent").replace(b),g.get("alternate").replace()}}return l}Oe(()=>module);var ka=Object.prototype.hasOwnProperty;function SP(e){var r=e.use(Qe),t=e.use(gb),n=r.builtInTypes.array,i=r.builtInTypes.object,s=r.builtInTypes.function,o;let a=function m(){if(!(this instanceof m))throw new Error("PathVisitor constructor cannot be invoked without 'new'");this._reusableContextStack=[],this._methodNameTable=l(this),this._shouldVisitComments=ka.call(this._methodNameTable,"Block")||ka.call(this._methodNameTable,"Line"),this.Context=d(this),this._visiting=!1,this._changeReported=!1};function l(m){var h=Object.create(null);for(var g in m)/^visit[A-Z]/.test(g)&&(h[g.slice(5)]=!0);for(var y=r.computeSupertypeLookupTable(h),b=Object.create(null),C=Object.keys(y),x=C.length,D=0;D<x;++D){var E=C[D];g="visit"+y[E],s.check(m[g])&&(b[E]=g)}return b}a.fromMethodsObject=function(h){if(h instanceof a)return h;if(!i.check(h))return new a;let g=function b(){if(!(this instanceof b))throw new Error("Visitor constructor cannot be invoked without 'new'");a.call(this)};var y=g.prototype=Object.create(c);return y.constructor=g,u(y,h),u(g,a),s.assert(g.fromMethodsObject),s.assert(g.visit),new g};function u(m,h){for(var g in h)ka.call(h,g)&&(m[g]=h[g]);return m}a.visit=function(h,g){return a.fromMethodsObject(g).visit(h)};var c=a.prototype;c.visit=function(){if(this._visiting)throw new Error("Recursively calling visitor.visit(path) resets visitor state. Try this.visit(path) or this.traverse(path) instead.");this._visiting=!0,this._changeReported=!1,this._abortRequested=!1;for(var m=arguments.length,h=new Array(m),g=0;g<m;++g)h[g]=arguments[g];h[0]instanceof t||(h[0]=new t({root:h[0]}).get("root")),this.reset.apply(this,h);var y;try{var b=this.visitWithoutReset(h[0]);y=!0}finally{if(this._visiting=!1,!y&&this._abortRequested)return h[0].value}return b},c.AbortRequest=function(){},c.abort=function(){var m=this;m._abortRequested=!0;var h=new m.AbortRequest;throw h.cancel=function(){m._abortRequested=!1},h},c.reset=function(m){},c.visitWithoutReset=function(m){if(this instanceof this.Context)return this.visitor.visitWithoutReset(m);if(!(m instanceof t))throw new Error("");var h=m.value,g=h&&typeof h=="object"&&typeof h.type=="string"&&this._methodNameTable[h.type];if(g){var y=this.acquireContext(m);try{return y.invokeVisitorMethod(g)}finally{this.releaseContext(y)}}else return p(m,this)};function p(m,h){if(!(m instanceof t))throw new Error("");if(!(h instanceof a))throw new Error("");var g=m.value;if(n.check(g))m.each(h.visitWithoutReset,h);else if(i.check(g)){var y=r.getFieldNames(g);h._shouldVisitComments&&g.comments&&y.indexOf("comments")<0&&y.push("comments");for(var b=y.length,C=[],x=0;x<b;++x){var D=y[x];ka.call(g,D)||(g[D]=r.getFieldValue(g,D)),C.push(m.get(D))}for(var x=0;x<b;++x)h.visitWithoutReset(C[x])}return m.value}c.acquireContext=function(m){return this._reusableContextStack.length===0?new this.Context(m):this._reusableContextStack.pop().reset(m)},c.releaseContext=function(m){if(!(m instanceof this.Context))throw new Error("");this._reusableContextStack.push(m),m.currentPath=null},c.reportChanged=function(){this._changeReported=!0},c.wasChangeReported=function(){return this._changeReported};function d(m){function h(y){if(!(this instanceof h))throw new Error("");if(!(this instanceof a))throw new Error("");if(!(y instanceof t))throw new Error("");Object.defineProperty(this,"visitor",{value:m,writable:!1,enumerable:!0,configurable:!1}),this.currentPath=y,this.needToCallTraverse=!0,Object.seal(this)}if(!(m instanceof a))throw new Error("");var g=h.prototype=Object.create(m);return g.constructor=h,u(g,f),h}var f=Object.create(null);return f.reset=function(h){if(!(this instanceof this.Context))throw new Error("");if(!(h instanceof t))throw new Error("");return this.currentPath=h,this.needToCallTraverse=!0,this},f.invokeVisitorMethod=function(h){if(!(this instanceof this.Context))throw new Error("");if(!(this.currentPath instanceof t))throw new Error("");var g=this.visitor[h].call(this,this.currentPath);if(g===!1?this.needToCallTraverse=!1:g!==o&&(this.currentPath=this.currentPath.replace(g)[0],this.needToCallTraverse&&this.traverse(this.currentPath)),this.needToCallTraverse!==!1)throw new Error("Must either call this.traverse or return false in "+h);var y=this.currentPath;return y&&y.value},f.traverse=function(h,g){if(!(this instanceof this.Context))throw new Error("");if(!(h instanceof t))throw new Error("");if(!(this.currentPath instanceof t))throw new Error("");return this.needToCallTraverse=!1,p(h,a.fromMethodsObject(g||this.visitor))},f.visit=function(h,g){if(!(this instanceof this.Context))throw new Error("");if(!(h instanceof t))throw new Error("");if(!(this.currentPath instanceof t))throw new Error("");return this.needToCallTraverse=!1,a.fromMethodsObject(g||this.visitor).visitWithoutReset(h)},f.reportChanged=function(){this.visitor.reportChanged()},f.abort=function(){this.needToCallTraverse=!1,this.visitor.abort()},a}Oe(()=>module);function TP(e){var r=e.use(Qe),t=r.getFieldNames,n=r.getFieldValue,i=r.builtInTypes.array,s=r.builtInTypes.object,o=r.builtInTypes.Date,a=r.builtInTypes.RegExp,l=Object.prototype.hasOwnProperty;function u(m,h,g){return i.check(g)?g.length=0:g=null,p(m,h,g)}u.assert=function(m,h){var g=[];if(!u(m,h,g))if(g.length===0){if(m!==h)throw new Error("Nodes must be equal")}else throw new Error("Nodes differ in the following path: "+g.map(c).join(""))};function c(m){return/[_$a-z][_$a-z0-9]*/i.test(m)?"."+m:"["+JSON.stringify(m)+"]"}function p(m,h,g){return m===h?!0:i.check(m)?d(m,h,g):s.check(m)?f(m,h,g):o.check(m)?o.check(h)&&+m==+h:a.check(m)?a.check(h)&&m.source===h.source&&m.global===h.global&&m.multiline===h.multiline&&m.ignoreCase===h.ignoreCase:m==h}function d(m,h,g){i.assert(m);var y=m.length;if(!i.check(h)||h.length!==y)return g&&g.push("length"),!1;for(var b=0;b<y;++b){if(g&&g.push(b),b in m!=b in h||!p(m[b],h[b],g))return!1;if(g){var C=g.pop();if(C!==b)throw new Error(""+C)}}return!0}function f(m,h,g){if(s.assert(m),!s.check(h))return!1;if(m.type!==h.type)return g&&g.push("type"),!1;var y=t(m),b=y.length,C=t(h),x=C.length;if(b===x){for(var D=0;D<b;++D){var E=y[D],w=n(m,E),O=n(h,E);if(g&&g.push(E),!p(w,O,g))return!1;if(g){var B=g.pop();if(B!==E)throw new Error(""+B)}}return!0}if(!g)return!1;var N=Object.create(null);for(D=0;D<b;++D)N[y[D]]=!0;for(D=0;D<x;++D){if(E=C[D],!l.call(N,E))return g.push(E),!1;delete N[E]}for(E in N){g.push(E);break}return!1}return u}Oe(()=>module);function wP(e){let r=AP(),t=r.use(Qe);e.forEach(r.use),t.finalize();let n=r.use(SP);return{Type:t.Type,builtInTypes:t.builtInTypes,namedTypes:t.namedTypes,builders:t.builders,defineMethod:t.defineMethod,getFieldNames:t.getFieldNames,getFieldValue:t.getFieldValue,eachField:t.eachField,someField:t.someField,getSupertypeNames:t.getSupertypeNames,getBuilderName:t.getBuilderName,astNodesAreEquivalent:r.use(TP),finalize:t.finalize,Path:r.use(hb),NodePath:r.use(gb),PathVisitor:n,use:r.use,visit:n.visit}}function AP(){let e=[],r=[];function t(i){var s=e.indexOf(i);return s===-1&&(s=e.length,e.push(i),r[s]=i(n)),r[s]}var n={use:t};return n}Oe(()=>module);function yb(){return{BinaryOperators:["==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","&","|","^","in","instanceof"],AssignmentOperators:["=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&="],LogicalOperators:["||","&&"]}}Oe(()=>module);function bb(e){let r=e.use(yb);return r.BinaryOperators.indexOf("**")<0&&r.BinaryOperators.push("**"),r.AssignmentOperators.indexOf("**=")<0&&r.AssignmentOperators.push("**="),r}Oe(()=>module);function Db(e){let r=e.use(bb);return r.LogicalOperators.indexOf("??")<0&&r.LogicalOperators.push("??"),r}Oe(()=>module);function vP(e){let r=e.use(Db);return r.LogicalOperators.forEach(t=>{let n=t+"=";r.AssignmentOperators.indexOf(n)<0&&r.AssignmentOperators.push(n)}),r}Oe(()=>module);function PP(e){var r=e.use(Qe),t=r.Type,n=t.def,i=t.or,s=e.use(Yt),o=s.defaults,a=s.geq;let{BinaryOperators:l,AssignmentOperators:u,LogicalOperators:c}=e.use(yb);n("Printable").field("loc",i(n("SourceLocation"),null),o.null,!0),n("Node").bases("Printable").field("type",String).field("comments",i([n("Comment")],null),o.null,!0),n("SourceLocation").field("start",n("Position")).field("end",n("Position")).field("source",i(String,null),o.null),n("Position").field("line",a(1)).field("column",a(0)),n("File").bases("Node").build("program","name").field("program",n("Program")).field("name",i(String,null),o.null),n("Program").bases("Node").build("body").field("body",[n("Statement")]),n("Function").bases("Node").field("id",i(n("Identifier"),null),o.null).field("params",[n("Pattern")]).field("body",n("BlockStatement")).field("generator",Boolean,o.false).field("async",Boolean,o.false),n("Statement").bases("Node"),n("EmptyStatement").bases("Statement").build(),n("BlockStatement").bases("Statement").build("body").field("body",[n("Statement")]),n("ExpressionStatement").bases("Statement").build("expression").field("expression",n("Expression")),n("IfStatement").bases("Statement").build("test","consequent","alternate").field("test",n("Expression")).field("consequent",n("Statement")).field("alternate",i(n("Statement"),null),o.null),n("LabeledStatement").bases("Statement").build("label","body").field("label",n("Identifier")).field("body",n("Statement")),n("BreakStatement").bases("Statement").build("label").field("label",i(n("Identifier"),null),o.null),n("ContinueStatement").bases("Statement").build("label").field("label",i(n("Identifier"),null),o.null),n("WithStatement").bases("Statement").build("object","body").field("object",n("Expression")).field("body",n("Statement")),n("SwitchStatement").bases("Statement").build("discriminant","cases","lexical").field("discriminant",n("Expression")).field("cases",[n("SwitchCase")]).field("lexical",Boolean,o.false),n("ReturnStatement").bases("Statement").build("argument").field("argument",i(n("Expression"),null)),n("ThrowStatement").bases("Statement").build("argument").field("argument",n("Expression")),n("TryStatement").bases("Statement").build("block","handler","finalizer").field("block",n("BlockStatement")).field("handler",i(n("CatchClause"),null),function(){return this.handlers&&this.handlers[0]||null}).field("handlers",[n("CatchClause")],function(){return this.handler?[this.handler]:[]},!0).field("guardedHandlers",[n("CatchClause")],o.emptyArray).field("finalizer",i(n("BlockStatement"),null),o.null),n("CatchClause").bases("Node").build("param","guard","body").field("param",n("Pattern")).field("guard",i(n("Expression"),null),o.null).field("body",n("BlockStatement")),n("WhileStatement").bases("Statement").build("test","body").field("test",n("Expression")).field("body",n("Statement")),n("DoWhileStatement").bases("Statement").build("body","test").field("body",n("Statement")).field("test",n("Expression")),n("ForStatement").bases("Statement").build("init","test","update","body").field("init",i(n("VariableDeclaration"),n("Expression"),null)).field("test",i(n("Expression"),null)).field("update",i(n("Expression"),null)).field("body",n("Statement")),n("ForInStatement").bases("Statement").build("left","right","body").field("left",i(n("VariableDeclaration"),n("Expression"))).field("right",n("Expression")).field("body",n("Statement")),n("DebuggerStatement").bases("Statement").build(),n("Declaration").bases("Statement"),n("FunctionDeclaration").bases("Function","Declaration").build("id","params","body").field("id",n("Identifier")),n("FunctionExpression").bases("Function","Expression").build("id","params","body"),n("VariableDeclaration").bases("Declaration").build("kind","declarations").field("kind",i("var","let","const")).field("declarations",[n("VariableDeclarator")]),n("VariableDeclarator").bases("Node").build("id","init").field("id",n("Pattern")).field("init",i(n("Expression"),null),o.null),n("Expression").bases("Node"),n("ThisExpression").bases("Expression").build(),n("ArrayExpression").bases("Expression").build("elements").field("elements",[i(n("Expression"),null)]),n("ObjectExpression").bases("Expression").build("properties").field("properties",[n("Property")]),n("Property").bases("Node").build("kind","key","value").field("kind",i("init","get","set")).field("key",i(n("Literal"),n("Identifier"))).field("value",n("Expression")),n("SequenceExpression").bases("Expression").build("expressions").field("expressions",[n("Expression")]);var p=i("-","+","!","~","typeof","void","delete");n("UnaryExpression").bases("Expression").build("operator","argument","prefix").field("operator",p).field("argument",n("Expression")).field("prefix",Boolean,o.true);let d=i(...l);n("BinaryExpression").bases("Expression").build("operator","left","right").field("operator",d).field("left",n("Expression")).field("right",n("Expression"));let f=i(...u);n("AssignmentExpression").bases("Expression").build("operator","left","right").field("operator",f).field("left",i(n("Pattern"),n("MemberExpression"))).field("right",n("Expression"));var m=i("++","--");n("UpdateExpression").bases("Expression").build("operator","argument","prefix").field("operator",m).field("argument",n("Expression")).field("prefix",Boolean);var h=i(...c);n("LogicalExpression").bases("Expression").build("operator","left","right").field("operator",h).field("left",n("Expression")).field("right",n("Expression")),n("ConditionalExpression").bases("Expression").build("test","consequent","alternate").field("test",n("Expression")).field("consequent",n("Expression")).field("alternate",n("Expression")),n("NewExpression").bases("Expression").build("callee","arguments").field("callee",n("Expression")).field("arguments",[n("Expression")]),n("CallExpression").bases("Expression").build("callee","arguments").field("callee",n("Expression")).field("arguments",[n("Expression")]),n("MemberExpression").bases("Expression").build("object","property","computed").field("object",n("Expression")).field("property",i(n("Identifier"),n("Expression"))).field("computed",Boolean,function(){var g=this.property.type;return g==="Literal"||g==="MemberExpression"||g==="BinaryExpression"}),n("Pattern").bases("Node"),n("SwitchCase").bases("Node").build("test","consequent").field("test",i(n("Expression"),null)).field("consequent",[n("Statement")]),n("Identifier").bases("Expression","Pattern").build("name").field("name",String).field("optional",Boolean,o.false),n("Literal").bases("Expression").build("value").field("value",i(String,Boolean,null,Number,RegExp,BigInt)),n("Comment").bases("Printable").field("value",String).field("leading",Boolean,o.true).field("trailing",Boolean,o.false)}Oe(()=>module);function IP(e){e.use(PP);let r=e.use(Qe),t=r.Type.def,n=r.Type.or,i=e.use(Yt).defaults;t("Function").field("generator",Boolean,i.false).field("expression",Boolean,i.false).field("defaults",[n(t("Expression"),null)],i.emptyArray).field("rest",n(t("Identifier"),null),i.null),t("RestElement").bases("Pattern").build("argument").field("argument",t("Pattern")).field("typeAnnotation",n(t("TypeAnnotation"),t("TSTypeAnnotation"),null),i.null),t("SpreadElementPattern").bases("Pattern").build("argument").field("argument",t("Pattern")),t("FunctionDeclaration").build("id","params","body","generator","expression").field("id",n(t("Identifier"),null)),t("FunctionExpression").build("id","params","body","generator","expression"),t("ArrowFunctionExpression").bases("Function","Expression").build("params","body","expression").field("id",null,i.null).field("body",n(t("BlockStatement"),t("Expression"))).field("generator",!1,i.false),t("ForOfStatement").bases("Statement").build("left","right","body").field("left",n(t("VariableDeclaration"),t("Pattern"))).field("right",t("Expression")).field("body",t("Statement")),t("YieldExpression").bases("Expression").build("argument","delegate").field("argument",n(t("Expression"),null)).field("delegate",Boolean,i.false),t("GeneratorExpression").bases("Expression").build("body","blocks","filter").field("body",t("Expression")).field("blocks",[t("ComprehensionBlock")]).field("filter",n(t("Expression"),null)),t("ComprehensionExpression").bases("Expression").build("body","blocks","filter").field("body",t("Expression")).field("blocks",[t("ComprehensionBlock")]).field("filter",n(t("Expression"),null)),t("ComprehensionBlock").bases("Node").build("left","right","each").field("left",t("Pattern")).field("right",t("Expression")).field("each",Boolean),t("Property").field("key",n(t("Literal"),t("Identifier"),t("Expression"))).field("value",n(t("Expression"),t("Pattern"))).field("method",Boolean,i.false).field("shorthand",Boolean,i.false).field("computed",Boolean,i.false),t("ObjectProperty").field("shorthand",Boolean,i.false),t("PropertyPattern").bases("Pattern").build("key","pattern").field("key",n(t("Literal"),t("Identifier"),t("Expression"))).field("pattern",t("Pattern")).field("computed",Boolean,i.false),t("ObjectPattern").bases("Pattern").build("properties").field("properties",[n(t("PropertyPattern"),t("Property"))]),t("ArrayPattern").bases("Pattern").build("elements").field("elements",[n(t("Pattern"),null)]),t("SpreadElement").bases("Node").build("argument").field("argument",t("Expression")),t("ArrayExpression").field("elements",[n(t("Expression"),t("SpreadElement"),t("RestElement"),null)]),t("NewExpression").field("arguments",[n(t("Expression"),t("SpreadElement"))]),t("CallExpression").field("arguments",[n(t("Expression"),t("SpreadElement"))]),t("AssignmentPattern").bases("Pattern").build("left","right").field("left",t("Pattern")).field("right",t("Expression")),t("MethodDefinition").bases("Declaration").build("kind","key","value","static").field("kind",n("constructor","method","get","set")).field("key",t("Expression")).field("value",t("Function")).field("computed",Boolean,i.false).field("static",Boolean,i.false);let s=n(t("MethodDefinition"),t("VariableDeclarator"),t("ClassPropertyDefinition"),t("ClassProperty"),t("StaticBlock"));t("ClassProperty").bases("Declaration").build("key").field("key",n(t("Literal"),t("Identifier"),t("Expression"))).field("computed",Boolean,i.false),t("ClassPropertyDefinition").bases("Declaration").build("definition").field("definition",s),t("ClassBody").bases("Declaration").build("body").field("body",[s]),t("ClassDeclaration").bases("Declaration").build("id","body","superClass").field("id",n(t("Identifier"),null)).field("body",t("ClassBody")).field("superClass",n(t("Expression"),null),i.null),t("ClassExpression").bases("Expression").build("id","body","superClass").field("id",n(t("Identifier"),null),i.null).field("body",t("ClassBody")).field("superClass",n(t("Expression"),null),i.null),t("Super").bases("Expression").build(),t("Specifier").bases("Node"),t("ModuleSpecifier").bases("Specifier").field("local",n(t("Identifier"),null),i.null).field("id",n(t("Identifier"),null),i.null).field("name",n(t("Identifier"),null),i.null),t("ImportSpecifier").bases("ModuleSpecifier").build("imported","local").field("imported",t("Identifier")),t("ImportDefaultSpecifier").bases("ModuleSpecifier").build("local"),t("ImportNamespaceSpecifier").bases("ModuleSpecifier").build("local"),t("ImportDeclaration").bases("Declaration").build("specifiers","source","importKind").field("specifiers",[n(t("ImportSpecifier"),t("ImportNamespaceSpecifier"),t("ImportDefaultSpecifier"))],i.emptyArray).field("source",t("Literal")).field("importKind",n("value","type"),function(){return"value"}),t("ExportNamedDeclaration").bases("Declaration").build("declaration","specifiers","source").field("declaration",n(t("Declaration"),null)).field("specifiers",[t("ExportSpecifier")],i.emptyArray).field("source",n(t("Literal"),null),i.null),t("ExportSpecifier").bases("ModuleSpecifier").build("local","exported").field("exported",t("Identifier")),t("ExportDefaultDeclaration").bases("Declaration").build("declaration").field("declaration",n(t("Declaration"),t("Expression"))),t("ExportAllDeclaration").bases("Declaration").build("source").field("source",t("Literal")),t("TaggedTemplateExpression").bases("Expression").build("tag","quasi").field("tag",t("Expression")).field("quasi",t("TemplateLiteral")),t("TemplateLiteral").bases("Expression").build("quasis","expressions").field("quasis",[t("TemplateElement")]).field("expressions",[t("Expression")]),t("TemplateElement").bases("Node").build("value","tail").field("value",{cooked:String,raw:String}).field("tail",Boolean),t("MetaProperty").bases("Expression").build("meta","property").field("meta",t("Identifier")).field("property",t("Identifier"))}Oe(()=>module);function NP(e){e.use(bb),e.use(IP)}Oe(()=>module);function FP(e){e.use(NP);let t=e.use(Qe).Type.def,n=e.use(Yt).defaults;t("Function").field("async",Boolean,n.false),t("AwaitExpression").bases("Expression").build("argument").field("argument",t("Expression"))}Oe(()=>module);function _P(e){e.use(FP);let r=e.use(Qe),t=r.Type.def,n=r.Type.or,i=e.use(Yt).defaults;t("ForOfStatement").field("await",Boolean,i.false),t("SpreadProperty").bases("Node").build("argument").field("argument",t("Expression")),t("ObjectExpression").field("properties",[n(t("Property"),t("SpreadProperty"),t("SpreadElement"))]),t("TemplateElement").field("value",{cooked:n(String,null),raw:String}),t("SpreadPropertyPattern").bases("Pattern").build("argument").field("argument",t("Pattern")),t("ObjectPattern").field("properties",[n(t("PropertyPattern"),t("Property"),t("RestElement"),t("SpreadPropertyPattern"))])}Oe(()=>module);function kP(e){e.use(_P);let r=e.use(Qe),t=r.Type.def,n=r.Type.or,i=e.use(Yt).defaults;t("CatchClause").field("param",n(t("Pattern"),null),i.null)}Oe(()=>module);function OP(e){e.use(Db),e.use(kP);let r=e.use(Qe),t=r.Type.def,n=r.Type.or,s=e.use(Yt).defaults;t("ImportExpression").bases("Expression").build("source").field("source",t("Expression")),t("ExportAllDeclaration").bases("Declaration").build("source","exported").field("source",t("Literal")).field("exported",n(t("Identifier"),null,void 0),s.null),t("ChainElement").bases("Node").field("optional",Boolean,s.false),t("CallExpression").bases("Expression","ChainElement"),t("MemberExpression").bases("Expression","ChainElement"),t("ChainExpression").bases("Expression").build("expression").field("expression",t("ChainElement")),t("OptionalCallExpression").bases("CallExpression").build("callee","arguments","optional").field("optional",Boolean,s.true),t("OptionalMemberExpression").bases("MemberExpression").build("object","property","computed","optional").field("optional",Boolean,s.true)}Oe(()=>module);function RP(e){e.use(vP),e.use(OP)}Oe(()=>module);function LP(e){e.use(RP);let t=e.use(Qe).Type.def;t("StaticBlock").bases("Declaration").build("body").field("body",[t("Statement")])}Oe(()=>module);function lo(e){e.use(LP);let r=e.use(Qe),t=r.Type,n=r.Type.def,i=t.or,o=e.use(Yt).defaults;n("AwaitExpression").build("argument","all").field("argument",i(n("Expression"),null)).field("all",Boolean,o.false),n("Decorator").bases("Node").build("expression").field("expression",n("Expression")),n("Property").field("decorators",i([n("Decorator")],null),o.null),n("MethodDefinition").field("decorators",i([n("Decorator")],null),o.null),n("PrivateName").bases("Expression","Pattern").build("id").field("id",n("Identifier")),n("ClassPrivateProperty").bases("ClassProperty").build("key","value").field("key",n("PrivateName")).field("value",i(n("Expression"),null),o.null),n("ImportAttribute").bases("Node").build("key","value").field("key",i(n("Identifier"),n("Literal"))).field("value",n("Expression")),["ImportDeclaration","ExportAllDeclaration","ExportNamedDeclaration"].forEach(a=>{n(a).field("assertions",[n("ImportAttribute")],o.emptyArray)}),n("RecordExpression").bases("Expression").build("properties").field("properties",[i(n("ObjectProperty"),n("ObjectMethod"),n("SpreadElement"))]),n("TupleExpression").bases("Expression").build("elements").field("elements",[i(n("Expression"),n("SpreadElement"),null)]),n("ModuleExpression").bases("Node").build("body").field("body",n("Program"))}Oe(()=>module);function BP(e){e.use(lo);let r=e.use(Qe),t=r.Type.def,n=r.Type.or,i=e.use(Yt).defaults;t("JSXAttribute").bases("Node").build("name","value").field("name",n(t("JSXIdentifier"),t("JSXNamespacedName"))).field("value",n(t("Literal"),t("JSXExpressionContainer"),t("JSXElement"),t("JSXFragment"),null),i.null),t("JSXIdentifier").bases("Identifier").build("name").field("name",String),t("JSXNamespacedName").bases("Node").build("namespace","name").field("namespace",t("JSXIdentifier")).field("name",t("JSXIdentifier")),t("JSXMemberExpression").bases("MemberExpression").build("object","property").field("object",n(t("JSXIdentifier"),t("JSXMemberExpression"))).field("property",t("JSXIdentifier")).field("computed",Boolean,i.false);let s=n(t("JSXIdentifier"),t("JSXNamespacedName"),t("JSXMemberExpression"));t("JSXSpreadAttribute").bases("Node").build("argument").field("argument",t("Expression"));let o=[n(t("JSXAttribute"),t("JSXSpreadAttribute"))];t("JSXExpressionContainer").bases("Expression").build("expression").field("expression",n(t("Expression"),t("JSXEmptyExpression")));let a=[n(t("JSXText"),t("JSXExpressionContainer"),t("JSXSpreadChild"),t("JSXElement"),t("JSXFragment"),t("Literal"))];t("JSXElement").bases("Expression").build("openingElement","closingElement","children").field("openingElement",t("JSXOpeningElement")).field("closingElement",n(t("JSXClosingElement"),null),i.null).field("children",a,i.emptyArray).field("name",s,function(){return this.openingElement.name},!0).field("selfClosing",Boolean,function(){return this.openingElement.selfClosing},!0).field("attributes",o,function(){return this.openingElement.attributes},!0),t("JSXOpeningElement").bases("Node").build("name","attributes","selfClosing").field("name",s).field("attributes",o,i.emptyArray).field("selfClosing",Boolean,i.false),t("JSXClosingElement").bases("Node").build("name").field("name",s),t("JSXFragment").bases("Expression").build("openingFragment","closingFragment","children").field("openingFragment",t("JSXOpeningFragment")).field("closingFragment",t("JSXClosingFragment")).field("children",a,i.emptyArray),t("JSXOpeningFragment").bases("Node").build(),t("JSXClosingFragment").bases("Node").build(),t("JSXText").bases("Literal").build("value","raw").field("value",String).field("raw",String,function(){return this.value}),t("JSXEmptyExpression").bases("Node").build(),t("JSXSpreadChild").bases("Node").build("expression").field("expression",t("Expression"))}Oe(()=>module);function xb(e){var r=e.use(Qe),t=r.Type.def,n=r.Type.or,i=e.use(Yt).defaults,s=n(t("TypeAnnotation"),t("TSTypeAnnotation"),null),o=n(t("TypeParameterDeclaration"),t("TSTypeParameterDeclaration"),null);t("Identifier").field("typeAnnotation",s,i.null),t("ObjectPattern").field("typeAnnotation",s,i.null),t("Function").field("returnType",s,i.null).field("typeParameters",o,i.null),t("ClassProperty").build("key","value","typeAnnotation","static").field("value",n(t("Expression"),null)).field("static",Boolean,i.false).field("typeAnnotation",s,i.null),["ClassDeclaration","ClassExpression"].forEach(a=>{t(a).field("typeParameters",o,i.null).field("superTypeParameters",n(t("TypeParameterInstantiation"),t("TSTypeParameterInstantiation"),null),i.null).field("implements",n([t("ClassImplements")],[t("TSExpressionWithTypeArguments")]),i.emptyArray)})}Oe(()=>module);function Eb(e){e.use(lo),e.use(xb);let r=e.use(Qe),t=r.Type.def,n=r.Type.or,i=e.use(Yt).defaults;t("Flow").bases("Node"),t("FlowType").bases("Flow"),t("AnyTypeAnnotation").bases("FlowType").build(),t("EmptyTypeAnnotation").bases("FlowType").build(),t("MixedTypeAnnotation").bases("FlowType").build(),t("VoidTypeAnnotation").bases("FlowType").build(),t("SymbolTypeAnnotation").bases("FlowType").build(),t("NumberTypeAnnotation").bases("FlowType").build(),t("BigIntTypeAnnotation").bases("FlowType").build(),t("NumberLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",Number).field("raw",String),t("NumericLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",Number).field("raw",String),t("BigIntLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",null).field("raw",String),t("StringTypeAnnotation").bases("FlowType").build(),t("StringLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",String).field("raw",String),t("BooleanTypeAnnotation").bases("FlowType").build(),t("BooleanLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",Boolean).field("raw",String),t("TypeAnnotation").bases("Node").build("typeAnnotation").field("typeAnnotation",t("FlowType")),t("NullableTypeAnnotation").bases("FlowType").build("typeAnnotation").field("typeAnnotation",t("FlowType")),t("NullLiteralTypeAnnotation").bases("FlowType").build(),t("NullTypeAnnotation").bases("FlowType").build(),t("ThisTypeAnnotation").bases("FlowType").build(),t("ExistsTypeAnnotation").bases("FlowType").build(),t("ExistentialTypeParam").bases("FlowType").build(),t("FunctionTypeAnnotation").bases("FlowType").build("params","returnType","rest","typeParameters").field("params",[t("FunctionTypeParam")]).field("returnType",t("FlowType")).field("rest",n(t("FunctionTypeParam"),null)).field("typeParameters",n(t("TypeParameterDeclaration"),null)),t("FunctionTypeParam").bases("Node").build("name","typeAnnotation","optional").field("name",n(t("Identifier"),null)).field("typeAnnotation",t("FlowType")).field("optional",Boolean),t("ArrayTypeAnnotation").bases("FlowType").build("elementType").field("elementType",t("FlowType")),t("ObjectTypeAnnotation").bases("FlowType").build("properties","indexers","callProperties").field("properties",[n(t("ObjectTypeProperty"),t("ObjectTypeSpreadProperty"))]).field("indexers",[t("ObjectTypeIndexer")],i.emptyArray).field("callProperties",[t("ObjectTypeCallProperty")],i.emptyArray).field("inexact",n(Boolean,void 0),i.undefined).field("exact",Boolean,i.false).field("internalSlots",[t("ObjectTypeInternalSlot")],i.emptyArray),t("Variance").bases("Node").build("kind").field("kind",n("plus","minus"));let s=n(t("Variance"),"plus","minus",null);t("ObjectTypeProperty").bases("Node").build("key","value","optional").field("key",n(t("Literal"),t("Identifier"))).field("value",t("FlowType")).field("optional",Boolean).field("variance",s,i.null),t("ObjectTypeIndexer").bases("Node").build("id","key","value").field("id",t("Identifier")).field("key",t("FlowType")).field("value",t("FlowType")).field("variance",s,i.null).field("static",Boolean,i.false),t("ObjectTypeCallProperty").bases("Node").build("value").field("value",t("FunctionTypeAnnotation")).field("static",Boolean,i.false),t("QualifiedTypeIdentifier").bases("Node").build("qualification","id").field("qualification",n(t("Identifier"),t("QualifiedTypeIdentifier"))).field("id",t("Identifier")),t("GenericTypeAnnotation").bases("FlowType").build("id","typeParameters").field("id",n(t("Identifier"),t("QualifiedTypeIdentifier"))).field("typeParameters",n(t("TypeParameterInstantiation"),null)),t("MemberTypeAnnotation").bases("FlowType").build("object","property").field("object",t("Identifier")).field("property",n(t("MemberTypeAnnotation"),t("GenericTypeAnnotation"))),t("IndexedAccessType").bases("FlowType").build("objectType","indexType").field("objectType",t("FlowType")).field("indexType",t("FlowType")),t("OptionalIndexedAccessType").bases("FlowType").build("objectType","indexType","optional").field("objectType",t("FlowType")).field("indexType",t("FlowType")).field("optional",Boolean),t("UnionTypeAnnotation").bases("FlowType").build("types").field("types",[t("FlowType")]),t("IntersectionTypeAnnotation").bases("FlowType").build("types").field("types",[t("FlowType")]),t("TypeofTypeAnnotation").bases("FlowType").build("argument").field("argument",t("FlowType")),t("ObjectTypeSpreadProperty").bases("Node").build("argument").field("argument",t("FlowType")),t("ObjectTypeInternalSlot").bases("Node").build("id","value","optional","static","method").field("id",t("Identifier")).field("value",t("FlowType")).field("optional",Boolean).field("static",Boolean).field("method",Boolean),t("TypeParameterDeclaration").bases("Node").build("params").field("params",[t("TypeParameter")]),t("TypeParameterInstantiation").bases("Node").build("params").field("params",[t("FlowType")]),t("TypeParameter").bases("FlowType").build("name","variance","bound","default").field("name",String).field("variance",s,i.null).field("bound",n(t("TypeAnnotation"),null),i.null).field("default",n(t("FlowType"),null),i.null),t("ClassProperty").field("variance",s,i.null),t("ClassImplements").bases("Node").build("id").field("id",t("Identifier")).field("superClass",n(t("Expression"),null),i.null).field("typeParameters",n(t("TypeParameterInstantiation"),null),i.null),t("InterfaceTypeAnnotation").bases("FlowType").build("body","extends").field("body",t("ObjectTypeAnnotation")).field("extends",n([t("InterfaceExtends")],null),i.null),t("InterfaceDeclaration").bases("Declaration").build("id","body","extends").field("id",t("Identifier")).field("typeParameters",n(t("TypeParameterDeclaration"),null),i.null).field("body",t("ObjectTypeAnnotation")).field("extends",[t("InterfaceExtends")]),t("DeclareInterface").bases("InterfaceDeclaration").build("id","body","extends"),t("InterfaceExtends").bases("Node").build("id").field("id",t("Identifier")).field("typeParameters",n(t("TypeParameterInstantiation"),null),i.null),t("TypeAlias").bases("Declaration").build("id","typeParameters","right").field("id",t("Identifier")).field("typeParameters",n(t("TypeParameterDeclaration"),null)).field("right",t("FlowType")),t("DeclareTypeAlias").bases("TypeAlias").build("id","typeParameters","right"),t("OpaqueType").bases("Declaration").build("id","typeParameters","impltype","supertype").field("id",t("Identifier")).field("typeParameters",n(t("TypeParameterDeclaration"),null)).field("impltype",t("FlowType")).field("supertype",n(t("FlowType"),null)),t("DeclareOpaqueType").bases("OpaqueType").build("id","typeParameters","supertype").field("impltype",n(t("FlowType"),null)),t("TypeCastExpression").bases("Expression").build("expression","typeAnnotation").field("expression",t("Expression")).field("typeAnnotation",t("TypeAnnotation")),t("TupleTypeAnnotation").bases("FlowType").build("types").field("types",[t("FlowType")]),t("DeclareVariable").bases("Statement").build("id").field("id",t("Identifier")),t("DeclareFunction").bases("Statement").build("id").field("id",t("Identifier")).field("predicate",n(t("FlowPredicate"),null),i.null),t("DeclareClass").bases("InterfaceDeclaration").build("id"),t("DeclareModule").bases("Statement").build("id","body").field("id",n(t("Identifier"),t("Literal"))).field("body",t("BlockStatement")),t("DeclareModuleExports").bases("Statement").build("typeAnnotation").field("typeAnnotation",t("TypeAnnotation")),t("DeclareExportDeclaration").bases("Declaration").build("default","declaration","specifiers","source").field("default",Boolean).field("declaration",n(t("DeclareVariable"),t("DeclareFunction"),t("DeclareClass"),t("FlowType"),t("TypeAlias"),t("DeclareOpaqueType"),t("InterfaceDeclaration"),null)).field("specifiers",[n(t("ExportSpecifier"),t("ExportBatchSpecifier"))],i.emptyArray).field("source",n(t("Literal"),null),i.null),t("DeclareExportAllDeclaration").bases("Declaration").build("source").field("source",n(t("Literal"),null),i.null),t("ImportDeclaration").field("importKind",n("value","type","typeof"),()=>"value"),t("FlowPredicate").bases("Flow"),t("InferredPredicate").bases("FlowPredicate").build(),t("DeclaredPredicate").bases("FlowPredicate").build("value").field("value",t("Expression")),t("Function").field("predicate",n(t("FlowPredicate"),null),i.null),t("CallExpression").field("typeArguments",n(null,t("TypeParameterInstantiation")),i.null),t("NewExpression").field("typeArguments",n(null,t("TypeParameterInstantiation")),i.null),t("EnumDeclaration").bases("Declaration").build("id","body").field("id",t("Identifier")).field("body",n(t("EnumBooleanBody"),t("EnumNumberBody"),t("EnumStringBody"),t("EnumSymbolBody"))),t("EnumBooleanBody").build("members","explicitType").field("members",[t("EnumBooleanMember")]).field("explicitType",Boolean),t("EnumNumberBody").build("members","explicitType").field("members",[t("EnumNumberMember")]).field("explicitType",Boolean),t("EnumStringBody").build("members","explicitType").field("members",n([t("EnumStringMember")],[t("EnumDefaultedMember")])).field("explicitType",Boolean),t("EnumSymbolBody").build("members").field("members",[t("EnumDefaultedMember")]),t("EnumBooleanMember").build("id","init").field("id",t("Identifier")).field("init",n(t("Literal"),Boolean)),t("EnumNumberMember").build("id","init").field("id",t("Identifier")).field("init",t("Literal")),t("EnumStringMember").build("id","init").field("id",t("Identifier")).field("init",t("Literal")),t("EnumDefaultedMember").build("id").field("id",t("Identifier"))}Oe(()=>module);function MP(e){e.use(lo);var r=e.use(Qe),t=e.use(Yt).defaults,n=r.Type.def,i=r.Type.or;n("VariableDeclaration").field("declarations",[i(n("VariableDeclarator"),n("Identifier"))]),n("Property").field("value",i(n("Expression"),n("Pattern"))),n("ArrayPattern").field("elements",[i(n("Pattern"),n("SpreadElement"),null)]),n("ObjectPattern").field("properties",[i(n("Property"),n("PropertyPattern"),n("SpreadPropertyPattern"),n("SpreadProperty"))]),n("ExportSpecifier").bases("ModuleSpecifier").build("id","name"),n("ExportBatchSpecifier").bases("Specifier").build(),n("ExportDeclaration").bases("Declaration").build("default","declaration","specifiers","source").field("default",Boolean).field("declaration",i(n("Declaration"),n("Expression"),null)).field("specifiers",[i(n("ExportSpecifier"),n("ExportBatchSpecifier"))],t.emptyArray).field("source",i(n("Literal"),null),t.null),n("Block").bases("Comment").build("value","leading","trailing"),n("Line").bases("Comment").build("value","leading","trailing")}Oe(()=>module);function Cb(e){e.use(lo);let r=e.use(Qe),t=e.use(Yt).defaults,n=r.Type.def,i=r.Type.or,{undefined:s}=r.builtInTypes;n("Noop").bases("Statement").build(),n("DoExpression").bases("Expression").build("body").field("body",[n("Statement")]),n("BindExpression").bases("Expression").build("object","callee").field("object",i(n("Expression"),null)).field("callee",n("Expression")),n("ParenthesizedExpression").bases("Expression").build("expression").field("expression",n("Expression")),n("ExportNamespaceSpecifier").bases("Specifier").build("exported").field("exported",n("Identifier")),n("ExportDefaultSpecifier").bases("Specifier").build("exported").field("exported",n("Identifier")),n("CommentBlock").bases("Comment").build("value","leading","trailing"),n("CommentLine").bases("Comment").build("value","leading","trailing"),n("Directive").bases("Node").build("value").field("value",n("DirectiveLiteral")),n("DirectiveLiteral").bases("Node","Expression").build("value").field("value",String,t["use strict"]),n("InterpreterDirective").bases("Node").build("value").field("value",String),n("BlockStatement").bases("Statement").build("body").field("body",[n("Statement")]).field("directives",[n("Directive")],t.emptyArray),n("Program").bases("Node").build("body").field("body",[n("Statement")]).field("directives",[n("Directive")],t.emptyArray).field("interpreter",i(n("InterpreterDirective"),null),t.null);function o(c=String,p){return["extra",{rawValue:c,raw:String},function(){let f=r.getFieldValue(this,"value");return{rawValue:f,raw:p?p(f):String(f)}}]}n("StringLiteral").bases("Literal").build("value").field("value",String).field(...o(String,c=>JSON.stringify(c))),n("NumericLiteral").bases("Literal").build("value").field("value",Number).field("raw",i(String,null),t.null).field(...o(Number)),n("BigIntLiteral").bases("Literal").build("value").field("value",i(String,Number)).field(...o(String,c=>c+"n")),n("DecimalLiteral").bases("Literal").build("value").field("value",String).field(...o(String,c=>c+"m")),n("NullLiteral").bases("Literal").build().field("value",null,t.null),n("BooleanLiteral").bases("Literal").build("value").field("value",Boolean),n("RegExpLiteral").bases("Literal").build("pattern","flags").field("pattern",String).field("flags",String).field("value",RegExp,function(){return new RegExp(this.pattern,this.flags)}).field(...o(i(RegExp,s),c=>`/${c.pattern}/${c.flags||""}`)).field("regex",{pattern:String,flags:String},function(){return{pattern:this.pattern,flags:this.flags}});var a=i(n("Property"),n("ObjectMethod"),n("ObjectProperty"),n("SpreadProperty"),n("SpreadElement"));n("ObjectExpression").bases("Expression").build("properties").field("properties",[a]),n("ObjectMethod").bases("Node","Function").build("kind","key","params","body","computed").field("kind",i("method","get","set")).field("key",i(n("Literal"),n("Identifier"),n("Expression"))).field("params",[n("Pattern")]).field("body",n("BlockStatement")).field("computed",Boolean,t.false).field("generator",Boolean,t.false).field("async",Boolean,t.false).field("accessibility",i(n("Literal"),null),t.null).field("decorators",i([n("Decorator")],null),t.null),n("ObjectProperty").bases("Node").build("key","value").field("key",i(n("Literal"),n("Identifier"),n("Expression"))).field("value",i(n("Expression"),n("Pattern"))).field("accessibility",i(n("Literal"),null),t.null).field("computed",Boolean,t.false);var l=i(n("MethodDefinition"),n("VariableDeclarator"),n("ClassPropertyDefinition"),n("ClassProperty"),n("ClassPrivateProperty"),n("ClassMethod"),n("ClassPrivateMethod"),n("ClassAccessorProperty"),n("StaticBlock"));n("ClassBody").bases("Declaration").build("body").field("body",[l]),n("ClassMethod").bases("Declaration","Function").build("kind","key","params","body","computed","static").field("key",i(n("Literal"),n("Identifier"),n("Expression"))),n("ClassPrivateMethod").bases("Declaration","Function").build("key","params","body","kind","computed","static").field("key",n("PrivateName")),n("ClassAccessorProperty").bases("Declaration").build("key","value","decorators","computed","static").field("key",i(n("Literal"),n("Identifier"),n("PrivateName"),n("Expression"))).field("value",i(n("Expression"),null),t.null),["ClassMethod","ClassPrivateMethod"].forEach(c=>{n(c).field("kind",i("get","set","method","constructor"),()=>"method").field("body",n("BlockStatement")).field("access",i("public","private","protected",null),t.null)}),["ClassMethod","ClassPrivateMethod","ClassAccessorProperty"].forEach(c=>{n(c).field("computed",Boolean,t.false).field("static",Boolean,t.false).field("abstract",Boolean,t.false).field("accessibility",i("public","private","protected",null),t.null).field("decorators",i([n("Decorator")],null),t.null).field("definite",Boolean,t.false).field("optional",Boolean,t.false).field("override",Boolean,t.false).field("readonly",Boolean,t.false)});var u=i(n("Property"),n("PropertyPattern"),n("SpreadPropertyPattern"),n("SpreadProperty"),n("ObjectProperty"),n("RestProperty"),n("RestElement"));n("ObjectPattern").bases("Pattern").build("properties").field("properties",[u]).field("decorators",i([n("Decorator")],null),t.null),n("SpreadProperty").bases("Node").build("argument").field("argument",n("Expression")),n("RestProperty").bases("Node").build("argument").field("argument",n("Expression")),n("ForAwaitStatement").bases("Statement").build("left","right","body").field("left",i(n("VariableDeclaration"),n("Expression"))).field("right",n("Expression")).field("body",n("Statement")),n("Import").bases("Expression").build()}Oe(()=>module);function $P(e){let t=e.use(Qe).Type.def;e.use(Cb),e.use(Eb),t("V8IntrinsicIdentifier").bases("Expression").build("name").field("name",String),t("TopicReference").bases("Expression").build()}Oe(()=>module);function UP(e){e.use(Cb),e.use(xb);var r=e.use(Qe),t=r.namedTypes,n=r.Type.def,i=r.Type.or,s=e.use(Yt).defaults,o=r.Type.from(function(c,p){return!!(t.StringLiteral&&t.StringLiteral.check(c,p)||t.Literal&&t.Literal.check(c,p)&&typeof c.value=="string")},"StringLiteral");n("TSType").bases("Node");var a=i(n("Identifier"),n("TSQualifiedName"));n("TSTypeReference").bases("TSType","TSHasOptionalTypeParameterInstantiation").build("typeName","typeParameters").field("typeName",a),n("TSHasOptionalTypeParameterInstantiation").field("typeParameters",i(n("TSTypeParameterInstantiation"),null),s.null),n("TSHasOptionalTypeParameters").field("typeParameters",i(n("TSTypeParameterDeclaration"),null,void 0),s.null),n("TSHasOptionalTypeAnnotation").field("typeAnnotation",i(n("TSTypeAnnotation"),null),s.null),n("TSQualifiedName").bases("Node").build("left","right").field("left",a).field("right",a),n("TSAsExpression").bases("Expression","Pattern").build("expression","typeAnnotation").field("expression",n("Expression")).field("typeAnnotation",n("TSType")).field("extra",i({parenthesized:Boolean},null),s.null),n("TSTypeCastExpression").bases("Expression").build("expression","typeAnnotation").field("expression",n("Expression")).field("typeAnnotation",n("TSType")),n("TSSatisfiesExpression").bases("Expression","Pattern").build("expression","typeAnnotation").field("expression",n("Expression")).field("typeAnnotation",n("TSType")),n("TSNonNullExpression").bases("Expression","Pattern").build("expression").field("expression",n("Expression")),["TSAnyKeyword","TSBigIntKeyword","TSBooleanKeyword","TSNeverKeyword","TSNullKeyword","TSNumberKeyword","TSObjectKeyword","TSStringKeyword","TSSymbolKeyword","TSUndefinedKeyword","TSUnknownKeyword","TSVoidKeyword","TSIntrinsicKeyword","TSThisType"].forEach(c=>{n(c).bases("TSType").build()}),n("TSArrayType").bases("TSType").build("elementType").field("elementType",n("TSType")),n("TSLiteralType").bases("TSType").build("literal").field("literal",i(n("NumericLiteral"),n("StringLiteral"),n("BooleanLiteral"),n("TemplateLiteral"),n("UnaryExpression"),n("BigIntLiteral"))),n("TemplateLiteral").field("expressions",i([n("Expression")],[n("TSType")])),["TSUnionType","TSIntersectionType"].forEach(c=>{n(c).bases("TSType").build("types").field("types",[n("TSType")])}),n("TSConditionalType").bases("TSType").build("checkType","extendsType","trueType","falseType").field("checkType",n("TSType")).field("extendsType",n("TSType")).field("trueType",n("TSType")).field("falseType",n("TSType")),n("TSInferType").bases("TSType").build("typeParameter").field("typeParameter",n("TSTypeParameter")),n("TSParenthesizedType").bases("TSType").build("typeAnnotation").field("typeAnnotation",n("TSType"));var l=[i(n("Identifier"),n("RestElement"),n("ArrayPattern"),n("ObjectPattern"))];["TSFunctionType","TSConstructorType"].forEach(c=>{n(c).bases("TSType","TSHasOptionalTypeParameters","TSHasOptionalTypeAnnotation").build("parameters").field("parameters",l)}),n("TSDeclareFunction").bases("Declaration","TSHasOptionalTypeParameters").build("id","params","returnType").field("declare",Boolean,s.false).field("async",Boolean,s.false).field("generator",Boolean,s.false).field("id",i(n("Identifier"),null),s.null).field("params",[n("Pattern")]).field("returnType",i(n("TSTypeAnnotation"),n("Noop"),null),s.null),n("TSDeclareMethod").bases("Declaration","TSHasOptionalTypeParameters").build("key","params","returnType").field("async",Boolean,s.false).field("generator",Boolean,s.false).field("params",[n("Pattern")]).field("abstract",Boolean,s.false).field("accessibility",i("public","private","protected",void 0),s.undefined).field("static",Boolean,s.false).field("computed",Boolean,s.false).field("optional",Boolean,s.false).field("key",i(n("Identifier"),n("StringLiteral"),n("NumericLiteral"),n("Expression"))).field("kind",i("get","set","method","constructor"),function(){return"method"}).field("access",i("public","private","protected",void 0),s.undefined).field("decorators",i([n("Decorator")],null),s.null).field("returnType",i(n("TSTypeAnnotation"),n("Noop"),null),s.null),n("TSMappedType").bases("TSType").build("typeParameter","typeAnnotation").field("readonly",i(Boolean,"+","-"),s.false).field("typeParameter",n("TSTypeParameter")).field("optional",i(Boolean,"+","-"),s.false).field("typeAnnotation",i(n("TSType"),null),s.null),n("TSTupleType").bases("TSType").build("elementTypes").field("elementTypes",[i(n("TSType"),n("TSNamedTupleMember"))]),n("TSNamedTupleMember").bases("TSType").build("label","elementType","optional").field("label",n("Identifier")).field("optional",Boolean,s.false).field("elementType",n("TSType")),n("TSRestType").bases("TSType").build("typeAnnotation").field("typeAnnotation",n("TSType")),n("TSOptionalType").bases("TSType").build("typeAnnotation").field("typeAnnotation",n("TSType")),n("TSIndexedAccessType").bases("TSType").build("objectType","indexType").field("objectType",n("TSType")).field("indexType",n("TSType")),n("TSTypeOperator").bases("TSType").build("operator").field("operator",String).field("typeAnnotation",n("TSType")),n("TSTypeAnnotation").bases("Node").build("typeAnnotation").field("typeAnnotation",i(n("TSType"),n("TSTypeAnnotation"))),n("TSIndexSignature").bases("Declaration","TSHasOptionalTypeAnnotation").build("parameters","typeAnnotation").field("parameters",[n("Identifier")]).field("readonly",Boolean,s.false),n("TSPropertySignature").bases("Declaration","TSHasOptionalTypeAnnotation").build("key","typeAnnotation","optional").field("key",n("Expression")).field("computed",Boolean,s.false).field("readonly",Boolean,s.false).field("optional",Boolean,s.false).field("initializer",i(n("Expression"),null),s.null),n("TSMethodSignature").bases("Declaration","TSHasOptionalTypeParameters","TSHasOptionalTypeAnnotation").build("key","parameters","typeAnnotation").field("key",n("Expression")).field("computed",Boolean,s.false).field("optional",Boolean,s.false).field("parameters",l),n("TSTypePredicate").bases("TSTypeAnnotation","TSType").build("parameterName","typeAnnotation","asserts").field("parameterName",i(n("Identifier"),n("TSThisType"))).field("typeAnnotation",i(n("TSTypeAnnotation"),null),s.null).field("asserts",Boolean,s.false),["TSCallSignatureDeclaration","TSConstructSignatureDeclaration"].forEach(c=>{n(c).bases("Declaration","TSHasOptionalTypeParameters","TSHasOptionalTypeAnnotation").build("parameters","typeAnnotation").field("parameters",l)}),n("TSEnumMember").bases("Node").build("id","initializer").field("id",i(n("Identifier"),o)).field("initializer",i(n("Expression"),null),s.null),n("TSTypeQuery").bases("TSType").build("exprName").field("exprName",i(a,n("TSImportType")));var u=i(n("TSCallSignatureDeclaration"),n("TSConstructSignatureDeclaration"),n("TSIndexSignature"),n("TSMethodSignature"),n("TSPropertySignature"));n("TSTypeLiteral").bases("TSType").build("members").field("members",[u]),n("TSTypeParameter").bases("Identifier").build("name","constraint","default").field("name",i(n("Identifier"),String)).field("constraint",i(n("TSType"),void 0),s.undefined).field("default",i(n("TSType"),void 0),s.undefined),n("TSTypeAssertion").bases("Expression","Pattern").build("typeAnnotation","expression").field("typeAnnotation",n("TSType")).field("expression",n("Expression")).field("extra",i({parenthesized:Boolean},null),s.null),n("TSTypeParameterDeclaration").bases("Declaration").build("params").field("params",[n("TSTypeParameter")]),n("TSInstantiationExpression").bases("Expression","TSHasOptionalTypeParameterInstantiation").build("expression","typeParameters").field("expression",n("Expression")),n("TSTypeParameterInstantiation").bases("Node").build("params").field("params",[n("TSType")]),n("TSEnumDeclaration").bases("Declaration").build("id","members").field("id",n("Identifier")).field("const",Boolean,s.false).field("declare",Boolean,s.false).field("members",[n("TSEnumMember")]).field("initializer",i(n("Expression"),null),s.null),n("TSTypeAliasDeclaration").bases("Declaration","TSHasOptionalTypeParameters").build("id","typeAnnotation").field("id",n("Identifier")).field("declare",Boolean,s.false).field("typeAnnotation",n("TSType")),n("TSModuleBlock").bases("Node").build("body").field("body",[n("Statement")]),n("TSModuleDeclaration").bases("Declaration").build("id","body").field("id",i(o,a)).field("declare",Boolean,s.false).field("global",Boolean,s.false).field("body",i(n("TSModuleBlock"),n("TSModuleDeclaration"),null),s.null),n("TSImportType").bases("TSType","TSHasOptionalTypeParameterInstantiation").build("argument","qualifier","typeParameters").field("argument",o).field("qualifier",i(a,void 0),s.undefined),n("TSImportEqualsDeclaration").bases("Declaration").build("id","moduleReference").field("id",n("Identifier")).field("isExport",Boolean,s.false).field("moduleReference",i(a,n("TSExternalModuleReference"))),n("TSExternalModuleReference").bases("Declaration").build("expression").field("expression",o),n("TSExportAssignment").bases("Statement").build("expression").field("expression",n("Expression")),n("TSNamespaceExportDeclaration").bases("Declaration").build("id").field("id",n("Identifier")),n("TSInterfaceBody").bases("Node").build("body").field("body",[u]),n("TSExpressionWithTypeArguments").bases("TSType","TSHasOptionalTypeParameterInstantiation").build("expression","typeParameters").field("expression",a),n("TSInterfaceDeclaration").bases("Declaration","TSHasOptionalTypeParameters").build("id","body").field("id",a).field("declare",Boolean,s.false).field("extends",i([n("TSExpressionWithTypeArguments")],null),s.null).field("body",n("TSInterfaceBody")),n("TSParameterProperty").bases("Pattern").build("parameter").field("accessibility",i("public","private","protected",void 0),s.undefined).field("readonly",Boolean,s.false).field("parameter",i(n("Identifier"),n("AssignmentPattern"))),n("ClassProperty").field("access",i("public","private","protected",void 0),s.undefined),n("ClassAccessorProperty").bases("Declaration","TSHasOptionalTypeAnnotation"),n("ClassBody").field("body",[i(n("MethodDefinition"),n("VariableDeclarator"),n("ClassPropertyDefinition"),n("ClassProperty"),n("ClassPrivateProperty"),n("ClassAccessorProperty"),n("ClassMethod"),n("ClassPrivateMethod"),n("StaticBlock"),n("TSDeclareMethod"),u)])}Oe(()=>module);var yr;yr||(yr={});var{astNodesAreEquivalent:h8,builders:Zi,builtInTypes:br,defineMethod:g8,eachField:y8,finalize:b8,getBuilderName:D8,getFieldNames:jP,getFieldValue:cn,getSupertypeNames:x8,namedTypes:KP,NodePath:VP,Path:E8,PathVisitor:C8,someField:zP,Type:S8,use:T8,visit:w8}=wP([lo,BP,Eb,MP,$P,UP]);Object.assign(yr,KP);var Oa=yr,Zy=Ja.default.SourceMapConsumer,qP=Ja.default.SourceMapGenerator,Sb=Object.prototype.hasOwnProperty;function WP(){return`
|
|
991
|
+
`);return s!==-1&&(r=jg(r,i,n,s)),n+r+i};Object.defineProperties(Bs.prototype,Oi);var M3=Bs(),$3=Bs({level:Vg?Vg.level:0});var be=new ga({level:2}),Wg={comment:be.gray,quote:be.gray,keyword:be.green,"selector-tag":be.green,addition:be.green,number:be.cyan,string:be.cyan,"meta meta-string":be.cyan,literal:be.cyan,doctag:be.cyan,regexp:be.cyan,title:be.blue,section:be.blue,name:be.blue,"selector-id":be.blue,"selector-class":be.blue,attribute:be.yellow,attr:be.yellow,variable:be.yellow,"template-variable":be.yellow,"class title":be.yellow,type:be.yellow,symbol:be.magenta,bullet:be.magenta,subst:be.magenta,meta:be.magenta,"meta keyword":be.magenta,"selector-attr":be.magenta,"selector-pseudo":be.magenta,link:be.magenta,built_in:be.red,deletion:be.red,emphasis:be.italic,strong:be.bold,formula:be.inverse};function Xn(e){let r=Yu(e);return{highlight:t,highlightAuto:n,listLanguages:r.listLanguages,register:r.register,registerAlias:r.registerAlias,registered:r.registered};function t(i,s,o){let a=r.highlight(i,s),l=a.data;return{language:l.language,relevance:l.relevance,value:tc(o||Wg,a)}}function n(i,s){let o,a;if(s&&("subset"in s||"sheet"in s)){let c=s;a={subset:c.subset},o=c.sheet}else o=s;let l=r.highlightAuto(i,a),u=l.data;return{language:u.language,relevance:u.relevance,value:tc(o||Wg,l)}}}function tc(e,r){let t=new Set(r.type==="element"&&Array.isArray(r.properties.className)?r.properties.className.map(function(a){return String(a).replace(/^hljs-/,"")}):[]),n={},i,s="",o;for(o in e)if(Object.hasOwn(e,o)){let a=o.split(" "),l=e[o];t.has(a[0])?a.length===1?i=l:n[a.slice(1).join(" ")]=l:n[o]=l}return"value"in r?s=r.value:"children"in r&&(s=PA(n,r.children)),i&&(s=i(s)),s}function PA(e,r){let t=[],n=-1;for(;++n<r.length;)t.push(tc(e,r[n]));return t.join("")}var Gg=V(require("@sentry/node"),1),Hg=V(require("@amplitude/analytics-node"),1);async function ee(e){if(process.env.NODE_ENV!=="test")try{await Promise.allSettled([Gg.flush(2e3),Hg.flush().promise])}catch(r){console.error(r)}process.exit(e)}var Gt=process.env.AIR_HOST||"https://air-layout-v2-tk43uighdq-uc.a.run.app";var Mr=V(require("@amplitude/analytics-node"),1),$r=V(require("@sentry/node"),1);var Jg="1.6.2";var ht=require("node:fs/promises"),Yb=require("node:crypto"),Ye=require("node:fs"),uo=require("node:os"),ve=V(require("node:path"),1),mp=V(require("prettier"),1),Xb=V(require("typescript"),1),Qb=V(require("launch-editor"),1);var es=require("node:child_process");var fp={};XE(fp,{MagicastError:()=>wt,builders:()=>H1,detectCodeFormat:()=>Gb,generateCode:()=>dp,loadFile:()=>W1,parseExpression:()=>Jb,parseModule:()=>Hb,writeFile:()=>G1});var ja=require("node:fs");var Ja=V(Ey(),1),fb=V(Qy(),1);function Yt(e){var r=e.use(Qe),t=r.Type,n=r.builtInTypes,i=n.number;function s(u){return t.from(c=>i.check(c)&&c>=u,i+" >= "+u)}let o={null:function(){return null},emptyArray:function(){return[]},false:function(){return!1},true:function(){return!0},undefined:function(){},"use strict":function(){return"use strict"}};var a=t.or(n.string,n.number,n.boolean,n.null,n.undefined);let l=t.from(u=>{if(u===null)return!0;var c=typeof u;return!(c==="object"||c==="function")},a.toString());return{geq:s,defaults:o,isPrimitive:l}}function Oe(e){try{var r=e(),t=r.exports,n=t.default}catch{return}n&&n!==t&&typeof t=="object"&&(Object.assign(n,t,{default:n}),t.__esModule&&Object.defineProperty(n,"__esModule",{value:!0}),r.exports=n)}var DP=Object.defineProperty,xP=(e,r,t)=>r in e?DP(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,kt=(e,r,t)=>(xP(e,typeof r!="symbol"?r+"":r,t),t),mb=Object.prototype,Ka=mb.toString,sr=mb.hasOwnProperty,oi=class{assert(r,t){if(!this.check(r,t)){var n=ap(r);throw new Error(n+" does not match type "+this)}return!0}arrayOf(){let r=this;return new io(r)}},io=class extends oi{constructor(r){super(),this.elemType=r,kt(this,"kind","ArrayType")}toString(){return"["+this.elemType+"]"}check(r,t){return Array.isArray(r)&&r.every(n=>this.elemType.check(n,t))}},Va=class extends oi{constructor(r){super(),this.value=r,kt(this,"kind","IdentityType")}toString(){return String(this.value)}check(r,t){let n=r===this.value;return!n&&typeof t=="function"&&t(this,r),n}},za=class extends oi{constructor(r){super(),this.fields=r,kt(this,"kind","ObjectType")}toString(){return"{ "+this.fields.join(", ")+" }"}check(r,t){return Ka.call(r)===Ka.call({})&&this.fields.every(n=>n.type.check(r[n.name],t))}},qa=class extends oi{constructor(r){super(),this.types=r,kt(this,"kind","OrType")}toString(){return this.types.join(" | ")}check(r,t){return this.types.some(n=>n.check(r,!!t))?!0:(typeof t=="function"&&t(this,r),!1)}},si=class extends oi{constructor(r,t){super(),this.name=r,this.predicate=t,kt(this,"kind","PredicateType")}toString(){return this.name}check(r,t){let n=this.predicate(r,t);return!n&&typeof t=="function"&&t(this,r),n}},ro=class e{constructor(r,t){this.type=r,this.typeName=t,kt(this,"baseNames",[]),kt(this,"ownFields",Object.create(null)),kt(this,"allSupertypes",Object.create(null)),kt(this,"supertypeList",[]),kt(this,"allFields",Object.create(null)),kt(this,"fieldNames",[]),kt(this,"finalized",!1),kt(this,"buildable",!1),kt(this,"buildParams",[])}isSupertypeOf(r){if(r instanceof e){if(this.finalized!==!0||r.finalized!==!0)throw new Error("");return sr.call(r.allSupertypes,this.typeName)}else throw new Error(r+" is not a Def")}checkAllFields(r,t){var n=this.allFields;if(this.finalized!==!0)throw new Error(""+this.typeName);function i(s){var o=n[s],a=o.type,l=o.getValue(r);return a.check(l,t)}return r!==null&&typeof r=="object"&&Object.keys(n).every(i)}bases(...r){var t=this.baseNames;if(this.finalized){if(r.length!==t.length)throw new Error("");for(var n=0;n<r.length;n++)if(r[n]!==t[n])throw new Error("");return this}return r.forEach(i=>{t.indexOf(i)<0&&t.push(i)}),this}},Wa=class{constructor(r,t,n,i){this.name=r,this.type=t,this.defaultFn=n,kt(this,"hidden"),this.hidden=!!i}toString(){return JSON.stringify(this.name)+": "+this.type}getValue(r){var t=r[this.name];return typeof t<"u"||typeof this.defaultFn=="function"&&(t=this.defaultFn.call(r)),t}};function ap(e){return Array.isArray(e)?"["+e.map(ap).join(", ")+"]":e&&typeof e=="object"?"{ "+Object.keys(e).map(function(r){return r+": "+e[r]}).join(", ")+" }":JSON.stringify(e)}function Qe(e){let r={or(...v){return new qa(v.map(I=>r.from(I)))},from(v,I){if(v instanceof io||v instanceof Va||v instanceof za||v instanceof qa||v instanceof si)return v;if(v instanceof ro)return v.type;if(a.check(v)){if(v.length!==1)throw new Error("only one element type is permitted for typed arrays");return new io(r.from(v[0]))}if(l.check(v))return new za(Object.keys(v).map(H=>new Wa(H,r.from(v[H],H))));if(typeof v=="function"){var $=t.indexOf(v);if($>=0)return n[$];if(typeof I!="string")throw new Error("missing name");return new si(I,v)}return new Va(v)},def(v){return sr.call(y,v)?y[v]:y[v]=new C(v)},hasDef(v){return sr.call(y,v)}};var t=[],n=[];function i(v,I){let $=Ka.call(I),H=new si(v,xe=>Ka.call(xe)===$);return I&&typeof I.constructor=="function"&&(t.push(I.constructor),n.push(H)),H}let s=i("string","truthy"),o=i("function",function(){}),a=i("array",[]),l=i("object",{}),u=i("RegExp",/./),c=i("Date",new Date),p=i("number",3),d=i("boolean",!0),f=i("null",null),m=i("undefined",void 0),h=typeof BigInt=="function"?i("BigInt",BigInt(1234)):new si("BigInt",()=>!1),g={string:s,function:o,array:a,object:l,RegExp:u,Date:c,number:p,boolean:d,null:f,undefined:m,BigInt:h};var y=Object.create(null);function b(v){if(v&&typeof v=="object"){var I=v.type;if(typeof I=="string"&&sr.call(y,I)){var $=y[I];if($.finalized)return $}}return null}class C extends ro{constructor(I){super(new si(I,($,H)=>this.check($,H)),I)}check(I,$){if(this.finalized!==!0)throw new Error("prematurely checking unfinalized type "+this.typeName);if(I===null||typeof I!="object")return!1;var H=b(I);return H?$&&H===this?this.checkAllFields(I,$):this.isSupertypeOf(H)?$?H.checkAllFields(I,$)&&this.checkAllFields(I,!1):!0:!1:this.typeName==="SourceLocation"||this.typeName==="Position"?this.checkAllFields(I,$):!1}build(...I){if(this.buildParams=I,this.buildable)return this;this.field("type",String,()=>this.typeName),this.buildable=!0;let $=(xe,ae,me,yt)=>{if(!sr.call(xe,ae)){var Pt=this.allFields;if(!sr.call(Pt,ae))throw new Error(""+ae);var Vr=Pt[ae],ps=Vr.type,zr;if(yt)zr=me;else if(Vr.defaultFn)zr=Vr.defaultFn.call(xe);else{var ds="no value or default function given for field "+JSON.stringify(ae)+" of "+this.typeName+"("+this.buildParams.map(function(Pe){return Pt[Pe]}).join(", ")+")";throw new Error(ds)}if(!ps.check(zr))throw new Error(ap(zr)+" does not match field "+Vr+" of type "+this.typeName);xe[ae]=zr}},H=(...xe)=>{var ae=xe.length;if(!this.finalized)throw new Error("attempting to instantiate unfinalized type "+this.typeName);var me=Object.create(w);if(this.buildParams.forEach(function(yt,Pt){Pt<ae?$(me,yt,xe[Pt],!0):$(me,yt,null,!1)}),Object.keys(this.allFields).forEach(function(yt){$(me,yt,null,!1)}),me.type!==this.typeName)throw new Error("");return me};return H.from=xe=>{if(!this.finalized)throw new Error("attempting to instantiate unfinalized type "+this.typeName);var ae=Object.create(w);if(Object.keys(this.allFields).forEach(function(me){sr.call(xe,me)?$(ae,me,xe[me],!0):$(ae,me,null,!1)}),ae.type!==this.typeName)throw new Error("");return ae},Object.defineProperty(E,B(this.typeName),{enumerable:!0,value:H}),this}field(I,$,H,xe){return this.finalized?(console.error("Ignoring attempt to redefine field "+JSON.stringify(I)+" of finalized type "+JSON.stringify(this.typeName)),this):(this.ownFields[I]=new Wa(I,r.from($),H,xe),this)}finalize(){if(!this.finalized){var I=this.allFields,$=this.allSupertypes;this.baseNames.forEach(xe=>{var ae=y[xe];if(ae instanceof ro)ae.finalize(),M(I,ae.allFields),M($,ae.allSupertypes);else{var me="unknown supertype name "+JSON.stringify(xe)+" for subtype "+JSON.stringify(this.typeName);throw new Error(me)}}),M(I,this.ownFields),$[this.typeName]=this,this.fieldNames.length=0;for(var H in I)sr.call(I,H)&&!I[H].hidden&&this.fieldNames.push(H);Object.defineProperty(U,this.typeName,{enumerable:!0,value:this.type}),this.finalized=!0,F(this.typeName,this.supertypeList),this.buildable&&this.supertypeList.lastIndexOf("Expression")>=0&&re(this.typeName)}}}function x(v){if(!sr.call(y,v))throw new Error("");var I=y[v];if(I.finalized!==!0)throw new Error("");return I.supertypeList.slice(1)}function D(v){for(var I={},$=Object.keys(y),H=$.length,xe=0;xe<H;++xe){var ae=$[xe],me=y[ae];if(me.finalized!==!0)throw new Error(""+ae);for(var yt=0;yt<me.supertypeList.length;++yt){var Pt=me.supertypeList[yt];if(sr.call(v,Pt)){I[ae]=Pt;break}}}return I}var E=Object.create(null),w={};function O(v,I){var $=w[v];return m.check(I)?delete w[v]:(o.assert(I),Object.defineProperty(w,v,{enumerable:!0,configurable:!0,value:I})),$}function B(v){return v.replace(/^[A-Z]+/,function(I){var $=I.length;switch($){case 0:return"";case 1:return I.toLowerCase();default:return I.slice(0,$-1).toLowerCase()+I.charAt($-1)}})}function N(v){return v=B(v),v.replace(/(Expression)?$/,"Statement")}var U={};function oe(v){var I=b(v);if(I)return I.fieldNames.slice(0);if("type"in v)throw new Error("did not recognize object of type "+JSON.stringify(v.type));return Object.keys(v)}function G(v,I){var $=b(v);if($){var H=$.allFields[I];if(H)return H.getValue(v)}return v&&v[I]}function P(v,I,$){oe(v).forEach(function(H){I.call(this,H,G(v,H))},$)}function L(v,I,$){return oe(v).some(function(H){return I.call(this,H,G(v,H))},$)}function re(v){var I=N(v);if(E[I])return;var $=E[B(v)];if(!$)return;let H=function(...xe){return E.expressionStatement($.apply(E,xe))};H.from=function(...xe){return E.expressionStatement($.from.apply(E,xe))},E[I]=H}function F(v,I){I.length=0,I.push(v);for(var $=Object.create(null),H=0;H<I.length;++H){v=I[H];var xe=y[v];if(xe.finalized!==!0)throw new Error("");sr.call($,v)&&delete I[$[v]],$[v]=H,I.push.apply(I,xe.baseNames)}for(var ae=0,me=ae,yt=I.length;me<yt;++me)sr.call(I,me)&&(I[ae++]=I[me]);I.length=ae}function M(v,I){return Object.keys(I).forEach(function($){v[$]=I[$]}),v}function X(){Object.keys(y).forEach(function(v){y[v].finalize()})}return{Type:r,builtInTypes:g,getSupertypeNames:x,computeSupertypeLookupTable:D,builders:E,defineMethod:O,getBuilderName:B,getStatementBuilderName:N,namedTypes:U,getFieldNames:oe,getFieldValue:G,eachField:P,someField:L,finalize:X}}Oe(()=>module);var EP=Object.prototype,_a=EP.hasOwnProperty;function hb(e){var r=e.use(Qe),t=r.builtInTypes.array,n=r.builtInTypes.number;let i=function p(d,f,m){if(!(this instanceof p))throw new Error("Path constructor cannot be invoked without 'new'");if(f){if(!(f instanceof p))throw new Error("")}else f=null,m=null;this.value=d,this.parentPath=f,this.name=m,this.__childCache=null};var s=i.prototype;function o(p){return p.__childCache||(p.__childCache=Object.create(null))}function a(p,d){var f=o(p),m=p.getValueProperty(d),h=f[d];return(!_a.call(f,d)||h.value!==m)&&(h=f[d]=new p.constructor(m,p,d)),h}s.getValueProperty=function(d){return this.value[d]},s.get=function(...d){for(var f=this,m=d.length,h=0;h<m;++h)f=a(f,d[h]);return f},s.each=function(d,f){for(var m=[],h=this.value.length,g=0,g=0;g<h;++g)_a.call(this.value,g)&&(m[g]=this.get(g));for(f=f||this,g=0;g<h;++g)_a.call(m,g)&&d.call(f,m[g])},s.map=function(d,f){var m=[];return this.each(function(h){m.push(d.call(this,h))},f),m},s.filter=function(d,f){var m=[];return this.each(function(h){d.call(this,h)&&m.push(h)},f),m};function l(){}function u(p,d,f,m){if(t.assert(p.value),d===0)return l;var h=p.value.length;if(h<1)return l;var g=arguments.length;g===2?(f=0,m=h):g===3?(f=Math.max(f,0),m=h):(f=Math.max(f,0),m=Math.min(m,h)),n.assert(f),n.assert(m);for(var y=Object.create(null),b=o(p),C=f;C<m;++C)if(_a.call(p.value,C)){var x=p.get(C);if(x.name!==C)throw new Error("");var D=C+d;x.name=D,y[D]=x,delete b[C]}return delete b.length,function(){for(var E in y){var w=y[E];if(w.name!==+E)throw new Error("");b[E]=w,p.value[E]=w.value}}}s.shift=function(){var d=u(this,-1),f=this.value.shift();return d(),f},s.unshift=function(...d){var f=u(this,d.length),m=this.value.unshift.apply(this.value,d);return f(),m},s.push=function(...d){return t.assert(this.value),delete o(this).length,this.value.push.apply(this.value,d)},s.pop=function(){t.assert(this.value);var d=o(this);return delete d[this.value.length-1],delete d.length,this.value.pop()},s.insertAt=function(d){var f=arguments.length,m=u(this,f-1,d);if(m===l&&f<=1)return this;d=Math.max(d,0);for(var h=1;h<f;++h)this.value[d+h-1]=arguments[h];return m(),this},s.insertBefore=function(...d){for(var f=this.parentPath,m=d.length,h=[this.name],g=0;g<m;++g)h.push(d[g]);return f.insertAt.apply(f,h)},s.insertAfter=function(...d){for(var f=this.parentPath,m=d.length,h=[this.name+1],g=0;g<m;++g)h.push(d[g]);return f.insertAt.apply(f,h)};function c(p){if(!(p instanceof i))throw new Error("");var d=p.parentPath;if(!d)return p;var f=d.value,m=o(d);if(f[p.name]===p.value)m[p.name]=p;else if(t.check(f)){var h=f.indexOf(p.value);h>=0&&(m[p.name=h]=p)}else f[p.name]=p.value,m[p.name]=p;if(f[p.name]!==p.value)throw new Error("");if(p.parentPath.get(p.name)!==p)throw new Error("");return p}return s.replace=function(d){var f=[],m=this.parentPath.value,h=o(this.parentPath),g=arguments.length;if(c(this),t.check(m)){for(var y=m.length,b=u(this.parentPath,g-1,this.name+1),C=[this.name,1],x=0;x<g;++x)C.push(arguments[x]);var D=m.splice.apply(m,C);if(D[0]!==this.value)throw new Error("");if(m.length!==y-1+g)throw new Error("");if(b(),g===0)delete this.value,delete h[this.name],this.__childCache=null;else{if(m[this.name]!==d)throw new Error("");for(this.value!==d&&(this.value=d,this.__childCache=null),x=0;x<g;++x)f.push(this.parentPath.get(this.name+x));if(f[0]!==this)throw new Error("")}}else if(g===1)this.value!==d&&(this.__childCache=null),this.value=m[this.name]=d,f.push(this);else if(g===0)delete m[this.name],delete this.value,this.__childCache=null;else throw new Error("Could not replace path");return f},i}Oe(()=>module);var Wi=Object.prototype.hasOwnProperty;function CP(e){var r=e.use(Qe),t=r.Type,n=r.namedTypes,i=n.Node,s=n.Expression,o=r.builtInTypes.array,a=r.builders;let l=function x(D,E){if(!(this instanceof x))throw new Error("Scope constructor cannot be invoked without 'new'");c.check(D.value)||u.assert(D.value);var w;if(E){if(!(E instanceof x))throw new Error("");w=E.depth+1}else E=null,w=0;Object.defineProperties(this,{path:{value:D},node:{value:D.value},isGlobal:{value:!E,enumerable:!0},depth:{value:w},parent:{value:E},bindings:{value:{}},types:{value:{}}})};var u=t.or(n.Program,n.Function,n.CatchClause),c=t.or(n.Function,n.ClassDeclaration,n.ClassExpression,n.InterfaceDeclaration,n.TSInterfaceDeclaration,n.TypeAlias,n.TSTypeAliasDeclaration),p=t.or(n.TypeParameter,n.TSTypeParameter);l.isEstablishedBy=function(x){return u.check(x)||c.check(x)};var d=l.prototype;d.didScan=!1,d.declares=function(x){return this.scan(),Wi.call(this.bindings,x)},d.declaresType=function(x){return this.scan(),Wi.call(this.types,x)},d.declareTemporary=function(x){if(x){if(!/^[a-z$_]/i.test(x))throw new Error("")}else x="t$";x+=this.depth.toString(36)+"$",this.scan();for(var D=0;this.declares(x+D);)++D;var E=x+D;return this.bindings[E]=r.builders.identifier(E)},d.injectTemporary=function(x,D){x||(x=this.declareTemporary());var E=this.path.get("body");return n.BlockStatement.check(E.value)&&(E=E.get("body")),E.unshift(a.variableDeclaration("var",[a.variableDeclarator(x,D||null)])),x},d.scan=function(x){if(x||!this.didScan){for(var D in this.bindings)delete this.bindings[D];for(var D in this.types)delete this.types[D];f(this.path,this.bindings,this.types),this.didScan=!0}},d.getBindings=function(){return this.scan(),this.bindings},d.getTypes=function(){return this.scan(),this.types};function f(x,D,E){var w=x.value;if(c.check(w)){let O=x.get("typeParameters","params");o.check(O.value)&&O.each(B=>{C(B,E)})}u.check(w)&&(n.CatchClause.check(w)?y(x.get("param"),D):m(x,D,E))}function m(x,D,E){var w=x.value;x.parent&&n.FunctionExpression.check(x.parent.node)&&x.parent.node.id&&y(x.parent.get("id"),D),w&&(o.check(w)?x.each(O=>{g(O,D,E)}):n.Function.check(w)?(x.get("params").each(O=>{y(O,D)}),g(x.get("body"),D,E),m(x.get("typeParameters"),D,E)):n.TypeAlias&&n.TypeAlias.check(w)||n.InterfaceDeclaration&&n.InterfaceDeclaration.check(w)||n.TSTypeAliasDeclaration&&n.TSTypeAliasDeclaration.check(w)||n.TSInterfaceDeclaration&&n.TSInterfaceDeclaration.check(w)?b(x.get("id"),E):n.VariableDeclarator.check(w)?(y(x.get("id"),D),g(x.get("init"),D,E)):w.type==="ImportSpecifier"||w.type==="ImportNamespaceSpecifier"||w.type==="ImportDefaultSpecifier"?y(x.get(w.local?"local":w.name?"name":"id"),D):i.check(w)&&!s.check(w)&&r.eachField(w,function(O,B){var N=x.get(O);if(!h(N,B))throw new Error("");g(N,D,E)}))}function h(x,D){return!!(x.value===D||Array.isArray(x.value)&&x.value.length===0&&Array.isArray(D)&&D.length===0)}function g(x,D,E){var w=x.value;if(!(!w||s.check(w)))if(n.FunctionDeclaration.check(w)&&w.id!==null)y(x.get("id"),D);else if(n.ClassDeclaration&&n.ClassDeclaration.check(w)&&w.id!==null)y(x.get("id"),D),m(x.get("typeParameters"),D,E);else if(n.InterfaceDeclaration&&n.InterfaceDeclaration.check(w)||n.TSInterfaceDeclaration&&n.TSInterfaceDeclaration.check(w))b(x.get("id"),E);else if(u.check(w)){if(n.CatchClause.check(w)&&n.Identifier.check(w.param)){var O=w.param.name,B=Wi.call(D,O);m(x.get("body"),D,E),B||delete D[O]}}else m(x,D,E)}function y(x,D){var E=x.value;n.Pattern.assert(E),n.Identifier.check(E)?Wi.call(D,E.name)?D[E.name].push(x):D[E.name]=[x]:n.AssignmentPattern&&n.AssignmentPattern.check(E)?y(x.get("left"),D):n.ObjectPattern&&n.ObjectPattern.check(E)?x.get("properties").each(function(w){var O=w.value;n.Pattern.check(O)?y(w,D):n.Property.check(O)||n.ObjectProperty&&n.ObjectProperty.check(O)?y(w.get("value"),D):n.SpreadProperty&&n.SpreadProperty.check(O)&&y(w.get("argument"),D)}):n.ArrayPattern&&n.ArrayPattern.check(E)?x.get("elements").each(function(w){var O=w.value;n.Pattern.check(O)?y(w,D):n.SpreadElement&&n.SpreadElement.check(O)&&y(w.get("argument"),D)}):n.PropertyPattern&&n.PropertyPattern.check(E)?y(x.get("pattern"),D):(n.SpreadElementPattern&&n.SpreadElementPattern.check(E)||n.RestElement&&n.RestElement.check(E)||n.SpreadPropertyPattern&&n.SpreadPropertyPattern.check(E))&&y(x.get("argument"),D)}function b(x,D){var E=x.value;n.Pattern.assert(E),n.Identifier.check(E)&&(Wi.call(D,E.name)?D[E.name].push(x):D[E.name]=[x])}function C(x,D){var E=x.value;p.assert(E),Wi.call(D,E.name)?D[E.name].push(x):D[E.name]=[x]}return d.lookup=function(x){for(var D=this;D&&!D.declares(x);D=D.parent);return D},d.lookupType=function(x){for(var D=this;D&&!D.declaresType(x);D=D.parent);return D},d.getGlobalScope=function(){for(var x=this;!x.isGlobal;)x=x.parent;return x},l}Oe(()=>module);function gb(e){var r=e.use(Qe),t=r.namedTypes,n=r.builders,i=r.builtInTypes.number,s=r.builtInTypes.array,o=e.use(hb),a=e.use(CP);let l=function g(y,b,C){if(!(this instanceof g))throw new Error("NodePath constructor cannot be invoked without 'new'");o.call(this,y,b,C)};var u=l.prototype=Object.create(o.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}});Object.defineProperties(u,{node:{get:function(){return Object.defineProperty(this,"node",{configurable:!0,value:this._computeNode()}),this.node}},parent:{get:function(){return Object.defineProperty(this,"parent",{configurable:!0,value:this._computeParent()}),this.parent}},scope:{get:function(){return Object.defineProperty(this,"scope",{configurable:!0,value:this._computeScope()}),this.scope}}}),u.replace=function(){return delete this.node,delete this.parent,delete this.scope,o.prototype.replace.apply(this,arguments)},u.prune=function(){var g=this.parent;return this.replace(),m(g)},u._computeNode=function(){var g=this.value;if(t.Node.check(g))return g;var y=this.parentPath;return y&&y.node||null},u._computeParent=function(){var g=this.value,y=this.parentPath;if(!t.Node.check(g)){for(;y&&!t.Node.check(y.value);)y=y.parentPath;y&&(y=y.parentPath)}for(;y&&!t.Node.check(y.value);)y=y.parentPath;return y||null},u._computeScope=function(){var g=this.value,y=this.parentPath,b=y&&y.scope;return t.Node.check(g)&&a.isEstablishedBy(g)&&(b=new a(this,b)),b||null},u.getValueProperty=function(g){return r.getFieldValue(this.value,g)},u.needsParens=function(g){var y=this.parentPath;if(!y)return!1;var b=this.value;if(!t.Expression.check(b)||b.type==="Identifier")return!1;for(;!t.Node.check(y.value);)if(y=y.parentPath,!y)return!1;var C=y.value;switch(b.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return C.type==="MemberExpression"&&this.name==="object"&&C.object===b;case"BinaryExpression":case"LogicalExpression":switch(C.type){case"CallExpression":return this.name==="callee"&&C.callee===b;case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return!0;case"MemberExpression":return this.name==="object"&&C.object===b;case"BinaryExpression":case"LogicalExpression":{let x=b,D=C.operator,E=p[D],w=x.operator,O=p[w];if(E>O)return!0;if(E===O&&this.name==="right"){if(C.right!==x)throw new Error("Nodes must be equal");return!0}}default:return!1}case"SequenceExpression":switch(C.type){case"ForStatement":return!1;case"ExpressionStatement":return this.name!=="expression";default:return!0}case"YieldExpression":switch(C.type){case"BinaryExpression":case"LogicalExpression":case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"CallExpression":case"MemberExpression":case"NewExpression":case"ConditionalExpression":case"YieldExpression":return!0;default:return!1}case"Literal":return C.type==="MemberExpression"&&i.check(b.value)&&this.name==="object"&&C.object===b;case"AssignmentExpression":case"ConditionalExpression":switch(C.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return!0;case"CallExpression":return this.name==="callee"&&C.callee===b;case"ConditionalExpression":return this.name==="test"&&C.test===b;case"MemberExpression":return this.name==="object"&&C.object===b;default:return!1}default:if(C.type==="NewExpression"&&this.name==="callee"&&C.callee===b)return d(b)}return!!(g!==!0&&!this.canBeFirstInStatement()&&this.firstInStatement())};function c(g){return t.BinaryExpression.check(g)||t.LogicalExpression.check(g)}var p={};[["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"]].forEach(function(g,y){g.forEach(function(b){p[b]=y})});function d(g){return t.CallExpression.check(g)?!0:s.check(g)?g.some(d):t.Node.check(g)?r.someField(g,function(y,b){return d(b)}):!1}u.canBeFirstInStatement=function(){var g=this.node;return!t.FunctionExpression.check(g)&&!t.ObjectExpression.check(g)},u.firstInStatement=function(){return f(this)};function f(g){for(var y,b;g.parent;g=g.parent){if(y=g.node,b=g.parent.node,t.BlockStatement.check(b)&&g.parent.name==="body"&&g.name===0){if(b.body[0]!==y)throw new Error("Nodes must be equal");return!0}if(t.ExpressionStatement.check(b)&&g.name==="expression"){if(b.expression!==y)throw new Error("Nodes must be equal");return!0}if(t.SequenceExpression.check(b)&&g.parent.name==="expressions"&&g.name===0){if(b.expressions[0]!==y)throw new Error("Nodes must be equal");continue}if(t.CallExpression.check(b)&&g.name==="callee"){if(b.callee!==y)throw new Error("Nodes must be equal");continue}if(t.MemberExpression.check(b)&&g.name==="object"){if(b.object!==y)throw new Error("Nodes must be equal");continue}if(t.ConditionalExpression.check(b)&&g.name==="test"){if(b.test!==y)throw new Error("Nodes must be equal");continue}if(c(b)&&g.name==="left"){if(b.left!==y)throw new Error("Nodes must be equal");continue}if(t.UnaryExpression.check(b)&&!b.prefix&&g.name==="argument"){if(b.argument!==y)throw new Error("Nodes must be equal");continue}return!1}return!0}function m(g){if(t.VariableDeclaration.check(g.node)){var y=g.get("declarations").value;if(!y||y.length===0)return g.prune()}else if(t.ExpressionStatement.check(g.node)){if(!g.get("expression").value)return g.prune()}else t.IfStatement.check(g.node)&&h(g);return g}function h(g){var y=g.get("test").value,b=g.get("alternate").value,C=g.get("consequent").value;if(!C&&!b){var x=n.expressionStatement(y);g.replace(x)}else if(!C&&b){var D=n.unaryExpression("!",y,!0);t.UnaryExpression.check(y)&&y.operator==="!"&&(D=y.argument),g.get("test").replace(D),g.get("consequent").replace(b),g.get("alternate").replace()}}return l}Oe(()=>module);var ka=Object.prototype.hasOwnProperty;function SP(e){var r=e.use(Qe),t=e.use(gb),n=r.builtInTypes.array,i=r.builtInTypes.object,s=r.builtInTypes.function,o;let a=function m(){if(!(this instanceof m))throw new Error("PathVisitor constructor cannot be invoked without 'new'");this._reusableContextStack=[],this._methodNameTable=l(this),this._shouldVisitComments=ka.call(this._methodNameTable,"Block")||ka.call(this._methodNameTable,"Line"),this.Context=d(this),this._visiting=!1,this._changeReported=!1};function l(m){var h=Object.create(null);for(var g in m)/^visit[A-Z]/.test(g)&&(h[g.slice(5)]=!0);for(var y=r.computeSupertypeLookupTable(h),b=Object.create(null),C=Object.keys(y),x=C.length,D=0;D<x;++D){var E=C[D];g="visit"+y[E],s.check(m[g])&&(b[E]=g)}return b}a.fromMethodsObject=function(h){if(h instanceof a)return h;if(!i.check(h))return new a;let g=function b(){if(!(this instanceof b))throw new Error("Visitor constructor cannot be invoked without 'new'");a.call(this)};var y=g.prototype=Object.create(c);return y.constructor=g,u(y,h),u(g,a),s.assert(g.fromMethodsObject),s.assert(g.visit),new g};function u(m,h){for(var g in h)ka.call(h,g)&&(m[g]=h[g]);return m}a.visit=function(h,g){return a.fromMethodsObject(g).visit(h)};var c=a.prototype;c.visit=function(){if(this._visiting)throw new Error("Recursively calling visitor.visit(path) resets visitor state. Try this.visit(path) or this.traverse(path) instead.");this._visiting=!0,this._changeReported=!1,this._abortRequested=!1;for(var m=arguments.length,h=new Array(m),g=0;g<m;++g)h[g]=arguments[g];h[0]instanceof t||(h[0]=new t({root:h[0]}).get("root")),this.reset.apply(this,h);var y;try{var b=this.visitWithoutReset(h[0]);y=!0}finally{if(this._visiting=!1,!y&&this._abortRequested)return h[0].value}return b},c.AbortRequest=function(){},c.abort=function(){var m=this;m._abortRequested=!0;var h=new m.AbortRequest;throw h.cancel=function(){m._abortRequested=!1},h},c.reset=function(m){},c.visitWithoutReset=function(m){if(this instanceof this.Context)return this.visitor.visitWithoutReset(m);if(!(m instanceof t))throw new Error("");var h=m.value,g=h&&typeof h=="object"&&typeof h.type=="string"&&this._methodNameTable[h.type];if(g){var y=this.acquireContext(m);try{return y.invokeVisitorMethod(g)}finally{this.releaseContext(y)}}else return p(m,this)};function p(m,h){if(!(m instanceof t))throw new Error("");if(!(h instanceof a))throw new Error("");var g=m.value;if(n.check(g))m.each(h.visitWithoutReset,h);else if(i.check(g)){var y=r.getFieldNames(g);h._shouldVisitComments&&g.comments&&y.indexOf("comments")<0&&y.push("comments");for(var b=y.length,C=[],x=0;x<b;++x){var D=y[x];ka.call(g,D)||(g[D]=r.getFieldValue(g,D)),C.push(m.get(D))}for(var x=0;x<b;++x)h.visitWithoutReset(C[x])}return m.value}c.acquireContext=function(m){return this._reusableContextStack.length===0?new this.Context(m):this._reusableContextStack.pop().reset(m)},c.releaseContext=function(m){if(!(m instanceof this.Context))throw new Error("");this._reusableContextStack.push(m),m.currentPath=null},c.reportChanged=function(){this._changeReported=!0},c.wasChangeReported=function(){return this._changeReported};function d(m){function h(y){if(!(this instanceof h))throw new Error("");if(!(this instanceof a))throw new Error("");if(!(y instanceof t))throw new Error("");Object.defineProperty(this,"visitor",{value:m,writable:!1,enumerable:!0,configurable:!1}),this.currentPath=y,this.needToCallTraverse=!0,Object.seal(this)}if(!(m instanceof a))throw new Error("");var g=h.prototype=Object.create(m);return g.constructor=h,u(g,f),h}var f=Object.create(null);return f.reset=function(h){if(!(this instanceof this.Context))throw new Error("");if(!(h instanceof t))throw new Error("");return this.currentPath=h,this.needToCallTraverse=!0,this},f.invokeVisitorMethod=function(h){if(!(this instanceof this.Context))throw new Error("");if(!(this.currentPath instanceof t))throw new Error("");var g=this.visitor[h].call(this,this.currentPath);if(g===!1?this.needToCallTraverse=!1:g!==o&&(this.currentPath=this.currentPath.replace(g)[0],this.needToCallTraverse&&this.traverse(this.currentPath)),this.needToCallTraverse!==!1)throw new Error("Must either call this.traverse or return false in "+h);var y=this.currentPath;return y&&y.value},f.traverse=function(h,g){if(!(this instanceof this.Context))throw new Error("");if(!(h instanceof t))throw new Error("");if(!(this.currentPath instanceof t))throw new Error("");return this.needToCallTraverse=!1,p(h,a.fromMethodsObject(g||this.visitor))},f.visit=function(h,g){if(!(this instanceof this.Context))throw new Error("");if(!(h instanceof t))throw new Error("");if(!(this.currentPath instanceof t))throw new Error("");return this.needToCallTraverse=!1,a.fromMethodsObject(g||this.visitor).visitWithoutReset(h)},f.reportChanged=function(){this.visitor.reportChanged()},f.abort=function(){this.needToCallTraverse=!1,this.visitor.abort()},a}Oe(()=>module);function TP(e){var r=e.use(Qe),t=r.getFieldNames,n=r.getFieldValue,i=r.builtInTypes.array,s=r.builtInTypes.object,o=r.builtInTypes.Date,a=r.builtInTypes.RegExp,l=Object.prototype.hasOwnProperty;function u(m,h,g){return i.check(g)?g.length=0:g=null,p(m,h,g)}u.assert=function(m,h){var g=[];if(!u(m,h,g))if(g.length===0){if(m!==h)throw new Error("Nodes must be equal")}else throw new Error("Nodes differ in the following path: "+g.map(c).join(""))};function c(m){return/[_$a-z][_$a-z0-9]*/i.test(m)?"."+m:"["+JSON.stringify(m)+"]"}function p(m,h,g){return m===h?!0:i.check(m)?d(m,h,g):s.check(m)?f(m,h,g):o.check(m)?o.check(h)&&+m==+h:a.check(m)?a.check(h)&&m.source===h.source&&m.global===h.global&&m.multiline===h.multiline&&m.ignoreCase===h.ignoreCase:m==h}function d(m,h,g){i.assert(m);var y=m.length;if(!i.check(h)||h.length!==y)return g&&g.push("length"),!1;for(var b=0;b<y;++b){if(g&&g.push(b),b in m!=b in h||!p(m[b],h[b],g))return!1;if(g){var C=g.pop();if(C!==b)throw new Error(""+C)}}return!0}function f(m,h,g){if(s.assert(m),!s.check(h))return!1;if(m.type!==h.type)return g&&g.push("type"),!1;var y=t(m),b=y.length,C=t(h),x=C.length;if(b===x){for(var D=0;D<b;++D){var E=y[D],w=n(m,E),O=n(h,E);if(g&&g.push(E),!p(w,O,g))return!1;if(g){var B=g.pop();if(B!==E)throw new Error(""+B)}}return!0}if(!g)return!1;var N=Object.create(null);for(D=0;D<b;++D)N[y[D]]=!0;for(D=0;D<x;++D){if(E=C[D],!l.call(N,E))return g.push(E),!1;delete N[E]}for(E in N){g.push(E);break}return!1}return u}Oe(()=>module);function wP(e){let r=AP(),t=r.use(Qe);e.forEach(r.use),t.finalize();let n=r.use(SP);return{Type:t.Type,builtInTypes:t.builtInTypes,namedTypes:t.namedTypes,builders:t.builders,defineMethod:t.defineMethod,getFieldNames:t.getFieldNames,getFieldValue:t.getFieldValue,eachField:t.eachField,someField:t.someField,getSupertypeNames:t.getSupertypeNames,getBuilderName:t.getBuilderName,astNodesAreEquivalent:r.use(TP),finalize:t.finalize,Path:r.use(hb),NodePath:r.use(gb),PathVisitor:n,use:r.use,visit:n.visit}}function AP(){let e=[],r=[];function t(i){var s=e.indexOf(i);return s===-1&&(s=e.length,e.push(i),r[s]=i(n)),r[s]}var n={use:t};return n}Oe(()=>module);function yb(){return{BinaryOperators:["==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","&","|","^","in","instanceof"],AssignmentOperators:["=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&="],LogicalOperators:["||","&&"]}}Oe(()=>module);function bb(e){let r=e.use(yb);return r.BinaryOperators.indexOf("**")<0&&r.BinaryOperators.push("**"),r.AssignmentOperators.indexOf("**=")<0&&r.AssignmentOperators.push("**="),r}Oe(()=>module);function Db(e){let r=e.use(bb);return r.LogicalOperators.indexOf("??")<0&&r.LogicalOperators.push("??"),r}Oe(()=>module);function vP(e){let r=e.use(Db);return r.LogicalOperators.forEach(t=>{let n=t+"=";r.AssignmentOperators.indexOf(n)<0&&r.AssignmentOperators.push(n)}),r}Oe(()=>module);function PP(e){var r=e.use(Qe),t=r.Type,n=t.def,i=t.or,s=e.use(Yt),o=s.defaults,a=s.geq;let{BinaryOperators:l,AssignmentOperators:u,LogicalOperators:c}=e.use(yb);n("Printable").field("loc",i(n("SourceLocation"),null),o.null,!0),n("Node").bases("Printable").field("type",String).field("comments",i([n("Comment")],null),o.null,!0),n("SourceLocation").field("start",n("Position")).field("end",n("Position")).field("source",i(String,null),o.null),n("Position").field("line",a(1)).field("column",a(0)),n("File").bases("Node").build("program","name").field("program",n("Program")).field("name",i(String,null),o.null),n("Program").bases("Node").build("body").field("body",[n("Statement")]),n("Function").bases("Node").field("id",i(n("Identifier"),null),o.null).field("params",[n("Pattern")]).field("body",n("BlockStatement")).field("generator",Boolean,o.false).field("async",Boolean,o.false),n("Statement").bases("Node"),n("EmptyStatement").bases("Statement").build(),n("BlockStatement").bases("Statement").build("body").field("body",[n("Statement")]),n("ExpressionStatement").bases("Statement").build("expression").field("expression",n("Expression")),n("IfStatement").bases("Statement").build("test","consequent","alternate").field("test",n("Expression")).field("consequent",n("Statement")).field("alternate",i(n("Statement"),null),o.null),n("LabeledStatement").bases("Statement").build("label","body").field("label",n("Identifier")).field("body",n("Statement")),n("BreakStatement").bases("Statement").build("label").field("label",i(n("Identifier"),null),o.null),n("ContinueStatement").bases("Statement").build("label").field("label",i(n("Identifier"),null),o.null),n("WithStatement").bases("Statement").build("object","body").field("object",n("Expression")).field("body",n("Statement")),n("SwitchStatement").bases("Statement").build("discriminant","cases","lexical").field("discriminant",n("Expression")).field("cases",[n("SwitchCase")]).field("lexical",Boolean,o.false),n("ReturnStatement").bases("Statement").build("argument").field("argument",i(n("Expression"),null)),n("ThrowStatement").bases("Statement").build("argument").field("argument",n("Expression")),n("TryStatement").bases("Statement").build("block","handler","finalizer").field("block",n("BlockStatement")).field("handler",i(n("CatchClause"),null),function(){return this.handlers&&this.handlers[0]||null}).field("handlers",[n("CatchClause")],function(){return this.handler?[this.handler]:[]},!0).field("guardedHandlers",[n("CatchClause")],o.emptyArray).field("finalizer",i(n("BlockStatement"),null),o.null),n("CatchClause").bases("Node").build("param","guard","body").field("param",n("Pattern")).field("guard",i(n("Expression"),null),o.null).field("body",n("BlockStatement")),n("WhileStatement").bases("Statement").build("test","body").field("test",n("Expression")).field("body",n("Statement")),n("DoWhileStatement").bases("Statement").build("body","test").field("body",n("Statement")).field("test",n("Expression")),n("ForStatement").bases("Statement").build("init","test","update","body").field("init",i(n("VariableDeclaration"),n("Expression"),null)).field("test",i(n("Expression"),null)).field("update",i(n("Expression"),null)).field("body",n("Statement")),n("ForInStatement").bases("Statement").build("left","right","body").field("left",i(n("VariableDeclaration"),n("Expression"))).field("right",n("Expression")).field("body",n("Statement")),n("DebuggerStatement").bases("Statement").build(),n("Declaration").bases("Statement"),n("FunctionDeclaration").bases("Function","Declaration").build("id","params","body").field("id",n("Identifier")),n("FunctionExpression").bases("Function","Expression").build("id","params","body"),n("VariableDeclaration").bases("Declaration").build("kind","declarations").field("kind",i("var","let","const")).field("declarations",[n("VariableDeclarator")]),n("VariableDeclarator").bases("Node").build("id","init").field("id",n("Pattern")).field("init",i(n("Expression"),null),o.null),n("Expression").bases("Node"),n("ThisExpression").bases("Expression").build(),n("ArrayExpression").bases("Expression").build("elements").field("elements",[i(n("Expression"),null)]),n("ObjectExpression").bases("Expression").build("properties").field("properties",[n("Property")]),n("Property").bases("Node").build("kind","key","value").field("kind",i("init","get","set")).field("key",i(n("Literal"),n("Identifier"))).field("value",n("Expression")),n("SequenceExpression").bases("Expression").build("expressions").field("expressions",[n("Expression")]);var p=i("-","+","!","~","typeof","void","delete");n("UnaryExpression").bases("Expression").build("operator","argument","prefix").field("operator",p).field("argument",n("Expression")).field("prefix",Boolean,o.true);let d=i(...l);n("BinaryExpression").bases("Expression").build("operator","left","right").field("operator",d).field("left",n("Expression")).field("right",n("Expression"));let f=i(...u);n("AssignmentExpression").bases("Expression").build("operator","left","right").field("operator",f).field("left",i(n("Pattern"),n("MemberExpression"))).field("right",n("Expression"));var m=i("++","--");n("UpdateExpression").bases("Expression").build("operator","argument","prefix").field("operator",m).field("argument",n("Expression")).field("prefix",Boolean);var h=i(...c);n("LogicalExpression").bases("Expression").build("operator","left","right").field("operator",h).field("left",n("Expression")).field("right",n("Expression")),n("ConditionalExpression").bases("Expression").build("test","consequent","alternate").field("test",n("Expression")).field("consequent",n("Expression")).field("alternate",n("Expression")),n("NewExpression").bases("Expression").build("callee","arguments").field("callee",n("Expression")).field("arguments",[n("Expression")]),n("CallExpression").bases("Expression").build("callee","arguments").field("callee",n("Expression")).field("arguments",[n("Expression")]),n("MemberExpression").bases("Expression").build("object","property","computed").field("object",n("Expression")).field("property",i(n("Identifier"),n("Expression"))).field("computed",Boolean,function(){var g=this.property.type;return g==="Literal"||g==="MemberExpression"||g==="BinaryExpression"}),n("Pattern").bases("Node"),n("SwitchCase").bases("Node").build("test","consequent").field("test",i(n("Expression"),null)).field("consequent",[n("Statement")]),n("Identifier").bases("Expression","Pattern").build("name").field("name",String).field("optional",Boolean,o.false),n("Literal").bases("Expression").build("value").field("value",i(String,Boolean,null,Number,RegExp,BigInt)),n("Comment").bases("Printable").field("value",String).field("leading",Boolean,o.true).field("trailing",Boolean,o.false)}Oe(()=>module);function IP(e){e.use(PP);let r=e.use(Qe),t=r.Type.def,n=r.Type.or,i=e.use(Yt).defaults;t("Function").field("generator",Boolean,i.false).field("expression",Boolean,i.false).field("defaults",[n(t("Expression"),null)],i.emptyArray).field("rest",n(t("Identifier"),null),i.null),t("RestElement").bases("Pattern").build("argument").field("argument",t("Pattern")).field("typeAnnotation",n(t("TypeAnnotation"),t("TSTypeAnnotation"),null),i.null),t("SpreadElementPattern").bases("Pattern").build("argument").field("argument",t("Pattern")),t("FunctionDeclaration").build("id","params","body","generator","expression").field("id",n(t("Identifier"),null)),t("FunctionExpression").build("id","params","body","generator","expression"),t("ArrowFunctionExpression").bases("Function","Expression").build("params","body","expression").field("id",null,i.null).field("body",n(t("BlockStatement"),t("Expression"))).field("generator",!1,i.false),t("ForOfStatement").bases("Statement").build("left","right","body").field("left",n(t("VariableDeclaration"),t("Pattern"))).field("right",t("Expression")).field("body",t("Statement")),t("YieldExpression").bases("Expression").build("argument","delegate").field("argument",n(t("Expression"),null)).field("delegate",Boolean,i.false),t("GeneratorExpression").bases("Expression").build("body","blocks","filter").field("body",t("Expression")).field("blocks",[t("ComprehensionBlock")]).field("filter",n(t("Expression"),null)),t("ComprehensionExpression").bases("Expression").build("body","blocks","filter").field("body",t("Expression")).field("blocks",[t("ComprehensionBlock")]).field("filter",n(t("Expression"),null)),t("ComprehensionBlock").bases("Node").build("left","right","each").field("left",t("Pattern")).field("right",t("Expression")).field("each",Boolean),t("Property").field("key",n(t("Literal"),t("Identifier"),t("Expression"))).field("value",n(t("Expression"),t("Pattern"))).field("method",Boolean,i.false).field("shorthand",Boolean,i.false).field("computed",Boolean,i.false),t("ObjectProperty").field("shorthand",Boolean,i.false),t("PropertyPattern").bases("Pattern").build("key","pattern").field("key",n(t("Literal"),t("Identifier"),t("Expression"))).field("pattern",t("Pattern")).field("computed",Boolean,i.false),t("ObjectPattern").bases("Pattern").build("properties").field("properties",[n(t("PropertyPattern"),t("Property"))]),t("ArrayPattern").bases("Pattern").build("elements").field("elements",[n(t("Pattern"),null)]),t("SpreadElement").bases("Node").build("argument").field("argument",t("Expression")),t("ArrayExpression").field("elements",[n(t("Expression"),t("SpreadElement"),t("RestElement"),null)]),t("NewExpression").field("arguments",[n(t("Expression"),t("SpreadElement"))]),t("CallExpression").field("arguments",[n(t("Expression"),t("SpreadElement"))]),t("AssignmentPattern").bases("Pattern").build("left","right").field("left",t("Pattern")).field("right",t("Expression")),t("MethodDefinition").bases("Declaration").build("kind","key","value","static").field("kind",n("constructor","method","get","set")).field("key",t("Expression")).field("value",t("Function")).field("computed",Boolean,i.false).field("static",Boolean,i.false);let s=n(t("MethodDefinition"),t("VariableDeclarator"),t("ClassPropertyDefinition"),t("ClassProperty"),t("StaticBlock"));t("ClassProperty").bases("Declaration").build("key").field("key",n(t("Literal"),t("Identifier"),t("Expression"))).field("computed",Boolean,i.false),t("ClassPropertyDefinition").bases("Declaration").build("definition").field("definition",s),t("ClassBody").bases("Declaration").build("body").field("body",[s]),t("ClassDeclaration").bases("Declaration").build("id","body","superClass").field("id",n(t("Identifier"),null)).field("body",t("ClassBody")).field("superClass",n(t("Expression"),null),i.null),t("ClassExpression").bases("Expression").build("id","body","superClass").field("id",n(t("Identifier"),null),i.null).field("body",t("ClassBody")).field("superClass",n(t("Expression"),null),i.null),t("Super").bases("Expression").build(),t("Specifier").bases("Node"),t("ModuleSpecifier").bases("Specifier").field("local",n(t("Identifier"),null),i.null).field("id",n(t("Identifier"),null),i.null).field("name",n(t("Identifier"),null),i.null),t("ImportSpecifier").bases("ModuleSpecifier").build("imported","local").field("imported",t("Identifier")),t("ImportDefaultSpecifier").bases("ModuleSpecifier").build("local"),t("ImportNamespaceSpecifier").bases("ModuleSpecifier").build("local"),t("ImportDeclaration").bases("Declaration").build("specifiers","source","importKind").field("specifiers",[n(t("ImportSpecifier"),t("ImportNamespaceSpecifier"),t("ImportDefaultSpecifier"))],i.emptyArray).field("source",t("Literal")).field("importKind",n("value","type"),function(){return"value"}),t("ExportNamedDeclaration").bases("Declaration").build("declaration","specifiers","source").field("declaration",n(t("Declaration"),null)).field("specifiers",[t("ExportSpecifier")],i.emptyArray).field("source",n(t("Literal"),null),i.null),t("ExportSpecifier").bases("ModuleSpecifier").build("local","exported").field("exported",t("Identifier")),t("ExportDefaultDeclaration").bases("Declaration").build("declaration").field("declaration",n(t("Declaration"),t("Expression"))),t("ExportAllDeclaration").bases("Declaration").build("source").field("source",t("Literal")),t("TaggedTemplateExpression").bases("Expression").build("tag","quasi").field("tag",t("Expression")).field("quasi",t("TemplateLiteral")),t("TemplateLiteral").bases("Expression").build("quasis","expressions").field("quasis",[t("TemplateElement")]).field("expressions",[t("Expression")]),t("TemplateElement").bases("Node").build("value","tail").field("value",{cooked:String,raw:String}).field("tail",Boolean),t("MetaProperty").bases("Expression").build("meta","property").field("meta",t("Identifier")).field("property",t("Identifier"))}Oe(()=>module);function NP(e){e.use(bb),e.use(IP)}Oe(()=>module);function FP(e){e.use(NP);let t=e.use(Qe).Type.def,n=e.use(Yt).defaults;t("Function").field("async",Boolean,n.false),t("AwaitExpression").bases("Expression").build("argument").field("argument",t("Expression"))}Oe(()=>module);function _P(e){e.use(FP);let r=e.use(Qe),t=r.Type.def,n=r.Type.or,i=e.use(Yt).defaults;t("ForOfStatement").field("await",Boolean,i.false),t("SpreadProperty").bases("Node").build("argument").field("argument",t("Expression")),t("ObjectExpression").field("properties",[n(t("Property"),t("SpreadProperty"),t("SpreadElement"))]),t("TemplateElement").field("value",{cooked:n(String,null),raw:String}),t("SpreadPropertyPattern").bases("Pattern").build("argument").field("argument",t("Pattern")),t("ObjectPattern").field("properties",[n(t("PropertyPattern"),t("Property"),t("RestElement"),t("SpreadPropertyPattern"))])}Oe(()=>module);function kP(e){e.use(_P);let r=e.use(Qe),t=r.Type.def,n=r.Type.or,i=e.use(Yt).defaults;t("CatchClause").field("param",n(t("Pattern"),null),i.null)}Oe(()=>module);function OP(e){e.use(Db),e.use(kP);let r=e.use(Qe),t=r.Type.def,n=r.Type.or,s=e.use(Yt).defaults;t("ImportExpression").bases("Expression").build("source").field("source",t("Expression")),t("ExportAllDeclaration").bases("Declaration").build("source","exported").field("source",t("Literal")).field("exported",n(t("Identifier"),null,void 0),s.null),t("ChainElement").bases("Node").field("optional",Boolean,s.false),t("CallExpression").bases("Expression","ChainElement"),t("MemberExpression").bases("Expression","ChainElement"),t("ChainExpression").bases("Expression").build("expression").field("expression",t("ChainElement")),t("OptionalCallExpression").bases("CallExpression").build("callee","arguments","optional").field("optional",Boolean,s.true),t("OptionalMemberExpression").bases("MemberExpression").build("object","property","computed","optional").field("optional",Boolean,s.true)}Oe(()=>module);function RP(e){e.use(vP),e.use(OP)}Oe(()=>module);function LP(e){e.use(RP);let t=e.use(Qe).Type.def;t("StaticBlock").bases("Declaration").build("body").field("body",[t("Statement")])}Oe(()=>module);function lo(e){e.use(LP);let r=e.use(Qe),t=r.Type,n=r.Type.def,i=t.or,o=e.use(Yt).defaults;n("AwaitExpression").build("argument","all").field("argument",i(n("Expression"),null)).field("all",Boolean,o.false),n("Decorator").bases("Node").build("expression").field("expression",n("Expression")),n("Property").field("decorators",i([n("Decorator")],null),o.null),n("MethodDefinition").field("decorators",i([n("Decorator")],null),o.null),n("PrivateName").bases("Expression","Pattern").build("id").field("id",n("Identifier")),n("ClassPrivateProperty").bases("ClassProperty").build("key","value").field("key",n("PrivateName")).field("value",i(n("Expression"),null),o.null),n("ImportAttribute").bases("Node").build("key","value").field("key",i(n("Identifier"),n("Literal"))).field("value",n("Expression")),["ImportDeclaration","ExportAllDeclaration","ExportNamedDeclaration"].forEach(a=>{n(a).field("assertions",[n("ImportAttribute")],o.emptyArray)}),n("RecordExpression").bases("Expression").build("properties").field("properties",[i(n("ObjectProperty"),n("ObjectMethod"),n("SpreadElement"))]),n("TupleExpression").bases("Expression").build("elements").field("elements",[i(n("Expression"),n("SpreadElement"),null)]),n("ModuleExpression").bases("Node").build("body").field("body",n("Program"))}Oe(()=>module);function BP(e){e.use(lo);let r=e.use(Qe),t=r.Type.def,n=r.Type.or,i=e.use(Yt).defaults;t("JSXAttribute").bases("Node").build("name","value").field("name",n(t("JSXIdentifier"),t("JSXNamespacedName"))).field("value",n(t("Literal"),t("JSXExpressionContainer"),t("JSXElement"),t("JSXFragment"),null),i.null),t("JSXIdentifier").bases("Identifier").build("name").field("name",String),t("JSXNamespacedName").bases("Node").build("namespace","name").field("namespace",t("JSXIdentifier")).field("name",t("JSXIdentifier")),t("JSXMemberExpression").bases("MemberExpression").build("object","property").field("object",n(t("JSXIdentifier"),t("JSXMemberExpression"))).field("property",t("JSXIdentifier")).field("computed",Boolean,i.false);let s=n(t("JSXIdentifier"),t("JSXNamespacedName"),t("JSXMemberExpression"));t("JSXSpreadAttribute").bases("Node").build("argument").field("argument",t("Expression"));let o=[n(t("JSXAttribute"),t("JSXSpreadAttribute"))];t("JSXExpressionContainer").bases("Expression").build("expression").field("expression",n(t("Expression"),t("JSXEmptyExpression")));let a=[n(t("JSXText"),t("JSXExpressionContainer"),t("JSXSpreadChild"),t("JSXElement"),t("JSXFragment"),t("Literal"))];t("JSXElement").bases("Expression").build("openingElement","closingElement","children").field("openingElement",t("JSXOpeningElement")).field("closingElement",n(t("JSXClosingElement"),null),i.null).field("children",a,i.emptyArray).field("name",s,function(){return this.openingElement.name},!0).field("selfClosing",Boolean,function(){return this.openingElement.selfClosing},!0).field("attributes",o,function(){return this.openingElement.attributes},!0),t("JSXOpeningElement").bases("Node").build("name","attributes","selfClosing").field("name",s).field("attributes",o,i.emptyArray).field("selfClosing",Boolean,i.false),t("JSXClosingElement").bases("Node").build("name").field("name",s),t("JSXFragment").bases("Expression").build("openingFragment","closingFragment","children").field("openingFragment",t("JSXOpeningFragment")).field("closingFragment",t("JSXClosingFragment")).field("children",a,i.emptyArray),t("JSXOpeningFragment").bases("Node").build(),t("JSXClosingFragment").bases("Node").build(),t("JSXText").bases("Literal").build("value","raw").field("value",String).field("raw",String,function(){return this.value}),t("JSXEmptyExpression").bases("Node").build(),t("JSXSpreadChild").bases("Node").build("expression").field("expression",t("Expression"))}Oe(()=>module);function xb(e){var r=e.use(Qe),t=r.Type.def,n=r.Type.or,i=e.use(Yt).defaults,s=n(t("TypeAnnotation"),t("TSTypeAnnotation"),null),o=n(t("TypeParameterDeclaration"),t("TSTypeParameterDeclaration"),null);t("Identifier").field("typeAnnotation",s,i.null),t("ObjectPattern").field("typeAnnotation",s,i.null),t("Function").field("returnType",s,i.null).field("typeParameters",o,i.null),t("ClassProperty").build("key","value","typeAnnotation","static").field("value",n(t("Expression"),null)).field("static",Boolean,i.false).field("typeAnnotation",s,i.null),["ClassDeclaration","ClassExpression"].forEach(a=>{t(a).field("typeParameters",o,i.null).field("superTypeParameters",n(t("TypeParameterInstantiation"),t("TSTypeParameterInstantiation"),null),i.null).field("implements",n([t("ClassImplements")],[t("TSExpressionWithTypeArguments")]),i.emptyArray)})}Oe(()=>module);function Eb(e){e.use(lo),e.use(xb);let r=e.use(Qe),t=r.Type.def,n=r.Type.or,i=e.use(Yt).defaults;t("Flow").bases("Node"),t("FlowType").bases("Flow"),t("AnyTypeAnnotation").bases("FlowType").build(),t("EmptyTypeAnnotation").bases("FlowType").build(),t("MixedTypeAnnotation").bases("FlowType").build(),t("VoidTypeAnnotation").bases("FlowType").build(),t("SymbolTypeAnnotation").bases("FlowType").build(),t("NumberTypeAnnotation").bases("FlowType").build(),t("BigIntTypeAnnotation").bases("FlowType").build(),t("NumberLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",Number).field("raw",String),t("NumericLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",Number).field("raw",String),t("BigIntLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",null).field("raw",String),t("StringTypeAnnotation").bases("FlowType").build(),t("StringLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",String).field("raw",String),t("BooleanTypeAnnotation").bases("FlowType").build(),t("BooleanLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",Boolean).field("raw",String),t("TypeAnnotation").bases("Node").build("typeAnnotation").field("typeAnnotation",t("FlowType")),t("NullableTypeAnnotation").bases("FlowType").build("typeAnnotation").field("typeAnnotation",t("FlowType")),t("NullLiteralTypeAnnotation").bases("FlowType").build(),t("NullTypeAnnotation").bases("FlowType").build(),t("ThisTypeAnnotation").bases("FlowType").build(),t("ExistsTypeAnnotation").bases("FlowType").build(),t("ExistentialTypeParam").bases("FlowType").build(),t("FunctionTypeAnnotation").bases("FlowType").build("params","returnType","rest","typeParameters").field("params",[t("FunctionTypeParam")]).field("returnType",t("FlowType")).field("rest",n(t("FunctionTypeParam"),null)).field("typeParameters",n(t("TypeParameterDeclaration"),null)),t("FunctionTypeParam").bases("Node").build("name","typeAnnotation","optional").field("name",n(t("Identifier"),null)).field("typeAnnotation",t("FlowType")).field("optional",Boolean),t("ArrayTypeAnnotation").bases("FlowType").build("elementType").field("elementType",t("FlowType")),t("ObjectTypeAnnotation").bases("FlowType").build("properties","indexers","callProperties").field("properties",[n(t("ObjectTypeProperty"),t("ObjectTypeSpreadProperty"))]).field("indexers",[t("ObjectTypeIndexer")],i.emptyArray).field("callProperties",[t("ObjectTypeCallProperty")],i.emptyArray).field("inexact",n(Boolean,void 0),i.undefined).field("exact",Boolean,i.false).field("internalSlots",[t("ObjectTypeInternalSlot")],i.emptyArray),t("Variance").bases("Node").build("kind").field("kind",n("plus","minus"));let s=n(t("Variance"),"plus","minus",null);t("ObjectTypeProperty").bases("Node").build("key","value","optional").field("key",n(t("Literal"),t("Identifier"))).field("value",t("FlowType")).field("optional",Boolean).field("variance",s,i.null),t("ObjectTypeIndexer").bases("Node").build("id","key","value").field("id",t("Identifier")).field("key",t("FlowType")).field("value",t("FlowType")).field("variance",s,i.null).field("static",Boolean,i.false),t("ObjectTypeCallProperty").bases("Node").build("value").field("value",t("FunctionTypeAnnotation")).field("static",Boolean,i.false),t("QualifiedTypeIdentifier").bases("Node").build("qualification","id").field("qualification",n(t("Identifier"),t("QualifiedTypeIdentifier"))).field("id",t("Identifier")),t("GenericTypeAnnotation").bases("FlowType").build("id","typeParameters").field("id",n(t("Identifier"),t("QualifiedTypeIdentifier"))).field("typeParameters",n(t("TypeParameterInstantiation"),null)),t("MemberTypeAnnotation").bases("FlowType").build("object","property").field("object",t("Identifier")).field("property",n(t("MemberTypeAnnotation"),t("GenericTypeAnnotation"))),t("IndexedAccessType").bases("FlowType").build("objectType","indexType").field("objectType",t("FlowType")).field("indexType",t("FlowType")),t("OptionalIndexedAccessType").bases("FlowType").build("objectType","indexType","optional").field("objectType",t("FlowType")).field("indexType",t("FlowType")).field("optional",Boolean),t("UnionTypeAnnotation").bases("FlowType").build("types").field("types",[t("FlowType")]),t("IntersectionTypeAnnotation").bases("FlowType").build("types").field("types",[t("FlowType")]),t("TypeofTypeAnnotation").bases("FlowType").build("argument").field("argument",t("FlowType")),t("ObjectTypeSpreadProperty").bases("Node").build("argument").field("argument",t("FlowType")),t("ObjectTypeInternalSlot").bases("Node").build("id","value","optional","static","method").field("id",t("Identifier")).field("value",t("FlowType")).field("optional",Boolean).field("static",Boolean).field("method",Boolean),t("TypeParameterDeclaration").bases("Node").build("params").field("params",[t("TypeParameter")]),t("TypeParameterInstantiation").bases("Node").build("params").field("params",[t("FlowType")]),t("TypeParameter").bases("FlowType").build("name","variance","bound","default").field("name",String).field("variance",s,i.null).field("bound",n(t("TypeAnnotation"),null),i.null).field("default",n(t("FlowType"),null),i.null),t("ClassProperty").field("variance",s,i.null),t("ClassImplements").bases("Node").build("id").field("id",t("Identifier")).field("superClass",n(t("Expression"),null),i.null).field("typeParameters",n(t("TypeParameterInstantiation"),null),i.null),t("InterfaceTypeAnnotation").bases("FlowType").build("body","extends").field("body",t("ObjectTypeAnnotation")).field("extends",n([t("InterfaceExtends")],null),i.null),t("InterfaceDeclaration").bases("Declaration").build("id","body","extends").field("id",t("Identifier")).field("typeParameters",n(t("TypeParameterDeclaration"),null),i.null).field("body",t("ObjectTypeAnnotation")).field("extends",[t("InterfaceExtends")]),t("DeclareInterface").bases("InterfaceDeclaration").build("id","body","extends"),t("InterfaceExtends").bases("Node").build("id").field("id",t("Identifier")).field("typeParameters",n(t("TypeParameterInstantiation"),null),i.null),t("TypeAlias").bases("Declaration").build("id","typeParameters","right").field("id",t("Identifier")).field("typeParameters",n(t("TypeParameterDeclaration"),null)).field("right",t("FlowType")),t("DeclareTypeAlias").bases("TypeAlias").build("id","typeParameters","right"),t("OpaqueType").bases("Declaration").build("id","typeParameters","impltype","supertype").field("id",t("Identifier")).field("typeParameters",n(t("TypeParameterDeclaration"),null)).field("impltype",t("FlowType")).field("supertype",n(t("FlowType"),null)),t("DeclareOpaqueType").bases("OpaqueType").build("id","typeParameters","supertype").field("impltype",n(t("FlowType"),null)),t("TypeCastExpression").bases("Expression").build("expression","typeAnnotation").field("expression",t("Expression")).field("typeAnnotation",t("TypeAnnotation")),t("TupleTypeAnnotation").bases("FlowType").build("types").field("types",[t("FlowType")]),t("DeclareVariable").bases("Statement").build("id").field("id",t("Identifier")),t("DeclareFunction").bases("Statement").build("id").field("id",t("Identifier")).field("predicate",n(t("FlowPredicate"),null),i.null),t("DeclareClass").bases("InterfaceDeclaration").build("id"),t("DeclareModule").bases("Statement").build("id","body").field("id",n(t("Identifier"),t("Literal"))).field("body",t("BlockStatement")),t("DeclareModuleExports").bases("Statement").build("typeAnnotation").field("typeAnnotation",t("TypeAnnotation")),t("DeclareExportDeclaration").bases("Declaration").build("default","declaration","specifiers","source").field("default",Boolean).field("declaration",n(t("DeclareVariable"),t("DeclareFunction"),t("DeclareClass"),t("FlowType"),t("TypeAlias"),t("DeclareOpaqueType"),t("InterfaceDeclaration"),null)).field("specifiers",[n(t("ExportSpecifier"),t("ExportBatchSpecifier"))],i.emptyArray).field("source",n(t("Literal"),null),i.null),t("DeclareExportAllDeclaration").bases("Declaration").build("source").field("source",n(t("Literal"),null),i.null),t("ImportDeclaration").field("importKind",n("value","type","typeof"),()=>"value"),t("FlowPredicate").bases("Flow"),t("InferredPredicate").bases("FlowPredicate").build(),t("DeclaredPredicate").bases("FlowPredicate").build("value").field("value",t("Expression")),t("Function").field("predicate",n(t("FlowPredicate"),null),i.null),t("CallExpression").field("typeArguments",n(null,t("TypeParameterInstantiation")),i.null),t("NewExpression").field("typeArguments",n(null,t("TypeParameterInstantiation")),i.null),t("EnumDeclaration").bases("Declaration").build("id","body").field("id",t("Identifier")).field("body",n(t("EnumBooleanBody"),t("EnumNumberBody"),t("EnumStringBody"),t("EnumSymbolBody"))),t("EnumBooleanBody").build("members","explicitType").field("members",[t("EnumBooleanMember")]).field("explicitType",Boolean),t("EnumNumberBody").build("members","explicitType").field("members",[t("EnumNumberMember")]).field("explicitType",Boolean),t("EnumStringBody").build("members","explicitType").field("members",n([t("EnumStringMember")],[t("EnumDefaultedMember")])).field("explicitType",Boolean),t("EnumSymbolBody").build("members").field("members",[t("EnumDefaultedMember")]),t("EnumBooleanMember").build("id","init").field("id",t("Identifier")).field("init",n(t("Literal"),Boolean)),t("EnumNumberMember").build("id","init").field("id",t("Identifier")).field("init",t("Literal")),t("EnumStringMember").build("id","init").field("id",t("Identifier")).field("init",t("Literal")),t("EnumDefaultedMember").build("id").field("id",t("Identifier"))}Oe(()=>module);function MP(e){e.use(lo);var r=e.use(Qe),t=e.use(Yt).defaults,n=r.Type.def,i=r.Type.or;n("VariableDeclaration").field("declarations",[i(n("VariableDeclarator"),n("Identifier"))]),n("Property").field("value",i(n("Expression"),n("Pattern"))),n("ArrayPattern").field("elements",[i(n("Pattern"),n("SpreadElement"),null)]),n("ObjectPattern").field("properties",[i(n("Property"),n("PropertyPattern"),n("SpreadPropertyPattern"),n("SpreadProperty"))]),n("ExportSpecifier").bases("ModuleSpecifier").build("id","name"),n("ExportBatchSpecifier").bases("Specifier").build(),n("ExportDeclaration").bases("Declaration").build("default","declaration","specifiers","source").field("default",Boolean).field("declaration",i(n("Declaration"),n("Expression"),null)).field("specifiers",[i(n("ExportSpecifier"),n("ExportBatchSpecifier"))],t.emptyArray).field("source",i(n("Literal"),null),t.null),n("Block").bases("Comment").build("value","leading","trailing"),n("Line").bases("Comment").build("value","leading","trailing")}Oe(()=>module);function Cb(e){e.use(lo);let r=e.use(Qe),t=e.use(Yt).defaults,n=r.Type.def,i=r.Type.or,{undefined:s}=r.builtInTypes;n("Noop").bases("Statement").build(),n("DoExpression").bases("Expression").build("body").field("body",[n("Statement")]),n("BindExpression").bases("Expression").build("object","callee").field("object",i(n("Expression"),null)).field("callee",n("Expression")),n("ParenthesizedExpression").bases("Expression").build("expression").field("expression",n("Expression")),n("ExportNamespaceSpecifier").bases("Specifier").build("exported").field("exported",n("Identifier")),n("ExportDefaultSpecifier").bases("Specifier").build("exported").field("exported",n("Identifier")),n("CommentBlock").bases("Comment").build("value","leading","trailing"),n("CommentLine").bases("Comment").build("value","leading","trailing"),n("Directive").bases("Node").build("value").field("value",n("DirectiveLiteral")),n("DirectiveLiteral").bases("Node","Expression").build("value").field("value",String,t["use strict"]),n("InterpreterDirective").bases("Node").build("value").field("value",String),n("BlockStatement").bases("Statement").build("body").field("body",[n("Statement")]).field("directives",[n("Directive")],t.emptyArray),n("Program").bases("Node").build("body").field("body",[n("Statement")]).field("directives",[n("Directive")],t.emptyArray).field("interpreter",i(n("InterpreterDirective"),null),t.null);function o(c=String,p){return["extra",{rawValue:c,raw:String},function(){let f=r.getFieldValue(this,"value");return{rawValue:f,raw:p?p(f):String(f)}}]}n("StringLiteral").bases("Literal").build("value").field("value",String).field(...o(String,c=>JSON.stringify(c))),n("NumericLiteral").bases("Literal").build("value").field("value",Number).field("raw",i(String,null),t.null).field(...o(Number)),n("BigIntLiteral").bases("Literal").build("value").field("value",i(String,Number)).field(...o(String,c=>c+"n")),n("DecimalLiteral").bases("Literal").build("value").field("value",String).field(...o(String,c=>c+"m")),n("NullLiteral").bases("Literal").build().field("value",null,t.null),n("BooleanLiteral").bases("Literal").build("value").field("value",Boolean),n("RegExpLiteral").bases("Literal").build("pattern","flags").field("pattern",String).field("flags",String).field("value",RegExp,function(){return new RegExp(this.pattern,this.flags)}).field(...o(i(RegExp,s),c=>`/${c.pattern}/${c.flags||""}`)).field("regex",{pattern:String,flags:String},function(){return{pattern:this.pattern,flags:this.flags}});var a=i(n("Property"),n("ObjectMethod"),n("ObjectProperty"),n("SpreadProperty"),n("SpreadElement"));n("ObjectExpression").bases("Expression").build("properties").field("properties",[a]),n("ObjectMethod").bases("Node","Function").build("kind","key","params","body","computed").field("kind",i("method","get","set")).field("key",i(n("Literal"),n("Identifier"),n("Expression"))).field("params",[n("Pattern")]).field("body",n("BlockStatement")).field("computed",Boolean,t.false).field("generator",Boolean,t.false).field("async",Boolean,t.false).field("accessibility",i(n("Literal"),null),t.null).field("decorators",i([n("Decorator")],null),t.null),n("ObjectProperty").bases("Node").build("key","value").field("key",i(n("Literal"),n("Identifier"),n("Expression"))).field("value",i(n("Expression"),n("Pattern"))).field("accessibility",i(n("Literal"),null),t.null).field("computed",Boolean,t.false);var l=i(n("MethodDefinition"),n("VariableDeclarator"),n("ClassPropertyDefinition"),n("ClassProperty"),n("ClassPrivateProperty"),n("ClassMethod"),n("ClassPrivateMethod"),n("ClassAccessorProperty"),n("StaticBlock"));n("ClassBody").bases("Declaration").build("body").field("body",[l]),n("ClassMethod").bases("Declaration","Function").build("kind","key","params","body","computed","static").field("key",i(n("Literal"),n("Identifier"),n("Expression"))),n("ClassPrivateMethod").bases("Declaration","Function").build("key","params","body","kind","computed","static").field("key",n("PrivateName")),n("ClassAccessorProperty").bases("Declaration").build("key","value","decorators","computed","static").field("key",i(n("Literal"),n("Identifier"),n("PrivateName"),n("Expression"))).field("value",i(n("Expression"),null),t.null),["ClassMethod","ClassPrivateMethod"].forEach(c=>{n(c).field("kind",i("get","set","method","constructor"),()=>"method").field("body",n("BlockStatement")).field("access",i("public","private","protected",null),t.null)}),["ClassMethod","ClassPrivateMethod","ClassAccessorProperty"].forEach(c=>{n(c).field("computed",Boolean,t.false).field("static",Boolean,t.false).field("abstract",Boolean,t.false).field("accessibility",i("public","private","protected",null),t.null).field("decorators",i([n("Decorator")],null),t.null).field("definite",Boolean,t.false).field("optional",Boolean,t.false).field("override",Boolean,t.false).field("readonly",Boolean,t.false)});var u=i(n("Property"),n("PropertyPattern"),n("SpreadPropertyPattern"),n("SpreadProperty"),n("ObjectProperty"),n("RestProperty"),n("RestElement"));n("ObjectPattern").bases("Pattern").build("properties").field("properties",[u]).field("decorators",i([n("Decorator")],null),t.null),n("SpreadProperty").bases("Node").build("argument").field("argument",n("Expression")),n("RestProperty").bases("Node").build("argument").field("argument",n("Expression")),n("ForAwaitStatement").bases("Statement").build("left","right","body").field("left",i(n("VariableDeclaration"),n("Expression"))).field("right",n("Expression")).field("body",n("Statement")),n("Import").bases("Expression").build()}Oe(()=>module);function $P(e){let t=e.use(Qe).Type.def;e.use(Cb),e.use(Eb),t("V8IntrinsicIdentifier").bases("Expression").build("name").field("name",String),t("TopicReference").bases("Expression").build()}Oe(()=>module);function UP(e){e.use(Cb),e.use(xb);var r=e.use(Qe),t=r.namedTypes,n=r.Type.def,i=r.Type.or,s=e.use(Yt).defaults,o=r.Type.from(function(c,p){return!!(t.StringLiteral&&t.StringLiteral.check(c,p)||t.Literal&&t.Literal.check(c,p)&&typeof c.value=="string")},"StringLiteral");n("TSType").bases("Node");var a=i(n("Identifier"),n("TSQualifiedName"));n("TSTypeReference").bases("TSType","TSHasOptionalTypeParameterInstantiation").build("typeName","typeParameters").field("typeName",a),n("TSHasOptionalTypeParameterInstantiation").field("typeParameters",i(n("TSTypeParameterInstantiation"),null),s.null),n("TSHasOptionalTypeParameters").field("typeParameters",i(n("TSTypeParameterDeclaration"),null,void 0),s.null),n("TSHasOptionalTypeAnnotation").field("typeAnnotation",i(n("TSTypeAnnotation"),null),s.null),n("TSQualifiedName").bases("Node").build("left","right").field("left",a).field("right",a),n("TSAsExpression").bases("Expression","Pattern").build("expression","typeAnnotation").field("expression",n("Expression")).field("typeAnnotation",n("TSType")).field("extra",i({parenthesized:Boolean},null),s.null),n("TSTypeCastExpression").bases("Expression").build("expression","typeAnnotation").field("expression",n("Expression")).field("typeAnnotation",n("TSType")),n("TSSatisfiesExpression").bases("Expression","Pattern").build("expression","typeAnnotation").field("expression",n("Expression")).field("typeAnnotation",n("TSType")),n("TSNonNullExpression").bases("Expression","Pattern").build("expression").field("expression",n("Expression")),["TSAnyKeyword","TSBigIntKeyword","TSBooleanKeyword","TSNeverKeyword","TSNullKeyword","TSNumberKeyword","TSObjectKeyword","TSStringKeyword","TSSymbolKeyword","TSUndefinedKeyword","TSUnknownKeyword","TSVoidKeyword","TSIntrinsicKeyword","TSThisType"].forEach(c=>{n(c).bases("TSType").build()}),n("TSArrayType").bases("TSType").build("elementType").field("elementType",n("TSType")),n("TSLiteralType").bases("TSType").build("literal").field("literal",i(n("NumericLiteral"),n("StringLiteral"),n("BooleanLiteral"),n("TemplateLiteral"),n("UnaryExpression"),n("BigIntLiteral"))),n("TemplateLiteral").field("expressions",i([n("Expression")],[n("TSType")])),["TSUnionType","TSIntersectionType"].forEach(c=>{n(c).bases("TSType").build("types").field("types",[n("TSType")])}),n("TSConditionalType").bases("TSType").build("checkType","extendsType","trueType","falseType").field("checkType",n("TSType")).field("extendsType",n("TSType")).field("trueType",n("TSType")).field("falseType",n("TSType")),n("TSInferType").bases("TSType").build("typeParameter").field("typeParameter",n("TSTypeParameter")),n("TSParenthesizedType").bases("TSType").build("typeAnnotation").field("typeAnnotation",n("TSType"));var l=[i(n("Identifier"),n("RestElement"),n("ArrayPattern"),n("ObjectPattern"))];["TSFunctionType","TSConstructorType"].forEach(c=>{n(c).bases("TSType","TSHasOptionalTypeParameters","TSHasOptionalTypeAnnotation").build("parameters").field("parameters",l)}),n("TSDeclareFunction").bases("Declaration","TSHasOptionalTypeParameters").build("id","params","returnType").field("declare",Boolean,s.false).field("async",Boolean,s.false).field("generator",Boolean,s.false).field("id",i(n("Identifier"),null),s.null).field("params",[n("Pattern")]).field("returnType",i(n("TSTypeAnnotation"),n("Noop"),null),s.null),n("TSDeclareMethod").bases("Declaration","TSHasOptionalTypeParameters").build("key","params","returnType").field("async",Boolean,s.false).field("generator",Boolean,s.false).field("params",[n("Pattern")]).field("abstract",Boolean,s.false).field("accessibility",i("public","private","protected",void 0),s.undefined).field("static",Boolean,s.false).field("computed",Boolean,s.false).field("optional",Boolean,s.false).field("key",i(n("Identifier"),n("StringLiteral"),n("NumericLiteral"),n("Expression"))).field("kind",i("get","set","method","constructor"),function(){return"method"}).field("access",i("public","private","protected",void 0),s.undefined).field("decorators",i([n("Decorator")],null),s.null).field("returnType",i(n("TSTypeAnnotation"),n("Noop"),null),s.null),n("TSMappedType").bases("TSType").build("typeParameter","typeAnnotation").field("readonly",i(Boolean,"+","-"),s.false).field("typeParameter",n("TSTypeParameter")).field("optional",i(Boolean,"+","-"),s.false).field("typeAnnotation",i(n("TSType"),null),s.null),n("TSTupleType").bases("TSType").build("elementTypes").field("elementTypes",[i(n("TSType"),n("TSNamedTupleMember"))]),n("TSNamedTupleMember").bases("TSType").build("label","elementType","optional").field("label",n("Identifier")).field("optional",Boolean,s.false).field("elementType",n("TSType")),n("TSRestType").bases("TSType").build("typeAnnotation").field("typeAnnotation",n("TSType")),n("TSOptionalType").bases("TSType").build("typeAnnotation").field("typeAnnotation",n("TSType")),n("TSIndexedAccessType").bases("TSType").build("objectType","indexType").field("objectType",n("TSType")).field("indexType",n("TSType")),n("TSTypeOperator").bases("TSType").build("operator").field("operator",String).field("typeAnnotation",n("TSType")),n("TSTypeAnnotation").bases("Node").build("typeAnnotation").field("typeAnnotation",i(n("TSType"),n("TSTypeAnnotation"))),n("TSIndexSignature").bases("Declaration","TSHasOptionalTypeAnnotation").build("parameters","typeAnnotation").field("parameters",[n("Identifier")]).field("readonly",Boolean,s.false),n("TSPropertySignature").bases("Declaration","TSHasOptionalTypeAnnotation").build("key","typeAnnotation","optional").field("key",n("Expression")).field("computed",Boolean,s.false).field("readonly",Boolean,s.false).field("optional",Boolean,s.false).field("initializer",i(n("Expression"),null),s.null),n("TSMethodSignature").bases("Declaration","TSHasOptionalTypeParameters","TSHasOptionalTypeAnnotation").build("key","parameters","typeAnnotation").field("key",n("Expression")).field("computed",Boolean,s.false).field("optional",Boolean,s.false).field("parameters",l),n("TSTypePredicate").bases("TSTypeAnnotation","TSType").build("parameterName","typeAnnotation","asserts").field("parameterName",i(n("Identifier"),n("TSThisType"))).field("typeAnnotation",i(n("TSTypeAnnotation"),null),s.null).field("asserts",Boolean,s.false),["TSCallSignatureDeclaration","TSConstructSignatureDeclaration"].forEach(c=>{n(c).bases("Declaration","TSHasOptionalTypeParameters","TSHasOptionalTypeAnnotation").build("parameters","typeAnnotation").field("parameters",l)}),n("TSEnumMember").bases("Node").build("id","initializer").field("id",i(n("Identifier"),o)).field("initializer",i(n("Expression"),null),s.null),n("TSTypeQuery").bases("TSType").build("exprName").field("exprName",i(a,n("TSImportType")));var u=i(n("TSCallSignatureDeclaration"),n("TSConstructSignatureDeclaration"),n("TSIndexSignature"),n("TSMethodSignature"),n("TSPropertySignature"));n("TSTypeLiteral").bases("TSType").build("members").field("members",[u]),n("TSTypeParameter").bases("Identifier").build("name","constraint","default").field("name",i(n("Identifier"),String)).field("constraint",i(n("TSType"),void 0),s.undefined).field("default",i(n("TSType"),void 0),s.undefined),n("TSTypeAssertion").bases("Expression","Pattern").build("typeAnnotation","expression").field("typeAnnotation",n("TSType")).field("expression",n("Expression")).field("extra",i({parenthesized:Boolean},null),s.null),n("TSTypeParameterDeclaration").bases("Declaration").build("params").field("params",[n("TSTypeParameter")]),n("TSInstantiationExpression").bases("Expression","TSHasOptionalTypeParameterInstantiation").build("expression","typeParameters").field("expression",n("Expression")),n("TSTypeParameterInstantiation").bases("Node").build("params").field("params",[n("TSType")]),n("TSEnumDeclaration").bases("Declaration").build("id","members").field("id",n("Identifier")).field("const",Boolean,s.false).field("declare",Boolean,s.false).field("members",[n("TSEnumMember")]).field("initializer",i(n("Expression"),null),s.null),n("TSTypeAliasDeclaration").bases("Declaration","TSHasOptionalTypeParameters").build("id","typeAnnotation").field("id",n("Identifier")).field("declare",Boolean,s.false).field("typeAnnotation",n("TSType")),n("TSModuleBlock").bases("Node").build("body").field("body",[n("Statement")]),n("TSModuleDeclaration").bases("Declaration").build("id","body").field("id",i(o,a)).field("declare",Boolean,s.false).field("global",Boolean,s.false).field("body",i(n("TSModuleBlock"),n("TSModuleDeclaration"),null),s.null),n("TSImportType").bases("TSType","TSHasOptionalTypeParameterInstantiation").build("argument","qualifier","typeParameters").field("argument",o).field("qualifier",i(a,void 0),s.undefined),n("TSImportEqualsDeclaration").bases("Declaration").build("id","moduleReference").field("id",n("Identifier")).field("isExport",Boolean,s.false).field("moduleReference",i(a,n("TSExternalModuleReference"))),n("TSExternalModuleReference").bases("Declaration").build("expression").field("expression",o),n("TSExportAssignment").bases("Statement").build("expression").field("expression",n("Expression")),n("TSNamespaceExportDeclaration").bases("Declaration").build("id").field("id",n("Identifier")),n("TSInterfaceBody").bases("Node").build("body").field("body",[u]),n("TSExpressionWithTypeArguments").bases("TSType","TSHasOptionalTypeParameterInstantiation").build("expression","typeParameters").field("expression",a),n("TSInterfaceDeclaration").bases("Declaration","TSHasOptionalTypeParameters").build("id","body").field("id",a).field("declare",Boolean,s.false).field("extends",i([n("TSExpressionWithTypeArguments")],null),s.null).field("body",n("TSInterfaceBody")),n("TSParameterProperty").bases("Pattern").build("parameter").field("accessibility",i("public","private","protected",void 0),s.undefined).field("readonly",Boolean,s.false).field("parameter",i(n("Identifier"),n("AssignmentPattern"))),n("ClassProperty").field("access",i("public","private","protected",void 0),s.undefined),n("ClassAccessorProperty").bases("Declaration","TSHasOptionalTypeAnnotation"),n("ClassBody").field("body",[i(n("MethodDefinition"),n("VariableDeclarator"),n("ClassPropertyDefinition"),n("ClassProperty"),n("ClassPrivateProperty"),n("ClassAccessorProperty"),n("ClassMethod"),n("ClassPrivateMethod"),n("StaticBlock"),n("TSDeclareMethod"),u)])}Oe(()=>module);var yr;yr||(yr={});var{astNodesAreEquivalent:h8,builders:Zi,builtInTypes:br,defineMethod:g8,eachField:y8,finalize:b8,getBuilderName:D8,getFieldNames:jP,getFieldValue:cn,getSupertypeNames:x8,namedTypes:KP,NodePath:VP,Path:E8,PathVisitor:C8,someField:zP,Type:S8,use:T8,visit:w8}=wP([lo,BP,Eb,MP,$P,UP]);Object.assign(yr,KP);var Oa=yr,Zy=Ja.default.SourceMapConsumer,qP=Ja.default.SourceMapGenerator,Sb=Object.prototype.hasOwnProperty;function WP(){return`
|
|
992
992
|
`}function eb(e,r,t){return e&&Sb.call(e,r)?e[r]:t}function GP(...e){let r={},t=e.length;for(let n=0;n<t;++n){let i=Object.keys(e[n]),s=i.length;for(let o=0;o<s;++o)r[i[o]]=!0}return r}function Ae(e,r){return e.line-r.line||e.column-r.column}function _n(e){return{line:e.line,column:e.column}}function HP(e,r){if(e){if(!r)return e}else return r||null;let t=new Zy(e),n=new Zy(r),i=new qP({file:r.file,sourceRoot:r.sourceRoot}),s={};return n.eachMapping(function(o){let a=t.originalPositionFor({line:o.originalLine,column:o.originalColumn}),l=a.source;if(l===null)return;i.addMapping({source:l,original:_n(a),generated:{line:o.generatedLine,column:o.generatedColumn},name:o.name});let u=t.sourceContentFor(l);u&&!Sb.call(s,l)&&(s[l]=u,i.setSourceContent(l,u))}),i.toJSON()}function Tb(e,r){if(!e.loc)return null;let t={start:e.loc.start,end:e.loc.end};function n(i){Qc(t,i.loc)}return e.declaration&&e.declaration.decorators&&Ya(e)&&e.declaration.decorators.forEach(n),Ae(t.start,t.end)<0&&(t.start=_n(t.start),r.skipSpaces(t.start,!1,!0),Ae(t.start,t.end)<0&&(t.end=_n(t.end),r.skipSpaces(t.end,!0,!0))),e.comments&&e.comments.forEach(n),t}function Qc(e,r){e&&r&&(Ae(r.start,e.start)<0&&(e.start=r.start),Ae(e.end,r.end)<0&&(e.end=r.end))}function lp(e,r){let t=e.loc;if(t&&(t.start.line<1&&(t.start.line=1),t.end.line<1&&(t.end.line=1)),e.type==="File"&&(t.start=r.firstPos(),t.end=r.lastPos()),JP(e,r),YP(e,r),t&&e.decorators)e.decorators.forEach(function(n){Qc(t,n.loc)});else if(e.declaration&&Ya(e)){e.declaration.loc=null;let n=e.declaration.decorators;n&&n.forEach(function(i){Qc(t,i.loc)})}else if(Oa.MethodDefinition&&Oa.MethodDefinition.check(e)||Oa.Property.check(e)&&(e.method||e.shorthand))e.value.loc=null,Oa.FunctionExpression.check(e.value)&&(e.value.id=null);else if(e.type==="ObjectTypeProperty"){let n=e.loc,i=n&&n.end;i&&(i=_n(i),r.prevPos(i)&&r.charAt(i)===","&&(i=r.skipSpaces(i,!0,!0))&&(n.end=i))}}function JP(e,r){if(e.type!=="ForStatement")return;function t(n){let i=n&&n.loc,s=i&&i.start,o=i&&_n(i.end);for(;s&&o&&Ae(s,o)<0&&(r.prevPos(o),r.charAt(o)===";");)i.end.line=o.line,i.end.column=o.column}t(e.init),t(e.test),t(e.update)}function YP(e,r){if(e.type==="TemplateLiteral"&&e.quasis.length!==0){if(e.loc){let t=_n(e.loc.start),n=e.quasis[0];Ae(n.loc.start,t)<0&&(n.loc.start=t);let i=_n(e.loc.end),s=e.quasis[e.quasis.length-1];Ae(i,s.loc.end)<0&&(s.loc.end=i)}e.expressions.forEach(function(t,n){let i=r.skipSpaces(t.loc.start,!0,!1);if(r.prevPos(i)&&r.charAt(i)==="{"&&r.prevPos(i)&&r.charAt(i)==="$"){let o=e.quasis[n];Ae(i,o.loc.end)<0&&(o.loc.end=i)}let s=r.skipSpaces(t.loc.end,!1,!1);if(r.charAt(s)==="}"){let o=e.quasis[n+1];Ae(o.loc.start,s)<0&&(o.loc.start=s)}})}}function Ya(e){if(e)switch(e.type){case"ExportDeclaration":case"ExportDefaultDeclaration":case"ExportDefaultSpecifier":case"DeclareExportDeclaration":case"ExportNamedDeclaration":case"ExportAllDeclaration":return!0}return!1}function wb(e){let r=e.getParentNode();return e.getName()==="declaration"&&Ya(r)?r:null}function no(e,r){let t=e.trailingComma;return typeof t=="object"?!!t[r]:!!t}var Zc={tabWidth:4,useTabs:!1,reuseWhitespace:!0,lineTerminator:WP(),wrapColumn:74,sourceFileName:null,sourceMapName:null,sourceRoot:null,inputSourceMap:null,range:!1,tolerant:!0,quote:null,trailingComma:!1,arrayBracketSpacing:!1,objectCurlySpacing:!0,arrowParensAlways:!1,flowObjectCommas:!0,tokens:!0},XP=Zc.hasOwnProperty;function Xa(e){let r=e||Zc;function t(n){return XP.call(r,n)?r[n]:Zc[n]}return{tabWidth:+t("tabWidth"),useTabs:!!t("useTabs"),reuseWhitespace:!!t("reuseWhitespace"),lineTerminator:t("lineTerminator"),wrapColumn:Math.max(t("wrapColumn"),0),sourceFileName:t("sourceFileName"),sourceMapName:t("sourceMapName"),sourceRoot:t("sourceRoot"),inputSourceMap:t("inputSourceMap"),parser:t("esprima")||t("parser"),range:t("range"),tolerant:t("tolerant"),quote:t("quote"),trailingComma:t("trailingComma"),arrayBracketSpacing:t("arrayBracketSpacing"),objectCurlySpacing:t("objectCurlySpacing"),arrowParensAlways:t("arrowParensAlways"),flowObjectCommas:t("flowObjectCommas"),tokens:!!t("tokens")}}var ep=class e{constructor(r,t,n=t){this.sourceLines=r,this.sourceLoc=t,this.targetLoc=n}slice(r,t,n=r.lastPos()){let i=this.sourceLines,s=this.sourceLoc,o=this.targetLoc;function a(l){let u=s[l],c=o[l],p=t;return l==="end"&&(p=n),QP(i,u,r,c,p)}if(Ae(t,o.start)<=0)if(Ae(o.end,n)<=0)o={start:Fn(o.start,t.line,t.column),end:Fn(o.end,t.line,t.column)};else{if(Ae(n,o.start)<=0)return null;s={start:s.start,end:a("end")},o={start:Fn(o.start,t.line,t.column),end:Fn(n,t.line,t.column)}}else{if(Ae(o.end,t)<=0)return null;Ae(o.end,n)<=0?(s={start:a("start"),end:s.end},o={start:{line:1,column:0},end:Fn(o.end,t.line,t.column)}):(s={start:a("start"),end:a("end")},o={start:{line:1,column:0},end:Fn(n,t.line,t.column)})}return new e(this.sourceLines,s,o)}add(r,t){return new e(this.sourceLines,this.sourceLoc,{start:tb(this.targetLoc.start,r,t),end:tb(this.targetLoc.end,r,t)})}subtract(r,t){return new e(this.sourceLines,this.sourceLoc,{start:Fn(this.targetLoc.start,r,t),end:Fn(this.targetLoc.end,r,t)})}indent(r,t=!1,n=!1){if(r===0)return this;let i=this.targetLoc,s=i.start.line,o=i.end.line;if(t&&s===1&&o===1)return this;if(i={start:i.start,end:i.end},!t||s>1){let a=i.start.column+r;i.start={line:s,column:n?Math.max(0,a):a}}if(!t||o>1){let a=i.end.column+r;i.end={line:o,column:n?Math.max(0,a):a}}return new e(this.sourceLines,this.sourceLoc,i)}};function tb(e,r,t){return{line:e.line+r-1,column:e.line===1?e.column+t:e.column}}function Fn(e,r,t){return{line:e.line-r+1,column:e.line===r?e.column-t:e.column}}function QP(e,r,t,n,i){let s=Ae(n,i);if(s===0)return r;let o,a;if(s<0){o=e.skipSpaces(r)||e.lastPos(),a=t.skipSpaces(n)||t.lastPos();let l=i.line-a.line;for(o.line+=l,a.line+=l,l>0&&(o.column=0,a.column=0);Ae(a,i)<0&&t.nextPos(a,!0););}else{o=e.skipSpaces(r,!0)||e.firstPos(),a=t.skipSpaces(n,!0)||t.firstPos();let l=i.line-a.line;for(o.line+=l,a.line+=l,l<0&&(o.column=e.getLineLength(o.line),a.column=t.getLineLength(a.line));Ae(i,a)<0&&t.prevPos(a,!0););}return o}var ZP=Object.defineProperty,e1=(e,r,t)=>r in e?ZP(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,Ys=(e,r,t)=>(e1(e,typeof r!="symbol"?r+"":r,t),t),Xi=class e{constructor(r,t=null){this.infos=r,Ys(this,"length"),Ys(this,"name"),Ys(this,"mappings",[]),Ys(this,"cachedSourceMap",null),Ys(this,"cachedTabWidth"),this.length=r.length,this.name=t||null,this.name&&this.mappings.push(new ep(this,{start:this.firstPos(),end:this.lastPos()}))}toString(r){return this.sliceString(this.firstPos(),this.lastPos(),r)}getSourceMap(r,t){if(!r)return null;let n=this;function i(a){return a=a||{},a.file=r,t&&(a.sourceRoot=t),a}if(n.cachedSourceMap)return i(n.cachedSourceMap.toJSON());let s=new Ja.default.SourceMapGenerator(i()),o={};return n.mappings.forEach(function(a){let l=a.sourceLines.skipSpaces(a.sourceLoc.start)||a.sourceLines.lastPos(),u=n.skipSpaces(a.targetLoc.start)||n.lastPos();for(;Ae(l,a.sourceLoc.end)<0&&Ae(u,a.targetLoc.end)<0;){a.sourceLines.charAt(l),n.charAt(u);let c=a.sourceLines.name;if(s.addMapping({source:c,original:{line:l.line,column:l.column},generated:{line:u.line,column:u.column}}),!tp.call(o,c)){let p=a.sourceLines.toString();s.setSourceContent(c,p),o[c]=p}n.nextPos(u,!0),a.sourceLines.nextPos(l,!0)}}),n.cachedSourceMap=s,s.toJSON()}bootstrapCharAt(r){let t=r.line,n=r.column,i=this.toString().split(rp),s=i[t-1];return typeof s>"u"?"":n===s.length&&t<i.length?`
|
|
993
993
|
`:n>=s.length?"":s.charAt(n)}charAt(r){let t=r.line,n=r.column,i=this,s=i.infos,o=s[t-1],a=n;if(typeof o>"u"||a<0)return"";let l=this.getIndentAt(t);return a<l?" ":(a+=o.sliceStart-l,a===o.sliceEnd&&t<this.length?`
|
|
994
994
|
`:a>=o.sliceEnd?"":o.line.charAt(a))}stripMargin(r,t){if(r===0)return this;if(t&&this.length===1)return this;let n=new e(this.infos.map(function(i,s){return i.line&&(s>0||!t)&&(i={...i,indent:Math.max(0,i.indent-r)}),i}));if(this.mappings.length>0){let i=n.mappings;this.mappings.forEach(function(s){i.push(s.indent(r,t,!0))})}return n}indent(r){if(r===0)return this;let t=new e(this.infos.map(function(n){return n.line&&!n.locked&&(n={...n,indent:n.indent+r}),n}));if(this.mappings.length>0){let n=t.mappings;this.mappings.forEach(function(i){n.push(i.indent(r))})}return t}indentTail(r){if(r===0)return this;if(this.length<2)return this;let t=new e(this.infos.map(function(n,i){return i>0&&n.line&&!n.locked&&(n={...n,indent:n.indent+r}),n}));if(this.mappings.length>0){let n=t.mappings;this.mappings.forEach(function(i){n.push(i.indent(r,!0))})}return t}lockIndentTail(){return this.length<2?this:new e(this.infos.map((r,t)=>({...r,locked:t>0})))}getIndentAt(r){return Math.max(this.infos[r-1].indent,0)}guessTabWidth(){if(typeof this.cachedTabWidth=="number")return this.cachedTabWidth;let r=[],t=0;for(let s=1,o=this.length;s<=o;++s){let a=this.infos[s-1],l=a.line.slice(a.sliceStart,a.sliceEnd);if(Gi(l))continue;let u=Math.abs(a.indent-t);r[u]=~~r[u]+1,t=a.indent}let n=-1,i=2;for(let s=1;s<r.length;s+=1)tp.call(r,s)&&r[s]>n&&(n=r[s],i=s);return this.cachedTabWidth=i}startsWithComment(){if(this.infos.length===0)return!1;let r=this.infos[0],t=r.sliceStart,n=r.sliceEnd,i=r.line.slice(t,n).trim();return i.length===0||i.slice(0,2)==="//"||i.slice(0,2)==="/*"}isOnlyWhitespace(){return Gi(this.toString())}isPrecededOnlyByWhitespace(r){let t=this.infos[r.line-1],n=Math.max(t.indent,0),i=r.column-n;if(i<=0)return!0;let s=t.sliceStart,o=Math.min(s+i,t.sliceEnd),a=t.line.slice(s,o);return Gi(a)}getLineLength(r){let t=this.infos[r-1];return this.getIndentAt(r)+t.sliceEnd-t.sliceStart}nextPos(r,t=!1){let n=Math.max(r.line,0);return Math.max(r.column,0)<this.getLineLength(n)?(r.column+=1,t?!!this.skipSpaces(r,!1,!0):!0):n<this.length?(r.line+=1,r.column=0,t?!!this.skipSpaces(r,!1,!0):!0):!1}prevPos(r,t=!1){let n=r.line,i=r.column;if(i<1){if(n-=1,n<1)return!1;i=this.getLineLength(n)}else i=Math.min(i-1,this.getLineLength(n));return r.line=n,r.column=i,t?!!this.skipSpaces(r,!0,!0):!0}firstPos(){return{line:1,column:0}}lastPos(){return{line:this.length,column:this.getLineLength(this.length)}}skipSpaces(r,t=!1,n=!1){if(r?r=n?r:{line:r.line,column:r.column}:t?r=this.lastPos():r=this.firstPos(),t){for(;this.prevPos(r);)if(!Gi(this.charAt(r))&&this.nextPos(r))return r;return null}else{for(;Gi(this.charAt(r));)if(!this.nextPos(r))return null;return r}}trimLeft(){let r=this.skipSpaces(this.firstPos(),!1,!0);return r?this.slice(r):ii}trimRight(){let r=this.skipSpaces(this.lastPos(),!0,!0);return r?this.slice(this.firstPos(),r):ii}trim(){let r=this.skipSpaces(this.firstPos(),!1,!0);if(r===null)return ii;let t=this.skipSpaces(this.lastPos(),!0,!0);return t===null?ii:this.slice(r,t)}eachPos(r,t=this.firstPos(),n=!1){let i=this.firstPos();if(t&&(i.line=t.line,i.column=t.column),!(n&&!this.skipSpaces(i,!1,!0)))do r.call(this,i);while(this.nextPos(i,n))}bootstrapSlice(r,t){let n=this.toString().split(rp).slice(r.line-1,t.line);return n.length>0&&(n.push(n.pop().slice(0,t.column)),n[0]=n[0].slice(r.column)),A(n.join(`
|
|
@@ -1084,14 +1084,14 @@ ${" ".repeat(6+i)}^`),u));r+=`
|
|
|
1084
1084
|
${l.join(`
|
|
1085
1085
|
`)}
|
|
1086
1086
|
`}this.message=r}},F1=new Set(["Literal","StringLiteral","NumericLiteral","BooleanLiteral","NullLiteral","RegExpLiteral","BigIntLiteral"]),zb=new Set(["string","number","boolean","bigint","symbol","undefined"]),st=Zi;function _1(e){return/^[$A-Z_a-z][\w$]*$/.test(e)}var pp="__magicast_proxy";function Rt(e,r=new Set){if(e===void 0)return st.identifier("undefined");if(e===null)return st.literal(null);if(zb.has(typeof e))return st.literal(e);if(r.has(e))throw new wt("Can not serialize circular reference");if(r.add(e),e[pp])return e.$ast;if(e instanceof RegExp){let t=st.regExpLiteral(e.source,e.flags);return delete t.extra.raw,t}return e instanceof Set?st.newExpression(st.identifier("Set"),[st.arrayExpression([...e].map(t=>Rt(t,r)))]):e instanceof Date?st.newExpression(st.identifier("Date"),[st.literal(e.toISOString())]):e instanceof Map?st.newExpression(st.identifier("Map"),[st.arrayExpression([...e].map(([t,n])=>st.arrayExpression([Rt(t,r),Rt(n,r)])))]):Array.isArray(e)?st.arrayExpression(e.map(t=>Rt(t,r))):typeof e=="object"?st.objectExpression(Object.entries(e).map(([t,n])=>st.property("init",/^[$A-Z_a-z][\w$]*$/g.test(t)?st.identifier(t):st.literal(t),Rt(n,r)))):st.literal(e)}function k1(e,r={}){let t=r;return t[pp]=!0,t.$ast=e,t.$type||(t.$type="object"),t}var O1={enumerable:!0,configurable:!0};function or(e,r,t){let n=k1(e,r);return new Proxy({},{ownKeys(){return Object.keys(n).filter(i=>i!==pp&&!i.startsWith("$"))},getOwnPropertyDescriptor(){return O1},has(i,s){return s in n},...t,get(i,s,o){if(s in n)return n[s];if(t.get)return t.get(i,s,o)},set(i,s,o,a){return s in n?(n[s]=o,!0):t.set?t.set(i,s,o,a):!1}})}var Jt=Zi,Yc=new WeakMap;function R1(e,r,t){if(Yc.has(r))return Yc.get(r);let n=or(r,{get $declaration(){return e},get imported(){return r.type==="ImportDefaultSpecifier"?"default":r.type==="ImportNamespaceSpecifier"?"*":r.imported.type==="Identifier"?r.imported.name:r.imported.value},set imported(i){if(r.type!=="ImportSpecifier")throw new wt("Changing import name is not yet implemented");r.imported.type==="Identifier"?r.imported.name=i:r.imported.value=i},get local(){return r.local.name},set local(i){r.local.name=i},get from(){return e.source.value},set from(i){if(i===e.source.value)return;e.specifiers=e.specifiers.filter(o=>o!==r),e.specifiers.length===0&&(t.body=t.body.filter(o=>o!==e));let s=t.body.find(o=>o.type==="ImportDeclaration"&&o.source.value===i);s?s.specifiers.push(r):t.body.unshift(Jt.importDeclaration([r],Jt.stringLiteral(i)))},toJSON(){return{imported:this.imported,local:this.local,from:this.from}}},{ownKeys(){return["imported","local","from","toJSON"]}});return Yc.set(r,n),n}function L1(e,r){let t=()=>{let o=[];for(let a of e.body)if(a.type==="ImportDeclaration")for(let l of a.specifiers)o.push(R1(a,l,e));return o},n=(o,a,l)=>{let u=t(),c=u.find(m=>m.local===o),p=a.local||o;if(c)return c.imported=a.imported,c.local=p,c.from=a.from,!0;let d=a.imported==="default"?Jt.importDefaultSpecifier(Jt.identifier(p)):a.imported==="*"?Jt.importNamespaceSpecifier(Jt.identifier(p)):Jt.importSpecifier(Jt.identifier(a.imported),Jt.identifier(p)),f=u.find(m=>m.from===a.from)?.$declaration;if(f)f.specifiers.push(d);else if(l==="prepend"||u.length===0)e.body.unshift(Jt.importDeclaration([d],Jt.stringLiteral(a.from)));else{let m=u.at(-1).$declaration,h=e.body.indexOf(m);e.body.splice(h+1,0,Jt.importDeclaration([d],Jt.stringLiteral(a.from)))}return!0},i=o=>{let a=t().find(c=>c.local===o);if(!a)return!1;let l=a.$declaration,u=a.$ast;return l.specifiers=l.specifiers.filter(c=>c!==u),l.specifiers.length===0&&(e.body=e.body.filter(c=>c!==l)),!0};return or(e,{$type:"imports",$add(o){n(o.local||o.imported,o,"prepend")},$prepend(o){n(o.local||o.imported,o,"prepend")},$append(o){n(o.local||o.imported,o,"append")},get $items(){return t()},toJSON(){return t().reduce((o,a)=>(o[a.local]=a,o),{})}},{get(o,a){return t().find(l=>l.local===a)},set(o,a,l){return n(a,l,"prepend")},deleteProperty(o,a){return i(a)},ownKeys(){return t().map(o=>o.local)},has(o,a){return t().some(l=>l.local===a)}})}function Qa(e,r,t){let n=s=>r[s],i=(s,o)=>{r[s]=o};return or(e,{$type:"array",push(s){r.push(Rt(s))},pop(){return Ot(r.pop(),t)},unshift(s){r.unshift(Rt(s))},shift(){return Ot(r.shift(),t)},splice(s,o,...a){return r.splice(s,o,...a.map(u=>Rt(u))).map(u=>Ot(u,t))},find(s){return r.map(o=>Ot(o,t)).find(s)},findIndex(s){return r.map(o=>Ot(o,t)).findIndex(s)},includes(s){return r.map(o=>Ot(o,t)).includes(s)},toJSON(){return r.map(s=>Ot(s,t))}},{get(s,o){if(o==="length")return r.length;if(o===Symbol.iterator)return function*(){for(let u of r)yield Ot(u,t)};if(typeof o=="symbol")return;let a=+o;if(Number.isNaN(a))return;let l=n(a);if(l)return Ot(l,t)},set(s,o,a){if(typeof o=="symbol")return!1;let l=+o;return Number.isNaN(l)?!1:(i(l,Rt(a)),!0)},deleteProperty(s,o){if(typeof o=="symbol")return!1;let a=+o;return Number.isNaN(a)?!1:(r[a]=Rt(void 0),!0)},ownKeys(){return["length",...r.map((s,o)=>o.toString())]}})}function B1(e,r){if("elements"in e)return Qa(e,e.elements,r)}function qb(e,r){if(e.type!=="CallExpression")throw new wt("Not a function call");function t(i){if(i.type==="Identifier")return i.name;if(i.type==="MemberExpression")return`${t(i.object)}.${t(i.property)}`;throw new wt("Not implemented")}let n=Qa(e,e.arguments,r);return or(e,{$type:"function-call",$callee:t(e.callee),$args:n},{})}function M1(e,r){if(e.type!=="ArrowFunctionExpression")throw new wt("Not an arrow function expression");let t=Qa(e,e.params,r);return or(e,{$type:"arrow-function-expression",$params:t,$body:Ot(e.body,r)},{})}var $1=Zi;function U1(e,r){if(!("properties"in e))return;let t=s=>{for(let o of e.properties){if("key"in o&&"name"in o.key&&o.key.name===s)return o.value;if(o.type==="ObjectProperty"&&(o.key.type==="StringLiteral"||o.key.type==="NumericLiteral"||o.key.type==="BooleanLiteral")&&o.key.value.toString()===s)return o.value.value??o.value}},n=(s,o=!1)=>{if("key"in s&&"name"in s.key)return s.key.name;if(s.type==="ObjectProperty"&&(s.key.type==="StringLiteral"||s.key.type==="NumericLiteral"||s.key.type==="BooleanLiteral"))return s.key.value.toString();if(o)throw new wt(`Casting "${s.type}" is not supported`,{ast:s,code:r?.$code})},i=(s,o)=>{let a=e.properties.find(l=>n(l)===s);a?a.value=o:_1(s)?e.properties.push({type:"Property",key:{type:"Identifier",name:s},value:o}):e.properties.push({type:"ObjectProperty",key:$1.stringLiteral(s),value:o})};return or(e,{$type:"object",toJSON(){return e.properties.reduce((s,o)=>("key"in o&&"name"in o.key&&(s[o.key.name]=Ot(o.value,r)),s),{})}},{get(s,o){let a=t(o);if(a)return Ot(a,r)},set(s,o,a){return typeof o!="string"&&(o=String(o)),i(o,Rt(a)),!0},deleteProperty(s,o){typeof o!="string"&&(o=String(o));let a=e.properties.findIndex(l=>"key"in l&&"name"in l.key&&l.key.name===o);return a!==-1&&e.properties.splice(a,1),!0},ownKeys(){return e.properties.map(s=>n(s,!0)).filter(Boolean)}})}function Wb(e,r){if(e.type!=="NewExpression")throw new wt("Not a new expression");function t(i){if(i.type==="Identifier")return i.name;if(i.type==="MemberExpression")return`${t(i.object)}.${t(i.property)}`;throw new wt("Not implemented")}let n=Qa(e,e.arguments,r);return or(e,{$type:"new-expression",$callee:t(e.callee),$args:n},{})}function j1(e){if(e.type!=="Identifier")throw new wt("Not an identifier");return or(e,{$type:"identifier",$name:e.name},{})}function K1(e){if(e.type!=="LogicalExpression")throw new wt("Not a logical expression");return or(e,{$type:"logicalExpression"},{})}function V1(e){if(e.type!=="MemberExpression")throw new wt("Not a member expression");return or(e,{$type:"memberExpression"},{})}var Xc=new WeakMap;function Ot(e,r){if(zb.has(typeof e))return e;if(F1.has(e.type))return e.value;if(Xc.has(e))return Xc.get(e);let t;switch(e.type){case"ObjectExpression":{t=U1(e,r);break}case"ArrayExpression":{t=B1(e,r);break}case"CallExpression":{t=qb(e,r);break}case"ArrowFunctionExpression":{t=M1(e,r);break}case"NewExpression":{t=Wb(e,r);break}case"Identifier":{t=j1(e);break}case"LogicalExpression":{t=K1(e);break}case"MemberExpression":{t=V1(e);break}case"TSAsExpression":case"TSSatisfiesExpression":{t=Ot(e.expression,r);break}default:throw new wt(`Casting "${e.type}" is not supported`,{ast:e,code:r?.$code})}return Xc.set(e,t),t}var to=Zi;function z1(e,r){let t=i=>{let s=i==="default"?"ExportDefaultDeclaration":"ExportNamedDeclaration";for(let o of e.body)if(o.type===s){if(i==="default")return o.declaration;if(o.declaration&&"declarations"in o.declaration){let a=o.declaration.declarations[0];if("name"in a.id&&a.id.name===i)return a.init}}},n=(i,s)=>{let o=i==="default"?"ExportDefaultDeclaration":"ExportNamedDeclaration",a=Rt(s);for(let l of e.body)if(l.type===o){if(i==="default"){l.declaration=a;return}if(l.declaration&&"declarations"in l.declaration){let u=l.declaration.declarations[0];if("name"in u.id&&u.id.name===i){u.init=a;return}}}e.body.push(i==="default"?to.exportDefaultDeclaration(a):to.exportNamedDeclaration(to.variableDeclaration("const",[to.variableDeclarator(to.identifier(i),a)])))};return or(e,{$type:"exports"},{get(i,s){let o=t(s);if(o)return Ot(o,r)},set(i,s,o){return n(s,o),!0},ownKeys(){return e.body.flatMap(i=>i.type==="ExportDefaultDeclaration"?["default"]:i.type==="ExportNamedDeclaration"&&i.declaration&&"declarations"in i.declaration?i.declaration.declarations.map(s=>"name"in s.id?s.id.name:""):[]).filter(Boolean)},deleteProperty(i,s){let o=s==="default"?"ExportDefaultDeclaration":"ExportNamedDeclaration";for(let a=0;a<e.body.length;a++){let l=e.body[a];if(l.type===o){if(s==="default")return e.body.splice(a,1),!0;if(l.declaration&&"declarations"in l.declaration){let u=l.declaration.declarations[0];if("name"in u.id&&u.id.name===s)return e.body.splice(a,1),!0}}}return!1}})}function q1(e,r){let t=e.program;if(t.type!=="Program")throw new wt(`Cannot proxify ${e.type} as module`);let n={$code:r,$type:"module"},i=or(t,n,{ownKeys(){return["imports","exports","generate"]}});return n.exports=z1(t,i),n.imports=L1(t),n.generate=s=>dp(i,s),i}function Gb(e,r={}){let t={wrapColumn:r.wrapColumn===void 0,indent:r.tabWidth===void 0||r.useTabs===void 0,quote:r.quote===void 0,arrowParens:r.arrowParensAlways===void 0,trailingComma:r.trailingComma===void 0},n=2,i=0,s=0,o=0,a=0,l=/(?<doubleQuote>"[^"]+")|(?<singleQuote>'[^']+')|(?<singleParam>\([^),]+\)\s*=>)|(?<trailingComma>,\s*[\]}])/g,u={doubleQuote:0,singleQuote:0,singleParam:0,trailingComma:0},c=(e||"").split(`
|
|
1087
|
-
`),p=!1;for(let d of c){let f=d.trim();if(f.length!==0){if(t.wrapColumn&&d.length>o&&(o=d.length),t.indent){let m=d.match(/^\s+/)?.[0]||"";m.length>0&&(m.length>0&&m.length<n&&(n=m.length),m[0]===" "?i++:m.length>0&&i--)}if(f.at(-1)===";"?s++:f.length>0&&s--,t.quote||t.arrowParens){let m=f.matchAll(l);for(let h of m)if(h.groups)for(let g in u)h.groups[g]&&u[g]++}t.trailingComma&&((d.startsWith("}")||d.startsWith("]"))&&(p?a++:a--),p=f.endsWith(","))}}return{wrapColumn:o,useTabs:i>0,tabWidth:n,quote:u.singleQuote>u.doubleQuote?"single":"double",arrowParensAlways:u.singleParam>0,trailingComma:a>0||u.trailingComma>0,useSemi:s>0,arrayBracketSpacing:void 0,objectCurlySpacing:void 0,...r}}function Hb(e,r){let t=_b(e,{parser:r?.parser||Vb(),...r});return q1(t,e)}function Jb(e,r){let t=_b("("+e+")",{parser:r?.parser||Vb(),...r}),n=t.program.body[0];n.type==="ExpressionStatement"&&(n=n.expression),n.extra?.parenthesized&&(n.extra.parenthesized=!1);let i={$ast:t,$code:" "+e+" ",$type:"module"};return Ot(n,i)}function dp(e,r={}){let t=e.$ast||e,n=r.format===!1||!("$code"in e)?{}:Gb(e.$code,r.format),{code:i,map:s}=v1(t,{...r,...n});return{code:i,map:s}}async function W1(e,r={}){let t=await ja.promises.readFile(e,"utf8");return r.sourceFileName=r.sourceFileName??e,Hb(t,r)}async function G1(e,r,t){let n="$ast"in e?e.$ast:e,{code:i,map:s}=dp(n,t);await ja.promises.writeFile(r,i),s&&await ja.promises.writeFile(r+".map",s)}var Ma=Zi,H1={functionCall(e,...r){let t=Ma.callExpression(Ma.identifier(e),r.map(n=>Rt(n)));return qb(t)},newExpression(e,...r){let t=Ma.newExpression(Ma.identifier(e),r.map(n=>Rt(n)));return Wb(t)},literal(e){return Rt(e)},raw(e){return Jb(e)}};var J1=V(require("@sentry/node"),1);async function Zb(e,r){let t=await(0,ht.readdir)(e,{withFileTypes:!0}),n=[];for(let i of t){let s=ve.default.join(e,i.name);if(i.isDirectory()){if(!r.has(i.name)){let o=await Zb(s,r);n.push(...o)}}else n.push(s)}return n}async function eD(e){let r=new Set,t=(...u)=>{if(process.env.DEBUG){let c=new Date,p=`${String(c.getMinutes()).padStart(2,"0")}:${String(c.getSeconds()).padStart(2,"0")}.${String(c.getMilliseconds()).padStart(3,"0")}`;console.debug(p,"[builder-dev-tools]",...u)}},n=async u=>{let c=(0,Yb.createHash)("md5");return c.update(u),c.digest("hex")},i=ve.default.normalize(e.cwd),s=yp(ve.default.normalize(e.cwd))??i,o=co(ve.default.normalize(e.cwd))??s,a={...ve.default,getCwdDir:()=>i,getRepoRootDir:()=>s,getAppRootDir:()=>o,cwd:()=>process.cwd(),exists:async u=>{try{return await(0,ht.access)(u),!0}catch{return!1}},magicast:fp,existsSync:u=>(0,Ye.existsSync)(u),readdir:async(u,c)=>{let p=await(0,ht.readdir)(u);return c?p.map(d=>ve.default.join(u,d)):p},readdirRecursive:async(u,c)=>Zb(u,new Set(c)),readdirSync:u=>(0,Ye.readdirSync)(u),readFile:async u=>{try{return await(0,ht.readFile)(u,"utf-8")}catch(c){if(c.code==="ENOENT")return null;throw t(c,u),c}},readFileSync(u){try{return(0,Ye.readFileSync)(u,"utf-8")}catch(c){if(c.code==="ENOENT")return null;throw t(c,u),c}},spawnSync:es.spawnSync,stat:async u=>await(0,ht.stat)(u),statSync:u=>(0,Ye.statSync)(u),unlinkSync:u=>{(0,Ye.unlinkSync)(u)},unlink:async u=>{await(0,ht.unlink)(u)},writeFile:async(u,c)=>{u=ve.default.normalize(u);let p={path:u,basename:ve.default.basename(u),dirname:ve.default.dirname(u),extname:ve.default.extname(u)};await(0,ht.mkdir)(ve.default.dirname(u),{recursive:!0}),await(0,ht.writeFile)(u,c);for(let d of r)await d(p)},hash:n,getDeviceId:()=>n(`${(0,uo.hostname)()}:${(0,uo.homedir)()}`),formatCode:async(u,c)=>{let p=null;try{p=await mp.default.resolveConfig(u)}catch{}try{return mp.default.format(c,{...p,filepath:u})}catch{}return c},on:(u,c)=>{u==="change"&&r.add(c)},off:(u,c)=>{u==="change"&&r.delete(c)},debug:t,launchEditor:async u=>{try{let c=u.filePath;typeof u.line=="number"&&(c+=`:${u.line}`,typeof u.column=="number"&&(c+=`:${u.column}`)),(0,Qb.default)(c,"code",(p,d)=>{console.error(`Failed to launch editor for ${p}`),d&&console.error(d)})}catch(c){console.error(`Failed to launch editor for ${String(c.message||c)}`)}},platform:()=>({runtime:"node",os:process.platform}),getRepoInfo:async()=>{let u=ve.default.normalize(e.cwd);return{remoteUrl:Y1(u),defaultBranch:X1(u),commit:Q1(u),currentBranch:Z1(u)}},getFrameworks:()=>[],ts:Xb.default,Sentry:J1,version:"1.6.
|
|
1087
|
+
`),p=!1;for(let d of c){let f=d.trim();if(f.length!==0){if(t.wrapColumn&&d.length>o&&(o=d.length),t.indent){let m=d.match(/^\s+/)?.[0]||"";m.length>0&&(m.length>0&&m.length<n&&(n=m.length),m[0]===" "?i++:m.length>0&&i--)}if(f.at(-1)===";"?s++:f.length>0&&s--,t.quote||t.arrowParens){let m=f.matchAll(l);for(let h of m)if(h.groups)for(let g in u)h.groups[g]&&u[g]++}t.trailingComma&&((d.startsWith("}")||d.startsWith("]"))&&(p?a++:a--),p=f.endsWith(","))}}return{wrapColumn:o,useTabs:i>0,tabWidth:n,quote:u.singleQuote>u.doubleQuote?"single":"double",arrowParensAlways:u.singleParam>0,trailingComma:a>0||u.trailingComma>0,useSemi:s>0,arrayBracketSpacing:void 0,objectCurlySpacing:void 0,...r}}function Hb(e,r){let t=_b(e,{parser:r?.parser||Vb(),...r});return q1(t,e)}function Jb(e,r){let t=_b("("+e+")",{parser:r?.parser||Vb(),...r}),n=t.program.body[0];n.type==="ExpressionStatement"&&(n=n.expression),n.extra?.parenthesized&&(n.extra.parenthesized=!1);let i={$ast:t,$code:" "+e+" ",$type:"module"};return Ot(n,i)}function dp(e,r={}){let t=e.$ast||e,n=r.format===!1||!("$code"in e)?{}:Gb(e.$code,r.format),{code:i,map:s}=v1(t,{...r,...n});return{code:i,map:s}}async function W1(e,r={}){let t=await ja.promises.readFile(e,"utf8");return r.sourceFileName=r.sourceFileName??e,Hb(t,r)}async function G1(e,r,t){let n="$ast"in e?e.$ast:e,{code:i,map:s}=dp(n,t);await ja.promises.writeFile(r,i),s&&await ja.promises.writeFile(r+".map",s)}var Ma=Zi,H1={functionCall(e,...r){let t=Ma.callExpression(Ma.identifier(e),r.map(n=>Rt(n)));return qb(t)},newExpression(e,...r){let t=Ma.newExpression(Ma.identifier(e),r.map(n=>Rt(n)));return Wb(t)},literal(e){return Rt(e)},raw(e){return Jb(e)}};var J1=V(require("@sentry/node"),1);async function Zb(e,r){let t=await(0,ht.readdir)(e,{withFileTypes:!0}),n=[];for(let i of t){let s=ve.default.join(e,i.name);if(i.isDirectory()){if(!r.has(i.name)){let o=await Zb(s,r);n.push(...o)}}else n.push(s)}return n}async function eD(e){let r=new Set,t=(...u)=>{if(process.env.DEBUG){let c=new Date,p=`${String(c.getMinutes()).padStart(2,"0")}:${String(c.getSeconds()).padStart(2,"0")}.${String(c.getMilliseconds()).padStart(3,"0")}`;console.debug(p,"[builder-dev-tools]",...u)}},n=async u=>{let c=(0,Yb.createHash)("md5");return c.update(u),c.digest("hex")},i=ve.default.normalize(e.cwd),s=yp(ve.default.normalize(e.cwd))??i,o=co(ve.default.normalize(e.cwd))??s,a={...ve.default,getCwdDir:()=>i,getRepoRootDir:()=>s,getAppRootDir:()=>o,cwd:()=>process.cwd(),exists:async u=>{try{return await(0,ht.access)(u),!0}catch{return!1}},magicast:fp,existsSync:u=>(0,Ye.existsSync)(u),readdir:async(u,c)=>{let p=await(0,ht.readdir)(u);return c?p.map(d=>ve.default.join(u,d)):p},readdirRecursive:async(u,c)=>Zb(u,new Set(c)),readdirSync:u=>(0,Ye.readdirSync)(u),readFile:async u=>{try{return await(0,ht.readFile)(u,"utf-8")}catch(c){if(c.code==="ENOENT")return null;throw t(c,u),c}},readFileSync(u){try{return(0,Ye.readFileSync)(u,"utf-8")}catch(c){if(c.code==="ENOENT")return null;throw t(c,u),c}},spawnSync:es.spawnSync,stat:async u=>await(0,ht.stat)(u),statSync:u=>(0,Ye.statSync)(u),unlinkSync:u=>{(0,Ye.unlinkSync)(u)},unlink:async u=>{await(0,ht.unlink)(u)},writeFile:async(u,c)=>{u=ve.default.normalize(u);let p={path:u,basename:ve.default.basename(u),dirname:ve.default.dirname(u),extname:ve.default.extname(u)};await(0,ht.mkdir)(ve.default.dirname(u),{recursive:!0}),await(0,ht.writeFile)(u,c);for(let d of r)await d(p)},hash:n,getDeviceId:()=>n(`${(0,uo.hostname)()}:${(0,uo.homedir)()}`),formatCode:async(u,c)=>{let p=null;try{p=await mp.default.resolveConfig(u)}catch{}try{return mp.default.format(c,{...p,filepath:u})}catch{}return c},on:(u,c)=>{u==="change"&&r.add(c)},off:(u,c)=>{u==="change"&&r.delete(c)},debug:t,launchEditor:async u=>{try{let c=u.filePath;typeof u.line=="number"&&(c+=`:${u.line}`,typeof u.column=="number"&&(c+=`:${u.column}`)),(0,Qb.default)(c,"code",(p,d)=>{console.error(`Failed to launch editor for ${p}`),d&&console.error(d)})}catch(c){console.error(`Failed to launch editor for ${String(c.message||c)}`)}},platform:()=>({runtime:"node",os:process.platform}),getRepoInfo:async()=>{let u=ve.default.normalize(e.cwd);return{remoteUrl:Y1(u),defaultBranch:X1(u),commit:Q1(u),currentBranch:Z1(u)}},getFrameworks:()=>[],ts:Xb.default,Sentry:J1,version:"1.6.2",sdkVersion:null,ignoreMissingConfig:e.ignoreMissingConfig,kind:null},l=await jn(a);return a.getFrameworks=()=>l,a}function tD(){let e=(0,uo.homedir)();return ve.default.join(e,".config","builder","dev-tools.json")}function hp(e,r){return typeof e=="object"&&e!=null&&r in e}async function ts(){let e=tD();try{let r=await(0,ht.readFile)(e,"utf-8");if(typeof r=="string")return JSON.parse(r)}catch(r){if(r.code==="ENOENT")return null}return null}async function gp(e){let r=tD();e=typeof e=="object"&&e!=null?e:{},await(0,ht.mkdir)(ve.default.dirname(r),{recursive:!0}),await(0,ht.writeFile)(r,JSON.stringify(e??{},null,2))}function Y1(e){try{return((0,es.spawnSync)("git",["config","--get","remote.origin.url"],{cwd:e}).stdout||"").toString().trim()}catch(r){return console.error("Error getting git remote URL:",r),""}}function X1(e){let r="master";try{let t=(0,es.spawnSync)("git",["branch","-r"],{cwd:e});return t.stdout&&t.stdout.toString().trim().split(`
|
|
1088
1088
|
`).map(i=>i.trim()).includes("origin/main")?"main":r}catch(t){return console.error("Error getting git default branch name:",t.toString().split(`
|
|
1089
|
-
`)[0]),r}}function Q1(e){try{return((0,es.spawnSync)("git",["rev-parse","HEAD"],{cwd:e}).stdout||"").toString().trim()}catch(r){return console.error("Error getting git commit:",r),""}}function Z1(e){try{return((0,es.spawnSync)("git",["branch","--show-current"],{cwd:e}).stdout||"").toString().trim()}catch(r){return console.error("Error getting current branch name:",r),""}}function yp(e){let r=ve.default.resolve("/");for(let t=0;t<20;t++){let n=ve.default.join(e,"package.json");if((0,Ye.existsSync)(n))return e;if(e===r)break;e=ve.default.dirname(e)}return null}function co(e){let r=ve.default.resolve("/");for(let t=0;t<20;t++){if((0,Ye.existsSync)(ve.default.join(e,"package.json"))||(0,Ye.existsSync)(ve.default.join(e,"remix.config.js"))||(0,Ye.existsSync)(ve.default.join(e,"remix.config.mjs"))||(0,Ye.existsSync)(ve.default.join(e,"remix.config.ts"))||(0,Ye.existsSync)(ve.default.join(e,"vite.config.js"))||(0,Ye.existsSync)(ve.default.join(e,"vite.config.ts"))||(0,Ye.existsSync)(ve.default.join(e,"vite.config.mjs"))||(0,Ye.existsSync)(ve.default.join(e,"next.config.js"))||(0,Ye.existsSync)(ve.default.join(e,"next.config.ts"))||(0,Ye.existsSync)(ve.default.join(e,"angular.json"))||(0,Ye.existsSync)(ve.default.join(e,"project.json"))||(0,Ye.existsSync)(ve.default.join(e,"tsconfig.json")))return e;if(e===r)break;e=ve.default.dirname(e)}return null}var rD=V(require("crypto")),el=new Uint8Array(256),Za=el.length;function bp(){return Za>el.length-16&&(rD.default.randomFillSync(el),Za=0),el.slice(Za,Za+=16)}var xt=[];for(let e=0;e<256;++e)xt.push((e+256).toString(16).slice(1));function nD(e,r=0){return xt[e[r+0]]+xt[e[r+1]]+xt[e[r+2]]+xt[e[r+3]]+"-"+xt[e[r+4]]+xt[e[r+5]]+"-"+xt[e[r+6]]+xt[e[r+7]]+"-"+xt[e[r+8]]+xt[e[r+9]]+"-"+xt[e[r+10]]+xt[e[r+11]]+xt[e[r+12]]+xt[e[r+13]]+xt[e[r+14]]+xt[e[r+15]]}var iD=V(require("crypto")),Dp={randomUUID:iD.default.randomUUID};function eI(e,r,t){if(Dp.randomUUID&&!r&&!e)return Dp.randomUUID();e=e||{};let n=e.random||(e.rng||bp)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,r){t=t||0;for(let i=0;i<16;++i)r[t+i]=n[i];return r}return nD(n)}var xp=eI;var Cp=V(require("os"),1);async function sD(){let e=process.env.NODE_ENV!=="test",r=await lD(),t=await aD();Mr.init(e?"2532be1b0436a18cb938b21fc7fa9faf":"",{logLevel:Mr.Types.LogLevel.None,flushIntervalMillis:500});let n=new Mr.Identify;await Mr.identify(n,{device_id:r,user_id:t,platform:Cp.default.type(),os_name:process.platform,os_version:Cp.default.release()}).promise,$r.init({dsn:"https://3252dddc08dbb5bf406dc33bf3c13633@o117565.ingest.us.sentry.io/4505630794448896",tracesSampleRate:.5,release:Jg,environment:process.env.NODE_ENV,enabled:e,integrations:[$r.nativeNodeFetchIntegration(),$r.httpIntegration(),...$r.getAutoPerformanceIntegrations()],tracePropagationTargets:[Gt]}),$r.setUser({username:process.env.USER||process.env.USERNAME||"unknown"})}async function We(e,r){let t={...r,app:"dev-tools-cli",package:"cli"},n=await aD(),i=await lD();return Mr.track(e,t,{user_id:n,device_id:i})}var tl,Ep;async function oD(e){tl=e;let r=await ts();await gp({...r,userId:e})}async function aD(){if(tl)return tl;let e=await ts(),r;return hp(e,"userId")&&(r=e.userId),tl=r,r}async function lD(){if(Ep)return Ep;let e=await ts(),r=xp();return hp(e,"deviceId")?r=e.deviceId:await gp({...e,deviceId:r}),Ep=r,r}var cD=V(Ze(),1),pD=require("undici");var dD=V(Ze(),1);var uD="0.0.1";var Sp=V(require("node:process"),1),nt=async(e,r)=>{let t="fetch"in globalThis?globalThis.fetch:pD.fetch;try{let n=await t(e,{...r,headers:{...r?.headers,...rI()}});if(!n.ok)if(n.status===429){let i=await n.json(),s=i.severity??"high",o=i.message??"Rate limit exceeded. Please try again later.";return console.log(),s==="high"?n.error((0,cD.red)(`${n.status} ${o}
|
|
1089
|
+
`)[0]),r}}function Q1(e){try{return((0,es.spawnSync)("git",["rev-parse","HEAD"],{cwd:e}).stdout||"").toString().trim()}catch(r){return console.error("Error getting git commit:",r),""}}function Z1(e){try{return((0,es.spawnSync)("git",["branch","--show-current"],{cwd:e}).stdout||"").toString().trim()}catch(r){return console.error("Error getting current branch name:",r),""}}function yp(e){let r=ve.default.resolve("/");for(let t=0;t<20;t++){let n=ve.default.join(e,"package.json");if((0,Ye.existsSync)(n))return e;if(e===r)break;e=ve.default.dirname(e)}return null}function co(e){let r=ve.default.resolve("/");for(let t=0;t<20;t++){if((0,Ye.existsSync)(ve.default.join(e,"package.json"))||(0,Ye.existsSync)(ve.default.join(e,"remix.config.js"))||(0,Ye.existsSync)(ve.default.join(e,"remix.config.mjs"))||(0,Ye.existsSync)(ve.default.join(e,"remix.config.ts"))||(0,Ye.existsSync)(ve.default.join(e,"vite.config.js"))||(0,Ye.existsSync)(ve.default.join(e,"vite.config.ts"))||(0,Ye.existsSync)(ve.default.join(e,"vite.config.mjs"))||(0,Ye.existsSync)(ve.default.join(e,"next.config.js"))||(0,Ye.existsSync)(ve.default.join(e,"next.config.ts"))||(0,Ye.existsSync)(ve.default.join(e,"angular.json"))||(0,Ye.existsSync)(ve.default.join(e,"project.json"))||(0,Ye.existsSync)(ve.default.join(e,"tsconfig.json")))return e;if(e===r)break;e=ve.default.dirname(e)}return null}var rD=V(require("crypto")),el=new Uint8Array(256),Za=el.length;function bp(){return Za>el.length-16&&(rD.default.randomFillSync(el),Za=0),el.slice(Za,Za+=16)}var xt=[];for(let e=0;e<256;++e)xt.push((e+256).toString(16).slice(1));function nD(e,r=0){return xt[e[r+0]]+xt[e[r+1]]+xt[e[r+2]]+xt[e[r+3]]+"-"+xt[e[r+4]]+xt[e[r+5]]+"-"+xt[e[r+6]]+xt[e[r+7]]+"-"+xt[e[r+8]]+xt[e[r+9]]+"-"+xt[e[r+10]]+xt[e[r+11]]+xt[e[r+12]]+xt[e[r+13]]+xt[e[r+14]]+xt[e[r+15]]}var iD=V(require("crypto")),Dp={randomUUID:iD.default.randomUUID};function eI(e,r,t){if(Dp.randomUUID&&!r&&!e)return Dp.randomUUID();e=e||{};let n=e.random||(e.rng||bp)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,r){t=t||0;for(let i=0;i<16;++i)r[t+i]=n[i];return r}return nD(n)}var xp=eI;var Cp=V(require("node:os"),1);async function sD(){let e=process.env.NODE_ENV!=="test",r=await lD(),t=await aD();Mr.init(e?"2532be1b0436a18cb938b21fc7fa9faf":"",{logLevel:Mr.Types.LogLevel.None,flushIntervalMillis:500});let n=new Mr.Identify;await Mr.identify(n,{device_id:r,user_id:t,platform:Cp.default.type(),os_name:process.platform,os_version:Cp.default.release()}).promise,$r.init({dsn:"https://3252dddc08dbb5bf406dc33bf3c13633@o117565.ingest.us.sentry.io/4505630794448896",tracesSampleRate:.5,release:Jg,environment:process.env.NODE_ENV,enabled:e,integrations:[$r.nativeNodeFetchIntegration(),$r.httpIntegration(),...$r.getAutoPerformanceIntegrations()],tracePropagationTargets:[Gt]}),$r.setUser({username:process.env.USER||process.env.USERNAME||"unknown"})}async function We(e,r){let t={...r,app:"dev-tools-cli",package:"cli"},n=await aD(),i=await lD();return Mr.track(e,t,{user_id:n,device_id:i})}var tl,Ep;async function oD(e){tl=e;let r=await ts();await gp({...r,userId:e})}async function aD(){if(tl)return tl;let e=await ts(),r;return hp(e,"userId")&&(r=e.userId),tl=r,r}async function lD(){if(Ep)return Ep;let e=await ts(),r=xp();return hp(e,"deviceId")?r=e.deviceId:await gp({...e,deviceId:r}),Ep=r,r}var cD=V(Ze(),1),pD=require("undici");var dD=V(Ze(),1);var uD="0.0.1";var Sp=V(require("node:process"),1),nt=async(e,r)=>{let t="fetch"in globalThis?globalThis.fetch:pD.fetch;try{let n=await t(e,{...r,headers:{...r?.headers,...rI()}});if(!n.ok)if(n.status===429){let i=await n.json(),s=i.severity??"high",o=i.message??"Rate limit exceeded. Please try again later.";return console.log(),s==="high"?n.error((0,cD.red)(`${n.status} ${o}
|
|
1090
1090
|
|
|
1091
1091
|
`)):n.warn((0,dD.yellow)(`${n.status} ${o}
|
|
1092
1092
|
|
|
1093
1093
|
`)),await ee(1)}else throw new Error(`Failed to generate completion:
|
|
1094
|
-
`+await n.text());return n}catch(n){let i=typeof e=="string"?e:e instanceof URL?e.toString():e.url,s=r?.method||"GET",o=n instanceof Error?n.message:String(n),a=new Error(`Fetch failed for ${s} ${i}: ${o}`);throw n instanceof Error&&(a.cause=n),a.requestContext={url:i,method:s,headers:r?.headers},a}};function rI(){let r={darwin:"Macintosh",win32:"Windows NT",linux:"Linux",android:"Android",ios:"iPhone"}[Sp.default.platform]||"Unknown",t=Sp.default.platform==="win32"?"10.0":"";return{"User-Agent":`Mozilla/5.0 (${r}${t?"; "+t:""}) builder-cli/${uD}`,"Sec-Ch-Ua-Platform":r}}var gt=process.env.OVERRIDE_VERSION??"1.6.
|
|
1094
|
+
`+await n.text());return n}catch(n){let i=typeof e=="string"?e:e instanceof URL?e.toString():e.url,s=r?.method||"GET",o=n instanceof Error?n.message:String(n),a=new Error(`Fetch failed for ${s} ${i}: ${o}`);throw n instanceof Error&&(a.cause=n),a.requestContext={url:i,method:s,headers:r?.headers},a}};function rI(){let r={darwin:"Macintosh",win32:"Windows NT",linux:"Linux",android:"Android",ios:"iPhone"}[Sp.default.platform]||"Unknown",t=Sp.default.platform==="win32"?"10.0":"";return{"User-Agent":`Mozilla/5.0 (${r}${t?"; "+t:""}) builder-cli/${uD}`,"Sec-Ch-Ua-Platform":r}}var gt=process.env.OVERRIDE_VERSION??"1.6.2";var rl=V(require("@sentry/node"),1);var nI="https://cdn.builder.io";async function Tp(e){try{let r=await nt(`${nI}/api/internal/kv/${e.spaceId}/${e.docId}?apiKey=${e.spaceId}`,{headers:{Authorization:`Bearer ${e.privateKey}`}});if(r.status===404)return rl.captureMessage("getBuilderSpaceKv 404"),console.warn("GET 404",r.url),null;if(!r.ok)throw new Error(`HTTP ${r.status} ${r.statusText}`);return r.json()}catch(r){rl.captureException(r),console.error("GET failed",r);return}}var hD=V(require("@sentry/node"),1);var gD=/[^\x00-\x7F]/g,Ap=e=>{try{let r=new URL(e);if(!e.startsWith("https://www.figma.com/design/"))return null;let t=r.searchParams.get("node-id")?.replaceAll("-",":"),n=r.pathname.split("/")[2];return t&&n?{fileID:n,nodeId:t}:null}catch{return null}},iI="https://api.figma.com/v1/",yD=async(e,{auth:r,params:t})=>{let n=new URL(`${iI}${e}`),i={};if(r.oauth?i.Authorization=`Bearer ${r.access_token}`:i["X-FIGMA-TOKEN"]=r.access_token,t)for(let o in t)t[o]!=null&&n.searchParams.set(o,t[o].toString());let s=await nt(n,{headers:i});if(!s.ok)throw new Error(`Figma REST ${s.statusText}: ${await s.text()}`);return s.json()},bD=async(e,r,t,n)=>(await yD(`files/${r}/nodes`,{auth:e,params:{ids:t,depth:n}})).nodes;function ai(e){return e=e.replace(gD,""),e=e.replace(/[\W\d]/g," "),e=e.trim(),e=sI(e),e=e.charAt(0).toUpperCase()+e.slice(1),e}function sI(e){return e.replace(/(?:^\w|[A-Z]|\b\w)/g,function(r,t){return t===0?r.toLowerCase():r.toUpperCase()}).replace(/\s+/g,"")}var oI=/^[a-f0-9]{40}$/;async function DD(e,r,t){let n=JSON.stringify({token:r}),i=new URL(`${Gt}/mappings/figma-components/get`);e.builderPublicKey&&i.searchParams.set("apiKey",e.builderPublicKey),e.userId&&i.searchParams.set("userId",e.userId),t&&console.log("FETCH",i,n);let s={"Content-Type":"application/json"};e.builderPrivateKey&&(s.Authorization=`Bearer ${e.builderPrivateKey}`);let o=await nt(i,{method:"POST",body:n,headers:{"Content-Type":"application/json",Authorization:`Bearer ${e.builderPrivateKey}`}});if(!o.ok)throw new Error(`Failed to generate completion:
|
|
1095
1095
|
`+await o.text());let a=await o.json();if(!Array.isArray(a.figmaComponents))throw new Error("Invalid response from Figma API");return a.figmaComponents.map(l=>["",l])}function xD(e){return e.some(r=>!!Ap(r))}async function ED(e,r,t){return(await Promise.all(t.map(async i=>{let s,o;if(i.match(oI))try{let c=await Tp({...r,docId:i});if(c)return[[i,c]];if(e){let p;try{p=await yD(`components/${i}`,{auth:e}),s=p.meta.file_key,o=p.meta.node_id}catch{K.warning("Failed to fetch component from Figma API.")}}}catch(c){throw hD.captureException(c),c}if(!s||!o){let c=Ap(i);if(!c)return he(`Invalid Figma URL, use Cmd+L while selecting a figma component to get a link to selection.
|
|
1096
1096
|
Or make sure the command is copied correctly from the Figma plugin and the same builder space is being used.`),await ee(1);c&&({fileID:s,nodeId:o}=c)}if(!e)return[];let a=await bD(e,s,o),l=CD(a[o].document,a[o].components);if(l){let c=(await Promise.all(Array.from(l).map(async([,p])=>await Tp({...r,docId:p.key})))).filter(mD);if(c.length)return c.map(p=>[i,p])}let u=await aI(a[o],o);return u?[[i,u]]:[]}))).flat().filter(mD)}function CD(e,r,t=new Map){debugger;if(e.componentId&&t.set(e.componentId,r[e.componentId]),e.children)for(let n of e.children)CD(n,r,t);return t}async function aI(e,r){let t=e.document;if(t.type!=="COMPONENT"&&t.type!=="COMPONENT_SET"){let i=`Seems like the pasted URL points to a ${t.type} node, not a COMPONENT or COMPONENT_SET.`;return t.type==="INSTANCE"&&(i+=`
|
|
1097
1097
|
Double click and select "Go to main component", then copy the URL to the figma COMPONENT`),he(i),await ee(1)}let n=e.components[r]?.key??e.componentSets[r]?.key;return n?(e.document.key=n,lI(r,t)):(he("Pasted URL does not correspond to a component or component set"),await ee(1))}function lI(e,r){let{inputs:t,nameMap:n}=uI(r);return{name:r.name,jsx:r.type==="COMPONENT_SET"?wp(r.children[0],n,0,0):wp(r,n,0,0),inputs:t,key:r.key,description:r.description,documentationLinks:[],instanceId:e.includes(":")?e:r.id,documentName:"",tree:""}}var wp=(e,r,t,n,i=-1)=>{let s=" ".repeat(Math.max(i+1,0)),o="",a=e.type,l=a==="GROUP"||a==="FRAME"||i<0&&"children"in e,u="",c=i>=0;if(c){let p="";if(e.type==="INSTANCE"){if(e.componentPropertyReferences&&e.componentPropertyReferences.mainComponent)return o+=`${s}{figma["${r(e.componentPropertyReferences.mainComponent)}"]}
|
|
@@ -1102,7 +1102,7 @@ Double click and select "Go to main component", then copy the URL to the figma C
|
|
|
1102
1102
|
`);else if(l&&"children"in e&&e.children.length>0){c&&(o+=`>
|
|
1103
1103
|
`);let p=0;for(let d of e.children)o+=wp(d,r,p,e.children.length,i+1),p++;c&&(o+=`${s}</${u}>
|
|
1104
1104
|
`)}else c&&(o+=`/>
|
|
1105
|
-
`);return o};function uI(e){let r=[],t={};try{t=e.componentPropertyDefinitions??{}}catch(l){console.error("Invalid Component Property Definitions",l)}let n=e.type==="COMPONENT_SET"?e.children:[e],i=new Map,s=[],o=Object.keys(t),a=cI(o);for(let l of n){let u=SD(l,{types:["INSTANCE","TEXT"]});for(let c of u){s.push(c);let p=c.componentPropertyReferences;p&&p.visible&&(p.characters&&i.set(p.characters,a(p.visible)),p.mainComponent&&i.set(p.mainComponent,a(p.visible)))}}for(let l of o){let u=t[l];switch(u.type){case"TEXT":{r.push({id:l,name:a(l),value:u.defaultValue,type:"string",baseType:"text",isDefault:!0,ref:i.get(l)});break}case"BOOLEAN":{r.push({id:l,name:a(l),value:!!u.defaultValue,baseType:"boolean",isDefault:!0,type:"boolean"});break}case"VARIANT":{r.push({id:l,name:a(l),value:u.defaultValue,type:u.variantOptions?.map(c=>`'${c}'`).join(" | ")??"string",baseType:"variant",variantOptions:u.variantOptions??[],isDefault:!0,ref:i.get(l)});break}case"INSTANCE_SWAP":{r.push({id:l,name:a(l),value:String(u.defaultValue),type:"React.ReactNode",baseType:"slot",isDefault:!0,ref:i.get(l)});break}}}return{inputs:r,nameMap:a}}function cI(e){let r=new Map,t=new Map;return e.forEach(n=>{let i=fD(n);t.has(i)?(r.has(n)&&(r.set(t.get(i),t.get(i)),r.delete(i)),r.set(n,n)):(r.set(n,i),t.set(i,n))}),n=>{let i=r.get(n)??fD(n);if(!i)throw new Error("No value for key "+n);return i}}function fD(e){return typeof e=="string"?e.replace(/#\d+:\d+$/,"").replace(gD,"").trim():""}function SD(e,r){let t=r.types,n=[];return t.includes(e.type)&&n.push(e),"children"in e&&n.push(...e.children.flatMap(i=>SD(i,r))),n}async function nl(e,r,t){if(t.length>0){let n=await pI(e,t);for(let i of r)if(i.figmaUrl&&!i.figmaKey){let s=n[i.figmaUrl];if(!s)throw new Error("bad internal state");i.figmaKey=s}}}var pI=async(e,r)=>{if(!e)return{};let t=new Map,n={};return r.forEach(i=>{let s=Ap(i);if(!s)throw new Error("Invalid Figma URL, use Cmd+L while selecting a figma component to get a link to selection");let o=t.get(s.fileID);o||(o=[],t.set(s.fileID,o)),o.includes(s.nodeId)||o.push(s.nodeId),n[i]=`${s.fileID}/${s.nodeId}`}),await Promise.all(Array.from(t.entries()).map(async([i,s])=>{let o=await bD(e,i,s.join(","),0);for(let a of s){let l=o[a],u=l.components[a]?.key??l.componentSets[a]?.key;if(!u)throw new Error(`Cannot resolve figma component key for ${a} in file ${i}`);let c=`${i}/${a}`;for(let p of r)n[p]===c&&(n[p]=u)}})),n};function mD(e){return e!=null}var te=V(Ze(),1);var Bt=require("path"),Kt=require("fs"),Fp=require("glob");var il=require("node:http");var TD=require("node:console"),wD=require("node:http"),AD=require("node:https");function rs(e){let r=Date.now();return new Promise((t,n)=>{let s=dI(e.url)({protocol:e.url.protocol,host:e.url.host,port:e.url.port,path:e.url.pathname+e.url.search,method:e.method,headers:e.headers},o=>{let a="";o.on("data",l=>{a+=l}),o.on("end",()=>{if((0,TD.debug)(`${e.method} ${e.url.href}, duration: ${Date.now()-r}ms`),typeof o.statusCode=="number"&&o.statusCode>=200&&o.statusCode<300)if(typeof o.headers["content-type"]!="string"||!o.headers["content-type"].includes("application/json"))n(`Response from ${e.url.href} content-type is ${o.headers["content-type"]}`);else try{t(JSON.parse(a))}catch(l){n(`Response from ${e.url.href} is not valid JSON: ${a}
|
|
1105
|
+
`);return o};function uI(e){let r=[],t={};try{t=e.componentPropertyDefinitions??{}}catch(l){console.error("Invalid Component Property Definitions",l)}let n=e.type==="COMPONENT_SET"?e.children:[e],i=new Map,s=[],o=Object.keys(t),a=cI(o);for(let l of n){let u=SD(l,{types:["INSTANCE","TEXT"]});for(let c of u){s.push(c);let p=c.componentPropertyReferences;p&&p.visible&&(p.characters&&i.set(p.characters,a(p.visible)),p.mainComponent&&i.set(p.mainComponent,a(p.visible)))}}for(let l of o){let u=t[l];switch(u.type){case"TEXT":{r.push({id:l,name:a(l),value:u.defaultValue,type:"string",baseType:"text",isDefault:!0,ref:i.get(l)});break}case"BOOLEAN":{r.push({id:l,name:a(l),value:!!u.defaultValue,baseType:"boolean",isDefault:!0,type:"boolean"});break}case"VARIANT":{r.push({id:l,name:a(l),value:u.defaultValue,type:u.variantOptions?.map(c=>`'${c}'`).join(" | ")??"string",baseType:"variant",variantOptions:u.variantOptions??[],isDefault:!0,ref:i.get(l)});break}case"INSTANCE_SWAP":{r.push({id:l,name:a(l),value:String(u.defaultValue),type:"React.ReactNode",baseType:"slot",isDefault:!0,ref:i.get(l)});break}}}return{inputs:r,nameMap:a}}function cI(e){let r=new Map,t=new Map;return e.forEach(n=>{let i=fD(n);t.has(i)?(r.has(n)&&(r.set(t.get(i),t.get(i)),r.delete(i)),r.set(n,n)):(r.set(n,i),t.set(i,n))}),n=>{let i=r.get(n)??fD(n);if(!i)throw new Error("No value for key "+n);return i}}function fD(e){return typeof e=="string"?e.replace(/#\d+:\d+$/,"").replace(gD,"").trim():""}function SD(e,r){let t=r.types,n=[];return t.includes(e.type)&&n.push(e),"children"in e&&n.push(...e.children.flatMap(i=>SD(i,r))),n}async function nl(e,r,t){if(t.length>0){let n=await pI(e,t);for(let i of r)if(i.figmaUrl&&!i.figmaKey){let s=n[i.figmaUrl];if(!s)throw new Error("bad internal state");i.figmaKey=s}}}var pI=async(e,r)=>{if(!e)return{};let t=new Map,n={};return r.forEach(i=>{let s=Ap(i);if(!s)throw new Error("Invalid Figma URL, use Cmd+L while selecting a figma component to get a link to selection");let o=t.get(s.fileID);o||(o=[],t.set(s.fileID,o)),o.includes(s.nodeId)||o.push(s.nodeId),n[i]=`${s.fileID}/${s.nodeId}`}),await Promise.all(Array.from(t.entries()).map(async([i,s])=>{let o=await bD(e,i,s.join(","),0);for(let a of s){let l=o[a],u=l.components[a]?.key??l.componentSets[a]?.key;if(!u)throw new Error(`Cannot resolve figma component key for ${a} in file ${i}`);let c=`${i}/${a}`;for(let p of r)n[p]===c&&(n[p]=u)}})),n};function mD(e){return e!=null}var te=V(Ze(),1);var Bt=require("node:path"),Kt=require("node:fs"),Fp=require("glob");var il=require("node:http");var TD=require("node:console"),wD=require("node:http"),AD=require("node:https");function rs(e){let r=Date.now();return new Promise((t,n)=>{let s=dI(e.url)({protocol:e.url.protocol,host:e.url.host,port:e.url.port,path:e.url.pathname+e.url.search,method:e.method,headers:e.headers},o=>{let a="";o.on("data",l=>{a+=l}),o.on("end",()=>{if((0,TD.debug)(`${e.method} ${e.url.href}, duration: ${Date.now()-r}ms`),typeof o.statusCode=="number"&&o.statusCode>=200&&o.statusCode<300)if(typeof o.headers["content-type"]!="string"||!o.headers["content-type"].includes("application/json"))n(`Response from ${e.url.href} content-type is ${o.headers["content-type"]}`);else try{t(JSON.parse(a))}catch(l){n(`Response from ${e.url.href} is not valid JSON: ${a}
|
|
1106
1106
|
${l}`)}else n(`Request to ${e.url.href} failed with status ${o.statusCode}: ${a}`)})}).on("error",o=>{n(`Error fetching ${e.url.href}, ${o}`)});e.body&&(s.setHeader("Content-Type","application/json"),s.write(e.body)),s.end()})}function dI(e){if(e.protocol==="https:")return AD.request;if(e.protocol==="http:")return wD.request;throw new Error(`Unsupported protocol ${e.protocol}`)}async function vD(e){let r=new URL(`https://cdn.builder.io/api/v3/query/${e.publicApiKey}/${e.model}`);return r.searchParams.set("omit","meta.componentsUsed"),r.searchParams.set("apiKey",e.publicApiKey),r.searchParams.set("userAttributes.urlPath",e.pageUrl),r.searchParams.set("options.page.model",`"${e.model}"`),r.searchParams.set("cachebust","true"),(await rs({url:r,method:"GET"}))[e.model]}async function PD(e,r){if(r.kind===Ds.VCP)return!0;let t=new URL("https://cdn.builder.io/api/v2/admin"),n={query:`query {
|
|
1107
1107
|
models {
|
|
1108
1108
|
id
|
|
@@ -1127,7 +1127,7 @@ Visit https://www.docs.developers.amplitude.com/data/sdks/browser-2/#tracking-de
|
|
|
1127
1127
|
<h3>How's Devtools working for you?</h3>
|
|
1128
1128
|
<p>We'd love your feedback!</p>
|
|
1129
1129
|
</div>
|
|
1130
|
-
\`,t.appendChild(e),setTimeout(()=>{e.classList.add("menu-toggle-tooltip-show"),e.addEventListener("click",()=>{e.classList.remove("menu-toggle-tooltip-show")})},1e3)};function Br(t){t.getElementById("go-to-builder").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),ue(t,!1),window.open(mn(),"builder")}),t.getElementById("components-link").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation();let u=t.querySelector(".nav-cmp-list .section-content");u.scrollTop=0,W(t,"nav-cmp-list"),Mr(t)}),t.getElementById("settings-link").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),W(t,"nav-settings")}),t.getElementById("add-page-link").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),ue(t,!1),window.open(Ee(),"builder")}),t.getElementById("import-from-figma").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),ue(t,!1),window.open("https://www.figma.com/community/plugin/747985167520967365/builder-io-ai-powered-figma-to-code-react-vue-tailwind-more")})}function Fr(t){let e=t.getElementById("enable-edit");e.addEventListener("change",n=>{n.stopPropagation(),bt(e.checked)}),e.checked=ke(),bt(e.checked)}var lt=class extends HTMLElement{constructor(){super()}connectedCallback(){let e=this.attachShadow({mode:"open"});e.innerHTML=\`<style>*,*:before,*:after{box-sizing:border-box}:host{--background-color: rgba(40, 40, 40, 1);--primary-color: rgba(72, 161, 255, 1);--primary-color-subdued: rgb(72, 161, 255, .6);--primary-color-highlight: rgb(126, 188, 255);--primary-contrast-color: white;--edit-color: #1d74e2;--edit-color-highlight: #1c6bd1;--edit-color-alpha: rgb(72, 161, 255, .15);--error-color: #ff2b55;--text-color: white;--text-color-highlight: white;--border-color: #454545;--button-background-color-hover: rgba(255, 255, 255, .1);--menu-width: 320px;--transition-time: .15s;--font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";font-family:var(--font-family);line-height:1.6}button{cursor:pointer;color:var(--text-color);-webkit-tap-highlight-color:transparent}input,select,button{font-family:var(--font-family)}.menu-toggle{position:absolute;right:0;bottom:0;pointer-events:auto;padding:8px;background:transparent;border:none;appearance:none}.menu-toggle div{position:relative;width:64px;height:64px;pointer-events:none;border-radius:50%;background:#000;border:1px solid white;box-shadow:#00000054 0 0 8px}.menu-toggle:hover div{background-color:var(--background-color);border:1px solid rgb(220,220,220)}.menu-toggle svg{position:absolute;top:15px;left:15px;width:33px;height:32px}div.highlight-bg{position:absolute;top:-1px;left:-1px;background-color:#1a1a1a;pointer-events:none;transition:all .4s ease-out;opacity:0}.menu-toggle-highlight-no-transition div.highlight-bg{transition:none}.menu-toggle-highlight div.highlight-bg{opacity:1}.menu-toggle-tooltip{position:absolute;bottom:0;right:0;width:382px;height:72px;padding:0;text-align:left;appearance:none;background-color:transparent;border:none;pointer-events:none;transform:translate3d(320px,0,0);opacity:0;transition:all .15s ease-in-out;color:#fff}.menu-toggle-tooltip.menu-toggle-tooltip-show{pointer-events:auto;opacity:1;transform:translateZ(0)}.menu-toggle-tooltip-content{position:absolute;inset:0 95px 10px 0;padding:8px 12px;background-color:var(--primary-color);box-shadow:#00000054 0 0 20px;border-radius:2px}.menu-toggle-tooltip-content:before{content:"";position:absolute;bottom:15px;right:-6px;width:30px;height:30px;background-color:var(--primary-color);transform:rotate(45deg)}.menu-toggle-tooltip:hover .menu-toggle-tooltip-content,.menu-toggle-tooltip:hover .menu-toggle-tooltip-content:before{background-color:var(--primary-color-highlight)}.menu-toggle-tooltip-content h3{margin:0;font-size:16px}.menu-toggle-tooltip-content p{margin:0;font-size:12px}section{position:absolute;display:grid;grid-template-rows:64px auto 64px;top:0;left:0;width:100%;height:100%;padding:0;pointer-events:none}.section-content{margin:0;padding:0 0 10px;font-weight:300;transform:translate3d(105%,0,0);transition:transform var(--transition-time) ease-in-out;overflow-y:auto}.section-content .error{color:var(--error-color);font-weight:700}section a{text-decoration:none;color:var(--text-color)}section h3,section p{margin-left:16px;margin-right:16px}.info{font-size:12px}ul.list{list-style:none;padding:0;margin:0}ul.list li{display:block;padding:0;margin:0}ul.list a,ul.list button{display:grid;grid-template-columns:24px auto;grid-gap:16px;padding:12px;margin:8px 0;border:none;background:transparent;appearance:none;width:100%;font-weight:300;text-align:left;text-decoration:none;color:var(--text-color)}ul.list a:hover,ul.list button:hover{text-decoration:none;color:var(--text-color);background-color:var(--button-background-color-hover)}ul.list a span,ul.list button span{display:block;font-size:16px;font-weight:500;line-height:1.5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}header{position:relative;display:grid;grid-template-columns:44px 1fr;gap:8px;padding-left:8px;border-bottom:1px solid var(--border-color);transition:opacity var(--transition-time) ease-in-out;opacity:0;pointer-events:none}header>div{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.nav-home header>div{margin-right:56px}header h2{margin:7px 0 0;font-size:18px;font-weight:500;line-height:1.5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}header p{margin:2px 0 0;font-size:12px;font-weight:300;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}header p button{display:block;margin:0;padding:0;width:100%;font-size:12px;font-weight:300;text-decoration:none;appearance:none;text-align:left;background-color:transparent;border:none;color:var(--primary-color);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}header p button:hover{text-decoration:underline;color:var(--primary-color)}.builder-logo{margin:12px 0 0 8px}#close{display:block;position:absolute;appearance:none;background:transparent;border:none;border-radius:50%;margin:0;padding:0;right:4px;top:8px;width:48px;height:48px;z-index:1;opacity:.7}#close:hover{opacity:1;background-color:var(--button-background-color-hover)}#close svg{position:absolute;top:12px;left:12px;width:24px;height:24px;fill:currentColor;pointer-events:none}.back-button{position:relative;display:block;margin:7px 0 0 -2px;width:48px;height:48px;background:transparent;border:none;appearance:none;border-radius:50%}.back-button:hover{background-color:var(--button-background-color-hover)}.back-button svg{position:absolute;top:12px;left:12px;width:24px;height:24px;fill:currentColor;pointer-events:none}footer{border-top:1px solid var(--border-color);transition:opacity var(--transition-time) ease-in-out;opacity:0;pointer-events:none}section.nav-cmp-list{grid-template-rows:64px auto 120px}footer a{text-decoration:underline;color:var(--primary-color)}footer a:hover{color:var(--primary-color);text-decoration:none}.nav-list{padding:2px 0}.nav-loading{pointer-events:none}.nav-loading-icon{position:absolute;display:inline-block;top:170px;left:0;width:100%;transform:translateZ(0);pointer-events:auto;opacity:0;transition:all 50ms ease-in-out;transition-delay:50ms;pointer-events:none}.nav-loading .nav-loading-icon{opacity:.5}.nav-list h4{margin:8px 8px 8px 10px;font-size:14px;font-weight:600}.nav-list .nav-list-item+h4{margin-top:30px}.nav-list-item{display:grid;grid-template-columns:1fr 1fr;gap:8px;position:relative;margin:2px 0;padding:8px 28px 8px 46px;width:100%;font-size:14px;font-weight:300;text-align:left;border:none;background:transparent;appearance:none}.nav-list-item:hover{background-color:var(--button-background-color-hover)}.nav-list-item-icon{position:absolute;top:4px;left:10px;width:24px;height:24px;object-fit:contain;filter:invert(100%);background-size:24px 24px;background-repeat:no-repeat;background-position:center center}.nav-list-item span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none}.nav-list-item:after{display:block;position:absolute;content:"";background-image:url('data:image/svg+xml,<svg width="8" height="14" viewBox="0 0 8 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 1L7 7L1 13" stroke="%23F2F2F2" stroke-opacity="0.5" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/></svg>');background-repeat:no-repeat;background-position:12px 9px;top:0;right:0;width:32px;height:32px;pointer-events:none}.nav-list-item-note{opacity:0;font-size:12px;padding-top:1px;text-align:right}.nav-list-item:hover .nav-list-item-note{opacity:.5}.ui-select{display:block;margin:8px 0 16px;padding:8px 16px;cursor:pointer}.ui-select h3{margin:0;font-size:14px;font-weight:500}.ui-select p{margin:8px 0;font-size:12px;font-weight:300}.ui-select .select{position:relative;margin:8px 0;border-radius:4px;padding:0;line-height:1.1;overflow:hidden;border:1px solid var(--border-color)}.ui-select select{appearance:none;background-color:transparent;border:none;outline:none;padding:8px 32px 8px 8px;margin:0;width:100%;font-size:14px;cursor:pointer;text-overflow:ellipsis;opacity:.6;color:var(--text-color)}.ui-select .select:after{content:"";top:6px;right:5px;width:24px;height:24px;position:absolute;background-image:url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="%23F2F2F2" d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"/></svg>');background-repeat:no-repeat;background-position:center;pointer-events:none;opacity:.6}.ui-select .select:hover{border-color:var(--primary-color-subdued)}.ui-text-input .select:focus-within{border-color:var(--primary-color)}.ui-text-input .select:focus-within select{opacity:1}.spinner:after{content:" ";display:block;width:32px;height:32px;margin:0 auto;pointer-events:auto;border-radius:50%;border:3px solid var(--text-color);border-color:var(--text-color) transparent var(--text-color) transparent;animation:spinner .75s linear infinite}@keyframes spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.ui-switch{display:grid;grid-template-columns:auto 48px;grid-gap:20px;margin:8px 0 16px;padding:8px 0 8px 16px;cursor:pointer}.ui-switch>*{pointer-events:none}.ui-switch input{display:none;visibility:hidden}.ui-switch .switcher{display:inline-block;border-radius:100px;width:35px;height:14px;background-color:#ccc;position:relative;top:6px;vertical-align:middle;cursor:pointer}.ui-switch input[type=checkbox]:checked+.switcher{background-color:var(--primary-color-subdued)}.ui-switch .switcher:before{content:"";display:block;width:20px;height:20px;background-color:var(--text-color);box-shadow:0 1px 3px #0009;border-radius:50%;position:absolute;top:-3px;left:0;margin-right:0;transition:all .15s}.ui-switch input[type=checkbox]:checked+.switcher:before{left:100%;margin-left:-20px;background-color:var(--primary-color)}.ui-switch h3{margin:0;font-size:14px;font-weight:500}.ui-switch p{margin:4px 0 0;font-size:12px;font-weight:300}.ui-text-input{display:block;margin:8px 0 16px;padding:8px 16px;cursor:pointer}.ui-text-input h3{margin:0;font-size:14px;font-weight:500}.ui-text-input p{margin:8px 0;font-size:12px;font-weight:300}.ui-text-input .input{position:relative;margin:8px 0;border:1px solid var(--border-color);border-radius:4px;background:transparent;padding:2px;overflow:hidden}.ui-text-input input{display:block;width:235px;font-size:14px;border:none;background:transparent;padding:6px;appearance:none;color:var(--text-color);opacity:.6;outline:none}.ui-text-input .input:hover{border-color:var(--primary-color-subdued)}.ui-text-input .input:focus-within{border-color:var(--primary-color)}.ui-text-input .input:focus-within input{opacity:1}.ui-text-input .input:after{content:"";position:absolute;top:5px;right:14px;width:8px;height:17px;border:2px solid rgba(51,181,51,1);border-top:none;border-left:none;transform:rotate(45deg);opacity:0;transition:opacity 80ms ease-in-out;pointer-events:none}.ui-text-input.saved .input:after{opacity:1}.ui-toast{position:fixed;bottom:8px;left:8px;right:8px;padding:6px 12px;font-size:14px;border-radius:4px;transform:translate3d(0,150%,0);opacity:0;transition:all var(--transition-time) ease-in-out;background-color:var(--primary-color-subdued);color:var(--text-color);pointer-events:none}.ui-toast.ui-toast-show{transform:translateZ(0);opacity:1;pointer-events:auto}[data-view=nav-home] .nav-home .section-content,[data-view=nav-cmp-list] .nav-cmp-list .section-content,[data-view=nav-cmp-detail] .nav-cmp-detail .section-content,[data-view=nav-cmp-input] .nav-cmp-input .section-content,[data-view=nav-settings] .nav-settings .section-content{transform:translateZ(0);pointer-events:auto}[data-view=nav-home] .nav-home header,[data-view=nav-home] .nav-home footer,[data-view=nav-cmp-list] .nav-cmp-list header,[data-view=nav-cmp-list] .nav-cmp-list footer,[data-view=nav-cmp-detail] .nav-cmp-detail header,[data-view=nav-cmp-detail] .nav-cmp-detail footer,[data-view=nav-cmp-input] .nav-cmp-input header,[data-view=nav-cmp-input] .nav-cmp-input footer,[data-view=nav-settings] .nav-settings header,[data-view=nav-settings] .nav-settings footer{opacity:1;pointer-events:auto}[data-view=nav-cmp-list] .nav-home .section-content,[data-view=nav-cmp-detail] .nav-home .section-content,[data-view=nav-cmp-detail] .nav-cmp-list .section-content,[data-view=nav-cmp-input] .nav-home .section-content,[data-view=nav-cmp-input] .nav-cmp-list .section-content,[data-view=nav-cmp-input] .nav-cmp-detail .section-content,[data-view=nav-settings] .nav-home .section-content{transform:translate3d(-105%,0,0)}.cmp-item .nav-list-item-icon{background-image:url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20.83 16.809C20.94 16.561 21 16.289 21 16.008V7.99001C20.9994 7.64108 20.9066 7.29851 20.731 6.99699C20.5554 6.69547 20.3032 6.44571 20 6.27301L13 2.26501C12.6954 2.09103 12.3508 1.99951 12 1.99951C11.6492 1.99951 11.3046 2.09103 11 2.26501L7.988 3.99001M5.441 5.44801L4 6.27301C3.381 6.62801 3 7.28301 3 7.99101V16.009C3 16.718 3.381 17.372 4 17.726L11 21.734C11.3046 21.908 11.6492 21.9995 12 21.9995C12.3508 21.9995 12.6954 21.908 13 21.734L18.544 18.56" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M12 22V12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M14.532 10.538L20.73 6.95996" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M3.27002 6.95996L12 12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M3 3L21 21" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/></svg>');opacity:.3}.cmp-item.registered .nav-list-item-icon{background-image:url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M21 16.008V7.99001C20.9994 7.64108 20.9066 7.29851 20.731 6.99699C20.5554 6.69547 20.3032 6.44571 20 6.27301L13 2.26501C12.6954 2.09103 12.3508 1.99951 12 1.99951C11.6492 1.99951 11.3046 2.09103 11 2.26501L4 6.27301C3.381 6.62801 3 7.28301 3 7.99101V16.009C3 16.718 3.381 17.372 4 17.726L11 21.734C11.3046 21.908 11.6492 21.9995 12 21.9995C12.3508 21.9995 12.6954 21.908 13 21.734L20 17.726C20.619 17.371 21 16.716 21 16.008Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 22V12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 12L20.73 6.95996" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M3.26999 6.95996L12 12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /></svg>');opacity:.8}.search-highlight{background-color:var(--primary-color-alpha);padding:0 2px;border-radius:2px;font-weight:500}.search-container{position:sticky;top:0;z-index:10;padding:12px 16px;background:var(--background-color);border-bottom:1px solid var(--border-color)}.search-input-wrapper{position:relative;display:flex;align-items:center}.search-icon{position:absolute;left:12px;color:var(--text-color-secondary);pointer-events:none}.component-search-input{width:100%;height:36px;padding:8px 36px;border:1px solid var(--border-color);border-radius:6px;background:var(--input-background);color:var(--text-color);font-size:14px;transition:border-color .2s,box-shadow .2s}.component-search-input:focus{outline:none;border-color:var(--primary-color);box-shadow:0 0 0 2px var(--primary-color-alpha)}.component-search-input::placeholder{color:var(--text-color-tertiary)}.clear-search-button{position:absolute;right:8px;padding:4px;color:var(--text-color-secondary);border:none;background:transparent;border-radius:4px;cursor:pointer;opacity:0;transition:opacity .2s,background-color .2s;display:flex;align-items:center;justify-content:center}.clear-search-button:hover{background-color:var(--hover-color)}.component-search-input:not(:placeholder-shown)+.clear-search-button{opacity:1}.no-results{padding:32px 16px;text-align:center;color:var(--text-color-secondary);font-size:14px}#cmp-detail{position:relative}.cmp-loading{pointer-events:none!important}.cmp-loading-icon{position:absolute;display:inline-block;top:170px;left:0;width:100%;transform:translateZ(0);pointer-events:auto;opacity:0;transition:all 50ms ease-in-out;transition-delay:50ms;pointer-events:none}.cmp-loading .cmp-loading-icon{opacity:.5}.cmp-cover{position:absolute;top:160px;left:0;width:100%;height:100vh;background:var(--background-color);transform:translateZ(0);pointer-events:none;display:none}[data-view=nav-cmp-detail] .cmp-cover{display:block;pointer-events:auto}.cmp-enabled .cmp-cover{transform:translate3d(0,105%,0);pointer-events:none}.section-ready .cmp-cover{transition:all var(--transition-time) ease-in-out}.cmp-detail-inputs-container{margin:8px 0 16px;padding:0}.cmp-detail-inputs-container h3{margin:0 0 6px;padding-left:16px;padding-right:8px;font-size:14px;font-weight:500;display:flex;justify-content:space-between;align-items:center}.cmp-detail-inputs-reload{font-weight:300;font-size:.9em;text-decoration:none;appearance:none;text-align:left;background-color:transparent;border:none;color:var(--primary-color);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cmp-detail-inputs-reload:hover{text-decoration:underline;color:var(--primary-color)}.cmp-detail-inputs-container .cmp-inputs-empty{padding:0;margin-top:12px;font-size:12px;font-weight:300;opacity:.5;font-style:italic}.cmp-detail-inputs-container .nav-list-item-icon{opacity:.8;background-size:20px 20px;background-position:4px center}.input-icon{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path></svg>')}.input-icon-array{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 16v-6a2 2 0 1 1 4 0v6"></path> <path d="M10 13h4"></path></svg>')}.input-icon-boolean{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 16h2a2 2 0 1 0 0 -4h-2h2a2 2 0 1 0 0 -4h-2v8z"></path></svg>')}.input-icon-number{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 16v-8l4 8v-8"></path></svg>')}.input-icon-object{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M12 8a2 2 0 0 1 2 2v4a2 2 0 1 1 -4 0v-4a2 2 0 0 1 2 -2z"></path></svg>')}.input-icon-string{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 15a1 1 0 0 0 1 1h2a1 1 0 0 0 1 -1v-2a1 1 0 0 0 -1 -1h-2a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1"></path></svg>')}.cmp-input-item-unregistered{opacity:.4}.cmp-input-item-unregistered .input-icon:after{content:"";position:absolute;top:11px;left:4px;width:20px;height:2px;background-color:#000;transform:rotate(-45deg)}.cmp-prop-info{border-bottom:1px solid var(--border-color)}.cmp-input-readonly{margin:16px 0;padding:0 16px;display:grid;grid-template-columns:50% 50%;gap:12px}.cmp-input-readonly h3{margin:0;font-size:14px;font-weight:500}.cmp-input-readonly span{margin-top:2px;font-size:12px;font-weight:300;opacity:.8}.cmp-input-detail{margin:16px 0}.cmp-input-detail a{color:var(--primary-color);text-decoration:none}.cmp-input-detail a:hover{text-decoration:underline}.input-cover{position:absolute;top:175px;left:0;width:100%;height:100%;background:var(--background-color);transform:translateZ(0);transition:all var(--transition-time) ease-in-out;pointer-events:auto}.input-enabled .input-cover{transform:translate3d(0,105%,0);pointer-events:none}.input-loading-icon{position:absolute;display:inline-block;top:190px;left:0;width:100%;transform:translateZ(0);pointer-events:auto;opacity:0;transition:all 50ms ease-in-out;transition-delay:50ms;pointer-events:none}.input-loading .input-loading-icon{opacity:.5}:host{position:fixed;inset:0;z-index:2147483646;user-select:none;pointer-events:none;color:var(--text-color)}aside{position:absolute;top:0;right:0;width:var(--menu-width);height:100%;transform:translate3d(105%,0,0);transition:transform var(--transition-time) ease-in-out;background:var(--background-color);box-shadow:#000000c9 5px 0 20px;overflow:hidden;z-index:1}:host(.show-builder-menu) aside{pointer-events:auto;transform:translateZ(0)}#hit{position:absolute;inset:0;display:none}:host(.show-builder-menu) #hit{display:block;pointer-events:auto}#version{position:absolute;bottom:6px;right:6px;font-size:8px;color:#9b9b9b}</style><div id="hit"></div> <aside data-view="nav-home"> <section class="nav-home"> <header> <svg class="builder-logo" viewBox="0 0 31 36" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M31 9.96854C31.0016 11.4553 30.6701 12.9236 30.03 14.2654C29.3898 15.6072 28.4572 16.7884 27.3007 17.7221L0.702841 2.61812C0.601104 2.56012 0.506714 2.49008 0.421705 2.40951C0.288323 2.27871 0.182333 2.12263 0.109928 1.95039C0.0375215 1.77814 0.000151253 1.59319 0 1.40633C0 1.03335 0.148098 0.675643 0.411715 0.411905C0.675332 0.148167 1.03287 0 1.40568 0L21.036 0C23.6786 0 26.213 1.05025 28.0816 2.91972C29.9502 4.78918 31 7.32472 31 9.96854Z" fill="#18B4F4" /> <path d="M31 25.4757C31.0004 26.7849 30.7429 28.0815 30.2423 29.2912C29.7417 30.5009 29.0078 31.6001 28.0825 32.526C27.1572 33.4519 26.0587 34.1864 24.8497 34.6875C23.6406 35.1886 22.3448 35.4465 21.0361 35.4465H1.40573C1.12766 35.4436 0.856725 35.3581 0.627199 35.201C0.397672 35.044 0.219871 34.8223 0.116289 34.5641C0.0127078 34.3059 -0.011999 34.0228 0.0452946 33.7505C0.102588 33.4783 0.239308 33.2292 0.438156 33.0347C0.517415 32.9551 0.606358 32.8858 0.702893 32.8284L11.1705 26.8843L27.2984 17.7244C28.4548 18.6579 29.3874 19.8387 30.028 21.18C30.6685 22.5213 31.0007 23.9891 31 25.4757Z" fill="#FD6B3C" /> <path d="M27.3011 17.7221L11.1709 26.8843L0.703209 32.8284C0.602697 32.8843 0.509784 32.9528 0.426758 33.0323C4.41799 28.9369 6.6496 23.442 6.64456 17.7221C6.65208 12.0015 4.42111 6.50517 0.429101 2.40948C0.51411 2.49005 0.6085 2.56009 0.710237 2.61809L27.3011 17.7221Z" fill="#A97FF2" /> </svg> <div> <h2 class="builder-home-title">Builder Devtools</h2> <p><button id="go-to-builder">Go to Builder</button></p> </div> <button id="close" aria-label="Close Menu"> <svg viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" > <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M18 6l-12 12" /> <path d="M6 6l12 12" /> </svg> </button> </header> <div class="section-content"> <ul class="list"> <li> <button id="components-link"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M21 16.008V7.99001C20.9994 7.64108 20.9066 7.29851 20.731 6.99699C20.5554 6.69547 20.3032 6.44571 20 6.27301L13 2.26501C12.6954 2.09103 12.3508 1.99951 12 1.99951C11.6492 1.99951 11.3046 2.09103 11 2.26501L4 6.27301C3.381 6.62801 3 7.28301 3 7.99101V16.009C3 16.718 3.381 17.372 4 17.726L11 21.734C11.3046 21.908 11.6492 21.9995 12 21.9995C12.3508 21.9995 12.6954 21.908 13 21.734L20 17.726C20.619 17.371 21 16.716 21 16.008Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 22V12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 12L20.73 6.95996" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M3.26999 6.95996L12 12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> </svg> <span>Components</span> </button> </li> <li> <button id="settings-link"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M10.325 4.317C10.751 2.561 13.249 2.561 13.675 4.317C13.7389 4.5808 13.8642 4.82578 14.0407 5.032C14.2172 5.23822 14.4399 5.39985 14.6907 5.50375C14.9414 5.60764 15.2132 5.65085 15.4838 5.62987C15.7544 5.60889 16.0162 5.5243 16.248 5.383C17.791 4.443 19.558 6.209 18.618 7.753C18.4769 7.98466 18.3924 8.24634 18.3715 8.51677C18.3506 8.78721 18.3938 9.05877 18.4975 9.30938C18.6013 9.55999 18.7627 9.78258 18.9687 9.95905C19.1747 10.1355 19.4194 10.2609 19.683 10.325C21.439 10.751 21.439 13.249 19.683 13.675C19.4192 13.7389 19.1742 13.8642 18.968 14.0407C18.7618 14.2172 18.6001 14.4399 18.4963 14.6907C18.3924 14.9414 18.3491 15.2132 18.3701 15.4838C18.3911 15.7544 18.4757 16.0162 18.617 16.248C19.557 17.791 17.791 19.558 16.247 18.618C16.0153 18.4769 15.7537 18.3924 15.4832 18.3715C15.2128 18.3506 14.9412 18.3938 14.6906 18.4975C14.44 18.6013 14.2174 18.7627 14.0409 18.9687C13.8645 19.1747 13.7391 19.4194 13.675 19.683C13.249 21.439 10.751 21.439 10.325 19.683C10.2611 19.4192 10.1358 19.1742 9.95929 18.968C9.7828 18.7618 9.56011 18.6001 9.30935 18.4963C9.05859 18.3924 8.78683 18.3491 8.51621 18.3701C8.24559 18.3911 7.98375 18.4757 7.752 18.617C6.209 19.557 4.442 17.791 5.382 16.247C5.5231 16.0153 5.60755 15.7537 5.62848 15.4832C5.64942 15.2128 5.60624 14.9412 5.50247 14.6906C5.3987 14.44 5.23726 14.2174 5.03127 14.0409C4.82529 13.8645 4.58056 13.7391 4.317 13.675C2.561 13.249 2.561 10.751 4.317 10.325C4.5808 10.2611 4.82578 10.1358 5.032 9.95929C5.23822 9.7828 5.39985 9.56011 5.50375 9.30935C5.60764 9.05859 5.65085 8.78683 5.62987 8.51621C5.60889 8.24559 5.5243 7.98375 5.383 7.752C4.443 6.209 6.209 4.442 7.753 5.382C8.753 5.99 10.049 5.452 10.325 4.317Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M9 12C9 12.7956 9.31607 13.5587 9.87868 14.1213C10.4413 14.6839 11.2044 15 12 15C12.7956 15 13.5587 14.6839 14.1213 14.1213C14.6839 13.5587 15 12.7956 15 12C15 11.2044 14.6839 10.4413 14.1213 9.87868C13.5587 9.31607 12.7956 9 12 9C11.2044 9 10.4413 9.31607 9.87868 9.87868C9.31607 10.4413 9 11.2044 9 12Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> </svg> <span>Settings</span> </button> </li> <li> <button id="add-page-link"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" > <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M14 3v4a1 1 0 0 0 1 1h4" /> <path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z" /> <path d="M12 11l0 6" /> <path d="M9 14l6 0" /> </svg> <span>Add Builder Page</span> </button> </li> <li> <button id="import-from-figma"> <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-figma" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" > <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M15 12m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0" /> <path d="M6 3m0 3a3 3 0 0 1 3 -3h6a3 3 0 0 1 3 3v0a3 3 0 0 1 -3 3h-6a3 3 0 0 1 -3 -3z" /> <path d="M9 9a3 3 0 0 0 0 6h3m-3 0a3 3 0 1 0 3 3v-15" /> </svg> <span>Import From Figma</span> </button> </li> </ul> </div> <footer> <ul class="list"> <li> <a href="https://docs.google.com/forms/d/e/1FAIpQLSdqZcJpRtm_Ia5DTHP6SDY9Xa6LID3KiTjRWkjMzWyJRUtSHw/viewform" target="_blank" > <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M11.013 17.0114L10.013 18.0114L2.513 10.5834C2.0183 10.102 1.62864 9.52342 1.36854 8.88404C1.10845 8.24466 0.983558 7.55836 1.00173 6.86834C1.01991 6.17832 1.18076 5.49954 1.47415 4.87474C1.76755 4.24994 2.18713 3.69266 2.70648 3.23799C3.22583 2.78331 3.8337 2.4411 4.49181 2.23289C5.14991 2.02468 5.844 1.95499 6.53036 2.02821C7.21673 2.10143 7.8805 2.31596 8.47987 2.65831C9.07925 3.00066 9.60124 3.46341 10.013 4.01741C10.8086 2.95654 11.9931 2.2552 13.3059 2.06766C14.6186 1.88012 15.9521 2.22176 17.013 3.01741C18.0739 3.81306 18.7752 4.99755 18.9627 6.3103C19.1503 7.62305 18.8086 8.95654 18.013 10.0174" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> <path d="M18.2006 19.8175L16.0286 20.9555C15.9642 20.989 15.8917 21.004 15.8192 20.9987C15.7467 20.9934 15.6771 20.9681 15.6182 20.9256C15.5593 20.8831 15.5134 20.825 15.4855 20.7579C15.4577 20.6907 15.4491 20.6172 15.4606 20.5455L15.8756 18.1345L14.1186 16.4275C14.0662 16.3768 14.0291 16.3123 14.0115 16.2416C13.9939 16.1708 13.9966 16.0965 14.0192 16.0271C14.0418 15.9578 14.0835 15.8962 14.1394 15.8494C14.1954 15.8026 14.2634 15.7725 14.3356 15.7625L16.7636 15.4105L17.8496 13.2175C17.8821 13.1521 17.9322 13.0972 17.9942 13.0588C18.0562 13.0204 18.1277 13 18.2006 13C18.2736 13 18.3451 13.0204 18.4071 13.0588C18.4691 13.0972 18.5191 13.1521 18.5516 13.2175L19.6376 15.4105L22.0656 15.7625C22.1377 15.7728 22.2054 15.8031 22.2611 15.85C22.3168 15.8968 22.3583 15.9583 22.3809 16.0275C22.4034 16.0967 22.4062 16.1708 22.3888 16.2415C22.3715 16.3122 22.3347 16.3766 22.2826 16.4275L20.5256 18.1345L20.9396 20.5445C20.9521 20.6163 20.9441 20.6902 20.9166 20.7578C20.8891 20.8254 20.8433 20.8839 20.7842 20.9267C20.7252 20.9695 20.6553 20.9949 20.5825 21C20.5098 21.005 20.4371 20.9896 20.3726 20.9555L18.2006 19.8175Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> </svg> <span>Give Feedback</span> </a> </li> </ul> <div id="version"></div> </footer> </section> <section class="nav-cmp-list"> <header> <button class="back-button"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div class="search-container"> <div class="search-input-wrapper"> <svg class="search-icon" viewBox="0 0 24 24" width="16" height="16"> <path fill="none" stroke="currentColor" stroke-width="2" d="M15.5 15.5L20 20M10 17C6.13401 17 3 13.866 3 10C3 6.13401 6.13401 3 10 3C13.866 3 17 6.13401 17 10C17 13.866 13.866 17 10 17Z" /> </svg> <input type="text" id="component-search" class="component-search-input" placeholder="Search components..." autocomplete="off" spellcheck="false" /> <button id="clear-search" class="clear-search-button" type="button" aria-label="Clear search" > <svg viewBox="0 0 24 24" width="16" height="16"> <path fill="none" stroke="currentColor" stroke-width="2" d="M6 6l12 12M6 18L18 6" /> </svg> </button> </div> </div> <div> <h2>Custom Components</h2> <p> <button id="open-builder-registry"></button> </p> </div> </header> <div class="section-content"> <div id="cmp-list" class="cmp-list nav-list"></div> </div> <div class="nav-loading-icon spinner"></div> <footer> <p class="info"> Expand on Builder's selection of built-in blocks by <a target="_blank" href="https://www.builder.io/c/docs/custom-components-intro" >registering components</a > from your codebase. This way, teammates can drag and drop your components within Builder's Visual Editor just like any other block. </p> </footer> </section> <section class="nav-cmp-detail"> <header> <button class="back-button" data-back="nav-cmp-list"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div> <h2 id="cmp-detail-title"></h2> <p> <button id="cmp-open-source"></button> </p> </div> </header> <div class="section-content"> <div id="cmp-error"></div> <label class="ui-switch"> <div> <h3>Register Component</h3> <p> Registers this component so it can be used within Builder Visual CMS </p> </div> <input type="checkbox" role="switch" id="cmp-register" /> <span class="switcher"></span> </label> <div id="cmp-detail"> <label class="ui-text-input"> <h3>Component Name</h3> <div class="input"> <input type="text" id="cmp-name" autocapitalize="off" autocorrect="off" spellcheck="false" autocomplete="off" minlength="2" maxlength="30" required placeholder="e.g. My Counter" /> </div> <p> Unique name to identify this custom component within Builder. Press ESC to cancel </p> </label> <div class="cmp-detail-inputs-container"> <h3> <span>Builder Inputs (Props)</span> <button class="cmp-detail-inputs-reload" id="btn-inputs-reload"> Reload </button> </h3> <div id="cmp-detail-inputs"></div> </div> </div> </div> <div class="cmp-cover"></div> <div class="cmp-loading-icon spinner"></div> </section> <section class="nav-cmp-input"> <header> <button class="back-button" data-back="nav-cmp-detail"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div> <h2 id="cmp-input-title"></h2> <p> <button id="input-open-source"></button> </p> </div> </header> <div class="section-content"> <label class="ui-switch"> <div> <h3>Enable Input</h3> <p>Add this component prop as a Builder input</p> </div> <input type="checkbox" role="switch" id="input-register" /> <span class="switcher"></span> </label> <div class="cmp-prop-info"> <div class="cmp-input-readonly"> <h3>Prop Name</h3> <span id="cmp-prop-name"></span> </div> <div class="cmp-input-readonly"> <h3>Prop Type</h3> <span id="cmp-prop-type"></span> </div> </div> <div class="cmp-input-detail"> <label class="ui-text-input"> <h3>Builder Input Name</h3> <div class="input"> <input type="text" id="input-name" autocapitalize="off" autocorrect="off" spellcheck="false" autocomplete="off" minlength="1" maxlength="30" required placeholder="e.g. Text" /> </div> <p> Friendly name to identify this component prop as a Builder input. Press ESC to cancel </p> </label> <label class="ui-select"> <h3>Builder Input Type</h3> <div class="select"> <select id="input-type"></select> </div> <p> Correlate to what editing UI is appropriate for this Builder input. <a href="https://www.builder.io/c/docs/custom-components-input-types" target="_blank" >Read more about input types.</a > </p> </label> </div> <div class="input-cover"></div> <div class="input-loading-icon spinner"></div> </div> </section> <section class="nav-settings"> <header> <button class="back-button"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div> <h2>Settings</h2> <p>Configure Builder's Devtools</p> </div> </header> <div class="section-content"> <label class="ui-switch"> <div> <h3>Enable edit button in UI</h3> <p>Enables the edit button so you can edit content in Builder</p> </div> <input type="checkbox" role="switch" id="enable-edit" /> <span class="switcher"></span> </label> </div> </section> <div class="ui-toast" id="toast"></div> </aside> <button class="menu-toggle" aria-label="Toggle Builder Devtools"> <div> <div class="highlight-bg"></div> <svg viewBox="0 0 31 36" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M31 9.96854C31.0016 11.4553 30.6701 12.9236 30.03 14.2654C29.3898 15.6072 28.4572 16.7884 27.3007 17.7221L0.702841 2.61812C0.601104 2.56012 0.506714 2.49008 0.421705 2.40951C0.288323 2.27871 0.182333 2.12263 0.109928 1.95039C0.0375215 1.77814 0.000151253 1.59319 0 1.40633C0 1.03335 0.148098 0.675643 0.411715 0.411905C0.675332 0.148167 1.03287 0 1.40568 0L21.036 0C23.6786 0 26.213 1.05025 28.0816 2.91972C29.9502 4.78918 31 7.32472 31 9.96854Z" fill="#18B4F4" /> <path d="M31 25.4757C31.0004 26.7849 30.7429 28.0815 30.2423 29.2912C29.7417 30.5009 29.0078 31.6001 28.0825 32.526C27.1572 33.4519 26.0587 34.1864 24.8497 34.6875C23.6406 35.1886 22.3448 35.4465 21.0361 35.4465H1.40573C1.12766 35.4436 0.856725 35.3581 0.627199 35.201C0.397672 35.044 0.219871 34.8223 0.116289 34.5641C0.0127078 34.3059 -0.011999 34.0228 0.0452946 33.7505C0.102588 33.4783 0.239308 33.2292 0.438156 33.0347C0.517415 32.9551 0.606358 32.8858 0.702893 32.8284L11.1705 26.8843L27.2984 17.7244C28.4548 18.6579 29.3874 19.8387 30.028 21.18C30.6685 22.5213 31.0007 23.9891 31 25.4757Z" fill="#FD6B3C" /> <path d="M27.3011 17.7221L11.1709 26.8843L0.703209 32.8284C0.602697 32.8843 0.509784 32.9528 0.426758 33.0323C4.41799 28.9369 6.6496 23.442 6.64456 17.7221C6.65208 12.0015 4.42111 6.50517 0.429101 2.40948C0.51411 2.49005 0.6085 2.56009 0.710237 2.61809L27.3011 17.7221Z" fill="#A97FF2" /> </svg> </div> </button>\`,Nr(e),Br(e),Ur(e),Ar(e),Dr(e),Fr(e),this.setAttribute("aria-hidden","true"),e.getElementById("version").textContent="v1.6.1"}highlightOpener(){let e=this.shadowRoot.querySelector(".menu-toggle");e.classList.add("menu-toggle-highlight"),e.classList.add("menu-toggle-highlight-no-transition"),setTimeout(()=>{e.classList.remove("menu-toggle-highlight-no-transition"),setTimeout(()=>{e.classList.remove("menu-toggle-highlight")},20)},20)}};var ki=\`<style>*,*:before,*:after{box-sizing:border-box}html,body,:host{position:fixed;top:0;left:0;width:100%;height:100vh;z-index:2147483646;margin:0;padding:0;line-height:1.8;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";background-color:#252525;color:#fff;transition:opacity .25s ease-in-out}:host([aria-hidden="true"]){opacity:0;pointer-events:none}main{position:absolute;top:0;left:0;width:100%;height:100vh}h1{margin-top:0;font-size:24px;font-weight:300;line-height:1.4}p{margin:20px 0;font-weight:300}button{cursor:pointer}aside{position:absolute;top:0;left:0;width:350px;height:100vh;padding:60px 0 0 50px;background-color:#121212}aside ul{margin:30px 0 0;padding:0;list-style:none}aside li{position:relative;margin:0;padding:20px 10px;font-weight:300}aside li.highlight{color:#48a1ff}aside li.active{font-weight:700}aside li .circle{position:absolute;top:20px;left:10px;width:24px;height:24px;border:3px solid white;border-radius:50%;font-size:14px}aside li.highlight .circle{border-color:#48a1ff}aside li.active .circle:after{content:"";position:absolute;top:3px;left:3px;width:12px;height:12px;border-radius:50%;background-color:#48a1ff}aside li.completed .circle{background-color:#48a1ff}aside li.completed .circle:after{content:"";position:absolute;top:2px;left:6px;width:6px;height:13px;border:3px solid black;border-top:none;border-left:none;transform:rotate(45deg)}aside li .line{position:absolute;top:44px;left:21px;width:3px;height:45px;background-color:#fff}aside li.completed .line{background-color:#48a1ff}aside li span{display:block;margin-left:44px}nav{margin-top:30px}section{position:absolute;top:135px;left:350px;padding:0 80px 0 140px;transition:opacity .15s ease-in-out}section[aria-hidden=true]{pointer-events:none;opacity:0}section h1,section p{min-width:300px;max-width:600px}.button{position:relative;display:inline-block;color:#fff;background-color:#48a1ff;border-radius:4px;text-decoration:none;padding:10px 40px 10px 20px;white-space:nowrap}.button:hover{background-color:#48a1ffd9}#button-icon{position:absolute;top:1px;right:5px;bottom:0;width:30px;background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="none" stroke="white" stroke-linecap="square" stroke-miterlimit="10" stroke-width="48" d="M184 112l144 144-144 144"/></svg>');background-repeat:no-repeat;background-position:center;background-size:24px 24px}.button[aria-disabled=true]{opacity:.9;background-color:#ffffff4d;pointer-events:none;padding-right:60px}.button[aria-disabled=true] #button-icon{top:21px;right:29px;width:8px;height:8px;border-radius:4px;background:#fff;color:#fff;animation:dot-flashing .5s infinite linear alternate;animation-delay:.25s}.button[aria-disabled=true] #button-icon:before,.button[aria-disabled=true] #button-icon:after{content:"";display:inline-block;position:absolute;top:0}.button[aria-disabled=true] #button-icon:before{left:-12px;width:8px;height:8px;border-radius:4px;background-color:#fff;color:#fff;animation:dot-flashing .5s infinite alternate;animation-delay:0s}.button[aria-disabled=true] #button-icon:after{left:12px;width:8px;height:8px;border-radius:4px;background-color:#fff;color:#fff;animation:dot-flashing .5s infinite alternate;animation-delay:.5s}@keyframes dot-flashing{0%{background-color:#fff}50%,to{background-color:#ffffff4d}}.logo{margin-left:9px;background:url('data:image/svg+xml,<svg viewBox="0 0 150 32" fill="none" xmlns="http://www.w3.org/2000/svg" > <g clip-path="url(%23clip0_4_304)"> <path d="M27.9858 8.99927C27.9872 10.3415 27.688 11.667 27.1101 12.8783C26.5321 14.0896 25.6902 15.156 24.6462 15.9989V15.9989L0.634502 2.36355C0.542657 2.31119 0.457444 2.24796 0.380701 2.17523C0.260289 2.05715 0.164605 1.91624 0.0992389 1.76075C0.0338732 1.60525 0.000136546 1.43828 0 1.26959C0 0.932873 0.133698 0.609948 0.371683 0.371854C0.609667 0.13376 0.932443 0 1.269 0L18.9906 0C21.3763 0 23.6642 0.948135 25.3512 2.63583C27.0381 4.32352 27.9858 6.61252 27.9858 8.99927V8.99927Z" fill="%2318B4F4" /> <path d="M27.9858 22.9986C27.9861 24.1806 27.7536 25.351 27.3017 26.4431C26.8498 27.5352 26.1873 28.5275 25.352 29.3634C24.5167 30.1993 23.5249 30.8624 22.4335 31.3147C21.342 31.7671 20.1721 32 18.9907 32H1.26906C1.01802 31.9973 0.77343 31.9202 0.566221 31.7784C0.359012 31.6366 0.198499 31.4364 0.104989 31.2034C0.0114791 30.9703 -0.0108254 30.7147 0.0408974 30.4689C0.0926201 30.2231 0.216046 29.9982 0.395559 29.8226V29.8226C0.467112 29.7508 0.547407 29.6882 0.634555 29.6364L10.0844 24.2703L24.6441 16.001C25.688 16.8438 26.53 17.9097 27.1083 19.1206C27.6866 20.3315 27.9864 21.6566 27.9858 22.9986V22.9986Z" fill="%23FD6B3C" /> <path d="M24.6461 15.9989L10.0843 24.2703L0.634458 29.6365C0.54372 29.6868 0.459841 29.7487 0.384888 29.8205C3.98804 26.1233 6.00266 21.1627 5.99812 15.9989C6.0049 10.8346 3.99085 5.87268 0.387003 2.17523C0.463746 2.24796 0.548959 2.31119 0.640803 2.36355L24.6461 15.9989Z" fill="%23A97FF2" /> <path d="M47.6659 11.7352C51.8177 11.7352 54.1632 15.0531 54.1632 19.0714C54.1632 23.0896 51.8177 26.3821 47.6659 26.3821C45.5086 26.3821 43.8589 25.5188 42.9473 24.0545L42.5709 26.052H39.9736V6.77115H43.1884V13.8914C43.971 12.6959 45.5086 11.7352 47.6659 11.7352ZM47.0187 23.5488C49.4446 23.5488 50.9547 21.5809 50.9547 19.0714C50.9547 16.5089 49.4446 14.5664 47.0187 14.5664C44.5928 14.5664 43.0806 16.5047 43.0806 19.0714C43.0806 21.583 44.5653 23.5488 47.0187 23.5488V23.5488Z" fill="white" /> <path d="M65.4595 20.2859V12.0611H68.668V20.123C68.668 23.7202 67.0246 26.3821 62.4943 26.3821C57.9639 26.3821 56.3206 23.7117 56.3206 20.123V12.0611H59.529V20.2859C59.529 22.4696 60.5527 23.5488 62.49 23.5488C64.4274 23.5488 65.4595 22.4696 65.4595 20.2859Z" fill="white" /> <path d="M71.2355 7.74451C71.2247 7.46284 71.2724 7.18199 71.3755 6.91968C71.4787 6.65737 71.6351 6.41929 71.8348 6.22047C72.0345 6.02165 72.2732 5.8664 72.5359 5.76452C72.7986 5.66264 73.0796 5.61633 73.3611 5.62853C74.5793 5.62853 75.4571 6.50666 75.4571 7.75509C75.4571 9.00352 74.5793 9.8224 73.3611 9.8224C72.1428 9.8224 71.2355 8.9612 71.2355 7.74451Z" fill="white" /> <path d="M128.476 7.74451C128.465 7.46376 128.513 7.18383 128.615 6.92227C128.718 6.66071 128.873 6.42315 129.072 6.22449C129.27 6.02583 129.508 5.87035 129.769 5.7678C130.031 5.66524 130.31 5.61783 130.591 5.62852C131.809 5.62852 132.687 6.50666 132.687 7.75509C132.687 9.00352 131.809 9.8224 130.591 9.8224C129.373 9.8224 128.476 8.9612 128.476 7.74451Z" fill="white" /> <path d="M122.302 24.1031C122.291 23.8223 122.339 23.5422 122.441 23.2805C122.543 23.0188 122.699 22.7811 122.897 22.5824C123.096 22.3837 123.334 22.2282 123.595 22.1258C123.857 22.0233 124.137 21.9761 124.417 21.9872C125.636 21.9872 126.513 22.8653 126.513 24.1031C126.513 25.341 125.636 26.1726 124.417 26.1726C123.199 26.1726 122.302 25.3219 122.302 24.1031Z" fill="white" /> <path d="M74.9516 12.059H71.7432V26.0583H74.9516V12.059Z" fill="white" /> <path d="M78.16 26.0583V6.77115H81.3685V26.0626L78.16 26.0583Z" fill="white" /> <path d="M94.6063 6.77115H97.8148V26.0626H95.2239L94.8474 24.0651C93.9591 25.523 92.3094 26.3927 90.131 26.3927C86.0046 26.3927 83.6591 23.0748 83.6591 19.0819C83.6591 15.0891 86.0046 11.7458 90.131 11.7458C92.3137 11.7458 93.8238 12.7149 94.6063 13.902V6.77115ZM90.7993 14.5707C88.3734 14.5707 86.8633 16.5131 86.8633 19.0756C86.8633 21.5851 88.3734 23.553 90.7993 23.553C93.2252 23.553 94.7354 21.5851 94.7354 19.0756C94.7396 16.5047 93.257 14.5664 90.8036 14.5664L90.7993 14.5707Z" fill="white" /> <path d="M113.479 22.2284C112.482 24.7359 110.162 26.3821 107.117 26.3821C102.887 26.3821 100.137 23.225 100.137 19.0439C100.137 14.9706 102.942 11.7353 107.093 11.7353C111.245 11.7353 113.969 14.8902 113.969 18.991C113.982 19.3255 113.953 19.6604 113.883 19.9876H103.288C103.53 22.2009 104.959 23.6292 107.197 23.6292C108.735 23.6292 110.001 22.8738 110.594 21.473L113.479 22.2284ZM103.341 17.6156H110.784C110.513 15.6731 109.166 14.3506 107.089 14.3506C105.012 14.3506 103.665 15.7006 103.341 17.6156V17.6156Z" fill="white" /> <path d="M123.779 14.9452C123.538 14.9117 123.295 14.8933 123.051 14.8902C120.786 14.8902 119.439 16.0772 119.439 18.7751V26.0583H116.23V12.0611H118.821L119.195 14.0014C119.707 13.1127 120.887 11.9257 123.322 11.9257C123.455 11.9257 123.779 11.9532 123.779 11.9532V14.9452Z" fill="white" /> <path d="M132.192 12.059H128.984V26.0583H132.192V12.059Z" fill="white" /> <path d="M134.483 19.0714C134.483 15.1335 137.287 11.7353 141.735 11.7353C146.183 11.7353 149.015 15.1335 149.015 19.0714C149.015 23.0092 146.213 26.3821 141.735 26.3821C137.258 26.3821 134.483 23.0092 134.483 19.0714ZM141.735 23.5488C144.083 23.5488 145.806 21.7692 145.806 19.0714C145.806 16.3735 144.083 14.5664 141.735 14.5664C139.387 14.5664 137.687 16.346 137.687 19.0714C137.687 21.7968 139.417 23.5488 141.735 23.5488V23.5488Z" fill="white" /> </g> <defs> <clipPath id="clip0_4_304"> <rect width="149.015" height="32" fill="white" /> </clipPath> </defs> </svg>');background-repeat:no-repeat;width:150px;height:32px}@media (max-width: 840px){aside{width:250px;padding:60px 0 0 20px}section{left:250px;padding:0 80px}}@media (max-width: 590px){aside{width:230px;padding:60px 0 0 10px}section{left:230px;padding:0 40px}}#modified-files-message a{color:#cbcbcb;font-weight:300;text-decoration:underline}#modified-files-message a:hover{color:#fff;text-decoration:none}#restart-warning{border-radius:4px;padding:8px 16px;border:1px solid #fd6b3c;background:#fd6b3c1a}#react-router-steps{margin:0 0 5px;padding:0 20px}#need-help{color:#48a1ff;text-decoration:none}#router-message{border-radius:4px;padding:16px;border:1px solid #48a1ff}#router-finish-button{margin-top:12px}#router-checkbox-div{display:flex;align-items:center}#router-checkbox{margin-right:10px;width:15px;height:15px}#success-title{display:flex;align-items:center;gap:10px}#success-title .check-icon{display:inline-block;width:24px;height:24px;border:2px solid #28a745;border-radius:50%;position:relative}#success-title .check-icon:before{content:"";position:absolute;top:50%;left:50%;width:6px;height:12px;border:solid #28a745;border-width:0 2px 2px 0;transform:translate(-50%,-60%) rotate(45deg)}
|
|
1130
|
+
\`,t.appendChild(e),setTimeout(()=>{e.classList.add("menu-toggle-tooltip-show"),e.addEventListener("click",()=>{e.classList.remove("menu-toggle-tooltip-show")})},1e3)};function Br(t){t.getElementById("go-to-builder").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),ue(t,!1),window.open(mn(),"builder")}),t.getElementById("components-link").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation();let u=t.querySelector(".nav-cmp-list .section-content");u.scrollTop=0,W(t,"nav-cmp-list"),Mr(t)}),t.getElementById("settings-link").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),W(t,"nav-settings")}),t.getElementById("add-page-link").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),ue(t,!1),window.open(Ee(),"builder")}),t.getElementById("import-from-figma").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),ue(t,!1),window.open("https://www.figma.com/community/plugin/747985167520967365/builder-io-ai-powered-figma-to-code-react-vue-tailwind-more")})}function Fr(t){let e=t.getElementById("enable-edit");e.addEventListener("change",n=>{n.stopPropagation(),bt(e.checked)}),e.checked=ke(),bt(e.checked)}var lt=class extends HTMLElement{constructor(){super()}connectedCallback(){let e=this.attachShadow({mode:"open"});e.innerHTML=\`<style>*,*:before,*:after{box-sizing:border-box}:host{--background-color: rgba(40, 40, 40, 1);--primary-color: rgba(72, 161, 255, 1);--primary-color-subdued: rgb(72, 161, 255, .6);--primary-color-highlight: rgb(126, 188, 255);--primary-contrast-color: white;--edit-color: #1d74e2;--edit-color-highlight: #1c6bd1;--edit-color-alpha: rgb(72, 161, 255, .15);--error-color: #ff2b55;--text-color: white;--text-color-highlight: white;--border-color: #454545;--button-background-color-hover: rgba(255, 255, 255, .1);--menu-width: 320px;--transition-time: .15s;--font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";font-family:var(--font-family);line-height:1.6}button{cursor:pointer;color:var(--text-color);-webkit-tap-highlight-color:transparent}input,select,button{font-family:var(--font-family)}.menu-toggle{position:absolute;right:0;bottom:0;pointer-events:auto;padding:8px;background:transparent;border:none;appearance:none}.menu-toggle div{position:relative;width:64px;height:64px;pointer-events:none;border-radius:50%;background:#000;border:1px solid white;box-shadow:#00000054 0 0 8px}.menu-toggle:hover div{background-color:var(--background-color);border:1px solid rgb(220,220,220)}.menu-toggle svg{position:absolute;top:15px;left:15px;width:33px;height:32px}div.highlight-bg{position:absolute;top:-1px;left:-1px;background-color:#1a1a1a;pointer-events:none;transition:all .4s ease-out;opacity:0}.menu-toggle-highlight-no-transition div.highlight-bg{transition:none}.menu-toggle-highlight div.highlight-bg{opacity:1}.menu-toggle-tooltip{position:absolute;bottom:0;right:0;width:382px;height:72px;padding:0;text-align:left;appearance:none;background-color:transparent;border:none;pointer-events:none;transform:translate3d(320px,0,0);opacity:0;transition:all .15s ease-in-out;color:#fff}.menu-toggle-tooltip.menu-toggle-tooltip-show{pointer-events:auto;opacity:1;transform:translateZ(0)}.menu-toggle-tooltip-content{position:absolute;inset:0 95px 10px 0;padding:8px 12px;background-color:var(--primary-color);box-shadow:#00000054 0 0 20px;border-radius:2px}.menu-toggle-tooltip-content:before{content:"";position:absolute;bottom:15px;right:-6px;width:30px;height:30px;background-color:var(--primary-color);transform:rotate(45deg)}.menu-toggle-tooltip:hover .menu-toggle-tooltip-content,.menu-toggle-tooltip:hover .menu-toggle-tooltip-content:before{background-color:var(--primary-color-highlight)}.menu-toggle-tooltip-content h3{margin:0;font-size:16px}.menu-toggle-tooltip-content p{margin:0;font-size:12px}section{position:absolute;display:grid;grid-template-rows:64px auto 64px;top:0;left:0;width:100%;height:100%;padding:0;pointer-events:none}.section-content{margin:0;padding:0 0 10px;font-weight:300;transform:translate3d(105%,0,0);transition:transform var(--transition-time) ease-in-out;overflow-y:auto}.section-content .error{color:var(--error-color);font-weight:700}section a{text-decoration:none;color:var(--text-color)}section h3,section p{margin-left:16px;margin-right:16px}.info{font-size:12px}ul.list{list-style:none;padding:0;margin:0}ul.list li{display:block;padding:0;margin:0}ul.list a,ul.list button{display:grid;grid-template-columns:24px auto;grid-gap:16px;padding:12px;margin:8px 0;border:none;background:transparent;appearance:none;width:100%;font-weight:300;text-align:left;text-decoration:none;color:var(--text-color)}ul.list a:hover,ul.list button:hover{text-decoration:none;color:var(--text-color);background-color:var(--button-background-color-hover)}ul.list a span,ul.list button span{display:block;font-size:16px;font-weight:500;line-height:1.5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}header{position:relative;display:grid;grid-template-columns:44px 1fr;gap:8px;padding-left:8px;border-bottom:1px solid var(--border-color);transition:opacity var(--transition-time) ease-in-out;opacity:0;pointer-events:none}header>div{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.nav-home header>div{margin-right:56px}header h2{margin:7px 0 0;font-size:18px;font-weight:500;line-height:1.5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}header p{margin:2px 0 0;font-size:12px;font-weight:300;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}header p button{display:block;margin:0;padding:0;width:100%;font-size:12px;font-weight:300;text-decoration:none;appearance:none;text-align:left;background-color:transparent;border:none;color:var(--primary-color);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}header p button:hover{text-decoration:underline;color:var(--primary-color)}.builder-logo{margin:12px 0 0 8px}#close{display:block;position:absolute;appearance:none;background:transparent;border:none;border-radius:50%;margin:0;padding:0;right:4px;top:8px;width:48px;height:48px;z-index:1;opacity:.7}#close:hover{opacity:1;background-color:var(--button-background-color-hover)}#close svg{position:absolute;top:12px;left:12px;width:24px;height:24px;fill:currentColor;pointer-events:none}.back-button{position:relative;display:block;margin:7px 0 0 -2px;width:48px;height:48px;background:transparent;border:none;appearance:none;border-radius:50%}.back-button:hover{background-color:var(--button-background-color-hover)}.back-button svg{position:absolute;top:12px;left:12px;width:24px;height:24px;fill:currentColor;pointer-events:none}footer{border-top:1px solid var(--border-color);transition:opacity var(--transition-time) ease-in-out;opacity:0;pointer-events:none}section.nav-cmp-list{grid-template-rows:64px auto 120px}footer a{text-decoration:underline;color:var(--primary-color)}footer a:hover{color:var(--primary-color);text-decoration:none}.nav-list{padding:2px 0}.nav-loading{pointer-events:none}.nav-loading-icon{position:absolute;display:inline-block;top:170px;left:0;width:100%;transform:translateZ(0);pointer-events:auto;opacity:0;transition:all 50ms ease-in-out;transition-delay:50ms;pointer-events:none}.nav-loading .nav-loading-icon{opacity:.5}.nav-list h4{margin:8px 8px 8px 10px;font-size:14px;font-weight:600}.nav-list .nav-list-item+h4{margin-top:30px}.nav-list-item{display:grid;grid-template-columns:1fr 1fr;gap:8px;position:relative;margin:2px 0;padding:8px 28px 8px 46px;width:100%;font-size:14px;font-weight:300;text-align:left;border:none;background:transparent;appearance:none}.nav-list-item:hover{background-color:var(--button-background-color-hover)}.nav-list-item-icon{position:absolute;top:4px;left:10px;width:24px;height:24px;object-fit:contain;filter:invert(100%);background-size:24px 24px;background-repeat:no-repeat;background-position:center center}.nav-list-item span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none}.nav-list-item:after{display:block;position:absolute;content:"";background-image:url('data:image/svg+xml,<svg width="8" height="14" viewBox="0 0 8 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 1L7 7L1 13" stroke="%23F2F2F2" stroke-opacity="0.5" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/></svg>');background-repeat:no-repeat;background-position:12px 9px;top:0;right:0;width:32px;height:32px;pointer-events:none}.nav-list-item-note{opacity:0;font-size:12px;padding-top:1px;text-align:right}.nav-list-item:hover .nav-list-item-note{opacity:.5}.ui-select{display:block;margin:8px 0 16px;padding:8px 16px;cursor:pointer}.ui-select h3{margin:0;font-size:14px;font-weight:500}.ui-select p{margin:8px 0;font-size:12px;font-weight:300}.ui-select .select{position:relative;margin:8px 0;border-radius:4px;padding:0;line-height:1.1;overflow:hidden;border:1px solid var(--border-color)}.ui-select select{appearance:none;background-color:transparent;border:none;outline:none;padding:8px 32px 8px 8px;margin:0;width:100%;font-size:14px;cursor:pointer;text-overflow:ellipsis;opacity:.6;color:var(--text-color)}.ui-select .select:after{content:"";top:6px;right:5px;width:24px;height:24px;position:absolute;background-image:url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="%23F2F2F2" d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"/></svg>');background-repeat:no-repeat;background-position:center;pointer-events:none;opacity:.6}.ui-select .select:hover{border-color:var(--primary-color-subdued)}.ui-text-input .select:focus-within{border-color:var(--primary-color)}.ui-text-input .select:focus-within select{opacity:1}.spinner:after{content:" ";display:block;width:32px;height:32px;margin:0 auto;pointer-events:auto;border-radius:50%;border:3px solid var(--text-color);border-color:var(--text-color) transparent var(--text-color) transparent;animation:spinner .75s linear infinite}@keyframes spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.ui-switch{display:grid;grid-template-columns:auto 48px;grid-gap:20px;margin:8px 0 16px;padding:8px 0 8px 16px;cursor:pointer}.ui-switch>*{pointer-events:none}.ui-switch input{display:none;visibility:hidden}.ui-switch .switcher{display:inline-block;border-radius:100px;width:35px;height:14px;background-color:#ccc;position:relative;top:6px;vertical-align:middle;cursor:pointer}.ui-switch input[type=checkbox]:checked+.switcher{background-color:var(--primary-color-subdued)}.ui-switch .switcher:before{content:"";display:block;width:20px;height:20px;background-color:var(--text-color);box-shadow:0 1px 3px #0009;border-radius:50%;position:absolute;top:-3px;left:0;margin-right:0;transition:all .15s}.ui-switch input[type=checkbox]:checked+.switcher:before{left:100%;margin-left:-20px;background-color:var(--primary-color)}.ui-switch h3{margin:0;font-size:14px;font-weight:500}.ui-switch p{margin:4px 0 0;font-size:12px;font-weight:300}.ui-text-input{display:block;margin:8px 0 16px;padding:8px 16px;cursor:pointer}.ui-text-input h3{margin:0;font-size:14px;font-weight:500}.ui-text-input p{margin:8px 0;font-size:12px;font-weight:300}.ui-text-input .input{position:relative;margin:8px 0;border:1px solid var(--border-color);border-radius:4px;background:transparent;padding:2px;overflow:hidden}.ui-text-input input{display:block;width:235px;font-size:14px;border:none;background:transparent;padding:6px;appearance:none;color:var(--text-color);opacity:.6;outline:none}.ui-text-input .input:hover{border-color:var(--primary-color-subdued)}.ui-text-input .input:focus-within{border-color:var(--primary-color)}.ui-text-input .input:focus-within input{opacity:1}.ui-text-input .input:after{content:"";position:absolute;top:5px;right:14px;width:8px;height:17px;border:2px solid rgba(51,181,51,1);border-top:none;border-left:none;transform:rotate(45deg);opacity:0;transition:opacity 80ms ease-in-out;pointer-events:none}.ui-text-input.saved .input:after{opacity:1}.ui-toast{position:fixed;bottom:8px;left:8px;right:8px;padding:6px 12px;font-size:14px;border-radius:4px;transform:translate3d(0,150%,0);opacity:0;transition:all var(--transition-time) ease-in-out;background-color:var(--primary-color-subdued);color:var(--text-color);pointer-events:none}.ui-toast.ui-toast-show{transform:translateZ(0);opacity:1;pointer-events:auto}[data-view=nav-home] .nav-home .section-content,[data-view=nav-cmp-list] .nav-cmp-list .section-content,[data-view=nav-cmp-detail] .nav-cmp-detail .section-content,[data-view=nav-cmp-input] .nav-cmp-input .section-content,[data-view=nav-settings] .nav-settings .section-content{transform:translateZ(0);pointer-events:auto}[data-view=nav-home] .nav-home header,[data-view=nav-home] .nav-home footer,[data-view=nav-cmp-list] .nav-cmp-list header,[data-view=nav-cmp-list] .nav-cmp-list footer,[data-view=nav-cmp-detail] .nav-cmp-detail header,[data-view=nav-cmp-detail] .nav-cmp-detail footer,[data-view=nav-cmp-input] .nav-cmp-input header,[data-view=nav-cmp-input] .nav-cmp-input footer,[data-view=nav-settings] .nav-settings header,[data-view=nav-settings] .nav-settings footer{opacity:1;pointer-events:auto}[data-view=nav-cmp-list] .nav-home .section-content,[data-view=nav-cmp-detail] .nav-home .section-content,[data-view=nav-cmp-detail] .nav-cmp-list .section-content,[data-view=nav-cmp-input] .nav-home .section-content,[data-view=nav-cmp-input] .nav-cmp-list .section-content,[data-view=nav-cmp-input] .nav-cmp-detail .section-content,[data-view=nav-settings] .nav-home .section-content{transform:translate3d(-105%,0,0)}.cmp-item .nav-list-item-icon{background-image:url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20.83 16.809C20.94 16.561 21 16.289 21 16.008V7.99001C20.9994 7.64108 20.9066 7.29851 20.731 6.99699C20.5554 6.69547 20.3032 6.44571 20 6.27301L13 2.26501C12.6954 2.09103 12.3508 1.99951 12 1.99951C11.6492 1.99951 11.3046 2.09103 11 2.26501L7.988 3.99001M5.441 5.44801L4 6.27301C3.381 6.62801 3 7.28301 3 7.99101V16.009C3 16.718 3.381 17.372 4 17.726L11 21.734C11.3046 21.908 11.6492 21.9995 12 21.9995C12.3508 21.9995 12.6954 21.908 13 21.734L18.544 18.56" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M12 22V12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M14.532 10.538L20.73 6.95996" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M3.27002 6.95996L12 12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M3 3L21 21" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/></svg>');opacity:.3}.cmp-item.registered .nav-list-item-icon{background-image:url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M21 16.008V7.99001C20.9994 7.64108 20.9066 7.29851 20.731 6.99699C20.5554 6.69547 20.3032 6.44571 20 6.27301L13 2.26501C12.6954 2.09103 12.3508 1.99951 12 1.99951C11.6492 1.99951 11.3046 2.09103 11 2.26501L4 6.27301C3.381 6.62801 3 7.28301 3 7.99101V16.009C3 16.718 3.381 17.372 4 17.726L11 21.734C11.3046 21.908 11.6492 21.9995 12 21.9995C12.3508 21.9995 12.6954 21.908 13 21.734L20 17.726C20.619 17.371 21 16.716 21 16.008Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 22V12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 12L20.73 6.95996" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M3.26999 6.95996L12 12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /></svg>');opacity:.8}.search-highlight{background-color:var(--primary-color-alpha);padding:0 2px;border-radius:2px;font-weight:500}.search-container{position:sticky;top:0;z-index:10;padding:12px 16px;background:var(--background-color);border-bottom:1px solid var(--border-color)}.search-input-wrapper{position:relative;display:flex;align-items:center}.search-icon{position:absolute;left:12px;color:var(--text-color-secondary);pointer-events:none}.component-search-input{width:100%;height:36px;padding:8px 36px;border:1px solid var(--border-color);border-radius:6px;background:var(--input-background);color:var(--text-color);font-size:14px;transition:border-color .2s,box-shadow .2s}.component-search-input:focus{outline:none;border-color:var(--primary-color);box-shadow:0 0 0 2px var(--primary-color-alpha)}.component-search-input::placeholder{color:var(--text-color-tertiary)}.clear-search-button{position:absolute;right:8px;padding:4px;color:var(--text-color-secondary);border:none;background:transparent;border-radius:4px;cursor:pointer;opacity:0;transition:opacity .2s,background-color .2s;display:flex;align-items:center;justify-content:center}.clear-search-button:hover{background-color:var(--hover-color)}.component-search-input:not(:placeholder-shown)+.clear-search-button{opacity:1}.no-results{padding:32px 16px;text-align:center;color:var(--text-color-secondary);font-size:14px}#cmp-detail{position:relative}.cmp-loading{pointer-events:none!important}.cmp-loading-icon{position:absolute;display:inline-block;top:170px;left:0;width:100%;transform:translateZ(0);pointer-events:auto;opacity:0;transition:all 50ms ease-in-out;transition-delay:50ms;pointer-events:none}.cmp-loading .cmp-loading-icon{opacity:.5}.cmp-cover{position:absolute;top:160px;left:0;width:100%;height:100vh;background:var(--background-color);transform:translateZ(0);pointer-events:none;display:none}[data-view=nav-cmp-detail] .cmp-cover{display:block;pointer-events:auto}.cmp-enabled .cmp-cover{transform:translate3d(0,105%,0);pointer-events:none}.section-ready .cmp-cover{transition:all var(--transition-time) ease-in-out}.cmp-detail-inputs-container{margin:8px 0 16px;padding:0}.cmp-detail-inputs-container h3{margin:0 0 6px;padding-left:16px;padding-right:8px;font-size:14px;font-weight:500;display:flex;justify-content:space-between;align-items:center}.cmp-detail-inputs-reload{font-weight:300;font-size:.9em;text-decoration:none;appearance:none;text-align:left;background-color:transparent;border:none;color:var(--primary-color);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cmp-detail-inputs-reload:hover{text-decoration:underline;color:var(--primary-color)}.cmp-detail-inputs-container .cmp-inputs-empty{padding:0;margin-top:12px;font-size:12px;font-weight:300;opacity:.5;font-style:italic}.cmp-detail-inputs-container .nav-list-item-icon{opacity:.8;background-size:20px 20px;background-position:4px center}.input-icon{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path></svg>')}.input-icon-array{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 16v-6a2 2 0 1 1 4 0v6"></path> <path d="M10 13h4"></path></svg>')}.input-icon-boolean{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 16h2a2 2 0 1 0 0 -4h-2h2a2 2 0 1 0 0 -4h-2v8z"></path></svg>')}.input-icon-number{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 16v-8l4 8v-8"></path></svg>')}.input-icon-object{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M12 8a2 2 0 0 1 2 2v4a2 2 0 1 1 -4 0v-4a2 2 0 0 1 2 -2z"></path></svg>')}.input-icon-string{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 15a1 1 0 0 0 1 1h2a1 1 0 0 0 1 -1v-2a1 1 0 0 0 -1 -1h-2a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1"></path></svg>')}.cmp-input-item-unregistered{opacity:.4}.cmp-input-item-unregistered .input-icon:after{content:"";position:absolute;top:11px;left:4px;width:20px;height:2px;background-color:#000;transform:rotate(-45deg)}.cmp-prop-info{border-bottom:1px solid var(--border-color)}.cmp-input-readonly{margin:16px 0;padding:0 16px;display:grid;grid-template-columns:50% 50%;gap:12px}.cmp-input-readonly h3{margin:0;font-size:14px;font-weight:500}.cmp-input-readonly span{margin-top:2px;font-size:12px;font-weight:300;opacity:.8}.cmp-input-detail{margin:16px 0}.cmp-input-detail a{color:var(--primary-color);text-decoration:none}.cmp-input-detail a:hover{text-decoration:underline}.input-cover{position:absolute;top:175px;left:0;width:100%;height:100%;background:var(--background-color);transform:translateZ(0);transition:all var(--transition-time) ease-in-out;pointer-events:auto}.input-enabled .input-cover{transform:translate3d(0,105%,0);pointer-events:none}.input-loading-icon{position:absolute;display:inline-block;top:190px;left:0;width:100%;transform:translateZ(0);pointer-events:auto;opacity:0;transition:all 50ms ease-in-out;transition-delay:50ms;pointer-events:none}.input-loading .input-loading-icon{opacity:.5}:host{position:fixed;inset:0;z-index:2147483646;user-select:none;pointer-events:none;color:var(--text-color)}aside{position:absolute;top:0;right:0;width:var(--menu-width);height:100%;transform:translate3d(105%,0,0);transition:transform var(--transition-time) ease-in-out;background:var(--background-color);box-shadow:#000000c9 5px 0 20px;overflow:hidden;z-index:1}:host(.show-builder-menu) aside{pointer-events:auto;transform:translateZ(0)}#hit{position:absolute;inset:0;display:none}:host(.show-builder-menu) #hit{display:block;pointer-events:auto}#version{position:absolute;bottom:6px;right:6px;font-size:8px;color:#9b9b9b}</style><div id="hit"></div> <aside data-view="nav-home"> <section class="nav-home"> <header> <svg class="builder-logo" viewBox="0 0 31 36" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M31 9.96854C31.0016 11.4553 30.6701 12.9236 30.03 14.2654C29.3898 15.6072 28.4572 16.7884 27.3007 17.7221L0.702841 2.61812C0.601104 2.56012 0.506714 2.49008 0.421705 2.40951C0.288323 2.27871 0.182333 2.12263 0.109928 1.95039C0.0375215 1.77814 0.000151253 1.59319 0 1.40633C0 1.03335 0.148098 0.675643 0.411715 0.411905C0.675332 0.148167 1.03287 0 1.40568 0L21.036 0C23.6786 0 26.213 1.05025 28.0816 2.91972C29.9502 4.78918 31 7.32472 31 9.96854Z" fill="#18B4F4" /> <path d="M31 25.4757C31.0004 26.7849 30.7429 28.0815 30.2423 29.2912C29.7417 30.5009 29.0078 31.6001 28.0825 32.526C27.1572 33.4519 26.0587 34.1864 24.8497 34.6875C23.6406 35.1886 22.3448 35.4465 21.0361 35.4465H1.40573C1.12766 35.4436 0.856725 35.3581 0.627199 35.201C0.397672 35.044 0.219871 34.8223 0.116289 34.5641C0.0127078 34.3059 -0.011999 34.0228 0.0452946 33.7505C0.102588 33.4783 0.239308 33.2292 0.438156 33.0347C0.517415 32.9551 0.606358 32.8858 0.702893 32.8284L11.1705 26.8843L27.2984 17.7244C28.4548 18.6579 29.3874 19.8387 30.028 21.18C30.6685 22.5213 31.0007 23.9891 31 25.4757Z" fill="#FD6B3C" /> <path d="M27.3011 17.7221L11.1709 26.8843L0.703209 32.8284C0.602697 32.8843 0.509784 32.9528 0.426758 33.0323C4.41799 28.9369 6.6496 23.442 6.64456 17.7221C6.65208 12.0015 4.42111 6.50517 0.429101 2.40948C0.51411 2.49005 0.6085 2.56009 0.710237 2.61809L27.3011 17.7221Z" fill="#A97FF2" /> </svg> <div> <h2 class="builder-home-title">Builder Devtools</h2> <p><button id="go-to-builder">Go to Builder</button></p> </div> <button id="close" aria-label="Close Menu"> <svg viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" > <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M18 6l-12 12" /> <path d="M6 6l12 12" /> </svg> </button> </header> <div class="section-content"> <ul class="list"> <li> <button id="components-link"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M21 16.008V7.99001C20.9994 7.64108 20.9066 7.29851 20.731 6.99699C20.5554 6.69547 20.3032 6.44571 20 6.27301L13 2.26501C12.6954 2.09103 12.3508 1.99951 12 1.99951C11.6492 1.99951 11.3046 2.09103 11 2.26501L4 6.27301C3.381 6.62801 3 7.28301 3 7.99101V16.009C3 16.718 3.381 17.372 4 17.726L11 21.734C11.3046 21.908 11.6492 21.9995 12 21.9995C12.3508 21.9995 12.6954 21.908 13 21.734L20 17.726C20.619 17.371 21 16.716 21 16.008Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 22V12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 12L20.73 6.95996" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M3.26999 6.95996L12 12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> </svg> <span>Components</span> </button> </li> <li> <button id="settings-link"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M10.325 4.317C10.751 2.561 13.249 2.561 13.675 4.317C13.7389 4.5808 13.8642 4.82578 14.0407 5.032C14.2172 5.23822 14.4399 5.39985 14.6907 5.50375C14.9414 5.60764 15.2132 5.65085 15.4838 5.62987C15.7544 5.60889 16.0162 5.5243 16.248 5.383C17.791 4.443 19.558 6.209 18.618 7.753C18.4769 7.98466 18.3924 8.24634 18.3715 8.51677C18.3506 8.78721 18.3938 9.05877 18.4975 9.30938C18.6013 9.55999 18.7627 9.78258 18.9687 9.95905C19.1747 10.1355 19.4194 10.2609 19.683 10.325C21.439 10.751 21.439 13.249 19.683 13.675C19.4192 13.7389 19.1742 13.8642 18.968 14.0407C18.7618 14.2172 18.6001 14.4399 18.4963 14.6907C18.3924 14.9414 18.3491 15.2132 18.3701 15.4838C18.3911 15.7544 18.4757 16.0162 18.617 16.248C19.557 17.791 17.791 19.558 16.247 18.618C16.0153 18.4769 15.7537 18.3924 15.4832 18.3715C15.2128 18.3506 14.9412 18.3938 14.6906 18.4975C14.44 18.6013 14.2174 18.7627 14.0409 18.9687C13.8645 19.1747 13.7391 19.4194 13.675 19.683C13.249 21.439 10.751 21.439 10.325 19.683C10.2611 19.4192 10.1358 19.1742 9.95929 18.968C9.7828 18.7618 9.56011 18.6001 9.30935 18.4963C9.05859 18.3924 8.78683 18.3491 8.51621 18.3701C8.24559 18.3911 7.98375 18.4757 7.752 18.617C6.209 19.557 4.442 17.791 5.382 16.247C5.5231 16.0153 5.60755 15.7537 5.62848 15.4832C5.64942 15.2128 5.60624 14.9412 5.50247 14.6906C5.3987 14.44 5.23726 14.2174 5.03127 14.0409C4.82529 13.8645 4.58056 13.7391 4.317 13.675C2.561 13.249 2.561 10.751 4.317 10.325C4.5808 10.2611 4.82578 10.1358 5.032 9.95929C5.23822 9.7828 5.39985 9.56011 5.50375 9.30935C5.60764 9.05859 5.65085 8.78683 5.62987 8.51621C5.60889 8.24559 5.5243 7.98375 5.383 7.752C4.443 6.209 6.209 4.442 7.753 5.382C8.753 5.99 10.049 5.452 10.325 4.317Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M9 12C9 12.7956 9.31607 13.5587 9.87868 14.1213C10.4413 14.6839 11.2044 15 12 15C12.7956 15 13.5587 14.6839 14.1213 14.1213C14.6839 13.5587 15 12.7956 15 12C15 11.2044 14.6839 10.4413 14.1213 9.87868C13.5587 9.31607 12.7956 9 12 9C11.2044 9 10.4413 9.31607 9.87868 9.87868C9.31607 10.4413 9 11.2044 9 12Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> </svg> <span>Settings</span> </button> </li> <li> <button id="add-page-link"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" > <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M14 3v4a1 1 0 0 0 1 1h4" /> <path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z" /> <path d="M12 11l0 6" /> <path d="M9 14l6 0" /> </svg> <span>Add Builder Page</span> </button> </li> <li> <button id="import-from-figma"> <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-figma" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" > <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M15 12m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0" /> <path d="M6 3m0 3a3 3 0 0 1 3 -3h6a3 3 0 0 1 3 3v0a3 3 0 0 1 -3 3h-6a3 3 0 0 1 -3 -3z" /> <path d="M9 9a3 3 0 0 0 0 6h3m-3 0a3 3 0 1 0 3 3v-15" /> </svg> <span>Import From Figma</span> </button> </li> </ul> </div> <footer> <ul class="list"> <li> <a href="https://docs.google.com/forms/d/e/1FAIpQLSdqZcJpRtm_Ia5DTHP6SDY9Xa6LID3KiTjRWkjMzWyJRUtSHw/viewform" target="_blank" > <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M11.013 17.0114L10.013 18.0114L2.513 10.5834C2.0183 10.102 1.62864 9.52342 1.36854 8.88404C1.10845 8.24466 0.983558 7.55836 1.00173 6.86834C1.01991 6.17832 1.18076 5.49954 1.47415 4.87474C1.76755 4.24994 2.18713 3.69266 2.70648 3.23799C3.22583 2.78331 3.8337 2.4411 4.49181 2.23289C5.14991 2.02468 5.844 1.95499 6.53036 2.02821C7.21673 2.10143 7.8805 2.31596 8.47987 2.65831C9.07925 3.00066 9.60124 3.46341 10.013 4.01741C10.8086 2.95654 11.9931 2.2552 13.3059 2.06766C14.6186 1.88012 15.9521 2.22176 17.013 3.01741C18.0739 3.81306 18.7752 4.99755 18.9627 6.3103C19.1503 7.62305 18.8086 8.95654 18.013 10.0174" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> <path d="M18.2006 19.8175L16.0286 20.9555C15.9642 20.989 15.8917 21.004 15.8192 20.9987C15.7467 20.9934 15.6771 20.9681 15.6182 20.9256C15.5593 20.8831 15.5134 20.825 15.4855 20.7579C15.4577 20.6907 15.4491 20.6172 15.4606 20.5455L15.8756 18.1345L14.1186 16.4275C14.0662 16.3768 14.0291 16.3123 14.0115 16.2416C13.9939 16.1708 13.9966 16.0965 14.0192 16.0271C14.0418 15.9578 14.0835 15.8962 14.1394 15.8494C14.1954 15.8026 14.2634 15.7725 14.3356 15.7625L16.7636 15.4105L17.8496 13.2175C17.8821 13.1521 17.9322 13.0972 17.9942 13.0588C18.0562 13.0204 18.1277 13 18.2006 13C18.2736 13 18.3451 13.0204 18.4071 13.0588C18.4691 13.0972 18.5191 13.1521 18.5516 13.2175L19.6376 15.4105L22.0656 15.7625C22.1377 15.7728 22.2054 15.8031 22.2611 15.85C22.3168 15.8968 22.3583 15.9583 22.3809 16.0275C22.4034 16.0967 22.4062 16.1708 22.3888 16.2415C22.3715 16.3122 22.3347 16.3766 22.2826 16.4275L20.5256 18.1345L20.9396 20.5445C20.9521 20.6163 20.9441 20.6902 20.9166 20.7578C20.8891 20.8254 20.8433 20.8839 20.7842 20.9267C20.7252 20.9695 20.6553 20.9949 20.5825 21C20.5098 21.005 20.4371 20.9896 20.3726 20.9555L18.2006 19.8175Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> </svg> <span>Give Feedback</span> </a> </li> </ul> <div id="version"></div> </footer> </section> <section class="nav-cmp-list"> <header> <button class="back-button"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div class="search-container"> <div class="search-input-wrapper"> <svg class="search-icon" viewBox="0 0 24 24" width="16" height="16"> <path fill="none" stroke="currentColor" stroke-width="2" d="M15.5 15.5L20 20M10 17C6.13401 17 3 13.866 3 10C3 6.13401 6.13401 3 10 3C13.866 3 17 6.13401 17 10C17 13.866 13.866 17 10 17Z" /> </svg> <input type="text" id="component-search" class="component-search-input" placeholder="Search components..." autocomplete="off" spellcheck="false" /> <button id="clear-search" class="clear-search-button" type="button" aria-label="Clear search" > <svg viewBox="0 0 24 24" width="16" height="16"> <path fill="none" stroke="currentColor" stroke-width="2" d="M6 6l12 12M6 18L18 6" /> </svg> </button> </div> </div> <div> <h2>Custom Components</h2> <p> <button id="open-builder-registry"></button> </p> </div> </header> <div class="section-content"> <div id="cmp-list" class="cmp-list nav-list"></div> </div> <div class="nav-loading-icon spinner"></div> <footer> <p class="info"> Expand on Builder's selection of built-in blocks by <a target="_blank" href="https://www.builder.io/c/docs/custom-components-intro" >registering components</a > from your codebase. This way, teammates can drag and drop your components within Builder's Visual Editor just like any other block. </p> </footer> </section> <section class="nav-cmp-detail"> <header> <button class="back-button" data-back="nav-cmp-list"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div> <h2 id="cmp-detail-title"></h2> <p> <button id="cmp-open-source"></button> </p> </div> </header> <div class="section-content"> <div id="cmp-error"></div> <label class="ui-switch"> <div> <h3>Register Component</h3> <p> Registers this component so it can be used within Builder Visual CMS </p> </div> <input type="checkbox" role="switch" id="cmp-register" /> <span class="switcher"></span> </label> <div id="cmp-detail"> <label class="ui-text-input"> <h3>Component Name</h3> <div class="input"> <input type="text" id="cmp-name" autocapitalize="off" autocorrect="off" spellcheck="false" autocomplete="off" minlength="2" maxlength="30" required placeholder="e.g. My Counter" /> </div> <p> Unique name to identify this custom component within Builder. Press ESC to cancel </p> </label> <div class="cmp-detail-inputs-container"> <h3> <span>Builder Inputs (Props)</span> <button class="cmp-detail-inputs-reload" id="btn-inputs-reload"> Reload </button> </h3> <div id="cmp-detail-inputs"></div> </div> </div> </div> <div class="cmp-cover"></div> <div class="cmp-loading-icon spinner"></div> </section> <section class="nav-cmp-input"> <header> <button class="back-button" data-back="nav-cmp-detail"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div> <h2 id="cmp-input-title"></h2> <p> <button id="input-open-source"></button> </p> </div> </header> <div class="section-content"> <label class="ui-switch"> <div> <h3>Enable Input</h3> <p>Add this component prop as a Builder input</p> </div> <input type="checkbox" role="switch" id="input-register" /> <span class="switcher"></span> </label> <div class="cmp-prop-info"> <div class="cmp-input-readonly"> <h3>Prop Name</h3> <span id="cmp-prop-name"></span> </div> <div class="cmp-input-readonly"> <h3>Prop Type</h3> <span id="cmp-prop-type"></span> </div> </div> <div class="cmp-input-detail"> <label class="ui-text-input"> <h3>Builder Input Name</h3> <div class="input"> <input type="text" id="input-name" autocapitalize="off" autocorrect="off" spellcheck="false" autocomplete="off" minlength="1" maxlength="30" required placeholder="e.g. Text" /> </div> <p> Friendly name to identify this component prop as a Builder input. Press ESC to cancel </p> </label> <label class="ui-select"> <h3>Builder Input Type</h3> <div class="select"> <select id="input-type"></select> </div> <p> Correlate to what editing UI is appropriate for this Builder input. <a href="https://www.builder.io/c/docs/custom-components-input-types" target="_blank" >Read more about input types.</a > </p> </label> </div> <div class="input-cover"></div> <div class="input-loading-icon spinner"></div> </div> </section> <section class="nav-settings"> <header> <button class="back-button"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div> <h2>Settings</h2> <p>Configure Builder's Devtools</p> </div> </header> <div class="section-content"> <label class="ui-switch"> <div> <h3>Enable edit button in UI</h3> <p>Enables the edit button so you can edit content in Builder</p> </div> <input type="checkbox" role="switch" id="enable-edit" /> <span class="switcher"></span> </label> </div> </section> <div class="ui-toast" id="toast"></div> </aside> <button class="menu-toggle" aria-label="Toggle Builder Devtools"> <div> <div class="highlight-bg"></div> <svg viewBox="0 0 31 36" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M31 9.96854C31.0016 11.4553 30.6701 12.9236 30.03 14.2654C29.3898 15.6072 28.4572 16.7884 27.3007 17.7221L0.702841 2.61812C0.601104 2.56012 0.506714 2.49008 0.421705 2.40951C0.288323 2.27871 0.182333 2.12263 0.109928 1.95039C0.0375215 1.77814 0.000151253 1.59319 0 1.40633C0 1.03335 0.148098 0.675643 0.411715 0.411905C0.675332 0.148167 1.03287 0 1.40568 0L21.036 0C23.6786 0 26.213 1.05025 28.0816 2.91972C29.9502 4.78918 31 7.32472 31 9.96854Z" fill="#18B4F4" /> <path d="M31 25.4757C31.0004 26.7849 30.7429 28.0815 30.2423 29.2912C29.7417 30.5009 29.0078 31.6001 28.0825 32.526C27.1572 33.4519 26.0587 34.1864 24.8497 34.6875C23.6406 35.1886 22.3448 35.4465 21.0361 35.4465H1.40573C1.12766 35.4436 0.856725 35.3581 0.627199 35.201C0.397672 35.044 0.219871 34.8223 0.116289 34.5641C0.0127078 34.3059 -0.011999 34.0228 0.0452946 33.7505C0.102588 33.4783 0.239308 33.2292 0.438156 33.0347C0.517415 32.9551 0.606358 32.8858 0.702893 32.8284L11.1705 26.8843L27.2984 17.7244C28.4548 18.6579 29.3874 19.8387 30.028 21.18C30.6685 22.5213 31.0007 23.9891 31 25.4757Z" fill="#FD6B3C" /> <path d="M27.3011 17.7221L11.1709 26.8843L0.703209 32.8284C0.602697 32.8843 0.509784 32.9528 0.426758 33.0323C4.41799 28.9369 6.6496 23.442 6.64456 17.7221C6.65208 12.0015 4.42111 6.50517 0.429101 2.40948C0.51411 2.49005 0.6085 2.56009 0.710237 2.61809L27.3011 17.7221Z" fill="#A97FF2" /> </svg> </div> </button>\`,Nr(e),Br(e),Ur(e),Ar(e),Dr(e),Fr(e),this.setAttribute("aria-hidden","true"),e.getElementById("version").textContent="v1.6.2"}highlightOpener(){let e=this.shadowRoot.querySelector(".menu-toggle");e.classList.add("menu-toggle-highlight"),e.classList.add("menu-toggle-highlight-no-transition"),setTimeout(()=>{e.classList.remove("menu-toggle-highlight-no-transition"),setTimeout(()=>{e.classList.remove("menu-toggle-highlight")},20)},20)}};var ki=\`<style>*,*:before,*:after{box-sizing:border-box}html,body,:host{position:fixed;top:0;left:0;width:100%;height:100vh;z-index:2147483646;margin:0;padding:0;line-height:1.8;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";background-color:#252525;color:#fff;transition:opacity .25s ease-in-out}:host([aria-hidden="true"]){opacity:0;pointer-events:none}main{position:absolute;top:0;left:0;width:100%;height:100vh}h1{margin-top:0;font-size:24px;font-weight:300;line-height:1.4}p{margin:20px 0;font-weight:300}button{cursor:pointer}aside{position:absolute;top:0;left:0;width:350px;height:100vh;padding:60px 0 0 50px;background-color:#121212}aside ul{margin:30px 0 0;padding:0;list-style:none}aside li{position:relative;margin:0;padding:20px 10px;font-weight:300}aside li.highlight{color:#48a1ff}aside li.active{font-weight:700}aside li .circle{position:absolute;top:20px;left:10px;width:24px;height:24px;border:3px solid white;border-radius:50%;font-size:14px}aside li.highlight .circle{border-color:#48a1ff}aside li.active .circle:after{content:"";position:absolute;top:3px;left:3px;width:12px;height:12px;border-radius:50%;background-color:#48a1ff}aside li.completed .circle{background-color:#48a1ff}aside li.completed .circle:after{content:"";position:absolute;top:2px;left:6px;width:6px;height:13px;border:3px solid black;border-top:none;border-left:none;transform:rotate(45deg)}aside li .line{position:absolute;top:44px;left:21px;width:3px;height:45px;background-color:#fff}aside li.completed .line{background-color:#48a1ff}aside li span{display:block;margin-left:44px}nav{margin-top:30px}section{position:absolute;top:135px;left:350px;padding:0 80px 0 140px;transition:opacity .15s ease-in-out}section[aria-hidden=true]{pointer-events:none;opacity:0}section h1,section p{min-width:300px;max-width:600px}.button{position:relative;display:inline-block;color:#fff;background-color:#48a1ff;border-radius:4px;text-decoration:none;padding:10px 40px 10px 20px;white-space:nowrap}.button:hover{background-color:#48a1ffd9}#button-icon{position:absolute;top:1px;right:5px;bottom:0;width:30px;background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="none" stroke="white" stroke-linecap="square" stroke-miterlimit="10" stroke-width="48" d="M184 112l144 144-144 144"/></svg>');background-repeat:no-repeat;background-position:center;background-size:24px 24px}.button[aria-disabled=true]{opacity:.9;background-color:#ffffff4d;pointer-events:none;padding-right:60px}.button[aria-disabled=true] #button-icon{top:21px;right:29px;width:8px;height:8px;border-radius:4px;background:#fff;color:#fff;animation:dot-flashing .5s infinite linear alternate;animation-delay:.25s}.button[aria-disabled=true] #button-icon:before,.button[aria-disabled=true] #button-icon:after{content:"";display:inline-block;position:absolute;top:0}.button[aria-disabled=true] #button-icon:before{left:-12px;width:8px;height:8px;border-radius:4px;background-color:#fff;color:#fff;animation:dot-flashing .5s infinite alternate;animation-delay:0s}.button[aria-disabled=true] #button-icon:after{left:12px;width:8px;height:8px;border-radius:4px;background-color:#fff;color:#fff;animation:dot-flashing .5s infinite alternate;animation-delay:.5s}@keyframes dot-flashing{0%{background-color:#fff}50%,to{background-color:#ffffff4d}}.logo{margin-left:9px;background:url('data:image/svg+xml,<svg viewBox="0 0 150 32" fill="none" xmlns="http://www.w3.org/2000/svg" > <g clip-path="url(%23clip0_4_304)"> <path d="M27.9858 8.99927C27.9872 10.3415 27.688 11.667 27.1101 12.8783C26.5321 14.0896 25.6902 15.156 24.6462 15.9989V15.9989L0.634502 2.36355C0.542657 2.31119 0.457444 2.24796 0.380701 2.17523C0.260289 2.05715 0.164605 1.91624 0.0992389 1.76075C0.0338732 1.60525 0.000136546 1.43828 0 1.26959C0 0.932873 0.133698 0.609948 0.371683 0.371854C0.609667 0.13376 0.932443 0 1.269 0L18.9906 0C21.3763 0 23.6642 0.948135 25.3512 2.63583C27.0381 4.32352 27.9858 6.61252 27.9858 8.99927V8.99927Z" fill="%2318B4F4" /> <path d="M27.9858 22.9986C27.9861 24.1806 27.7536 25.351 27.3017 26.4431C26.8498 27.5352 26.1873 28.5275 25.352 29.3634C24.5167 30.1993 23.5249 30.8624 22.4335 31.3147C21.342 31.7671 20.1721 32 18.9907 32H1.26906C1.01802 31.9973 0.77343 31.9202 0.566221 31.7784C0.359012 31.6366 0.198499 31.4364 0.104989 31.2034C0.0114791 30.9703 -0.0108254 30.7147 0.0408974 30.4689C0.0926201 30.2231 0.216046 29.9982 0.395559 29.8226V29.8226C0.467112 29.7508 0.547407 29.6882 0.634555 29.6364L10.0844 24.2703L24.6441 16.001C25.688 16.8438 26.53 17.9097 27.1083 19.1206C27.6866 20.3315 27.9864 21.6566 27.9858 22.9986V22.9986Z" fill="%23FD6B3C" /> <path d="M24.6461 15.9989L10.0843 24.2703L0.634458 29.6365C0.54372 29.6868 0.459841 29.7487 0.384888 29.8205C3.98804 26.1233 6.00266 21.1627 5.99812 15.9989C6.0049 10.8346 3.99085 5.87268 0.387003 2.17523C0.463746 2.24796 0.548959 2.31119 0.640803 2.36355L24.6461 15.9989Z" fill="%23A97FF2" /> <path d="M47.6659 11.7352C51.8177 11.7352 54.1632 15.0531 54.1632 19.0714C54.1632 23.0896 51.8177 26.3821 47.6659 26.3821C45.5086 26.3821 43.8589 25.5188 42.9473 24.0545L42.5709 26.052H39.9736V6.77115H43.1884V13.8914C43.971 12.6959 45.5086 11.7352 47.6659 11.7352ZM47.0187 23.5488C49.4446 23.5488 50.9547 21.5809 50.9547 19.0714C50.9547 16.5089 49.4446 14.5664 47.0187 14.5664C44.5928 14.5664 43.0806 16.5047 43.0806 19.0714C43.0806 21.583 44.5653 23.5488 47.0187 23.5488V23.5488Z" fill="white" /> <path d="M65.4595 20.2859V12.0611H68.668V20.123C68.668 23.7202 67.0246 26.3821 62.4943 26.3821C57.9639 26.3821 56.3206 23.7117 56.3206 20.123V12.0611H59.529V20.2859C59.529 22.4696 60.5527 23.5488 62.49 23.5488C64.4274 23.5488 65.4595 22.4696 65.4595 20.2859Z" fill="white" /> <path d="M71.2355 7.74451C71.2247 7.46284 71.2724 7.18199 71.3755 6.91968C71.4787 6.65737 71.6351 6.41929 71.8348 6.22047C72.0345 6.02165 72.2732 5.8664 72.5359 5.76452C72.7986 5.66264 73.0796 5.61633 73.3611 5.62853C74.5793 5.62853 75.4571 6.50666 75.4571 7.75509C75.4571 9.00352 74.5793 9.8224 73.3611 9.8224C72.1428 9.8224 71.2355 8.9612 71.2355 7.74451Z" fill="white" /> <path d="M128.476 7.74451C128.465 7.46376 128.513 7.18383 128.615 6.92227C128.718 6.66071 128.873 6.42315 129.072 6.22449C129.27 6.02583 129.508 5.87035 129.769 5.7678C130.031 5.66524 130.31 5.61783 130.591 5.62852C131.809 5.62852 132.687 6.50666 132.687 7.75509C132.687 9.00352 131.809 9.8224 130.591 9.8224C129.373 9.8224 128.476 8.9612 128.476 7.74451Z" fill="white" /> <path d="M122.302 24.1031C122.291 23.8223 122.339 23.5422 122.441 23.2805C122.543 23.0188 122.699 22.7811 122.897 22.5824C123.096 22.3837 123.334 22.2282 123.595 22.1258C123.857 22.0233 124.137 21.9761 124.417 21.9872C125.636 21.9872 126.513 22.8653 126.513 24.1031C126.513 25.341 125.636 26.1726 124.417 26.1726C123.199 26.1726 122.302 25.3219 122.302 24.1031Z" fill="white" /> <path d="M74.9516 12.059H71.7432V26.0583H74.9516V12.059Z" fill="white" /> <path d="M78.16 26.0583V6.77115H81.3685V26.0626L78.16 26.0583Z" fill="white" /> <path d="M94.6063 6.77115H97.8148V26.0626H95.2239L94.8474 24.0651C93.9591 25.523 92.3094 26.3927 90.131 26.3927C86.0046 26.3927 83.6591 23.0748 83.6591 19.0819C83.6591 15.0891 86.0046 11.7458 90.131 11.7458C92.3137 11.7458 93.8238 12.7149 94.6063 13.902V6.77115ZM90.7993 14.5707C88.3734 14.5707 86.8633 16.5131 86.8633 19.0756C86.8633 21.5851 88.3734 23.553 90.7993 23.553C93.2252 23.553 94.7354 21.5851 94.7354 19.0756C94.7396 16.5047 93.257 14.5664 90.8036 14.5664L90.7993 14.5707Z" fill="white" /> <path d="M113.479 22.2284C112.482 24.7359 110.162 26.3821 107.117 26.3821C102.887 26.3821 100.137 23.225 100.137 19.0439C100.137 14.9706 102.942 11.7353 107.093 11.7353C111.245 11.7353 113.969 14.8902 113.969 18.991C113.982 19.3255 113.953 19.6604 113.883 19.9876H103.288C103.53 22.2009 104.959 23.6292 107.197 23.6292C108.735 23.6292 110.001 22.8738 110.594 21.473L113.479 22.2284ZM103.341 17.6156H110.784C110.513 15.6731 109.166 14.3506 107.089 14.3506C105.012 14.3506 103.665 15.7006 103.341 17.6156V17.6156Z" fill="white" /> <path d="M123.779 14.9452C123.538 14.9117 123.295 14.8933 123.051 14.8902C120.786 14.8902 119.439 16.0772 119.439 18.7751V26.0583H116.23V12.0611H118.821L119.195 14.0014C119.707 13.1127 120.887 11.9257 123.322 11.9257C123.455 11.9257 123.779 11.9532 123.779 11.9532V14.9452Z" fill="white" /> <path d="M132.192 12.059H128.984V26.0583H132.192V12.059Z" fill="white" /> <path d="M134.483 19.0714C134.483 15.1335 137.287 11.7353 141.735 11.7353C146.183 11.7353 149.015 15.1335 149.015 19.0714C149.015 23.0092 146.213 26.3821 141.735 26.3821C137.258 26.3821 134.483 23.0092 134.483 19.0714ZM141.735 23.5488C144.083 23.5488 145.806 21.7692 145.806 19.0714C145.806 16.3735 144.083 14.5664 141.735 14.5664C139.387 14.5664 137.687 16.346 137.687 19.0714C137.687 21.7968 139.417 23.5488 141.735 23.5488V23.5488Z" fill="white" /> </g> <defs> <clipPath id="clip0_4_304"> <rect width="149.015" height="32" fill="white" /> </clipPath> </defs> </svg>');background-repeat:no-repeat;width:150px;height:32px}@media (max-width: 840px){aside{width:250px;padding:60px 0 0 20px}section{left:250px;padding:0 80px}}@media (max-width: 590px){aside{width:230px;padding:60px 0 0 10px}section{left:230px;padding:0 40px}}#modified-files-message a{color:#cbcbcb;font-weight:300;text-decoration:underline}#modified-files-message a:hover{color:#fff;text-decoration:none}#restart-warning{border-radius:4px;padding:8px 16px;border:1px solid #fd6b3c;background:#fd6b3c1a}#react-router-steps{margin:0 0 5px;padding:0 20px}#need-help{color:#48a1ff;text-decoration:none}#router-message{border-radius:4px;padding:16px;border:1px solid #48a1ff}#router-finish-button{margin-top:12px}#router-checkbox-div{display:flex;align-items:center}#router-checkbox{margin-right:10px;width:15px;height:15px}#success-title{display:flex;align-items:center;gap:10px}#success-title .check-icon{display:inline-block;width:24px;height:24px;border:2px solid #28a745;border-radius:50%;position:relative}#success-title .check-icon:before{content:"";position:absolute;top:50%;left:50%;width:6px;height:12px;border:solid #28a745;border-width:0 2px 2px 0;transform:translate(-50%,-60%) rotate(45deg)}
|
|
1131
1131
|
</style>\`,dt=class extends HTMLElement{constructor(){super()}connectedCallback(){let e=this.attachShadow({mode:"open"});e.innerHTML=ki+\`<main>
|
|
1132
1132
|
<aside>
|
|
1133
1133
|
<div class="logo"></div>
|
|
@@ -1166,7 +1166,7 @@ Visit https://www.docs.developers.amplitude.com/data/sdks/browser-2/#tracking-de
|
|
|
1166
1166
|
</nav>
|
|
1167
1167
|
</section>
|
|
1168
1168
|
</main>
|
|
1169
|
-
\`,Oi();let n=new URL(yn,Oe);n.searchParams.set(gn,location.href);let r=e.querySelectorAll(".next-step");for(let i of r)i.setAttribute("href",n.href);se("overview step viewed")}},Oi=()=>{let t=document.head.querySelector("link[rel='icon'], link[rel='icon shortcut']");t?(t.href="https://cdn.builder.io/favicon.ico",t.removeAttribute("type")):(t=document.createElement("link"),t.rel="icon",t.href="https://cdn.builder.io/favicon.ico",document.head.appendChild(t))};var Vr=async()=>{(await Tn()).isValid||Ui()},Ui=()=>{customElements.get("builder-dev-tools-overview")||customElements.define("builder-dev-tools-overview",dt);let t=document.querySelector("builder-dev-tools-overview");t||(t=document.createElement("builder-dev-tools-overview"),t.setAttribute("aria-hidden","true"),document.body.appendChild(t)),setTimeout(()=>{t.removeAttribute("aria-hidden")},32)};var Mi=()=>{try{customElements.get("builder-dev-tools-edit")||customElements.define("builder-dev-tools-edit",Ue),customElements.get("builder-dev-tools-menu")||customElements.define("builder-dev-tools-menu",lt);let t=document.querySelector("builder-dev-tools-menu");t||(t=document.createElement("builder-dev-tools-menu"),t.setAttribute("data-version","1.6.
|
|
1169
|
+
\`,Oi();let n=new URL(yn,Oe);n.searchParams.set(gn,location.href);let r=e.querySelectorAll(".next-step");for(let i of r)i.setAttribute("href",n.href);se("overview step viewed")}},Oi=()=>{let t=document.head.querySelector("link[rel='icon'], link[rel='icon shortcut']");t?(t.href="https://cdn.builder.io/favicon.ico",t.removeAttribute("type")):(t=document.createElement("link"),t.rel="icon",t.href="https://cdn.builder.io/favicon.ico",document.head.appendChild(t))};var Vr=async()=>{(await Tn()).isValid||Ui()},Ui=()=>{customElements.get("builder-dev-tools-overview")||customElements.define("builder-dev-tools-overview",dt);let t=document.querySelector("builder-dev-tools-overview");t||(t=document.createElement("builder-dev-tools-overview"),t.setAttribute("aria-hidden","true"),document.body.appendChild(t)),setTimeout(()=>{t.removeAttribute("aria-hidden")},32)};var Mi=()=>{try{customElements.get("builder-dev-tools-edit")||customElements.define("builder-dev-tools-edit",Ue),customElements.get("builder-dev-tools-menu")||customElements.define("builder-dev-tools-menu",lt);let t=document.querySelector("builder-dev-tools-menu");t||(t=document.createElement("builder-dev-tools-menu"),t.setAttribute("data-version","1.6.2"),document.body.appendChild(t));let e=document.querySelector("builder-dev-tools-edit");e||(e=document.createElement("builder-dev-tools-edit"),document.body.appendChild(e));let n=document.getElementById("builder-dev-tools-style");n||(n=document.createElement("style"),n.id="builder-dev-tools-style",n.innerHTML=".builder-no-scroll{overflow:hidden !important}",document.head.appendChild(n)),Vr(),Pr()}catch(t){console.error("Builder Devtools:",t)}};window.location===window.parent.location&&(console.debug("Builder.io Devtools v1.6.2"),Mi());})();`)}async function MD(e){return $D(e,`<!DOCTYPE html>
|
|
1170
1170
|
<html lang="en" dir="ltr">
|
|
1171
1171
|
<head>
|
|
1172
1172
|
<meta charset="utf-8" />
|
|
@@ -1332,12 +1332,12 @@ Visit https://www.docs.developers.amplitude.com/data/sdks/browser-2/#tracking-de
|
|
|
1332
1332
|
</script>
|
|
1333
1333
|
</body>
|
|
1334
1334
|
</html>
|
|
1335
|
-
`)}async function $D(e,r){let t=await ef(e),n=e.getFrameworks();return r.replace(/__LOCAL_APP_ID__/g,t).replace(/__DEV_TOOLS_URL__/g,e.devToolsServerUrl).replace(/__CLIENT_ID__/g,e.getClientId()).replace(/__FRAMEWORK__/g,n.length?n[0].name:"")}var UD=require("node:os");async function jD(e,r){let t=new URL("/cli-auth","https://builder.io");t.searchParams.set("client_id",e.getClientId()),t.searchParams.set("host",await e.getDeviceId()),t.searchParams.set("response_type","code"),t.searchParams.set("cli","true");let n=new URL(Mn,e.devToolsServerUrl);n.searchParams.set(To,(0,UD.platform)()),n.searchParams.set(wo,process.versions.node);let i=e.getFrameworks();return i.length>0&&(t.searchParams.set(di,i[0].name),n.searchParams.set(di,i[0].name)),t.searchParams.set("redirect_url",n.href),t.searchParams.set("preview_url",r),t.href}async function VD(e,r,t,n){try{if(!e)return is(t,n,400,"Builder context closed");let i=EI(t);if(i.pathname===_l){if(t.method==="POST"){let s=await xI(t);if(s)try{let o=await LD(e,JSON.parse(s));return KD(t,n,200,o)}catch(o){e.debug("Dev API Error",o.stack||o.message||o);let a={errors:[String(o.message||o)]};return KD(t,n,500,a)}}else if(t.method==="OPTIONS"){let s={"Access-Control-Allow-Methods":"POST, OPTIONS","Access-Control-Allow-Headers":"Content-Type, Cache-Control, X-Builder-Devtools-Version"},o=t.headers.origin;o&&o!=="null"?zD(new URL(o))&&(s["Access-Control-Allow-Origin"]=o):s["Access-Control-Allow-Origin"]="*",n.writeHead(200,s),n.end();return}return is(t,n,405,`${_l} is an API endpoint used only during development by the Builder.io Devtools client-side script`)}if(i.pathname===kl)return yI(t,n,200,await BD(e));if(i.pathname===Cd){let s=i.searchParams.get(Fl);return s?DI(n,302,await jD(e,s)):is(t,n,400,`Missing ${Fl} querystring`)}if(i.pathname===Mn)return bI(t,n,200,await MD(e));if(i.pathname===Sd){await Lt(e,{_:[]},{});let s=await li(e),{figmaBuilderLinks:o,foundErrors:a}=await fo({force:!0,mappingFiles:s,sys:e,print:!1});return po(t,n,200,"application/json",JSON.stringify({figmaBuilderLinks:o,foundErrors:a,version:2,local:!0},null,2))}return i.pathname===$n?(e.debug(`Close Dev Tools Server Requested: ${i.href}`),setTimeout(()=>{try{r.close(s=>{e.debug(`Dev Tools Server Closed Error: ${s}`)})}catch(s){e.debug(`Error closing devtools server: ${s}`)}},20),is(t,n,200,"Closing Dev Tools Server")):is(t,n,404,"Not found")}catch(i){return console.error("Dev Server Error",i),is(t,n,500,`Dev Server Error: ${i}`)}}function KD(e,r,t,n){po(e,r,t,"application/json",JSON.stringify(n))}function yI(e,r,t,n){po(e,r,t,"application/javascript",n)}function bI(e,r,t,n){po(e,r,t,"text/html",n)}function is(e,r,t,n){po(e,r,t,"text/plain",n)}function po(e,r,t,n,i){let s={"Content-Type":`${n}; charset=utf-8`,"Cache-Control":"no-cache, no-store, must-revalidate","X-Builder-Devtools-Version":"1.6.
|
|
1335
|
+
`)}async function $D(e,r){let t=await ef(e),n=e.getFrameworks();return r.replace(/__LOCAL_APP_ID__/g,t).replace(/__DEV_TOOLS_URL__/g,e.devToolsServerUrl).replace(/__CLIENT_ID__/g,e.getClientId()).replace(/__FRAMEWORK__/g,n.length?n[0].name:"")}var UD=require("node:os");async function jD(e,r){let t=new URL("/cli-auth","https://builder.io");t.searchParams.set("client_id",e.getClientId()),t.searchParams.set("host",await e.getDeviceId()),t.searchParams.set("response_type","code"),t.searchParams.set("cli","true");let n=new URL(Mn,e.devToolsServerUrl);n.searchParams.set(To,(0,UD.platform)()),n.searchParams.set(wo,process.versions.node);let i=e.getFrameworks();return i.length>0&&(t.searchParams.set(di,i[0].name),n.searchParams.set(di,i[0].name)),t.searchParams.set("redirect_url",n.href),t.searchParams.set("preview_url",r),t.href}async function VD(e,r,t,n){try{if(!e)return is(t,n,400,"Builder context closed");let i=EI(t);if(i.pathname===_l){if(t.method==="POST"){let s=await xI(t);if(s)try{let o=await LD(e,JSON.parse(s));return KD(t,n,200,o)}catch(o){e.debug("Dev API Error",o.stack||o.message||o);let a={errors:[String(o.message||o)]};return KD(t,n,500,a)}}else if(t.method==="OPTIONS"){let s={"Access-Control-Allow-Methods":"POST, OPTIONS","Access-Control-Allow-Headers":"Content-Type, Cache-Control, X-Builder-Devtools-Version"},o=t.headers.origin;o&&o!=="null"?zD(new URL(o))&&(s["Access-Control-Allow-Origin"]=o):s["Access-Control-Allow-Origin"]="*",n.writeHead(200,s),n.end();return}return is(t,n,405,`${_l} is an API endpoint used only during development by the Builder.io Devtools client-side script`)}if(i.pathname===kl)return yI(t,n,200,await BD(e));if(i.pathname===Cd){let s=i.searchParams.get(Fl);return s?DI(n,302,await jD(e,s)):is(t,n,400,`Missing ${Fl} querystring`)}if(i.pathname===Mn)return bI(t,n,200,await MD(e));if(i.pathname===Sd){await Lt(e,{_:[]},{});let s=await li(e),{figmaBuilderLinks:o,foundErrors:a}=await fo({force:!0,mappingFiles:s,sys:e,print:!1});return po(t,n,200,"application/json",JSON.stringify({figmaBuilderLinks:o,foundErrors:a,version:2,local:!0},null,2))}return i.pathname===$n?(e.debug(`Close Dev Tools Server Requested: ${i.href}`),setTimeout(()=>{try{r.close(s=>{e.debug(`Dev Tools Server Closed Error: ${s}`)})}catch(s){e.debug(`Error closing devtools server: ${s}`)}},20),is(t,n,200,"Closing Dev Tools Server")):is(t,n,404,"Not found")}catch(i){return console.error("Dev Server Error",i),is(t,n,500,`Dev Server Error: ${i}`)}}function KD(e,r,t,n){po(e,r,t,"application/json",JSON.stringify(n))}function yI(e,r,t,n){po(e,r,t,"application/javascript",n)}function bI(e,r,t,n){po(e,r,t,"text/html",n)}function is(e,r,t,n){po(e,r,t,"text/plain",n)}function po(e,r,t,n,i){let s={"Content-Type":`${n}; charset=utf-8`,"Cache-Control":"no-cache, no-store, must-revalidate","X-Builder-Devtools-Version":"1.6.2"},o=e.headers.origin;o&&o!=="null"?zD(new URL(o))&&(s["Access-Control-Allow-Origin"]=o):s["Access-Control-Allow-Origin"]="*",r.writeHead(t,s),r.end(i)}function zD(e){return e.hostname==="localhost"||e.origin==="https://builder.io"||e.origin==="https://www.builder.io"||e.origin.endsWith(".builder.io")?!0:e.port===""?!1:e.port!=="80"&&e.port!=="443"}function DI(e,r,t){e.writeHead(r,{Location:t}),e.end()}async function xI(e){let r="";for await(let t of e)r+=t;return r}function EI(e){let r=e.url||"/";return new URL(r,`http://${e.headers.host}`)}async function qD(e){if(globalThis.__builderDevToolsServer)return e.debug("reusing existing devtools server"),globalThis.__builderDevToolsServer.setContext(e),globalThis.__builderDevToolsServer;let r=await CI(e),t=(0,il.createServer)((i,s)=>{VD(e,t,i,s)}),n=()=>new Promise((i,s)=>{t.listening?(e.debug(`closing devtools server on port ${r}`),t.close(o=>{e=null,o?(e.debug(`error closing devtools server on port ${r}`),s(o)):(e&&e.debug(`closed devtools server on port ${r}`),i())})):(e.debug(`devtools server on port ${r} not listening`),i())});return process.once("SIGTERM",n),process.once("SIGINT",n),process.env.CI!=="true"&&process.stdin.on("end",n),globalThis.__builderDevToolsServer={url:new URL(`http://localhost:${r}`).href,port:r,setContext:i=>{e.debug(`set devtools context on server ${r}`),e=i},close:async()=>{globalThis.__builderDevToolsServer=null,await n()}},new Promise(i=>{t.listen(r,()=>{e.debug(`started devtools server on port ${r}`),i(globalThis.__builderDevToolsServer)})})}function CI(e){return new Promise(r=>{let t=e.port;try{(0,il.request)({hostname:"localhost",port:t,path:$n,method:"GET"},i=>{i.on("end",()=>{e.debug(`${$n} - Response ended`),r(t)})}).on("error",i=>{e.debug(`${$n} - No response ${i}`),r(t)}).end()}catch(n){e.debug(`${$n} - Error ${n}`),r(t)}})}async function Pp(e){let r={getPastSyncInfo:()=>null,resyncSnippet:()=>null,...e,devToolsServerUrl:"",isValid:!1,publicApiKey:"",serverShouldRestart:!1,port:e.port||5273,ignoreMissingConfig:!1},t=e.getFrameworks().map(s=>s.name).join(", ");r.debug(`create devtools ${WD} [${t}]`);let n=await qD(r);return r.devToolsServerUrl=n.url,r.port=n.port,{getUrl:()=>r.devToolsServerUrl}}var WD="1.6.2";var Dr=require("node:path"),vt=require("node:fs");var kn=V(Ze(),1);async function GD(e){console.log(""),ot((0,kn.bgCyan)((0,kn.bold)((0,kn.white)(" add ")))+" "+(0,kn.dim)(gt));let r=e.snippetId;if(!r&&!e.snippet)return he("SnippetId expected. npx builder.io add <snippetId>"),await ee(1);let t=gi(),n=e.snippet||null;if(!n&&r&&(t.start(`Fetching snippet ${r}`),n=await Ip(r),t.stop(`Fetched snippet ${r}`)),!n)return he(`No snippet found for id ${r}`),await ee(1);let i=process.cwd(),s=co(i)??i;if(n.files?.length>0){let o=Np(s,n.framework||"react"),a=e.path||await Mt({message:"Where should we copy the files?",initialValue:o,validate(u){if(u.length===0)return"File path is required!";if(u[0]!==".")return"Please enter a relative path."}});if(Me(a))return he("Cancelled sync"),await ee(0);let l=await sl(s,n,n.files,a,!1);return K.success("All files have been written successfully."),{snippet:n,pathInput:a,writtenFiles:l,timeStamp:Date.now()}}else{let{code:o,suggestedName:a,framework:l}=n;l&&(a=await TI(s,l,o)),a??(a="./src/components/MyComponent.jsx");let u=HD(n,SI(n.code),n.framework);try{n.framework==="html"?u=await ar(u,"html"):n.framework==="angular"?u=await ar(u,"angular"):n.framework==="vue"?u=await ar(u,"vue"):n.framework==="svelte"?u=await ar(u,"html"):u=await ar(u,"typescript")}catch{}let c=e.path;if(!c){try{let f=(await eD({cwd:process.cwd()})).getFrameworks();if(f.length>0){let m;if(f.some(h=>h.name.includes("qwik"))?m="qwik":f.some(h=>h.name.includes("react"))?m="react":m=f[0].name,n.framework&&n.framework!==m){let h=await Tt({message:`This snippet is for ${n.framework}, but you are using ${m}. Continue?`,initialValue:!1});if(Me(h)||!h)return console.log("Please go back to builder and change the output framework to match your project."),console.log(),await ee(0)}}}catch{}if(c=await Mt({message:"Where should we copy the code?",initialValue:a?.startsWith("./")?a:`./${a}`,validate(d){if(d.length===0)return"File path is required!";if(d[0]!==".")return"Please enter a relative path."}}),Me(c))return console.log(""),await ee(0)}let p=(0,Dr.resolve)(s,c);K.info(`Writing code to ${p}`),(0,vt.mkdirSync)((0,Dr.dirname)(p),{recursive:!0}),(0,vt.writeFileSync)(p,u)}}function Ip(e){return nt(`https://cdn.builder.io/api/v1/snippet/${e}`).then(r=>r.status===404?null:r.json())}function SI(e){return e.replace(/^```jsx\s?|\s?```$/g,"").trim()}function HD(e,r,t,n=!1){if(!t)return r;let i="This code was generated by Builder.io",s=n?`https://builder.io/content/${e.contentId}?codeSession=${e.sessionKey}&sid=${e.id}`:"",o=["vue","html","svelte"].includes(t.toLowerCase()),a=[i,s].filter(Boolean);return`${o?a.map(u=>`<!-- ${u} -->`).join(`
|
|
1336
1336
|
`):`/**
|
|
1337
1337
|
${a.map(u=>` * ${u}`).join(`
|
|
1338
1338
|
`)}
|
|
1339
1339
|
*/`}
|
|
1340
|
-
${r}`}async function TI(e,r,t){let n,i=AI(t,r.toLowerCase());switch(r.toLowerCase()){case"react":let s=await wI(e);n=`components/${i||"MyComponent"}.${s?"tsx":"jsx"}`;break;case"angular":n=`app/components/${i||"my-component"}.component.ts`;break;case"vue":n=`components/${i||"MyComponent"}.vue`;break;case"svelte":n=`components/${i||"MyComponent"}.svelte`;break;case"html":n=`${i||"my-design"}.html`;break;case"qwik":n=`components/${i||"MyComponent"}.tsx`;break;default:n=`components/${i||"MyComponent"}.tsx`}return n=(0,vt.existsSync)("./src")?`./src/${n}`:`./${n}`,n}async function wI(e){if((0,vt.existsSync)((0,Dr.join)(e,"./tsconfig.json")))return!0;let r=yp(e);return r&&(0,vt.existsSync)((0,Dr.join)(r,"./package.json"))?(0,vt.readFileSync)((0,Dr.join)(r,"./package.json"),"utf-8").includes("typescript"):!1}function AI(e,r){let t={vue:/name:\s*'([^']+)'/,react:/function (\w+)\([\w\W]+\)/,qwik:/export const (\w+) = component\$/,angular:/selector:\s*'([^']+)'/};if(!t[r])return null;let n=e.match(t[r]);return r==="react"&&!n?.[1]?e.match(/const (\w+)[\w\W]+=\s*\(/)?.[1]||null:n?.[1]||null}async function sl(e,r,t,n,i){let s=[];for(let o of t){let a=vI(n,o.path),l=(0,Dr.resolve)(e,a);if("code"in o){let u=await II(r,o.code,PI(o.path),i);(0,vt.mkdirSync)((0,Dr.dirname)(l),{recursive:!0}),(0,vt.writeFileSync)(l,u),s.push({...o,path:a,code:u,timestamp:(0,vt.statSync)(l).mtime.getTime()}),K.info(`Writing file to ${l}`)}else(0,vt.mkdirSync)(l,{recursive:!0}),s=s.concat(await sl(e,r,o.files,a,i))}return s}function vI(e,r){let t=e.replace(/^\.?\/+|\/+$/g,""),n=r.replace(/^\.?\/+|\/+$/g,""),i=t.split("/").filter(Boolean),s=n.split("/").filter(Boolean),o=-1;for(let l=0;l<i.length;l++){let u=s.indexOf(i[l]);u!==-1&&(o=u)}return[...i,...s.slice(o+1)].join("/")}function PI(e){switch(e.split(".").pop()?.toLowerCase()){case"html":case"svelte":return"html";case"vue":return"vue";case"ts":case"tsx":case"js":case"jsx":return"typescript";case"css":return"css";case"json":return"json";default:return"typescript"}}async function II(e,r,t,n){let i=r;try{i=await ar(r,t)}catch{}return n?HD(e,i,t,n):i}function Np(e,r){let n=(0,vt.existsSync)((0,Dr.join)(e,"src"))?"src/":"";switch(r.toLowerCase()){case"angular":return`./${n}app/components/`;case"html":return"./";default:return`./${n}components/`}}var XD=V(require("chokidar"),1),QD=V(require("ignore"),1);function ZD(e){let r=e.match(/builder\.io\/content\/([^?]+)\?codeSession=([^&]+)&sid=([^\s]+)/);return r?{contentId:r[1],sessionKey:r[2],snippetId:r[3]}:{}}async function al(e){let r=ex(e);return await(0,Fp.glob)("**/*",{cwd:e,ignore:{ignored(n){return r(n.relative())}},nodir:!0})}async function NI(e,r,t){let n=await(0,Fp.glob)("**/*",{cwd:e,ignore:["node_modules/**"],nodir:!0}),i=[];for(let s of n){let o=(0,Bt.resolve)(e,s);try{let a=(0,Kt.readFileSync)(o,"utf-8");if(a.includes("This code was generated by Builder.io")){let l=ZD(a);if(r&&t&&(l.contentId!==r||l.sessionKey!==t))continue;i.push({path:s,code:ol(a),name:s.split("/").pop()||"",timestamp:(0,Kt.statSync)(o).mtime.getTime(),snippetId:l.snippetId})}}catch(a){console.error(`Error reading file ${o}:`,a)}}return i}function FI(e,r){let t=ZD(e);return t.contentId===r.contentId&&t.sessionKey===r.sessionKey}function ex(e){let r=["*.png","*.jpg","*.jpeg","*.gif","*.webp","*.yml","*.yaml","*.snap","*.liquid",".git",".DS_Store",".vscode","node_modules",".next","coverage","example","public","yarn.lock","pnpm-lock.yaml","__snapshots__","package-lock.json"],t=(0,QD.default)().add(r);function n(i){try{let s=(0,Bt.resolve)(e,i);if((0,Kt.existsSync)(s)){let o=(0,Kt.readFileSync)(s,"utf8");t.add(o)}}catch(s){console.debug(`No ${i} found or error reading it:`,s)}}return n(".gitignore"),n(".prettierignore"),n(".builderignore"),i=>{let s=(0,Bt.relative)(e,i);if(!s)return!1;let o=s.split(Bt.sep).join("/");return t.ignores(o)}}function JD(e,r,t){let n=ex(e),i=XD.default.watch(e,{ignored:n,ignoreInitial:!0,awaitWriteFinish:{stabilityThreshold:500,pollInterval:600},ignorePermissionErrors:!0,followSymlinks:!1,atomic:600}),s=async a=>{let l=(0,Bt.relative)(e,a);try{let u=(0,Kt.readFileSync)(a,"utf-8");if(FI(u,r.snippet)){let c=r.writtenFiles.find(p=>p.path===l);c?(c.code=ol(u),c.timestamp=Date.now()):r.writtenFiles.push({path:l,code:ol(u),timestamp:Date.now(),name:l.split("/").pop()||""}),r.timeStamp=Date.now(),t(r)}}catch(u){console.debug(`Error reading file ${a}:`,u)}};i.on("add",async a=>{K.info(`File added: ${a}`),await s(a)}).on("change",async a=>{K.info(`File changed: ${a}`),await s(a)}).on("unlink",a=>{K.info(`File deleted: ${a}`);let l=(0,Bt.relative)(e,a);r.writtenFiles=r.writtenFiles.filter(u=>u.path!==l),r.timeStamp=Date.now(),t(r)}).on("unlinkDir",a=>{K.info(`Folder deleted: ${a}`);let l=(0,Bt.relative)(e,a);r.writtenFiles=r.writtenFiles.filter(u=>!u.path.startsWith(l)),r.timeStamp=Date.now(),t(r)}).on("ready",()=>{console.debug("Initial scan complete. Ready for changes.")}).on("error",a=>{console.error(`Watcher error: ${a}`)}),i.on("raw",async(a,l,u)=>{if(a==="renamed"){K.info(`File renamed: ${u.oldPath} -> ${l}`);let c=u.oldPath?(0,Bt.relative)(e,u.oldPath):void 0,p=l?(0,Bt.relative)(e,l):void 0;if(c&&p){let d=r.writtenFiles.find(f=>f.path===c);d&&(d.path=p,r.timeStamp=Date.now(),t(r))}}});let o=async()=>{await i.close()};return process.on("SIGINT",o),process.on("SIGTERM",o),o}async function tx(e,r){e.debug("builder sync server init");let t=await wn(e),n=r,i=()=>Promise.resolve();n&&setTimeout(()=>{i=JD(e.getAppRootDir(),n,s=>{n=s})},1e3),await Pp({...t,ensureFigmaImportPage:()=>Promise.reject("Not supported"),getPastSyncInfo:({sessionKey:s,since:o})=>!n||s!==n.snippet.sessionKey?null:{...n,hasChanged:n.timeStamp>o},resyncSnippet:async s=>{await i();let o=await _p({path:n?.pathInput,snippet:s.snippet,cwd:e.getAppRootDir()});return o&&(n=o,i=JD(e.getAppRootDir(),n,a=>{n=a})),n},getClientId:()=>"builder-sync-cli",closeAppServer:async()=>{await i()},restartAppServer:async()=>{e.debug("restart server")},enableAppWatch:async s=>s,...e})}async function _p(e){let r=e.snippetId,t=e.snippet||null;if(!t&&r&&(t=await Ip(r)),!t)return he(`No snippet found for id ${r}`),await ee(1);let n=process.cwd(),i=co(n)??n,s=await NI(i,t.contentId,t.sessionKey),o=s.filter(p=>p.snippetId===t.id);if(K.info(`Found ${o.length} matching files for snippet ${t.id} in existing files ${s.length}`),o.length>0){let p=Math.max(...o.map(d=>d.timestamp||0));return{snippet:t,writtenFiles:o,pathInput:YD(o.map(d=>d.path)),timeStamp:p}}let a=Np(i,t.framework||"react"),l=e.path||YD(s.map(p=>p.path))||await Mt({message:"Where should we copy the files?",initialValue:a,validate(p){if(p.length===0)return"File path is required!";if(p[0]!==".")return"Please enter a relative path."}});Me(l)&&(he("Cancelled sync"),process.exit(0));for(let p of s){let d=(0,Bt.resolve)(i,p.path);try{(0,Kt.unlinkSync)(d),K.info(`Deleted old file: ${d}`);let f=(0,Bt.dirname)(d);(0,Kt.readdirSync)(f).length===0&&((0,Kt.rmdirSync)(f),K.info(`Deleted empty folder: ${f}`))}catch(f){K.error(`Error cleaning up file ${d}: ${f}`)}}let u=await sl(i,t,t.files,l,!0);K.success("All files have been written successfully.");let c=Math.max(...u.map(p=>p.timestamp||0));return{snippet:t,writtenFiles:u.map(p=>({...p,code:ol(p.code)})),pathInput:l,timeStamp:c||Date.now()}}function ol(e){if(!e)return e;let r=/<!--\s*This code was generated by Builder\.io\s*-->\s*(?:<!--\s*https:\/\/builder\.io\/content\/[a-f0-9]+\?codeSession=[a-f0-9]+&sid=[a-f0-9]+\s*-->\s*)?/,t=/\/\*\*\s*\n\s*\* This code was generated by Builder\.io\s*\n\s*\* https:\/\/builder\.io\/content\/[a-f0-9]+\?codeSession=[a-f0-9]+&sid=[a-f0-9]+\s*\n\s*\*\/\s*/,n=e.replace(r,"").replace(t,"");return n=n.replace(/^\n+/,""),n}function YD(e){if(e.length===0)return"";if(e.length===1)return`./${e[0].slice(0,e[0].lastIndexOf("/")+1)}`;let r=e.map(i=>i.split("/")),t=Math.min(...r.map(i=>i.length)),n=[];for(let i=0;i<t;i++){let s=r[0][i];if(r.every(o=>o[i]===s))n.push(s);else break}return`./${n.join("/")}`}var dE=require("node:child_process");var El=require("child_process");var kp=V(require("node:process"),1);function Op(){let{env:e}=kp.default,{TERM:r,TERM_PROGRAM:t}=e;return kp.default.platform!=="win32"?r!=="linux":!!e.WT_SESSION||!!e.TERMINUS_SUBLIME||e.ConEmuTask==="{cmd::Cmder}"||t==="Terminus-Sublime"||t==="vscode"||r==="xterm-256color"||r==="alacritty"||r==="rxvt-unicode"||r==="rxvt-unicode-256color"||e.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var Rp=V(Ze(),1),pn=V(Ao(),1),ll=require("node:process"),On=V(require("node:readline"),1),mo=V(Ze(),1),Et=()=>{let e=Lp?["\u25D2","\u25D0","\u25D3","\u25D1"]:["\u2022","o","O","0"],r=Lp?80:120,t,n,i=!1,s="",o="",a="",l=y=>{let b=y>1?"Something went wrong":"Canceled";i&&m(b,y)},u=(y,b)=>{console.error(b,y),l(2)},c=()=>l(1),p=()=>{process.on("uncaughtExceptionMonitor",u),process.on("unhandledRejection",u),process.on("SIGINT",c),process.on("SIGTERM",c),process.on("exit",l)},d=()=>{process.removeListener("uncaughtExceptionMonitor",u),process.removeListener("unhandledRejection",u),process.removeListener("SIGINT",c),process.removeListener("SIGTERM",c),process.removeListener("exit",l)},f=(y="")=>{i=!0,t=BI(),s=y.replace(/\.+$/,""),process.stdout.write(`${Rp.default.gray(_I)}
|
|
1340
|
+
${r}`}async function TI(e,r,t){let n,i=AI(t,r.toLowerCase());switch(r.toLowerCase()){case"react":let s=await wI(e);n=`components/${i||"MyComponent"}.${s?"tsx":"jsx"}`;break;case"angular":n=`app/components/${i||"my-component"}.component.ts`;break;case"vue":n=`components/${i||"MyComponent"}.vue`;break;case"svelte":n=`components/${i||"MyComponent"}.svelte`;break;case"html":n=`${i||"my-design"}.html`;break;case"qwik":n=`components/${i||"MyComponent"}.tsx`;break;default:n=`components/${i||"MyComponent"}.tsx`}return n=(0,vt.existsSync)("./src")?`./src/${n}`:`./${n}`,n}async function wI(e){if((0,vt.existsSync)((0,Dr.join)(e,"./tsconfig.json")))return!0;let r=yp(e);return r&&(0,vt.existsSync)((0,Dr.join)(r,"./package.json"))?(0,vt.readFileSync)((0,Dr.join)(r,"./package.json"),"utf-8").includes("typescript"):!1}function AI(e,r){let t={vue:/name:\s*'([^']+)'/,react:/function (\w+)\([\w\W]+\)/,qwik:/export const (\w+) = component\$/,angular:/selector:\s*'([^']+)'/};if(!t[r])return null;let n=e.match(t[r]);return r==="react"&&!n?.[1]?e.match(/const (\w+)[\w\W]+=\s*\(/)?.[1]||null:n?.[1]||null}async function sl(e,r,t,n,i){let s=[];for(let o of t){let a=vI(n,o.path),l=(0,Dr.resolve)(e,a);if("code"in o){let u=await II(r,o.code,PI(o.path),i);(0,vt.mkdirSync)((0,Dr.dirname)(l),{recursive:!0}),(0,vt.writeFileSync)(l,u),s.push({...o,path:a,code:u,timestamp:(0,vt.statSync)(l).mtime.getTime()}),K.info(`Writing file to ${l}`)}else(0,vt.mkdirSync)(l,{recursive:!0}),s=s.concat(await sl(e,r,o.files,a,i))}return s}function vI(e,r){let t=e.replace(/^\.?\/+|\/+$/g,""),n=r.replace(/^\.?\/+|\/+$/g,""),i=t.split("/").filter(Boolean),s=n.split("/").filter(Boolean),o=-1;for(let l=0;l<i.length;l++){let u=s.indexOf(i[l]);u!==-1&&(o=u)}return[...i,...s.slice(o+1)].join("/")}function PI(e){switch(e.split(".").pop()?.toLowerCase()){case"html":case"svelte":return"html";case"vue":return"vue";case"ts":case"tsx":case"js":case"jsx":return"typescript";case"css":return"css";case"json":return"json";default:return"typescript"}}async function II(e,r,t,n){let i=r;try{i=await ar(r,t)}catch{}return n?HD(e,i,t,n):i}function Np(e,r){let n=(0,vt.existsSync)((0,Dr.join)(e,"src"))?"src/":"";switch(r.toLowerCase()){case"angular":return`./${n}app/components/`;case"html":return"./";default:return`./${n}components/`}}var XD=V(require("chokidar"),1),QD=V(require("ignore"),1);function ZD(e){let r=e.match(/builder\.io\/content\/([^?]+)\?codeSession=([^&]+)&sid=([^\s]+)/);return r?{contentId:r[1],sessionKey:r[2],snippetId:r[3]}:{}}async function al(e){let r=ex(e);return await(0,Fp.glob)("**/*",{cwd:e,ignore:{ignored(n){return r(n.relative())}},nodir:!0})}async function NI(e,r,t){let n=await(0,Fp.glob)("**/*",{cwd:e,ignore:["node_modules/**"],nodir:!0}),i=[];for(let s of n){let o=(0,Bt.resolve)(e,s);try{let a=(0,Kt.readFileSync)(o,"utf-8");if(a.includes("This code was generated by Builder.io")){let l=ZD(a);if(r&&t&&(l.contentId!==r||l.sessionKey!==t))continue;i.push({path:s,code:ol(a),name:s.split("/").pop()||"",timestamp:(0,Kt.statSync)(o).mtime.getTime(),snippetId:l.snippetId})}}catch(a){console.error(`Error reading file ${o}:`,a)}}return i}function FI(e,r){let t=ZD(e);return t.contentId===r.contentId&&t.sessionKey===r.sessionKey}function ex(e){let r=["*.png","*.jpg","*.jpeg","*.gif","*.webp","*.yml","*.yaml","*.snap","*.liquid",".git",".DS_Store",".vscode","node_modules",".next","coverage","example","public","yarn.lock","pnpm-lock.yaml","__snapshots__","package-lock.json"],t=(0,QD.default)().add(r);function n(i){try{let s=(0,Bt.resolve)(e,i);if((0,Kt.existsSync)(s)){let o=(0,Kt.readFileSync)(s,"utf8");t.add(o)}}catch(s){console.debug(`No ${i} found or error reading it:`,s)}}return n(".gitignore"),n(".prettierignore"),n(".builderignore"),i=>{let s=(0,Bt.relative)(e,i);if(!s)return!1;let o=s.split(Bt.sep).join("/");return t.ignores(o)}}function JD(e,r,t){let n=ex(e),i=XD.default.watch(e,{ignored:n,ignoreInitial:!0,awaitWriteFinish:{stabilityThreshold:500,pollInterval:600},ignorePermissionErrors:!0,followSymlinks:!1,atomic:600}),s=async a=>{let l=(0,Bt.relative)(e,a);try{let u=(0,Kt.readFileSync)(a,"utf-8");if(FI(u,r.snippet)){let c=r.writtenFiles.find(p=>p.path===l);c?(c.code=ol(u),c.timestamp=Date.now()):r.writtenFiles.push({path:l,code:ol(u),timestamp:Date.now(),name:l.split("/").pop()||""}),r.timeStamp=Date.now(),t(r)}}catch(u){console.debug(`Error reading file ${a}:`,u)}};i.on("add",async a=>{K.info(`File added: ${a}`),await s(a)}).on("change",async a=>{K.info(`File changed: ${a}`),await s(a)}).on("unlink",a=>{K.info(`File deleted: ${a}`);let l=(0,Bt.relative)(e,a);r.writtenFiles=r.writtenFiles.filter(u=>u.path!==l),r.timeStamp=Date.now(),t(r)}).on("unlinkDir",a=>{K.info(`Folder deleted: ${a}`);let l=(0,Bt.relative)(e,a);r.writtenFiles=r.writtenFiles.filter(u=>!u.path.startsWith(l)),r.timeStamp=Date.now(),t(r)}).on("ready",()=>{console.debug("Initial scan complete. Ready for changes.")}).on("error",a=>{console.error(`Watcher error: ${a}`)}),i.on("raw",async(a,l,u)=>{if(a==="renamed"){K.info(`File renamed: ${u.oldPath} -> ${l}`);let c=u.oldPath?(0,Bt.relative)(e,u.oldPath):void 0,p=l?(0,Bt.relative)(e,l):void 0;if(c&&p){let d=r.writtenFiles.find(f=>f.path===c);d&&(d.path=p,r.timeStamp=Date.now(),t(r))}}});let o=async()=>{await i.close()};return process.on("SIGINT",o),process.on("SIGTERM",o),o}async function tx(e,r){e.debug("builder sync server init");let t=await wn(e),n=r,i=()=>Promise.resolve();n&&setTimeout(()=>{i=JD(e.getAppRootDir(),n,s=>{n=s})},1e3),await Pp({...t,ensureFigmaImportPage:()=>Promise.reject("Not supported"),getPastSyncInfo:({sessionKey:s,since:o})=>!n||s!==n.snippet.sessionKey?null:{...n,hasChanged:n.timeStamp>o},resyncSnippet:async s=>{await i();let o=await _p({path:n?.pathInput,snippet:s.snippet,cwd:e.getAppRootDir()});return o&&(n=o,i=JD(e.getAppRootDir(),n,a=>{n=a})),n},getClientId:()=>"builder-sync-cli",closeAppServer:async()=>{await i()},restartAppServer:async()=>{e.debug("restart server")},enableAppWatch:async s=>s,...e})}async function _p(e){let r=e.snippetId,t=e.snippet||null;if(!t&&r&&(t=await Ip(r)),!t)return he(`No snippet found for id ${r}`),await ee(1);let n=process.cwd(),i=co(n)??n,s=await NI(i,t.contentId,t.sessionKey),o=s.filter(p=>p.snippetId===t.id);if(K.info(`Found ${o.length} matching files for snippet ${t.id} in existing files ${s.length}`),o.length>0){let p=Math.max(...o.map(d=>d.timestamp||0));return{snippet:t,writtenFiles:o,pathInput:YD(o.map(d=>d.path)),timeStamp:p}}let a=Np(i,t.framework||"react"),l=e.path||YD(s.map(p=>p.path))||await Mt({message:"Where should we copy the files?",initialValue:a,validate(p){if(p.length===0)return"File path is required!";if(p[0]!==".")return"Please enter a relative path."}});Me(l)&&(he("Cancelled sync"),process.exit(0));for(let p of s){let d=(0,Bt.resolve)(i,p.path);try{(0,Kt.unlinkSync)(d),K.info(`Deleted old file: ${d}`);let f=(0,Bt.dirname)(d);(0,Kt.readdirSync)(f).length===0&&((0,Kt.rmdirSync)(f),K.info(`Deleted empty folder: ${f}`))}catch(f){K.error(`Error cleaning up file ${d}: ${f}`)}}let u=await sl(i,t,t.files,l,!0);K.success("All files have been written successfully.");let c=Math.max(...u.map(p=>p.timestamp||0));return{snippet:t,writtenFiles:u.map(p=>({...p,code:ol(p.code)})),pathInput:l,timeStamp:c||Date.now()}}function ol(e){if(!e)return e;let r=/<!--\s*This code was generated by Builder\.io\s*-->\s*(?:<!--\s*https:\/\/builder\.io\/content\/[a-f0-9]+\?codeSession=[a-f0-9]+&sid=[a-f0-9]+\s*-->\s*)?/,t=/\/\*\*\s*\n\s*\* This code was generated by Builder\.io\s*\n\s*\* https:\/\/builder\.io\/content\/[a-f0-9]+\?codeSession=[a-f0-9]+&sid=[a-f0-9]+\s*\n\s*\*\/\s*/,n=e.replace(r,"").replace(t,"");return n=n.replace(/^\n+/,""),n}function YD(e){if(e.length===0)return"";if(e.length===1)return`./${e[0].slice(0,e[0].lastIndexOf("/")+1)}`;let r=e.map(i=>i.split("/")),t=Math.min(...r.map(i=>i.length)),n=[];for(let i=0;i<t;i++){let s=r[0][i];if(r.every(o=>o[i]===s))n.push(s);else break}return`./${n.join("/")}`}var dE=require("node:child_process");var El=require("node:child_process");var kp=V(require("node:process"),1);function Op(){let{env:e}=kp.default,{TERM:r,TERM_PROGRAM:t}=e;return kp.default.platform!=="win32"?r!=="linux":!!e.WT_SESSION||!!e.TERMINUS_SUBLIME||e.ConEmuTask==="{cmd::Cmder}"||t==="Terminus-Sublime"||t==="vscode"||r==="xterm-256color"||r==="alacritty"||r==="rxvt-unicode"||r==="rxvt-unicode-256color"||e.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var Rp=V(Ze(),1),pn=V(Ao(),1),ll=require("node:process"),On=V(require("node:readline"),1),mo=V(Ze(),1),Et=()=>{let e=Lp?["\u25D2","\u25D0","\u25D3","\u25D1"]:["\u2022","o","O","0"],r=Lp?80:120,t,n,i=!1,s="",o="",a="",l=y=>{let b=y>1?"Something went wrong":"Canceled";i&&m(b,y)},u=(y,b)=>{console.error(b,y),l(2)},c=()=>l(1),p=()=>{process.on("uncaughtExceptionMonitor",u),process.on("unhandledRejection",u),process.on("SIGINT",c),process.on("SIGTERM",c),process.on("exit",l)},d=()=>{process.removeListener("uncaughtExceptionMonitor",u),process.removeListener("unhandledRejection",u),process.removeListener("SIGINT",c),process.removeListener("SIGTERM",c),process.removeListener("exit",l)},f=(y="")=>{i=!0,t=BI(),s=y.replace(/\.+$/,""),process.stdout.write(`${Rp.default.gray(_I)}
|
|
1341
1341
|
`);let b=0,C=0;p(),process.env.CI||(n=setInterval(()=>{let x=Rp.default.magenta(e[b]),D=".".repeat(Math.floor(C)).slice(0,3);process.stdout.write(pn.cursor.move(-999,-a.split(`
|
|
1342
1342
|
`).length+1)),process.stdout.write(pn.erase.down(a.split(`
|
|
1343
1343
|
`).length));let E=`${x} ${s}${D}${o}`;process.stdout.write(E),b=b+1<e.length?b+1:0,C=C<e.length?C+.125:0,a=E},r))},m=(y,b=0)=>{s=y??s,i=!1,clearInterval(n);let C=b===0?(0,mo.green)(RI):b===1?(0,mo.red)(kI):(0,mo.red)(OI);process.stdout.write(pn.cursor.move(-999,-a.split(`
|
|
@@ -1707,7 +1707,7 @@ Please set the BUILDER_PUBLIC_KEY environment variable.`);return{figmaAuth:o,bui
|
|
|
1707
1707
|
</body>
|
|
1708
1708
|
</html>
|
|
1709
1709
|
`.replace("{{MESSAGE}}","The CLI has authenticated correctly with Builder.io"),()=>{o({privateKey:a.searchParams.get("p-key")||"",spaceId:a.searchParams.get("api-key")||"",spaceName:a.searchParams.get("org-name")||"",userId:a.searchParams.get("user-id")||""})})},onListen:n=>{let i=new URL("/cli-auth","https://builder.io");i.searchParams.set("client_id","builder-dev-tools-cli"),i.searchParams.set("host",t),i.searchParams.set("response_type","code"),i.searchParams.set("cli","true"),r&&i.searchParams.set("space_id",r);let s=new URL(Mn,`http://localhost:${n}`);s.searchParams.set(To,(0,EE.platform)()),s.searchParams.set(wo,process.versions.node);let o=e.getFrameworks();return o.length>0&&(i.searchParams.set(di,o[0].name),s.searchParams.set(di,o[0].name)),i.searchParams.set("redirect_url",s.href),i.href}})}function DE(e,r){let t=e.getAppRootDir(),n=(0,Tl.join)(t,"node_modules",".builder"),i=(0,Tl.join)(n,"data.json");if((0,Kr.existsSync)(i))try{let s=(0,Kr.readFileSync)(i,"utf8"),o=JSON.parse(s);r=Object.assign(o.credentials,r)}catch(s){mn.captureException(s),console.error("Failed to store credentials",s)}else(0,Kr.mkdirSync)(n,{recursive:!0});(0,Kr.writeFileSync)(i,JSON.stringify({credentials:r},null,2))}function CF(e){let r=e.getAppRootDir(),t=(0,Tl.join)(r,"node_modules",".builder","data.json");if((0,Kr.existsSync)(t))try{let n=(0,Kr.readFileSync)(t,"utf8");return JSON.parse(n).credentials}catch(n){mn.captureException(n),console.error("Failed to load credentials",n)}return{}}async function TE(e){let{default:r}=await import("open"),t,n,i,s=new Promise((u,c)=>{t=u,n=c}),o=(0,xE.createServer)((u,c)=>e.requestListener(e.port,u,c,t,n)),a=()=>{l(),o&&("closeAllConnections"in o&&o.closeAllConnections(),o.close(u=>{u&&(mn.captureException(u),console.error(u))}))};process.on("uncaughtExceptionMonitor",a),process.on("unhandledRejection",a),process.on("SIGINT",a),process.on("SIGTERM",a),process.on("exit",a);let l=()=>{process.removeListener("uncaughtExceptionMonitor",a),process.removeListener("unhandledRejection",a),process.removeListener("SIGINT",a),process.removeListener("SIGTERM",a),process.removeListener("exit",a)};try{o.listen(e.port,()=>{let c=e.onListen(e.port);K.warn(`Required authenticating with ${e.name}
|
|
1710
|
-
OPEN: ${(0,Ln.dim)(c)}`),i=Et(),i.start(`Waiting for ${e.name} authentication`),r(c,{wait:!1})});let u=await s;return i&&i.stop(`Authenticated with ${e.name} successfully`),u}catch(u){throw i&&(i.stop(`Failed to authenticate with ${e.name}.`,-1),xr("auth")),console.error(u),mn.captureException(u),a(),u}finally{a()}}var Ge=V(Ze(),1),as=require("path");var SF="https://cdn.builder.io",wE=async(e,r)=>{console.log(""),ot((0,Ge.bgCyan)((0,Ge.bold)((0,Ge.white)(" figma migrate ")))+" "+(0,Ge.dim)(gt));let{builderPrivateKey:t,builderPublicKey:n}=await Lt(e,r,{forceSpaceId:r.spaceId,builderPrivateKey:!0,builderPublicKey:!0});We("figma publish started",{spaceId:n});let i=await li(e);if(i.length>0){We("figma migrate with existing files",{spaceId:n}),K.warning(`${(0,Ge.yellow)("This repo already has figma mappings in:")}
|
|
1710
|
+
OPEN: ${(0,Ln.dim)(c)}`),i=Et(),i.start(`Waiting for ${e.name} authentication`),r(c,{wait:!1})});let u=await s;return i&&i.stop(`Authenticated with ${e.name} successfully`),u}catch(u){throw i&&(i.stop(`Failed to authenticate with ${e.name}.`,-1),xr("auth")),console.error(u),mn.captureException(u),a(),u}finally{a()}}var Ge=V(Ze(),1),as=require("node:path");var SF="https://cdn.builder.io",wE=async(e,r)=>{console.log(""),ot((0,Ge.bgCyan)((0,Ge.bold)((0,Ge.white)(" figma migrate ")))+" "+(0,Ge.dim)(gt));let{builderPrivateKey:t,builderPublicKey:n}=await Lt(e,r,{forceSpaceId:r.spaceId,builderPrivateKey:!0,builderPublicKey:!0});We("figma publish started",{spaceId:n});let i=await li(e);if(i.length>0){We("figma migrate with existing files",{spaceId:n}),K.warning(`${(0,Ge.yellow)("This repo already has figma mappings in:")}
|
|
1711
1711
|
|
|
1712
1712
|
${i.map(u=>` - ${(0,as.relative)(e.getAppRootDir(),u)}`).join(`
|
|
1713
1713
|
`)}
|
|
@@ -1724,7 +1724,7 @@ Migration is going to create new files, possibly duplicates.`);let l=await Tt({m
|
|
|
1724
1724
|
})`}return ar(`import { figmaMapping } from '@builder.io/dev-tools/figma';
|
|
1725
1725
|
${wF(e)}
|
|
1726
1726
|
|
|
1727
|
-
${i}`,"typescript",void 0)}function wF(e){let{exportType:r,importName:t,importPath:n}=e;if(t&&n){let i=JSON.stringify(n);return r==="named"?`import { ${t} } from ${i};`:`import ${t} from ${i};`}return""}var Al=V(require("prompts"),1),us=V(require("fs"),1);var Z=V(Ze(),1),IE=require("path");var NE=V(require("@sentry/node"),1),Eo=V(vE(),1);var FE=async(e,r)=>{if(console.log(""),ot((0,Z.bgMagenta)((0,Z.bold)((0,Z.white)(" figma generate ")))+" "+(0,Z.dim)(gt)),K.message((0,Z.dim)(`This command will help you create new mapper files to connect Figma components to your code components.
|
|
1727
|
+
${i}`,"typescript",void 0)}function wF(e){let{exportType:r,importName:t,importPath:n}=e;if(t&&n){let i=JSON.stringify(n);return r==="named"?`import { ${t} } from ${i};`:`import ${t} from ${i};`}return""}var Al=V(require("prompts"),1),us=V(require("node:fs"),1);var Z=V(Ze(),1),IE=require("node:path");var NE=V(require("@sentry/node"),1),Eo=V(vE(),1);var FE=async(e,r)=>{if(console.log(""),ot((0,Z.bgMagenta)((0,Z.bold)((0,Z.white)(" figma generate ")))+" "+(0,Z.dim)(gt)),K.message((0,Z.dim)(`This command will help you create new mapper files to connect Figma components to your code components.
|
|
1728
1728
|
Check out `)+(0,Z.bold)((0,Z.cyan)("https://www.builder.io/c/docs/cli-mapping"))+(0,Z.dim)(" for more details.")),r.componentName&&!r.mappingOutput)return K.error("Mapping output must be provided when mapping a single component"),await ee(1);if(typeof r.mappingOutput=="string"&&!pt(r.mappingOutput))return K.error("Mapping output must end with .mapper.{tsx, ts, jsx, js, mjs}, e.g. my-component.mapper.tsx"),await ee(1);await bo(e);let t;t=Et(),t.start("Loading type information");let n;try{n=await wn(e),t.stop("Repo's framework detected")}catch{return t.stop("Repo's framework is not supported"),We("figma generate, framework not supported",{frameworks:e.getFrameworks().map(g=>g.name)}),t.message(`We can not generate mappers automatically, but it's possible to do it manually:
|
|
1729
1729
|
https://www.builder.io/c/docs/mapping-functions`),await ee(1)}let i=[],s;if(r.token)K.message(),s=await Lt(e,r,{}),i=await DD(s,r.token,!!r.verbose);else{let h=r._.slice(2);if(!h.length)return he(`No Figma URL provided, use:
|
|
1730
1730
|
npx builder.io figma generate "https://..."`),xr(),await ee(1);if(s=await Lt(e,r,{builderPrivateKey:!0,builderPublicKey:!0,figmaAuth:xD(h),forceSpaceId:r.spaceId}),!s.builderPrivateKey||!s.builderPublicKey)return he("Missing builder.io credentials"),await ee(1);let g=await SE(s.builderPublicKey,s.builderPrivateKey),y=await md({privateKey:s.builderPrivateKey,spaceId:s.builderPublicKey});if(!g.features?.includes("component-mapping")&&y.length===0)return he("Component mapping is an enterprise feature. Please visit "+(0,Z.bold)((0,Z.cyan)("https://www.builder.io/unlock-enterprise"))+" to start your trial."),await ee(1);t&&t.stop(),t=Et(),t.start("Gathering Figma component info"),i=await ED(s.figmaAuth,{privateKey:s.builderPrivateKey,spaceId:s.builderPublicKey},h)}We("figma generate started",{spaceId:s.builderPublicKey,mode:r.componentName?"non-interactive":"interactive"});let o=Xn(An),a,l,u=await n.getRegistry({readAllInputTypes:!0});t.stop("Figma's component metadata loaded"),t=void 0,K.message();let c=await li(e),{figmaBuilderLinks:p,figmaLinksToResolve:d}=await fo({force:!0,print:!1,mappingFiles:c,sys:e});d.length>0&&s.figmaAuth&&await nl(s.figmaAuth,p,d);let f=await NF(i,p);i=i.filter(([,h])=>f.includes(h.key));let m=[];for(let h=0;h<i.length;h++){let[g,y]=i[h];h>0&&K.info(`Mapped ${h} / ${i.length} components:
|