tem,s),r},i.parseIdentifier=function(t){var e=this.startNode(),s=this.parseIdentifierName(e.start,t);return e.name=s,e.loc.identifierName=s,this.finishNode(e,"Identifier")},i.parseIdentifierName=function(t,e){e||this.checkReservedWord(this.state.value,this.state.start,!!this.state.type.keyword,!1);var s;if(this.match(I.name))s=this.state.value;else{if(!this.state.type.keyword)throw this.unexpected();s=this.state.type.keyword}return!e&&"await"===s&&this.state.inAsync&&this.raise(t,"invalid use of await inside of an async function"),this.next(),s},i.checkReservedWord=function(t,e,s,i){this.state.strict&&(D.strict(t)||i&&D.strictBind(t))&&this.raise(e,t+" is a reserved word in strict mode"),this.state.inGenerator&&"yield"===t&&this.raise(e,"yield is a reserved word inside generator functions"),(this.isReservedWord(t)||s&&this.isKeyword(t))&&this.raise(e,t+" is a reserved word")},i.parseAwait=function(t){return this.state.inAsync||this.unexpected(),this.match(I.star)&&this.raise(t.start,"await* has been removed from the async functions proposal. Use Promise.all() instead."),t.argument=this.parseMaybeUnary(),this.finishNode(t,"AwaitExpression")},i.parseYield=function(){var t=this.startNode();return this.state.inParameters&&this.raise(t.start,"yield is not allowed in generator parameters"),this.state.maybeInArrowParameters&&!this.state.yieldInPossibleArrowParameters&&(this.state.yieldInPossibleArrowParameters=t),this.next(),this.match(I.semi)||this.canInsertSemicolon()||!this.match(I.star)&&!this.state.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(I.star),t.argument=this.parseMaybeAssign()),this.finishNode(t,"YieldExpression")},e}(function(t){function e(){return t.apply(this,arguments)||this}s(e,t);var i=e.prototype;return i.toAssignable=function(t,e,s){if(t)switch(t.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":break;case"ObjectExpression":t.type="ObjectPattern";for(var i=0;i<t.properties.length;i++){var r=t.properties[i],a=i===t.properties.length-1;this.toAssignableObjectExpressionProp(r,e,a)}break;case"ObjectProperty":this.toAssignable(t.value,e,s);break;case"SpreadElement":this.checkToRestConversion(t),t.type="RestElement";var n=t.argument;this.toAssignable(n,e,s);break;case"ArrayExpression":t.type="ArrayPattern",this.toAssignableList(t.elements,e,s);break;case"AssignmentExpression":"="===t.operator?(t.type="AssignmentPattern",delete t.operator):this.raise(t.left.end,"Only '=' operator can be used for specifying default value.");break;case"MemberExpression":if(!e)break;default:var o="Invalid left-hand side"+(s?" in "+s:"expression");this.raise(t.start,o)}return t},i.toAssignableObjectExpressionProp=function(t,e,s){if("ObjectMethod"===t.type){var i="get"===t.kind||"set"===t.kind?"Object pattern can't contain getter or setter":"Object pattern can't contain methods";this.raise(t.key.start,i)}else"SpreadElement"!==t.type||s?this.toAssignable(t,e,"object destructuring pattern"):this.raise(t.start,"The rest element has to be the last element when destructuring")},i.toAssignableList=function(t,e,s){var i=t.length;if(i){var r=t[i-1];if(r&&"RestElement"===r.type)--i;else if(r&&"SpreadElement"===r.type){r.type="RestElement";var a=r.argument;this.toAssignable(a,e,s),"Identifier"!==a.type&&"MemberExpression"!==a.type&&"ArrayPattern"!==a.type&&this.unexpected(a.start),--i}}for(var n=0;n<i;n++){var o=t[n];o&&"SpreadElement"===o.type&&this.raise(o.start,"The rest element has to be the last element when destructuring"),o&&this.toAssignable(o,e,s)}return t},i.toReferencedList=function(t){return t},i.parseSpread=function(t){var e=this.startNode();return this.next(),e.argument=this.parseMaybeAssign(!1,t),this.finishNode(e,"SpreadElement")},i.parseRest=function(){var t=this.startNode();return this.next(),t.argument=this.parseBindingAtom(),this.finishNode(t,"RestElement")},i.shouldAllowYieldIdentifier=function(){return this.match(I._yield)&&!this.state.strict&&!this.state.inGenerator},i.parseBindingIdentifier=function(){return this.parseIdentifier(this.shouldAllowYieldIdentifier())},i.parseBindingAtom=function(){switch(this.state.type){case I._yield:case I.name:return this.parseBindingIdentifier();case I.bracketL:var t=this.startNode();return this.next(),t.elements=this.parseBindingList(I.bracketR,!0),this.finishNode(t,"ArrayPattern");case I.braceL:return this.parseObj(!0);default:throw this.unexpected()}},i.parseBindingList=function(t,e,s){for(var i=[],r=!0;!this.eat(t);)if(r?r=!1:this.expect(I.comma),e&&this.match(I.comma))i.push(null);else{if(this.eat(t))break;if(this.match(I.ellipsis)){i.push(this.parseAssignableListItemTypes(this.parseRest())),this.expect(t);break}var a=[];for(this.match(I.at)&&this.hasPlugin("decorators2")&&this.raise(this.state.start,"Stage 2 decorators cannot be used to decorate parameters");this.match(I.at);)a.push(this.parseDecorator());i.push(this.parseAssignableListItem(s,a))}return i},i.parseAssignableListItem=function(t,e){var s=this.parseMaybeDefault();this.parseAssignableListItemTypes(s);var i=this.parseMaybeDefault(s.start,s.loc.start,s);return e.length&&(s.decorators=e),i},i.parseAssignableListItemTypes=function(t){return t},i.parseMaybeDefault=function(t,e,s){if(e=e||this.state.startLoc,t=t||this.state.start,s=s||this.parseBindingAtom(),!this.eat(I.eq))return s;var i=this.startNodeAt(t,e);return i.left=s,i.right=this.parseMaybeAssign(),this.finishNode(i,"AssignmentPattern")},i.checkLVal=function(t,e,s,i){switch(t.type){case"Identifier":if(this.checkReservedWord(t.name,t.start,!1,!0),s){var r=`_${t.name}`;s[r]?this.raise(t.start,"Argument name clash in strict mode"):s[r]=!0}break;case"MemberExpression":e&&this.raise(t.start,"Binding member expression");break;case"ObjectPattern":for(var a=0,n=t.properties;a<n.length;a++){var o=n[a];"ObjectProperty"===o.type&&(o=o.value),this.checkLVal(o,e,s,"object destructuring pattern")}break;case"ArrayPattern":for(var h=0,p=t.elements;h<p.length;h++){var c=p[h];c&&this.checkLVal(c,e,s,"array destructuring pattern")}break;case"AssignmentPattern":this.checkLVal(t.left,e,s,"assignment pattern");break;case"RestElement":this.checkLVal(t.argument,e,s,"rest element");break;default:var l=(e?"Binding invalid":"Invalid")+" left-hand side"+(i?" in "+i:"expression");this.raise(t.start,l)}},i.checkToRestConversion=function(t){-1===["Identifier","MemberExpression"].indexOf(t.argument.type)&&this.raise(t.argument.start,"Invalid rest operator's argument")},e}(function(t){function e(){return t.apply(this,arguments)||this}s(e,t);var i=e.prototype;return i.startNode=function(){return new st(this,this.state.start,this.state.startLoc)},i.startNodeAt=function(t,e){return new st(this,t,e)},i.startNodeAtNode=function(t){return this.startNodeAt(t.start,t.loc.start)},i.finishNode=function(t,e){return this.finishNodeAt(t,e,this.state.lastTokEnd,this.state.lastTokEndLoc)},i.finishNodeAt=function(t,e,s,i){return t.type=e,t.end=s,t.loc.end=i,this.options.ranges&&(t.range[1]=s),this.processComment(t),t},i.resetStartLocationFromNode=function(t,e){t.start=e.start,t.loc.start=e.loc.start,this.options.ranges&&(t.range[0]=e.range[0])},e}(tt))))),ht=["any","bool","boolean","empty","false","mixed","null","number","static","string","true","typeof","void"],pt={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"},ct={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:"♦"},lt=/^[\da-fA-F]+$/,ut=/^\d+$/;G.j_oTag=new W("<tag",!1),G.j_cTag=new W("</tag",!1),G.j_expr=new W("<tag>...</tag>",!0,!0),I.jsxName=new k("jsxName"),I.jsxText=new k("jsxText",{beforeExpr:!0}),I.jsxTagStart=new k("jsxTagStart",{startsExpr:!0}),I.jsxTagEnd=new k("jsxTagEnd"),I.jsxTagStart.updateContext=function(){this.state.context.push(G.j_expr),this.state.context.push(G.j_oTag),this.state.exprAllowed=!1},I.jsxTagEnd.updateContext=function(t){var e=this.state.context.pop();e===G.j_oTag&&t===I.slash||e===G.j_cTag?(this.state.context.pop(),this.state.exprAllowed=this.curContext()===G.j_expr):this.state.exprAllowed=!0};nt.estree=function(t){return function(t){function e(){return t.apply(this,arguments)||this}s(e,t);var i=e.prototype;return i.estreeParseRegExpLiteral=function(t){var e=t.pattern,s=t.flags,i=null;try{i=new RegExp(e,s)}catch(t){}var r=this.estreeParseLiteral(i);return r.regex={pattern:e,flags:s},r},i.estreeParseLiteral=function(t){return this.parseLiteral(t,"Literal")},i.directiveToStmt=function(t){var e=t.value,s=this.startNodeAt(t.start,t.loc.start),i=this.startNodeAt(e.start,e.loc.start);return i.value=e.value,i.raw=e.extra.raw,s.expression=this.finishNodeAt(i,"Literal",e.end,e.loc.end),s.directive=e.extra.raw.slice(1,-1),this.finishNodeAt(s,"ExpressionStatement",t.end,t.loc.end)},i.initFunction=function(e,s){t.prototype.initFunction.call(this,e,s),e.expression=!1},i.checkDeclaration=function(e){d(e)?this.checkDeclaration(e.value):t.prototype.checkDeclaration.call(this,e)},i.checkGetterSetterParamCount=function(t){var e="get"===t.kind?0:1;if(t.value.params.length!==e){var s=t.start;"get"===t.kind?this.raise(s,"getter should have no params"):this.raise(s,"setter should have exactly one param")}},i.checkLVal=function(e,s,i,r){var a=this;switch(e.type){case"ObjectPattern":e.properties.forEach(function(t){a.checkLVal("Property"===t.type?t.value:t,s,i,"object destructuring pattern")});break;default:t.prototype.checkLVal.call(this,e,s,i,r)}},i.checkPropClash=function(t,e){if(!t.computed&&d(t)){var s=t.key;"__proto__"===("Identifier"===s.type?s.name:String(s.value))&&(e.proto&&this.raise(s.start,"Redefinition of __proto__ property"),e.proto=!0)}},i.isStrictBody=function(t){if("BlockStatement"===t.body.type&&t.body.body.length>0)for(var e=0,s=t.body.body;e<s.length;e++){var i=s[e];if("ExpressionStatement"!==i.type||"Literal"!==i.expression.type)break;if("use strict"===i.expression.value)return!0}return!1},i.isValidDirective=function(t){return!("ExpressionStatement"!==t.type||"Literal"!==t.expression.type||"string"!=typeof t.expression.value||t.expression.extra&&t.expression.extra.parenthesized)},i.stmtToDirective=function(e){var s=t.prototype.stmtToDirective.call(this,e),i=e.expression.value;return s.value.value=i,s},i.parseBlockBody=function(e,s,i,r){var a=this;t.prototype.parseBlockBody.call(this,e,s,i,r);var n=e.directives.map(function(t){return a.directiveToStmt(t)});e.body=n.concat(e.body),delete e.directives},i.pushClassMethod=function(t,e,s,i,r){this.parseMethod(e,s,i,r,"MethodDefinition"),e.typeParameters&&(e.value.typeParameters=e.typeParameters,delete e.typeParameters),t.body.push(e)},i.parseExprAtom=function(e){switch(this.state.type){case I.regexp:return this.estreeParseRegExpLiteral(this.state.value);case I.num:case I.string:return this.estreeParseLiteral(this.state.value);case I._null:return this.estreeParseLiteral(null);case I._true:return this.estreeParseLiteral(!0);case I._false:return this.estreeParseLiteral(!1);default:return t.prototype.parseExprAtom.call(this,e)}},i.parseLiteral=function(e,s,i,r){var a=t.prototype.parseLiteral.call(this,e,s,i,r);return a.raw=a.extra.raw,delete a.extra,a},i.parseFunctionBody=function(e,s){t.prototype.parseFunctionBody.call(this,e,s),e.expression="BlockStatement"!==e.body.type},i.parseMethod=function(e,s,i,r,a){var n=this.startNode();return n.kind=e.kind,n=t.prototype.parseMethod.call(this,n,s,i,r,"FunctionExpression"),delete n.kind,e.value=n,this.finishNode(e,a)},i.parseObjectMethod=function(e,s,i,r){var a=t.prototype.parseObjectMethod.call(this,e,s,i,r);return a&&(a.type="Property","method"===a.kind&&(a.kind="init"),a.shorthand=!1),a},i.parseObjectProperty=function(e,s,i,r,a){var n=t.prototype.parseObjectProperty.call(this,e,s,i,r,a);return n&&(n.kind="init",n.type="Property"),n},i.toAssignable=function(e,s,i){return d(e)?(this.toAssignable(e.value,s,i),e):t.prototype.toAssignable.call(this,e,s,i)},i.toAssignableObjectExpressionProp=function(e,s,i){"get"===e.kind||"set"===e.kind?this.raise(e.key.start,"Object pattern can't contain getter or setter"):e.method?this.raise(e.key.start,"Object pattern can't contain methods"):t.prototype.toAssignableObjectExpressionProp.call(this,e,s,i)},e}(t)},nt.flow=function(t){return function(t){function e(){return t.apply(this,arguments)||this}s(e,t);var i=e.prototype;return i.flowParseTypeInitialiser=function(t){var e=this.state.inType;this.state.inType=!0,this.expect(t||I.colon);var s=this.flowParseType();return this.state.inType=e,s},i.flowParsePredicate=function(){var t=this.startNode(),e=this.state.startLoc,s=this.state.start;this.expect(I.modulo);var i=this.state.startLoc;return this.expectContextual("checks"),e.line===i.line&&e.column===i.column-1||this.raise(s,"Spaces between ´%´ and ´checks´ are not allowed here."),this.eat(I.parenL)?(t.value=this.parseExpression(),this.expect(I.parenR),this.finishNode(t,"DeclaredPredicate")):this.finishNode(t,"InferredPredicate")},i.flowParseTypeAndPredicateInitialiser=function(){var t=this.state.inType;this.state.inType=!0,this.expect(I.colon);var e=null,s=null;return this.match(I.modulo)?(this.state.inType=t,s=this.flowParsePredicate()):(e=this.flowParseType(),this.state.inType=t,this.match(I.modulo)&&(s=this.flowParsePredicate())),[e,s]},i.flowParseDeclareClass=function(t){return this.next(),this.flowParseInterfaceish(t,!0),this.finishNode(t,"DeclareClass")},i.flowParseDeclareFunction=function(t){this.next();var e=t.id=this.parseIdentifier(),s=this.startNode(),i=this.startNode();this.isRelational("<")?s.typeParameters=this.flowParseTypeParameterDeclaration():s.typeParameters=null,this.expect(I.parenL);var r=this.flowParseFunctionTypeParams();s.params=r.params,s.rest=r.rest,this.expect(I.parenR);var a=this.flowParseTypeAndPredicateInitialiser();return s.returnType=a[0],t.predicate=a[1],i.typeAnnotation=this.finishNode(s,"FunctionTypeAnnotation"),e.typeAnnotation=this.finishNode(i,"TypeAnnotation"),this.finishNode(e,e.type),this.semicolon(),this.finishNode(t,"DeclareFunction")},i.flowParseDeclare=function(t,e){if(this.match(I._class))return this.flowParseDeclareClass(t);if(this.match(I._function))return this.flowParseDeclareFunction(t);if(this.match(I._var))return this.flowParseDeclareVariable(t);if(this.isContextual("module"))return this.lookahead().type===I.dot?this.flowParseDeclareModuleExports(t):(e&&this.unexpected(null,"`declare module` cannot be used inside another `declare module`"),this.flowParseDeclareModule(t));if(this.isContextual("type"))return this.flowParseDeclareTypeAlias(t);if(this.isContextual("opaque"))return this.flowParseDeclareOpaqueType(t);if(this.isContextual("interface"))return this.flowParseDeclareInterface(t);if(this.match(I._export))return this.flowParseDeclareExportDeclaration(t,e);throw this.unexpected()},i.flowParseDeclareVariable=function(t){return this.next(),t.id=this.flowParseTypeAnnotatableIdentifier(!0),this.semicolon(),this.finishNode(t,"DeclareVariable")},i.flowParseDeclareModule=function(t){var e=this;this.next(),this.match(I.string)?t.id=this.parseExprAtom():t.id=this.parseIdentifier();var s=t.body=this.startNode(),i=s.body=[];for(this.expect(I.braceL);!this.match(I.braceR);){var r=this.startNode();if(this.match(I._import)){var a=this.lookahead();"type"!==a.value&&"typeof"!==a.value&&this.unexpected(null,"Imports within a `declare module` body must always be `import type` or `import typeof`"),this.next(),this.parseImport(r)}else this.expectContextual("declare","Only declares and type imports are allowed inside declare module"),r=this.flowParseDeclare(r,!0);i.push(r)}this.expect(I.braceR),this.finishNode(s,"BlockStatement");var n=null,o=!1,h="Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module";return i.forEach(function(t){f(t)?("CommonJS"===n&&e.unexpected(t.start,h),n="ES"):"DeclareModuleExports"===t.type&&(o&&e.unexpected(t.start,"Duplicate `declare module.exports` statement"),"ES"===n&&e.unexpected(t.start,h),n="CommonJS",o=!0)}),t.kind=n||"CommonJS",this.finishNode(t,"DeclareModule")},i.flowParseDeclareExportDeclaration=function(t,e){if(this.expect(I._export),this.eat(I._default))return this.match(I._function)||this.match(I._class)?t.declaration=this.flowParseDeclare(this.startNode()):(t.declaration=this.flowParseType(),this.semicolon()),t.default=!0,this.finishNode(t,"DeclareExportDeclaration");if(this.match(I._const)||this.match(I._let)||(this.isContextual("type")||this.isContextual("interface"))&&!e){var s=this.state.value,i=pt[s];this.unexpected(this.state.start,`\`declare export ${s}\` is not supported. Use \`${i}\` instead`)}if(this.match(I._var)||this.match(I._function)||this.match(I._class)||this.isContextual("opaque"))return t.declaration=this.flowParseDeclare(this.startNode()),t.default=!1,this.finishNode(t,"DeclareExportDeclaration");if(this.match(I.star)||this.match(I.braceL)||this.isContextual("interface")||this.isContextual("type")||this.isContextual("opaque"))return"ExportNamedDeclaration"===(t=this.parseExport(t)).type&&(t.type="ExportDeclaration",t.default=!1,delete t.exportKind),t.type="Declare"+t.type,t;throw this.unexpected()},i.flowParseDeclareModuleExports=function(t){return this.expectContextual("module"),this.expect(I.dot),this.expectContextual("exports"),t.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(t,"DeclareModuleExports")},i.flowParseDeclareTypeAlias=function(t){return this.next(),this.flowParseTypeAlias(t),this.finishNode(t,"DeclareTypeAlias")},i.flowParseDeclareOpaqueType=function(t){return this.next(),this.flowParseOpaqueType(t,!0),this.finishNode(t,"DeclareOpaqueType")},i.flowParseDeclareInterface=function(t){return this.next(),this.flowParseInterfaceish(t),this.finishNode(t,"DeclareInterface")},i.flowParseInterfaceish=function(t,e){if(t.id=this.flowParseRestrictedIdentifier(!e),this.isRelational("<")?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.extends=[],t.mixins=[],this.eat(I._extends))do{t.extends.push(this.flowParseInterfaceExtends())}while(!e&&this.eat(I.comma));if(this.isContextual("mixins")){this.next();do{t.mixins.push(this.flowParseInterfaceExtends())}while(this.eat(I.comma))}t.body=this.flowParseObjectType(!0,!1,!1)},i.flowParseInterfaceExtends=function(){var t=this.startNode();return t.id=this.flowParseQualifiedTypeIdentifier(),this.isRelational("<")?t.typeParameters=this.flowParseTypeParameterInstantiation():t.typeParameters=null,this.finishNode(t,"InterfaceExtends")},i.flowParseInterface=function(t){return this.flowParseInterfaceish(t),this.finishNode(t,"InterfaceDeclaration")},i.checkReservedType=function(t,e){ht.indexOf(t)>-1&&this.raise(e,`Cannot overwrite primitive type ${t}`)},i.flowParseRestrictedIdentifier=function(t){return this.checkReservedType(this.state.value,this.state.start),this.parseIdentifier(t)},i.flowParseTypeAlias=function(t){return t.id=this.flowParseRestrictedIdentifier(),this.isRelational("<")?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.right=this.flowParseTypeInitialiser(I.eq),this.semicolon(),this.finishNode(t,"TypeAlias")},i.flowParseOpaqueType=function(t,e){return this.expectContextual("type"),t.id=this.flowParseRestrictedIdentifier(!0),this.isRelational("<")?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.supertype=null,this.match(I.colon)&&(t.supertype=this.flowParseTypeInitialiser(I.colon)),t.impltype=null,e||(t.impltype=this.flowParseTypeInitialiser(I.eq)),this.semicolon(),this.finishNode(t,"OpaqueType")},i.flowParseTypeParameter=function(){var t=this.startNode(),e=this.flowParseVariance(),s=this.flowParseTypeAnnotatableIdentifier();return t.name=s.name,t.variance=e,t.bound=s.typeAnnotation,this.match(I.eq)&&(this.eat(I.eq),t.default=this.flowParseType()),this.finishNode(t,"TypeParameter")},i.flowParseTypeParameterDeclaration=function(){var t=this.state.inType,e=this.startNode();e.params=[],this.state.inType=!0,this.isRelational("<")||this.match(I.jsxTagStart)?this.next():this.unexpected();do{e.params.push(this.flowParseTypeParameter()),this.isRelational(">")||this.expect(I.comma)}while(!this.isRelational(">"));return this.expectRelational(">"),this.state.inType=t,this.finishNode(e,"TypeParameterDeclaration")},i.flowParseTypeParameterInstantiation=function(){var t=this.startNode(),e=this.state.inType;for(t.params=[],this.state.inType=!0,this.expectRelational("<");!this.isRelational(">");)t.params.push(this.flowParseType()),this.isRelational(">")||this.expect(I.comma);return this.expectRelational(">"),this.state.inType=e,this.finishNode(t,"TypeParameterInstantiation")},i.flowParseObjectPropertyKey=function(){return this.match(I.num)||this.match(I.string)?this.parseExprAtom():this.parseIdentifier(!0)},i.flowParseObjectTypeIndexer=function(t,e,s){return t.static=e,this.expect(I.bracketL),this.lookahead().type===I.colon?(t.id=this.flowParseObjectPropertyKey(),t.key=this.flowParseTypeInitialiser()):(t.id=null,t.key=this.flowParseType()),this.expect(I.bracketR),t.value=this.flowParseTypeInitialiser(),t.variance=s,this.finishNode(t,"ObjectTypeIndexer")},i.flowParseObjectTypeMethodish=function(t){for(t.params=[],t.rest=null,t.typeParameters=null,this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(I.parenL);!this.match(I.parenR)&&!this.match(I.ellipsis);)t.params.push(this.flowParseFunctionTypeParam()),this.match(I.parenR)||this.expect(I.comma);return this.eat(I.ellipsis)&&(t.rest=this.flowParseFunctionTypeParam()),this.expect(I.parenR),t.returnType=this.flowParseTypeInitialiser(),this.finishNode(t,"FunctionTypeAnnotation")},i.flowParseObjectTypeCallProperty=function(t,e){var s=this.startNode();return t.static=e,t.value=this.flowParseObjectTypeMethodish(s),this.finishNode(t,"ObjectTypeCallProperty")},i.flowParseObjectType=function(t,e,s){var i=this.state.inType;this.state.inType=!0;var r=this.startNode();r.callProperties=[],r.properties=[],r.indexers=[];var a,n;for(e&&this.match(I.braceBarL)?(this.expect(I.braceBarL),a=I.braceBarR,n=!0):(this.expect(I.braceL),a=I.braceR,n=!1),r.exact=n;!this.match(a);){var o=!1,h=this.startNode();t&&this.isContextual("static")&&this.lookahead().type!==I.colon&&(this.next(),o=!0);var p=this.flowParseVariance();if(this.match(I.bracketL))r.indexers.push(this.flowParseObjectTypeIndexer(h,o,p));else if(this.match(I.parenL)||this.isRelational("<"))p&&this.unexpected(p.start),r.callProperties.push(this.flowParseObjectTypeCallProperty(h,o));else{var c="init";if(this.isContextual("get")||this.isContextual("set")){var l=this.lookahead();l.type!==I.name&&l.type!==I.string&&l.type!==I.num||(c=this.state.value,this.next())}r.properties.push(this.flowParseObjectTypeProperty(h,o,p,c,s))}this.flowObjectTypeSemicolon()}this.expect(a);var u=this.finishNode(r,"ObjectTypeAnnotation");return this.state.inType=i,u},i.flowParseObjectTypeProperty=function(t,e,s,i,r){if(this.match(I.ellipsis))return r||this.unexpected(null,"Spread operator cannot appear in class or interface definitions"),s&&this.unexpected(s.start,"Spread properties cannot have variance"),this.expect(I.ellipsis),t.argument=this.flowParseType(),this.finishNode(t,"ObjectTypeSpreadProperty");t.key=this.flowParseObjectPropertyKey(),t.static=e,t.kind=i;var a=!1;return this.isRelational("<")||this.match(I.parenL)?(s&&this.unexpected(s.start),t.value=this.flowParseObjectTypeMethodish(this.startNodeAt(t.start,t.loc.start)),"get"!==i&&"set"!==i||this.flowCheckGetterSetterParamCount(t)):("init"!==i&&this.unexpected(),this.eat(I.question)&&(a=!0),t.value=this.flowParseTypeInitialiser(),t.variance=s),t.optional=a,this.finishNode(t,"ObjectTypeProperty")},i.flowCheckGetterSetterParamCount=function(t){var e="get"===t.kind?0:1;if(t.value.params.length!==e){var s=t.start;"get"===t.kind?this.raise(s,"getter should have no params"):this.raise(s,"setter should have exactly one param")}},i.flowObjectTypeSemicolon=function(){this.eat(I.semi)||this.eat(I.comma)||this.match(I.braceR)||this.match(I.braceBarR)||this.unexpected()},i.flowParseQualifiedTypeIdentifier=function(t,e,s){t=t||this.state.start,e=e||this.state.startLoc;for(var i=s||this.parseIdentifier();this.eat(I.dot);){var r=this.startNodeAt(t,e);r.qualification=i,r.id=this.parseIdentifier(),i=this.finishNode(r,"QualifiedTypeIdentifier")}return i},i.flowParseGenericType=function(t,e,s){var i=this.startNodeAt(t,e);return i.typeParameters=null,i.id=this.flowParseQualifiedTypeIdentifier(t,e,s),this.isRelational("<")&&(i.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(i,"GenericTypeAnnotation")},i.flowParseTypeofType=function(){var t=this.startNode();return this.expect(I._typeof),t.argument=this.flowParsePrimaryType(),this.finishNode(t,"TypeofTypeAnnotation")},i.flowParseTupleType=function(){var t=this.startNode();for(t.types=[],this.expect(I.bracketL);this.state.pos<this.input.length&&!this.match(I.bracketR)&&(t.types.push(this.flowParseType()),!this.match(I.bracketR));)this.expect(I.comma);return this.expect(I.bracketR),this.finishNode(t,"TupleTypeAnnotation")},i.flowParseFunctionTypeParam=function(){var t=null,e=!1,s=null,i=this.startNode(),r=this.lookahead();return r.type===I.colon||r.type===I.question?(t=this.parseIdentifier(),this.eat(I.question)&&(e=!0),s=this.flowParseTypeInitialiser()):s=this.flowParseType(),i.name=t,i.optional=e,i.typeAnnotation=s,this.finishNode(i,"FunctionTypeParam")},i.reinterpretTypeAsFunctionTypeParam=function(t){var e=this.startNodeAt(t.start,t.loc.start);return e.name=null,e.optional=!1,e.typeAnnotation=t,this.finishNode(e,"FunctionTypeParam")},i.flowParseFunctionTypeParams=function(t){void 0===t&&(t=[]);for(var e=null;!this.match(I.parenR)&&!this.match(I.ellipsis);)t.push(this.flowParseFunctionTypeParam()),this.match(I.parenR)||this.expect(I.comma);return this.eat(I.ellipsis)&&(e=this.flowParseFunctionTypeParam()),{params:t,rest:e}},i.flowIdentToTypeAnnotation=function(t,e,s,i){switch(i.name){case"any":return this.finishNode(s,"AnyTypeAnnotation");case"void":return this.finishNode(s,"VoidTypeAnnotation");case"bool":case"boolean":return this.finishNode(s,"BooleanTypeAnnotation");case"mixed":return this.finishNode(s,"MixedTypeAnnotation");case"empty":return this.finishNode(s,"EmptyTypeAnnotation");case"number":return this.finishNode(s,"NumberTypeAnnotation");case"string":return this.finishNode(s,"StringTypeAnnotation");default:return this.flowParseGenericType(t,e,i)}},i.flowParsePrimaryType=function(){var t,e,s=this.state.start,i=this.state.startLoc,r=this.startNode(),a=!1,n=this.state.noAnonFunctionType;switch(this.state.type){case I.name:return this.flowIdentToTypeAnnotation(s,i,r,this.parseIdentifier());case I.braceL:return this.flowParseObjectType(!1,!1,!0);case I.braceBarL:return this.flowParseObjectType(!1,!0,!0);case I.bracketL:return this.flowParseTupleType();case I.relational:if("<"===this.state.value)return r.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(I.parenL),t=this.flowParseFunctionTypeParams(),r.params=t.params,r.rest=t.rest,this.expect(I.parenR),this.expect(I.arrow),r.returnType=this.flowParseType(),this.finishNode(r,"FunctionTypeAnnotation");break;case I.parenL:if(this.next(),!this.match(I.parenR)&&!this.match(I.ellipsis))if(this.match(I.name)){var o=this.lookahead().type;a=o!==I.question&&o!==I.colon}else a=!0;if(a){if(this.state.noAnonFunctionType=!1,e=this.flowParseType(),this.state.noAnonFunctionType=n,this.state.noAnonFunctionType||!(this.match(I.comma)||this.match(I.parenR)&&this.lookahead().type===I.arrow))return this.expect(I.parenR),e;this.eat(I.comma)}return t=e?this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(e)]):this.flowParseFunctionTypeParams(),r.params=t.params,r.rest=t.rest,this.expect(I.parenR),this.expect(I.arrow),r.returnType=this.flowParseType(),r.typeParameters=null,this.finishNode(r,"FunctionTypeAnnotation");case I.string:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case I._true:case I._false:return r.value=this.match(I._true),this.next(),this.finishNode(r,"BooleanLiteralTypeAnnotation");case I.plusMin:if("-"===this.state.value)return this.next(),this.match(I.num)||this.unexpected(null,`Unexpected token, expected "number"`),this.parseLiteral(-this.state.value,"NumberLiteralTypeAnnotation",r.start,r.loc.start);this.unexpected();case I.num:return this.parseLiteral(this.state.value,"NumberLiteralTypeAnnotation");case I._null:return this.next(),this.finishNode(r,"NullLiteralTypeAnnotation");case I._this:return this.next(),this.finishNode(r,"ThisTypeAnnotation");case I.star:return this.next(),this.finishNode(r,"ExistsTypeAnnotation");default:if("typeof"===this.state.type.keyword)return this.flowParseTypeofType()}throw this.unexpected()},i.flowParsePostfixType=function(){for(var t=this.state.start,e=this.state.startLoc,s=this.flowParsePrimaryType();!this.canInsertSemicolon()&&this.match(I.bracketL);){var i=this.startNodeAt(t,e);i.elementType=s,this.expect(I.bracketL),this.expect(I.bracketR),s=this.finishNode(i,"ArrayTypeAnnotation")}return s},i.flowParsePrefixType=function(){var t=this.startNode();return this.eat(I.question)?(t.typeAnnotation=this.flowParsePrefixType(),this.finishNode(t,"NullableTypeAnnotation")):this.flowParsePostfixType()},i.flowParseAnonFunctionWithoutParens=function(){var t=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(I.arrow)){var e=this.startNodeAt(t.start,t.loc.start);return e.params=[this.reinterpretTypeAsFunctionTypeParam(t)],e.rest=null,e.returnType=this.flowParseType(),e.typeParameters=null,this.finishNode(e,"FunctionTypeAnnotation")}return t},i.flowParseIntersectionType=function(){var t=this.startNode();this.eat(I.bitwiseAND);var e=this.flowParseAnonFunctionWithoutParens();for(t.types=[e];this.eat(I.bitwiseAND);)t.types.push(this.flowParseAnonFunctionWithoutParens());return 1===t.types.length?e:this.finishNode(t,"IntersectionTypeAnnotation")},i.flowParseUnionType=function(){var t=this.startNode();this.eat(I.bitwiseOR);var e=this.flowParseIntersectionType();for(t.types=[e];this.eat(I.bitwiseOR);)t.types.push(this.flowParseIntersectionType());return 1===t.types.length?e:this.finishNode(t,"UnionTypeAnnotation")},i.flowParseType=function(){var t=this.state.inType;this.state.inType=!0;var e=this.flowParseUnionType();return this.state.inType=t,this.state.exprAllowed=this.state.exprAllowed||this.state.noAnonFunctionType,e},i.flowParseTypeAnnotation=function(){var t=this.startNode();return t.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(t,"TypeAnnotation")},i.flowParseTypeAnnotatableIdentifier=function(t){var e=t?this.parseIdentifier():this.flowParseRestrictedIdentifier();return this.match(I.colon)&&(e.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(e,e.type)),e},i.typeCastToParameter=function(t){return t.expression.typeAnnotation=t.typeAnnotation,this.finishNodeAt(t.expression,t.expression.type,t.typeAnnotation.end,t.typeAnnotation.loc.end)},i.flowParseVariance=function(){var t=null;return this.match(I.plusMin)&&(t=this.startNode(),"+"===this.state.value?t.kind="plus":t.kind="minus",this.next(),this.finishNode(t,"Variance")),t},i.parseFunctionBody=function(e,s){var i=this;return s?this.forwardNoArrowParamsConversionAt(e,function(){return t.prototype.parseFunctionBody.call(i,e,!0)}):t.prototype.parseFunctionBody.call(this,e,!1)},i.parseFunctionBodyAndFinish=function(e,s,i){if(!i&&this.match(I.colon)){var r=this.startNode(),a=this.flowParseTypeAndPredicateInitialiser();r.typeAnnotation=a[0],e.predicate=a[1],e.returnType=r.typeAnnotation?this.finishNode(r,"TypeAnnotation"):null}t.prototype.parseFunctionBodyAndFinish.call(this,e,s,i)},i.parseStatement=function(e,s){if(this.state.strict&&this.match(I.name)&&"interface"===this.state.value){var i=this.startNode();return this.next(),this.flowParseInterface(i)}return t.prototype.parseStatement.call(this,e,s)},i.parseExpressionStatement=function(e,s){if("Identifier"===s.type)if("declare"===s.name){if(this.match(I._class)||this.match(I.name)||this.match(I._function)||this.match(I._var)||this.match(I._export))return this.flowParseDeclare(e)}else if(this.match(I.name)){if("interface"===s.name)return this.flowParseInterface(e);if("type"===s.name)return this.flowParseTypeAlias(e);if("opaque"===s.name)return this.flowParseOpaqueType(e,!1)}return t.prototype.parseExpressionStatement.call(this,e,s)},i.shouldParseExportDeclaration=function(){return this.isContextual("type")||this.isContextual("interface")||this.isContextual("opaque")||t.prototype.shouldParseExportDeclaration.call(this)},i.isExportDefaultSpecifier=function(){return(!this.match(I.name)||"type"!==this.state.value&&"interface"!==this.state.value&&"opaque"!=this.state.value)&&t.prototype.isExportDefaultSpecifier.call(this)},i.parseConditional=function(e,s,i,r,a){var n=this;if(!this.match(I.question))return e;if(a){var o=this.state.clone();try{return t.prototype.parseConditional.call(this,e,s,i,r)}catch(t){if(t instanceof SyntaxError)return this.state=o,a.start=t.pos||this.state.start,e;throw t}}this.expect(I.question);var h=this.state.clone(),p=this.state.noArrowAt,c=this.startNodeAt(i,r),l=this.tryParseConditionalConsequent(),u=l.consequent,d=l.failed,f=this.getArrowLikeExpressions(u),m=f[0],y=f[1];if(d||y.length>0){var x=p.concat();if(y.length>0){this.state=h,this.state.noArrowAt=x;for(var P=0;P<y.length;P++)x.push(y[P].start);var v=this.tryParseConditionalConsequent();u=v.consequent,d=v.failed;var g=this.getArrowLikeExpressions(u);m=g[0],y=g[1]}if(d&&m.length>1&&this.raise(h.start,"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate."),d&&1===m.length){this.state=h,this.state.noArrowAt=x.concat(m[0].start);var b=this.tryParseConditionalConsequent();u=b.consequent,d=b.failed}this.getArrowLikeExpressions(u,!0)}return this.state.noArrowAt=p,this.expect(I.colon),c.test=e,c.consequent=u,c.alternate=this.forwardNoArrowParamsConversionAt(c,function(){return n.parseMaybeAssign(s,void 0,void 0,void 0)}),this.finishNode(c,"ConditionalExpression")},i.tryParseConditionalConsequent=function(){this.state.noArrowParamsConversionAt.push(this.state.start);var t=this.parseMaybeAssign(),e=!this.match(I.colon);return this.state.noArrowParamsConversionAt.pop(),{consequent:t,failed:e}},i.getArrowLikeExpressions=function(e,s){for(var i=this,r=[e],a=[];0!==r.length;){var n=r.pop();"ArrowFunctionExpression"===n.type?(n.typeParameters||!n.returnType?(this.toAssignableList(n.params,!0,"arrow function parameters"),t.prototype.checkFunctionNameAndParams.call(this,n,!0)):a.push(n),r.push(n.body)):"ConditionalExpression"===n.type&&(r.push(n.consequent),r.push(n.alternate))}if(s){for(var o=0;o<a.length;o++)this.toAssignableList(e.params,!0,"arrow function parameters");return[a,[]]}return x(a,function(t){try{return i.toAssignableList(t.params,!0,"arrow function parameters"),!0}catch(t){return!1}})},i.forwardNoArrowParamsConversionAt=function(t,e){var s;return-1!==this.state.noArrowParamsConversionAt.indexOf(t.start)?(this.state.noArrowParamsConversionAt.push(this.state.start),s=e(),this.state.noArrowParamsConversionAt.pop()):s=e(),s},i.parseParenItem=function(e,s,i){if(e=t.prototype.parseParenItem.call(this,e,s,i),this.eat(I.question)&&(e.optional=!0),this.match(I.colon)){var r=this.startNodeAt(s,i);return r.expression=e,r.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(r,"TypeCastExpression")}return e},i.assertModuleNodeAllowed=function(e){"ImportDeclaration"===e.type&&("type"===e.importKind||"typeof"===e.importKind)||"ExportNamedDeclaration"===e.type&&"type"===e.exportKind||"ExportAllDeclaration"===e.type&&"type"===e.exportKind||t.prototype.assertModuleNodeAllowed.call(this,e)},i.parseExport=function(e){return"ExportNamedDeclaration"!==(e=t.prototype.parseExport.call(this,e)).type&&"ExportAllDeclaration"!==e.type||(e.exportKind=e.exportKind||"value"),e},i.parseExportDeclaration=function(e){if(this.isContextual("type")){e.exportKind="type";var s=this.startNode();return this.next(),this.match(I.braceL)?(e.specifiers=this.parseExportSpecifiers(),this.parseExportFrom(e),null):this.flowParseTypeAlias(s)}if(this.isContextual("opaque")){e.exportKind="type";var i=this.startNode();return this.next(),this.flowParseOpaqueType(i,!1)}if(this.isContextual("interface")){e.exportKind="type";var r=this.startNode();return this.next(),this.flowParseInterface(r)}return t.prototype.parseExportDeclaration.call(this,e)},i.shouldParseExportStar=function(){return t.prototype.shouldParseExportStar.call(this)||this.isContextual("type")&&this.lookahead().type===I.star},i.parseExportStar=function(e){return this.eatContextual("type")&&(e.exportKind="type"),t.prototype.parseExportStar.call(this,e)},i.parseExportNamespace=function(e){return"type"===e.exportKind&&this.unexpected(),t.prototype.parseExportNamespace.call(this,e)},i.parseClassId=function(e,s,i){t.prototype.parseClassId.call(this,e,s,i),this.isRelational("<")&&(e.typeParameters=this.flowParseTypeParameterDeclaration())},i.isKeyword=function(e){return(!this.state.inType||"void"!==e)&&t.prototype.isKeyword.call(this,e)},i.readToken=function(e){return!this.state.inType||62!==e&&60!==e?t.prototype.readToken.call(this,e):this.finishOp(I.relational,1)},i.toAssignable=function(e,s,i){return"TypeCastExpression"===e.type?t.prototype.toAssignable.call(this,this.typeCastToParameter(e),s,i):t.prototype.toAssignable.call(this,e,s,i)},i.toAssignableList=function(e,s,i){for(var r=0;r<e.length;r++){var a=e[r];a&&"TypeCastExpression"===a.type&&(e[r]=this.typeCastToParameter(a))}return t.prototype.toAssignableList.call(this,e,s,i)},i.toReferencedList=function(t){for(var e=0;e<t.length;e++){var s=t[e];s&&s._exprListItem&&"TypeCastExpression"===s.type&&this.raise(s.start,"Unexpected type cast")}return t},i.parseExprListItem=function(e,s,i){var r=this.startNode(),a=t.prototype.parseExprListItem.call(this,e,s,i);return this.match(I.colon)?(r._exprListItem=!0,r.expression=a,r.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(r,"TypeCastExpression")):a},i.checkLVal=function(e,s,i,r){if("TypeCastExpression"!==e.type)return t.prototype.checkLVal.call(this,e,s,i,r)},i.parseClassProperty=function(e){return this.match(I.colon)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),t.prototype.parseClassProperty.call(this,e)},i.isClassMethod=function(){return this.isRelational("<")||t.prototype.isClassMethod.call(this)},i.isClassProperty=function(){return this.match(I.colon)||t.prototype.isClassProperty.call(this)},i.isNonstaticConstructor=function(e){return!this.match(I.colon)&&t.prototype.isNonstaticConstructor.call(this,e)},i.pushClassMethod=function(e,s,i,r,a){s.variance&&this.unexpected(s.variance.start),delete s.variance,this.isRelational("<")&&(s.typeParameters=this.flowParseTypeParameterDeclaration()),t.prototype.pushClassMethod.call(this,e,s,i,r,a)},i.pushClassPrivateMethod=function(e,s,i,r){s.variance&&this.unexpected(s.variance.start),delete s.variance,this.isRelational("<")&&(s.typeParameters=this.flowParseTypeParameterDeclaration()),t.prototype.pushClassPrivateMethod.call(this,e,s,i,r)},i.parseClassSuper=function(e){if(t.prototype.parseClassSuper.call(this,e),e.superClass&&this.isRelational("<")&&(e.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual("implements")){this.next();var s=e.implements=[];do{var i=this.startNode();i.id=this.flowParseRestrictedIdentifier(!0),this.isRelational("<")?i.typeParameters=this.flowParseTypeParameterInstantiation():i.typeParameters=null,s.push(this.finishNode(i,"ClassImplements"))}while(this.eat(I.comma))}},i.parsePropertyName=function(e){var s=this.flowParseVariance(),i=t.prototype.parsePropertyName.call(this,e);return e.variance=s,i},i.parseObjPropValue=function(e,s,i,r,a,n,o){e.variance&&this.unexpected(e.variance.start),delete e.variance;var h;this.isRelational("<")&&(h=this.flowParseTypeParameterDeclaration(),this.match(I.parenL)||this.unexpected()),t.prototype.parseObjPropValue.call(this,e,s,i,r,a,n,o),h&&((e.value||e).typeParameters=h)},i.parseAssignableListItemTypes=function(t){if(this.eat(I.question)){if("Identifier"!==t.type)throw this.raise(t.start,"A binding pattern parameter cannot be optional in an implementation signature.");t.optional=!0}return this.match(I.colon)&&(t.typeAnnotation=this.flowParseTypeAnnotation()),this.finishNode(t,t.type),t},i.parseMaybeDefault=function(e,s,i){var r=t.prototype.parseMaybeDefault.call(this,e,s,i);return"AssignmentPattern"===r.type&&r.typeAnnotation&&r.right.start<r.typeAnnotation.start&&this.raise(r.typeAnnotation.start,"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`"),r},i.shouldParseDefaultImport=function(e){return m(e)?y(this.state):t.prototype.shouldParseDefaultImport.call(this,e)},i.parseImportSpecifierLocal=function(t,e,s,i){e.local=m(t)?this.flowParseRestrictedIdentifier(!0):this.parseIdentifier(),this.checkLVal(e.local,!0,void 0,i),t.specifiers.push(this.finishNode(e,s))},i.parseImportSpecifiers=function(e){e.importKind="value";var s=null;if(this.match(I._typeof)?s="typeof":this.isContextual("type")&&(s="type"),s){var i=this.lookahead();(y(i)||i.type===I.braceL||i.type===I.star)&&(this.next(),e.importKind=s)}t.prototype.parseImportSpecifiers.call(this,e)},i.parseImportSpecifier=function(t){var e=this.startNode(),s=this.state.start,i=this.parseIdentifier(!0),r=null;"type"===i.name?r="type":"typeof"===i.name&&(r="typeof");var a=!1;if(this.isContextual("as")&&!this.isLookaheadContextual("as")){var n=this.parseIdentifier(!0);null===r||this.match(I.name)||this.state.type.keyword?(e.imported=i,e.importKind=null,e.local=this.parseIdentifier()):(e.imported=n,e.importKind=r,e.local=n.__clone())}else null!==r&&(this.match(I.name)||this.state.type.keyword)?(e.imported=this.parseIdentifier(!0),e.importKind=r,this.eatContextual("as")?e.local=this.parseIdentifier():(a=!0,e.local=e.imported.__clone())):(a=!0,e.imported=i,e.importKind=null,e.local=e.imported.__clone());var o=m(t),h=m(e);o&&h&&this.raise(s,"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements"),(o||h)&&this.checkReservedType(e.local.name,e.local.start),!a||o||h||this.checkReservedWord(e.local.name,e.start,!0,!0),this.checkLVal(e.local,!0,void 0,"import specifier"),t.specifiers.push(this.finishNode(e,"ImportSpecifier"))},i.parseFunctionParams=function(e){var s=e.kind;"get"!==s&&"set"!==s&&this.isRelational("<")&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),t.prototype.parseFunctionParams.call(this,e)},i.parseVarHead=function(e){t.prototype.parseVarHead.call(this,e),this.match(I.colon)&&(e.id.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(e.id,e.id.type))},i.parseAsyncArrowFromCallExpression=function(e,s){if(this.match(I.colon)){var i=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,e.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=i}return t.prototype.parseAsyncArrowFromCallExpression.call(this,e,s)},i.shouldParseAsyncArrow=function(){return this.match(I.colon)||t.prototype.shouldParseAsyncArrow.call(this)},i.parseMaybeAssign=function(e,s,i,r){var a=this,n=null;if(I.jsxTagStart&&this.match(I.jsxTagStart)){var o=this.state.clone();try{return t.prototype.parseMaybeAssign.call(this,e,s,i,r)}catch(t){if(!(t instanceof SyntaxError))throw t;this.state=o,this.state.context.length-=2,n=t}}if(null!=n||this.isRelational("<")){var h,p;try{p=this.flowParseTypeParameterDeclaration(),(h=this.forwardNoArrowParamsConversionAt(p,function(){return t.prototype.parseMaybeAssign.call(a,e,s,i,r)})).typeParameters=p,this.resetStartLocationFromNode(h,p)}catch(t){throw n||t}if("ArrowFunctionExpression"===h.type)return h;if(null!=n)throw n;this.raise(p.start,"Expected an arrow function after this type parameter declaration")}return t.prototype.parseMaybeAssign.call(this,e,s,i,r)},i.parseArrow=function(e){if(this.match(I.colon)){var s=this.state.clone();try{var i=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;var r=this.startNode(),a=this.flowParseTypeAndPredicateInitialiser();r.typeAnnotation=a[0],e.predicate=a[1],this.state.noAnonFunctionType=i,this.canInsertSemicolon()&&this.unexpected(),this.match(I.arrow)||this.unexpected(),e.returnType=r.typeAnnotation?this.finishNode(r,"TypeAnnotation"):null}catch(t){if(!(t instanceof SyntaxError))throw t;this.state=s}}return t.prototype.parseArrow.call(this,e)},i.shouldParseArrow=function(){return this.match(I.colon)||t.prototype.shouldParseArrow.call(this)},i.setArrowFunctionParameters=function(e,s){-1!==this.state.noArrowParamsConversionAt.indexOf(e.start)?e.params=s:t.prototype.setArrowFunctionParameters.call(this,e,s)},i.checkFunctionNameAndParams=function(e,s){if(!s||-1===this.state.noArrowParamsConversionAt.indexOf(e.start))return t.prototype.checkFunctionNameAndParams.call(this,e,s)},i.parseParenAndDistinguishExpression=function(e){return t.prototype.parseParenAndDistinguishExpression.call(this,e&&-1===this.state.noArrowAt.indexOf(this.state.start))},i.parseSubscripts=function(e,s,i,r){if("Identifier"===e.type&&"async"===e.name&&-1!==this.state.noArrowAt.indexOf(s)){this.next();var a=this.startNodeAt(s,i);a.callee=e,a.arguments=this.parseCallExpressionArguments(I.parenR,!1),e=this.finishNode(a,"CallExpression")}else if("Identifier"===e.type&&"async"===e.name&&this.isRelational("<")){var n,o=this.state.clone();try{var h=this.parseAsyncArrowWithTypeParameters(s,i);if(h)return h}catch(t){n=t}this.state=o;try{return t.prototype.parseSubscripts.call(this,e,s,i,r)}catch(t){throw n||t}}return t.prototype.parseSubscripts.call(this,e,s,i,r)},i.parseAsyncArrowWithTypeParameters=function(t,e){var s=this.startNodeAt(t,e);if(this.parseFunctionParams(s),this.parseArrow(s))return this.parseArrowExpression(s,void 0,!0)},e}(t)},nt.jsx=function(t){return function(t){function e(){return t.apply(this,arguments)||this}s(e,t);var i=e.prototype;return i.jsxReadToken=function(){for(var t="",e=this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated JSX contents");var s=this.input.charCodeAt(this.state.pos);switch(s){case 60:case 123:return this.state.pos===this.state.start?60===s&&this.state.exprAllowed?(++this.state.pos,this.finishToken(I.jsxTagStart)):this.getTokenFromCode(s):(t+=this.input.slice(e,this.state.pos),this.finishToken(I.jsxText,t));case 38:t+=this.input.slice(e,this.state.pos),t+=this.jsxReadEntity(),e=this.state.pos;break;default:h(s)?(t+=this.input.slice(e,this.state.pos),t+=this.jsxReadNewLine(!0),e=this.state.pos):++this.state.pos}}},i.jsxReadNewLine=function(t){var e,s=this.input.charCodeAt(this.state.pos);return++this.state.pos,13===s&&10===this.input.charCodeAt(this.state.pos)?(++this.state.pos,e=t?"\n":"\r\n"):e=String.fromCharCode(s),++this.state.curLine,this.state.lineStart=this.state.pos,e},i.jsxReadString=function(t){for(var e="",s=++this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated string constant");var i=this.input.charCodeAt(this.state.pos);if(i===t)break;38===i?(e+=this.input.slice(s,this.state.pos),e+=this.jsxReadEntity(),s=this.state.pos):h(i)?(e+=this.input.slice(s,this.state.pos),e+=this.jsxReadNewLine(!1),s=this.state.pos):++this.state.pos}return e+=this.input.slice(s,this.state.pos++),this.finishToken(I.string,e)},i.jsxReadEntity=function(){for(var t,e="",s=0,i=this.input[this.state.pos],r=++this.state.pos;this.state.pos<this.input.length&&s++<10;){if(";"===(i=this.input[this.state.pos++])){"#"===e[0]?"x"===e[1]?(e=e.substr(2),lt.test(e)&&(t=String.fromCodePoint(parseInt(e,16)))):(e=e.substr(1),ut.test(e)&&(t=String.fromCodePoint(parseInt(e,10)))):t=ct[e];break}e+=i}return t||(this.state.pos=r,"&")},i.jsxReadWord=function(){var t,e=this.state.pos;do{t=this.input.charCodeAt(++this.state.pos)}while(o(t)||45===t);return this.finishToken(I.jsxName,this.input.slice(e,this.state.pos))},i.jsxParseIdentifier=function(){var t=this.startNode();return this.match(I.jsxName)?t.name=this.state.value:this.state.type.keyword?t.name=this.state.type.keyword:this.unexpected(),this.next(),this.finishNode(t,"JSXIdentifier")},i.jsxParseNamespacedName=function(){var t=this.state.start,e=this.state.startLoc,s=this.jsxParseIdentifier();if(!this.eat(I.colon))return s;var i=this.startNodeAt(t,e);return i.namespace=s,i.name=this.jsxParseIdentifier(),this.finishNode(i,"JSXNamespacedName")},i.jsxParseElementName=function(){for(var t=this.state.start,e=this.state.startLoc,s=this.jsxParseNamespacedName();this.eat(I.dot);){var i=this.startNodeAt(t,e);i.object=s,i.property=this.jsxParseIdentifier(),s=this.finishNode(i,"JSXMemberExpression")}return s},i.jsxParseAttributeValue=function(){var t;switch(this.state.type){case I.braceL:if("JSXEmptyExpression"===(t=this.jsxParseExpressionContainer()).expression.type)throw this.raise(t.start,"JSX attributes must only be assigned a non-empty expression");return t;case I.jsxTagStart:case I.string:return this.parseExprAtom();default:throw this.raise(this.state.start,"JSX value should be either an expression or a quoted JSX text")}},i.jsxParseEmptyExpression=function(){var t=this.startNodeAt(this.state.lastTokEnd,this.state.lastTokEndLoc);return this.finishNodeAt(t,"JSXEmptyExpression",this.state.start,this.state.startLoc)},i.jsxParseSpreadChild=function(){var t=this.startNode();return this.expect(I.braceL),this.expect(I.ellipsis),t.expression=this.parseExpression(),this.expect(I.braceR),this.finishNode(t,"JSXSpreadChild")},i.jsxParseExpressionContainer=function(){var t=this.startNode();return this.next(),this.match(I.braceR)?t.expression=this.jsxParseEmptyExpression():t.expression=this.parseExpression(),this.expect(I.braceR),this.finishNode(t,"JSXExpressionContainer")},i.jsxParseAttribute=function(){var t=this.startNode();return this.eat(I.braceL)?(this.expect(I.ellipsis),t.argument=this.parseMaybeAssign(),this.expect(I.braceR),this.finishNode(t,"JSXSpreadAttribute")):(t.name=this.jsxParseNamespacedName(),t.value=this.eat(I.eq)?this.jsxParseAttributeValue():null,this.finishNode(t,"JSXAttribute"))},i.jsxParseOpeningElementAt=function(t,e){var s=this.startNodeAt(t,e);if(this.match(I.jsxTagEnd))return this.expect(I.jsxTagEnd),this.finishNode(s,"JSXOpeningFragment");for(s.attributes=[],s.name=this.jsxParseElementName();!this.match(I.slash)&&!this.match(I.jsxTagEnd);)s.attributes.push(this.jsxParseAttribute());return s.selfClosing=this.eat(I.slash),this.expect(I.jsxTagEnd),this.finishNode(s,"JSXOpeningElement")},i.jsxParseClosingElementAt=function(t,e){var s=this.startNodeAt(t,e);return this.match(I.jsxTagEnd)?(this.expect(I.jsxTagEnd),this.finishNode(s,"JSXClosingFragment")):(s.name=this.jsxParseElementName(),this.expect(I.jsxTagEnd),this.finishNode(s,"JSXClosingElement"))},i.jsxParseElementAt=function(t,e){var s=this.startNodeAt(t,e),i=[],r=this.jsxParseOpeningElementAt(t,e),a=null;if(!r.selfClosing){t:for(;;)switch(this.state.type){case I.jsxTagStart:if(t=this.state.start,e=this.state.startLoc,this.next(),this.eat(I.slash)){a=this.jsxParseClosingElementAt(t,e);break t}i.push(this.jsxParseElementAt(t,e));break;case I.jsxText:i.push(this.parseExprAtom());break;case I.braceL:this.lookahead().type===I.ellipsis?i.push(this.jsxParseSpreadChild()):i.push(this.jsxParseExpressionContainer());break;default:throw this.unexpected()}P(r)&&!P(a)?this.raise(a.start,"Expected corresponding JSX closing tag for <>"):!P(r)&&P(a)?this.raise(a.start,"Expected corresponding JSX closing tag for <"+v(r.name)+">"):P(r)||P(a)||v(a.name)!==v(r.name)&&this.raise(a.start,"Expected corresponding JSX closing tag for <"+v(r.name)+">")}return P(r)?(s.openingFragment=r,s.closingFragment=a):(s.openingElement=r,s.closingElement=a),s.children=i,this.match(I.relational)&&"<"===this.state.value&&this.raise(this.state.start,"Adjacent JSX elements must be wrapped in an enclosing tag"),P(r)?this.finishNode(s,"JSXFragment"):this.finishNode(s,"JSXElement")},i.jsxParseElement=function(){var t=this.state.start,e=this.state.startLoc;return this.next(),this.jsxParseElementAt(t,e)},i.parseExprAtom=function(e){return this.match(I.jsxText)?this.parseLiteral(this.state.value,"JSXText"):this.match(I.jsxTagStart)?this.jsxParseElement():t.prototype.parseExprAtom.call(this,e)},i.readToken=function(e){if(this.state.inPropertyName)return t.prototype.readToken.call(this,e);var s=this.curContext();if(s===G.j_expr)return this.jsxReadToken();if(s===G.j_oTag||s===G.j_cTag){if(n(e))return this.jsxReadWord();if(62===e)return++this.state.pos,this.finishToken(I.jsxTagEnd);if((34===e||39===e)&&s===G.j_oTag)return this.jsxReadString(e)}return 60===e&&this.state.exprAllowed?(++this.state.pos,this.finishToken(I.jsxTagStart)):t.prototype.readToken.call(this,e)},i.updateContext=function(e){if(this.match(I.braceL)){var s=this.curContext();s===G.j_oTag?this.state.context.push(G.braceExpression):s===G.j_expr?this.state.context.push(G.templateQuasi):t.prototype.updateContext.call(this,e),this.state.exprAllowed=!0}else{if(!this.match(I.slash)||e!==I.jsxTagStart)return t.prototype.updateContext.call(this,e);this.state.context.length-=2,this.state.context.push(G.j_cTag),this.state.exprAllowed=!1}},e}(t)},nt.typescript=function(t){return function(t){function e(){return t.apply(this,arguments)||this}s(e,t);var i=e.prototype;return i.tsIsIdentifier=function(){return this.match(I.name)},i.tsNextTokenCanFollowModifier=function(){return this.next(),!(this.hasPrecedingLineBreak()||this.match(I.parenL)||this.match(I.colon)||this.match(I.eq)||this.match(I.question))},i.tsParseModifier=function(t){if(this.match(I.name)){var e=this.state.value;return-1!==t.indexOf(e)&&this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this))?e:void 0}},i.tsIsListTerminator=function(t){switch(t){case"EnumMembers":case"TypeMembers":return this.match(I.braceR);case"HeritageClauseElement":return this.match(I.braceL);case"TupleElementTypes":return this.match(I.bracketR);case"TypeParametersOrArguments":return this.isRelational(">")}throw new Error("Unreachable")},i.tsParseList=function(t,e){for(var s=[];!this.tsIsListTerminator(t);)s.push(e());return s},i.tsParseDelimitedList=function(t,e){return g(this.tsParseDelimitedListWorker(t,e,!0))},i.tsTryParseDelimitedList=function(t,e){return this.tsParseDelimitedListWorker(t,e,!1)},i.tsParseDelimitedListWorker=function(t,e,s){for(var i=[];!this.tsIsListTerminator(t);){var r=e();if(null==r)return;if(i.push(r),!this.eat(I.comma)){if(this.tsIsListTerminator(t))break;return void(s&&this.expect(I.comma))}}return i},i.tsParseBracketedList=function(t,e,s,i){i||(s?this.expect(I.bracketL):this.expectRelational("<"));var r=this.tsParseDelimitedList(t,e);return s?this.expect(I.bracketR):this.expectRelational(">"),r},i.tsParseEntityName=function(t){for(var e=this.parseIdentifier();this.eat(I.dot);){var s=this.startNodeAtNode(e);s.left=e,s.right=this.parseIdentifier(t),e=this.finishNode(s,"TSQualifiedName")}return e},i.tsParseTypeReference=function(){var t=this.startNode();return t.typeName=this.tsParseEntityName(!1),!this.hasPrecedingLineBreak()&&this.isRelational("<")&&(t.typeParameters=this.tsParseTypeArguments()),this.finishNode(t,"TSTypeReference")},i.tsParseThisTypePredicate=function(t){this.next();var e=this.startNode();return e.parameterName=t,e.typeAnnotation=this.tsParseTypeAnnotation(!1),this.finishNode(e,"TSTypePredicate")},i.tsParseThisTypeNode=function(){var t=this.startNode();return this.next(),this.finishNode(t,"TSThisType")},i.tsParseTypeQuery=function(){var t=this.startNode();return this.expect(I._typeof),t.exprName=this.tsParseEntityName(!0),this.finishNode(t,"TSTypeQuery")},i.tsParseTypeParameter=function(){var t=this.startNode();return t.name=this.parseIdentifierName(t.start),this.eat(I._extends)&&(t.constraint=this.tsParseType()),this.eat(I.eq)&&(t.default=this.tsParseType()),this.finishNode(t,"TSTypeParameter")},i.tsTryParseTypeParameters=function(){if(this.isRelational("<"))return this.tsParseTypeParameters()},i.tsParseTypeParameters=function(){var t=this.startNode();return this.isRelational("<")||this.match(I.jsxTagStart)?this.next():this.unexpected(),t.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this),!1,!0),this.finishNode(t,"TSTypeParameterDeclaration")},i.tsFillSignature=function(t,e){var s=t===I.arrow;e.typeParameters=this.tsTryParseTypeParameters(),this.expect(I.parenL),e.parameters=this.tsParseBindingListForSignature(),s?e.typeAnnotation=this.tsParseTypeOrTypePredicateAnnotation(t):this.match(t)&&(e.typeAnnotation=this.tsParseTypeOrTypePredicateAnnotation(t))},i.tsParseBindingListForSignature=function(){var t=this;return this.parseBindingList(I.parenR).map(function(e){if("Identifier"!==e.type&&"RestElement"!==e.type)throw t.unexpected(e.start,"Name in a signature must be an Identifier.");return e})},i.tsParseTypeMemberSemicolon=function(){this.eat(I.comma)||this.semicolon()},i.tsParseSignatureMember=function(t){var e=this.startNode();return"TSConstructSignatureDeclaration"===t&&this.expect(I._new),this.tsFillSignature(I.colon,e),this.tsParseTypeMemberSemicolon(),this.finishNode(e,t)},i.tsIsUnambiguouslyIndexSignature=function(){return this.next(),this.eat(I.name)&&this.match(I.colon)},i.tsTryParseIndexSignature=function(t){if(this.match(I.bracketL)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))){this.expect(I.bracketL);var e=this.parseIdentifier();this.expect(I.colon),e.typeAnnotation=this.tsParseTypeAnnotation(!1),this.expect(I.bracketR),t.parameters=[e];var s=this.tsTryParseTypeAnnotation();return s&&(t.typeAnnotation=s),this.tsParseTypeMemberSemicolon(),this.finishNode(t,"TSIndexSignature")}},i.tsParsePropertyOrMethodSignature=function(t,e){this.parsePropertyName(t),this.eat(I.question)&&(t.optional=!0);var s=t;if(e||!this.match(I.parenL)&&!this.isRelational("<")){var i=s;e&&(i.readonly=!0);var r=this.tsTryParseTypeAnnotation();return r&&(i.typeAnnotation=r),this.tsParseTypeMemberSemicolon(),this.finishNode(i,"TSPropertySignature")}var a=s;return this.tsFillSignature(I.colon,a),this.tsParseTypeMemberSemicolon(),this.finishNode(a,"TSMethodSignature")},i.tsParseTypeMember=function(){if(this.match(I.parenL)||this.isRelational("<"))return this.tsParseSignatureMember("TSCallSignatureDeclaration");if(this.match(I._new)&&this.tsLookAhead(this.tsIsStartOfConstructSignature.bind(this)))return this.tsParseSignatureMember("TSConstructSignatureDeclaration");var t=this.startNode(),e=!!this.tsParseModifier(["readonly"]),s=this.tsTryParseIndexSignature(t);return s?(e&&(t.readonly=!0),s):this.tsParsePropertyOrMethodSignature(t,e)},i.tsIsStartOfConstructSignature=function(){return this.next(),this.match(I.parenL)||this.isRelational("<")},i.tsParseTypeLiteral=function(){var t=this.startNode();return t.members=this.tsParseObjectTypeMembers(),this.finishNode(t,"TSTypeLiteral")},i.tsParseObjectTypeMembers=function(){this.expect(I.braceL);var t=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(I.braceR),t},i.tsIsStartOfMappedType=function(){return this.next(),this.isContextual("readonly")&&this.next(),!!this.match(I.bracketL)&&(this.next(),!!this.tsIsIdentifier()&&(this.next(),this.match(I._in)))},i.tsParseMappedTypeParameter=function(){var t=this.startNode();return t.name=this.parseIdentifierName(t.start),this.expect(I._in),t.constraint=this.tsParseType(),this.finishNode(t,"TSTypeParameter")},i.tsParseMappedType=function(){var t=this.startNode();return this.expect(I.braceL),this.eatContextual("readonly")&&(t.readonly=!0),this.expect(I.bracketL),t.typeParameter=this.tsParseMappedTypeParameter(),this.expect(I.bracketR),this.eat(I.question)&&(t.optional=!0),t.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(I.braceR),this.finishNode(t,"TSMappedType")},i.tsParseTupleType=function(){var t=this.startNode();return t.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseType.bind(this),!0,!1),this.finishNode(t,"TSTupleType")},i.tsParseParenthesizedType=function(){var t=this.startNode();return this.expect(I.parenL),t.typeAnnotation=this.tsParseType(),this.expect(I.parenR),this.finishNode(t,"TSParenthesizedType")},i.tsParseFunctionOrConstructorType=function(t){var e=this.startNode();return"TSConstructorType"===t&&this.expect(I._new),this.tsFillSignature(I.arrow,e),this.finishNode(e,t)},i.tsParseLiteralTypeNode=function(){var t=this,e=this.startNode();return e.literal=function(){switch(t.state.type){case I.num:return t.parseLiteral(t.state.value,"NumericLiteral");case I.string:return t.parseLiteral(t.state.value,"StringLiteral");case I._true:case I._false:return t.parseBooleanLiteral();default:throw t.unexpected()}}(),this.finishNode(e,"TSLiteralType")},i.tsParseNonArrayType=function(){switch(this.state.type){case I.name:case I._void:case I._null:var t=this.match(I._void)?"TSVoidKeyword":this.match(I._null)?"TSNullKeyword":T(this.state.value);if(void 0!==t&&this.lookahead().type!==I.dot){var e=this.startNode();return this.next(),this.finishNode(e,t)}return this.tsParseTypeReference();case I.string:case I.num:case I._true:case I._false:return this.tsParseLiteralTypeNode();case I.plusMin:if("-"===this.state.value){var s=this.startNode();if(this.next(),!this.match(I.num))throw this.unexpected();return s.literal=this.parseLiteral(-this.state.value,"NumericLiteral",s.start,s.loc.start),this.finishNode(s,"TSLiteralType")}break;case I._this:var i=this.tsParseThisTypeNode();return this.isContextual("is")&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(i):i;case I._typeof:return this.tsParseTypeQuery();case I.braceL:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case I.bracketL:return this.tsParseTupleType();case I.parenL:return this.tsParseParenthesizedType()}throw this.unexpected()},i.tsParseArrayTypeOrHigher=function(){for(var t=this.tsParseNonArrayType();!this.hasPrecedingLineBreak()&&this.eat(I.bracketL);)if(this.match(I.bracketR)){var e=this.startNodeAtNode(t);e.elementType=t,this.expect(I.bracketR),t=this.finishNode(e,"TSArrayType")}else{var s=this.startNodeAtNode(t);s.objectType=t,s.indexType=this.tsParseType(),this.expect(I.bracketR),t=this.finishNode(s,"TSIndexedAccessType")}return t},i.tsParseTypeOperator=function(t){var e=this.startNode();return this.expectContextual(t),e.operator=t,e.typeAnnotation=this.tsParseTypeOperatorOrHigher(),this.finishNode(e,"TSTypeOperator")},i.tsParseTypeOperatorOrHigher=function(){return this.isContextual("keyof")?this.tsParseTypeOperator("keyof"):this.tsParseArrayTypeOrHigher()},i.tsParseUnionOrIntersectionType=function(t,e,s){this.eat(s);var i=e();if(this.match(s)){for(var r=[i];this.eat(s);)r.push(e());var a=this.startNodeAtNode(i);a.types=r,i=this.finishNode(a,t)}return i},i.tsParseIntersectionTypeOrHigher=function(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),I.bitwiseAND)},i.tsParseUnionTypeOrHigher=function(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),I.bitwiseOR)},i.tsIsStartOfFunctionType=function(){return!!this.isRelational("<")||this.match(I.parenL)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))},i.tsSkipParameterStart=function(){return!(!this.match(I.name)&&!this.match(I._this)||(this.next(),0))},i.tsIsUnambiguouslyStartOfFunctionType=function(){if(this.next(),this.match(I.parenR)||this.match(I.ellipsis))return!0;if(this.tsSkipParameterStart()){if(this.match(I.colon)||this.match(I.comma)||this.match(I.question)||this.match(I.eq))return!0;if(this.match(I.parenR)&&(this.next(),this.match(I.arrow)))return!0}return!1},i.tsParseTypeOrTypePredicateAnnotation=function(t){var e=this.startNode();this.expect(t);var s=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!s)return this.tsParseTypeAnnotation(!1,e);var i=this.tsParseTypeAnnotation(!1),r=this.startNodeAtNode(s);return r.parameterName=s,r.typeAnnotation=i,e.typeAnnotation=this.finishNode(r,"TSTypePredicate"),this.finishNode(e,"TSTypeAnnotation")},i.tsTryParseTypeOrTypePredicateAnnotation=function(){return this.match(I.colon)?this.tsParseTypeOrTypePredicateAnnotation(I.colon):void 0},i.tsTryParseTypeAnnotation=function(){return this.match(I.colon)?this.tsParseTypeAnnotation():void 0},i.tsTryParseType=function(){return this.eat(I.colon)?this.tsParseType():void 0},i.tsParseTypePredicatePrefix=function(){var t=this.parseIdentifier();if(this.isContextual("is")&&!this.hasPrecedingLineBreak())return this.next(),t},i.tsParseTypeAnnotation=function(t,e){return void 0===t&&(t=!0),void 0===e&&(e=this.startNode()),t&&this.expect(I.colon),e.typeAnnotation=this.tsParseType(),this.finishNode(e,"TSTypeAnnotation")},i.tsParseType=function(){var t=this.state.inType;this.state.inType=!0;try{return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(I._new)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.tsParseUnionTypeOrHigher()}finally{this.state.inType=t}},i.tsParseTypeAssertion=function(){var t=this.startNode();return t.typeAnnotation=this.tsParseType(),this.expectRelational(">"),t.expression=this.parseMaybeUnary(),this.finishNode(t,"TSTypeAssertion")},i.tsTryParseTypeArgumentsInExpression=function(){var t=this;return this.tsTryParseAndCatch(function(){var e=t.startNode();t.expectRelational("<");var s=t.tsParseDelimitedList("TypeParametersOrArguments",t.tsParseType.bind(t));return t.expectRelational(">"),e.params=s,t.finishNode(e,"TSTypeParameterInstantiation"),t.expect(I.parenL),e})},i.tsParseHeritageClause=function(){return this.tsParseDelimitedList("HeritageClauseElement",this.tsParseExpressionWithTypeArguments.bind(this))},i.tsParseExpressionWithTypeArguments=function(){var t=this.startNode();return t.expression=this.tsParseEntityName(!1),this.isRelational("<")&&(t.typeParameters=this.tsParseTypeArguments()),this.finishNode(t,"TSExpressionWithTypeArguments")},i.tsParseInterfaceDeclaration=function(t){t.id=this.parseIdentifier(),t.typeParameters=this.tsTryParseTypeParameters(),this.eat(I._extends)&&(t.extends=this.tsParseHeritageClause());var e=this.startNode();return e.body=this.tsParseObjectTypeMembers(),t.body=this.finishNode(e,"TSInterfaceBody"),this.finishNode(t,"TSInterfaceDeclaration")},i.tsParseTypeAliasDeclaration=function(t){return t.id=this.parseIdentifier(),t.typeParameters=this.tsTryParseTypeParameters(),this.expect(I.eq),t.typeAnnotation=this.tsParseType(),this.semicolon(),this.finishNode(t,"TSTypeAliasDeclaration")},i.tsParseEnumMember=function(){var t=this.startNode();return t.id=this.match(I.string)?this.parseLiteral(this.state.value,"StringLiteral"):this.parseIdentifier(!0),this.eat(I.eq)&&(t.initializer=this.parseMaybeAssign()),this.finishNode(t,"TSEnumMember")},i.tsParseEnumDeclaration=function(t,e){return e&&(t.const=!0),t.id=this.parseIdentifier(),this.expect(I.braceL),t.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(I.braceR),this.finishNode(t,"TSEnumDeclaration")},i.tsParseModuleBlock=function(){var t=this.startNode();return this.expect(I.braceL),this.parseBlockOrModuleBlockBody(t.body=[],void 0,!0,I.braceR),this.finishNode(t,"TSModuleBlock")},i.tsParseModuleOrNamespaceDeclaration=function(t){if(t.id=this.parseIdentifier(),this.eat(I.dot)){var e=this.startNode();this.tsParseModuleOrNamespaceDeclaration(e),t.body=e}else t.body=this.tsParseModuleBlock();return this.finishNode(t,"TSModuleDeclaration")},i.tsParseAmbientExternalModuleDeclaration=function(t){return this.isContextual("global")?(t.global=!0,t.id=this.parseIdentifier()):this.match(I.string)?t.id=this.parseExprAtom():this.unexpected(),this.match(I.braceL)?t.body=this.tsParseModuleBlock():this.semicolon(),this.finishNode(t,"TSModuleDeclaration")},i.tsParseImportEqualsDeclaration=function(t,e){return t.isExport=e||!1,t.id=this.parseIdentifier(),this.expect(I.eq),t.moduleReference=this.tsParseModuleReference(),this.semicolon(),this.finishNode(t,"TSImportEqualsDeclaration")},i.tsIsExternalModuleReference=function(){return this.isContextual("require")&&this.lookahead().type===I.parenL},i.tsParseModuleReference=function(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)},i.tsParseExternalModuleReference=function(){var t=this.startNode();if(this.expectContextual("require"),this.expect(I.parenL),!this.match(I.string))throw this.unexpected();return t.expression=this.parseLiteral(this.state.value,"StringLiteral"),this.expect(I.parenR),this.finishNode(t,"TSExternalModuleReference")},i.tsLookAhead=function(t){var e=this.state.clone(),s=t();return this.state=e,s},i.tsTryParseAndCatch=function(t){var e=this.state.clone();try{return t()}catch(t){if(t instanceof SyntaxError)return void(this.state=e);throw t}},i.tsTryParse=function(t){var e=this.state.clone(),s=t();return void 0!==s&&!1!==s?s:void(this.state=e)},i.nodeWithSamePosition=function(t,e){var s=this.startNodeAtNode(t);return s.type=e,s.end=t.end,s.loc.end=t.loc.end,t.leadingComments&&(s.leadingComments=t.leadingComments),t.trailingComments&&(s.trailingComments=t.trailingComments),t.innerComments&&(s.innerComments=t.innerComments),s},i.tsTryParseDeclare=function(t){switch(this.state.type){case I._function:return this.next(),this.parseFunction(t,!0);case I._class:return this.parseClass(t,!0,!1);case I._const:if(this.match(I._const)&&this.isLookaheadContextual("enum"))return this.expect(I._const),this.expectContextual("enum"),this.tsParseEnumDeclaration(t,!0);case I._var:case I._let:return this.parseVarStatement(t,this.state.type);case I.name:var e=this.state.value;return"global"===e?this.tsParseAmbientExternalModuleDeclaration(t):this.tsParseDeclaration(t,e,!0)}},i.tsTryParseExportDeclaration=function(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0)},i.tsParseExpressionStatement=function(t,e){switch(e.name){case"declare":var s=this.tsTryParseDeclare(t);if(s)return s.declare=!0,s;break;case"global":if(this.match(I.braceL)){var i=t;return i.global=!0,i.id=e,i.body=this.tsParseModuleBlock(),this.finishNode(i,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(t,e.name,!1)}},i.tsParseDeclaration=function(t,e,s){switch(e){case"abstract":if(s||this.match(I._class)){var i=t;return i.abstract=!0,s&&this.next(),this.parseClass(i,!0,!1)}break;case"enum":if(s||this.match(I.name))return s&&this.next(),this.tsParseEnumDeclaration(t,!1);break;case"interface":if(s||this.match(I.name))return s&&this.next(),this.tsParseInterfaceDeclaration(t);break;case"module":if(s&&this.next(),this.match(I.string))return this.tsParseAmbientExternalModuleDeclaration(t);if(s||this.match(I.name))return this.tsParseModuleOrNamespaceDeclaration(t);break;case"namespace":if(s||this.match(I.name))return s&&this.next(),this.tsParseModuleOrNamespaceDeclaration(t);break;case"type":if(s||this.match(I.name))return s&&this.next(),this.tsParseTypeAliasDeclaration(t)}},i.tsTryParseGenericAsyncArrowFunction=function(e,s){var i=this,r=this.tsTryParseAndCatch(function(){var r=i.startNodeAt(e,s);return r.typeParameters=i.tsParseTypeParameters(),t.prototype.parseFunctionParams.call(i,r),r.returnType=i.tsTryParseTypeOrTypePredicateAnnotation(),i.expect(I.arrow),r});if(r)return r.id=null,r.generator=!1,r.expression=!0,r.async=!0,this.parseFunctionBody(r,!0),this.finishNode(r,"ArrowFunctionExpression")},i.tsParseTypeArguments=function(){var t=this.startNode();return this.expectRelational("<"),t.params=this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this)),this.expectRelational(">"),this.finishNode(t,"TSTypeParameterInstantiation")},i.tsIsDeclarationStart=function(){if(this.match(I.name))switch(this.state.value){case"abstract":case"declare":case"enum":case"interface":case"module":case"namespace":case"type":return!0}return!1},i.isExportDefaultSpecifier=function(){return!this.tsIsDeclarationStart()&&t.prototype.isExportDefaultSpecifier.call(this)},i.parseAssignableListItem=function(t,e){var s,i=!1;t&&(s=this.parseAccessModifier(),i=!!this.tsParseModifier(["readonly"]));var r=this.parseMaybeDefault();this.parseAssignableListItemTypes(r);var a=this.parseMaybeDefault(r.start,r.loc.start,r);if(s||i){var n=this.startNodeAtNode(a);if(e.length&&(n.decorators=e),s&&(n.accessibility=s),i&&(n.readonly=i),"Identifier"!==a.type&&"AssignmentPattern"!==a.type)throw this.raise(n.start,"A parameter property may not be declared using a binding pattern.");return n.parameter=a,this.finishNode(n,"TSParameterProperty")}return e.length&&(r.decorators=e),a},i.parseFunctionBodyAndFinish=function(e,s,i){!i&&this.match(I.colon)&&(e.returnType=this.tsParseTypeOrTypePredicateAnnotation(I.colon));var r="FunctionDeclaration"===s?"TSDeclareFunction":"ClassMethod"===s?"TSDeclareMethod":void 0;r&&!this.match(I.braceL)&&this.isLineTerminator()?this.finishNode(e,r):t.prototype.parseFunctionBodyAndFinish.call(this,e,s,i)},i.parseSubscript=function(e,s,i,r,a){if(this.eat(I.bang)){var n=this.startNodeAt(s,i);return n.expression=e,this.finishNode(n,"TSNonNullExpression")}if(!r&&this.isRelational("<")){if(this.atPossibleAsync(e)){var o=this.tsTryParseGenericAsyncArrowFunction(s,i);if(o)return o}var h=this.startNodeAt(s,i);h.callee=e;var p=this.tsTryParseTypeArgumentsInExpression();if(p)return h.arguments=this.parseCallExpressionArguments(I.parenR,!1),h.typeParameters=p,this.finishCallExpression(h)}return t.prototype.parseSubscript.call(this,e,s,i,r,a)},i.parseNewArguments=function(e){var s=this;if(this.isRelational("<")){var i=this.tsTryParseAndCatch(function(){var t=s.tsParseTypeArguments();return s.match(I.parenL)||s.unexpected(),t});i&&(e.typeParameters=i)}t.prototype.parseNewArguments.call(this,e)},i.parseExprOp=function(e,s,i,r,a){if(g(I._in.binop)>r&&!this.hasPrecedingLineBreak()&&this.eatContextual("as")){var n=this.startNodeAt(s,i);return n.expression=e,n.typeAnnotation=this.tsParseType(),this.finishNode(n,"TSAsExpression"),this.parseExprOp(n,s,i,r,a)}return t.prototype.parseExprOp.call(this,e,s,i,r,a)},i.checkReservedWord=function(t,e,s,i){},i.checkDuplicateExports=function(){},i.parseImport=function(e){return this.match(I.name)&&this.lookahead().type===I.eq?this.tsParseImportEqualsDeclaration(e):t.prototype.parseImport.call(this,e)},i.parseExport=function(e){if(this.match(I._import))return this.expect(I._import),this.tsParseImportEqualsDeclaration(e,!0);if(this.eat(I.eq)){var s=e;return s.expression=this.parseExpression(),this.semicolon(),this.finishNode(s,"TSExportAssignment")}if(this.eatContextual("as")){var i=e;return this.expectContextual("namespace"),i.id=this.parseIdentifier(),this.semicolon(),this.finishNode(i,"TSNamespaceExportDeclaration")}return t.prototype.parseExport.call(this,e)},i.parseStatementContent=function(e,s){if(this.state.type===I._const){var i=this.lookahead();if(i.type===I.name&&"enum"===i.value){var r=this.startNode();return this.expect(I._const),this.expectContextual("enum"),this.tsParseEnumDeclaration(r,!0)}}return t.prototype.parseStatementContent.call(this,e,s)},i.parseAccessModifier=function(){return this.tsParseModifier(["public","protected","private"])},i.parseClassMember=function(e,s,i){var r=this.parseAccessModifier();r&&(s.accessibility=r),t.prototype.parseClassMember.call(this,e,s,i)},i.parseClassMemberWithIsStatic=function(e,s,i,r){var a=s,n=s,o=s,h=!1,p=!1;switch(this.tsParseModifier(["abstract","readonly"])){case"readonly":p=!0,h=!!this.tsParseModifier(["abstract"]);break;case"abstract":h=!0,p=!!this.tsParseModifier(["readonly"])}if(h&&(a.abstract=!0),p&&(o.readonly=!0),!h&&!r&&!a.accessibility){var c=this.tsTryParseIndexSignature(s);if(c)return void e.body.push(c)}if(p)return a.static=r,this.parseClassPropertyName(n),this.parsePostMemberNameModifiers(a),void this.pushClassProperty(e,n);t.prototype.parseClassMemberWithIsStatic.call(this,e,s,i,r)},i.parsePostMemberNameModifiers=function(t){this.eat(I.question)&&(t.optional=!0)},i.parseExpressionStatement=function(e,s){return("Identifier"===s.type?this.tsParseExpressionStatement(e,s):void 0)||t.prototype.parseExpressionStatement.call(this,e,s)},i.shouldParseExportDeclaration=function(){return!!this.tsIsDeclarationStart()||t.prototype.shouldParseExportDeclaration.call(this)},i.parseConditional=function(e,s,i,r,a){if(!a||!this.match(I.question))return t.prototype.parseConditional.call(this,e,s,i,r,a);var n=this.state.clone();try{return t.prototype.parseConditional.call(this,e,s,i,r)}catch(t){if(!(t instanceof SyntaxError))throw t;return this.state=n,a.start=t.pos||this.state.start,e}},i.parseParenItem=function(e,s,i){if(e=t.prototype.parseParenItem.call(this,e,s,i),this.eat(I.question)&&(e.optional=!0),this.match(I.colon)){var r=this.startNodeAt(s,i);return r.expression=e,r.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(r,"TSTypeCastExpression")}return e},i.parseExportDeclaration=function(e){var s,i=this.eatContextual("declare");return this.match(I.name)&&(s=this.tsTryParseExportDeclaration()),s||(s=t.prototype.parseExportDeclaration.call(this,e)),s&&i&&(s.declare=!0),s},i.parseClassId=function(e,s,i){var r;if(s&&!i||!this.isContextual("implements")){(r=t.prototype.parseClassId).call.apply(r,[this].concat(Array.prototype.slice.call(arguments)));var a=this.tsTryParseTypeParameters();a&&(e.typeParameters=a)}},i.parseClassProperty=function(e){var s=this.tsTryParseTypeAnnotation();return s&&(e.typeAnnotation=s),t.prototype.parseClassProperty.call(this,e)},i.pushClassMethod=function(e,s,i,r,a){var n=this.tsTryParseTypeParameters();n&&(s.typeParameters=n),t.prototype.pushClassMethod.call(this,e,s,i,r,a)},i.pushClassPrivateMethod=function(e,s,i,r){var a=this.tsTryParseTypeParameters();a&&(s.typeParameters=a),t.prototype.pushClassPrivateMethod.call(this,e,s,i,r)},i.parseClassSuper=function(e){t.prototype.parseClassSuper.call(this,e),e.superClass&&this.isRelational("<")&&(e.superTypeParameters=this.tsParseTypeArguments()),this.eatContextual("implements")&&(e.implements=this.tsParseHeritageClause())},i.parseObjPropValue=function(e){var s;if(this.isRelational("<"))throw new Error("TODO");for(var i=arguments.length,r=new Array(i>1?i-1:0),a=1;a<i;a++)r[a-1]=arguments[a];(s=t.prototype.parseObjPropValue).call.apply(s,[this,e].concat(r))},i.parseFunctionParams=function(e,s){var i=this.tsTryParseTypeParameters();i&&(e.typeParameters=i),t.prototype.parseFunctionParams.call(this,e,s)},i.parseVarHead=function(e){t.prototype.parseVarHead.call(this,e);var s=this.tsTryParseTypeAnnotation();s&&(e.id.typeAnnotation=s,this.finishNode(e.id,e.id.type))},i.parseAsyncArrowFromCallExpression=function(e,s){return this.match(I.colon)&&(e.returnType=this.tsParseTypeAnnotation()),t.prototype.parseAsyncArrowFromCallExpression.call(this,e,s)},i.parseMaybeAssign=function(){for(var e,s=arguments.length,i=new Array(s),r=0;r<s;r++)i[r]=arguments[r];if(this.match(I.jsxTagStart)){b(this.curContext()===G.j_oTag),b(this.state.context[this.state.context.length-2]===G.j_expr);var a=this.state.clone();try{var n;return(n=t.prototype.parseMaybeAssign).call.apply(n,[this].concat(i))}catch(t){if(!(t instanceof SyntaxError))throw t;this.state=a,b(this.curContext()===G.j_oTag),this.state.context.pop(),b(this.curContext()===G.j_expr),this.state.context.pop(),e=t}}if(void 0===e&&!this.isRelational("<")){var o;return(o=t.prototype.parseMaybeAssign).call.apply(o,[this].concat(i))}var h,p,c=this.state.clone();try{var l;p=this.tsParseTypeParameters(),"ArrowFunctionExpression"!==(h=(l=t.prototype.parseMaybeAssign).call.apply(l,[this].concat(i))).type&&this.unexpected()}catch(s){var u;if(!(s instanceof SyntaxError))throw s;if(e)throw e;return b(!this.hasPlugin("jsx")),this.state=c,(u=t.prototype.parseMaybeAssign).call.apply(u,[this].concat(i))}return p&&0!==p.params.length&&this.resetStartLocationFromNode(h,p.params[0]),h.typeParameters=p,h},i.parseMaybeUnary=function(e){return!this.hasPlugin("jsx")&&this.eatRelational("<")?this.tsParseTypeAssertion():t.prototype.parseMaybeUnary.call(this,e)},i.parseArrow=function(e){if(this.match(I.colon)){var s=this.state.clone();try{var i=this.tsParseTypeOrTypePredicateAnnotation(I.colon);this.canInsertSemicolon()&&this.unexpected(),this.match(I.arrow)||this.unexpected(),e.returnType=i}catch(t){if(!(t instanceof SyntaxError))throw t;this.state=s}}return t.prototype.parseArrow.call(this,e)},i.parseAssignableListItemTypes=function(t){if(this.eat(I.question)){if("Identifier"!==t.type)throw this.raise(t.start,"A binding pattern parameter cannot be optional in an implementation signature.");t.optional=!0}var e=this.tsTryParseTypeAnnotation();return e&&(t.typeAnnotation=e),this.finishNode(t,t.type)},i.toAssignable=function(e,s,i){switch(e.type){case"TSTypeCastExpression":return t.prototype.toAssignable.call(this,this.typeCastToParameter(e),s,i);case"TSParameterProperty":default:return t.prototype.toAssignable.call(this,e,s,i)}},i.checkLVal=function(e,s,i,r){switch(e.type){case"TSTypeCastExpression":return;case"TSParameterProperty":return void this.checkLVal(e.parameter,s,i,"parameter property");default:return void t.prototype.checkLVal.call(this,e,s,i,r)}},i.parseBindingAtom=function(){switch(this.state.type){case I._this:return this.parseIdentifier(!0);default:return t.prototype.parseBindingAtom.call(this)}},i.isClassMethod=function(){return this.isRelational("<")||t.prototype.isClassMethod.call(this)},i.isClassProperty=function(){return this.match(I.colon)||t.prototype.isClassProperty.call(this)},i.parseMaybeDefault=function(){for(var e,s=arguments.length,i=new Array(s),r=0;r<s;r++)i[r]=arguments[r];var a=(e=t.prototype.parseMaybeDefault).call.apply(e,[this].concat(i));return"AssignmentPattern"===a.type&&a.typeAnnotation&&a.right.start<a.typeAnnotation.start&&this.raise(a.typeAnnotation.start,"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`"),a},i.readToken=function(e){return!this.state.inType||62!==e&&60!==e?t.prototype.readToken.call(this,e):this.finishOp(I.relational,1)},i.toAssignableList=function(e,s,i){for(var r=0;r<e.length;r++){var a=e[r];a&&"TSTypeCastExpression"===a.type&&(e[r]=this.typeCastToParameter(a))}return t.prototype.toAssignableList.call(this,e,s,i)},i.typeCastToParameter=function(t){return t.expression.typeAnnotation=t.typeAnnotation,this.finishNodeAt(t.expression,t.expression.type,t.typeAnnotation.end,t.typeAnnotation.loc.end)},i.toReferencedList=function(t){for(var e=0;e<t.length;e++){var s=t[e];s&&s._exprListItem&&"TsTypeCastExpression"===s.type&&this.raise(s.start,"Did not expect a type annotation here.")}return t},i.shouldParseArrow=function(){return this.match(I.colon)||t.prototype.shouldParseArrow.call(this)},i.shouldParseAsyncArrow=function(){return this.match(I.colon)||t.prototype.shouldParseAsyncArrow.call(this)},e}(t)};var dt={};e.parse=function(t,e){if(!e||"unambiguous"!==e.sourceType)return w(e,t).parse();e=Object.assign({},e);try{e.sourceType="module";var s=w(e,t).parse();return N(s)||(s.program.sourceType="script"),s}catch(s){try{return e.sourceType="script",w(e,t).parse()}catch(t){}throw s}},e.parseExpression=function(t,e){var s=w(e,t);return s.options.strictMode&&(s.state.strict=!0),s.getExpression()},e.tokTypes=I});unwrapExports(lib);var parserBabylon=parse;module.exports=parserBabylon; kodo - Gogs: Go Git Service

Nessuna descrizione

Brightcells: 428a189ebb Bootcdn Crash, Change CDN Domain & TODO: Support Fallback 6 anni fa
..
clerk_info.html 597ee33ba6 Pai2 => Kodo 7 anni fa
clerk_oauth.html 428a189ebb Bootcdn Crash, Change CDN Domain & TODO: Support Fallback 6 anni fa
contact_us.html 597ee33ba6 Pai2 => Kodo 7 anni fa
download.tmpl.html 597ee33ba6 Pai2 => Kodo 7 anni fa
lensman_oauth.html 428a189ebb Bootcdn Crash, Change CDN Domain & TODO: Support Fallback 6 anni fa
lensman_price.html c761b9cf4c add page price 8 anni fa
login_qrcode.html 428a189ebb Bootcdn Crash, Change CDN Domain & TODO: Support Fallback 6 anni fa
tourguide_oauth.html 428a189ebb Bootcdn Crash, Change CDN Domain & TODO: Support Fallback 6 anni fa
user_agreement.html be2ad97693 Update 1000 => 200 8 anni fa