sveld 0.36.9 → 0.36.10
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/lib/browser.js +140 -194
- package/lib/chunk-0204rbr9.js +7 -0
- package/lib/chunk-2nrjrvnn.js +1 -0
- package/lib/{chunk-mdth9bg3.js → chunk-c83445g5.js} +3 -3
- package/lib/chunk-d802cqsd.js +7 -0
- package/lib/{chunk-hpxd4cgm.js → chunk-n9w94djt.js} +1 -1
- package/lib/{chunk-yzabyfqs.js → chunk-py1s51tb.js} +10 -10
- package/lib/cli-entry.js +1 -1
- package/lib/index.d.ts +1 -824
- package/lib/index.js +1 -1
- package/package.json +1 -1
- package/lib/chunk-0beysrt7.js +0 -62
- package/lib/chunk-cqkng6ys.js +0 -7
- package/lib/chunk-n5cjh6db.js +0 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{pa as he,qa as re,ra as Je,ta as qe}from"./chunk-nrz6c5ew.js";var Lt={li:{direct:["li"]},dt:{descendant:["dt","dd"]},dd:{descendant:["dt","dd"]},p:{descendant:["address","article","aside","blockquote","div","dl","fieldset","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","main","menu","nav","ol","p","pre","section","table","ul"]},rt:{descendant:["rt","rp"]},rp:{descendant:["rt","rp"]},optgroup:{descendant:["optgroup"]},option:{descendant:["option","optgroup"]},thead:{direct:["tbody","tfoot"]},tbody:{direct:["tbody","tfoot"]},tfoot:{direct:["tbody"]},tr:{direct:["tr","tbody"]},td:{direct:["td","th","tr"]},th:{direct:["td","th","tr"]}};function Le(t,n){let a=Lt[t];if(!a)return!1;if(!n)return!0;return(a.direct??a.descendant??[]).includes(n)}var B=!0,Dt=new WeakMap;function _t(t){let n=t.Parser.acorn||t,a=Dt.get(n);if(!a){let y=function(C){return C===x.name||C===x.string||C===x.num||_.includes(C)||F.includes(C)},b=function(C){return C===x.name||_.includes(C)||F.includes(C)},E=function(C){return C===x.name||F.includes(C)},f=function(C){return C===N.abstract||C===N.declare||C===N.enum||C===N.module||C===N.namespace||C===N.interface||C===N.type},w=function(C){return C===N.keyof||C===N.readonly||C===N.unique},g=function(C){return C===x.invalidTemplate},{tokTypes:x,keywordTypes:I}=n,_=Object.values(I),N=s(),F=Object.values(N),z=u(),k=c(),M=new RegExp(`^(?:${Object.keys(N).join("|")})$`);z.jsxTagStart.updateContext=function(){this.context.push(k.tc_expr),this.context.push(k.tc_oTag),this.exprAllowed=!1},z.jsxTagEnd.updateContext=function(C){let X=this.context.pop();if(X===k.tc_oTag&&C===x.slash||X===k.tc_cTag)this.context.pop(),this.exprAllowed=this.curContext()===k.tc_expr;else this.exprAllowed=!0},a={tokTypes:{...N,...z},tokContexts:{...k},keywordsRegExp:M,tokenIsLiteralPropertyName:y,tokenIsKeywordOrIdentifier:b,tokenIsIdentifier:E,tokenIsTSDeclarationStart:f,tokenIsTSTypeOperator:w,tokenIsTemplate:g}}return a;function o(y,b={}){return new n.TokenType("name",b)}function c(){return{tc_oTag:new n.TokContext("<tag",!1,!1),tc_cTag:new n.TokContext("</tag",!1,!1),tc_expr:new n.TokContext("<tag>...</tag>",!0,!0)}}function u(){return{at:new n.TokenType("@"),jsxName:new n.TokenType("jsxName"),jsxText:new n.TokenType("jsxText",{beforeExpr:!0}),jsxTagStart:new n.TokenType("jsxTagStart",{startsExpr:!0}),jsxTagEnd:new n.TokenType("jsxTagEnd")}}function s(){return{assert:o("assert",{startsExpr:B}),asserts:o("asserts",{startsExpr:B}),global:o("global",{startsExpr:B}),keyof:o("keyof",{startsExpr:B}),readonly:o("readonly",{startsExpr:B}),unique:o("unique",{startsExpr:B}),abstract:o("abstract",{startsExpr:B}),declare:o("declare",{startsExpr:B}),enum:o("enum",{startsExpr:B}),module:o("module",{startsExpr:B}),namespace:o("namespace",{startsExpr:B}),interface:o("interface",{startsExpr:B}),type:o("type",{startsExpr:B})}}}var Ot=512,Z=1024,Y=1,oe=2,Rt=4,me=8,Mt=16,Be=64,Fe=128,qt=256,Bt=512,Ue=1024,ls=Y|oe|me|Fe,cs=Y|0|me|0,ps=Y|0|Rt|0,hs=Y|0|Mt|0,us=0|oe|0|Fe,ds=0|oe|0|0,Ft=Y|oe|me|qt,fs=0|Ue,ms=0|Be,ys=Y|0|0|Be,xs=Ft|Bt,Ts=0|Ue,Ve=4,We=2,je=1,gs=We|je,As=We|Ve,bs=je|Ve,Ut=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/y,De=new RegExp("(?=("+Ut.source+"))\\1"+/(?=[\n\r\u2028\u2029]|\/\*(?!.*?\*\/)|$)/.source,"y"),ee=class{constructor(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1}};function Vt(t,n){let a=n.key.name,o=t[a],c="true";if(n.type==="MethodDefinition"&&(n.kind==="get"||n.kind==="set"))c=(n.static?"s":"i")+n.kind;if(o==="iget"&&c==="iset"||o==="iset"&&c==="iget"||o==="sget"&&c==="sset"||o==="sset"&&c==="sget")return t[a]="true",!1;else if(!o)return t[a]=c,!1;else return!0}function _e(t,n){let{computed:a,key:o}=t;return!a&&(o.type==="Identifier"&&o.name===n||o.type==="Literal"&&o.value===n)}var S={AbstractMethodHasImplementation:({methodName:t})=>`Method '${t}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:t})=>`Property '${t}' cannot have an initializer because it is marked abstract.`,AccesorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccesorCannotHaveTypeParameters:"An accessor cannot have type parameters.",CannotFindName:({name:t})=>`Cannot find name '${t}'.`,ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference:"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareAccessor:({kind:t})=>`'declare' is not allowed in ${t}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:()=>"Accessibility modifier already seen.",DuplicateModifier:({modifier:t})=>`Duplicate modifier: '${t}'.`,EmptyHeritageClauseType:({token:t})=>`'${t}' 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'.",IncompatibleModifiers:({modifiers:t})=>`'${t[0]}' modifier cannot be used with '${t[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:t})=>`Index signatures cannot have an accessibility modifier ('${t}').`,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:t})=>`'${t}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:t})=>`'${t}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:t})=>`'${t}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifiersOrder:({orderedModifiers:t})=>`'${t[0]}' modifier must precede '${t[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:t})=>`Private elements cannot have an accessibility modifier ('${t}').`,PrivateMethodsHasAccessibility:({modifier:t})=>`Private methods cannot have an accessibility modifier ('${t}').`,ReadonlyForMethodSignature:"'readonly' modifier can only appear on a property declaration or index signature.",ReservedArrowTypeParam:"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `<T,>() => ...`.",ReservedTypeAssertion:"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",SetAccesorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccesorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccesorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:({typeParameterName:t})=>`Single type parameter ${t} should have a trailing comma. Example usage: <${t},>.`,StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",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.",GenericsEndWithComma:"Trailing comma is not allowed at the end of generics.",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:t})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${t}.`,LetInLexicalBinding:"'let' is not allowed to be used as a name in 'let' or 'const' declarations."},ne={UnexpectedLeadingDecorator:"Leading decorators must be attached to a class declaration.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",TrailingDecorator:"Decorators must be attached to a class element.",SpreadElementDecorator:"Decorators can't be used with SpreadElement"};function Wt(t,n,a){let{tokTypes:o}=a,{tokTypes:c}=n;return class extends t{takeDecorators(s){let y=this.decoratorStack[this.decoratorStack.length-1];if(y.length)s.decorators=y,this.resetStartLocationFromNode(s,y[0]),this.decoratorStack[this.decoratorStack.length-1]=[]}parseDecorators(s){let y=this.decoratorStack[this.decoratorStack.length-1];while(this.match(c.at)){let b=this.parseDecorator();y.push(b)}if(this.match(o._export)){if(!s)this.unexpected()}else if(!this.canHaveLeadingDecorator())this.raise(this.start,ne.UnexpectedLeadingDecorator)}parseDecorator(){let s=this.startNode();this.next(),this.decoratorStack.push([]);let y=this.start,b=this.startLoc,E;if(this.match(o.parenL)){let f=this.start,w=this.startLoc;if(this.next(),E=this.parseExpression(),this.expect(o.parenR),this.options.preserveParens){let g=this.startNodeAt(f,w);g.expression=E,E=this.finishNode(g,"ParenthesizedExpression")}}else{E=this.parseIdent(!1);while(this.eat(o.dot)){let f=this.startNodeAt(y,b);f.object=E,f.property=this.parseIdent(!0),f.computed=!1,E=this.finishNode(f,"MemberExpression")}}return s.expression=this.parseMaybeDecoratorArguments(E),this.decoratorStack.pop(),this.finishNode(s,"Decorator")}parseMaybeDecoratorArguments(s){if(this.eat(o.parenL)){let y=this.startNodeAtNode(s);return y.callee=s,y.arguments=this.parseExprList(o.parenR,!1),this.finishNode(y,"CallExpression")}return s}}}var jt={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"},Ht=/^[\da-fA-F]+$/,Gt=/^\d+$/;function te(t){if(!t)return t;if(t.type==="JSXIdentifier")return t.name;if(t.type==="JSXNamespacedName")return t.namespace.name+":"+t.name.name;if(t.type==="JSXMemberExpression")return te(t.object)+"."+te(t.property)}function Kt(t,n,a,o){let c=t.tokTypes,u=n.tokTypes,s=t.isNewLine,y=t.isIdentifierChar,b=Object.assign({allowNamespaces:!0,allowNamespacedObjects:!0},o||{});return class extends a{jsx_readToken(){let f="",w=this.pos;for(;;){if(this.pos>=this.input.length)this.raise(this.start,"Unterminated JSX contents");let g=this.input.charCodeAt(this.pos);switch(g){case 60:case 123:if(this.pos===this.start){if(g===60&&this.exprAllowed)return++this.pos,this.finishToken(u.jsxTagStart);return this.getTokenFromCode(g)}return f+=this.input.slice(w,this.pos),this.finishToken(u.jsxText,f);case 38:f+=this.input.slice(w,this.pos),f+=this.jsx_readEntity(),w=this.pos;break;case 62:case 125:this.raise(this.pos,"Unexpected token `"+this.input[this.pos]+"`. Did you mean `"+(g===62?">":"}")+'` or `{"'+this.input[this.pos]+'"}`?');default:if(s(g))f+=this.input.slice(w,this.pos),f+=this.jsx_readNewLine(!0),w=this.pos;else++this.pos}}}jsx_readNewLine(f){let w=this.input.charCodeAt(this.pos),g;if(++this.pos,w===13&&this.input.charCodeAt(this.pos)===10)++this.pos,g=f?`
|
|
2
|
+
`:`\r
|
|
3
|
+
`;else g=String.fromCharCode(w);if(this.options.locations)++this.curLine,this.lineStart=this.pos;return g}jsx_readString(f){let w="",g=++this.pos;for(;;){if(this.pos>=this.input.length)this.raise(this.start,"Unterminated string constant");let x=this.input.charCodeAt(this.pos);if(x===f)break;if(x===38)w+=this.input.slice(g,this.pos),w+=this.jsx_readEntity(),g=this.pos;else if(s(x))w+=this.input.slice(g,this.pos),w+=this.jsx_readNewLine(!1),g=this.pos;else++this.pos}return w+=this.input.slice(g,this.pos++),this.finishToken(c.string,w)}jsx_readEntity(){let f="",w=0,g,x=this.input[this.pos];if(x!=="&")this.raise(this.pos,"Entity must start with an ampersand");let I=++this.pos;while(this.pos<this.input.length&&w++<10){if(x=this.input[this.pos++],x===";"){if(f[0]==="#"){if(f[1]==="x"){if(f=f.substr(2),Ht.test(f))g=String.fromCharCode(parseInt(f,16))}else if(f=f.substr(1),Gt.test(f))g=String.fromCharCode(parseInt(f,10))}else g=jt[f];break}f+=x}if(!g)return this.pos=I,"&";return g}jsx_readWord(){let f,w=this.pos;do f=this.input.charCodeAt(++this.pos);while(y(f)||f===45);return this.finishToken(u.jsxName,this.input.slice(w,this.pos))}jsx_parseIdentifier(){let f=this.startNode();if(this.type===u.jsxName)f.name=this.value;else if(this.type.keyword)f.name=this.type.keyword;else this.unexpected();return this.next(),this.finishNode(f,"JSXIdentifier")}jsx_parseNamespacedName(){let f=this.start,w=this.startLoc,g=this.jsx_parseIdentifier();if(!b.allowNamespaces||!this.eat(c.colon))return g;var x=this.startNodeAt(f,w);return x.namespace=g,x.name=this.jsx_parseIdentifier(),this.finishNode(x,"JSXNamespacedName")}jsx_parseElementName(){if(this.type===u.jsxTagEnd)return"";let f=this.start,w=this.startLoc,g=this.jsx_parseNamespacedName();if(this.type===c.dot&&g.type==="JSXNamespacedName"&&!b.allowNamespacedObjects)this.unexpected();while(this.eat(c.dot)){let x=this.startNodeAt(f,w);x.object=g,x.property=this.jsx_parseIdentifier(),g=this.finishNode(x,"JSXMemberExpression")}return g}jsx_parseAttributeValue(){switch(this.type){case c.braceL:let f=this.jsx_parseExpressionContainer();if(f.expression.type==="JSXEmptyExpression")this.raise(f.start,"JSX attributes must only be assigned a non-empty expression");return f;case u.jsxTagStart:case c.string:return this.parseExprAtom();default:this.raise(this.start,"JSX value should be either an expression or a quoted JSX text")}}jsx_parseEmptyExpression(){let f=this.startNodeAt(this.lastTokEnd,this.lastTokEndLoc);return this.finishNodeAt(f,"JSXEmptyExpression",this.start,this.startLoc)}jsx_parseExpressionContainer(){let f=this.startNode();return this.next(),f.expression=this.type===c.braceR?this.jsx_parseEmptyExpression():this.parseExpression(),this.expect(c.braceR),this.finishNode(f,"JSXExpressionContainer")}jsx_parseAttribute(){let f=this.startNode();if(this.eat(c.braceL))return this.expect(c.ellipsis),f.argument=this.parseMaybeAssign(),this.expect(c.braceR),this.finishNode(f,"JSXSpreadAttribute");return f.name=this.jsx_parseNamespacedName(),f.value=this.eat(c.eq)?this.jsx_parseAttributeValue():null,this.finishNode(f,"JSXAttribute")}jsx_parseOpeningElementAt(f,w){let g=this.startNodeAt(f,w);g.attributes=[];let x=this.jsx_parseElementName();if(x)g.name=x;while(this.type!==c.slash&&this.type!==u.jsxTagEnd)g.attributes.push(this.jsx_parseAttribute());return g.selfClosing=this.eat(c.slash),this.expect(u.jsxTagEnd),this.finishNode(g,x?"JSXOpeningElement":"JSXOpeningFragment")}jsx_parseClosingElementAt(f,w){let g=this.startNodeAt(f,w),x=this.jsx_parseElementName();if(x)g.name=x;return this.expect(u.jsxTagEnd),this.finishNode(g,x?"JSXClosingElement":"JSXClosingFragment")}jsx_parseElementAt(f,w){let g=this.startNodeAt(f,w),x=[],I=this.jsx_parseOpeningElementAt(f,w),_=null;if(!I.selfClosing){e:for(;;)switch(this.type){case u.jsxTagStart:if(f=this.start,w=this.startLoc,this.next(),this.eat(c.slash)){_=this.jsx_parseClosingElementAt(f,w);break e}x.push(this.jsx_parseElementAt(f,w));break;case u.jsxText:x.push(this.parseExprAtom());break;case c.braceL:x.push(this.jsx_parseExpressionContainer());break;default:this.unexpected()}if(te(_.name)!==te(I.name))this.raise(_.start,"Expected corresponding JSX closing tag for <"+te(I.name)+">")}let N=I.name?"Element":"Fragment";if(g["opening"+N]=I,g["closing"+N]=_,g.children=x,this.type===c.relational&&this.value==="<")this.raise(this.start,"Adjacent JSX elements must be wrapped in an enclosing tag");return this.finishNode(g,"JSX"+N)}jsx_parseText(){let f=this.parseLiteral(this.value);return f.type="JSXText",f}jsx_parseElement(){let f=this.start,w=this.startLoc;return this.next(),this.jsx_parseElementAt(f,w)}}}function zt(t,n,a){let{tokTypes:o}=n,{tokTypes:c}=a;return class extends t{parseMaybeImportAttributes(s){if(this.type===c._with||this.type===o.assert){this.next();let y=this.parseImportAttributes();if(y)s.attributes=y}}parseImportAttributes(){this.expect(c.braceL);let s=this.parseWithEntries();return this.expect(c.braceR),s}parseWithEntries(){let s=[],y=new Set;do{if(this.type===c.braceR)break;let b=this.startNode(),E;if(this.type===c.string)E=this.parseLiteral(this.value);else E=this.parseIdent(!0);if(this.next(),b.key=E,y.has(b.key.name))this.raise(this.pos,"Duplicated key in attributes");if(y.add(b.key.name),this.type!==c.string)this.raise(this.pos,"Only string is supported as an attribute value");b.value=this.parseLiteral(this.value),s.push(this.finishNode(b,"ImportAttribute"))}while(this.eat(c.comma));return s}}}var de=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;function Oe(t){if(!t)throw Error("Assert fail")}function Xt(t){return t==="accessor"}function $t(t){return t==="in"||t==="out"}var ae=1,Re=2,Jt=4,v={SCOPE_TOP:1,SCOPE_FUNCTION:2,SCOPE_ASYNC:4,SCOPE_GENERATOR:8,SCOPE_ARROW:16,SCOPE_SIMPLE_CATCH:32,SCOPE_SUPER:64,SCOPE_DIRECT_SUPER:128,SCOPE_CLASS_STATIC_BLOCK:256,SCOPE_VAR:256,BIND_NONE:0,BIND_VAR:1,BIND_LEXICAL:2,BIND_FUNCTION:3,BIND_SIMPLE_CATCH:4,BIND_OUTSIDE:5,BIND_TS_TYPE:6,BIND_TS_INTERFACE:7,BIND_TS_NAMESPACE:1032,BIND_FLAGS_TS_EXPORT_ONLY:1024,BIND_FLAGS_TS_IMPORT:4096,BIND_FLAGS_TS_ENUM:256,BIND_FLAGS_TS_CONST_ENUM:512,BIND_FLAGS_CLASS:128};function fe(t,n){return v.SCOPE_FUNCTION|(t?v.SCOPE_ASYNC:0)|(n?v.SCOPE_GENERATOR:0)}function Yt(t){if(t.type!=="MemberExpression")return!1;let{computed:n,property:a}=t;if(n&&(a.type!=="TemplateLiteral"||a.expressions.length>0))return!1;return He(t.object)}function He(t){if(t.type==="Identifier")return!0;if(t.type!=="MemberExpression")return!1;if(t.computed)return!1;return He(t.object)}function Me(t){return t==="private"||t==="public"||t==="protected"}function Qt(t){return Boolean(t.startsExpr)}function Zt(t){if(t==null)throw Error(`Unexpected ${t} value.`);return t}function er(t){switch(t){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 Ge(t){let{dts:n=!1}=t||{},a=!!t?.jsx;return function(o){let c=o.acorn||qe,u=_t(c),s=c.tokTypes,y=c.keywordTypes,b=c.isIdentifierStart,E=c.lineBreak,f=c.isNewLine,w=c.tokContexts,g=c.isIdentifierChar,{tokTypes:x,tokContexts:I,keywordsRegExp:_,tokenIsLiteralPropertyName:N,tokenIsTemplate:F,tokenIsTSDeclarationStart:z,tokenIsIdentifier:k,tokenIsKeywordOrIdentifier:M,tokenIsTSTypeOperator:C}=u;function X(e,r,i=e.length){for(let l=r;l<i;l++){let p=e.charCodeAt(l);if(f(p))return l<i-1&&p===13&&e.charCodeAt(l+1)===10?l+2:l+1}return-1}if(o=Wt(o,u,c),t?.jsx)o=Kt(c,u,o,typeof t.jsx==="boolean"?{}:t.jsx);o=zt(o,u,c);class Ie extends o{constructor(e,r,i){super(e,r,i);this.preValue=null,this.preToken=null,this.isLookahead=!1,this.isAmbientContext=!1,this.inAbstractClass=!1,this.inType=!1,this.inDisallowConditionalTypesContext=!1,this.maybeInArrowParameters=!1,this.shouldParseArrowReturnType=void 0,this.shouldParseAsyncArrowReturnType=void 0,this.decoratorStack=[[]],this.importsStack=[[]],this.importOrExportOuterKind=void 0,this.tsParseConstModifier=(l)=>{this.tsParseModifiers({modified:l,allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:S.InvalidModifierOnTypeParameterPositions})},this.ecmaVersion=this.options.ecmaVersion}static get acornTypeScript(){return u}get acornTypeScript(){return u}getTokenFromCodeInType(e){if(e===62)return this.finishOp(s.relational,1);if(e===60)return this.finishOp(s.relational,1);return super.getTokenFromCode(e)}readToken(e){if(!this.inType){let r=this.curContext();if(r===I.tc_expr)return this.jsx_readToken();if(r===I.tc_oTag||r===I.tc_cTag){if(b(e))return this.jsx_readWord();if(e==62)return++this.pos,this.finishToken(x.jsxTagEnd);if((e===34||e===39)&&r==I.tc_oTag)return this.jsx_readString(e)}if(e===60&&this.exprAllowed&&this.input.charCodeAt(this.pos+1)!==33)if(++this.pos,t?.jsx)return this.finishToken(x.jsxTagStart);else return this.finishToken(s.relational,"<")}return super.readToken(e)}getTokenFromCode(e){if(this.inType)return this.getTokenFromCodeInType(e);if(e===64)return++this.pos,this.finishToken(x.at);return super.getTokenFromCode(e)}isAbstractClass(){return this.ts_isContextual(x.abstract)&&this.lookahead().type===s._class}finishNode(e,r){if(e.type!==""&&e.end!==0)return e;return super.finishNode(e,r)}tryParse(e,r=this.cloneCurLookaheadState()){let i={node:null};try{return{node:e((p=null)=>{throw i.node=p,i}),error:null,thrown:!1,aborted:!1,failState:null}}catch(l){let p=this.getCurLookaheadState();if(this.setLookaheadState(r),l instanceof SyntaxError)return{node:null,error:l,thrown:!0,aborted:!1,failState:p};if(l===i)return{node:i.node,error:null,thrown:!1,aborted:!0,failState:p};throw l}}setOptionalParametersError(e,r){e.optionalParametersLoc=r?.loc??this.startLoc}reScan_lt_gt(){if(this.type===s.relational)this.pos-=1,this.readToken_lt_gt(this.fullCharCodeAtPos())}reScan_lt(){let{type:e}=this;if(e===s.bitShift)return this.pos-=2,this.finishOp(s.relational,1),s.relational;return e}resetEndLocation(e,r=this.lastTokEnd,i=this.lastTokEndLoc){if(e.end=r,e.loc.end=i,this.options.ranges)e.range[1]=r}startNodeAtNode(e){return super.startNodeAt(e.start,e.loc.start)}nextTokenStart(){return this.nextTokenStartSince(this.pos)}tsHasSomeModifiers(e,r){return r.some((i)=>{if(Me(i))return e.accessibility===i;return!!e[i]})}tsIsStartOfStaticBlocks(){return this.isContextual("static")&&this.lookaheadCharCode()===123}tsCheckForInvalidTypeCasts(e){e.forEach((r)=>{if(r?.type==="TSTypeCastExpression")this.raise(r.typeAnnotation.start,S.UnexpectedTypeAnnotation)})}atPossibleAsyncArrow(e){return e.type==="Identifier"&&e.name==="async"&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&e.start===this.potentialArrowAt}tsIsIdentifier(){return k(this.type)}tsTryParseTypeOrTypePredicateAnnotation(){return this.match(s.colon)?this.tsParseTypeOrTypePredicateAnnotation(s.colon):void 0}tsTryParseGenericAsyncArrowFunction(e,r,i){if(!this.tsMatchLeftRelational())return;let l=this.maybeInArrowParameters;this.maybeInArrowParameters=!0;let p=this.tsTryParseAndCatch(()=>{let h=this.startNodeAt(e,r);return h.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(h),h.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(s.arrow),h});if(this.maybeInArrowParameters=l,!p)return;return super.parseArrowExpression(p,null,!0,i)}tsParseTypeArgumentsInExpression(){if(this.reScan_lt()!==s.relational)return;return this.tsParseTypeArguments()}tsInNoContext(e){let r=this.context;this.context=[r[0]];try{return e()}finally{this.context=r}}tsTryParseTypeAnnotation(){return this.match(s.colon)?this.tsParseTypeAnnotation():void 0}isUnparsedContextual(e,r){let i=e+r.length;if(this.input.slice(e,i)===r){let l=this.input.charCodeAt(i);return!(g(l)||(l&64512)===55296)}return!1}isAbstractConstructorSignature(){return this.ts_isContextual(x.abstract)&&this.lookahead().type===s._new}nextTokenStartSince(e){return de.lastIndex=e,de.test(this.input)?de.lastIndex:e}lookaheadCharCode(){return this.input.charCodeAt(this.nextTokenStart())}compareLookaheadState(e,r){for(let i of Object.keys(e))if(e[i]!==r[i])return!1;return!0}createLookaheadState(){this.value=null,this.context=[this.curContext()]}getCurLookaheadState(){return{endLoc:this.endLoc,lastTokEnd:this.lastTokEnd,lastTokStart:this.lastTokStart,lastTokStartLoc:this.lastTokStartLoc,pos:this.pos,value:this.value,type:this.type,start:this.start,end:this.end,context:this.context,startLoc:this.startLoc,lastTokEndLoc:this.lastTokEndLoc,curLine:this.curLine,lineStart:this.lineStart,curPosition:this.curPosition,containsEsc:this.containsEsc}}cloneCurLookaheadState(){return{pos:this.pos,value:this.value,type:this.type,start:this.start,end:this.end,context:this.context&&this.context.slice(),startLoc:this.startLoc,lastTokEndLoc:this.lastTokEndLoc,endLoc:this.endLoc,lastTokEnd:this.lastTokEnd,lastTokStart:this.lastTokStart,lastTokStartLoc:this.lastTokStartLoc,curLine:this.curLine,lineStart:this.lineStart,curPosition:this.curPosition,containsEsc:this.containsEsc}}setLookaheadState(e){this.pos=e.pos,this.value=e.value,this.endLoc=e.endLoc,this.lastTokEnd=e.lastTokEnd,this.lastTokStart=e.lastTokStart,this.lastTokStartLoc=e.lastTokStartLoc,this.type=e.type,this.start=e.start,this.end=e.end,this.context=e.context,this.startLoc=e.startLoc,this.lastTokEndLoc=e.lastTokEndLoc,this.curLine=e.curLine,this.lineStart=e.lineStart,this.curPosition=e.curPosition,this.containsEsc=e.containsEsc}tsLookAhead(e){let r=this.getCurLookaheadState(),i=e();return this.setLookaheadState(r),i}lookahead(e){let r=this.getCurLookaheadState();if(this.createLookaheadState(),this.isLookahead=!0,e!==void 0)for(let l=0;l<e;l++)this.nextToken();else this.nextToken();this.isLookahead=!1;let i=this.getCurLookaheadState();return this.setLookaheadState(r),i}readWord(){let e=this.readWord1(),r=s.name;if(this.keywords.test(e))r=y[e];else if(new RegExp(_).test(e))r=x[e];return this.finishToken(r,e)}skipBlockComment(){let e;if(!this.isLookahead)e=this.options.onComment&&this.curPosition();let r=this.pos,i=this.input.indexOf("*/",this.pos+=2);if(i===-1)this.raise(this.pos-2,"Unterminated comment");if(this.pos=i+2,this.options.locations)for(let l,p=r;(l=X(this.input,p,this.pos))>-1;)++this.curLine,p=this.lineStart=l;if(this.isLookahead)return;if(this.options.onComment)this.options.onComment(!0,this.input.slice(r+2,i),r,this.pos,e,this.curPosition())}skipLineComment(e){let r=this.pos,i;if(!this.isLookahead)i=this.options.onComment&&this.curPosition();let l=this.input.charCodeAt(this.pos+=e);while(this.pos<this.input.length&&!f(l))l=this.input.charCodeAt(++this.pos);if(this.isLookahead)return;if(this.options.onComment)this.options.onComment(!1,this.input.slice(r+e,this.pos),r,this.pos,i,this.curPosition())}finishToken(e,r){if(this.preValue=this.value,this.preToken=this.type,this.end=this.pos,this.options.locations)this.endLoc=this.curPosition();let i=this.type;if(this.type=e,this.value=r,!this.isLookahead)this.updateContext(i)}resetStartLocation(e,r,i){if(e.start=r,e.loc.start=i,this.options.ranges)e.range[0]=r}isLineTerminator(){return this.eat(s.semi)||super.canInsertSemicolon()}hasFollowingLineBreak(){return De.lastIndex=this.end,De.test(this.input)}addExtra(e,r,i,l=!0){if(!e)return;let p=e.extra=e.extra||{};if(l)p[r]=i;else Object.defineProperty(p,r,{enumerable:l,value:i})}isLiteralPropertyName(){return N(this.type)}hasPrecedingLineBreak(){return E.test(this.input.slice(this.lastTokEnd,this.start))}createIdentifier(e,r){return e.name=r,this.finishNode(e,"Identifier")}resetStartLocationFromNode(e,r){this.resetStartLocation(e,r.start,r.loc.start)}isThisParam(e){return e.type==="Identifier"&&e.name==="this"}isLookaheadContextual(e){let r=this.nextTokenStart();return this.isUnparsedContextual(r,e)}ts_type_isContextual(e,r){return e===r&&!this.containsEsc}ts_isContextual(e){return this.type===e&&!this.containsEsc}ts_isContextualWithState(e,r){return e.type===r&&!e.containsEsc}isContextualWithState(e,r){return r.type===s.name&&r.value===e&&!r.containsEsc}tsIsStartOfMappedType(){if(this.next(),this.eat(s.plusMin))return this.ts_isContextual(x.readonly);if(this.ts_isContextual(x.readonly))this.next();if(!this.match(s.bracketL))return!1;if(this.next(),!this.tsIsIdentifier())return!1;return this.next(),this.match(s._in)}tsInDisallowConditionalTypesContext(e){let r=this.inDisallowConditionalTypesContext;this.inDisallowConditionalTypesContext=!0;try{return e()}finally{this.inDisallowConditionalTypesContext=r}}tsTryParseType(){return this.tsEatThenParseType(s.colon)}match(e){return this.type===e}matchJsx(e){return this.type===u.tokTypes[e]}ts_eatWithState(e,r,i){let l=i.type;if(e===l){for(let p=0;p<r;p++)this.next();return!0}else return!1}ts_eatContextualWithState(e,r,i){if(_.test(e)){if(this.ts_isContextualWithState(i,x[e])){for(let l=0;l<r;l++)this.next();return!0}return!1}else{if(!this.isContextualWithState(e,i))return!1;for(let l=0;l<r;l++)this.next();return!0}}canHaveLeadingDecorator(){return this.match(s._class)||this.isAbstractClass()}eatContextual(e){if(_.test(e)){if(this.ts_isContextual(x[e]))return this.next(),!0;return!1}else return super.eatContextual(e)}tsIsExternalModuleReference(){return this.isContextual("require")&&this.lookaheadCharCode()===40}tsParseExternalModuleReference(){let e=this.startNode();if(this.expectContextual("require"),this.expect(s.parenL),!this.match(s.string))this.unexpected();return e.expression=this.parseExprAtom(),this.expect(s.parenR),this.finishNode(e,"TSExternalModuleReference")}tsParseEntityName(e=!0){let r=this.parseIdent(e);while(this.eat(s.dot)){let i=this.startNodeAtNode(r);i.left=r,i.right=this.parseIdent(e),r=this.finishNode(i,"TSQualifiedName")}return r}tsParseEnumMember(){let e=this.startNode();if(e.id=this.match(s.string)?this.parseLiteral(this.value):this.parseIdent(!0),this.eat(s.eq))e.initializer=this.parseMaybeAssign();return this.finishNode(e,"TSEnumMember")}tsParseEnumDeclaration(e,r={}){if(r.const)e.const=!0;if(r.declare)e.declare=!0;return this.expectContextual("enum"),e.id=this.parseIdent(),this.checkLValSimple(e.id),this.expect(s.braceL),e.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(s.braceR),this.finishNode(e,"TSEnumDeclaration")}tsParseModuleBlock(){let e=this.startNode();this.enterScope(Ot),this.expect(s.braceL),e.body=[];while(this.type!==s.braceR){let r=this.parseStatement(null,!0);e.body.push(r)}return this.next(),super.exitScope(),this.finishNode(e,"TSModuleBlock")}tsParseAmbientExternalModuleDeclaration(e){if(this.ts_isContextual(x.global))e.global=!0,e.id=this.parseIdent();else if(this.match(s.string))e.id=this.parseLiteral(this.value);else this.unexpected();if(this.match(s.braceL))this.enterScope(Z),e.body=this.tsParseModuleBlock(),super.exitScope();else super.semicolon();return this.finishNode(e,"TSModuleDeclaration")}tsTryParseDeclare(e){if(this.isLineTerminator())return;let r=this.type,i;if(this.isContextual("let"))r=s._var,i="let";return this.tsInAmbientContext(()=>{if(r===s._function)return e.declare=!0,this.parseFunctionStatement(e,!1,!0);if(r===s._class)return e.declare=!0,this.parseClass(e,!0);if(r===x.enum)return this.tsParseEnumDeclaration(e,{declare:!0});if(r===x.global)return this.tsParseAmbientExternalModuleDeclaration(e);if(r===s._const||r===s._var){if(!this.match(s._const)||!this.isLookaheadContextual("enum"))return e.declare=!0,this.parseVarStatement(e,i||this.value,!0);return this.expect(s._const),this.tsParseEnumDeclaration(e,{const:!0,declare:!0})}if(r===x.interface){let l=this.tsParseInterfaceDeclaration(e,{declare:!0});if(l)return l}if(k(r))return this.tsParseDeclaration(e,this.value,!0)})}tsIsListTerminator(e){switch(e){case"EnumMembers":case"TypeMembers":return this.match(s.braceR);case"HeritageClauseElement":return this.match(s.braceL);case"TupleElementTypes":return this.match(s.bracketR);case"TypeParametersOrArguments":return this.tsMatchRightRelational()}}tsParseDelimitedListWorker(e,r,i,l){let p=[],h=-1;for(;;){if(this.tsIsListTerminator(e))break;h=-1;let d=r();if(d==null)return;if(p.push(d),this.eat(s.comma)){h=this.lastTokStart;continue}if(this.tsIsListTerminator(e))break;if(i)this.expect(s.comma);return}if(l)l.value=h;return p}tsParseDelimitedList(e,r,i){return Zt(this.tsParseDelimitedListWorker(e,r,!0,i))}tsParseBracketedList(e,r,i,l,p){if(!l)if(i)this.expect(s.bracketL);else this.expect(s.relational);let h=this.tsParseDelimitedList(e,r,p);if(i)this.expect(s.bracketR);else this.expect(s.relational);return h}tsParseTypeParameterName(){return this.parseIdent().name}tsEatThenParseType(e){return!this.match(e)?void 0:this.tsNextThenParseType()}tsExpectThenParseType(e){return this.tsDoThenParseType(()=>this.expect(e))}tsNextThenParseType(){return this.tsDoThenParseType(()=>this.next())}tsDoThenParseType(e){return this.tsInType(()=>(e(),this.tsParseType()))}tsSkipParameterStart(){if(k(this.type)||this.match(s._this))return this.next(),!0;if(this.match(s.braceL))try{return this.parseObj(!0),!0}catch{return!1}if(this.match(s.bracketL)){this.next();try{return this.parseBindingList(s.bracketR,!0,!0),!0}catch{return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){if(this.next(),this.match(s.parenR)||this.match(s.ellipsis))return!0;if(this.tsSkipParameterStart()){if(this.match(s.colon)||this.match(s.comma)||this.match(s.question)||this.match(s.eq))return!0;if(this.match(s.parenR)){if(this.next(),this.match(s.arrow))return!0}}return!1}tsIsStartOfFunctionType(){if(this.tsMatchLeftRelational())return!0;return this.match(s.parenL)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsInAllowConditionalTypesContext(e){let r=this.inDisallowConditionalTypesContext;this.inDisallowConditionalTypesContext=!1;try{return e()}finally{this.inDisallowConditionalTypesContext=r}}tsParseBindingListForSignature(){return super.parseBindingList(s.parenR,!0,!0).map((e)=>{if(e.type!=="Identifier"&&e.type!=="RestElement"&&e.type!=="ObjectPattern"&&e.type!=="ArrayPattern")this.raise(e.start,S.UnsupportedSignatureParameterKind({type:e.type}));return e})}tsParseTypePredicateAsserts(){if(this.type!==x.asserts)return!1;let e=this.containsEsc;if(this.next(),!k(this.type)&&!this.match(s._this))return!1;if(e)this.raise(this.lastTokStart,"Escape sequence in keyword asserts");return!0}tsParseThisTypeNode(){let e=this.startNode();return this.next(),this.finishNode(e,"TSThisType")}tsParseTypeAnnotation(e=!0,r=this.startNode()){return this.tsInType(()=>{if(e)this.expect(s.colon);r.typeAnnotation=this.tsParseType()}),this.finishNode(r,"TSTypeAnnotation")}tsParseThisTypePredicate(e){this.next();let r=this.startNodeAtNode(e);return r.parameterName=e,r.typeAnnotation=this.tsParseTypeAnnotation(!1),r.asserts=!1,this.finishNode(r,"TSTypePredicate")}tsParseThisTypeOrThisTypePredicate(){let e=this.tsParseThisTypeNode();if(this.isContextual("is")&&!this.hasPrecedingLineBreak())return this.tsParseThisTypePredicate(e);else return e}tsParseTypePredicatePrefix(){let e=this.parseIdent();if(this.isContextual("is")&&!this.hasPrecedingLineBreak())return this.next(),e}tsParseTypeOrTypePredicateAnnotation(e){return this.tsInType(()=>{let r=this.startNode();this.expect(e);let i=this.startNode(),l=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(l&&this.match(s._this)){let d=this.tsParseThisTypeOrThisTypePredicate();if(d.type==="TSThisType")i.parameterName=d,i.asserts=!0,i.typeAnnotation=null,d=this.finishNode(i,"TSTypePredicate");else this.resetStartLocationFromNode(d,i),d.asserts=!0;return r.typeAnnotation=d,this.finishNode(r,"TSTypeAnnotation")}let p=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!p){if(!l)return this.tsParseTypeAnnotation(!1,r);return i.parameterName=this.parseIdent(),i.asserts=l,i.typeAnnotation=null,r.typeAnnotation=this.finishNode(i,"TSTypePredicate"),this.finishNode(r,"TSTypeAnnotation")}let h=this.tsParseTypeAnnotation(!1);return i.parameterName=p,i.typeAnnotation=h,i.asserts=l,r.typeAnnotation=this.finishNode(i,"TSTypePredicate"),this.finishNode(r,"TSTypeAnnotation")})}tsFillSignature(e,r){let i=e===s.arrow,l="parameters",p="typeAnnotation";if(r.typeParameters=this.tsTryParseTypeParameters(),this.expect(s.parenL),r.parameters=this.tsParseBindingListForSignature(),i)r.typeAnnotation=this.tsParseTypeOrTypePredicateAnnotation(e);else if(this.match(e))r.typeAnnotation=this.tsParseTypeOrTypePredicateAnnotation(e)}tsTryNextParseConstantContext(){if(this.lookahead().type!==s._const)return null;this.next();let e=this.tsParseTypeReference();if(e.typeParameters||e.typeArguments)this.raise(e.typeName.start,S.CannotFindName({name:"const"}));return e}tsParseFunctionOrConstructorType(e,r){let i=this.startNode();if(e==="TSConstructorType"){if(i.abstract=!!r,r)this.next();this.next()}return this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(s.arrow,i)),this.finishNode(i,e)}tsParseUnionOrIntersectionType(e,r,i){let l=this.startNode(),p=this.eat(i),h=[];do h.push(r());while(this.eat(i));if(h.length===1&&!p)return h[0];return l.types=h,this.finishNode(l,e)}tsCheckTypeAnnotationForReadOnly(e){switch(e.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(e.start,S.UnexpectedReadonly)}}tsParseTypeOperator(){let e=this.startNode(),r=this.value;if(this.next(),e.operator=r,e.typeAnnotation=this.tsParseTypeOperatorOrHigher(),r==="readonly")this.tsCheckTypeAnnotationForReadOnly(e);return this.finishNode(e,"TSTypeOperator")}tsParseConstraintForInferType(){if(this.eat(s._extends)){let e=this.tsInDisallowConditionalTypesContext(()=>this.tsParseType());if(this.inDisallowConditionalTypesContext||!this.match(s.question))return e}}tsParseInferType(){let e=this.startNode();this.expectContextual("infer");let r=this.startNode();return r.name=this.tsParseTypeParameterName(),r.constraint=this.tsTryParse(()=>this.tsParseConstraintForInferType()),e.typeParameter=this.finishNode(r,"TSTypeParameter"),this.finishNode(e,"TSInferType")}tsParseLiteralTypeNode(){let e=this.startNode();return e.literal=(()=>{switch(this.type){case s.num:case s.string:case s._true:case s._false:return this.parseExprAtom();default:this.unexpected()}})(),this.finishNode(e,"TSLiteralType")}tsParseImportType(){let e=this.startNode();if(this.expect(s._import),this.expect(s.parenL),!this.match(s.string))this.raise(this.start,S.UnsupportedImportTypeArgument);if(e.argument=this.parseExprAtom(),this.expect(s.parenR),this.eat(s.dot))e.qualifier=this.tsParseEntityName();if(this.tsMatchLeftRelational())e.typeArguments=this.tsParseTypeArguments();return this.finishNode(e,"TSImportType")}tsParseTypeQuery(){let e=this.startNode();if(this.expect(s._typeof),this.match(s._import))e.exprName=this.tsParseImportType();else e.exprName=this.tsParseEntityName();if(!this.hasPrecedingLineBreak()&&this.tsMatchLeftRelational())e.typeArguments=this.tsParseTypeArguments();return this.finishNode(e,"TSTypeQuery")}tsParseMappedTypeParameter(){let e=this.startNode();return e.name=this.tsParseTypeParameterName(),e.constraint=this.tsExpectThenParseType(s._in),this.finishNode(e,"TSTypeParameter")}tsParseMappedType(){let e=this.startNode();if(this.expect(s.braceL),this.match(s.plusMin))e.readonly=this.value,this.next(),this.expectContextual("readonly");else if(this.eatContextual("readonly"))e.readonly=!0;if(this.expect(s.bracketL),e.typeParameter=this.tsParseMappedTypeParameter(),e.nameType=this.eatContextual("as")?this.tsParseType():null,this.expect(s.bracketR),this.match(s.plusMin))e.optional=this.value,this.next(),this.expect(s.question);else if(this.eat(s.question))e.optional=!0;return e.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(s.braceR),this.finishNode(e,"TSMappedType")}tsParseTypeLiteral(){let e=this.startNode();return e.members=this.tsParseObjectTypeMembers(),this.finishNode(e,"TSTypeLiteral")}tsParseTupleElementType(){let e=this.startLoc,r=this.start,i=this.eat(s.ellipsis),l=this.tsParseType(),p=this.eat(s.question);if(this.eat(s.colon)){let d=this.startNodeAtNode(l);if(d.optional=p,l.type==="TSTypeReference"&&!l.typeArguments&&l.typeName.type==="Identifier")d.label=l.typeName;else this.raise(l.start,S.InvalidTupleMemberLabel),d.label=l;d.elementType=this.tsParseType(),l=this.finishNode(d,"TSNamedTupleMember")}else if(p){let d=this.startNodeAtNode(l);d.typeAnnotation=l,l=this.finishNode(d,"TSOptionalType")}if(i){let d=this.startNodeAt(r,e);d.typeAnnotation=l,l=this.finishNode(d,"TSRestType")}return l}tsParseTupleType(){let e=this.startNode();e.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let r=!1;return e.elementTypes.forEach((i)=>{let{type:l}=i;if(r&&l!=="TSRestType"&&l!=="TSOptionalType"&&!(l==="TSNamedTupleMember"&&i.optional))this.raise(i.start,S.OptionalTypeBeforeRequired);if(r||=l==="TSNamedTupleMember"&&i.optional||l==="TSOptionalType",l==="TSRestType")i=i.typeAnnotation}),this.finishNode(e,"TSTupleType")}tsParseTemplateLiteralType(){let e=this.startNode();return e.literal=this.parseTemplate({isTagged:!1}),this.finishNode(e,"TSLiteralType")}tsParseTypeReference(){let e=this.startNode();if(e.typeName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.tsMatchLeftRelational())e.typeArguments=this.tsParseTypeArguments();return this.finishNode(e,"TSTypeReference")}tsMatchLeftRelational(){return this.match(s.relational)&&this.value==="<"}tsMatchRightRelational(){return this.match(s.relational)&&this.value===">"}tsParseParenthesizedType(){let e=this.startNode();return this.expect(s.parenL),e.typeAnnotation=this.tsParseType(),this.expect(s.parenR),this.finishNode(e,"TSParenthesizedType")}tsParseNonArrayType(){switch(this.type){case s.string:case s.num:case s._true:case s._false:return this.tsParseLiteralTypeNode();case s.plusMin:if(this.value==="-"){let e=this.startNode();if(this.lookahead().type!==s.num)this.unexpected();return e.literal=this.parseMaybeUnary(),this.finishNode(e,"TSLiteralType")}break;case s._this:return this.tsParseThisTypeOrThisTypePredicate();case s._typeof:return this.tsParseTypeQuery();case s._import:return this.tsParseImportType();case s.braceL:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case s.bracketL:return this.tsParseTupleType();case s.parenL:return this.tsParseParenthesizedType();case s.backQuote:case s.dollarBraceL:return this.tsParseTemplateLiteralType();default:{let{type:e}=this;if(k(e)||e===s._void||e===s._null){let r=e===s._void?"TSVoidKeyword":e===s._null?"TSNullKeyword":er(this.value);if(r!==void 0&&this.lookaheadCharCode()!==46){let i=this.startNode();return this.next(),this.finishNode(i,r)}return this.tsParseTypeReference()}}}this.unexpected()}tsParseArrayTypeOrHigher(){let e=this.tsParseNonArrayType();while(!this.hasPrecedingLineBreak()&&this.eat(s.bracketL))if(this.match(s.bracketR)){let r=this.startNodeAtNode(e);r.elementType=e,this.expect(s.bracketR),e=this.finishNode(r,"TSArrayType")}else{let r=this.startNodeAtNode(e);r.objectType=e,r.indexType=this.tsParseType(),this.expect(s.bracketR),e=this.finishNode(r,"TSIndexedAccessType")}return e}tsParseTypeOperatorOrHigher(){return C(this.type)&&!this.containsEsc?this.tsParseTypeOperator():this.isContextual("infer")?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),s.bitwiseAND)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),s.bitwiseOR)}tsParseNonConditionalType(){if(this.tsIsStartOfFunctionType())return this.tsParseFunctionOrConstructorType("TSFunctionType");if(this.match(s._new))return this.tsParseFunctionOrConstructorType("TSConstructorType");else if(this.isAbstractConstructorSignature())return this.tsParseFunctionOrConstructorType("TSConstructorType",!0);return this.tsParseUnionTypeOrHigher()}tsParseType(){Oe(this.inType);let e=this.tsParseNonConditionalType();if(this.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(s._extends))return e;let r=this.startNodeAtNode(e);return r.checkType=e,r.extendsType=this.tsInDisallowConditionalTypesContext(()=>this.tsParseNonConditionalType()),this.expect(s.question),r.trueType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.expect(s.colon),r.falseType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.finishNode(r,"TSConditionalType")}tsIsUnambiguouslyIndexSignature(){if(this.next(),k(this.type))return this.next(),this.match(s.colon);return!1}tsInType(e){let r=this.inType;this.inType=!0;try{return e()}finally{this.inType=r}}tsTryParseIndexSignature(e){if(!(this.match(s.bracketL)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))))return;this.expect(s.bracketL);let r=this.parseIdent();r.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(r),this.expect(s.bracketR),e.parameters=[r];let i=this.tsTryParseTypeAnnotation();if(i)e.typeAnnotation=i;return this.tsParseTypeMemberSemicolon(),this.finishNode(e,"TSIndexSignature")}tsParseNoneModifiers(e){this.tsParseModifiers({modified:e,allowedModifiers:[],disallowedModifiers:["in","out"],errorTemplate:S.InvalidModifierOnTypeParameterPositions})}tsParseTypeParameter(e=this.tsParseNoneModifiers.bind(this)){let r=this.startNode();return e(r),r.name=this.tsParseTypeParameterName(),r.constraint=this.tsEatThenParseType(s._extends),r.default=this.tsEatThenParseType(s.eq),this.finishNode(r,"TSTypeParameter")}tsParseTypeParameters(e){let r=this.startNode();if(this.tsMatchLeftRelational()||this.matchJsx("jsxTagStart"))this.next();else this.unexpected();let i={value:-1};if(r.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,e),!1,!0,i),r.params.length===0)this.raise(this.start,S.EmptyTypeParameters);if(i.value!==-1)this.addExtra(r,"trailingComma",i.value);return this.finishNode(r,"TSTypeParameterDeclaration")}tsTryParseTypeParameters(e){if(this.tsMatchLeftRelational())return this.tsParseTypeParameters(e)}tsTryParse(e){let r=this.getCurLookaheadState(),i=e();if(i!==void 0&&i!==!1)return i;else{this.setLookaheadState(r);return}}tsTokenCanFollowModifier(){return(this.match(s.bracketL)||this.match(s.braceL)||this.match(s.star)||this.match(s.ellipsis)||this.match(s.privateId)||this.isLiteralPropertyName())&&!this.hasPrecedingLineBreak()}tsNextTokenCanFollowModifier(){return this.next(!0),this.tsTokenCanFollowModifier()}tsParseModifier(e,r){let i=this.value;if(e.indexOf(i)!==-1&&!this.containsEsc){if(r&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return i}return}tsParseModifiersByMap({modified:e,map:r}){for(let i of Object.keys(r))e[i]=r[i]}tsParseModifiers({modified:e,allowedModifiers:r,disallowedModifiers:i,stopOnStartOfClassStaticBlock:l,errorTemplate:p=S.InvalidModifierOnTypeMember}){let h={},d=(T,m,P,D)=>{if(m===P&&e[D])this.raise(T.column,S.InvalidModifiersOrder({orderedModifiers:[P,D]}))},A=(T,m,P,D)=>{if(e[P]&&m===D||e[D]&&m===P)this.raise(T.column,S.IncompatibleModifiers({modifiers:[P,D]}))};for(;;){let T=this.startLoc,m=this.tsParseModifier(r.concat(i??[]),l);if(!m)break;if(Me(m))if(e.accessibility)this.raise(this.start,S.DuplicateAccessibilityModifier());else d(T,m,m,"override"),d(T,m,m,"static"),d(T,m,m,"readonly"),d(T,m,m,"accessor"),h.accessibility=m,e.accessibility=m;else if($t(m))if(e[m])this.raise(this.start,S.DuplicateModifier({modifier:m}));else d(T,m,"in","out"),h[m]=m,e[m]=!0;else if(Xt(m))if(e[m])this.raise(this.start,S.DuplicateModifier({modifier:m}));else A(T,m,"accessor","readonly"),A(T,m,"accessor","static"),A(T,m,"accessor","override"),h[m]=m,e[m]=!0;else if(m==="const")if(e[m])this.raise(this.start,S.DuplicateModifier({modifier:m}));else h[m]=m,e[m]=!0;else if(Object.hasOwnProperty.call(e,m))this.raise(this.start,S.DuplicateModifier({modifier:m}));else d(T,m,"static","readonly"),d(T,m,"static","override"),d(T,m,"override","readonly"),d(T,m,"abstract","override"),A(T,m,"declare","override"),A(T,m,"static","abstract"),h[m]=m,e[m]=!0;if(i?.includes(m))this.raise(this.start,p)}return h}tsParseInOutModifiers(e){this.tsParseModifiers({modified:e,allowedModifiers:["in","out"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:S.InvalidModifierOnTypeParameter})}parseMaybeUnary(e,r,i,l){if(!t?.jsx&&this.tsMatchLeftRelational())return this.tsParseTypeAssertion();else return super.parseMaybeUnary(e,r,i,l)}tsParseTypeAssertion(){if(a)this.raise(this.start,S.ReservedTypeAssertion);let e=this.tryParse(()=>{let r=this.startNode(),i=this.tsTryNextParseConstantContext();return r.typeAnnotation=i||this.tsNextThenParseType(),this.expect(s.relational),r.expression=this.parseMaybeUnary(),this.finishNode(r,"TSTypeAssertion")});if(e.error)return this.tsParseTypeParameters(this.tsParseConstModifier);else return e.node}tsParseTypeArguments(){let e=this.startNode();if(e.params=this.tsInType(()=>this.tsInNoContext(()=>(this.expect(s.relational),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))),e.params.length===0)this.raise(this.start,S.EmptyTypeArguments);return this.exprAllowed=!1,this.expect(s.relational),this.finishNode(e,"TSTypeParameterInstantiation")}tsParseHeritageClause(e){let r=this.start,i=this.tsParseDelimitedList("HeritageClauseElement",()=>{let l=this.startNode();if(l.expression=this.tsParseEntityName(),this.tsMatchLeftRelational())l.typeParameters=this.tsParseTypeArguments();return this.finishNode(l,"TSExpressionWithTypeArguments")});if(!i.length)this.raise(r,S.EmptyHeritageClauseType({token:e}));return i}tsParseTypeMemberSemicolon(){if(!this.eat(s.comma)&&!this.isLineTerminator())this.expect(s.semi)}tsTryParseAndCatch(e){let r=this.tryParse((i)=>e()||i());if(r.aborted||!r.node)return;if(r.error)this.setLookaheadState(r.failState);return r.node}tsParseSignatureMember(e,r){return this.tsFillSignature(s.colon,r),this.tsParseTypeMemberSemicolon(),this.finishNode(r,e)}tsParsePropertyOrMethodSignature(e,r){if(this.eat(s.question))e.optional=!0;let i=e;if(this.match(s.parenL)||this.tsMatchLeftRelational()){if(r)this.raise(e.start,S.ReadonlyForMethodSignature);let l=i;if(l.kind&&this.tsMatchLeftRelational())this.raise(this.start,S.AccesorCannotHaveTypeParameters);this.tsFillSignature(s.colon,l),this.tsParseTypeMemberSemicolon();let p="parameters",h="typeAnnotation";if(l.kind==="get"){if(l[p].length>0){if(this.raise(this.start,"A 'get' accesor must not have any formal parameters."),this.isThisParam(l[p][0]))this.raise(this.start,S.AccesorCannotDeclareThisParameter)}}else if(l.kind==="set"){if(l[p].length!==1)this.raise(this.start,"A 'get' accesor must not have any formal parameters.");else{let d=l[p][0];if(this.isThisParam(d))this.raise(this.start,S.AccesorCannotDeclareThisParameter);if(d.type==="Identifier"&&d.optional)this.raise(this.start,S.SetAccesorCannotHaveOptionalParameter);if(d.type==="RestElement")this.raise(this.start,S.SetAccesorCannotHaveRestParameter)}if(l[h])this.raise(l[h].start,S.SetAccesorCannotHaveReturnType)}else l.kind="method";return this.finishNode(l,"TSMethodSignature")}else{let l=i;if(r)l.readonly=!0;let p=this.tsTryParseTypeAnnotation();if(p)l.typeAnnotation=p;return this.tsParseTypeMemberSemicolon(),this.finishNode(l,"TSPropertySignature")}}tsParseTypeMember(){let e=this.startNode();if(this.match(s.parenL)||this.tsMatchLeftRelational())return this.tsParseSignatureMember("TSCallSignatureDeclaration",e);if(this.match(s._new)){let i=this.startNode();if(this.next(),this.match(s.parenL)||this.tsMatchLeftRelational())return this.tsParseSignatureMember("TSConstructSignatureDeclaration",e);else return e.key=this.createIdentifier(i,"new"),this.tsParsePropertyOrMethodSignature(e,!1)}this.tsParseModifiers({modified:e,allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]});let r=this.tsTryParseIndexSignature(e);if(r)return r;if(this.parsePropertyName(e),!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.tsTokenCanFollowModifier())e.kind=e.key.name,this.parsePropertyName(e);return this.tsParsePropertyOrMethodSignature(e,!!e.readonly)}tsParseList(e,r){let i=[];while(!this.tsIsListTerminator(e))i.push(r());return i}tsParseObjectTypeMembers(){this.expect(s.braceL);let e=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(s.braceR),e}tsParseInterfaceDeclaration(e,r={}){if(this.hasFollowingLineBreak())return null;if(this.expectContextual("interface"),r.declare)e.declare=!0;if(k(this.type))e.id=this.parseIdent(),this.checkLValSimple(e.id,v.BIND_TS_INTERFACE);else e.id=null,this.raise(this.start,S.MissingInterfaceName);if(e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers.bind(this)),this.eat(s._extends))e.extends=this.tsParseHeritageClause("extends");let i=this.startNode();return i.body=this.tsParseInterfaceBody(),e.body=this.finishNode(i,"TSInterfaceBody"),this.finishNode(e,"TSInterfaceDeclaration")}tsParseInterfaceBody(){this.expect(s.braceL);let e=this.inType;this.inType=!0;let r=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.inType=e,this.expect(s.braceR),r}tsParseAbstractDeclaration(e){if(this.match(s._class))return e.abstract=!0,this.parseClass(e,!0);else if(this.ts_isContextual(x.interface)){if(!this.hasFollowingLineBreak())return e.abstract=!0,this.tsParseInterfaceDeclaration(e)}else this.unexpected(e.start)}tsIsDeclarationStart(){return z(this.type)}tsParseExpressionStatement(e,r){switch(r.name){case"declare":{let i=this.tsTryParseDeclare(e);if(i)return i.declare=!0,i;break}case"global":if(this.match(s.braceL)){this.enterScope(Z);let i=e;return i.global=!0,i.id=r,i.body=this.tsParseModuleBlock(),super.exitScope(),this.finishNode(i,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(e,r.name,!1)}}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)}tsIsExportDefaultSpecifier(){let{type:e}=this,r=this.isAsyncFunction(),i=this.isLet();if(k(e)){if(r&&!this.containsEsc||i)return!1;if((e===x.type||e===x.interface)&&!this.containsEsc){let h=this.lookahead();if(k(h.type)&&!this.isContextualWithState("from",h)||h.type===s.braceL)return!1}}else if(!this.match(s._default))return!1;let l=this.nextTokenStart(),p=this.isUnparsedContextual(l,"from");if(this.input.charCodeAt(l)===44||k(this.type)&&p)return!0;if(this.match(s._default)&&p){let h=this.input.charCodeAt(this.nextTokenStartSince(l+4));return h===34||h===39}return!1}tsInAmbientContext(e){let r=this.isAmbientContext;this.isAmbientContext=!0;try{return e()}finally{this.isAmbientContext=r}}tsCheckLineTerminator(e){if(e){if(this.hasFollowingLineBreak())return!1;return this.next(),!0}return!this.isLineTerminator()}tsParseModuleOrNamespaceDeclaration(e,r=!1){if(e.id=this.parseIdent(),!r)this.checkLValSimple(e.id,v.BIND_TS_NAMESPACE);if(this.eat(s.dot)){let i=this.startNode();this.tsParseModuleOrNamespaceDeclaration(i,!0),e.body=i}else this.enterScope(Z),e.body=this.tsParseModuleBlock(),super.exitScope();return this.finishNode(e,"TSModuleDeclaration")}checkLValSimple(e,r=v.BIND_NONE,i){if(e.type==="TSNonNullExpression"||e.type==="TSAsExpression")e=e.expression;return super.checkLValSimple(e,r,i)}tsParseTypeAliasDeclaration(e){return e.id=this.parseIdent(),this.checkLValSimple(e.id,v.BIND_TS_TYPE),e.typeAnnotation=this.tsInType(()=>{if(e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers.bind(this)),this.expect(s.eq),this.ts_isContextual(x.interface)&&this.lookahead().type!==s.dot){let r=this.startNode();return this.next(),this.finishNode(r,"TSIntrinsicKeyword")}return this.tsParseType()}),this.semicolon(),this.finishNode(e,"TSTypeAliasDeclaration")}tsParseDeclaration(e,r,i){switch(r){case"abstract":if(this.tsCheckLineTerminator(i)&&(this.match(s._class)||k(this.type)))return this.tsParseAbstractDeclaration(e);break;case"module":if(this.tsCheckLineTerminator(i)){if(this.match(s.string))return this.tsParseAmbientExternalModuleDeclaration(e);else if(k(this.type))return this.tsParseModuleOrNamespaceDeclaration(e)}break;case"namespace":if(this.tsCheckLineTerminator(i)&&k(this.type))return this.tsParseModuleOrNamespaceDeclaration(e);break;case"type":if(this.tsCheckLineTerminator(i)&&k(this.type))return this.tsParseTypeAliasDeclaration(e);break}}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.value,!0)}tsParseImportEqualsDeclaration(e,r){e.isExport=r||!1,e.id=this.parseIdent(),this.checkLValSimple(e.id,v.BIND_LEXICAL),super.expect(s.eq);let i=this.tsParseModuleReference();if(e.importKind==="type"&&i.type!=="TSExternalModuleReference")this.raise(i.start,S.ImportAliasHasImportType);return e.moduleReference=i,super.semicolon(),this.finishNode(e,"TSImportEqualsDeclaration")}isExportDefaultSpecifier(){if(this.tsIsDeclarationStart())return!1;let{type:e}=this;if(k(e)){if(this.isContextual("async")||this.isContextual("let"))return!1;if((e===x.type||e===x.interface)&&!this.containsEsc){let l=this.lookahead();if(k(l.type)&&!this.isContextualWithState("from",l)||l.type===s.braceL)return!1}}else if(!this.match(s._default))return!1;let r=this.nextTokenStart(),i=this.isUnparsedContextual(r,"from");if(this.input.charCodeAt(r)===44||k(this.type)&&i)return!0;if(this.match(s._default)&&i){let l=this.input.charCodeAt(this.nextTokenStartSince(r+4));return l===34||l===39}return!1}parseTemplate({isTagged:e=!1}={}){let r=this.startNode();this.next(),r.expressions=[];let i=this.parseTemplateElement({isTagged:e});r.quasis=[i];while(!i.tail){if(this.type===s.eof)this.raise(this.pos,"Unterminated template literal");this.expect(s.dollarBraceL),r.expressions.push(this.inType?this.tsParseType():this.parseExpression()),this.expect(s.braceR),r.quasis.push(i=this.parseTemplateElement({isTagged:e}))}return this.next(),this.finishNode(r,"TemplateLiteral")}parseFunction(e,r,i,l,p){if(this.initFunction(e),this.ecmaVersion>=9||this.ecmaVersion>=6&&!l){if(this.type===s.star&&r&Re)this.unexpected();e.generator=this.eat(s.star)}if(this.ecmaVersion>=8)e.async=!!l;if(r&ae)e.id=r&Jt&&this.type!==s.name?null:this.parseIdent();let h=this.yieldPos,d=this.awaitPos,A=this.awaitIdentPos,T=this.maybeInArrowParameters;if(this.maybeInArrowParameters=!1,this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(fe(e.async,e.generator)),!(r&ae))e.id=this.type===s.name?this.parseIdent():null;this.parseFunctionParams(e);let m=r&ae;if(this.parseFunctionBody(e,i,!1,p,{isFunctionDeclaration:m}),this.yieldPos=h,this.awaitPos=d,this.awaitIdentPos=A,r&ae&&e.id&&!(r&Re))if(e.body)this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?v.BIND_VAR:v.BIND_LEXICAL:v.BIND_FUNCTION);else this.checkLValSimple(e.id,v.BIND_NONE);return this.maybeInArrowParameters=T,this.finishNode(e,m?"FunctionDeclaration":"FunctionExpression")}parseFunctionBody(e,r=!1,i=!1,l=!1,p){if(this.match(s.colon))e.returnType=this.tsParseTypeOrTypePredicateAnnotation(s.colon);let h=p?.isFunctionDeclaration?"TSDeclareFunction":p?.isClassMethod?"TSDeclareMethod":void 0;if(h&&!this.match(s.braceL)&&this.isLineTerminator())return this.exitScope(),this.finishNode(e,h);if(h==="TSDeclareFunction"&&this.isAmbientContext){if(this.raise(e.start,S.DeclareFunctionHasImplementation),e.declare)return super.parseFunctionBody(e,r,i,!1),this.finishNode(e,h)}return super.parseFunctionBody(e,r,i,l),e}parseNew(){if(this.containsEsc)this.raiseRecoverable(this.start,"Escape sequence in keyword new");let e=this.startNode(),r=this.parseIdent(!0);if(this.ecmaVersion>=6&&this.eat(s.dot)){e.meta=r;let d=this.containsEsc;if(e.property=this.parseIdent(!0),e.property.name!=="target")this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'");if(d)this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters");if(!this.allowNewDotTarget)this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block");return this.finishNode(e,"MetaProperty")}let i=this.start,l=this.startLoc,p=this.type===s._import;if(e.callee=this.parseSubscripts(this.parseExprAtom(),i,l,!0,!1),p&&e.callee.type==="ImportExpression")this.raise(i,"Cannot use new with import()");let{callee:h}=e;if(h.type==="TSInstantiationExpression"&&!h.extra?.parenthesized)e.typeArguments=h.typeArguments,e.callee=h.expression;if(this.eat(s.parenL))e.arguments=this.parseExprList(s.parenR,this.ecmaVersion>=8,!1);else e.arguments=[];return this.finishNode(e,"NewExpression")}parseExprOp(e,r,i,l,p){if(s._in.binop>l&&!this.hasPrecedingLineBreak()){let h;if(this.isContextual("as"))h="TSAsExpression";if(this.isContextual("satisfies"))h="TSSatisfiesExpression";if(h){let d=this.startNodeAt(r,i);d.expression=e;let A=this.tsTryNextParseConstantContext();if(A)d.typeAnnotation=A;else d.typeAnnotation=this.tsNextThenParseType();return this.finishNode(d,h),this.reScan_lt_gt(),this.parseExprOp(d,r,i,l,p)}}return super.parseExprOp(e,r,i,l,p)}parseImportSpecifiers(){let e=[],r=!0;if(u.tokenIsIdentifier(this.type)){if(e.push(this.parseImportDefaultSpecifier()),!this.eat(s.comma))return e}if(this.type===s.star)return e.push(this.parseImportNamespaceSpecifier()),e;this.expect(s.braceL);while(!this.eat(s.braceR)){if(!r){if(this.expect(s.comma),this.afterTrailingComma(s.braceR))break}else r=!1;e.push(this.parseImportSpecifier())}return e}parseImport(e){let r=this.lookahead();if(e.importKind="value",this.importOrExportOuterKind="value",k(r.type)||this.match(s.star)||this.match(s.braceL)){let i=this.lookahead(2);if(i.type!==s.comma&&!this.isContextualWithState("from",i)&&i.type!==s.eq&&this.ts_eatContextualWithState("type",1,r))this.importOrExportOuterKind="type",e.importKind="type",r=this.lookahead(),i=this.lookahead(2);if(k(r.type)&&i.type===s.eq){this.next();let l=this.tsParseImportEqualsDeclaration(e);return this.importOrExportOuterKind="value",l}}if(this.next(),this.type===s.string)e.specifiers=[],e.source=this.parseExprAtom();else e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===s.string?this.parseExprAtom():this.unexpected();if(this.parseMaybeImportAttributes(e),this.semicolon(),this.finishNode(e,"ImportDeclaration"),this.importOrExportOuterKind="value",e.importKind==="type"&&e.specifiers.length>1&&e.specifiers[0].type==="ImportDefaultSpecifier")this.raise(e.start,S.TypeImportCannotSpecifyDefaultAndNamed);return e}parseExportDefaultDeclaration(){if(this.isAbstractClass()){let e=this.startNode();return this.next(),e.abstract=!0,this.parseClass(e,!0)}if(this.match(x.interface)){let e=this.tsParseInterfaceDeclaration(this.startNode());if(e)return e}return super.parseExportDefaultDeclaration()}parseExportAllDeclaration(e,r){if(this.ecmaVersion>=11)if(this.eatContextual("as"))e.exported=this.parseModuleExportName(),this.checkExport(r,e.exported,this.lastTokStart);else e.exported=null;if(this.expectContextual("from"),this.type!==s.string)this.unexpected();return e.source=this.parseExprAtom(),this.parseMaybeImportAttributes(e),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")}parseDynamicImport(e){if(this.next(),e.source=this.parseMaybeAssign(),this.eat(s.comma)){let r=this.parseExpression();e.arguments=[r]}if(!this.eat(s.parenR)){let r=this.start;if(this.eat(s.comma)&&this.eat(s.parenR))this.raiseRecoverable(r,"Trailing comma is not allowed in import()");else this.unexpected(r)}return this.finishNode(e,"ImportExpression")}parseExport(e,r){let i=this.lookahead();if(this.ts_eatWithState(s._import,2,i)){if(this.ts_isContextual(x.type)&&this.lookaheadCharCode()!==61)e.importKind="type",this.importOrExportOuterKind="type",this.next();else e.importKind="value",this.importOrExportOuterKind="value";let l=this.tsParseImportEqualsDeclaration(e,!0);return this.importOrExportOuterKind=void 0,l}else if(this.ts_eatWithState(s.eq,2,i)){let l=e;return l.expression=this.parseExpression(),this.semicolon(),this.importOrExportOuterKind=void 0,this.finishNode(l,"TSExportAssignment")}else if(this.ts_eatContextualWithState("as",2,i)){let l=e;return this.expectContextual("namespace"),l.id=this.parseIdent(),this.semicolon(),this.importOrExportOuterKind=void 0,this.finishNode(l,"TSNamespaceExportDeclaration")}else{let l=this.lookahead(2).type;if(this.ts_isContextualWithState(i,x.type)&&(l===s.braceL||l===s.star))this.next(),this.importOrExportOuterKind="type",e.exportKind="type";else this.importOrExportOuterKind="value",e.exportKind="value";if(this.next(),this.eat(s.star))return this.parseExportAllDeclaration(e,r);if(this.eat(s._default))return this.checkExport(r,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement()){if(e.declaration=this.parseExportDeclaration(e),e.declaration.type==="VariableDeclaration")this.checkVariableExport(r,e.declaration.declarations);else this.checkExport(r,e.declaration.id,e.declaration.id.start);e.specifiers=[],e.source=null}else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(r),this.eatContextual("from")){if(this.type!==s.string)this.unexpected();e.source=this.parseExprAtom(),this.parseMaybeImportAttributes(e)}else{for(let p of e.specifiers)if(this.checkUnreserved(p.local),this.checkLocalExport(p.local),p.local.type==="Literal")this.raise(p.local.start,"A string literal cannot be used as an exported binding without `from`.");e.source=null}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")}}checkExport(e,r,i){if(!e)return;if(typeof r!=="string")r=r.type==="Identifier"?r.name:r.value;e[r]=!0}parseMaybeDefault(e,r,i){let l=super.parseMaybeDefault(e,r,i);if(l.type==="AssignmentPattern"&&l.typeAnnotation&&l.right.start<l.typeAnnotation.start)this.raise(l.typeAnnotation.start,S.TypeAnnotationAfterAssign);return l}typeCastToParameter(e){return e.expression.typeAnnotation=e.typeAnnotation,this.resetEndLocation(e.expression,e.typeAnnotation.end,e.typeAnnotation.loc?.end),e.expression}toAssignableList(e,r){if(!e)e=[];for(let i=0;i<e.length;i++){let l=e[i];if(l?.type==="TSTypeCastExpression")e[i]=this.typeCastToParameter(l)}return super.toAssignableList(e,r)}reportReservedArrowTypeParam(e){if(e.params.length===1&&!e.extra?.trailingComma&&a)this.raise(e.start,S.ReservedArrowTypeParam)}parseExprAtom(e,r,i){if(this.type===x.jsxText)return this.jsx_parseText();else if(this.type===x.jsxTagStart)return this.jsx_parseElement();else if(this.type===x.at)return this.parseDecorators(),this.parseExprAtom();else if(k(this.type)){let l=this.potentialArrowAt===this.start,p=this.start,h=this.startLoc,d=this.containsEsc,A=this.parseIdent(!1);if(this.ecmaVersion>=8&&!d&&A.name==="async"&&!this.canInsertSemicolon()&&this.eat(s._function))return this.overrideContext(w.f_expr),this.parseFunction(this.startNodeAt(p,h),0,!1,!0,r);if(l&&!this.canInsertSemicolon()){if(this.eat(s.arrow))return this.parseArrowExpression(this.startNodeAt(p,h),[A],!1,r);if(this.ecmaVersion>=8&&A.name==="async"&&this.type===s.name&&!d&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc)){if(A=this.parseIdent(!1),this.canInsertSemicolon()||!this.eat(s.arrow))this.unexpected();return this.parseArrowExpression(this.startNodeAt(p,h),[A],!0,r)}}return A}else return super.parseExprAtom(e,r,i)}parseExprAtomDefault(){if(k(this.type)){let e=this.potentialArrowAt===this.start,r=this.containsEsc,i=this.parseIdent();if(!r&&i.name==="async"&&!this.canInsertSemicolon()){let{type:l}=this;if(l===s._function)return this.next(),this.parseFunction(this.startNodeAtNode(i),void 0,!0,!0);else if(k(l))if(this.lookaheadCharCode()===61){let p=this.parseIdent(!1);if(this.canInsertSemicolon()||!this.eat(s.arrow))this.unexpected();return this.parseArrowExpression(this.startNodeAtNode(i),[p],!0)}else return i}if(e&&this.match(s.arrow)&&!this.canInsertSemicolon())return this.next(),this.parseArrowExpression(this.startNodeAtNode(i),[i],!1);return i}else this.unexpected()}parseIdentNode(){let e=this.startNode();if(M(this.type)&&!((this.type.keyword==="class"||this.type.keyword==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46)))e.name=this.value;else return super.parseIdentNode();return e}parseVarStatement(e,r,i=!1){let{isAmbientContext:l}=this;this.next(),super.parseVar(e,!1,r,i||l),this.semicolon();let p=this.finishNode(e,"VariableDeclaration");if(!l)return p;for(let{id:h,init:d}of p.declarations){if(!d)continue;if(r!=="const"||!!h.typeAnnotation)this.raise(d.start,S.InitializerNotAllowedInAmbientContext);else if(d.type!=="StringLiteral"&&d.type!=="BooleanLiteral"&&d.type!=="NumericLiteral"&&d.type!=="BigIntLiteral"&&(d.type!=="TemplateLiteral"||d.expressions.length>0)&&!Yt(d))this.raise(d.start,S.ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference)}return p}parseStatement(e,r,i){if(this.match(x.at))this.parseDecorators(!0);if(this.match(s._const)&&this.isLookaheadContextual("enum")){let l=this.startNode();return this.expect(s._const),this.tsParseEnumDeclaration(l,{const:!0})}if(this.ts_isContextual(x.enum))return this.tsParseEnumDeclaration(this.startNode());if(this.ts_isContextual(x.interface)){let l=this.tsParseInterfaceDeclaration(this.startNode());if(l)return l}return super.parseStatement(e,r,i)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}parsePostMemberNameModifiers(e){if(this.eat(s.question))e.optional=!0;if(e.readonly&&this.match(s.parenL))this.raise(e.start,S.ClassMethodHasReadonly);if(e.declare&&this.match(s.parenL))this.raise(e.start,S.ClassMethodHasDeclare)}parseExpressionStatement(e,r){return(r.type==="Identifier"?this.tsParseExpressionStatement(e,r):void 0)||super.parseExpressionStatement(e,r)}shouldParseExportStatement(){if(this.tsIsDeclarationStart())return!0;if(this.match(x.at))return!0;return super.shouldParseExportStatement()}parseConditional(e,r,i,l,p){if(this.eat(s.question)){let h=this.startNodeAt(r,i);return h.test=e,h.consequent=this.parseMaybeAssign(),this.expect(s.colon),h.alternate=this.parseMaybeAssign(l),this.finishNode(h,"ConditionalExpression")}return e}parseMaybeConditional(e,r){let i=this.start,l=this.startLoc,p=this.parseExprOps(e,r);if(this.checkExpressionErrors(r))return p;if(!this.maybeInArrowParameters||!this.match(s.question))return this.parseConditional(p,i,l,e,r);let h=this.tryParse(()=>this.parseConditional(p,i,l,e,r));if(!h.node){if(h.error)this.setOptionalParametersError(r,h.error);return p}if(h.error)this.setLookaheadState(h.failState);return h.node}parseParenItem(e){let r=this.start,i=this.startLoc;if(e=super.parseParenItem(e),this.eat(s.question))e.optional=!0,this.resetEndLocation(e);if(this.match(s.colon)){let l=this.startNodeAt(r,i);return l.expression=e,l.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(l,"TSTypeCastExpression")}return e}parseExportDeclaration(e){if(!this.isAmbientContext&&this.ts_isContextual(x.declare))return this.tsInAmbientContext(()=>this.parseExportDeclaration(e));let r=this.start,i=this.startLoc,l=this.eatContextual("declare");if(l&&(this.ts_isContextual(x.declare)||!this.shouldParseExportStatement()))this.raise(this.start,S.ExpectedAmbientAfterExportDeclare);let h=k(this.type)&&this.tsTryParseExportDeclaration()||this.parseStatement(null);if(!h)return null;if(h.type==="TSInterfaceDeclaration"||h.type==="TSTypeAliasDeclaration"||l)e.exportKind="type";if(l)this.resetStartLocation(h,r,i),h.declare=!0;return h}parseClassId(e,r){if(!r&&this.isContextual("implements"))return;super.parseClassId(e,r);let i=this.tsTryParseTypeParameters(this.tsParseInOutModifiers.bind(this));if(i)e.typeParameters=i}parseClassPropertyAnnotation(e){if(!e.optional){if(this.value==="!"&&this.eat(s.prefix))e.definite=!0;else if(this.eat(s.question))e.optional=!0}let r=this.tsTryParseTypeAnnotation();if(r)e.typeAnnotation=r}parseClassField(e){if(e.key.type==="PrivateIdentifier"){if(e.abstract)this.raise(e.start,S.PrivateElementHasAbstract);if(e.accessibility)this.raise(e.start,S.PrivateElementHasAccessibility({modifier:e.accessibility}));this.parseClassPropertyAnnotation(e)}else{if(this.parseClassPropertyAnnotation(e),this.isAmbientContext&&!(e.readonly&&!e.typeAnnotation)&&this.match(s.eq))this.raise(this.start,S.DeclareClassFieldHasInitializer);if(e.abstract&&this.match(s.eq)){let{key:i}=e;this.raise(this.start,S.AbstractPropertyHasInitializer({propertyName:i.type==="Identifier"&&!e.computed?i.name:`[${this.input.slice(i.start,i.end)}]`}))}}return super.parseClassField(e)}parseClassMethod(e,r,i,l){let p=e.kind==="constructor",h=e.key.type==="PrivateIdentifier",d=this.tsTryParseTypeParameters(this.tsParseConstModifier);if(h){if(d)e.typeParameters=d;if(e.accessibility)this.raise(e.start,S.PrivateMethodsHasAccessibility({modifier:e.accessibility}))}else if(d&&p)this.raise(d.start,S.ConstructorHasTypeParameters);let{declare:A=!1,kind:T}=e;if(A&&(T==="get"||T==="set"))this.raise(e.start,S.DeclareAccessor({kind:T}));if(d)e.typeParameters=d;let m=e.key;if(e.kind==="constructor"){if(r)this.raise(m.start,"Constructor can't be a generator");if(i)this.raise(m.start,"Constructor can't be an async method")}else if(e.static&&_e(e,"prototype"))this.raise(m.start,"Classes may not have a static property named prototype");let P=e.value=this.parseMethod(r,i,l,!0,e);if(e.kind==="get"&&P.params.length!==0)this.raiseRecoverable(P.start,"getter should have no params");if(e.kind==="set"&&P.params.length!==1)this.raiseRecoverable(P.start,"setter should have exactly one param");if(e.kind==="set"&&P.params[0].type==="RestElement")this.raiseRecoverable(P.params[0].start,"Setter cannot use rest params");return this.finishNode(e,"MethodDefinition")}isClassMethod(){return this.match(s.relational)}parseClassElement(e){if(this.eat(s.semi))return null;let r=this.startNode(),i="",l=!1,p=!1,h="method",d=!1,A=["declare","private","public","protected","accessor","override","abstract","readonly","static"],T=this.tsParseModifiers({modified:r,allowedModifiers:A,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:S.InvalidModifierOnTypeParameterPositions});d=Boolean(T.static);let m=()=>{if(this.tsIsStartOfStaticBlocks()){if(this.next(),this.next(),this.tsHasSomeModifiers(r,A))this.raise(this.start,S.StaticBlockCannotHaveModifier);if(this.ecmaVersion>=13)return super.parseClassStaticBlock(r),r}else{let P=this.tsTryParseIndexSignature(r);if(P){if(r.abstract)this.raise(r.start,S.IndexSignatureHasAbstract);if(r.accessibility)this.raise(r.start,S.IndexSignatureHasAccessibility({modifier:r.accessibility}));if(r.declare)this.raise(r.start,S.IndexSignatureHasDeclare);if(r.override)this.raise(r.start,S.IndexSignatureHasOverride);return P}if(!this.inAbstractClass&&r.abstract)this.raise(r.start,S.NonAbstractClassHasAbstractMethod);if(r.override){if(!e)this.raise(r.start,S.OverrideNotInSubClass)}if(r.static=d,d){if(!(this.isClassElementNameStart()||this.type===s.star))i="static"}if(!i&&this.ecmaVersion>=8&&this.eatContextual("async"))if((this.isClassElementNameStart()||this.type===s.star)&&!this.canInsertSemicolon())p=!0;else i="async";if(!i&&(this.ecmaVersion>=9||!p)&&this.eat(s.star))l=!0;if(!i&&!p&&!l){let D=this.value;if(this.eatContextual("get")||this.eatContextual("set"))if(this.isClassElementNameStart())h=D;else i=D}if(i)r.computed=!1,r.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),r.key.name=i,this.finishNode(r.key,"Identifier");else this.parseClassElementName(r);if(this.parsePostMemberNameModifiers(r),this.isClassMethod()||this.ecmaVersion<13||this.type===s.parenL||h!=="method"||l||p){let D=!r.static&&_e(r,"constructor"),L=D&&e;if(D&&h!=="method")this.raise(r.key.start,"Constructor can't have get/set modifier");r.kind=D?"constructor":h,this.parseClassMethod(r,l,p,L)}else this.parseClassField(r);return r}};if(r.declare)this.tsInAmbientContext(m);else m();return r}isClassElementNameStart(){if(this.tsIsIdentifier())return!0;return super.isClassElementNameStart()}parseClassSuper(e){if(super.parseClassSuper(e),e.superClass&&(this.tsMatchLeftRelational()||this.match(s.bitShift)))e.superTypeParameters=this.tsParseTypeArgumentsInExpression();if(this.eatContextual("implements"))e.implements=this.tsParseHeritageClause("implements")}parseFunctionParams(e){let r=this.tsTryParseTypeParameters(this.tsParseConstModifier);if(r)e.typeParameters=r;super.parseFunctionParams(e)}parseVarId(e,r){if(super.parseVarId(e,r),e.id.type==="Identifier"&&!this.hasPrecedingLineBreak()&&this.value==="!"&&this.eat(s.prefix))e.definite=!0;let i=this.tsTryParseTypeAnnotation();if(i)e.id.typeAnnotation=i,this.resetEndLocation(e.id)}parseArrowExpression(e,r,i,l){if(this.match(s.colon))e.returnType=this.tsParseTypeAnnotation();let p=this.yieldPos,h=this.awaitPos,d=this.awaitIdentPos;this.enterScope(fe(i,!1)|v.SCOPE_ARROW),this.initFunction(e);let A=this.maybeInArrowParameters;if(this.ecmaVersion>=8)e.async=!!i;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.maybeInArrowParameters=!0,e.params=this.toAssignableList(r,!0),this.maybeInArrowParameters=!1,this.parseFunctionBody(e,!0,!1,l),this.yieldPos=p,this.awaitPos=h,this.awaitIdentPos=d,this.maybeInArrowParameters=A,this.finishNode(e,"ArrowFunctionExpression")}parseMaybeAssignOrigin(e,r,i){if(this.isContextual("yield"))if(this.inGenerator)return this.parseYield(e);else this.exprAllowed=!1;let l=!1,p=-1,h=-1,d=-1;if(r)p=r.parenthesizedAssign,h=r.trailingComma,d=r.doubleProto,r.parenthesizedAssign=r.trailingComma=-1;else r=new ee,l=!0;let A=this.start,T=this.startLoc;if(this.type===s.parenL||k(this.type))this.potentialArrowAt=this.start,this.potentialArrowInForAwait=e==="await";let m=this.parseMaybeConditional(e,r);if(i)m=i.call(this,m,A,T);if(this.type.isAssign){let P=this.startNodeAt(A,T);if(P.operator=this.value,this.type===s.eq)m=this.toAssignable(m,!0,r);if(!l)r.parenthesizedAssign=r.trailingComma=r.doubleProto=-1;if(r.shorthandAssign>=m.start)r.shorthandAssign=-1;if(!this.maybeInArrowParameters)if(this.type===s.eq)this.checkLValPattern(m);else this.checkLValSimple(m);if(P.left=m,this.next(),P.right=this.parseMaybeAssign(e),d>-1)r.doubleProto=d;return this.finishNode(P,"AssignmentExpression")}else if(l)this.checkExpressionErrors(r,!0);if(p>-1)r.parenthesizedAssign=p;if(h>-1)r.trailingComma=h;return m}parseMaybeAssign(e,r,i){let l,p,h;if(t?.jsx&&(this.matchJsx("jsxTagStart")||this.tsMatchLeftRelational())){if(l=this.cloneCurLookaheadState(),p=this.tryParse(()=>this.parseMaybeAssignOrigin(e,r,i),l),!p.error)return p.node;let T=this.context,m=T[T.length-1],P=T[T.length-2];if(m===u.tokContexts.tc_oTag&&P===u.tokContexts.tc_expr)T.pop(),T.pop();else if(m===u.tokContexts.tc_oTag||m===u.tokContexts.tc_expr)T.pop()}if(!p?.error&&!this.tsMatchLeftRelational())return this.parseMaybeAssignOrigin(e,r,i);if(!l||this.compareLookaheadState(l,this.getCurLookaheadState()))l=this.cloneCurLookaheadState();let d,A=this.tryParse((T)=>{d=this.tsParseTypeParameters(this.tsParseConstModifier);let m=this.parseMaybeAssignOrigin(e,r,i);if(m.type!=="ArrowFunctionExpression"||m.extra?.parenthesized)T();if(d?.params.length!==0)this.resetStartLocationFromNode(m,d);return m.typeParameters=d,m},l);if(!A.error&&!A.aborted){if(d)this.reportReservedArrowTypeParam(d);return A.node}if(!p){if(Oe(!0),h=this.tryParse(()=>this.parseMaybeAssignOrigin(e,r,i),l),!h.error)return h.node}if(p?.node)return this.setLookaheadState(p.failState),p.node;if(A.node){if(this.setLookaheadState(A.failState),d)this.reportReservedArrowTypeParam(d);return A.node}if(h?.node)return this.setLookaheadState(h.failState),h.node;if(p?.thrown)throw p.error;if(A.thrown)throw A.error;if(h?.thrown)throw h.error;throw p?.error||A.error||h?.error}parseAssignableListItem(e){let r=[];while(this.match(x.at))r.push(this.parseDecorator());let i=this.start,l=this.startLoc,p,h=!1,d=!1;if(e!==void 0){let m={};if(this.tsParseModifiers({modified:m,allowedModifiers:["public","private","protected","override","readonly"]}),p=m.accessibility,d=m.override,h=m.readonly,e===!1&&(p||h||d))this.raise(l.column,S.UnexpectedParameterModifier)}let A=this.parseMaybeDefault(i,l);this.parseBindingListItem(A);let T=this.parseMaybeDefault(A.start,A.loc.start,A);if(r.length)T.decorators=r;if(p||h||d){let m=this.startNodeAt(i,l);if(p)m.accessibility=p;if(h)m.readonly=h;if(d)m.override=d;if(T.type!=="Identifier"&&T.type!=="AssignmentPattern")this.raise(m.start,S.UnsupportedParameterPropertyKind);return m.parameter=T,this.finishNode(m,"TSParameterProperty")}return T}checkLValInnerPattern(e,r=v.BIND_NONE,i){switch(e.type){case"TSParameterProperty":this.checkLValInnerPattern(e.parameter,r,i);break;default:{super.checkLValInnerPattern(e,r,i);break}}}parseBindingListItem(e){if(this.eat(s.question)){if(e.type!=="Identifier"&&!this.isAmbientContext&&!this.inType)this.raise(e.start,S.PatternIsOptional);e.optional=!0}let r=this.tsTryParseTypeAnnotation();if(r)e.typeAnnotation=r;return this.resetEndLocation(e),e}isAssignable(e,r){switch(e.type){case"TSTypeCastExpression":return this.isAssignable(e.expression,r);case"TSParameterProperty":return!0;case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":return!0;case"ObjectExpression":{let i=e.properties.length-1;return e.properties.every((l,p)=>l.type!=="ObjectMethod"&&(p===i||l.type!=="SpreadElement")&&this.isAssignable(l))}case"Property":case"ObjectProperty":return this.isAssignable(e.value);case"SpreadElement":return this.isAssignable(e.argument);case"ArrayExpression":return e.elements.every((i)=>i===null||this.isAssignable(i));case"AssignmentExpression":return e.operator==="=";case"ParenthesizedExpression":return this.isAssignable(e.expression);case"MemberExpression":case"OptionalMemberExpression":return!r;default:return!1}}toAssignable(e,r=!1,i=new ee){switch(e.type){case"ParenthesizedExpression":return this.toAssignableParenthesizedExpression(e,r,i);case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":if(r);else this.raise(e.start,S.UnexpectedTypeCastInParameter);return this.toAssignable(e.expression,r,i);case"MemberExpression":break;case"AssignmentExpression":if(!r&&e.left.type==="TSTypeCastExpression")e.left=this.typeCastToParameter(e.left);return super.toAssignable(e,r,i);case"TSTypeCastExpression":return this.typeCastToParameter(e);default:return super.toAssignable(e,r,i)}return e}toAssignableParenthesizedExpression(e,r,i){switch(e.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":return this.toAssignable(e.expression,r,i);default:return super.toAssignable(e,r,i)}}parseBindingAtom(){switch(this.type){case s._this:return this.parseIdent(!0);default:return super.parseBindingAtom()}}shouldParseArrow(e){let r;if(this.match(s.colon))r=e.every((i)=>this.isAssignable(i,!0));else r=!this.canInsertSemicolon();if(r){if(this.match(s.colon)){let i=this.tryParse((l)=>{let p=this.tsParseTypeOrTypePredicateAnnotation(s.colon);if(this.canInsertSemicolon()||!this.match(s.arrow))l();return p});if(i.aborted)return this.shouldParseArrowReturnType=void 0,!1;if(!i.thrown){if(i.error)this.setLookaheadState(i.failState);this.shouldParseArrowReturnType=i.node}}if(!this.match(s.arrow))return this.shouldParseArrowReturnType=void 0,!1;return!0}return this.shouldParseArrowReturnType=void 0,r}parseParenArrowList(e,r,i,l){let p=this.startNodeAt(e,r);return p.returnType=this.shouldParseArrowReturnType,this.shouldParseArrowReturnType=void 0,this.parseArrowExpression(p,i,!1,l)}parseParenAndDistinguishExpression(e,r){let i=this.start,l=this.startLoc,p,h=this.ecmaVersion>=8;if(this.ecmaVersion>=6){let d=this.maybeInArrowParameters;this.maybeInArrowParameters=!0,this.next();let A=this.start,T=this.startLoc,m=[],P=!0,D=!1,L=new ee,V=this.yieldPos,W=this.awaitPos,j;this.yieldPos=0,this.awaitPos=0;while(this.type!==s.parenR)if(P?P=!1:this.expect(s.comma),h&&this.afterTrailingComma(s.parenR,!0)){D=!0;break}else if(this.type===s.ellipsis){if(j=this.start,m.push(this.parseParenItem(this.parseRestBinding())),this.type===s.comma)this.raise(this.start,"Comma is not permitted after the rest element");break}else m.push(this.parseMaybeAssign(r,L,this.parseParenItem));let H=this.lastTokEnd,q=this.lastTokEndLoc;if(this.expect(s.parenR),this.maybeInArrowParameters=d,e&&this.shouldParseArrow(m)&&this.eat(s.arrow))return this.checkPatternErrors(L,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=V,this.awaitPos=W,this.parseParenArrowList(i,l,m,r);if(!m.length||D)this.unexpected(this.lastTokStart);if(j)this.unexpected(j);if(this.checkExpressionErrors(L,!0),this.yieldPos=V||this.yieldPos,this.awaitPos=W||this.awaitPos,m.length>1)p=this.startNodeAt(A,T),p.expressions=m,this.finishNodeAt(p,"SequenceExpression",H,q);else p=m[0]}else p=this.parseParenExpression();if(this.options.preserveParens){let d=this.startNodeAt(i,l);return d.expression=p,this.finishNode(d,"ParenthesizedExpression")}else return p}parseTaggedTemplateExpression(e,r,i,l){let p=this.startNodeAt(r,i);if(p.tag=e,p.quasi=this.parseTemplate({isTagged:!0}),l)this.raise(r,"Tagged Template Literals are not allowed in optionalChain.");return this.finishNode(p,"TaggedTemplateExpression")}shouldParseAsyncArrow(){if(this.match(s.colon)){let e=this.tryParse((r)=>{let i=this.tsParseTypeOrTypePredicateAnnotation(s.colon);if(this.canInsertSemicolon()||!this.match(s.arrow))r();return i});if(e.aborted)return this.shouldParseAsyncArrowReturnType=void 0,!1;if(!e.thrown){if(e.error)this.setLookaheadState(e.failState);return this.shouldParseAsyncArrowReturnType=e.node,!this.canInsertSemicolon()&&this.eat(s.arrow)}}else return!this.canInsertSemicolon()&&this.eat(s.arrow)}parseSubscriptAsyncArrow(e,r,i,l){let p=this.startNodeAt(e,r);return p.returnType=this.shouldParseAsyncArrowReturnType,this.shouldParseAsyncArrowReturnType=void 0,this.parseArrowExpression(p,i,!0,l)}parseExprList(e,r,i,l){let p=[],h=!0;while(!this.eat(e)){if(!h){if(this.expect(s.comma),r&&this.afterTrailingComma(e))break}else h=!1;let d;if(i&&this.type===s.comma)d=null;else if(this.type===s.ellipsis){if(d=this.parseSpread(l),this.maybeInArrowParameters&&this.match(s.colon))d.typeAnnotation=this.tsParseTypeAnnotation();if(l&&this.type===s.comma&&l.trailingComma<0)l.trailingComma=this.start}else d=this.parseMaybeAssign(!1,l,this.parseParenItem);p.push(d)}return p}parseSubscript(e,r,i,l,p,h,d){let A=h;if(!this.hasPrecedingLineBreak()&&this.value==="!"&&this.match(s.prefix)){this.exprAllowed=!1,this.next();let L=this.startNodeAt(r,i);return L.expression=e,e=this.finishNode(L,"TSNonNullExpression"),e}let T=!1;if(this.match(s.questionDot)&&this.lookaheadCharCode()===60){if(l)return e;e.optional=!0,A=T=!0,this.next()}if(this.tsMatchLeftRelational()||this.match(s.bitShift)){let L,V=this.tsTryParseAndCatch(()=>{if(!l&&this.atPossibleAsyncArrow(e)){let q=this.tsTryParseGenericAsyncArrowFunction(r,i,d);if(q)return e=q,e}let W=this.tsParseTypeArgumentsInExpression();if(!W)return e;if(T&&!this.match(s.parenL))return L=this.curPosition(),e;if(F(this.type)||this.type===s.backQuote){let q=this.parseTaggedTemplateExpression(e,r,i,A);return q.typeArguments=W,q}if(!l&&this.eat(s.parenL)){let q=new ee,U=this.startNodeAt(r,i);if(U.callee=e,U.arguments=this.parseExprList(s.parenR,this.ecmaVersion>=8,!1,q),this.tsCheckForInvalidTypeCasts(U.arguments),U.typeArguments=W,A)U.optional=T;return this.checkExpressionErrors(q,!0),e=this.finishNode(U,"CallExpression"),e}let j=this.type;if(this.tsMatchRightRelational()||j===s.bitShift||j!==s.parenL&&Qt(j)&&!this.hasPrecedingLineBreak())return;let H=this.startNodeAt(r,i);return H.expression=e,H.typeArguments=W,this.finishNode(H,"TSInstantiationExpression")});if(L)this.unexpected(L);if(V){if(V.type==="TSInstantiationExpression"&&(this.match(s.dot)||this.match(s.questionDot)&&this.lookaheadCharCode()!==40))this.raise(this.start,S.InvalidPropertyAccessAfterInstantiationExpression);return e=V,e}}let m=this.ecmaVersion>=11,P=m&&this.eat(s.questionDot);if(l&&P)this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");let D=this.eat(s.bracketL);if(D||P&&this.type!==s.parenL&&this.type!==s.backQuote||this.eat(s.dot)){let L=this.startNodeAt(r,i);if(L.object=e,D)L.property=this.parseExpression(),this.expect(s.bracketR);else if(this.type===s.privateId&&e.type!=="Super")L.property=this.parsePrivateIdent();else L.property=this.parseIdent(this.options.allowReserved!=="never");if(L.computed=!!D,m)L.optional=P;e=this.finishNode(L,"MemberExpression")}else if(!l&&this.eat(s.parenL)){let L=this.maybeInArrowParameters;this.maybeInArrowParameters=!0;let V=new ee,W=this.yieldPos,j=this.awaitPos,H=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;let q=this.parseExprList(s.parenR,this.ecmaVersion>=8,!1,V);if(p&&!P&&this.shouldParseAsyncArrow()){if(this.checkPatternErrors(V,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0)this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function");this.yieldPos=W,this.awaitPos=j,this.awaitIdentPos=H,e=this.parseSubscriptAsyncArrow(r,i,q,d)}else{this.checkExpressionErrors(V,!0),this.yieldPos=W||this.yieldPos,this.awaitPos=j||this.awaitPos,this.awaitIdentPos=H||this.awaitIdentPos;let U=this.startNodeAt(r,i);if(U.callee=e,U.arguments=q,m)U.optional=P;e=this.finishNode(U,"CallExpression")}this.maybeInArrowParameters=L}else if(this.type===s.backQuote){if(P||A)this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");let L=this.startNodeAt(r,i);L.tag=e,L.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(L,"TaggedTemplateExpression")}return e}parseGetterSetter(e){e.kind=e.key.name,this.parsePropertyName(e);let r=this.tsTryParseTypeParameters(this.tsParseConstModifier);if(e.value=this.parseMethod(!1),r)e.value.typeParameters=r;let i=e.kind==="get"?0:1,l=e.value.params[0];if(i=l&&this.isThisParam(l)?i+1:i,e.value.params.length!==i){let h=e.value.start;if(e.kind==="get")this.raiseRecoverable(h,"getter should have no params");else this.raiseRecoverable(h,"setter should have exactly one param")}else if(e.kind==="set"&&e.value.params[0].type==="RestElement")this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")}parsePropertyValue(e,r,i,l,p,h,d,A){if(this.tsMatchLeftRelational()){if(r)this.unexpected();e.kind="init",e.method=!0;let T=this.tsTryParseTypeParameters(this.tsParseConstModifier);if(e.value=this.parseMethod(i,l),T)e.value.typeParameters=T;return}return super.parsePropertyValue(e,r,i,l,p,h,d,A)}parseProperty(e,r){if(!e){let i=[];if(this.match(x.at))while(this.match(x.at))i.push(this.parseDecorator());let l=super.parseProperty(e,r);if(l.type==="SpreadElement"){if(i.length)this.raise(l.start,ne.SpreadElementDecorator)}if(i.length)l.decorators=i,i=[];return l}return super.parseProperty(e,r)}parseCatchClauseParam(){let e=this.parseBindingAtom(),r=e.type==="Identifier";this.enterScope(r?v.SCOPE_SIMPLE_CATCH:0),this.checkLValPattern(e,r?v.BIND_SIMPLE_CATCH:v.BIND_LEXICAL);let i=this.tsTryParseTypeAnnotation();if(i)e.typeAnnotation=i,this.resetEndLocation(e);return this.expect(s.parenR),e}parseClass(e,r){let i=this.inAbstractClass;this.inAbstractClass=!!e.abstract;try{this.next(),this.takeDecorators(e);let l=this.strict;this.strict=!0,this.parseClassId(e,r),this.parseClassSuper(e);let p=this.enterClassBody(),h=this.startNode(),d=!1;h.body=[];let A=[];this.expect(s.braceL);while(this.type!==s.braceR){if(this.match(x.at)){A.push(this.parseDecorator());continue}let T=this.parseClassElement(e.superClass!==null);if(A.length)T.decorators=A,this.resetStartLocationFromNode(T,A[0]),A=[];if(T){if(h.body.push(T),T.type==="MethodDefinition"&&T.kind==="constructor"&&T.value.type==="FunctionExpression"){if(d)this.raiseRecoverable(T.start,"Duplicate constructor in the same class");if(d=!0,T.decorators&&T.decorators.length>0)this.raise(T.start,ne.DecoratorConstructor)}else if(T.key&&T.key.type==="PrivateIdentifier"&&T.value?.type!=="TSDeclareMethod"&&Vt(p,T))this.raiseRecoverable(T.key.start,`Identifier '#${T.key.name}' has already been declared`)}}if(this.strict=l,this.next(),A.length)this.raise(this.start,ne.TrailingDecorator);return e.body=this.finishNode(h,"ClassBody"),this.exitClassBody(),this.finishNode(e,r?"ClassDeclaration":"ClassExpression")}finally{this.inAbstractClass=i}}parseClassFunctionParams(){let e=this.tsTryParseTypeParameters(),r=this.parseBindingList(s.parenR,!1,this.ecmaVersion>=8,!0);if(e)r.typeParameters=e;return r}parseMethod(e,r,i,l,p){let h=this.startNode(),d=this.yieldPos,A=this.awaitPos,T=this.awaitIdentPos;if(this.initFunction(h),this.ecmaVersion>=6)h.generator=e;if(this.ecmaVersion>=8)h.async=!!r;if(this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(fe(r,h.generator)|v.SCOPE_SUPER|(i?v.SCOPE_DIRECT_SUPER:0)),this.expect(s.parenL),h.params=this.parseClassFunctionParams(),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(h,!1,!0,!1,{isClassMethod:l}),this.yieldPos=d,this.awaitPos=A,this.awaitIdentPos=T,p&&p.abstract){if(!!h.body){let{key:P}=p;this.raise(p.start,S.AbstractMethodHasImplementation({methodName:P.type==="Identifier"&&!p.computed?P.name:`[${this.input.slice(P.start,P.end)}]`}))}}return this.finishNode(h,"FunctionExpression")}static parse(e,r){if(r.locations===!1)throw Error("You have to enable options.locations while using acorn-typescript");else r.locations=!0;let i=new this(r,e);if(n)i.isAmbientContext=!0;return i.parse()}static parseExpressionAt(e,r,i){if(i.locations===!1)throw Error("You have to enable options.locations while using acorn-typescript");else i.locations=!0;let l=new this(i,e,r);if(n)l.isAmbientContext=!0;return l.nextToken(),l.parseExpression()}parseImportSpecifier(){if(this.ts_isContextual(x.type)){let r=this.startNode();return r.imported=this.parseModuleExportName(),this.parseTypeOnlyImportExportSpecifier(r,!0,this.importOrExportOuterKind==="type"),this.finishNode(r,"ImportSpecifier")}else{let r=super.parseImportSpecifier();return r.importKind="value",r}}parseExportSpecifier(e){let r=this.ts_isContextual(x.type);if(!this.match(s.string)&&r){let l=this.startNode();return l.local=this.parseModuleExportName(),this.parseTypeOnlyImportExportSpecifier(l,!1,this.importOrExportOuterKind==="type"),this.finishNode(l,"ExportSpecifier"),this.checkExport(e,l.exported,l.exported.start),l}else{let l=super.parseExportSpecifier(e);return l.exportKind="value",l}}parseTypeOnlyImportExportSpecifier(e,r,i){let l=r?"imported":"local",p=r?"local":"exported",h=e[l],d,A=!1,T=!0,m=h.start;if(this.isContextual("as")){let D=this.parseIdent();if(this.isContextual("as")){let L=this.parseIdent();if(M(this.type))A=!0,h=D,d=r?this.parseIdent():this.parseModuleExportName(),T=!1;else d=L,T=!1}else if(M(this.type))T=!1,d=r?this.parseIdent():this.parseModuleExportName();else A=!0,h=D}else if(M(this.type))if(A=!0,r){if(h=super.parseIdent(!0),!this.isContextual("as"))this.checkUnreserved(h)}else h=this.parseModuleExportName();if(A&&i)this.raise(m,r?S.TypeModifierIsUsedInTypeImports:S.TypeModifierIsUsedInTypeExports);e[l]=h,e[p]=d;let P=r?"importKind":"exportKind";if(e[P]=A?"type":"value",T&&this.eatContextual("as"))e[p]=r?this.parseIdent():this.parseModuleExportName();if(!e[p])e[p]=this.copyNode(e[l]);if(r)this.checkLValSimple(e[p],v.BIND_LEXICAL)}raiseCommonCheck(e,r,i){switch(r){case"Comma is not permitted after the rest element":if(this.isAmbientContext&&this.match(s.comma)&&this.lookaheadCharCode()===41){this.next();return}else return super.raise(e,r)}return i?super.raiseRecoverable(e,r):super.raise(e,r)}raiseRecoverable(e,r){return this.raiseCommonCheck(e,r,!0)}raise(e,r){return this.raiseCommonCheck(e,r,!0)}updateContext(e){let{type:r}=this;if(r==s.braceL){var i=this.curContext();if(i==I.tc_oTag)this.context.push(w.b_expr);else if(i==I.tc_expr)this.context.push(w.b_tmpl);else super.updateContext(e);this.exprAllowed=!0}else if(r===s.slash&&e===x.jsxTagStart)this.context.length-=2,this.context.push(I.tc_cTag),this.exprAllowed=!1;else return super.updateContext(e)}jsx_parseOpeningElementAt(e,r){let i=this.startNodeAt(e,r),l=this.jsx_parseElementName();if(l)i.name=l;if(this.match(s.relational)||this.match(s.bitShift)){let p=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());if(p)i.typeArguments=p}i.attributes=[];while(this.type!==s.slash&&this.type!==x.jsxTagEnd)i.attributes.push(this.jsx_parseAttribute());return i.selfClosing=this.eat(s.slash),this.expect(x.jsxTagEnd),this.finishNode(i,l?"JSXOpeningElement":"JSXOpeningFragment")}enterScope(e){if(e===Z)this.importsStack.push([]);super.enterScope(e);let r=super.currentScope();r.types=[],r.enums=[],r.constEnums=[],r.classes=[],r.exportOnlyBindings=[]}exitScope(){if(super.currentScope().flags===Z)this.importsStack.pop();super.exitScope()}hasImport(e,r){let i=this.importsStack.length;if(this.importsStack[i-1].indexOf(e)>-1)return!0;if(!r&&i>1){for(let l=0;l<i-1;l++)if(this.importsStack[l].indexOf(e)>-1)return!0}return!1}maybeExportDefined(e,r){if(this.inModule&&e.flags&v.SCOPE_TOP)delete this.undefinedExports[r]}declareName(e,r,i){if(r&v.BIND_FLAGS_TS_IMPORT){if(this.hasImport(e,!0))this.raise(i,`Identifier '${e}' has already been declared.`);this.importsStack[this.importsStack.length-1].push(e);return}let l=this.currentScope();if(r&v.BIND_FLAGS_TS_EXPORT_ONLY){this.maybeExportDefined(l,e),l.exportOnlyBindings.push(e);return}if(r===v.BIND_TS_TYPE||r===v.BIND_TS_INTERFACE){if(r===v.BIND_TS_TYPE&&l.types.includes(e))this.raise(i,`type '${e}' has already been declared.`);l.types.push(e)}else super.declareName(e,r,i);if(r&v.BIND_FLAGS_TS_ENUM)l.enums.push(e);if(r&v.BIND_FLAGS_TS_CONST_ENUM)l.constEnums.push(e);if(r&v.BIND_FLAGS_CLASS)l.classes.push(e)}checkLocalExport(e){let{name:r}=e;if(this.hasImport(r))return;let i=this.scopeStack.length;for(let l=i-1;l>=0;l--){let p=this.scopeStack[l];if(p.types.indexOf(r)>-1||p.exportOnlyBindings.indexOf(r)>-1)return}super.checkLocalExport(e)}}return Ie}}function ze(t,n,a){let o=a._,c=!1;function u(y,{next:b,state:E}){b(E)}function s(y,b,E){if(c)return;if(!y.type)return;let f,w={},g={path:b,state:E,next:(I=E)=>{b.push(y);for(let _ in y){if(_==="type")continue;let N=y[_];if(N&&typeof N==="object")if(Array.isArray(N)){let F={},z=N.length,k=!1;for(let M=0;M<z;M++){let C=N[M];if(C&&typeof C==="object"){let X=s(C,b,I);if(X)F[M]=X,k=!0}}if(k)w[_]=N.map((M,C)=>F[C]??M)}else{let F=s(N,b,I);if(F)w[_]=F}}if(b.pop(),Object.keys(w).length>0)return Ke(y,w)},stop:()=>{c=!0},visit:(I,_=E)=>{b.push(y);let N=s(I,b,_)??I;return b.pop(),N}},x=a[y.type]??u;if(o){let I;if(f=o(y,{...g,next:(_=E)=>(E=_,I=x(y,{...g,state:_}),I)}),!f&&I)f=I}else f=x(y,g);if(!f){if(Object.keys(w).length>0)f=Ke(y,w)}if(f)return f}return s(t,[],n)??t}function Ke(t,n){let a={},o=Object.getOwnPropertyDescriptors(t);for(let c in o)Object.defineProperty(a,c,o[c]);for(let c in n)a[c]=n[c];return a}var tr=/\n/,rr=/[ \t]/,sr=/^[,) \t]*$/,le="",Xe=[];function ce(t,n){le=t,Xe=n}function pe(t,n,a,o){let c=n;if(t&&tr.test(c)){let u=a;while(u>0&&le[u-1]!==`
|
|
4
|
+
`)u-=1;let s=u;while(rr.test(le[s]))s+=1;let y=le.slice(u,s);c=ir(c,y)}Xe.push({type:t?"Block":"Line",value:c,start:a,end:o})}function ir(t,n){if(n==="")return t;let a=t.split(`
|
|
5
|
+
`);for(let o=0;o<a.length;o++)if(a[o].startsWith(n))a[o]=a[o].slice(n.length);return a.join(`
|
|
6
|
+
`)}function xe(t,n,a,o){let c=ar(a,o);if(c>=a.length)return;$e(t,void 0,a,{index:c},n)}function ar(t,n){let a=0,o=t.length;while(a<o){let c=a+o>>>1;if(t[c].start<n)a=c+1;else o=c}return a}function $e(t,n,a,o,c){while(o.index<a.length&&a[o.index].start<(t.start??0))t.leadingComments??=[],t.leadingComments.push(a[o.index]),o.index++;if(o.index>=a.length)return;for(let u of nr(t))$e(u,t,a,o,c);if(o.index<a.length){let u=a[o.index];if(n===void 0||t.end!==n.end){let s=c.slice(t.end??0,u.start);if((n?.type==="BlockStatement"||n?.type==="Program")&&ye(n.body,t)||n?.type==="ArrayExpression"&&ye(n.elements,t)||n?.type==="ObjectExpression"&&ye(n.properties,t))while(o.index<a.length){if(n&&a[o.index].start>=(n.end??Number.POSITIVE_INFINITY))break;o.index++}else if((t.end??0)<=u.start&&sr.test(s))o.index++}}}function ye(t,n){return!!t&&t.indexOf(n)===t.length-1}function nr(t){let n=[];for(let a of Object.keys(t)){if(a==="type"||a==="leadingComments")continue;let o=t[a];if(!o||typeof o!=="object")continue;if(Array.isArray(o)){for(let c of o)if(c&&typeof c==="object"&&typeof c.type==="string")n.push(c)}else if(typeof o.type==="string")n.push(o)}return n}var Ye=Je,or=Ye.extend(Ge());function Te(t){return t?or:Ye}var lr={onComment:pe,sourceType:"module",ecmaVersion:16},cr={onComment:pe,sourceType:"module",ecmaVersion:16,preserveParens:!0},pr={onComment:pe,sourceType:"module",ecmaVersion:16};function Qe(t,n,a,o,c){if(a.length===c)return;xe(t,n,a,o)}function Ze(t,n,a){let o=a.length;ce(t,a);let c=Te(n).parse(t,lr);if(a.length>0)xe(c,t,a,o);return c}var hr={count:0};function Q(t,n,a,o){hr.count+=1;let c=o.length;ce(t,o);let u=Te(a).parseExpressionAt(t,n,cr);Qe(u,t,o,n,c);let s=o.length>c?o.at(-1):void 0,y=s&&s.end>(u.end??0)?s.end:u.end??0,b=u.end??n;return{node:ur(t,n,b,40)?dr(u):u,end:y}}function ur(t,n,a,o){for(let c=n;c<a;c++)if(t.charCodeAt(c)===o)return!0;return!1}function et(t,n,a,o){let c=o.length,u=Te(a);ce(t,o);let s=new u(pr,t,n);s.nextToken();let y=s.parseStatement(null,!0,Object.create(null));return Qe(y,t,o,n,c),y}function dr(t){return ze(t,null,{ParenthesizedExpression(n,a){return a.visit(n.expression)}})}function J(t){if(t===32||t<=13&&t>=9)return!0;if(t<160)return!1;return t===160||t===5760||t>=8192&&t<=8202||t===8232||t===8233||t===8239||t===8287||t===12288||t===65279}class ge{source;index=0;constructor(t){this.source=t}match(t){if(t.length===1)return this.source.charCodeAt(this.index)===t.charCodeAt(0);return this.source.startsWith(t,this.index)}matchRegex(t){t.lastIndex=this.index;let n=t.exec(this.source);if(!n||n.index!==this.index)return null;return n[0]}eat(t,n=!1){if(this.match(t))return this.index+=t.length,!0;if(n)throw new G(`Expected token ${JSON.stringify(t)}`,this.index);return!1}read(t){let n=this.matchRegex(t);if(n)this.index+=n.length;return n}readUntil(t){if(this.index>=this.source.length)throw new G("Unexpected end of input",this.source.length);let n=this.index;t.lastIndex=n;let a=t.exec(this.source);if(a)return this.index=a.index,this.source.slice(n,this.index);return this.index=this.source.length,this.source.slice(n)}readUntilString(t){if(this.index>=this.source.length)throw new G("Unexpected end of input",this.source.length);let n=this.source.indexOf(t,this.index),a=n===-1?this.source.length:n,o=this.source.slice(this.index,a);return this.index=a,o}allowWhitespace(){while(this.index<this.source.length&&J(this.source.charCodeAt(this.index)))this.index++}requireWhitespace(){if(!J(this.source.charCodeAt(this.index)))throw new G("Expected whitespace",this.index);this.allowWhitespace()}readIdentifierName(){let t=this.index,n=t,a="",o=this.source.codePointAt(this.index);if(o!==void 0&&he(o,!0)){n+=o<=65535?1:2;while(n<this.source.length){let c=this.source.codePointAt(n);if(c===void 0||!re(c,!0))break;n+=c<=65535?1:2}a=this.source.slice(t,n),this.index=n}return{type:"Identifier",name:a,start:t,end:n}}}class G extends Error{position;constructor(t,n){super(`${t} (at index ${n})`);this.name="TemplateSyntaxError",this.position=n}}function R(){return{type:"Fragment",nodes:[]}}var fr=new Set(["await","break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","export","extends","finally","for","function","if","implements","import","in","instanceof","interface","let","new","package","private","protected","public","return","static","super","switch","this","throw","try","typeof","var","void","while","with","yield"]),mr=["&&","||","??"],yr=["===","!==","==","!="];function tt(t,n){let a=t.codePointAt(n);if(a===void 0||!he(a,!0))return n;let o=n+(a<=65535?1:2);while(o<t.length){let c=t.codePointAt(o);if(!re(c,!0))break;o+=c<=65535?1:2}return o}function xr(t,n){let a=n;while(a<t.length){let o=t.charCodeAt(a);if(o<48||o>57)break;a++}return a}function ue(t,n){let a=n;while(a<t.length&&J(t.charCodeAt(a)))a++;return a}function rt(t,n){let a=xr(t,n);if(a===n)return null;if(t.charCodeAt(n)===48&&a-n>1)return null;if(a<t.length){let c=t.codePointAt(a);if(c===46||re(c,!0))return null}let o=t.slice(n,a);return{type:"Literal",start:n,end:a,value:Number(o),raw:o}}function st(t,n){let a=t.charCodeAt(n),o=n+1;while(o<t.length){let c=t.charCodeAt(o);if(c===a){let u=t.slice(n,o+1);return{type:"Literal",start:n,end:o+1,value:t.slice(n+1,o),raw:u}}if(c===92||c===10||c===13)return null;o++}return null}function Tr(t,n){let a=t.charCodeAt(n);if(a===34||a===39)return st(t,n);let o=tt(t,n);if(o===n)return rt(t,n);let c=t.slice(n,o);if(c==="true"||c==="false")return{type:"Literal",start:n,end:o,value:c==="true",raw:c};if(c==="null")return{type:"Literal",start:n,end:o,value:null,raw:c};if(fr.has(c))return null;let u={type:"Identifier",start:n,end:o,name:c},s=o;while(s<t.length){let y=t.charCodeAt(s);if(y===46){let b=s+1,E=tt(t,b);if(E===b)return null;let f={type:"Identifier",start:b,end:E,name:t.slice(b,E)};u={type:"MemberExpression",start:n,end:E,object:u,property:f,computed:!1,optional:!1},s=E}else if(y===91){let b=s+1,E=t.charCodeAt(b),f=E===34||E===39?st(t,b):rt(t,b);if(!f||t.charCodeAt(f.end)!==93)return null;u={type:"MemberExpression",start:n,end:f.end+1,object:u,property:f,computed:!0,optional:!1},s=f.end+1}else break}return u}function Ae(t,n){if(t.charCodeAt(n)!==33||t.charCodeAt(n+1)===61)return Tr(t,n);let a=Ae(t,ue(t,n+1));if(!a)return null;return{type:"UnaryExpression",start:n,end:a.end,operator:"!",prefix:!0,argument:a}}function gr(t,n){for(let a of yr)if(t.startsWith(a,n))return{operator:a,logical:!1};for(let a of mr)if(t.startsWith(a,n))return{operator:a,logical:!0};return null}function it(t,n){let a=ue(t,n);if(a>=t.length)return!1;let o=t.charCodeAt(a);return o===125||o===41}function Ar(t){let n=t.source,a=Ae(n,t.index);if(!a)return null;if(it(n,a.end))return t.index=a.end,a;let o=ue(n,a.end),c=gr(n,o);if(!c)return null;let u=Ae(n,ue(n,o+c.operator.length));if(!u||!it(n,u.end))return null;return t.index=u.end,{type:c.logical?"LogicalExpression":"BinaryExpression",start:a.start,end:u.end,left:a,operator:c.operator,right:u}}function O(t){let n=Ar(t);if(n)return n;let{node:a,end:o}=Q(t.source,t.index,t.isTypeScript,t.root.comments);return t.index=o,a}var br={"CounterClockwiseContourIntegral;":8755,"ClockwiseContourIntegral;":8754,"DoubleLongLeftRightArrow;":10234,"NotNestedGreaterGreater;":10914,"DiacriticalDoubleAcute;":733,"NotSquareSupersetEqual;":8931,"CloseCurlyDoubleQuote;":8221,"DoubleContourIntegral;":8751,"FilledVerySmallSquare;":9642,"NegativeVeryThinSpace;":8203,"NotPrecedesSlantEqual;":8928,"NotRightTriangleEqual;":8941,"NotSucceedsSlantEqual;":8929,"CapitalDifferentialD;":8517,"DoubleLeftRightArrow;":8660,"DoubleLongRightArrow;":10233,"EmptyVerySmallSquare;":9643,"NestedGreaterGreater;":8811,"NotDoubleVerticalBar;":8742,"NotGreaterSlantEqual;":10878,"NotLeftTriangleEqual;":8940,"NotSquareSubsetEqual;":8930,"OpenCurlyDoubleQuote;":8220,"ReverseUpEquilibrium;":10607,"DoubleLongLeftArrow;":10232,"DownLeftRightVector;":10576,"LeftArrowRightArrow;":8646,"NegativeMediumSpace;":8203,"NotGreaterFullEqual;":8807,"NotRightTriangleBar;":10704,"RightArrowLeftArrow;":8644,"SquareSupersetEqual;":8850,"leftrightsquigarrow;":8621,"DownRightTeeVector;":10591,"DownRightVectorBar;":10583,"LongLeftRightArrow;":10231,"Longleftrightarrow;":10234,"NegativeThickSpace;":8203,"NotLeftTriangleBar;":10703,"PrecedesSlantEqual;":8828,"ReverseEquilibrium;":8651,"RightDoubleBracket;":10215,"RightDownTeeVector;":10589,"RightDownVectorBar;":10581,"RightTriangleEqual;":8885,"SquareIntersection;":8851,"SucceedsSlantEqual;":8829,"blacktriangleright;":9656,"longleftrightarrow;":10231,"DoubleUpDownArrow;":8661,"DoubleVerticalBar;":8741,"DownLeftTeeVector;":10590,"DownLeftVectorBar;":10582,"FilledSmallSquare;":9724,"GreaterSlantEqual;":10878,"LeftDoubleBracket;":10214,"LeftDownTeeVector;":10593,"LeftDownVectorBar;":10585,"LeftTriangleEqual;":8884,"NegativeThinSpace;":8203,"NotGreaterGreater;":8811,"NotLessSlantEqual;":10877,"NotNestedLessLess;":10913,"NotReverseElement;":8716,"NotSquareSuperset;":8848,"NotTildeFullEqual;":8775,"RightAngleBracket;":10217,"RightUpDownVector;":10575,"SquareSubsetEqual;":8849,"VerticalSeparator;":10072,"blacktriangledown;":9662,"blacktriangleleft;":9666,"leftrightharpoons;":8651,"rightleftharpoons;":8652,"twoheadrightarrow;":8608,"DiacriticalAcute;":180,"DiacriticalGrave;":96,"DiacriticalTilde;":732,"DoubleRightArrow;":8658,"DownArrowUpArrow;":8693,"EmptySmallSquare;":9723,"GreaterEqualLess;":8923,"GreaterFullEqual;":8807,"LeftAngleBracket;":10216,"LeftUpDownVector;":10577,"LessEqualGreater;":8922,"NonBreakingSpace;":160,"NotPrecedesEqual;":10927,"NotRightTriangle;":8939,"NotSucceedsEqual;":10928,"NotSucceedsTilde;":8831,"NotSupersetEqual;":8841,"RightTriangleBar;":10704,"RightUpTeeVector;":10588,"RightUpVectorBar;":10580,"UnderParenthesis;":9181,"UpArrowDownArrow;":8645,"circlearrowright;":8635,"downharpoonright;":8642,"ntrianglerighteq;":8941,"rightharpoondown;":8641,"rightrightarrows;":8649,"twoheadleftarrow;":8606,"vartriangleright;":8883,"CloseCurlyQuote;":8217,"ContourIntegral;":8750,"DoubleDownArrow;":8659,"DoubleLeftArrow;":8656,"DownRightVector;":8641,"LeftRightVector;":10574,"LeftTriangleBar;":10703,"LeftUpTeeVector;":10592,"LeftUpVectorBar;":10584,"LowerRightArrow;":8600,"NotGreaterEqual;":8817,"NotGreaterTilde;":8821,"NotHumpDownHump;":8782,"NotLeftTriangle;":8938,"NotSquareSubset;":8847,"OverParenthesis;":9180,"RightDownVector;":8642,"ShortRightArrow;":8594,"UpperRightArrow;":8599,"bigtriangledown;":9661,"circlearrowleft;":8634,"curvearrowright;":8631,"downharpoonleft;":8643,"leftharpoondown;":8637,"leftrightarrows;":8646,"nLeftrightarrow;":8654,"nleftrightarrow;":8622,"ntrianglelefteq;":8940,"rightleftarrows;":8644,"rightsquigarrow;":8605,"rightthreetimes;":8908,"straightepsilon;":1013,"trianglerighteq;":8885,"vartriangleleft;":8882,"DiacriticalDot;":729,"DoubleRightTee;":8872,"DownLeftVector;":8637,"GreaterGreater;":10914,"HorizontalLine;":9472,"InvisibleComma;":8291,"InvisibleTimes;":8290,"LeftDownVector;":8643,"LeftRightArrow;":8596,"Leftrightarrow;":8660,"LessSlantEqual;":10877,"LongRightArrow;":10230,"Longrightarrow;":10233,"LowerLeftArrow;":8601,"NestedLessLess;":8810,"NotGreaterLess;":8825,"NotLessGreater;":8824,"NotSubsetEqual;":8840,"NotVerticalBar;":8740,"OpenCurlyQuote;":8216,"ReverseElement;":8715,"RightTeeVector;":10587,"RightVectorBar;":10579,"ShortDownArrow;":8595,"ShortLeftArrow;":8592,"SquareSuperset;":8848,"TildeFullEqual;":8773,"UpperLeftArrow;":8598,"ZeroWidthSpace;":8203,"curvearrowleft;":8630,"doublebarwedge;":8966,"downdownarrows;":8650,"hookrightarrow;":8618,"leftleftarrows;":8647,"leftrightarrow;":8596,"leftthreetimes;":8907,"longrightarrow;":10230,"looparrowright;":8620,"nshortparallel;":8742,"ntriangleright;":8939,"rightarrowtail;":8611,"rightharpoonup;":8640,"trianglelefteq;":8884,"upharpoonright;":8638,"ApplyFunction;":8289,"DifferentialD;":8518,"DoubleLeftTee;":10980,"DoubleUpArrow;":8657,"LeftTeeVector;":10586,"LeftVectorBar;":10578,"LessFullEqual;":8806,"LongLeftArrow;":10229,"Longleftarrow;":10232,"NotEqualTilde;":8770,"NotTildeEqual;":8772,"NotTildeTilde;":8777,"Poincareplane;":8460,"PrecedesEqual;":10927,"PrecedesTilde;":8830,"RightArrowBar;":8677,"RightTeeArrow;":8614,"RightTriangle;":8883,"RightUpVector;":8638,"SucceedsEqual;":10928,"SucceedsTilde;":8831,"SupersetEqual;":8839,"UpEquilibrium;":10606,"VerticalTilde;":8768,"VeryThinSpace;":8202,"bigtriangleup;":9651,"blacktriangle;":9652,"divideontimes;":8903,"fallingdotseq;":8786,"hookleftarrow;":8617,"leftarrowtail;":8610,"leftharpoonup;":8636,"longleftarrow;":10229,"looparrowleft;":8619,"measuredangle;":8737,"ntriangleleft;":8938,"shortparallel;":8741,"smallsetminus;":8726,"triangleright;":9657,"upharpoonleft;":8639,"varsubsetneqq;":10955,"varsupsetneqq;":10956,"DownArrowBar;":10515,"DownTeeArrow;":8615,"ExponentialE;":8519,"GreaterEqual;":8805,"GreaterTilde;":8819,"HilbertSpace;":8459,"HumpDownHump;":8782,"Intersection;":8898,"LeftArrowBar;":8676,"LeftTeeArrow;":8612,"LeftTriangle;":8882,"LeftUpVector;":8639,"NotCongruent;":8802,"NotHumpEqual;":8783,"NotLessEqual;":8816,"NotLessTilde;":8820,"Proportional;":8733,"RightCeiling;":8969,"RoundImplies;":10608,"ShortUpArrow;":8593,"SquareSubset;":8847,"UnderBracket;":9141,"VerticalLine;":124,"blacklozenge;":10731,"exponentiale;":8519,"risingdotseq;":8787,"triangledown;":9663,"triangleleft;":9667,"varsubsetneq;":8842,"varsupsetneq;":8843,"CircleMinus;":8854,"CircleTimes;":8855,"Equilibrium;":8652,"GreaterLess;":8823,"LeftCeiling;":8968,"LessGreater;":8822,"MediumSpace;":8287,"NotLessLess;":8810,"NotPrecedes;":8832,"NotSucceeds;":8833,"NotSuperset;":8835,"OverBracket;":9140,"RightVector;":8640,"Rrightarrow;":8667,"RuleDelayed;":10740,"SmallCircle;":8728,"SquareUnion;":8852,"SubsetEqual;":8838,"UpDownArrow;":8597,"Updownarrow;":8661,"VerticalBar;":8739,"backepsilon;":1014,"blacksquare;":9642,"circledcirc;":8858,"circleddash;":8861,"curlyeqprec;":8926,"curlyeqsucc;":8927,"diamondsuit;":9830,"eqslantless;":10901,"expectation;":8496,"nRightarrow;":8655,"nrightarrow;":8603,"preccurlyeq;":8828,"precnapprox;":10937,"quaternions;":8461,"straightphi;":981,"succcurlyeq;":8829,"succnapprox;":10938,"thickapprox;":8776,"updownarrow;":8597,"Bernoullis;":8492,"CirclePlus;":8853,"EqualTilde;":8770,"Fouriertrf;":8497,"ImaginaryI;":8520,"Laplacetrf;":8466,"LeftVector;":8636,"Lleftarrow;":8666,"NotElement;":8713,"NotGreater;":8815,"Proportion;":8759,"RightArrow;":8594,"RightFloor;":8971,"Rightarrow;":8658,"ThickSpace;":8287,"TildeEqual;":8771,"TildeTilde;":8776,"UnderBrace;":9183,"UpArrowBar;":10514,"UpTeeArrow;":8613,"circledast;":8859,"complement;":8705,"curlywedge;":8911,"eqslantgtr;":10902,"gtreqqless;":10892,"lessapprox;":10885,"lesseqqgtr;":10891,"lmoustache;":9136,"longmapsto;":10236,"mapstodown;":8615,"mapstoleft;":8612,"nLeftarrow;":8653,"nleftarrow;":8602,"nsubseteqq;":10949,"nsupseteqq;":10950,"precapprox;":10935,"rightarrow;":8594,"rmoustache;":9137,"sqsubseteq;":8849,"sqsupseteq;":8850,"subsetneqq;":10955,"succapprox;":10936,"supsetneqq;":10956,"upuparrows;":8648,"varepsilon;":1013,"varnothing;":8709,"Backslash;":8726,"CenterDot;":183,"CircleDot;":8857,"Congruent;":8801,"Coproduct;":8720,"DoubleDot;":168,"DownArrow;":8595,"DownBreve;":785,"Downarrow;":8659,"HumpEqual;":8783,"LeftArrow;":8592,"LeftFloor;":8970,"Leftarrow;":8656,"LessTilde;":8818,"Mellintrf;":8499,"MinusPlus;":8723,"NotCupCap;":8813,"NotExists;":8708,"NotSubset;":8834,"OverBrace;":9182,"PlusMinus;":177,"Therefore;":8756,"ThinSpace;":8201,"TripleDot;":8411,"UnionPlus;":8846,"backprime;":8245,"backsimeq;":8909,"bigotimes;":10754,"centerdot;":183,"checkmark;":10003,"complexes;":8450,"dotsquare;":8865,"downarrow;":8595,"gtrapprox;":10886,"gtreqless;":8923,"gvertneqq;":8809,"heartsuit;":9829,"leftarrow;":8592,"lesseqgtr;":8922,"lvertneqq;":8808,"ngeqslant;":10878,"nleqslant;":10877,"nparallel;":8742,"nshortmid;":8740,"nsubseteq;":8840,"nsupseteq;":8841,"pitchfork;":8916,"rationals;":8474,"spadesuit;":9824,"subseteqq;":10949,"subsetneq;":8842,"supseteqq;":10950,"supsetneq;":8843,"therefore;":8756,"triangleq;":8796,"varpropto;":8733,"DDotrahd;":10513,"DotEqual;":8784,"Integral;":8747,"LessLess;":10913,"NotEqual;":8800,"NotTilde;":8769,"PartialD;":8706,"Precedes;":8826,"RightTee;":8866,"Succeeds;":8827,"SuchThat;":8715,"Superset;":8835,"Uarrocir;":10569,"UnderBar;":95,"andslope;":10840,"angmsdaa;":10664,"angmsdab;":10665,"angmsdac;":10666,"angmsdad;":10667,"angmsdae;":10668,"angmsdaf;":10669,"angmsdag;":10670,"angmsdah;":10671,"angrtvbd;":10653,"approxeq;":8778,"awconint;":8755,"backcong;":8780,"barwedge;":8965,"bbrktbrk;":9142,"bigoplus;":10753,"bigsqcup;":10758,"biguplus;":10756,"bigwedge;":8896,"boxminus;":8863,"boxtimes;":8864,"bsolhsub;":10184,"capbrcup;":10825,"circledR;":174,"circledS;":9416,"cirfnint;":10768,"clubsuit;":9827,"cupbrcap;":10824,"curlyvee;":8910,"cwconint;":8754,"doteqdot;":8785,"dotminus;":8760,"drbkarow;":10512,"dzigrarr;":10239,"elinters;":9191,"emptyset;":8709,"eqvparsl;":10725,"fpartint;":10765,"geqslant;":10878,"gesdotol;":10884,"gnapprox;":10890,"hksearow;":10533,"hkswarow;":10534,"imagline;":8464,"imagpart;":8465,"infintie;":10717,"integers;":8484,"intercal;":8890,"intlarhk;":10775,"laemptyv;":10676,"ldrushar;":10571,"leqslant;":10877,"lesdotor;":10883,"llcorner;":8990,"lnapprox;":10889,"lrcorner;":8991,"lurdshar;":10570,"mapstoup;":8613,"multimap;":8888,"naturals;":8469,"ncongdot;":10861,"notindot;":8949,"otimesas;":10806,"parallel;":8741,"plusacir;":10787,"pointint;":10773,"precneqq;":10933,"precnsim;":8936,"profalar;":9006,"profline;":8978,"profsurf;":8979,"raemptyv;":10675,"realpart;":8476,"rppolint;":10770,"rtriltri;":10702,"scpolint;":10771,"setminus;":8726,"shortmid;":8739,"smeparsl;":10724,"sqsubset;":8847,"sqsupset;":8848,"subseteq;":8838,"succneqq;":10934,"succnsim;":8937,"supseteq;":8839,"thetasym;":977,"thicksim;":8764,"timesbar;":10801,"triangle;":9653,"triminus;":10810,"trpezium;":9186,"ulcorner;":8988,"urcorner;":8989,"varkappa;":1008,"varsigma;":962,"vartheta;":977,"Because;":8757,"Cayleys;":8493,"Cconint;":8752,"Cedilla;":184,"Diamond;":8900,"DownTee;":8868,"Element;":8712,"Epsilon;":917,"Implies;":8658,"LeftTee;":8867,"NewLine;":10,"NoBreak;":8288,"NotLess;":8814,"Omicron;":927,"OverBar;":8254,"Product;":8719,"UpArrow;":8593,"Uparrow;":8657,"Upsilon;":933,"alefsym;":8501,"angrtvb;":8894,"angzarr;":9084,"asympeq;":8781,"backsim;":8765,"because;":8757,"bemptyv;":10672,"between;":8812,"bigcirc;":9711,"bigodot;":10752,"bigstar;":9733,"bnequiv;":8801,"boxplus;":8862,"ccupssm;":10832,"cemptyv;":10674,"cirscir;":10690,"coloneq;":8788,"congdot;":10861,"cudarrl;":10552,"cudarrr;":10549,"cularrp;":10557,"curarrm;":10556,"dbkarow;":10511,"ddagger;":8225,"ddotseq;":10871,"demptyv;":10673,"diamond;":8900,"digamma;":989,"dotplus;":8724,"dwangle;":10662,"epsilon;":949,"eqcolon;":8789,"equivDD;":10872,"gesdoto;":10882,"gtquest;":10876,"gtrless;":8823,"harrcir;":10568,"intprod;":10812,"isindot;":8949,"larrbfs;":10527,"larrsim;":10611,"lbrksld;":10639,"lbrkslu;":10637,"ldrdhar;":10599,"lesdoto;":10881,"lessdot;":8918,"lessgtr;":8822,"lesssim;":8818,"lotimes;":10804,"lozenge;":9674,"ltquest;":10875,"luruhar;":10598,"maltese;":10016,"minusdu;":10794,"napprox;":8777,"natural;":9838,"nearrow;":8599,"nexists;":8708,"notinva;":8713,"notinvb;":8951,"notinvc;":8950,"notniva;":8716,"notnivb;":8958,"notnivc;":8957,"npolint;":10772,"npreceq;":10927,"nsqsube;":8930,"nsqsupe;":8931,"nsubset;":8834,"nsucceq;":10928,"nsupset;":8835,"nvinfin;":10718,"nvltrie;":8884,"nvrtrie;":8885,"nwarrow;":8598,"olcross;":10683,"omicron;":959,"orderof;":8500,"orslope;":10839,"pertenk;":8241,"planckh;":8462,"pluscir;":10786,"plussim;":10790,"plustwo;":10791,"precsim;":8830,"quatint;":10774,"questeq;":8799,"rarrbfs;":10528,"rarrsim;":10612,"rbrksld;":10638,"rbrkslu;":10640,"rdldhar;":10601,"realine;":8475,"rotimes;":10805,"ruluhar;":10600,"searrow;":8600,"simplus;":10788,"simrarr;":10610,"subedot;":10947,"submult;":10945,"subplus;":10943,"subrarr;":10617,"succsim;":8831,"supdsub;":10968,"supedot;":10948,"suphsol;":10185,"suphsub;":10967,"suplarr;":10619,"supmult;":10946,"supplus;":10944,"swarrow;":8601,"topfork;":10970,"triplus;":10809,"tritime;":10811,"uparrow;":8593,"upsilon;":965,"uwangle;":10663,"vzigzag;":10650,"zigrarr;":8669,"Aacute;":193,"Abreve;":258,"Agrave;":192,"Assign;":8788,"Atilde;":195,"Barwed;":8966,"Bumpeq;":8782,"Cacute;":262,"Ccaron;":268,"Ccedil;":199,"Colone;":10868,"Conint;":8751,"CupCap;":8781,"Dagger;":8225,"Dcaron;":270,"DotDot;":8412,"Dstrok;":272,"Eacute;":201,"Ecaron;":282,"Egrave;":200,"Exists;":8707,"ForAll;":8704,"Gammad;":988,"Gbreve;":286,"Gcedil;":290,"HARDcy;":1066,"Hstrok;":294,"Iacute;":205,"Igrave;":204,"Itilde;":296,"Jsercy;":1032,"Kcedil;":310,"Lacute;":313,"Lambda;":923,"Lcaron;":317,"Lcedil;":315,"Lmidot;":319,"Lstrok;":321,"Nacute;":323,"Ncaron;":327,"Ncedil;":325,"Ntilde;":209,"Oacute;":211,"Odblac;":336,"Ograve;":210,"Oslash;":216,"Otilde;":213,"Otimes;":10807,"Racute;":340,"Rarrtl;":10518,"Rcaron;":344,"Rcedil;":342,"SHCHcy;":1065,"SOFTcy;":1068,"Sacute;":346,"Scaron;":352,"Scedil;":350,"Square;":9633,"Subset;":8912,"Supset;":8913,"Tcaron;":356,"Tcedil;":354,"Tstrok;":358,"Uacute;":218,"Ubreve;":364,"Udblac;":368,"Ugrave;":217,"Utilde;":360,"Vdashl;":10982,"Verbar;":8214,"Vvdash;":8874,"Yacute;":221,"Zacute;":377,"Zcaron;":381,"aacute;":225,"abreve;":259,"agrave;":224,"andand;":10837,"angmsd;":8737,"angsph;":8738,"apacir;":10863,"approx;":8776,"atilde;":227,"barvee;":8893,"barwed;":8965,"becaus;":8757,"bernou;":8492,"bigcap;":8898,"bigcup;":8899,"bigvee;":8897,"bkarow;":10509,"bottom;":8869,"bowtie;":8904,"boxbox;":10697,"bprime;":8245,"brvbar;":166,"bullet;":8226,"bumpeq;":8783,"cacute;":263,"capand;":10820,"capcap;":10827,"capcup;":10823,"capdot;":10816,"ccaron;":269,"ccedil;":231,"circeq;":8791,"cirmid;":10991,"colone;":8788,"commat;":64,"compfn;":8728,"conint;":8750,"coprod;":8720,"copysr;":8471,"cularr;":8630,"cupcap;":10822,"cupcup;":10826,"cupdot;":8845,"curarr;":8631,"curren;":164,"cylcty;":9005,"dagger;":8224,"daleth;":8504,"dcaron;":271,"dfisht;":10623,"divide;":247,"divonx;":8903,"dlcorn;":8990,"dlcrop;":8973,"dollar;":36,"drcorn;":8991,"drcrop;":8972,"dstrok;":273,"eacute;":233,"easter;":10862,"ecaron;":283,"ecolon;":8789,"egrave;":232,"egsdot;":10904,"elsdot;":10903,"emptyv;":8709,"emsp13;":8196,"emsp14;":8197,"eparsl;":10723,"eqcirc;":8790,"equals;":61,"equest;":8799,"female;":9792,"ffilig;":64259,"ffllig;":64260,"forall;":8704,"frac12;":189,"frac13;":8531,"frac14;":188,"frac15;":8533,"frac16;":8537,"frac18;":8539,"frac23;":8532,"frac25;":8534,"frac34;":190,"frac35;":8535,"frac38;":8540,"frac45;":8536,"frac56;":8538,"frac58;":8541,"frac78;":8542,"gacute;":501,"gammad;":989,"gbreve;":287,"gesdot;":10880,"gesles;":10900,"gtlPar;":10645,"gtrarr;":10616,"gtrdot;":8919,"gtrsim;":8819,"hairsp;":8202,"hamilt;":8459,"hardcy;":1098,"hearts;":9829,"hellip;":8230,"hercon;":8889,"homtht;":8763,"horbar;":8213,"hslash;":8463,"hstrok;":295,"hybull;":8259,"hyphen;":8208,"iacute;":237,"igrave;":236,"iiiint;":10764,"iinfin;":10716,"incare;":8453,"inodot;":305,"intcal;":8890,"iquest;":191,"isinsv;":8947,"itilde;":297,"jsercy;":1112,"kappav;":1008,"kcedil;":311,"kgreen;":312,"lAtail;":10523,"lacute;":314,"lagran;":8466,"lambda;":955,"langle;":10216,"larrfs;":10525,"larrhk;":8617,"larrlp;":8619,"larrpl;":10553,"larrtl;":8610,"latail;":10521,"lbrace;":123,"lbrack;":91,"lcaron;":318,"lcedil;":316,"ldquor;":8222,"lesdot;":10879,"lesges;":10899,"lfisht;":10620,"lfloor;":8970,"lharul;":10602,"llhard;":10603,"lmidot;":320,"lmoust;":9136,"loplus;":10797,"lowast;":8727,"lowbar;":95,"lparlt;":10643,"lrhard;":10605,"lsaquo;":8249,"lsquor;":8218,"lstrok;":322,"lthree;":8907,"ltimes;":8905,"ltlarr;":10614,"ltrPar;":10646,"mapsto;":8614,"marker;":9646,"mcomma;":10793,"midast;":42,"midcir;":10992,"middot;":183,"minusb;":8863,"minusd;":8760,"mnplus;":8723,"models;":8871,"mstpos;":8766,"nVDash;":8879,"nVdash;":8878,"nacute;":324,"nbumpe;":8783,"ncaron;":328,"ncedil;":326,"nearhk;":10532,"nequiv;":8802,"nesear;":10536,"nexist;":8708,"nltrie;":8940,"notinE;":8953,"nparsl;":11005,"nprcue;":8928,"nrarrc;":10547,"nrarrw;":8605,"nrtrie;":8941,"nsccue;":8929,"nsimeq;":8772,"ntilde;":241,"numero;":8470,"nvDash;":8877,"nvHarr;":10500,"nvdash;":8876,"nvlArr;":10498,"nvrArr;":10499,"nwarhk;":10531,"nwnear;":10535,"oacute;":243,"odblac;":337,"odsold;":10684,"ograve;":242,"ominus;":8854,"origof;":8886,"oslash;":248,"otilde;":245,"otimes;":8855,"parsim;":10995,"percnt;":37,"period;":46,"permil;":8240,"phmmat;":8499,"planck;":8463,"plankv;":8463,"plusdo;":8724,"plusdu;":10789,"plusmn;":177,"preceq;":10927,"primes;":8473,"prnsim;":8936,"propto;":8733,"prurel;":8880,"puncsp;":8200,"qprime;":8279,"rAtail;":10524,"racute;":341,"rangle;":10217,"rarrap;":10613,"rarrfs;":10526,"rarrhk;":8618,"rarrlp;":8620,"rarrpl;":10565,"rarrtl;":8611,"ratail;":10522,"rbrace;":125,"rbrack;":93,"rcaron;":345,"rcedil;":343,"rdquor;":8221,"rfisht;":10621,"rfloor;":8971,"rharul;":10604,"rmoust;":9137,"roplus;":10798,"rpargt;":10644,"rsaquo;":8250,"rsquor;":8217,"rthree;":8908,"rtimes;":8906,"sacute;":347,"scaron;":353,"scedil;":351,"scnsim;":8937,"searhk;":10533,"seswar;":10537,"sfrown;":8994,"shchcy;":1097,"sigmaf;":962,"sigmav;":962,"simdot;":10858,"smashp;":10803,"softcy;":1100,"solbar;":9023,"spades;":9824,"sqcaps;":8851,"sqcups;":8852,"sqsube;":8849,"sqsupe;":8850,"square;":9633,"squarf;":9642,"ssetmn;":8726,"ssmile;":8995,"sstarf;":8902,"subdot;":10941,"subset;":8834,"subsim;":10951,"subsub;":10965,"subsup;":10963,"succeq;":10928,"supdot;":10942,"supset;":8835,"supsim;":10952,"supsub;":10964,"supsup;":10966,"swarhk;":10534,"swnwar;":10538,"target;":8982,"tcaron;":357,"tcedil;":355,"telrec;":8981,"there4;":8756,"thetav;":977,"thinsp;":8201,"thksim;":8764,"timesb;":8864,"timesd;":10800,"topbot;":9014,"topcir;":10993,"tprime;":8244,"tridot;":9708,"tstrok;":359,"uacute;":250,"ubreve;":365,"udblac;":369,"ufisht;":10622,"ugrave;":249,"ulcorn;":8988,"ulcrop;":8975,"urcorn;":8989,"urcrop;":8974,"utilde;":361,"vangrt;":10652,"varphi;":981,"varrho;":1009,"veebar;":8891,"vellip;":8942,"verbar;":124,"vsubnE;":10955,"vsubne;":8842,"vsupnE;":10956,"vsupne;":8843,"wedbar;":10847,"wedgeq;":8793,"weierp;":8472,"wreath;":8768,"xoplus;":10753,"xotime;":10754,"xsqcup;":10758,"xuplus;":10756,"xwedge;":8896,"yacute;":253,"zacute;":378,"zcaron;":382,"zeetrf;":8488,"AElig;":198,Aacute:193,"Acirc;":194,Agrave:192,"Alpha;":913,"Amacr;":256,"Aogon;":260,"Aring;":197,Atilde:195,"Breve;":728,Ccedil:199,"Ccirc;":264,"Colon;":8759,"Cross;":10799,"Dashv;":10980,"Delta;":916,Eacute:201,"Ecirc;":202,Egrave:200,"Emacr;":274,"Eogon;":280,"Equal;":10869,"Gamma;":915,"Gcirc;":284,"Hacek;":711,"Hcirc;":292,"IJlig;":306,Iacute:205,"Icirc;":206,Igrave:204,"Imacr;":298,"Iogon;":302,"Iukcy;":1030,"Jcirc;":308,"Jukcy;":1028,"Kappa;":922,Ntilde:209,"OElig;":338,Oacute:211,"Ocirc;":212,Ograve:210,"Omacr;":332,"Omega;":937,Oslash:216,Otilde:213,"Prime;":8243,"RBarr;":10512,"Scirc;":348,"Sigma;":931,"THORN;":222,"TRADE;":8482,"TSHcy;":1035,"Theta;":920,"Tilde;":8764,Uacute:218,"Ubrcy;":1038,"Ucirc;":219,Ugrave:217,"Umacr;":362,"Union;":8899,"Uogon;":370,"UpTee;":8869,"Uring;":366,"VDash;":8875,"Vdash;":8873,"Wcirc;":372,"Wedge;":8896,Yacute:221,"Ycirc;":374,aacute:225,"acirc;":226,"acute;":180,"aelig;":230,agrave:224,"aleph;":8501,"alpha;":945,"amacr;":257,"amalg;":10815,"angle;":8736,"angrt;":8735,"angst;":197,"aogon;":261,"aring;":229,"asymp;":8776,atilde:227,"awint;":10769,"bcong;":8780,"bdquo;":8222,"bepsi;":1014,"blank;":9251,"blk12;":9618,"blk14;":9617,"blk34;":9619,"block;":9608,"boxDL;":9559,"boxDR;":9556,"boxDl;":9558,"boxDr;":9555,"boxHD;":9574,"boxHU;":9577,"boxHd;":9572,"boxHu;":9575,"boxUL;":9565,"boxUR;":9562,"boxUl;":9564,"boxUr;":9561,"boxVH;":9580,"boxVL;":9571,"boxVR;":9568,"boxVh;":9579,"boxVl;":9570,"boxVr;":9567,"boxdL;":9557,"boxdR;":9554,"boxdl;":9488,"boxdr;":9484,"boxhD;":9573,"boxhU;":9576,"boxhd;":9516,"boxhu;":9524,"boxuL;":9563,"boxuR;":9560,"boxul;":9496,"boxur;":9492,"boxvH;":9578,"boxvL;":9569,"boxvR;":9566,"boxvh;":9532,"boxvl;":9508,"boxvr;":9500,"breve;":728,brvbar:166,"bsemi;":8271,"bsime;":8909,"bsolb;":10693,"bumpE;":10926,"bumpe;":8783,"caret;":8257,"caron;":711,"ccaps;":10829,ccedil:231,"ccirc;":265,"ccups;":10828,"cedil;":184,"check;":10003,"clubs;":9827,"colon;":58,"comma;":44,"crarr;":8629,"cross;":10007,"csube;":10961,"csupe;":10962,"ctdot;":8943,"cuepr;":8926,"cuesc;":8927,"cupor;":10821,curren:164,"cuvee;":8910,"cuwed;":8911,"cwint;":8753,"dashv;":8867,"dblac;":733,"ddarr;":8650,"delta;":948,"dharl;":8643,"dharr;":8642,"diams;":9830,"disin;":8946,divide:247,"doteq;":8784,"dtdot;":8945,"dtrif;":9662,"duarr;":8693,"duhar;":10607,"eDDot;":10871,eacute:233,"ecirc;":234,"efDot;":8786,egrave:232,"emacr;":275,"empty;":8709,"eogon;":281,"eplus;":10865,"epsiv;":1013,"eqsim;":8770,"equiv;":8801,"erDot;":8787,"erarr;":10609,"esdot;":8784,"exist;":8707,"fflig;":64256,"filig;":64257,"fjlig;":102,"fllig;":64258,"fltns;":9649,"forkv;":10969,frac12:189,frac14:188,frac34:190,"frasl;":8260,"frown;":8994,"gamma;":947,"gcirc;":285,"gescc;":10921,"gimel;":8503,"gneqq;":8809,"gnsim;":8935,"grave;":96,"gsime;":10894,"gsiml;":10896,"gtcir;":10874,"gtdot;":8919,"harrw;":8621,"hcirc;":293,"hoarr;":8703,iacute:237,"icirc;":238,"iexcl;":161,igrave:236,"iiint;":8749,"iiota;":8489,"ijlig;":307,"imacr;":299,"image;":8465,"imath;":305,"imped;":437,"infin;":8734,"iogon;":303,"iprod;":10812,iquest:191,"isinE;":8953,"isins;":8948,"isinv;":8712,"iukcy;":1110,"jcirc;":309,"jmath;":567,"jukcy;":1108,"kappa;":954,"lAarr;":8666,"lBarr;":10510,"langd;":10641,"laquo;":171,"larrb;":8676,"lates;":10925,"lbarr;":10508,"lbbrk;":10098,"lbrke;":10635,"lceil;":8968,"ldquo;":8220,"lescc;":10920,"lhard;":8637,"lharu;":8636,"lhblk;":9604,"llarr;":8647,"lltri;":9722,"lneqq;":8808,"lnsim;":8934,"loang;":10220,"loarr;":8701,"lobrk;":10214,"lopar;":10629,"lrarr;":8646,"lrhar;":8651,"lrtri;":8895,"lsime;":10893,"lsimg;":10895,"lsquo;":8216,"ltcir;":10873,"ltdot;":8918,"ltrie;":8884,"ltrif;":9666,"mDDot;":8762,"mdash;":8212,"micro;":181,middot:183,"minus;":8722,"mumap;":8888,"nabla;":8711,"napid;":8779,"napos;":329,"natur;":9838,"nbump;":8782,"ncong;":8775,"ndash;":8211,"neArr;":8663,"nearr;":8599,"nedot;":8784,"nesim;":8770,"ngeqq;":8807,"ngsim;":8821,"nhArr;":8654,"nharr;":8622,"nhpar;":10994,"nlArr;":8653,"nlarr;":8602,"nleqq;":8806,"nless;":8814,"nlsim;":8820,"nltri;":8938,"notin;":8713,"notni;":8716,"npart;":8706,"nprec;":8832,"nrArr;":8655,"nrarr;":8603,"nrtri;":8939,"nsime;":8772,"nsmid;":8740,"nspar;":8742,"nsubE;":10949,"nsube;":8840,"nsucc;":8833,"nsupE;":10950,"nsupe;":8841,ntilde:241,"numsp;":8199,"nvsim;":8764,"nwArr;":8662,"nwarr;":8598,oacute:243,"ocirc;":244,"odash;":8861,"oelig;":339,"ofcir;":10687,ograve:242,"ohbar;":10677,"olarr;":8634,"olcir;":10686,"oline;":8254,"omacr;":333,"omega;":969,"operp;":10681,"oplus;":8853,"orarr;":8635,"order;":8500,oslash:248,otilde:245,"ovbar;":9021,"parsl;":11005,"phone;":9742,"plusb;":8862,"pluse;":10866,plusmn:177,"pound;":163,"prcue;":8828,"prime;":8242,"prnap;":10937,"prsim;":8830,"quest;":63,"rAarr;":8667,"rBarr;":10511,"radic;":8730,"rangd;":10642,"range;":10661,"raquo;":187,"rarrb;":8677,"rarrc;":10547,"rarrw;":8605,"ratio;":8758,"rbarr;":10509,"rbbrk;":10099,"rbrke;":10636,"rceil;":8969,"rdquo;":8221,"reals;":8477,"rhard;":8641,"rharu;":8640,"rlarr;":8644,"rlhar;":8652,"rnmid;":10990,"roang;":10221,"roarr;":8702,"robrk;":10215,"ropar;":10630,"rrarr;":8649,"rsquo;":8217,"rtrie;":8885,"rtrif;":9656,"sbquo;":8218,"sccue;":8829,"scirc;":349,"scnap;":10938,"scsim;":8831,"sdotb;":8865,"sdote;":10854,"seArr;":8664,"searr;":8600,"setmn;":8726,"sharp;":9839,"sigma;":963,"simeq;":8771,"simgE;":10912,"simlE;":10911,"simne;":8774,"slarr;":8592,"smile;":8995,"smtes;":10924,"sqcap;":8851,"sqcup;":8852,"sqsub;":8847,"sqsup;":8848,"srarr;":8594,"starf;":9733,"strns;":175,"subnE;":10955,"subne;":8842,"supnE;":10956,"supne;":8843,"swArr;":8665,"swarr;":8601,"szlig;":223,"theta;":952,"thkap;":8776,"thorn;":254,"tilde;":732,"times;":215,"trade;":8482,"trisb;":10701,"tshcy;":1115,"twixt;":8812,uacute:250,"ubrcy;":1118,"ucirc;":251,"udarr;":8645,"udhar;":10606,ugrave:249,"uharl;":8639,"uharr;":8638,"uhblk;":9600,"ultri;":9720,"umacr;":363,"uogon;":371,"uplus;":8846,"upsih;":978,"uring;":367,"urtri;":9721,"utdot;":8944,"utrif;":9652,"uuarr;":8648,"vBarv;":10985,"vDash;":8872,"varpi;":982,"vdash;":8866,"veeeq;":8794,"vltri;":8882,"vnsub;":8834,"vnsup;":8835,"vprop;":8733,"vrtri;":8883,"wcirc;":373,"wedge;":8743,"xcirc;":9711,"xdtri;":9661,"xhArr;":10234,"xharr;":10231,"xlArr;":10232,"xlarr;":10229,"xodot;":10752,"xrArr;":10233,"xrarr;":10230,"xutri;":9651,yacute:253,"ycirc;":375,AElig:198,Acirc:194,"Aopf;":120120,Aring:197,"Ascr;":119964,"Auml;":196,"Barv;":10983,"Beta;":914,"Bopf;":120121,"Bscr;":8492,"CHcy;":1063,"COPY;":169,"Cdot;":266,"Copf;":8450,"Cscr;":119966,"DJcy;":1026,"DScy;":1029,"DZcy;":1039,"Darr;":8609,"Dopf;":120123,"Dscr;":119967,Ecirc:202,"Edot;":278,"Eopf;":120124,"Escr;":8496,"Esim;":10867,"Euml;":203,"Fopf;":120125,"Fscr;":8497,"GJcy;":1027,"Gdot;":288,"Gopf;":120126,"Gscr;":119970,"Hopf;":8461,"Hscr;":8459,"IEcy;":1045,"IOcy;":1025,Icirc:206,"Idot;":304,"Iopf;":120128,"Iota;":921,"Iscr;":8464,"Iuml;":207,"Jopf;":120129,"Jscr;":119973,"KHcy;":1061,"KJcy;":1036,"Kopf;":120130,"Kscr;":119974,"LJcy;":1033,"Lang;":10218,"Larr;":8606,"Lopf;":120131,"Lscr;":8466,"Mopf;":120132,"Mscr;":8499,"NJcy;":1034,"Nopf;":8469,"Nscr;":119977,Ocirc:212,"Oopf;":120134,"Oscr;":119978,"Ouml;":214,"Popf;":8473,"Pscr;":119979,"QUOT;":34,"Qopf;":8474,"Qscr;":119980,"Rang;":10219,"Rarr;":8608,"Ropf;":8477,"Rscr;":8475,"SHcy;":1064,"Sopf;":120138,"Sqrt;":8730,"Sscr;":119982,"Star;":8902,THORN:222,"TScy;":1062,"Topf;":120139,"Tscr;":119983,"Uarr;":8607,Ucirc:219,"Uopf;":120140,"Upsi;":978,"Uscr;":119984,"Uuml;":220,"Vbar;":10987,"Vert;":8214,"Vopf;":120141,"Vscr;":119985,"Wopf;":120142,"Wscr;":119986,"Xopf;":120143,"Xscr;":119987,"YAcy;":1071,"YIcy;":1031,"YUcy;":1070,"Yopf;":120144,"Yscr;":119988,"Yuml;":376,"ZHcy;":1046,"Zdot;":379,"Zeta;":918,"Zopf;":8484,"Zscr;":119989,acirc:226,acute:180,aelig:230,"andd;":10844,"andv;":10842,"ange;":10660,"aopf;":120146,"apid;":8779,"apos;":39,aring:229,"ascr;":119990,"auml;":228,"bNot;":10989,"bbrk;":9141,"beta;":946,"beth;":8502,"bnot;":8976,"bopf;":120147,"boxH;":9552,"boxV;":9553,"boxh;":9472,"boxv;":9474,"bscr;":119991,"bsim;":8765,"bsol;":92,"bull;":8226,"bump;":8782,"caps;":8745,"cdot;":267,cedil:184,"cent;":162,"chcy;":1095,"cirE;":10691,"circ;":710,"cire;":8791,"comp;":8705,"cong;":8773,"copf;":120148,"copy;":169,"cscr;":119992,"csub;":10959,"csup;":10960,"cups;":8746,"dArr;":8659,"dHar;":10597,"darr;":8595,"dash;":8208,"diam;":8900,"djcy;":1106,"dopf;":120149,"dscr;":119993,"dscy;":1109,"dsol;":10742,"dtri;":9663,"dzcy;":1119,"eDot;":8785,"ecir;":8790,ecirc:234,"edot;":279,"emsp;":8195,"ensp;":8194,"eopf;":120150,"epar;":8917,"epsi;":949,"escr;":8495,"esim;":8770,"euml;":235,"euro;":8364,"excl;":33,"flat;":9837,"fnof;":402,"fopf;":120151,"fork;":8916,"fscr;":119995,"gdot;":289,"geqq;":8807,"gesl;":8923,"gjcy;":1107,"gnap;":10890,"gneq;":10888,"gopf;":120152,"gscr;":8458,"gsim;":8819,"gtcc;":10919,"gvnE;":8809,"hArr;":8660,"half;":189,"harr;":8596,"hbar;":8463,"hopf;":120153,"hscr;":119997,icirc:238,"iecy;":1077,iexcl:161,"imof;":8887,"iocy;":1105,"iopf;":120154,"iota;":953,"iscr;":119998,"isin;":8712,"iuml;":239,"jopf;":120155,"jscr;":119999,"khcy;":1093,"kjcy;":1116,"kopf;":120156,"kscr;":120000,"lArr;":8656,"lHar;":10594,"lang;":10216,laquo:171,"larr;":8592,"late;":10925,"lcub;":123,"ldca;":10550,"ldsh;":8626,"leqq;":8806,"lesg;":8922,"ljcy;":1113,"lnap;":10889,"lneq;":10887,"lopf;":120157,"lozf;":10731,"lpar;":40,"lscr;":120001,"lsim;":8818,"lsqb;":91,"ltcc;":10918,"ltri;":9667,"lvnE;":8808,"macr;":175,"male;":9794,"malt;":10016,micro:181,"mlcp;":10971,"mldr;":8230,"mopf;":120158,"mscr;":120002,"nGtv;":8811,"nLtv;":8810,"nang;":8736,"napE;":10864,"nbsp;":160,"ncap;":10819,"ncup;":10818,"ngeq;":8817,"nges;":10878,"ngtr;":8815,"nisd;":8954,"njcy;":1114,"nldr;":8229,"nleq;":8816,"nles;":10877,"nmid;":8740,"nopf;":120159,"npar;":8742,"npre;":10927,"nsce;":10928,"nscr;":120003,"nsim;":8769,"nsub;":8836,"nsup;":8837,"ntgl;":8825,"ntlg;":8824,"nvap;":8781,"nvge;":8805,"nvgt;":62,"nvle;":8804,"nvlt;":60,"oast;":8859,"ocir;":8858,ocirc:244,"odiv;":10808,"odot;":8857,"ogon;":731,"oint;":8750,"omid;":10678,"oopf;":120160,"opar;":10679,"ordf;":170,"ordm;":186,"oror;":10838,"oscr;":8500,"osol;":8856,"ouml;":246,"para;":182,"part;":8706,"perp;":8869,"phiv;":981,"plus;":43,"popf;":120161,pound:163,"prap;":10935,"prec;":8826,"prnE;":10933,"prod;":8719,"prop;":8733,"pscr;":120005,"qint;":10764,"qopf;":120162,"qscr;":120006,"quot;":34,"rArr;":8658,"rHar;":10596,"race;":8765,"rang;":10217,raquo:187,"rarr;":8594,"rcub;":125,"rdca;":10551,"rdsh;":8627,"real;":8476,"rect;":9645,"rhov;":1009,"ring;":730,"ropf;":120163,"rpar;":41,"rscr;":120007,"rsqb;":93,"rtri;":9657,"scap;":10936,"scnE;":10934,"sdot;":8901,"sect;":167,"semi;":59,"sext;":10038,"shcy;":1096,"sime;":8771,"simg;":10910,"siml;":10909,"smid;":8739,"smte;":10924,"solb;":10692,"sopf;":120164,"spar;":8741,"squf;":9642,"sscr;":120008,"star;":9734,"subE;":10949,"sube;":8838,"succ;":8827,"sung;":9834,"sup1;":185,"sup2;":178,"sup3;":179,"supE;":10950,"supe;":8839,szlig:223,"tbrk;":9140,"tdot;":8411,thorn:254,times:215,"tint;":8749,"toea;":10536,"topf;":120165,"tosa;":10537,"trie;":8796,"tscr;":120009,"tscy;":1094,"uArr;":8657,"uHar;":10595,"uarr;":8593,ucirc:251,"uopf;":120166,"upsi;":965,"uscr;":120010,"utri;":9653,"uuml;":252,"vArr;":8661,"vBar;":10984,"varr;":8597,"vert;":124,"vopf;":120167,"vscr;":120011,"wopf;":120168,"wscr;":120012,"xcap;":8898,"xcup;":8899,"xmap;":10236,"xnis;":8955,"xopf;":120169,"xscr;":120013,"xvee;":8897,"yacy;":1103,"yicy;":1111,"yopf;":120170,"yscr;":120014,"yucy;":1102,"yuml;":255,"zdot;":380,"zeta;":950,"zhcy;":1078,"zopf;":120171,"zscr;":120015,"zwnj;":8204,"AMP;":38,"Acy;":1040,"Afr;":120068,"And;":10835,Auml:196,"Bcy;":1041,"Bfr;":120069,COPY:169,"Cap;":8914,"Cfr;":8493,"Chi;":935,"Cup;":8915,"Dcy;":1044,"Del;":8711,"Dfr;":120071,"Dot;":168,"ENG;":330,"ETH;":208,"Ecy;":1069,"Efr;":120072,"Eta;":919,Euml:203,"Fcy;":1060,"Ffr;":120073,"Gcy;":1043,"Gfr;":120074,"Hat;":94,"Hfr;":8460,"Icy;":1048,"Ifr;":8465,"Int;":8748,Iuml:207,"Jcy;":1049,"Jfr;":120077,"Kcy;":1050,"Kfr;":120078,"Lcy;":1051,"Lfr;":120079,"Lsh;":8624,"Map;":10501,"Mcy;":1052,"Mfr;":120080,"Ncy;":1053,"Nfr;":120081,"Not;":10988,"Ocy;":1054,"Ofr;":120082,Ouml:214,"Pcy;":1055,"Pfr;":120083,"Phi;":934,"Psi;":936,QUOT:34,"Qfr;":120084,"REG;":174,"Rcy;":1056,"Rfr;":8476,"Rho;":929,"Rsh;":8625,"Scy;":1057,"Sfr;":120086,"Sub;":8912,"Sum;":8721,"Sup;":8913,"Tab;":9,"Tau;":932,"Tcy;":1058,"Tfr;":120087,"Ucy;":1059,"Ufr;":120088,Uuml:220,"Vcy;":1042,"Vee;":8897,"Vfr;":120089,"Wfr;":120090,"Xfr;":120091,"Ycy;":1067,"Yfr;":120092,"Zcy;":1047,"Zfr;":8488,"acE;":8766,"acd;":8767,"acy;":1072,"afr;":120094,"amp;":38,"and;":8743,"ang;":8736,"apE;":10864,"ape;":8778,"ast;":42,auml:228,"bcy;":1073,"bfr;":120095,"bne;":61,"bot;":8869,"cap;":8745,cent:162,"cfr;":120096,"chi;":967,"cir;":9675,copy:169,"cup;":8746,"dcy;":1076,"deg;":176,"dfr;":120097,"die;":168,"div;":247,"dot;":729,"ecy;":1101,"efr;":120098,"egs;":10902,"ell;":8467,"els;":10901,"eng;":331,"eta;":951,"eth;":240,euml:235,"fcy;":1092,"ffr;":120099,"gEl;":10892,"gap;":10886,"gcy;":1075,"gel;":8923,"geq;":8805,"ges;":10878,"gfr;":120100,"ggg;":8921,"glE;":10898,"gla;":10917,"glj;":10916,"gnE;":8809,"gne;":10888,"hfr;":120101,"icy;":1080,"iff;":8660,"ifr;":120102,"int;":8747,iuml:239,"jcy;":1081,"jfr;":120103,"kcy;":1082,"kfr;":120104,"lEg;":10891,"lap;":10885,"lat;":10923,"lcy;":1083,"leg;":8922,"leq;":8804,"les;":10877,"lfr;":120105,"lgE;":10897,"lnE;":8808,"lne;":10887,"loz;":9674,"lrm;":8206,"lsh;":8624,macr:175,"map;":8614,"mcy;":1084,"mfr;":120106,"mho;":8487,"mid;":8739,"nGg;":8921,"nGt;":8811,"nLl;":8920,"nLt;":8810,"nap;":8777,nbsp:160,"ncy;":1085,"nfr;":120107,"ngE;":8807,"nge;":8817,"ngt;":8815,"nis;":8956,"niv;":8715,"nlE;":8806,"nle;":8816,"nlt;":8814,"not;":172,"npr;":8832,"nsc;":8833,"num;":35,"ocy;":1086,"ofr;":120108,"ogt;":10689,"ohm;":937,"olt;":10688,"ord;":10845,ordf:170,ordm:186,"orv;":10843,ouml:246,"par;":8741,para:182,"pcy;":1087,"pfr;":120109,"phi;":966,"piv;":982,"prE;":10931,"pre;":10927,"psi;":968,"qfr;":120110,quot:34,"rcy;":1088,"reg;":174,"rfr;":120111,"rho;":961,"rlm;":8207,"rsh;":8625,"scE;":10932,"sce;":10928,"scy;":1089,sect:167,"sfr;":120112,"shy;":173,"sim;":8764,"smt;":10922,"sol;":47,"squ;":9633,"sub;":8834,"sum;":8721,sup1:185,sup2:178,sup3:179,"sup;":8835,"tau;":964,"tcy;":1090,"tfr;":120113,"top;":8868,"ucy;":1091,"ufr;":120114,"uml;":168,uuml:252,"vcy;":1074,"vee;":8744,"vfr;":120115,"wfr;":120116,"xfr;":120117,"ycy;":1099,"yen;":165,"yfr;":120118,yuml:255,"zcy;":1079,"zfr;":120119,"zwj;":8205,AMP:38,"DD;":8517,ETH:208,"GT;":62,"Gg;":8921,"Gt;":8811,"Im;":8465,"LT;":60,"Ll;":8920,"Lt;":8810,"Mu;":924,"Nu;":925,"Or;":10836,"Pi;":928,"Pr;":10939,REG:174,"Re;":8476,"Sc;":10940,"Xi;":926,"ac;":8766,"af;":8289,amp:38,"ap;":8776,"dd;":8518,deg:176,"ee;":8519,"eg;":10906,"el;":10905,eth:240,"gE;":8807,"ge;":8805,"gg;":8811,"gl;":8823,"gt;":62,"ic;":8291,"ii;":8520,"in;":8712,"it;":8290,"lE;":8806,"le;":8804,"lg;":8822,"ll;":8810,"lt;":60,"mp;":8723,"mu;":956,"ne;":8800,"ni;":8715,not:172,"nu;":957,"oS;":9416,"or;":8744,"pi;":960,"pm;":177,"pr;":8826,reg:174,"rx;":8478,"sc;":8827,shy:173,uml:168,"wp;":8472,"wr;":8768,"xi;":958,yen:165,GT:62,LT:60,gt:62,lt:60},be=br;var Sr=[8364,129,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,141,381,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,157,382,376];function Er(t,n){if(n&&!t.endsWith(";"))return`${t}\\b(?!=)`;return t}function at(t){let a=Object.keys(be).map((o)=>Er(o,t));return new RegExp(`&(#(?:x[a-fA-F\\d]+|\\d+)(?:;)?|${a.join("|")})`,"g")}var Se,Ee;function wr(t){if(t){if(!Ee)Ee=at(!0);return Ee}if(!Se)Se=at(!1);return Se}var nt=0;function Pr(t){if(t===10)return 32;if(t<128)return t;if(t<=159)return Sr[t-128];if(t<55296)return t;if(t<=57343)return nt;if(t<=65535)return t;if(t>=65536&&t<=131071)return t;if(t>=131072&&t<=196607)return t;if(t>=917504&&t<=917631||t>=917760&&t<=917999)return t;return nt}function we(t,n){if(t.indexOf("&")===-1)return t;return t.replace(wr(n),(a,o)=>{let c;if(o[0]!=="#")c=be[o];else if(o[1]==="x")c=Number.parseInt(o.substring(2),16);else c=Number.parseInt(o.substring(1),10);if(!c)return a;return String.fromCodePoint(Pr(c))})}class se extends Error{constructor(t){super(`sveld's template parser doesn't support ${t} yet.`);this.name="TemplateParseNotImplementedError"}}var Cr=/<\/script\s*>/g,kr=/<\/script\s*>/y,Nr=/[^\n]/g,vr=new Set(["server","client","worker","test","default"]);function ot(t,n,a){let o=t.index,c=t.readUntil(Cr);if(t.index>=t.source.length)throw Error("sveld: unclosed <script> tag");let u=t.source.slice(0,o).replace(Nr," ")+c;t.read(kr);let s=Ze(u,t.isTypeScript,t.root.comments);s.start=o;let y="default";for(let b of a){if(vr.has(b.name))throw Error(`sveld: "${b.name}" is a reserved <script> attribute name.`);if(b.name==="module"){if(b.value!==!0)throw Error("sveld: <script module> does not take a value.");y="module"}if(b.name==="context"){let E=b.value;if(E===!0||!Array.isArray(E)||E.length!==1||E[0].type!=="Text")throw Error("sveld: context attribute must be a plain string.");if(E[0].data!=="module")throw Error('sveld: only context="module" is valid.');y="module"}}return{type:"Script",start:n,end:t.index,context:y,content:s,attributes:a}}function lt(t,n,a){let o=t.index,c=t.source.indexOf("</style",t.index),u=c===-1?t.source.length:c;return t.index=u,t.eat("</style",!0),t.read(/\s*>/y),{type:"StyleSheet",start:n,end:t.index,attributes:a,children:[],comments:[],content:{start:o,end:u,styles:t.source.slice(o,u),comment:null}}}var Ir=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]);function Pe(t){return Ir.has(t)||t.charCodeAt(0)===33&&t.toLowerCase()==="!doctype"}var Lr="^[a-zA-Z][a-zA-Z0-9]*(-[a-zA-Z0-9.\\-_\\u00B7\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u203F-\\u2040\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\u{10000}-\\u{EFFFF}]*)?$",Dr=new RegExp(Lr,"u");function ct(t){return Dr.test(t)}var _r=/(?:"([^"]*)"|'([^'])*'|([^>\s]+))/y,ft=/["']/y,Or=/(\/>|[\s"'=<>`])/y,Ce=/<\/textarea(\s[^>]*)?>/iy,Rr=/^![a-zA-Z]+$/,Mr=/^[a-zA-Z][a-zA-Z0-9]*:[a-zA-Z][a-zA-Z0-9-]*[a-zA-Z0-9]$/,qr=/^(?:\p{Lu}[$\u200c\u200d\p{ID_Continue}.]*|\p{ID_Start}[$\u200c\u200d\p{ID_Continue}]*(?:\.[$\u200c\u200d\p{ID_Continue}]+)+)$/u,mt={"svelte:head":"SvelteHead","svelte:options":"SvelteOptions","svelte:window":"SvelteWindow","svelte:document":"SvelteDocument","svelte:body":"SvelteBody"},pt={...mt,"svelte:element":"SvelteElement","svelte:component":"SvelteComponent","svelte:self":"SvelteSelf","svelte:fragment":"SvelteFragment","svelte:boundary":"SvelteBoundary"};function Br(t){let n=t.charCodeAt(0);if(n<97||n>122)return!1;for(let a=1;a<t.length;a++){let o=t.charCodeAt(a);if((o<97||o>122)&&(o<48||o>57))return!1}return!0}function Fr(t){if(Br(t))return!0;if(Rr.test(t))return!0;if(Mr.test(t))return!0;return ct(t)}function Ur(t){let n=t.charCodeAt(0);if(n>=97&&n<=122&&!t.includes("."))return!1;return!0}function Vr(t){return`Svelte${t.slice(7).split("-").map((a)=>a.charAt(0).toUpperCase()+a.slice(1)).join("")}`}function Wr(t){for(let n=t.length-1;n>=0;n--){let a=t[n].type;if(a==="SvelteHead")return!0;if(a==="RegularElement"||a==="Component")return!1}return!1}function jr(t){for(let n=t.length-1;n>=0;n--){let a=t[n];if(a.type==="RegularElement"&&a.attributes?.some((o)=>o.type==="Attribute"&&o.name==="shadowrootmode"))return!0}return!1}function ht(t){let{source:n,index:a}=t;if(a>=n.length)throw new G("Unexpected end of input",n.length);let o=a;while(o<n.length){let c=n.charCodeAt(o);if(c===47||c===62||J(c))break;o++}return t.index=o,{name:n.slice(a,o),start:a,end:o}}function yt(t){let{source:n,index:a}=t;if(a>=n.length)throw new G("Unexpected end of input",n.length);let o=a;while(o<n.length){let c=n.charCodeAt(o);if(c===61||c===47||c===62||c===34||c===39||J(c))break;o++}return t.index=o,{name:n.slice(a,o),start:a,end:o}}function Hr(t){let n=t.index;if(t.eat("//")){let a=t.readUntilString(`
|
|
7
|
+
`),o=t.index;t.root.comments.push({type:"Line",value:a,start:n,end:o});return}if(t.eat("/*")){let a=t.readUntilString("*/");t.eat("*/");let o=t.index;t.root.comments.push({type:"Block",value:a,start:n,end:o})}}function Gr(t){if(t==="use")return"UseDirective";if(t==="animate")return"AnimateDirective";if(t==="bind")return"BindDirective";if(t==="class")return"ClassDirective";if(t==="style")return"StyleDirective";if(t==="on")return"OnDirective";if(t==="let")return"LetDirective";if(t==="in"||t==="out"||t==="transition")return"TransitionDirective";return!1}function xt(t,n){let a={start:t.index,end:-1,type:"Text",raw:"",data:""},o=[],c=(u)=>{if(u>a.start)a.raw=t.source.slice(a.start,u),a.data=we(a.raw,!0),a.end=u,o.push(a)};while(t.index<t.source.length){if(n())return c(t.index),o;if(t.eat("{")){if(t.match("#")||t.match("@"))throw new se("blocks/tags inside attribute value sequences");let u=t.index-1;c(u),t.allowWhitespace();let s=O(t);t.allowWhitespace(),t.eat("}",!0),o.push({type:"ExpressionTag",start:u,end:t.index,expression:s}),a={start:t.index,end:-1,type:"Text",raw:"",data:""}}else t.index++}throw new se("unterminated attribute value / sequence (loose mode)")}function Kr(t){let n=t.eat("'")?"'":t.eat('"')?'"':null;if(n&&t.eat(n))return[{start:t.index-1,end:t.index-1,type:"Text",raw:"",data:""}];let a=xt(t,()=>{if(n)return t.match(n);return!!t.matchRegex(Or)});if(a.length===0&&!n)throw Error("sveld: expected attribute value");if(n)t.index+=1;if(n||a.length>1||a[0].type==="Text")return a;return a[0]}function ke(t,n,a,o){return{type:"Attribute",start:n,end:a,name:t,value:o}}function zr(t){let n=t.index,a=yt(t);if(!a.name)return null;let o=!0;if(t.eat("=")){t.allowWhitespace();let c=t.matchRegex(_r);if(!c)throw Error("sveld: expected attribute value");t.index+=c.length;let u=c[0]==='"'||c[0]==="'";if(u)c=c.slice(1,-1);o=[{start:t.index-c.length-(u?1:0),end:u?t.index-1:t.index,type:"Text",raw:c,data:we(c,!0)}]}if(t.matchRegex(ft))throw Error("sveld: expected '='");return ke(a.name,n,t.index,o)}function Xr(t){while(!0){let y=t.index;if(Hr(t),t.index===y)break;t.allowWhitespace()}let n=t.index;if(t.eat("{")){if(t.allowWhitespace(),t.eat("@attach")){t.requireWhitespace();let E=O(t);return t.allowWhitespace(),t.eat("}",!0),{type:"AttachTag",start:n,end:t.index,expression:E}}if(t.eat("...")){let E=O(t);return t.allowWhitespace(),t.eat("}",!0),{type:"SpreadAttribute",start:n,end:t.index,expression:E}}let y=t.readIdentifierName();if(y.name==="")throw Error("sveld: empty attribute shorthand");t.allowWhitespace(),t.eat("}",!0);let b={type:"ExpressionTag",start:y.start,end:y.end,expression:y};return ke(y.name,n,t.index,b)}let a=yt(t);if(!a.name)return null;let o=t.index;t.allowWhitespace();let c=a.name.indexOf(":"),u=c!==-1&&Gr(a.name.slice(0,c)),s=!0;if(t.eat("="))if(t.allowWhitespace(),t.source[t.index]==="/"&&t.source[t.index+1]===">"){let y=t.index;t.index++,s=[{start:y,end:y+1,type:"Text",raw:"/",data:"/"}],o=t.index}else s=Kr(t),o=t.index;else if(t.matchRegex(ft))throw Error("sveld: expected '='");if(u){let y=a.name.slice(c+1).split("|",1)[0];if(y==="")throw Error("sveld: directive missing a name");if(u==="StyleDirective")return{start:n,end:o,type:u,name:y,value:s};let b=s===!0?void 0:Array.isArray(s)?s[0]:s,E=null;if(b){if((Array.isArray(s)?s.length>1:!1)||b.type==="Text")throw Error("sveld: directive value must be a single expression");E=b.expression}let f={start:n,end:o,type:u,name:y,expression:E};if((f.type==="BindDirective"||f.type==="ClassDirective")&&!f.expression)f.expression={start:n+c+1,end:o,type:"Identifier",name:f.name};return f}return ke(a.name,n,o,s)}function Tt(t){let n=t.index++,a=t.current();if(t.eat("!--")){let g=t.readUntilString("-->");t.eat("-->",!0),t.append({type:"Comment",start:n,end:t.index,data:g});return}if(t.eat("/")){let{name:g}=ht(t);if(t.allowWhitespace(),t.eat(">",!0),Pe(g))throw Error(`sveld: <${g}> is a void element and cannot have a closing tag`);while(a.name!==g){if(a.type==="RegularElement");else throw Error(`sveld: invalid closing tag </${g}>`);a.end=n,t.pop(),a=t.current()}if(a.end=t.index,t.pop(),t.lastAutoClosedTag&&t.stack.length<t.lastAutoClosedTag.depth)t.lastAutoClosedTag=void 0;return}let o=ht(t),c=Ur(o.name)&&qr.test(o.name);if(!Fr(o.name)&&!c)throw Error(`sveld: "${o.name}" is not a valid element or component name`);if(o.name in mt&&a.type!=="Root")throw Error(`sveld: <${o.name}> must be a top-level element`);let u;if(o.name in pt)u=pt[o.name];else if(o.name.startsWith("svelte:"))u=Vr(o.name);else if(c)u="Component";else if(o.name==="title"&&Wr(t.stack))u="TitleElement";else if(o.name==="slot"&&!jr(t.stack))u="SlotElement";else u="RegularElement";let s={type:u,start:n,end:-1,name:o.name,attributes:[],fragment:{type:"Fragment",nodes:[]}};if(t.allowWhitespace(),a.type==="RegularElement"&&Le(a.name,o.name))a.end=n,t.pop(),t.lastAutoClosedTag={tag:a.name,reason:o.name,depth:t.stack.length},a=t.current();let y=t.current(),b=(o.name==="script"||o.name==="style")&&y.type==="Root",E=b?zr:Xr,f;while(f=E(t))s.attributes.push(f),t.allowWhitespace();if(s.type==="SvelteComponent")s.expression=dt(ut(s));if(s.type==="SvelteElement"){let g=ut(s);if(g.value===!0)throw Error("sveld: <svelte:element> `this` attribute needs a value");if($r(g))s.tag=dt(g);else{let x=g.value[0];s.tag=x.type==="Text"?{type:"Literal",value:x.data,raw:`'${x.raw}'`,start:x.start,end:x.end}:x.expression}}if(b){if(t.eat(">",!0),o.name==="script"){let g=ot(t,n,s.attributes);if(g.context==="module"){if(t.root.module)throw Error("sveld: duplicate <script module>");t.root.module=g}else{if(t.root.instance)throw Error("sveld: duplicate <script>");t.root.instance=g}}else{if(t.root.css)throw Error("sveld: duplicate <style>");t.root.css=lt(t,n,s.attributes)}return}t.append(s);let w=t.eat("/")||Pe(o.name);if(t.eat(">",!0),w)s.end=t.index;else if(o.name==="textarea")s.fragment.nodes=xt(t,()=>(Ce.lastIndex=t.index,Ce.test(t.source))),t.read(Ce),s.end=t.index;else t.push(s,s.fragment)}function ut(t){let n=t.attributes,a=n.findIndex((o)=>o.type==="Attribute"&&o.name==="this");if(a===-1)throw Error(`sveld: <${t.name}> requires a \`this\` attribute`);return n.splice(a,1)[0]}function dt(t){return Array.isArray(t.value)?t.value[0].expression:t.value.expression}function $r(t){return t.value!==!0&&!Array.isArray(t.value)||Array.isArray(t.value)&&t.value.length===1&&t.value[0].type==="ExpressionTag"}function gt(t){let n={start:t.start,end:t.end,attributes:t.attributes};for(let a of t.attributes){if(a.type!=="Attribute")continue;if(a.name==="runes"){let o=At(a);if(typeof o==="boolean")n.runes=o}if(a.name==="customElement"){let o=Jr(a);if(o!==void 0)n.customElement={tag:o}}}return n}function At(t){let{value:n}=t;if(n===!0)return!0;let a=Array.isArray(n)?n[0]:n;if(!a)return!0;if(Array.isArray(n)&&n.length>1)return null;if(a.type==="Text")return a.data;if(a.expression.type!=="Literal")return null;return a.expression.value}function Jr(t){let{value:n}=t;if(n===!0)return;let a=Array.isArray(n)?n[0]:n;if(!a)return;if(a.type==="Text"){let o=At(t);return typeof o==="string"?o:void 0}if(a.expression.type==="ObjectExpression"){for(let o of a.expression.properties)if(o.type==="Property"&&!o.computed&&o.key.type==="Identifier"&&o.key.name==="tag"&&o.value.type==="Literal"&&typeof o.value.value==="string")return o.value.value}return}var Yr=/<script\s+(?:[^>]*|(?:[^=>'"/]+=(?:"[^"]*"|'[^']*'|[^>\s]+)\s+)*)lang=(["'])?ts\1[^>]*>/;class Ne extends ge{root;stack=[];fragments=[];isTypeScript;lastAutoClosedTag;constructor(t,n){super(t);this.isTypeScript=Yr.test(t);let a=R();this.root={type:"Root",start:0,end:n,css:null,js:[],options:null,fragment:a,comments:[]},this.stack.push(this.root),this.fragments.push(a)}current(){return this.stack[this.stack.length-1]}currentFragment(){return this.fragments[this.fragments.length-1]}push(t,n){this.stack.push(t),this.fragments.push(n)}pop(){return this.fragments.pop(),this.stack.pop()}append(t){return this.currentFragment().nodes.push(t),t}}var ve={"{":"}","(":")","[":"]"},Qr=new Set(Object.values(ve));function ie(t,n,a=ve){let o=a===ve?Qr:new Set(Object.values(a)),c=[],u=n;while(u<t.source.length){let s=t.source[u++];if(s==="'"||s==='"'||s==="`"){u=Zr(t,u,s);continue}if(Object.hasOwn(a,s))c.push(s);else if(o.has(s)){let y=c.pop(),b=y?a[y]:void 0;if(s!==b)throw Error(`sveld: expected "${b}"`);if(c.length===0)return u}}throw Error("sveld: unexpected end of input")}function Zr(t,n,a){let o=!1,c=n;while(c<t.source.length){let u=t.source[c++];if(o){o=!1;continue}if(u===a)return c;if(u==="\\")o=!0;if(a==="`"&&u==="$"&&t.source[c]==="{")c=ie(t,c)}throw Error("sveld: unterminated string constant")}var St=/[^\n]/g,es=/\?\s*:/g;function K(t){let n=t.index,a=t.readIdentifierName();if(a.name!==""){let g=bt(t);return{...a,typeAnnotation:g}}let o=t.source[t.index];if(o!=="{"&&o!=="[")throw Error("sveld: expected a binding pattern");let c=ie(t,n);t.index=c;let u=t.source.slice(n,c),s=t.source.slice(0,n).replace(St," "),y=s.indexOf(" ");s=s.slice(0,y)+s.slice(y+1);let b=`${s}(${u} = 1)`,{node:E}=Q(b,n-1,t.isTypeScript,t.root.comments),f=E.left,w=bt(t);if(w)f.typeAnnotation=w,f.end=w.end;return f}function bt(t){let n=t.index;if(t.allowWhitespace(),!t.eat(":")){t.index=n;return}let a="_ as ",o=t.index-a.length,c=t.source.slice(0,o).replace(St," ")+a+t.source.slice(t.index).replace(es,":"),{node:u}=Q(c,o,t.isTypeScript,t.root.comments),s=u;if(s.type==="AssignmentExpression"){let y=s.right.start;while(c[y]!=="=")y-=1;({node:u}=Q(c.slice(0,y),o,t.isTypeScript,t.root.comments)),s=u}if(s.type==="SequenceExpression"&&s.expressions)s=s.expressions[0];return t.index=s.end,{type:"TSTypeAnnotation",start:n,end:t.index,typeAnnotation:s.typeAnnotation}}var Et=/\s*}/y,ts={"<":">"};function wt(t){let n=t.index-2;while(t.source[n]!=="{")n-=1;if(t.eat("if")){t.requireWhitespace();let a={type:"IfBlock",elseif:!1,start:n,end:-1,test:O(t),consequent:R(),alternate:null};t.append(a),t.allowWhitespace(),t.eat("}",!0),t.push(a,a.consequent);return}if(t.eat("each")){t.requireWhitespace();let a=O(t);if(t.allowWhitespace(),!t.match("as")){let y=a;if(y.type==="SequenceExpression"&&y.expressions)y=y.expressions[0];if(y.type==="TSAsExpression"){let b=y;a=b.expression;let E=b.typeAnnotation.start-2;while(E>=0&&!(t.source[E]==="a"&&t.source[E+1]==="s"))E-=1;t.index=E}}let o=null,c,u;if(t.eat("as"))t.requireWhitespace(),o=K(t);if(t.allowWhitespace(),t.eat(",")){t.allowWhitespace();let y=t.readIdentifierName();if(!y.name)throw Error("sveld: expected an identifier");c=y.name,t.allowWhitespace()}if(t.eat("("))t.allowWhitespace(),u=O(t),t.allowWhitespace(),t.eat(")",!0),t.allowWhitespace();t.eat("}",!0);let s={type:"EachBlock",start:n,end:-1,expression:a,body:R(),context:o,index:c,key:u};t.append(s),t.push(s,s.body);return}if(t.eat("await")){t.requireWhitespace();let a=O(t);t.allowWhitespace();let o={type:"AwaitBlock",start:n,end:-1,expression:a,value:null,error:null,pending:null,then:null,catch:null};if(t.eat("then")){if(!t.matchRegex(Et))t.requireWhitespace(),o.value=K(t),t.allowWhitespace();o.then=R()}else if(t.eat("catch")){if(!t.matchRegex(Et))t.requireWhitespace(),o.error=K(t),t.allowWhitespace();o.catch=R()}else o.pending=R();t.eat("}",!0),t.append(o),t.push(o,o.then??o.catch??o.pending);return}if(t.eat("key")){t.requireWhitespace();let a=O(t);t.allowWhitespace(),t.eat("}",!0);let o={type:"KeyBlock",start:n,end:-1,expression:a,fragment:R()};t.append(o),t.push(o,o.fragment);return}if(t.eat("snippet")){t.requireWhitespace();let a=t.readIdentifierName();if(a.name==="")throw Error("sveld: expected a snippet name");t.allowWhitespace();let o;if(t.isTypeScript&&t.match("<")){let u=t.index,s=ie(t,u,ts);o=t.source.slice(u+1,s-1),t.index=s}if(t.allowWhitespace(),t.eat("(")){let u=1;while(t.index<t.source.length&&(!t.match(")")||u!==1)){if(t.match("("))u++;if(t.match(")"))u--;t.index+=1}t.eat(")",!0)}t.allowWhitespace(),t.eat("}",!0);let c={type:"SnippetBlock",start:n,end:-1,expression:a,typeParams:o,parameters:[],body:R()};t.append(c),t.push(c,c.body);return}throw Error("sveld: expected if/each/await/key/snippet")}function Pt(t){let n=t.index-1,a=t.current();if(a.type==="IfBlock"){if(!t.eat("else"))throw Error("sveld: expected {:else} or {:else if}");if(t.eat("if"))throw Error("sveld: {:else if} cannot follow {:else if} directly");if(t.allowWhitespace(),t.fragments.pop(),a.alternate=R(),t.fragments.push(a.alternate),t.eat("if")){t.requireWhitespace();let o=O(t);t.allowWhitespace(),t.eat("}",!0);let c=n-1;while(t.source[c]!=="{")c-=1;let u={type:"IfBlock",start:c,end:-1,elseif:!0,test:o,consequent:R(),alternate:null};t.append(u),t.stack.push(u),t.fragments.pop(),t.fragments.push(u.consequent)}else t.allowWhitespace(),t.eat("}",!0);return}if(a.type==="EachBlock"){if(!t.eat("else"))throw Error("sveld: expected {:else}");t.allowWhitespace(),t.eat("}",!0),a.fallback=R(),t.fragments.pop(),t.fragments.push(a.fallback);return}if(a.type==="AwaitBlock"){if(t.eat("then")){if(a.then)throw Error("sveld: duplicate {:then}");if(!t.eat("}"))t.requireWhitespace(),a.value=K(t),t.allowWhitespace(),t.eat("}",!0);a.then=R(),t.fragments.pop(),t.fragments.push(a.then);return}if(t.eat("catch")){if(a.catch)throw Error("sveld: duplicate {:catch}");if(!t.eat("}"))t.requireWhitespace(),a.error=K(t),t.allowWhitespace(),t.eat("}",!0);a.catch=R(),t.fragments.pop(),t.fragments.push(a.catch);return}throw Error("sveld: expected {:then ...} or {:catch ...}")}throw Error("sveld: {:...} not valid here")}function Ct(t){let n=t.current();switch(n.type){case"IfBlock":{t.eat("if",!0),t.allowWhitespace(),t.eat("}",!0);while(n.type==="IfBlock"&&n.elseif)n.end=t.index,t.stack.pop(),n=t.current();n.end=t.index,t.pop();return}case"EachBlock":t.eat("each",!0);break;case"KeyBlock":t.eat("key",!0);break;case"AwaitBlock":t.eat("await",!0);break;case"SnippetBlock":t.eat("snippet",!0);break;default:throw Error("sveld: unexpected closing block tag")}t.allowWhitespace(),t.eat("}",!0),n.end=t.index,t.pop()}var rs=/(?:let|const)\b/y,ss=/(?:var|interface|enum)\b/y,is=/type\b/y;function kt(t){let n=t.index;if(t.matchRegex(ss))throw Error("sveld: `var`/`interface`/`enum` are not valid here");if(!t.matchRegex(rs)&&!t.matchRegex(is))return null;let a=t.root.comments.length,o=et(t.source,n,t.isTypeScript,t.root.comments);if(o.type!=="VariableDeclaration"){if(o.type==="ExpressionStatement")return t.root.comments.length=a,null;throw Error("sveld: expected a `let`/`const` declaration")}if(o.kind!=="let"&&o.kind!=="const")throw Error("sveld: expected a `let`/`const` declaration");return t.index=o.end,t.allowWhitespace(),t.eat("}",!0),o}var as=/\s*}/y;function Nt(t){let n=t.index;while(t.source[n]!=="{")n-=1;if(t.eat("html")){t.requireWhitespace();let a=O(t);t.allowWhitespace(),t.eat("}",!0);let o={type:"HtmlTag",start:n,end:t.index,expression:a};t.append(o);return}if(t.eat("debug")){let a;if(t.read(as))a=[];else{let c=O(t);a=c.type==="SequenceExpression"?c.expressions:[c];for(let u of a)if(u.type!=="Identifier")throw Error("sveld: {@debug} arguments must be identifiers");t.allowWhitespace(),t.eat("}",!0)}let o={type:"DebugTag",start:n,end:t.index,identifiers:a};t.append(o);return}if(t.eat("const")){t.requireWhitespace();let a=K(t);t.allowWhitespace(),t.eat("=",!0),t.allowWhitespace();let o=O(t),c=t.index;t.allowWhitespace(),t.eat("}",!0);let u={type:"VariableDeclarator",id:a,init:o,start:a.start,end:c},s={type:"ConstTag",start:n,end:t.index,declaration:{type:"VariableDeclaration",kind:"const",declarations:[u],start:n+2,end:t.index-1}};t.append(s);return}if(t.eat("render")){t.requireWhitespace();let a=O(t);if(!(a.type==="CallExpression"||a.type==="ChainExpression"&&a.expression.type==="CallExpression"))throw Error("sveld: {@render ...} must be a function call");t.allowWhitespace(),t.eat("}",!0);let c={type:"RenderTag",start:n,end:t.index,expression:a};t.append(c);return}throw Error("sveld: expected html/debug/const/render")}function vt(t){let n=t.index;if(t.index+=1,t.allowWhitespace(),t.eat("#")){wt(t);return}if(t.eat(":")){Pt(t);return}if(t.eat("@")){Nt(t);return}if(t.match("/")&&!t.match("/*")&&!t.match("//")){t.eat("/"),Ct(t);return}let a=kt(t);if(a){let u={type:"DeclarationTag",start:n,end:t.index,declaration:a};t.append(u);return}let o=O(t);t.allowWhitespace(),t.eat("}",!0);let c={type:"ExpressionTag",start:n,end:t.index,expression:o};t.append(c)}function It(t){let{index:n,source:a}=t,o=a.indexOf("<",n),c=a.indexOf("{",n),u;if(o===-1)u=c===-1?a.length:c;else u=c===-1?o:Math.min(o,c);t.index=u;let s=a.slice(n,u),y={type:"Text",start:n,end:t.index,raw:s,data:s};t.append(y)}function ns(t){let n=t.trimEnd(),a=new Ne(n,t.length);while(a.index<a.source.length)if(a.match("<"))Tt(a);else if(a.match("{"))vt(a);else It(a);let o=a.root.fragment.nodes.findIndex((c)=>c.type==="SvelteOptions");if(o!==-1){let[c]=a.root.fragment.nodes.splice(o,1);a.root.options=gt(c)}return a.root}export{se as na,ns as oa};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as d}from"./chunk-
|
|
1
|
+
import{t as d}from"./chunk-0204rbr9.js";import{E as a,F as b,G as c}from"./chunk-py1s51tb.js";import"./chunk-d802cqsd.js";import"./chunk-nrz6c5ew.js";import"./chunk-ptdfswsv.js";export{a as PARSED_COMPONENT_TYPE_SCRIPT_METADATA,c as applyResolvedProps,d as default,b as getParsedComponentTypeScriptMetadata};
|