0)return ad(e,o,n)}function dd(t,n){var r=hn(t),i=r.resolvedSignature;if(i&&i!==st&&!n)return i;r.resolvedSignature=st;var a=function(t,n){switch(t.kind){case 185:return function(t,n){if(97===t.expression.kind){var r=wl(t.expression);if(r!==ee){var i=e.getClassExtendsHeritageClauseElement(e.getContainingClass(t));if(i)return ad(t,bi(r,i.typeArguments,i),n)}return U_(t)}var a=N_(t.expression,e.Diagnostics.Cannot_invoke_an_object_which_is_possibly_null,e.Diagnostics.Cannot_invoke_an_object_which_is_possibly_undefined,e.Diagnostics.Cannot_invoke_an_object_which_is_possibly_null_or_undefined);if(a===pe)return ct;var o=Pa(a);if(o===ee)return V_(t);var s=La(o,0),c=La(o,1);return od(a,o,s.length,c.length)?(a!==ee&&t.typeArguments&&cn(t,e.Diagnostics.Untyped_function_calls_may_not_accept_type_arguments),U_(t)):s.length?ad(t,s,n):(c.length?cn(t,e.Diagnostics.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new,Er(a)):sd(t,o,0),V_(t))}(t,n);case 186:return function(t,n){if(t.arguments&&T<1){var r=q_(t.arguments);r>=0&&cn(t.arguments[r],e.Diagnostics.Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher)}var i=N_(t.expression);if(i===pe)return ct;if((i=Pa(i))===ee)return V_(t);if(Kr(i))return t.typeArguments&&cn(t,e.Diagnostics.Untyped_function_calls_may_not_accept_type_arguments),U_(t);var a=La(i,1);if(a.length){if(!function(t,n){if(!n||!n.declaration)return!0;var r=n.declaration,i=e.getSelectedModifierFlags(r,24);if(!i)return!0;var a=e.getClassLikeDeclarationOfSymbol(r.parent.symbol),o=wi(r.parent.symbol);if(!Kf(t,a)){var s=e.getContainingClass(t);if(s)for(var c=ki(Wf(s));c.length;){var u=c[0];if(16&i&&u.symbol===r.parent.symbol)return!0;c=ki(u)}return 8&i&&cn(t,e.Diagnostics.Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration,Er(o)),16&i&&cn(t,e.Diagnostics.Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration,Er(o)),!1}return!0}(t,a[0]))return V_(t);var o=i.symbol&&e.getClassLikeDeclarationOfSymbol(i.symbol);return o&&e.hasModifier(o,128)?(cn(t,e.Diagnostics.Cannot_create_an_instance_of_an_abstract_class),V_(t)):ad(t,a,n)}var s=La(i,0);if(s.length){var c=ad(t,s,n);return pd(c.declaration)||no(c)===_e||cn(t,e.Diagnostics.Only_a_void_function_can_be_called_with_the_new_keyword),Za(c)===_e&&cn(t,e.Diagnostics.A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void),c}return sd(t,i,1),V_(t)}(t,n);case 187:return function(e,t){var n=ap(e.tag),r=Pa(n);if(r===ee)return V_(e);var i=La(r,0),a=La(r,1);return od(n,r,i.length,a.length)?U_(e):i.length?ad(e,i,t):(sd(e,r,0),V_(e))}(t,n);case 149:return function(t,n){var r=ap(t.expression),i=Pa(r);if(i===ee)return V_(t);var a,o,s=La(i,0),c=La(i,1);if(od(r,i,s.length,c.length))return U_(t);if(a=t,(o=s).length&&e.every(o,function(e){return 0===e.minArgumentCount&&!e.hasRestParameter&&e.parameters.length0?Sd(e,0):de}function Cd(t,n){var r=yn(t);if(!r.type){r.type=n;var i=t.valueDeclaration;71!==i.name.kind&&(r.type===ge&&(r.type=$r(i.name)),function t(n){for(var r=0,i=n.elements;r=2||0==(34&n.flags)||267===n.valueDeclaration.parent.kind)){for(var r=e.getEnclosingBlockScopeContainer(n.valueDeclaration),i=function(t,n){return!!e.findAncestor(t,function(t){return t===n?"quit":e.isFunctionLike(t)})}(t.parent,r),a=r,o=!1;a&&!e.nodeStartsNewLexicalEnvironment(a);){if(e.isIterationStatement(a,!1)){o=!0;break}a=a.parent}o&&(i&&(hn(a).flags|=65536),218===r.kind&&e.getAncestor(n.valueDeclaration,231).parent===r&&function(t,n){for(var r=t;189===r.parent.kind;)r=r.parent;var i=!1;if(e.isAssignmentTarget(r))i=!0;else if(196===r.parent.kind||197===r.parent.kind){var a=r.parent;i=43===a.operator||44===a.operator}return!!i&&!!e.findAncestor(r,function(e){return e===n?"quit":e===n.statement})}(t,r)&&(hn(n.valueDeclaration).flags|=2097152),hn(n.valueDeclaration).flags|=262144),i&&(hn(n.valueDeclaration).flags|=131072)}}(t,n);var o=kl(ci(i),t),s=e.getAssignmentTargetKind(t);if(s){if(!(3&i.flags))return cn(t,e.Diagnostics.Cannot_assign_to_0_because_it_is_not_a_variable,Cr(n)),ee;if(Md(i))return cn(t,e.Diagnostics.Cannot_assign_to_0_because_it_is_a_constant_or_a_read_only_property,Cr(n)),ee}var c=2097152&i.flags;if(3&i.flags){if(1===s)return o}else{if(!c)return o;a=e.find(n.declarations,d)}if(!a)return o;for(var u=148===e.getRootDeclaration(a).kind,l=gl(a),_=gl(t),p=_!==l,f=t.parent&&t.parent.parent&&e.isSpreadAssignment(t.parent)&&Gu(t.parent.parent);_!==l&&(190===_.kind||191===_.kind||e.isObjectLiteralOrClassExpressionMethod(_))&&(vl(i)||u&&!yl(i));)_=gl(_);var m=u||c||p||f||o!==$&&o!==Be&&(!P||0!=(1&o.flags)||Mu(t)||250===t.parent.kind)||207===t.parent.kind||230===a.kind&&a.exclamationToken||2097152&a.flags,g=ml(t,o,m?u?function(e,t){return P&&148===t.kind&&t.initializer&&4096&tu(e)&&!(4096&tu(ap(t.initializer)))?Uu(e,131072):e}(o,a):o:o===$||o===Be?te:au(o),_,!m);if(o===$||o===Be){if(g===$||g===Be)return I&&(cn(e.getNameOfDeclaration(a),e.Diagnostics.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined,Cr(n),Er(g)),cn(t,e.Diagnostics.Variable_0_implicitly_has_an_1_type,Cr(n),Er(g))),$p(g)}else if(!m&&!(4096&tu(o))&&4096&tu(g))return cn(t,e.Diagnostics.Variable_0_is_used_before_being_assigned,Cr(n)),o;return s?Xc(g):g}(t);case 99:return function(t){var n=e.getThisContainer(t,!0),r=!1;switch(154===n.kind&&Nl(t,n,e.Diagnostics.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class),191===n.kind&&(n=e.getThisContainer(n,!1),r=T<2),n.kind){case 237:cn(t,e.Diagnostics.this_cannot_be_referenced_in_a_module_or_namespace_body);break;case 236:cn(t,e.Diagnostics.this_cannot_be_referenced_in_current_location);break;case 154:Pl(t,n)&&cn(t,e.Diagnostics.this_cannot_be_referenced_in_constructor_arguments);break;case 151:case 150:e.hasModifier(n,32)&&cn(t,e.Diagnostics.this_cannot_be_referenced_in_a_static_property_initializer);break;case 146:cn(t,e.Diagnostics.this_cannot_be_referenced_in_a_computed_property_name)}r&&Dl(t,n);var i=Al(t,n);return!i&&O&&cn(t,e.Diagnostics.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation),i||Y}(t);case 97:return wl(t);case 95:return ie;case 13:case 9:return Bs(js(t.text));case 8:return Xm(t),Bs(js(+t.text));case 101:return se;case 86:return ce;case 200:return function(t){return e.forEach(t.templateSpans,function(e){ap(e.expression)}),ae}(t);case 12:return Me;case 181:return function(t,n){for(var r=t.elements,i=!1,a=[],o=e.isAssignmentTarget(t),s=ql(t),c=0;c0&&(o=Is(o,I(),t.symbol,s,0),a=[],r=e.createSymbolTable(),f=!1,m=!1,d=0),!a_(S=ap(v.expression)))return cn(v,e.Diagnostics.Spread_types_may_only_be_created_from_object_types),ee;o=Is(o,S,t.symbol,s,0),y=h+1;continue}e.Debug.assert(155===v.kind||156===v.kind),Mf(v)}!x&&Ui(v)?t_(v.name)?m=!0:f=!0:r.set(b.escapedName,b),a.push(b)}if(u)for(var w=0,F=ha(c);w0&&(o=Is(o,I(),t.symbol,s,0)),o):I();function I(){var n=_?lt:f?i_(t.properties,y,a,0):void 0,o=m&&!_?i_(t.properties,y,a,1):void 0,c=mr(t.symbol,r,e.emptyArray,e.emptyArray,n,o);return c.flags|=33554432|(C.suppressExcessPropertyErrors?0:8388608)|117440512&d,c.objectFlags|=128,p&&(c.objectFlags|=512),i&&(c.pattern=t),12288&c.flags||(s|=117440512&c.flags),c}}(t,n);case 183:return P_(t);case 184:return function(t){var n=N_(t.expression),r=t.argumentExpression;if(!r){var i,a=e.getSourceFileOfNode(t);return 186===t.parent.kind&&t.parent.expression===t?Wm(a,i=e.skipTrivia(a.text,t.expression.end),t.end-i,e.Diagnostics.new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead):Wm(a,i=t.end-"]".length,t.end-i,e.Diagnostics.Expression_expected),ee}var o=function(t){var n,r=e.skipParentheses(t);if(71===r.kind){var i=Ou(r);if(3&i.flags)for(var a=t,o=t.parent;o;){if(219===o.kind&&a===o.statement&&j_(o)===i&&ja(n=ip(o.expression),1)&&!ja(n,0))return!0;a=o,o=o.parent}}return!1}(r)?oe:ap(r);return n===ee||n===pe?n:Kd(n)&&9!==r.kind?(cn(r,e.Diagnostics.A_const_enum_member_can_only_be_accessed_using_a_string_literal),ee):hp(ks(n,o,t),t)}(t);case 185:if(91===t.expression.kind)return function(t){if(Fm(t.arguments)||function(t){if(E===e.ModuleKind.ES2015)return Hm(t,e.Diagnostics.Dynamic_import_cannot_be_used_when_targeting_ECMAScript_2015_modules);if(t.typeArguments)return Hm(t,e.Diagnostics.Dynamic_import_cannot_have_type_arguments);var n=t.arguments;if(1!==n.length)return Hm(t,e.Diagnostics.Dynamic_import_must_have_one_specifier_as_an_argument);e.isSpreadElement(n[0])&&Hm(n[0],e.Diagnostics.Specifier_of_dynamic_import_cannot_be_spread_element)}(t),0===t.arguments.length)return Ed(t,Y);for(var n=t.arguments[0],r=Yd(n),i=1;i0&&n.declarations[0]!==t)return}var r=lo(ir(t));if(r)for(var i=!1,a=!1,o=0,s=r.declarations;o=0)return void(n&&cn(n,e.Diagnostics.Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method));Mt.push(t.id);var u=Tp(c,n,r);if(Mt.pop(),!u)return;return i.awaitedTypeOfType=u}var l=Jr(t,"then");if(!(l&&La(l,0).length>0))return i.awaitedTypeOfType=t;n&&(e.Debug.assert(!!r),cn(n,r))}function Ep(t){var n=e.getEffectiveReturnTypeNode(t),r=Us(n);if(T>=2){if(r===ee)return ee;var i=Jo(!0);if(i!==ve&&!ui(r,i))return cn(n,e.Diagnostics.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type),ee}else{if(Ap(n&&e.getEntityNameFromTypeNode(n)),r===ee)return ee;var a=e.getEntityNameFromTypeNode(n);if(void 0===a)return cn(n,e.Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value,Er(r)),ee;var o=Un(a,67216319,!0),s=o?ci(o):ee;if(s===ee)return 71===a.kind&&"Promise"===a.escapedText&&li(r)===Jo(!1)?cn(n,e.Diagnostics.An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option):cn(n,e.Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value,e.entityNameToString(a)),ee;var c=We||(We=Bo("PromiseConstructorLike",0,!0))||ge;if(c===ge)return cn(n,e.Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value,e.entityNameToString(a)),ee;if(!bc(s,c,n,e.Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value))return ee;var u=a&&Cf(a),l=bn(t.locals,u.escapedText,67216319);if(l)return cn(l.valueDeclaration,e.Diagnostics.Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions,e.idText(u),e.entityNameToString(a)),ee}return Cp(r,t,e.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member)}function Np(t){var n=no(dd(t));if(!(1&n.flags)){var r,i,a=ud(t);switch(t.parent.kind){case 233:r=ss([ci(ir(t.parent)),_e]);break;case 148:r=_e,i=e.chainDiagnosticMessages(i,e.Diagnostics.The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any);break;case 151:r=_e,i=e.chainDiagnosticMessages(i,e.Diagnostics.The_return_type_of_a_property_decorator_function_must_be_either_void_or_any);break;case 153:case 155:case 156:r=ss([Xo(Wf(t.parent)),_e])}bc(n,r,t,a,function(){return i})}}function Ap(e){if(e){var t=Cf(e),n=kn(t,t.escapedText,2097152|(71===e.kind?67901928:1920),void 0,void 0,!0);n&&2097152&n.flags&&sr(n)&&!om(Bn(n))&&jn(n)}}function Pp(t){var n=function t(n){if(n)switch(n.kind){case 169:case 168:for(var r=void 0,i=0,a=n.types;i=e.ModuleKind.ES2015)&&(Up(t,n,"require")||Up(t,n,"exports"))&&(!e.isModuleDeclaration(t)||1===e.getModuleInstanceState(t))){var r=jr(t);272===r.kind&&e.isExternalOrCommonJsModule(r)&&cn(n,e.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module,e.declarationNameToString(n),e.declarationNameToString(n))}}function Qp(t,n){if(!(T>=4)&&Up(t,n,"Promise")&&(!e.isModuleDeclaration(t)||1===e.getModuleInstanceState(t))){var r=jr(t);272===r.kind&&e.isExternalOrCommonJsModule(r)&&1024&r.flags&&cn(n,e.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions,e.declarationNameToString(n),e.declarationNameToString(n))}}function Yp(t){if(148===e.getRootDeclaration(t).kind){var n=e.getContainingFunction(t);!function r(i){if(!e.isTypeNode(i)&&!e.isDeclarationName(i)){if(183===i.kind)return r(i.expression);if(71!==i.kind)return e.forEachChild(i,r);var a=kn(i,i.escapedText,69313471,void 0,void 0,!1);if(a&&a!==X&&a.valueDeclaration)if(a.valueDeclaration!==t){if(e.getEnclosingBlockScopeContainer(a.valueDeclaration)===n){if(148===a.valueDeclaration.kind||180===a.valueDeclaration.kind){if(a.valueDeclaration.pos=1&&tf(t.declarations[0])}function rf(e,t){return af(N_(e),e,!0,void 0!==t)}function af(e,t,n,r){return Kr(e)?e:of(e,t,n,r,!0)||Y}function of(t,n,r,i,a){var o=T>=2,s=!o&&C.downlevelIteration;if(o||s||i){var c=sf(t,o?n:void 0,i,!0,a);if(c||o)return c}var u=t,l=!1,_=!1;if(r){if(131072&u.flags){var d=t.types,p=e.filter(d,function(e){return!(524322&e.flags)});p!==d&&(u=ss(p,2))}else 524322&u.flags&&(u=de);if((_=u!==t)&&(T<1&&n&&(cn(n,e.Diagnostics.Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher),l=!0),16384&u.flags))return ae}if(!qc(u))return n&&!l&&cn(n,!r||_?s?e.Diagnostics.Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator:e.Diagnostics.Type_0_is_not_an_array_type:s?e.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator:e.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type,Er(u)),_?ae:void 0;var f=ja(u,1);return _&&f?524322&f.flags?ae:ss([f,ae],2):f}function sf(t,n,r,i,a){if(!Kr(t))return il(t,function(t){var o=t;if(r){if(o.iteratedTypeOfAsyncIterable)return o.iteratedTypeOfAsyncIterable;if(ui(t,Uo(!1))||ui(t,Vo(!1)))return o.iteratedTypeOfAsyncIterable=t.typeArguments[0]}if(i){if(o.iteratedTypeOfIterable)return o.iteratedTypeOfIterable;if(ui(t,qo(!1))||ui(t,Wo(!1)))return o.iteratedTypeOfIterable=t.typeArguments[0]}var s=r&&Jr(t,e.getPropertyNameForKnownSymbolName("asyncIterator")),c=s||i&&Jr(t,e.getPropertyNameForKnownSymbolName("iterator"));if(!Kr(c)){var u=c&&La(c,0);if(e.some(u)){var l=cf(ss(e.map(u,no),2),n,!!s);return a&&n&&l&&bc(t,s?function(e){return Go(Uo(!0),[e])}(l):Yo(l),n),s?o.iteratedTypeOfAsyncIterable=l:o.iteratedTypeOfIterable=l}n&&(cn(n,r?e.Diagnostics.Type_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator:e.Diagnostics.Type_must_have_a_Symbol_iterator_method_that_returns_an_iterator),n=void 0)}})}function cf(t,n,r){if(!Kr(t)){var i=t;if(r?i.iteratedTypeOfAsyncIterator:i.iteratedTypeOfIterator)return r?i.iteratedTypeOfAsyncIterator:i.iteratedTypeOfIterator;if(ui(t,(r?function(e){return Ye||(Ye=Bo("AsyncIterator",1,e))||ve}:function(e){return Ge||(Ge=Bo("Iterator",1,e))||ve})(!1)))return r?i.iteratedTypeOfAsyncIterator=t.typeArguments[0]:i.iteratedTypeOfIterator=t.typeArguments[0];var a=Jr(t,"next");if(!Kr(a)){var o=a?La(a,0):e.emptyArray;if(0!==o.length){var s=ss(e.map(o,no),2);if(!(Kr(s)||r&&Kr(s=Sp(s,n,e.Diagnostics.The_type_returned_by_the_next_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property)))){var c=s&&Jr(s,"value");if(c)return r?i.iteratedTypeOfAsyncIterator=c:i.iteratedTypeOfIterator=c;n&&cn(n,r?e.Diagnostics.The_type_returned_by_the_next_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property:e.Diagnostics.The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property)}}else n&&cn(n,r?e.Diagnostics.An_async_iterator_must_have_a_next_method:e.Diagnostics.An_iterator_must_have_a_next_method)}}}function uf(e,t){if(!Kr(e))return sf(e,void 0,t,!t,!1)||cf(e,void 0,t)}function lf(t){return 155===t.kind&&void 0!==e.getEffectiveSetAccessorTypeAnnotationNode(e.getDeclarationOfKind(t.symbol,156))}function _f(t,n){var r=2==(3&e.getFunctionFlags(t))?Dp(n):n;return r&&zd(r,2049)}function df(t){var n,r=_o(t.symbol,1),i=_o(t.symbol,0),a=ja(t,0),o=ja(t,1);if((a||o)&&(e.forEach(ma(t),function(e){var n=ci(e);d(e,n,t,i,a,0),d(e,n,t,r,o,1)}),1&e.getObjectFlags(t)&&e.isClassLike(t.symbol.valueDeclaration)))for(var s=0,c=t.symbol.valueDeclaration.members;sr)return!1;for(var u=0;u1)return qm(o.types[1],e.Diagnostics.Classes_can_only_extend_a_single_class);n=!0}else{if(e.Debug.assert(108===o.token),r)return qm(o,e.Diagnostics.implements_clause_already_seen);r=!0}Im(o)}})(t)||Am(t.typeParameters,n)}(t),Fp(t),t.name&&(pf(t.name,e.Diagnostics.Class_name_cannot_be_0),Vp(t,t.name),qp(t,t.name),Xp(t,t.name),Qp(t,t.name)),ff(t.typeParameters),kp(t);var n=ir(t),r=wi(n),a=Xi(r),o=ci(n);mf(n),function(t){var n;!function(e){e[e.Getter=1]="Getter",e[e.Setter=2]="Setter",e[e.Method=4]="Method",e[e.Property=3]="Property"}(n||(n={}));for(var r=e.createUnderscoreEscapedMap(),i=e.createUnderscoreEscapedMap(),a=0,o=t.members;a>s;case 47:return a>>>s;case 45:return a<1)for(var o=0,s=r;o=0)n.parameters[r.parameterIndex].dotDotDotToken?cn(i,e.Diagnostics.A_type_predicate_cannot_reference_a_rest_parameter):bc(r.type,Wf(n.parameters[r.parameterIndex]),t.type,void 0,function(){return e.chainDiagnosticMessages(void 0,e.Diagnostics.A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type)});else if(i){for(var a=!1,o=0,s=n.parameters;o0),r.length>1&&cn(r[1],e.Diagnostics.Class_declarations_cannot_have_more_than_one_augments_or_extends_tag);var i=Ip(t.class.expression),a=e.getClassExtendsHeritageClauseElement(n);if(a){var o=Ip(a.expression);o&&i.escapedText!==o.escapedText&&cn(i,e.Diagnostics.JSDoc_0_1_does_not_match_the_extends_2_clause,e.idText(t.tagName),e.idText(i),e.idText(o))}}else cn(n,e.Diagnostics.JSDoc_0_is_not_attached_to_a_class,e.idText(t.tagName))}(t);case 291:return function(t){t.typeExpression||cn(t.name,e.Diagnostics.JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags)}(t);case 287:return function(t){if(If(t.typeExpression),!e.getParameterSymbolFromJSDoc(t)){var n=e.getHostSignatureFromJSDoc(t);n&&(Ya(n)?e.findLast(e.getJSDocTags(n),e.isJSDocParameterTag)===t&&t.typeExpression&&t.typeExpression.type&&!Vc(Us(t.typeExpression.type))&&cn(t.name,e.Diagnostics.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type,e.idText(145===t.name.kind?t.name.right:t.name)):cn(t.name,e.Diagnostics.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name,e.idText(145===t.name.kind?t.name.right:t.name)))}}(t);case 280:up(t);case 278:case 277:case 275:case 276:return Of(t),void e.forEachChild(t,If);case 281:return void function(t){Of(t),If(t.type);var n=t.parent;e.isJSDocTypeExpression(n)||cn(t,e.Diagnostics.JSDoc_may_only_appear_in_the_last_parameter_of_a_signature);var r=n.parent;if(e.isJSDocParameterTag(r)){var i=e.getParameterSymbolFromJSDoc(r);if(i){var a=e.getHostSignatureFromJSDoc(r);a&&e.last(a.parameters).symbol===i||cn(t,e.Diagnostics.A_rest_parameter_must_be_last_in_a_parameter_list)}}else cn(t,e.Diagnostics.JSDoc_may_only_appear_in_the_last_parameter_of_a_signature)}(t);case 274:return If(t.type);case 175:return function(e){If(e.objectType),If(e.indexType),hp(Ss(e),e)}(t);case 176:return function(e){If(e.typeParameter),If(e.type),I&&!e.type&&mu(e,Y),bc(sa(Ds(e)),ae,e.typeParameter.constraint)}(t);case 232:return function(e){i&&(Op(e),Lm(e),Gp(e,e.name),Vp(e,e.name),qp(e,e.name),Xp(e,e.name),Qp(e,e.name))}(t);case 211:case 238:return Kp(t);case 212:return function(t){Tm(t)||Um(t.declarationList)||function(t){if(!function e(t){switch(t.kind){case 215:case 216:case 217:case 224:case 218:case 219:case 220:return!1;case 226:return e(t.parent)}return!0}(t.parent)){if(e.isLet(t.declarationList))return Hm(t,e.Diagnostics.let_declarations_can_only_be_declared_inside_a_block);e.isConst(t.declarationList)&&Hm(t,e.Diagnostics.const_declarations_can_only_be_declared_inside_a_block)}}(t),e.forEach(t.declarationList.declarations,If)}(t);case 214:return function(e){Gm(e),ap(e.expression)}(t);case 215:return function(t){Gm(t),ap(t.expression),If(t.thenStatement),213===t.thenStatement.kind&&cn(t.thenStatement,e.Diagnostics.The_body_of_an_if_statement_cannot_be_the_empty_statement),If(t.elseStatement)}(t);case 216:return function(e){Gm(e),If(e.statement),ap(e.expression)}(t);case 217:return function(e){Gm(e),ap(e.expression),If(e.statement)}(t);case 218:return function(t){Gm(t)||t.initializer&&231===t.initializer.kind&&Um(t.initializer),t.initializer&&(231===t.initializer.kind?e.forEach(t.initializer.declarations,tf):ap(t.initializer)),t.condition&&ap(t.condition),t.incrementor&&ap(t.incrementor),If(t.statement),t.locals&&Mp(t)}(t);case 219:return function(t){Bm(t);var n,r=N_(t.expression);if(231===t.initializer.kind){var i=t.initializer.declarations[0];i&&e.isBindingPattern(i.name)&&cn(i.name,e.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern),nf(t)}else{var a=t.initializer,o=ap(a);181===a.kind||182===a.kind?cn(a,e.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern):gc(16384&(n=fs(r)).flags?ae:n,o)?Bd(a,e.Diagnostics.The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access):cn(a,e.Diagnostics.The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any)}jd(r,141590528)||cn(t.expression,e.Diagnostics.The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter),If(t.statement),t.locals&&Mp(t)}(t);case 220:return function(t){if(Bm(t),220===t.kind&&(t.awaitModifier?2==(6&e.getFunctionFlags(e.getContainingFunction(t)))&&T<6&&Dm(t,16384):C.downlevelIteration&&T<2&&Dm(t,256)),231===t.initializer.kind)nf(t);else{var n=t.initializer,r=rf(t.expression,t.awaitModifier);if(181===n.kind||182===n.kind)Wd(n,r||ee);else{var i=ap(n);Bd(n,e.Diagnostics.The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access),r&&bc(r,i,n,void 0)}}If(t.statement),t.locals&&Mp(t)}(t);case 221:case 222:return function(t){Gm(t)||function(t){for(var n=t;n;){if(e.isFunctionLike(n))return Hm(t,e.Diagnostics.Jump_target_cannot_cross_function_boundary);switch(n.kind){case 226:if(t.label&&n.label.escapedText===t.label.escapedText)return!(221!==t.kind||e.isIterationStatement(n.statement,!0))&&Hm(t,e.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement);break;case 225:if(222===t.kind&&!t.label)return!1;break;default:if(e.isIterationStatement(n,!1)&&!t.label)return!1}n=n.parent}if(t.label)return Hm(t,222===t.kind?e.Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement:e.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement);Hm(t,222===t.kind?e.Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement:e.Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement)}(t)}(t);case 223:return function(t){if(!Gm(t)){var n=e.getContainingFunction(t);if(n){var r=no(Qa(n)),i=e.getFunctionFlags(n),a=1&i;if(P||t.expression||16384&r.flags){var o=t.expression?Yd(t.expression):te;if(a)return;if(156===n.kind)t.expression&&cn(t,e.Diagnostics.Setters_cannot_return_a_value);else if(154===n.kind)t.expression&&!bc(o,r,t)&&cn(t,e.Diagnostics.Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class);else if(e.getEffectiveReturnTypeNode(n)||lf(n))if(2&i){var s=Dp(r),c=Cp(o,t,e.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);s&&bc(c,s,t)}else bc(o,r,t)}else 154===n.kind||!C.noImplicitReturns||_f(n,r)||a||cn(t,e.Diagnostics.Not_all_code_paths_return_a_value)}else qm(t,e.Diagnostics.A_return_statement_can_only_be_used_within_a_function_body)}}(t);case 224:return function(t){Gm(t)||16384&t.flags&&qm(t,e.Diagnostics.with_statements_are_not_allowed_in_an_async_function_block),ap(t.expression);var n=e.getSourceFileOfNode(t);if(!Vm(n)){var r=e.getSpanOfTokenAtPosition(n,t.pos).start;Wm(n,r,t.statement.pos-r,e.Diagnostics.The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any)}}(t);case 225:return function(t){var n;Gm(t);var r=!1,a=ap(t.expression),o=Gc(a);e.forEach(t.caseBlock.clauses,function(s){if(265===s.kind&&!r)if(void 0===n)n=s;else{var c=e.getSourceFileOfNode(t),u=e.skipTrivia(c.text,s.pos);Wm(c,u,(s.statements.length>0?s.statements[0].pos:s.end)-u,e.Diagnostics.A_default_clause_cannot_appear_more_than_once_in_a_switch_statement),r=!0}if(i&&264===s.kind){var l=ap(s.expression),_=Gc(l),d=a;_&&o||(l=_?Xc(l):l,d=Xc(a)),Hd(d,l)||xc(l,d,s.expression,void 0)}e.forEach(s.statements,If)}),t.caseBlock.locals&&Mp(t.caseBlock)}(t);case 226:return function(t){Gm(t)||e.findAncestor(t.parent,function(n){return e.isFunctionLike(n)?"quit":226===n.kind&&n.label.escapedText===t.label.escapedText?(Hm(t.label,e.Diagnostics.Duplicate_label_0,e.getTextOfNode(t.label)),!0):void 0}),If(t.statement)}(t);case 227:return function(t){Gm(t)||void 0===t.expression&&function(t,n,r,i,a){var o=e.getSourceFileOfNode(t);if(!Vm(o)){var s=e.getSpanOfTokenAtPosition(o,t.pos);Lt.add(e.createFileDiagnostic(o,e.textSpanEnd(s),0,n,void 0,void 0,void 0))}}(t,e.Diagnostics.Line_break_not_permitted_here),t.expression&&ap(t.expression)}(t);case 228:return function(t){Gm(t),Kp(t.tryBlock);var n=t.catchClause;if(n){if(n.variableDeclaration)if(n.variableDeclaration.type)qm(n.variableDeclaration.type,e.Diagnostics.Catch_clause_variable_cannot_have_a_type_annotation);else if(n.variableDeclaration.initializer)qm(n.variableDeclaration.initializer,e.Diagnostics.Catch_clause_variable_cannot_have_an_initializer);else{var r=n.block.locals;r&&e.forEachKey(n.locals,function(t){var n=r.get(t);n&&0!=(2&n.flags)&&Hm(n.valueDeclaration,e.Diagnostics.Cannot_redeclare_identifier_0_in_catch_clause,t)})}Kp(n.block)}t.finallyBlock&&Kp(t.finallyBlock)}(t);case 230:return tf(t);case 180:return function(t){return function(t){if(t.dotDotDotToken){if(t!==e.last(t.parent.elements))return Hm(t,e.Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern);if(179===t.name.kind||178===t.name.kind)return Hm(t.name,e.Diagnostics.A_rest_element_cannot_contain_a_binding_pattern);if(t.propertyName)return Hm(t.name,e.Diagnostics.A_rest_element_cannot_have_a_property_name);t.initializer&&Wm(t,t.initializer.pos-1,1,e.Diagnostics.A_rest_element_cannot_have_an_initializer)}}(t),Zp(t)}(t);case 233:return function(t){t.name||e.hasModifier(t,512)||qm(t,e.Diagnostics.A_class_declaration_without_the_default_modifier_must_have_a_name),yf(t),e.forEach(t.members,If),Mp(t)}(t);case 234:return function(t){if(Tm(t)||function(t){var n=!1;if(t.heritageClauses)for(var r=0,i=t.heritageClauses;r1&&e.forEach(r.declarations,function(t){e.isConstEnumDeclaration(t)!==n&&cn(e.getNameOfDeclaration(t),e.Diagnostics.Enum_declarations_must_all_be_const_or_non_const)});var a=!1;e.forEach(r.declarations,function(t){if(236!==t.kind)return!1;var n=t;if(!n.members.length)return!1;var r=n.members[0];r.initializer||(a?cn(r.name,e.Diagnostics.In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element):a=!0)})}}}(t);case 237:return function(t){if(i){var n=e.isGlobalScopeAugmentation(t),r=2097152&t.flags;n&&!r&&cn(t.name,e.Diagnostics.Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context);var a=e.isAmbientModule(t);if(Af(t,a?e.Diagnostics.An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file:e.Diagnostics.A_namespace_declaration_is_only_allowed_in_a_namespace_or_module))return;Tm(t)||r||9!==t.name.kind||Hm(t.name,e.Diagnostics.Only_ambient_modules_can_use_quoted_names),e.isIdentifier(t.name)&&(Vp(t,t.name),Xp(t,t.name),Qp(t,t.name)),kp(t);var o=ir(t);if(512&o.flags&&o.declarations.length>1&&!r&&l(t,C.preserveConstEnums||C.isolatedModules)){var s=function(t){for(var n=0,r=t.declarations;n=e.ModuleKind.ES2015&&!(2097152&t.flags)&&Hm(t,e.Diagnostics.Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead)}(t);case 248:return function(t){if(!Af(t,e.Diagnostics.An_export_declaration_can_only_be_used_in_a_module)&&(!Tm(t)&&e.hasModifiers(t)&&qm(t,e.Diagnostics.An_export_declaration_cannot_have_modifiers),!t.moduleSpecifier||Tf(t)))if(t.exportClause){e.forEach(t.exportClause.elements,Pf);var n=238===t.parent.kind&&e.isAmbientModule(t.parent.parent);272===t.parent.kind||n||!n&&238===t.parent.kind&&!t.moduleSpecifier&&2097152&t.flags||cn(t,e.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace)}else{var r=Vn(t,t.moduleSpecifier);r&&Qn(r)&&cn(t.moduleSpecifier,e.Diagnostics.Module_0_uses_export_and_cannot_be_used_with_export_Asterisk,Cr(r)),E!==e.ModuleKind.System&&E!==e.ModuleKind.ES2015&&E!==e.ModuleKind.ESNext&&Dm(t,32768)}}(t);case 247:return function(t){if(!Af(t,e.Diagnostics.An_export_assignment_can_only_be_used_in_a_module)){var n=272===t.parent.kind?t.parent:t.parent.parent;237!==n.kind||e.isAmbientModule(n)?(!Tm(t)&&e.hasModifiers(t)&&qm(t,e.Diagnostics.An_export_assignment_cannot_have_modifiers),71===t.expression.kind?(zn(t),C.declaration&&Mr(t.expression,!0)):Yd(t.expression),wf(n),2097152&t.flags&&!e.isEntityNameExpression(t.expression)&&Hm(t.expression,e.Diagnostics.The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context),!t.isExportEquals||2097152&t.flags||(E>=e.ModuleKind.ES2015?Hm(t,e.Diagnostics.Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or_another_module_format_instead):E===e.ModuleKind.System&&Hm(t,e.Diagnostics.Export_assignment_is_not_supported_when_module_flag_is_system))):cn(t,t.isExportEquals?e.Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace:e.Diagnostics.A_default_export_can_only_be_used_in_an_ECMAScript_style_module)}}(t);case 213:case 229:return void Gm(t);case 251:return function(e){Fp(e)}(t)}}}function Of(t){e.isInJavaScriptFile(t)||Hm(t,e.Diagnostics.JSDoc_types_can_only_be_used_inside_documentation_comments)}function Mf(e){et&&et.push(e)}function Lf(t){e.performance.mark("beforeCheck"),function(t){var n=hn(t);if(!(1&n.flags)){if(C.skipLibCheck&&t.isDeclarationFile||C.skipDefaultLibCheck&&t.hasNoDefaultLib)return;!function(t){2097152&t.flags&&function(t){for(var n=0,r=t.statements;n0?e.concatenate(o,a):a}return e.forEach(r.getSourceFiles(),Lf),Lt.getDiagnostics()}(t)}finally{p=void 0}}function Bf(){if(!i)throw new Error("Trying to get diagnostics from a type checker that does not produce them.")}function zf(e){switch(e.kind){case 147:case 233:case 234:case 235:case 236:return!0}}function jf(e){for(var t=e;t.parent&&145===t.parent.kind;)t=t.parent;return t.parent&&161===t.parent.kind}function Jf(t,n){for(var r;(t=e.getContainingClass(t))&&!(r=n(t)););return r}function Kf(e,t){return!!Jf(e,function(e){return e===t})}function Uf(e){return void 0!==function(e){for(;145===e.parent.kind;)e=e.parent;return 241===e.parent.kind?e.parent.moduleReference===e&&e.parent:247===e.parent.kind?e.parent.expression===e&&e.parent:void 0}(e)}function Vf(t){if(e.isDeclarationName(t))return ir(t.parent);if(e.isInJavaScriptFile(t)&&183===t.parent.kind&&t.parent===t.parent.parent.left){var n=function(t){switch(e.getSpecialPropertyAssignmentKind(t.parent.parent)){case 1:case 3:return ir(t.parent);case 4:case 2:case 5:return ir(t.parent.parent)}}(t);if(n)return n}if(247===t.parent.kind&&e.isEntityNameExpression(t))return Un(t,70107135);if(183!==t.kind&&Uf(t)){var r=e.getAncestor(t,241);return e.Debug.assert(void 0!==r),Jn(t,!0)}if(e.isRightSideOfQualifiedNameOrPropertyAccess(t)&&(t=t.parent),function(e){for(var t=e;t.parent&&183===t.parent.kind;)t=t.parent;return t.parent&&205===t.parent.kind}(t)){var i=0;205===t.parent.kind?(i=67901928,e.isExpressionWithTypeArgumentsInClassExtendsClause(t.parent)&&(i|=67216319)):i=1920,i|=2097152;var a=e.isEntityNameExpression(t)?Un(t,i):void 0;if(a)return a}if(287===t.parent.kind)return e.getParameterSymbolFromJSDoc(t.parent);if(147===t.parent.kind&&290===t.parent.parent.kind){e.Debug.assert(!e.isInJavaScriptFile(t));var o=e.getTypeParameterFromJsDoc(t.parent);return o&&o.symbol}if(e.isExpressionNode(t)){if(e.nodeIsMissing(t))return;if(71===t.kind){if(e.isJSXTagName(t)&&s_(t)){var s=d_(t.parent);return s===X?void 0:s}return Un(t,67216319,!1,!0)}if(183===t.kind||145===t.kind){var c=hn(t);return c.resolvedSymbol?c.resolvedSymbol:(183===t.kind?P_(t):w_(t),c.resolvedSymbol)}}else{if(jf(t))return Un(t,i=161===t.parent.kind?67901928:1920,!1,!0);if(260===t.parent.kind)return Oa(s_((l=(u=t.parent).parent.parent).tagName)?h_(l):v_(l,!1),u.name.escapedText)||X}var u,l;return 160===t.parent.kind?Un(t,1):void 0}function qf(t){if(272===t.kind)return e.isExternalModule(t)?rr(t.symbol):void 0;if(!(4194304&t.flags)){if(_(t))return ir(t.parent);if(e.isLiteralComputedPropertyDeclarationName(t))return ir(t.parent.parent);if(71===t.kind){if(Uf(t))return Vf(t);if(180===t.parent.kind&&178===t.parent.parent.kind&&t===t.parent.propertyName){var n=Wf(t.parent.parent),r=n&&Oa(n,t.escapedText);if(r)return r}}switch(t.kind){case 71:case 183:case 145:return Vf(t);case 99:var i=e.getThisContainer(t,!1);if(e.isFunctionLike(i)){var a=Qa(i);if(a.thisParameter)return a.thisParameter}if(e.isInExpressionContext(t))return ap(t).symbol;case 173:return Ks(t).symbol;case 97:return ap(t).symbol;case 123:var o=t.parent;return o&&154===o.kind?o.parent.symbol:void 0;case 9:case 13:if(e.isExternalModuleImportEqualsDeclaration(t.parent.parent)&&e.getExternalModuleImportEqualsDeclarationExpression(t.parent.parent)===t||(242===t.parent.kind||248===t.parent.kind)&&t.parent.moduleSpecifier===t||e.isInJavaScriptFile(t)&&e.isRequireCall(t.parent,!1)||e.isImportCall(t.parent))return Vn(t,t);case 8:var s=e.isElementAccessExpression(t.parent)?t.parent.argumentExpression===t?ip(t.parent.expression):void 0:e.isLiteralTypeNode(t.parent)&&e.isIndexedAccessTypeNode(t.parent.parent)?Us(t.parent.parent.objectType):void 0;return s&&Oa(s,e.escapeLeadingUnderscores(t.text));case 79:case 89:case 36:return ir(t.parent);default:return}}}function Wf(t){if(4194304&t.flags)return ee;if(e.isPartOfTypeNode(t)){var n=Us(t);return n&&e.isExpressionWithTypeArgumentsInClassImplementsClause(t)&&(n=Xi(n,(r=Wf(e.getContainingClass(t))).thisType)),n}if(e.isExpressionNode(t))return Hf(t);if(e.isExpressionWithTypeArgumentsInClassExtendsClause(t)){var r,i=ki(r=wi(ir(e.getContainingClass(t))))[0];return i&&Xi(i,r.thisType)}var a,o;if(zf(t))return wi(o=ir(t));if(71===(a=t).kind&&zf(a.parent)&&a.parent.name===a)return(o=qf(t))&&wi(o);if(e.isDeclaration(t))return ci(o=ir(t));if(_(t))return(o=qf(t))&&ci(o);if(e.isBindingPattern(t))return Qr(t.parent,!0);if(Uf(t)&&(o=qf(t))){var s=wi(o);return s!==ee?s:ci(o)}return ee}function Hf(t){return e.isRightSideOfQualifiedNameOrPropertyAccess(t)&&(t=t.parent),zs(ip(t))}function Gf(t){t=Pa(t);var n=e.createSymbolTable(ha(t));return Xf(t)&&e.forEach(ha(Ae),function(e){n.has(e.escapedName)||n.set(e.escapedName,e)}),pr(n)}function Xf(t){return e.typeHasCallOrConstructSignatures(t,J)}function Qf(t){return!(e.isGeneratedIdentifier(t)||!(t=e.getParseTreeNode(t,e.isIdentifier))||183===t.parent.kind&&t.parent.name===t||vm(t)!==j)}function Yf(t){var n=Vn(t.parent,t);if(!n||e.isShorthandAmbientModuleSymbol(n))return!0;var r=Qn(n),i=yn(n=Gn(n));return void 0===i.exportsSomeValue&&(i.exportsSomeValue=r?!!(67216319&n.flags):e.forEachEntry(er(n),function(e){return(e=Rn(e))&&!!(67216319&e.flags)})),i.exportsSomeValue}function $f(t,n){if(t=e.getParseTreeNode(t,e.isIdentifier)){var r=vm(t,function(t){var n=t.parent;return n&&e.isModuleOrEnumDeclaration(n)&&t===n.name}(t));if(r){if(1048576&r.flags){var i=rr(r.exportSymbol);if(!n&&944&i.flags&&!(3&i.flags))return;r=i}var a=ar(r);if(a){if(512&a.flags&&272===a.valueDeclaration.kind){var o=a.valueDeclaration;return o!==e.getSourceFileOfNode(t)?void 0:o}return e.findAncestor(t.parent,function(t){return e.isModuleOrEnumDeclaration(t)&&ir(t)===a})}}}}function Zf(t){if(t=e.getParseTreeNode(t,e.isIdentifier)){var n=vm(t);if(Ln(n,67216319))return Pn(n)}}function em(t){if(418&t.flags){var n=yn(t);if(void 0===n.isDeclarationWithCollidingName){var r=e.getEnclosingBlockScopeContainer(t.valueDeclaration);if(e.isStatementWithLocals(r)){var i=hn(t.valueDeclaration);if(kn(r.parent,t.escapedName,67216319,void 0,void 0,!1))n.isDeclarationWithCollidingName=!0;else if(131072&i.flags){var a=262144&i.flags,o=e.isIterationStatement(r,!1),s=211===r.kind&&e.isIterationStatement(r.parent,!1);n.isDeclarationWithCollidingName=!(e.isBlockScopedContainerTopLevel(r)||a&&(o||s))}else n.isDeclarationWithCollidingName=!1}}return n.isDeclarationWithCollidingName}return!1}function tm(t){if(!e.isGeneratedIdentifier(t)&&(t=e.getParseTreeNode(t,e.isIdentifier))){var n=vm(t);if(n&&em(n))return n.valueDeclaration}}function nm(t){if(t=e.getParseTreeNode(t,e.isDeclaration)){var n=ir(t);if(n)return em(n)}return!1}function rm(t){switch(t.kind){case 241:case 243:case 244:case 246:case 250:return am(ir(t)||X);case 248:var n=t.exportClause;return n&&e.forEach(n.elements,rm);case 247:return!t.expression||71!==t.expression.kind||am(ir(t)||X)}return!1}function im(t){return!(void 0===(t=e.getParseTreeNode(t,e.isImportEqualsDeclaration))||272!==t.parent.kind||!e.isInternalModuleImportEqualsDeclaration(t))&&am(ir(t))&&t.moduleReference&&!e.nodeIsMissing(t.moduleReference)}function am(e){var t=Bn(e);return t===X||67216319&t.flags&&(C.preserveConstEnums||!om(t))}function om(e){return Ud(e)||e.constEnumOnlyModule}function sm(t){if(e.nodeIsPresent(t.body)){var n=$a(ir(t));return n.length>1||1===n.length&&n[0].declaration!==t}return!1}function cm(t){return P&&!qa(t)&&t.initializer&&!e.hasModifier(t,92)}function um(t){return P&&qa(t)&&!t.initializer&&e.hasModifier(t,92)}function lm(e){return hn(e).flags}function _m(e){return kf(e.parent),hn(e).enumMemberValue}function dm(e){switch(e.kind){case 271:case 183:case 184:return!0}return!1}function pm(t){if(271===t.kind)return _m(t);var n=hn(t).resolvedSymbol;return n&&8&n.flags&&e.isConstEnumDeclaration(n.valueDeclaration.parent)?_m(n.valueDeclaration):void 0}function fm(t,n){if(!(t=e.getParseTreeNode(t,e.isEntityName)))return e.TypeReferenceSerializationKind.Unknown;if(n&&!(n=e.getParseTreeNode(n)))return e.TypeReferenceSerializationKind.Unknown;var r=Un(t,67216319,!0,!1,n),i=Un(t,67901928,!0,!1,n);if(r&&r===i){var a=Ko(!1);if(a&&r===a)return e.TypeReferenceSerializationKind.Promise;var o=ci(r);if(o&&yi(o))return e.TypeReferenceSerializationKind.TypeWithConstructSignatureAndValue}if(!i)return e.TypeReferenceSerializationKind.ObjectType;var s=wi(i);return s===ee?e.TypeReferenceSerializationKind.Unknown:1&s.flags?e.TypeReferenceSerializationKind.ObjectType:jd(s,30720)?e.TypeReferenceSerializationKind.VoidNullableOrNeverType:jd(s,136)?e.TypeReferenceSerializationKind.BooleanType:jd(s,84)?e.TypeReferenceSerializationKind.NumberLikeType:jd(s,524322)?e.TypeReferenceSerializationKind.StringLikeType:Zc(s)?e.TypeReferenceSerializationKind.ArrayLikeType:jd(s,1536)?e.TypeReferenceSerializationKind.ESSymbolType:function(e){return 65536&e.flags&&La(e,0).length>0}(s)?e.TypeReferenceSerializationKind.TypeWithCallSignature:Vc(s)?e.TypeReferenceSerializationKind.ArrayLikeType:e.TypeReferenceSerializationKind.ObjectType}function mm(e,t,n,r){var i=ir(e),a=!i||133120&i.flags?ee:Qc(ci(i));1024&a.flags&&a.symbol===i&&(n|=1048576),131072&n&&(a=au(a)),Er(a,t,1024|n,r)}function gm(e,t,n,r){Er(no(Qa(e)),t,1024|n,r)}function ym(e,t,n,r){Er(pu(Hf(e)),t,1024|n,r)}function hm(t){return _t.has(e.escapeLeadingUnderscores(t))}function vm(t,n){var r=hn(t).resolvedSymbol;if(r)return r;var i=t;if(n){var a=t.parent;e.isDeclaration(a)&&t===a.name&&(i=jr(a))}return kn(i,t.escapedText,70362047,void 0,void 0,!0)}function bm(t){if(!e.isGeneratedIdentifier(t)&&(t=e.getParseTreeNode(t,e.isIdentifier))){var n=vm(t);if(n)return or(n).valueDeclaration}}function xm(t){if(e.isConst(t)){var n=ci(ir(t));return!!(96&n.flags&&8388608&n.flags)}return!1}function km(t,n){var r=ci(ir(t));n.writeStringLiteral(function(t){return 32&t.flags?'"'+e.escapeString(t.value)+'"':""+t.value}(r))}function Sm(t){var n=e.getExternalModuleName(t),r=qn(n,n,void 0);if(r)return e.getDeclarationOfKind(r,272)}function Dm(t,n){if((f&n)!==n&&C.importHelpers){var r=e.getSourceFileOfNode(t);if(e.isEffectiveExternalModule(r,C)&&!(2097152&t.flags)){var i=(m||(m=Wn(r,e.externalHelpersModuleNameText,e.Diagnostics.This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found,t)||X),m);if(i!==X)for(var a=n&~f,o=1;o<=65536;o<<=1)if(a&o){var s=Cm(o);bn(i.exports,e.escapeLeadingUnderscores(s),67216319)||cn(t,e.Diagnostics.This_syntax_requires_an_imported_helper_named_1_but_module_0_has_no_exported_member_1,e.externalHelpersModuleNameText,s)}f|=n}}}function Cm(t){switch(t){case 1:return"__extends";case 2:return"__assign";case 4:return"__rest";case 8:return"__decorate";case 16:return"__metadata";case 32:return"__param";case 64:return"__awaiter";case 128:return"__generator";case 256:return"__values";case 512:return"__read";case 1024:return"__spread";case 2048:return"__await";case 4096:return"__asyncGenerator";case 8192:return"__asyncDelegator";case 16384:return"__asyncValues";case 32768:return"__exportStar";case 65536:return"__makeTemplateObject";default:e.Debug.fail("Unrecognized helper")}}function Tm(t){return function(t){if(!t.decorators)return!1;if(!e.nodeCanBeDecorated(t,t.parent,t.parent.parent))return 153!==t.kind||e.nodeIsPresent(t.body)?qm(t,e.Diagnostics.Decorators_are_not_valid_here):qm(t,e.Diagnostics.A_decorator_can_only_decorate_a_method_implementation_not_an_overload);if(155===t.kind||156===t.kind){var n=e.getAllAccessorDeclarations(t.parent.members,t);if(n.firstAccessor.decorators&&t===n.secondAccessor)return qm(t,e.Diagnostics.Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name)}return!1}(t)||function(t){var n,r,i,a,o=function(t){return!!t.modifiers&&(function(t){switch(t.kind){case 155:case 156:case 154:case 151:case 150:case 153:case 152:case 159:case 237:case 242:case 241:case 248:case 247:case 190:case 191:case 148:return!1;default:if(238===t.parent.kind||272===t.parent.kind)return!1;switch(t.kind){case 232:return Em(t,120);case 233:return Em(t,117);case 234:case 212:case 235:return!0;case 236:return Em(t,76);default:return e.Debug.fail(),!1}}}(t)?qm(t,e.Diagnostics.Modifiers_cannot_appear_here):void 0)}(t);if(void 0!==o)return o;for(var s=0,c=0,u=t.modifiers;c1||e.modifiers[0].kind!==t}function Nm(t){if(t&&t.hasTrailingComma){var n=t.end-",".length;return Wm(t[0],n,t.end-n,e.Diagnostics.Trailing_comma_not_allowed)}}function Am(t,n){if(t&&0===t.length){var r=t.pos-"<".length;return Wm(n,r,e.skipTrivia(n.text,t.end)+">".length-r,e.Diagnostics.Type_parameter_list_cannot_be_empty)}}function Pm(t){var n=e.getSourceFileOfNode(t);return Tm(t)||Am(t.typeParameters,n)||function(t){for(var n=!1,r=t.length,i=0;i".length-i,e.Diagnostics.Type_argument_list_cannot_be_empty)}}(t,n)}function Fm(t){return function(t){if(t)for(var n=0,r=t;n1)return qm(n.declarations[1],219===t.kind?e.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement:e.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement);var i=r[0];if(i.initializer)return Hm(i.name,219===t.kind?e.Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer:e.Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer);if(i.type)return Hm(i,219===t.kind?e.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation:e.Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation)}}return!1}function zm(t){if(t.parameters.length===(155===t.kind?1:2))return e.getThisParameter(t)}function jm(t,n){if(function(t){return e.isDynamicName(t)&&!Ji(t)}(t))return Hm(t,n)}function Jm(t){if(Pm(t))return!0;if(153===t.kind){if(182===t.parent.kind){if(t.modifiers&&(1!==t.modifiers.length||120!==e.first(t.modifiers).kind))return qm(t,e.Diagnostics.Modifiers_cannot_appear_here);if(Rm(t.questionToken,e.Diagnostics.An_object_member_cannot_be_declared_optional))return!0;if(void 0===t.body)return Wm(t,t.end-1,";".length,e.Diagnostics._0_expected,"{")}if(Lm(t))return!0}if(e.isClassLike(t.parent)){if(2097152&t.flags)return jm(t.name,e.Diagnostics.A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type);if(153===t.kind&&!t.body)return jm(t.name,e.Diagnostics.A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type)}else{if(234===t.parent.kind)return jm(t.name,e.Diagnostics.A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type);if(165===t.parent.kind)return jm(t.name,e.Diagnostics.A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type)}}function Km(e){return 9===e.kind||8===e.kind||196===e.kind&&38===e.operator&&8===e.operand.kind}function Um(t){var n=t.declarations;return!!Nm(t.declarations)||(t.declarations.length?void 0:Wm(t,n.pos,n.end-n.pos,e.Diagnostics.Variable_declaration_list_cannot_be_empty))}function Vm(e){return e.parseDiagnostics.length>0}function qm(t,n,r,i,a){var o=e.getSourceFileOfNode(t);if(!Vm(o)){var s=e.getSpanOfTokenAtPosition(o,t.pos);return Lt.add(e.createFileDiagnostic(o,s.start,s.length,n,r,i,a)),!0}}function Wm(t,n,r,i,a,o,s){var c=e.getSourceFileOfNode(t);if(!Vm(c))return Lt.add(e.createFileDiagnostic(c,n,r,i,a,o,s)),!0}function Hm(t,n,r,i,a){if(!Vm(e.getSourceFileOfNode(t)))return Lt.add(e.createDiagnosticForNode(t,n,r,i,a)),!0}function Gm(t){if(2097152&t.flags){if(e.isAccessor(t.parent))return hn(t).hasReportedStatementInAmbientContext=!0;if(!hn(t).hasReportedStatementInAmbientContext&&e.isFunctionLike(t.parent))return hn(t).hasReportedStatementInAmbientContext=qm(t,e.Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts);if(211===t.parent.kind||238===t.parent.kind||272===t.parent.kind){var n=hn(t.parent);if(!n.hasReportedStatementInAmbientContext)return n.hasReportedStatementInAmbientContext=qm(t,e.Diagnostics.Statements_are_not_allowed_in_ambient_contexts)}}}function Xm(t){if(32&t.numericLiteralFlags){var n=void 0;if(T>=1?n=e.Diagnostics.Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0:e.isChildOfNodeWithKind(t,177)?n=e.Diagnostics.Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0:e.isChildOfNodeWithKind(t,271)&&(n=e.Diagnostics.Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0),n){var r=e.isPrefixUnaryExpression(t.parent)&&38===t.parent.operator;return Hm(r?t.parent:t,n,(r?"-":"")+"0o"+t.text)}}}},function(e){e.JSX="JSX",e.IntrinsicElements="IntrinsicElements",e.ElementClass="ElementClass",e.ElementAttributesPropertyNameContainer="ElementAttributesProperty",e.ElementChildrenAttributeNameContainer="ElementChildrenAttribute",e.Element="Element",e.IntrinsicAttributes="IntrinsicAttributes",e.IntrinsicClassAttributes="IntrinsicClassAttributes"}(t||(t={}))}(l||(l={})),function(e){function t(t){var n=e.createNode(t,-1,-1);return n.flags|=8,n}function n(t,n){return t!==n&&(Lt(t,n),Pt(t,n),e.aggregateTransformFlags(t)),t}function r(t,n){if(t){if(e.isNodeArray(t))return t}else t=[];var r=t;return r.pos=-1,r.end=-1,r.hasTrailingComma=n,r}function i(e){if(void 0!==e){var n=t(e.kind);for(var r in n.flags|=e.flags,Lt(n,e),e)!n.hasOwnProperty(r)&&e.hasOwnProperty(r)&&(n[r]=e[r]);return n}}function a(t){return"number"==typeof t?o(t+""):"boolean"==typeof t?t?d():p():e.isString(t)?s(t):((r=s(e.getTextOfIdentifierOrLiteral(n=t))).textSourceNode=n,r);var n,r}function o(e){var n=t(8);return n.text=e,n.numericLiteralFlags=0,n}function s(e){var n=t(9);return n.text=e,n}function c(n,i){var a=t(71);return a.escapedText=e.escapeLeadingUnderscores(n),a.originalKeywordKind=n?e.stringToToken(n):0,a.autoGenerateFlags=0,a.autoGenerateId=0,i&&(a.typeArguments=r(i)),a}e.updateNode=n,e.createNodeArray=r,e.getSynthesizedClone=i,e.createLiteral=a,e.createNumericLiteral=o,e.createIdentifier=c,e.updateIdentifier=function(t,r){return t.typeArguments!==r?n(c(e.idText(t),r),t):t};var u,l=0;function _(e){return t(e)}function d(){return t(101)}function p(){return t(86)}function f(e,n){var r=t(145);return r.left=e,r.right=Et(n),r}function m(n){var r=t(146);return r.expression=function(t){return e.isBinaryExpression(t)&&26===t.operatorToken.kind||296===t.kind?te(t):t}(n),r}function g(e,n,r){var i=t(147);return i.name=Et(e),i.constraint=n,i.default=r,i}function y(n,r,i,a,o,s,c){var u=t(148);return u.decorators=Nt(n),u.modifiers=Nt(r),u.dotDotDotToken=i,u.name=Et(a),u.questionToken=o,u.type=s,u.initializer=c?e.parenthesizeExpressionForList(c):void 0,u}function h(n){var r=t(149);return r.expression=e.parenthesizeForAccess(n),r}function v(e,n,r,i,a){var o=t(150);return o.modifiers=Nt(e),o.name=Et(n),o.questionToken=r,o.type=i,o.initializer=a,o}function b(e,n,r,i,a,o){var s=t(151);return s.decorators=Nt(e),s.modifiers=Nt(n),s.name=Et(r),s.questionToken=void 0!==i&&55===i.kind?i:void 0,s.exclamationToken=void 0!==i&&51===i.kind?i:void 0,s.type=a,s.initializer=o,s}function x(e,t,n,r,i){var a=E(152,e,t,n);return a.name=Et(r),a.questionToken=i,a}function k(e,n,i,a,o,s,c,u,l){var _=t(153);return _.decorators=Nt(e),_.modifiers=Nt(n),_.asteriskToken=i,_.name=Et(a),_.questionToken=o,_.typeParameters=Nt(s),_.parameters=r(c),_.type=u,_.body=l,_}function S(e,n,i,a){var o=t(154);return o.decorators=Nt(e),o.modifiers=Nt(n),o.typeParameters=void 0,o.parameters=r(i),o.type=void 0,o.body=a,o}function D(e,n,i,a,o,s){var c=t(155);return c.decorators=Nt(e),c.modifiers=Nt(n),c.name=Et(i),c.typeParameters=void 0,c.parameters=r(a),c.type=o,c.body=s,c}function C(e,n,i,a,o){var s=t(156);return s.decorators=Nt(e),s.modifiers=Nt(n),s.name=Et(i),s.typeParameters=void 0,s.parameters=r(a),s.body=o,s}function T(e,n,i,a){var o=t(159);return o.decorators=Nt(e),o.modifiers=Nt(n),o.parameters=r(i),o.type=a,o}function E(e,n,r,i,a){var o=t(e);return o.typeParameters=Nt(n),o.parameters=Nt(r),o.type=i,o.typeArguments=Nt(a),o}function N(e,t,r,i){return e.typeParameters!==t||e.parameters!==r||e.type!==i?n(E(e.kind,t,r,i),e):e}function A(e,n){var r=t(160);return r.parameterName=Et(e),r.type=n,r}function P(n,r){var i=t(161);return i.typeName=Et(n),i.typeArguments=r&&e.parenthesizeTypeParameters(r),i}function w(e){var n=t(164);return n.exprName=e,n}function F(e){var n=t(165);return n.members=r(e),n}function I(n){var r=t(166);return r.elementType=e.parenthesizeArrayTypeMember(n),r}function O(e){var n=t(167);return n.elementTypes=r(e),n}function M(n,r){var i=t(n);return i.types=e.parenthesizeElementTypeMembers(r),i}function L(e,t){return e.types!==t?n(M(e.kind,t),e):e}function R(n,r,i,a){var o=t(170);return o.checkType=e.parenthesizeConditionalTypeMember(n),o.extendsType=e.parenthesizeConditionalTypeMember(r),o.trueType=i,o.falseType=a,o}function B(e){var n=t(171);return n.typeParameter=e,n}function z(e){var n=t(172);return n.type=e,n}function j(n,r){var i=t(174);return i.operator="number"==typeof n?n:128,i.type=e.parenthesizeElementTypeMember("number"==typeof n?r:n),i}function J(n,r){var i=t(175);return i.objectType=e.parenthesizeElementTypeMember(n),i.indexType=r,i}function K(e,n,r,i){var a=t(176);return a.readonlyToken=e,a.typeParameter=n,a.questionToken=r,a.type=i,a}function U(e){var n=t(177);return n.literal=e,n}function V(e){var n=t(178);return n.elements=r(e),n}function q(e){var n=t(179);return n.elements=r(e),n}function W(e,n,r,i){var a=t(180);return a.dotDotDotToken=e,a.propertyName=Et(n),a.name=Et(r),a.initializer=i,a}function H(n,i){var a=t(181);return a.elements=e.parenthesizeListElements(r(n)),i&&(a.multiLine=!0),a}function G(e,n){var i=t(182);return i.properties=r(e),n&&(i.multiLine=!0),i}function X(n,r){var i=t(183);return i.expression=e.parenthesizeForAccess(n),i.name=Et(r),wt(i,131072),i}function Q(n,r){var i,o=t(184);return o.expression=e.parenthesizeForAccess(n),o.argumentExpression=e.isString(i=r)||"number"==typeof i?a(i):i,o}function Y(n,i,a){var o=t(185);return o.expression=e.parenthesizeForAccess(n),o.typeArguments=Nt(i),o.arguments=e.parenthesizeListElements(r(a)),o}function $(n,i,a){var o=t(186);return o.expression=e.parenthesizeForNew(n),o.typeArguments=Nt(i),o.arguments=a?e.parenthesizeListElements(r(a)):void 0,o}function Z(n,r){var i=t(187);return i.tag=e.parenthesizeForAccess(n),i.template=r,i}function ee(n,r){var i=t(188);return i.type=n,i.expression=e.parenthesizePrefixOperand(r),i}function te(e){var n=t(189);return n.expression=e,n}function ne(e,n,i,a,o,s,c){var u=t(190);return u.modifiers=Nt(e),u.asteriskToken=n,u.name=Et(i),u.typeParameters=Nt(a),u.parameters=r(o),u.type=s,u.body=c,u}function re(n,i,a,o,s,c){var u=t(191);return u.modifiers=Nt(n),u.typeParameters=Nt(i),u.parameters=r(a),u.type=o,u.equalsGreaterThanToken=s||_(36),u.body=e.parenthesizeConciseBody(c),u}function ie(n){var r=t(192);return r.expression=e.parenthesizePrefixOperand(n),r}function ae(n){var r=t(193);return r.expression=e.parenthesizePrefixOperand(n),r}function oe(n){var r=t(194);return r.expression=e.parenthesizePrefixOperand(n),r}function se(n){var r=t(195);return r.expression=e.parenthesizePrefixOperand(n),r}function ce(n,r){var i=t(196);return i.operator=n,i.operand=e.parenthesizePrefixOperand(r),i}function ue(n,r){var i=t(197);return i.operand=e.parenthesizePostfixOperand(n),i.operator=r,i}function le(n,r,i){var a,o=t(198),s="number"==typeof(a=r)?_(a):a,c=s.kind;return o.left=e.parenthesizeBinaryOperand(c,n,!0,void 0),o.operatorToken=s,o.right=e.parenthesizeBinaryOperand(c,i,!1,o.left),o}function _e(n,r,i,a,o){var s=t(199);return s.condition=e.parenthesizeForConditionalHead(n),s.questionToken=o?r:_(55),s.whenTrue=e.parenthesizeSubexpressionOfConditionalExpression(o?i:r),s.colonToken=o?a:_(56),s.whenFalse=e.parenthesizeSubexpressionOfConditionalExpression(o||i),s}function de(e,n){var i=t(200);return i.head=e,i.templateSpans=r(n),i}function pe(e,n){var r=t(201);return r.asteriskToken=e&&39===e.kind?e:void 0,r.expression=e&&39!==e.kind?e:n,r}function fe(n){var r=t(202);return r.expression=e.parenthesizeExpressionForList(n),r}function me(e,n,i,a,o){var s=t(203);return s.decorators=void 0,s.modifiers=Nt(e),s.name=Et(n),s.typeParameters=Nt(i),s.heritageClauses=Nt(a),s.members=r(o),s}function ge(n,r){var i=t(205);return i.expression=e.parenthesizeForAccess(r),i.typeArguments=Nt(n),i}function ye(e,n){var r=t(206);return r.expression=e,r.type=n,r}function he(n){var r=t(207);return r.expression=e.parenthesizeForAccess(n),r}function ve(e,n){var r=t(208);return r.keywordToken=e,r.name=n,r}function be(e,n){var r=t(209);return r.expression=e,r.literal=n,r}function xe(e,n){var i=t(211);return i.statements=r(e),n&&(i.multiLine=n),i}function ke(n,r){var i=t(212);return i.decorators=void 0,i.modifiers=Nt(n),i.declarationList=e.isArray(r)?ze(r):r,i}function Se(n){var r=t(214);return r.expression=e.parenthesizeExpressionForExpressionStatement(n),r}function De(e,n,r){var i=t(215);return i.expression=e,i.thenStatement=n,i.elseStatement=r,i}function Ce(e,n){var r=t(216);return r.statement=e,r.expression=n,r}function Te(e,n){var r=t(217);return r.expression=e,r.statement=n,r}function Ee(e,n,r,i){var a=t(218);return a.initializer=e,a.condition=n,a.incrementor=r,a.statement=i,a}function Ne(e,n,r){var i=t(219);return i.initializer=e,i.expression=n,i.statement=r,i}function Ae(e,n,r,i){var a=t(220);return a.awaitModifier=e,a.initializer=n,a.expression=r,a.statement=i,a}function Pe(e){var n=t(221);return n.label=Et(e),n}function we(e){var n=t(222);return n.label=Et(e),n}function Fe(e){var n=t(223);return n.expression=e,n}function Ie(e,n){var r=t(224);return r.expression=e,r.statement=n,r}function Oe(n,r){var i=t(225);return i.expression=e.parenthesizeExpressionForList(n),i.caseBlock=r,i}function Me(e,n){var r=t(226);return r.label=Et(e),r.statement=n,r}function Le(e){var n=t(227);return n.expression=e,n}function Re(e,n,r){var i=t(228);return i.tryBlock=e,i.catchClause=n,i.finallyBlock=r,i}function Be(n,r,i){var a=t(230);return a.name=Et(n),a.type=r,a.initializer=void 0!==i?e.parenthesizeExpressionForList(i):void 0,a}function ze(e,n){var i=t(231);return i.flags|=3&n,i.declarations=r(e),i}function je(e,n,i,a,o,s,c,u){var l=t(232);return l.decorators=Nt(e),l.modifiers=Nt(n),l.asteriskToken=i,l.name=Et(a),l.typeParameters=Nt(o),l.parameters=r(s),l.type=c,l.body=u,l}function Je(e,n,i,a,o,s){var c=t(233);return c.decorators=Nt(e),c.modifiers=Nt(n),c.name=Et(i),c.typeParameters=Nt(a),c.heritageClauses=Nt(o),c.members=r(s),c}function Ke(e,n,i,a,o,s){var c=t(234);return c.decorators=Nt(e),c.modifiers=Nt(n),c.name=Et(i),c.typeParameters=Nt(a),c.heritageClauses=Nt(o),c.members=r(s),c}function Ue(e,n,r,i,a){var o=t(235);return o.decorators=Nt(e),o.modifiers=Nt(n),o.name=Et(r),o.typeParameters=Nt(i),o.type=a,o}function Ve(e,n,i,a){var o=t(236);return o.decorators=Nt(e),o.modifiers=Nt(n),o.name=Et(i),o.members=r(a),o}function qe(e,n,r,i,a){var o=t(237);return o.flags|=532&a,o.decorators=Nt(e),o.modifiers=Nt(n),o.name=r,o.body=i,o}function We(e){var n=t(238);return n.statements=r(e),n}function He(e){var n=t(239);return n.clauses=r(e),n}function Ge(e){var n=t(240);return n.name=Et(e),n}function Xe(e,n,r,i){var a=t(241);return a.decorators=Nt(e),a.modifiers=Nt(n),a.name=Et(r),a.moduleReference=i,a}function Qe(e,n,r,i){var a=t(242);return a.decorators=Nt(e),a.modifiers=Nt(n),a.importClause=r,a.moduleSpecifier=i,a}function Ye(e,n){var r=t(243);return r.name=e,r.namedBindings=n,r}function $e(e){var n=t(244);return n.name=e,n}function Ze(e){var n=t(245);return n.elements=r(e),n}function et(e,n){var r=t(246);return r.propertyName=e,r.name=n,r}function tt(n,r,i,a){var o=t(247);return o.decorators=Nt(n),o.modifiers=Nt(r),o.isExportEquals=i,o.expression=i?e.parenthesizeBinaryOperand(58,a,!1,void 0):e.parenthesizeDefaultExpression(a),o}function nt(e,n,r,i){var a=t(248);return a.decorators=Nt(e),a.modifiers=Nt(n),a.exportClause=r,a.moduleSpecifier=i,a}function rt(e){var n=t(249);return n.elements=r(e),n}function it(e,n){var r=t(250);return r.propertyName=Et(e),r.name=Et(n),r}function at(e){var n=t(252);return n.expression=e,n}function ot(e,n,i){var a=t(253);return a.openingElement=e,a.children=r(n),a.closingElement=i,a}function st(e,n){var r=t(254);return r.tagName=e,r.attributes=n,r}function ct(e,n){var r=t(255);return r.tagName=e,r.attributes=n,r}function ut(e){var n=t(256);return n.tagName=e,n}function lt(e,n,i){var a=t(257);return a.openingFragment=e,a.children=r(n),a.closingFragment=i,a}function _t(e,n){var r=t(260);return r.name=e,r.initializer=n,r}function dt(e){var n=t(261);return n.properties=r(e),n}function pt(e){var n=t(262);return n.expression=e,n}function ft(e,n){var r=t(263);return r.dotDotDotToken=e,r.expression=n,r}function mt(n,i){var a=t(264);return a.expression=e.parenthesizeExpressionForList(n),a.statements=r(i),a}function gt(e){var n=t(265);return n.statements=r(e),n}function yt(e,n){var i=t(266);return i.token=e,i.types=r(n),i}function ht(n,r){var i=t(267);return i.variableDeclaration=e.isString(n)?Be(n):n,i.block=r,i}function vt(n,r){var i=t(268);return i.name=Et(n),i.questionToken=void 0,i.initializer=e.parenthesizeExpressionForList(r),i}function bt(n,r){var i=t(269);return i.name=Et(n),i.objectAssignmentInitializer=void 0!==r?e.parenthesizeExpressionForList(r):void 0,i}function xt(n){var r=t(270);return r.expression=void 0!==n?e.parenthesizeExpressionForList(n):void 0,r}function kt(n,r){var i=t(271);return i.name=Et(n),i.initializer=r&&e.parenthesizeExpressionForList(r),i}function St(e,n){var r=t(295);return r.expression=e,r.original=n,Pt(r,n),r}function Dt(t){if(e.nodeIsSynthesized(t)&&!e.isParseTreeNode(t)&&!t.original&&!t.emitNode&&!t.id){if(296===t.kind)return t.elements;if(e.isBinaryExpression(t)&&26===t.operatorToken.kind)return[t.left,t.right]}return t}function Ct(n){var i=t(296);return i.elements=r(e.sameFlatMap(n,Dt)),i}function Tt(t){var n=e.createNode(273);return n.sourceFiles=t,n}function Et(t){return e.isString(t)?c(t):t}function Nt(e){return e?r(e):void 0}function At(t){if(!t.emitNode){if(e.isParseTreeNode(t)){if(272===t.kind)return t.emitNode={annotatedNodes:[t]};At(e.getSourceFileOfNode(t)).annotatedNodes.push(t)}t.emitNode={}}return t.emitNode}function Pt(e,t){return t&&(e.pos=t.pos,e.end=t.end),e}function wt(e,t){return At(e).flags=t,e}function Ft(e){var t=e.emitNode;return t&&t.leadingComments}function It(e,t){return At(e).leadingComments=t,e}function Ot(e){var t=e.emitNode;return t&&t.trailingComments}function Mt(e,t){return At(e).trailingComments=t,e}function Lt(t,n){if(t.original=n,n){var r=n.emitNode;r&&(t.emitNode=(a=r.flags,o=r.leadingComments,s=r.trailingComments,c=r.commentRange,u=r.sourceMapRange,l=r.tokenSourceMapRanges,_=r.constantValue,d=r.helpers,p=r.startsOnNewLine,(i=t.emitNode)||(i={}),o&&(i.leadingComments=e.addRange(o.slice(),i.leadingComments)),s&&(i.trailingComments=e.addRange(s.slice(),i.trailingComments)),a&&(i.flags=a),c&&(i.commentRange=c),u&&(i.sourceMapRange=u),l&&(i.tokenSourceMapRanges=function(e,t){for(var n in t||(t=[]),e)t[n]=e[n];return t}(l,i.tokenSourceMapRanges)),void 0!==_&&(i.constantValue=_),d&&(i.helpers=e.addRange(i.helpers,d)),void 0!==p&&(i.startsOnNewLine=p),i))}var i,a,o,s,c,u,l,_,d,p;return t}e.createTempVariable=function(e,t){var n=c("");return n.autoGenerateFlags=1,n.autoGenerateId=l,l++,e&&e(n),t&&(n.autoGenerateFlags|=16),n},e.createLoopVariable=function(){var e=c("");return e.autoGenerateFlags=2,e.autoGenerateId=l,l++,e},e.createUniqueName=function(e){var t=c(e);return t.autoGenerateFlags=3,t.autoGenerateId=l,l++,t},e.getGeneratedNameForNode=function(e,t){var n=c("");return n.autoGenerateFlags=4,n.autoGenerateId=l,n.original=e,t&&(n.autoGenerateFlags|=8),l++,n},e.createToken=_,e.createSuper=function(){return t(97)},e.createThis=function(){return t(99)},e.createNull=function(){return t(95)},e.createTrue=d,e.createFalse=p,e.createQualifiedName=f,e.updateQualifiedName=function(e,t,r){return e.left!==t||e.right!==r?n(f(t,r),e):e},e.createComputedPropertyName=m,e.updateComputedPropertyName=function(e,t){return e.expression!==t?n(m(t),e):e},e.createTypeParameterDeclaration=g,e.updateTypeParameterDeclaration=function(e,t,r,i){return e.name!==t||e.constraint!==r||e.default!==i?n(g(t,r,i),e):e},e.createParameter=y,e.updateParameter=function(e,t,r,i,a,o,s,c){return e.decorators!==t||e.modifiers!==r||e.dotDotDotToken!==i||e.name!==a||e.questionToken!==o||e.type!==s||e.initializer!==c?n(y(t,r,i,a,o,s,c),e):e},e.createDecorator=h,e.updateDecorator=function(e,t){return e.expression!==t?n(h(t),e):e},e.createPropertySignature=v,e.updatePropertySignature=function(e,t,r,i,a,o){return e.modifiers!==t||e.name!==r||e.questionToken!==i||e.type!==a||e.initializer!==o?n(v(t,r,i,a,o),e):e},e.createProperty=b,e.updateProperty=function(e,t,r,i,a,o,s){return e.decorators!==t||e.modifiers!==r||e.name!==i||e.questionToken!==(void 0!==a&&55===a.kind?a:void 0)||e.exclamationToken!==(void 0!==a&&51===a.kind?a:void 0)||e.type!==o||e.initializer!==s?n(b(t,r,i,a,o,s),e):e},e.createMethodSignature=x,e.updateMethodSignature=function(e,t,r,i,a,o){return e.typeParameters!==t||e.parameters!==r||e.type!==i||e.name!==a||e.questionToken!==o?n(x(t,r,i,a,o),e):e},e.createMethod=k,e.updateMethod=function(e,t,r,i,a,o,s,c,u,l){return e.decorators!==t||e.modifiers!==r||e.asteriskToken!==i||e.name!==a||e.questionToken!==o||e.typeParameters!==s||e.parameters!==c||e.type!==u||e.body!==l?n(k(t,r,i,a,o,s,c,u,l),e):e},e.createConstructor=S,e.updateConstructor=function(e,t,r,i,a){return e.decorators!==t||e.modifiers!==r||e.parameters!==i||e.body!==a?n(S(t,r,i,a),e):e},e.createGetAccessor=D,e.updateGetAccessor=function(e,t,r,i,a,o,s){return e.decorators!==t||e.modifiers!==r||e.name!==i||e.parameters!==a||e.type!==o||e.body!==s?n(D(t,r,i,a,o,s),e):e},e.createSetAccessor=C,e.updateSetAccessor=function(e,t,r,i,a,o){return e.decorators!==t||e.modifiers!==r||e.name!==i||e.parameters!==a||e.body!==o?n(C(t,r,i,a,o),e):e},e.createCallSignature=function(e,t,n){return E(157,e,t,n)},e.updateCallSignature=function(e,t,n,r){return N(e,t,n,r)},e.createConstructSignature=function(e,t,n){return E(158,e,t,n)},e.updateConstructSignature=function(e,t,n,r){return N(e,t,n,r)},e.createIndexSignature=T,e.updateIndexSignature=function(e,t,r,i,a){return e.parameters!==i||e.type!==a||e.decorators!==t||e.modifiers!==r?n(T(t,r,i,a),e):e},e.createSignatureDeclaration=E,e.createKeywordTypeNode=function(e){return t(e)},e.createTypePredicateNode=A,e.updateTypePredicateNode=function(e,t,r){return e.parameterName!==t||e.type!==r?n(A(t,r),e):e},e.createTypeReferenceNode=P,e.updateTypeReferenceNode=function(e,t,r){return e.typeName!==t||e.typeArguments!==r?n(P(t,r),e):e},e.createFunctionTypeNode=function(e,t,n){return E(162,e,t,n)},e.updateFunctionTypeNode=function(e,t,n,r){return N(e,t,n,r)},e.createConstructorTypeNode=function(e,t,n){return E(163,e,t,n)},e.updateConstructorTypeNode=function(e,t,n,r){return N(e,t,n,r)},e.createTypeQueryNode=w,e.updateTypeQueryNode=function(e,t){return e.exprName!==t?n(w(t),e):e},e.createTypeLiteralNode=F,e.updateTypeLiteralNode=function(e,t){return e.members!==t?n(F(t),e):e},e.createArrayTypeNode=I,e.updateArrayTypeNode=function(e,t){return e.elementType!==t?n(I(t),e):e},e.createTupleTypeNode=O,e.updateTypleTypeNode=function(e,t){return e.elementTypes!==t?n(O(t),e):e},e.createUnionTypeNode=function(e){return M(168,e)},e.updateUnionTypeNode=function(e,t){return L(e,t)},e.createIntersectionTypeNode=function(e){return M(169,e)},e.updateIntersectionTypeNode=function(e,t){return L(e,t)},e.createUnionOrIntersectionTypeNode=M,e.createConditionalTypeNode=R,e.updateConditionalTypeNode=function(e,t,r,i,a){return e.checkType!==t||e.extendsType!==r||e.trueType!==i||e.falseType!==a?n(R(t,r,i,a),e):e},e.createInferTypeNode=B,e.updateInferTypeNode=function(e,t){return e.typeParameter!==t?n(B(t),e):e},e.createParenthesizedType=z,e.updateParenthesizedType=function(e,t){return e.type!==t?n(z(t),e):e},e.createThisTypeNode=function(){return t(173)},e.createTypeOperatorNode=j,e.updateTypeOperatorNode=function(e,t){return e.type!==t?n(j(e.operator,t),e):e},e.createIndexedAccessTypeNode=J,e.updateIndexedAccessTypeNode=function(e,t,r){return e.objectType!==t||e.indexType!==r?n(J(t,r),e):e},e.createMappedTypeNode=K,e.updateMappedTypeNode=function(e,t,r,i,a){return e.readonlyToken!==t||e.typeParameter!==r||e.questionToken!==i||e.type!==a?n(K(t,r,i,a),e):e},e.createLiteralTypeNode=U,e.updateLiteralTypeNode=function(e,t){return e.literal!==t?n(U(t),e):e},e.createObjectBindingPattern=V,e.updateObjectBindingPattern=function(e,t){return e.elements!==t?n(V(t),e):e},e.createArrayBindingPattern=q,e.updateArrayBindingPattern=function(e,t){return e.elements!==t?n(q(t),e):e},e.createBindingElement=W,e.updateBindingElement=function(e,t,r,i,a){return e.propertyName!==r||e.dotDotDotToken!==t||e.name!==i||e.initializer!==a?n(W(t,r,i,a),e):e},e.createArrayLiteral=H,e.updateArrayLiteral=function(e,t){return e.elements!==t?n(H(t,e.multiLine),e):e},e.createObjectLiteral=G,e.updateObjectLiteral=function(e,t){return e.properties!==t?n(G(t,e.multiLine),e):e},e.createPropertyAccess=X,e.updatePropertyAccess=function(t,r,i){return t.expression!==r||t.name!==i?n(wt(X(r,i),e.getEmitFlags(t)),t):t},e.createElementAccess=Q,e.updateElementAccess=function(e,t,r){return e.expression!==t||e.argumentExpression!==r?n(Q(t,r),e):e},e.createCall=Y,e.updateCall=function(e,t,r,i){return e.expression!==t||e.typeArguments!==r||e.arguments!==i?n(Y(t,r,i),e):e},e.createNew=$,e.updateNew=function(e,t,r,i){return e.expression!==t||e.typeArguments!==r||e.arguments!==i?n($(t,r,i),e):e},e.createTaggedTemplate=Z,e.updateTaggedTemplate=function(e,t,r){return e.tag!==t||e.template!==r?n(Z(t,r),e):e},e.createTypeAssertion=ee,e.updateTypeAssertion=function(e,t,r){return e.type!==t||e.expression!==r?n(ee(t,r),e):e},e.createParen=te,e.updateParen=function(e,t){return e.expression!==t?n(te(t),e):e},e.createFunctionExpression=ne,e.updateFunctionExpression=function(e,t,r,i,a,o,s,c){return e.name!==i||e.modifiers!==t||e.asteriskToken!==r||e.typeParameters!==a||e.parameters!==o||e.type!==s||e.body!==c?n(ne(t,r,i,a,o,s,c),e):e},e.createArrowFunction=re,e.updateArrowFunction=function(t,r,i,a,o,s,c){var u,l;return void 0===c?(u=t.equalsGreaterThanToken,l=e.cast(s,e.isConciseBody)):(u=e.cast(s,function(e){return 36===e.kind}),l=c),t.modifiers!==r||t.typeParameters!==i||t.parameters!==a||t.type!==o||t.equalsGreaterThanToken!==u||t.body!==l?n(re(r,i,a,o,u,l),t):t},e.createDelete=ie,e.updateDelete=function(e,t){return e.expression!==t?n(ie(t),e):e},e.createTypeOf=ae,e.updateTypeOf=function(e,t){return e.expression!==t?n(ae(t),e):e},e.createVoid=oe,e.updateVoid=function(e,t){return e.expression!==t?n(oe(t),e):e},e.createAwait=se,e.updateAwait=function(e,t){return e.expression!==t?n(se(t),e):e},e.createPrefix=ce,e.updatePrefix=function(e,t){return e.operand!==t?n(ce(e.operator,t),e):e},e.createPostfix=ue,e.updatePostfix=function(e,t){return e.operand!==t?n(ue(t,e.operator),e):e},e.createBinary=le,e.updateBinary=function(e,t,r,i){return e.left!==t||e.right!==r?n(le(t,i||e.operatorToken,r),e):e},e.createConditional=_e,e.updateConditional=function t(r,i){for(var a=[],o=2;o0&&(a[c-s]=u)}s>0&&(a.length-=s)}},e.compareEmitHelpers=function(t,n){return t===n?0:t.priority===n.priority?0:void 0===t.priority?1:void 0===n.priority?-1:e.compareValues(t.priority,n.priority)},e.setOriginalNode=Lt}(l||(l={})),function(e){function t(t,n,r){if(e.isComputedPropertyName(n))return e.setTextRange(e.createElementAccess(t,n.expression),r);var i=e.setTextRange(e.isIdentifier(n)?e.createPropertyAccess(t,n):e.createElementAccess(t,n),n);return e.getOrCreateEmitNode(i).flags|=64,i}function n(t,n){var r=e.createIdentifier(t||"React");return r.flags&=-9,r.parent=e.getParseTreeNode(n),r}function r(t,r,i){return t?function t(r,i){if(e.isQualifiedName(r)){var a=t(r.left,i),o=e.createIdentifier(e.idText(r.right));return o.escapedText=r.right.escapedText,e.createPropertyAccess(a,o)}return n(e.idText(r),i)}(t,i):e.createPropertyAccess(n(r,i),"createElement")}function i(t){return e.setEmitFlags(e.createIdentifier(t),4098)}e.nullTransformationContext={enableEmitNotification:e.noop,enableSubstitution:e.noop,endLexicalEnvironment:function(){},getCompilerOptions:e.notImplemented,getEmitHost:e.notImplemented,getEmitResolver:e.notImplemented,hoistFunctionDeclaration:e.noop,hoistVariableDeclaration:e.noop,isEmitNotificationEnabled:e.notImplemented,isSubstitutionEnabled:e.notImplemented,onEmitNode:e.noop,onSubstituteNode:e.notImplemented,readEmitHelpers:e.notImplemented,requestEmitHelper:e.noop,resumeLexicalEnvironment:e.noop,startLexicalEnvironment:e.noop,suspendLexicalEnvironment:e.noop},e.createTypeCheck=function(t,n){return"undefined"===n?e.createStrictEquality(t,e.createVoidZero()):e.createStrictEquality(e.createTypeOf(t),e.createLiteral(n))},e.createMemberAccessForPropertyName=t,e.createFunctionCall=function(t,n,r,i){return e.setTextRange(e.createCall(e.createPropertyAccess(t,"call"),void 0,[n].concat(r)),i)},e.createFunctionApply=function(t,n,r,i){return e.setTextRange(e.createCall(e.createPropertyAccess(t,"apply"),void 0,[n,r]),i)},e.createArraySlice=function(t,n){var r=[];return void 0!==n&&r.push("number"==typeof n?e.createLiteral(n):n),e.createCall(e.createPropertyAccess(t,"slice"),void 0,r)},e.createArrayConcat=function(t,n){return e.createCall(e.createPropertyAccess(t,"concat"),void 0,n)},e.createMathPow=function(t,n,r){return e.setTextRange(e.createCall(e.createPropertyAccess(e.createIdentifier("Math"),"pow"),void 0,[t,n]),r)},e.createExpressionForJsxElement=function(t,n,i,a,o,s,c){var u=[i];if(a&&u.push(a),o&&o.length>0)if(a||u.push(e.createNull()),o.length>1)for(var l=0,_=o;l<_.length;l++){var d=_[l];T(d),u.push(d)}else u.push(o[0]);return e.setTextRange(e.createCall(r(t,n,s),void 0,u),c)},e.createExpressionForJsxFragment=function(t,i,a,o,s){var c=[e.createPropertyAccess(n(i,o),"Fragment")];if(c.push(e.createNull()),a&&a.length>0)if(a.length>1)for(var u=0,l=a;u= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n };\n '};e.createValuesHelper=function(t,n,r){return t.requestEmitHelper(a),e.setTextRange(e.createCall(i("__values"),void 0,[n]),r)};var o={name:"typescript:read",scoped:!1,text:'\n var __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === "function" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i["return"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n };\n '};e.createReadHelper=function(t,n,r,a){return t.requestEmitHelper(o),e.setTextRange(e.createCall(i("__read"),void 0,void 0!==r?[n,e.createLiteral(r)]:[n]),a)};var s={name:"typescript:spread",scoped:!1,text:"\n var __spread = (this && this.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n };"};function c(t,n){var r=e.skipParentheses(t);switch(r.kind){case 71:return n;case 99:case 8:case 9:return!1;case 181:return 0!==r.elements.length;case 182:return r.properties.length>0;default:return!0}}function u(t){return e.isIdentifier(t)?e.createLiteral(t):e.isComputedPropertyName(t)?e.getMutableClone(t.expression):e.getMutableClone(t)}function l(e,t,n){return _(e,t,n,8192)}function _(t,n,r,i){var a=e.getNameOfDeclaration(t);if(a&&e.isIdentifier(a)&&!e.isGeneratedIdentifier(a)){var o=e.getMutableClone(a);return i|=e.getEmitFlags(a),r||(i|=48),n||(i|=1536),i&&e.setEmitFlags(o,i),o}return e.getGeneratedNameForNode(t)}function d(t,n,r,i){var a,o=e.createPropertyAccess(t,e.nodeIsSynthesized(n)?n:e.getSynthesizedClone(n));return e.setTextRange(o,n),i||(a|=48),r||(a|=1536),a&&e.setEmitFlags(o,a),o}function p(t){return e.isStringLiteral(t.expression)&&"use strict"===t.expression.text}function f(t,n,r){e.Debug.assert(0===t.length,"Prologue directives should be at the first statement in the target statements array");for(var i=!1,a=0,o=n.length;ae.getOperatorPrecedence(198,26)?t:e.setTextRange(e.createParen(t),t)}function v(t){return 170===t.kind?e.createParenthesizedType(t):t}function b(t){switch(t.kind){case 168:case 169:case 162:case 163:return e.createParenthesizedType(t)}return v(t)}function x(e,t){for(;;){switch(e.kind){case 197:e=e.operand;continue;case 198:e=e.left;continue;case 199:e=e.condition;continue;case 185:if(t)return e;case 184:case 183:case 295:e=e.expression;continue}return e}}function k(e,t){switch(void 0===t&&(t=7),e.kind){case 189:return 0!=(1&t);case 188:case 206:case 207:return 0!=(2&t);case 295:return 0!=(4&t)}return!1}function S(t,n){var r;void 0===n&&(n=7);do{r=t,1&n&&(t=e.skipParentheses(t)),2&n&&(t=D(t)),4&n&&(t=e.skipPartiallyEmittedExpressions(t))}while(r!==t);return t}function D(t){for(;e.isAssertionExpression(t)||207===t.kind;)t=t.expression;return t}function C(t,n,r){return void 0===r&&(r=7),!t||!k(t,r)||189===(i=t).kind&&e.nodeIsSynthesized(i)&&e.nodeIsSynthesized(e.getSourceMapRange(i))&&e.nodeIsSynthesized(e.getCommentRange(i))&&!e.some(e.getSyntheticLeadingComments(i))&&!e.some(e.getSyntheticTrailingComments(i))?n:function(t,n){switch(t.kind){case 189:return e.updateParen(t,n);case 188:return e.updateTypeAssertion(t,t.type,n);case 206:return e.updateAsExpression(t,n,t.type);case 207:return e.updateNonNullExpression(t,n);case 295:return e.updatePartiallyEmittedExpression(t,n)}}(t,C(t.expression,n));var i}function T(t){return e.setStartsOnNewLine(t,!0)}function E(t){var n=e.getOriginalNode(t,e.isSourceFile),r=n&&n.emitNode;return r&&r.externalHelpersModuleName}function N(t,n,r){if(t)return t.moduleName?e.createLiteral(t.moduleName):t.isDeclarationFile||!r.out&&!r.outFile?void 0:e.createLiteral(e.getExternalModuleNameFromPath(n,t.fileName))}function A(t){if(e.isDeclarationBindingElement(t))return t.name;if(!e.isObjectLiteralElementLike(t))return e.isAssignmentExpression(t,!0)?A(t.left):e.isSpreadElement(t)?A(t.expression):t;switch(t.kind){case 268:return A(t.initializer);case 269:return t.name;case 270:return A(t.expression)}}function P(t){if(e.isBindingElement(t)){if(t.dotDotDotToken)return e.Debug.assertNode(t.name,e.isIdentifier),e.setOriginalNode(e.setTextRange(e.createSpread(t.name),t),t);var n=M(t.name);return t.initializer?e.setOriginalNode(e.setTextRange(e.createAssignment(n,t.initializer),t),t):n}return e.Debug.assertNode(t,e.isExpression),t}function w(t){if(e.isBindingElement(t)){if(t.dotDotDotToken)return e.Debug.assertNode(t.name,e.isIdentifier),e.setOriginalNode(e.setTextRange(e.createSpreadAssignment(t.name),t),t);if(t.propertyName){var n=M(t.name);return e.setOriginalNode(e.setTextRange(e.createPropertyAssignment(t.propertyName,t.initializer?e.createAssignment(n,t.initializer):n),t),t)}return e.Debug.assertNode(t.name,e.isIdentifier),e.setOriginalNode(e.setTextRange(e.createShorthandPropertyAssignment(t.name,t.initializer),t),t)}return e.Debug.assertNode(t,e.isObjectLiteralElementLike),t}function F(e){switch(e.kind){case 179:case 181:return O(e);case 178:case 182:return I(e)}}function I(t){return e.isObjectBindingPattern(t)?e.setOriginalNode(e.setTextRange(e.createObjectLiteral(e.map(t.elements,w)),t),t):(e.Debug.assertNode(t,e.isObjectLiteralExpression),t)}function O(t){return e.isArrayBindingPattern(t)?e.setOriginalNode(e.setTextRange(e.createArrayLiteral(e.map(t.elements,P)),t),t):(e.Debug.assertNode(t,e.isArrayLiteralExpression),t)}function M(t){return e.isBindingPattern(t)?F(t):(e.Debug.assertNode(t,e.isExpression),t)}e.createSpreadHelper=function(t,n,r){return t.requestEmitHelper(o),t.requestEmitHelper(s),e.setTextRange(e.createCall(i("__spread"),void 0,n),r)},e.createForOfBindingStatement=function(t,n){if(e.isVariableDeclarationList(t)){var r=e.firstOrUndefined(t.declarations),i=e.updateVariableDeclaration(r,r.name,void 0,n);return e.setTextRange(e.createVariableStatement(void 0,e.updateVariableDeclarationList(t,[i])),t)}var a=e.setTextRange(e.createAssignment(t,n),t);return e.setTextRange(e.createStatement(a),t)},e.insertLeadingStatement=function(t,n){return e.isBlock(t)?e.updateBlock(t,e.setTextRange(e.createNodeArray([n].concat(t.statements)),t.statements)):e.createBlock(e.createNodeArray([t,n]),!0)},e.restoreEnclosingLabel=function t(n,r,i){if(!r)return n;var a=e.updateLabel(r,r.label,226===r.statement.kind?t(n,r.statement):n);return i&&i(r),a},e.createCallBinding=function(t,n,r,i){var a,o,s=S(t,7);if(e.isSuperProperty(s))a=e.createThis(),o=s;else if(97===s.kind)a=e.createThis(),o=r<2?e.setTextRange(e.createIdentifier("_super"),s):s;else if(4096&e.getEmitFlags(s))a=e.createVoidZero(),o=y(s);else switch(s.kind){case 183:c(s.expression,i)?(a=e.createTempVariable(n),o=e.createPropertyAccess(e.setTextRange(e.createAssignment(a,s.expression),s.expression),s.name),e.setTextRange(o,s)):(a=s.expression,o=s);break;case 184:c(s.expression,i)?(a=e.createTempVariable(n),o=e.createElementAccess(e.setTextRange(e.createAssignment(a,s.expression),s.expression),s.argumentExpression),e.setTextRange(o,s)):(a=s.expression,o=s);break;default:a=e.createVoidZero(),o=y(t)}return{target:o,thisArg:a}},e.inlineExpressions=function(t){return t.length>10?e.createCommaList(t):e.reduceLeft(t,e.createComma)},e.createExpressionFromEntityName=function t(n){if(e.isQualifiedName(n)){var r=t(n.left),i=e.getMutableClone(n.right);return e.setTextRange(e.createPropertyAccess(r,i),n)}return e.getMutableClone(n)},e.createExpressionForPropertyName=u,e.createExpressionForObjectLiteralElementLike=function(n,r,i){switch(r.kind){case 155:case 156:return function(t,r,i,a){var o=e.getAllAccessorDeclarations(n.properties,r),s=o.firstAccessor,c=o.getAccessor,l=o.setAccessor;if(r===s){var _=[];if(c){var d=e.createFunctionExpression(c.modifiers,void 0,void 0,void 0,c.parameters,void 0,c.body);e.setTextRange(d,c),e.setOriginalNode(d,c);var p=e.createPropertyAssignment("get",d);_.push(p)}if(l){var f=e.createFunctionExpression(l.modifiers,void 0,void 0,void 0,l.parameters,void 0,l.body);e.setTextRange(f,l),e.setOriginalNode(f,l);var m=e.createPropertyAssignment("set",f);_.push(m)}_.push(e.createPropertyAssignment("enumerable",e.createTrue())),_.push(e.createPropertyAssignment("configurable",e.createTrue()));var g=e.setTextRange(e.createCall(e.createPropertyAccess(e.createIdentifier("Object"),"defineProperty"),void 0,[i,u(r.name),e.createObjectLiteral(_,a)]),s);return e.aggregateTransformFlags(g)}}(0,r,i,n.multiLine);case 268:return function(n,r){return e.aggregateTransformFlags(e.setOriginalNode(e.setTextRange(e.createAssignment(t(r,n.name,n.name),n.initializer),n),n))}(r,i);case 269:return function(n,r){return e.aggregateTransformFlags(e.setOriginalNode(e.setTextRange(e.createAssignment(t(r,n.name,n.name),e.getSynthesizedClone(n.name)),n),n))}(r,i);case 153:return function(n,r){return e.aggregateTransformFlags(e.setOriginalNode(e.setTextRange(e.createAssignment(t(r,n.name,n.name),e.setOriginalNode(e.setTextRange(e.createFunctionExpression(n.modifiers,n.asteriskToken,void 0,void 0,n.parameters,void 0,n.body),n),n)),n),n))}(r,i)}},e.getInternalName=function(e,t,n){return _(e,t,n,49152)},e.isInternalName=function(t){return 0!=(32768&e.getEmitFlags(t))},e.getLocalName=function(e,t,n){return _(e,t,n,16384)},e.isLocalName=function(t){return 0!=(16384&e.getEmitFlags(t))},e.getExportName=l,e.isExportName=function(t){return 0!=(8192&e.getEmitFlags(t))},e.getDeclarationName=function(e,t,n){return _(e,t,n)},e.getExternalModuleOrNamespaceExportName=function(t,n,r,i){return t&&e.hasModifier(n,1)?d(t,_(n),r,i):l(n,r,i)},e.getNamespaceMemberName=d,e.convertToFunctionBody=function(t,n){return e.isBlock(t)?t:e.setTextRange(e.createBlock([e.setTextRange(e.createReturn(t),t)],n),t)},e.convertFunctionDeclarationToExpression=function(t){e.Debug.assert(!!t.body);var n=e.createFunctionExpression(t.modifiers,t.asteriskToken,t.name,t.typeParameters,t.parameters,t.type,t.body);return e.setOriginalNode(n,t),e.setTextRange(n,t),e.getStartsOnNewLine(t)&&e.setStartsOnNewLine(n,!0),e.aggregateTransformFlags(n),n},e.addPrologue=function(e,t,n,r){return m(e,t,f(e,t,n),r)},e.addStandardPrologue=f,e.addCustomPrologue=m,e.startsWithUseStrict=function(t){var n=e.firstOrUndefined(t);return void 0!==n&&e.isPrologueDirective(n)&&p(n)},e.ensureUseStrict=function(t){for(var n=!1,r=0,i=t;rs-i)&&(a=s-i),(i>0||a0&&d<=144||173===d)return s;switch(d){case 71:return e.updateIdentifier(s,l(s.typeArguments,c,t));case 145:return e.updateQualifiedName(s,n(s.left,c,e.isEntityName),n(s.right,c,e.isIdentifier));case 146:return e.updateComputedPropertyName(s,n(s.expression,c,e.isExpression));case 147:return e.updateTypeParameterDeclaration(s,n(s.name,c,e.isIdentifier),n(s.constraint,c,e.isTypeNode),n(s.default,c,e.isTypeNode));case 148:return e.updateParameter(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),n(s.dotDotDotToken,_,e.isToken),n(s.name,c,e.isBindingName),n(s.questionToken,_,e.isToken),n(s.type,c,e.isTypeNode),n(s.initializer,c,e.isExpression));case 149:return e.updateDecorator(s,n(s.expression,c,e.isExpression));case 150:return e.updatePropertySignature(s,l(s.modifiers,c,e.isToken),n(s.name,c,e.isPropertyName),n(s.questionToken,_,e.isToken),n(s.type,c,e.isTypeNode),n(s.initializer,c,e.isExpression));case 151:return e.updateProperty(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),n(s.name,c,e.isPropertyName),n(s.questionToken,_,e.isToken),n(s.type,c,e.isTypeNode),n(s.initializer,c,e.isExpression));case 152:return e.updateMethodSignature(s,l(s.typeParameters,c,e.isTypeParameterDeclaration),l(s.parameters,c,e.isParameterDeclaration),n(s.type,c,e.isTypeNode),n(s.name,c,e.isPropertyName),n(s.questionToken,_,e.isToken));case 153:return e.updateMethod(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),n(s.asteriskToken,_,e.isToken),n(s.name,c,e.isPropertyName),n(s.questionToken,_,e.isToken),l(s.typeParameters,c,e.isTypeParameterDeclaration),a(s.parameters,c,u,l),n(s.type,c,e.isTypeNode),o(s.body,c,u));case 154:return e.updateConstructor(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),a(s.parameters,c,u,l),o(s.body,c,u));case 155:return e.updateGetAccessor(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),n(s.name,c,e.isPropertyName),a(s.parameters,c,u,l),n(s.type,c,e.isTypeNode),o(s.body,c,u));case 156:return e.updateSetAccessor(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),n(s.name,c,e.isPropertyName),a(s.parameters,c,u,l),o(s.body,c,u));case 157:return e.updateCallSignature(s,l(s.typeParameters,c,e.isTypeParameterDeclaration),l(s.parameters,c,e.isParameterDeclaration),n(s.type,c,e.isTypeNode));case 158:return e.updateConstructSignature(s,l(s.typeParameters,c,e.isTypeParameterDeclaration),l(s.parameters,c,e.isParameterDeclaration),n(s.type,c,e.isTypeNode));case 159:return e.updateIndexSignature(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),l(s.parameters,c,e.isParameterDeclaration),n(s.type,c,e.isTypeNode));case 160:return e.updateTypePredicateNode(s,n(s.parameterName,c),n(s.type,c,e.isTypeNode));case 161:return e.updateTypeReferenceNode(s,n(s.typeName,c,e.isEntityName),l(s.typeArguments,c,e.isTypeNode));case 162:return e.updateFunctionTypeNode(s,l(s.typeParameters,c,e.isTypeParameterDeclaration),l(s.parameters,c,e.isParameterDeclaration),n(s.type,c,e.isTypeNode));case 163:return e.updateConstructorTypeNode(s,l(s.typeParameters,c,e.isTypeParameterDeclaration),l(s.parameters,c,e.isParameterDeclaration),n(s.type,c,e.isTypeNode));case 164:return e.updateTypeQueryNode(s,n(s.exprName,c,e.isEntityName));case 165:return e.updateTypeLiteralNode(s,l(s.members,c,e.isTypeElement));case 166:return e.updateArrayTypeNode(s,n(s.elementType,c,e.isTypeNode));case 167:return e.updateTypleTypeNode(s,l(s.elementTypes,c,e.isTypeNode));case 168:return e.updateUnionTypeNode(s,l(s.types,c,e.isTypeNode));case 169:return e.updateIntersectionTypeNode(s,l(s.types,c,e.isTypeNode));case 170:return e.updateConditionalTypeNode(s,n(s.checkType,c,e.isTypeNode),n(s.extendsType,c,e.isTypeNode),n(s.trueType,c,e.isTypeNode),n(s.falseType,c,e.isTypeNode));case 171:return e.updateInferTypeNode(s,n(s.typeParameter,c,e.isTypeParameterDeclaration));case 172:return e.updateParenthesizedType(s,n(s.type,c,e.isTypeNode));case 174:return e.updateTypeOperatorNode(s,n(s.type,c,e.isTypeNode));case 175:return e.updateIndexedAccessTypeNode(s,n(s.objectType,c,e.isTypeNode),n(s.indexType,c,e.isTypeNode));case 176:return e.updateMappedTypeNode(s,n(s.readonlyToken,_,e.isToken),n(s.typeParameter,c,e.isTypeParameterDeclaration),n(s.questionToken,_,e.isToken),n(s.type,c,e.isTypeNode));case 177:return e.updateLiteralTypeNode(s,n(s.literal,c,e.isExpression));case 178:return e.updateObjectBindingPattern(s,l(s.elements,c,e.isBindingElement));case 179:return e.updateArrayBindingPattern(s,l(s.elements,c,e.isArrayBindingElement));case 180:return e.updateBindingElement(s,n(s.dotDotDotToken,_,e.isToken),n(s.propertyName,c,e.isPropertyName),n(s.name,c,e.isBindingName),n(s.initializer,c,e.isExpression));case 181:return e.updateArrayLiteral(s,l(s.elements,c,e.isExpression));case 182:return e.updateObjectLiteral(s,l(s.properties,c,e.isObjectLiteralElementLike));case 183:return e.updatePropertyAccess(s,n(s.expression,c,e.isExpression),n(s.name,c,e.isIdentifier));case 184:return e.updateElementAccess(s,n(s.expression,c,e.isExpression),n(s.argumentExpression,c,e.isExpression));case 185:return e.updateCall(s,n(s.expression,c,e.isExpression),l(s.typeArguments,c,e.isTypeNode),l(s.arguments,c,e.isExpression));case 186:return e.updateNew(s,n(s.expression,c,e.isExpression),l(s.typeArguments,c,e.isTypeNode),l(s.arguments,c,e.isExpression));case 187:return e.updateTaggedTemplate(s,n(s.tag,c,e.isExpression),n(s.template,c,e.isTemplateLiteral));case 188:return e.updateTypeAssertion(s,n(s.type,c,e.isTypeNode),n(s.expression,c,e.isExpression));case 189:return e.updateParen(s,n(s.expression,c,e.isExpression));case 190:return e.updateFunctionExpression(s,l(s.modifiers,c,e.isModifier),n(s.asteriskToken,_,e.isToken),n(s.name,c,e.isIdentifier),l(s.typeParameters,c,e.isTypeParameterDeclaration),a(s.parameters,c,u,l),n(s.type,c,e.isTypeNode),o(s.body,c,u));case 191:return e.updateArrowFunction(s,l(s.modifiers,c,e.isModifier),l(s.typeParameters,c,e.isTypeParameterDeclaration),a(s.parameters,c,u,l),n(s.type,c,e.isTypeNode),n(s.equalsGreaterThanToken,c,e.isToken),o(s.body,c,u));case 192:return e.updateDelete(s,n(s.expression,c,e.isExpression));case 193:return e.updateTypeOf(s,n(s.expression,c,e.isExpression));case 194:return e.updateVoid(s,n(s.expression,c,e.isExpression));case 195:return e.updateAwait(s,n(s.expression,c,e.isExpression));case 196:return e.updatePrefix(s,n(s.operand,c,e.isExpression));case 197:return e.updatePostfix(s,n(s.operand,c,e.isExpression));case 198:return e.updateBinary(s,n(s.left,c,e.isExpression),n(s.right,c,e.isExpression),n(s.operatorToken,c,e.isToken));case 199:return e.updateConditional(s,n(s.condition,c,e.isExpression),n(s.questionToken,c,e.isToken),n(s.whenTrue,c,e.isExpression),n(s.colonToken,c,e.isToken),n(s.whenFalse,c,e.isExpression));case 200:return e.updateTemplateExpression(s,n(s.head,c,e.isTemplateHead),l(s.templateSpans,c,e.isTemplateSpan));case 201:return e.updateYield(s,n(s.asteriskToken,_,e.isToken),n(s.expression,c,e.isExpression));case 202:return e.updateSpread(s,n(s.expression,c,e.isExpression));case 203:return e.updateClassExpression(s,l(s.modifiers,c,e.isModifier),n(s.name,c,e.isIdentifier),l(s.typeParameters,c,e.isTypeParameterDeclaration),l(s.heritageClauses,c,e.isHeritageClause),l(s.members,c,e.isClassElement));case 205:return e.updateExpressionWithTypeArguments(s,l(s.typeArguments,c,e.isTypeNode),n(s.expression,c,e.isExpression));case 206:return e.updateAsExpression(s,n(s.expression,c,e.isExpression),n(s.type,c,e.isTypeNode));case 207:return e.updateNonNullExpression(s,n(s.expression,c,e.isExpression));case 208:return e.updateMetaProperty(s,n(s.name,c,e.isIdentifier));case 209:return e.updateTemplateSpan(s,n(s.expression,c,e.isExpression),n(s.literal,c,e.isTemplateMiddleOrTemplateTail));case 211:return e.updateBlock(s,l(s.statements,c,e.isStatement));case 212:return e.updateVariableStatement(s,l(s.modifiers,c,e.isModifier),n(s.declarationList,c,e.isVariableDeclarationList));case 214:return e.updateStatement(s,n(s.expression,c,e.isExpression));case 215:return e.updateIf(s,n(s.expression,c,e.isExpression),n(s.thenStatement,c,e.isStatement,e.liftToBlock),n(s.elseStatement,c,e.isStatement,e.liftToBlock));case 216:return e.updateDo(s,n(s.statement,c,e.isStatement,e.liftToBlock),n(s.expression,c,e.isExpression));case 217:return e.updateWhile(s,n(s.expression,c,e.isExpression),n(s.statement,c,e.isStatement,e.liftToBlock));case 218:return e.updateFor(s,n(s.initializer,c,e.isForInitializer),n(s.condition,c,e.isExpression),n(s.incrementor,c,e.isExpression),n(s.statement,c,e.isStatement,e.liftToBlock));case 219:return e.updateForIn(s,n(s.initializer,c,e.isForInitializer),n(s.expression,c,e.isExpression),n(s.statement,c,e.isStatement,e.liftToBlock));case 220:return e.updateForOf(s,n(s.awaitModifier,c,e.isToken),n(s.initializer,c,e.isForInitializer),n(s.expression,c,e.isExpression),n(s.statement,c,e.isStatement,e.liftToBlock));case 221:return e.updateContinue(s,n(s.label,c,e.isIdentifier));case 222:return e.updateBreak(s,n(s.label,c,e.isIdentifier));case 223:return e.updateReturn(s,n(s.expression,c,e.isExpression));case 224:return e.updateWith(s,n(s.expression,c,e.isExpression),n(s.statement,c,e.isStatement,e.liftToBlock));case 225:return e.updateSwitch(s,n(s.expression,c,e.isExpression),n(s.caseBlock,c,e.isCaseBlock));case 226:return e.updateLabel(s,n(s.label,c,e.isIdentifier),n(s.statement,c,e.isStatement,e.liftToBlock));case 227:return e.updateThrow(s,n(s.expression,c,e.isExpression));case 228:return e.updateTry(s,n(s.tryBlock,c,e.isBlock),n(s.catchClause,c,e.isCatchClause),n(s.finallyBlock,c,e.isBlock));case 230:return e.updateVariableDeclaration(s,n(s.name,c,e.isBindingName),n(s.type,c,e.isTypeNode),n(s.initializer,c,e.isExpression));case 231:return e.updateVariableDeclarationList(s,l(s.declarations,c,e.isVariableDeclaration));case 232:return e.updateFunctionDeclaration(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),n(s.asteriskToken,_,e.isToken),n(s.name,c,e.isIdentifier),l(s.typeParameters,c,e.isTypeParameterDeclaration),a(s.parameters,c,u,l),n(s.type,c,e.isTypeNode),o(s.body,c,u));case 233:return e.updateClassDeclaration(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),n(s.name,c,e.isIdentifier),l(s.typeParameters,c,e.isTypeParameterDeclaration),l(s.heritageClauses,c,e.isHeritageClause),l(s.members,c,e.isClassElement));case 234:return e.updateInterfaceDeclaration(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),n(s.name,c,e.isIdentifier),l(s.typeParameters,c,e.isTypeParameterDeclaration),l(s.heritageClauses,c,e.isHeritageClause),l(s.members,c,e.isTypeElement));case 235:return e.updateTypeAliasDeclaration(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),n(s.name,c,e.isIdentifier),l(s.typeParameters,c,e.isTypeParameterDeclaration),n(s.type,c,e.isTypeNode));case 236:return e.updateEnumDeclaration(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),n(s.name,c,e.isIdentifier),l(s.members,c,e.isEnumMember));case 237:return e.updateModuleDeclaration(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),n(s.name,c,e.isIdentifier),n(s.body,c,e.isModuleBody));case 238:return e.updateModuleBlock(s,l(s.statements,c,e.isStatement));case 239:return e.updateCaseBlock(s,l(s.clauses,c,e.isCaseOrDefaultClause));case 240:return e.updateNamespaceExportDeclaration(s,n(s.name,c,e.isIdentifier));case 241:return e.updateImportEqualsDeclaration(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),n(s.name,c,e.isIdentifier),n(s.moduleReference,c,e.isModuleReference));case 242:return e.updateImportDeclaration(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),n(s.importClause,c,e.isImportClause),n(s.moduleSpecifier,c,e.isExpression));case 243:return e.updateImportClause(s,n(s.name,c,e.isIdentifier),n(s.namedBindings,c,e.isNamedImportBindings));case 244:return e.updateNamespaceImport(s,n(s.name,c,e.isIdentifier));case 245:return e.updateNamedImports(s,l(s.elements,c,e.isImportSpecifier));case 246:return e.updateImportSpecifier(s,n(s.propertyName,c,e.isIdentifier),n(s.name,c,e.isIdentifier));case 247:return e.updateExportAssignment(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),n(s.expression,c,e.isExpression));case 248:return e.updateExportDeclaration(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),n(s.exportClause,c,e.isNamedExports),n(s.moduleSpecifier,c,e.isExpression));case 249:return e.updateNamedExports(s,l(s.elements,c,e.isExportSpecifier));case 250:return e.updateExportSpecifier(s,n(s.propertyName,c,e.isIdentifier),n(s.name,c,e.isIdentifier));case 252:return e.updateExternalModuleReference(s,n(s.expression,c,e.isExpression));case 253:return e.updateJsxElement(s,n(s.openingElement,c,e.isJsxOpeningElement),l(s.children,c,e.isJsxChild),n(s.closingElement,c,e.isJsxClosingElement));case 254:return e.updateJsxSelfClosingElement(s,n(s.tagName,c,e.isJsxTagNameExpression),n(s.attributes,c,e.isJsxAttributes));case 255:return e.updateJsxOpeningElement(s,n(s.tagName,c,e.isJsxTagNameExpression),n(s.attributes,c,e.isJsxAttributes));case 256:return e.updateJsxClosingElement(s,n(s.tagName,c,e.isJsxTagNameExpression));case 257:return e.updateJsxFragment(s,n(s.openingFragment,c,e.isJsxOpeningFragment),l(s.children,c,e.isJsxChild),n(s.closingFragment,c,e.isJsxClosingFragment));case 260:return e.updateJsxAttribute(s,n(s.name,c,e.isIdentifier),n(s.initializer,c,e.isStringLiteralOrJsxExpression));case 261:return e.updateJsxAttributes(s,l(s.properties,c,e.isJsxAttributeLike));case 262:return e.updateJsxSpreadAttribute(s,n(s.expression,c,e.isExpression));case 263:return e.updateJsxExpression(s,n(s.expression,c,e.isExpression));case 264:return e.updateCaseClause(s,n(s.expression,c,e.isExpression),l(s.statements,c,e.isStatement));case 265:return e.updateDefaultClause(s,l(s.statements,c,e.isStatement));case 266:return e.updateHeritageClause(s,l(s.types,c,e.isExpressionWithTypeArguments));case 267:return e.updateCatchClause(s,n(s.variableDeclaration,c,e.isVariableDeclaration),n(s.block,c,e.isBlock));case 268:return e.updatePropertyAssignment(s,n(s.name,c,e.isPropertyName),n(s.initializer,c,e.isExpression));case 269:return e.updateShorthandPropertyAssignment(s,n(s.name,c,e.isIdentifier),n(s.objectAssignmentInitializer,c,e.isExpression));case 270:return e.updateSpreadAssignment(s,n(s.expression,c,e.isExpression));case 271:return e.updateEnumMember(s,n(s.name,c,e.isPropertyName),n(s.initializer,c,e.isExpression));case 272:return e.updateSourceFileNode(s,i(s.statements,c,u));case 295:return e.updatePartiallyEmittedExpression(s,n(s.expression,c,e.isExpression));case 296:return e.updateCommaList(s,l(s.elements,c,e.isExpression));default:return s}}}}(l||(l={})),function(e){function t(e,t,n){return e?t(n,e):n}function n(e,t,n){return e?t(n,e):n}function r(r,i,a,o){if(void 0===r)return i;var s=o?n:e.reduceLeft,c=o||a,u=r.kind;if(u>0&&u<=144)return i;if(u>=160&&u<=177)return i;var l=i;switch(r.kind){case 210:case 213:case 204:case 229:case 294:break;case 145:l=t(r.left,a,l),l=t(r.right,a,l);break;case 146:l=t(r.expression,a,l);break;case 148:l=s(r.decorators,c,l),l=s(r.modifiers,c,l),l=t(r.name,a,l),l=t(r.type,a,l),l=t(r.initializer,a,l);break;case 149:l=t(r.expression,a,l);break;case 150:l=s(r.modifiers,c,l),l=t(r.name,a,l),l=t(r.questionToken,a,l),l=t(r.type,a,l),l=t(r.initializer,a,l);break;case 151:l=s(r.decorators,c,l),l=s(r.modifiers,c,l),l=t(r.name,a,l),l=t(r.type,a,l),l=t(r.initializer,a,l);break;case 153:l=s(r.decorators,c,l),l=s(r.modifiers,c,l),l=t(r.name,a,l),l=s(r.typeParameters,c,l),l=s(r.parameters,c,l),l=t(r.type,a,l),l=t(r.body,a,l);break;case 154:l=s(r.modifiers,c,l),l=s(r.parameters,c,l),l=t(r.body,a,l);break;case 155:l=s(r.decorators,c,l),l=s(r.modifiers,c,l),l=t(r.name,a,l),l=s(r.parameters,c,l),l=t(r.type,a,l),l=t(r.body,a,l);break;case 156:l=s(r.decorators,c,l),l=s(r.modifiers,c,l),l=t(r.name,a,l),l=s(r.parameters,c,l),l=t(r.body,a,l);break;case 178:case 179:l=s(r.elements,c,l);break;case 180:l=t(r.propertyName,a,l),l=t(r.name,a,l),l=t(r.initializer,a,l);break;case 181:l=s(r.elements,c,l);break;case 182:l=s(r.properties,c,l);break;case 183:l=t(r.expression,a,l),l=t(r.name,a,l);break;case 184:l=t(r.expression,a,l),l=t(r.argumentExpression,a,l);break;case 185:case 186:l=t(r.expression,a,l),l=s(r.typeArguments,c,l),l=s(r.arguments,c,l);break;case 187:l=t(r.tag,a,l),l=t(r.template,a,l);break;case 188:l=t(r.type,a,l),l=t(r.expression,a,l);break;case 190:l=s(r.modifiers,c,l),l=t(r.name,a,l),l=s(r.typeParameters,c,l),l=s(r.parameters,c,l),l=t(r.type,a,l),l=t(r.body,a,l);break;case 191:l=s(r.modifiers,c,l),l=s(r.typeParameters,c,l),l=s(r.parameters,c,l),l=t(r.type,a,l),l=t(r.body,a,l);break;case 189:case 192:case 193:case 194:case 195:case 201:case 202:case 207:l=t(r.expression,a,l);break;case 196:case 197:l=t(r.operand,a,l);break;case 198:l=t(r.left,a,l),l=t(r.right,a,l);break;case 199:l=t(r.condition,a,l),l=t(r.whenTrue,a,l),l=t(r.whenFalse,a,l);break;case 200:l=t(r.head,a,l),l=s(r.templateSpans,c,l);break;case 203:l=s(r.modifiers,c,l),l=t(r.name,a,l),l=s(r.typeParameters,c,l),l=s(r.heritageClauses,c,l),l=s(r.members,c,l);break;case 205:l=t(r.expression,a,l),l=s(r.typeArguments,c,l);break;case 206:l=t(r.expression,a,l),l=t(r.type,a,l);break;case 209:l=t(r.expression,a,l),l=t(r.literal,a,l);break;case 211:l=s(r.statements,c,l);break;case 212:l=s(r.modifiers,c,l),l=t(r.declarationList,a,l);break;case 214:l=t(r.expression,a,l);break;case 215:l=t(r.expression,a,l),l=t(r.thenStatement,a,l),l=t(r.elseStatement,a,l);break;case 216:l=t(r.statement,a,l),l=t(r.expression,a,l);break;case 217:case 224:l=t(r.expression,a,l),l=t(r.statement,a,l);break;case 218:l=t(r.initializer,a,l),l=t(r.condition,a,l),l=t(r.incrementor,a,l),l=t(r.statement,a,l);break;case 219:case 220:l=t(r.initializer,a,l),l=t(r.expression,a,l),l=t(r.statement,a,l);break;case 223:case 227:l=t(r.expression,a,l);break;case 225:l=t(r.expression,a,l),l=t(r.caseBlock,a,l);break;case 226:l=t(r.label,a,l),l=t(r.statement,a,l);break;case 228:l=t(r.tryBlock,a,l),l=t(r.catchClause,a,l),l=t(r.finallyBlock,a,l);break;case 230:l=t(r.name,a,l),l=t(r.type,a,l),l=t(r.initializer,a,l);break;case 231:l=s(r.declarations,c,l);break;case 232:l=s(r.decorators,c,l),l=s(r.modifiers,c,l),l=t(r.name,a,l),l=s(r.typeParameters,c,l),l=s(r.parameters,c,l),l=t(r.type,a,l),l=t(r.body,a,l);break;case 233:l=s(r.decorators,c,l),l=s(r.modifiers,c,l),l=t(r.name,a,l),l=s(r.typeParameters,c,l),l=s(r.heritageClauses,c,l),l=s(r.members,c,l);break;case 236:l=s(r.decorators,c,l),l=s(r.modifiers,c,l),l=t(r.name,a,l),l=s(r.members,c,l);break;case 237:l=s(r.decorators,c,l),l=s(r.modifiers,c,l),l=t(r.name,a,l),l=t(r.body,a,l);break;case 238:l=s(r.statements,c,l);break;case 239:l=s(r.clauses,c,l);break;case 241:l=s(r.decorators,c,l),l=s(r.modifiers,c,l),l=t(r.name,a,l),l=t(r.moduleReference,a,l);break;case 242:l=s(r.decorators,c,l),l=s(r.modifiers,c,l),l=t(r.importClause,a,l),l=t(r.moduleSpecifier,a,l);break;case 243:l=t(r.name,a,l),l=t(r.namedBindings,a,l);break;case 244:l=t(r.name,a,l);break;case 245:case 249:l=s(r.elements,c,l);break;case 246:case 250:l=t(r.propertyName,a,l),l=t(r.name,a,l);break;case 247:l=e.reduceLeft(r.decorators,a,l),l=e.reduceLeft(r.modifiers,a,l),l=t(r.expression,a,l);break;case 248:l=e.reduceLeft(r.decorators,a,l),l=e.reduceLeft(r.modifiers,a,l),l=t(r.exportClause,a,l),l=t(r.moduleSpecifier,a,l);break;case 252:l=t(r.expression,a,l);break;case 253:l=t(r.openingElement,a,l),l=e.reduceLeft(r.children,a,l),l=t(r.closingElement,a,l);break;case 257:l=t(r.openingFragment,a,l),l=e.reduceLeft(r.children,a,l),l=t(r.closingFragment,a,l);break;case 254:case 255:l=t(r.tagName,a,l),l=t(r.attributes,a,l);break;case 261:l=s(r.properties,c,l);break;case 256:l=t(r.tagName,a,l);break;case 260:l=t(r.name,a,l),l=t(r.initializer,a,l);break;case 262:case 263:l=t(r.expression,a,l);break;case 264:l=t(r.expression,a,l);case 265:l=s(r.statements,c,l);break;case 266:l=s(r.types,c,l);break;case 267:l=t(r.variableDeclaration,a,l),l=t(r.block,a,l);break;case 268:l=t(r.name,a,l),l=t(r.initializer,a,l);break;case 269:l=t(r.name,a,l),l=t(r.objectAssignmentInitializer,a,l);break;case 270:l=t(r.expression,a,l);break;case 271:l=t(r.name,a,l),l=t(r.initializer,a,l);break;case 272:l=s(r.statements,c,l);break;case 295:l=t(r.expression,a,l);break;case 296:l=s(r.elements,c,l)}return l}function i(t){if(void 0===t)return 0;if(536870912&t.transformFlags)return t.transformFlags&~e.getTransformFlagsSubtreeExclusions(t.kind);var n=function(t){return e.hasModifier(t,2)||e.isTypeNode(t)&&205!==t.kind?0:r(t,0,a,o)}(t);return e.computeTransformFlagsForNode(t,n)}function a(e,t){return e|i(t)}function o(e,t){return e|function(e){if(void 0===e)return 0;for(var t=0,n=0,r=0,a=e;r1&&r(t.importClause.namedBindings)}function o(t){return e.isDefaultImport(t)||1===n(t)&&r(t.importClause.namedBindings)}function s(t,n,r){if(e.isBindingPattern(t.name))for(var i=0,a=t.name.elements;i=1)||1572864&m.transformFlags||1572864&e.getTargetOfBindingOrAssignmentElement(m).transformFlags||e.isComputedPropertyName(g)){u&&(t.emitBindingOrAssignment(t.createObjectBindingOrAssignmentPattern(u),s,c,o),u=void 0);var y=r(t,s,g);e.isComputedPropertyName(g)&&(l=e.append(l,y.argumentExpression)),n(t,m,y,m)}else u=e.append(u,m)}}u&&t.emitBindingOrAssignment(t.createObjectBindingOrAssignmentPattern(u),s,c,o)}(t,a,l,o,s):e.isArrayBindingOrAssignmentPattern(l)?function(t,r,a,o,s){var c,u,l=e.getElementsOfBindingOrAssignmentPattern(a),_=l.length;t.level<1&&t.downlevelIteration?o=i(t,e.createReadHelper(t.context,o,_>0&&e.getRestIndicatorOfBindingOrAssignmentElement(l[_-1])?void 0:_,s),!1,s):(1!==_&&(t.level<1||0===_)||e.every(l,e.isOmittedExpression))&&(o=i(t,o,!e.isDeclarationBindingElement(r)||0!==_,s));for(var d=0;d<_;d++){var p=l[d];if(t.level>=1)if(1048576&p.transformFlags){var f=e.createTempVariable(void 0);t.hoistTempVariables&&t.context.hoistVariableDeclaration(f),u=e.append(u,[f,p]),c=e.append(c,t.createArrayBindingOrAssignmentElement(f))}else c=e.append(c,p);else{if(e.isOmittedExpression(p))continue;e.getRestIndicatorOfBindingOrAssignmentElement(p)?d===_-1&&n(t,p,e.createArraySlice(o,d),p):n(t,p,e.createElementAccess(o,d),p)}}if(c&&t.emitBindingOrAssignment(t.createArrayBindingOrAssignmentPattern(c),o,s,a),u)for(var m=0,g=u;m0)return!0;var n=e.getFirstConstructorWithBody(t);return!!n&&e.forEach(n.parameters,B)}(t)&&(r|=2),e.childIsDecorated(t)&&(r|=4),Ne(t)?r|=8:function(t){return Ae(t)&&e.hasModifier(t,512)}(t)?r|=32:Pe(t)&&(r|=16),k<=1&&7&r&&(r|=128),r}(r,o);128&s&&t.startLexicalEnvironment();var c=r.name||(5&s?e.getGeneratedNameForNode(r):void 0),u=2&s?function(t,n,r){var i=e.moveRangePastDecorators(t),a=function(t){if(8388608&v.getNodeCheckFlags(t)){Re();var n=e.createUniqueName(t.name&&!e.isGeneratedIdentifier(t.name)?e.idText(t.name):"default");return d[e.getOriginalNodeId(t)]=n,h(n),n}}(t),o=e.getLocalName(t,!1,!0),s=e.visitNodes(t.heritageClauses,E,e.isHeritageClause),c=z(t,0!=(64&r)),u=e.createClassExpression(void 0,n,void 0,s,c);e.setOriginalNode(u,t),e.setTextRange(u,i);var l=e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(o,void 0,a?e.createAssignment(a,u):u)],1));return e.setOriginalNode(l,t),e.setTextRange(l,i),e.setCommentRange(l,t),l}(r,c,s):function(t,n,r){var i=128&r?void 0:e.visitNodes(t.modifiers,M,e.isModifier),a=e.createClassDeclaration(void 0,i,n,void 0,e.visitNodes(t.heritageClauses,E,e.isHeritageClause),z(t,0!=(64&r))),o=e.getEmitFlags(t);return 1&r&&(o|=32),e.setTextRange(a,t),e.setOriginalNode(a,t),e.setEmitFlags(a,o),a}(r,c,s),l=[u];if(e.some(f)&&l.push(e.createStatement(e.inlineExpressions(f))),f=a,1&s&&W(l,o,128&s?e.getInternalName(r):e.getLocalName(r)),Y(l,r,!1),Y(l,r,!0),function(n,r){var a=function(n){var r=Q(n,n,function(t){var n=t.decorators,r=X(e.getFirstConstructorWithBody(t));if(n||r)return{decorators:n,parameters:r}}(n));if(r){var a=d&&d[e.getOriginalNodeId(n)],o=e.getLocalName(n,!1,!0),s=i(t,r,o),c=e.createAssignment(o,a?e.createAssignment(a,s):s);return e.setEmitFlags(c,1536),e.setSourceMapRange(c,e.moveRangePastDecorators(n)),c}}(r);a&&n.push(e.setOriginalNode(e.createStatement(a),r))}(l,r),128&s){var _=e.createTokenRange(e.skipTrivia(n.text,r.members.end),18),p=e.getInternalName(r),m=e.createPartiallyEmittedExpression(p);m.end=_.end,e.setEmitFlags(m,1536);var g=e.createReturn(m);g.pos=_.pos,e.setEmitFlags(g,1920),l.push(g),e.addRange(l,t.endLexicalEnvironment());var y=e.createImmediatelyInvokedArrowFunction(l);e.setEmitFlags(y,33554432);var b=e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(e.getLocalName(r,!1,!1),void 0,y)]));e.setOriginalNode(b,r),e.setCommentRange(b,r),e.setSourceMapRange(b,e.moveRangePastDecorators(r)),e.startOnNewLine(b),l=[b]}return 8&s?Fe(l,r):(128&s||2&s)&&(32&s?l.push(e.createExportDefault(e.getLocalName(r,!1,!0))):16&s&&l.push(e.createExternalModuleExport(e.getLocalName(r,!1,!0)))),l.length>1&&(l.push(e.createEndOfDeclarationMarker(r)),e.setEmitFlags(u,4194304|e.getEmitFlags(u))),e.singleOrMany(l)}(r);case 203:return function(t){var n=f;f=void 0;var r=K(t,!0),i=e.visitNodes(t.heritageClauses,E,e.isHeritageClause),a=z(t,e.some(i,function(e){return 85===e.token})),o=e.createClassExpression(void 0,t.name,void 0,i,a);if(e.setOriginalNode(o,t),e.setTextRange(o,t),e.some(r)||e.some(f)){var s=[],c=8388608&v.getNodeCheckFlags(t),u=e.createTempVariable(h,!!c);if(c){Re();var l=e.getSynthesizedClone(u);l.autoGenerateFlags&=-17,d[e.getOriginalNodeId(t)]=l}return e.setEmitFlags(o,65536|e.getEmitFlags(o)),s.push(e.startOnNewLine(e.createAssignment(u,o))),e.addRange(s,e.map(f,e.startOnNewLine)),f=n,e.addRange(s,function(t,n){for(var i=[],a=0,o=r;a=e.ModuleKind.ES2015);return e.updateSourceFileNode(n,e.visitLexicalEnvironment(n.statements,A,t,0,r))}function B(e){return void 0!==e.decorators&&e.decorators.length>0}function z(n,r){var i=[],a=function(n,r){var i=e.forEach(n.members,V),a=262144&n.transformFlags,o=e.getFirstConstructorWithBody(n);if(!i&&!a)return e.visitEachChild(o,E,t);var s=function(n){return e.visitParameterList(n&&n.parameters,E,t)||[]}(o),c=function(t,n,r){var i=[],a=0;if(g(),n){a=function(t,r){if(n.body){var i=n.body.statements,a=e.addPrologue(r,i,!1,E);if(a===i.length)return a;var o=i[a];return 214===o.kind&&e.isSuperCall(o.expression)?(r.push(e.visitNode(o,E,e.isStatement)),a+1):a}return 0}(0,i);var o=e.filter(n.parameters,j);e.addRange(i,e.map(o,J))}else r&&i.push(e.createStatement(e.createCall(e.createSuper(),void 0,[e.createSpread(e.createIdentifier("arguments"))])));return W(i,K(t,!1),e.createThis()),n&&e.addRange(i,e.visitNodes(n.body.statements,E,e.isStatement,a)),i=e.mergeLexicalEnvironment(i,y()),e.setTextRange(e.createBlock(e.setTextRange(e.createNodeArray(i),n?n.body.statements:t.members),!0),n?n.body:void 0)}(n,o,r);return e.startOnNewLine(e.setOriginalNode(e.setTextRange(e.createConstructor(void 0,void 0,s,c),o||n),o))}(n,r);return a&&i.push(a),e.addRange(i,e.visitNodes(n.members,I,e.isClassElement)),e.setTextRange(e.createNodeArray(i),n.members)}function j(t){return e.hasModifier(t,92)&&e.isIdentifier(t.name)}function J(t){e.Debug.assert(e.isIdentifier(t.name));var n=t.name,r=e.getMutableClone(n);e.setEmitFlags(r,1584);var i=e.getMutableClone(n);return e.setEmitFlags(i,1536),e.startOnNewLine(e.setEmitFlags(e.setTextRange(e.createStatement(e.createAssignment(e.setTextRange(e.createPropertyAccess(e.createThis(),r),t.name),i)),e.moveRangePos(t,-1)),1536))}function K(t,n){return e.filter(t.members,n?U:V)}function U(e){return q(e,!0)}function V(e){return q(e,!1)}function q(t,n){return 151===t.kind&&n===e.hasModifier(t,32)&&void 0!==t.initializer}function W(t,n,r){for(var i=0,a=n;i0?151===r.kind?e.createVoidZero():e.createNull():void 0,u=i(t,a,o,s,c,e.moveRangePastDecorators(r));return e.setEmitFlags(u,1536),u}}function Z(t){return e.visitNode(t.expression,E,e.isExpression)}function ee(n,r){var i;if(n){i=[];for(var a=0,o=n;a= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n };'};function o(t,n,r){return t.requestEmitHelper(s),e.createCall(e.getHelperName("__metadata"),void 0,[e.createLiteral(n),r])}var s={name:"typescript:metadata",scoped:!1,priority:3,text:'\n var __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);\n };'};function c(t,n,r,i){return t.requestEmitHelper(u),e.setTextRange(e.createCall(e.getHelperName("__param"),void 0,[e.createLiteral(r),n]),i)}var u={name:"typescript:param",scoped:!1,priority:4,text:"\n var __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n };"}}(l||(l={})),function(e){var t;!function(e){e[e.AsyncMethodsWithSuper=1]="AsyncMethodsWithSuper"}(t||(t={})),e.transformES2017=function(t){var n,i,a=t.resumeLexicalEnvironment,o=t.endLexicalEnvironment,s=t.hoistVariableDeclaration,c=t.getEmitResolver(),u=t.getCompilerOptions(),l=e.getEmitScriptTarget(u),_=0,d=t.onEmitNode,p=t.onSubstituteNode;return t.onEmitNode=function(e,t,r){if(1&n&&function(e){var t=e.kind;return 233===t||154===t||153===t||155===t||156===t}(t)){var i=6144&c.getNodeCheckFlags(t);if(i!==_){var a=_;return _=i,d(e,t,r),void(_=a)}}d(e,t,r)},t.onSubstituteNode=function(t,n){return n=p(t,n),1===t&&_?function(t){switch(t.kind){case 183:return C(t);case 184:return T(t);case 185:return function(t){var n=t.expression;if(e.isSuperProperty(n)){var r=e.isPropertyAccessExpression(n)?C(n):T(n);return e.createCall(e.createPropertyAccess(r,"call"),void 0,[e.createThis()].concat(t.arguments))}return t}(t)}return t}(n):n},function(n){if(n.isDeclarationFile)return n;var r=e.visitEachChild(n,f,t);return e.addEmitHelpers(r,t.readEmitHelpers()),r};function f(n){if(0==(16&n.transformFlags))return n;switch(n.kind){case 120:return;case 195:return function(t){return e.setOriginalNode(e.setTextRange(e.createYield(void 0,e.visitNode(t.expression,f,e.isExpression)),t),t)}(n);case 153:return function(n){return e.updateMethod(n,void 0,e.visitNodes(n.modifiers,f,e.isModifier),n.asteriskToken,n.name,void 0,void 0,e.visitParameterList(n.parameters,f,t),void 0,2&e.getFunctionFlags(n)?k(n):e.visitFunctionBody(n.body,f,t))}(n);case 232:return function(n){return e.updateFunctionDeclaration(n,void 0,e.visitNodes(n.modifiers,f,e.isModifier),n.asteriskToken,n.name,void 0,e.visitParameterList(n.parameters,f,t),void 0,2&e.getFunctionFlags(n)?k(n):e.visitFunctionBody(n.body,f,t))}(n);case 190:return function(n){return e.updateFunctionExpression(n,e.visitNodes(n.modifiers,f,e.isModifier),n.asteriskToken,n.name,void 0,e.visitParameterList(n.parameters,f,t),void 0,2&e.getFunctionFlags(n)?k(n):e.visitFunctionBody(n.body,f,t))}(n);case 191:return function(n){return e.updateArrowFunction(n,e.visitNodes(n.modifiers,f,e.isModifier),void 0,e.visitParameterList(n.parameters,f,t),void 0,n.equalsGreaterThanToken,2&e.getFunctionFlags(n)?k(n):e.visitFunctionBody(n.body,f,t))}(n);default:return e.visitEachChild(n,f,t)}}function m(n){if(e.isNodeWithPossibleHoistedDeclaration(n))switch(n.kind){case 212:return function(n){if(y(n.declarationList)){var r=h(n.declarationList,!1);return r?e.createStatement(r):void 0}return e.visitEachChild(n,f,t)}(n);case 218:return function(t){return e.updateFor(t,y(t.initializer)?h(t.initializer,!1):e.visitNode(t.initializer,f,e.isForInitializer),e.visitNode(t.condition,f,e.isExpression),e.visitNode(t.incrementor,f,e.isExpression),e.visitNode(t.statement,m,e.isStatement,e.liftToBlock))}(n);case 219:return function(t){return e.updateForIn(t,y(t.initializer)?h(t.initializer,!0):e.visitNode(t.initializer,f,e.isForInitializer),e.visitNode(t.expression,f,e.isExpression),e.visitNode(t.statement,m,e.isStatement,e.liftToBlock))}(n);case 220:return function(t){return e.updateForOf(t,e.visitNode(t.awaitModifier,f,e.isToken),y(t.initializer)?h(t.initializer,!0):e.visitNode(t.initializer,f,e.isForInitializer),e.visitNode(t.expression,f,e.isExpression),e.visitNode(t.statement,m,e.isStatement,e.liftToBlock))}(n);case 267:return function(n){var r,a=e.createUnderscoreEscapedMap();if(g(n.variableDeclaration,a),a.forEach(function(t,n){i.has(n)&&(r||(r=e.cloneMap(i)),r.delete(n))}),r){var o=i;i=r;var s=e.visitEachChild(n,m,t);return i=o,s}return e.visitEachChild(n,m,t)}(n);case 211:case 225:case 239:case 264:case 265:case 228:case 216:case 217:case 215:case 224:case 226:return e.visitEachChild(n,m,t);default:return e.Debug.assertNever(n,"Unhandled node.")}return f(n)}function g(t,n){var r=t.name;if(e.isIdentifier(r))n.set(r.escapedText,!0);else for(var i=0,a=r.elements;i=2&&(4096&c.getNodeCheckFlags(n)?(D(),e.addEmitHelper(C,e.advancedAsyncSuperHelper)):2048&c.getNodeCheckFlags(n)&&(D(),e.addEmitHelper(C,e.asyncSuperHelper))),s=C}return i=m,s}function S(t,n){return e.isBlock(t)?e.updateBlock(t,e.visitNodes(t.statements,m,e.isStatement,n)):e.convertToFunctionBody(e.visitNode(t,m,e.isConciseBody))}function D(){0==(1&n)&&(n|=1,t.enableSubstitution(185),t.enableSubstitution(183),t.enableSubstitution(184),t.enableEmitNotification(233),t.enableEmitNotification(153),t.enableEmitNotification(155),t.enableEmitNotification(156),t.enableEmitNotification(154))}function C(t){return 97===t.expression.kind?E(e.createLiteral(e.idText(t.name)),t):t}function T(e){return 97===e.expression.kind?E(e.argumentExpression,e):e}function E(t,n){return e.setTextRange(4096&_?e.createPropertyAccess(e.createCall(e.createIdentifier("_super"),void 0,[t]),"value"):e.createCall(e.createIdentifier("_super"),void 0,[t]),n)}};var n={name:"typescript:awaiter",scoped:!1,priority:5,text:'\n var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };'};function r(t,r,i,a){t.requestEmitHelper(n);var o=e.createFunctionExpression(void 0,e.createToken(39),void 0,void 0,[],void 0,a);return(o.emitNode||(o.emitNode={})).flags|=786432,e.createCall(e.getHelperName("__awaiter"),void 0,[e.createThis(),r?e.createIdentifier("arguments"):e.createVoidZero(),i?e.createExpressionFromEntityName(i):e.createVoidZero(),o])}e.asyncSuperHelper={name:"typescript:async-super",scoped:!0,text:"\n const _super = name => super[name];\n "},e.advancedAsyncSuperHelper={name:"typescript:advanced-async-super",scoped:!0,text:"\n const _super = (function (geti, seti) {\n const cache = Object.create(null);\n return name => cache[name] || (cache[name] = { get value() { return geti(name); }, set value(v) { seti(name, v); } });\n })(name => super[name], (name, value) => super[name] = value);\n "}}(l||(l={})),function(e){var t;!function(e){e[e.AsyncMethodsWithSuper=1]="AsyncMethodsWithSuper"}(t||(t={})),e.transformESNext=function(t){var n=t.resumeLexicalEnvironment,c=t.endLexicalEnvironment,l=t.hoistVariableDeclaration,_=t.getEmitResolver(),d=t.getCompilerOptions(),p=e.getEmitScriptTarget(d),f=t.onEmitNode;t.onEmitNode=function(e,t,n){if(1&m&&function(e){var t=e.kind;return 233===t||154===t||153===t||155===t||156===t}(t)){var r=6144&_.getNodeCheckFlags(t);if(r!==h){var i=h;return h=r,f(e,t,n),void(h=i)}}f(e,t,n)};var m,g,y=t.onSubstituteNode;t.onSubstituteNode=function(t,n){return n=y(t,n),1===t&&h?function(t){switch(t.kind){case 183:return A(t);case 184:return P(t);case 185:return function(t){var n=t.expression;if(e.isSuperProperty(n)){var r=e.isPropertyAccessExpression(n)?A(n):P(n);return e.createCall(e.createPropertyAccess(r,"call"),void 0,[e.createThis()].concat(t.arguments))}return t}(t)}return t}(n):n};var h=0;return function(n){if(n.isDeclarationFile)return n;var r=e.visitEachChild(n,v,t);return e.addEmitHelpers(r,t.readEmitHelpers()),r};function v(e){return k(e,!1)}function b(e){return k(e,!0)}function x(e){if(120!==e.kind)return e}function k(n,o){if(0==(8&n.transformFlags))return n;switch(n.kind){case 195:return function(n){return 2&g&&1&g?e.setOriginalNode(e.setTextRange(e.createYield(a(t,e.visitNode(n.expression,v,e.isExpression))),n),n):e.visitEachChild(n,v,t)}(n);case 201:return function(n){if(2&g&&1&g&&n.asteriskToken){var r=e.visitNode(n.expression,v,e.isExpression);return e.setOriginalNode(e.setTextRange(e.createYield(a(t,e.updateYield(n,n.asteriskToken,function(t,n,r){return t.requestEmitHelper(i),t.requestEmitHelper(s),e.setTextRange(e.createCall(e.getHelperName("__asyncDelegator"),void 0,[n]),r)}(t,u(t,r,r),r)))),n),n)}return e.visitEachChild(n,v,t)}(n);case 226:return function(n){if(2&g){var r=e.unwrapInnermostStatementOfLabel(n);return 220===r.kind&&r.awaitModifier?S(r,n):e.restoreEnclosingLabel(e.visitEachChild(r,v,t),n)}return e.visitEachChild(n,v,t)}(n);case 182:return function(n){if(1048576&n.transformFlags){var i=function(t){for(var r,i=[],a=0,o=n.properties;a=2&&(4096&_.getNodeCheckFlags(r)?(N(),e.addEmitHelper(u,e.advancedAsyncSuperHelper)):2048&_.getNodeCheckFlags(r)&&(N(),e.addEmitHelper(u,e.asyncSuperHelper))),u}function T(t){n();var r=0,i=[],a=e.visitNode(t.body,v,e.isConciseBody);e.isBlock(a)&&(r=e.addPrologue(i,a.statements,!1,v)),e.addRange(i,E(void 0,t));var o=c();if(r>0||e.some(i)||e.some(o)){var s=e.convertToFunctionBody(a,!0);return e.addRange(i,s.statements.slice(r)),e.addRange(i,o),e.updateBlock(s,e.setTextRange(e.createNodeArray(i),s.statements))}return a}function E(n,r){for(var i=0,a=r.parameters;i=2?e.createCall(e.createPropertyAccess(e.createIdentifier("Object"),"assign"),void 0,r):(t.requestEmitHelper(n),e.createCall(e.getHelperName("__assign"),void 0,r))}e.createAssignHelper=r;var i={name:"typescript:await",scoped:!1,text:"\n var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }\n "};function a(t,n){return t.requestEmitHelper(i),e.createCall(e.getHelperName("__await"),void 0,[n])}var o={name:"typescript:asyncGenerator",scoped:!1,text:'\n var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume("next", value); }\n function reject(value) { resume("throw", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n };\n '},s={name:"typescript:asyncDelegator",scoped:!1,text:'\n var __asyncDelegator = (this && this.__asyncDelegator) || function (o) {\n var i, p;\n return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { if (o[n]) i[n] = function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; }; }\n };\n '},c={name:"typescript:asyncValues",scoped:!1,text:'\n var __asyncValues = (this && this.__asyncValues) || function (o) {\n if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");\n var m = o[Symbol.asyncIterator];\n return m ? m.call(o) : typeof __values === "function" ? __values(o) : o[Symbol.iterator]();\n };\n '};function u(t,n,r){return t.requestEmitHelper(c),e.setTextRange(e.createCall(e.getHelperName("__asyncValues"),void 0,[n]),r)}}(l||(l={})),function(e){e.transformJsx=function(n){var r,i=n.getCompilerOptions();return function(t){if(t.isDeclarationFile)return t;r=t;var i=e.visitEachChild(t,a,n);return e.addEmitHelpers(i,n.readEmitHelpers()),i};function a(t){return 4&t.transformFlags?function(t){switch(t.kind){case 253:return s(t,!1);case 254:return c(t,!1);case 257:return u(t,!1);case 263:return m(t);default:return e.visitEachChild(t,a,n)}}(t):t}function o(t){switch(t.kind){case 10:return function(t){var n=function(t){for(var n,r=0,i=-1,a=0;a=t.end)return!1;for(var i=e.getEnclosingBlockScopeContainer(t);r;){if(r===i||r===t)return!1;if(e.isClassElement(r)&&r.parent===t)return!0;r=r.parent}return!1}(n,t)))return e.setTextRange(e.getGeneratedNameForNode(e.getNameOfDeclaration(n)),t)}return t}(t);case 99:return function(t){return 1&u&&16&i?e.setTextRange(e.createIdentifier("_this"),t):t}(t)}return t}(n):e.isIdentifier(n)?function(t){if(2&u&&!e.isInternalName(t)){var n=e.getParseTreeNode(t,e.isIdentifier);if(n&&function(e){var t=e.parent;switch(t.kind){case 180:case 233:case 236:case 230:return t.name===e&&m.isDeclarationWithCollidingName(t)}return!1}(n))return e.setTextRange(e.getGeneratedNameForNode(n),t)}return t}(n):n},function(o){if(o.isDeclarationFile)return o;n=o,r=o.text;var s=function(t){var n=h(3968,64),r=[];l();var i=e.addStandardPrologue(r,t.statements,!1);return I(r,t),i=e.addCustomPrologue(r,t.statements,i,k),e.addRange(r,e.visitNodes(t.statements,k,e.isStatement,i)),a&&r.push(e.createVariableStatement(void 0,e.createVariableDeclarationList(a))),e.addRange(r,d()),v(n,0,0),e.updateSourceFileNode(t,e.setTextRange(e.createNodeArray(r),t.statements))}(o);return e.addEmitHelpers(s,t.readEmitHelpers()),n=void 0,r=void 0,a=void 0,i=0,s};function h(e,t){var n=i;return i=16383&(i&~e|t),n}function v(e,t,n){i=-16384&(i&~t|n)|e}function b(e){return 4096&i&&223===e.kind&&!e.expression}function x(t){return 0!=(128&t.transformFlags)||void 0!==c||4096&i&&(e.isStatement(t)||211===t.kind)||e.isIterationStatement(t,!1)&&ie(t)||0!=(33554432&e.getEmitFlags(t))}function k(r){return x(r)?function(r){switch(r.kind){case 115:return;case 233:return function(t){var n=e.createVariableDeclaration(e.getLocalName(t,!0),void 0,T(t));e.setOriginalNode(n,t);var r=[],i=e.createVariableStatement(void 0,e.createVariableDeclarationList([n]));if(e.setOriginalNode(i,t),e.setTextRange(i,t),e.startOnNewLine(i),r.push(i),e.hasModifier(t,1)){var a=e.hasModifier(t,512)?e.createExportDefault(e.getLocalName(t)):e.createExternalModuleExport(e.getLocalName(t));e.setOriginalNode(a,i),r.push(a)}var o=e.getEmitFlags(t);return 0==(4194304&o)&&(r.push(e.createEndOfDeclarationMarker(t)),e.setEmitFlags(i,4194304|o)),e.singleOrMany(r)}(r);case 203:return function(e){return T(e)}(r);case 148:return function(t){return t.dotDotDotToken?void 0:e.isBindingPattern(t.name)?e.setOriginalNode(e.setTextRange(e.createParameter(void 0,void 0,void 0,e.getGeneratedNameForNode(t),void 0,void 0,void 0),t),t):t.initializer?e.setOriginalNode(e.setTextRange(e.createParameter(void 0,void 0,void 0,t.name,void 0,void 0,void 0),t),t):t}(r);case 232:return function(n){var r=c;c=void 0;var a=h(16286,65),o=e.visitParameterList(n.parameters,k,t),s=64&n.transformFlags?J(n):K(n),u=16384&i?e.getLocalName(n):n.name;return v(a,49152,0),c=r,e.updateFunctionDeclaration(n,void 0,e.visitNodes(n.modifiers,k,e.isModifier),n.asteriskToken,u,void 0,o,void 0,s)}(r);case 191:return function(n){16384&n.transformFlags&&Se();var r=c;c=void 0;var i=h(16256,66),a=e.createFunctionExpression(void 0,void 0,void 0,void 0,e.visitParameterList(n.parameters,k,t),void 0,J(n));return e.setTextRange(a,n),e.setOriginalNode(a,n),e.setEmitFlags(a,8),v(i,0,0),c=r,a}(r);case 190:return function(n){var r=262144&e.getEmitFlags(n)?h(16278,69):h(16286,65),a=c;c=void 0;var o=e.visitParameterList(n.parameters,k,t),s=64&n.transformFlags?J(n):K(n),u=16384&i?e.getLocalName(n):n.name;return v(r,49152,0),c=a,e.updateFunctionExpression(n,void 0,n.asteriskToken,u,void 0,o,void 0,s)}(r);case 230:return H(r);case 71:return function(t){return c?e.isGeneratedIdentifier(t)?t:"arguments"===t.escapedText&&m.isArgumentsLocalBinding(t)?c.argumentsName||(c.argumentsName=e.createUniqueName("arguments")):t:t}(r);case 231:return function(n){if(64&n.transformFlags){3&n.flags&&ke();var r=e.flatMap(n.declarations,1&n.flags?W:H),i=e.createVariableDeclarationList(r);if(e.setOriginalNode(i,n),e.setTextRange(i,n),e.setCommentRange(i,n),8388608&n.transformFlags&&(e.isBindingPattern(n.declarations[0].name)||e.isBindingPattern(e.lastOrUndefined(n.declarations).name))){var a=e.firstOrUndefined(r);if(a){var o=e.lastOrUndefined(r);e.setSourceMapRange(i,e.createRange(a.pos,o.end))}}return i}return e.visitEachChild(n,k,t)}(r);case 225:return function(n){if(void 0!==c){var r=c.allowedNonLabeledJumps;c.allowedNonLabeledJumps|=2;var i=e.visitEachChild(n,k,t);return c.allowedNonLabeledJumps=r,i}return e.visitEachChild(n,k,t)}(r);case 239:return function(n){var r=h(4032,0),i=e.visitEachChild(n,k,t);return v(r,0,0),i}(r);case 211:return U(r,!1);case 222:case 221:return function(n){if(c){var r=222===n.kind?2:4;if(!(n.label&&c.labels&&c.labels.get(e.idText(n.label))||!n.label&&c.allowedNonLabeledJumps&r)){var i=void 0;n.label?222===n.kind?(i="break-"+n.label.escapedText,ce(c,!0,e.idText(n.label),i)):(i="continue-"+n.label.escapedText,ce(c,!1,e.idText(n.label),i)):222===n.kind?(c.nonLocalJumps|=2,i="break"):(c.nonLocalJumps|=4,i="continue");var a=e.createLiteral(i);if(c.loopOutParameters.length){for(var o=c.loopOutParameters,s=void 0,u=0;u=0,"statementOffset not initialized correctly!"));var c=r&&95!==e.skipOuterExpressions(r.expression).kind,u=function(t,n,r,i,a){if(!r)return n&&I(t,n),0;if(!n)return t.push(e.createReturn(N())),2;if(i)return O(t,n,N()),Se(),1;var o,s,c=n.body.statements;if(a0?n.push(e.setEmitFlags(e.createVariableStatement(void 0,e.createVariableDeclarationList(e.flattenDestructuringBinding(r,k,t,0,o))),1048576)):a&&n.push(e.setEmitFlags(e.createStatement(e.createAssignment(o,e.visitNode(a,k,e.isExpression))),1048576))}function w(t,n,r,i){i=e.visitNode(i,k,e.isExpression);var a=e.createIf(e.createTypeCheck(e.getSynthesizedClone(r),"undefined"),e.setEmitFlags(e.setTextRange(e.createBlock([e.createStatement(e.setEmitFlags(e.setTextRange(e.createAssignment(e.setEmitFlags(e.getMutableClone(r),48),e.setEmitFlags(i,1584|e.getEmitFlags(i))),n),1536))]),n),1953));e.startOnNewLine(a),e.setTextRange(a,n),e.setEmitFlags(a,1050528),t.push(a)}function F(t,n,r){var i=e.lastOrUndefined(n.parameters);if(function(e,t){return i&&i.dotDotDotToken&&71===i.name.kind&&!t}(0,r)){var a=e.getMutableClone(i.name);e.setEmitFlags(a,48);var o=e.getSynthesizedClone(i.name),s=n.parameters.length-1,c=e.createLoopVariable();t.push(e.setEmitFlags(e.setTextRange(e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(a,void 0,e.createArrayLiteral([]))])),i),1048576));var u=e.createFor(e.setTextRange(e.createVariableDeclarationList([e.createVariableDeclaration(c,void 0,e.createLiteral(s))]),i),e.setTextRange(e.createLessThan(c,e.createPropertyAccess(e.createIdentifier("arguments"),"length")),i),e.setTextRange(e.createPostfixIncrement(c),i),e.createBlock([e.startOnNewLine(e.setTextRange(e.createStatement(e.createAssignment(e.createElementAccess(o,0===s?c:e.createSubtract(c,e.createLiteral(s))),e.createElementAccess(e.createIdentifier("arguments"),c))),i))]));e.setEmitFlags(u,1048576),e.startOnNewLine(u),t.push(u)}}function I(t,n){32768&n.transformFlags&&191!==n.kind&&O(t,n,e.createThis())}function O(t,n,r,i){Se();var a=e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration("_this",void 0,r)]));e.setEmitFlags(a,1050112),e.setTextRange(a,i),e.setSourceMapRange(a,n),t.push(a)}function M(t,n,r){if(16384&i){var a=void 0;switch(n.kind){case 191:return t;case 153:case 155:case 156:a=e.createVoidZero();break;case 154:a=e.createPropertyAccess(e.setEmitFlags(e.createThis(),4),"constructor");break;case 232:case 190:a=e.createConditional(e.createLogicalAnd(e.setEmitFlags(e.createThis(),4),e.createBinary(e.setEmitFlags(e.createThis(),4),93,e.getLocalName(n))),e.createPropertyAccess(e.setEmitFlags(e.createThis(),4),"constructor"),e.createVoidZero());break;default:e.Debug.failBadSyntaxKind(n)}var o=e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration("_newTarget",void 0,a)]));if(r)return[o].concat(t);t.unshift(o)}return t}function L(t){return e.setTextRange(e.createEmptyStatement(),t)}function R(t,n,r){var a=h(0,0),o=e.getCommentRange(n),s=e.getSourceMapRange(n),c=e.createMemberAccessForPropertyName(t,e.visitNode(n.name,k,e.isPropertyName),n.name),u=j(n,n,void 0,r);e.setEmitFlags(u,1536),e.setSourceMapRange(u,s);var l=e.setTextRange(e.createStatement(e.createAssignment(c,u)),n);return e.setOriginalNode(l,n),e.setCommentRange(l,o),e.setEmitFlags(l,48),v(a,49152,49152&i?16384:0),l}function B(t,n,r){var i=e.createStatement(z(t,n,r,!1));return e.setEmitFlags(i,1536),e.setSourceMapRange(i,e.getSourceMapRange(n.firstAccessor)),i}function z(t,n,r,a){var o=n.firstAccessor,s=n.getAccessor,c=n.setAccessor,u=h(0,0),l=e.getMutableClone(t);e.setEmitFlags(l,1568),e.setSourceMapRange(l,o.name);var _=e.createExpressionForPropertyName(e.visitNode(o.name,k,e.isPropertyName));e.setEmitFlags(_,1552),e.setSourceMapRange(_,o.name);var d=[];if(s){var p=j(s,void 0,void 0,r);e.setSourceMapRange(p,e.getSourceMapRange(s)),e.setEmitFlags(p,512);var f=e.createPropertyAssignment("get",p);e.setCommentRange(f,e.getCommentRange(s)),d.push(f)}if(c){var m=j(c,void 0,void 0,r);e.setSourceMapRange(m,e.getSourceMapRange(c)),e.setEmitFlags(m,512);var g=e.createPropertyAssignment("set",m);e.setCommentRange(g,e.getCommentRange(c)),d.push(g)}d.push(e.createPropertyAssignment("enumerable",e.createTrue()),e.createPropertyAssignment("configurable",e.createTrue()));var y=e.createCall(e.createPropertyAccess(e.createIdentifier("Object"),"defineProperty"),void 0,[l,_,e.createObjectLiteral(d,!0)]);return a&&e.startOnNewLine(y),v(u,49152,49152&i?16384:0),y}function j(n,r,a,o){var s=c;c=void 0;var u=o&&e.isClassLike(o)&&!e.hasModifier(n,32)?h(16286,73):h(16286,65),l=e.visitParameterList(n.parameters,k,t),_=J(n);return 16384&i&&!a&&(232===n.kind||190===n.kind)&&(a=e.getGeneratedNameForNode(n)),v(u,49152,0),c=s,e.setOriginalNode(e.setTextRange(e.createFunctionExpression(void 0,n.asteriskToken,a,void 0,l,void 0,_),r),n)}function J(r){var i,a,o,s=!1,c=!1,u=[],l=r.body;if(_(),e.isBlock(l)&&(o=e.addStandardPrologue(u,l.statements,!1)),I(u,r),A(u,r),F(u,r,!1),!s&&u.length>0&&(s=!0),e.isBlock(l))o=e.addCustomPrologue(u,l.statements,o,k),i=l.statements,e.addRange(u,e.visitNodes(l.statements,k,e.isStatement,o)),!s&&l.multiLine&&(s=!0);else{e.Debug.assert(191===r.kind),i=e.moveRangeEnd(l,-1);var d=r.equalsGreaterThanToken;e.nodeIsSynthesized(d)||e.nodeIsSynthesized(l)||(e.rangeEndIsOnSameLineAsRangeStart(d,l,n)?c=!0:s=!0);var p=e.visitNode(l,k,e.isExpression),f=e.createReturn(p);e.setTextRange(f,l),e.setEmitFlags(f,1440),u.push(f),a=l}var m=t.endLexicalEnvironment();e.addRange(u,m),M(u,r,!1),!s&&m&&m.length&&(s=!0);var g=e.createBlock(e.setTextRange(e.createNodeArray(u),i),s);return e.setTextRange(g,r.body),!s&&c&&e.setEmitFlags(g,1),a&&e.setTokenSourceMapRange(g,18,a),e.setOriginalNode(g,r.body),g}function K(n){var r=e.visitFunctionBody(n.body,S,t);return e.updateBlock(r,e.setTextRange(e.createNodeArray(M(r.statements,n,!0)),r.statements))}function U(n,r){if(r)return e.visitEachChild(n,k,t);var a=256&i?h(4032,512):h(3904,128),o=e.visitEachChild(n,k,t);return v(a,0,0),o}function V(n,r){if(!r)switch(n.expression.kind){case 189:return e.updateParen(n,V(n.expression,!1));case 198:return e.updateParen(n,q(n.expression,!1))}return e.visitEachChild(n,k,t)}function q(n,r){return e.isDestructuringAssignment(n)?e.flattenDestructuringAssignment(n,k,t,0,r):e.visitEachChild(n,k,t)}function W(n){if(e.isBindingPattern(n.name))return H(n);if(!n.initializer&&function(e){var t=m.getNodeCheckFlags(e),n=131072&t,r=262144&t;return!(0!=(64&i)||n&&r&&0!=(512&i))&&0==(2048&i)&&(!m.isDeclarationWithCollidingName(e)||r&&!n&&0==(3072&i))}(n)){var r=e.getMutableClone(n);return r.initializer=e.createVoidZero(),r}return e.visitEachChild(n,k,t)}function H(n){var r,i=h(32,0);return r=e.isBindingPattern(n.name)?e.flattenDestructuringBinding(n,k,t,0,void 0,0!=(32&i)):e.visitEachChild(n,k,t),v(i,0,0),r}function G(t){c.labels.set(e.idText(t.label),!0)}function X(t){c.labels.set(e.idText(t.label),!1)}function Q(n,r,a,o,s){var u=h(n,r),_=function(n,r,a){if(!ie(n)){var o=void 0;c&&(o=c.allowedNonLabeledJumps,c.allowedNonLabeledJumps=6);var s=a?a(n,r,void 0):e.restoreEnclosingLabel(e.visitEachChild(n,k,t),r,c&&X);return c&&(c.allowedNonLabeledJumps=o),s}var u,_=e.createUniqueName("_loop");switch(n.kind){case 218:case 219:case 220:var p=n.initializer;p&&231===p.kind&&(u=p)}var f=[],m=[];if(u&&3&e.getCombinedNodeFlags(u))for(var g=0,y=u.declarations;g=72&&n<=107)return e.setTextRange(e.createLiteral(t),t)}}}(l||(l={})),function(e){var t,n,r,i,a;!function(e){e[e.Nop=0]="Nop",e[e.Statement=1]="Statement",e[e.Assign=2]="Assign",e[e.Break=3]="Break",e[e.BreakWhenTrue=4]="BreakWhenTrue",e[e.BreakWhenFalse=5]="BreakWhenFalse",e[e.Yield=6]="Yield",e[e.YieldStar=7]="YieldStar",e[e.Return=8]="Return",e[e.Throw=9]="Throw",e[e.Endfinally=10]="Endfinally"}(t||(t={})),function(e){e[e.Open=0]="Open",e[e.Close=1]="Close"}(n||(n={})),function(e){e[e.Exception=0]="Exception",e[e.With=1]="With",e[e.Switch=2]="Switch",e[e.Loop=3]="Loop",e[e.Labeled=4]="Labeled"}(r||(r={})),function(e){e[e.Try=0]="Try",e[e.Catch=1]="Catch",e[e.Finally=2]="Finally",e[e.Done=3]="Done"}(i||(i={})),function(e){e[e.Next=0]="Next",e[e.Throw=1]="Throw",e[e.Return=2]="Return",e[e.Break=3]="Break",e[e.Yield=4]="Yield",e[e.YieldStar=5]="YieldStar",e[e.Catch=6]="Catch",e[e.Endfinally=7]="Endfinally"}(a||(a={})),e.transformGenerators=function(t){var n,r,i,a,s,c,u,l,_,d,p=t.resumeLexicalEnvironment,f=t.endLexicalEnvironment,m=t.hoistFunctionDeclaration,g=t.hoistVariableDeclaration,y=t.getCompilerOptions(),h=e.getEmitScriptTarget(y),v=t.getEmitResolver(),b=t.onSubstituteNode;t.onSubstituteNode=function(t,i){return i=b(t,i),1===t?function(t){return e.isIdentifier(t)?function(t){if(!e.isGeneratedIdentifier(t)&&n&&n.has(e.idText(t))){var i=e.getOriginalNode(t);if(e.isIdentifier(i)&&i.parent){var a=v.getReferencedValueDeclaration(i);if(a){var o=r[e.getOriginalNodeId(a)];if(o){var s=e.getMutableClone(o);return e.setSourceMapRange(s,t),e.setCommentRange(s,t),s}}}}return t}(t):t}(i):i};var x,k,S,D,C,T,E,N,A,P,w,F,I=1,O=0,M=0;return function(n){if(n.isDeclarationFile||0==(512&n.transformFlags))return n;var r=e.visitEachChild(n,L,t);return e.addEmitHelpers(r,t.readEmitHelpers()),r};function L(n){var r=n.transformFlags;return a?function(n){switch(n.kind){case 216:case 217:return function(n){return a?(re(),n=e.visitEachChild(n,L,t),ae(),n):e.visitEachChild(n,L,t)}(n);case 225:return function(n){return a&&Z({kind:2,isScript:!0,breakLabel:-1}),n=e.visitEachChild(n,L,t),a&&oe(),n}(n);case 226:return function(n){return a&&Z({kind:4,isScript:!0,labelText:e.idText(n.label),breakLabel:-1}),n=e.visitEachChild(n,L,t),a&&se(),n}(n);default:return R(n)}}(n):i?R(n):256&r?function(n){switch(n.kind){case 232:return B(n);case 190:return z(n);default:return e.Debug.failBadSyntaxKind(n),e.visitEachChild(n,L,t)}}(n):512&r?e.visitEachChild(n,L,t):n}function R(n){switch(n.kind){case 232:return B(n);case 190:return z(n);case 155:case 156:return function(n){var r=i,o=a;return i=!1,a=!1,n=e.visitEachChild(n,L,t),i=r,a=o,n}(n);case 212:return function(t){if(16777216&t.transformFlags)q(t.declarationList);else{if(1048576&e.getEmitFlags(t))return t;for(var n=0,r=t.declarationList.declarations;n0?e.inlineExpressions(e.map(s,W)):void 0,e.visitNode(n.condition,L,e.isExpression),e.visitNode(n.incrementor,L,e.isExpression),e.visitNode(n.statement,L,e.isStatement,e.liftToBlock))}else n=e.visitEachChild(n,L,t);return a&&ae(),n}(n);case 219:return function(n){a&&re();var r=n.initializer;if(e.isVariableDeclarationList(r)){for(var i=0,o=r.declarations;i0)return ge(r,n)}return e.visitEachChild(n,L,t)}(n);case 221:return function(n){if(a){var r=pe(n.label&&e.idText(n.label));if(r>0)return ge(r,n)}return e.visitEachChild(n,L,t)}(n);case 223:return function(t){return n=e.visitNode(t.expression,L,e.isExpression),r=t,e.setTextRange(e.createReturn(e.createArrayLiteral(n?[me(2),n]:[me(2)])),r);var n,r}(n);default:return 16777216&n.transformFlags?function(n){switch(n.kind){case 198:return function(n){switch(e.getExpressionAssociativity(n)){case 0:return function(n){if(H(n.right)){if(e.isLogicalOperator(n.operatorToken.kind))return function(t){var n=Y(),r=Q();return ve(r,e.visitNode(t.left,L,e.isExpression),t.left),53===t.operatorToken.kind?ke(n,r,t.left):xe(n,r,t.left),ve(r,e.visitNode(t.right,L,e.isExpression),t.right),$(n),r}(n);if(26===n.operatorToken.kind)return function(t){var n=[];return r(t.left),r(t.right),e.inlineExpressions(n);function r(t){e.isBinaryExpression(t)&&26===t.operatorToken.kind?(r(t.left),r(t.right)):(H(t)&&n.length>0&&(Se(1,[e.createStatement(e.inlineExpressions(n))]),n=[]),n.push(e.visitNode(t,L,e.isExpression)))}}(n);var r=e.getMutableClone(n);return r.left=X(e.visitNode(n.left,L,e.isExpression)),r.right=e.visitNode(n.right,L,e.isExpression),r}return e.visitEachChild(n,L,t)}(n);case 1:return function(n){var r,i=n.left,a=n.right;if(H(a)){var o=void 0;switch(i.kind){case 183:o=e.updatePropertyAccess(i,X(e.visitNode(i.expression,L,e.isLeftHandSideExpression)),i.name);break;case 184:o=e.updateElementAccess(i,X(e.visitNode(i.expression,L,e.isLeftHandSideExpression)),X(e.visitNode(i.argumentExpression,L,e.isExpression)));break;default:o=e.visitNode(i,L,e.isExpression)}var s=n.operatorToken.kind;return(r=s)>=59&&r<=70?e.setTextRange(e.createAssignment(o,e.setTextRange(e.createBinary(X(o),function(e){switch(s){case 59:return 37;case 60:return 38;case 61:return 39;case 62:return 40;case 63:return 41;case 64:return 42;case 65:return 45;case 66:return 46;case 67:return 47;case 68:return 48;case 69:return 49;case 70:return 50}}(),e.visitNode(a,L,e.isExpression)),n)),n):e.updateBinary(n,o,e.visitNode(a,L,e.isExpression))}return e.visitEachChild(n,L,t)}(n);default:e.Debug.fail("Unknown associativity.")}}(n);case 199:return function(n){if(H(n.whenTrue)||H(n.whenFalse)){var r=Y(),i=Y(),a=Q();return ke(r,e.visitNode(n.condition,L,e.isExpression),n.condition),ve(a,e.visitNode(n.whenTrue,L,e.isExpression),n.whenTrue),be(i),$(r),ve(a,e.visitNode(n.whenFalse,L,e.isExpression),n.whenFalse),$(i),a}return e.visitEachChild(n,L,t)}(n);case 201:return function(n){var r,i=Y(),a=e.visitNode(n.expression,L,e.isExpression);return n.asteriskToken?Se(7,[0==(8388608&e.getEmitFlags(n.expression))?e.createValuesHelper(t,a,n):a],n):function(e,t){Se(6,[e],n)}(a),$(i),r=n,e.setTextRange(e.createCall(e.createPropertyAccess(D,"sent"),void 0,[]),r)}(n);case 181:return function(e){return J(e.elements,void 0,void 0,e.multiLine)}(n);case 182:return function(t){var n=t.properties,r=t.multiLine,i=G(n),a=Q();ve(a,e.createObjectLiteral(e.visitNodes(n,L,e.isObjectLiteralElementLike,0,i),r));var o=e.reduceLeft(n,function(n,i){H(i)&&n.length>0&&(he(e.createStatement(e.inlineExpressions(n))),n=[]);var o=e.createExpressionForObjectLiteralElementLike(t,i,a),s=e.visitNode(o,L,e.isExpression);return s&&(r&&e.startOnNewLine(s),n.push(s)),n},[],i);return o.push(r?e.startOnNewLine(e.getMutableClone(a)):a),e.inlineExpressions(o)}(n);case 184:return function(n){if(H(n.argumentExpression)){var r=e.getMutableClone(n);return r.expression=X(e.visitNode(n.expression,L,e.isLeftHandSideExpression)),r.argumentExpression=e.visitNode(n.argumentExpression,L,e.isExpression),r}return e.visitEachChild(n,L,t)}(n);case 185:return function(n){if(!e.isImportCall(n)&&e.forEach(n.arguments,H)){var r=e.createCallBinding(n.expression,g,h,!0),i=r.thisArg;return e.setOriginalNode(e.createFunctionApply(X(e.visitNode(r.target,L,e.isLeftHandSideExpression)),i,J(n.arguments),n),n)}return e.visitEachChild(n,L,t)}(n);case 186:return function(n){if(e.forEach(n.arguments,H)){var r=e.createCallBinding(e.createPropertyAccess(n.expression,"bind"),g),i=r.thisArg;return e.setOriginalNode(e.setTextRange(e.createNew(e.createFunctionApply(X(e.visitNode(r.target,L,e.isExpression)),i,J(n.arguments,e.createVoidZero())),void 0,[]),n),n)}return e.visitEachChild(n,L,t)}(n);default:return e.visitEachChild(n,L,t)}}(n):33554944&n.transformFlags?e.visitEachChild(n,L,t):n}}function B(n){if(n.asteriskToken)n=e.setOriginalNode(e.setTextRange(e.createFunctionDeclaration(void 0,n.modifiers,void 0,n.name,void 0,e.visitParameterList(n.parameters,L,t),void 0,j(n.body)),n),n);else{var r=i,o=a;i=!1,a=!1,n=e.visitEachChild(n,L,t),i=r,a=o}return i?void m(n):n}function z(n){if(n.asteriskToken)n=e.setOriginalNode(e.setTextRange(e.createFunctionExpression(void 0,void 0,n.name,void 0,e.visitParameterList(n.parameters,L,t),void 0,j(n.body)),n),n);else{var r=i,o=a;i=!1,a=!1,n=e.visitEachChild(n,L,t),i=r,a=o}return n}function j(t){var n=[],r=i,o=a,m=s,g=c,y=u,h=l,v=_,b=d,C=I,T=x,E=k,N=S,A=D;i=!0,a=!1,s=void 0,c=void 0,u=void 0,l=void 0,_=void 0,d=void 0,I=1,x=void 0,k=void 0,S=void 0,D=e.createTempVariable(void 0),p();var P=e.addPrologue(n,t.statements,!1,L);K(t.statements,P);var w=De();return e.addRange(n,f()),n.push(e.createReturn(w)),i=r,a=o,s=m,c=g,u=y,l=h,_=v,d=b,I=C,x=T,k=E,S=N,D=A,e.setTextRange(e.createBlock(n,t.multiLine),t)}function J(t,n,r,i){var a,o=G(t);if(o>0){a=Q();var s=e.visitNodes(t,L,e.isExpression,0,o);ve(a,e.createArrayLiteral(n?[n].concat(s):s)),n=void 0}var c=e.reduceLeft(t,function(t,r){if(H(r)&&t.length>0){var o=void 0!==a;a||(a=Q()),ve(a,o?e.createArrayConcat(a,[e.createArrayLiteral(t,i)]):e.createArrayLiteral(n?[n].concat(t):t,i)),n=void 0,t=[]}return t.push(e.visitNode(r,L,e.isExpression)),t},[],o);return a?e.createArrayConcat(a,[e.createArrayLiteral(c,i)]):e.setTextRange(e.createArrayLiteral(n?[n].concat(c):c,i),r)}function K(e,t){void 0===t&&(t=0);for(var n=e.length,r=t;r0?be(n,t):he(t)}(i);case 222:return function(t){var n=de(t.label?e.idText(t.label):void 0);n>0?be(n,t):he(t)}(i);case 223:return function(t){Se(8,[e.visitNode(t.expression,L,e.isExpression)],t)}(i);case 224:return function(t){var n,r,i;H(t)?(n=X(e.visitNode(t.expression,L,e.isExpression)),r=Y(),i=Y(),$(r),Z({kind:1,expression:n,startLabel:r,endLabel:i}),U(t.statement),e.Debug.assert(1===ne()),$(ee().endLabel)):he(e.visitNode(t,L,e.isStatement))}(i);case 225:return function(t){if(H(t.caseBlock)){for(var n=t.caseBlock,r=n.clauses.length,i=(Z({kind:2,isScript:!1,breakLabel:p=Y()}),p),a=X(e.visitNode(t.expression,L,e.isExpression)),o=[],s=-1,c=0;c0)break;_.push(e.createCaseClause(e.visitNode(u.expression,L,e.isExpression),[ge(o[c],u.expression)]))}else d++;_.length&&(he(e.createSwitch(a,e.createCaseBlock(_))),l+=_.length,_=[]),d>0&&(l+=d,d=0)}for(be(s>=0?o[s]:i),c=0;c0)break;c.push(W(l))}c.length&&(he(e.createStatement(e.inlineExpressions(c))),s+=c.length,c=[])}}function W(t){return e.setSourceMapRange(e.createAssignment(e.setSourceMapRange(e.getSynthesizedClone(t.name),t.name),e.visitNode(t.initializer,L,e.isExpression)),t)}function H(e){return e&&0!=(16777216&e.transformFlags)}function G(e){for(var t=e.length,n=0;n=0;n--){var r=l[n];if(!ue(r))break;if(r.labelText===e)return!0}return!1}function de(e){if(l)if(e)for(var t=l.length-1;t>=0;t--){if(ue(n=l[t])&&n.labelText===e)return n.breakLabel;if(ce(n)&&_e(e,t-1))return n.breakLabel}else for(t=l.length-1;t>=0;t--){var n;if(ce(n=l[t]))return n.breakLabel}return 0}function pe(e){if(l)if(e){for(var t=l.length-1;t>=0;t--)if(le(n=l[t])&&_e(e,t-1))return n.continueLabel}else for(t=l.length-1;t>=0;t--){var n;if(le(n=l[t]))return n.continueLabel}return 0}function fe(t){if(t>0){void 0===d&&(d=[]);var n=e.createLiteral(-1);return void 0===d[t]?d[t]=[n]:d[t].push(n),n}return e.createOmittedExpression()}function me(t){var n=e.createLiteral(t);return e.addSyntheticTrailingComment(n,3,function(e){switch(e){case 2:return"return";case 3:return"break";case 4:return"yield";case 5:return"yield*";case 7:return"endfinally"}}(t)),n}function ge(t,n){return e.Debug.assertLessThan(0,t,"Invalid label"),e.setTextRange(e.createReturn(e.createArrayLiteral([me(3),fe(t)])),n)}function ye(){Se(0)}function he(e){e?Se(1,[e]):ye()}function ve(e,t,n){Se(2,[e,t],n)}function be(e,t){Se(3,[e],t)}function xe(e,t,n){Se(4,[e,t],n)}function ke(e,t,n){Se(5,[e,t],n)}function Se(e,t,n){void 0===x&&(x=[],k=[],S=[]),void 0===_&&$(Y());var r=x.length;x[r]=e,k[r]=t,S[r]=n}function De(){O=0,M=0,C=void 0,T=!1,E=!1,N=void 0,A=void 0,P=void 0,w=void 0,F=void 0;var n=function(){if(x){for(var t=0;t0)),524288))}function Ce(e){(function(e){if(!E)return!0;if(!_||!d)return!1;for(var t=0;t<_.length;t++)if(_[t]===e&&d[t])return!0;return!1})(e)&&(Ee(e),F=void 0,Pe(void 0,void 0)),A&&N&&Te(!1),function(){if(void 0!==d&&void 0!==C)for(var e=0;e=0;n--)A=[e.createWith(F[n].expression,e.createBlock(A))];if(w){var r=w.startLabel,i=w.catchLabel,a=w.finallyLabel,o=w.endLabel;A.unshift(e.createStatement(e.createCall(e.createPropertyAccess(e.createPropertyAccess(D,"trys"),"push"),void 0,[e.createArrayLiteral([fe(r),fe(i),fe(a),fe(o)])]))),w=void 0}t&&A.push(e.createStatement(e.createAssignment(e.createPropertyAccess(D,"label"),e.createLiteral(M+1))))}N.push(e.createCaseClause(e.createLiteral(M),A||[])),A=void 0}function Ee(e){if(_)for(var t=0;t<_.length;t++)_[t]===e&&(A&&(Te(!T),T=!1,E=!1,M++),void 0===C&&(C=[]),void 0===C[M]?C[M]=[t]:C[M].push(t))}function Ne(t){if(Ee(t),function(e){if(s)for(;O 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n };'}}(l||(l={})),function(e){e.transformModule=function(a){var o=a.startLexicalEnvironment,s=a.endLexicalEnvironment,c=a.hoistVariableDeclaration,u=a.getCompilerOptions(),l=a.getEmitResolver(),_=a.getEmitHost(),d=e.getEmitScriptTarget(u),p=e.getEmitModuleKind(u),f=a.onSubstituteNode,m=a.onEmitNode;a.onSubstituteNode=function(t,n){return(n=f(t,n)).id&&h[n.id]?n:1===t?function(t){switch(t.kind){case 71:return G(t);case 198:return function(t){if(e.isAssignmentOperator(t.operatorToken.kind)&&e.isIdentifier(t.left)&&!e.isGeneratedIdentifier(t.left)&&!e.isLocalName(t.left)&&!e.isDeclarationNameOfEnumOrNamespace(t.left)){var n=X(t.left);if(n){for(var r=t,i=0,a=n;i=2?2:0)),t))}else r&&e.isDefaultImport(t)&&(n=e.append(n,e.createVariableStatement(void 0,e.createVariableDeclarationList([e.setTextRange(e.createVariableDeclaration(e.getSynthesizedClone(r.name),void 0,e.getGeneratedNameForNode(t)),t)],d>=2?2:0))));if(R(t)){var a=e.getOriginalNodeId(t);x[a]=B(x[a],t)}else n=B(n,t);return e.singleOrMany(n)}(t);case 241:return function(t){var n;if(e.Debug.assert(e.isExternalModuleImportEqualsDeclaration(t),"import= for internal module references should be handled in an earlier transformer."),p!==e.ModuleKind.AMD?n=e.hasModifier(t,1)?e.append(n,e.setTextRange(e.createStatement(W(t.name,M(t))),t)):e.append(n,e.setTextRange(e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(e.getSynthesizedClone(t.name),void 0,M(t))],d>=2?2:0)),t)):e.hasModifier(t,1)&&(n=e.append(n,e.setTextRange(e.createStatement(W(e.getExportName(t),e.getLocalName(t))),t))),R(t)){var r=e.getOriginalNodeId(t);x[r]=z(x[r],t)}else n=z(n,t);return e.singleOrMany(n)}(t);case 248:return function(t){if(t.moduleSpecifier){var n=e.getGeneratedNameForNode(t);if(t.exportClause){var r=[];p!==e.ModuleKind.AMD&&r.push(e.setTextRange(e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(n,void 0,M(t))])),t));for(var i=0,o=t.exportClause.elements;i=2?i=e.createArrowFunction(void 0,void 0,c,void 0,void 0,l):(i=e.createFunctionExpression(void 0,void 0,void 0,void 0,c,void 0,l),n&&e.setEmitFlags(i,8));var _=e.createNew(e.createIdentifier("Promise"),void 0,[i]);return u.esModuleInterop?(a.requestEmitHelper(r),e.createCall(e.createPropertyAccess(_,e.createIdentifier("then")),void 0,[e.getHelperName("__importStar")])):_}function I(t,n){var i,o=e.createCall(e.createPropertyAccess(e.createIdentifier("Promise"),"resolve"),void 0,[]),s=e.createCall(e.createIdentifier("require"),void 0,t?[t]:[]);return u.esModuleInterop&&(a.requestEmitHelper(r),s=e.createCall(e.getHelperName("__importStar"),void 0,[s])),d>=2?i=e.createArrowFunction(void 0,void 0,[],void 0,void 0,s):(i=e.createFunctionExpression(void 0,void 0,void 0,void 0,[],void 0,e.createBlock([e.createReturn(s)])),n&&e.setEmitFlags(i,8)),e.createCall(e.createPropertyAccess(o,"then"),void 0,[i])}function O(t,n){return!u.esModuleInterop||67108864&e.getEmitFlags(t)?n:e.getImportNeedsImportStarHelper(t)?(a.requestEmitHelper(r),e.createCall(e.getHelperName("__importStar"),void 0,[n])):e.getImportNeedsImportDefaultHelper(t)?(a.requestEmitHelper(i),e.createCall(e.getHelperName("__importDefault"),void 0,[n])):n}function M(t){var n=e.getExternalModuleNameLiteral(t,g,_,l,u),r=[];return n&&r.push(n),e.createCall(e.createIdentifier("require"),void 0,r)}function L(t){return e.isBindingPattern(t.name)?e.flattenDestructuringAssignment(e.visitNode(t,w),void 0,a,0,!1,W):e.createAssignment(e.setTextRange(e.createPropertyAccess(e.createIdentifier("exports"),t.name),t.name),e.visitNode(t.initializer,w))}function R(t){return 0!=(4194304&e.getEmitFlags(t))}function B(e,t){if(y.exportEquals)return e;var n=t.importClause;if(!n)return e;n.name&&(e=U(e,n));var r=n.namedBindings;if(r)switch(r.kind){case 244:e=U(e,r);break;case 245:for(var i=0,a=r.elements;i0,"Cannot modify the lexical environment during initialization."),e.Debug.assert(y<2,"Cannot modify the lexical environment after transformation has completed."),e.Debug.assert(!f,"Lexical environment is suspended."),_[p]=s,d[p]=c,p++,s=void 0,c=void 0},suspendLexicalEnvironment:function(){e.Debug.assert(y>0,"Cannot modify the lexical environment during initialization."),e.Debug.assert(y<2,"Cannot modify the lexical environment after transformation has completed."),e.Debug.assert(!f,"Lexical environment is already suspended."),f=!0},resumeLexicalEnvironment:function(){e.Debug.assert(y>0,"Cannot modify the lexical environment during initialization."),e.Debug.assert(y<2,"Cannot modify the lexical environment after transformation has completed."),e.Debug.assert(f,"Lexical environment is not suspended."),f=!1},endLexicalEnvironment:function(){var t;if(e.Debug.assert(y>0,"Cannot modify the lexical environment during initialization."),e.Debug.assert(y<2,"Cannot modify the lexical environment after transformation has completed."),e.Debug.assert(!f,"Lexical environment is suspended."),(s||c)&&(c&&(t=c.slice()),s)){var n=e.createVariableStatement(void 0,e.createVariableDeclarationList(s));t?t.push(n):t=[n]}return s=_[--p],c=d[p],0===p&&(_=[],d=[]),t},hoistVariableDeclaration:function(t){e.Debug.assert(y>0,"Cannot modify the lexical environment during initialization."),e.Debug.assert(y<2,"Cannot modify the lexical environment after transformation has completed.");var n=e.setEmitFlags(e.createVariableDeclaration(t),64);s?s.push(n):s=[n]},hoistFunctionDeclaration:function(t){e.Debug.assert(y>0,"Cannot modify the lexical environment during initialization."),e.Debug.assert(y<2,"Cannot modify the lexical environment after transformation has completed."),c?c.push(t):c=[t]},requestEmitHelper:function(t){e.Debug.assert(y>0,"Cannot modify the transformation context during initialization."),e.Debug.assert(y<2,"Cannot modify the transformation context after transformation has completed."),e.Debug.assert(!t.scoped,"Cannot request a scoped emit helper."),u=e.append(u,t)},readEmitHelpers:function(){e.Debug.assert(y>0,"Cannot modify the transformation context during initialization."),e.Debug.assert(y<2,"Cannot modify the transformation context after transformation has completed.");var t=u;return u=void 0,t},enableSubstitution:function(t){e.Debug.assert(y<2,"Cannot modify the transformation context after transformation has completed."),l[t]|=1},enableEmitNotification:function(t){e.Debug.assert(y<2,"Cannot modify the transformation context after transformation has completed."),l[t]|=2},isSubstitutionEnabled:S,isEmitNotificationEnabled:D,get onSubstituteNode(){return m},set onSubstituteNode(t){e.Debug.assert(y<1,"Cannot modify transformation hooks after initialization has completed."),e.Debug.assert(void 0!==t,"Value must not be 'undefined'"),m=t},get onEmitNode(){return g},set onEmitNode(t){e.Debug.assert(y<1,"Cannot modify transformation hooks after initialization has completed."),e.Debug.assert(void 0!==t,"Value must not be 'undefined'"),g=t}},v=0,b=i;v=0&&v(g(c)),l&&b(_),64&i?(m=!0,n(e,t),m=!1):n(e,t),l&&b(l),294!==t.kind&&0==(32&i)&&u>=0&&v(u),l&&b(_)}},emitTokenWithSourceMap:function(e,t,n,r,i){if(m)return i(t,n,r);var a=e&&e.emitNode,o=a&&a.flags,s=a&&a.tokenSourceMapRanges&&a.tokenSourceMapRanges[t];return r=g(s?s.pos:r),0==(128&o)&&r>=0&&v(r),r=i(t,n,r),s&&(r=s.end),0==(256&o)&&r>=0&&v(r),r},getText:x,getSourceMappingURL:function(){if(!m){if(p.inlineSourceMap){var t=e.convertToBase64(x());return d.jsSourceMappingURL="data:application/json;base64,"+t}return d.jsSourceMappingURL}}};function g(t){return a.skipTrivia?a.skipTrivia(t):e.skipTrivia(o,t)}function y(){m||(a=void 0,s=void 0,c=void 0,u=void 0,l=void 0,_=void 0,d=void 0)}function h(){if(u&&u!==l){var t=l.emittedColumn;if(l.emittedLine===u.emittedLine)d.sourceMapMappings&&(d.sourceMapMappings+=",");else{for(var n=l.emittedLine;n=0&&(e.Debug.assert(!1,"We do not support name index right now, Make sure to update updateLastEncodedAndRecordedSpans when we start using this"),d.sourceMapMappings+=i(u.nameIndex-_),_=u.nameIndex),d.sourceMapDecodedMappings.push(l=u)}}function v(t){if(!m&&!e.positionIsSynthesized(t)){f&&e.performance.mark("beforeSourcemap");var n=e.getLineAndCharacterOfPosition(a,t);n.line++,n.character++;var i=r.getLine(),o=r.getColumn();!u||u.emittedLine!==i||u.emittedColumn!==o||u.sourceIndex===c&&(u.sourceLine>n.line||u.sourceLine===n.line&&u.sourceColumn>n.character)?(h(),u={emittedLine:i,emittedColumn:o,sourceLine:n.line,sourceColumn:n.character,sourceIndex:c}):(u.sourceLine=n.line,u.sourceColumn=n.character,u.sourceIndex=c),f&&(e.performance.mark("afterSourcemap"),e.performance.measure("Source Map","beforeSourcemap","afterSourcemap"))}}function b(t){if(!m){o=(a=t).text;var r=p.sourceRoot?n.getCommonSourceDirectory():s,i=e.getRelativePathToDirectoryOrUrl(r,a.fileName,n.getCurrentDirectory(),n.getCanonicalFileName,!0);-1===(c=d.sourceMapSources.indexOf(i))&&(c=d.sourceMapSources.length,d.sourceMapSources.push(i),d.inputSourceFileNames.push(a.fileName),p.inlineSources&&d.sourceMapSourcesContent.push(a.text))}}function x(){if(!m)return h(),JSON.stringify({version:3,file:d.sourceMapFile,sourceRoot:d.sourceMapSourceRoot,sources:d.sourceMapSources,names:d.sourceMapNames,mappings:d.sourceMapMappings,sourcesContent:d.sourceMapSourcesContent})}};var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function r(e){if(e<64)return n.charAt(e);throw TypeError(e+": not a 64 based value")}function i(e){e<0?e=1+(-e<<1):e<<=1;var t="";do{var n=31&e;(e>>=5)>0&&(n|=32),t+=r(n)}while(e>0);return t}}(l||(l={})),function(e){e.createCommentWriter=function(t,n){var r,i,a,o,s,c=t.extendedDiagnostics,u=e.getNewLineCharacter(t),l=-1,_=-1,d=-1,p=!1,f=t.removeComments;return{reset:function(){i=void 0,a=void 0,o=void 0,s=void 0},setWriter:function(e){r=e},setSourceFile:function(t){a=(i=t).text,o=e.getLineStarts(i),s=void 0},emitNodeWithComments:function(t,n,r){if(f)r(t,n);else if(n){p=!1;var i=n.emitNode,a=i&&i.flags,o=i&&i.commentRange||n,s=o.pos,u=o.end;if(s<0&&u<0||s===u)m(t,n,i,a,r);else{c&&e.performance.mark("preEmitNodeWithComment");var g=294!==n.kind,y=s<0||0!=(512&a)||10===n.kind,h=u<0||0!=(1024&a)||10===n.kind;y||v(s,g);var b=l,x=_,S=d;y||(l=s),h||(_=u,231===n.kind&&(d=u)),c&&e.performance.measure("commentTime","preEmitNodeWithComment"),m(t,n,i,a,r),c&&e.performance.mark("postEmitNodeWithComment"),l=b,_=x,d=S,!h&&g&&C(u,k),c&&e.performance.measure("commentTime","postEmitNodeWithComment")}}},emitBodyWithDetachedComments:function(t,n,i){c&&e.performance.mark("preEmitBodyWithDetachedComments");var l,_=n.pos,d=n.end,m=e.getEmitFlags(t),g=f||d<0||0!=(1024&m);_<0||0!=(512&m)||(l=e.emitDetachedComments(a,o,r,T,n,u,f))&&(s?s.push(l):s=[l]),c&&e.performance.measure("commentTime","preEmitBodyWithDetachedComments"),2048&m&&!f?(f=!0,i(t),f=!1):i(t),c&&e.performance.mark("beginEmitBodyWithDetachedCommetns"),g||(v(n.end,!0),p&&!r.isAtStartOfLine()&&r.writeLine()),c&&e.performance.measure("commentTime","beginEmitBodyWithDetachedCommetns")},emitTrailingCommentsOfPosition:function(t,n){f||(c&&e.performance.mark("beforeEmitTrailingCommentsOfPosition"),C(t,n?k:S),c&&e.performance.measure("commentTime","beforeEmitTrailingCommentsOfPosition"))},emitLeadingCommentsOfPosition:function(e){f||-1===e||v(e,!0)}};function m(t,n,r,i,a){var o=r&&r.leadingComments;e.some(o)&&(c&&e.performance.mark("preEmitNodeWithSynthesizedComments"),e.forEach(o,g),c&&e.performance.measure("commentTime","preEmitNodeWithSynthesizedComments")),function(e,t,n,r){2048&n?(f=!0,r(e,t),f=!1):r(e,t)}(t,n,i,a);var s=r&&r.trailingComments;e.some(s)&&(c&&e.performance.mark("postEmitNodeWithSynthesizedComments"),e.forEach(s,y),c&&e.performance.measure("commentTime","postEmitNodeWithSynthesizedComments"))}function g(e){2===e.kind&&r.writeLine(),h(e),e.hasTrailingNewLine||2===e.kind?r.writeLine():r.write(" ")}function y(e){r.isAtStartOfLine()||r.write(" "),h(e),e.hasTrailingNewLine&&r.writeLine()}function h(t){var n=function(e){return 3===e.kind?"/*"+e.text+"*/":"//"+e.text}(t),i=3===t.kind?e.computeLineStarts(n):void 0;e.writeCommentRange(n,i,r,0,n.length,u)}function v(e,t){p=!1,t?D(e,x):0===e&&D(e,b)}function b(t,n,r,i,o){(function(t,n){return e.isRecognizedTripleSlashComment(a,t,n)})(t,n)&&x(t,n,r,i,o)}function x(t,i,s,c,l){p||(e.emitNewLineBeforeLeadingCommentOfPosition(o,r,l,t),p=!0),n&&n(t),e.writeCommentRange(a,o,r,t,i,u),n&&n(i),c?r.writeLine():3===s&&r.write(" ")}function k(t,i,s,c){r.isAtStartOfLine()||r.write(" "),n&&n(t),e.writeCommentRange(a,o,r,t,i,u),n&&n(i),c&&r.writeLine()}function S(t,i,s,c){n&&n(t),e.writeCommentRange(a,o,r,t,i,u),n&&n(i),c?r.writeLine():r.write(" ")}function D(t,n){-1!==l&&t===l||(function(t){return void 0!==s&&e.lastOrUndefined(s).nodePos===t}(t)?function(t){var n=e.lastOrUndefined(s).detachedCommentEndPos;s.length-1?s.pop():s=void 0,e.forEachLeadingCommentRange(a,n,t,n)}(n):e.forEachLeadingCommentRange(a,t,n,t))}function C(t,n){(-1===_||t!==_&&t!==d)&&e.forEachTrailingCommentRange(a,t,n)}function T(t,r,i,a,o,s){n&&n(a),e.writeCommentRange(t,r,i,a,o,s),n&&n(o)}}}(l||(l={})),function(e){function t(t,n,r,i,a,o){var s,c,u,l,_,d,p,f,m,g,y,h,v=273===a.kind?a.sourceFiles:[a],b=273===a.kind,x=t.getNewLine(),k=t.getCompilerOptions();L();var S,D,C,T=!1,E=k.removeComments?e.noop:function(t){if(t){var n=e.getJSDocCommentRanges(t,m);e.emitNewLineBeforeLeadingComments(g,d,t,n),e.emitComments(m,g,d,n,!1,!0,x,e.writeCommentRange)}},N=k.stripInternal?function(t){if(t){var n=e.getLeadingCommentRanges(m,t.pos);if(e.forEach(n,M))return;be(t)}}:be,A=!0,P=[],w="",F=[],I=!1,O=[];return e.forEach(v,function(n){if(!e.isSourceFileJavaScript(n)){if(k.noResolve||e.forEach(n.referencedFiles,function(r){var a=e.tryResolveScriptReference(t,n,r);a&&!e.contains(F,a)&&(function(n,r,a){var o,s=!1;return n.isDeclarationFile?o=n.fileName:e.forEachEmittedFile(t,function(t,i){var a=273===i.kind;a&&!r||(e.Debug.assert(!!t.declarationFilePath||e.isSourceFileJavaScript(n),"Declaration file is not present only for javascript files"),o=t.declarationFilePath||t.jsFilePath,s=a)},n,a),o&&(o=e.getRelativePathToDirectoryOrUrl(e.getDirectoryPath(e.normalizeSlashes(i)),o,t.getCurrentDirectory(),t.getCanonicalFileName,!1),w+='/// '+x),s}(a,!b&&!I,o)&&(I=!0),F.push(a))}),f=!1,b&&e.isExternalModule(n)?e.isExternalModule(n)&&(A=!1,s('declare module "'+e.getResolvedExternalModuleName(t,n)+'" {'),c(),u(),Y(n),l(),s("}"),c()):(A=!0,Y(n)),P.length){var r=d;e.forEach(P,function(t){if(t.isVisible&&!t.asynchronousOutput){e.Debug.assert(242===t.node.kind),L(),e.Debug.assert(0===t.indent||1===t.indent&&b);for(var n=0;n'+x}),{reportedDeclarationError:T,moduleElementDeclarationEmitInfo:O,synchronousDeclarationOutput:d.getText(),referencesOutput:w};function M(t){var n=m.substring(t.pos,t.end);return e.stringContains(n,"@internal")}function L(){var t=e.createTextWriter(x);t.trackSymbol=J,t.reportInaccessibleThisError=V,t.reportInaccessibleUniqueSymbolError=U,t.reportPrivateInBaseOfClassExpression=K,t.writeKeyword=t.write,t.writeOperator=t.write,t.writePunctuation=t.write,t.writeSpace=t.write,t.writeStringLiteral=t.writeLiteral,t.writeParameter=t.write,t.writeProperty=t.write,t.writeSymbol=t.write,R(t)}function R(e){d=e,s=e.write,_=e.writeTextOfNode,c=e.writeLine,u=e.increaseIndent,l=e.decreaseIndent}function B(t){var n=d;e.forEach(t,function(t){var n;230===t.kind?n=t.parent.parent:245===t.kind||246===t.kind||243===t.kind?e.Debug.fail("We should be getting ImportDeclaration instead to write"):n=t;var r=e.forEach(P,function(e){return e.node===n?e:void 0});if(!r&&D&&(r=e.forEach(D,function(e){return e.node===n?e:void 0})),r)if(242===r.node.kind)r.isVisible=!0;else{L();for(var i=r.indent;i;i--)u();237===n.kind&&(e.Debug.assert(void 0===D),D=[]),ee(n),237===n.kind&&(r.subModuleElementDeclarationEmitInfo=D,D=void 0),r.asynchronousOutput=d.getText()}}),R(n)}function z(t){if(t){C||(C=e.createMap());for(var n=0,r=t;n"))));case 161:return function(e){a(e.typeName),e.typeArguments&&(s("<"),G(e.typeArguments,Q),s(">"))}(t);case 164:return function(e){s("typeof "),a(e.exprName)}(t);case 166:return function(e){Q(e.elementType),s("[]")}(t);case 167:return function(e){s("["),G(e.elementTypes,Q),s("]")}(t);case 168:return function(e){H(e.types," | ",Q)}(t);case 169:return function(e){H(e.types," & ",Q)}(t);case 170:return function(e){Q(e.checkType),s(" extends "),Q(e.extendsType),s(" ? ");var t=p;p=e.trueType,Q(e.trueType),p=t,s(" : "),Q(e.falseType)}(t);case 171:return function(e){s("infer "),_(m,e.typeParameter.name)}(t);case 172:return function(e){s("("),Q(e.type),s(")")}(t);case 174:return function(t){s(e.tokenToString(t.operator)),s(" "),Q(t.type)}(t);case 175:return function(e){Q(e.objectType),s("["),Q(e.indexType),s("]")}(t);case 176:return function(e){var t=p;p=e,s("{"),c(),u(),e.readonlyToken&&s(37===e.readonlyToken.kind?"+readonly ":38===e.readonlyToken.kind?"-readonly ":"readonly "),s("["),i(e.typeParameter.name),s(" in "),Q(e.typeParameter.constraint),s("]"),e.questionToken&&s(37===e.questionToken.kind?"+?":38===e.questionToken.kind?"-?":"?"),s(": "),e.type?Q(e.type):s("any"),s(";"),c(),l(),s("}"),p=t}(t);case 162:case 163:return ye(t);case 165:return function(e){s("{"),e.members.length&&(c(),u(),W(e.members),l()),s("}")}(t);case 71:case 145:return a(t);case 160:return function(e){_(m,e.parameterName),s(" is "),Q(e.type)}(t)}var r;function i(e){if(71===e.kind)_(m,e);else{var t=145===e.kind?e.right:e.name;i(145===e.kind?e.left:e.expression),s("."),_(m,t)}}function a(e){j(n.isEntityNameVisible(e,241===e.parent.kind?e.parent:p)),z(n.getTypeReferenceDirectivesForEntityName(e)),i(e)}}function Y(t){m=t.text,g=e.getLineStarts(t),y=t.identifiers,h=e.isExternalModule(t),p=t,e.emitDetachedComments(m,g,d,e.writeCommentRange,t,x,!0),W(t.statements)}function $(e,t,r,i){var a=function(e){if(!y.has(e))return e;for(var t=0;;){var n=e+"_"+ ++t;if(!y.has(n))return n}}(t);return i&&s("declare "),s("const "),s(a),s(": "),d.getSymbolAccessibilityDiagnostic=function(){return r},n.writeTypeOfExpression(e,p,6152,d),s(";"),c(),a}function Z(e,t){if(t)ee(e);else if(241===e.kind||272===e.parent.kind&&h){var r=void 0;if(D&&272!==e.parent.kind)D.push({node:e,outputPos:d.getTextPos(),indent:d.getIndent(),isVisible:r});else{if(242===e.kind){var i=e;i.importClause&&(r=i.importClause.name&&n.isDeclarationVisible(i.importClause)||re(i.importClause.namedBindings))}P.push({node:e,outputPos:d.getTextPos(),indent:d.getIndent(),isVisible:r})}}}function ee(t){switch(t.kind){case 232:return me(t);case 212:return function(t){e.every(t.declarationList&&t.declarationList.declarations,function(t){return t.name&&e.isEmptyBindingPattern(t.name)})||(E(t),te(t),e.isLet(t.declarationList)?s("let "):e.isConst(t.declarationList)?s("const "):s("var "),G(t.declarationList.declarations,pe,de),s(";"),c())}(t);case 234:return function(t){E(t),te(t),s("interface "),_(m,t.name);var n=p;p=t,ue(t.typeParameters);var r=e.filter(e.getInterfaceBaseTypeNodes(t),function(t){return e.isEntityNameExpression(t.expression)});r&&r.length&&le(r,!1),s(" {"),c(),u(),W(t.members),l(),s("}"),c(),p=n}(t);case 233:return function(t){var n=p;p=t;var r,i,a=e.getClassExtendsHeritageClauseElement(t);a&&!e.isEntityNameExpression(a.expression)&&(r=95===a.expression.kind?"null":$(a.expression,t.name.escapedText+"_base",{diagnosticMessage:e.Diagnostics.extends_clause_of_exported_class_0_has_or_is_using_private_name_1,errorNode:a,typeName:t.name},!e.findAncestor(t,function(e){return 237===e.kind}))),E(t),te(t),e.hasModifier(t,128)&&s("abstract "),s("class "),_(m,t.name),ue(t.typeParameters),a&&(e.isEntityNameExpression(a.expression)?le([a],!1):(s(" extends "),s(r),a.typeArguments&&(s("<"),G(a.typeArguments,Q),s(">")))),le(e.getClassImplementsHeritageClauseElements(t),!0),s(" {"),c(),u(),(i=e.getFirstConstructorWithBody(t))&&e.forEach(i.parameters,function(t){e.hasModifier(t,92)&&_e(t)}),W(t.members),l(),s("}"),c(),p=n}(t);case 235:return function(t){var n=p;p=t,E(t),te(t),s("type "),_(m,t.name),ue(t.typeParameters),s(" = "),X(t.type,function(){return{diagnosticMessage:e.Diagnostics.Exported_type_alias_0_has_or_is_using_private_name_1,errorNode:t.type,typeName:t.name}}),s(";"),c(),p=n}(t);case 236:return function(t){E(t),te(t),e.isConst(t)&&s("const "),s("enum "),_(m,t.name),s(" {"),c(),u(),W(t.members),l(),s("}"),c()}(t);case 237:return function(t){for(E(t),te(t),e.isGlobalScopeAugmentation(t)?s("global "):(s(16&t.flags?"namespace ":"module "),e.isExternalModuleAugmentation(t)?ae(t):_(m,t.name));t.body&&238!==t.body.kind;)t=t.body,s("."),_(m,t.name);var n=p;t.body?(p=t,s(" {"),c(),u(),W(t.body.statements),l(),s("}"),c(),p=n):s(";")}(t);case 241:return function(t){E(t),e.hasModifier(t,1)&&s("export "),s("import "),_(m,t.name),s(" = "),e.isInternalModuleImportEqualsDeclaration(t)?(X(t.moduleReference,function(){return{diagnosticMessage:e.Diagnostics.Import_declaration_0_is_using_private_name_1,errorNode:t,typeName:t.name}}),s(";")):(s("require("),ae(t),s(");")),d.writeLine()}(t);case 242:return ie(t);default:e.Debug.fail("Unknown symbol kind")}}function te(t){if(272===t.parent.kind){var n=e.getModifierFlags(t);1&n&&(f=!0,s("export ")),512&n?s("default "):234!==t.kind&&A&&s("declare ")}}function ne(e){8&e?s("private "):16&e&&s("protected "),32&e&&s("static "),64&e&&s("readonly "),128&e&&s("abstract ")}function re(e){if(e)return 244===e.kind?n.isDeclarationVisible(e):e.elements.some(function(e){return n.isDeclarationVisible(e)})}function ie(t){if(E(t),e.hasModifier(t,1)&&s("export "),s("import "),t.importClause){var r=d.getTextPos();t.importClause.name&&n.isDeclarationVisible(t.importClause)&&_(m,t.importClause.name),t.importClause.namedBindings&&re(t.importClause.namedBindings)&&(r!==d.getTextPos()&&s(", "),244===t.importClause.namedBindings.kind?(s("* as "),_(m,t.importClause.namedBindings.name)):(s("{ "),G(t.importClause.namedBindings.elements,oe,n.isDeclarationVisible),s(" }"))),s(" from ")}ae(t),s(";"),d.writeLine()}function ae(r){f=f||237!==r.kind;var i=241===r.kind?e.getExternalModuleImportEqualsDeclarationExpression(r):237===r.kind?r.name:r.moduleSpecifier;if(9===i.kind&&b&&(k.out||k.outFile)){var a=e.getExternalModuleNameFromDeclaration(t,n,r);if(a)return s('"'),s(a),void s('"')}_(m,i)}function oe(e){e.propertyName&&(_(m,e.propertyName),s(" as ")),_(m,e.name)}function se(e){oe(e),B(n.collectLinkedAliases(e.propertyName||e.name))}function ce(t){return 153===t.parent.kind&&e.hasModifier(t.parent,8)}function ue(t){t&&(s("<"),G(t,function(t){function n(){var n;switch(t.parent.kind){case 233:n=e.Diagnostics.Type_parameter_0_of_exported_class_has_or_is_using_private_name_1;break;case 234:n=e.Diagnostics.Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1;break;case 158:n=e.Diagnostics.Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1;break;case 157:n=e.Diagnostics.Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1;break;case 153:case 152:n=e.hasModifier(t.parent,32)?e.Diagnostics.Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1:233===t.parent.parent.kind?e.Diagnostics.Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1:e.Diagnostics.Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1;break;case 232:n=e.Diagnostics.Type_parameter_0_of_exported_function_has_or_is_using_private_name_1;break;case 235:n=e.Diagnostics.Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1;break;default:e.Debug.fail("This is unknown parent for type parameter: "+t.parent.kind)}return{diagnosticMessage:n,errorNode:t,typeName:t.name}}u(),E(t),l(),_(m,t.name),t.constraint&&!ce(t)&&(s(" extends "),162===t.parent.kind||163===t.parent.kind||t.parent.parent&&165===t.parent.parent.kind?(e.Debug.assert(153===t.parent.kind||152===t.parent.kind||162===t.parent.kind||163===t.parent.kind||157===t.parent.kind||158===t.parent.kind),Q(t.constraint)):X(t.constraint,n)),t.default&&!ce(t)&&(s(" = "),162===t.parent.kind||163===t.parent.kind||t.parent.parent&&165===t.parent.parent.kind?(e.Debug.assert(153===t.parent.kind||152===t.parent.kind||162===t.parent.kind||163===t.parent.kind||157===t.parent.kind||158===t.parent.kind),Q(t.default)):X(t.default,n))}),s(">"))}function le(t,n){t&&(s(n?" implements ":" extends "),G(t,function(t){e.isEntityNameExpression(t.expression)?X(t,function(){return{diagnosticMessage:233===t.parent.parent.kind?n?e.Diagnostics.Implements_clause_of_exported_class_0_has_or_is_using_private_name_1:e.Diagnostics.extends_clause_of_exported_class_0_has_or_is_using_private_name_1:e.Diagnostics.extends_clause_of_exported_interface_0_has_or_is_using_private_name_1,errorNode:t,typeName:e.getNameOfDeclaration(t.parent.parent)}}):n||95!==t.expression.kind||s("null")}))}function _e(t){e.hasDynamicName(t)&&!n.isLateBound(t)||(E(t),ne(e.getModifierFlags(t)),pe(t),s(";"),c())}function de(t){return n.isDeclarationVisible(t)||function(t){return!!t&&e.isBindingPattern(t)&&e.some(t.elements,function(t){return!e.isOmittedExpression(t)&&de(t)})}(t.name)}function pe(t){function r(n){return 230===t.kind?n.errorModuleName?2===n.accessibility?e.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Exported_variable_0_has_or_is_using_private_name_1:151===t.kind||150===t.kind||148===t.kind&&e.hasModifier(t.parent,8)?e.hasModifier(t,32)?n.errorModuleName?2===n.accessibility?e.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1:233===t.parent.kind||148===t.kind?n.errorModuleName?2===n.accessibility?e.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_private_name_1:n.errorModuleName?e.Diagnostics.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Property_0_of_exported_interface_has_or_is_using_private_name_1:void 0}function i(e){var n=r(e);return void 0!==n?{diagnosticMessage:n,errorNode:t,typeName:t.name}:void 0}function a(e){for(var t=[],n=0,r=e.elements;n ":": "),Q(t.type)):154===t.kind||e.hasModifier(t,8)||(o=t,d.getSymbolAccessibilityDiagnostic=function(n){var r;switch(t.kind){case 158:r=n.errorModuleName?e.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:e.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0;break;case 157:r=n.errorModuleName?e.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:e.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0;break;case 159:r=n.errorModuleName?e.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:e.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0;break;case 153:case 152:r=e.hasModifier(t,32)?n.errorModuleName?2===n.accessibility?e.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:e.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1:e.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0:233===t.parent.kind?n.errorModuleName?2===n.accessibility?e.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:e.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1:e.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0:n.errorModuleName?e.Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1:e.Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0;break;case 232:r=n.errorModuleName?2===n.accessibility?e.Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:e.Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1:e.Diagnostics.Return_type_of_exported_function_has_or_is_using_private_name_0;break;default:e.Debug.fail("This is unknown kind for signature: "+t.kind)}return{diagnosticMessage:r,errorNode:t.name||t}},s(": "),o.type?Q(o.type):(S=o.name,n.writeReturnTypeOfSignatureDeclaration(o,p,6152,d),S=void 0)),p=r,u?i&&s(")"):(s(";"),c())}function ve(t){function r(e){if(178===e.kind)s("{"),G(e.elements,i),s("}");else if(179===e.kind){s("[");var t=e.elements;G(t,i),t&&t.hasTrailingComma&&s(", "),s("]")}}function i(t){204===t.kind?s(" "):180===t.kind&&(t.propertyName&&(_(m,t.propertyName),s(": ")),t.name&&(e.isBindingPattern(t.name)?r(t.name):(e.Debug.assert(71===t.name.kind),t.dotDotDotToken&&s("..."),_(m,t.name))))}u(),E(t),t.dotDotDotToken&&s("..."),e.isBindingPattern(t.name)?r(t.name):_(m,t.name),n.isOptionalParameter(t)&&s("?"),l(),162===t.parent.kind||163===t.parent.kind||165===t.parent.parent.kind?fe(t):e.hasModifier(t.parent,8)||q(t,t.type,function(n){var r=function(n){switch(t.parent.kind){case 154:return n.errorModuleName?2===n.accessibility?e.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1;case 158:return n.errorModuleName?e.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1;case 157:return n.errorModuleName?e.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1;case 159:return n.errorModuleName?e.Diagnostics.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1;case 153:case 152:return e.hasModifier(t.parent,32)?n.errorModuleName?2===n.accessibility?e.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1:233===t.parent.parent.kind?n.errorModuleName?2===n.accessibility?e.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1:n.errorModuleName?e.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1;case 232:return n.errorModuleName?2===n.accessibility?e.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_private_name_1;default:e.Debug.fail("This is unknown parent for parameter: "+t.parent.kind)}}(n);return void 0!==r?{diagnosticMessage:r,errorNode:t,typeName:t.name}:void 0})}function be(t){switch(t.kind){case 232:case 237:case 241:case 234:case 233:case 235:case 236:return Z(t,function(e){return n.isDeclarationVisible(e)}(t));case 212:return Z(t,function(t){return e.forEach(t.declarationList.declarations,function(e){return de(e)})}(t));case 242:return Z(t,!t.importClause);case 248:return function(e){f=!0,E(e),s("export "),e.exportClause?(s("{ "),G(e.exportClause.elements,se),s(" }")):s("*"),e.moduleSpecifier&&(s(" from "),ae(e)),s(";"),d.writeLine()}(t);case 154:case 153:case 152:return me(t);case 158:case 157:case 159:return ye(t);case 155:case 156:return function(t){if(!e.hasDynamicName(t)||n.isLateBound(t)){var r,i=e.getAllAccessorDeclarations(t.parent.members,t);if(t===i.firstAccessor){if(E(i.getAccessor),E(i.setAccessor),ne(e.getModifierFlags(t)|(i.setAccessor?0:64)),ge(t,function(n){var r=function(n){return e.hasModifier(t,32)?n.errorModuleName?2===n.accessibility?e.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1:233===t.parent.kind?n.errorModuleName?2===n.accessibility?e.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_private_name_1:n.errorModuleName?e.Diagnostics.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Property_0_of_exported_interface_has_or_is_using_private_name_1}(n);return void 0!==r?{diagnosticMessage:r,errorNode:t,typeName:t.name}:void 0}),!e.hasModifier(t,8)){r=t;var a=u(t);if(!a){var o=155===t.kind?i.setAccessor:i.getAccessor;(a=u(o))&&(r=o)}q(t,a,function(t){return{diagnosticMessage:156===r.kind?e.hasModifier(r,32)?t.errorModuleName?e.Diagnostics.Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1:t.errorModuleName?e.Diagnostics.Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1:e.hasModifier(r,32)?t.errorModuleName?2===t.accessibility?e.Diagnostics.Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1:t.errorModuleName?2===t.accessibility?e.Diagnostics.Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1,errorNode:r.name,typeName:r.name}})}s(";"),c()}}function u(e){if(e)return 155===e.kind?e.type:e.parameters.length>0?e.parameters[0].type:void 0}}(t);case 151:case 150:return _e(t);case 271:return function(t){E(t),_(m,t.name);var r=n.getConstantValue(t);void 0!==r&&(s(" = "),s(e.getTextOfConstantValue(r))),s(","),c()}(t);case 247:return function(t){if(e.isSourceFile(t.parent)&&(f=!0),71===t.expression.kind)s(t.isExportEquals?"export = ":"export default "),_(m,t.expression);else{var r=$(t.expression,"_default",{diagnosticMessage:e.Diagnostics.Default_export_of_the_module_has_or_is_using_private_name_0,errorNode:t},A);s(t.isExportEquals?"export = ":"export default "),s(r)}s(";"),c(),71===t.expression.kind&&B(n.collectLinkedAliases(t.expression))}(t);case 272:return Y(t)}}}e.getDeclarationDiagnostics=function(n,r,i){var a=e.createDiagnosticCollection();return e.forEachEmittedFile(n,function(e,i){t(n,r,a,e.declarationFilePath,i,!1)},i),a.getDiagnostics(i?i.fileName:void 0)},e.writeDeclarationFile=function(n,r,i,a,o,s){var c=t(i,a,o,n,r,s),u=c.reportedDeclarationError||i.isEmitBlocked(n)||i.getCompilerOptions().noEmit;if(!u||s){var l=273===r.kind?r.sourceFiles:[r],_=c.referencesOutput+function t(n,r){var i=0,a="";return e.forEach(r,function(e){e.asynchronousOutput&&(a+=n.substring(i,e.outputPos),a+=t(e.asynchronousOutput,e.subModuleElementDeclarationEmitInfo),i=e.outputPos)}),a+=n.substring(i)}(c.synchronousDeclarationOutput,c.moduleElementDeclarationEmitInfo);e.writeFile(i,o,n,_,i.getCompilerOptions().emitBOM,l)}return u}}(l||(l={})),function(e){var t,n=function(){var e=[];return e[512]=["{","}"],e[1024]=["(",")"],e[2048]=["<",">"],e[4096]=["[","]"],e}();function r(t,n,r,o){var s=e.isArray(r)?r:e.getSourceFilesToEmit(t,r),c=t.getCompilerOptions();if(c.outFile||c.out){if(s.length&&(d=n({jsFilePath:_=c.outFile||c.out,sourceMapFilePath:i(_,c),declarationFilePath:c.declaration?e.removeFileExtension(_)+".d.ts":""},e.createBundle(s),o)))return d}else for(var u=0,l=s;u"),Qe(),Q(e.type)}(t);case 280:return function(e){F("function"),ze(e,e.parameters),F(":"),Q(e.type)}(t);case 163:return function(e){He("new"),Qe(),Be(e,e.typeParameters),ze(e,e.parameters),Qe(),qe("=>"),Qe(),Q(e.type)}(t);case 164:return function(e){He("typeof"),Qe(),Q(e.exprName)}(t);case 165:return function(t){qe("{");var n=1&e.getEmitFlags(t)?448:65;Je(t,t.members,262144|n),qe("}")}(t);case 166:return function(e){Q(e.elementType),qe("["),qe("]")}(t);case 167:return function(e){qe("["),Je(e,e.elementTypes,336),qe("]")}(t);case 168:return function(e){Je(e,e.types,260)}(t);case 169:return function(e){Je(e,e.types,264)}(t);case 170:return function(e){Q(e.checkType),Qe(),He("extends"),Qe(),Q(e.extendsType),Qe(),qe("?"),Qe(),Q(e.trueType),Qe(),qe(":"),Qe(),Q(e.falseType)}(t);case 171:return function(e){He("infer"),Qe(),Q(e.typeParameter)}(t);case 172:return function(e){qe("("),Q(e.type),qe(")")}(t);case 205:return function(e){$(e.expression),Re(e,e.typeArguments)}(t);case 173:return void He("this");case 174:return function(e){rt(e.operator,He),Qe(),Q(e.type)}(t);case 175:return function(e){Q(e.objectType),qe("["),Q(e.indexType),qe("]")}(t);case 176:return function(t){var n=e.getEmitFlags(t);qe("{"),1&n?Qe():($e(),Ze()),t.readonlyToken&&(Q(t.readonlyToken),132!==t.readonlyToken.kind&&He("readonly"),Qe()),qe("["),Z(3,t.typeParameter),qe("]"),t.questionToken&&(Q(t.questionToken),55!==t.questionToken.kind&&qe("?")),qe(":"),Qe(),Q(t.type),O(),1&n?Qe():($e(),et()),qe("}")}(t);case 177:return function(e){$(e.literal)}(t);case 275:return void F("*");case 276:return void F("?");case 277:return function(e){F("?"),Q(e.type)}(t);case 278:return function(e){F("!"),Q(e.type)}(t);case 279:return function(e){Q(e.type),F("=")}(t);case 281:return function(e){F("..."),Q(e.type)}(t);case 178:return function(e){qe("{"),Je(e,e.elements,262576),qe("}")}(t);case 179:return function(e){qe("["),Je(e,e.elements,262448),qe("]")}(t);case 180:return function(e){X(e.dotDotDotToken),e.propertyName&&(Q(e.propertyName),qe(":"),Qe()),Q(e.name),Fe(e.initializer,e.name.end,e)}(t);case 209:return function(e){$(e.expression),Q(e.literal)}(t);case 210:return void O();case 211:return function(e){ue(e,!e.multiLine&&pt(e))}(t);case 212:return function(e){Pe(e,e.modifiers),Q(e.declarationList),O()}(t);case 213:return void O();case 214:return function(e){$(e.expression),O()}(t);case 215:return function(e){var t=de(90,e.pos,He,e);Qe(),de(19,t,qe,e),$(e.expression),de(20,e.expression.end,qe,e),Me(e,e.thenStatement),e.elseStatement&&(it(e),de(82,e.thenStatement.end,He,e),215===e.elseStatement.kind?(Qe(),Q(e.elseStatement)):Me(e,e.elseStatement))}(t);case 216:return function(t){de(81,t.pos,He,t),Me(t,t.statement),e.isBlock(t.statement)?Qe():it(t),le(t,t.statement.end),qe(";")}(t);case 217:return function(e){le(e,e.pos),Me(e,e.statement)}(t);case 218:return function(e){var t=de(88,e.pos,He,e);Qe();var n=de(19,t,qe,e);_e(e.initializer),n=de(25,e.initializer?e.initializer.end:n,O,e),Oe(e.condition),n=de(25,e.condition?e.condition.end:n,O,e),Oe(e.incrementor),de(20,e.incrementor?e.incrementor.end:n,qe,e),Me(e,e.statement)}(t);case 219:return function(e){var t=de(88,e.pos,He,e);Qe(),de(19,t,qe,e),_e(e.initializer),Qe(),de(92,e.initializer.end,He,e),Qe(),$(e.expression),de(20,e.expression.end,qe,e),Me(e,e.statement)}(t);case 220:return function(e){var t=de(88,e.pos,He,e);Qe(),function(e){e&&(Q(e),Qe())}(e.awaitModifier),de(19,t,qe,e),_e(e.initializer),Qe(),de(144,e.initializer.end,He,e),Qe(),$(e.expression),de(20,e.expression.end,qe,e),Me(e,e.statement)}(t);case 221:return function(e){de(77,e.pos,He,e),Ie(e.label),O()}(t);case 222:return function(e){de(72,e.pos,He,e),Ie(e.label),O()}(t);case 223:return function(e){de(96,e.pos,He,e),Oe(e.expression),O()}(t);case 224:return function(e){var t=de(107,e.pos,He,e);Qe(),de(19,t,qe,e),$(e.expression),de(20,e.expression.end,qe,e),Me(e,e.statement)}(t);case 225:return function(e){var t=de(98,e.pos,He,e);Qe(),de(19,t,qe,e),$(e.expression),de(20,e.expression.end,qe,e),Qe(),Q(e.caseBlock)}(t);case 226:return function(e){Q(e.label),de(56,e.label.end,qe,e),Qe(),Q(e.statement)}(t);case 227:return function(e){de(100,e.pos,He,e),Oe(e.expression),O()}(t);case 228:return function(e){de(102,e.pos,He,e),Qe(),Q(e.tryBlock),e.catchClause&&(it(e),Q(e.catchClause)),e.finallyBlock&&(it(e),de(87,(e.catchClause||e.tryBlock).end,He,e),Qe(),Q(e.finallyBlock))}(t);case 229:return function(e){tt(78,e.pos,He),O()}(t);case 230:return function(e){Q(e.name),we(e.type),Fe(e.initializer,e.type?e.type.end:e.name.end,e)}(t);case 231:return function(t){He(e.isLet(t)?"let":e.isConst(t)?"const":"var"),Qe(),Je(t,t.declarations,272)}(t);case 232:return function(e){pe(e)}(t);case 233:return function(e){be(e)}(t);case 234:return function(e){Le(e,e.decorators),Pe(e,e.modifiers),He("interface"),Qe(),Q(e.name),Be(e,e.typeParameters),Je(e,e.heritageClauses,256),Qe(),qe("{"),Je(e,e.members,65),qe("}")}(t);case 235:return function(e){Le(e,e.decorators),Pe(e,e.modifiers),He("type"),Qe(),Q(e.name),Be(e,e.typeParameters),Qe(),qe("="),Qe(),Q(e.type),O()}(t);case 236:return function(e){Pe(e,e.modifiers),He("enum"),Qe(),Q(e.name),Qe(),qe("{"),Je(e,e.members,81),qe("}")}(t);case 237:return function(e){Pe(e,e.modifiers),512&~e.flags&&(He(16&e.flags?"namespace":"module"),Qe()),Q(e.name);for(var t=e.body;237===t.kind;)qe("."),Q(t.name),t=t.body;Qe(),Q(t)}(t);case 238:return function(e){yt(e),ue(e,pt(e)),ht(e)}(t);case 239:return function(e){de(17,e.pos,qe,e),Je(e,e.clauses,65),de(18,e.clauses.end,qe,e,!0)}(t);case 240:return function(e){var t=de(84,e.pos,He,e);Qe(),t=de(118,t,He,e),Qe(),t=de(130,t,He,e),Qe(),Q(e.name),O()}(t);case 241:return function(e){Pe(e,e.modifiers),de(91,e.modifiers?e.modifiers.end:e.pos,He,e),Qe(),Q(e.name),Qe(),de(58,e.name.end,qe,e),Qe(),function(e){71===e.kind?$(e):Q(e)}(e.moduleReference),O()}(t);case 242:return function(e){Pe(e,e.modifiers),de(91,e.modifiers?e.modifiers.end:e.pos,He,e),Qe(),e.importClause&&(Q(e.importClause),Qe(),de(142,e.importClause.end,He,e),Qe()),$(e.moduleSpecifier),O()}(t);case 243:return function(e){Q(e.name),e.name&&e.namedBindings&&(de(26,e.name.end,qe,e),Qe()),Q(e.namedBindings)}(t);case 244:return function(e){var t=de(39,e.pos,qe,e);Qe(),de(118,t,He,e),Qe(),Q(e.name)}(t);case 245:return function(e){xe(e)}(t);case 246:return function(e){ke(e)}(t);case 247:return function(e){var t=de(84,e.pos,He,e);Qe(),e.isExportEquals?de(58,t,Ge,e):de(79,t,He,e),Qe(),$(e.expression),O()}(t);case 248:return function(e){var t=de(84,e.pos,He,e);Qe(),e.exportClause?Q(e.exportClause):t=de(39,t,qe,e),e.moduleSpecifier&&(Qe(),de(142,e.exportClause?e.exportClause.end:t,He,e),Qe(),$(e.moduleSpecifier)),O()}(t);case 249:return function(e){xe(e)}(t);case 250:return function(e){ke(e)}(t);case 251:return;case 252:return function(e){He("require"),qe("("),$(e.expression),qe(")")}(t);case 10:return function(e){I(),d.writeLiteral(mt(e,!0))}(t);case 255:case 258:return function(t){qe("<"),e.isJsxOpeningElement(t)&&(Se(t.tagName),t.attributes.properties&&t.attributes.properties.length>0&&(Qe(),Q(t.attributes))),qe(">")}(t);case 256:case 259:return function(t){qe(""),e.isJsxClosingElement(t)&&Se(t.tagName),qe(">")}(t);case 260:return function(e){Q(e.name),function(e,t,n,r){n&&(qe("="),r(n))}(0,0,e.initializer,Q)}(t);case 261:return function(e){Je(e,e.properties,131328)}(t);case 262:return function(e){qe("{..."),$(e.expression),qe("}")}(t);case 263:return function(e){e.expression&&(qe("{"),X(e.dotDotDotToken),$(e.expression),qe("}"))}(t);case 264:return function(e){de(73,e.pos,He,e),Qe(),$(e.expression),De(e,e.statements,e.expression.end)}(t);case 265:return function(e){var t=de(79,e.pos,He,e);De(e,e.statements,t)}(t);case 266:return function(e){Qe(),rt(e.token,He),Qe(),Je(e,e.types,272)}(t);case 267:return function(e){var t=de(74,e.pos,He,e);Qe(),e.variableDeclaration&&(de(19,t,qe,e),Q(e.variableDeclaration),de(20,e.variableDeclaration.end,qe,e),Qe()),Q(e.block)}(t);case 268:return function(t){Q(t.name),qe(":"),Qe();var n=t.initializer;if(P&&0==(512&e.getEmitFlags(n))){var r=e.getCommentRange(n);P(r.pos)}$(n)}(t);case 269:return function(e){Q(e.name),e.objectAssignmentInitializer&&(Qe(),qe("="),Qe(),$(e.objectAssignmentInitializer))}(t);case 270:return function(e){e.expression&&(qe("..."),$(e.expression))}(t);case 271:return function(e){Q(e.name),Fe(e.initializer,e.name.end,e)}(t)}var r;if(e.isExpression(t))return re(ie(1,t));e.isToken(t)&&nt(t,qe)}}(n)}}function re(n){switch(n.kind){case 8:return function(e){oe(e)}(n);case 9:case 12:case 13:return oe(n);case 71:return se(n);case 86:case 95:case 97:case 101:case 99:case 91:return void nt(n,He);case 181:return function(e){Ke(e,e.elements,4466|(e.multiLine?32768:0))}(n);case 182:return function(t){var n=65536&e.getEmitFlags(t);n&&Ze(),Je(t,t.properties,263122|(i.languageVersion>=1?32:0)|(t.multiLine?32768:0)),n&&et()}(n);case 183:return function(n){var r=!1,a=!1;if(!(131072&e.getEmitFlags(n))){var o=n.expression.end,s=e.skipTrivia(i.text,n.expression.end)+1,c=e.createToken(23);c.pos=o,c.end=s,r=dt(n,n.expression,c),a=dt(n,c,n.name)}$(n.expression),ot(r),!r&&function(n){if(n=e.skipPartiallyEmittedExpressions(n),e.isNumericLiteral(n)){var r=gt(n);return!n.numericLiteralFlags&&!e.stringContains(r,e.tokenToString(23))}if(e.isPropertyAccessExpression(n)||e.isElementAccessExpression(n)){var i=e.getConstantValue(n);return"number"==typeof i&&isFinite(i)&&Math.floor(i)===i&&t.removeComments}}(n.expression)&&qe("."),de(23,n.expression.end,qe,n),ot(a),Q(n.name),st(r,a)}(n);case 184:return function(e){$(e.expression);var t=de(21,e.expression.end,qe,e);$(e.argumentExpression),de(22,e.argumentExpression?e.argumentExpression.end:t,qe,e)}(n);case 185:return function(e){$(e.expression),Re(e,e.typeArguments),Ke(e,e.arguments,1296)}(n);case 186:return function(e){de(94,e.pos,He,e),Qe(),$(e.expression),Re(e,e.typeArguments),Ke(e,e.arguments,9488)}(n);case 187:return function(e){$(e.tag),Qe(),$(e.template)}(n);case 188:return function(e){qe("<"),Q(e.type),qe(">"),$(e.expression)}(n);case 189:return function(e){var t=de(19,e.pos,qe,e);$(e.expression),de(20,e.expression?e.expression.end:t,qe,e)}(n);case 190:return function(e){pe(e)}(n);case 191:return function(e){Le(e,e.decorators),Pe(e,e.modifiers),me(e,ce)}(n);case 192:return function(e){de(80,e.pos,He,e),Qe(),$(e.expression)}(n);case 193:return function(e){de(103,e.pos,He,e),Qe(),$(e.expression)}(n);case 194:return function(e){de(105,e.pos,He,e),Qe(),$(e.expression)}(n);case 195:return function(e){de(121,e.pos,He,e),Qe(),$(e.expression)}(n);case 196:return function(e){rt(e.operator,Ge),function(e){var t=e.operand;return 196===t.kind&&(37===e.operator&&(37===t.operator||43===t.operator)||38===e.operator&&(38===t.operator||44===t.operator))}(e)&&Qe(),$(e.operand)}(n);case 197:return function(e){$(e.operand),rt(e.operator,Ge)}(n);case 198:return function(e){var t=26!==e.operatorToken.kind,n=dt(e,e.left,e.operatorToken),r=dt(e,e.operatorToken,e.right);$(e.left),ot(n,t?" ":void 0),w(e.operatorToken.pos),nt(e.operatorToken,Ge),P(e.operatorToken.end,!0),ot(r," "),$(e.right),st(n,r)}(n);case 199:return function(e){var t=dt(e,e.condition,e.questionToken),n=dt(e,e.questionToken,e.whenTrue),r=dt(e,e.whenTrue,e.colonToken),i=dt(e,e.colonToken,e.whenFalse);$(e.condition),ot(t," "),Q(e.questionToken),ot(n," "),$(e.whenTrue),st(t,n),ot(r," "),Q(e.colonToken),ot(i," "),$(e.whenFalse),st(r,i)}(n);case 200:return function(e){Q(e.head),Je(e,e.templateSpans,131072)}(n);case 201:return function(e){de(116,e.pos,He,e),Q(e.asteriskToken),Oe(e.expression)}(n);case 202:return function(e){qe("..."),$(e.expression)}(n);case 203:return function(e){be(e)}(n);case 204:return;case 206:return function(e){$(e.expression),e.type&&(Qe(),He("as"),Qe(),Q(e.type))}(n);case 207:return function(e){$(e.expression),Ge("!")}(n);case 208:return function(e){tt(e.keywordToken,e.pos,qe),qe("."),Q(e.name)}(n);case 253:return function(e){Q(e.openingElement),Je(e,e.children,131072),Q(e.closingElement)}(n);case 254:return function(e){qe("<"),Se(e.tagName),Qe(),e.attributes.properties&&e.attributes.properties.length>0&&Q(e.attributes),qe("/>")}(n);case 257:return function(e){Q(e.openingFragment),Je(e,e.children,131072),Q(e.closingFragment)}(n);case 295:return function(e){$(e.expression)}(n);case 296:return function(e){Ke(e,e.elements,272)}(n)}}function ie(e,t){return t&&x&&x(e,t)||t}function ae(e){v&&v(e,at)}function oe(n){var r,i=gt(n);!t.sourceMap&&!t.inlineSourceMap||9!==n.kind&&!e.isTemplateLiteralKind(n.kind)?function(e){I(),d.writeStringLiteral(e)}(i):(r=i,I(),d.writeLiteral(r))}function se(e){(e.symbol?function(e,t){I(),d.writeSymbol(e,t)}:F)(mt(e,!1),e.symbol),Je(e,e.typeArguments,26896)}function ce(e){Be(e,e.typeParameters),je(e,e.parameters),we(e.type),Qe(),Q(e.equalsGreaterThanToken)}function ue(t,n){de(17,t.pos,qe,t);var r=n||1&e.getEmitFlags(t)?384:65;Je(t,t.statements,r),de(18,t.statements.end,qe,t,!!(1&r))}function le(e,t){var n=de(106,t,He,e);Qe(),de(19,n,qe,e),$(e.expression),de(20,e.expression.end,qe,e)}function _e(e){void 0!==e&&(231===e.kind?Q(e):$(e))}function de(t,n,r,a,o){var s=a&&e.getParseTreeNode(a),c=s&&s.kind===a.kind,u=n;if(c&&(n=e.skipTrivia(i.text,n)),w&&c){var l=o&&!e.positionsAreOnSameLine(u,n,i);l&&Ze(),w(u),l&&et()}return n=rt(t,r,n),P&&c&&P(n,!0),n}function pe(e){Le(e,e.decorators),Pe(e,e.modifiers),He("function"),X(e.asteriskToken),Qe(),Y(e.name),me(e,ge)}function fe(e,t){ye(t)}function me(t,n){var r=t.body;if(r)if(e.isBlock(r)){var i=65536&e.getEmitFlags(t);i&&Ze(),yt(t),n(t),h?h(4,r,fe):ye(r),ht(t),i&&et()}else n(t),Qe(),$(r);else n(t),O()}function ge(e){Be(e,e.typeParameters),ze(e,e.parameters),we(e.type)}function ye(t){Qe(),qe("{"),Ze();var n=function(t){if(1&e.getEmitFlags(t))return!0;if(t.multiLine)return!1;if(!e.nodeIsSynthesized(t)&&!e.rangeIsOnSingleLine(t,i))return!1;if(ct(t,t.statements,2)||lt(t,t.statements,2))return!1;for(var n,r=0,a=t.statements;r0)&&$e(),Q(a),r&&r.set(a.expression.text,!0))}return t.length}function Ee(t){if(e.isSourceFile(t))W(t),Te(t.statements);else for(var n=e.createMap(),r=0,i=t.sourceFiles;r=i.length||0===s;if(u&&16384&a)return k&&k(i),void(S&&S(i));if(7680&a&&(qe(function(e){return n[7680&e][0]}(a)),u&&P(i.pos,!0)),k&&k(i),u)1&a?$e():128&a&&!(262144&a)&&Qe();else{var l=0==(131072&a),_=l;ct(r,i,a)?($e(),_=!1):128&a&&Qe(),64&a&&Ze();for(var d=void 0,p=void 0,f=0;fe.getRootLength(n)&&!function(t){return!!i.has(t)||!!e.sys.directoryExists(t)&&(i.set(t,!0),!0)}(n)&&(t(e.getDirectoryPath(n)),e.sys.createDirectory(n))}(e.getDirectoryPath(e.normalizePath(n))),e.isWatchSet(t)&&e.sys.createHash&&e.sys.getModifiedTime?function(t,n,i){r||(r=e.createMap());var a=e.sys.createHash(n),o=e.sys.getModifiedTime(t);if(o){var s=r.get(t);if(s&&s.byteOrderMark===i&&s.hash===a&&s.mtime.getTime()===o.getTime())return}e.sys.writeFile(t,n,i);var c=e.sys.getModifiedTime(t);r.set(t,{hash:a,byteOrderMark:i,mtime:c})}(n,a,o):e.sys.writeFile(n,a,o),e.performance.mark("afterIOWrite"),e.performance.measure("I/O Write","beforeIOWrite","afterIOWrite")}catch(e){s&&s(e.message)}},getCurrentDirectory:e.memoize(function(){return e.sys.getCurrentDirectory()}),useCaseSensitiveFileNames:function(){return e.sys.useCaseSensitiveFileNames},getCanonicalFileName:function(t){return e.sys.useCaseSensitiveFileNames?t:t.toLowerCase()},getNewLine:function(){return o},fileExists:function(t){return e.sys.fileExists(t)},readFile:function(t){return e.sys.readFile(t)},trace:function(t){return e.sys.write(t+o)},directoryExists:function(t){return e.sys.directoryExists(t)},getEnvironmentVariable:function(t){return e.sys.getEnvironmentVariable?e.sys.getEnvironmentVariable(t):""},getDirectories:function(t){return e.sys.getDirectories(t)},realpath:s}}function o(t,n){var r=e.diagnosticCategoryName(t)+" TS"+t.code+": "+_(t.messageText,n.getNewLine())+n.getNewLine();if(t.file){var i=e.getLineAndCharacterOfPosition(t.file,t.start),a=i.line,o=i.character;return e.convertToRelativePath(t.file.fileName,n.getCurrentDirectory(),function(e){return n.getCanonicalFileName(e)})+"("+(a+1)+","+(o+1)+"): "+r}return r}e.findConfigFile=function(t,n,r){return void 0===r&&(r="tsconfig.json"),e.forEachAncestorDirectory(t,function(t){var i=e.combinePaths(t,r);return n(i)?i:void 0})},e.resolveTripleslashReference=r,e.computeCommonSourceDirectoryOfFilenames=i,e.createCompilerHost=a,e.getPreEmitDiagnostics=function(t,n,r){var i=t.getOptionsDiagnostics(r).concat(t.getSyntacticDiagnostics(n,r),t.getGlobalDiagnostics(r),t.getSemanticDiagnostics(n,r));return t.getCompilerOptions().declaration&&e.addRange(i,t.getDeclarationDiagnostics(n,r)),e.sortAndDeduplicateDiagnostics(i)},e.formatDiagnostics=function(e,t){for(var n="",r=0,i=e;r=4,T=(x+1+"").length;C&&(T=Math.max("...".length,T));for(var E=h;E<=x;E++){p+=r.getNewLine(),C&&h+10||c.length>0)return{diagnostics:e.concatenate(u,c),sourceMaps:void 0,emittedFiles:void 0,emitSkipped:!0}}}var l=_e().getEmitResolver(o.outFile||o.out?void 0:n,i);e.performance.mark("beforeEmit");var _=a?[]:e.getTransformers(o,s),d=e.emitFiles(l,ue(r),n,a,_);return e.performance.mark("afterEmit"),e.performance.measure("Emit","beforeEmit","afterEmit"),d}(u,t,n,r,i,a)})},getCurrentDirectory:function(){return L},getNodeCount:function(){return _e().getNodeCount()},getIdentifierCount:function(){return _e().getIdentifierCount()},getSymbolCount:function(){return _e().getSymbolCount()},getTypeCount:function(){return _e().getTypeCount()},getFileProcessingDiagnostics:function(){return S},getResolvedTypeReferenceDirectives:function(){return k},isSourceFileFromExternalLibrary:le,isSourceFileDefaultLibrary:function(t){if(t.hasNoDefaultLib)return!0;if(!o.noLib)return!1;var n=s.useCaseSensitiveFileNames()?e.equateStringsCaseSensitive:e.equateStringsCaseInsensitive;return o.lib?e.forEach(o.lib,function(r){return n(t.fileName,e.combinePaths(O,r))}):n(t.fileName,I())},dropDiagnosticsProducingTypeChecker:function(){_=void 0},getSourceFileFromReference:function(e,t){return Pe(r(t.fileName,e.fileName),function(e){return G.get(oe(e))})},sourceFileToPackageName:W,redirectTargetsSet:H,isEmittedFile:function(t){if(o.noEmit)return!1;var n=oe(t);if(me(n))return!1;var r=o.outFile||o.out;if(r)return Xe(n,r)||Xe(n,e.removeFileExtension(r)+".d.ts");if(o.outDir)return e.containsPath(o.outDir,n,L,!s.useCaseSensitiveFileNames());if(e.fileExtensionIsOneOf(n,e.supportedJavascriptExtensions)||e.fileExtensionIs(n,".d.ts")){var i=e.removeFileExtension(n);return!!me(e.combinePaths(i,".ts"))||!!me(e.combinePaths(i,".tsx"))}return!1}},function(){if(o.isolatedModules&&(o.declaration&&Ue(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,"declaration","isolatedModules"),o.noEmitOnError&&Ue(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,"noEmitOnError","isolatedModules"),o.out&&Ue(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,"out","isolatedModules"),o.outFile&&Ue(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,"outFile","isolatedModules")),o.inlineSourceMap&&(o.sourceMap&&Ue(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,"sourceMap","inlineSourceMap"),o.mapRoot&&Ue(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,"mapRoot","inlineSourceMap")),o.paths&&void 0===o.baseUrl&&Ue(e.Diagnostics.Option_paths_cannot_be_used_without_specifying_baseUrl_option,"paths"),o.paths)for(var t in o.paths)if(e.hasProperty(o.paths,t))if(e.hasZeroOrOneAsteriskCharacter(t)||Je(!0,t,e.Diagnostics.Pattern_0_can_have_at_most_one_Asterisk_character,t),e.isArray(o.paths[t])){var n=o.paths[t].length;0===n&&Je(!1,t,e.Diagnostics.Substitutions_for_pattern_0_shouldn_t_be_an_empty_array,t);for(var r=0;r1})&&Ue(e.Diagnostics.Cannot_find_the_common_subdirectory_path_for_the_input_files,"outDir")}if(!o.noEmit&&o.allowJs&&o.declaration&&Ue(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,"allowJs","declaration"),o.checkJs&&!o.allowJs&&M.add(e.createCompilerDiagnostic(e.Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1,"checkJs","allowJs")),o.emitDeclarationOnly&&(o.declaration||Ue(e.Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1,"emitDeclarationOnly","declaration"),o.noEmit&&Ue(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,"emitDeclarationOnly","noEmit")),o.emitDecoratorMetadata&&!o.experimentalDecorators&&Ue(e.Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1,"emitDecoratorMetadata","experimentalDecorators"),o.jsxFactory?(o.reactNamespace&&Ue(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,"reactNamespace","jsxFactory"),e.parseIsolatedEntityName(o.jsxFactory,c)||Ve("jsxFactory",e.Diagnostics.Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name,o.jsxFactory)):o.reactNamespace&&!e.isIdentifierText(o.reactNamespace,c)&&Ve("reactNamespace",e.Diagnostics.Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier,o.reactNamespace),!o.noEmit&&!o.suppressOutputPathCheck){var g=ue(),y=e.createMap();e.forEachEmittedFile(g,function(e){o.emitDeclarationOnly||h(e.jsFilePath,y),h(e.declarationFilePath,y)})}function h(t,n){if(t){var r,i=oe(t);G.has(i)&&(o.configFilePath||(r=e.chainDiagnosticMessages(void 0,e.Diagnostics.Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig)),r=e.chainDiagnosticMessages(r,e.Diagnostics.Cannot_write_file_0_because_it_would_overwrite_input_file,t),Ge(t,e.createCompilerDiagnosticFromMessageChain(r)));var a=s.useCaseSensitiveFileNames()?i:i.toLocaleLowerCase();n.has(a)?Ge(t,e.createCompilerDiagnostic(e.Diagnostics.Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files,t)):n.set(a,!0)}}}(),e.performance.mark("afterProgram"),e.performance.measure("Program","beforeProgram","afterProgram"),u;function oe(t){return e.toPath(t,L,Be)}function se(){if(void 0===l){var t=e.filter(v,function(t){return e.sourceFileMayBeEmitted(t,o,le)});(l=o.rootDir&&function(t,n){var r=!0;if(t)for(var i=s.getCanonicalFileName(e.getNormalizedAbsolutePath(o.rootDir,L)),a=0,c=t;a0;){var s=r.text.slice(a[o-1],a[o]),c=n.exec(s);if(!c)return!0;if(c[3])return!1;o--}return!0}function ke(e,t){return De(e,t,x,Se)}function Se(t,n){return he(function(){var r=_e().getEmitResolver(t,n);return e.getDeclarationDiagnostics(ue(e.noop),r,t)})}function De(t,n,r,i){var a=t?r.perFile&&r.perFile.get(t.path):r.allDiagnostics;if(a)return a;var o=i(t,n)||e.emptyArray;return t?(r.perFile||(r.perFile=e.createMap()),r.perFile.set(t.path,o)):r.allDiagnostics=o,o}function Ce(e,t){return e.isDeclarationFile?[]:ke(e,t)}function Te(t,n){we(e.normalizePath(t),n,void 0)}function Ee(e,t){return e.fileName===t.fileName}function Ne(e,t){return 9===e.kind?9===t.kind&&e.text===t.text:71===t.kind&&e.escapedText===t.escapedText}function Ae(t){if(!t.imports){var n,r,i,a=e.isSourceFileJavaScript(t),s=e.isExternalModule(t);if(o.importHelpers&&(o.isolatedModules||s)&&!t.isDeclarationFile){var c=e.createLiteral(e.externalHelpersModuleNameText),u=e.createImportDeclaration(void 0,void 0,void 0);e.addEmitFlags(u,67108864),c.parent=u,u.parent=t,n=[c]}for(var l=0,_=t.statements;l<_.length;l++){var d=_[l];p(d,!1),(524288&t.flags||a)&&f(d)}return t.imports=n||e.emptyArray,t.moduleAugmentations=r||e.emptyArray,void(t.ambientModuleNames=i||e.emptyArray)}function p(a,o){switch(a.kind){case 242:case 241:case 248:var c=e.getExternalModuleName(a);if(!c||!e.isStringLiteral(c))break;if(!c.text)break;o&&e.isExternalModuleNameRelative(c.text)||(n||(n=[])).push(c);break;case 237:if(e.isAmbientModule(a)&&(o||e.hasModifier(a,2)||t.isDeclarationFile)){var u=a.name,l=e.getTextOfIdentifierOrLiteral(u);if(s||o&&!e.isExternalModuleNameRelative(l))(r||(r=[])).push(u);else if(!o){t.isDeclarationFile&&(i||(i=[])).push(l);var _=a.body;if(_)for(var d=0,f=_.statements;d0),_.path=n,s.useCaseSensitiveFileNames()){var m=n.toLowerCase(),g=X.get(m);g?Fe(t,g.fileName,i,a,c):X.set(m,_)}F=F||_.hasNoDefaultLib,o.noResolve||(Oe(_,r),Me(_)),ze(_),r?v.unshift(_):v.push(_)}return _}function Oe(t,n){e.forEach(t.referencedFiles,function(e){we(r(e.fileName,t.fileName),n,void 0,t,e.pos,e.end)})}function Me(t){for(var n=e.map(t.typeReferenceDirectives,function(e){return e.fileName.toLocaleLowerCase()}),r=w(n,t.fileName),i=0;iD,f=_&&!p(o,s)&&!o.noResolve&&an&&(M.add(e.createDiagnosticForNodeInSourceFile(o.configFile,f.initializer.elements[n],r,i,a,s)),c=!1)}}c&&M.add(e.createCompilerDiagnostic(r,i,a,s))}function Je(t,n,r,i){for(var a=!0,o=0,s=Ke();o0)for(var a=t.getTypeChecker(),o=0,s=n.imports;o0)for(var _=0,d=n.referencedFiles;_0?o(l.outputFiles[0].text):u}return i.set(r.path,c),!u||c!==u}function o(t,n){if(!t.allFileNames){var r=n.getSourceFiles();t.allFileNames=r===e.emptyArray?e.emptyArray:r.map(function(e){return e.fileName})}return t.allFileNames}function s(t,n){return e.arrayFrom(e.mapDefinedIterator(t.referencedMap.entries(),function(e){var t=e[0];return e[1].has(n)?t:void 0}))}function c(t){for(var n=0,r=t.statements;n0;){var f=p.pop();if(!d.has(f)){var m=n.getSourceFileByPath(f);d.set(f,m),m&&a(t,n,m,i,o,l)&&p.push.apply(p,s(t,f))}}return e.arrayFrom(e.mapDefinedIterator(d.values(),function(e){return e}))}:function(e,t,n){var r=t.getCompilerOptions();return r&&(r.out||r.outFile)?[n]:u(e,t,n)})(t,n,p,d,o,l);return _||i(t,d),f},t.updateSignaturesFromCache=i,t.getAllDependencies=function(t,n,r){var i=n.getCompilerOptions();if(i.outFile||i.out)return o(t,n);if(!t.referencedMap||!e.isExternalModule(r)&&!c(r))return o(t,n);for(var a,s=e.createMap(),u=[r.path];u.length;){var l=u.pop();if(!s.has(l)){s.set(l,!0);var _=t.referencedMap.get(l);if(_)for(var d=_.keys(),p=d.next(),f=p.value,m=p.done;!m;f=(a=d.next()).value,m=a.done,a)u.push(f)}}return e.arrayFrom(e.mapDefinedIterator(s.keys(),function(e){var t=n.getSourceFileByPath(e);return t?t.fileName:e}))}}(e.BuilderState||(e.BuilderState={}))}(l||(l={})),function(e){function t(t,n){e.Debug.assert(!n||!t.affectedFiles||t.affectedFiles[t.affectedFilesIndex-1]!==n||!t.semanticDiagnosticsPerFile.has(n.path))}function n(t,n,r){for(;;){var i=t.affectedFiles;if(i){for(var a=t.seenAffectedFiles,o=t.semanticDiagnosticsPerFile,s=t.affectedFilesIndex;s0;n--)if(0===(r=t.indexOf(e.directorySeparator,r)+1))return!1;return!0}(t,47===t.charCodeAt(0)?3:1)}function P(e,t){return A(t)||(e.ignore=!0),e}function w(t,n){return S(v,n)?{dir:h,dirPath:v}:F(e.getDirectoryPath(e.getNormalizedAbsolutePath(t,s())),e.getDirectoryPath(n))}function F(t,n){for(;e.stringContains(n,"/node_modules/");)t=e.getDirectoryPath(t),n=e.getDirectoryPath(n);if(E(n))return P({dir:t,dirPath:n},e.getDirectoryPath(n));if(void 0!==v)for(;!S(n,v);){var r=e.getDirectoryPath(n);if(r===n)break;n=r,t=e.getDirectoryPath(t)}return P({dir:t,dirPath:n},n)}function I(t){return e.fileExtensionIsOneOf(t,m)}function O(e){if(e.failedLookupLocations&&e.failedLookupLocations.length)if(void 0===e.refCount){e.refCount=1;for(var n=!1,r=0,i=e.failedLookupLocations;r1),g.set(s,l-1))),u===v?r=!0:R(u)}}r&&R(v)}}function R(e){y.get(e).refCount--}function B(e,t){var n=e.get(t);n&&(n.forEach(L),e.delete(t))}function z(e){B(u,e),B(p,e)}function j(t,n,r){var i=e.createMap();t.forEach(function(t,o){var s=e.getDirectoryPath(o),c=i.get(s);c||(c=e.createMap(),i.set(s,c)),t.forEach(function(t,i){c.has(i)||(c.set(i,!0),!t.isInvalidated&&n(t,r)&&(t.isInvalidated=!0,(a||(a=e.createMap())).set(o,!0)))})})}function J(n){var r;u.size>(r=t.maxNumberOfFilesToIterateForInvalidation||e.maxNumberOfFilesToIterateForInvalidation)||p.size>r?o=!0:(j(u,n,x),j(p,n,k))}function K(n,r){var i;if(r)i=function(e){return S(n,t.toPath(e))};else{var s=e.getDirectoryPath(n);if(N(n)||E(n)||N(s)||E(s))i=function(r){return t.toPath(r)===n||e.startsWith(t.toPath(r),n)};else{if(!I(n)&&!g.has(n))return!1;if(e.isEmittedFileOfProgram(t.getCurrentProgram(),n))return!1;i=function(e){return t.toPath(e)===n}}}var c=a&&a.size;return J(function(t){return e.some(t.failedLookupLocations,i)}),o||a&&a.size!==c}function U(){e.clearMap(b,e.closeFileWatcher)}function V(e,n){return t.watchTypeRootsDirectory(n,function(r){var i=t.toPath(r);c&&c.addOrDeleteFileOrDirectory(r,i),t.onChangedAutomaticTypeDirectiveNames();var a=function(e,t){if(!o){if(S(v,t))return v;var n=F(e,t),r=n.dirPath;return!n.ignore&&y.has(r)&&r}}(n,e);a&&K(i,a===i)&&t.onInvalidatedResolution()},1)}function q(n){var r=e.getDirectoryPath(e.getDirectoryPath(n)),i=t.toPath(r);return i===v||A(i)}}}(l||(l={})),function(e){var t=e.sys?{getCurrentDirectory:function(){return e.sys.getCurrentDirectory()},getNewLine:function(){return e.sys.newLine},getCanonicalFileName:e.createGetCanonicalFileName(e.sys.useCaseSensitiveFileNames)}:void 0;function n(n,r){var i=n===e.sys?t:{getCurrentDirectory:function(){return n.getCurrentDirectory()},getNewLine:function(){return n.newLine},getCanonicalFileName:e.createGetCanonicalFileName(n.useCaseSensitiveFileNames)};if(!r)return function(t){return n.write(e.formatDiagnostic(t,i))};var a=new Array(1);return function(t){a[0]=t,n.write(e.formatDiagnosticsWithColorAndContext(a,i)+i.getNewLine()),a[0]=void 0}}function r(t,n,r){!t.clearScreen||r.preserveWatchOutput||n.code===e.Diagnostics.Compilation_complete_Watching_for_file_changes.code||r.extendedDiagnostics||r.diagnostics||t.clearScreen()}function i(t,n){return n?function(n,i,a){r(t,n,a);var o="["+e.formatColorAndReset((new Date).toLocaleTimeString(),e.ForegroundColorEscapeSequences.Grey)+"] ";o+=""+e.flattenDiagnosticMessageText(n.messageText,t.newLine)+(i+i+i),t.write(o)}:function(n,i,a){r(t,n,a);var o=(new Date).toLocaleTimeString()+" - ";o+=""+e.flattenDiagnosticMessageText(n.messageText,t.newLine)+(i+i+i),t.write(o)}}function a(t,n,r){var i;try{i=r.readFile(t)}catch(n){var a=e.createCompilerDiagnostic(e.Diagnostics.Cannot_read_file_0_Colon_1,t,n.message);return void r.onUnRecoverableConfigFileDiagnostic(a)}if(i){var o=e.parseJsonText(t,i);o.parseDiagnostics.forEach(function(e){return r.onConfigFileDiagnostic(e)});var s=r.getCurrentDirectory(),c=e.parseJsonSourceFileConfigFileContent(o,r,e.getNormalizedAbsolutePath(e.getDirectoryPath(t),s),n,e.getNormalizedAbsolutePath(t,s));return c.errors.forEach(function(e){return r.onConfigFileDiagnostic(e)}),c}a=e.createCompilerDiagnostic(e.Diagnostics.File_0_not_found,t),r.onUnRecoverableConfigFileDiagnostic(a)}function o(t,n,r){var i=t.getSyntacticDiagnostics().slice(),a=!1;0===i.length&&(e.addRange(i,t.getOptionsDiagnostics()),e.addRange(i,t.getGlobalDiagnostics()),0===i.length&&(a=!0));var o=t.emit(),s=o.emittedFiles,c=o.emitSkipped;if(e.addRange(i,o.diagnostics),a&&e.addRange(i,t.getSemanticDiagnostics()),e.sortAndDeduplicateDiagnostics(i).forEach(n),r){var u=t.getCurrentDirectory();e.forEach(s,function(t){var n=e.getNormalizedAbsolutePath(t,u);r("TSFILE: "+n)}),t.getCompilerOptions().listFiles&&e.forEach(t.getSourceFiles(),function(e){r(e.fileName)})}return c&&i.length>0?e.ExitStatus.DiagnosticsPresent_OutputsSkipped:i.length>0?e.ExitStatus.DiagnosticsPresent_OutputsGenerated:e.ExitStatus.Success}e.createDiagnosticReporter=n,e.createWatchStatusReporter=i,e.parseConfigFileWithSystem=function(t,n,r,i){var o=r;o.onConfigFileDiagnostic=i,o.onUnRecoverableConfigFileDiagnostic=function(t){return u(e.sys,i,t)};var s=a(t,n,o);return o.onConfigFileDiagnostic=void 0,o.onUnRecoverableConfigFileDiagnostic=void 0,s},e.getParsedCommandLineOfConfigFile=a,e.emitFilesAndReportErrors=o;var s={close:e.noop};function c(t,n,r,a){void 0===t&&(t=e.sys),n||(n=e.createEmitAndSemanticDiagnosticsBuilderProgram);var c=function(e){return t.write(e+t.newLine)};return{useCaseSensitiveFileNames:function(){return t.useCaseSensitiveFileNames},getNewLine:function(){return t.newLine},getCurrentDirectory:function(){return t.getCurrentDirectory()},getDefaultLibLocation:u,getDefaultLibFileName:function(t){return e.combinePaths(u(),e.getDefaultLibFileName(t))},fileExists:function(e){return t.fileExists(e)},readFile:function(e,n){return t.readFile(e,n)},directoryExists:function(e){return t.directoryExists(e)},getDirectories:function(e){return t.getDirectories(e)},readDirectory:function(e,n,r,i,a){return t.readDirectory(e,n,r,i,a)},realpath:t.realpath&&function(e){return t.realpath(e)},getEnvironmentVariable:t.getEnvironmentVariable&&function(e){return t.getEnvironmentVariable(e)},watchFile:t.watchFile?function(e,n,r){return t.watchFile(e,n,r)}:function(){return s},watchDirectory:t.watchDirectory?function(e,n,r){return t.watchDirectory(e,n,r)}:function(){return s},setTimeout:t.setTimeout?function(e,n){for(var r,i=[],a=2;ae.getRootLength(r)&&!n.directoryExists(r)&&(t(e.getDirectoryPath(r)),n.createDirectory(r))}(e.getDirectoryPath(e.normalizePath(t))),n.writeFile(t,r,i),e.performance.mark("afterIOWrite"),e.performance.measure("I/O Write","beforeIOWrite","afterIOWrite")}catch(e){a&&a(e.message)}},getCurrentDirectory:f,useCaseSensitiveFileNames:function(){return d},getCanonicalFileName:O,getNewLine:function(){return M},fileExists:W,readFile:m,trace:E,directoryExists:C.directoryExists&&function(e){return C.directoryExists(e)},getDirectories:C.getDirectories&&function(e){return C.getDirectories(e)},realpath:n.realpath&&function(e){return n.realpath(e)},getEnvironmentVariable:n.getEnvironmentVariable?function(e){return n.getEnvironmentVariable(e)}:function(){return""},onReleaseOldSourceFile:function(e,t){var n=u.get(e.path);n&&(V(n)?(c||(c=[])).push(e.path):n.sourceFile===e&&(n.fileWatcher&&n.fileWatcher.close(),u.delete(e.path),R.removeResolutionsOfFile(e.path)))},createHash:n.createHash&&function(e){return n.createHash(e)},toPath:U,getCompilationSettings:function(){return x},watchDirectoryOfFailedLookupLocation:ne,watchTypeRootsDirectory:ne,getCachedDirectoryStructureHost:function(){return D},onInvalidatedResolution:Y,onChangedAutomaticTypeDirectiveNames:function(){_=!0,Y()},maxNumberOfFilesToIterateForInvalidation:n.maxNumberOfFilesToIterateForInvalidation,getCurrentProgram:j,writeLog:A},R=e.createResolutionCache(L,g?e.getDirectoryPath(e.getNormalizedAbsolutePath(g,p)):p,!1);L.resolveModuleNames=n.resolveModuleNames?function(e,t,r){return n.resolveModuleNames(e,t,r)}:function(e,t,n){return R.resolveModuleNames(e,t,n)},L.resolveTypeReferenceDirectives=n.resolveTypeReferenceDirectives?function(e,t){return n.resolveTypeReferenceDirectives(e,t)}:function(e,t){return R.resolveTypeReferenceDirectives(e,t)};var B=!!n.resolveModuleNames||!!n.resolveTypeReferenceDirectives;return Q(e.Diagnostics.Starting_compilation_in_watch_mode),J(),ae(),g?{getCurrentProgram:z,getProgram:J}:{getCurrentProgram:z,getProgram:J,updateRootFileNames:function(t){e.Debug.assert(!g,"Cannot update root file names with config file watch mode"),b=t,Y()}};function z(){return r}function j(){return r&&r.getProgram()}function J(){A("Synchronizing program");var t=j();l&&(M=K(),t&&e.changesAffectModuleResolution(t.getCompilerOptions(),x)&&R.clear());var i=R.createHasInvalidatedResolution(B);if(e.isProgramUptoDate(j(),b,x,X,W,i,_))return r;N!==e.WatchLogLevel.None&&(A("CreatingProgramWith::"),A(" roots: "+JSON.stringify(b)),A(" options: "+JSON.stringify(x)));var o=l||!t;if(l=!1,R.startCachingPerDirectoryResolution(),L.hasInvalidatedResolution=i,L.hasChangedAutomaticTypeDirectiveNames=_,r=v(b,x,L,r),R.finishCachingPerDirectoryResolution(),e.updateMissingFilePathsWatch(r.getProgram(),a||(a=e.createMap()),re),o&&R.updateTypeRootsWatch(),c){for(var s=0,d=c;s=0)return u.push(e.createCompilerDiagnostic(e.Diagnostics.Circularity_detected_while_resolving_configuration_Colon_0,c.concat([l]).join(" -> "))),{raw:r||f(i,u)};var d=r?function(t,n,r,i,a){e.hasProperty(t,"excludes")&&a.push(e.createCompilerDiagnostic(e.Diagnostics.Unknown_option_excludes_Did_you_mean_exclude));var o,s=T(t.compilerOptions,r,a,i),c=N(t.typeAcquisition||t.typingOptions,r,a,i);if(t.compileOnSave=function(t,n,r){if(e.hasProperty(t,e.compileOnSaveCommandLineOption.name)){var i=P(e.compileOnSaveCommandLineOption,t.compileOnSave,n,r);return!("boolean"!=typeof i||!i)&&i}}(t,r,a),t.extends)if(e.isString(t.extends)){var u=i?b(i,r):r;o=D(t.extends,n,u,a,e.createCompilerDiagnostic)}else a.push(e.createCompilerDiagnostic(e.Diagnostics.Compiler_option_0_requires_a_value_of_type_1,"extends","string"));return{raw:t,options:s,typeAcquisition:c,extendedConfigPath:o}}(r,a,o,s,u):function(t,r,i,a,o){var s,c,u,l=C(a),_={onSetValidOptionKeyValueInParent:function(t,n,r){e.Debug.assert("compilerOptions"===t||"typeAcquisition"===t||"typingOptions"===t),("compilerOptions"===t?l:"typeAcquisition"===t?s||(s=E(a)):c||(c=E(a)))[n.name]=function t(n,r,i){if(!v(i)){if("list"===n.type){var a=n;return a.element.isFilePath||!e.isString(a.element.type)?e.filter(e.map(i,function(e){return t(a.element,r,e)}),function(e){return!!e}):i}return e.isString(n.type)?w(n,r,i):n.type.get(e.isString(i)?i.toLowerCase():i)}}(n,i,r)},onSetValidOptionKeyValueInRoot:function(n,s,c,l){switch(n){case"extends":var _=a?b(a,i):i;return void(u=D(c,r,_,o,function(n,r){return e.createDiagnosticForNodeInSourceFile(t,l,n,r)}));case"files":return void(0===c.length&&o.push(e.createDiagnosticForNodeInSourceFile(t,l,e.Diagnostics.The_files_list_in_config_file_0_is_empty,a||"tsconfig.json")))}},onSetUnknownOptionKeyValueInRoot:function(n,r,i,a){"excludes"===n&&o.push(e.createDiagnosticForNodeInSourceFile(t,r,e.Diagnostics.Unknown_option_excludes_Did_you_mean_exclude))}},d=m(t,o,(void 0===n&&(n=p([{name:"compilerOptions",type:"object",elementOptions:p(e.optionDeclarations),extraKeyDiagnosticMessage:e.Diagnostics.Unknown_compiler_option_0},{name:"typingOptions",type:"object",elementOptions:p(e.typeAcquisitionDeclarations),extraKeyDiagnosticMessage:e.Diagnostics.Unknown_type_acquisition_option_0},{name:"typeAcquisition",type:"object",elementOptions:p(e.typeAcquisitionDeclarations),extraKeyDiagnosticMessage:e.Diagnostics.Unknown_type_acquisition_option_0},{name:"extends",type:"string"},{name:"files",type:"list",element:{name:"files",type:"string"}},{name:"include",type:"list",element:{name:"include",type:"string"}},{name:"exclude",type:"list",element:{name:"exclude",type:"string"}},e.compileOnSaveCommandLineOption])),n),_);return s||(s=c?void 0!==c.enableAutoDiscovery?{enable:c.enableAutoDiscovery,include:c.include,exclude:c.exclude}:c:E(a)),{raw:d,options:l,typeAcquisition:s,extendedConfigPath:u}}(i,a,o,s,u);if(d.extendedConfigPath){c=c.concat([l]);var g=function(n,r,i,a,o,s){var c=_(r,function(e){return i.readFile(e)});if(n&&(n.extendedSourceFiles||(n.extendedSourceFiles=[])).push(c.fileName),!c.parseDiagnostics.length){var u,l=e.getDirectoryPath(r),d=t(void 0,c,i,l,e.getBaseFileName(r),o,s);if(n&&(u=n.extendedSourceFiles).push.apply(u,c.extendedSourceFiles),S(d)){var p=e.convertToRelativePath(l,a,e.identity),f=function(t){return e.isRootedDiskPath(t)?t:e.combinePaths(p,t)},m=function(t){g[t]&&(g[t]=e.map(g[t],f))},g=d.raw;m("include"),m("exclude"),m("files")}return d}s.push.apply(s,c.parseDiagnostics)}(i,d.extendedConfigPath,a,o,c,u);if(g&&S(g)){var y=g.raw,h=d.raw,x=function(e){var t=h[e]||y[e];t&&(h[e]=t)};x("include"),x("exclude"),x("files"),void 0===h.compileOnSave&&(h.compileOnSave=y.compileOnSave),d.options=e.assign({},g.options,d.options)}}return d}(t,r,i,a,s,c,l),g=d.raw,y=e.extend(o,d.options||{});y.configFilePath=s,h(y,r);var x=function(){var t,n,o;if(e.hasProperty(g,"files")&&!v(g.files)&&(e.isArray(g.files)?0===(t=g.files).length&&I(e.Diagnostics.The_files_list_in_config_file_0_is_empty,s||"tsconfig.json"):I(e.Diagnostics.Compiler_option_0_requires_a_value_of_type_1,"files","Array")),e.hasProperty(g,"include")&&!v(g.include)&&(e.isArray(g.include)?n=g.include:I(e.Diagnostics.Compiler_option_0_requires_a_value_of_type_1,"include","Array")),e.hasProperty(g,"exclude")&&!v(g.exclude))e.isArray(g.exclude)?o=g.exclude:I(e.Diagnostics.Compiler_option_0_requires_a_value_of_type_1,"exclude","Array");else{var _=g.compilerOptions&&g.compilerOptions.outDir;_&&(o=[_])}void 0===t&&void 0===n&&(n=["**/*"]);var d=function(t,n,r,i,a,o,s,c,u){var l,_;return i=e.normalizePath(i),n&&(l=z(n,s,!1,u,"include")),r&&(_=z(r,s,!0,u,"exclude")),B({filesSpecs:t,includeSpecs:n,excludeSpecs:r,validatedIncludeSpecs:l,validatedExcludeSpecs:_,wildcardDirectories:function(t,n,r,i){var a=e.getRegularExpressionForWildcard(_,r,"exclude"),o=a&&new RegExp(a,i?"":"i"),s={};if(void 0!==t){for(var c=[],u=0,l=t;u=r.length)break;var c=s;if(34===r.charCodeAt(c)){for(s++;s32;)s++;i.push(r.substring(c,s))}}o(i)}else a.push(e.createCompilerDiagnostic(e.Diagnostics.File_0_not_found,t))}},e.readConfigFile=function(t,n){var r=d(t,n);return e.isString(r)?l(t,r):{config:{},error:r}},e.parseConfigFileTextToJson=l,e.readJsonConfigFile=_,e.convertToObject=f,e.generateTSConfig=function(t,n,r){var a=function(t){var n=e.createMap(),r=i().optionNameMap,a=function(i){if(e.hasProperty(t,i)){if(r.has(i)&&r.get(i).category===e.Diagnostics.Command_line_Options)return"continue";var a=t[i],s=r.get(i.toLowerCase());if(s){var c=function e(t){return"string"===t.type||"number"===t.type||"boolean"===t.type?void 0:"list"===t.type?e(t.element):t.type}(s);n.set(i,c?"list"===s.type?a.map(function(e){return o(e,c)}):o(a,c):a)}}};for(var s in t)a(s);return n}(e.extend(t,e.defaultInitCompilerOptions));return function(){for(var t=e.createMultiMap(),i=0,o=e.optionDeclarations;i0)for(var y=0,h=i.readDirectory(n,p,_,l,void 0);y=n.end}function _(e,t,n,r){return Math.max(e,n)n)break;var _=l.getEnd();if(n<_||n===_&&(1===l.kind||a)){s=l;continue e}if(i&&_===n){var d=v(n,t,l);if(d&&i(d))return d}}}return s}}function v(t,n,r,i){var a=function a(o){if(b(o))return o;for(var s=o.getChildren(n),c=0;c=t||!T(l)||S(l)?(u=k(s,c))&&x(u,n):a(l)}return e.Debug.assert(void 0!==r||272===o.kind||e.isJSDocCommentContainingNode(o)),s.length?(u=k(s,s.length))&&x(u,n):void 0}(r||n);return e.Debug.assert(!(a&&S(a))),a}function b(t){return e.isToken(t)&&!S(t)}function x(e,t){if(b(e))return e;var n=e.getChildren(t),r=k(n,n.length);return r&&x(r,t)}function k(t,n){for(var r=n-1;r>=0;r--)if(S(t[r]))e.Debug.assert(r>0,"`JsxText` tokens should not be the first child of `JsxElement | JsxSelfClosingElement`");else if(T(t[r]))return t[r]}function S(t){return e.isJsxText(t)&&t.containsOnlyWhiteSpaces}function D(e,t,n){for(var r=e.kind,i=0;;){if(!(e=v(e.getFullStart(),n)))return;if(e.kind===t){if(0===i)return e;i--}else e.kind===r&&i++}}function C(t,n,r,i){return!!e.formatting.getRangeOfEnclosingComment(t,n,!1,void 0,r,i)}function T(e){return 0!==e.getWidth()}function E(t){return 71===t||e.isKeyword(t)}function N(e,t){return{span:e,newText:t}}e.getLineStartPositionForPosition=function(t,n){return e.getLineStarts(n)[n.getLineAndCharacterOfPosition(t).line]},e.rangeContainsRange=u,e.startEndContainsRange=l,e.rangeContainsStartEnd=function(e,t,n){return e.pos<=t&&e.end>=n},e.rangeOverlapsWithStartEnd=function(e,t,n){return _(e.pos,e.end,t,n)},e.startEndOverlapsWithStartEnd=_,e.positionBelongsToNode=function(t,n,r){return e.Debug.assert(t.pos<=n),nr.getStart(t)&&nt.end||o.pos===t.end)&&T(o))return n(o)}}(n)},e.findPrecedingToken=v,e.isInString=function(t,n,r){if(void 0===r&&(r=v(n,t)),r&&e.isStringTextContainingNode(r)){var i=r.getStart(),a=r.getEnd();if(ir.getStart(t)},e.findPrecedingMatchingToken=D,e.isPossiblyTypeArgumentPosition=function(t,n){for(var r=0;t;){switch(t.kind){case 27:var i=(t=v(t.getFullStart(),n))&&e.isIdentifier(t);if(!r||!i)return i;r--;break;case 47:r=3;break;case 46:r=2;break;case 29:r++;break;case 18:if(!(t=D(t,17,n)))return!1;break;case 20:if(!(t=D(t,19,n)))return!1;break;case 22:if(!(t=D(t,21,n)))return!1;break;case 26:case 36:case 71:case 9:case 8:case 101:case 86:case 103:case 85:case 128:case 23:case 49:case 55:case 56:break;default:if(e.isTypeNode(t))break;return!1}t=v(t.getFullStart(),n)}return!1},e.isInComment=C,e.hasDocComment=function(t,n){var r=y(t,n,!1),i=e.getLeadingCommentRanges(t.text,r.pos);return e.forEach(i,function(e){var n=t.text;return n.length>=e.pos+3&&"/"===n[e.pos]&&"*"===n[e.pos+1]&&"*"===n[e.pos+2]})},e.getNodeModifiers=function(t){var n=e.getCombinedModifierFlags(t),r=[];return 8&n&&r.push("private"),16&n&&r.push("protected"),4&n&&r.push("public"),32&n&&r.push("static"),128&n&&r.push("abstract"),1&n&&r.push("export"),2097152&t.flags&&r.push("declare"),r.length>0?r.join(","):""},e.getTypeArgumentOrTypeParameterList=function(t){return 161===t.kind||185===t.kind?t.typeArguments:e.isFunctionLike(t)||233===t.kind||234===t.kind?t.typeParameters:void 0},e.isWord=E,e.isComment=function(e){return 2===e||3===e},e.isStringOrRegularExpressionOrTemplateLiteral=function(t){return!(9!==t&&12!==t&&!e.isTemplateLiteralKind(t))},e.isPunctuation=function(e){return 17<=e&&e<=70},e.isInsideTemplateLiteral=function(t,n){return e.isTemplateLiteralKind(t.kind)&&t.getStart()0&&148===e.declarations[0].kind}e.isFirstDeclarationOfSymbolParameter=t;var n=function(){var t,n,a;l();var o=function(t){return u(t,e.SymbolDisplayPartKind.text)};return{displayParts:function(){return t},writeKeyword:function(t){return u(t,e.SymbolDisplayPartKind.keyword)},writeOperator:function(t){return u(t,e.SymbolDisplayPartKind.operator)},writePunctuation:function(t){return u(t,e.SymbolDisplayPartKind.punctuation)},writeSpace:function(t){return u(t,e.SymbolDisplayPartKind.space)},writeStringLiteral:function(t){return u(t,e.SymbolDisplayPartKind.stringLiteral)},writeParameter:function(t){return u(t,e.SymbolDisplayPartKind.parameterName)},writeProperty:function(t){return u(t,e.SymbolDisplayPartKind.propertyName)},writeLiteral:function(t){return u(t,e.SymbolDisplayPartKind.stringLiteral)},writeSymbol:function(e,n){c(),t.push(r(e,n))},writeLine:function(){t.push(s()),n=!0},write:o,writeTextOfNode:o,getText:function(){return""},getTextPos:function(){return 0},getColumn:function(){return 0},getLine:function(){return 0},isAtStartOfLine:function(){return!1},rawWrite:e.notImplemented,getIndent:function(){return a},increaseIndent:function(){a++},decreaseIndent:function(){a--},clear:l,trackSymbol:e.noop,reportInaccessibleThisError:e.noop,reportInaccessibleUniqueSymbolError:e.noop,reportPrivateInBaseOfClassExpression:e.noop};function c(){if(n){var r=e.getIndentString(a);r&&t.push(i(r,e.SymbolDisplayPartKind.space)),n=!1}}function u(e,n){c(),t.push(i(e,n))}function l(){t=[],n=!0,a=0}}();function r(n,r){return i(n,function(n){var r=n.flags;return 3&r?t(n)?e.SymbolDisplayPartKind.parameterName:e.SymbolDisplayPartKind.localName:4&r?e.SymbolDisplayPartKind.propertyName:32768&r?e.SymbolDisplayPartKind.propertyName:65536&r?e.SymbolDisplayPartKind.propertyName:8&r?e.SymbolDisplayPartKind.enumMemberName:16&r?e.SymbolDisplayPartKind.functionName:32&r?e.SymbolDisplayPartKind.className:64&r?e.SymbolDisplayPartKind.interfaceName:384&r?e.SymbolDisplayPartKind.enumName:1536&r?e.SymbolDisplayPartKind.moduleName:8192&r?e.SymbolDisplayPartKind.methodName:262144&r?e.SymbolDisplayPartKind.typeParameterName:524288&r?e.SymbolDisplayPartKind.aliasName:2097152&r?e.SymbolDisplayPartKind.aliasName:e.SymbolDisplayPartKind.text}(r))}function i(t,n){return{text:t,kind:e.SymbolDisplayPartKind[n]}}function a(t){return i(e.tokenToString(t),e.SymbolDisplayPartKind.keyword)}function o(t){return i(t,e.SymbolDisplayPartKind.text)}function s(){return i("\n",e.SymbolDisplayPartKind.lineBreak)}function c(e){try{return e(n),n.displayParts()}finally{n.clear()}}function u(t){return e.isSingleOrDoubleQuote(t.charCodeAt(0))}function l(t,n){return e.ensureScriptKind(t,n&&n.getScriptKind&&n.getScriptKind(t))}function _(t){if(void 0!==t){var n=e.visitEachChild(t,_,e.nullTransformationContext);if(n===t){var r=e.getSynthesizedClone(t);return e.isStringLiteral(r)?r.textSourceNode=t:e.isNumericLiteral(r)&&(r.numericLiteralFlags=t.numericLiteralFlags),r.pos=t.pos,r.end=t.end,r}return n.parent=void 0,n}}function d(e){return e.forEachChild(function(e){return e})}function p(t){var n;return t.forEachChild(function(e){n=e},function(t){t.length&&(n=e.last(t))}),n}e.symbolPart=r,e.displayPart=i,e.spacePart=function(){return i(" ",e.SymbolDisplayPartKind.space)},e.keywordPart=a,e.punctuationPart=function(t){return i(e.tokenToString(t),e.SymbolDisplayPartKind.punctuation)},e.operatorPart=function(t){return i(e.tokenToString(t),e.SymbolDisplayPartKind.operator)},e.textOrKeywordPart=function(t){var n=e.stringToToken(t);return void 0===n?o(t):a(n)},e.textPart=o,e.getNewLineOrDefaultFromHost=function(e,t){return t&&t.newLineCharacter||e.getNewLine&&e.getNewLine()||"\r\n"},e.lineBreakPart=s,e.mapToDisplayParts=c,e.typeToDisplayParts=function(e,t,n,r){return c(function(i){e.writeType(t,n,1024|r,i)})},e.symbolToDisplayParts=function(e,t,n,r,i){return c(function(a){e.writeSymbol(t,n,r,8|i,a)})},e.signatureToDisplayParts=function(e,t,n,r){return r|=25632,c(function(i){e.writeSignature(t,n,r,void 0,i)})},e.isImportOrExportSpecifierName=function(e){return e.parent&&(246===e.parent.kind||250===e.parent.kind)&&e.parent.propertyName===e},e.stripQuotes=function(e){var t=e.length;return t>=2&&e.charCodeAt(0)===e.charCodeAt(t-1)&&u(e)?e.substring(1,t-1):e},e.startsWithQuote=u,e.scriptKindIs=function(t,n){for(var r=[],i=2;i=i.length){var v=n(o,u,e.lastOrUndefined(_));void 0!==v&&(m=v)}}while(1!==u);function b(){switch(u){case 41:case 63:t[l]||12!==o.reScanSlashToken()||(u=12);break;case 27:71===l&&y++;break;case 29:y>0&&y--;break;case 119:case 137:case 134:case 122:case 138:y>0&&!c&&(u=71);break;case 14:_.push(u);break;case 17:_.length>0&&_.push(u);break;case 18:if(_.length>0){var n=e.lastOrUndefined(_);14===n?16===(u=o.reScanTemplateToken())?_.pop():e.Debug.assertEqual(u,15,"Should have been a template middle."):(e.Debug.assertEqual(n,17,"Should have been an open brace"),_.pop())}break;default:if(!e.isKeyword(u))break;23===l?u=71:e.isKeyword(l)&&e.isKeyword(u)&&!function(t,n){if(!e.isAccessibilityModifier(l))return!0;switch(n){case 125:case 136:case 123:case 115:return!0;default:return!1}}(0,u)&&(u=71)}}return{endOfLineState:m,spans:g}}return{getClassificationsForLine:function(t,n,r){return function(t,n){for(var r=[],a=t.spans,o=0,s=0;s=0){var _=c-o;_>0&&r.push({length:_,classification:e.TokenClass.Whitespace})}r.push({length:u,classification:i(l)}),o=c+u}var d=n.length-o;return d>0&&r.push({length:d,classification:e.TokenClass.Whitespace}),{entries:r,finalLexState:t.endOfLineState}}(s(t,n,r),t)},getEncodedLexicalClassifications:s}};var t=e.arrayToNumericMap([71,9,8,12,99,43,44,20,22,18,101,86],function(e){return e},function(){return!0});function n(t,n,r){switch(n){case 9:if(!t.isUnterminated())return;for(var i=t.getTokenText(),a=i.length-1,o=0;92===i.charCodeAt(a-o);)o++;if(0==(1&o))return;return 34===i.charCodeAt(0)?3:2;case 3:return t.isUnterminated()?1:void 0;default:if(e.isTemplateLiteralKind(n)){if(!t.isUnterminated())return;switch(n){case 16:return 5;case 13:return 4;default:return e.Debug.fail("Only 'NoSubstitutionTemplateLiteral's and 'TemplateTail's can be unterminated; got SyntaxKind #"+n)}}return 14===r?6:void 0}}function r(e,t,n,r,i){if(8!==r){0===e&&n>0&&(e+=n);var a=t-e;a>0&&i.push(e-n,a,r)}}function i(t){switch(t){case 1:return e.TokenClass.Comment;case 3:return e.TokenClass.Keyword;case 4:return e.TokenClass.NumberLiteral;case 5:return e.TokenClass.Operator;case 6:return e.TokenClass.StringLiteral;case 8:return e.TokenClass.Whitespace;case 10:return e.TokenClass.Punctuation;case 2:case 11:case 12:case 13:case 14:case 15:case 16:case 9:case 17:return e.TokenClass.Identifier}}function a(t){if(e.isKeyword(t))return 3;if(function(e){switch(e){case 39:case 41:case 42:case 37:case 38:case 45:case 46:case 47:case 27:case 29:case 30:case 31:case 93:case 92:case 118:case 32:case 33:case 34:case 35:case 48:case 50:case 49:case 53:case 54:case 69:case 68:case 70:case 65:case 66:case 67:case 59:case 60:case 61:case 63:case 64:case 58:case 26:return!0;default:return!1}}(t)||function(e){switch(e){case 37:case 38:case 52:case 51:case 43:case 44:return!0;default:return!1}}(t))return 5;if(t>=17&&t<=70)return 10;switch(t){case 8:return 4;case 9:return 6;case 12:return 7;case 7:case 3:case 2:return 1;case 5:case 4:return 8;case 71:default:return e.isTemplateLiteralKind(t)?6:2}}function o(e,t){switch(t){case 237:case 233:case 234:case 232:e.throwIfCancellationRequested()}}function s(t,n,r,i,a){var s=[];return r.forEachChild(function c(u){if(u&&e.textSpanIntersectsWith(a,u.pos,u.getFullWidth())){if(o(n,u.kind),e.isIdentifier(u)&&!e.nodeIsMissing(u)&&i.has(u.escapedText)){var l=t.getSymbolAtLocation(u),_=l&&function t(n,r,i){var a=n.getFlags();return 0==(2885600&a)?void 0:32&a?11:384&a?12:524288&a?16:1536&a?4&r||1&r&&function(t){return e.some(t.declarations,function(t){return e.isModuleDeclaration(t)&&1===e.getModuleInstanceState(t)})}(n)?14:void 0:2097152&a?t(i.getAliasedSymbol(n),r,i):2&r?64&a?13:262144&a?15:void 0:void 0}(l,e.getMeaningFromLocation(u),t);_&&function(e,t,n){s.push(e),s.push(t-e),s.push(n)}(u.getStart(r),u.getEnd(),_)}u.forEachChild(c)}}),{spans:s,endOfLineState:0}}function c(e){switch(e){case 1:return"comment";case 2:return"identifier";case 3:return"keyword";case 4:return"number";case 5:return"operator";case 6:return"string";case 8:return"whitespace";case 9:return"text";case 10:return"punctuation";case 11:return"class name";case 12:return"enum name";case 13:return"interface name";case 14:return"module name";case 15:return"type parameter name";case 16:return"type alias name";case 17:return"parameter name";case 18:return"doc comment tag name";case 19:return"jsx open tag name";case 20:return"jsx close tag name";case 21:return"jsx self closing tag name";case 22:return"jsx attribute";case 23:return"jsx text";case 24:return"jsx attribute string literal value"}}function u(t){e.Debug.assert(t.spans.length%3==0);for(var n=t.spans,r=[],i=0;i=0),a>0){var o=r||y(t.kind,t);o&&l(i,a,o)}return!0}function y(t,n){if(e.isKeyword(t))return 3;if((27===t||29===t)&&n&&e.getTypeArgumentOrTypeParameterList(n.parent))return 10;if(e.isPunctuation(t)){if(n){if(58===t&&(230===n.parent.kind||151===n.parent.kind||148===n.parent.kind||260===n.parent.kind))return 5;if(198===n.parent.kind||196===n.parent.kind||197===n.parent.kind||199===n.parent.kind)return 5}return 10}if(8===t)return 4;if(9===t)return 260===n.parent.kind?24:6;if(12===t)return 6;if(e.isTemplateLiteralKind(t))return 6;if(10===t)return 23;if(71===t){if(n)switch(n.parent.kind){case 233:return n.parent.name===n?11:void 0;case 147:return n.parent.name===n?15:void 0;case 234:return n.parent.name===n?13:void 0;case 236:return n.parent.name===n?12:void 0;case 237:return n.parent.name===n?14:void 0;case 148:return n.parent.name===n?e.isThisIdentifier(n)?3:17:void 0}return 2}}function h(r){if(r&&e.decodedTextSpanIntersectsWith(i,a,r.pos,r.getFullWidth())){o(t,r.kind);for(var s=0,c=r.getChildren(n);s=2&&46===e.charCodeAt(0)){var t=e.length>=3&&46===e.charCodeAt(1)?2:1,n=e.charCodeAt(t);return 47===n||92===n}return!1}(m)||e.isRootedDiskPath(m)){var v=e.getSupportedExtensions(u);return u.rootDirs?function(t,n,i,a,o,s,c,u,l){for(var _=[],d=0,p=function(t,n,r,i){t=t.map(function(t){return e.normalizePath(e.isRootedDiskPath(t)?t:e.combinePaths(n,t))});var a=e.firstDefined(t,function(t){return e.containsPath(t,r,n,i)?r.substr(t.length):void 0});return e.deduplicate(t.map(function(t){return e.combinePaths(t,a)}),e.equateStringsCaseSensitive,e.compareStringsCaseSensitive)}(t,c.project||u.getCurrentDirectory(),i,!(u.useCaseSensitiveFileNames&&u.useCaseSensitiveFileNames()));d=e.pos&&n<=e.end});if(_){var d=t.text.slice(_.pos,n),p=u.exec(d);if(p){var f=p[1],m=p[2],g=p[3],y=e.getDirectoryPath(t.path);switch(m){case"path":var h=s(g,_.pos+f.length);return r(g,y,e.getSupportedExtensions(i),!0,h,o,t.path);case"types":return a(o,i,y,e.createTextSpan(_.pos+f.length,p[0].length-f.length));default:return}}}};var u=/^(\/\/\/\s*o.end))for(var c=s.length-1;c>=0;c--){var l=s[c];if(n>=l.pos)return l}}}(0,i);if(f){if(f.tagName.pos<=i&&i<=f.tagName.end)return{kind:1};if(function(e){switch(e.kind){case 287:case 292:case 288:case 289:case 291:return!0}}(f)&&f.typeExpression&&274===f.typeExpression.kind&&((u=e.getTokenAtPosition(r,i,!0))&&(e.isDeclarationName(u)||292===u.parent.kind&&u.parent.name===u)||(_=Y(f.typeExpression))),e.isJSDocParameterTag(f)&&(e.nodeIsMissing(f.name)||f.name.pos<=i&&i<=f.name.end))return{kind:3,tag:f}}if(!_)return void n("Returning an empty list because completion was inside a regular comment or plain text part of a JsDoc comment.")}c=e.timestamp();var h=e.findPrecedingToken(i,r,void 0,_);n("getCompletionData: Get previous token 1: "+(e.timestamp()-c));var v=h;if(v&&i<=v.end&&e.isWord(v.kind)){var b=e.timestamp();v=e.findPrecedingToken(v.getFullStart(),r,void 0,_),n("getCompletionData: Get previous token 2: "+(e.timestamp()-b))}var x,E=u,N=!1,A=!1,P=!1,w=!1,F=e.getTouchingPropertyName(r,i,_);if(v){if(function(t){var r=e.timestamp(),a=function(t){if(9===t.kind||12===t.kind||e.isTemplateLiteralKind(t.kind)){var n=t.getStart(),r=t.getEnd();if(n=t.pos;case 23:return 179===r;case 56:return 180===r;case 21:return 179===r;case 19:return 267===r||Q(r);case 17:return 236===r||234===r||165===r;case 25:return 150===r&&t.parent&&t.parent.parent&&(234===t.parent.parent.kind||165===t.parent.parent.kind);case 27:return 233===r||203===r||234===r||235===r||e.isFunctionLikeKind(r);case 115:return 151===r&&!e.isClassLike(t.parent.parent);case 24:return 148===r||t.parent&&t.parent.parent&&179===t.parent.parent.kind;case 114:case 112:case 113:return 148===r&&!e.isConstructorDeclaration(t.parent.parent);case 118:return 246===r||250===r||244===r;case 125:case 136:if(G(t))return!1;case 75:case 83:case 109:case 89:case 104:case 91:case 110:case 76:case 116:case 139:return!0}if(S(t.getText())&&G(t))return!1;if(X(t)&&(!e.isIdentifier(t)||(n=t.getText(),D(e.stringToToken(n)))||Y(t)))return!1;switch(t.getText()){case"abstract":case"async":case"class":case"const":case"declare":case"enum":case"function":case"interface":case"let":case"private":case"protected":case"public":case"static":case"var":case"yield":return!0}return e.isDeclarationName(t)&&!e.isJsxAttribute(t.parent)&&!(e.isClassLike(t.parent)&&(t!==h||i>h.end))}(t)||function(e){if(8===e.kind){var t=e.getFullText();return"."===t.charAt(t.length-1)}return!1}(t)||function(e){if(10===e.kind)return!0;if(29===e.kind&&e.parent){if(255===e.parent.kind)return!0;if(256===e.parent.kind||254===e.parent.kind)return e.parent.parent&&253===e.parent.parent.kind}return!1}(t);return n("getCompletionsAtPosition: isCompletionListBlocker: "+(e.timestamp()-r)),a}(v))return void n("Returning an empty list because completion was requested in an invalid position.");var I=v.parent;if(23===v.kind)switch(N=!0,I.kind){case 183:E=(x=I).expression;break;case 145:E=I.left;break;default:return}else if(1===r.languageVariant){if(I&&183===I.kind&&(v=I,I=I.parent),u.parent===F)switch(u.kind){case 29:253!==u.parent.kind&&255!==u.parent.kind||(F=u);break;case 41:254===u.parent.kind&&(F=u)}switch(I.kind){case 256:41===v.kind&&(P=!0,F=v);break;case 198:if(!(32768&I.left.flags))break;case 254:case 253:case 255:27===v.kind&&(A=!0,F=v);break;case 260:switch(h.kind){case 58:w=!0;break;case 71:h!==I.name&&(w=h)}}}}var O=e.timestamp(),M=5,L=!1,R=0,B=[],z=[];if(N)!function(){M=2;var n=_||e.isPartOfTypeNode(E.parent),i=e.isInRightSideOfInternalImportEqualsDeclaration(E)||!n&&e.isPossiblyTypeArgumentPosition(v,r);if(e.isEntityName(E)){var a=t.getSymbolAtLocation(E);if(a&&1920&(a=e.skipAlias(a,t)).flags){for(var o=e.Debug.assertEachDefined(t.getExportsOfModule(a),"getExportsOfModule() should all be defined"),s=function(e){return t.isValidPropertyAccess(E.parent,e.name)},c=function(e){return W(e)},u=i?function(e){return c(e)||s(e)}:n?c:s,l=0,d=o;l0&&(B=function(t,n){if(0===n.length)return t;for(var r=e.createUnderscoreEscapedMap(),i=0,a=n;i=0&&!c(n,r[a],106);a--);return e.forEach(i(t.statement),function(e){o(t,e)&&c(n,e.getFirstToken(),72,77)}),n}function l(e){var t=s(e);if(t)switch(t.kind){case 218:case 219:case 220:case 216:case 217:return u(t);case 225:return _(t)}}function _(t){var n=[];return c(n,t.getFirstToken(),98),e.forEach(t.caseBlock.clauses,function(r){c(n,r.getFirstToken(),73,79),e.forEach(i(r),function(e){o(t,e)&&c(n,e.getFirstToken(),72)})}),n}function d(t,n){var r=[];return c(r,t.getFirstToken(),102),t.catchClause&&c(r,t.catchClause.getFirstToken(),74),t.finallyBlock&&c(r,e.findChildOfKind(t,87,n),87),r}function p(t,n){var i=function(t){for(var n=t;n.parent;){var r=n.parent;if(e.isFunctionBlock(r)||272===r.kind)return r;if(e.isTryStatement(r)&&r.tryBlock===n&&r.catchClause)return n;n=r}}(t);if(i){var a=[];return e.forEach(r(i),function(t){a.push(e.findChildOfKind(t,100,n))}),e.isFunctionBlock(i)&&e.forEachReturnStatement(i,function(t){a.push(e.findChildOfKind(t,96,n))}),a}}function f(t,n){var i=e.getContainingFunction(t);if(i){var a=[];return e.forEachReturnStatement(e.cast(i.body,e.isBlock),function(t){a.push(e.findChildOfKind(t,96,n))}),e.forEach(r(i.body),function(t){a.push(e.findChildOfKind(t,100,n))}),a}}(e.DocumentHighlights||(e.DocumentHighlights={})).getDocumentHighlights=function(t,r,i,a,o){var s=e.getTouchingWord(i,a,!0);if(s.parent&&(e.isJsxOpeningElement(s.parent)&&s.parent.tagName===s||e.isJsxClosingElement(s.parent))){var m=s.parent.parent,g=[m.openingElement,m.closingElement].map(function(e){return n(e.tagName,i)});return[{fileName:i.fileName,highlightSpans:g}]}return function(t,n,r,i,a){var o=e.FindAllReferences.getReferenceEntriesForNode(t,n,r,a,i);if(o){var s=e.arrayToMultiMap(o.map(e.FindAllReferences.toHighlightSpan),function(e){return e.fileName},function(e){return e.span});return e.arrayFrom(s.entries(),function(e){return{fileName:e[0],highlightSpans:e[1]}})}}(a,s,t,r,o)||function(t,r){var i=function(t,r){switch(t.kind){case 90:case 82:return e.isIfStatement(t.parent)?function(r,i){for(var a=function(t,n){for(var r=[];e.isIfStatement(t.parent)&&t.parent.elseStatement===t;)t=t.parent;for(;;){var i=t.getChildren(n);c(r,i[0],90);for(var a=i.length-1;a>=0&&!c(r,i[a],82);a--);if(!t.elseStatement||!e.isIfStatement(t.elseStatement))break;t=t.elseStatement}return r}(t.parent,i),o=[],s=0;s=u.end;d--)if(!e.isWhiteSpaceSingleLine(i.text.charCodeAt(d))){_=!1;break}if(_){o.push({fileName:i.fileName,textSpan:e.createTextSpanFromBounds(u.getStart(),l.end),kind:"reference"}),s++;continue}}o.push(n(a[s],i))}return o}(0,r):void 0;case 96:return m(t.parent,e.isReturnStatement,f);case 100:return m(t.parent,e.isThrowStatement,p);case 102:case 74:case 87:return m(74===t.kind?t.parent.parent:t.parent,e.isTryStatement,d);case 98:return m(t.parent,e.isSwitchStatement,_);case 73:case 79:return m(t.parent.parent.parent,e.isSwitchStatement,_);case 72:case 77:return m(t.parent,e.isBreakOrContinueStatement,l);case 88:case 106:case 81:return m(t.parent,function(t){return e.isIterationStatement(t,!0)},u);case 123:return s(e.isConstructorDeclaration,[123]);case 125:case 136:return s(e.isAccessor,[125,136]);default:return e.isModifierKind(t.kind)&&(e.isDeclaration(t.parent)||e.isVariableStatement(t.parent))?g((a=t.parent,o=e.modifierToFlag(i=t.kind),e.mapDefined(function(t,n){var r=t.parent;switch(r.kind){case 238:case 272:case 211:case 264:case 265:return 128&n&&e.isClassDeclaration(t)?t.members.concat([t]):r.statements;case 154:case 153:case 232:return r.parameters.concat(e.isClassLike(r.parent)?r.parent.members:[]);case 233:case 203:var i=r.members;if(28&n){var a=e.find(r.members,e.isConstructorDeclaration);if(a)return i.concat(a.parameters)}else if(128&n)return i.concat([r]);return i;default:e.Debug.assertNever(r,"Invalid container kind.")}}(a,o),function(t){if(e.getModifierFlags(t)&o){var n=e.find(t.modifiers,function(e){return e.kind===i});return e.Debug.assert(!!n),n}}))):void 0}var i,a,o;function s(n,i){return m(t.parent,n,function(t){return e.mapDefined(t.symbol.declarations,function(t){return n(t)?e.find(t.getChildren(r),function(t){return e.contains(i,t.kind)}):void 0})})}function m(e,t,n){return t(e)?g(n(e,r)):void 0}function g(e){return e&&e.map(function(e){return n(e,r)})}}(t,r);return i&&[{fileName:r.fileName,highlightSpans:i}]}(s,i)}}()}(l||(l={})),function(e){e.createDocumentRegistry=function(t,n){void 0===n&&(n="");var r=e.createMap(),i=e.createGetCanonicalFileName(!!t);function a(e){return"_"+e.target+"|"+e.module+"|"+e.noResolve+"|"+e.jsx+"|"+e.allowJs+"|"+e.baseUrl+"|"+JSON.stringify(e.typeRoots)+"|"+JSON.stringify(e.rootDirs)+"|"+JSON.stringify(e.paths)}function o(t,n){var i=r.get(t);return!i&&n&&r.set(t,i=e.createMap()),i}function s(e,t,n,r,i,a,o){return u(e,t,n,r,i,a,!0,o)}function c(e,t,n,r,i,a,o){return u(e,t,n,r,i,a,!1,o)}function u(t,n,r,i,a,s,c,u){var l=o(i,!0),_=l.get(n);if(_)_.sourceFile.version!==s&&(_.sourceFile=e.updateLanguageServiceSourceFile(_.sourceFile,a,s,a.getChangeRange(_.sourceFile.scriptSnapshot))),c&&_.languageServiceRefCount++;else{var d=e.createLanguageServiceSourceFile(t,a,r.target,s,!1,u);l.set(n,_={sourceFile:d,languageServiceRefCount:1,owners:[]})}return _.sourceFile}function l(t,n){var r=o(n,!1);e.Debug.assert(void 0!==r);var i=r.get(t);i.languageServiceRefCount--,e.Debug.assert(i.languageServiceRefCount>=0),0===i.languageServiceRefCount&&r.delete(t)}return{acquireDocument:function(t,r,o,c,u){return s(t,e.toPath(t,n,i),r,a(r),o,c,u)},acquireDocumentWithKey:s,updateDocument:function(t,r,o,s,u){return c(t,e.toPath(t,n,i),r,a(r),o,s,u)},updateDocumentWithKey:c,releaseDocument:function(t,r){return l(e.toPath(t,n,i),a(r))},releaseDocumentWithKey:l,reportStats:function(){var t=e.arrayFrom(r.keys()).filter(function(e){return e&&"_"===e.charAt(0)}).map(function(e){var t=[];return r.get(e).forEach(function(e,n){t.push({name:n,refCount:e.languageServiceRefCount,references:e.owners.slice(0)})}),t.sort(function(e,t){return t.refCount-e.refCount}),{bucket:e,sourceFiles:t}});return JSON.stringify(t,void 0,2)},getKeyForCompilationSettings:a}}}(l||(l={})),function(e){!function(t){function n(t,n){return e.forEach(272===t.kind?t.statements:t.body.statements,function(t){return n(t)||l(t)&&e.forEach(t.body&&t.body.statements,n)})}function r(e,t){if(e.externalModuleIndicator||void 0!==e.imports)for(var r=0,a=e.imports;r=0&&!(c>r.end);){var u=c+s;0!==c&&e.isIdentifierPart(a.charCodeAt(c-1),6)||u!==o&&e.isIdentifierPart(a.charCodeAt(u),6)||i.push(c),c=a.indexOf(n,c+s+1)}return i}function p(n,r){var i=n.getSourceFile(),a=r.text,o=e.mapDefined(d(i,a,n),function(n){var o=e.getTouchingWord(i,n,!1);return o&&(o===r||e.isJumpStatementTarget(o)&&e.getTargetLabel(o,a)===r)?t.nodeEntry(o):void 0});return[{definition:{type:"label",node:r},references:o}]}function f(e,t,n){return n.cancellationToken.throwIfCancellationRequested(),m(e,e,t,n)}function m(e,t,n,r){if(r.markSearchedSymbol(t,n.symbol))for(var i=0,a=d(t,n.text,e);ie.major||this.major===e.major&&(this.minor>e.minor||this.minor===e.minor&&(!this.isPrerelease&&e.isPrerelease||this.isPrerelease===e.isPrerelease&&this.patch>e.patch))},e}();e.Semver=a}(l||(l={})),function(e){!function(t){function n(t,n){return!e.Semver.parse(e.getProperty(n,"ts"+e.versionMajorMinor)||e.getProperty(n,"latest")).greaterThan(t.version)}t.isTypingUpToDate=n,t.nodeCoreModuleList=["buffer","querystring","events","http","cluster","zlib","os","https","punycode","repl","readline","vm","child_process","url","dns","net","dgram","fs","path","string_decoder","tls","crypto","stream","util","assert","tty","domain","constants","process","v8","timers","console"];var r=e.arrayToSet(t.nodeCoreModuleList);t.loadSafeList=function(t,n){var r=e.readConfigFile(n,function(e){return t.readFile(e)});return e.createMapFromTemplate(r.config)},t.loadTypesMap=function(t,n){var r=e.readConfigFile(n,function(e){return t.readFile(e)});if(r.config)return e.createMapFromTemplate(r.config.simpleMap)},t.discoverTypings=function(t,i,a,o,s,c,u,l,_){if(!u||!u.enable)return{cachedTypingPaths:[],newTypingNames:[],filesToWatch:[]};var d=e.createMap();a=e.mapDefined(a,function(t){var n=e.normalizePath(t);if(e.hasJavaScriptFileExtension(n))return n});var p=[];u.include&&S(u.include,"Explicitly included types");var f=u.exclude||[],m=e.arrayToSet(a,e.getDirectoryPath);m.set(o,!0),m.forEach(function(t,n){D(e.combinePaths(n,"package.json"),p),D(e.combinePaths(n,"bower.json"),p),C(e.combinePaths(n,"bower_components"),p),C(e.combinePaths(n,"node_modules"),p)}),function(t){var n=e.mapDefined(t,function(t){if(e.hasJavaScriptFileExtension(t)){var n=e.removeFileExtension(e.getBaseFileName(t.toLowerCase())),r=e.removeMinAndVersionNumbers(n);return s.get(r)}});n.length&&S(n,"Inferred typings from file names"),e.some(t,function(t){return e.fileExtensionIs(t,".jsx")})&&(i&&i("Inferred 'react' typings due to presence of '.jsx' extension"),k("react"))}(a),l&&S(e.deduplicate(l.map(function(e){return r.has(e)?"node":e}),e.equateStringsCaseSensitive,e.compareStringsCaseSensitive),"Inferred typings from unresolved imports"),c.forEach(function(e,t){d.has(t)&&void 0===d.get(t)&&n(e,_.get(t))&&d.set(t,e.typingLocation)});for(var g=0,y=f;g214?3:46===e.charCodeAt(0)?4:95===e.charCodeAt(0)?5:/^@[^/]+\/[^/]+$/.test(e)?1:encodeURIComponent(e)!==e?6:0:2},t.renderPackageNameValidationFailure=function(t,n){switch(t){case 2:return"Package name '"+n+"' cannot be empty";case 3:return"Package name '"+n+"' should be less than 214 characters";case 4:return"Package name '"+n+"' cannot start with '.'";case 5:return"Package name '"+n+"' cannot start with '_'";case 1:return"Package '"+n+"' is scoped and currently is not supported";case 6:return"Package name '"+n+"' contains non URI safe characters";case 0:return e.Debug.fail();default:e.Debug.assertNever(t)}}}(e.JsTyping||(e.JsTyping={}))}(l||(l={})),function(e){!function(t){function n(e,t){switch(e.kind){case 243:case 246:case 241:var n=t.getSymbolAtLocation(e.name),r=t.getAliasedSymbol(n);return n.escapedName!==r.escapedName;default:return!0}}function r(t){e.Debug.assert(t.length>0);for(var n=0,r=t;n0);for(var n=e.PatternMatchKind.camelCase,r=0,i=t;r0)return r}switch(t.kind){case 272:var i=t;return e.isExternalModule(i)?'"'+e.escapeString(e.getBaseFileName(e.removeFileExtension(e.normalizePath(i.fileName))))+'"':"";case 191:case 232:case 190:case 233:case 203:return 512&e.getModifierFlags(t)?"default":I(t);case 154:return"constructor";case 158:return"new()";case 157:return"()";case 159:return"[]";case 291:return C(t);default:return""}}function C(e){if(e.name)return e.name.text;var t=e.parent&&e.parent.parent;if(t&&212===t.kind&&t.declarationList.declarations.length>0){var n=t.declarationList.declarations[0].name;if(71===n.kind)return n.text}return""}function T(t){return{text:D(t.node),kind:e.getNodeKind(t.node),kindModifiers:F(t.node),spans:N(t),childItems:e.map(t.children,T)}}function E(t){return{text:D(t.node),kind:e.getNodeKind(t.node),kindModifiers:F(t.node),spans:N(t),childItems:e.map(t.children,function(t){return{text:D(t.node),kind:e.getNodeKind(t.node),kindModifiers:e.getNodeModifiers(t.node),spans:N(t),childItems:s,indent:0,bolded:!1,grayed:!1}})||s,indent:t.indent,bolded:!1,grayed:!1}}function N(e){var t=[w(e.node)];if(e.additionalNodes)for(var n=0,r=e.additionalNodes;n0?e.declarationNameToString(t.name):230===t.parent.kind?e.declarationNameToString(t.parent.name):198===t.parent.kind&&58===t.parent.operatorToken.kind?u(t.parent.left).replace(a,""):268===t.parent.kind&&t.parent.name?u(t.parent.name):512&e.getModifierFlags(t)?"default":e.isClassLike(t)?"":""}t.getNavigationBarItems=function(t,i){n=i,r=t;try{return e.map((a=d(t),o=[],function t(n){if(function(t){switch(l(t)){case 233:case 203:case 236:case 234:case 237:case 272:case 235:case 291:return!0;case 154:case 153:case 155:case 156:case 230:return n(t);case 191:case 232:case 190:return function(e){if(!e.node.body)return!1;switch(l(e.parent)){case 238:case 272:case 153:case 154:return!0;default:return n(e)}}(t);default:return!1}function n(t){return e.forEach(t.children,function(e){var t=l(e);return 230!==t&&180!==t})}}(n)&&(o.push(n),n.children))for(var r=0,i=n.children;r0?i[0]:s[0],v=0===y.length?void 0:0===s.length?e.createNamedImports(y):e.updateNamedImports(s[0].importClause.namedBindings,y);return c.push(a(h,u,v)),c;function b(t,n){return e.compareStringsCaseSensitive(t.text,n.text)}}function a(t,n,r){return e.updateImportDeclaration(t,t.decorators,t.modifiers,e.updateImportClause(t.importClause,n,r),t.moduleSpecifier)}function o(t,n){var i=r(t),a=r(n);return e.compareBooleans(void 0===i,void 0===a)||e.compareBooleans(e.isExternalModuleNameRelative(i),e.isExternalModuleNameRelative(a))||e.compareStringsCaseSensitive(i,a)}t.organizeImports=function(t,s,c,u){var l=e.textChanges.ChangeTracker.fromContext({host:c,formatContext:s});p(t.statements.filter(e.isImportDeclaration));for(var _=0,d=t.statements.filter(e.isAmbientModule);_1&&a.push(n(s,c))}}(c,t,i,a);var u=function(t,n){switch(t.kind){case 211:if(e.isFunctionBlock(t))return o(t.parent,191!==t.parent.kind);switch(t.parent.kind){case 216:case 219:case 220:case 218:case 215:case 217:case 224:case 267:return o(t.parent);case 228:var i=t.parent;if(i.tryBlock===t)return o(t.parent);if(i.finallyBlock===t)return o(e.findChildOfKind(i,87,n));default:return r(e.createTextSpanFromNode(t,n))}case 238:return o(t.parent);case 233:case 234:case 236:case 239:return o(t);case 182:return a(t);case 181:return a(t,21)}function a(t,n){return void 0===n&&(n=17),o(t,!1,!e.isArrayLiteralExpression(t.parent),n)}function o(i,a,o,s){void 0===a&&(a=!1),void 0===o&&(o=!0),void 0===s&&(s=17);var c=e.findChildOfKind(t,s,n),u=e.findChildOfKind(t,17===s?18:22,n);if(c&&u)return r(e.createTextSpanFromBounds(o?c.getFullStart():c.getStart(n),u.getEnd()),e.createTextSpanFromNode(i,n),a)}}(c,t);u&&a.push(u),o--,c.forEachChild(s),o++}})}(t,i,a),function(t,n){for(var i=[],a=t.getLineStarts(),o=0;o=65&&t<=90)return!0;if(t<127||!e.isUnicodeIdentifierStart(t,6))return!1;var n=String.fromCharCode(t);return n===n.toUpperCase()}function a(t){if(t>=97&&t<=122)return!0;if(t<127||!e.isUnicodeIdentifierStart(t,6))return!1;var n=String.fromCharCode(t);return n===n.toLowerCase()}function o(e,t,n){for(var r=0;r=65&&e<=90?e-65+97:e<127?e:String.fromCharCode(e).toLowerCase().charCodeAt(0)}function c(e){return e>=48&&e<=57}function u(e){return i(e)||a(e)||c(e)||95===e||36===e}function l(e){var t=e.toLowerCase();return{text:e,textLowerCase:t,isLowerCase:e===t,characterSpans:_(e)}}function _(e){return p(e,!1)}function d(e){return p(e,!0)}function p(t,n){for(var r=[],i=0,a=1;a0&&(t.push(l(e.substr(n,r))),r=0);return r>0&&t.push(l(e.substr(n,r))),t}(t)};var t}),p=0===_.length||e.forEach(_,r);return{getMatches:function(t,n){if(!f(n)){var r=y(n,e.lastOrUndefined(_));if(r&&!(_.length-1>(t=t||[]).length)){for(var i=r,a=_.length-2,o=t.length-1;a>=0;a-=1,o-=1){var s=y(t[o],_[a]);if(!s)return;e.addRange(i,s)}return i}}},getMatchesForLastSegmentOfPattern:function(t){if(!f(t))return y(t,e.lastOrUndefined(_))},patternContainsDots:_.length>1};function f(e){return p||!e}function m(e){var t=c.get(e);return t||c.set(e,t=d(e)),t}function g(r,a,s){var c=function(e,t){for(var n=e.length-t.length,r=0;r<=n;r++)if(o(e,t,r))return r;return-1}(r,a.textLowerCase);if(0===c)return a.text.length===r.length?n(t.exact,s,r===a.text):n(t.prefix,s,e.startsWith(r,a.text));var u=a.isLowerCase;if(u){if(c>0)for(var l=0,_=m(r);l<_.length;l++){var d=_[l];if(h(r,d,a.text,!0))return n(t.substring,s,h(r,d,a.text,!1))}}else if(r.indexOf(a.text)>0)return n(t.substring,s,!0);if(!u&&a.characterSpans.length>0){var p=m(r),f=v(r,p,a,!1);if(void 0!==f)return n(t.camelCase,s,!0,f);if(void 0!==(f=v(r,p,a,!0)))return n(t.camelCase,s,!1,f)}return u&&a.text.length0&&i(r.charCodeAt(c))?n(t.substring,s,!1):void 0}function y(e,t){if(!function(e){for(var t=0;tt.length)return!1;if(r)for(var c=0;c |