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WlQ,OAAOC,KAAKwjC,GAAKrrC,IAAI0N,KACnCA,MACA+H,SACA7W,MAAOysC,EAAI39B,MAElB;;;;;;;SAoBD,IAAIksH,GACJ,SAASC,KACL,OAAKD,KACDA,GAAmB,GAEnBE,GAAgBr6H,GAAgBY,KAAM,CAClC,gBACA,cACA,gBAEJy5H,GAAgBr6H,GAAgBa,MAAO,CAAC,YAExCw5H,GAAgBr6H,GAAgBe,IAAK,CACjC,eAAgB,YAAa,YAAa,YAAa,SACvD,SAAU,kBAAmB,kBAAmB,WAAY,cAC5D,UAAW,aAAc,YAAa,WAAY,SAClD,aAAc,gBAAiB,YAAa,eAAgB,cAEhEs5H,GAAgBr6H,GAAgBgB,aAAc,CAC1C,cACA,kBACA,YACA,YACA,YACA,eACA,gBACA,aACA,YACA,YACA,kBACA,cACA,gBAGDm5H,EACV,CACD,SAASE,GAAgB19F,EAAK29F,GAC1B,UAAWC,KAAQD,EACfH,GAAiBI,EAAK3gI,eAAiB+iC,CAC9C;;;;;;;;;;;;;;;AAmBD,MA2DM69F,GAAS,CACX,iYAGA,s1BACA,qgCACA,gOACA,2uBACA,uBACA,2CACA,uBACA,wCACA,uBACA,kCACA,yCACA,mLACA,8JACA,eACA,yBACA,iCACA,iQACA,yHACA,sCACA,+BACA,4BACA,0BACA,8BACA,yCACA,6BACA,0BACA,uDACA,wCACA,qCACA,uGACA,iGACA,sOACA,mDACA,sBACA,wCACA,6BACA,2JACA,oJACA,wbACA,+BACA,8BACA,6BACA,wIACA,yBACA,4HACA,8BACA,mDACA,2DACA,sCACA,kDACA,uIACA,yCACA,6EACA,wDACA,wBACA,gDACA,yBACA,2BACA,qCACA,mCACA,gGACA,qHACA,wBACA,0BACA,mDACA,sBACA,2CACA,8BACA,mHACA,+DACA,oHACA,iDACA,wDACA,0BACA,kOACA,2BACA,sDACA,iCACA,yBACA,oCACA,wBACA,+BACA,qCACA,wCACA,6BACA,+BACA,2BACA,mBACA,sBACA,8BACA,sBACA,4BACA,kCACA,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aqO,aA5hEnD,SAASC,GAAevU,EAAWwU,GAC/B,MAAMtuK,EAAS85J,EAAU77J,YAAYa,KACrC,QAAS4E,EAAI,EAAGA,EAAI4qK,EAAQ3vK,OAAQ+E,IAAK,CACrC,MAAM5E,EAAOwvK,EAAQ5qK,GACfiwB,EAAWmmI,EAAUh7J,GAC3B,GAAI60B,EAAU,CAEV,IAAKupI,GADiBxB,GAA+B5B,EAAWh7J,IAE5D,SAEJg7J,EAAUh7J,IAAU60B,IAChB,MAAMgsI,EAAU,WACZ,OAAOhsI,EAASolI,MAAMt6J,KAAM08J,GAAcvuG,UAAW5sD,EAAS,IAAMlB,GACvE,EACDk9J,UAAsB2D,EAAShsI,GACxBgsI,CACV,EANS7gK,CAMP60B,EACN,CACJ,CACJ,CA0gEO06I,CAAexmK,EAAOk4J,UAAaqO,YAAa,CAAC,qBAAsB,iBAAzD,GAGtBzb,KAAKsN,aAAa,wBAAyB,CAACp4J,EAAQ8qJ,KAEhD,SAAS4b,EAA4B5E,GACjC,OAAO,SAAUh/J,GACM4+J,GAAe1hK,EAAQ8hK,GAC/B/qK,QAAQ81J,IAGf,MAAM8Z,EAAwB3mK,EAAO2mK,sBACrC,GAAIA,EAAuB,CACvB,MAAMC,EAAM,IAAID,EAAsB7E,EAAS,CAAEnI,QAAS72J,EAAE62J,QAASgC,OAAQ74J,EAAE01J,YAC/E3L,EAAUL,OAAOoa,EACpB,GAER,CACJ,CACG5mK,EAAO2mK,wBACP7b,EAAKoK,GAAW,qCACZwR,EAA4B,sBAChC5b,EAAKoK,GAAW,4BACZwR,EAA4B,oBAAD,EApBvC","names":["TagContentType","splitNsName","elementName","colonIndex","indexOf","Error","slice","isNgContainer","tagName","isNgContent","getNsPrefix","fullName","mergeNsAndName","prefix","localName","RAW_TEXT","ESCAPABLE_RAW_TEXT","PARSABLE_DATA","HtmlTagDefinition","constructor","closedByChildren","implicitNamespacePrefix","contentType","closedByParent","isVoid","ignoreFirstLf","preventNamespaceInheritance","this","canSelfClose","length","forEach","isClosedByChild","name","toLowerCase","getContentType","undefined","default","_DEFAULT_TAG_DEFINITION","TAG_DEFINITIONS","getHtmlTagDefinition","base","meta","area","embed","link","img","input","param","hr","br","source","track","wbr","p","thead","tbody","tfoot","tr","td","th","col","svg","foreignObject","math","li","dt","dd","rb","rt","rtc","rp","optgroup","option","pre","listing","style","script","title","textarea","_SELECTOR_REGEXP","RegExp","CssSelector","element","classNames","attrs","notSelectors","static","selector","results","_addResult","res","cssSel","push","match","cssSelector","current","inNot","lastIndex","exec","tag","addAttribute","addClassName","setElement","attribute","unescapeAttribute","attr","result","escaping","i","char","charAt","escapeAttribute","replace","isElementSelector","hasElementSelector","getMatchingElementTemplate","classAttr","join","getAttrs","concat","value","toString","klass","notSelector","ViewEncapsulation","ChangeDetectionStrategy","Emulated","None","ShadowDom","OnPush","Default","CUSTOM_ELEMENTS_SCHEMA","NO_ERRORS_SCHEMA","SecurityContext","MissingTranslationStrategy","parserSelectorToR3Selector","positive","parserSelectorToSimpleSelector","classes","negative","map","parserSelectorToNegativeSelector","parseSelectorToR3Selector","parse","NONE","HTML","STYLE","SCRIPT","URL","RESOURCE_URL","Warning","Ignore","DASH_CASE_REGEXP","_splitAt","character","defaultValues","characterIndex","trim","error","msg","utf8Encode","str","encoded","index","codePoint","charCodeAt","low","stringify","token","Array","isArray","overriddenName","newLineIndex","substring","_global","global","window","self","WorkerGlobalScope","BigInteger","digits","clone","add","other","addToSelf","maxNrOfDigits","Math","max","carry","digitSum","BigIntForMultiplication","powerOfTwos","getValue","multiplyBy","num","product","zero","multiplyByAndAddTo","exponent","getMultipliedByPowerOfTwo","previousPower","computeDigest","message","sha1","utf8","words32","bytesToWords32","bytes","endian","size","wordAt","Endian","Big","len","w","newArray","list","a","b","c","d","e","h0","h1","h2","h3","h4","j","rol32","fkVal","fk","f","k","temp","reduce","add32","bytesToHexString","hex","byteAt","words32ToByteString","word","word32ToByteString","serializeNodes","nodes","visit","serializerVisitor$1","meaning","decimalDigest","id","computeDecimalDigest","visitor","_SerializerIgnoreIcuExpVisitor","computeMsgId","_SerializerVisitor","visitText","text","context","visitContainer","container","children","child","visitIcu","icu","strCases","Object","keys","cases","expression","type","visitTagPlaceholder","ph","startName","closeName","visitPlaceholder","visitIcuPlaceholder","fingerprint","hi","hash32","lo","msgFingerprint","meaningFingerprint","add64","ah","al","bh","bl","add32to64","l","rol64","count","wordsToDecimalString","decimal","base256","toThePowerOf","Little","mix","sub32","high","BigIntExponentiation","exponents","one","TypeModifier","BuiltinTypeName","Const","Type","modifiers","hasModifier","modifier","Dynamic","Bool","String","Int","Number","Function","Inferred","BuiltinType","super","visitType","visitBuiltinType","ExpressionType","typeParams","visitExpressionType","DYNAMIC_TYPE","INFERRED_TYPE","BOOL_TYPE","NUMBER_TYPE","STRING_TYPE","NONE_TYPE","UnaryOperator","BinaryOperator","nullSafeIsEquivalent","isEquivalent","areAllEquivalentPredicate","equivalentPredicate","areAllEquivalent","baseElement","otherElement","Minus","Plus","Equals","NotEquals","Identical","NotIdentical","Divide","Multiply","Modulo","And","Or","BitwiseAnd","Lower","LowerEquals","Bigger","BiggerEquals","NullishCoalesce","Expression","sourceSpan","prop","ReadPropExpr","key","ReadKeyExpr","callFn","params","pure","InvokeFunctionExpr","instantiate","InstantiateExpr","conditional","trueCase","falseCase","ConditionalExpr","equals","rhs","BinaryOperatorExpr","notEquals","identical","notIdentical","minus","plus","divide","multiply","modulo","and","bitwiseAnd","parens","or","lower","lowerEquals","bigger","biggerEquals","isBlank","TYPED_NULL_EXPR","nullishCoalesce","toStmt","ExpressionStatement","ReadVarExpr","isConstant","visitExpression","visitReadVarExpr","set","WriteVarExpr","TypeofExpr","expr","visitTypeofExpr","WrappedNodeExpr","node","visitWrappedNodeExpr","visitWriteVarExpr","toDeclStmt","DeclareVarStmt","toConstDecl","StmtModifier","Final","WriteKeyExpr","receiver","visitWriteKeyExpr","WritePropExpr","visitWritePropExpr","fn","args","visitInvokeFunctionExpr","TaggedTemplateExpr","template","elements","expressions","visitTaggedTemplateExpr","classExpr","visitInstantiateExpr","LiteralExpr","visitLiteralExpr","TemplateLiteral","TemplateLiteralElement","rawText","escapeForTemplateLiteral","escapeSlashes","LiteralPiece","PlaceholderPiece","associatedMessage","LocalizedString","metaBlock","messageParts","placeHolderNames","visitLocalizedString","serializeI18nHead","description","customId","legacyIds","legacyId","createCookedRawString","getMessagePartSourceSpan","getPlaceholderSourceSpan","serializeI18nTemplatePart","partIndex","placeholder","messagePart","messageString","escapeStartingColon","escapeColons","range","cooked","raw","ExternalExpr","moduleName","runtime","visitExternalExpr","condition","visitConditionalExpr","NotExpr","visitNotExpr","FnParam","FunctionExpr","statements","visitFunctionExpr","DeclareFunctionStmt","UnaryOperatorExpr","operator","visitUnaryOperatorExpr","lhs","visitBinaryOperatorExpr","visitReadPropExpr","visitReadKeyExpr","LiteralArrayExpr","entries","every","visitLiteralArrayExpr","LiteralMapEntry","quoted","LiteralMapExpr","valueType","visitLiteralMapExpr","NULL_EXPR","Private","Exported","Static","LeadingComment","multiline","trailingNewline","JSDocComment","tags","serializeTags","tagToString","out","Statement","leadingComments","addLeadingComment","leadingComment","stmt","visitStatement","visitDeclareVarStmt","visitDeclareFunctionStmt","visitExpressionStmt","ReturnStatement","visitReturnStmt","IfStmt","visitIfStmt","jsDocComment","variable","importExpr","expressionType","typeModifiers","typeofExpr","literalArr","values","literalMap","not","body","ifStmt","thenClause","elseClause","taggedTemplate","literal","localizedString","placeholderNames","isNull","exp","UNKNOWN_VALUE_KEY","KEY_CONTEXT","FixupExpression","resolved","original","fixup","shared","ConstantPool","isClosureCompilerEnabled","literals","Map","literalFactories","nextNameIndex","getConstLiteral","forceShared","isLongStringLiteral","keyOf","get","newValue","freshName","definition","usage","getLiteralFactory","argumentsForKey","_getLiteralFactory","expressionForKey","resultMap","literalFactory","literalFactoryArguments","filter","resultExpressions","pureFunctionDeclaration","isVariable","uniqueName","KeyVisitor","invalid$1","visitAssertNotNullExpr","visitCastExpr","visitCommaExpr","ast","entry","quote","mapKey","arg","CORE","Identifiers","NEW_METHOD","TRANSFORM_METHOD","PATCH_DEPS","core","namespaceHTML","namespaceMathML","namespaceSVG","elementStart","elementEnd","advance","syntheticHostProperty","syntheticHostListener","attributeInterpolate1","attributeInterpolate2","attributeInterpolate3","attributeInterpolate4","attributeInterpolate5","attributeInterpolate6","attributeInterpolate7","attributeInterpolate8","attributeInterpolateV","classProp","elementContainerStart","elementContainerEnd","elementContainer","styleMap","styleMapInterpolate1","styleMapInterpolate2","styleMapInterpolate3","styleMapInterpolate4","styleMapInterpolate5","styleMapInterpolate6","styleMapInterpolate7","styleMapInterpolate8","styleMapInterpolateV","classMap","classMapInterpolate1","classMapInterpolate2","classMapInterpolate3","classMapInterpolate4","classMapInterpolate5","classMapInterpolate6","classMapInterpolate7","classMapInterpolate8","classMapInterpolateV","styleProp","stylePropInterpolate1","stylePropInterpolate2","stylePropInterpolate3","stylePropInterpolate4","stylePropInterpolate5","stylePropInterpolate6","stylePropInterpolate7","stylePropInterpolate8","stylePropInterpolateV","nextContext","resetView","templateCreate","enableBindings","disableBindings","getCurrentView","textInterpolate","textInterpolate1","textInterpolate2","textInterpolate3","textInterpolate4","textInterpolate5","textInterpolate6","textInterpolate7","textInterpolate8","textInterpolateV","restoreView","pureFunction0","pureFunction1","pureFunction2","pureFunction3","pureFunction4","pureFunction5","pureFunction6","pureFunction7","pureFunction8","pureFunctionV","pipeBind1","pipeBind2","pipeBind3","pipeBind4","pipeBindV","hostProperty","property","propertyInterpolate","propertyInterpolate1","propertyInterpolate2","propertyInterpolate3","propertyInterpolate4","propertyInterpolate5","propertyInterpolate6","propertyInterpolate7","propertyInterpolate8","propertyInterpolateV","i18n","i18nAttributes","i18nExp","i18nStart","i18nEnd","i18nApply","i18nPostprocess","pipe","projection","projectionDef","reference","inject","injectAttribute","directiveInject","invalidFactory","invalidFactoryDep","templateRefExtractor","forwardRef","resolveForwardRef","ɵɵdefineInjectable","declareInjectable","InjectableDeclaration","resolveWindow","resolveDocument","resolveBody","defineComponent","declareComponent","setComponentScope","ComponentDeclaration","FactoryDeclaration","declareFactory","FactoryTarget","defineDirective","declareDirective","DirectiveDeclaration","InjectorDef","InjectorDeclaration","defineInjector","declareInjector","NgModuleDeclaration","ModuleWithProviders","defineNgModule","declareNgModule","setNgModuleScope","registerNgModuleType","PipeDeclaration","definePipe","declarePipe","declareClassMetadata","setClassMetadata","queryRefresh","viewQuery","loadQuery","contentQuery","NgOnChangesFeature","InheritDefinitionFeature","CopyDefinitionFeature","StandaloneFeature","ProvidersFeature","listener","getInheritedFactory","sanitizeHtml","sanitizeStyle","sanitizeResourceUrl","sanitizeScript","sanitizeUrl","sanitizeUrlOrResourceUrl","trustConstantHtml","trustConstantResourceUrl","SourceMapGenerator","file","sourcesContent","lines","lastCol0","hasMappings","addSource","url","content","has","addLine","addMapping","col0","sourceUrl","sourceLine0","sourceCol0","currentLine","toJSON","sourcesIndex","sources","from","mappings","lastSourceIndex","lastSourceLine0","lastSourceCol0","segments","segment","segAsStr","toBase64VLQ","version","sourceRoot","toJsComment","toBase64String","b64","i1","i2","i3","toBase64Digit","JSON","digit","_SINGLE_QUOTE_ESCAPE_STRING_RE","_LEGAL_IDENTIFIER_RE","_EmittedLine","indent","partsLength","parts","srcSpans","EmitterVisitorContext","_indent","_lines","_currentLine","println","lastPart","print","lineIsEmpty","lineLength","part","newLine","removeEmptyLastLine","pop","incIndent","decIndent","toSource","sourceLines","_createIndent","toSourceMapGenerator","genFilePath","startsAtLine","firstOffsetMapped","mapFirstOffsetIfNeeded","line","lineIdx","spans","spanIdx","span","start","sourceLine","sourceCol","spanOf","column","emittedLine","columnsLeft","escapeIdentifier","escapeDollar","alwaysQuote","test","typeWithParameters","numParams","prepareSyntheticPropertyName","getSafePropertyAccessString","accessor","escapedName","prepareSyntheticListenerFunctionName","phase","guardedExpression","guard","guardExpr","guardNotDefined","guardUndefinedOrTrue","wrapReference","wrapped","refsToArray","refs","shouldForwardDeclare","ref","createMayBeForwardRefExpression","convertFromMaybeForwardRefExpression","generateForwardRef","R3FactoryDelegateType","FactoryTarget$1","compileFactoryFunction","t","baseFactoryVar","typeForCtor","isDelegatedFactoryMetadata","internalType","ctorExpr","deps","injectDependencies","target","retExpr","makeConditionalFactory","nonCtorExpr","r","ctorStmt","delegateArgs","delegateDeps","delegateType","Class","delegate","isExpressionFactoryMetadata","getInheritedFactoryCall","baseFactory","factoryFn","createFactoryType","ctorDepsType","createCtorDepsType","hasTypes","attributeTypes","dep","createCtorDepType","attributeNameType","optional","host","skipSelf","typeArgumentCount","compileInjectDependency","flags","Pipe","flagsParam","injectArgs","injectFn","getInjectFn","Component","Directive","NgModule","Injectable","Comment$1","_visitor","Text$3","BoundText","visitBoundText","TextAttribute","keySpan","valueSpan","visitTextAttribute","BoundAttribute","securityContext","unit","visitBoundAttribute","BoundEvent","handler","handlerSpan","event","targetOrPhase","visitBoundEvent","Element$1","attributes","inputs","outputs","references","startSourceSpan","endSourceSpan","visitElement","Template","templateAttrs","variables","visitTemplate","Content","visitContent","Variable","visitVariable","Reference","visitReference","Icu$1","vars","placeholders","visitAll$1","newNode","Message","placeholderToMessage","serializeMessage","messageNodes","LocalizeMessageStringVisitor","n","filePath","startLine","startCol","endLine","end","endCol","Text$2","Container","Icu","TagPlaceholder","Placeholder","IcuPlaceholder","expressionPlaceholder","_Visitor$2","visitTag","strAttrs","_serializeAttributes","strChildren","visitDeclaration","decl","visitDoctype","doctype","rootTag","dtd","toPublicName","internalName","toUpperCase","I18N_ATTR_PREFIX","isI18nAttribute","startsWith","isI18nRootNode","isSingleI18nIcu","hasI18nMeta","icuFromI18nMessage","wrapI18nPlaceholder","contextId","getSeqNumberGenerator","startsAt","placeholdersToParams","updatePlaceholderMap","assembleBoundTextPlaceholders","bindingStartIndex","startIdx","find","idx","formatI18nPlaceholderNamesInMap","useCamelCase","_params","formatI18nPlaceholderName","publicName","chunks","split","postfix","shift","getTranslationConstPrefix","extra","declareI18nVariable","UNSAFE_OBJECT_KEY_NAME_REGEXP","TEMPORARY_NAME","CONTEXT_NAME","RENDER_FLAGS","RESTORED_VIEW_CONTEXT_NAME","CHAINABLE_INSTRUCTIONS","Set","invokeInstruction","temporaryAllocator","invalid","asLiteral","conditionallyCreateMapObjectLiteral","keepDeclared","getOwnPropertyNames","mapToExpression","declaredName","minifiedName","needsDeclaredName","trimTrailingNulls","parameters","getQueryPredicate","query","constantPool","predicate","selectors","DefinitionMap","toLiteralMap","getInterpolationArgsLength","interpolation","strings","getInstructionStatements","instructions","pendingExpression","pendingExpressionType","chainLength","resolvedParams","paramsOrFn","compileInjectable","resolveForwardRefs","factoryMeta","useClass","useClassOnSelf","delegateToFactory","useFactory","useValue","useExisting","injectableProps","providedIn","createInjectableType","unwrapForwardRefs","createFactoryFunction","UNUSABLE_INTERPOLATION_REGEXPS","InterpolationConfig","markers","assertInterpolationSymbols","identifier","regexp","DEFAULT_INTERPOLATION_CONFIG","$LBRACE","$RBRACE","isWhitespace","code","isDigit","isAsciiLetter","isNewLine","isOctalDigit","isQuote","ParseLocation","offset","moveBy","delta","priorLine","lastIndexOf","fromCharCode","ch","getContext","maxChars","maxLines","startOffset","endOffset","ctxChars","ctxLines","before","after","ParseSourceFile","ParseSourceSpan","fullStart","details","ParseErrorLevel","WARNING","ERROR","ParseError","level","contextualMessage","ctx","_anonymousTypeIndex","sanitizeIdentifier","makeTemplateObjectPolyfill","policy","trustedScriptFromString","getPolicy","trustedTypes","createPolicy","createScript","s","newTrustedFunctionForJIT","eval","bind","JitEvaluator","evaluateStatements","refResolver","createSourceMaps","converter","JitEmitterVisitor","createRoot","isUseStrictStatement","statement","visitAllStatements","createReturnStmt","evaluateCode","getArgs","createSourceMap","fnBody","fnArgNames","fnArgValues","argName","emptyFn","headerLines","executeFunction","AbstractJsEmitterVisitor","AbstractEmitterVisitor","_escapeDollarInStrings","printLeadingComments","comment","hasElseCase","lineWasEmpty","visitAllExpressions","head","opStr","visitAllObjects","separator","incrementedIndent","_visitParams","_evalArgNames","_evalArgValues","_evalExportedVars","resultVar","_emitReferenceToExternal","resolveExternalReference","identifierName","compileIdentifier","__anonymousType","__forward_ref__","compileInjector","definitionMap","providers","imports","createInjectorType","R3JitReflector","hasOwnProperty","R3SelectorScopeMode","R3TemplateDependencyKind","ParsedPropertyType","_Mode","compileNgModule","adjacentType","bootstrap","declarations","exports","schemas","containsForwardDecls","selectorScopeMode","Inline","SideEffect","setNgModuleScopeCall","generateSetNgModuleScopeCall","moduleType","scopeMap","guardedCall","jitOnlyGuardedExpression","iife","createNgModuleType","includeImportTypes","publicDeclarationTypes","tupleTypeOf","tupleOfTypes","types","typeofTypes","compilePipeFromMetadata","metadata","definitionMapValues","pipeName","isStandalone","createPipeType","Omit","ParserError","errLocation","ctxLocation","ParseSpan","toAbsolute","absoluteOffset","AbsoluteSourceSpan","AST","ASTWithName","nameSpan","EmptyExpr","ImplicitReceiver","visitImplicitReceiver","ThisReceiver","visitThisReceiver","Chain","visitChain","Conditional","trueExp","falseExp","visitConditional","PropertyRead","visitPropertyRead","PropertyWrite","visitPropertyWrite","SafePropertyRead","visitSafePropertyRead","KeyedRead","visitKeyedRead","SafeKeyedRead","visitSafeKeyedRead","KeyedWrite","visitKeyedWrite","BindingPipe","visitPipe","LiteralPrimitive","visitLiteralPrimitive","LiteralArray","visitLiteralArray","LiteralMap","visitLiteralMap","Interpolation","visitInterpolation","Binary","operation","left","right","visitBinary","Unary","binaryOp","binaryLeft","binaryRight","visitUnary","PrefixNot","visitPrefixNot","NonNullAssert","visitNonNullAssert","Call","argumentSpan","visitCall","SafeCall","visitSafeCall","ASTWithSource","location","errors","visitASTWithSource","VariableBinding","ExpressionBinding","ParsedProperty","isLiteral","LITERAL_ATTR","isAnimation","ANIMATION","DEFAULT","ParsedEvent","ParsedVariable","BoundElementProperty","EventHandlerVars","convertActionBinding","localResolver","implicitReceiver","action","bindingId","baseSourceSpan","implicitReceiverAccesses","globals","DefaultLocalResolver","actionWithoutBuiltins","convertPropertyBindingBuiltins","converterFactory","convertBuiltins","_BuiltinAstConverter","createLiteralArrayConverter","argCount","createLiteralMapConverter","createPipeConverter","_AstToIrVisitor","actionStmts","flattenStatements","prependTemporaryDecls","temporaryCount","unshift","temporaryDeclaration","usesImplicitReceiver","notifyImplicitReceiverUse","lastStatement","ConvertPropertyBindingResult","stmts","currValExpr","convertPropertyBinding","expressionWithoutBuiltins","outputExpr","getStatementsFromVisitor","temporaryName","temporaryNumber","ensureExpressionMode","mode","convertToStatementIfNeeded","AstTransformer","visitAll","createPlus","createMinus","asts","_converterFactory","BuiltinFunctionCall","_localResolver","_implicitReceiver","supportsInterpolation","_nodeMap","_resultMap","_currentTemporary","op","_visit","convertSourceSpan","convertNullishCoalesce","ensureStatementMode","InterpolationExpression","leftMostSafe","leftMostSafeNode","convertSafeAccess","obj","maybeRestoreView","_getLocal","getLocal","prevUsesImplicitReceiver","addImplicitReceiverAccess","varExpr","localExpr","convertedArgs","temporary","needsTemporaryInSafeAccess","allocateTemporary","access","delete","releaseTemporary","some","visitSome","tempNumber","output","unsupported","ShadowCss","strictStyling","shimCssText","cssText","hostSelector","commentsWithHash","extractCommentsWithHash","_commentWithHashRe","stripComments","_commentRe","_insertDirectives","_scopeCssText","_insertPolyfillDirectivesInCssText","_insertPolyfillRulesInCssText","_cssContentNextSelectorRe","m","_cssContentRuleRe","rule","scopeSelector","unscopedRules","_extractUnscopedRulesFromCssText","_insertPolyfillHostInCssText","_convertColonHost","_convertColonHostContext","_convertShadowDOMSelectors","_scopeSelectors","_cssContentUnscopedRuleRe","_cssColonHostRe","_","hostSelectors","otherSelectors","convertedSelectors","hostSelectorArray","convertedSelector","_polyfillHostNoCombinator","_polyfillHost","_cssColonHostContextReGlobal","selectorText","contextSelectorGroups","_cssColonHostContextRe","newContextSelectors","contextSelectorGroupsLength","repeatGroups","contextSelectors","combineHostContextSelectors","hostMarker","_polyfillHostRe","otherSelectorsHasHost","combined","contextSelector","previousSelectors","_shadowDOMSelectorsRe","pattern","processRules","_scopeSelector","_stripScopingSelectors","CssRule","_shadowDeepSelectors","_polyfillHostNoCombinatorRe","strict","deepParts","shallowPart","otherParts","_selectorNeedsScoping","_applyStrictSelectorScope","_applySelectorScope","_makeScopeMatcher","_selectorReSuffix","_applySimpleSelectorScope","replaceBy","hnc","colon","attrName","_scopeSelectorPart","scopedP","matches","safeContent","SafeSelector","scopedSelector","startIndex","sep","shouldScope","restore","_colonHostContextRe","_polyfillHostContext","_colonHostRe","_escapeRegexMatches","_content","pseudo","_ph","keep","_parenSuffix","BLOCK_PLACEHOLDER","_ruleRe","_quotedRe","CONTENT_PAIRS","QUOTE_PAIRS","ruleCallback","inputWithEscapedQuotes","escapeBlocks","inputWithEscapedBlocks","escapedString","nextBlockIndex","nextQuoteIndex","suffix","contentPrefix","blocks","StringWithEscapedBlocks","charPairs","resultParts","escapedBlocks","openChar","closeChar","openCharCount","nonBlockStartIndex","blockStartIndex","groups","multiples","stripUnnecessaryQuotes","qS","tempValue","hyphenate","v","StylingBuilder","_directiveExpr","_hasInitialValues","hasBindings","hasBindingsWithPipes","_classMapInput","_styleMapInput","_singleStyleInputs","_singleClassInputs","_lastStylingInput","_firstStylingInput","_stylesIndex","_classesIndex","_initialStyleValues","_initialClassValues","registerBoundInput","binding","registerInputBasedOnName","registerStyleInput","registerClassInput","isStyle","isMapBased","isEmptyExpression","isCssCustomProperty","hasOverrideFlag","bindingSuffix","parseProperty","registerIntoMap","_checkForPipes","registerStyleAttr","styles","parenDepth","valueStart","propStart","currentProp","valueHasQuotes","styleVal","registerClassAttr","populateInitialStylingAttrs","assignHostAttrs","buildClassMapInstruction","valueConverter","_buildMapBasedInstruction","buildStyleMapInstruction","isClassBased","stylingInput","totalBindingSlotsRequired","mapValue","getClassMapInterpolationExpression","getStyleMapInterpolationExpression","calls","allocateBindingSlots","convertFn","convertResult","_buildSingleInputs","getInterpolationExpressionFn","previousInstruction","referenceForCall","call","_buildClassInputs","_buildStyleInputs","getStylePropInterpolationExpression","buildUpdateLevelInstructions","styleMapInstruction","classMapInstruction","overrideIndex","unitIndex","TokenType","Character","Identifier","PrivateIdentifier","Keyword","Operator","KEYWORDS","Lexer","tokenize","scanner","_Scanner","tokens","scanToken","Token","numValue","strValue","isCharacter","isNumber","isString","isOperator","isIdentifier","isPrivateIdentifier","isKeyword","isKeywordLet","isKeywordAs","isKeywordNull","isKeywordUndefined","isKeywordTrue","isKeywordFalse","isKeywordThis","isError","toNumber","newCharacterToken","newOperatorToken","EOF","peek","isIdentifierStart","scanIdentifier","scanNumber","$LPAREN","$RPAREN","$LBRACKET","$RBRACKET","$COMMA","$COLON","scanCharacter","$SQ","scanString","scanPrivateIdentifier","$PLUS","$MINUS","$STAR","$SLASH","$PERCENT","scanOperator","scanQuestion","$LT","scanComplexOperator","$BANG","twoCode","two","threeCode","three","isIdentifierPart","newKeywordToken","newIdentifierToken","newPrivateIdentifierToken","simple","hasSeparators","isExponentStart","isExponentSign","parseIntAutoRadix","parseInt","isNaN","parseFloat","newNumberToken","buffer","marker","unescapedCode","unescape","last","newStringToken","position","newErrorToken","$LF","$FF","$CR","$TAB","$VTAB","SplitInterpolation","offsets","TemplateBindingParseResult","templateBindings","warnings","Parser$1","_lexer","parseAction","isAssignmentEvent","interpolationConfig","_checkNoInterpolation","sourceToLex","_stripComments","_ParseAST","parseChain","parseBinding","_parseBindingAst","checkSimpleExpression","checker","SimpleExpressionChecker","parseSimpleBinding","_reportError","parseTemplateBindings","templateKey","templateValue","templateUrl","absoluteKeyOffset","absoluteValueOffset","parseInterpolation","interpolatedTokens","splitInterpolation","expressionNodes","expressionText","createInterpolationAst","parseInterpolationExpression","inputToTemplateIndexMap","getIndexMapForOriginalTemplate","offsetMap","consumedInOriginalTemplate","consumedInInput","tokenIndex","currentToken","decoded","lengthOfParts","sum","atInterpolation","extendLastString","interpStart","interpEnd","exprStart","exprEnd","_getInterpolationEndIndex","fullEnd","piece","wrapLiteralPrimitive","_commentStart","outerQuote","nextChar","endIndex","charIndex","_forEachUnquotedChar","expressionEnd","currentQuote","escapeCount","ParseContextFlags","Writable","parseFlags","rparensExpected","rbracketsExpected","rbracesExpected","sourceSpanCache","next","atEOF","inputIndex","currentEndIndex","currentAbsoluteOffset","artificialEndIndex","tmp","serial","withContext","cb","ret","consumeOptionalCharacter","peekKeywordLet","peekKeywordAs","expectCharacter","consumeOptionalOperator","expectOperator","prettyPrintToken","tok","expectIdentifierOrKeyword","_reportErrorForPrivateIdentifier","expectIdentifierOrKeywordOrString","exprs","parsePipe","errorIndex","artificialStart","artificialEnd","parseExpression","nameStart","fullSpanEnd","nameId","parseConditional","parseLogicalOr","yes","no","parseLogicalAnd","parseNullishCoalescing","parseEquality","parseRelational","parseAdditive","parseMultiplicative","parsePrefix","parseCallChain","parsePrimary","parseAccessMember","parseCall","parseKeyedReadOrWrite","parseExpressionList","parseLiteralMap","literalValue","terminator","keyStart","readReceiver","isSafe","consumeOptionalAssignment","argumentStart","parseCallArguments","positionals","expectTemplateBindingKey","operatorFound","bindings","parseDirectiveKeywordBindings","letBinding","parseLetBinding","parseAsBinding","consumeStatementTerminator","getDirectiveBoundTarget","spanEnd","asBinding","spanStart","locationText","skip","extraMessage","errorMessage","RecursiveAstVisitor","arguments","NodeWithI18n","Text","Expansion","switchValue","switchValueSourceSpan","visitExpansion","ExpansionCase","valueSourceSpan","expSourceSpan","visitExpansionCase","Attribute","valueTokens","visitAttribute","Element","Comment","visitComment","astResult","NAMED_ENTITIES","AElig","AMP","amp","Aacute","Abreve","Acirc","Acy","Afr","Agrave","Alpha","Amacr","Aogon","Aopf","ApplyFunction","af","Aring","angst","Ascr","Assign","colone","coloneq","Atilde","Auml","Backslash","setminus","setmn","smallsetminus","ssetmn","Barv","Barwed","doublebarwedge","Bcy","Because","becaus","because","Bernoullis","Bscr","bernou","Beta","Bfr","Bopf","Breve","breve","Bumpeq","HumpDownHump","bump","CHcy","COPY","copy","Cacute","Cap","CapitalDifferentialD","DD","Cayleys","Cfr","Ccaron","Ccedil","Ccirc","Cconint","Cdot","Cedilla","cedil","CenterDot","centerdot","middot","Chi","CircleDot","odot","CircleMinus","ominus","CirclePlus","oplus","CircleTimes","otimes","ClockwiseContourIntegral","cwconint","CloseCurlyDoubleQuote","rdquo","rdquor","CloseCurlyQuote","rsquo","rsquor","Colon","Proportion","Colone","Congruent","equiv","Conint","DoubleContourIntegral","ContourIntegral","conint","oint","Copf","complexes","Coproduct","coprod","CounterClockwiseContourIntegral","awconint","Cross","Cscr","Cup","CupCap","asympeq","DDotrahd","DJcy","DScy","DZcy","Dagger","ddagger","Darr","Dashv","DoubleLeftTee","Dcaron","Dcy","Del","nabla","Delta","Dfr","DiacriticalAcute","acute","DiacriticalDot","dot","DiacriticalDoubleAcute","dblac","DiacriticalGrave","grave","DiacriticalTilde","tilde","Diamond","diam","diamond","DifferentialD","Dopf","Dot","DoubleDot","die","uml","DotDot","DotEqual","doteq","esdot","DoubleDownArrow","Downarrow","dArr","DoubleLeftArrow","Leftarrow","lArr","DoubleLeftRightArrow","Leftrightarrow","hArr","iff","DoubleLongLeftArrow","Longleftarrow","xlArr","DoubleLongLeftRightArrow","Longleftrightarrow","xhArr","DoubleLongRightArrow","Longrightarrow","xrArr","DoubleRightArrow","Implies","Rightarrow","rArr","DoubleRightTee","vDash","DoubleUpArrow","Uparrow","uArr","DoubleUpDownArrow","Updownarrow","vArr","DoubleVerticalBar","par","parallel","shortparallel","spar","DownArrow","ShortDownArrow","darr","downarrow","DownArrowBar","DownArrowUpArrow","duarr","DownBreve","DownLeftRightVector","DownLeftTeeVector","DownLeftVector","leftharpoondown","lhard","DownLeftVectorBar","DownRightTeeVector","DownRightVector","rhard","rightharpoondown","DownRightVectorBar","DownTee","top","DownTeeArrow","mapstodown","Dscr","Dstrok","ENG","ETH","Eacute","Ecaron","Ecirc","Ecy","Edot","Efr","Egrave","in","isin","isinv","Emacr","EmptySmallSquare","EmptyVerySmallSquare","Eogon","Eopf","Epsilon","Equal","EqualTilde","eqsim","esim","Equilibrium","rightleftharpoons","rlhar","Escr","expectation","Esim","Eta","Euml","Exists","exist","ExponentialE","ee","exponentiale","Fcy","Ffr","FilledSmallSquare","FilledVerySmallSquare","blacksquare","squarf","squf","Fopf","ForAll","forall","Fouriertrf","Fscr","GJcy","GT","gt","Gamma","Gammad","Gbreve","Gcedil","Gcirc","Gcy","Gdot","Gfr","Gg","ggg","Gopf","GreaterEqual","ge","geq","GreaterEqualLess","gel","gtreqless","GreaterFullEqual","gE","geqq","GreaterGreater","GreaterLess","gl","gtrless","GreaterSlantEqual","geqslant","ges","GreaterTilde","gsim","gtrsim","Gscr","Gt","NestedGreaterGreater","gg","HARDcy","Hacek","caron","Hat","Hcirc","Hfr","Poincareplane","HilbertSpace","Hscr","hamilt","Hopf","quaternions","HorizontalLine","boxh","Hstrok","HumpEqual","bumpe","bumpeq","IEcy","IJlig","IOcy","Iacute","Icirc","Icy","Idot","Ifr","Im","image","imagpart","Igrave","Imacr","ImaginaryI","ii","Integral","int","Intersection","bigcap","xcap","InvisibleComma","ic","InvisibleTimes","it","Iogon","Iopf","Iota","Iscr","imagline","Itilde","Iukcy","Iuml","Jcirc","Jcy","Jfr","Jopf","Jscr","Jsercy","Jukcy","KHcy","KJcy","Kappa","Kcedil","Kcy","Kfr","Kopf","Kscr","LJcy","LT","lt","Lacute","Lambda","Lang","Laplacetrf","Lscr","lagran","Larr","twoheadleftarrow","Lcaron","Lcedil","Lcy","LeftAngleBracket","lang","langle","LeftArrow","ShortLeftArrow","larr","leftarrow","slarr","LeftArrowBar","larrb","LeftArrowRightArrow","leftrightarrows","lrarr","LeftCeiling","lceil","LeftDoubleBracket","lobrk","LeftDownTeeVector","LeftDownVector","dharl","downharpoonleft","LeftDownVectorBar","LeftFloor","lfloor","LeftRightArrow","harr","leftrightarrow","LeftRightVector","LeftTee","dashv","LeftTeeArrow","mapstoleft","LeftTeeVector","LeftTriangle","vartriangleleft","vltri","LeftTriangleBar","LeftTriangleEqual","ltrie","trianglelefteq","LeftUpDownVector","LeftUpTeeVector","LeftUpVector","uharl","upharpoonleft","LeftUpVectorBar","LeftVector","leftharpoonup","lharu","LeftVectorBar","LessEqualGreater","leg","lesseqgtr","LessFullEqual","lE","leqq","LessGreater","lessgtr","lg","LessLess","LessSlantEqual","leqslant","les","LessTilde","lesssim","lsim","Lfr","Ll","Lleftarrow","lAarr","Lmidot","LongLeftArrow","longleftarrow","xlarr","LongLeftRightArrow","longleftrightarrow","xharr","LongRightArrow","longrightarrow","xrarr","Lopf","LowerLeftArrow","swarr","swarrow","LowerRightArrow","searr","searrow","Lsh","lsh","Lstrok","Lt","NestedLessLess","ll","Mcy","MediumSpace","Mellintrf","Mscr","phmmat","Mfr","MinusPlus","mnplus","mp","Mopf","Mu","NJcy","Nacute","Ncaron","Ncedil","Ncy","NegativeMediumSpace","NegativeThickSpace","NegativeThinSpace","NegativeVeryThinSpace","ZeroWidthSpace","NewLine","Nfr","NoBreak","NonBreakingSpace","nbsp","Nopf","naturals","Not","NotCongruent","nequiv","NotCupCap","NotDoubleVerticalBar","npar","nparallel","nshortparallel","nspar","NotElement","notin","notinva","NotEqual","ne","NotEqualTilde","nesim","NotExists","nexist","nexists","NotGreater","ngt","ngtr","NotGreaterEqual","nge","ngeq","NotGreaterFullEqual","ngE","ngeqq","NotGreaterGreater","nGtv","NotGreaterLess","ntgl","NotGreaterSlantEqual","ngeqslant","nges","NotGreaterTilde","ngsim","NotHumpDownHump","nbump","NotHumpEqual","nbumpe","NotLeftTriangle","nltri","ntriangleleft","NotLeftTriangleBar","NotLeftTriangleEqual","nltrie","ntrianglelefteq","NotLess","nless","nlt","NotLessEqual","nle","nleq","NotLessGreater","ntlg","NotLessLess","nLtv","NotLessSlantEqual","nleqslant","nles","NotLessTilde","nlsim","NotNestedGreaterGreater","NotNestedLessLess","NotPrecedes","npr","nprec","NotPrecedesEqual","npre","npreceq","NotPrecedesSlantEqual","nprcue","NotReverseElement","notni","notniva","NotRightTriangle","nrtri","ntriangleright","NotRightTriangleBar","NotRightTriangleEqual","nrtrie","ntrianglerighteq","NotSquareSubset","NotSquareSubsetEqual","nsqsube","NotSquareSuperset","NotSquareSupersetEqual","nsqsupe","NotSubset","nsubset","vnsub","NotSubsetEqual","nsube","nsubseteq","NotSucceeds","nsc","nsucc","NotSucceedsEqual","nsce","nsucceq","NotSucceedsSlantEqual","nsccue","NotSucceedsTilde","NotSuperset","nsupset","vnsup","NotSupersetEqual","nsupe","nsupseteq","NotTilde","nsim","NotTildeEqual","nsime","nsimeq","NotTildeFullEqual","ncong","NotTildeTilde","nap","napprox","NotVerticalBar","nmid","nshortmid","nsmid","Nscr","Ntilde","Nu","OElig","Oacute","Ocirc","Ocy","Odblac","Ofr","Ograve","Omacr","Omega","ohm","Omicron","Oopf","OpenCurlyDoubleQuote","ldquo","OpenCurlyQuote","lsquo","Oscr","Oslash","Otilde","Otimes","Ouml","OverBar","oline","OverBrace","OverBracket","tbrk","OverParenthesis","PartialD","Pcy","Pfr","Phi","Pi","PlusMinus","plusmn","pm","Popf","primes","Pr","Precedes","pr","prec","PrecedesEqual","preceq","PrecedesSlantEqual","prcue","preccurlyeq","PrecedesTilde","precsim","prsim","Prime","Product","prod","Proportional","propto","varpropto","vprop","Pscr","Psi","QUOT","quot","Qfr","Qopf","rationals","Qscr","RBarr","drbkarow","REG","circledR","reg","Racute","Rang","Rarr","twoheadrightarrow","Rarrtl","Rcaron","Rcedil","Rcy","Re","Rfr","real","realpart","ReverseElement","SuchThat","ni","niv","ReverseEquilibrium","leftrightharpoons","lrhar","ReverseUpEquilibrium","duhar","Rho","RightAngleBracket","rang","rangle","RightArrow","ShortRightArrow","rarr","rightarrow","srarr","RightArrowBar","rarrb","RightArrowLeftArrow","rightleftarrows","rlarr","RightCeiling","rceil","RightDoubleBracket","robrk","RightDownTeeVector","RightDownVector","dharr","downharpoonright","RightDownVectorBar","RightFloor","rfloor","RightTee","vdash","RightTeeArrow","mapsto","RightTeeVector","RightTriangle","vartriangleright","vrtri","RightTriangleBar","RightTriangleEqual","rtrie","trianglerighteq","RightUpDownVector","RightUpTeeVector","RightUpVector","uharr","upharpoonright","RightUpVectorBar","RightVector","rharu","rightharpoonup","RightVectorBar","Ropf","reals","RoundImplies","Rrightarrow","rAarr","Rscr","realine","Rsh","rsh","RuleDelayed","SHCHcy","SHcy","SOFTcy","Sacute","Sc","Scaron","Scedil","Scirc","Scy","Sfr","ShortUpArrow","UpArrow","uarr","uparrow","Sigma","SmallCircle","compfn","Sopf","Sqrt","radic","Square","squ","square","SquareIntersection","sqcap","SquareSubset","sqsub","sqsubset","SquareSubsetEqual","sqsube","sqsubseteq","SquareSuperset","sqsup","sqsupset","SquareSupersetEqual","sqsupe","sqsupseteq","SquareUnion","sqcup","Sscr","Star","sstarf","Sub","Subset","SubsetEqual","sube","subseteq","Succeeds","sc","succ","SucceedsEqual","sce","succeq","SucceedsSlantEqual","sccue","succcurlyeq","SucceedsTilde","scsim","succsim","Sum","Sup","Supset","Superset","sup","supset","SupersetEqual","supe","supseteq","THORN","TRADE","trade","TSHcy","TScy","Tab","Tau","Tcaron","Tcedil","Tcy","Tfr","Therefore","there4","therefore","Theta","ThickSpace","ThinSpace","thinsp","Tilde","sim","thicksim","thksim","TildeEqual","sime","simeq","TildeFullEqual","cong","TildeTilde","ap","approx","asymp","thickapprox","thkap","Topf","TripleDot","tdot","Tscr","Tstrok","Uacute","Uarr","Uarrocir","Ubrcy","Ubreve","Ucirc","Ucy","Udblac","Ufr","Ugrave","Umacr","UnderBar","lowbar","UnderBrace","UnderBracket","bbrk","UnderParenthesis","Union","bigcup","xcup","UnionPlus","uplus","Uogon","Uopf","UpArrowBar","UpArrowDownArrow","udarr","UpDownArrow","updownarrow","varr","UpEquilibrium","udhar","UpTee","bot","bottom","perp","UpTeeArrow","mapstoup","UpperLeftArrow","nwarr","nwarrow","UpperRightArrow","nearr","nearrow","Upsi","upsih","Upsilon","Uring","Uscr","Utilde","Uuml","VDash","Vbar","Vcy","Vdash","Vdashl","Vee","bigvee","xvee","Verbar","Vert","VerticalBar","mid","shortmid","smid","VerticalLine","verbar","vert","VerticalSeparator","VerticalTilde","wr","wreath","VeryThinSpace","hairsp","Vfr","Vopf","Vscr","Vvdash","Wcirc","Wedge","bigwedge","xwedge","Wfr","Wopf","Wscr","Xfr","Xi","Xopf","Xscr","YAcy","YIcy","YUcy","Yacute","Ycirc","Ycy","Yfr","Yopf","Yscr","Yuml","ZHcy","Zacute","Zcaron","Zcy","Zdot","Zeta","Zfr","zeetrf","Zopf","integers","Zscr","aacute","abreve","ac","mstpos","acE","acd","acirc","acy","aelig","afr","agrave","alefsym","aleph","alpha","amacr","amalg","wedge","andand","andd","andslope","andv","ang","angle","ange","angmsd","measuredangle","angmsdaa","angmsdab","angmsdac","angmsdad","angmsdae","angmsdaf","angmsdag","angmsdah","angrt","angrtvb","angrtvbd","angsph","angzarr","aogon","aopf","apE","apacir","ape","approxeq","apid","apos","aring","ascr","midast","atilde","auml","awint","bNot","backcong","bcong","backepsilon","bepsi","backprime","bprime","backsim","bsim","backsimeq","bsime","barvee","barwed","barwedge","bbrktbrk","bcy","bdquo","ldquor","bemptyv","beta","beth","between","twixt","bfr","bigcirc","xcirc","bigodot","xodot","bigoplus","xoplus","bigotimes","xotime","bigsqcup","xsqcup","bigstar","starf","bigtriangledown","xdtri","bigtriangleup","xutri","biguplus","xuplus","bkarow","rbarr","blacklozenge","lozf","blacktriangle","utrif","blacktriangledown","dtrif","blacktriangleleft","ltrif","blacktriangleright","rtrif","blank","blk12","blk14","blk34","block","bne","bnequiv","bnot","bopf","bowtie","boxDL","boxDR","boxDl","boxDr","boxH","boxHD","boxHU","boxHd","boxHu","boxUL","boxUR","boxUl","boxUr","boxV","boxVH","boxVL","boxVR","boxVh","boxVl","boxVr","boxbox","boxdL","boxdR","boxdl","boxdr","boxhD","boxhU","boxhd","boxhu","boxminus","minusb","boxplus","plusb","boxtimes","timesb","boxuL","boxuR","boxul","boxur","boxv","boxvH","boxvL","boxvR","boxvh","boxvl","boxvr","brvbar","bscr","bsemi","bsol","bsolb","bsolhsub","bull","bullet","bumpE","cacute","cap","capand","capbrcup","capcap","capcup","capdot","caps","caret","ccaps","ccaron","ccedil","ccirc","ccups","ccupssm","cdot","cemptyv","cent","cfr","chcy","check","checkmark","chi","cir","cirE","circ","circeq","cire","circlearrowleft","olarr","circlearrowright","orarr","circledS","oS","circledast","oast","circledcirc","ocir","circleddash","odash","cirfnint","cirmid","cirscir","clubs","clubsuit","comma","commat","comp","complement","congdot","copf","copysr","crarr","cross","cscr","csub","csube","csup","csupe","ctdot","cudarrl","cudarrr","cuepr","curlyeqprec","cuesc","curlyeqsucc","cularr","curvearrowleft","cularrp","cup","cupbrcap","cupcap","cupcup","cupdot","cupor","cups","curarr","curvearrowright","curarrm","curlyvee","cuvee","curlywedge","cuwed","curren","cwint","cylcty","dHar","dagger","daleth","dash","hyphen","dbkarow","rBarr","dcaron","dcy","ddarr","downdownarrows","ddotseq","eDDot","deg","demptyv","dfisht","dfr","diamondsuit","diams","digamma","gammad","disin","div","divideontimes","divonx","djcy","dlcorn","llcorner","dlcrop","dollar","dopf","doteqdot","eDot","dotminus","minusd","dotplus","plusdo","dotsquare","sdotb","drcorn","lrcorner","drcrop","dscr","dscy","dsol","dstrok","dtdot","dtri","triangledown","dwangle","dzcy","dzigrarr","eacute","easter","ecaron","ecir","eqcirc","ecirc","ecolon","eqcolon","ecy","edot","efDot","fallingdotseq","efr","eg","egrave","egs","eqslantgtr","egsdot","el","elinters","ell","els","eqslantless","elsdot","emacr","empty","emptyset","emptyv","varnothing","emsp13","emsp14","emsp","eng","ensp","eogon","eopf","epar","eparsl","eplus","epsi","epsilon","epsiv","straightepsilon","varepsilon","equest","questeq","equivDD","eqvparsl","erDot","risingdotseq","erarr","escr","eta","eth","euml","euro","excl","fcy","female","ffilig","fflig","ffllig","ffr","filig","fjlig","flat","fllig","fltns","fnof","fopf","fork","pitchfork","forkv","fpartint","frac12","half","frac13","frac14","frac15","frac16","frac18","frac23","frac25","frac34","frac35","frac38","frac45","frac56","frac58","frac78","frasl","frown","sfrown","fscr","gEl","gtreqqless","gacute","gamma","gap","gtrapprox","gbreve","gcirc","gcy","gdot","gescc","gesdot","gesdoto","gesdotol","gesl","gesles","gfr","gimel","gjcy","glE","gla","glj","gnE","gneqq","gnap","gnapprox","gne","gneq","gnsim","gopf","gscr","gsime","gsiml","gtcc","gtcir","gtdot","gtrdot","gtlPar","gtquest","gtrarr","gvertneqq","gvnE","hardcy","harrcir","harrw","leftrightsquigarrow","hbar","hslash","planck","plankv","hcirc","hearts","heartsuit","hellip","mldr","hercon","hfr","hksearow","searhk","hkswarow","swarhk","hoarr","homtht","hookleftarrow","larrhk","hookrightarrow","rarrhk","hopf","horbar","hscr","hstrok","hybull","iacute","icirc","icy","iecy","iexcl","ifr","igrave","iiiint","qint","iiint","tint","iinfin","iiota","ijlig","imacr","imath","inodot","imof","imped","incare","infin","infintie","intcal","intercal","intlarhk","intprod","iprod","iocy","iogon","iopf","iota","iquest","iscr","isinE","isindot","isins","isinsv","itilde","iukcy","iuml","jcirc","jcy","jfr","jmath","jopf","jscr","jsercy","jukcy","kappa","kappav","varkappa","kcedil","kcy","kfr","kgreen","khcy","kjcy","kopf","kscr","lAtail","lBarr","lEg","lesseqqgtr","lHar","lacute","laemptyv","lambda","langd","lap","lessapprox","laquo","larrbfs","larrfs","larrlp","looparrowleft","larrpl","larrsim","larrtl","leftarrowtail","lat","latail","late","lates","lbarr","lbbrk","lbrace","lcub","lbrack","lsqb","lbrke","lbrksld","lbrkslu","lcaron","lcedil","lcy","ldca","ldrdhar","ldrushar","ldsh","le","leq","leftleftarrows","llarr","leftthreetimes","lthree","lescc","lesdot","lesdoto","lesdotor","lesg","lesges","lessdot","ltdot","lfisht","lfr","lgE","lharul","lhblk","ljcy","llhard","lltri","lmidot","lmoust","lmoustache","lnE","lneqq","lnap","lnapprox","lne","lneq","lnsim","loang","loarr","longmapsto","xmap","looparrowright","rarrlp","lopar","lopf","loplus","lotimes","lowast","loz","lozenge","lpar","lparlt","lrhard","lrm","lrtri","lsaquo","lscr","lsime","lsimg","lsquor","sbquo","lstrok","ltcc","ltcir","ltimes","ltlarr","ltquest","ltrPar","ltri","triangleleft","lurdshar","luruhar","lvertneqq","lvnE","mDDot","macr","strns","male","malt","maltese","mcomma","mcy","mdash","mfr","mho","micro","midcir","minusdu","mlcp","models","mopf","mscr","mu","multimap","mumap","nGg","nGt","nLeftarrow","nlArr","nLeftrightarrow","nhArr","nLl","nLt","nRightarrow","nrArr","nVDash","nVdash","nacute","nang","napE","napid","napos","natur","natural","ncap","ncaron","ncedil","ncongdot","ncup","ncy","ndash","neArr","nearhk","nedot","nesear","toea","nfr","nharr","nleftrightarrow","nhpar","nis","nisd","njcy","nlE","nleqq","nlarr","nleftarrow","nldr","nopf","notinE","notindot","notinvb","notinvc","notnivb","notnivc","nparsl","npart","npolint","nrarr","nrightarrow","nrarrc","nrarrw","nscr","nsub","nsubE","nsubseteqq","nsup","nsupE","nsupseteqq","ntilde","nu","numero","numsp","nvDash","nvHarr","nvap","nvdash","nvge","nvgt","nvinfin","nvlArr","nvle","nvlt","nvltrie","nvrArr","nvrtrie","nvsim","nwArr","nwarhk","nwnear","oacute","ocirc","ocy","odblac","odiv","odsold","oelig","ofcir","ofr","ogon","ograve","ogt","ohbar","olcir","olcross","olt","omacr","omega","omicron","omid","oopf","opar","operp","vee","ord","order","orderof","oscr","ordf","ordm","origof","oror","orslope","orv","oslash","osol","otilde","otimesas","ouml","ovbar","para","parsim","parsl","pcy","percnt","period","permil","pertenk","pfr","phi","phiv","straightphi","varphi","phone","pi","piv","varpi","planckh","plusacir","pluscir","plusdu","pluse","plussim","plustwo","pointint","popf","pound","prE","prap","precapprox","precnapprox","prnap","precneqq","prnE","precnsim","prnsim","prime","profalar","profline","profsurf","prurel","pscr","psi","puncsp","qfr","qopf","qprime","qscr","quatint","quest","rAtail","rHar","race","racute","raemptyv","rangd","raquo","rarrap","rarrbfs","rarrc","rarrfs","rarrpl","rarrsim","rarrtl","rightarrowtail","rarrw","rightsquigarrow","ratail","ratio","rbbrk","rbrace","rcub","rbrack","rsqb","rbrke","rbrksld","rbrkslu","rcaron","rcedil","rcy","rdca","rdldhar","rdsh","rect","rfisht","rfr","rharul","rho","rhov","varrho","rightrightarrows","rrarr","rightthreetimes","rthree","ring","rlm","rmoust","rmoustache","rnmid","roang","roarr","ropar","ropf","roplus","rotimes","rpar","rpargt","rppolint","rsaquo","rscr","rtimes","rtri","triangleright","rtriltri","ruluhar","rx","sacute","scE","scap","succapprox","scaron","scedil","scirc","scnE","succneqq","scnap","succnapprox","scnsim","succnsim","scpolint","scy","sdot","sdote","seArr","sect","semi","seswar","tosa","sext","sfr","sharp","shchcy","shcy","shy","sigma","sigmaf","sigmav","varsigma","simdot","simg","simgE","siml","simlE","simne","simplus","simrarr","smashp","smeparsl","smile","ssmile","smt","smte","smtes","softcy","sol","solb","solbar","sopf","spades","spadesuit","sqcaps","sqcups","sscr","star","sub","subset","subE","subseteqq","subdot","subedot","submult","subnE","subsetneqq","subne","subsetneq","subplus","subrarr","subsim","subsub","subsup","sung","sup1","sup2","sup3","supE","supseteqq","supdot","supdsub","supedot","suphsol","suphsub","suplarr","supmult","supnE","supsetneqq","supne","supsetneq","supplus","supsim","supsub","supsup","swArr","swnwar","szlig","tau","tcaron","tcedil","tcy","telrec","tfr","theta","thetasym","thetav","vartheta","thorn","times","timesbar","timesd","topbot","topcir","topf","topfork","tprime","triangle","utri","triangleq","trie","tridot","triminus","triplus","trisb","tritime","trpezium","tscr","tscy","tshcy","tstrok","uHar","uacute","ubrcy","ubreve","ucirc","ucy","udblac","ufisht","ufr","ugrave","uhblk","ulcorn","ulcorner","ulcrop","ultri","umacr","uogon","uopf","upsi","upsilon","upuparrows","uuarr","urcorn","urcorner","urcrop","uring","urtri","uscr","utdot","utilde","uuml","uwangle","vBar","vBarv","vangrt","varsubsetneq","vsubne","varsubsetneqq","vsubnE","varsupsetneq","vsupne","varsupsetneqq","vsupnE","vcy","veebar","veeeq","vellip","vfr","vopf","vscr","vzigzag","wcirc","wedbar","wedgeq","weierp","wp","wfr","wopf","wscr","xfr","xi","xnis","xopf","xscr","yacute","yacy","ycirc","ycy","yen","yfr","yicy","yopf","yscr","yucy","yuml","zacute","zcaron","zcy","zdot","zeta","zfr","zhcy","zigrarr","zopf","zscr","zwj","zwnj","ngsp","TokenError","errorMsg","tokenType","TokenizeResult","nonNormalizedIcuExpressions","_CR_OR_CRLF_REGEXP","_unexpectedCharacterErrorMsg","charCode","_unknownEntityErrorMsg","entitySrc","CharacterReferenceType","HEX","DEC","_ControlFlowError","_Tokenizer","_file","_getTagDefinition","options","_currentTokenStart","_currentTokenType","_expansionCaseStack","_inInterpolation","_tokenizeIcu","tokenizeExpansionForms","_interpolationConfig","_leadingTriviaCodePoints","leadingTriviaChars","codePointAt","endPos","startPos","_cursor","EscapedCharacterCursor","PlainCharacterCursor","_preserveLineEndings","preserveLineEndings","_escapedString","_i18nNormalizeLineEndingsInICUs","i18nNormalizeLineEndingsInICUs","init","handleError","_processCarriageReturns","_attemptCharCode","_consumeCdata","_consumeComment","_consumeDocType","_consumeTagClose","_consumeTagOpen","_tokenizeExpansionForm","_consumeWithInterpolation","_isTextEnd","_isTagStart","_beginToken","_endToken","isExpansionFormStart","_consumeExpansionFormStart","isExpansionCaseStart","_isInExpansionForm","_consumeExpansionCaseStart","_isInExpansionCase","_consumeExpansionCaseEnd","_consumeExpansionFormEnd","getSpan","_createError","CursorError","cursor","_attemptCharCodeCaseInsensitive","compareCharCodeCaseInsensitive","code1","code2","toUpperCaseCharCode","_requireCharCode","_attemptStr","chars","charsLeft","initialPosition","_attemptStrCaseInsensitive","_requireStr","_attemptCharCodeUntilFn","_requireCharCodeUntilFn","diff","_attemptUntilChar","_readChar","fromCodePoint","_consumeEntity","textTokenType","isHex","codeStart","isDigitEntityEnd","entityType","_unparsableEntityErrorMsg","entityStr","getChars","strNum","isNamedEntityEnd","_consumeRawText","consumeEntities","endMarkerPredicate","tagCloseStart","foundEndMarker","contentStart","_consumePrefixAndName","nameOrPrefixStart","isPrefixEnd","isNameEnd","openTagToken","_consumeTagOpenStart","isNotWhitespace","_consumeAttributeName","_consumeAttributeValue","_consumeTagOpenEnd","contentTokenType","_consumeRawTextWithTagClose","attrNameStart","prefixAndName","quoteChar","_consumeQuote","endPredicate","_readUntil","normalizedCondition","conditionToken","interpolationTokenType","endInterpolation","_consumeInterpolation","interpolationStart","prematureEndPredicate","expressionStart","inQuote","inComment","_getProcessedChars","isInterpolation","isAsciiHexDigit","fileOrCursor","state","advanceState","updatePeek","leadingTriviaCodePoints","startLocation","locationFromCursor","endLocation","fullStartLocation","pos","currentChar","internalState","processEscapeSequence","$BSPACE","digitStart","decodeHexDigits","octal","previous","TreeError","ParseTreeResult","rootNodes","_TreeBuilder","getTagDefinition","_index","_elementStack","_advance","build","_peek","_consumeStartTag","_consumeEndTag","_closeVoidElement","_consumeText","_consumeExpansion","prev","_advanceIf","_startToken","_addToParent","expCase","_parseExpansionCase","create","_collectExpansionExpTokens","expansionCaseParser","expansionFormStack","lastOnStack","startSpan","parent","_getParentElement","decodeEntity","endSpan","startTagToken","_consumeAttr","_getElementFullName","selfClosing","tagDef","_pushElement","_popElement","parentEl","endTagToken","errMsg","unexpectedCloseTagDetected","stackIndex","splice","attrEnd","valueStartSpan","valueEnd","valueToken","parentElement","parentTagName","stack","entity","HtmlParser","Parser","tokenizeResult","tokenizer","mergeTextTokens","srcTokens","dstTokens","lastDstToken","parser","PRESERVE_WS_ATTR_NAME","SKIP_WS_TRIM_TAGS","WS_CHARS","NO_WS_REGEXP","WS_REPLACE_REGEXP","replaceNgsp","WhitespaceVisitor","hasPreserveWhitespacesAttr","visitAllWithSiblings","isNotBlank","hasExpansionSibling","createWhitespaceProcessedTextToken","processWhitespace","expansion","expansionCase","mapLiteral","_SECURITY_SCHEMA","SECURITY_SCHEMA","registerContext","specs","spec","SCHEMA","_ATTR_TO_PROP","class","for","formaction","innerHtml","readonly","tabindex","_PROP_TO_ATTR","inverted","DomElementSchemaRegistry","ElementSchemaRegistry","_schema","_eventSchema","encodedType","events","strType","strProperties","properties","typeNames","superName","superType","superEvent","STRING","hasProperty","propName","schemaMetas","schema","unknown","hasElement","isAttribute","getMappedPropName","getDefaultComponentElementName","validateProperty","validateAttribute","allKnownElementNames","allKnownAttributesOfElement","elementProperties","allKnownEventsOfElement","normalizeAnimationStyleProperty","dashCaseToCamelCase","normalizeAnimationStyleValue","camelCaseProp","userProvidedProp","val","strVal","_isPixelDimensionStyle","valAndSuffixMatch","TRUSTED_TYPES_SINKS","isTrustedTypesSink","ANIMATE_PROP_PREFIX","BindingParser","_exprParser","_schemaRegistry","createBoundHostProperties","boundProps","parsePropertyBinding","createDirectiveHostEventAsts","hostListeners","targetEvents","parseEvent","sourceInfo","_reportExpressionParserErrors","parseInlineTemplateBinding","tplKey","tplValue","targetMatchableAttrs","targetProps","targetVars","isIvyAst","_parseTemplateBindings","bindingSpan","moveParseSourceSpan","srcSpan","_parsePropertyAst","parseLiteralAttr","bindingsResult","warning","isAnimationLabel","_parseAnimation","isHost","isAnimationProp","_parseBinding","parsePropertyInterpolation","isHostBinding","createBoundElementProperty","elementSelector","boundProp","skipValidation","mapPropertyName","bindingType","boundPropertyName","securityContexts","_validatePropertyOrAttributeName","calcPossibleSecurityContexts","nsSeparatorIdx","ns","mappedPropName","_parseAnimationEvent","_parseRegularEvent","splitAtPeriod","eventName","_parseAction","splitAtColon","isAttr","report","registry","ctxs","elementNames","notElementNames","possibleElementNames","sort","absoluteSpan","startDiff","endDiff","URL_WITH_SCHEMA_REGEXP","preparseElement","selectAttr","hrefAttr","relAttr","nonBindable","projectAs","lcAttrName","normalizeNgContentSelect","nodeName","PreparsedElementType","OTHER","NG_CONTENT","STYLESHEET","PreparsedElement","BIND_NAME_REGEXP","BINDING_DELIMS","HtmlAstToIvyAst","bindingParser","styleUrls","ngContentSelectors","commentNodes","inI18nBlock","isI18nRootElement","reportError","preparsedElement","contents","textContents","isStyleUrlResolvable","schemeMatch","isTemplateElement","isNgTemplate","parsedProperties","boundEvents","i18nAttrsMeta","templateParsedProperties","templateVariables","elementHasInlineTemplate","hasBinding","normalizedName","normalizeAttributeName","isTemplateBinding","parsedVariables","parseAttribute","NON_BINDABLE_VISITOR","parsedElement","isEmptyTextNode","isCommentNode","extractAttributes","bound","hoistedAttrs","_visitTextWithInterpolation","formattedKey","collectCommentNodes","i18nPropsMeta","bep","fromBoundElementProperty","matchableAttributes","createKeySpan","normalizationAdjustment","keySpanStart","keySpanEnd","bindParts","parseVariable","parseReference","addEvents","parseAssignmentEvent","delims","endsWith","valueNoNgsp","NonBindableVisitor","fromParsedEvent","TagType","ELEMENT","TEMPLATE","I18nContext","templateIndex","isEmitted","_unresolvedCtxCount","_registry","setupRegistry","getUniqueId","icus","appendTag","closed","isRoot","isResolved","getSerializedPlaceholders","serializePlaceholderValue","appendBinding","appendIcu","appendBoundText","appendTemplate","appendElement","appendProjection","forkChildContext","reconcileChildContext","findTemplateFn","phs","tmplIdx","findIndex","isCloseTag","tmpl","wrap","symbol","wrapTag","data","serializer","IcuSerializerVisitor","formatPh","serializeIcuNode","TAG_TO_PLACEHOLDER_NAMES","A","B","BR","EM","H1","H2","H3","H4","H5","H6","HR","I","LI","LINK","OL","P","Q","S","SMALL","SUB","SUP","TBODY","TD","TFOOT","TH","THEAD","TR","TT","U","UL","PlaceholderRegistry","_placeHolderNameCounts","_signatureToName","getStartTagPlaceholderName","signature","_hashTag","upperTag","baseName","_generateUniqueName","getCloseTagPlaceholderName","_hashClosingTag","getPlaceholderName","upperName","getUniquePlaceholder","_expParser","createI18nMessageFactory","_I18nVisitor","visitNodeFn","toI18nMessage","noopVisitNodeFn","_html","_expressionParser","isIcu","icuDepth","placeholderRegistry","placeholderToContent","i18nodes","startPhName","closePhName","i18nIcuCases","i18nIcu","caze","expPh","phName","_icuCase","_context","previousI18n","hasInterpolation","extractPlaceholderName","reusePreviousSourceSpans","assertSingleContainerMessage","assertEquivalentNodes","previousNodes","_CUSTOM_PH_EXP","I18nError","setI18nRefs","htmlNode","i18nNode","previousMessage","I18nMetaVisitor","keepI18nAttrs","enableI18nLegacyMessageIdFormat","_errors","_createI18nMessage","_generateI18nMessage","_parseMetadata","_setMessageId","_setLegacyIds","visitAllWithErrors","hasI18nAttrs","attrsMeta","currentMessage","parseI18nMeta","idIndex","descIndex","meaningAndDesc","createGoogleGetMsgStatements","variable$1","closureVar","placeholderValues","serializeI18nMessageForGetMsg","serializerVisitor","original_code","googGetMsgStmt","i18nMetaToJSDoc","GetMsgSerializerVisitor","createLocalizeStatements","placeHolders","serializeI18nMessageForLocalize","pieces","LocalizeSerializerVisitor","processMessagePieces","createEmptyMessagePart","getSourceSpan","startNode","endNode","localizedString$1","variableInitialization","createPlaceholderPiece","EVENT_BINDING_SCOPE_GLOBALS","GLOBAL_TARGET_RESOLVERS","LEADING_TRIVIA_CHARS","renderFlagCheckIfStmt","prepareEventListenerParameters","eventAst","handlerName","scope","eventArgumentName","implicitReceiverExpr","bindingLevel","getOrCreateSharedContextVar","bindingStatements","variableDeclarations","restoreViewStatement","prepareSyntheticListenerName","fnName","fnArgs","handlerFn","TemplateDefinitionBuilder","parentBindingScope","contextName","i18nContext","templateName","_namespace","relativeContextFilePath","i18nUseExternalIds","_constants","createComponentDefConsts","prepareStatements","constExpressions","i18nVarRefsCache","_dataIndex","_bindingContext","_prefixCode","_creationCodeFns","_updateCodeFns","_currentIndex","_tempVariables","_nestedTemplateFns","_pureFunctionSlots","_bindingSlots","_ngContentReservedSlots","_ngContentSelectorsOffset","_implicitReceiverExpr","_bindingScope","nestedScope","fileBasedI18nSuffix","_valueConverter","ValueConverter","allocateDataSlot","numSlots","allocatePureFunctionSlots","slot","creationInstruction","buildTemplateFunction","ngContentSelectorsOffset","registerContextVariables","initI18nContext","isSingleElementTemplate","selfClosingI18nInstruction","hasTextChildrenOnly","updatePipeSlotOffsets","buildTemplateFn","r3ReservedSlots","creationStatements","updateStatements","creationVariables","viewSnapshotStatements","updateVariables","creationBlock","updateBlock","i18nTranslate","transformFn","_ref","i18nGenerateMainBlockVar","getTranslationDeclStmts","createClosureModeGuard","i18nGenerateClosureVar","scopedName","freshReferenceName","retrievalLevel","relativeLevel","isListenerScope","hasRestoreViewVariable","notifyRestoredViewContextUse","getSharedContextName","generateNextContextExpr","i18nAppendBindings","i18nBindProps","props","label","assembleI18nBoundString","acc","lastIdx","messageId","uniqueSuffix","i18nUpdateRef","icuMapping","addToConsts","updateInstructionWithAdvance","getConstCount","updateInstruction","i18nAttributesInstruction","nodeIndex","i18nAttrArgs","converted","constIndex","getNamespaceInstruction","namespaceKey","addNamespaceInstruction","nsInstruction","interpolatedUpdateInstruction","instruction","elementIndex","getUpdateInstructionArguments","ngContent","projectionSlotIdx","nonContentSelectAttributes","getAttributeExpressions","stylingBuilder","isNonBindableMode","outputAttrs","isNgContainer$1","allOtherInputs","boundI18nAttrs","addAttrsToConsts","prepareRefsArray","wasInNamespace","currentNamespace","hasChildren","createSelfClosingInstruction","createSelfClosingI18nInstruction","outputAst","prepareListenerParameter","stylingInstructions","limit","processStylingUpdateInstruction","emptyValueBindInstruction","propertyBindings","attributeBindings","inputType","hasValue","getBindingFunctionParams","attrNamespace","isAttributeBinding","sanitizationRef","resolveSanitizationFn","namespaceLiteral","getPropertyInterpolationExpression","getAttributeInterpolationExpression","boundValue","propertyBinding","attributeBinding","NG_TEMPLATE_TAG_NAME","tagNameWithoutNamespace","attrsExprs","templateVisitor","templateFunctionExpr","getVarCount","templatePropertyBindings","i18nInputs","partitionArray","arr","conditionFn","truthy","falsy","item","getTextInterpolationExpression","initWasInvoked","formatted","getConsts","getNgContentSelectors","bindingContext","instructionFn","fns","prepend","addAdvanceInstructionIfNecessary","originalSlots","getImplicitReceiverExpr","convertedPropertyBinding","valExpr","convertUpdateArguments","contextVariableExpression","expressionWithArgumentsToExtract","renderAttributes","alreadySeen","attrExprs","ngProjectAsAttr","i18nVarRef","getAttributeNameLiterals","trustedConstAttribute","addAttrExpr","getNgProjectAsLiteral","parsedR3Selector","attrsLengthBeforeInputs","consts","flatten","variableName","nextContextStmt","refExpr","bindingFnName","AstMemoryEfficientTransformer","modified","allocateSlot","_pipeBindExprs","slotPseudoLocal","pureFunctionSlot","isVarLength","pipeBindingCallInfo","pipeBindingIdentifiers","pipeBindExpr","bindingSlots","array","pureFunctionIdentifiers","relativeLevelDiff","literal$1","allocateSlots","startSlot","pureFunctionCallInfo","attributeNamespace","attributeName","nameLiteral","SHARED_CONTEXT_KEY","BindingScope","referenceNameIndex","restoreViewVariable","usesRestoredViewContext","declareLocalCallback","declare","priority","maybeGenerateSharedContextVar","getComponentProperty","localRef","newScope","generateSharedContextVar","bindingKey","sharedCtxObj","componentValue","restoreCall","currentContextLevel","levelDiff","currStmts","parseTemplate","preserveWhitespaces","makeBindingParser","parseResult","alwaysAttemptHtmlToR3AstConversion","parsedTemplate","i18nMetaVisitor","i18nMetaResult","htmlAstToRender3Ast","htmlNodes","transformer","elementRegistry","isTextNode","deferredParams","eagerParams","fnParams","NG_I18N_CLOSURE_MODE","flatItem","ATTR_REGEX","baseDirectiveFields","queries","createContentQueriesFunction","createStatements","tempAllocator","prepareQueryParams","getQueryList","refresh","updateDirective","propertyName","first","contentQueriesFnName","viewQueries","createViewQueriesFunction","queryDefinition","viewQueryFnName","createHostBindingsFunction","hostBindingsMetadata","typeSourceSpan","styleBuilder","styleAttr","specialAttributes","createInstructions","updateInstructions","hostBindingSourceSpan","eventBindings","listeners","createHostListeners","listenerParams","syntheticListenerParams","bindingName","allOtherBindings","totalHostVarsCount","getValueConverter","originalVarsCount","syntheticHostBindings","bindingExpr","bindingFn","getBindingNameAndInstruction","sanitizerFn","instructionParams","bindingParams","hostAttrs","convertAttributesToExpressions","convertStylingCall","hostBindingsFnName","exportAs","addFeatures","features","viewProviders","usesInheritance","fullInheritance","lifecycle","usesOnChanges","compileComponentFromMetadata","firstSelector","selectorAttributes","templateTypeName","changeDetection","templateBuilder","createRootScope","templateFunctionExpression","constsExpr","compileDeclarationList","resolvedList","declarationListEmitMode","encapsulation","styleNodes","compileStyles","shadowCss","animations","createComponentType","createBaseDirectiveTypeParams","stringArrayAsType","toQueryFlags","read","descendants","emitDistinctChangesOnly","stringAsType","stringMapAsType","selectorForType","q","createDirectiveType","implicit","attrMatches","HOST_REG_EXP","ResourceLoader","CompilerFacadeImpl","jitEvaluator","elementSchemaRegistry","compilePipe","angularCoreEnv","sourceMapUrl","facade","jitExpression","compilePipeDeclaration","declaration","convertDeclarePipeFacadeToMetadata","computeProvidedIn","convertToProviderExpression","wrapExpression","convertR3DependencyMetadata","compileInjectableDeclaration","convertR3DeclareDependencyMetadata","compileInjectorDeclaration","convertDeclareInjectorFacadeToMetadata","compileNgModuleDeclaration","compileNgModuleDeclarationExpression","compileDirective","convertDirectiveFacadeToMetadata","compileDirectiveFromMeta","compileDirectiveDeclaration","convertDeclareDirectiveFacadeToMetadata","createParseSourceSpan","compileDirectiveFromMetadata","compileComponent","parseJitTemplate","convertDeclarationFacadeToMetadata","jitExpressionSourceMap","compileComponentFromMeta","compileComponentDeclaration","convertDeclareComponentFacadeToMetadata","dependencies","innerDep","kind","convertDirectiveDeclarationToMetadata","convertPipeDeclarationToMetadata","components","directives","pipes","dir","convertPipeMapToMetadata","compileFactory","factoryRes","convertR3DependencyMetadataArray","compileFactoryDeclaration","typeName","r3JitTypeSourceSpan","sourceFile","def","preStatements","$def","convertToR3QueryMetadata","convertQueryPredicate","convertQueryDeclarationToMetadata","inputsFromMetadata","parseInputOutputs","outputsFromMetadata","propMetadata","inputsFromType","outputsFromType","field","ann","isInput","bindingPropertyName","isOutput","extractHostBindings","convertHostDeclarationToMetadata","convertOpaqueValuesToExpressions","classAttribute","styleAttribute","isComponent","fromArray","parsed","err","facades","isAttributeDep","rawToken","createR3DependencyMetadata","parseHostBindings","verifyHostBindings","hostPropertyName","isHostListener","ngMetadataName","Version","full","splits","major","minor","patch","_VisitorMode","Extract","Merge","XmlTagDefinition","requireExtraParent","currentParent","publishFacade","ng","ɵcompilerFacade","findEndOfBlock","cookedIndex","rawIndex","$localize$1","translate","translation","stripBlock","rawMessagePart","globalThis","ɵ_global","ɵ$localize","performance","mark","performanceMeasure","measure","symbolPrefix","__Zone_symbol_prefix","__symbol__","checkDuplicate","Zone","zoneSpec","_parent","_name","_properties","_zoneDelegate","_ZoneDelegate","Promise","patches","ZoneAwarePromise","root","zone","_currentZoneFrame","currentTask","_currentTask","ignoreDuplicate","perfName","_api","getZoneWith","callback","_callback","intercept","runGuarded","run","applyThis","applyArgs","invoke","runTask","task","NO_ZONE","notScheduled","eventTask","macroTask","reEntryGuard","running","_transitionTo","scheduled","runCount","previousTask","isPeriodic","cancelFn","invokeTask","_updateTaskCount","scheduleTask","newZone","scheduling","zoneDelegates","_zoneDelegates","_zone","scheduleMicroTask","customSchedule","ZoneTask","microTask","scheduleMacroTask","customCancel","scheduleEventTask","cancelTask","canceling","DELEGATE_ZS","onHasTask","hasTaskState","hasTask","onScheduleTask","onInvokeTask","onCancelTask","parentDelegate","_taskCounts","_parentDelegate","_forkZS","onFork","_forkDlgt","_forkCurrZone","_interceptZS","onIntercept","_interceptDlgt","_interceptCurrZone","_invokeZS","onInvoke","_invokeDlgt","_invokeCurrZone","_handleErrorZS","onHandleError","_handleErrorDlgt","_handleErrorCurrZone","_scheduleTaskZS","_scheduleTaskDlgt","_scheduleTaskCurrZone","_invokeTaskZS","_invokeTaskDlgt","_invokeTaskCurrZone","_cancelTaskZS","_cancelTaskDlgt","_cancelTaskCurrZone","_hasTaskZS","_hasTaskDlgt","_hasTaskDlgtOwner","_hasTaskCurrZone","zoneSpecHasTask","parentHasTask","targetZone","apply","returnTask","scheduleFn","isEmpty","counts","change","_state","useG","_numberOfNestedTaskFrames","drainMicroTaskQueue","cancelScheduleRequest","toState","fromState1","fromState2","handleId","prototype","symbolSetTimeout","symbolPromise","symbolThen","nativeMicroTaskQueuePromise","_microTaskQueue","_isDrainingMicrotaskQueue","nativeScheduleMicroTask","func","resolve","nativeThen","then","queue","onUnhandledError","microtaskDrainDone","currentZoneFrame","noop","showUncaughtError","patchEventTarget","patchOnProperties","patchMethod","bindArguments","patchThen","patchMacroTask","patchEventPrototype","isIEOrEdge","getGlobalObjects","ObjectDefineProperty","ObjectGetOwnPropertyDescriptor","ObjectCreate","ArraySlice","patchClass","wrapWithCurrentZone","filterProperties","attachOriginToPatched","_redefineProperty","patchCallbacks","getOwnPropertyDescriptor","defineProperty","ObjectGetPrototypeOf","getPrototypeOf","ADD_EVENT_LISTENER_STR","REMOVE_EVENT_LISTENER_STR","ZONE_SYMBOL_ADD_EVENT_LISTENER","ZONE_SYMBOL_REMOVE_EVENT_LISTENER","TRUE_STR","FALSE_STR","ZONE_SYMBOL_PREFIX","scheduleMacroTaskWithCurrentZone","zoneSymbol","isWindowExists","internalWindow","isPropertyWritable","propertyDesc","writable","isWebWorker","isNode","process","isBrowser","HTMLElement","isMix","zoneSymbolEventNames$1","wrapFn","eventNameSymbol","errorEvent","filename","lineno","colno","preventDefault","patchProperty","desc","enumerable","configurable","onPropPatchedSymbol","originalDescGet","originalDescSet","removeEventListener","addEventListener","REMOVE_ATTRIBUTE","removeAttribute","onProperties","originalInstanceKey","className","OriginalClass","instance","patchFn","proto","delegateName","patchDelegate","funcName","metaCreator","setNative","cbIdx","patched","isDetectedIEOrEdge","ieOrEdge","ua","navigator","userAgent","__load_patch","api","_uncaughtPromiseErrors","isDisableWrappingUncaughtPromiseRejection","rejection","console","uncaughtPromiseError","throwOriginal","handleUnhandledRejection","UNHANDLED_PROMISE_REJECTION_HANDLER_SYMBOL","isThenable","forwardResolution","forwardRejection","reject","symbolState","symbolValue","symbolFinally","symbolParentPromiseValue","symbolParentPromiseState","UNRESOLVED","RESOLVED","REJECTED","makeResolver","promise","resolvePromise","once","wasCalled","wrappedFunction","CURRENT_TASK_TRACE_SYMBOL","onceWrapper","TypeError","clearRejectedNoCatch","trace","creationTrace","scheduleResolveOrReject","readableObjectToString","REJECTION_HANDLED_HANDLER","chainPromise","onFulfilled","onRejected","promiseState","parentPromiseValue","isFinallyPromise","AggregateError","Symbol","iterator","promises","finished","rej","onResolve","onReject","allWithCallback","thenCallback","status","errorCallback","reason","unresolvedCount","valueIndex","resolvedValues","curValueIndex","thenErr","executor","toStringTag","species","_a","C","catch","finally","onFinally","all","NativePromise","symbolThenPatched","Ctor","originalThen","zoneify","resultPromise","ctor","originalFunctionToString","ORIGINAL_DELEGATE_SYMBOL","PROMISE_SYMBOL","ERROR_SYMBOL","newFunctionToString","originalDelegate","nativePromise","nativeError","originalObjectToString","passiveSupported","OPTIMIZED_ZONE_EVENT_TASK_DATA","zoneSymbolEventNames","globalSources","EVENT_NAME_SYMBOL_REGX","IMMEDIATE_PROPAGATION_SYMBOL","prepareEventNames","eventNameToString","falseEventName","trueEventName","symbolCapture","apis","patchOptions","ADD_EVENT_LISTENER","REMOVE_EVENT_LISTENER","rm","LISTENERS_EVENT_LISTENER","REMOVE_ALL_LISTENERS_EVENT_LISTENER","rmAll","zoneSymbolAddEventListener","ADD_EVENT_LISTENER_SOURCE","PREPEND_EVENT_LISTENER","isRemoved","handleEvent","globalCallback","isCapture","tasks","copyTasks","globalZoneAwareCallback","globalZoneAwareCaptureCallback","patchEventTargetMethods","useGlobalCallback","validateHandler","vh","chkDup","returnTarget","taskData","nativeAddEventListener","nativeRemoveEventListener","nativeListeners","nativeRemoveAllListeners","nativePrependEventListener","buildEventListenerOptions","passive","capture","assign","isExisting","symbolEventNames","symbolEventName","existingTasks","allRemoved","compare","typeOfDelegate","unpatchedEvents","passiveEvents","makeAddListener","nativeListener","customScheduleFn","customCancelFn","transferEventName","isHandleEvent","constructorName","targetSource","existingTask","findEventTasks","symbolCaptureEventName","captureTasks","removeTasks","evtName","foundTasks","captureFalseTasks","captureTrueTasks","Event","targetName","method","callbacks","nativeDelegate","opts","descriptor","ignoreProperties","tip","ip","targetIgnoreProperties","patchFilteredProperties","getOnEventNames","propertyDescriptorPatch","__Zone_ignore_on_properties","patchTargets","ignoreErrorProperties","isIE","eventNames","SYMBOL_BLACK_LISTED_EVENTS","SYMBOL_UNPATCHED_EVENTS","taskSymbol","patchTimer","setName","cancelName","nameSuffix","clearNative","tasksByHandleId","clearTask","delay","handle","unref","legacyPatch","clear","blockingMethods","patchEvent","eventTargetPatch","EVENT_TARGET","EventTarget","XMLHttpRequestEventTarget","patchCustomElements","customElements","patchXHR","XMLHttpRequest","XMLHttpRequestPrototype","oriAddListener","oriRemoveListener","XMLHttpRequestEventTargetPrototype","READY_STATE_CHANGE","SCHEDULED","XHR_SCHEDULED","XHR_ERROR_BEFORE_SCHEDULED","XHR_LISTENER","newListener","readyState","DONE","aborted","loadTasks","oriInvoke","XHR_TASK","sendNative","placeholderCallback","abortNative","openNative","XHR_SYNC","XHR_URL","fetchTaskAborting","fetchTaskScheduling","findPendingTask","geolocation","patchPrototype","fnNames","findPromiseRejectionHandler","PromiseRejectionEvent","evt"],"sourceRoot":"webpack:///","sources":["./node_modules/@angular/compiler/fesm2020/compiler.mjs","./node_modules/@angular/localize/fesm2020/localize.mjs","./node_modules/@angular/localize/fesm2020/init.mjs","./node_modules/zone.js/fesm2015/zone.js"],"sourcesContent":["/**\n * @license Angular v14.2.0\n * (c) 2010-2022 Google LLC. https://angular.io/\n * License: MIT\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar TagContentType;\n(function (TagContentType) {\n TagContentType[TagContentType[\"RAW_TEXT\"] = 0] = \"RAW_TEXT\";\n TagContentType[TagContentType[\"ESCAPABLE_RAW_TEXT\"] = 1] = \"ESCAPABLE_RAW_TEXT\";\n TagContentType[TagContentType[\"PARSABLE_DATA\"] = 2] = \"PARSABLE_DATA\";\n})(TagContentType || (TagContentType = {}));\nfunction splitNsName(elementName) {\n if (elementName[0] != ':') {\n return [null, elementName];\n }\n const colonIndex = elementName.indexOf(':', 1);\n if (colonIndex === -1) {\n throw new Error(`Unsupported format \"${elementName}\" expecting \":namespace:name\"`);\n }\n return [elementName.slice(1, colonIndex), elementName.slice(colonIndex + 1)];\n}\n// `<ng-container>` tags work the same regardless the namespace\nfunction isNgContainer(tagName) {\n return splitNsName(tagName)[1] === 'ng-container';\n}\n// `<ng-content>` tags work the same regardless the namespace\nfunction isNgContent(tagName) {\n return splitNsName(tagName)[1] === 'ng-content';\n}\n// `<ng-template>` tags work the same regardless the namespace\nfunction isNgTemplate(tagName) {\n return splitNsName(tagName)[1] === 'ng-template';\n}\nfunction getNsPrefix(fullName) {\n return fullName === null ? null : splitNsName(fullName)[0];\n}\nfunction mergeNsAndName(prefix, localName) {\n return prefix ? `:${prefix}:${localName}` : localName;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass HtmlTagDefinition {\n constructor({ closedByChildren, implicitNamespacePrefix, contentType = TagContentType.PARSABLE_DATA, closedByParent = false, isVoid = false, ignoreFirstLf = false, preventNamespaceInheritance = false } = {}) {\n this.closedByChildren = {};\n this.closedByParent = false;\n this.canSelfClose = false;\n if (closedByChildren && closedByChildren.length > 0) {\n closedByChildren.forEach(tagName => this.closedByChildren[tagName] = true);\n }\n this.isVoid = isVoid;\n this.closedByParent = closedByParent || isVoid;\n this.implicitNamespacePrefix = implicitNamespacePrefix || null;\n this.contentType = contentType;\n this.ignoreFirstLf = ignoreFirstLf;\n this.preventNamespaceInheritance = preventNamespaceInheritance;\n }\n isClosedByChild(name) {\n return this.isVoid || name.toLowerCase() in this.closedByChildren;\n }\n getContentType(prefix) {\n if (typeof this.contentType === 'object') {\n const overrideType = prefix === undefined ? undefined : this.contentType[prefix];\n return overrideType ?? this.contentType.default;\n }\n return this.contentType;\n }\n}\nlet _DEFAULT_TAG_DEFINITION;\n// see https://www.w3.org/TR/html51/syntax.html#optional-tags\n// This implementation does not fully conform to the HTML5 spec.\nlet TAG_DEFINITIONS;\nfunction getHtmlTagDefinition(tagName) {\n if (!TAG_DEFINITIONS) {\n _DEFAULT_TAG_DEFINITION = new HtmlTagDefinition();\n TAG_DEFINITIONS = {\n 'base': new HtmlTagDefinition({ isVoid: true }),\n 'meta': new HtmlTagDefinition({ isVoid: true }),\n 'area': new HtmlTagDefinition({ isVoid: true }),\n 'embed': new HtmlTagDefinition({ isVoid: true }),\n 'link': new HtmlTagDefinition({ isVoid: true }),\n 'img': new HtmlTagDefinition({ isVoid: true }),\n 'input': new HtmlTagDefinition({ isVoid: true }),\n 'param': new HtmlTagDefinition({ isVoid: true }),\n 'hr': new HtmlTagDefinition({ isVoid: true }),\n 'br': new HtmlTagDefinition({ isVoid: true }),\n 'source': new HtmlTagDefinition({ isVoid: true }),\n 'track': new HtmlTagDefinition({ isVoid: true }),\n 'wbr': new HtmlTagDefinition({ isVoid: true }),\n 'p': new HtmlTagDefinition({\n closedByChildren: [\n 'address', 'article', 'aside', 'blockquote', 'div', 'dl', 'fieldset',\n 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5',\n 'h6', 'header', 'hgroup', 'hr', 'main', 'nav', 'ol',\n 'p', 'pre', 'section', 'table', 'ul'\n ],\n closedByParent: true\n }),\n 'thead': new HtmlTagDefinition({ closedByChildren: ['tbody', 'tfoot'] }),\n 'tbody': new HtmlTagDefinition({ closedByChildren: ['tbody', 'tfoot'], closedByParent: true }),\n 'tfoot': new HtmlTagDefinition({ closedByChildren: ['tbody'], closedByParent: true }),\n 'tr': new HtmlTagDefinition({ closedByChildren: ['tr'], closedByParent: true }),\n 'td': new HtmlTagDefinition({ closedByChildren: ['td', 'th'], closedByParent: true }),\n 'th': new HtmlTagDefinition({ closedByChildren: ['td', 'th'], closedByParent: true }),\n 'col': new HtmlTagDefinition({ isVoid: true }),\n 'svg': new HtmlTagDefinition({ implicitNamespacePrefix: 'svg' }),\n 'foreignObject': new HtmlTagDefinition({\n // Usually the implicit namespace here would be redundant since it will be inherited from\n // the parent `svg`, but we have to do it for `foreignObject`, because the way the parser\n // works is that the parent node of an end tag is its own start tag which means that\n // the `preventNamespaceInheritance` on `foreignObject` would have it default to the\n // implicit namespace which is `html`, unless specified otherwise.\n implicitNamespacePrefix: 'svg',\n // We want to prevent children of foreignObject from inheriting its namespace, because\n // the point of the element is to allow nodes from other namespaces to be inserted.\n preventNamespaceInheritance: true,\n }),\n 'math': new HtmlTagDefinition({ implicitNamespacePrefix: 'math' }),\n 'li': new HtmlTagDefinition({ closedByChildren: ['li'], closedByParent: true }),\n 'dt': new HtmlTagDefinition({ closedByChildren: ['dt', 'dd'] }),\n 'dd': new HtmlTagDefinition({ closedByChildren: ['dt', 'dd'], closedByParent: true }),\n 'rb': new HtmlTagDefinition({ closedByChildren: ['rb', 'rt', 'rtc', 'rp'], closedByParent: true }),\n 'rt': new HtmlTagDefinition({ closedByChildren: ['rb', 'rt', 'rtc', 'rp'], closedByParent: true }),\n 'rtc': new HtmlTagDefinition({ closedByChildren: ['rb', 'rtc', 'rp'], closedByParent: true }),\n 'rp': new HtmlTagDefinition({ closedByChildren: ['rb', 'rt', 'rtc', 'rp'], closedByParent: true }),\n 'optgroup': new HtmlTagDefinition({ closedByChildren: ['optgroup'], closedByParent: true }),\n 'option': new HtmlTagDefinition({ closedByChildren: ['option', 'optgroup'], closedByParent: true }),\n 'pre': new HtmlTagDefinition({ ignoreFirstLf: true }),\n 'listing': new HtmlTagDefinition({ ignoreFirstLf: true }),\n 'style': new HtmlTagDefinition({ contentType: TagContentType.RAW_TEXT }),\n 'script': new HtmlTagDefinition({ contentType: TagContentType.RAW_TEXT }),\n 'title': new HtmlTagDefinition({\n // The browser supports two separate `title` tags which have to use\n // a different content type: `HTMLTitleElement` and `SVGTitleElement`\n contentType: { default: TagContentType.ESCAPABLE_RAW_TEXT, svg: TagContentType.PARSABLE_DATA }\n }),\n 'textarea': new HtmlTagDefinition({ contentType: TagContentType.ESCAPABLE_RAW_TEXT, ignoreFirstLf: true }),\n };\n }\n // We have to make both a case-sensitive and a case-insensitive lookup, because\n // HTML tag names are case insensitive, whereas some SVG tags are case sensitive.\n return TAG_DEFINITIONS[tagName] ?? TAG_DEFINITIONS[tagName.toLowerCase()] ??\n _DEFAULT_TAG_DEFINITION;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst _SELECTOR_REGEXP = new RegExp('(\\\\:not\\\\()|' + // 1: \":not(\"\n '(([\\\\.\\\\#]?)[-\\\\w]+)|' + // 2: \"tag\"; 3: \".\"/\"#\";\n // \"-\" should appear first in the regexp below as FF31 parses \"[.-\\w]\" as a range\n // 4: attribute; 5: attribute_string; 6: attribute_value\n '(?:\\\\[([-.\\\\w*\\\\\\\\$]+)(?:=([\\\"\\']?)([^\\\\]\\\"\\']*)\\\\5)?\\\\])|' + // \"[name]\", \"[name=value]\",\n // \"[name=\"value\"]\",\n // \"[name='value']\"\n '(\\\\))|' + // 7: \")\"\n '(\\\\s*,\\\\s*)', // 8: \",\"\n'g');\n/**\n * A css selector contains an element name,\n * css classes and attribute/value pairs with the purpose\n * of selecting subsets out of them.\n */\nclass CssSelector {\n constructor() {\n this.element = null;\n this.classNames = [];\n /**\n * The selectors are encoded in pairs where:\n * - even locations are attribute names\n * - odd locations are attribute values.\n *\n * Example:\n * Selector: `[key1=value1][key2]` would parse to:\n * ```\n * ['key1', 'value1', 'key2', '']\n * ```\n */\n this.attrs = [];\n this.notSelectors = [];\n }\n static parse(selector) {\n const results = [];\n const _addResult = (res, cssSel) => {\n if (cssSel.notSelectors.length > 0 && !cssSel.element && cssSel.classNames.length == 0 &&\n cssSel.attrs.length == 0) {\n cssSel.element = '*';\n }\n res.push(cssSel);\n };\n let cssSelector = new CssSelector();\n let match;\n let current = cssSelector;\n let inNot = false;\n _SELECTOR_REGEXP.lastIndex = 0;\n while (match = _SELECTOR_REGEXP.exec(selector)) {\n if (match[1 /* SelectorRegexp.NOT */]) {\n if (inNot) {\n throw new Error('Nesting :not in a selector is not allowed');\n }\n inNot = true;\n current = new CssSelector();\n cssSelector.notSelectors.push(current);\n }\n const tag = match[2 /* SelectorRegexp.TAG */];\n if (tag) {\n const prefix = match[3 /* SelectorRegexp.PREFIX */];\n if (prefix === '#') {\n // #hash\n current.addAttribute('id', tag.slice(1));\n }\n else if (prefix === '.') {\n // Class\n current.addClassName(tag.slice(1));\n }\n else {\n // Element\n current.setElement(tag);\n }\n }\n const attribute = match[4 /* SelectorRegexp.ATTRIBUTE */];\n if (attribute) {\n current.addAttribute(current.unescapeAttribute(attribute), match[6 /* SelectorRegexp.ATTRIBUTE_VALUE */]);\n }\n if (match[7 /* SelectorRegexp.NOT_END */]) {\n inNot = false;\n current = cssSelector;\n }\n if (match[8 /* SelectorRegexp.SEPARATOR */]) {\n if (inNot) {\n throw new Error('Multiple selectors in :not are not supported');\n }\n _addResult(results, cssSelector);\n cssSelector = current = new CssSelector();\n }\n }\n _addResult(results, cssSelector);\n return results;\n }\n /**\n * Unescape `\\$` sequences from the CSS attribute selector.\n *\n * This is needed because `$` can have a special meaning in CSS selectors,\n * but we might want to match an attribute that contains `$`.\n * [MDN web link for more\n * info](https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors).\n * @param attr the attribute to unescape.\n * @returns the unescaped string.\n */\n unescapeAttribute(attr) {\n let result = '';\n let escaping = false;\n for (let i = 0; i < attr.length; i++) {\n const char = attr.charAt(i);\n if (char === '\\\\') {\n escaping = true;\n continue;\n }\n if (char === '$' && !escaping) {\n throw new Error(`Error in attribute selector \"${attr}\". ` +\n `Unescaped \"$\" is not supported. Please escape with \"\\\\$\".`);\n }\n escaping = false;\n result += char;\n }\n return result;\n }\n /**\n * Escape `$` sequences from the CSS attribute selector.\n *\n * This is needed because `$` can have a special meaning in CSS selectors,\n * with this method we are escaping `$` with `\\$'.\n * [MDN web link for more\n * info](https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors).\n * @param attr the attribute to escape.\n * @returns the escaped string.\n */\n escapeAttribute(attr) {\n return attr.replace(/\\\\/g, '\\\\\\\\').replace(/\\$/g, '\\\\$');\n }\n isElementSelector() {\n return this.hasElementSelector() && this.classNames.length == 0 && this.attrs.length == 0 &&\n this.notSelectors.length === 0;\n }\n hasElementSelector() {\n return !!this.element;\n }\n setElement(element = null) {\n this.element = element;\n }\n /** Gets a template string for an element that matches the selector. */\n getMatchingElementTemplate() {\n const tagName = this.element || 'div';\n const classAttr = this.classNames.length > 0 ? ` class=\"${this.classNames.join(' ')}\"` : '';\n let attrs = '';\n for (let i = 0; i < this.attrs.length; i += 2) {\n const attrName = this.attrs[i];\n const attrValue = this.attrs[i + 1] !== '' ? `=\"${this.attrs[i + 1]}\"` : '';\n attrs += ` ${attrName}${attrValue}`;\n }\n return getHtmlTagDefinition(tagName).isVoid ? `<${tagName}${classAttr}${attrs}/>` :\n `<${tagName}${classAttr}${attrs}></${tagName}>`;\n }\n getAttrs() {\n const result = [];\n if (this.classNames.length > 0) {\n result.push('class', this.classNames.join(' '));\n }\n return result.concat(this.attrs);\n }\n addAttribute(name, value = '') {\n this.attrs.push(name, value && value.toLowerCase() || '');\n }\n addClassName(name) {\n this.classNames.push(name.toLowerCase());\n }\n toString() {\n let res = this.element || '';\n if (this.classNames) {\n this.classNames.forEach(klass => res += `.${klass}`);\n }\n if (this.attrs) {\n for (let i = 0; i < this.attrs.length; i += 2) {\n const name = this.escapeAttribute(this.attrs[i]);\n const value = this.attrs[i + 1];\n res += `[${name}${value ? '=' + value : ''}]`;\n }\n }\n this.notSelectors.forEach(notSelector => res += `:not(${notSelector})`);\n return res;\n }\n}\n/**\n * Reads a list of CssSelectors and allows to calculate which ones\n * are contained in a given CssSelector.\n */\nclass SelectorMatcher {\n constructor() {\n this._elementMap = new Map();\n this._elementPartialMap = new Map();\n this._classMap = new Map();\n this._classPartialMap = new Map();\n this._attrValueMap = new Map();\n this._attrValuePartialMap = new Map();\n this._listContexts = [];\n }\n static createNotMatcher(notSelectors) {\n const notMatcher = new SelectorMatcher();\n notMatcher.addSelectables(notSelectors, null);\n return notMatcher;\n }\n addSelectables(cssSelectors, callbackCtxt) {\n let listContext = null;\n if (cssSelectors.length > 1) {\n listContext = new SelectorListContext(cssSelectors);\n this._listContexts.push(listContext);\n }\n for (let i = 0; i < cssSelectors.length; i++) {\n this._addSelectable(cssSelectors[i], callbackCtxt, listContext);\n }\n }\n /**\n * Add an object that can be found later on by calling `match`.\n * @param cssSelector A css selector\n * @param callbackCtxt An opaque object that will be given to the callback of the `match` function\n */\n _addSelectable(cssSelector, callbackCtxt, listContext) {\n let matcher = this;\n const element = cssSelector.element;\n const classNames = cssSelector.classNames;\n const attrs = cssSelector.attrs;\n const selectable = new SelectorContext(cssSelector, callbackCtxt, listContext);\n if (element) {\n const isTerminal = attrs.length === 0 && classNames.length === 0;\n if (isTerminal) {\n this._addTerminal(matcher._elementMap, element, selectable);\n }\n else {\n matcher = this._addPartial(matcher._elementPartialMap, element);\n }\n }\n if (classNames) {\n for (let i = 0; i < classNames.length; i++) {\n const isTerminal = attrs.length === 0 && i === classNames.length - 1;\n const className = classNames[i];\n if (isTerminal) {\n this._addTerminal(matcher._classMap, className, selectable);\n }\n else {\n matcher = this._addPartial(matcher._classPartialMap, className);\n }\n }\n }\n if (attrs) {\n for (let i = 0; i < attrs.length; i += 2) {\n const isTerminal = i === attrs.length - 2;\n const name = attrs[i];\n const value = attrs[i + 1];\n if (isTerminal) {\n const terminalMap = matcher._attrValueMap;\n let terminalValuesMap = terminalMap.get(name);\n if (!terminalValuesMap) {\n terminalValuesMap = new Map();\n terminalMap.set(name, terminalValuesMap);\n }\n this._addTerminal(terminalValuesMap, value, selectable);\n }\n else {\n const partialMap = matcher._attrValuePartialMap;\n let partialValuesMap = partialMap.get(name);\n if (!partialValuesMap) {\n partialValuesMap = new Map();\n partialMap.set(name, partialValuesMap);\n }\n matcher = this._addPartial(partialValuesMap, value);\n }\n }\n }\n }\n _addTerminal(map, name, selectable) {\n let terminalList = map.get(name);\n if (!terminalList) {\n terminalList = [];\n map.set(name, terminalList);\n }\n terminalList.push(selectable);\n }\n _addPartial(map, name) {\n let matcher = map.get(name);\n if (!matcher) {\n matcher = new SelectorMatcher();\n map.set(name, matcher);\n }\n return matcher;\n }\n /**\n * Find the objects that have been added via `addSelectable`\n * whose css selector is contained in the given css selector.\n * @param cssSelector A css selector\n * @param matchedCallback This callback will be called with the object handed into `addSelectable`\n * @return boolean true if a match was found\n */\n match(cssSelector, matchedCallback) {\n let result = false;\n const element = cssSelector.element;\n const classNames = cssSelector.classNames;\n const attrs = cssSelector.attrs;\n for (let i = 0; i < this._listContexts.length; i++) {\n this._listContexts[i].alreadyMatched = false;\n }\n result = this._matchTerminal(this._elementMap, element, cssSelector, matchedCallback) || result;\n result = this._matchPartial(this._elementPartialMap, element, cssSelector, matchedCallback) ||\n result;\n if (classNames) {\n for (let i = 0; i < classNames.length; i++) {\n const className = classNames[i];\n result =\n this._matchTerminal(this._classMap, className, cssSelector, matchedCallback) || result;\n result =\n this._matchPartial(this._classPartialMap, className, cssSelector, matchedCallback) ||\n result;\n }\n }\n if (attrs) {\n for (let i = 0; i < attrs.length; i += 2) {\n const name = attrs[i];\n const value = attrs[i + 1];\n const terminalValuesMap = this._attrValueMap.get(name);\n if (value) {\n result =\n this._matchTerminal(terminalValuesMap, '', cssSelector, matchedCallback) || result;\n }\n result =\n this._matchTerminal(terminalValuesMap, value, cssSelector, matchedCallback) || result;\n const partialValuesMap = this._attrValuePartialMap.get(name);\n if (value) {\n result = this._matchPartial(partialValuesMap, '', cssSelector, matchedCallback) || result;\n }\n result =\n this._matchPartial(partialValuesMap, value, cssSelector, matchedCallback) || result;\n }\n }\n return result;\n }\n /** @internal */\n _matchTerminal(map, name, cssSelector, matchedCallback) {\n if (!map || typeof name !== 'string') {\n return false;\n }\n let selectables = map.get(name) || [];\n const starSelectables = map.get('*');\n if (starSelectables) {\n selectables = selectables.concat(starSelectables);\n }\n if (selectables.length === 0) {\n return false;\n }\n let selectable;\n let result = false;\n for (let i = 0; i < selectables.length; i++) {\n selectable = selectables[i];\n result = selectable.finalize(cssSelector, matchedCallback) || result;\n }\n return result;\n }\n /** @internal */\n _matchPartial(map, name, cssSelector, matchedCallback) {\n if (!map || typeof name !== 'string') {\n return false;\n }\n const nestedSelector = map.get(name);\n if (!nestedSelector) {\n return false;\n }\n // TODO(perf): get rid of recursion and measure again\n // TODO(perf): don't pass the whole selector into the recursion,\n // but only the not processed parts\n return nestedSelector.match(cssSelector, matchedCallback);\n }\n}\nclass SelectorListContext {\n constructor(selectors) {\n this.selectors = selectors;\n this.alreadyMatched = false;\n }\n}\n// Store context to pass back selector and context when a selector is matched\nclass SelectorContext {\n constructor(selector, cbContext, listContext) {\n this.selector = selector;\n this.cbContext = cbContext;\n this.listContext = listContext;\n this.notSelectors = selector.notSelectors;\n }\n finalize(cssSelector, callback) {\n let result = true;\n if (this.notSelectors.length > 0 && (!this.listContext || !this.listContext.alreadyMatched)) {\n const notMatcher = SelectorMatcher.createNotMatcher(this.notSelectors);\n result = !notMatcher.match(cssSelector, null);\n }\n if (result && callback && (!this.listContext || !this.listContext.alreadyMatched)) {\n if (this.listContext) {\n this.listContext.alreadyMatched = true;\n }\n callback(this.selector, this.cbContext);\n }\n return result;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Stores the default value of `emitDistinctChangesOnly` when the `emitDistinctChangesOnly` is not\n// explicitly set.\nconst emitDistinctChangesOnlyDefaultValue = true;\nvar ViewEncapsulation;\n(function (ViewEncapsulation) {\n ViewEncapsulation[ViewEncapsulation[\"Emulated\"] = 0] = \"Emulated\";\n // Historically the 1 value was for `Native` encapsulation which has been removed as of v11.\n ViewEncapsulation[ViewEncapsulation[\"None\"] = 2] = \"None\";\n ViewEncapsulation[ViewEncapsulation[\"ShadowDom\"] = 3] = \"ShadowDom\";\n})(ViewEncapsulation || (ViewEncapsulation = {}));\nvar ChangeDetectionStrategy;\n(function (ChangeDetectionStrategy) {\n ChangeDetectionStrategy[ChangeDetectionStrategy[\"OnPush\"] = 0] = \"OnPush\";\n ChangeDetectionStrategy[ChangeDetectionStrategy[\"Default\"] = 1] = \"Default\";\n})(ChangeDetectionStrategy || (ChangeDetectionStrategy = {}));\nconst CUSTOM_ELEMENTS_SCHEMA = {\n name: 'custom-elements'\n};\nconst NO_ERRORS_SCHEMA = {\n name: 'no-errors-schema'\n};\nconst Type$1 = Function;\nvar SecurityContext;\n(function (SecurityContext) {\n SecurityContext[SecurityContext[\"NONE\"] = 0] = \"NONE\";\n SecurityContext[SecurityContext[\"HTML\"] = 1] = \"HTML\";\n SecurityContext[SecurityContext[\"STYLE\"] = 2] = \"STYLE\";\n SecurityContext[SecurityContext[\"SCRIPT\"] = 3] = \"SCRIPT\";\n SecurityContext[SecurityContext[\"URL\"] = 4] = \"URL\";\n SecurityContext[SecurityContext[\"RESOURCE_URL\"] = 5] = \"RESOURCE_URL\";\n})(SecurityContext || (SecurityContext = {}));\nvar MissingTranslationStrategy;\n(function (MissingTranslationStrategy) {\n MissingTranslationStrategy[MissingTranslationStrategy[\"Error\"] = 0] = \"Error\";\n MissingTranslationStrategy[MissingTranslationStrategy[\"Warning\"] = 1] = \"Warning\";\n MissingTranslationStrategy[MissingTranslationStrategy[\"Ignore\"] = 2] = \"Ignore\";\n})(MissingTranslationStrategy || (MissingTranslationStrategy = {}));\nfunction parserSelectorToSimpleSelector(selector) {\n const classes = selector.classNames && selector.classNames.length ?\n [8 /* SelectorFlags.CLASS */, ...selector.classNames] :\n [];\n const elementName = selector.element && selector.element !== '*' ? selector.element : '';\n return [elementName, ...selector.attrs, ...classes];\n}\nfunction parserSelectorToNegativeSelector(selector) {\n const classes = selector.classNames && selector.classNames.length ?\n [8 /* SelectorFlags.CLASS */, ...selector.classNames] :\n [];\n if (selector.element) {\n return [\n 1 /* SelectorFlags.NOT */ | 4 /* SelectorFlags.ELEMENT */, selector.element, ...selector.attrs, ...classes\n ];\n }\n else if (selector.attrs.length) {\n return [1 /* SelectorFlags.NOT */ | 2 /* SelectorFlags.ATTRIBUTE */, ...selector.attrs, ...classes];\n }\n else {\n return selector.classNames && selector.classNames.length ?\n [1 /* SelectorFlags.NOT */ | 8 /* SelectorFlags.CLASS */, ...selector.classNames] :\n [];\n }\n}\nfunction parserSelectorToR3Selector(selector) {\n const positive = parserSelectorToSimpleSelector(selector);\n const negative = selector.notSelectors && selector.notSelectors.length ?\n selector.notSelectors.map(notSelector => parserSelectorToNegativeSelector(notSelector)) :\n [];\n return positive.concat(...negative);\n}\nfunction parseSelectorToR3Selector(selector) {\n return selector ? CssSelector.parse(selector).map(parserSelectorToR3Selector) : [];\n}\n\nvar core = /*#__PURE__*/Object.freeze({\n __proto__: null,\n emitDistinctChangesOnlyDefaultValue: emitDistinctChangesOnlyDefaultValue,\n get ViewEncapsulation () { return ViewEncapsulation; },\n get ChangeDetectionStrategy () { return ChangeDetectionStrategy; },\n CUSTOM_ELEMENTS_SCHEMA: CUSTOM_ELEMENTS_SCHEMA,\n NO_ERRORS_SCHEMA: NO_ERRORS_SCHEMA,\n Type: Type$1,\n get SecurityContext () { return SecurityContext; },\n get MissingTranslationStrategy () { return MissingTranslationStrategy; },\n parseSelectorToR3Selector: parseSelectorToR3Selector\n});\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst DASH_CASE_REGEXP = /-+([a-z0-9])/g;\nfunction dashCaseToCamelCase(input) {\n return input.replace(DASH_CASE_REGEXP, (...m) => m[1].toUpperCase());\n}\nfunction splitAtColon(input, defaultValues) {\n return _splitAt(input, ':', defaultValues);\n}\nfunction splitAtPeriod(input, defaultValues) {\n return _splitAt(input, '.', defaultValues);\n}\nfunction _splitAt(input, character, defaultValues) {\n const characterIndex = input.indexOf(character);\n if (characterIndex == -1)\n return defaultValues;\n return [input.slice(0, characterIndex).trim(), input.slice(characterIndex + 1).trim()];\n}\nfunction noUndefined(val) {\n return val === undefined ? null : val;\n}\nfunction error(msg) {\n throw new Error(`Internal Error: ${msg}`);\n}\n// Escape characters that have a special meaning in Regular Expressions\nfunction escapeRegExp(s) {\n return s.replace(/([.*+?^=!:${}()|[\\]\\/\\\\])/g, '\\\\$1');\n}\nfunction utf8Encode(str) {\n let encoded = [];\n for (let index = 0; index < str.length; index++) {\n let codePoint = str.charCodeAt(index);\n // decode surrogate\n // see https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n if (codePoint >= 0xd800 && codePoint <= 0xdbff && str.length > (index + 1)) {\n const low = str.charCodeAt(index + 1);\n if (low >= 0xdc00 && low <= 0xdfff) {\n index++;\n codePoint = ((codePoint - 0xd800) << 10) + low - 0xdc00 + 0x10000;\n }\n }\n if (codePoint <= 0x7f) {\n encoded.push(codePoint);\n }\n else if (codePoint <= 0x7ff) {\n encoded.push(((codePoint >> 6) & 0x1F) | 0xc0, (codePoint & 0x3f) | 0x80);\n }\n else if (codePoint <= 0xffff) {\n encoded.push((codePoint >> 12) | 0xe0, ((codePoint >> 6) & 0x3f) | 0x80, (codePoint & 0x3f) | 0x80);\n }\n else if (codePoint <= 0x1fffff) {\n encoded.push(((codePoint >> 18) & 0x07) | 0xf0, ((codePoint >> 12) & 0x3f) | 0x80, ((codePoint >> 6) & 0x3f) | 0x80, (codePoint & 0x3f) | 0x80);\n }\n }\n return encoded;\n}\nfunction stringify(token) {\n if (typeof token === 'string') {\n return token;\n }\n if (Array.isArray(token)) {\n return '[' + token.map(stringify).join(', ') + ']';\n }\n if (token == null) {\n return '' + token;\n }\n if (token.overriddenName) {\n return `${token.overriddenName}`;\n }\n if (token.name) {\n return `${token.name}`;\n }\n if (!token.toString) {\n return 'object';\n }\n // WARNING: do not try to `JSON.stringify(token)` here\n // see https://github.com/angular/angular/issues/23440\n const res = token.toString();\n if (res == null) {\n return '' + res;\n }\n const newLineIndex = res.indexOf('\\n');\n return newLineIndex === -1 ? res : res.substring(0, newLineIndex);\n}\nclass Version {\n constructor(full) {\n this.full = full;\n const splits = full.split('.');\n this.major = splits[0];\n this.minor = splits[1];\n this.patch = splits.slice(2).join('.');\n }\n}\n// Check `global` first, because in Node tests both `global` and `window` may be defined and our\n// `_global` variable should point to the NodeJS `global` in that case. Note: Typeof/Instanceof\n// checks are considered side-effects in Terser. We explicitly mark this as side-effect free:\n// https://github.com/terser/terser/issues/250.\nconst _global = ( /* @__PURE__ */(() => (typeof global !== 'undefined' && global) || (typeof window !== 'undefined' && window) ||\n (typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' &&\n self instanceof WorkerGlobalScope && self))());\nfunction newArray(size, value) {\n const list = [];\n for (let i = 0; i < size; i++) {\n list.push(value);\n }\n return list;\n}\n/**\n * Partitions a given array into 2 arrays, based on a boolean value returned by the condition\n * function.\n *\n * @param arr Input array that should be partitioned\n * @param conditionFn Condition function that is called for each item in a given array and returns a\n * boolean value.\n */\nfunction partitionArray(arr, conditionFn) {\n const truthy = [];\n const falsy = [];\n for (const item of arr) {\n (conditionFn(item) ? truthy : falsy).push(item);\n }\n return [truthy, falsy];\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Represents a big integer using a buffer of its individual digits, with the least significant\n * digit stored at the beginning of the array (little endian).\n *\n * For performance reasons, each instance is mutable. The addition operation can be done in-place\n * to reduce memory pressure of allocation for the digits array.\n */\nclass BigInteger {\n /**\n * Creates a big integer using its individual digits in little endian storage.\n */\n constructor(digits) {\n this.digits = digits;\n }\n static zero() {\n return new BigInteger([0]);\n }\n static one() {\n return new BigInteger([1]);\n }\n /**\n * Creates a clone of this instance.\n */\n clone() {\n return new BigInteger(this.digits.slice());\n }\n /**\n * Returns a new big integer with the sum of `this` and `other` as its value. This does not mutate\n * `this` but instead returns a new instance, unlike `addToSelf`.\n */\n add(other) {\n const result = this.clone();\n result.addToSelf(other);\n return result;\n }\n /**\n * Adds `other` to the instance itself, thereby mutating its value.\n */\n addToSelf(other) {\n const maxNrOfDigits = Math.max(this.digits.length, other.digits.length);\n let carry = 0;\n for (let i = 0; i < maxNrOfDigits; i++) {\n let digitSum = carry;\n if (i < this.digits.length) {\n digitSum += this.digits[i];\n }\n if (i < other.digits.length) {\n digitSum += other.digits[i];\n }\n if (digitSum >= 10) {\n this.digits[i] = digitSum - 10;\n carry = 1;\n }\n else {\n this.digits[i] = digitSum;\n carry = 0;\n }\n }\n // Apply a remaining carry if needed.\n if (carry > 0) {\n this.digits[maxNrOfDigits] = 1;\n }\n }\n /**\n * Builds the decimal string representation of the big integer. As this is stored in\n * little endian, the digits are concatenated in reverse order.\n */\n toString() {\n let res = '';\n for (let i = this.digits.length - 1; i >= 0; i--) {\n res += this.digits[i];\n }\n return res;\n }\n}\n/**\n * Represents a big integer which is optimized for multiplication operations, as its power-of-twos\n * are memoized. See `multiplyBy()` for details on the multiplication algorithm.\n */\nclass BigIntForMultiplication {\n constructor(value) {\n this.powerOfTwos = [value];\n }\n /**\n * Returns the big integer itself.\n */\n getValue() {\n return this.powerOfTwos[0];\n }\n /**\n * Computes the value for `num * b`, where `num` is a JS number and `b` is a big integer. The\n * value for `b` is represented by a storage model that is optimized for this computation.\n *\n * This operation is implemented in N(log2(num)) by continuous halving of the number, where the\n * least-significant bit (LSB) is tested in each iteration. If the bit is set, the bit's index is\n * used as exponent into the power-of-two multiplication of `b`.\n *\n * As an example, consider the multiplication num=42, b=1337. In binary 42 is 0b00101010 and the\n * algorithm unrolls into the following iterations:\n *\n * Iteration | num | LSB | b * 2^iter | Add? | product\n * -----------|------------|------|------------|------|--------\n * 0 | 0b00101010 | 0 | 1337 | No | 0\n * 1 | 0b00010101 | 1 | 2674 | Yes | 2674\n * 2 | 0b00001010 | 0 | 5348 | No | 2674\n * 3 | 0b00000101 | 1 | 10696 | Yes | 13370\n * 4 | 0b00000010 | 0 | 21392 | No | 13370\n * 5 | 0b00000001 | 1 | 42784 | Yes | 56154\n * 6 | 0b00000000 | 0 | 85568 | No | 56154\n *\n * The computed product of 56154 is indeed the correct result.\n *\n * The `BigIntForMultiplication` representation for a big integer provides memoized access to the\n * power-of-two values to reduce the workload in computing those values.\n */\n multiplyBy(num) {\n const product = BigInteger.zero();\n this.multiplyByAndAddTo(num, product);\n return product;\n }\n /**\n * See `multiplyBy()` for details. This function allows for the computed product to be added\n * directly to the provided result big integer.\n */\n multiplyByAndAddTo(num, result) {\n for (let exponent = 0; num !== 0; num = num >>> 1, exponent++) {\n if (num & 1) {\n const value = this.getMultipliedByPowerOfTwo(exponent);\n result.addToSelf(value);\n }\n }\n }\n /**\n * Computes and memoizes the big integer value for `this.number * 2^exponent`.\n */\n getMultipliedByPowerOfTwo(exponent) {\n // Compute the powers up until the requested exponent, where each value is computed from its\n // predecessor. This is simple as `this.number * 2^(exponent - 1)` only has to be doubled (i.e.\n // added to itself) to reach `this.number * 2^exponent`.\n for (let i = this.powerOfTwos.length; i <= exponent; i++) {\n const previousPower = this.powerOfTwos[i - 1];\n this.powerOfTwos[i] = previousPower.add(previousPower);\n }\n return this.powerOfTwos[exponent];\n }\n}\n/**\n * Represents an exponentiation operation for the provided base, of which exponents are computed and\n * memoized. The results are represented by a `BigIntForMultiplication` which is tailored for\n * multiplication operations by memoizing the power-of-twos. This effectively results in a matrix\n * representation that is lazily computed upon request.\n */\nclass BigIntExponentiation {\n constructor(base) {\n this.base = base;\n this.exponents = [new BigIntForMultiplication(BigInteger.one())];\n }\n /**\n * Compute the value for `this.base^exponent`, resulting in a big integer that is optimized for\n * further multiplication operations.\n */\n toThePowerOf(exponent) {\n // Compute the results up until the requested exponent, where every value is computed from its\n // predecessor. This is because `this.base^(exponent - 1)` only has to be multiplied by `base`\n // to reach `this.base^exponent`.\n for (let i = this.exponents.length; i <= exponent; i++) {\n const value = this.exponents[i - 1].multiplyBy(this.base);\n this.exponents[i] = new BigIntForMultiplication(value);\n }\n return this.exponents[exponent];\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Return the message id or compute it using the XLIFF1 digest.\n */\nfunction digest$1(message) {\n return message.id || computeDigest(message);\n}\n/**\n * Compute the message id using the XLIFF1 digest.\n */\nfunction computeDigest(message) {\n return sha1(serializeNodes(message.nodes).join('') + `[${message.meaning}]`);\n}\n/**\n * Return the message id or compute it using the XLIFF2/XMB/$localize digest.\n */\nfunction decimalDigest(message) {\n return message.id || computeDecimalDigest(message);\n}\n/**\n * Compute the message id using the XLIFF2/XMB/$localize digest.\n */\nfunction computeDecimalDigest(message) {\n const visitor = new _SerializerIgnoreIcuExpVisitor();\n const parts = message.nodes.map(a => a.visit(visitor, null));\n return computeMsgId(parts.join(''), message.meaning);\n}\n/**\n * Serialize the i18n ast to something xml-like in order to generate an UID.\n *\n * The visitor is also used in the i18n parser tests\n *\n * @internal\n */\nclass _SerializerVisitor {\n visitText(text, context) {\n return text.value;\n }\n visitContainer(container, context) {\n return `[${container.children.map(child => child.visit(this)).join(', ')}]`;\n }\n visitIcu(icu, context) {\n const strCases = Object.keys(icu.cases).map((k) => `${k} {${icu.cases[k].visit(this)}}`);\n return `{${icu.expression}, ${icu.type}, ${strCases.join(', ')}}`;\n }\n visitTagPlaceholder(ph, context) {\n return ph.isVoid ?\n `<ph tag name=\"${ph.startName}\"/>` :\n `<ph tag name=\"${ph.startName}\">${ph.children.map(child => child.visit(this)).join(', ')}</ph name=\"${ph.closeName}\">`;\n }\n visitPlaceholder(ph, context) {\n return ph.value ? `<ph name=\"${ph.name}\">${ph.value}</ph>` : `<ph name=\"${ph.name}\"/>`;\n }\n visitIcuPlaceholder(ph, context) {\n return `<ph icu name=\"${ph.name}\">${ph.value.visit(this)}</ph>`;\n }\n}\nconst serializerVisitor$1 = new _SerializerVisitor();\nfunction serializeNodes(nodes) {\n return nodes.map(a => a.visit(serializerVisitor$1, null));\n}\n/**\n * Serialize the i18n ast to something xml-like in order to generate an UID.\n *\n * Ignore the ICU expressions so that message IDs stays identical if only the expression changes.\n *\n * @internal\n */\nclass _SerializerIgnoreIcuExpVisitor extends _SerializerVisitor {\n visitIcu(icu, context) {\n let strCases = Object.keys(icu.cases).map((k) => `${k} {${icu.cases[k].visit(this)}}`);\n // Do not take the expression into account\n return `{${icu.type}, ${strCases.join(', ')}}`;\n }\n}\n/**\n * Compute the SHA1 of the given string\n *\n * see https://csrc.nist.gov/publications/fips/fips180-4/fips-180-4.pdf\n *\n * WARNING: this function has not been designed not tested with security in mind.\n * DO NOT USE IT IN A SECURITY SENSITIVE CONTEXT.\n */\nfunction sha1(str) {\n const utf8 = utf8Encode(str);\n const words32 = bytesToWords32(utf8, Endian.Big);\n const len = utf8.length * 8;\n const w = newArray(80);\n let a = 0x67452301, b = 0xefcdab89, c = 0x98badcfe, d = 0x10325476, e = 0xc3d2e1f0;\n words32[len >> 5] |= 0x80 << (24 - len % 32);\n words32[((len + 64 >> 9) << 4) + 15] = len;\n for (let i = 0; i < words32.length; i += 16) {\n const h0 = a, h1 = b, h2 = c, h3 = d, h4 = e;\n for (let j = 0; j < 80; j++) {\n if (j < 16) {\n w[j] = words32[i + j];\n }\n else {\n w[j] = rol32(w[j - 3] ^ w[j - 8] ^ w[j - 14] ^ w[j - 16], 1);\n }\n const fkVal = fk(j, b, c, d);\n const f = fkVal[0];\n const k = fkVal[1];\n const temp = [rol32(a, 5), f, e, k, w[j]].reduce(add32);\n e = d;\n d = c;\n c = rol32(b, 30);\n b = a;\n a = temp;\n }\n a = add32(a, h0);\n b = add32(b, h1);\n c = add32(c, h2);\n d = add32(d, h3);\n e = add32(e, h4);\n }\n return bytesToHexString(words32ToByteString([a, b, c, d, e]));\n}\nfunction fk(index, b, c, d) {\n if (index < 20) {\n return [(b & c) | (~b & d), 0x5a827999];\n }\n if (index < 40) {\n return [b ^ c ^ d, 0x6ed9eba1];\n }\n if (index < 60) {\n return [(b & c) | (b & d) | (c & d), 0x8f1bbcdc];\n }\n return [b ^ c ^ d, 0xca62c1d6];\n}\n/**\n * Compute the fingerprint of the given string\n *\n * The output is 64 bit number encoded as a decimal string\n *\n * based on:\n * https://github.com/google/closure-compiler/blob/master/src/com/google/javascript/jscomp/GoogleJsMessageIdGenerator.java\n */\nfunction fingerprint(str) {\n const utf8 = utf8Encode(str);\n let hi = hash32(utf8, 0);\n let lo = hash32(utf8, 102072);\n if (hi == 0 && (lo == 0 || lo == 1)) {\n hi = hi ^ 0x130f9bef;\n lo = lo ^ -0x6b5f56d8;\n }\n return [hi, lo];\n}\nfunction computeMsgId(msg, meaning = '') {\n let msgFingerprint = fingerprint(msg);\n if (meaning) {\n const meaningFingerprint = fingerprint(meaning);\n msgFingerprint = add64(rol64(msgFingerprint, 1), meaningFingerprint);\n }\n const hi = msgFingerprint[0];\n const lo = msgFingerprint[1];\n return wordsToDecimalString(hi & 0x7fffffff, lo);\n}\nfunction hash32(bytes, c) {\n let a = 0x9e3779b9, b = 0x9e3779b9;\n let i;\n const len = bytes.length;\n for (i = 0; i + 12 <= len; i += 12) {\n a = add32(a, wordAt(bytes, i, Endian.Little));\n b = add32(b, wordAt(bytes, i + 4, Endian.Little));\n c = add32(c, wordAt(bytes, i + 8, Endian.Little));\n const res = mix(a, b, c);\n a = res[0], b = res[1], c = res[2];\n }\n a = add32(a, wordAt(bytes, i, Endian.Little));\n b = add32(b, wordAt(bytes, i + 4, Endian.Little));\n // the first byte of c is reserved for the length\n c = add32(c, len);\n c = add32(c, wordAt(bytes, i + 8, Endian.Little) << 8);\n return mix(a, b, c)[2];\n}\n// clang-format off\nfunction mix(a, b, c) {\n a = sub32(a, b);\n a = sub32(a, c);\n a ^= c >>> 13;\n b = sub32(b, c);\n b = sub32(b, a);\n b ^= a << 8;\n c = sub32(c, a);\n c = sub32(c, b);\n c ^= b >>> 13;\n a = sub32(a, b);\n a = sub32(a, c);\n a ^= c >>> 12;\n b = sub32(b, c);\n b = sub32(b, a);\n b ^= a << 16;\n c = sub32(c, a);\n c = sub32(c, b);\n c ^= b >>> 5;\n a = sub32(a, b);\n a = sub32(a, c);\n a ^= c >>> 3;\n b = sub32(b, c);\n b = sub32(b, a);\n b ^= a << 10;\n c = sub32(c, a);\n c = sub32(c, b);\n c ^= b >>> 15;\n return [a, b, c];\n}\n// clang-format on\n// Utils\nvar Endian;\n(function (Endian) {\n Endian[Endian[\"Little\"] = 0] = \"Little\";\n Endian[Endian[\"Big\"] = 1] = \"Big\";\n})(Endian || (Endian = {}));\nfunction add32(a, b) {\n return add32to64(a, b)[1];\n}\nfunction add32to64(a, b) {\n const low = (a & 0xffff) + (b & 0xffff);\n const high = (a >>> 16) + (b >>> 16) + (low >>> 16);\n return [high >>> 16, (high << 16) | (low & 0xffff)];\n}\nfunction add64(a, b) {\n const ah = a[0], al = a[1];\n const bh = b[0], bl = b[1];\n const result = add32to64(al, bl);\n const carry = result[0];\n const l = result[1];\n const h = add32(add32(ah, bh), carry);\n return [h, l];\n}\nfunction sub32(a, b) {\n const low = (a & 0xffff) - (b & 0xffff);\n const high = (a >> 16) - (b >> 16) + (low >> 16);\n return (high << 16) | (low & 0xffff);\n}\n// Rotate a 32b number left `count` position\nfunction rol32(a, count) {\n return (a << count) | (a >>> (32 - count));\n}\n// Rotate a 64b number left `count` position\nfunction rol64(num, count) {\n const hi = num[0], lo = num[1];\n const h = (hi << count) | (lo >>> (32 - count));\n const l = (lo << count) | (hi >>> (32 - count));\n return [h, l];\n}\nfunction bytesToWords32(bytes, endian) {\n const size = (bytes.length + 3) >>> 2;\n const words32 = [];\n for (let i = 0; i < size; i++) {\n words32[i] = wordAt(bytes, i * 4, endian);\n }\n return words32;\n}\nfunction byteAt(bytes, index) {\n return index >= bytes.length ? 0 : bytes[index];\n}\nfunction wordAt(bytes, index, endian) {\n let word = 0;\n if (endian === Endian.Big) {\n for (let i = 0; i < 4; i++) {\n word += byteAt(bytes, index + i) << (24 - 8 * i);\n }\n }\n else {\n for (let i = 0; i < 4; i++) {\n word += byteAt(bytes, index + i) << 8 * i;\n }\n }\n return word;\n}\nfunction words32ToByteString(words32) {\n return words32.reduce((bytes, word) => bytes.concat(word32ToByteString(word)), []);\n}\nfunction word32ToByteString(word) {\n let bytes = [];\n for (let i = 0; i < 4; i++) {\n bytes.push((word >>> 8 * (3 - i)) & 0xff);\n }\n return bytes;\n}\nfunction bytesToHexString(bytes) {\n let hex = '';\n for (let i = 0; i < bytes.length; i++) {\n const b = byteAt(bytes, i);\n hex += (b >>> 4).toString(16) + (b & 0x0f).toString(16);\n }\n return hex.toLowerCase();\n}\n/**\n * Create a shared exponentiation pool for base-256 computations. This shared pool provides memoized\n * power-of-256 results with memoized power-of-two computations for efficient multiplication.\n *\n * For our purposes, this can be safely stored as a global without memory concerns. The reason is\n * that we encode two words, so only need the 0th (for the low word) and 4th (for the high word)\n * exponent.\n */\nconst base256 = new BigIntExponentiation(256);\n/**\n * Represents two 32-bit words as a single decimal number. This requires a big integer storage\n * model as JS numbers are not accurate enough to represent the 64-bit number.\n *\n * Based on https://www.danvk.org/hex2dec.html\n */\nfunction wordsToDecimalString(hi, lo) {\n // Encode the four bytes in lo in the lower digits of the decimal number.\n // Note: the multiplication results in lo itself but represented by a big integer using its\n // decimal digits.\n const decimal = base256.toThePowerOf(0).multiplyBy(lo);\n // Encode the four bytes in hi above the four lo bytes. lo is a maximum of (2^8)^4, which is why\n // this multiplication factor is applied.\n base256.toThePowerOf(4).multiplyByAndAddTo(hi, decimal);\n return decimal.toString();\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n//// Types\nvar TypeModifier;\n(function (TypeModifier) {\n TypeModifier[TypeModifier[\"None\"] = 0] = \"None\";\n TypeModifier[TypeModifier[\"Const\"] = 1] = \"Const\";\n})(TypeModifier || (TypeModifier = {}));\nclass Type {\n constructor(modifiers = TypeModifier.None) {\n this.modifiers = modifiers;\n }\n hasModifier(modifier) {\n return (this.modifiers & modifier) !== 0;\n }\n}\nvar BuiltinTypeName;\n(function (BuiltinTypeName) {\n BuiltinTypeName[BuiltinTypeName[\"Dynamic\"] = 0] = \"Dynamic\";\n BuiltinTypeName[BuiltinTypeName[\"Bool\"] = 1] = \"Bool\";\n BuiltinTypeName[BuiltinTypeName[\"String\"] = 2] = \"String\";\n BuiltinTypeName[BuiltinTypeName[\"Int\"] = 3] = \"Int\";\n BuiltinTypeName[BuiltinTypeName[\"Number\"] = 4] = \"Number\";\n BuiltinTypeName[BuiltinTypeName[\"Function\"] = 5] = \"Function\";\n BuiltinTypeName[BuiltinTypeName[\"Inferred\"] = 6] = \"Inferred\";\n BuiltinTypeName[BuiltinTypeName[\"None\"] = 7] = \"None\";\n})(BuiltinTypeName || (BuiltinTypeName = {}));\nclass BuiltinType extends Type {\n constructor(name, modifiers) {\n super(modifiers);\n this.name = name;\n }\n visitType(visitor, context) {\n return visitor.visitBuiltinType(this, context);\n }\n}\nclass ExpressionType extends Type {\n constructor(value, modifiers, typeParams = null) {\n super(modifiers);\n this.value = value;\n this.typeParams = typeParams;\n }\n visitType(visitor, context) {\n return visitor.visitExpressionType(this, context);\n }\n}\nclass ArrayType extends Type {\n constructor(of, modifiers) {\n super(modifiers);\n this.of = of;\n }\n visitType(visitor, context) {\n return visitor.visitArrayType(this, context);\n }\n}\nclass MapType extends Type {\n constructor(valueType, modifiers) {\n super(modifiers);\n this.valueType = valueType || null;\n }\n visitType(visitor, context) {\n return visitor.visitMapType(this, context);\n }\n}\nconst DYNAMIC_TYPE = new BuiltinType(BuiltinTypeName.Dynamic);\nconst INFERRED_TYPE = new BuiltinType(BuiltinTypeName.Inferred);\nconst BOOL_TYPE = new BuiltinType(BuiltinTypeName.Bool);\nconst INT_TYPE = new BuiltinType(BuiltinTypeName.Int);\nconst NUMBER_TYPE = new BuiltinType(BuiltinTypeName.Number);\nconst STRING_TYPE = new BuiltinType(BuiltinTypeName.String);\nconst FUNCTION_TYPE = new BuiltinType(BuiltinTypeName.Function);\nconst NONE_TYPE = new BuiltinType(BuiltinTypeName.None);\n///// Expressions\nvar UnaryOperator;\n(function (UnaryOperator) {\n UnaryOperator[UnaryOperator[\"Minus\"] = 0] = \"Minus\";\n UnaryOperator[UnaryOperator[\"Plus\"] = 1] = \"Plus\";\n})(UnaryOperator || (UnaryOperator = {}));\nvar BinaryOperator;\n(function (BinaryOperator) {\n BinaryOperator[BinaryOperator[\"Equals\"] = 0] = \"Equals\";\n BinaryOperator[BinaryOperator[\"NotEquals\"] = 1] = \"NotEquals\";\n BinaryOperator[BinaryOperator[\"Identical\"] = 2] = \"Identical\";\n BinaryOperator[BinaryOperator[\"NotIdentical\"] = 3] = \"NotIdentical\";\n BinaryOperator[BinaryOperator[\"Minus\"] = 4] = \"Minus\";\n BinaryOperator[BinaryOperator[\"Plus\"] = 5] = \"Plus\";\n BinaryOperator[BinaryOperator[\"Divide\"] = 6] = \"Divide\";\n BinaryOperator[BinaryOperator[\"Multiply\"] = 7] = \"Multiply\";\n BinaryOperator[BinaryOperator[\"Modulo\"] = 8] = \"Modulo\";\n BinaryOperator[BinaryOperator[\"And\"] = 9] = \"And\";\n BinaryOperator[BinaryOperator[\"Or\"] = 10] = \"Or\";\n BinaryOperator[BinaryOperator[\"BitwiseAnd\"] = 11] = \"BitwiseAnd\";\n BinaryOperator[BinaryOperator[\"Lower\"] = 12] = \"Lower\";\n BinaryOperator[BinaryOperator[\"LowerEquals\"] = 13] = \"LowerEquals\";\n BinaryOperator[BinaryOperator[\"Bigger\"] = 14] = \"Bigger\";\n BinaryOperator[BinaryOperator[\"BiggerEquals\"] = 15] = \"BiggerEquals\";\n BinaryOperator[BinaryOperator[\"NullishCoalesce\"] = 16] = \"NullishCoalesce\";\n})(BinaryOperator || (BinaryOperator = {}));\nfunction nullSafeIsEquivalent(base, other) {\n if (base == null || other == null) {\n return base == other;\n }\n return base.isEquivalent(other);\n}\nfunction areAllEquivalentPredicate(base, other, equivalentPredicate) {\n const len = base.length;\n if (len !== other.length) {\n return false;\n }\n for (let i = 0; i < len; i++) {\n if (!equivalentPredicate(base[i], other[i])) {\n return false;\n }\n }\n return true;\n}\nfunction areAllEquivalent(base, other) {\n return areAllEquivalentPredicate(base, other, (baseElement, otherElement) => baseElement.isEquivalent(otherElement));\n}\nclass Expression {\n constructor(type, sourceSpan) {\n this.type = type || null;\n this.sourceSpan = sourceSpan || null;\n }\n prop(name, sourceSpan) {\n return new ReadPropExpr(this, name, null, sourceSpan);\n }\n key(index, type, sourceSpan) {\n return new ReadKeyExpr(this, index, type, sourceSpan);\n }\n callFn(params, sourceSpan, pure) {\n return new InvokeFunctionExpr(this, params, null, sourceSpan, pure);\n }\n instantiate(params, type, sourceSpan) {\n return new InstantiateExpr(this, params, type, sourceSpan);\n }\n conditional(trueCase, falseCase = null, sourceSpan) {\n return new ConditionalExpr(this, trueCase, falseCase, null, sourceSpan);\n }\n equals(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Equals, this, rhs, null, sourceSpan);\n }\n notEquals(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.NotEquals, this, rhs, null, sourceSpan);\n }\n identical(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Identical, this, rhs, null, sourceSpan);\n }\n notIdentical(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.NotIdentical, this, rhs, null, sourceSpan);\n }\n minus(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Minus, this, rhs, null, sourceSpan);\n }\n plus(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Plus, this, rhs, null, sourceSpan);\n }\n divide(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Divide, this, rhs, null, sourceSpan);\n }\n multiply(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Multiply, this, rhs, null, sourceSpan);\n }\n modulo(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Modulo, this, rhs, null, sourceSpan);\n }\n and(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.And, this, rhs, null, sourceSpan);\n }\n bitwiseAnd(rhs, sourceSpan, parens = true) {\n return new BinaryOperatorExpr(BinaryOperator.BitwiseAnd, this, rhs, null, sourceSpan, parens);\n }\n or(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Or, this, rhs, null, sourceSpan);\n }\n lower(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Lower, this, rhs, null, sourceSpan);\n }\n lowerEquals(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.LowerEquals, this, rhs, null, sourceSpan);\n }\n bigger(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Bigger, this, rhs, null, sourceSpan);\n }\n biggerEquals(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.BiggerEquals, this, rhs, null, sourceSpan);\n }\n isBlank(sourceSpan) {\n // Note: We use equals by purpose here to compare to null and undefined in JS.\n // We use the typed null to allow strictNullChecks to narrow types.\n return this.equals(TYPED_NULL_EXPR, sourceSpan);\n }\n nullishCoalesce(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.NullishCoalesce, this, rhs, null, sourceSpan);\n }\n toStmt() {\n return new ExpressionStatement(this, null);\n }\n}\nclass ReadVarExpr extends Expression {\n constructor(name, type, sourceSpan) {\n super(type, sourceSpan);\n this.name = name;\n }\n isEquivalent(e) {\n return e instanceof ReadVarExpr && this.name === e.name;\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitReadVarExpr(this, context);\n }\n set(value) {\n return new WriteVarExpr(this.name, value, null, this.sourceSpan);\n }\n}\nclass TypeofExpr extends Expression {\n constructor(expr, type, sourceSpan) {\n super(type, sourceSpan);\n this.expr = expr;\n }\n visitExpression(visitor, context) {\n return visitor.visitTypeofExpr(this, context);\n }\n isEquivalent(e) {\n return e instanceof TypeofExpr && e.expr.isEquivalent(this.expr);\n }\n isConstant() {\n return this.expr.isConstant();\n }\n}\nclass WrappedNodeExpr extends Expression {\n constructor(node, type, sourceSpan) {\n super(type, sourceSpan);\n this.node = node;\n }\n isEquivalent(e) {\n return e instanceof WrappedNodeExpr && this.node === e.node;\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitWrappedNodeExpr(this, context);\n }\n}\nclass WriteVarExpr extends Expression {\n constructor(name, value, type, sourceSpan) {\n super(type || value.type, sourceSpan);\n this.name = name;\n this.value = value;\n }\n isEquivalent(e) {\n return e instanceof WriteVarExpr && this.name === e.name && this.value.isEquivalent(e.value);\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitWriteVarExpr(this, context);\n }\n toDeclStmt(type, modifiers) {\n return new DeclareVarStmt(this.name, this.value, type, modifiers, this.sourceSpan);\n }\n toConstDecl() {\n return this.toDeclStmt(INFERRED_TYPE, StmtModifier.Final);\n }\n}\nclass WriteKeyExpr extends Expression {\n constructor(receiver, index, value, type, sourceSpan) {\n super(type || value.type, sourceSpan);\n this.receiver = receiver;\n this.index = index;\n this.value = value;\n }\n isEquivalent(e) {\n return e instanceof WriteKeyExpr && this.receiver.isEquivalent(e.receiver) &&\n this.index.isEquivalent(e.index) && this.value.isEquivalent(e.value);\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitWriteKeyExpr(this, context);\n }\n}\nclass WritePropExpr extends Expression {\n constructor(receiver, name, value, type, sourceSpan) {\n super(type || value.type, sourceSpan);\n this.receiver = receiver;\n this.name = name;\n this.value = value;\n }\n isEquivalent(e) {\n return e instanceof WritePropExpr && this.receiver.isEquivalent(e.receiver) &&\n this.name === e.name && this.value.isEquivalent(e.value);\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitWritePropExpr(this, context);\n }\n}\nclass InvokeFunctionExpr extends Expression {\n constructor(fn, args, type, sourceSpan, pure = false) {\n super(type, sourceSpan);\n this.fn = fn;\n this.args = args;\n this.pure = pure;\n }\n isEquivalent(e) {\n return e instanceof InvokeFunctionExpr && this.fn.isEquivalent(e.fn) &&\n areAllEquivalent(this.args, e.args) && this.pure === e.pure;\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitInvokeFunctionExpr(this, context);\n }\n}\nclass TaggedTemplateExpr extends Expression {\n constructor(tag, template, type, sourceSpan) {\n super(type, sourceSpan);\n this.tag = tag;\n this.template = template;\n }\n isEquivalent(e) {\n return e instanceof TaggedTemplateExpr && this.tag.isEquivalent(e.tag) &&\n areAllEquivalentPredicate(this.template.elements, e.template.elements, (a, b) => a.text === b.text) &&\n areAllEquivalent(this.template.expressions, e.template.expressions);\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitTaggedTemplateExpr(this, context);\n }\n}\nclass InstantiateExpr extends Expression {\n constructor(classExpr, args, type, sourceSpan) {\n super(type, sourceSpan);\n this.classExpr = classExpr;\n this.args = args;\n }\n isEquivalent(e) {\n return e instanceof InstantiateExpr && this.classExpr.isEquivalent(e.classExpr) &&\n areAllEquivalent(this.args, e.args);\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitInstantiateExpr(this, context);\n }\n}\nclass LiteralExpr extends Expression {\n constructor(value, type, sourceSpan) {\n super(type, sourceSpan);\n this.value = value;\n }\n isEquivalent(e) {\n return e instanceof LiteralExpr && this.value === e.value;\n }\n isConstant() {\n return true;\n }\n visitExpression(visitor, context) {\n return visitor.visitLiteralExpr(this, context);\n }\n}\nclass TemplateLiteral {\n constructor(elements, expressions) {\n this.elements = elements;\n this.expressions = expressions;\n }\n}\nclass TemplateLiteralElement {\n constructor(text, sourceSpan, rawText) {\n this.text = text;\n this.sourceSpan = sourceSpan;\n // If `rawText` is not provided, try to extract the raw string from its\n // associated `sourceSpan`. If that is also not available, \"fake\" the raw\n // string instead by escaping the following control sequences:\n // - \"\\\" would otherwise indicate that the next character is a control character.\n // - \"`\" and \"${\" are template string control sequences that would otherwise prematurely\n // indicate the end of the template literal element.\n this.rawText =\n rawText ?? sourceSpan?.toString() ?? escapeForTemplateLiteral(escapeSlashes(text));\n }\n}\nclass LiteralPiece {\n constructor(text, sourceSpan) {\n this.text = text;\n this.sourceSpan = sourceSpan;\n }\n}\nclass PlaceholderPiece {\n /**\n * Create a new instance of a `PlaceholderPiece`.\n *\n * @param text the name of this placeholder (e.g. `PH_1`).\n * @param sourceSpan the location of this placeholder in its localized message the source code.\n * @param associatedMessage reference to another message that this placeholder is associated with.\n * The `associatedMessage` is mainly used to provide a relationship to an ICU message that has\n * been extracted out from the message containing the placeholder.\n */\n constructor(text, sourceSpan, associatedMessage) {\n this.text = text;\n this.sourceSpan = sourceSpan;\n this.associatedMessage = associatedMessage;\n }\n}\nconst MEANING_SEPARATOR$1 = '|';\nconst ID_SEPARATOR$1 = '@@';\nconst LEGACY_ID_INDICATOR = '␟';\nclass LocalizedString extends Expression {\n constructor(metaBlock, messageParts, placeHolderNames, expressions, sourceSpan) {\n super(STRING_TYPE, sourceSpan);\n this.metaBlock = metaBlock;\n this.messageParts = messageParts;\n this.placeHolderNames = placeHolderNames;\n this.expressions = expressions;\n }\n isEquivalent(e) {\n // return e instanceof LocalizedString && this.message === e.message;\n return false;\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitLocalizedString(this, context);\n }\n /**\n * Serialize the given `meta` and `messagePart` into \"cooked\" and \"raw\" strings that can be used\n * in a `$localize` tagged string. The format of the metadata is the same as that parsed by\n * `parseI18nMeta()`.\n *\n * @param meta The metadata to serialize\n * @param messagePart The first part of the tagged string\n */\n serializeI18nHead() {\n let metaBlock = this.metaBlock.description || '';\n if (this.metaBlock.meaning) {\n metaBlock = `${this.metaBlock.meaning}${MEANING_SEPARATOR$1}${metaBlock}`;\n }\n if (this.metaBlock.customId) {\n metaBlock = `${metaBlock}${ID_SEPARATOR$1}${this.metaBlock.customId}`;\n }\n if (this.metaBlock.legacyIds) {\n this.metaBlock.legacyIds.forEach(legacyId => {\n metaBlock = `${metaBlock}${LEGACY_ID_INDICATOR}${legacyId}`;\n });\n }\n return createCookedRawString(metaBlock, this.messageParts[0].text, this.getMessagePartSourceSpan(0));\n }\n getMessagePartSourceSpan(i) {\n return this.messageParts[i]?.sourceSpan ?? this.sourceSpan;\n }\n getPlaceholderSourceSpan(i) {\n return this.placeHolderNames[i]?.sourceSpan ?? this.expressions[i]?.sourceSpan ??\n this.sourceSpan;\n }\n /**\n * Serialize the given `placeholderName` and `messagePart` into \"cooked\" and \"raw\" strings that\n * can be used in a `$localize` tagged string.\n *\n * The format is `:<placeholder-name>[@@<associated-id>]:`.\n *\n * The `associated-id` is the message id of the (usually an ICU) message to which this placeholder\n * refers.\n *\n * @param partIndex The index of the message part to serialize.\n */\n serializeI18nTemplatePart(partIndex) {\n const placeholder = this.placeHolderNames[partIndex - 1];\n const messagePart = this.messageParts[partIndex];\n let metaBlock = placeholder.text;\n if (placeholder.associatedMessage?.legacyIds.length === 0) {\n metaBlock += `${ID_SEPARATOR$1}${computeMsgId(placeholder.associatedMessage.messageString, placeholder.associatedMessage.meaning)}`;\n }\n return createCookedRawString(metaBlock, messagePart.text, this.getMessagePartSourceSpan(partIndex));\n }\n}\nconst escapeSlashes = (str) => str.replace(/\\\\/g, '\\\\\\\\');\nconst escapeStartingColon = (str) => str.replace(/^:/, '\\\\:');\nconst escapeColons = (str) => str.replace(/:/g, '\\\\:');\nconst escapeForTemplateLiteral = (str) => str.replace(/`/g, '\\\\`').replace(/\\${/g, '$\\\\{');\n/**\n * Creates a `{cooked, raw}` object from the `metaBlock` and `messagePart`.\n *\n * The `raw` text must have various character sequences escaped:\n * * \"\\\" would otherwise indicate that the next character is a control character.\n * * \"`\" and \"${\" are template string control sequences that would otherwise prematurely indicate\n * the end of a message part.\n * * \":\" inside a metablock would prematurely indicate the end of the metablock.\n * * \":\" at the start of a messagePart with no metablock would erroneously indicate the start of a\n * metablock.\n *\n * @param metaBlock Any metadata that should be prepended to the string\n * @param messagePart The message part of the string\n */\nfunction createCookedRawString(metaBlock, messagePart, range) {\n if (metaBlock === '') {\n return {\n cooked: messagePart,\n raw: escapeForTemplateLiteral(escapeStartingColon(escapeSlashes(messagePart))),\n range,\n };\n }\n else {\n return {\n cooked: `:${metaBlock}:${messagePart}`,\n raw: escapeForTemplateLiteral(`:${escapeColons(escapeSlashes(metaBlock))}:${escapeSlashes(messagePart)}`),\n range,\n };\n }\n}\nclass ExternalExpr extends Expression {\n constructor(value, type, typeParams = null, sourceSpan) {\n super(type, sourceSpan);\n this.value = value;\n this.typeParams = typeParams;\n }\n isEquivalent(e) {\n return e instanceof ExternalExpr && this.value.name === e.value.name &&\n this.value.moduleName === e.value.moduleName && this.value.runtime === e.value.runtime;\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitExternalExpr(this, context);\n }\n}\nclass ExternalReference {\n constructor(moduleName, name, runtime) {\n this.moduleName = moduleName;\n this.name = name;\n this.runtime = runtime;\n }\n}\nclass ConditionalExpr extends Expression {\n constructor(condition, trueCase, falseCase = null, type, sourceSpan) {\n super(type || trueCase.type, sourceSpan);\n this.condition = condition;\n this.falseCase = falseCase;\n this.trueCase = trueCase;\n }\n isEquivalent(e) {\n return e instanceof ConditionalExpr && this.condition.isEquivalent(e.condition) &&\n this.trueCase.isEquivalent(e.trueCase) && nullSafeIsEquivalent(this.falseCase, e.falseCase);\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitConditionalExpr(this, context);\n }\n}\nclass NotExpr extends Expression {\n constructor(condition, sourceSpan) {\n super(BOOL_TYPE, sourceSpan);\n this.condition = condition;\n }\n isEquivalent(e) {\n return e instanceof NotExpr && this.condition.isEquivalent(e.condition);\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitNotExpr(this, context);\n }\n}\nclass FnParam {\n constructor(name, type = null) {\n this.name = name;\n this.type = type;\n }\n isEquivalent(param) {\n return this.name === param.name;\n }\n}\nclass FunctionExpr extends Expression {\n constructor(params, statements, type, sourceSpan, name) {\n super(type, sourceSpan);\n this.params = params;\n this.statements = statements;\n this.name = name;\n }\n isEquivalent(e) {\n return e instanceof FunctionExpr && areAllEquivalent(this.params, e.params) &&\n areAllEquivalent(this.statements, e.statements);\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitFunctionExpr(this, context);\n }\n toDeclStmt(name, modifiers) {\n return new DeclareFunctionStmt(name, this.params, this.statements, this.type, modifiers, this.sourceSpan);\n }\n}\nclass UnaryOperatorExpr extends Expression {\n constructor(operator, expr, type, sourceSpan, parens = true) {\n super(type || NUMBER_TYPE, sourceSpan);\n this.operator = operator;\n this.expr = expr;\n this.parens = parens;\n }\n isEquivalent(e) {\n return e instanceof UnaryOperatorExpr && this.operator === e.operator &&\n this.expr.isEquivalent(e.expr);\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitUnaryOperatorExpr(this, context);\n }\n}\nclass BinaryOperatorExpr extends Expression {\n constructor(operator, lhs, rhs, type, sourceSpan, parens = true) {\n super(type || lhs.type, sourceSpan);\n this.operator = operator;\n this.rhs = rhs;\n this.parens = parens;\n this.lhs = lhs;\n }\n isEquivalent(e) {\n return e instanceof BinaryOperatorExpr && this.operator === e.operator &&\n this.lhs.isEquivalent(e.lhs) && this.rhs.isEquivalent(e.rhs);\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitBinaryOperatorExpr(this, context);\n }\n}\nclass ReadPropExpr extends Expression {\n constructor(receiver, name, type, sourceSpan) {\n super(type, sourceSpan);\n this.receiver = receiver;\n this.name = name;\n }\n isEquivalent(e) {\n return e instanceof ReadPropExpr && this.receiver.isEquivalent(e.receiver) &&\n this.name === e.name;\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitReadPropExpr(this, context);\n }\n set(value) {\n return new WritePropExpr(this.receiver, this.name, value, null, this.sourceSpan);\n }\n}\nclass ReadKeyExpr extends Expression {\n constructor(receiver, index, type, sourceSpan) {\n super(type, sourceSpan);\n this.receiver = receiver;\n this.index = index;\n }\n isEquivalent(e) {\n return e instanceof ReadKeyExpr && this.receiver.isEquivalent(e.receiver) &&\n this.index.isEquivalent(e.index);\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitReadKeyExpr(this, context);\n }\n set(value) {\n return new WriteKeyExpr(this.receiver, this.index, value, null, this.sourceSpan);\n }\n}\nclass LiteralArrayExpr extends Expression {\n constructor(entries, type, sourceSpan) {\n super(type, sourceSpan);\n this.entries = entries;\n }\n isConstant() {\n return this.entries.every(e => e.isConstant());\n }\n isEquivalent(e) {\n return e instanceof LiteralArrayExpr && areAllEquivalent(this.entries, e.entries);\n }\n visitExpression(visitor, context) {\n return visitor.visitLiteralArrayExpr(this, context);\n }\n}\nclass LiteralMapEntry {\n constructor(key, value, quoted) {\n this.key = key;\n this.value = value;\n this.quoted = quoted;\n }\n isEquivalent(e) {\n return this.key === e.key && this.value.isEquivalent(e.value);\n }\n}\nclass LiteralMapExpr extends Expression {\n constructor(entries, type, sourceSpan) {\n super(type, sourceSpan);\n this.entries = entries;\n this.valueType = null;\n if (type) {\n this.valueType = type.valueType;\n }\n }\n isEquivalent(e) {\n return e instanceof LiteralMapExpr && areAllEquivalent(this.entries, e.entries);\n }\n isConstant() {\n return this.entries.every(e => e.value.isConstant());\n }\n visitExpression(visitor, context) {\n return visitor.visitLiteralMapExpr(this, context);\n }\n}\nclass CommaExpr extends Expression {\n constructor(parts, sourceSpan) {\n super(parts[parts.length - 1].type, sourceSpan);\n this.parts = parts;\n }\n isEquivalent(e) {\n return e instanceof CommaExpr && areAllEquivalent(this.parts, e.parts);\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitCommaExpr(this, context);\n }\n}\nconst NULL_EXPR = new LiteralExpr(null, null, null);\nconst TYPED_NULL_EXPR = new LiteralExpr(null, INFERRED_TYPE, null);\n//// Statements\nvar StmtModifier;\n(function (StmtModifier) {\n StmtModifier[StmtModifier[\"None\"] = 0] = \"None\";\n StmtModifier[StmtModifier[\"Final\"] = 1] = \"Final\";\n StmtModifier[StmtModifier[\"Private\"] = 2] = \"Private\";\n StmtModifier[StmtModifier[\"Exported\"] = 4] = \"Exported\";\n StmtModifier[StmtModifier[\"Static\"] = 8] = \"Static\";\n})(StmtModifier || (StmtModifier = {}));\nclass LeadingComment {\n constructor(text, multiline, trailingNewline) {\n this.text = text;\n this.multiline = multiline;\n this.trailingNewline = trailingNewline;\n }\n toString() {\n return this.multiline ? ` ${this.text} ` : this.text;\n }\n}\nclass JSDocComment extends LeadingComment {\n constructor(tags) {\n super('', /* multiline */ true, /* trailingNewline */ true);\n this.tags = tags;\n }\n toString() {\n return serializeTags(this.tags);\n }\n}\nclass Statement {\n constructor(modifiers = StmtModifier.None, sourceSpan = null, leadingComments) {\n this.modifiers = modifiers;\n this.sourceSpan = sourceSpan;\n this.leadingComments = leadingComments;\n }\n hasModifier(modifier) {\n return (this.modifiers & modifier) !== 0;\n }\n addLeadingComment(leadingComment) {\n this.leadingComments = this.leadingComments ?? [];\n this.leadingComments.push(leadingComment);\n }\n}\nclass DeclareVarStmt extends Statement {\n constructor(name, value, type, modifiers, sourceSpan, leadingComments) {\n super(modifiers, sourceSpan, leadingComments);\n this.name = name;\n this.value = value;\n this.type = type || (value && value.type) || null;\n }\n isEquivalent(stmt) {\n return stmt instanceof DeclareVarStmt && this.name === stmt.name &&\n (this.value ? !!stmt.value && this.value.isEquivalent(stmt.value) : !stmt.value);\n }\n visitStatement(visitor, context) {\n return visitor.visitDeclareVarStmt(this, context);\n }\n}\nclass DeclareFunctionStmt extends Statement {\n constructor(name, params, statements, type, modifiers, sourceSpan, leadingComments) {\n super(modifiers, sourceSpan, leadingComments);\n this.name = name;\n this.params = params;\n this.statements = statements;\n this.type = type || null;\n }\n isEquivalent(stmt) {\n return stmt instanceof DeclareFunctionStmt && areAllEquivalent(this.params, stmt.params) &&\n areAllEquivalent(this.statements, stmt.statements);\n }\n visitStatement(visitor, context) {\n return visitor.visitDeclareFunctionStmt(this, context);\n }\n}\nclass ExpressionStatement extends Statement {\n constructor(expr, sourceSpan, leadingComments) {\n super(StmtModifier.None, sourceSpan, leadingComments);\n this.expr = expr;\n }\n isEquivalent(stmt) {\n return stmt instanceof ExpressionStatement && this.expr.isEquivalent(stmt.expr);\n }\n visitStatement(visitor, context) {\n return visitor.visitExpressionStmt(this, context);\n }\n}\nclass ReturnStatement extends Statement {\n constructor(value, sourceSpan = null, leadingComments) {\n super(StmtModifier.None, sourceSpan, leadingComments);\n this.value = value;\n }\n isEquivalent(stmt) {\n return stmt instanceof ReturnStatement && this.value.isEquivalent(stmt.value);\n }\n visitStatement(visitor, context) {\n return visitor.visitReturnStmt(this, context);\n }\n}\nclass IfStmt extends Statement {\n constructor(condition, trueCase, falseCase = [], sourceSpan, leadingComments) {\n super(StmtModifier.None, sourceSpan, leadingComments);\n this.condition = condition;\n this.trueCase = trueCase;\n this.falseCase = falseCase;\n }\n isEquivalent(stmt) {\n return stmt instanceof IfStmt && this.condition.isEquivalent(stmt.condition) &&\n areAllEquivalent(this.trueCase, stmt.trueCase) &&\n areAllEquivalent(this.falseCase, stmt.falseCase);\n }\n visitStatement(visitor, context) {\n return visitor.visitIfStmt(this, context);\n }\n}\nclass RecursiveAstVisitor$1 {\n visitType(ast, context) {\n return ast;\n }\n visitExpression(ast, context) {\n if (ast.type) {\n ast.type.visitType(this, context);\n }\n return ast;\n }\n visitBuiltinType(type, context) {\n return this.visitType(type, context);\n }\n visitExpressionType(type, context) {\n type.value.visitExpression(this, context);\n if (type.typeParams !== null) {\n type.typeParams.forEach(param => this.visitType(param, context));\n }\n return this.visitType(type, context);\n }\n visitArrayType(type, context) {\n return this.visitType(type, context);\n }\n visitMapType(type, context) {\n return this.visitType(type, context);\n }\n visitWrappedNodeExpr(ast, context) {\n return ast;\n }\n visitTypeofExpr(ast, context) {\n return this.visitExpression(ast, context);\n }\n visitReadVarExpr(ast, context) {\n return this.visitExpression(ast, context);\n }\n visitWriteVarExpr(ast, context) {\n ast.value.visitExpression(this, context);\n return this.visitExpression(ast, context);\n }\n visitWriteKeyExpr(ast, context) {\n ast.receiver.visitExpression(this, context);\n ast.index.visitExpression(this, context);\n ast.value.visitExpression(this, context);\n return this.visitExpression(ast, context);\n }\n visitWritePropExpr(ast, context) {\n ast.receiver.visitExpression(this, context);\n ast.value.visitExpression(this, context);\n return this.visitExpression(ast, context);\n }\n visitInvokeFunctionExpr(ast, context) {\n ast.fn.visitExpression(this, context);\n this.visitAllExpressions(ast.args, context);\n return this.visitExpression(ast, context);\n }\n visitTaggedTemplateExpr(ast, context) {\n ast.tag.visitExpression(this, context);\n this.visitAllExpressions(ast.template.expressions, context);\n return this.visitExpression(ast, context);\n }\n visitInstantiateExpr(ast, context) {\n ast.classExpr.visitExpression(this, context);\n this.visitAllExpressions(ast.args, context);\n return this.visitExpression(ast, context);\n }\n visitLiteralExpr(ast, context) {\n return this.visitExpression(ast, context);\n }\n visitLocalizedString(ast, context) {\n return this.visitExpression(ast, context);\n }\n visitExternalExpr(ast, context) {\n if (ast.typeParams) {\n ast.typeParams.forEach(type => type.visitType(this, context));\n }\n return this.visitExpression(ast, context);\n }\n visitConditionalExpr(ast, context) {\n ast.condition.visitExpression(this, context);\n ast.trueCase.visitExpression(this, context);\n ast.falseCase.visitExpression(this, context);\n return this.visitExpression(ast, context);\n }\n visitNotExpr(ast, context) {\n ast.condition.visitExpression(this, context);\n return this.visitExpression(ast, context);\n }\n visitFunctionExpr(ast, context) {\n this.visitAllStatements(ast.statements, context);\n return this.visitExpression(ast, context);\n }\n visitUnaryOperatorExpr(ast, context) {\n ast.expr.visitExpression(this, context);\n return this.visitExpression(ast, context);\n }\n visitBinaryOperatorExpr(ast, context) {\n ast.lhs.visitExpression(this, context);\n ast.rhs.visitExpression(this, context);\n return this.visitExpression(ast, context);\n }\n visitReadPropExpr(ast, context) {\n ast.receiver.visitExpression(this, context);\n return this.visitExpression(ast, context);\n }\n visitReadKeyExpr(ast, context) {\n ast.receiver.visitExpression(this, context);\n ast.index.visitExpression(this, context);\n return this.visitExpression(ast, context);\n }\n visitLiteralArrayExpr(ast, context) {\n this.visitAllExpressions(ast.entries, context);\n return this.visitExpression(ast, context);\n }\n visitLiteralMapExpr(ast, context) {\n ast.entries.forEach((entry) => entry.value.visitExpression(this, context));\n return this.visitExpression(ast, context);\n }\n visitCommaExpr(ast, context) {\n this.visitAllExpressions(ast.parts, context);\n return this.visitExpression(ast, context);\n }\n visitAllExpressions(exprs, context) {\n exprs.forEach(expr => expr.visitExpression(this, context));\n }\n visitDeclareVarStmt(stmt, context) {\n if (stmt.value) {\n stmt.value.visitExpression(this, context);\n }\n if (stmt.type) {\n stmt.type.visitType(this, context);\n }\n return stmt;\n }\n visitDeclareFunctionStmt(stmt, context) {\n this.visitAllStatements(stmt.statements, context);\n if (stmt.type) {\n stmt.type.visitType(this, context);\n }\n return stmt;\n }\n visitExpressionStmt(stmt, context) {\n stmt.expr.visitExpression(this, context);\n return stmt;\n }\n visitReturnStmt(stmt, context) {\n stmt.value.visitExpression(this, context);\n return stmt;\n }\n visitIfStmt(stmt, context) {\n stmt.condition.visitExpression(this, context);\n this.visitAllStatements(stmt.trueCase, context);\n this.visitAllStatements(stmt.falseCase, context);\n return stmt;\n }\n visitAllStatements(stmts, context) {\n stmts.forEach(stmt => stmt.visitStatement(this, context));\n }\n}\nfunction leadingComment(text, multiline = false, trailingNewline = true) {\n return new LeadingComment(text, multiline, trailingNewline);\n}\nfunction jsDocComment(tags = []) {\n return new JSDocComment(tags);\n}\nfunction variable(name, type, sourceSpan) {\n return new ReadVarExpr(name, type, sourceSpan);\n}\nfunction importExpr(id, typeParams = null, sourceSpan) {\n return new ExternalExpr(id, null, typeParams, sourceSpan);\n}\nfunction importType(id, typeParams, typeModifiers) {\n return id != null ? expressionType(importExpr(id, typeParams, null), typeModifiers) : null;\n}\nfunction expressionType(expr, typeModifiers, typeParams) {\n return new ExpressionType(expr, typeModifiers, typeParams);\n}\nfunction typeofExpr(expr) {\n return new TypeofExpr(expr);\n}\nfunction literalArr(values, type, sourceSpan) {\n return new LiteralArrayExpr(values, type, sourceSpan);\n}\nfunction literalMap(values, type = null) {\n return new LiteralMapExpr(values.map(e => new LiteralMapEntry(e.key, e.value, e.quoted)), type, null);\n}\nfunction unary(operator, expr, type, sourceSpan) {\n return new UnaryOperatorExpr(operator, expr, type, sourceSpan);\n}\nfunction not(expr, sourceSpan) {\n return new NotExpr(expr, sourceSpan);\n}\nfunction fn(params, body, type, sourceSpan, name) {\n return new FunctionExpr(params, body, type, sourceSpan, name);\n}\nfunction ifStmt(condition, thenClause, elseClause, sourceSpan, leadingComments) {\n return new IfStmt(condition, thenClause, elseClause, sourceSpan, leadingComments);\n}\nfunction taggedTemplate(tag, template, type, sourceSpan) {\n return new TaggedTemplateExpr(tag, template, type, sourceSpan);\n}\nfunction literal(value, type, sourceSpan) {\n return new LiteralExpr(value, type, sourceSpan);\n}\nfunction localizedString(metaBlock, messageParts, placeholderNames, expressions, sourceSpan) {\n return new LocalizedString(metaBlock, messageParts, placeholderNames, expressions, sourceSpan);\n}\nfunction isNull(exp) {\n return exp instanceof LiteralExpr && exp.value === null;\n}\n/*\n * Serializes a `Tag` into a string.\n * Returns a string like \" @foo {bar} baz\" (note the leading whitespace before `@foo`).\n */\nfunction tagToString(tag) {\n let out = '';\n if (tag.tagName) {\n out += ` @${tag.tagName}`;\n }\n if (tag.text) {\n if (tag.text.match(/\\/\\*|\\*\\//)) {\n throw new Error('JSDoc text cannot contain \"/*\" and \"*/\"');\n }\n out += ' ' + tag.text.replace(/@/g, '\\\\@');\n }\n return out;\n}\nfunction serializeTags(tags) {\n if (tags.length === 0)\n return '';\n if (tags.length === 1 && tags[0].tagName && !tags[0].text) {\n // The JSDOC comment is a single simple tag: e.g `/** @tagname */`.\n return `*${tagToString(tags[0])} `;\n }\n let out = '*\\n';\n for (const tag of tags) {\n out += ' *';\n // If the tagToString is multi-line, insert \" * \" prefixes on lines.\n out += tagToString(tag).replace(/\\n/g, '\\n * ');\n out += '\\n';\n }\n out += ' ';\n return out;\n}\n\nvar output_ast = /*#__PURE__*/Object.freeze({\n __proto__: null,\n get TypeModifier () { return TypeModifier; },\n Type: Type,\n get BuiltinTypeName () { return BuiltinTypeName; },\n BuiltinType: BuiltinType,\n ExpressionType: ExpressionType,\n ArrayType: ArrayType,\n MapType: MapType,\n DYNAMIC_TYPE: DYNAMIC_TYPE,\n INFERRED_TYPE: INFERRED_TYPE,\n BOOL_TYPE: BOOL_TYPE,\n INT_TYPE: INT_TYPE,\n NUMBER_TYPE: NUMBER_TYPE,\n STRING_TYPE: STRING_TYPE,\n FUNCTION_TYPE: FUNCTION_TYPE,\n NONE_TYPE: NONE_TYPE,\n get UnaryOperator () { return UnaryOperator; },\n get BinaryOperator () { return BinaryOperator; },\n nullSafeIsEquivalent: nullSafeIsEquivalent,\n areAllEquivalent: areAllEquivalent,\n Expression: Expression,\n ReadVarExpr: ReadVarExpr,\n TypeofExpr: TypeofExpr,\n WrappedNodeExpr: WrappedNodeExpr,\n WriteVarExpr: WriteVarExpr,\n WriteKeyExpr: WriteKeyExpr,\n WritePropExpr: WritePropExpr,\n InvokeFunctionExpr: InvokeFunctionExpr,\n TaggedTemplateExpr: TaggedTemplateExpr,\n InstantiateExpr: InstantiateExpr,\n LiteralExpr: LiteralExpr,\n TemplateLiteral: TemplateLiteral,\n TemplateLiteralElement: TemplateLiteralElement,\n LiteralPiece: LiteralPiece,\n PlaceholderPiece: PlaceholderPiece,\n LocalizedString: LocalizedString,\n ExternalExpr: ExternalExpr,\n ExternalReference: ExternalReference,\n ConditionalExpr: ConditionalExpr,\n NotExpr: NotExpr,\n FnParam: FnParam,\n FunctionExpr: FunctionExpr,\n UnaryOperatorExpr: UnaryOperatorExpr,\n BinaryOperatorExpr: BinaryOperatorExpr,\n ReadPropExpr: ReadPropExpr,\n ReadKeyExpr: ReadKeyExpr,\n LiteralArrayExpr: LiteralArrayExpr,\n LiteralMapEntry: LiteralMapEntry,\n LiteralMapExpr: LiteralMapExpr,\n CommaExpr: CommaExpr,\n NULL_EXPR: NULL_EXPR,\n TYPED_NULL_EXPR: TYPED_NULL_EXPR,\n get StmtModifier () { return StmtModifier; },\n LeadingComment: LeadingComment,\n JSDocComment: JSDocComment,\n Statement: Statement,\n DeclareVarStmt: DeclareVarStmt,\n DeclareFunctionStmt: DeclareFunctionStmt,\n ExpressionStatement: ExpressionStatement,\n ReturnStatement: ReturnStatement,\n IfStmt: IfStmt,\n RecursiveAstVisitor: RecursiveAstVisitor$1,\n leadingComment: leadingComment,\n jsDocComment: jsDocComment,\n variable: variable,\n importExpr: importExpr,\n importType: importType,\n expressionType: expressionType,\n typeofExpr: typeofExpr,\n literalArr: literalArr,\n literalMap: literalMap,\n unary: unary,\n not: not,\n fn: fn,\n ifStmt: ifStmt,\n taggedTemplate: taggedTemplate,\n literal: literal,\n localizedString: localizedString,\n isNull: isNull\n});\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst CONSTANT_PREFIX = '_c';\n/**\n * `ConstantPool` tries to reuse literal factories when two or more literals are identical.\n * We determine whether literals are identical by creating a key out of their AST using the\n * `KeyVisitor`. This constant is used to replace dynamic expressions which can't be safely\n * converted into a key. E.g. given an expression `{foo: bar()}`, since we don't know what\n * the result of `bar` will be, we create a key that looks like `{foo: <unknown>}`. Note\n * that we use a variable, rather than something like `null` in order to avoid collisions.\n */\nconst UNKNOWN_VALUE_KEY = variable('<unknown>');\n/**\n * Context to use when producing a key.\n *\n * This ensures we see the constant not the reference variable when producing\n * a key.\n */\nconst KEY_CONTEXT = {};\n/**\n * Generally all primitive values are excluded from the `ConstantPool`, but there is an exclusion\n * for strings that reach a certain length threshold. This constant defines the length threshold for\n * strings.\n */\nconst POOL_INCLUSION_LENGTH_THRESHOLD_FOR_STRINGS = 50;\n/**\n * A node that is a place-holder that allows the node to be replaced when the actual\n * node is known.\n *\n * This allows the constant pool to change an expression from a direct reference to\n * a constant to a shared constant. It returns a fix-up node that is later allowed to\n * change the referenced expression.\n */\nclass FixupExpression extends Expression {\n constructor(resolved) {\n super(resolved.type);\n this.resolved = resolved;\n this.original = resolved;\n }\n visitExpression(visitor, context) {\n if (context === KEY_CONTEXT) {\n // When producing a key we want to traverse the constant not the\n // variable used to refer to it.\n return this.original.visitExpression(visitor, context);\n }\n else {\n return this.resolved.visitExpression(visitor, context);\n }\n }\n isEquivalent(e) {\n return e instanceof FixupExpression && this.resolved.isEquivalent(e.resolved);\n }\n isConstant() {\n return true;\n }\n fixup(expression) {\n this.resolved = expression;\n this.shared = true;\n }\n}\n/**\n * A constant pool allows a code emitter to share constant in an output context.\n *\n * The constant pool also supports sharing access to ivy definitions references.\n */\nclass ConstantPool {\n constructor(isClosureCompilerEnabled = false) {\n this.isClosureCompilerEnabled = isClosureCompilerEnabled;\n this.statements = [];\n this.literals = new Map();\n this.literalFactories = new Map();\n this.nextNameIndex = 0;\n }\n getConstLiteral(literal, forceShared) {\n if ((literal instanceof LiteralExpr && !isLongStringLiteral(literal)) ||\n literal instanceof FixupExpression) {\n // Do no put simple literals into the constant pool or try to produce a constant for a\n // reference to a constant.\n return literal;\n }\n const key = this.keyOf(literal);\n let fixup = this.literals.get(key);\n let newValue = false;\n if (!fixup) {\n fixup = new FixupExpression(literal);\n this.literals.set(key, fixup);\n newValue = true;\n }\n if ((!newValue && !fixup.shared) || (newValue && forceShared)) {\n // Replace the expression with a variable\n const name = this.freshName();\n let definition;\n let usage;\n if (this.isClosureCompilerEnabled && isLongStringLiteral(literal)) {\n // For string literals, Closure will **always** inline the string at\n // **all** usages, duplicating it each time. For large strings, this\n // unnecessarily bloats bundle size. To work around this restriction, we\n // wrap the string in a function, and call that function for each usage.\n // This tricks Closure into using inline logic for functions instead of\n // string literals. Function calls are only inlined if the body is small\n // enough to be worth it. By doing this, very large strings will be\n // shared across multiple usages, rather than duplicating the string at\n // each usage site.\n //\n // const myStr = function() { return \"very very very long string\"; };\n // const usage1 = myStr();\n // const usage2 = myStr();\n definition = variable(name).set(new FunctionExpr([], // Params.\n [\n // Statements.\n new ReturnStatement(literal),\n ]));\n usage = variable(name).callFn([]);\n }\n else {\n // Just declare and use the variable directly, without a function call\n // indirection. This saves a few bytes and avoids an unnecessary call.\n definition = variable(name).set(literal);\n usage = variable(name);\n }\n this.statements.push(definition.toDeclStmt(INFERRED_TYPE, StmtModifier.Final));\n fixup.fixup(usage);\n }\n return fixup;\n }\n getLiteralFactory(literal) {\n // Create a pure function that builds an array of a mix of constant and variable expressions\n if (literal instanceof LiteralArrayExpr) {\n const argumentsForKey = literal.entries.map(e => e.isConstant() ? e : UNKNOWN_VALUE_KEY);\n const key = this.keyOf(literalArr(argumentsForKey));\n return this._getLiteralFactory(key, literal.entries, entries => literalArr(entries));\n }\n else {\n const expressionForKey = literalMap(literal.entries.map(e => ({\n key: e.key,\n value: e.value.isConstant() ? e.value : UNKNOWN_VALUE_KEY,\n quoted: e.quoted\n })));\n const key = this.keyOf(expressionForKey);\n return this._getLiteralFactory(key, literal.entries.map(e => e.value), entries => literalMap(entries.map((value, index) => ({\n key: literal.entries[index].key,\n value,\n quoted: literal.entries[index].quoted\n }))));\n }\n }\n _getLiteralFactory(key, values, resultMap) {\n let literalFactory = this.literalFactories.get(key);\n const literalFactoryArguments = values.filter((e => !e.isConstant()));\n if (!literalFactory) {\n const resultExpressions = values.map((e, index) => e.isConstant() ? this.getConstLiteral(e, true) : variable(`a${index}`));\n const parameters = resultExpressions.filter(isVariable).map(e => new FnParam(e.name, DYNAMIC_TYPE));\n const pureFunctionDeclaration = fn(parameters, [new ReturnStatement(resultMap(resultExpressions))], INFERRED_TYPE);\n const name = this.freshName();\n this.statements.push(variable(name)\n .set(pureFunctionDeclaration)\n .toDeclStmt(INFERRED_TYPE, StmtModifier.Final));\n literalFactory = variable(name);\n this.literalFactories.set(key, literalFactory);\n }\n return { literalFactory, literalFactoryArguments };\n }\n /**\n * Produce a unique name.\n *\n * The name might be unique among different prefixes if any of the prefixes end in\n * a digit so the prefix should be a constant string (not based on user input) and\n * must not end in a digit.\n */\n uniqueName(prefix) {\n return `${prefix}${this.nextNameIndex++}`;\n }\n freshName() {\n return this.uniqueName(CONSTANT_PREFIX);\n }\n keyOf(expression) {\n return expression.visitExpression(new KeyVisitor(), KEY_CONTEXT);\n }\n}\n/**\n * Visitor used to determine if 2 expressions are equivalent and can be shared in the\n * `ConstantPool`.\n *\n * When the id (string) generated by the visitor is equal, expressions are considered equivalent.\n */\nclass KeyVisitor {\n constructor() {\n this.visitWrappedNodeExpr = invalid$1;\n this.visitWriteVarExpr = invalid$1;\n this.visitWriteKeyExpr = invalid$1;\n this.visitWritePropExpr = invalid$1;\n this.visitInvokeFunctionExpr = invalid$1;\n this.visitTaggedTemplateExpr = invalid$1;\n this.visitInstantiateExpr = invalid$1;\n this.visitConditionalExpr = invalid$1;\n this.visitNotExpr = invalid$1;\n this.visitAssertNotNullExpr = invalid$1;\n this.visitCastExpr = invalid$1;\n this.visitFunctionExpr = invalid$1;\n this.visitUnaryOperatorExpr = invalid$1;\n this.visitBinaryOperatorExpr = invalid$1;\n this.visitReadPropExpr = invalid$1;\n this.visitReadKeyExpr = invalid$1;\n this.visitCommaExpr = invalid$1;\n this.visitLocalizedString = invalid$1;\n }\n visitLiteralExpr(ast) {\n return `${typeof ast.value === 'string' ? '\"' + ast.value + '\"' : ast.value}`;\n }\n visitLiteralArrayExpr(ast, context) {\n return `[${ast.entries.map(entry => entry.visitExpression(this, context)).join(',')}]`;\n }\n visitLiteralMapExpr(ast, context) {\n const mapKey = (entry) => {\n const quote = entry.quoted ? '\"' : '';\n return `${quote}${entry.key}${quote}`;\n };\n const mapEntry = (entry) => `${mapKey(entry)}:${entry.value.visitExpression(this, context)}`;\n return `{${ast.entries.map(mapEntry).join(',')}`;\n }\n visitExternalExpr(ast) {\n return ast.value.moduleName ? `EX:${ast.value.moduleName}:${ast.value.name}` :\n `EX:${ast.value.runtime.name}`;\n }\n visitReadVarExpr(node) {\n return `VAR:${node.name}`;\n }\n visitTypeofExpr(node, context) {\n return `TYPEOF:${node.expr.visitExpression(this, context)}`;\n }\n}\nfunction invalid$1(arg) {\n throw new Error(`Invalid state: Visitor ${this.constructor.name} doesn't handle ${arg.constructor.name}`);\n}\nfunction isVariable(e) {\n return e instanceof ReadVarExpr;\n}\nfunction isLongStringLiteral(expr) {\n return expr instanceof LiteralExpr && typeof expr.value === 'string' &&\n expr.value.length >= POOL_INCLUSION_LENGTH_THRESHOLD_FOR_STRINGS;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst CORE = '@angular/core';\nclass Identifiers {\n}\n/* Methods */\nIdentifiers.NEW_METHOD = 'factory';\nIdentifiers.TRANSFORM_METHOD = 'transform';\nIdentifiers.PATCH_DEPS = 'patchedDeps';\nIdentifiers.core = { name: null, moduleName: CORE };\n/* Instructions */\nIdentifiers.namespaceHTML = { name: 'ɵɵnamespaceHTML', moduleName: CORE };\nIdentifiers.namespaceMathML = { name: 'ɵɵnamespaceMathML', moduleName: CORE };\nIdentifiers.namespaceSVG = { name: 'ɵɵnamespaceSVG', moduleName: CORE };\nIdentifiers.element = { name: 'ɵɵelement', moduleName: CORE };\nIdentifiers.elementStart = { name: 'ɵɵelementStart', moduleName: CORE };\nIdentifiers.elementEnd = { name: 'ɵɵelementEnd', moduleName: CORE };\nIdentifiers.advance = { name: 'ɵɵadvance', moduleName: CORE };\nIdentifiers.syntheticHostProperty = { name: 'ɵɵsyntheticHostProperty', moduleName: CORE };\nIdentifiers.syntheticHostListener = { name: 'ɵɵsyntheticHostListener', moduleName: CORE };\nIdentifiers.attribute = { name: 'ɵɵattribute', moduleName: CORE };\nIdentifiers.attributeInterpolate1 = { name: 'ɵɵattributeInterpolate1', moduleName: CORE };\nIdentifiers.attributeInterpolate2 = { name: 'ɵɵattributeInterpolate2', moduleName: CORE };\nIdentifiers.attributeInterpolate3 = { name: 'ɵɵattributeInterpolate3', moduleName: CORE };\nIdentifiers.attributeInterpolate4 = { name: 'ɵɵattributeInterpolate4', moduleName: CORE };\nIdentifiers.attributeInterpolate5 = { name: 'ɵɵattributeInterpolate5', moduleName: CORE };\nIdentifiers.attributeInterpolate6 = { name: 'ɵɵattributeInterpolate6', moduleName: CORE };\nIdentifiers.attributeInterpolate7 = { name: 'ɵɵattributeInterpolate7', moduleName: CORE };\nIdentifiers.attributeInterpolate8 = { name: 'ɵɵattributeInterpolate8', moduleName: CORE };\nIdentifiers.attributeInterpolateV = { name: 'ɵɵattributeInterpolateV', moduleName: CORE };\nIdentifiers.classProp = { name: 'ɵɵclassProp', moduleName: CORE };\nIdentifiers.elementContainerStart = { name: 'ɵɵelementContainerStart', moduleName: CORE };\nIdentifiers.elementContainerEnd = { name: 'ɵɵelementContainerEnd', moduleName: CORE };\nIdentifiers.elementContainer = { name: 'ɵɵelementContainer', moduleName: CORE };\nIdentifiers.styleMap = { name: 'ɵɵstyleMap', moduleName: CORE };\nIdentifiers.styleMapInterpolate1 = { name: 'ɵɵstyleMapInterpolate1', moduleName: CORE };\nIdentifiers.styleMapInterpolate2 = { name: 'ɵɵstyleMapInterpolate2', moduleName: CORE };\nIdentifiers.styleMapInterpolate3 = { name: 'ɵɵstyleMapInterpolate3', moduleName: CORE };\nIdentifiers.styleMapInterpolate4 = { name: 'ɵɵstyleMapInterpolate4', moduleName: CORE };\nIdentifiers.styleMapInterpolate5 = { name: 'ɵɵstyleMapInterpolate5', moduleName: CORE };\nIdentifiers.styleMapInterpolate6 = { name: 'ɵɵstyleMapInterpolate6', moduleName: CORE };\nIdentifiers.styleMapInterpolate7 = { name: 'ɵɵstyleMapInterpolate7', moduleName: CORE };\nIdentifiers.styleMapInterpolate8 = { name: 'ɵɵstyleMapInterpolate8', moduleName: CORE };\nIdentifiers.styleMapInterpolateV = { name: 'ɵɵstyleMapInterpolateV', moduleName: CORE };\nIdentifiers.classMap = { name: 'ɵɵclassMap', moduleName: CORE };\nIdentifiers.classMapInterpolate1 = { name: 'ɵɵclassMapInterpolate1', moduleName: CORE };\nIdentifiers.classMapInterpolate2 = { name: 'ɵɵclassMapInterpolate2', moduleName: CORE };\nIdentifiers.classMapInterpolate3 = { name: 'ɵɵclassMapInterpolate3', moduleName: CORE };\nIdentifiers.classMapInterpolate4 = { name: 'ɵɵclassMapInterpolate4', moduleName: CORE };\nIdentifiers.classMapInterpolate5 = { name: 'ɵɵclassMapInterpolate5', moduleName: CORE };\nIdentifiers.classMapInterpolate6 = { name: 'ɵɵclassMapInterpolate6', moduleName: CORE };\nIdentifiers.classMapInterpolate7 = { name: 'ɵɵclassMapInterpolate7', moduleName: CORE };\nIdentifiers.classMapInterpolate8 = { name: 'ɵɵclassMapInterpolate8', moduleName: CORE };\nIdentifiers.classMapInterpolateV = { name: 'ɵɵclassMapInterpolateV', moduleName: CORE };\nIdentifiers.styleProp = { name: 'ɵɵstyleProp', moduleName: CORE };\nIdentifiers.stylePropInterpolate1 = { name: 'ɵɵstylePropInterpolate1', moduleName: CORE };\nIdentifiers.stylePropInterpolate2 = { name: 'ɵɵstylePropInterpolate2', moduleName: CORE };\nIdentifiers.stylePropInterpolate3 = { name: 'ɵɵstylePropInterpolate3', moduleName: CORE };\nIdentifiers.stylePropInterpolate4 = { name: 'ɵɵstylePropInterpolate4', moduleName: CORE };\nIdentifiers.stylePropInterpolate5 = { name: 'ɵɵstylePropInterpolate5', moduleName: CORE };\nIdentifiers.stylePropInterpolate6 = { name: 'ɵɵstylePropInterpolate6', moduleName: CORE };\nIdentifiers.stylePropInterpolate7 = { name: 'ɵɵstylePropInterpolate7', moduleName: CORE };\nIdentifiers.stylePropInterpolate8 = { name: 'ɵɵstylePropInterpolate8', moduleName: CORE };\nIdentifiers.stylePropInterpolateV = { name: 'ɵɵstylePropInterpolateV', moduleName: CORE };\nIdentifiers.nextContext = { name: 'ɵɵnextContext', moduleName: CORE };\nIdentifiers.resetView = { name: 'ɵɵresetView', moduleName: CORE };\nIdentifiers.templateCreate = { name: 'ɵɵtemplate', moduleName: CORE };\nIdentifiers.text = { name: 'ɵɵtext', moduleName: CORE };\nIdentifiers.enableBindings = { name: 'ɵɵenableBindings', moduleName: CORE };\nIdentifiers.disableBindings = { name: 'ɵɵdisableBindings', moduleName: CORE };\nIdentifiers.getCurrentView = { name: 'ɵɵgetCurrentView', moduleName: CORE };\nIdentifiers.textInterpolate = { name: 'ɵɵtextInterpolate', moduleName: CORE };\nIdentifiers.textInterpolate1 = { name: 'ɵɵtextInterpolate1', moduleName: CORE };\nIdentifiers.textInterpolate2 = { name: 'ɵɵtextInterpolate2', moduleName: CORE };\nIdentifiers.textInterpolate3 = { name: 'ɵɵtextInterpolate3', moduleName: CORE };\nIdentifiers.textInterpolate4 = { name: 'ɵɵtextInterpolate4', moduleName: CORE };\nIdentifiers.textInterpolate5 = { name: 'ɵɵtextInterpolate5', moduleName: CORE };\nIdentifiers.textInterpolate6 = { name: 'ɵɵtextInterpolate6', moduleName: CORE };\nIdentifiers.textInterpolate7 = { name: 'ɵɵtextInterpolate7', moduleName: CORE };\nIdentifiers.textInterpolate8 = { name: 'ɵɵtextInterpolate8', moduleName: CORE };\nIdentifiers.textInterpolateV = { name: 'ɵɵtextInterpolateV', moduleName: CORE };\nIdentifiers.restoreView = { name: 'ɵɵrestoreView', moduleName: CORE };\nIdentifiers.pureFunction0 = { name: 'ɵɵpureFunction0', moduleName: CORE };\nIdentifiers.pureFunction1 = { name: 'ɵɵpureFunction1', moduleName: CORE };\nIdentifiers.pureFunction2 = { name: 'ɵɵpureFunction2', moduleName: CORE };\nIdentifiers.pureFunction3 = { name: 'ɵɵpureFunction3', moduleName: CORE };\nIdentifiers.pureFunction4 = { name: 'ɵɵpureFunction4', moduleName: CORE };\nIdentifiers.pureFunction5 = { name: 'ɵɵpureFunction5', moduleName: CORE };\nIdentifiers.pureFunction6 = { name: 'ɵɵpureFunction6', moduleName: CORE };\nIdentifiers.pureFunction7 = { name: 'ɵɵpureFunction7', moduleName: CORE };\nIdentifiers.pureFunction8 = { name: 'ɵɵpureFunction8', moduleName: CORE };\nIdentifiers.pureFunctionV = { name: 'ɵɵpureFunctionV', moduleName: CORE };\nIdentifiers.pipeBind1 = { name: 'ɵɵpipeBind1', moduleName: CORE };\nIdentifiers.pipeBind2 = { name: 'ɵɵpipeBind2', moduleName: CORE };\nIdentifiers.pipeBind3 = { name: 'ɵɵpipeBind3', moduleName: CORE };\nIdentifiers.pipeBind4 = { name: 'ɵɵpipeBind4', moduleName: CORE };\nIdentifiers.pipeBindV = { name: 'ɵɵpipeBindV', moduleName: CORE };\nIdentifiers.hostProperty = { name: 'ɵɵhostProperty', moduleName: CORE };\nIdentifiers.property = { name: 'ɵɵproperty', moduleName: CORE };\nIdentifiers.propertyInterpolate = { name: 'ɵɵpropertyInterpolate', moduleName: CORE };\nIdentifiers.propertyInterpolate1 = { name: 'ɵɵpropertyInterpolate1', moduleName: CORE };\nIdentifiers.propertyInterpolate2 = { name: 'ɵɵpropertyInterpolate2', moduleName: CORE };\nIdentifiers.propertyInterpolate3 = { name: 'ɵɵpropertyInterpolate3', moduleName: CORE };\nIdentifiers.propertyInterpolate4 = { name: 'ɵɵpropertyInterpolate4', moduleName: CORE };\nIdentifiers.propertyInterpolate5 = { name: 'ɵɵpropertyInterpolate5', moduleName: CORE };\nIdentifiers.propertyInterpolate6 = { name: 'ɵɵpropertyInterpolate6', moduleName: CORE };\nIdentifiers.propertyInterpolate7 = { name: 'ɵɵpropertyInterpolate7', moduleName: CORE };\nIdentifiers.propertyInterpolate8 = { name: 'ɵɵpropertyInterpolate8', moduleName: CORE };\nIdentifiers.propertyInterpolateV = { name: 'ɵɵpropertyInterpolateV', moduleName: CORE };\nIdentifiers.i18n = { name: 'ɵɵi18n', moduleName: CORE };\nIdentifiers.i18nAttributes = { name: 'ɵɵi18nAttributes', moduleName: CORE };\nIdentifiers.i18nExp = { name: 'ɵɵi18nExp', moduleName: CORE };\nIdentifiers.i18nStart = { name: 'ɵɵi18nStart', moduleName: CORE };\nIdentifiers.i18nEnd = { name: 'ɵɵi18nEnd', moduleName: CORE };\nIdentifiers.i18nApply = { name: 'ɵɵi18nApply', moduleName: CORE };\nIdentifiers.i18nPostprocess = { name: 'ɵɵi18nPostprocess', moduleName: CORE };\nIdentifiers.pipe = { name: 'ɵɵpipe', moduleName: CORE };\nIdentifiers.projection = { name: 'ɵɵprojection', moduleName: CORE };\nIdentifiers.projectionDef = { name: 'ɵɵprojectionDef', moduleName: CORE };\nIdentifiers.reference = { name: 'ɵɵreference', moduleName: CORE };\nIdentifiers.inject = { name: 'ɵɵinject', moduleName: CORE };\nIdentifiers.injectAttribute = { name: 'ɵɵinjectAttribute', moduleName: CORE };\nIdentifiers.directiveInject = { name: 'ɵɵdirectiveInject', moduleName: CORE };\nIdentifiers.invalidFactory = { name: 'ɵɵinvalidFactory', moduleName: CORE };\nIdentifiers.invalidFactoryDep = { name: 'ɵɵinvalidFactoryDep', moduleName: CORE };\nIdentifiers.templateRefExtractor = { name: 'ɵɵtemplateRefExtractor', moduleName: CORE };\nIdentifiers.forwardRef = { name: 'forwardRef', moduleName: CORE };\nIdentifiers.resolveForwardRef = { name: 'resolveForwardRef', moduleName: CORE };\nIdentifiers.ɵɵdefineInjectable = { name: 'ɵɵdefineInjectable', moduleName: CORE };\nIdentifiers.declareInjectable = { name: 'ɵɵngDeclareInjectable', moduleName: CORE };\nIdentifiers.InjectableDeclaration = { name: 'ɵɵInjectableDeclaration', moduleName: CORE };\nIdentifiers.resolveWindow = { name: 'ɵɵresolveWindow', moduleName: CORE };\nIdentifiers.resolveDocument = { name: 'ɵɵresolveDocument', moduleName: CORE };\nIdentifiers.resolveBody = { name: 'ɵɵresolveBody', moduleName: CORE };\nIdentifiers.defineComponent = { name: 'ɵɵdefineComponent', moduleName: CORE };\nIdentifiers.declareComponent = { name: 'ɵɵngDeclareComponent', moduleName: CORE };\nIdentifiers.setComponentScope = { name: 'ɵɵsetComponentScope', moduleName: CORE };\nIdentifiers.ChangeDetectionStrategy = {\n name: 'ChangeDetectionStrategy',\n moduleName: CORE,\n};\nIdentifiers.ViewEncapsulation = {\n name: 'ViewEncapsulation',\n moduleName: CORE,\n};\nIdentifiers.ComponentDeclaration = {\n name: 'ɵɵComponentDeclaration',\n moduleName: CORE,\n};\nIdentifiers.FactoryDeclaration = {\n name: 'ɵɵFactoryDeclaration',\n moduleName: CORE,\n};\nIdentifiers.declareFactory = { name: 'ɵɵngDeclareFactory', moduleName: CORE };\nIdentifiers.FactoryTarget = { name: 'ɵɵFactoryTarget', moduleName: CORE };\nIdentifiers.defineDirective = { name: 'ɵɵdefineDirective', moduleName: CORE };\nIdentifiers.declareDirective = { name: 'ɵɵngDeclareDirective', moduleName: CORE };\nIdentifiers.DirectiveDeclaration = {\n name: 'ɵɵDirectiveDeclaration',\n moduleName: CORE,\n};\nIdentifiers.InjectorDef = { name: 'ɵɵInjectorDef', moduleName: CORE };\nIdentifiers.InjectorDeclaration = { name: 'ɵɵInjectorDeclaration', moduleName: CORE };\nIdentifiers.defineInjector = { name: 'ɵɵdefineInjector', moduleName: CORE };\nIdentifiers.declareInjector = { name: 'ɵɵngDeclareInjector', moduleName: CORE };\nIdentifiers.NgModuleDeclaration = {\n name: 'ɵɵNgModuleDeclaration',\n moduleName: CORE,\n};\nIdentifiers.ModuleWithProviders = {\n name: 'ModuleWithProviders',\n moduleName: CORE,\n};\nIdentifiers.defineNgModule = { name: 'ɵɵdefineNgModule', moduleName: CORE };\nIdentifiers.declareNgModule = { name: 'ɵɵngDeclareNgModule', moduleName: CORE };\nIdentifiers.setNgModuleScope = { name: 'ɵɵsetNgModuleScope', moduleName: CORE };\nIdentifiers.registerNgModuleType = { name: 'ɵɵregisterNgModuleType', moduleName: CORE };\nIdentifiers.PipeDeclaration = { name: 'ɵɵPipeDeclaration', moduleName: CORE };\nIdentifiers.definePipe = { name: 'ɵɵdefinePipe', moduleName: CORE };\nIdentifiers.declarePipe = { name: 'ɵɵngDeclarePipe', moduleName: CORE };\nIdentifiers.declareClassMetadata = { name: 'ɵɵngDeclareClassMetadata', moduleName: CORE };\nIdentifiers.setClassMetadata = { name: 'ɵsetClassMetadata', moduleName: CORE };\nIdentifiers.queryRefresh = { name: 'ɵɵqueryRefresh', moduleName: CORE };\nIdentifiers.viewQuery = { name: 'ɵɵviewQuery', moduleName: CORE };\nIdentifiers.loadQuery = { name: 'ɵɵloadQuery', moduleName: CORE };\nIdentifiers.contentQuery = { name: 'ɵɵcontentQuery', moduleName: CORE };\nIdentifiers.NgOnChangesFeature = { name: 'ɵɵNgOnChangesFeature', moduleName: CORE };\nIdentifiers.InheritDefinitionFeature = { name: 'ɵɵInheritDefinitionFeature', moduleName: CORE };\nIdentifiers.CopyDefinitionFeature = { name: 'ɵɵCopyDefinitionFeature', moduleName: CORE };\nIdentifiers.StandaloneFeature = { name: 'ɵɵStandaloneFeature', moduleName: CORE };\nIdentifiers.ProvidersFeature = { name: 'ɵɵProvidersFeature', moduleName: CORE };\nIdentifiers.listener = { name: 'ɵɵlistener', moduleName: CORE };\nIdentifiers.getInheritedFactory = {\n name: 'ɵɵgetInheritedFactory',\n moduleName: CORE,\n};\n// sanitization-related functions\nIdentifiers.sanitizeHtml = { name: 'ɵɵsanitizeHtml', moduleName: CORE };\nIdentifiers.sanitizeStyle = { name: 'ɵɵsanitizeStyle', moduleName: CORE };\nIdentifiers.sanitizeResourceUrl = { name: 'ɵɵsanitizeResourceUrl', moduleName: CORE };\nIdentifiers.sanitizeScript = { name: 'ɵɵsanitizeScript', moduleName: CORE };\nIdentifiers.sanitizeUrl = { name: 'ɵɵsanitizeUrl', moduleName: CORE };\nIdentifiers.sanitizeUrlOrResourceUrl = { name: 'ɵɵsanitizeUrlOrResourceUrl', moduleName: CORE };\nIdentifiers.trustConstantHtml = { name: 'ɵɵtrustConstantHtml', moduleName: CORE };\nIdentifiers.trustConstantResourceUrl = { name: 'ɵɵtrustConstantResourceUrl', moduleName: CORE };\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit\nconst VERSION$1 = 3;\nconst JS_B64_PREFIX = '# sourceMappingURL=data:application/json;base64,';\nclass SourceMapGenerator {\n constructor(file = null) {\n this.file = file;\n this.sourcesContent = new Map();\n this.lines = [];\n this.lastCol0 = 0;\n this.hasMappings = false;\n }\n // The content is `null` when the content is expected to be loaded using the URL\n addSource(url, content = null) {\n if (!this.sourcesContent.has(url)) {\n this.sourcesContent.set(url, content);\n }\n return this;\n }\n addLine() {\n this.lines.push([]);\n this.lastCol0 = 0;\n return this;\n }\n addMapping(col0, sourceUrl, sourceLine0, sourceCol0) {\n if (!this.currentLine) {\n throw new Error(`A line must be added before mappings can be added`);\n }\n if (sourceUrl != null && !this.sourcesContent.has(sourceUrl)) {\n throw new Error(`Unknown source file \"${sourceUrl}\"`);\n }\n if (col0 == null) {\n throw new Error(`The column in the generated code must be provided`);\n }\n if (col0 < this.lastCol0) {\n throw new Error(`Mapping should be added in output order`);\n }\n if (sourceUrl && (sourceLine0 == null || sourceCol0 == null)) {\n throw new Error(`The source location must be provided when a source url is provided`);\n }\n this.hasMappings = true;\n this.lastCol0 = col0;\n this.currentLine.push({ col0, sourceUrl, sourceLine0, sourceCol0 });\n return this;\n }\n /**\n * @internal strip this from published d.ts files due to\n * https://github.com/microsoft/TypeScript/issues/36216\n */\n get currentLine() {\n return this.lines.slice(-1)[0];\n }\n toJSON() {\n if (!this.hasMappings) {\n return null;\n }\n const sourcesIndex = new Map();\n const sources = [];\n const sourcesContent = [];\n Array.from(this.sourcesContent.keys()).forEach((url, i) => {\n sourcesIndex.set(url, i);\n sources.push(url);\n sourcesContent.push(this.sourcesContent.get(url) || null);\n });\n let mappings = '';\n let lastCol0 = 0;\n let lastSourceIndex = 0;\n let lastSourceLine0 = 0;\n let lastSourceCol0 = 0;\n this.lines.forEach(segments => {\n lastCol0 = 0;\n mappings += segments\n .map(segment => {\n // zero-based starting column of the line in the generated code\n let segAsStr = toBase64VLQ(segment.col0 - lastCol0);\n lastCol0 = segment.col0;\n if (segment.sourceUrl != null) {\n // zero-based index into the “sources” list\n segAsStr +=\n toBase64VLQ(sourcesIndex.get(segment.sourceUrl) - lastSourceIndex);\n lastSourceIndex = sourcesIndex.get(segment.sourceUrl);\n // the zero-based starting line in the original source\n segAsStr += toBase64VLQ(segment.sourceLine0 - lastSourceLine0);\n lastSourceLine0 = segment.sourceLine0;\n // the zero-based starting column in the original source\n segAsStr += toBase64VLQ(segment.sourceCol0 - lastSourceCol0);\n lastSourceCol0 = segment.sourceCol0;\n }\n return segAsStr;\n })\n .join(',');\n mappings += ';';\n });\n mappings = mappings.slice(0, -1);\n return {\n 'file': this.file || '',\n 'version': VERSION$1,\n 'sourceRoot': '',\n 'sources': sources,\n 'sourcesContent': sourcesContent,\n 'mappings': mappings,\n };\n }\n toJsComment() {\n return this.hasMappings ? '//' + JS_B64_PREFIX + toBase64String(JSON.stringify(this, null, 0)) :\n '';\n }\n}\nfunction toBase64String(value) {\n let b64 = '';\n const encoded = utf8Encode(value);\n for (let i = 0; i < encoded.length;) {\n const i1 = encoded[i++];\n const i2 = i < encoded.length ? encoded[i++] : null;\n const i3 = i < encoded.length ? encoded[i++] : null;\n b64 += toBase64Digit(i1 >> 2);\n b64 += toBase64Digit(((i1 & 3) << 4) | (i2 === null ? 0 : i2 >> 4));\n b64 += i2 === null ? '=' : toBase64Digit(((i2 & 15) << 2) | (i3 === null ? 0 : i3 >> 6));\n b64 += i2 === null || i3 === null ? '=' : toBase64Digit(i3 & 63);\n }\n return b64;\n}\nfunction toBase64VLQ(value) {\n value = value < 0 ? ((-value) << 1) + 1 : value << 1;\n let out = '';\n do {\n let digit = value & 31;\n value = value >> 5;\n if (value > 0) {\n digit = digit | 32;\n }\n out += toBase64Digit(digit);\n } while (value > 0);\n return out;\n}\nconst B64_DIGITS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\nfunction toBase64Digit(value) {\n if (value < 0 || value >= 64) {\n throw new Error(`Can only encode value in the range [0, 63]`);\n }\n return B64_DIGITS[value];\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst _SINGLE_QUOTE_ESCAPE_STRING_RE = /'|\\\\|\\n|\\r|\\$/g;\nconst _LEGAL_IDENTIFIER_RE = /^[$A-Z_][0-9A-Z_$]*$/i;\nconst _INDENT_WITH = ' ';\nclass _EmittedLine {\n constructor(indent) {\n this.indent = indent;\n this.partsLength = 0;\n this.parts = [];\n this.srcSpans = [];\n }\n}\nclass EmitterVisitorContext {\n constructor(_indent) {\n this._indent = _indent;\n this._lines = [new _EmittedLine(_indent)];\n }\n static createRoot() {\n return new EmitterVisitorContext(0);\n }\n /**\n * @internal strip this from published d.ts files due to\n * https://github.com/microsoft/TypeScript/issues/36216\n */\n get _currentLine() {\n return this._lines[this._lines.length - 1];\n }\n println(from, lastPart = '') {\n this.print(from || null, lastPart, true);\n }\n lineIsEmpty() {\n return this._currentLine.parts.length === 0;\n }\n lineLength() {\n return this._currentLine.indent * _INDENT_WITH.length + this._currentLine.partsLength;\n }\n print(from, part, newLine = false) {\n if (part.length > 0) {\n this._currentLine.parts.push(part);\n this._currentLine.partsLength += part.length;\n this._currentLine.srcSpans.push(from && from.sourceSpan || null);\n }\n if (newLine) {\n this._lines.push(new _EmittedLine(this._indent));\n }\n }\n removeEmptyLastLine() {\n if (this.lineIsEmpty()) {\n this._lines.pop();\n }\n }\n incIndent() {\n this._indent++;\n if (this.lineIsEmpty()) {\n this._currentLine.indent = this._indent;\n }\n }\n decIndent() {\n this._indent--;\n if (this.lineIsEmpty()) {\n this._currentLine.indent = this._indent;\n }\n }\n toSource() {\n return this.sourceLines\n .map(l => l.parts.length > 0 ? _createIndent(l.indent) + l.parts.join('') : '')\n .join('\\n');\n }\n toSourceMapGenerator(genFilePath, startsAtLine = 0) {\n const map = new SourceMapGenerator(genFilePath);\n let firstOffsetMapped = false;\n const mapFirstOffsetIfNeeded = () => {\n if (!firstOffsetMapped) {\n // Add a single space so that tools won't try to load the file from disk.\n // Note: We are using virtual urls like `ng:///`, so we have to\n // provide a content here.\n map.addSource(genFilePath, ' ').addMapping(0, genFilePath, 0, 0);\n firstOffsetMapped = true;\n }\n };\n for (let i = 0; i < startsAtLine; i++) {\n map.addLine();\n mapFirstOffsetIfNeeded();\n }\n this.sourceLines.forEach((line, lineIdx) => {\n map.addLine();\n const spans = line.srcSpans;\n const parts = line.parts;\n let col0 = line.indent * _INDENT_WITH.length;\n let spanIdx = 0;\n // skip leading parts without source spans\n while (spanIdx < spans.length && !spans[spanIdx]) {\n col0 += parts[spanIdx].length;\n spanIdx++;\n }\n if (spanIdx < spans.length && lineIdx === 0 && col0 === 0) {\n firstOffsetMapped = true;\n }\n else {\n mapFirstOffsetIfNeeded();\n }\n while (spanIdx < spans.length) {\n const span = spans[spanIdx];\n const source = span.start.file;\n const sourceLine = span.start.line;\n const sourceCol = span.start.col;\n map.addSource(source.url, source.content)\n .addMapping(col0, source.url, sourceLine, sourceCol);\n col0 += parts[spanIdx].length;\n spanIdx++;\n // assign parts without span or the same span to the previous segment\n while (spanIdx < spans.length && (span === spans[spanIdx] || !spans[spanIdx])) {\n col0 += parts[spanIdx].length;\n spanIdx++;\n }\n }\n });\n return map;\n }\n spanOf(line, column) {\n const emittedLine = this._lines[line];\n if (emittedLine) {\n let columnsLeft = column - _createIndent(emittedLine.indent).length;\n for (let partIndex = 0; partIndex < emittedLine.parts.length; partIndex++) {\n const part = emittedLine.parts[partIndex];\n if (part.length > columnsLeft) {\n return emittedLine.srcSpans[partIndex];\n }\n columnsLeft -= part.length;\n }\n }\n return null;\n }\n /**\n * @internal strip this from published d.ts files due to\n * https://github.com/microsoft/TypeScript/issues/36216\n */\n get sourceLines() {\n if (this._lines.length && this._lines[this._lines.length - 1].parts.length === 0) {\n return this._lines.slice(0, -1);\n }\n return this._lines;\n }\n}\nclass AbstractEmitterVisitor {\n constructor(_escapeDollarInStrings) {\n this._escapeDollarInStrings = _escapeDollarInStrings;\n }\n printLeadingComments(stmt, ctx) {\n if (stmt.leadingComments === undefined) {\n return;\n }\n for (const comment of stmt.leadingComments) {\n if (comment instanceof JSDocComment) {\n ctx.print(stmt, `/*${comment.toString()}*/`, comment.trailingNewline);\n }\n else {\n if (comment.multiline) {\n ctx.print(stmt, `/* ${comment.text} */`, comment.trailingNewline);\n }\n else {\n comment.text.split('\\n').forEach((line) => {\n ctx.println(stmt, `// ${line}`);\n });\n }\n }\n }\n }\n visitExpressionStmt(stmt, ctx) {\n this.printLeadingComments(stmt, ctx);\n stmt.expr.visitExpression(this, ctx);\n ctx.println(stmt, ';');\n return null;\n }\n visitReturnStmt(stmt, ctx) {\n this.printLeadingComments(stmt, ctx);\n ctx.print(stmt, `return `);\n stmt.value.visitExpression(this, ctx);\n ctx.println(stmt, ';');\n return null;\n }\n visitIfStmt(stmt, ctx) {\n this.printLeadingComments(stmt, ctx);\n ctx.print(stmt, `if (`);\n stmt.condition.visitExpression(this, ctx);\n ctx.print(stmt, `) {`);\n const hasElseCase = stmt.falseCase != null && stmt.falseCase.length > 0;\n if (stmt.trueCase.length <= 1 && !hasElseCase) {\n ctx.print(stmt, ` `);\n this.visitAllStatements(stmt.trueCase, ctx);\n ctx.removeEmptyLastLine();\n ctx.print(stmt, ` `);\n }\n else {\n ctx.println();\n ctx.incIndent();\n this.visitAllStatements(stmt.trueCase, ctx);\n ctx.decIndent();\n if (hasElseCase) {\n ctx.println(stmt, `} else {`);\n ctx.incIndent();\n this.visitAllStatements(stmt.falseCase, ctx);\n ctx.decIndent();\n }\n }\n ctx.println(stmt, `}`);\n return null;\n }\n visitWriteVarExpr(expr, ctx) {\n const lineWasEmpty = ctx.lineIsEmpty();\n if (!lineWasEmpty) {\n ctx.print(expr, '(');\n }\n ctx.print(expr, `${expr.name} = `);\n expr.value.visitExpression(this, ctx);\n if (!lineWasEmpty) {\n ctx.print(expr, ')');\n }\n return null;\n }\n visitWriteKeyExpr(expr, ctx) {\n const lineWasEmpty = ctx.lineIsEmpty();\n if (!lineWasEmpty) {\n ctx.print(expr, '(');\n }\n expr.receiver.visitExpression(this, ctx);\n ctx.print(expr, `[`);\n expr.index.visitExpression(this, ctx);\n ctx.print(expr, `] = `);\n expr.value.visitExpression(this, ctx);\n if (!lineWasEmpty) {\n ctx.print(expr, ')');\n }\n return null;\n }\n visitWritePropExpr(expr, ctx) {\n const lineWasEmpty = ctx.lineIsEmpty();\n if (!lineWasEmpty) {\n ctx.print(expr, '(');\n }\n expr.receiver.visitExpression(this, ctx);\n ctx.print(expr, `.${expr.name} = `);\n expr.value.visitExpression(this, ctx);\n if (!lineWasEmpty) {\n ctx.print(expr, ')');\n }\n return null;\n }\n visitInvokeFunctionExpr(expr, ctx) {\n expr.fn.visitExpression(this, ctx);\n ctx.print(expr, `(`);\n this.visitAllExpressions(expr.args, ctx, ',');\n ctx.print(expr, `)`);\n return null;\n }\n visitTaggedTemplateExpr(expr, ctx) {\n expr.tag.visitExpression(this, ctx);\n ctx.print(expr, '`' + expr.template.elements[0].rawText);\n for (let i = 1; i < expr.template.elements.length; i++) {\n ctx.print(expr, '${');\n expr.template.expressions[i - 1].visitExpression(this, ctx);\n ctx.print(expr, `}${expr.template.elements[i].rawText}`);\n }\n ctx.print(expr, '`');\n return null;\n }\n visitWrappedNodeExpr(ast, ctx) {\n throw new Error('Abstract emitter cannot visit WrappedNodeExpr.');\n }\n visitTypeofExpr(expr, ctx) {\n ctx.print(expr, 'typeof ');\n expr.expr.visitExpression(this, ctx);\n }\n visitReadVarExpr(ast, ctx) {\n ctx.print(ast, ast.name);\n return null;\n }\n visitInstantiateExpr(ast, ctx) {\n ctx.print(ast, `new `);\n ast.classExpr.visitExpression(this, ctx);\n ctx.print(ast, `(`);\n this.visitAllExpressions(ast.args, ctx, ',');\n ctx.print(ast, `)`);\n return null;\n }\n visitLiteralExpr(ast, ctx) {\n const value = ast.value;\n if (typeof value === 'string') {\n ctx.print(ast, escapeIdentifier(value, this._escapeDollarInStrings));\n }\n else {\n ctx.print(ast, `${value}`);\n }\n return null;\n }\n visitLocalizedString(ast, ctx) {\n const head = ast.serializeI18nHead();\n ctx.print(ast, '$localize `' + head.raw);\n for (let i = 1; i < ast.messageParts.length; i++) {\n ctx.print(ast, '${');\n ast.expressions[i - 1].visitExpression(this, ctx);\n ctx.print(ast, `}${ast.serializeI18nTemplatePart(i).raw}`);\n }\n ctx.print(ast, '`');\n return null;\n }\n visitConditionalExpr(ast, ctx) {\n ctx.print(ast, `(`);\n ast.condition.visitExpression(this, ctx);\n ctx.print(ast, '? ');\n ast.trueCase.visitExpression(this, ctx);\n ctx.print(ast, ': ');\n ast.falseCase.visitExpression(this, ctx);\n ctx.print(ast, `)`);\n return null;\n }\n visitNotExpr(ast, ctx) {\n ctx.print(ast, '!');\n ast.condition.visitExpression(this, ctx);\n return null;\n }\n visitUnaryOperatorExpr(ast, ctx) {\n let opStr;\n switch (ast.operator) {\n case UnaryOperator.Plus:\n opStr = '+';\n break;\n case UnaryOperator.Minus:\n opStr = '-';\n break;\n default:\n throw new Error(`Unknown operator ${ast.operator}`);\n }\n if (ast.parens)\n ctx.print(ast, `(`);\n ctx.print(ast, opStr);\n ast.expr.visitExpression(this, ctx);\n if (ast.parens)\n ctx.print(ast, `)`);\n return null;\n }\n visitBinaryOperatorExpr(ast, ctx) {\n let opStr;\n switch (ast.operator) {\n case BinaryOperator.Equals:\n opStr = '==';\n break;\n case BinaryOperator.Identical:\n opStr = '===';\n break;\n case BinaryOperator.NotEquals:\n opStr = '!=';\n break;\n case BinaryOperator.NotIdentical:\n opStr = '!==';\n break;\n case BinaryOperator.And:\n opStr = '&&';\n break;\n case BinaryOperator.BitwiseAnd:\n opStr = '&';\n break;\n case BinaryOperator.Or:\n opStr = '||';\n break;\n case BinaryOperator.Plus:\n opStr = '+';\n break;\n case BinaryOperator.Minus:\n opStr = '-';\n break;\n case BinaryOperator.Divide:\n opStr = '/';\n break;\n case BinaryOperator.Multiply:\n opStr = '*';\n break;\n case BinaryOperator.Modulo:\n opStr = '%';\n break;\n case BinaryOperator.Lower:\n opStr = '<';\n break;\n case BinaryOperator.LowerEquals:\n opStr = '<=';\n break;\n case BinaryOperator.Bigger:\n opStr = '>';\n break;\n case BinaryOperator.BiggerEquals:\n opStr = '>=';\n break;\n case BinaryOperator.NullishCoalesce:\n opStr = '??';\n break;\n default:\n throw new Error(`Unknown operator ${ast.operator}`);\n }\n if (ast.parens)\n ctx.print(ast, `(`);\n ast.lhs.visitExpression(this, ctx);\n ctx.print(ast, ` ${opStr} `);\n ast.rhs.visitExpression(this, ctx);\n if (ast.parens)\n ctx.print(ast, `)`);\n return null;\n }\n visitReadPropExpr(ast, ctx) {\n ast.receiver.visitExpression(this, ctx);\n ctx.print(ast, `.`);\n ctx.print(ast, ast.name);\n return null;\n }\n visitReadKeyExpr(ast, ctx) {\n ast.receiver.visitExpression(this, ctx);\n ctx.print(ast, `[`);\n ast.index.visitExpression(this, ctx);\n ctx.print(ast, `]`);\n return null;\n }\n visitLiteralArrayExpr(ast, ctx) {\n ctx.print(ast, `[`);\n this.visitAllExpressions(ast.entries, ctx, ',');\n ctx.print(ast, `]`);\n return null;\n }\n visitLiteralMapExpr(ast, ctx) {\n ctx.print(ast, `{`);\n this.visitAllObjects(entry => {\n ctx.print(ast, `${escapeIdentifier(entry.key, this._escapeDollarInStrings, entry.quoted)}:`);\n entry.value.visitExpression(this, ctx);\n }, ast.entries, ctx, ',');\n ctx.print(ast, `}`);\n return null;\n }\n visitCommaExpr(ast, ctx) {\n ctx.print(ast, '(');\n this.visitAllExpressions(ast.parts, ctx, ',');\n ctx.print(ast, ')');\n return null;\n }\n visitAllExpressions(expressions, ctx, separator) {\n this.visitAllObjects(expr => expr.visitExpression(this, ctx), expressions, ctx, separator);\n }\n visitAllObjects(handler, expressions, ctx, separator) {\n let incrementedIndent = false;\n for (let i = 0; i < expressions.length; i++) {\n if (i > 0) {\n if (ctx.lineLength() > 80) {\n ctx.print(null, separator, true);\n if (!incrementedIndent) {\n // continuation are marked with double indent.\n ctx.incIndent();\n ctx.incIndent();\n incrementedIndent = true;\n }\n }\n else {\n ctx.print(null, separator, false);\n }\n }\n handler(expressions[i]);\n }\n if (incrementedIndent) {\n // continuation are marked with double indent.\n ctx.decIndent();\n ctx.decIndent();\n }\n }\n visitAllStatements(statements, ctx) {\n statements.forEach((stmt) => stmt.visitStatement(this, ctx));\n }\n}\nfunction escapeIdentifier(input, escapeDollar, alwaysQuote = true) {\n if (input == null) {\n return null;\n }\n const body = input.replace(_SINGLE_QUOTE_ESCAPE_STRING_RE, (...match) => {\n if (match[0] == '$') {\n return escapeDollar ? '\\\\$' : '$';\n }\n else if (match[0] == '\\n') {\n return '\\\\n';\n }\n else if (match[0] == '\\r') {\n return '\\\\r';\n }\n else {\n return `\\\\${match[0]}`;\n }\n });\n const requiresQuotes = alwaysQuote || !_LEGAL_IDENTIFIER_RE.test(body);\n return requiresQuotes ? `'${body}'` : body;\n}\nfunction _createIndent(count) {\n let res = '';\n for (let i = 0; i < count; i++) {\n res += _INDENT_WITH;\n }\n return res;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction typeWithParameters(type, numParams) {\n if (numParams === 0) {\n return expressionType(type);\n }\n const params = [];\n for (let i = 0; i < numParams; i++) {\n params.push(DYNAMIC_TYPE);\n }\n return expressionType(type, undefined, params);\n}\nconst ANIMATE_SYMBOL_PREFIX = '@';\nfunction prepareSyntheticPropertyName(name) {\n return `${ANIMATE_SYMBOL_PREFIX}${name}`;\n}\nfunction prepareSyntheticListenerName(name, phase) {\n return `${ANIMATE_SYMBOL_PREFIX}${name}.${phase}`;\n}\nfunction getSafePropertyAccessString(accessor, name) {\n const escapedName = escapeIdentifier(name, false, false);\n return escapedName !== name ? `${accessor}[${escapedName}]` : `${accessor}.${name}`;\n}\nfunction prepareSyntheticListenerFunctionName(name, phase) {\n return `animation_${name}_${phase}`;\n}\nfunction jitOnlyGuardedExpression(expr) {\n return guardedExpression('ngJitMode', expr);\n}\nfunction devOnlyGuardedExpression(expr) {\n return guardedExpression('ngDevMode', expr);\n}\nfunction guardedExpression(guard, expr) {\n const guardExpr = new ExternalExpr({ name: guard, moduleName: null });\n const guardNotDefined = new BinaryOperatorExpr(BinaryOperator.Identical, new TypeofExpr(guardExpr), literal('undefined'));\n const guardUndefinedOrTrue = new BinaryOperatorExpr(BinaryOperator.Or, guardNotDefined, guardExpr, /* type */ undefined, \n /* sourceSpan */ undefined, true);\n return new BinaryOperatorExpr(BinaryOperator.And, guardUndefinedOrTrue, expr);\n}\nfunction wrapReference(value) {\n const wrapped = new WrappedNodeExpr(value);\n return { value: wrapped, type: wrapped };\n}\nfunction refsToArray(refs, shouldForwardDeclare) {\n const values = literalArr(refs.map(ref => ref.value));\n return shouldForwardDeclare ? fn([], [new ReturnStatement(values)]) : values;\n}\nfunction createMayBeForwardRefExpression(expression, forwardRef) {\n return { expression, forwardRef };\n}\n/**\n * Convert a `MaybeForwardRefExpression` to an `Expression`, possibly wrapping its expression in a\n * `forwardRef()` call.\n *\n * If `MaybeForwardRefExpression.forwardRef` is `ForwardRefHandling.Unwrapped` then the expression\n * was originally wrapped in a `forwardRef()` call to prevent the value from being eagerly evaluated\n * in the code.\n *\n * See `packages/compiler-cli/src/ngtsc/annotations/src/injectable.ts` and\n * `packages/compiler/src/jit_compiler_facade.ts` for more information.\n */\nfunction convertFromMaybeForwardRefExpression({ expression, forwardRef }) {\n switch (forwardRef) {\n case 0 /* ForwardRefHandling.None */:\n case 1 /* ForwardRefHandling.Wrapped */:\n return expression;\n case 2 /* ForwardRefHandling.Unwrapped */:\n return generateForwardRef(expression);\n }\n}\n/**\n * Generate an expression that has the given `expr` wrapped in the following form:\n *\n * ```\n * forwardRef(() => expr)\n * ```\n */\nfunction generateForwardRef(expr) {\n return importExpr(Identifiers.forwardRef).callFn([fn([], [new ReturnStatement(expr)])]);\n}\n\nvar R3FactoryDelegateType;\n(function (R3FactoryDelegateType) {\n R3FactoryDelegateType[R3FactoryDelegateType[\"Class\"] = 0] = \"Class\";\n R3FactoryDelegateType[R3FactoryDelegateType[\"Function\"] = 1] = \"Function\";\n})(R3FactoryDelegateType || (R3FactoryDelegateType = {}));\nvar FactoryTarget$1;\n(function (FactoryTarget) {\n FactoryTarget[FactoryTarget[\"Directive\"] = 0] = \"Directive\";\n FactoryTarget[FactoryTarget[\"Component\"] = 1] = \"Component\";\n FactoryTarget[FactoryTarget[\"Injectable\"] = 2] = \"Injectable\";\n FactoryTarget[FactoryTarget[\"Pipe\"] = 3] = \"Pipe\";\n FactoryTarget[FactoryTarget[\"NgModule\"] = 4] = \"NgModule\";\n})(FactoryTarget$1 || (FactoryTarget$1 = {}));\n/**\n * Construct a factory function expression for the given `R3FactoryMetadata`.\n */\nfunction compileFactoryFunction(meta) {\n const t = variable('t');\n let baseFactoryVar = null;\n // The type to instantiate via constructor invocation. If there is no delegated factory, meaning\n // this type is always created by constructor invocation, then this is the type-to-create\n // parameter provided by the user (t) if specified, or the current type if not. If there is a\n // delegated factory (which is used to create the current type) then this is only the type-to-\n // create parameter (t).\n const typeForCtor = !isDelegatedFactoryMetadata(meta) ?\n new BinaryOperatorExpr(BinaryOperator.Or, t, meta.internalType) :\n t;\n let ctorExpr = null;\n if (meta.deps !== null) {\n // There is a constructor (either explicitly or implicitly defined).\n if (meta.deps !== 'invalid') {\n ctorExpr = new InstantiateExpr(typeForCtor, injectDependencies(meta.deps, meta.target));\n }\n }\n else {\n // There is no constructor, use the base class' factory to construct typeForCtor.\n baseFactoryVar = variable(`ɵ${meta.name}_BaseFactory`);\n ctorExpr = baseFactoryVar.callFn([typeForCtor]);\n }\n const body = [];\n let retExpr = null;\n function makeConditionalFactory(nonCtorExpr) {\n const r = variable('r');\n body.push(r.set(NULL_EXPR).toDeclStmt());\n const ctorStmt = ctorExpr !== null ? r.set(ctorExpr).toStmt() :\n importExpr(Identifiers.invalidFactory).callFn([]).toStmt();\n body.push(ifStmt(t, [ctorStmt], [r.set(nonCtorExpr).toStmt()]));\n return r;\n }\n if (isDelegatedFactoryMetadata(meta)) {\n // This type is created with a delegated factory. If a type parameter is not specified, call\n // the factory instead.\n const delegateArgs = injectDependencies(meta.delegateDeps, meta.target);\n // Either call `new delegate(...)` or `delegate(...)` depending on meta.delegateType.\n const factoryExpr = new (meta.delegateType === R3FactoryDelegateType.Class ?\n InstantiateExpr :\n InvokeFunctionExpr)(meta.delegate, delegateArgs);\n retExpr = makeConditionalFactory(factoryExpr);\n }\n else if (isExpressionFactoryMetadata(meta)) {\n // TODO(alxhub): decide whether to lower the value here or in the caller\n retExpr = makeConditionalFactory(meta.expression);\n }\n else {\n retExpr = ctorExpr;\n }\n if (retExpr === null) {\n // The expression cannot be formed so render an `ɵɵinvalidFactory()` call.\n body.push(importExpr(Identifiers.invalidFactory).callFn([]).toStmt());\n }\n else if (baseFactoryVar !== null) {\n // This factory uses a base factory, so call `ɵɵgetInheritedFactory()` to compute it.\n const getInheritedFactoryCall = importExpr(Identifiers.getInheritedFactory).callFn([meta.internalType]);\n // Memoize the base factoryFn: `baseFactory || (baseFactory = ɵɵgetInheritedFactory(...))`\n const baseFactory = new BinaryOperatorExpr(BinaryOperator.Or, baseFactoryVar, baseFactoryVar.set(getInheritedFactoryCall));\n body.push(new ReturnStatement(baseFactory.callFn([typeForCtor])));\n }\n else {\n // This is straightforward factory, just return it.\n body.push(new ReturnStatement(retExpr));\n }\n let factoryFn = fn([new FnParam('t', DYNAMIC_TYPE)], body, INFERRED_TYPE, undefined, `${meta.name}_Factory`);\n if (baseFactoryVar !== null) {\n // There is a base factory variable so wrap its declaration along with the factory function into\n // an IIFE.\n factoryFn = fn([], [\n new DeclareVarStmt(baseFactoryVar.name), new ReturnStatement(factoryFn)\n ]).callFn([], /* sourceSpan */ undefined, /* pure */ true);\n }\n return {\n expression: factoryFn,\n statements: [],\n type: createFactoryType(meta),\n };\n}\nfunction createFactoryType(meta) {\n const ctorDepsType = meta.deps !== null && meta.deps !== 'invalid' ? createCtorDepsType(meta.deps) : NONE_TYPE;\n return expressionType(importExpr(Identifiers.FactoryDeclaration, [typeWithParameters(meta.type.type, meta.typeArgumentCount), ctorDepsType]));\n}\nfunction injectDependencies(deps, target) {\n return deps.map((dep, index) => compileInjectDependency(dep, target, index));\n}\nfunction compileInjectDependency(dep, target, index) {\n // Interpret the dependency according to its resolved type.\n if (dep.token === null) {\n return importExpr(Identifiers.invalidFactoryDep).callFn([literal(index)]);\n }\n else if (dep.attributeNameType === null) {\n // Build up the injection flags according to the metadata.\n const flags = 0 /* InjectFlags.Default */ | (dep.self ? 2 /* InjectFlags.Self */ : 0) |\n (dep.skipSelf ? 4 /* InjectFlags.SkipSelf */ : 0) | (dep.host ? 1 /* InjectFlags.Host */ : 0) |\n (dep.optional ? 8 /* InjectFlags.Optional */ : 0) |\n (target === FactoryTarget$1.Pipe ? 16 /* InjectFlags.ForPipe */ : 0);\n // If this dependency is optional or otherwise has non-default flags, then additional\n // parameters describing how to inject the dependency must be passed to the inject function\n // that's being used.\n let flagsParam = (flags !== 0 /* InjectFlags.Default */ || dep.optional) ? literal(flags) : null;\n // Build up the arguments to the injectFn call.\n const injectArgs = [dep.token];\n if (flagsParam) {\n injectArgs.push(flagsParam);\n }\n const injectFn = getInjectFn(target);\n return importExpr(injectFn).callFn(injectArgs);\n }\n else {\n // The `dep.attributeTypeName` value is defined, which indicates that this is an `@Attribute()`\n // type dependency. For the generated JS we still want to use the `dep.token` value in case the\n // name given for the attribute is not a string literal. For example given `@Attribute(foo())`,\n // we want to generate `ɵɵinjectAttribute(foo())`.\n //\n // The `dep.attributeTypeName` is only actually used (in `createCtorDepType()`) to generate\n // typings.\n return importExpr(Identifiers.injectAttribute).callFn([dep.token]);\n }\n}\nfunction createCtorDepsType(deps) {\n let hasTypes = false;\n const attributeTypes = deps.map(dep => {\n const type = createCtorDepType(dep);\n if (type !== null) {\n hasTypes = true;\n return type;\n }\n else {\n return literal(null);\n }\n });\n if (hasTypes) {\n return expressionType(literalArr(attributeTypes));\n }\n else {\n return NONE_TYPE;\n }\n}\nfunction createCtorDepType(dep) {\n const entries = [];\n if (dep.attributeNameType !== null) {\n entries.push({ key: 'attribute', value: dep.attributeNameType, quoted: false });\n }\n if (dep.optional) {\n entries.push({ key: 'optional', value: literal(true), quoted: false });\n }\n if (dep.host) {\n entries.push({ key: 'host', value: literal(true), quoted: false });\n }\n if (dep.self) {\n entries.push({ key: 'self', value: literal(true), quoted: false });\n }\n if (dep.skipSelf) {\n entries.push({ key: 'skipSelf', value: literal(true), quoted: false });\n }\n return entries.length > 0 ? literalMap(entries) : null;\n}\nfunction isDelegatedFactoryMetadata(meta) {\n return meta.delegateType !== undefined;\n}\nfunction isExpressionFactoryMetadata(meta) {\n return meta.expression !== undefined;\n}\nfunction getInjectFn(target) {\n switch (target) {\n case FactoryTarget$1.Component:\n case FactoryTarget$1.Directive:\n case FactoryTarget$1.Pipe:\n return Identifiers.directiveInject;\n case FactoryTarget$1.NgModule:\n case FactoryTarget$1.Injectable:\n default:\n return Identifiers.inject;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * This is an R3 `Node`-like wrapper for a raw `html.Comment` node. We do not currently\n * require the implementation of a visitor for Comments as they are only collected at\n * the top-level of the R3 AST, and only if `Render3ParseOptions['collectCommentNodes']`\n * is true.\n */\nclass Comment$1 {\n constructor(value, sourceSpan) {\n this.value = value;\n this.sourceSpan = sourceSpan;\n }\n visit(_visitor) {\n throw new Error('visit() not implemented for Comment');\n }\n}\nclass Text$3 {\n constructor(value, sourceSpan) {\n this.value = value;\n this.sourceSpan = sourceSpan;\n }\n visit(visitor) {\n return visitor.visitText(this);\n }\n}\nclass BoundText {\n constructor(value, sourceSpan, i18n) {\n this.value = value;\n this.sourceSpan = sourceSpan;\n this.i18n = i18n;\n }\n visit(visitor) {\n return visitor.visitBoundText(this);\n }\n}\n/**\n * Represents a text attribute in the template.\n *\n * `valueSpan` may not be present in cases where there is no value `<div a></div>`.\n * `keySpan` may also not be present for synthetic attributes from ICU expansions.\n */\nclass TextAttribute {\n constructor(name, value, sourceSpan, keySpan, valueSpan, i18n) {\n this.name = name;\n this.value = value;\n this.sourceSpan = sourceSpan;\n this.keySpan = keySpan;\n this.valueSpan = valueSpan;\n this.i18n = i18n;\n }\n visit(visitor) {\n return visitor.visitTextAttribute(this);\n }\n}\nclass BoundAttribute {\n constructor(name, type, securityContext, value, unit, sourceSpan, keySpan, valueSpan, i18n) {\n this.name = name;\n this.type = type;\n this.securityContext = securityContext;\n this.value = value;\n this.unit = unit;\n this.sourceSpan = sourceSpan;\n this.keySpan = keySpan;\n this.valueSpan = valueSpan;\n this.i18n = i18n;\n }\n static fromBoundElementProperty(prop, i18n) {\n if (prop.keySpan === undefined) {\n throw new Error(`Unexpected state: keySpan must be defined for bound attributes but was not for ${prop.name}: ${prop.sourceSpan}`);\n }\n return new BoundAttribute(prop.name, prop.type, prop.securityContext, prop.value, prop.unit, prop.sourceSpan, prop.keySpan, prop.valueSpan, i18n);\n }\n visit(visitor) {\n return visitor.visitBoundAttribute(this);\n }\n}\nclass BoundEvent {\n constructor(name, type, handler, target, phase, sourceSpan, handlerSpan, keySpan) {\n this.name = name;\n this.type = type;\n this.handler = handler;\n this.target = target;\n this.phase = phase;\n this.sourceSpan = sourceSpan;\n this.handlerSpan = handlerSpan;\n this.keySpan = keySpan;\n }\n static fromParsedEvent(event) {\n const target = event.type === 0 /* ParsedEventType.Regular */ ? event.targetOrPhase : null;\n const phase = event.type === 1 /* ParsedEventType.Animation */ ? event.targetOrPhase : null;\n if (event.keySpan === undefined) {\n throw new Error(`Unexpected state: keySpan must be defined for bound event but was not for ${event.name}: ${event.sourceSpan}`);\n }\n return new BoundEvent(event.name, event.type, event.handler, target, phase, event.sourceSpan, event.handlerSpan, event.keySpan);\n }\n visit(visitor) {\n return visitor.visitBoundEvent(this);\n }\n}\nclass Element$1 {\n constructor(name, attributes, inputs, outputs, children, references, sourceSpan, startSourceSpan, endSourceSpan, i18n) {\n this.name = name;\n this.attributes = attributes;\n this.inputs = inputs;\n this.outputs = outputs;\n this.children = children;\n this.references = references;\n this.sourceSpan = sourceSpan;\n this.startSourceSpan = startSourceSpan;\n this.endSourceSpan = endSourceSpan;\n this.i18n = i18n;\n }\n visit(visitor) {\n return visitor.visitElement(this);\n }\n}\nclass Template {\n constructor(\n // tagName is the name of the container element, if applicable.\n // `null` is a special case for when there is a structural directive on an `ng-template` so\n // the renderer can differentiate between the synthetic template and the one written in the\n // file.\n tagName, attributes, inputs, outputs, templateAttrs, children, references, variables, sourceSpan, startSourceSpan, endSourceSpan, i18n) {\n this.tagName = tagName;\n this.attributes = attributes;\n this.inputs = inputs;\n this.outputs = outputs;\n this.templateAttrs = templateAttrs;\n this.children = children;\n this.references = references;\n this.variables = variables;\n this.sourceSpan = sourceSpan;\n this.startSourceSpan = startSourceSpan;\n this.endSourceSpan = endSourceSpan;\n this.i18n = i18n;\n }\n visit(visitor) {\n return visitor.visitTemplate(this);\n }\n}\nclass Content {\n constructor(selector, attributes, sourceSpan, i18n) {\n this.selector = selector;\n this.attributes = attributes;\n this.sourceSpan = sourceSpan;\n this.i18n = i18n;\n this.name = 'ng-content';\n }\n visit(visitor) {\n return visitor.visitContent(this);\n }\n}\nclass Variable {\n constructor(name, value, sourceSpan, keySpan, valueSpan) {\n this.name = name;\n this.value = value;\n this.sourceSpan = sourceSpan;\n this.keySpan = keySpan;\n this.valueSpan = valueSpan;\n }\n visit(visitor) {\n return visitor.visitVariable(this);\n }\n}\nclass Reference {\n constructor(name, value, sourceSpan, keySpan, valueSpan) {\n this.name = name;\n this.value = value;\n this.sourceSpan = sourceSpan;\n this.keySpan = keySpan;\n this.valueSpan = valueSpan;\n }\n visit(visitor) {\n return visitor.visitReference(this);\n }\n}\nclass Icu$1 {\n constructor(vars, placeholders, sourceSpan, i18n) {\n this.vars = vars;\n this.placeholders = placeholders;\n this.sourceSpan = sourceSpan;\n this.i18n = i18n;\n }\n visit(visitor) {\n return visitor.visitIcu(this);\n }\n}\nclass NullVisitor {\n visitElement(element) { }\n visitTemplate(template) { }\n visitContent(content) { }\n visitVariable(variable) { }\n visitReference(reference) { }\n visitTextAttribute(attribute) { }\n visitBoundAttribute(attribute) { }\n visitBoundEvent(attribute) { }\n visitText(text) { }\n visitBoundText(text) { }\n visitIcu(icu) { }\n}\nclass RecursiveVisitor$1 {\n visitElement(element) {\n visitAll$1(this, element.attributes);\n visitAll$1(this, element.inputs);\n visitAll$1(this, element.outputs);\n visitAll$1(this, element.children);\n visitAll$1(this, element.references);\n }\n visitTemplate(template) {\n visitAll$1(this, template.attributes);\n visitAll$1(this, template.inputs);\n visitAll$1(this, template.outputs);\n visitAll$1(this, template.children);\n visitAll$1(this, template.references);\n visitAll$1(this, template.variables);\n }\n visitContent(content) { }\n visitVariable(variable) { }\n visitReference(reference) { }\n visitTextAttribute(attribute) { }\n visitBoundAttribute(attribute) { }\n visitBoundEvent(attribute) { }\n visitText(text) { }\n visitBoundText(text) { }\n visitIcu(icu) { }\n}\nclass TransformVisitor {\n visitElement(element) {\n const newAttributes = transformAll(this, element.attributes);\n const newInputs = transformAll(this, element.inputs);\n const newOutputs = transformAll(this, element.outputs);\n const newChildren = transformAll(this, element.children);\n const newReferences = transformAll(this, element.references);\n if (newAttributes != element.attributes || newInputs != element.inputs ||\n newOutputs != element.outputs || newChildren != element.children ||\n newReferences != element.references) {\n return new Element$1(element.name, newAttributes, newInputs, newOutputs, newChildren, newReferences, element.sourceSpan, element.startSourceSpan, element.endSourceSpan);\n }\n return element;\n }\n visitTemplate(template) {\n const newAttributes = transformAll(this, template.attributes);\n const newInputs = transformAll(this, template.inputs);\n const newOutputs = transformAll(this, template.outputs);\n const newTemplateAttrs = transformAll(this, template.templateAttrs);\n const newChildren = transformAll(this, template.children);\n const newReferences = transformAll(this, template.references);\n const newVariables = transformAll(this, template.variables);\n if (newAttributes != template.attributes || newInputs != template.inputs ||\n newOutputs != template.outputs || newTemplateAttrs != template.templateAttrs ||\n newChildren != template.children || newReferences != template.references ||\n newVariables != template.variables) {\n return new Template(template.tagName, newAttributes, newInputs, newOutputs, newTemplateAttrs, newChildren, newReferences, newVariables, template.sourceSpan, template.startSourceSpan, template.endSourceSpan);\n }\n return template;\n }\n visitContent(content) {\n return content;\n }\n visitVariable(variable) {\n return variable;\n }\n visitReference(reference) {\n return reference;\n }\n visitTextAttribute(attribute) {\n return attribute;\n }\n visitBoundAttribute(attribute) {\n return attribute;\n }\n visitBoundEvent(attribute) {\n return attribute;\n }\n visitText(text) {\n return text;\n }\n visitBoundText(text) {\n return text;\n }\n visitIcu(icu) {\n return icu;\n }\n}\nfunction visitAll$1(visitor, nodes) {\n const result = [];\n if (visitor.visit) {\n for (const node of nodes) {\n const newNode = visitor.visit(node) || node.visit(visitor);\n }\n }\n else {\n for (const node of nodes) {\n const newNode = node.visit(visitor);\n if (newNode) {\n result.push(newNode);\n }\n }\n }\n return result;\n}\nfunction transformAll(visitor, nodes) {\n const result = [];\n let changed = false;\n for (const node of nodes) {\n const newNode = node.visit(visitor);\n if (newNode) {\n result.push(newNode);\n }\n changed = changed || newNode != node;\n }\n return changed ? result : nodes;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass Message {\n /**\n * @param nodes message AST\n * @param placeholders maps placeholder names to static content and their source spans\n * @param placeholderToMessage maps placeholder names to messages (used for nested ICU messages)\n * @param meaning\n * @param description\n * @param customId\n */\n constructor(nodes, placeholders, placeholderToMessage, meaning, description, customId) {\n this.nodes = nodes;\n this.placeholders = placeholders;\n this.placeholderToMessage = placeholderToMessage;\n this.meaning = meaning;\n this.description = description;\n this.customId = customId;\n this.id = this.customId;\n /** The ids to use if there are no custom id and if `i18nLegacyMessageIdFormat` is not empty */\n this.legacyIds = [];\n this.messageString = serializeMessage(this.nodes);\n if (nodes.length) {\n this.sources = [{\n filePath: nodes[0].sourceSpan.start.file.url,\n startLine: nodes[0].sourceSpan.start.line + 1,\n startCol: nodes[0].sourceSpan.start.col + 1,\n endLine: nodes[nodes.length - 1].sourceSpan.end.line + 1,\n endCol: nodes[0].sourceSpan.start.col + 1\n }];\n }\n else {\n this.sources = [];\n }\n }\n}\nclass Text$2 {\n constructor(value, sourceSpan) {\n this.value = value;\n this.sourceSpan = sourceSpan;\n }\n visit(visitor, context) {\n return visitor.visitText(this, context);\n }\n}\n// TODO(vicb): do we really need this node (vs an array) ?\nclass Container {\n constructor(children, sourceSpan) {\n this.children = children;\n this.sourceSpan = sourceSpan;\n }\n visit(visitor, context) {\n return visitor.visitContainer(this, context);\n }\n}\nclass Icu {\n constructor(expression, type, cases, sourceSpan) {\n this.expression = expression;\n this.type = type;\n this.cases = cases;\n this.sourceSpan = sourceSpan;\n }\n visit(visitor, context) {\n return visitor.visitIcu(this, context);\n }\n}\nclass TagPlaceholder {\n constructor(tag, attrs, startName, closeName, children, isVoid, \n // TODO sourceSpan should cover all (we need a startSourceSpan and endSourceSpan)\n sourceSpan, startSourceSpan, endSourceSpan) {\n this.tag = tag;\n this.attrs = attrs;\n this.startName = startName;\n this.closeName = closeName;\n this.children = children;\n this.isVoid = isVoid;\n this.sourceSpan = sourceSpan;\n this.startSourceSpan = startSourceSpan;\n this.endSourceSpan = endSourceSpan;\n }\n visit(visitor, context) {\n return visitor.visitTagPlaceholder(this, context);\n }\n}\nclass Placeholder {\n constructor(value, name, sourceSpan) {\n this.value = value;\n this.name = name;\n this.sourceSpan = sourceSpan;\n }\n visit(visitor, context) {\n return visitor.visitPlaceholder(this, context);\n }\n}\nclass IcuPlaceholder {\n constructor(value, name, sourceSpan) {\n this.value = value;\n this.name = name;\n this.sourceSpan = sourceSpan;\n }\n visit(visitor, context) {\n return visitor.visitIcuPlaceholder(this, context);\n }\n}\n// Clone the AST\nclass CloneVisitor {\n visitText(text, context) {\n return new Text$2(text.value, text.sourceSpan);\n }\n visitContainer(container, context) {\n const children = container.children.map(n => n.visit(this, context));\n return new Container(children, container.sourceSpan);\n }\n visitIcu(icu, context) {\n const cases = {};\n Object.keys(icu.cases).forEach(key => cases[key] = icu.cases[key].visit(this, context));\n const msg = new Icu(icu.expression, icu.type, cases, icu.sourceSpan);\n msg.expressionPlaceholder = icu.expressionPlaceholder;\n return msg;\n }\n visitTagPlaceholder(ph, context) {\n const children = ph.children.map(n => n.visit(this, context));\n return new TagPlaceholder(ph.tag, ph.attrs, ph.startName, ph.closeName, children, ph.isVoid, ph.sourceSpan, ph.startSourceSpan, ph.endSourceSpan);\n }\n visitPlaceholder(ph, context) {\n return new Placeholder(ph.value, ph.name, ph.sourceSpan);\n }\n visitIcuPlaceholder(ph, context) {\n return new IcuPlaceholder(ph.value, ph.name, ph.sourceSpan);\n }\n}\n// Visit all the nodes recursively\nclass RecurseVisitor {\n visitText(text, context) { }\n visitContainer(container, context) {\n container.children.forEach(child => child.visit(this));\n }\n visitIcu(icu, context) {\n Object.keys(icu.cases).forEach(k => {\n icu.cases[k].visit(this);\n });\n }\n visitTagPlaceholder(ph, context) {\n ph.children.forEach(child => child.visit(this));\n }\n visitPlaceholder(ph, context) { }\n visitIcuPlaceholder(ph, context) { }\n}\n/**\n * Serialize the message to the Localize backtick string format that would appear in compiled code.\n */\nfunction serializeMessage(messageNodes) {\n const visitor = new LocalizeMessageStringVisitor();\n const str = messageNodes.map(n => n.visit(visitor)).join('');\n return str;\n}\nclass LocalizeMessageStringVisitor {\n visitText(text) {\n return text.value;\n }\n visitContainer(container) {\n return container.children.map(child => child.visit(this)).join('');\n }\n visitIcu(icu) {\n const strCases = Object.keys(icu.cases).map((k) => `${k} {${icu.cases[k].visit(this)}}`);\n return `{${icu.expressionPlaceholder}, ${icu.type}, ${strCases.join(' ')}}`;\n }\n visitTagPlaceholder(ph) {\n const children = ph.children.map(child => child.visit(this)).join('');\n return `{$${ph.startName}}${children}{$${ph.closeName}}`;\n }\n visitPlaceholder(ph) {\n return `{$${ph.name}}`;\n }\n visitIcuPlaceholder(ph) {\n return `{$${ph.name}}`;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass Serializer {\n // Creates a name mapper, see `PlaceholderMapper`\n // Returning `null` means that no name mapping is used.\n createNameMapper(message) {\n return null;\n }\n}\n/**\n * A simple mapper that take a function to transform an internal name to a public name\n */\nclass SimplePlaceholderMapper extends RecurseVisitor {\n // create a mapping from the message\n constructor(message, mapName) {\n super();\n this.mapName = mapName;\n this.internalToPublic = {};\n this.publicToNextId = {};\n this.publicToInternal = {};\n message.nodes.forEach(node => node.visit(this));\n }\n toPublicName(internalName) {\n return this.internalToPublic.hasOwnProperty(internalName) ?\n this.internalToPublic[internalName] :\n null;\n }\n toInternalName(publicName) {\n return this.publicToInternal.hasOwnProperty(publicName) ? this.publicToInternal[publicName] :\n null;\n }\n visitText(text, context) {\n return null;\n }\n visitTagPlaceholder(ph, context) {\n this.visitPlaceholderName(ph.startName);\n super.visitTagPlaceholder(ph, context);\n this.visitPlaceholderName(ph.closeName);\n }\n visitPlaceholder(ph, context) {\n this.visitPlaceholderName(ph.name);\n }\n visitIcuPlaceholder(ph, context) {\n this.visitPlaceholderName(ph.name);\n }\n // XMB placeholders could only contains A-Z, 0-9 and _\n visitPlaceholderName(internalName) {\n if (!internalName || this.internalToPublic.hasOwnProperty(internalName)) {\n return;\n }\n let publicName = this.mapName(internalName);\n if (this.publicToInternal.hasOwnProperty(publicName)) {\n // Create a new XMB when it has already been used\n const nextId = this.publicToNextId[publicName];\n this.publicToNextId[publicName] = nextId + 1;\n publicName = `${publicName}_${nextId}`;\n }\n else {\n this.publicToNextId[publicName] = 1;\n }\n this.internalToPublic[internalName] = publicName;\n this.publicToInternal[publicName] = internalName;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass _Visitor$2 {\n visitTag(tag) {\n const strAttrs = this._serializeAttributes(tag.attrs);\n if (tag.children.length == 0) {\n return `<${tag.name}${strAttrs}/>`;\n }\n const strChildren = tag.children.map(node => node.visit(this));\n return `<${tag.name}${strAttrs}>${strChildren.join('')}</${tag.name}>`;\n }\n visitText(text) {\n return text.value;\n }\n visitDeclaration(decl) {\n return `<?xml${this._serializeAttributes(decl.attrs)} ?>`;\n }\n _serializeAttributes(attrs) {\n const strAttrs = Object.keys(attrs).map((name) => `${name}=\"${attrs[name]}\"`).join(' ');\n return strAttrs.length > 0 ? ' ' + strAttrs : '';\n }\n visitDoctype(doctype) {\n return `<!DOCTYPE ${doctype.rootTag} [\\n${doctype.dtd}\\n]>`;\n }\n}\nconst _visitor = new _Visitor$2();\nfunction serialize(nodes) {\n return nodes.map((node) => node.visit(_visitor)).join('');\n}\nclass Declaration {\n constructor(unescapedAttrs) {\n this.attrs = {};\n Object.keys(unescapedAttrs).forEach((k) => {\n this.attrs[k] = escapeXml(unescapedAttrs[k]);\n });\n }\n visit(visitor) {\n return visitor.visitDeclaration(this);\n }\n}\nclass Doctype {\n constructor(rootTag, dtd) {\n this.rootTag = rootTag;\n this.dtd = dtd;\n }\n visit(visitor) {\n return visitor.visitDoctype(this);\n }\n}\nclass Tag {\n constructor(name, unescapedAttrs = {}, children = []) {\n this.name = name;\n this.children = children;\n this.attrs = {};\n Object.keys(unescapedAttrs).forEach((k) => {\n this.attrs[k] = escapeXml(unescapedAttrs[k]);\n });\n }\n visit(visitor) {\n return visitor.visitTag(this);\n }\n}\nclass Text$1 {\n constructor(unescapedValue) {\n this.value = escapeXml(unescapedValue);\n }\n visit(visitor) {\n return visitor.visitText(this);\n }\n}\nclass CR extends Text$1 {\n constructor(ws = 0) {\n super(`\\n${new Array(ws + 1).join(' ')}`);\n }\n}\nconst _ESCAPED_CHARS = [\n [/&/g, '&'],\n [/\"/g, '"'],\n [/'/g, '''],\n [/</g, '<'],\n [/>/g, '>'],\n];\n// Escape `_ESCAPED_CHARS` characters in the given text with encoded entities\nfunction escapeXml(text) {\n return _ESCAPED_CHARS.reduce((text, entry) => text.replace(entry[0], entry[1]), text);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst _MESSAGES_TAG = 'messagebundle';\nconst _MESSAGE_TAG = 'msg';\nconst _PLACEHOLDER_TAG$3 = 'ph';\nconst _EXAMPLE_TAG = 'ex';\nconst _SOURCE_TAG$2 = 'source';\nconst _DOCTYPE = `<!ELEMENT messagebundle (msg)*>\n<!ATTLIST messagebundle class CDATA #IMPLIED>\n\n<!ELEMENT msg (#PCDATA|ph|source)*>\n<!ATTLIST msg id CDATA #IMPLIED>\n<!ATTLIST msg seq CDATA #IMPLIED>\n<!ATTLIST msg name CDATA #IMPLIED>\n<!ATTLIST msg desc CDATA #IMPLIED>\n<!ATTLIST msg meaning CDATA #IMPLIED>\n<!ATTLIST msg obsolete (obsolete) #IMPLIED>\n<!ATTLIST msg xml:space (default|preserve) \"default\">\n<!ATTLIST msg is_hidden CDATA #IMPLIED>\n\n<!ELEMENT source (#PCDATA)>\n\n<!ELEMENT ph (#PCDATA|ex)*>\n<!ATTLIST ph name CDATA #REQUIRED>\n\n<!ELEMENT ex (#PCDATA)>`;\nclass Xmb extends Serializer {\n write(messages, locale) {\n const exampleVisitor = new ExampleVisitor();\n const visitor = new _Visitor$1();\n let rootNode = new Tag(_MESSAGES_TAG);\n messages.forEach(message => {\n const attrs = { id: message.id };\n if (message.description) {\n attrs['desc'] = message.description;\n }\n if (message.meaning) {\n attrs['meaning'] = message.meaning;\n }\n let sourceTags = [];\n message.sources.forEach((source) => {\n sourceTags.push(new Tag(_SOURCE_TAG$2, {}, [new Text$1(`${source.filePath}:${source.startLine}${source.endLine !== source.startLine ? ',' + source.endLine : ''}`)]));\n });\n rootNode.children.push(new CR(2), new Tag(_MESSAGE_TAG, attrs, [...sourceTags, ...visitor.serialize(message.nodes)]));\n });\n rootNode.children.push(new CR());\n return serialize([\n new Declaration({ version: '1.0', encoding: 'UTF-8' }),\n new CR(),\n new Doctype(_MESSAGES_TAG, _DOCTYPE),\n new CR(),\n exampleVisitor.addDefaultExamples(rootNode),\n new CR(),\n ]);\n }\n load(content, url) {\n throw new Error('Unsupported');\n }\n digest(message) {\n return digest(message);\n }\n createNameMapper(message) {\n return new SimplePlaceholderMapper(message, toPublicName);\n }\n}\nclass _Visitor$1 {\n visitText(text, context) {\n return [new Text$1(text.value)];\n }\n visitContainer(container, context) {\n const nodes = [];\n container.children.forEach((node) => nodes.push(...node.visit(this)));\n return nodes;\n }\n visitIcu(icu, context) {\n const nodes = [new Text$1(`{${icu.expressionPlaceholder}, ${icu.type}, `)];\n Object.keys(icu.cases).forEach((c) => {\n nodes.push(new Text$1(`${c} {`), ...icu.cases[c].visit(this), new Text$1(`} `));\n });\n nodes.push(new Text$1(`}`));\n return nodes;\n }\n visitTagPlaceholder(ph, context) {\n const startTagAsText = new Text$1(`<${ph.tag}>`);\n const startEx = new Tag(_EXAMPLE_TAG, {}, [startTagAsText]);\n // TC requires PH to have a non empty EX, and uses the text node to show the \"original\" value.\n const startTagPh = new Tag(_PLACEHOLDER_TAG$3, { name: ph.startName }, [startEx, startTagAsText]);\n if (ph.isVoid) {\n // void tags have no children nor closing tags\n return [startTagPh];\n }\n const closeTagAsText = new Text$1(`</${ph.tag}>`);\n const closeEx = new Tag(_EXAMPLE_TAG, {}, [closeTagAsText]);\n // TC requires PH to have a non empty EX, and uses the text node to show the \"original\" value.\n const closeTagPh = new Tag(_PLACEHOLDER_TAG$3, { name: ph.closeName }, [closeEx, closeTagAsText]);\n return [startTagPh, ...this.serialize(ph.children), closeTagPh];\n }\n visitPlaceholder(ph, context) {\n const interpolationAsText = new Text$1(`{{${ph.value}}}`);\n // Example tag needs to be not-empty for TC.\n const exTag = new Tag(_EXAMPLE_TAG, {}, [interpolationAsText]);\n return [\n // TC requires PH to have a non empty EX, and uses the text node to show the \"original\" value.\n new Tag(_PLACEHOLDER_TAG$3, { name: ph.name }, [exTag, interpolationAsText])\n ];\n }\n visitIcuPlaceholder(ph, context) {\n const icuExpression = ph.value.expression;\n const icuType = ph.value.type;\n const icuCases = Object.keys(ph.value.cases).map((value) => value + ' {...}').join(' ');\n const icuAsText = new Text$1(`{${icuExpression}, ${icuType}, ${icuCases}}`);\n const exTag = new Tag(_EXAMPLE_TAG, {}, [icuAsText]);\n return [\n // TC requires PH to have a non empty EX, and uses the text node to show the \"original\" value.\n new Tag(_PLACEHOLDER_TAG$3, { name: ph.name }, [exTag, icuAsText])\n ];\n }\n serialize(nodes) {\n return [].concat(...nodes.map(node => node.visit(this)));\n }\n}\nfunction digest(message) {\n return decimalDigest(message);\n}\n// TC requires at least one non-empty example on placeholders\nclass ExampleVisitor {\n addDefaultExamples(node) {\n node.visit(this);\n return node;\n }\n visitTag(tag) {\n if (tag.name === _PLACEHOLDER_TAG$3) {\n if (!tag.children || tag.children.length == 0) {\n const exText = new Text$1(tag.attrs['name'] || '...');\n tag.children = [new Tag(_EXAMPLE_TAG, {}, [exText])];\n }\n }\n else if (tag.children) {\n tag.children.forEach(node => node.visit(this));\n }\n }\n visitText(text) { }\n visitDeclaration(decl) { }\n visitDoctype(doctype) { }\n}\n// XMB/XTB placeholders can only contain A-Z, 0-9 and _\nfunction toPublicName(internalName) {\n return internalName.toUpperCase().replace(/[^A-Z0-9_]/g, '_');\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/* Closure variables holding messages must be named `MSG_[A-Z0-9]+` */\nconst CLOSURE_TRANSLATION_VAR_PREFIX = 'MSG_';\n/**\n * Prefix for non-`goog.getMsg` i18n-related vars.\n * Note: the prefix uses lowercase characters intentionally due to a Closure behavior that\n * considers variables like `I18N_0` as constants and throws an error when their value changes.\n */\nconst TRANSLATION_VAR_PREFIX = 'i18n_';\n/** Name of the i18n attributes **/\nconst I18N_ATTR = 'i18n';\nconst I18N_ATTR_PREFIX = 'i18n-';\n/** Prefix of var expressions used in ICUs */\nconst I18N_ICU_VAR_PREFIX = 'VAR_';\n/** Prefix of ICU expressions for post processing */\nconst I18N_ICU_MAPPING_PREFIX = 'I18N_EXP_';\n/** Placeholder wrapper for i18n expressions **/\nconst I18N_PLACEHOLDER_SYMBOL = '�';\nfunction isI18nAttribute(name) {\n return name === I18N_ATTR || name.startsWith(I18N_ATTR_PREFIX);\n}\nfunction isI18nRootNode(meta) {\n return meta instanceof Message;\n}\nfunction isSingleI18nIcu(meta) {\n return isI18nRootNode(meta) && meta.nodes.length === 1 && meta.nodes[0] instanceof Icu;\n}\nfunction hasI18nMeta(node) {\n return !!node.i18n;\n}\nfunction hasI18nAttrs(element) {\n return element.attrs.some((attr) => isI18nAttribute(attr.name));\n}\nfunction icuFromI18nMessage(message) {\n return message.nodes[0];\n}\nfunction wrapI18nPlaceholder(content, contextId = 0) {\n const blockId = contextId > 0 ? `:${contextId}` : '';\n return `${I18N_PLACEHOLDER_SYMBOL}${content}${blockId}${I18N_PLACEHOLDER_SYMBOL}`;\n}\nfunction assembleI18nBoundString(strings, bindingStartIndex = 0, contextId = 0) {\n if (!strings.length)\n return '';\n let acc = '';\n const lastIdx = strings.length - 1;\n for (let i = 0; i < lastIdx; i++) {\n acc += `${strings[i]}${wrapI18nPlaceholder(bindingStartIndex + i, contextId)}`;\n }\n acc += strings[lastIdx];\n return acc;\n}\nfunction getSeqNumberGenerator(startsAt = 0) {\n let current = startsAt;\n return () => current++;\n}\nfunction placeholdersToParams(placeholders) {\n const params = {};\n placeholders.forEach((values, key) => {\n params[key] = literal(values.length > 1 ? `[${values.join('|')}]` : values[0]);\n });\n return params;\n}\nfunction updatePlaceholderMap(map, name, ...values) {\n const current = map.get(name) || [];\n current.push(...values);\n map.set(name, current);\n}\nfunction assembleBoundTextPlaceholders(meta, bindingStartIndex = 0, contextId = 0) {\n const startIdx = bindingStartIndex;\n const placeholders = new Map();\n const node = meta instanceof Message ? meta.nodes.find(node => node instanceof Container) : meta;\n if (node) {\n node\n .children\n .filter((child) => child instanceof Placeholder)\n .forEach((child, idx) => {\n const content = wrapI18nPlaceholder(startIdx + idx, contextId);\n updatePlaceholderMap(placeholders, child.name, content);\n });\n }\n return placeholders;\n}\n/**\n * Format the placeholder names in a map of placeholders to expressions.\n *\n * The placeholder names are converted from \"internal\" format (e.g. `START_TAG_DIV_1`) to \"external\"\n * format (e.g. `startTagDiv_1`).\n *\n * @param params A map of placeholder names to expressions.\n * @param useCamelCase whether to camelCase the placeholder name when formatting.\n * @returns A new map of formatted placeholder names to expressions.\n */\nfunction formatI18nPlaceholderNamesInMap(params = {}, useCamelCase) {\n const _params = {};\n if (params && Object.keys(params).length) {\n Object.keys(params).forEach(key => _params[formatI18nPlaceholderName(key, useCamelCase)] = params[key]);\n }\n return _params;\n}\n/**\n * Converts internal placeholder names to public-facing format\n * (for example to use in goog.getMsg call).\n * Example: `START_TAG_DIV_1` is converted to `startTagDiv_1`.\n *\n * @param name The placeholder name that should be formatted\n * @returns Formatted placeholder name\n */\nfunction formatI18nPlaceholderName(name, useCamelCase = true) {\n const publicName = toPublicName(name);\n if (!useCamelCase) {\n return publicName;\n }\n const chunks = publicName.split('_');\n if (chunks.length === 1) {\n // if no \"_\" found - just lowercase the value\n return name.toLowerCase();\n }\n let postfix;\n // eject last element if it's a number\n if (/^\\d+$/.test(chunks[chunks.length - 1])) {\n postfix = chunks.pop();\n }\n let raw = chunks.shift().toLowerCase();\n if (chunks.length) {\n raw += chunks.map(c => c.charAt(0).toUpperCase() + c.slice(1).toLowerCase()).join('');\n }\n return postfix ? `${raw}_${postfix}` : raw;\n}\n/**\n * Generates a prefix for translation const name.\n *\n * @param extra Additional local prefix that should be injected into translation var name\n * @returns Complete translation const prefix\n */\nfunction getTranslationConstPrefix(extra) {\n return `${CLOSURE_TRANSLATION_VAR_PREFIX}${extra}`.toUpperCase();\n}\n/**\n * Generate AST to declare a variable. E.g. `var I18N_1;`.\n * @param variable the name of the variable to declare.\n */\nfunction declareI18nVariable(variable) {\n return new DeclareVarStmt(variable.name, undefined, INFERRED_TYPE, undefined, variable.sourceSpan);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Checks whether an object key contains potentially unsafe chars, thus the key should be wrapped in\n * quotes. Note: we do not wrap all keys into quotes, as it may have impact on minification and may\n * bot work in some cases when object keys are mangled by minifier.\n *\n * TODO(FW-1136): this is a temporary solution, we need to come up with a better way of working with\n * inputs that contain potentially unsafe chars.\n */\nconst UNSAFE_OBJECT_KEY_NAME_REGEXP = /[-.]/;\n/** Name of the temporary to use during data binding */\nconst TEMPORARY_NAME = '_t';\n/** Name of the context parameter passed into a template function */\nconst CONTEXT_NAME = 'ctx';\n/** Name of the RenderFlag passed into a template function */\nconst RENDER_FLAGS = 'rf';\n/** The prefix reference variables */\nconst REFERENCE_PREFIX = '_r';\n/** The name of the implicit context reference */\nconst IMPLICIT_REFERENCE = '$implicit';\n/** Non bindable attribute name **/\nconst NON_BINDABLE_ATTR = 'ngNonBindable';\n/** Name for the variable keeping track of the context returned by `ɵɵrestoreView`. */\nconst RESTORED_VIEW_CONTEXT_NAME = 'restoredCtx';\n/**\n * Maximum length of a single instruction chain. Because our output AST uses recursion, we're\n * limited in how many expressions we can nest before we reach the call stack limit. This\n * length is set very conservatively in order to reduce the chance of problems.\n */\nconst MAX_CHAIN_LENGTH = 500;\n/** Instructions that support chaining. */\nconst CHAINABLE_INSTRUCTIONS = new Set([\n Identifiers.element,\n Identifiers.elementStart,\n Identifiers.elementEnd,\n Identifiers.elementContainer,\n Identifiers.elementContainerStart,\n Identifiers.elementContainerEnd,\n Identifiers.i18nExp,\n Identifiers.listener,\n Identifiers.classProp,\n Identifiers.syntheticHostListener,\n Identifiers.hostProperty,\n Identifiers.syntheticHostProperty,\n Identifiers.property,\n Identifiers.propertyInterpolate1,\n Identifiers.propertyInterpolate2,\n Identifiers.propertyInterpolate3,\n Identifiers.propertyInterpolate4,\n Identifiers.propertyInterpolate5,\n Identifiers.propertyInterpolate6,\n Identifiers.propertyInterpolate7,\n Identifiers.propertyInterpolate8,\n Identifiers.propertyInterpolateV,\n Identifiers.attribute,\n Identifiers.attributeInterpolate1,\n Identifiers.attributeInterpolate2,\n Identifiers.attributeInterpolate3,\n Identifiers.attributeInterpolate4,\n Identifiers.attributeInterpolate5,\n Identifiers.attributeInterpolate6,\n Identifiers.attributeInterpolate7,\n Identifiers.attributeInterpolate8,\n Identifiers.attributeInterpolateV,\n Identifiers.styleProp,\n Identifiers.stylePropInterpolate1,\n Identifiers.stylePropInterpolate2,\n Identifiers.stylePropInterpolate3,\n Identifiers.stylePropInterpolate4,\n Identifiers.stylePropInterpolate5,\n Identifiers.stylePropInterpolate6,\n Identifiers.stylePropInterpolate7,\n Identifiers.stylePropInterpolate8,\n Identifiers.stylePropInterpolateV,\n Identifiers.textInterpolate,\n Identifiers.textInterpolate1,\n Identifiers.textInterpolate2,\n Identifiers.textInterpolate3,\n Identifiers.textInterpolate4,\n Identifiers.textInterpolate5,\n Identifiers.textInterpolate6,\n Identifiers.textInterpolate7,\n Identifiers.textInterpolate8,\n Identifiers.textInterpolateV,\n]);\n/** Generates a call to a single instruction. */\nfunction invokeInstruction(span, reference, params) {\n return importExpr(reference, null, span).callFn(params, span);\n}\n/**\n * Creates an allocator for a temporary variable.\n *\n * A variable declaration is added to the statements the first time the allocator is invoked.\n */\nfunction temporaryAllocator(statements, name) {\n let temp = null;\n return () => {\n if (!temp) {\n statements.push(new DeclareVarStmt(TEMPORARY_NAME, undefined, DYNAMIC_TYPE));\n temp = variable(name);\n }\n return temp;\n };\n}\nfunction invalid(arg) {\n throw new Error(`Invalid state: Visitor ${this.constructor.name} doesn't handle ${arg.constructor.name}`);\n}\nfunction asLiteral(value) {\n if (Array.isArray(value)) {\n return literalArr(value.map(asLiteral));\n }\n return literal(value, INFERRED_TYPE);\n}\nfunction conditionallyCreateMapObjectLiteral(keys, keepDeclared) {\n if (Object.getOwnPropertyNames(keys).length > 0) {\n return mapToExpression(keys, keepDeclared);\n }\n return null;\n}\nfunction mapToExpression(map, keepDeclared) {\n return literalMap(Object.getOwnPropertyNames(map).map(key => {\n // canonical syntax: `dirProp: publicProp`\n const value = map[key];\n let declaredName;\n let publicName;\n let minifiedName;\n let needsDeclaredName;\n if (Array.isArray(value)) {\n [publicName, declaredName] = value;\n minifiedName = key;\n needsDeclaredName = publicName !== declaredName;\n }\n else {\n minifiedName = declaredName = key;\n publicName = value;\n needsDeclaredName = false;\n }\n return {\n key: minifiedName,\n // put quotes around keys that contain potentially unsafe characters\n quoted: UNSAFE_OBJECT_KEY_NAME_REGEXP.test(minifiedName),\n value: (keepDeclared && needsDeclaredName) ?\n literalArr([asLiteral(publicName), asLiteral(declaredName)]) :\n asLiteral(publicName)\n };\n }));\n}\n/**\n * Remove trailing null nodes as they are implied.\n */\nfunction trimTrailingNulls(parameters) {\n while (isNull(parameters[parameters.length - 1])) {\n parameters.pop();\n }\n return parameters;\n}\nfunction getQueryPredicate(query, constantPool) {\n if (Array.isArray(query.predicate)) {\n let predicate = [];\n query.predicate.forEach((selector) => {\n // Each item in predicates array may contain strings with comma-separated refs\n // (for ex. 'ref, ref1, ..., refN'), thus we extract individual refs and store them\n // as separate array entities\n const selectors = selector.split(',').map(token => literal(token.trim()));\n predicate.push(...selectors);\n });\n return constantPool.getConstLiteral(literalArr(predicate), true);\n }\n else {\n // The original predicate may have been wrapped in a `forwardRef()` call.\n switch (query.predicate.forwardRef) {\n case 0 /* ForwardRefHandling.None */:\n case 2 /* ForwardRefHandling.Unwrapped */:\n return query.predicate.expression;\n case 1 /* ForwardRefHandling.Wrapped */:\n return importExpr(Identifiers.resolveForwardRef).callFn([query.predicate.expression]);\n }\n }\n}\n/**\n * A representation for an object literal used during codegen of definition objects. The generic\n * type `T` allows to reference a documented type of the generated structure, such that the\n * property names that are set can be resolved to their documented declaration.\n */\nclass DefinitionMap {\n constructor() {\n this.values = [];\n }\n set(key, value) {\n if (value) {\n this.values.push({ key: key, value, quoted: false });\n }\n }\n toLiteralMap() {\n return literalMap(this.values);\n }\n}\n/**\n * Extract a map of properties to values for a given element or template node, which can be used\n * by the directive matching machinery.\n *\n * @param elOrTpl the element or template in question\n * @return an object set up for directive matching. For attributes on the element/template, this\n * object maps a property name to its (static) value. For any bindings, this map simply maps the\n * property name to an empty string.\n */\nfunction getAttrsForDirectiveMatching(elOrTpl) {\n const attributesMap = {};\n if (elOrTpl instanceof Template && elOrTpl.tagName !== 'ng-template') {\n elOrTpl.templateAttrs.forEach(a => attributesMap[a.name] = '');\n }\n else {\n elOrTpl.attributes.forEach(a => {\n if (!isI18nAttribute(a.name)) {\n attributesMap[a.name] = a.value;\n }\n });\n elOrTpl.inputs.forEach(i => {\n attributesMap[i.name] = '';\n });\n elOrTpl.outputs.forEach(o => {\n attributesMap[o.name] = '';\n });\n }\n return attributesMap;\n}\n/**\n * Gets the number of arguments expected to be passed to a generated instruction in the case of\n * interpolation instructions.\n * @param interpolation An interpolation ast\n */\nfunction getInterpolationArgsLength(interpolation) {\n const { expressions, strings } = interpolation;\n if (expressions.length === 1 && strings.length === 2 && strings[0] === '' && strings[1] === '') {\n // If the interpolation has one interpolated value, but the prefix and suffix are both empty\n // strings, we only pass one argument, to a special instruction like `propertyInterpolate` or\n // `textInterpolate`.\n return 1;\n }\n else {\n return expressions.length + strings.length;\n }\n}\n/**\n * Generates the final instruction call statements based on the passed in configuration.\n * Will try to chain instructions as much as possible, if chaining is supported.\n */\nfunction getInstructionStatements(instructions) {\n const statements = [];\n let pendingExpression = null;\n let pendingExpressionType = null;\n let chainLength = 0;\n for (const current of instructions) {\n const resolvedParams = (typeof current.paramsOrFn === 'function' ? current.paramsOrFn() : current.paramsOrFn) ??\n [];\n const params = Array.isArray(resolvedParams) ? resolvedParams : [resolvedParams];\n // If the current instruction is the same as the previous one\n // and it can be chained, add another call to the chain.\n if (chainLength < MAX_CHAIN_LENGTH && pendingExpressionType === current.reference &&\n CHAINABLE_INSTRUCTIONS.has(pendingExpressionType)) {\n // We'll always have a pending expression when there's a pending expression type.\n pendingExpression = pendingExpression.callFn(params, pendingExpression.sourceSpan);\n chainLength++;\n }\n else {\n if (pendingExpression !== null) {\n statements.push(pendingExpression.toStmt());\n }\n pendingExpression = invokeInstruction(current.span, current.reference, params);\n pendingExpressionType = current.reference;\n chainLength = 0;\n }\n }\n // Since the current instruction adds the previous one to the statements,\n // we may be left with the final one at the end that is still pending.\n if (pendingExpression !== null) {\n statements.push(pendingExpression.toStmt());\n }\n return statements;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction compileInjectable(meta, resolveForwardRefs) {\n let result = null;\n const factoryMeta = {\n name: meta.name,\n type: meta.type,\n internalType: meta.internalType,\n typeArgumentCount: meta.typeArgumentCount,\n deps: [],\n target: FactoryTarget$1.Injectable,\n };\n if (meta.useClass !== undefined) {\n // meta.useClass has two modes of operation. Either deps are specified, in which case `new` is\n // used to instantiate the class with dependencies injected, or deps are not specified and\n // the factory of the class is used to instantiate it.\n //\n // A special case exists for useClass: Type where Type is the injectable type itself and no\n // deps are specified, in which case 'useClass' is effectively ignored.\n const useClassOnSelf = meta.useClass.expression.isEquivalent(meta.internalType);\n let deps = undefined;\n if (meta.deps !== undefined) {\n deps = meta.deps;\n }\n if (deps !== undefined) {\n // factory: () => new meta.useClass(...deps)\n result = compileFactoryFunction({\n ...factoryMeta,\n delegate: meta.useClass.expression,\n delegateDeps: deps,\n delegateType: R3FactoryDelegateType.Class,\n });\n }\n else if (useClassOnSelf) {\n result = compileFactoryFunction(factoryMeta);\n }\n else {\n result = {\n statements: [],\n expression: delegateToFactory(meta.type.value, meta.useClass.expression, resolveForwardRefs)\n };\n }\n }\n else if (meta.useFactory !== undefined) {\n if (meta.deps !== undefined) {\n result = compileFactoryFunction({\n ...factoryMeta,\n delegate: meta.useFactory,\n delegateDeps: meta.deps || [],\n delegateType: R3FactoryDelegateType.Function,\n });\n }\n else {\n result = {\n statements: [],\n expression: fn([], [new ReturnStatement(meta.useFactory.callFn([]))])\n };\n }\n }\n else if (meta.useValue !== undefined) {\n // Note: it's safe to use `meta.useValue` instead of the `USE_VALUE in meta` check used for\n // client code because meta.useValue is an Expression which will be defined even if the actual\n // value is undefined.\n result = compileFactoryFunction({\n ...factoryMeta,\n expression: meta.useValue.expression,\n });\n }\n else if (meta.useExisting !== undefined) {\n // useExisting is an `inject` call on the existing token.\n result = compileFactoryFunction({\n ...factoryMeta,\n expression: importExpr(Identifiers.inject).callFn([meta.useExisting.expression]),\n });\n }\n else {\n result = {\n statements: [],\n expression: delegateToFactory(meta.type.value, meta.internalType, resolveForwardRefs)\n };\n }\n const token = meta.internalType;\n const injectableProps = new DefinitionMap();\n injectableProps.set('token', token);\n injectableProps.set('factory', result.expression);\n // Only generate providedIn property if it has a non-null value\n if (meta.providedIn.expression.value !== null) {\n injectableProps.set('providedIn', convertFromMaybeForwardRefExpression(meta.providedIn));\n }\n const expression = importExpr(Identifiers.ɵɵdefineInjectable)\n .callFn([injectableProps.toLiteralMap()], undefined, true);\n return {\n expression,\n type: createInjectableType(meta),\n statements: result.statements,\n };\n}\nfunction createInjectableType(meta) {\n return new ExpressionType(importExpr(Identifiers.InjectableDeclaration, [typeWithParameters(meta.type.type, meta.typeArgumentCount)]));\n}\nfunction delegateToFactory(type, internalType, unwrapForwardRefs) {\n if (type.node === internalType.node) {\n // The types are the same, so we can simply delegate directly to the type's factory.\n // ```\n // factory: type.ɵfac\n // ```\n return internalType.prop('ɵfac');\n }\n if (!unwrapForwardRefs) {\n // The type is not wrapped in a `forwardRef()`, so we create a simple factory function that\n // accepts a sub-type as an argument.\n // ```\n // factory: function(t) { return internalType.ɵfac(t); }\n // ```\n return createFactoryFunction(internalType);\n }\n // The internalType is actually wrapped in a `forwardRef()` so we need to resolve that before\n // calling its factory.\n // ```\n // factory: function(t) { return core.resolveForwardRef(type).ɵfac(t); }\n // ```\n const unwrappedType = importExpr(Identifiers.resolveForwardRef).callFn([internalType]);\n return createFactoryFunction(unwrappedType);\n}\nfunction createFactoryFunction(type) {\n return fn([new FnParam('t', DYNAMIC_TYPE)], [new ReturnStatement(type.prop('ɵfac').callFn([variable('t')]))]);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst UNUSABLE_INTERPOLATION_REGEXPS = [\n /^\\s*$/,\n /[<>]/,\n /^[{}]$/,\n /&(#|[a-z])/i,\n /^\\/\\//, // comment\n];\nfunction assertInterpolationSymbols(identifier, value) {\n if (value != null && !(Array.isArray(value) && value.length == 2)) {\n throw new Error(`Expected '${identifier}' to be an array, [start, end].`);\n }\n else if (value != null) {\n const start = value[0];\n const end = value[1];\n // Check for unusable interpolation symbols\n UNUSABLE_INTERPOLATION_REGEXPS.forEach(regexp => {\n if (regexp.test(start) || regexp.test(end)) {\n throw new Error(`['${start}', '${end}'] contains unusable interpolation symbol.`);\n }\n });\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass InterpolationConfig {\n constructor(start, end) {\n this.start = start;\n this.end = end;\n }\n static fromArray(markers) {\n if (!markers) {\n return DEFAULT_INTERPOLATION_CONFIG;\n }\n assertInterpolationSymbols('interpolation', markers);\n return new InterpolationConfig(markers[0], markers[1]);\n }\n}\nconst DEFAULT_INTERPOLATION_CONFIG = new InterpolationConfig('{{', '}}');\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst $EOF = 0;\nconst $BSPACE = 8;\nconst $TAB = 9;\nconst $LF = 10;\nconst $VTAB = 11;\nconst $FF = 12;\nconst $CR = 13;\nconst $SPACE = 32;\nconst $BANG = 33;\nconst $DQ = 34;\nconst $HASH = 35;\nconst $$ = 36;\nconst $PERCENT = 37;\nconst $AMPERSAND = 38;\nconst $SQ = 39;\nconst $LPAREN = 40;\nconst $RPAREN = 41;\nconst $STAR = 42;\nconst $PLUS = 43;\nconst $COMMA = 44;\nconst $MINUS = 45;\nconst $PERIOD = 46;\nconst $SLASH = 47;\nconst $COLON = 58;\nconst $SEMICOLON = 59;\nconst $LT = 60;\nconst $EQ = 61;\nconst $GT = 62;\nconst $QUESTION = 63;\nconst $0 = 48;\nconst $7 = 55;\nconst $9 = 57;\nconst $A = 65;\nconst $E = 69;\nconst $F = 70;\nconst $X = 88;\nconst $Z = 90;\nconst $LBRACKET = 91;\nconst $BACKSLASH = 92;\nconst $RBRACKET = 93;\nconst $CARET = 94;\nconst $_ = 95;\nconst $a = 97;\nconst $b = 98;\nconst $e = 101;\nconst $f = 102;\nconst $n = 110;\nconst $r = 114;\nconst $t = 116;\nconst $u = 117;\nconst $v = 118;\nconst $x = 120;\nconst $z = 122;\nconst $LBRACE = 123;\nconst $BAR = 124;\nconst $RBRACE = 125;\nconst $NBSP = 160;\nconst $PIPE = 124;\nconst $TILDA = 126;\nconst $AT = 64;\nconst $BT = 96;\nfunction isWhitespace(code) {\n return (code >= $TAB && code <= $SPACE) || (code == $NBSP);\n}\nfunction isDigit(code) {\n return $0 <= code && code <= $9;\n}\nfunction isAsciiLetter(code) {\n return code >= $a && code <= $z || code >= $A && code <= $Z;\n}\nfunction isAsciiHexDigit(code) {\n return code >= $a && code <= $f || code >= $A && code <= $F || isDigit(code);\n}\nfunction isNewLine(code) {\n return code === $LF || code === $CR;\n}\nfunction isOctalDigit(code) {\n return $0 <= code && code <= $7;\n}\nfunction isQuote(code) {\n return code === $SQ || code === $DQ || code === $BT;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass ParseLocation {\n constructor(file, offset, line, col) {\n this.file = file;\n this.offset = offset;\n this.line = line;\n this.col = col;\n }\n toString() {\n return this.offset != null ? `${this.file.url}@${this.line}:${this.col}` : this.file.url;\n }\n moveBy(delta) {\n const source = this.file.content;\n const len = source.length;\n let offset = this.offset;\n let line = this.line;\n let col = this.col;\n while (offset > 0 && delta < 0) {\n offset--;\n delta++;\n const ch = source.charCodeAt(offset);\n if (ch == $LF) {\n line--;\n const priorLine = source.substring(0, offset - 1).lastIndexOf(String.fromCharCode($LF));\n col = priorLine > 0 ? offset - priorLine : offset;\n }\n else {\n col--;\n }\n }\n while (offset < len && delta > 0) {\n const ch = source.charCodeAt(offset);\n offset++;\n delta--;\n if (ch == $LF) {\n line++;\n col = 0;\n }\n else {\n col++;\n }\n }\n return new ParseLocation(this.file, offset, line, col);\n }\n // Return the source around the location\n // Up to `maxChars` or `maxLines` on each side of the location\n getContext(maxChars, maxLines) {\n const content = this.file.content;\n let startOffset = this.offset;\n if (startOffset != null) {\n if (startOffset > content.length - 1) {\n startOffset = content.length - 1;\n }\n let endOffset = startOffset;\n let ctxChars = 0;\n let ctxLines = 0;\n while (ctxChars < maxChars && startOffset > 0) {\n startOffset--;\n ctxChars++;\n if (content[startOffset] == '\\n') {\n if (++ctxLines == maxLines) {\n break;\n }\n }\n }\n ctxChars = 0;\n ctxLines = 0;\n while (ctxChars < maxChars && endOffset < content.length - 1) {\n endOffset++;\n ctxChars++;\n if (content[endOffset] == '\\n') {\n if (++ctxLines == maxLines) {\n break;\n }\n }\n }\n return {\n before: content.substring(startOffset, this.offset),\n after: content.substring(this.offset, endOffset + 1),\n };\n }\n return null;\n }\n}\nclass ParseSourceFile {\n constructor(content, url) {\n this.content = content;\n this.url = url;\n }\n}\nclass ParseSourceSpan {\n /**\n * Create an object that holds information about spans of tokens/nodes captured during\n * lexing/parsing of text.\n *\n * @param start\n * The location of the start of the span (having skipped leading trivia).\n * Skipping leading trivia makes source-spans more \"user friendly\", since things like HTML\n * elements will appear to begin at the start of the opening tag, rather than at the start of any\n * leading trivia, which could include newlines.\n *\n * @param end\n * The location of the end of the span.\n *\n * @param fullStart\n * The start of the token without skipping the leading trivia.\n * This is used by tooling that splits tokens further, such as extracting Angular interpolations\n * from text tokens. Such tooling creates new source-spans relative to the original token's\n * source-span. If leading trivia characters have been skipped then the new source-spans may be\n * incorrectly offset.\n *\n * @param details\n * Additional information (such as identifier names) that should be associated with the span.\n */\n constructor(start, end, fullStart = start, details = null) {\n this.start = start;\n this.end = end;\n this.fullStart = fullStart;\n this.details = details;\n }\n toString() {\n return this.start.file.content.substring(this.start.offset, this.end.offset);\n }\n}\nvar ParseErrorLevel;\n(function (ParseErrorLevel) {\n ParseErrorLevel[ParseErrorLevel[\"WARNING\"] = 0] = \"WARNING\";\n ParseErrorLevel[ParseErrorLevel[\"ERROR\"] = 1] = \"ERROR\";\n})(ParseErrorLevel || (ParseErrorLevel = {}));\nclass ParseError {\n constructor(span, msg, level = ParseErrorLevel.ERROR) {\n this.span = span;\n this.msg = msg;\n this.level = level;\n }\n contextualMessage() {\n const ctx = this.span.start.getContext(100, 3);\n return ctx ? `${this.msg} (\"${ctx.before}[${ParseErrorLevel[this.level]} ->]${ctx.after}\")` :\n this.msg;\n }\n toString() {\n const details = this.span.details ? `, ${this.span.details}` : '';\n return `${this.contextualMessage()}: ${this.span.start}${details}`;\n }\n}\n/**\n * Generates Source Span object for a given R3 Type for JIT mode.\n *\n * @param kind Component or Directive.\n * @param typeName name of the Component or Directive.\n * @param sourceUrl reference to Component or Directive source.\n * @returns instance of ParseSourceSpan that represent a given Component or Directive.\n */\nfunction r3JitTypeSourceSpan(kind, typeName, sourceUrl) {\n const sourceFileName = `in ${kind} ${typeName} in ${sourceUrl}`;\n const sourceFile = new ParseSourceFile('', sourceFileName);\n return new ParseSourceSpan(new ParseLocation(sourceFile, -1, -1, -1), new ParseLocation(sourceFile, -1, -1, -1));\n}\nlet _anonymousTypeIndex = 0;\nfunction identifierName(compileIdentifier) {\n if (!compileIdentifier || !compileIdentifier.reference) {\n return null;\n }\n const ref = compileIdentifier.reference;\n if (ref['__anonymousType']) {\n return ref['__anonymousType'];\n }\n if (ref['__forward_ref__']) {\n // We do not want to try to stringify a `forwardRef()` function because that would cause the\n // inner function to be evaluated too early, defeating the whole point of the `forwardRef`.\n return '__forward_ref__';\n }\n let identifier = stringify(ref);\n if (identifier.indexOf('(') >= 0) {\n // case: anonymous functions!\n identifier = `anonymous_${_anonymousTypeIndex++}`;\n ref['__anonymousType'] = identifier;\n }\n else {\n identifier = sanitizeIdentifier(identifier);\n }\n return identifier;\n}\nfunction sanitizeIdentifier(name) {\n return name.replace(/\\W/g, '_');\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * In TypeScript, tagged template functions expect a \"template object\", which is an array of\n * \"cooked\" strings plus a `raw` property that contains an array of \"raw\" strings. This is\n * typically constructed with a function called `__makeTemplateObject(cooked, raw)`, but it may not\n * be available in all environments.\n *\n * This is a JavaScript polyfill that uses __makeTemplateObject when it's available, but otherwise\n * creates an inline helper with the same functionality.\n *\n * In the inline function, if `Object.defineProperty` is available we use that to attach the `raw`\n * array.\n */\nconst makeTemplateObjectPolyfill = '(this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,\"raw\",{value:t}):e.raw=t,e})';\nclass AbstractJsEmitterVisitor extends AbstractEmitterVisitor {\n constructor() {\n super(false);\n }\n visitWrappedNodeExpr(ast, ctx) {\n throw new Error('Cannot emit a WrappedNodeExpr in Javascript.');\n }\n visitDeclareVarStmt(stmt, ctx) {\n ctx.print(stmt, `var ${stmt.name}`);\n if (stmt.value) {\n ctx.print(stmt, ' = ');\n stmt.value.visitExpression(this, ctx);\n }\n ctx.println(stmt, `;`);\n return null;\n }\n visitTaggedTemplateExpr(ast, ctx) {\n // The following convoluted piece of code is effectively the downlevelled equivalent of\n // ```\n // tag`...`\n // ```\n // which is effectively like:\n // ```\n // tag(__makeTemplateObject(cooked, raw), expression1, expression2, ...);\n // ```\n const elements = ast.template.elements;\n ast.tag.visitExpression(this, ctx);\n ctx.print(ast, `(${makeTemplateObjectPolyfill}(`);\n ctx.print(ast, `[${elements.map(part => escapeIdentifier(part.text, false)).join(', ')}], `);\n ctx.print(ast, `[${elements.map(part => escapeIdentifier(part.rawText, false)).join(', ')}])`);\n ast.template.expressions.forEach(expression => {\n ctx.print(ast, ', ');\n expression.visitExpression(this, ctx);\n });\n ctx.print(ast, ')');\n return null;\n }\n visitFunctionExpr(ast, ctx) {\n ctx.print(ast, `function${ast.name ? ' ' + ast.name : ''}(`);\n this._visitParams(ast.params, ctx);\n ctx.println(ast, `) {`);\n ctx.incIndent();\n this.visitAllStatements(ast.statements, ctx);\n ctx.decIndent();\n ctx.print(ast, `}`);\n return null;\n }\n visitDeclareFunctionStmt(stmt, ctx) {\n ctx.print(stmt, `function ${stmt.name}(`);\n this._visitParams(stmt.params, ctx);\n ctx.println(stmt, `) {`);\n ctx.incIndent();\n this.visitAllStatements(stmt.statements, ctx);\n ctx.decIndent();\n ctx.println(stmt, `}`);\n return null;\n }\n visitLocalizedString(ast, ctx) {\n // The following convoluted piece of code is effectively the downlevelled equivalent of\n // ```\n // $localize `...`\n // ```\n // which is effectively like:\n // ```\n // $localize(__makeTemplateObject(cooked, raw), expression1, expression2, ...);\n // ```\n ctx.print(ast, `$localize(${makeTemplateObjectPolyfill}(`);\n const parts = [ast.serializeI18nHead()];\n for (let i = 1; i < ast.messageParts.length; i++) {\n parts.push(ast.serializeI18nTemplatePart(i));\n }\n ctx.print(ast, `[${parts.map(part => escapeIdentifier(part.cooked, false)).join(', ')}], `);\n ctx.print(ast, `[${parts.map(part => escapeIdentifier(part.raw, false)).join(', ')}])`);\n ast.expressions.forEach(expression => {\n ctx.print(ast, ', ');\n expression.visitExpression(this, ctx);\n });\n ctx.print(ast, ')');\n return null;\n }\n _visitParams(params, ctx) {\n this.visitAllObjects(param => ctx.print(null, param.name), params, ctx, ',');\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * The Trusted Types policy, or null if Trusted Types are not\n * enabled/supported, or undefined if the policy has not been created yet.\n */\nlet policy;\n/**\n * Returns the Trusted Types policy, or null if Trusted Types are not\n * enabled/supported. The first call to this function will create the policy.\n */\nfunction getPolicy() {\n if (policy === undefined) {\n policy = null;\n if (_global.trustedTypes) {\n try {\n policy =\n _global.trustedTypes.createPolicy('angular#unsafe-jit', {\n createScript: (s) => s,\n });\n }\n catch {\n // trustedTypes.createPolicy throws if called with a name that is\n // already registered, even in report-only mode. Until the API changes,\n // catch the error not to break the applications functionally. In such\n // cases, the code will fall back to using strings.\n }\n }\n }\n return policy;\n}\n/**\n * Unsafely promote a string to a TrustedScript, falling back to strings when\n * Trusted Types are not available.\n * @security In particular, it must be assured that the provided string will\n * never cause an XSS vulnerability if used in a context that will be\n * interpreted and executed as a script by a browser, e.g. when calling eval.\n */\nfunction trustedScriptFromString(script) {\n return getPolicy()?.createScript(script) || script;\n}\n/**\n * Unsafely call the Function constructor with the given string arguments.\n * @security This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that it\n * is only called from the JIT compiler, as use in other code can lead to XSS\n * vulnerabilities.\n */\nfunction newTrustedFunctionForJIT(...args) {\n if (!_global.trustedTypes) {\n // In environments that don't support Trusted Types, fall back to the most\n // straightforward implementation:\n return new Function(...args);\n }\n // Chrome currently does not support passing TrustedScript to the Function\n // constructor. The following implements the workaround proposed on the page\n // below, where the Chromium bug is also referenced:\n // https://github.com/w3c/webappsec-trusted-types/wiki/Trusted-Types-for-function-constructor\n const fnArgs = args.slice(0, -1).join(',');\n const fnBody = args[args.length - 1];\n const body = `(function anonymous(${fnArgs}\n) { ${fnBody}\n})`;\n // Using eval directly confuses the compiler and prevents this module from\n // being stripped out of JS binaries even if not used. The global['eval']\n // indirection fixes that.\n const fn = _global['eval'](trustedScriptFromString(body));\n if (fn.bind === undefined) {\n // Workaround for a browser bug that only exists in Chrome 83, where passing\n // a TrustedScript to eval just returns the TrustedScript back without\n // evaluating it. In that case, fall back to the most straightforward\n // implementation:\n return new Function(...args);\n }\n // To completely mimic the behavior of calling \"new Function\", two more\n // things need to happen:\n // 1. Stringifying the resulting function should return its source code\n fn.toString = () => body;\n // 2. When calling the resulting function, `this` should refer to `global`\n return fn.bind(_global);\n // When Trusted Types support in Function constructors is widely available,\n // the implementation of this function can be simplified to:\n // return new Function(...args.map(a => trustedScriptFromString(a)));\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A helper class to manage the evaluation of JIT generated code.\n */\nclass JitEvaluator {\n /**\n *\n * @param sourceUrl The URL of the generated code.\n * @param statements An array of Angular statement AST nodes to be evaluated.\n * @param refResolver Resolves `o.ExternalReference`s into values.\n * @param createSourceMaps If true then create a source-map for the generated code and include it\n * inline as a source-map comment.\n * @returns A map of all the variables in the generated code.\n */\n evaluateStatements(sourceUrl, statements, refResolver, createSourceMaps) {\n const converter = new JitEmitterVisitor(refResolver);\n const ctx = EmitterVisitorContext.createRoot();\n // Ensure generated code is in strict mode\n if (statements.length > 0 && !isUseStrictStatement(statements[0])) {\n statements = [\n literal('use strict').toStmt(),\n ...statements,\n ];\n }\n converter.visitAllStatements(statements, ctx);\n converter.createReturnStmt(ctx);\n return this.evaluateCode(sourceUrl, ctx, converter.getArgs(), createSourceMaps);\n }\n /**\n * Evaluate a piece of JIT generated code.\n * @param sourceUrl The URL of this generated code.\n * @param ctx A context object that contains an AST of the code to be evaluated.\n * @param vars A map containing the names and values of variables that the evaluated code might\n * reference.\n * @param createSourceMap If true then create a source-map for the generated code and include it\n * inline as a source-map comment.\n * @returns The result of evaluating the code.\n */\n evaluateCode(sourceUrl, ctx, vars, createSourceMap) {\n let fnBody = `\"use strict\";${ctx.toSource()}\\n//# sourceURL=${sourceUrl}`;\n const fnArgNames = [];\n const fnArgValues = [];\n for (const argName in vars) {\n fnArgValues.push(vars[argName]);\n fnArgNames.push(argName);\n }\n if (createSourceMap) {\n // using `new Function(...)` generates a header, 1 line of no arguments, 2 lines otherwise\n // E.g. ```\n // function anonymous(a,b,c\n // /**/) { ... }```\n // We don't want to hard code this fact, so we auto detect it via an empty function first.\n const emptyFn = newTrustedFunctionForJIT(...fnArgNames.concat('return null;')).toString();\n const headerLines = emptyFn.slice(0, emptyFn.indexOf('return null;')).split('\\n').length - 1;\n fnBody += `\\n${ctx.toSourceMapGenerator(sourceUrl, headerLines).toJsComment()}`;\n }\n const fn = newTrustedFunctionForJIT(...fnArgNames.concat(fnBody));\n return this.executeFunction(fn, fnArgValues);\n }\n /**\n * Execute a JIT generated function by calling it.\n *\n * This method can be overridden in tests to capture the functions that are generated\n * by this `JitEvaluator` class.\n *\n * @param fn A function to execute.\n * @param args The arguments to pass to the function being executed.\n * @returns The return value of the executed function.\n */\n executeFunction(fn, args) {\n return fn(...args);\n }\n}\n/**\n * An Angular AST visitor that converts AST nodes into executable JavaScript code.\n */\nclass JitEmitterVisitor extends AbstractJsEmitterVisitor {\n constructor(refResolver) {\n super();\n this.refResolver = refResolver;\n this._evalArgNames = [];\n this._evalArgValues = [];\n this._evalExportedVars = [];\n }\n createReturnStmt(ctx) {\n const stmt = new ReturnStatement(new LiteralMapExpr(this._evalExportedVars.map(resultVar => new LiteralMapEntry(resultVar, variable(resultVar), false))));\n stmt.visitStatement(this, ctx);\n }\n getArgs() {\n const result = {};\n for (let i = 0; i < this._evalArgNames.length; i++) {\n result[this._evalArgNames[i]] = this._evalArgValues[i];\n }\n return result;\n }\n visitExternalExpr(ast, ctx) {\n this._emitReferenceToExternal(ast, this.refResolver.resolveExternalReference(ast.value), ctx);\n return null;\n }\n visitWrappedNodeExpr(ast, ctx) {\n this._emitReferenceToExternal(ast, ast.node, ctx);\n return null;\n }\n visitDeclareVarStmt(stmt, ctx) {\n if (stmt.hasModifier(StmtModifier.Exported)) {\n this._evalExportedVars.push(stmt.name);\n }\n return super.visitDeclareVarStmt(stmt, ctx);\n }\n visitDeclareFunctionStmt(stmt, ctx) {\n if (stmt.hasModifier(StmtModifier.Exported)) {\n this._evalExportedVars.push(stmt.name);\n }\n return super.visitDeclareFunctionStmt(stmt, ctx);\n }\n _emitReferenceToExternal(ast, value, ctx) {\n let id = this._evalArgValues.indexOf(value);\n if (id === -1) {\n id = this._evalArgValues.length;\n this._evalArgValues.push(value);\n const name = identifierName({ reference: value }) || 'val';\n this._evalArgNames.push(`jit_${name}_${id}`);\n }\n ctx.print(ast, this._evalArgNames[id]);\n }\n}\nfunction isUseStrictStatement(statement) {\n return statement.isEquivalent(literal('use strict').toStmt());\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction compileInjector(meta) {\n const definitionMap = new DefinitionMap();\n if (meta.providers !== null) {\n definitionMap.set('providers', meta.providers);\n }\n if (meta.imports.length > 0) {\n definitionMap.set('imports', literalArr(meta.imports));\n }\n const expression = importExpr(Identifiers.defineInjector).callFn([definitionMap.toLiteralMap()], undefined, true);\n const type = createInjectorType(meta);\n return { expression, type, statements: [] };\n}\nfunction createInjectorType(meta) {\n return new ExpressionType(importExpr(Identifiers.InjectorDeclaration, [new ExpressionType(meta.type.type)]));\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Implementation of `CompileReflector` which resolves references to @angular/core\n * symbols at runtime, according to a consumer-provided mapping.\n *\n * Only supports `resolveExternalReference`, all other methods throw.\n */\nclass R3JitReflector {\n constructor(context) {\n this.context = context;\n }\n resolveExternalReference(ref) {\n // This reflector only handles @angular/core imports.\n if (ref.moduleName !== '@angular/core') {\n throw new Error(`Cannot resolve external reference to ${ref.moduleName}, only references to @angular/core are supported.`);\n }\n if (!this.context.hasOwnProperty(ref.name)) {\n throw new Error(`No value provided for @angular/core symbol '${ref.name}'.`);\n }\n return this.context[ref.name];\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * How the selector scope of an NgModule (its declarations, imports, and exports) should be emitted\n * as a part of the NgModule definition.\n */\nvar R3SelectorScopeMode;\n(function (R3SelectorScopeMode) {\n /**\n * Emit the declarations inline into the module definition.\n *\n * This option is useful in certain contexts where it's known that JIT support is required. The\n * tradeoff here is that this emit style prevents directives and pipes from being tree-shaken if\n * they are unused, but the NgModule is used.\n */\n R3SelectorScopeMode[R3SelectorScopeMode[\"Inline\"] = 0] = \"Inline\";\n /**\n * Emit the declarations using a side effectful function call, `ɵɵsetNgModuleScope`, that is\n * guarded with the `ngJitMode` flag.\n *\n * This form of emit supports JIT and can be optimized away if the `ngJitMode` flag is set to\n * false, which allows unused directives and pipes to be tree-shaken.\n */\n R3SelectorScopeMode[R3SelectorScopeMode[\"SideEffect\"] = 1] = \"SideEffect\";\n /**\n * Don't generate selector scopes at all.\n *\n * This is useful for contexts where JIT support is known to be unnecessary.\n */\n R3SelectorScopeMode[R3SelectorScopeMode[\"Omit\"] = 2] = \"Omit\";\n})(R3SelectorScopeMode || (R3SelectorScopeMode = {}));\n/**\n * Construct an `R3NgModuleDef` for the given `R3NgModuleMetadata`.\n */\nfunction compileNgModule(meta) {\n const { adjacentType, internalType, bootstrap, declarations, imports, exports, schemas, containsForwardDecls, selectorScopeMode, id } = meta;\n const statements = [];\n const definitionMap = new DefinitionMap();\n definitionMap.set('type', internalType);\n if (bootstrap.length > 0) {\n definitionMap.set('bootstrap', refsToArray(bootstrap, containsForwardDecls));\n }\n if (selectorScopeMode === R3SelectorScopeMode.Inline) {\n // If requested to emit scope information inline, pass the `declarations`, `imports` and\n // `exports` to the `ɵɵdefineNgModule()` call directly.\n if (declarations.length > 0) {\n definitionMap.set('declarations', refsToArray(declarations, containsForwardDecls));\n }\n if (imports.length > 0) {\n definitionMap.set('imports', refsToArray(imports, containsForwardDecls));\n }\n if (exports.length > 0) {\n definitionMap.set('exports', refsToArray(exports, containsForwardDecls));\n }\n }\n else if (selectorScopeMode === R3SelectorScopeMode.SideEffect) {\n // In this mode, scope information is not passed into `ɵɵdefineNgModule` as it\n // would prevent tree-shaking of the declarations, imports and exports references. Instead, it's\n // patched onto the NgModule definition with a `ɵɵsetNgModuleScope` call that's guarded by the\n // `ngJitMode` flag.\n const setNgModuleScopeCall = generateSetNgModuleScopeCall(meta);\n if (setNgModuleScopeCall !== null) {\n statements.push(setNgModuleScopeCall);\n }\n }\n else {\n // Selector scope emit was not requested, so skip it.\n }\n if (schemas !== null && schemas.length > 0) {\n definitionMap.set('schemas', literalArr(schemas.map(ref => ref.value)));\n }\n if (id !== null) {\n definitionMap.set('id', id);\n // Generate a side-effectful call to register this NgModule by its id, as per the semantics of\n // NgModule ids.\n statements.push(importExpr(Identifiers.registerNgModuleType).callFn([adjacentType, id]).toStmt());\n }\n const expression = importExpr(Identifiers.defineNgModule).callFn([definitionMap.toLiteralMap()], undefined, true);\n const type = createNgModuleType(meta);\n return { expression, type, statements };\n}\n/**\n * This function is used in JIT mode to generate the call to `ɵɵdefineNgModule()` from a call to\n * `ɵɵngDeclareNgModule()`.\n */\nfunction compileNgModuleDeclarationExpression(meta) {\n const definitionMap = new DefinitionMap();\n definitionMap.set('type', new WrappedNodeExpr(meta.type));\n if (meta.bootstrap !== undefined) {\n definitionMap.set('bootstrap', new WrappedNodeExpr(meta.bootstrap));\n }\n if (meta.declarations !== undefined) {\n definitionMap.set('declarations', new WrappedNodeExpr(meta.declarations));\n }\n if (meta.imports !== undefined) {\n definitionMap.set('imports', new WrappedNodeExpr(meta.imports));\n }\n if (meta.exports !== undefined) {\n definitionMap.set('exports', new WrappedNodeExpr(meta.exports));\n }\n if (meta.schemas !== undefined) {\n definitionMap.set('schemas', new WrappedNodeExpr(meta.schemas));\n }\n if (meta.id !== undefined) {\n definitionMap.set('id', new WrappedNodeExpr(meta.id));\n }\n return importExpr(Identifiers.defineNgModule).callFn([definitionMap.toLiteralMap()]);\n}\nfunction createNgModuleType({ type: moduleType, declarations, exports, imports, includeImportTypes, publicDeclarationTypes }) {\n return new ExpressionType(importExpr(Identifiers.NgModuleDeclaration, [\n new ExpressionType(moduleType.type),\n publicDeclarationTypes === null ? tupleTypeOf(declarations) :\n tupleOfTypes(publicDeclarationTypes),\n includeImportTypes ? tupleTypeOf(imports) : NONE_TYPE,\n tupleTypeOf(exports),\n ]));\n}\n/**\n * Generates a function call to `ɵɵsetNgModuleScope` with all necessary information so that the\n * transitive module scope can be computed during runtime in JIT mode. This call is marked pure\n * such that the references to declarations, imports and exports may be elided causing these\n * symbols to become tree-shakeable.\n */\nfunction generateSetNgModuleScopeCall(meta) {\n const { adjacentType: moduleType, declarations, imports, exports, containsForwardDecls } = meta;\n const scopeMap = new DefinitionMap();\n if (declarations.length > 0) {\n scopeMap.set('declarations', refsToArray(declarations, containsForwardDecls));\n }\n if (imports.length > 0) {\n scopeMap.set('imports', refsToArray(imports, containsForwardDecls));\n }\n if (exports.length > 0) {\n scopeMap.set('exports', refsToArray(exports, containsForwardDecls));\n }\n if (Object.keys(scopeMap.values).length === 0) {\n return null;\n }\n // setNgModuleScope(...)\n const fnCall = new InvokeFunctionExpr(\n /* fn */ importExpr(Identifiers.setNgModuleScope), \n /* args */ [moduleType, scopeMap.toLiteralMap()]);\n // (ngJitMode guard) && setNgModuleScope(...)\n const guardedCall = jitOnlyGuardedExpression(fnCall);\n // function() { (ngJitMode guard) && setNgModuleScope(...); }\n const iife = new FunctionExpr(\n /* params */ [], \n /* statements */ [guardedCall.toStmt()]);\n // (function() { (ngJitMode guard) && setNgModuleScope(...); })()\n const iifeCall = new InvokeFunctionExpr(\n /* fn */ iife, \n /* args */ []);\n return iifeCall.toStmt();\n}\nfunction tupleTypeOf(exp) {\n const types = exp.map(ref => typeofExpr(ref.type));\n return exp.length > 0 ? expressionType(literalArr(types)) : NONE_TYPE;\n}\nfunction tupleOfTypes(types) {\n const typeofTypes = types.map(type => typeofExpr(type));\n return types.length > 0 ? expressionType(literalArr(typeofTypes)) : NONE_TYPE;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction compilePipeFromMetadata(metadata) {\n const definitionMapValues = [];\n // e.g. `name: 'myPipe'`\n definitionMapValues.push({ key: 'name', value: literal(metadata.pipeName), quoted: false });\n // e.g. `type: MyPipe`\n definitionMapValues.push({ key: 'type', value: metadata.type.value, quoted: false });\n // e.g. `pure: true`\n definitionMapValues.push({ key: 'pure', value: literal(metadata.pure), quoted: false });\n if (metadata.isStandalone) {\n definitionMapValues.push({ key: 'standalone', value: literal(true), quoted: false });\n }\n const expression = importExpr(Identifiers.definePipe).callFn([literalMap(definitionMapValues)], undefined, true);\n const type = createPipeType(metadata);\n return { expression, type, statements: [] };\n}\nfunction createPipeType(metadata) {\n return new ExpressionType(importExpr(Identifiers.PipeDeclaration, [\n typeWithParameters(metadata.type.type, metadata.typeArgumentCount),\n new ExpressionType(new LiteralExpr(metadata.pipeName)),\n new ExpressionType(new LiteralExpr(metadata.isStandalone)),\n ]));\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar R3TemplateDependencyKind;\n(function (R3TemplateDependencyKind) {\n R3TemplateDependencyKind[R3TemplateDependencyKind[\"Directive\"] = 0] = \"Directive\";\n R3TemplateDependencyKind[R3TemplateDependencyKind[\"Pipe\"] = 1] = \"Pipe\";\n R3TemplateDependencyKind[R3TemplateDependencyKind[\"NgModule\"] = 2] = \"NgModule\";\n})(R3TemplateDependencyKind || (R3TemplateDependencyKind = {}));\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass ParserError {\n constructor(message, input, errLocation, ctxLocation) {\n this.input = input;\n this.errLocation = errLocation;\n this.ctxLocation = ctxLocation;\n this.message = `Parser Error: ${message} ${errLocation} [${input}] in ${ctxLocation}`;\n }\n}\nclass ParseSpan {\n constructor(start, end) {\n this.start = start;\n this.end = end;\n }\n toAbsolute(absoluteOffset) {\n return new AbsoluteSourceSpan(absoluteOffset + this.start, absoluteOffset + this.end);\n }\n}\nclass AST {\n constructor(span, \n /**\n * Absolute location of the expression AST in a source code file.\n */\n sourceSpan) {\n this.span = span;\n this.sourceSpan = sourceSpan;\n }\n toString() {\n return 'AST';\n }\n}\nclass ASTWithName extends AST {\n constructor(span, sourceSpan, nameSpan) {\n super(span, sourceSpan);\n this.nameSpan = nameSpan;\n }\n}\nclass EmptyExpr extends AST {\n visit(visitor, context = null) {\n // do nothing\n }\n}\nclass ImplicitReceiver extends AST {\n visit(visitor, context = null) {\n return visitor.visitImplicitReceiver(this, context);\n }\n}\n/**\n * Receiver when something is accessed through `this` (e.g. `this.foo`). Note that this class\n * inherits from `ImplicitReceiver`, because accessing something through `this` is treated the\n * same as accessing it implicitly inside of an Angular template (e.g. `[attr.title]=\"this.title\"`\n * is the same as `[attr.title]=\"title\"`.). Inheriting allows for the `this` accesses to be treated\n * the same as implicit ones, except for a couple of exceptions like `$event` and `$any`.\n * TODO: we should find a way for this class not to extend from `ImplicitReceiver` in the future.\n */\nclass ThisReceiver extends ImplicitReceiver {\n visit(visitor, context = null) {\n return visitor.visitThisReceiver?.(this, context);\n }\n}\n/**\n * Multiple expressions separated by a semicolon.\n */\nclass Chain extends AST {\n constructor(span, sourceSpan, expressions) {\n super(span, sourceSpan);\n this.expressions = expressions;\n }\n visit(visitor, context = null) {\n return visitor.visitChain(this, context);\n }\n}\nclass Conditional extends AST {\n constructor(span, sourceSpan, condition, trueExp, falseExp) {\n super(span, sourceSpan);\n this.condition = condition;\n this.trueExp = trueExp;\n this.falseExp = falseExp;\n }\n visit(visitor, context = null) {\n return visitor.visitConditional(this, context);\n }\n}\nclass PropertyRead extends ASTWithName {\n constructor(span, sourceSpan, nameSpan, receiver, name) {\n super(span, sourceSpan, nameSpan);\n this.receiver = receiver;\n this.name = name;\n }\n visit(visitor, context = null) {\n return visitor.visitPropertyRead(this, context);\n }\n}\nclass PropertyWrite extends ASTWithName {\n constructor(span, sourceSpan, nameSpan, receiver, name, value) {\n super(span, sourceSpan, nameSpan);\n this.receiver = receiver;\n this.name = name;\n this.value = value;\n }\n visit(visitor, context = null) {\n return visitor.visitPropertyWrite(this, context);\n }\n}\nclass SafePropertyRead extends ASTWithName {\n constructor(span, sourceSpan, nameSpan, receiver, name) {\n super(span, sourceSpan, nameSpan);\n this.receiver = receiver;\n this.name = name;\n }\n visit(visitor, context = null) {\n return visitor.visitSafePropertyRead(this, context);\n }\n}\nclass KeyedRead extends AST {\n constructor(span, sourceSpan, receiver, key) {\n super(span, sourceSpan);\n this.receiver = receiver;\n this.key = key;\n }\n visit(visitor, context = null) {\n return visitor.visitKeyedRead(this, context);\n }\n}\nclass SafeKeyedRead extends AST {\n constructor(span, sourceSpan, receiver, key) {\n super(span, sourceSpan);\n this.receiver = receiver;\n this.key = key;\n }\n visit(visitor, context = null) {\n return visitor.visitSafeKeyedRead(this, context);\n }\n}\nclass KeyedWrite extends AST {\n constructor(span, sourceSpan, receiver, key, value) {\n super(span, sourceSpan);\n this.receiver = receiver;\n this.key = key;\n this.value = value;\n }\n visit(visitor, context = null) {\n return visitor.visitKeyedWrite(this, context);\n }\n}\nclass BindingPipe extends ASTWithName {\n constructor(span, sourceSpan, exp, name, args, nameSpan) {\n super(span, sourceSpan, nameSpan);\n this.exp = exp;\n this.name = name;\n this.args = args;\n }\n visit(visitor, context = null) {\n return visitor.visitPipe(this, context);\n }\n}\nclass LiteralPrimitive extends AST {\n constructor(span, sourceSpan, value) {\n super(span, sourceSpan);\n this.value = value;\n }\n visit(visitor, context = null) {\n return visitor.visitLiteralPrimitive(this, context);\n }\n}\nclass LiteralArray extends AST {\n constructor(span, sourceSpan, expressions) {\n super(span, sourceSpan);\n this.expressions = expressions;\n }\n visit(visitor, context = null) {\n return visitor.visitLiteralArray(this, context);\n }\n}\nclass LiteralMap extends AST {\n constructor(span, sourceSpan, keys, values) {\n super(span, sourceSpan);\n this.keys = keys;\n this.values = values;\n }\n visit(visitor, context = null) {\n return visitor.visitLiteralMap(this, context);\n }\n}\nclass Interpolation extends AST {\n constructor(span, sourceSpan, strings, expressions) {\n super(span, sourceSpan);\n this.strings = strings;\n this.expressions = expressions;\n }\n visit(visitor, context = null) {\n return visitor.visitInterpolation(this, context);\n }\n}\nclass Binary extends AST {\n constructor(span, sourceSpan, operation, left, right) {\n super(span, sourceSpan);\n this.operation = operation;\n this.left = left;\n this.right = right;\n }\n visit(visitor, context = null) {\n return visitor.visitBinary(this, context);\n }\n}\n/**\n * For backwards compatibility reasons, `Unary` inherits from `Binary` and mimics the binary AST\n * node that was originally used. This inheritance relation can be deleted in some future major,\n * after consumers have been given a chance to fully support Unary.\n */\nclass Unary extends Binary {\n /**\n * During the deprecation period this constructor is private, to avoid consumers from creating\n * a `Unary` with the fallback properties for `Binary`.\n */\n constructor(span, sourceSpan, operator, expr, binaryOp, binaryLeft, binaryRight) {\n super(span, sourceSpan, binaryOp, binaryLeft, binaryRight);\n this.operator = operator;\n this.expr = expr;\n // Redeclare the properties that are inherited from `Binary` as `never`, as consumers should not\n // depend on these fields when operating on `Unary`.\n this.left = null;\n this.right = null;\n this.operation = null;\n }\n /**\n * Creates a unary minus expression \"-x\", represented as `Binary` using \"0 - x\".\n */\n static createMinus(span, sourceSpan, expr) {\n return new Unary(span, sourceSpan, '-', expr, '-', new LiteralPrimitive(span, sourceSpan, 0), expr);\n }\n /**\n * Creates a unary plus expression \"+x\", represented as `Binary` using \"x - 0\".\n */\n static createPlus(span, sourceSpan, expr) {\n return new Unary(span, sourceSpan, '+', expr, '-', expr, new LiteralPrimitive(span, sourceSpan, 0));\n }\n visit(visitor, context = null) {\n if (visitor.visitUnary !== undefined) {\n return visitor.visitUnary(this, context);\n }\n return visitor.visitBinary(this, context);\n }\n}\nclass PrefixNot extends AST {\n constructor(span, sourceSpan, expression) {\n super(span, sourceSpan);\n this.expression = expression;\n }\n visit(visitor, context = null) {\n return visitor.visitPrefixNot(this, context);\n }\n}\nclass NonNullAssert extends AST {\n constructor(span, sourceSpan, expression) {\n super(span, sourceSpan);\n this.expression = expression;\n }\n visit(visitor, context = null) {\n return visitor.visitNonNullAssert(this, context);\n }\n}\nclass Call extends AST {\n constructor(span, sourceSpan, receiver, args, argumentSpan) {\n super(span, sourceSpan);\n this.receiver = receiver;\n this.args = args;\n this.argumentSpan = argumentSpan;\n }\n visit(visitor, context = null) {\n return visitor.visitCall(this, context);\n }\n}\nclass SafeCall extends AST {\n constructor(span, sourceSpan, receiver, args, argumentSpan) {\n super(span, sourceSpan);\n this.receiver = receiver;\n this.args = args;\n this.argumentSpan = argumentSpan;\n }\n visit(visitor, context = null) {\n return visitor.visitSafeCall(this, context);\n }\n}\n/**\n * Records the absolute position of a text span in a source file, where `start` and `end` are the\n * starting and ending byte offsets, respectively, of the text span in a source file.\n */\nclass AbsoluteSourceSpan {\n constructor(start, end) {\n this.start = start;\n this.end = end;\n }\n}\nclass ASTWithSource extends AST {\n constructor(ast, source, location, absoluteOffset, errors) {\n super(new ParseSpan(0, source === null ? 0 : source.length), new AbsoluteSourceSpan(absoluteOffset, source === null ? absoluteOffset : absoluteOffset + source.length));\n this.ast = ast;\n this.source = source;\n this.location = location;\n this.errors = errors;\n }\n visit(visitor, context = null) {\n if (visitor.visitASTWithSource) {\n return visitor.visitASTWithSource(this, context);\n }\n return this.ast.visit(visitor, context);\n }\n toString() {\n return `${this.source} in ${this.location}`;\n }\n}\nclass VariableBinding {\n /**\n * @param sourceSpan entire span of the binding.\n * @param key name of the LHS along with its span.\n * @param value optional value for the RHS along with its span.\n */\n constructor(sourceSpan, key, value) {\n this.sourceSpan = sourceSpan;\n this.key = key;\n this.value = value;\n }\n}\nclass ExpressionBinding {\n /**\n * @param sourceSpan entire span of the binding.\n * @param key binding name, like ngForOf, ngForTrackBy, ngIf, along with its\n * span. Note that the length of the span may not be the same as\n * `key.source.length`. For example,\n * 1. key.source = ngFor, key.span is for \"ngFor\"\n * 2. key.source = ngForOf, key.span is for \"of\"\n * 3. key.source = ngForTrackBy, key.span is for \"trackBy\"\n * @param value optional expression for the RHS.\n */\n constructor(sourceSpan, key, value) {\n this.sourceSpan = sourceSpan;\n this.key = key;\n this.value = value;\n }\n}\nclass RecursiveAstVisitor {\n visit(ast, context) {\n // The default implementation just visits every node.\n // Classes that extend RecursiveAstVisitor should override this function\n // to selectively visit the specified node.\n ast.visit(this, context);\n }\n visitUnary(ast, context) {\n this.visit(ast.expr, context);\n }\n visitBinary(ast, context) {\n this.visit(ast.left, context);\n this.visit(ast.right, context);\n }\n visitChain(ast, context) {\n this.visitAll(ast.expressions, context);\n }\n visitConditional(ast, context) {\n this.visit(ast.condition, context);\n this.visit(ast.trueExp, context);\n this.visit(ast.falseExp, context);\n }\n visitPipe(ast, context) {\n this.visit(ast.exp, context);\n this.visitAll(ast.args, context);\n }\n visitImplicitReceiver(ast, context) { }\n visitThisReceiver(ast, context) { }\n visitInterpolation(ast, context) {\n this.visitAll(ast.expressions, context);\n }\n visitKeyedRead(ast, context) {\n this.visit(ast.receiver, context);\n this.visit(ast.key, context);\n }\n visitKeyedWrite(ast, context) {\n this.visit(ast.receiver, context);\n this.visit(ast.key, context);\n this.visit(ast.value, context);\n }\n visitLiteralArray(ast, context) {\n this.visitAll(ast.expressions, context);\n }\n visitLiteralMap(ast, context) {\n this.visitAll(ast.values, context);\n }\n visitLiteralPrimitive(ast, context) { }\n visitPrefixNot(ast, context) {\n this.visit(ast.expression, context);\n }\n visitNonNullAssert(ast, context) {\n this.visit(ast.expression, context);\n }\n visitPropertyRead(ast, context) {\n this.visit(ast.receiver, context);\n }\n visitPropertyWrite(ast, context) {\n this.visit(ast.receiver, context);\n this.visit(ast.value, context);\n }\n visitSafePropertyRead(ast, context) {\n this.visit(ast.receiver, context);\n }\n visitSafeKeyedRead(ast, context) {\n this.visit(ast.receiver, context);\n this.visit(ast.key, context);\n }\n visitCall(ast, context) {\n this.visit(ast.receiver, context);\n this.visitAll(ast.args, context);\n }\n visitSafeCall(ast, context) {\n this.visit(ast.receiver, context);\n this.visitAll(ast.args, context);\n }\n // This is not part of the AstVisitor interface, just a helper method\n visitAll(asts, context) {\n for (const ast of asts) {\n this.visit(ast, context);\n }\n }\n}\nclass AstTransformer {\n visitImplicitReceiver(ast, context) {\n return ast;\n }\n visitThisReceiver(ast, context) {\n return ast;\n }\n visitInterpolation(ast, context) {\n return new Interpolation(ast.span, ast.sourceSpan, ast.strings, this.visitAll(ast.expressions));\n }\n visitLiteralPrimitive(ast, context) {\n return new LiteralPrimitive(ast.span, ast.sourceSpan, ast.value);\n }\n visitPropertyRead(ast, context) {\n return new PropertyRead(ast.span, ast.sourceSpan, ast.nameSpan, ast.receiver.visit(this), ast.name);\n }\n visitPropertyWrite(ast, context) {\n return new PropertyWrite(ast.span, ast.sourceSpan, ast.nameSpan, ast.receiver.visit(this), ast.name, ast.value.visit(this));\n }\n visitSafePropertyRead(ast, context) {\n return new SafePropertyRead(ast.span, ast.sourceSpan, ast.nameSpan, ast.receiver.visit(this), ast.name);\n }\n visitLiteralArray(ast, context) {\n return new LiteralArray(ast.span, ast.sourceSpan, this.visitAll(ast.expressions));\n }\n visitLiteralMap(ast, context) {\n return new LiteralMap(ast.span, ast.sourceSpan, ast.keys, this.visitAll(ast.values));\n }\n visitUnary(ast, context) {\n switch (ast.operator) {\n case '+':\n return Unary.createPlus(ast.span, ast.sourceSpan, ast.expr.visit(this));\n case '-':\n return Unary.createMinus(ast.span, ast.sourceSpan, ast.expr.visit(this));\n default:\n throw new Error(`Unknown unary operator ${ast.operator}`);\n }\n }\n visitBinary(ast, context) {\n return new Binary(ast.span, ast.sourceSpan, ast.operation, ast.left.visit(this), ast.right.visit(this));\n }\n visitPrefixNot(ast, context) {\n return new PrefixNot(ast.span, ast.sourceSpan, ast.expression.visit(this));\n }\n visitNonNullAssert(ast, context) {\n return new NonNullAssert(ast.span, ast.sourceSpan, ast.expression.visit(this));\n }\n visitConditional(ast, context) {\n return new Conditional(ast.span, ast.sourceSpan, ast.condition.visit(this), ast.trueExp.visit(this), ast.falseExp.visit(this));\n }\n visitPipe(ast, context) {\n return new BindingPipe(ast.span, ast.sourceSpan, ast.exp.visit(this), ast.name, this.visitAll(ast.args), ast.nameSpan);\n }\n visitKeyedRead(ast, context) {\n return new KeyedRead(ast.span, ast.sourceSpan, ast.receiver.visit(this), ast.key.visit(this));\n }\n visitKeyedWrite(ast, context) {\n return new KeyedWrite(ast.span, ast.sourceSpan, ast.receiver.visit(this), ast.key.visit(this), ast.value.visit(this));\n }\n visitCall(ast, context) {\n return new Call(ast.span, ast.sourceSpan, ast.receiver.visit(this), this.visitAll(ast.args), ast.argumentSpan);\n }\n visitSafeCall(ast, context) {\n return new SafeCall(ast.span, ast.sourceSpan, ast.receiver.visit(this), this.visitAll(ast.args), ast.argumentSpan);\n }\n visitAll(asts) {\n const res = [];\n for (let i = 0; i < asts.length; ++i) {\n res[i] = asts[i].visit(this);\n }\n return res;\n }\n visitChain(ast, context) {\n return new Chain(ast.span, ast.sourceSpan, this.visitAll(ast.expressions));\n }\n visitSafeKeyedRead(ast, context) {\n return new SafeKeyedRead(ast.span, ast.sourceSpan, ast.receiver.visit(this), ast.key.visit(this));\n }\n}\n// A transformer that only creates new nodes if the transformer makes a change or\n// a change is made a child node.\nclass AstMemoryEfficientTransformer {\n visitImplicitReceiver(ast, context) {\n return ast;\n }\n visitThisReceiver(ast, context) {\n return ast;\n }\n visitInterpolation(ast, context) {\n const expressions = this.visitAll(ast.expressions);\n if (expressions !== ast.expressions)\n return new Interpolation(ast.span, ast.sourceSpan, ast.strings, expressions);\n return ast;\n }\n visitLiteralPrimitive(ast, context) {\n return ast;\n }\n visitPropertyRead(ast, context) {\n const receiver = ast.receiver.visit(this);\n if (receiver !== ast.receiver) {\n return new PropertyRead(ast.span, ast.sourceSpan, ast.nameSpan, receiver, ast.name);\n }\n return ast;\n }\n visitPropertyWrite(ast, context) {\n const receiver = ast.receiver.visit(this);\n const value = ast.value.visit(this);\n if (receiver !== ast.receiver || value !== ast.value) {\n return new PropertyWrite(ast.span, ast.sourceSpan, ast.nameSpan, receiver, ast.name, value);\n }\n return ast;\n }\n visitSafePropertyRead(ast, context) {\n const receiver = ast.receiver.visit(this);\n if (receiver !== ast.receiver) {\n return new SafePropertyRead(ast.span, ast.sourceSpan, ast.nameSpan, receiver, ast.name);\n }\n return ast;\n }\n visitLiteralArray(ast, context) {\n const expressions = this.visitAll(ast.expressions);\n if (expressions !== ast.expressions) {\n return new LiteralArray(ast.span, ast.sourceSpan, expressions);\n }\n return ast;\n }\n visitLiteralMap(ast, context) {\n const values = this.visitAll(ast.values);\n if (values !== ast.values) {\n return new LiteralMap(ast.span, ast.sourceSpan, ast.keys, values);\n }\n return ast;\n }\n visitUnary(ast, context) {\n const expr = ast.expr.visit(this);\n if (expr !== ast.expr) {\n switch (ast.operator) {\n case '+':\n return Unary.createPlus(ast.span, ast.sourceSpan, expr);\n case '-':\n return Unary.createMinus(ast.span, ast.sourceSpan, expr);\n default:\n throw new Error(`Unknown unary operator ${ast.operator}`);\n }\n }\n return ast;\n }\n visitBinary(ast, context) {\n const left = ast.left.visit(this);\n const right = ast.right.visit(this);\n if (left !== ast.left || right !== ast.right) {\n return new Binary(ast.span, ast.sourceSpan, ast.operation, left, right);\n }\n return ast;\n }\n visitPrefixNot(ast, context) {\n const expression = ast.expression.visit(this);\n if (expression !== ast.expression) {\n return new PrefixNot(ast.span, ast.sourceSpan, expression);\n }\n return ast;\n }\n visitNonNullAssert(ast, context) {\n const expression = ast.expression.visit(this);\n if (expression !== ast.expression) {\n return new NonNullAssert(ast.span, ast.sourceSpan, expression);\n }\n return ast;\n }\n visitConditional(ast, context) {\n const condition = ast.condition.visit(this);\n const trueExp = ast.trueExp.visit(this);\n const falseExp = ast.falseExp.visit(this);\n if (condition !== ast.condition || trueExp !== ast.trueExp || falseExp !== ast.falseExp) {\n return new Conditional(ast.span, ast.sourceSpan, condition, trueExp, falseExp);\n }\n return ast;\n }\n visitPipe(ast, context) {\n const exp = ast.exp.visit(this);\n const args = this.visitAll(ast.args);\n if (exp !== ast.exp || args !== ast.args) {\n return new BindingPipe(ast.span, ast.sourceSpan, exp, ast.name, args, ast.nameSpan);\n }\n return ast;\n }\n visitKeyedRead(ast, context) {\n const obj = ast.receiver.visit(this);\n const key = ast.key.visit(this);\n if (obj !== ast.receiver || key !== ast.key) {\n return new KeyedRead(ast.span, ast.sourceSpan, obj, key);\n }\n return ast;\n }\n visitKeyedWrite(ast, context) {\n const obj = ast.receiver.visit(this);\n const key = ast.key.visit(this);\n const value = ast.value.visit(this);\n if (obj !== ast.receiver || key !== ast.key || value !== ast.value) {\n return new KeyedWrite(ast.span, ast.sourceSpan, obj, key, value);\n }\n return ast;\n }\n visitAll(asts) {\n const res = [];\n let modified = false;\n for (let i = 0; i < asts.length; ++i) {\n const original = asts[i];\n const value = original.visit(this);\n res[i] = value;\n modified = modified || value !== original;\n }\n return modified ? res : asts;\n }\n visitChain(ast, context) {\n const expressions = this.visitAll(ast.expressions);\n if (expressions !== ast.expressions) {\n return new Chain(ast.span, ast.sourceSpan, expressions);\n }\n return ast;\n }\n visitCall(ast, context) {\n const receiver = ast.receiver.visit(this);\n const args = this.visitAll(ast.args);\n if (receiver !== ast.receiver || args !== ast.args) {\n return new Call(ast.span, ast.sourceSpan, receiver, args, ast.argumentSpan);\n }\n return ast;\n }\n visitSafeCall(ast, context) {\n const receiver = ast.receiver.visit(this);\n const args = this.visitAll(ast.args);\n if (receiver !== ast.receiver || args !== ast.args) {\n return new SafeCall(ast.span, ast.sourceSpan, receiver, args, ast.argumentSpan);\n }\n return ast;\n }\n visitSafeKeyedRead(ast, context) {\n const obj = ast.receiver.visit(this);\n const key = ast.key.visit(this);\n if (obj !== ast.receiver || key !== ast.key) {\n return new SafeKeyedRead(ast.span, ast.sourceSpan, obj, key);\n }\n return ast;\n }\n}\n// Bindings\nclass ParsedProperty {\n constructor(name, expression, type, sourceSpan, keySpan, valueSpan) {\n this.name = name;\n this.expression = expression;\n this.type = type;\n this.sourceSpan = sourceSpan;\n this.keySpan = keySpan;\n this.valueSpan = valueSpan;\n this.isLiteral = this.type === ParsedPropertyType.LITERAL_ATTR;\n this.isAnimation = this.type === ParsedPropertyType.ANIMATION;\n }\n}\nvar ParsedPropertyType;\n(function (ParsedPropertyType) {\n ParsedPropertyType[ParsedPropertyType[\"DEFAULT\"] = 0] = \"DEFAULT\";\n ParsedPropertyType[ParsedPropertyType[\"LITERAL_ATTR\"] = 1] = \"LITERAL_ATTR\";\n ParsedPropertyType[ParsedPropertyType[\"ANIMATION\"] = 2] = \"ANIMATION\";\n})(ParsedPropertyType || (ParsedPropertyType = {}));\nclass ParsedEvent {\n // Regular events have a target\n // Animation events have a phase\n constructor(name, targetOrPhase, type, handler, sourceSpan, handlerSpan, keySpan) {\n this.name = name;\n this.targetOrPhase = targetOrPhase;\n this.type = type;\n this.handler = handler;\n this.sourceSpan = sourceSpan;\n this.handlerSpan = handlerSpan;\n this.keySpan = keySpan;\n }\n}\n/**\n * ParsedVariable represents a variable declaration in a microsyntax expression.\n */\nclass ParsedVariable {\n constructor(name, value, sourceSpan, keySpan, valueSpan) {\n this.name = name;\n this.value = value;\n this.sourceSpan = sourceSpan;\n this.keySpan = keySpan;\n this.valueSpan = valueSpan;\n }\n}\nclass BoundElementProperty {\n constructor(name, type, securityContext, value, unit, sourceSpan, keySpan, valueSpan) {\n this.name = name;\n this.type = type;\n this.securityContext = securityContext;\n this.value = value;\n this.unit = unit;\n this.sourceSpan = sourceSpan;\n this.keySpan = keySpan;\n this.valueSpan = valueSpan;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass EventHandlerVars {\n}\nEventHandlerVars.event = variable('$event');\n/**\n * Converts the given expression AST into an executable output AST, assuming the expression is\n * used in an action binding (e.g. an event handler).\n */\nfunction convertActionBinding(localResolver, implicitReceiver, action, bindingId, baseSourceSpan, implicitReceiverAccesses, globals) {\n if (!localResolver) {\n localResolver = new DefaultLocalResolver(globals);\n }\n const actionWithoutBuiltins = convertPropertyBindingBuiltins({\n createLiteralArrayConverter: (argCount) => {\n // Note: no caching for literal arrays in actions.\n return (args) => literalArr(args);\n },\n createLiteralMapConverter: (keys) => {\n // Note: no caching for literal maps in actions.\n return (values) => {\n const entries = keys.map((k, i) => ({\n key: k.key,\n value: values[i],\n quoted: k.quoted,\n }));\n return literalMap(entries);\n };\n },\n createPipeConverter: (name) => {\n throw new Error(`Illegal State: Actions are not allowed to contain pipes. Pipe: ${name}`);\n }\n }, action);\n const visitor = new _AstToIrVisitor(localResolver, implicitReceiver, bindingId, /* supportsInterpolation */ false, baseSourceSpan, implicitReceiverAccesses);\n const actionStmts = [];\n flattenStatements(actionWithoutBuiltins.visit(visitor, _Mode.Statement), actionStmts);\n prependTemporaryDecls(visitor.temporaryCount, bindingId, actionStmts);\n if (visitor.usesImplicitReceiver) {\n localResolver.notifyImplicitReceiverUse();\n }\n const lastIndex = actionStmts.length - 1;\n if (lastIndex >= 0) {\n const lastStatement = actionStmts[lastIndex];\n // Ensure that the value of the last expression statement is returned\n if (lastStatement instanceof ExpressionStatement) {\n actionStmts[lastIndex] = new ReturnStatement(lastStatement.expr);\n }\n }\n return actionStmts;\n}\nfunction convertPropertyBindingBuiltins(converterFactory, ast) {\n return convertBuiltins(converterFactory, ast);\n}\nclass ConvertPropertyBindingResult {\n constructor(stmts, currValExpr) {\n this.stmts = stmts;\n this.currValExpr = currValExpr;\n }\n}\n/**\n * Converts the given expression AST into an executable output AST, assuming the expression\n * is used in property binding. The expression has to be preprocessed via\n * `convertPropertyBindingBuiltins`.\n */\nfunction convertPropertyBinding(localResolver, implicitReceiver, expressionWithoutBuiltins, bindingId) {\n if (!localResolver) {\n localResolver = new DefaultLocalResolver();\n }\n const visitor = new _AstToIrVisitor(localResolver, implicitReceiver, bindingId, /* supportsInterpolation */ false);\n const outputExpr = expressionWithoutBuiltins.visit(visitor, _Mode.Expression);\n const stmts = getStatementsFromVisitor(visitor, bindingId);\n if (visitor.usesImplicitReceiver) {\n localResolver.notifyImplicitReceiverUse();\n }\n return new ConvertPropertyBindingResult(stmts, outputExpr);\n}\n/**\n * Given some expression, such as a binding or interpolation expression, and a context expression to\n * look values up on, visit each facet of the given expression resolving values from the context\n * expression such that a list of arguments can be derived from the found values that can be used as\n * arguments to an external update instruction.\n *\n * @param localResolver The resolver to use to look up expressions by name appropriately\n * @param contextVariableExpression The expression representing the context variable used to create\n * the final argument expressions\n * @param expressionWithArgumentsToExtract The expression to visit to figure out what values need to\n * be resolved and what arguments list to build.\n * @param bindingId A name prefix used to create temporary variable names if they're needed for the\n * arguments generated\n * @returns An array of expressions that can be passed as arguments to instruction expressions like\n * `o.importExpr(R3.propertyInterpolate).callFn(result)`\n */\nfunction convertUpdateArguments(localResolver, contextVariableExpression, expressionWithArgumentsToExtract, bindingId) {\n const visitor = new _AstToIrVisitor(localResolver, contextVariableExpression, bindingId, /* supportsInterpolation */ true);\n const outputExpr = visitor.visitInterpolation(expressionWithArgumentsToExtract, _Mode.Expression);\n if (visitor.usesImplicitReceiver) {\n localResolver.notifyImplicitReceiverUse();\n }\n const stmts = getStatementsFromVisitor(visitor, bindingId);\n const args = outputExpr.args;\n return { stmts, args };\n}\nfunction getStatementsFromVisitor(visitor, bindingId) {\n const stmts = [];\n for (let i = 0; i < visitor.temporaryCount; i++) {\n stmts.push(temporaryDeclaration(bindingId, i));\n }\n return stmts;\n}\nfunction convertBuiltins(converterFactory, ast) {\n const visitor = new _BuiltinAstConverter(converterFactory);\n return ast.visit(visitor);\n}\nfunction temporaryName(bindingId, temporaryNumber) {\n return `tmp_${bindingId}_${temporaryNumber}`;\n}\nfunction temporaryDeclaration(bindingId, temporaryNumber) {\n return new DeclareVarStmt(temporaryName(bindingId, temporaryNumber));\n}\nfunction prependTemporaryDecls(temporaryCount, bindingId, statements) {\n for (let i = temporaryCount - 1; i >= 0; i--) {\n statements.unshift(temporaryDeclaration(bindingId, i));\n }\n}\nvar _Mode;\n(function (_Mode) {\n _Mode[_Mode[\"Statement\"] = 0] = \"Statement\";\n _Mode[_Mode[\"Expression\"] = 1] = \"Expression\";\n})(_Mode || (_Mode = {}));\nfunction ensureStatementMode(mode, ast) {\n if (mode !== _Mode.Statement) {\n throw new Error(`Expected a statement, but saw ${ast}`);\n }\n}\nfunction ensureExpressionMode(mode, ast) {\n if (mode !== _Mode.Expression) {\n throw new Error(`Expected an expression, but saw ${ast}`);\n }\n}\nfunction convertToStatementIfNeeded(mode, expr) {\n if (mode === _Mode.Statement) {\n return expr.toStmt();\n }\n else {\n return expr;\n }\n}\nclass _BuiltinAstConverter extends AstTransformer {\n constructor(_converterFactory) {\n super();\n this._converterFactory = _converterFactory;\n }\n visitPipe(ast, context) {\n const args = [ast.exp, ...ast.args].map(ast => ast.visit(this, context));\n return new BuiltinFunctionCall(ast.span, ast.sourceSpan, args, this._converterFactory.createPipeConverter(ast.name, args.length));\n }\n visitLiteralArray(ast, context) {\n const args = ast.expressions.map(ast => ast.visit(this, context));\n return new BuiltinFunctionCall(ast.span, ast.sourceSpan, args, this._converterFactory.createLiteralArrayConverter(ast.expressions.length));\n }\n visitLiteralMap(ast, context) {\n const args = ast.values.map(ast => ast.visit(this, context));\n return new BuiltinFunctionCall(ast.span, ast.sourceSpan, args, this._converterFactory.createLiteralMapConverter(ast.keys));\n }\n}\nclass _AstToIrVisitor {\n constructor(_localResolver, _implicitReceiver, bindingId, supportsInterpolation, baseSourceSpan, implicitReceiverAccesses) {\n this._localResolver = _localResolver;\n this._implicitReceiver = _implicitReceiver;\n this.bindingId = bindingId;\n this.supportsInterpolation = supportsInterpolation;\n this.baseSourceSpan = baseSourceSpan;\n this.implicitReceiverAccesses = implicitReceiverAccesses;\n this._nodeMap = new Map();\n this._resultMap = new Map();\n this._currentTemporary = 0;\n this.temporaryCount = 0;\n this.usesImplicitReceiver = false;\n }\n visitUnary(ast, mode) {\n let op;\n switch (ast.operator) {\n case '+':\n op = UnaryOperator.Plus;\n break;\n case '-':\n op = UnaryOperator.Minus;\n break;\n default:\n throw new Error(`Unsupported operator ${ast.operator}`);\n }\n return convertToStatementIfNeeded(mode, new UnaryOperatorExpr(op, this._visit(ast.expr, _Mode.Expression), undefined, this.convertSourceSpan(ast.span)));\n }\n visitBinary(ast, mode) {\n let op;\n switch (ast.operation) {\n case '+':\n op = BinaryOperator.Plus;\n break;\n case '-':\n op = BinaryOperator.Minus;\n break;\n case '*':\n op = BinaryOperator.Multiply;\n break;\n case '/':\n op = BinaryOperator.Divide;\n break;\n case '%':\n op = BinaryOperator.Modulo;\n break;\n case '&&':\n op = BinaryOperator.And;\n break;\n case '||':\n op = BinaryOperator.Or;\n break;\n case '==':\n op = BinaryOperator.Equals;\n break;\n case '!=':\n op = BinaryOperator.NotEquals;\n break;\n case '===':\n op = BinaryOperator.Identical;\n break;\n case '!==':\n op = BinaryOperator.NotIdentical;\n break;\n case '<':\n op = BinaryOperator.Lower;\n break;\n case '>':\n op = BinaryOperator.Bigger;\n break;\n case '<=':\n op = BinaryOperator.LowerEquals;\n break;\n case '>=':\n op = BinaryOperator.BiggerEquals;\n break;\n case '??':\n return this.convertNullishCoalesce(ast, mode);\n default:\n throw new Error(`Unsupported operation ${ast.operation}`);\n }\n return convertToStatementIfNeeded(mode, new BinaryOperatorExpr(op, this._visit(ast.left, _Mode.Expression), this._visit(ast.right, _Mode.Expression), undefined, this.convertSourceSpan(ast.span)));\n }\n visitChain(ast, mode) {\n ensureStatementMode(mode, ast);\n return this.visitAll(ast.expressions, mode);\n }\n visitConditional(ast, mode) {\n const value = this._visit(ast.condition, _Mode.Expression);\n return convertToStatementIfNeeded(mode, value.conditional(this._visit(ast.trueExp, _Mode.Expression), this._visit(ast.falseExp, _Mode.Expression), this.convertSourceSpan(ast.span)));\n }\n visitPipe(ast, mode) {\n throw new Error(`Illegal state: Pipes should have been converted into functions. Pipe: ${ast.name}`);\n }\n visitImplicitReceiver(ast, mode) {\n ensureExpressionMode(mode, ast);\n this.usesImplicitReceiver = true;\n return this._implicitReceiver;\n }\n visitThisReceiver(ast, mode) {\n return this.visitImplicitReceiver(ast, mode);\n }\n visitInterpolation(ast, mode) {\n if (!this.supportsInterpolation) {\n throw new Error('Unexpected interpolation');\n }\n ensureExpressionMode(mode, ast);\n let args = [];\n for (let i = 0; i < ast.strings.length - 1; i++) {\n args.push(literal(ast.strings[i]));\n args.push(this._visit(ast.expressions[i], _Mode.Expression));\n }\n args.push(literal(ast.strings[ast.strings.length - 1]));\n // If we're dealing with an interpolation of 1 value with an empty prefix and suffix, reduce the\n // args returned to just the value, because we're going to pass it to a special instruction.\n const strings = ast.strings;\n if (strings.length === 2 && strings[0] === '' && strings[1] === '') {\n // Single argument interpolate instructions.\n args = [args[1]];\n }\n else if (ast.expressions.length >= 9) {\n // 9 or more arguments must be passed to the `interpolateV`-style instructions, which accept\n // an array of arguments\n args = [literalArr(args)];\n }\n return new InterpolationExpression(args);\n }\n visitKeyedRead(ast, mode) {\n const leftMostSafe = this.leftMostSafeNode(ast);\n if (leftMostSafe) {\n return this.convertSafeAccess(ast, leftMostSafe, mode);\n }\n else {\n return convertToStatementIfNeeded(mode, this._visit(ast.receiver, _Mode.Expression).key(this._visit(ast.key, _Mode.Expression)));\n }\n }\n visitKeyedWrite(ast, mode) {\n const obj = this._visit(ast.receiver, _Mode.Expression);\n const key = this._visit(ast.key, _Mode.Expression);\n const value = this._visit(ast.value, _Mode.Expression);\n if (obj === this._implicitReceiver) {\n this._localResolver.maybeRestoreView();\n }\n return convertToStatementIfNeeded(mode, obj.key(key).set(value));\n }\n visitLiteralArray(ast, mode) {\n throw new Error(`Illegal State: literal arrays should have been converted into functions`);\n }\n visitLiteralMap(ast, mode) {\n throw new Error(`Illegal State: literal maps should have been converted into functions`);\n }\n visitLiteralPrimitive(ast, mode) {\n // For literal values of null, undefined, true, or false allow type interference\n // to infer the type.\n const type = ast.value === null || ast.value === undefined || ast.value === true || ast.value === true ?\n INFERRED_TYPE :\n undefined;\n return convertToStatementIfNeeded(mode, literal(ast.value, type, this.convertSourceSpan(ast.span)));\n }\n _getLocal(name, receiver) {\n if (this._localResolver.globals?.has(name) && receiver instanceof ThisReceiver) {\n return null;\n }\n return this._localResolver.getLocal(name);\n }\n visitPrefixNot(ast, mode) {\n return convertToStatementIfNeeded(mode, not(this._visit(ast.expression, _Mode.Expression)));\n }\n visitNonNullAssert(ast, mode) {\n return convertToStatementIfNeeded(mode, this._visit(ast.expression, _Mode.Expression));\n }\n visitPropertyRead(ast, mode) {\n const leftMostSafe = this.leftMostSafeNode(ast);\n if (leftMostSafe) {\n return this.convertSafeAccess(ast, leftMostSafe, mode);\n }\n else {\n let result = null;\n const prevUsesImplicitReceiver = this.usesImplicitReceiver;\n const receiver = this._visit(ast.receiver, _Mode.Expression);\n if (receiver === this._implicitReceiver) {\n result = this._getLocal(ast.name, ast.receiver);\n if (result) {\n // Restore the previous \"usesImplicitReceiver\" state since the implicit\n // receiver has been replaced with a resolved local expression.\n this.usesImplicitReceiver = prevUsesImplicitReceiver;\n this.addImplicitReceiverAccess(ast.name);\n }\n }\n if (result == null) {\n result = receiver.prop(ast.name, this.convertSourceSpan(ast.span));\n }\n return convertToStatementIfNeeded(mode, result);\n }\n }\n visitPropertyWrite(ast, mode) {\n const receiver = this._visit(ast.receiver, _Mode.Expression);\n const prevUsesImplicitReceiver = this.usesImplicitReceiver;\n let varExpr = null;\n if (receiver === this._implicitReceiver) {\n const localExpr = this._getLocal(ast.name, ast.receiver);\n if (localExpr) {\n if (localExpr instanceof ReadPropExpr) {\n // If the local variable is a property read expression, it's a reference\n // to a 'context.property' value and will be used as the target of the\n // write expression.\n varExpr = localExpr;\n // Restore the previous \"usesImplicitReceiver\" state since the implicit\n // receiver has been replaced with a resolved local expression.\n this.usesImplicitReceiver = prevUsesImplicitReceiver;\n this.addImplicitReceiverAccess(ast.name);\n }\n else {\n // Otherwise it's an error.\n const receiver = ast.name;\n const value = (ast.value instanceof PropertyRead) ? ast.value.name : undefined;\n throw new Error(`Cannot assign value \"${value}\" to template variable \"${receiver}\". Template variables are read-only.`);\n }\n }\n }\n // If no local expression could be produced, use the original receiver's\n // property as the target.\n if (varExpr === null) {\n varExpr = receiver.prop(ast.name, this.convertSourceSpan(ast.span));\n }\n return convertToStatementIfNeeded(mode, varExpr.set(this._visit(ast.value, _Mode.Expression)));\n }\n visitSafePropertyRead(ast, mode) {\n return this.convertSafeAccess(ast, this.leftMostSafeNode(ast), mode);\n }\n visitSafeKeyedRead(ast, mode) {\n return this.convertSafeAccess(ast, this.leftMostSafeNode(ast), mode);\n }\n visitAll(asts, mode) {\n return asts.map(ast => this._visit(ast, mode));\n }\n visitCall(ast, mode) {\n const leftMostSafe = this.leftMostSafeNode(ast);\n if (leftMostSafe) {\n return this.convertSafeAccess(ast, leftMostSafe, mode);\n }\n const convertedArgs = this.visitAll(ast.args, _Mode.Expression);\n if (ast instanceof BuiltinFunctionCall) {\n return convertToStatementIfNeeded(mode, ast.converter(convertedArgs));\n }\n const receiver = ast.receiver;\n if (receiver instanceof PropertyRead &&\n receiver.receiver instanceof ImplicitReceiver &&\n !(receiver.receiver instanceof ThisReceiver) && receiver.name === '$any') {\n if (convertedArgs.length !== 1) {\n throw new Error(`Invalid call to $any, expected 1 argument but received ${convertedArgs.length || 'none'}`);\n }\n return convertToStatementIfNeeded(mode, convertedArgs[0]);\n }\n const call = this._visit(receiver, _Mode.Expression)\n .callFn(convertedArgs, this.convertSourceSpan(ast.span));\n return convertToStatementIfNeeded(mode, call);\n }\n visitSafeCall(ast, mode) {\n return this.convertSafeAccess(ast, this.leftMostSafeNode(ast), mode);\n }\n _visit(ast, mode) {\n const result = this._resultMap.get(ast);\n if (result)\n return result;\n return (this._nodeMap.get(ast) || ast).visit(this, mode);\n }\n convertSafeAccess(ast, leftMostSafe, mode) {\n // If the expression contains a safe access node on the left it needs to be converted to\n // an expression that guards the access to the member by checking the receiver for blank. As\n // execution proceeds from left to right, the left most part of the expression must be guarded\n // first but, because member access is left associative, the right side of the expression is at\n // the top of the AST. The desired result requires lifting a copy of the left part of the\n // expression up to test it for blank before generating the unguarded version.\n // Consider, for example the following expression: a?.b.c?.d.e\n // This results in the ast:\n // .\n // / \\\n // ?. e\n // / \\\n // . d\n // / \\\n // ?. c\n // / \\\n // a b\n // The following tree should be generated:\n //\n // /---- ? ----\\\n // / | \\\n // a /--- ? ---\\ null\n // / | \\\n // . . null\n // / \\ / \\\n // . c . e\n // / \\ / \\\n // a b . d\n // / \\\n // . c\n // / \\\n // a b\n //\n // Notice that the first guard condition is the left hand of the left most safe access node\n // which comes in as leftMostSafe to this routine.\n let guardedExpression = this._visit(leftMostSafe.receiver, _Mode.Expression);\n let temporary = undefined;\n if (this.needsTemporaryInSafeAccess(leftMostSafe.receiver)) {\n // If the expression has method calls or pipes then we need to save the result into a\n // temporary variable to avoid calling stateful or impure code more than once.\n temporary = this.allocateTemporary();\n // Preserve the result in the temporary variable\n guardedExpression = temporary.set(guardedExpression);\n // Ensure all further references to the guarded expression refer to the temporary instead.\n this._resultMap.set(leftMostSafe.receiver, temporary);\n }\n const condition = guardedExpression.isBlank();\n // Convert the ast to an unguarded access to the receiver's member. The map will substitute\n // leftMostNode with its unguarded version in the call to `this.visit()`.\n if (leftMostSafe instanceof SafeCall) {\n this._nodeMap.set(leftMostSafe, new Call(leftMostSafe.span, leftMostSafe.sourceSpan, leftMostSafe.receiver, leftMostSafe.args, leftMostSafe.argumentSpan));\n }\n else if (leftMostSafe instanceof SafeKeyedRead) {\n this._nodeMap.set(leftMostSafe, new KeyedRead(leftMostSafe.span, leftMostSafe.sourceSpan, leftMostSafe.receiver, leftMostSafe.key));\n }\n else {\n this._nodeMap.set(leftMostSafe, new PropertyRead(leftMostSafe.span, leftMostSafe.sourceSpan, leftMostSafe.nameSpan, leftMostSafe.receiver, leftMostSafe.name));\n }\n // Recursively convert the node now without the guarded member access.\n const access = this._visit(ast, _Mode.Expression);\n // Remove the mapping. This is not strictly required as the converter only traverses each node\n // once but is safer if the conversion is changed to traverse the nodes more than once.\n this._nodeMap.delete(leftMostSafe);\n // If we allocated a temporary, release it.\n if (temporary) {\n this.releaseTemporary(temporary);\n }\n // Produce the conditional\n return convertToStatementIfNeeded(mode, condition.conditional(NULL_EXPR, access));\n }\n convertNullishCoalesce(ast, mode) {\n const left = this._visit(ast.left, _Mode.Expression);\n const right = this._visit(ast.right, _Mode.Expression);\n const temporary = this.allocateTemporary();\n this.releaseTemporary(temporary);\n // Generate the following expression. It is identical to how TS\n // transpiles binary expressions with a nullish coalescing operator.\n // let temp;\n // (temp = a) !== null && temp !== undefined ? temp : b;\n return convertToStatementIfNeeded(mode, temporary.set(left)\n .notIdentical(NULL_EXPR)\n .and(temporary.notIdentical(literal(undefined)))\n .conditional(temporary, right));\n }\n // Given an expression of the form a?.b.c?.d.e then the left most safe node is\n // the (a?.b). The . and ?. are left associative thus can be rewritten as:\n // ((((a?.c).b).c)?.d).e. This returns the most deeply nested safe read or\n // safe method call as this needs to be transformed initially to:\n // a == null ? null : a.c.b.c?.d.e\n // then to:\n // a == null ? null : a.b.c == null ? null : a.b.c.d.e\n leftMostSafeNode(ast) {\n const visit = (visitor, ast) => {\n return (this._nodeMap.get(ast) || ast).visit(visitor);\n };\n return ast.visit({\n visitUnary(ast) {\n return null;\n },\n visitBinary(ast) {\n return null;\n },\n visitChain(ast) {\n return null;\n },\n visitConditional(ast) {\n return null;\n },\n visitCall(ast) {\n return visit(this, ast.receiver);\n },\n visitSafeCall(ast) {\n return visit(this, ast.receiver) || ast;\n },\n visitImplicitReceiver(ast) {\n return null;\n },\n visitThisReceiver(ast) {\n return null;\n },\n visitInterpolation(ast) {\n return null;\n },\n visitKeyedRead(ast) {\n return visit(this, ast.receiver);\n },\n visitKeyedWrite(ast) {\n return null;\n },\n visitLiteralArray(ast) {\n return null;\n },\n visitLiteralMap(ast) {\n return null;\n },\n visitLiteralPrimitive(ast) {\n return null;\n },\n visitPipe(ast) {\n return null;\n },\n visitPrefixNot(ast) {\n return null;\n },\n visitNonNullAssert(ast) {\n return null;\n },\n visitPropertyRead(ast) {\n return visit(this, ast.receiver);\n },\n visitPropertyWrite(ast) {\n return null;\n },\n visitSafePropertyRead(ast) {\n return visit(this, ast.receiver) || ast;\n },\n visitSafeKeyedRead(ast) {\n return visit(this, ast.receiver) || ast;\n }\n });\n }\n // Returns true of the AST includes a method or a pipe indicating that, if the\n // expression is used as the target of a safe property or method access then\n // the expression should be stored into a temporary variable.\n needsTemporaryInSafeAccess(ast) {\n const visit = (visitor, ast) => {\n return ast && (this._nodeMap.get(ast) || ast).visit(visitor);\n };\n const visitSome = (visitor, ast) => {\n return ast.some(ast => visit(visitor, ast));\n };\n return ast.visit({\n visitUnary(ast) {\n return visit(this, ast.expr);\n },\n visitBinary(ast) {\n return visit(this, ast.left) || visit(this, ast.right);\n },\n visitChain(ast) {\n return false;\n },\n visitConditional(ast) {\n return visit(this, ast.condition) || visit(this, ast.trueExp) || visit(this, ast.falseExp);\n },\n visitCall(ast) {\n return true;\n },\n visitSafeCall(ast) {\n return true;\n },\n visitImplicitReceiver(ast) {\n return false;\n },\n visitThisReceiver(ast) {\n return false;\n },\n visitInterpolation(ast) {\n return visitSome(this, ast.expressions);\n },\n visitKeyedRead(ast) {\n return false;\n },\n visitKeyedWrite(ast) {\n return false;\n },\n visitLiteralArray(ast) {\n return true;\n },\n visitLiteralMap(ast) {\n return true;\n },\n visitLiteralPrimitive(ast) {\n return false;\n },\n visitPipe(ast) {\n return true;\n },\n visitPrefixNot(ast) {\n return visit(this, ast.expression);\n },\n visitNonNullAssert(ast) {\n return visit(this, ast.expression);\n },\n visitPropertyRead(ast) {\n return false;\n },\n visitPropertyWrite(ast) {\n return false;\n },\n visitSafePropertyRead(ast) {\n return false;\n },\n visitSafeKeyedRead(ast) {\n return false;\n }\n });\n }\n allocateTemporary() {\n const tempNumber = this._currentTemporary++;\n this.temporaryCount = Math.max(this._currentTemporary, this.temporaryCount);\n return new ReadVarExpr(temporaryName(this.bindingId, tempNumber));\n }\n releaseTemporary(temporary) {\n this._currentTemporary--;\n if (temporary.name != temporaryName(this.bindingId, this._currentTemporary)) {\n throw new Error(`Temporary ${temporary.name} released out of order`);\n }\n }\n /**\n * Creates an absolute `ParseSourceSpan` from the relative `ParseSpan`.\n *\n * `ParseSpan` objects are relative to the start of the expression.\n * This method converts these to full `ParseSourceSpan` objects that\n * show where the span is within the overall source file.\n *\n * @param span the relative span to convert.\n * @returns a `ParseSourceSpan` for the given span or null if no\n * `baseSourceSpan` was provided to this class.\n */\n convertSourceSpan(span) {\n if (this.baseSourceSpan) {\n const start = this.baseSourceSpan.start.moveBy(span.start);\n const end = this.baseSourceSpan.start.moveBy(span.end);\n const fullStart = this.baseSourceSpan.fullStart.moveBy(span.start);\n return new ParseSourceSpan(start, end, fullStart);\n }\n else {\n return null;\n }\n }\n /** Adds the name of an AST to the list of implicit receiver accesses. */\n addImplicitReceiverAccess(name) {\n if (this.implicitReceiverAccesses) {\n this.implicitReceiverAccesses.add(name);\n }\n }\n}\nfunction flattenStatements(arg, output) {\n if (Array.isArray(arg)) {\n arg.forEach((entry) => flattenStatements(entry, output));\n }\n else {\n output.push(arg);\n }\n}\nfunction unsupported() {\n throw new Error('Unsupported operation');\n}\nclass InterpolationExpression extends Expression {\n constructor(args) {\n super(null, null);\n this.args = args;\n this.isConstant = unsupported;\n this.isEquivalent = unsupported;\n this.visitExpression = unsupported;\n }\n}\nclass DefaultLocalResolver {\n constructor(globals) {\n this.globals = globals;\n }\n notifyImplicitReceiverUse() { }\n maybeRestoreView() { }\n getLocal(name) {\n if (name === EventHandlerVars.event.name) {\n return EventHandlerVars.event;\n }\n return null;\n }\n}\nclass BuiltinFunctionCall extends Call {\n constructor(span, sourceSpan, args, converter) {\n super(span, sourceSpan, new EmptyExpr(span, sourceSpan), args, null);\n this.converter = converter;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * This file is a port of shadowCSS from webcomponents.js to TypeScript.\n *\n * Please make sure to keep to edits in sync with the source file.\n *\n * Source:\n * https://github.com/webcomponents/webcomponentsjs/blob/4efecd7e0e/src/ShadowCSS/ShadowCSS.js\n *\n * The original file level comment is reproduced below\n */\n/*\n This is a limited shim for ShadowDOM css styling.\n https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#styles\n\n The intention here is to support only the styling features which can be\n relatively simply implemented. The goal is to allow users to avoid the\n most obvious pitfalls and do so without compromising performance significantly.\n For ShadowDOM styling that's not covered here, a set of best practices\n can be provided that should allow users to accomplish more complex styling.\n\n The following is a list of specific ShadowDOM styling features and a brief\n discussion of the approach used to shim.\n\n Shimmed features:\n\n * :host, :host-context: ShadowDOM allows styling of the shadowRoot's host\n element using the :host rule. To shim this feature, the :host styles are\n reformatted and prefixed with a given scope name and promoted to a\n document level stylesheet.\n For example, given a scope name of .foo, a rule like this:\n\n :host {\n background: red;\n }\n }\n\n becomes:\n\n .foo {\n background: red;\n }\n\n * encapsulation: Styles defined within ShadowDOM, apply only to\n dom inside the ShadowDOM. Polymer uses one of two techniques to implement\n this feature.\n\n By default, rules are prefixed with the host element tag name\n as a descendant selector. This ensures styling does not leak out of the 'top'\n of the element's ShadowDOM. For example,\n\n div {\n font-weight: bold;\n }\n\n becomes:\n\n x-foo div {\n font-weight: bold;\n }\n\n becomes:\n\n\n Alternatively, if WebComponents.ShadowCSS.strictStyling is set to true then\n selectors are scoped by adding an attribute selector suffix to each\n simple selector that contains the host element tag name. Each element\n in the element's ShadowDOM template is also given the scope attribute.\n Thus, these rules match only elements that have the scope attribute.\n For example, given a scope name of x-foo, a rule like this:\n\n div {\n font-weight: bold;\n }\n\n becomes:\n\n div[x-foo] {\n font-weight: bold;\n }\n\n Note that elements that are dynamically added to a scope must have the scope\n selector added to them manually.\n\n * upper/lower bound encapsulation: Styles which are defined outside a\n shadowRoot should not cross the ShadowDOM boundary and should not apply\n inside a shadowRoot.\n\n This styling behavior is not emulated. Some possible ways to do this that\n were rejected due to complexity and/or performance concerns include: (1) reset\n every possible property for every possible selector for a given scope name;\n (2) re-implement css in javascript.\n\n As an alternative, users should make sure to use selectors\n specific to the scope in which they are working.\n\n * ::distributed: This behavior is not emulated. It's often not necessary\n to style the contents of a specific insertion point and instead, descendants\n of the host element can be styled selectively. Users can also create an\n extra node around an insertion point and style that node's contents\n via descendent selectors. For example, with a shadowRoot like this:\n\n <style>\n ::content(div) {\n background: red;\n }\n </style>\n <content></content>\n\n could become:\n\n <style>\n / *@polyfill .content-container div * /\n ::content(div) {\n background: red;\n }\n </style>\n <div class=\"content-container\">\n <content></content>\n </div>\n\n Note the use of @polyfill in the comment above a ShadowDOM specific style\n declaration. This is a directive to the styling shim to use the selector\n in comments in lieu of the next selector when running under polyfill.\n*/\nclass ShadowCss {\n constructor() {\n this.strictStyling = true;\n }\n /*\n * Shim some cssText with the given selector. Returns cssText that can\n * be included in the document via WebComponents.ShadowCSS.addCssToDocument(css).\n *\n * When strictStyling is true:\n * - selector is the attribute added to all elements inside the host,\n * - hostSelector is the attribute added to the host itself.\n */\n shimCssText(cssText, selector, hostSelector = '') {\n const commentsWithHash = extractCommentsWithHash(cssText);\n cssText = stripComments(cssText);\n cssText = this._insertDirectives(cssText);\n const scopedCssText = this._scopeCssText(cssText, selector, hostSelector);\n return [scopedCssText, ...commentsWithHash].join('\\n');\n }\n _insertDirectives(cssText) {\n cssText = this._insertPolyfillDirectivesInCssText(cssText);\n return this._insertPolyfillRulesInCssText(cssText);\n }\n /*\n * Process styles to convert native ShadowDOM rules that will trip\n * up the css parser; we rely on decorating the stylesheet with inert rules.\n *\n * For example, we convert this rule:\n *\n * polyfill-next-selector { content: ':host menu-item'; }\n * ::content menu-item {\n *\n * to this:\n *\n * scopeName menu-item {\n *\n **/\n _insertPolyfillDirectivesInCssText(cssText) {\n // Difference with webcomponents.js: does not handle comments\n return cssText.replace(_cssContentNextSelectorRe, function (...m) {\n return m[2] + '{';\n });\n }\n /*\n * Process styles to add rules which will only apply under the polyfill\n *\n * For example, we convert this rule:\n *\n * polyfill-rule {\n * content: ':host menu-item';\n * ...\n * }\n *\n * to this:\n *\n * scopeName menu-item {...}\n *\n **/\n _insertPolyfillRulesInCssText(cssText) {\n // Difference with webcomponents.js: does not handle comments\n return cssText.replace(_cssContentRuleRe, (...m) => {\n const rule = m[0].replace(m[1], '').replace(m[2], '');\n return m[4] + rule;\n });\n }\n /* Ensure styles are scoped. Pseudo-scoping takes a rule like:\n *\n * .foo {... }\n *\n * and converts this to\n *\n * scopeName .foo { ... }\n */\n _scopeCssText(cssText, scopeSelector, hostSelector) {\n const unscopedRules = this._extractUnscopedRulesFromCssText(cssText);\n // replace :host and :host-context -shadowcsshost and -shadowcsshost respectively\n cssText = this._insertPolyfillHostInCssText(cssText);\n cssText = this._convertColonHost(cssText);\n cssText = this._convertColonHostContext(cssText);\n cssText = this._convertShadowDOMSelectors(cssText);\n if (scopeSelector) {\n cssText = this._scopeSelectors(cssText, scopeSelector, hostSelector);\n }\n cssText = cssText + '\\n' + unscopedRules;\n return cssText.trim();\n }\n /*\n * Process styles to add rules which will only apply under the polyfill\n * and do not process via CSSOM. (CSSOM is destructive to rules on rare\n * occasions, e.g. -webkit-calc on Safari.)\n * For example, we convert this rule:\n *\n * @polyfill-unscoped-rule {\n * content: 'menu-item';\n * ... }\n *\n * to this:\n *\n * menu-item {...}\n *\n **/\n _extractUnscopedRulesFromCssText(cssText) {\n // Difference with webcomponents.js: does not handle comments\n let r = '';\n let m;\n _cssContentUnscopedRuleRe.lastIndex = 0;\n while ((m = _cssContentUnscopedRuleRe.exec(cssText)) !== null) {\n const rule = m[0].replace(m[2], '').replace(m[1], m[4]);\n r += rule + '\\n\\n';\n }\n return r;\n }\n /*\n * convert a rule like :host(.foo) > .bar { }\n *\n * to\n *\n * .foo<scopeName> > .bar\n */\n _convertColonHost(cssText) {\n return cssText.replace(_cssColonHostRe, (_, hostSelectors, otherSelectors) => {\n if (hostSelectors) {\n const convertedSelectors = [];\n const hostSelectorArray = hostSelectors.split(',').map(p => p.trim());\n for (const hostSelector of hostSelectorArray) {\n if (!hostSelector)\n break;\n const convertedSelector = _polyfillHostNoCombinator + hostSelector.replace(_polyfillHost, '') + otherSelectors;\n convertedSelectors.push(convertedSelector);\n }\n return convertedSelectors.join(',');\n }\n else {\n return _polyfillHostNoCombinator + otherSelectors;\n }\n });\n }\n /*\n * convert a rule like :host-context(.foo) > .bar { }\n *\n * to\n *\n * .foo<scopeName> > .bar, .foo <scopeName> > .bar { }\n *\n * and\n *\n * :host-context(.foo:host) .bar { ... }\n *\n * to\n *\n * .foo<scopeName> .bar { ... }\n */\n _convertColonHostContext(cssText) {\n return cssText.replace(_cssColonHostContextReGlobal, selectorText => {\n // We have captured a selector that contains a `:host-context` rule.\n // For backward compatibility `:host-context` may contain a comma separated list of selectors.\n // Each context selector group will contain a list of host-context selectors that must match\n // an ancestor of the host.\n // (Normally `contextSelectorGroups` will only contain a single array of context selectors.)\n const contextSelectorGroups = [[]];\n // There may be more than `:host-context` in this selector so `selectorText` could look like:\n // `:host-context(.one):host-context(.two)`.\n // Execute `_cssColonHostContextRe` over and over until we have extracted all the\n // `:host-context` selectors from this selector.\n let match;\n while (match = _cssColonHostContextRe.exec(selectorText)) {\n // `match` = [':host-context(<selectors>)<rest>', <selectors>, <rest>]\n // The `<selectors>` could actually be a comma separated list: `:host-context(.one, .two)`.\n const newContextSelectors = (match[1] ?? '').trim().split(',').map(m => m.trim()).filter(m => m !== '');\n // We must duplicate the current selector group for each of these new selectors.\n // For example if the current groups are:\n // ```\n // [\n // ['a', 'b', 'c'],\n // ['x', 'y', 'z'],\n // ]\n // ```\n // And we have a new set of comma separated selectors: `:host-context(m,n)` then the new\n // groups are:\n // ```\n // [\n // ['a', 'b', 'c', 'm'],\n // ['x', 'y', 'z', 'm'],\n // ['a', 'b', 'c', 'n'],\n // ['x', 'y', 'z', 'n'],\n // ]\n // ```\n const contextSelectorGroupsLength = contextSelectorGroups.length;\n repeatGroups(contextSelectorGroups, newContextSelectors.length);\n for (let i = 0; i < newContextSelectors.length; i++) {\n for (let j = 0; j < contextSelectorGroupsLength; j++) {\n contextSelectorGroups[j + (i * contextSelectorGroupsLength)].push(newContextSelectors[i]);\n }\n }\n // Update the `selectorText` and see repeat to see if there are more `:host-context`s.\n selectorText = match[2];\n }\n // The context selectors now must be combined with each other to capture all the possible\n // selectors that `:host-context` can match. See `combineHostContextSelectors()` for more\n // info about how this is done.\n return contextSelectorGroups\n .map(contextSelectors => combineHostContextSelectors(contextSelectors, selectorText))\n .join(', ');\n });\n }\n /*\n * Convert combinators like ::shadow and pseudo-elements like ::content\n * by replacing with space.\n */\n _convertShadowDOMSelectors(cssText) {\n return _shadowDOMSelectorsRe.reduce((result, pattern) => result.replace(pattern, ' '), cssText);\n }\n // change a selector like 'div' to 'name div'\n _scopeSelectors(cssText, scopeSelector, hostSelector) {\n return processRules(cssText, (rule) => {\n let selector = rule.selector;\n let content = rule.content;\n if (rule.selector[0] !== '@') {\n selector =\n this._scopeSelector(rule.selector, scopeSelector, hostSelector, this.strictStyling);\n }\n else if (rule.selector.startsWith('@media') || rule.selector.startsWith('@supports') ||\n rule.selector.startsWith('@document') || rule.selector.startsWith('@layer')) {\n content = this._scopeSelectors(rule.content, scopeSelector, hostSelector);\n }\n else if (rule.selector.startsWith('@font-face') || rule.selector.startsWith('@page')) {\n content = this._stripScopingSelectors(rule.content);\n }\n return new CssRule(selector, content);\n });\n }\n /**\n * Handle a css text that is within a rule that should not contain scope selectors by simply\n * removing them! An example of such a rule is `@font-face`.\n *\n * `@font-face` rules cannot contain nested selectors. Nor can they be nested under a selector.\n * Normally this would be a syntax error by the author of the styles. But in some rare cases, such\n * as importing styles from a library, and applying `:host ::ng-deep` to the imported styles, we\n * can end up with broken css if the imported styles happen to contain @font-face rules.\n *\n * For example:\n *\n * ```\n * :host ::ng-deep {\n * import 'some/lib/containing/font-face';\n * }\n *\n * Similar logic applies to `@page` rules which can contain a particular set of properties,\n * as well as some specific at-rules. Since they can't be encapsulated, we have to strip\n * any scoping selectors from them. For more information: https://www.w3.org/TR/css-page-3\n * ```\n */\n _stripScopingSelectors(cssText) {\n return processRules(cssText, rule => {\n const selector = rule.selector.replace(_shadowDeepSelectors, ' ')\n .replace(_polyfillHostNoCombinatorRe, ' ');\n return new CssRule(selector, rule.content);\n });\n }\n _scopeSelector(selector, scopeSelector, hostSelector, strict) {\n return selector.split(',')\n .map(part => part.trim().split(_shadowDeepSelectors))\n .map((deepParts) => {\n const [shallowPart, ...otherParts] = deepParts;\n const applyScope = (shallowPart) => {\n if (this._selectorNeedsScoping(shallowPart, scopeSelector)) {\n return strict ?\n this._applyStrictSelectorScope(shallowPart, scopeSelector, hostSelector) :\n this._applySelectorScope(shallowPart, scopeSelector, hostSelector);\n }\n else {\n return shallowPart;\n }\n };\n return [applyScope(shallowPart), ...otherParts].join(' ');\n })\n .join(', ');\n }\n _selectorNeedsScoping(selector, scopeSelector) {\n const re = this._makeScopeMatcher(scopeSelector);\n return !re.test(selector);\n }\n _makeScopeMatcher(scopeSelector) {\n const lre = /\\[/g;\n const rre = /\\]/g;\n scopeSelector = scopeSelector.replace(lre, '\\\\[').replace(rre, '\\\\]');\n return new RegExp('^(' + scopeSelector + ')' + _selectorReSuffix, 'm');\n }\n _applySelectorScope(selector, scopeSelector, hostSelector) {\n // Difference from webcomponents.js: scopeSelector could not be an array\n return this._applySimpleSelectorScope(selector, scopeSelector, hostSelector);\n }\n // scope via name and [is=name]\n _applySimpleSelectorScope(selector, scopeSelector, hostSelector) {\n // In Android browser, the lastIndex is not reset when the regex is used in String.replace()\n _polyfillHostRe.lastIndex = 0;\n if (_polyfillHostRe.test(selector)) {\n const replaceBy = this.strictStyling ? `[${hostSelector}]` : scopeSelector;\n return selector\n .replace(_polyfillHostNoCombinatorRe, (hnc, selector) => {\n return selector.replace(/([^:]*)(:*)(.*)/, (_, before, colon, after) => {\n return before + replaceBy + colon + after;\n });\n })\n .replace(_polyfillHostRe, replaceBy + ' ');\n }\n return scopeSelector + ' ' + selector;\n }\n // return a selector with [name] suffix on each simple selector\n // e.g. .foo.bar > .zot becomes .foo[name].bar[name] > .zot[name] /** @internal */\n _applyStrictSelectorScope(selector, scopeSelector, hostSelector) {\n const isRe = /\\[is=([^\\]]*)\\]/g;\n scopeSelector = scopeSelector.replace(isRe, (_, ...parts) => parts[0]);\n const attrName = '[' + scopeSelector + ']';\n const _scopeSelectorPart = (p) => {\n let scopedP = p.trim();\n if (!scopedP) {\n return '';\n }\n if (p.indexOf(_polyfillHostNoCombinator) > -1) {\n scopedP = this._applySimpleSelectorScope(p, scopeSelector, hostSelector);\n }\n else {\n // remove :host since it should be unnecessary\n const t = p.replace(_polyfillHostRe, '');\n if (t.length > 0) {\n const matches = t.match(/([^:]*)(:*)(.*)/);\n if (matches) {\n scopedP = matches[1] + attrName + matches[2] + matches[3];\n }\n }\n }\n return scopedP;\n };\n const safeContent = new SafeSelector(selector);\n selector = safeContent.content();\n let scopedSelector = '';\n let startIndex = 0;\n let res;\n const sep = /( |>|\\+|~(?!=))\\s*/g;\n // If a selector appears before :host it should not be shimmed as it\n // matches on ancestor elements and not on elements in the host's shadow\n // `:host-context(div)` is transformed to\n // `-shadowcsshost-no-combinatordiv, div -shadowcsshost-no-combinator`\n // the `div` is not part of the component in the 2nd selectors and should not be scoped.\n // Historically `component-tag:host` was matching the component so we also want to preserve\n // this behavior to avoid breaking legacy apps (it should not match).\n // The behavior should be:\n // - `tag:host` -> `tag[h]` (this is to avoid breaking legacy apps, should not match anything)\n // - `tag :host` -> `tag [h]` (`tag` is not scoped because it's considered part of a\n // `:host-context(tag)`)\n const hasHost = selector.indexOf(_polyfillHostNoCombinator) > -1;\n // Only scope parts after the first `-shadowcsshost-no-combinator` when it is present\n let shouldScope = !hasHost;\n while ((res = sep.exec(selector)) !== null) {\n const separator = res[1];\n const part = selector.slice(startIndex, res.index).trim();\n shouldScope = shouldScope || part.indexOf(_polyfillHostNoCombinator) > -1;\n const scopedPart = shouldScope ? _scopeSelectorPart(part) : part;\n scopedSelector += `${scopedPart} ${separator} `;\n startIndex = sep.lastIndex;\n }\n const part = selector.substring(startIndex);\n shouldScope = shouldScope || part.indexOf(_polyfillHostNoCombinator) > -1;\n scopedSelector += shouldScope ? _scopeSelectorPart(part) : part;\n // replace the placeholders with their original values\n return safeContent.restore(scopedSelector);\n }\n _insertPolyfillHostInCssText(selector) {\n return selector.replace(_colonHostContextRe, _polyfillHostContext)\n .replace(_colonHostRe, _polyfillHost);\n }\n}\nclass SafeSelector {\n constructor(selector) {\n this.placeholders = [];\n this.index = 0;\n // Replaces attribute selectors with placeholders.\n // The WS in [attr=\"va lue\"] would otherwise be interpreted as a selector separator.\n selector = this._escapeRegexMatches(selector, /(\\[[^\\]]*\\])/g);\n // CSS allows for certain special characters to be used in selectors if they're escaped.\n // E.g. `.foo:blue` won't match a class called `foo:blue`, because the colon denotes a\n // pseudo-class, but writing `.foo\\:blue` will match, because the colon was escaped.\n // Replace all escape sequences (`\\` followed by a character) with a placeholder so\n // that our handling of pseudo-selectors doesn't mess with them.\n selector = this._escapeRegexMatches(selector, /(\\\\.)/g);\n // Replaces the expression in `:nth-child(2n + 1)` with a placeholder.\n // WS and \"+\" would otherwise be interpreted as selector separators.\n this._content = selector.replace(/(:nth-[-\\w]+)(\\([^)]+\\))/g, (_, pseudo, exp) => {\n const replaceBy = `__ph-${this.index}__`;\n this.placeholders.push(exp);\n this.index++;\n return pseudo + replaceBy;\n });\n }\n restore(content) {\n return content.replace(/__ph-(\\d+)__/g, (_ph, index) => this.placeholders[+index]);\n }\n content() {\n return this._content;\n }\n /**\n * Replaces all of the substrings that match a regex within a\n * special string (e.g. `__ph-0__`, `__ph-1__`, etc).\n */\n _escapeRegexMatches(content, pattern) {\n return content.replace(pattern, (_, keep) => {\n const replaceBy = `__ph-${this.index}__`;\n this.placeholders.push(keep);\n this.index++;\n return replaceBy;\n });\n }\n}\nconst _cssContentNextSelectorRe = /polyfill-next-selector[^}]*content:[\\s]*?(['\"])(.*?)\\1[;\\s]*}([^{]*?){/gim;\nconst _cssContentRuleRe = /(polyfill-rule)[^}]*(content:[\\s]*(['\"])(.*?)\\3)[;\\s]*[^}]*}/gim;\nconst _cssContentUnscopedRuleRe = /(polyfill-unscoped-rule)[^}]*(content:[\\s]*(['\"])(.*?)\\3)[;\\s]*[^}]*}/gim;\nconst _polyfillHost = '-shadowcsshost';\n// note: :host-context pre-processed to -shadowcsshostcontext.\nconst _polyfillHostContext = '-shadowcsscontext';\nconst _parenSuffix = '(?:\\\\((' +\n '(?:\\\\([^)(]*\\\\)|[^)(]*)+?' +\n ')\\\\))?([^,{]*)';\nconst _cssColonHostRe = new RegExp(_polyfillHost + _parenSuffix, 'gim');\nconst _cssColonHostContextReGlobal = new RegExp(_polyfillHostContext + _parenSuffix, 'gim');\nconst _cssColonHostContextRe = new RegExp(_polyfillHostContext + _parenSuffix, 'im');\nconst _polyfillHostNoCombinator = _polyfillHost + '-no-combinator';\nconst _polyfillHostNoCombinatorRe = /-shadowcsshost-no-combinator([^\\s]*)/;\nconst _shadowDOMSelectorsRe = [\n /::shadow/g,\n /::content/g,\n // Deprecated selectors\n /\\/shadow-deep\\//g,\n /\\/shadow\\//g,\n];\n// The deep combinator is deprecated in the CSS spec\n// Support for `>>>`, `deep`, `::ng-deep` is then also deprecated and will be removed in the future.\n// see https://github.com/angular/angular/pull/17677\nconst _shadowDeepSelectors = /(?:>>>)|(?:\\/deep\\/)|(?:::ng-deep)/g;\nconst _selectorReSuffix = '([>\\\\s~+[.,{:][\\\\s\\\\S]*)?$';\nconst _polyfillHostRe = /-shadowcsshost/gim;\nconst _colonHostRe = /:host/gim;\nconst _colonHostContextRe = /:host-context/gim;\nconst _commentRe = /\\/\\*[\\s\\S]*?\\*\\//g;\nfunction stripComments(input) {\n return input.replace(_commentRe, '');\n}\nconst _commentWithHashRe = /\\/\\*\\s*#\\s*source(Mapping)?URL=[\\s\\S]+?\\*\\//g;\nfunction extractCommentsWithHash(input) {\n return input.match(_commentWithHashRe) || [];\n}\nconst BLOCK_PLACEHOLDER = '%BLOCK%';\nconst QUOTE_PLACEHOLDER = '%QUOTED%';\nconst _ruleRe = /(\\s*)([^;\\{\\}]+?)(\\s*)((?:{%BLOCK%}?\\s*;?)|(?:\\s*;))/g;\nconst _quotedRe = /%QUOTED%/g;\nconst CONTENT_PAIRS = new Map([['{', '}']]);\nconst QUOTE_PAIRS = new Map([[`\"`, `\"`], [`'`, `'`]]);\nclass CssRule {\n constructor(selector, content) {\n this.selector = selector;\n this.content = content;\n }\n}\nfunction processRules(input, ruleCallback) {\n const inputWithEscapedQuotes = escapeBlocks(input, QUOTE_PAIRS, QUOTE_PLACEHOLDER);\n const inputWithEscapedBlocks = escapeBlocks(inputWithEscapedQuotes.escapedString, CONTENT_PAIRS, BLOCK_PLACEHOLDER);\n let nextBlockIndex = 0;\n let nextQuoteIndex = 0;\n return inputWithEscapedBlocks.escapedString\n .replace(_ruleRe, (...m) => {\n const selector = m[2];\n let content = '';\n let suffix = m[4];\n let contentPrefix = '';\n if (suffix && suffix.startsWith('{' + BLOCK_PLACEHOLDER)) {\n content = inputWithEscapedBlocks.blocks[nextBlockIndex++];\n suffix = suffix.substring(BLOCK_PLACEHOLDER.length + 1);\n contentPrefix = '{';\n }\n const rule = ruleCallback(new CssRule(selector, content));\n return `${m[1]}${rule.selector}${m[3]}${contentPrefix}${rule.content}${suffix}`;\n })\n .replace(_quotedRe, () => inputWithEscapedQuotes.blocks[nextQuoteIndex++]);\n}\nclass StringWithEscapedBlocks {\n constructor(escapedString, blocks) {\n this.escapedString = escapedString;\n this.blocks = blocks;\n }\n}\nfunction escapeBlocks(input, charPairs, placeholder) {\n const resultParts = [];\n const escapedBlocks = [];\n let openCharCount = 0;\n let nonBlockStartIndex = 0;\n let blockStartIndex = -1;\n let openChar;\n let closeChar;\n for (let i = 0; i < input.length; i++) {\n const char = input[i];\n if (char === '\\\\') {\n i++;\n }\n else if (char === closeChar) {\n openCharCount--;\n if (openCharCount === 0) {\n escapedBlocks.push(input.substring(blockStartIndex, i));\n resultParts.push(placeholder);\n nonBlockStartIndex = i;\n blockStartIndex = -1;\n openChar = closeChar = undefined;\n }\n }\n else if (char === openChar) {\n openCharCount++;\n }\n else if (openCharCount === 0 && charPairs.has(char)) {\n openChar = char;\n closeChar = charPairs.get(char);\n openCharCount = 1;\n blockStartIndex = i + 1;\n resultParts.push(input.substring(nonBlockStartIndex, blockStartIndex));\n }\n }\n if (blockStartIndex !== -1) {\n escapedBlocks.push(input.substring(blockStartIndex));\n resultParts.push(placeholder);\n }\n else {\n resultParts.push(input.substring(nonBlockStartIndex));\n }\n return new StringWithEscapedBlocks(resultParts.join(''), escapedBlocks);\n}\n/**\n * Combine the `contextSelectors` with the `hostMarker` and the `otherSelectors`\n * to create a selector that matches the same as `:host-context()`.\n *\n * Given a single context selector `A` we need to output selectors that match on the host and as an\n * ancestor of the host:\n *\n * ```\n * A <hostMarker>, A<hostMarker> {}\n * ```\n *\n * When there is more than one context selector we also have to create combinations of those\n * selectors with each other. For example if there are `A` and `B` selectors the output is:\n *\n * ```\n * AB<hostMarker>, AB <hostMarker>, A B<hostMarker>,\n * B A<hostMarker>, A B <hostMarker>, B A <hostMarker> {}\n * ```\n *\n * And so on...\n *\n * @param hostMarker the string that selects the host element.\n * @param contextSelectors an array of context selectors that will be combined.\n * @param otherSelectors the rest of the selectors that are not context selectors.\n */\nfunction combineHostContextSelectors(contextSelectors, otherSelectors) {\n const hostMarker = _polyfillHostNoCombinator;\n _polyfillHostRe.lastIndex = 0; // reset the regex to ensure we get an accurate test\n const otherSelectorsHasHost = _polyfillHostRe.test(otherSelectors);\n // If there are no context selectors then just output a host marker\n if (contextSelectors.length === 0) {\n return hostMarker + otherSelectors;\n }\n const combined = [contextSelectors.pop() || ''];\n while (contextSelectors.length > 0) {\n const length = combined.length;\n const contextSelector = contextSelectors.pop();\n for (let i = 0; i < length; i++) {\n const previousSelectors = combined[i];\n // Add the new selector as a descendant of the previous selectors\n combined[length * 2 + i] = previousSelectors + ' ' + contextSelector;\n // Add the new selector as an ancestor of the previous selectors\n combined[length + i] = contextSelector + ' ' + previousSelectors;\n // Add the new selector to act on the same element as the previous selectors\n combined[i] = contextSelector + previousSelectors;\n }\n }\n // Finally connect the selector to the `hostMarker`s: either acting directly on the host\n // (A<hostMarker>) or as an ancestor (A <hostMarker>).\n return combined\n .map(s => otherSelectorsHasHost ?\n `${s}${otherSelectors}` :\n `${s}${hostMarker}${otherSelectors}, ${s} ${hostMarker}${otherSelectors}`)\n .join(',');\n}\n/**\n * Mutate the given `groups` array so that there are `multiples` clones of the original array\n * stored.\n *\n * For example `repeatGroups([a, b], 3)` will result in `[a, b, a, b, a, b]` - but importantly the\n * newly added groups will be clones of the original.\n *\n * @param groups An array of groups of strings that will be repeated. This array is mutated\n * in-place.\n * @param multiples The number of times the current groups should appear.\n */\nfunction repeatGroups(groups, multiples) {\n const length = groups.length;\n for (let i = 1; i < multiples; i++) {\n for (let j = 0; j < length; j++) {\n groups[j + (i * length)] = groups[j].slice(0);\n }\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Parses string representation of a style and converts it into object literal.\n *\n * @param value string representation of style as used in the `style` attribute in HTML.\n * Example: `color: red; height: auto`.\n * @returns An array of style property name and value pairs, e.g. `['color', 'red', 'height',\n * 'auto']`\n */\nfunction parse(value) {\n // we use a string array here instead of a string map\n // because a string-map is not guaranteed to retain the\n // order of the entries whereas a string array can be\n // constructed in a [key, value, key, value] format.\n const styles = [];\n let i = 0;\n let parenDepth = 0;\n let quote = 0 /* Char.QuoteNone */;\n let valueStart = 0;\n let propStart = 0;\n let currentProp = null;\n let valueHasQuotes = false;\n while (i < value.length) {\n const token = value.charCodeAt(i++);\n switch (token) {\n case 40 /* Char.OpenParen */:\n parenDepth++;\n break;\n case 41 /* Char.CloseParen */:\n parenDepth--;\n break;\n case 39 /* Char.QuoteSingle */:\n // valueStart needs to be there since prop values don't\n // have quotes in CSS\n valueHasQuotes = valueHasQuotes || valueStart > 0;\n if (quote === 0 /* Char.QuoteNone */) {\n quote = 39 /* Char.QuoteSingle */;\n }\n else if (quote === 39 /* Char.QuoteSingle */ && value.charCodeAt(i - 1) !== 92 /* Char.BackSlash */) {\n quote = 0 /* Char.QuoteNone */;\n }\n break;\n case 34 /* Char.QuoteDouble */:\n // same logic as above\n valueHasQuotes = valueHasQuotes || valueStart > 0;\n if (quote === 0 /* Char.QuoteNone */) {\n quote = 34 /* Char.QuoteDouble */;\n }\n else if (quote === 34 /* Char.QuoteDouble */ && value.charCodeAt(i - 1) !== 92 /* Char.BackSlash */) {\n quote = 0 /* Char.QuoteNone */;\n }\n break;\n case 58 /* Char.Colon */:\n if (!currentProp && parenDepth === 0 && quote === 0 /* Char.QuoteNone */) {\n currentProp = hyphenate(value.substring(propStart, i - 1).trim());\n valueStart = i;\n }\n break;\n case 59 /* Char.Semicolon */:\n if (currentProp && valueStart > 0 && parenDepth === 0 && quote === 0 /* Char.QuoteNone */) {\n const styleVal = value.substring(valueStart, i - 1).trim();\n styles.push(currentProp, valueHasQuotes ? stripUnnecessaryQuotes(styleVal) : styleVal);\n propStart = i;\n valueStart = 0;\n currentProp = null;\n valueHasQuotes = false;\n }\n break;\n }\n }\n if (currentProp && valueStart) {\n const styleVal = value.slice(valueStart).trim();\n styles.push(currentProp, valueHasQuotes ? stripUnnecessaryQuotes(styleVal) : styleVal);\n }\n return styles;\n}\nfunction stripUnnecessaryQuotes(value) {\n const qS = value.charCodeAt(0);\n const qE = value.charCodeAt(value.length - 1);\n if (qS == qE && (qS == 39 /* Char.QuoteSingle */ || qS == 34 /* Char.QuoteDouble */)) {\n const tempValue = value.substring(1, value.length - 1);\n // special case to avoid using a multi-quoted string that was just chomped\n // (e.g. `font-family: \"Verdana\", \"sans-serif\"`)\n if (tempValue.indexOf('\\'') == -1 && tempValue.indexOf('\"') == -1) {\n value = tempValue;\n }\n }\n return value;\n}\nfunction hyphenate(value) {\n return value\n .replace(/[a-z][A-Z]/g, v => {\n return v.charAt(0) + '-' + v.charAt(1);\n })\n .toLowerCase();\n}\n\nconst IMPORTANT_FLAG = '!important';\n/**\n * Minimum amount of binding slots required in the runtime for style/class bindings.\n *\n * Styling in Angular uses up two slots in the runtime LView/TData data structures to\n * record binding data, property information and metadata.\n *\n * When a binding is registered it will place the following information in the `LView`:\n *\n * slot 1) binding value\n * slot 2) cached value (all other values collected before it in string form)\n *\n * When a binding is registered it will place the following information in the `TData`:\n *\n * slot 1) prop name\n * slot 2) binding index that points to the previous style/class binding (and some extra config\n * values)\n *\n * Let's imagine we have a binding that looks like so:\n *\n * ```\n * <div [style.width]=\"x\" [style.height]=\"y\">\n * ```\n *\n * Our `LView` and `TData` data-structures look like so:\n *\n * ```typescript\n * LView = [\n * // ...\n * x, // value of x\n * \"width: x\",\n *\n * y, // value of y\n * \"width: x; height: y\",\n * // ...\n * ];\n *\n * TData = [\n * // ...\n * \"width\", // binding slot 20\n * 0,\n *\n * \"height\",\n * 20,\n * // ...\n * ];\n * ```\n *\n * */\nconst MIN_STYLING_BINDING_SLOTS_REQUIRED = 2;\n/**\n * Produces creation/update instructions for all styling bindings (class and style)\n *\n * It also produces the creation instruction to register all initial styling values\n * (which are all the static class=\"...\" and style=\"...\" attribute values that exist\n * on an element within a template).\n *\n * The builder class below handles producing instructions for the following cases:\n *\n * - Static style/class attributes (style=\"...\" and class=\"...\")\n * - Dynamic style/class map bindings ([style]=\"map\" and [class]=\"map|string\")\n * - Dynamic style/class property bindings ([style.prop]=\"exp\" and [class.name]=\"exp\")\n *\n * Due to the complex relationship of all of these cases, the instructions generated\n * for these attributes/properties/bindings must be done so in the correct order. The\n * order which these must be generated is as follows:\n *\n * if (createMode) {\n * styling(...)\n * }\n * if (updateMode) {\n * styleMap(...)\n * classMap(...)\n * styleProp(...)\n * classProp(...)\n * }\n *\n * The creation/update methods within the builder class produce these instructions.\n */\nclass StylingBuilder {\n constructor(_directiveExpr) {\n this._directiveExpr = _directiveExpr;\n /** Whether or not there are any static styling values present */\n this._hasInitialValues = false;\n /**\n * Whether or not there are any styling bindings present\n * (i.e. `[style]`, `[class]`, `[style.prop]` or `[class.name]`)\n */\n this.hasBindings = false;\n this.hasBindingsWithPipes = false;\n /** the input for [class] (if it exists) */\n this._classMapInput = null;\n /** the input for [style] (if it exists) */\n this._styleMapInput = null;\n /** an array of each [style.prop] input */\n this._singleStyleInputs = null;\n /** an array of each [class.name] input */\n this._singleClassInputs = null;\n this._lastStylingInput = null;\n this._firstStylingInput = null;\n // maps are used instead of hash maps because a Map will\n // retain the ordering of the keys\n /**\n * Represents the location of each style binding in the template\n * (e.g. `<div [style.width]=\"w\" [style.height]=\"h\">` implies\n * that `width=0` and `height=1`)\n */\n this._stylesIndex = new Map();\n /**\n * Represents the location of each class binding in the template\n * (e.g. `<div [class.big]=\"b\" [class.hidden]=\"h\">` implies\n * that `big=0` and `hidden=1`)\n */\n this._classesIndex = new Map();\n this._initialStyleValues = [];\n this._initialClassValues = [];\n }\n /**\n * Registers a given input to the styling builder to be later used when producing AOT code.\n *\n * The code below will only accept the input if it is somehow tied to styling (whether it be\n * style/class bindings or static style/class attributes).\n */\n registerBoundInput(input) {\n // [attr.style] or [attr.class] are skipped in the code below,\n // they should not be treated as styling-based bindings since\n // they are intended to be written directly to the attr and\n // will therefore skip all style/class resolution that is present\n // with style=\"\", [style]=\"\" and [style.prop]=\"\", class=\"\",\n // [class.prop]=\"\". [class]=\"\" assignments\n let binding = null;\n let name = input.name;\n switch (input.type) {\n case 0 /* BindingType.Property */:\n binding = this.registerInputBasedOnName(name, input.value, input.sourceSpan);\n break;\n case 3 /* BindingType.Style */:\n binding = this.registerStyleInput(name, false, input.value, input.sourceSpan, input.unit);\n break;\n case 2 /* BindingType.Class */:\n binding = this.registerClassInput(name, false, input.value, input.sourceSpan);\n break;\n }\n return binding ? true : false;\n }\n registerInputBasedOnName(name, expression, sourceSpan) {\n let binding = null;\n const prefix = name.substring(0, 6);\n const isStyle = name === 'style' || prefix === 'style.' || prefix === 'style!';\n const isClass = !isStyle && (name === 'class' || prefix === 'class.' || prefix === 'class!');\n if (isStyle || isClass) {\n const isMapBased = name.charAt(5) !== '.'; // style.prop or class.prop makes this a no\n const property = name.slice(isMapBased ? 5 : 6); // the dot explains why there's a +1\n if (isStyle) {\n binding = this.registerStyleInput(property, isMapBased, expression, sourceSpan);\n }\n else {\n binding = this.registerClassInput(property, isMapBased, expression, sourceSpan);\n }\n }\n return binding;\n }\n registerStyleInput(name, isMapBased, value, sourceSpan, suffix) {\n if (isEmptyExpression(value)) {\n return null;\n }\n // CSS custom properties are case-sensitive so we shouldn't normalize them.\n // See: https://www.w3.org/TR/css-variables-1/#defining-variables\n if (!isCssCustomProperty(name)) {\n name = hyphenate(name);\n }\n const { property, hasOverrideFlag, suffix: bindingSuffix } = parseProperty(name);\n suffix = typeof suffix === 'string' && suffix.length !== 0 ? suffix : bindingSuffix;\n const entry = { name: property, suffix: suffix, value, sourceSpan, hasOverrideFlag };\n if (isMapBased) {\n this._styleMapInput = entry;\n }\n else {\n (this._singleStyleInputs = this._singleStyleInputs || []).push(entry);\n registerIntoMap(this._stylesIndex, property);\n }\n this._lastStylingInput = entry;\n this._firstStylingInput = this._firstStylingInput || entry;\n this._checkForPipes(value);\n this.hasBindings = true;\n return entry;\n }\n registerClassInput(name, isMapBased, value, sourceSpan) {\n if (isEmptyExpression(value)) {\n return null;\n }\n const { property, hasOverrideFlag } = parseProperty(name);\n const entry = { name: property, value, sourceSpan, hasOverrideFlag, suffix: null };\n if (isMapBased) {\n this._classMapInput = entry;\n }\n else {\n (this._singleClassInputs = this._singleClassInputs || []).push(entry);\n registerIntoMap(this._classesIndex, property);\n }\n this._lastStylingInput = entry;\n this._firstStylingInput = this._firstStylingInput || entry;\n this._checkForPipes(value);\n this.hasBindings = true;\n return entry;\n }\n _checkForPipes(value) {\n if ((value instanceof ASTWithSource) && (value.ast instanceof BindingPipe)) {\n this.hasBindingsWithPipes = true;\n }\n }\n /**\n * Registers the element's static style string value to the builder.\n *\n * @param value the style string (e.g. `width:100px; height:200px;`)\n */\n registerStyleAttr(value) {\n this._initialStyleValues = parse(value);\n this._hasInitialValues = true;\n }\n /**\n * Registers the element's static class string value to the builder.\n *\n * @param value the className string (e.g. `disabled gold zoom`)\n */\n registerClassAttr(value) {\n this._initialClassValues = value.trim().split(/\\s+/g);\n this._hasInitialValues = true;\n }\n /**\n * Appends all styling-related expressions to the provided attrs array.\n *\n * @param attrs an existing array where each of the styling expressions\n * will be inserted into.\n */\n populateInitialStylingAttrs(attrs) {\n // [CLASS_MARKER, 'foo', 'bar', 'baz' ...]\n if (this._initialClassValues.length) {\n attrs.push(literal(1 /* AttributeMarker.Classes */));\n for (let i = 0; i < this._initialClassValues.length; i++) {\n attrs.push(literal(this._initialClassValues[i]));\n }\n }\n // [STYLE_MARKER, 'width', '200px', 'height', '100px', ...]\n if (this._initialStyleValues.length) {\n attrs.push(literal(2 /* AttributeMarker.Styles */));\n for (let i = 0; i < this._initialStyleValues.length; i += 2) {\n attrs.push(literal(this._initialStyleValues[i]), literal(this._initialStyleValues[i + 1]));\n }\n }\n }\n /**\n * Builds an instruction with all the expressions and parameters for `elementHostAttrs`.\n *\n * The instruction generation code below is used for producing the AOT statement code which is\n * responsible for registering initial styles (within a directive hostBindings' creation block),\n * as well as any of the provided attribute values, to the directive host element.\n */\n assignHostAttrs(attrs, definitionMap) {\n if (this._directiveExpr && (attrs.length || this._hasInitialValues)) {\n this.populateInitialStylingAttrs(attrs);\n definitionMap.set('hostAttrs', literalArr(attrs));\n }\n }\n /**\n * Builds an instruction with all the expressions and parameters for `classMap`.\n *\n * The instruction data will contain all expressions for `classMap` to function\n * which includes the `[class]` expression params.\n */\n buildClassMapInstruction(valueConverter) {\n if (this._classMapInput) {\n return this._buildMapBasedInstruction(valueConverter, true, this._classMapInput);\n }\n return null;\n }\n /**\n * Builds an instruction with all the expressions and parameters for `styleMap`.\n *\n * The instruction data will contain all expressions for `styleMap` to function\n * which includes the `[style]` expression params.\n */\n buildStyleMapInstruction(valueConverter) {\n if (this._styleMapInput) {\n return this._buildMapBasedInstruction(valueConverter, false, this._styleMapInput);\n }\n return null;\n }\n _buildMapBasedInstruction(valueConverter, isClassBased, stylingInput) {\n // each styling binding value is stored in the LView\n // map-based bindings allocate two slots: one for the\n // previous binding value and another for the previous\n // className or style attribute value.\n let totalBindingSlotsRequired = MIN_STYLING_BINDING_SLOTS_REQUIRED;\n // these values must be outside of the update block so that they can\n // be evaluated (the AST visit call) during creation time so that any\n // pipes can be picked up in time before the template is built\n const mapValue = stylingInput.value.visit(valueConverter);\n let reference;\n if (mapValue instanceof Interpolation) {\n totalBindingSlotsRequired += mapValue.expressions.length;\n reference = isClassBased ? getClassMapInterpolationExpression(mapValue) :\n getStyleMapInterpolationExpression(mapValue);\n }\n else {\n reference = isClassBased ? Identifiers.classMap : Identifiers.styleMap;\n }\n return {\n reference,\n calls: [{\n supportsInterpolation: true,\n sourceSpan: stylingInput.sourceSpan,\n allocateBindingSlots: totalBindingSlotsRequired,\n params: (convertFn) => {\n const convertResult = convertFn(mapValue);\n const params = Array.isArray(convertResult) ? convertResult : [convertResult];\n return params;\n }\n }]\n };\n }\n _buildSingleInputs(reference, inputs, valueConverter, getInterpolationExpressionFn, isClassBased) {\n const instructions = [];\n inputs.forEach(input => {\n const previousInstruction = instructions[instructions.length - 1];\n const value = input.value.visit(valueConverter);\n let referenceForCall = reference;\n // each styling binding value is stored in the LView\n // but there are two values stored for each binding:\n // 1) the value itself\n // 2) an intermediate value (concatenation of style up to this point).\n // We need to store the intermediate value so that we don't allocate\n // the strings on each CD.\n let totalBindingSlotsRequired = MIN_STYLING_BINDING_SLOTS_REQUIRED;\n if (value instanceof Interpolation) {\n totalBindingSlotsRequired += value.expressions.length;\n if (getInterpolationExpressionFn) {\n referenceForCall = getInterpolationExpressionFn(value);\n }\n }\n const call = {\n sourceSpan: input.sourceSpan,\n allocateBindingSlots: totalBindingSlotsRequired,\n supportsInterpolation: !!getInterpolationExpressionFn,\n params: (convertFn) => {\n // params => stylingProp(propName, value, suffix)\n const params = [];\n params.push(literal(input.name));\n const convertResult = convertFn(value);\n if (Array.isArray(convertResult)) {\n params.push(...convertResult);\n }\n else {\n params.push(convertResult);\n }\n // [style.prop] bindings may use suffix values (e.g. px, em, etc...), therefore,\n // if that is detected then we need to pass that in as an optional param.\n if (!isClassBased && input.suffix !== null) {\n params.push(literal(input.suffix));\n }\n return params;\n }\n };\n // If we ended up generating a call to the same instruction as the previous styling property\n // we can chain the calls together safely to save some bytes, otherwise we have to generate\n // a separate instruction call. This is primarily a concern with interpolation instructions\n // where we may start off with one `reference`, but end up using another based on the\n // number of interpolations.\n if (previousInstruction && previousInstruction.reference === referenceForCall) {\n previousInstruction.calls.push(call);\n }\n else {\n instructions.push({ reference: referenceForCall, calls: [call] });\n }\n });\n return instructions;\n }\n _buildClassInputs(valueConverter) {\n if (this._singleClassInputs) {\n return this._buildSingleInputs(Identifiers.classProp, this._singleClassInputs, valueConverter, null, true);\n }\n return [];\n }\n _buildStyleInputs(valueConverter) {\n if (this._singleStyleInputs) {\n return this._buildSingleInputs(Identifiers.styleProp, this._singleStyleInputs, valueConverter, getStylePropInterpolationExpression, false);\n }\n return [];\n }\n /**\n * Constructs all instructions which contain the expressions that will be placed\n * into the update block of a template function or a directive hostBindings function.\n */\n buildUpdateLevelInstructions(valueConverter) {\n const instructions = [];\n if (this.hasBindings) {\n const styleMapInstruction = this.buildStyleMapInstruction(valueConverter);\n if (styleMapInstruction) {\n instructions.push(styleMapInstruction);\n }\n const classMapInstruction = this.buildClassMapInstruction(valueConverter);\n if (classMapInstruction) {\n instructions.push(classMapInstruction);\n }\n instructions.push(...this._buildStyleInputs(valueConverter));\n instructions.push(...this._buildClassInputs(valueConverter));\n }\n return instructions;\n }\n}\nfunction registerIntoMap(map, key) {\n if (!map.has(key)) {\n map.set(key, map.size);\n }\n}\nfunction parseProperty(name) {\n let hasOverrideFlag = false;\n const overrideIndex = name.indexOf(IMPORTANT_FLAG);\n if (overrideIndex !== -1) {\n name = overrideIndex > 0 ? name.substring(0, overrideIndex) : '';\n hasOverrideFlag = true;\n }\n let suffix = null;\n let property = name;\n const unitIndex = name.lastIndexOf('.');\n if (unitIndex > 0) {\n suffix = name.slice(unitIndex + 1);\n property = name.substring(0, unitIndex);\n }\n return { property, suffix, hasOverrideFlag };\n}\n/**\n * Gets the instruction to generate for an interpolated class map.\n * @param interpolation An Interpolation AST\n */\nfunction getClassMapInterpolationExpression(interpolation) {\n switch (getInterpolationArgsLength(interpolation)) {\n case 1:\n return Identifiers.classMap;\n case 3:\n return Identifiers.classMapInterpolate1;\n case 5:\n return Identifiers.classMapInterpolate2;\n case 7:\n return Identifiers.classMapInterpolate3;\n case 9:\n return Identifiers.classMapInterpolate4;\n case 11:\n return Identifiers.classMapInterpolate5;\n case 13:\n return Identifiers.classMapInterpolate6;\n case 15:\n return Identifiers.classMapInterpolate7;\n case 17:\n return Identifiers.classMapInterpolate8;\n default:\n return Identifiers.classMapInterpolateV;\n }\n}\n/**\n * Gets the instruction to generate for an interpolated style map.\n * @param interpolation An Interpolation AST\n */\nfunction getStyleMapInterpolationExpression(interpolation) {\n switch (getInterpolationArgsLength(interpolation)) {\n case 1:\n return Identifiers.styleMap;\n case 3:\n return Identifiers.styleMapInterpolate1;\n case 5:\n return Identifiers.styleMapInterpolate2;\n case 7:\n return Identifiers.styleMapInterpolate3;\n case 9:\n return Identifiers.styleMapInterpolate4;\n case 11:\n return Identifiers.styleMapInterpolate5;\n case 13:\n return Identifiers.styleMapInterpolate6;\n case 15:\n return Identifiers.styleMapInterpolate7;\n case 17:\n return Identifiers.styleMapInterpolate8;\n default:\n return Identifiers.styleMapInterpolateV;\n }\n}\n/**\n * Gets the instruction to generate for an interpolated style prop.\n * @param interpolation An Interpolation AST\n */\nfunction getStylePropInterpolationExpression(interpolation) {\n switch (getInterpolationArgsLength(interpolation)) {\n case 1:\n return Identifiers.styleProp;\n case 3:\n return Identifiers.stylePropInterpolate1;\n case 5:\n return Identifiers.stylePropInterpolate2;\n case 7:\n return Identifiers.stylePropInterpolate3;\n case 9:\n return Identifiers.stylePropInterpolate4;\n case 11:\n return Identifiers.stylePropInterpolate5;\n case 13:\n return Identifiers.stylePropInterpolate6;\n case 15:\n return Identifiers.stylePropInterpolate7;\n case 17:\n return Identifiers.stylePropInterpolate8;\n default:\n return Identifiers.stylePropInterpolateV;\n }\n}\n/**\n * Checks whether property name is a custom CSS property.\n * See: https://www.w3.org/TR/css-variables-1\n */\nfunction isCssCustomProperty(name) {\n return name.startsWith('--');\n}\nfunction isEmptyExpression(ast) {\n if (ast instanceof ASTWithSource) {\n ast = ast.ast;\n }\n return ast instanceof EmptyExpr;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar TokenType;\n(function (TokenType) {\n TokenType[TokenType[\"Character\"] = 0] = \"Character\";\n TokenType[TokenType[\"Identifier\"] = 1] = \"Identifier\";\n TokenType[TokenType[\"PrivateIdentifier\"] = 2] = \"PrivateIdentifier\";\n TokenType[TokenType[\"Keyword\"] = 3] = \"Keyword\";\n TokenType[TokenType[\"String\"] = 4] = \"String\";\n TokenType[TokenType[\"Operator\"] = 5] = \"Operator\";\n TokenType[TokenType[\"Number\"] = 6] = \"Number\";\n TokenType[TokenType[\"Error\"] = 7] = \"Error\";\n})(TokenType || (TokenType = {}));\nconst KEYWORDS = ['var', 'let', 'as', 'null', 'undefined', 'true', 'false', 'if', 'else', 'this'];\nclass Lexer {\n tokenize(text) {\n const scanner = new _Scanner(text);\n const tokens = [];\n let token = scanner.scanToken();\n while (token != null) {\n tokens.push(token);\n token = scanner.scanToken();\n }\n return tokens;\n }\n}\nclass Token {\n constructor(index, end, type, numValue, strValue) {\n this.index = index;\n this.end = end;\n this.type = type;\n this.numValue = numValue;\n this.strValue = strValue;\n }\n isCharacter(code) {\n return this.type == TokenType.Character && this.numValue == code;\n }\n isNumber() {\n return this.type == TokenType.Number;\n }\n isString() {\n return this.type == TokenType.String;\n }\n isOperator(operator) {\n return this.type == TokenType.Operator && this.strValue == operator;\n }\n isIdentifier() {\n return this.type == TokenType.Identifier;\n }\n isPrivateIdentifier() {\n return this.type == TokenType.PrivateIdentifier;\n }\n isKeyword() {\n return this.type == TokenType.Keyword;\n }\n isKeywordLet() {\n return this.type == TokenType.Keyword && this.strValue == 'let';\n }\n isKeywordAs() {\n return this.type == TokenType.Keyword && this.strValue == 'as';\n }\n isKeywordNull() {\n return this.type == TokenType.Keyword && this.strValue == 'null';\n }\n isKeywordUndefined() {\n return this.type == TokenType.Keyword && this.strValue == 'undefined';\n }\n isKeywordTrue() {\n return this.type == TokenType.Keyword && this.strValue == 'true';\n }\n isKeywordFalse() {\n return this.type == TokenType.Keyword && this.strValue == 'false';\n }\n isKeywordThis() {\n return this.type == TokenType.Keyword && this.strValue == 'this';\n }\n isError() {\n return this.type == TokenType.Error;\n }\n toNumber() {\n return this.type == TokenType.Number ? this.numValue : -1;\n }\n toString() {\n switch (this.type) {\n case TokenType.Character:\n case TokenType.Identifier:\n case TokenType.Keyword:\n case TokenType.Operator:\n case TokenType.PrivateIdentifier:\n case TokenType.String:\n case TokenType.Error:\n return this.strValue;\n case TokenType.Number:\n return this.numValue.toString();\n default:\n return null;\n }\n }\n}\nfunction newCharacterToken(index, end, code) {\n return new Token(index, end, TokenType.Character, code, String.fromCharCode(code));\n}\nfunction newIdentifierToken(index, end, text) {\n return new Token(index, end, TokenType.Identifier, 0, text);\n}\nfunction newPrivateIdentifierToken(index, end, text) {\n return new Token(index, end, TokenType.PrivateIdentifier, 0, text);\n}\nfunction newKeywordToken(index, end, text) {\n return new Token(index, end, TokenType.Keyword, 0, text);\n}\nfunction newOperatorToken(index, end, text) {\n return new Token(index, end, TokenType.Operator, 0, text);\n}\nfunction newStringToken(index, end, text) {\n return new Token(index, end, TokenType.String, 0, text);\n}\nfunction newNumberToken(index, end, n) {\n return new Token(index, end, TokenType.Number, n, '');\n}\nfunction newErrorToken(index, end, message) {\n return new Token(index, end, TokenType.Error, 0, message);\n}\nconst EOF = new Token(-1, -1, TokenType.Character, 0, '');\nclass _Scanner {\n constructor(input) {\n this.input = input;\n this.peek = 0;\n this.index = -1;\n this.length = input.length;\n this.advance();\n }\n advance() {\n this.peek = ++this.index >= this.length ? $EOF : this.input.charCodeAt(this.index);\n }\n scanToken() {\n const input = this.input, length = this.length;\n let peek = this.peek, index = this.index;\n // Skip whitespace.\n while (peek <= $SPACE) {\n if (++index >= length) {\n peek = $EOF;\n break;\n }\n else {\n peek = input.charCodeAt(index);\n }\n }\n this.peek = peek;\n this.index = index;\n if (index >= length) {\n return null;\n }\n // Handle identifiers and numbers.\n if (isIdentifierStart(peek))\n return this.scanIdentifier();\n if (isDigit(peek))\n return this.scanNumber(index);\n const start = index;\n switch (peek) {\n case $PERIOD:\n this.advance();\n return isDigit(this.peek) ? this.scanNumber(start) :\n newCharacterToken(start, this.index, $PERIOD);\n case $LPAREN:\n case $RPAREN:\n case $LBRACE:\n case $RBRACE:\n case $LBRACKET:\n case $RBRACKET:\n case $COMMA:\n case $COLON:\n case $SEMICOLON:\n return this.scanCharacter(start, peek);\n case $SQ:\n case $DQ:\n return this.scanString();\n case $HASH:\n return this.scanPrivateIdentifier();\n case $PLUS:\n case $MINUS:\n case $STAR:\n case $SLASH:\n case $PERCENT:\n case $CARET:\n return this.scanOperator(start, String.fromCharCode(peek));\n case $QUESTION:\n return this.scanQuestion(start);\n case $LT:\n case $GT:\n return this.scanComplexOperator(start, String.fromCharCode(peek), $EQ, '=');\n case $BANG:\n case $EQ:\n return this.scanComplexOperator(start, String.fromCharCode(peek), $EQ, '=', $EQ, '=');\n case $AMPERSAND:\n return this.scanComplexOperator(start, '&', $AMPERSAND, '&');\n case $BAR:\n return this.scanComplexOperator(start, '|', $BAR, '|');\n case $NBSP:\n while (isWhitespace(this.peek))\n this.advance();\n return this.scanToken();\n }\n this.advance();\n return this.error(`Unexpected character [${String.fromCharCode(peek)}]`, 0);\n }\n scanCharacter(start, code) {\n this.advance();\n return newCharacterToken(start, this.index, code);\n }\n scanOperator(start, str) {\n this.advance();\n return newOperatorToken(start, this.index, str);\n }\n /**\n * Tokenize a 2/3 char long operator\n *\n * @param start start index in the expression\n * @param one first symbol (always part of the operator)\n * @param twoCode code point for the second symbol\n * @param two second symbol (part of the operator when the second code point matches)\n * @param threeCode code point for the third symbol\n * @param three third symbol (part of the operator when provided and matches source expression)\n */\n scanComplexOperator(start, one, twoCode, two, threeCode, three) {\n this.advance();\n let str = one;\n if (this.peek == twoCode) {\n this.advance();\n str += two;\n }\n if (threeCode != null && this.peek == threeCode) {\n this.advance();\n str += three;\n }\n return newOperatorToken(start, this.index, str);\n }\n scanIdentifier() {\n const start = this.index;\n this.advance();\n while (isIdentifierPart(this.peek))\n this.advance();\n const str = this.input.substring(start, this.index);\n return KEYWORDS.indexOf(str) > -1 ? newKeywordToken(start, this.index, str) :\n newIdentifierToken(start, this.index, str);\n }\n /** Scans an ECMAScript private identifier. */\n scanPrivateIdentifier() {\n const start = this.index;\n this.advance();\n if (!isIdentifierStart(this.peek)) {\n return this.error('Invalid character [#]', -1);\n }\n while (isIdentifierPart(this.peek))\n this.advance();\n const identifierName = this.input.substring(start, this.index);\n return newPrivateIdentifierToken(start, this.index, identifierName);\n }\n scanNumber(start) {\n let simple = (this.index === start);\n let hasSeparators = false;\n this.advance(); // Skip initial digit.\n while (true) {\n if (isDigit(this.peek)) {\n // Do nothing.\n }\n else if (this.peek === $_) {\n // Separators are only valid when they're surrounded by digits. E.g. `1_0_1` is\n // valid while `_101` and `101_` are not. The separator can't be next to the decimal\n // point or another separator either. Note that it's unlikely that we'll hit a case where\n // the underscore is at the start, because that's a valid identifier and it will be picked\n // up earlier in the parsing. We validate for it anyway just in case.\n if (!isDigit(this.input.charCodeAt(this.index - 1)) ||\n !isDigit(this.input.charCodeAt(this.index + 1))) {\n return this.error('Invalid numeric separator', 0);\n }\n hasSeparators = true;\n }\n else if (this.peek === $PERIOD) {\n simple = false;\n }\n else if (isExponentStart(this.peek)) {\n this.advance();\n if (isExponentSign(this.peek))\n this.advance();\n if (!isDigit(this.peek))\n return this.error('Invalid exponent', -1);\n simple = false;\n }\n else {\n break;\n }\n this.advance();\n }\n let str = this.input.substring(start, this.index);\n if (hasSeparators) {\n str = str.replace(/_/g, '');\n }\n const value = simple ? parseIntAutoRadix(str) : parseFloat(str);\n return newNumberToken(start, this.index, value);\n }\n scanString() {\n const start = this.index;\n const quote = this.peek;\n this.advance(); // Skip initial quote.\n let buffer = '';\n let marker = this.index;\n const input = this.input;\n while (this.peek != quote) {\n if (this.peek == $BACKSLASH) {\n buffer += input.substring(marker, this.index);\n this.advance();\n let unescapedCode;\n // Workaround for TS2.1-introduced type strictness\n this.peek = this.peek;\n if (this.peek == $u) {\n // 4 character hex code for unicode character.\n const hex = input.substring(this.index + 1, this.index + 5);\n if (/^[0-9a-f]+$/i.test(hex)) {\n unescapedCode = parseInt(hex, 16);\n }\n else {\n return this.error(`Invalid unicode escape [\\\\u${hex}]`, 0);\n }\n for (let i = 0; i < 5; i++) {\n this.advance();\n }\n }\n else {\n unescapedCode = unescape(this.peek);\n this.advance();\n }\n buffer += String.fromCharCode(unescapedCode);\n marker = this.index;\n }\n else if (this.peek == $EOF) {\n return this.error('Unterminated quote', 0);\n }\n else {\n this.advance();\n }\n }\n const last = input.substring(marker, this.index);\n this.advance(); // Skip terminating quote.\n return newStringToken(start, this.index, buffer + last);\n }\n scanQuestion(start) {\n this.advance();\n let str = '?';\n // Either `a ?? b` or 'a?.b'.\n if (this.peek === $QUESTION || this.peek === $PERIOD) {\n str += this.peek === $PERIOD ? '.' : '?';\n this.advance();\n }\n return newOperatorToken(start, this.index, str);\n }\n error(message, offset) {\n const position = this.index + offset;\n return newErrorToken(position, this.index, `Lexer Error: ${message} at column ${position} in expression [${this.input}]`);\n }\n}\nfunction isIdentifierStart(code) {\n return ($a <= code && code <= $z) || ($A <= code && code <= $Z) ||\n (code == $_) || (code == $$);\n}\nfunction isIdentifier(input) {\n if (input.length == 0)\n return false;\n const scanner = new _Scanner(input);\n if (!isIdentifierStart(scanner.peek))\n return false;\n scanner.advance();\n while (scanner.peek !== $EOF) {\n if (!isIdentifierPart(scanner.peek))\n return false;\n scanner.advance();\n }\n return true;\n}\nfunction isIdentifierPart(code) {\n return isAsciiLetter(code) || isDigit(code) || (code == $_) ||\n (code == $$);\n}\nfunction isExponentStart(code) {\n return code == $e || code == $E;\n}\nfunction isExponentSign(code) {\n return code == $MINUS || code == $PLUS;\n}\nfunction unescape(code) {\n switch (code) {\n case $n:\n return $LF;\n case $f:\n return $FF;\n case $r:\n return $CR;\n case $t:\n return $TAB;\n case $v:\n return $VTAB;\n default:\n return code;\n }\n}\nfunction parseIntAutoRadix(text) {\n const result = parseInt(text);\n if (isNaN(result)) {\n throw new Error('Invalid integer literal when parsing ' + text);\n }\n return result;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass SplitInterpolation {\n constructor(strings, expressions, offsets) {\n this.strings = strings;\n this.expressions = expressions;\n this.offsets = offsets;\n }\n}\nclass TemplateBindingParseResult {\n constructor(templateBindings, warnings, errors) {\n this.templateBindings = templateBindings;\n this.warnings = warnings;\n this.errors = errors;\n }\n}\nclass Parser$1 {\n constructor(_lexer) {\n this._lexer = _lexer;\n this.errors = [];\n }\n parseAction(input, isAssignmentEvent, location, absoluteOffset, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {\n this._checkNoInterpolation(input, location, interpolationConfig);\n const sourceToLex = this._stripComments(input);\n const tokens = this._lexer.tokenize(sourceToLex);\n let flags = 1 /* ParseFlags.Action */;\n if (isAssignmentEvent) {\n flags |= 2 /* ParseFlags.AssignmentEvent */;\n }\n const ast = new _ParseAST(input, location, absoluteOffset, tokens, flags, this.errors, 0).parseChain();\n return new ASTWithSource(ast, input, location, absoluteOffset, this.errors);\n }\n parseBinding(input, location, absoluteOffset, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {\n const ast = this._parseBindingAst(input, location, absoluteOffset, interpolationConfig);\n return new ASTWithSource(ast, input, location, absoluteOffset, this.errors);\n }\n checkSimpleExpression(ast) {\n const checker = new SimpleExpressionChecker();\n ast.visit(checker);\n return checker.errors;\n }\n parseSimpleBinding(input, location, absoluteOffset, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {\n const ast = this._parseBindingAst(input, location, absoluteOffset, interpolationConfig);\n const errors = this.checkSimpleExpression(ast);\n if (errors.length > 0) {\n this._reportError(`Host binding expression cannot contain ${errors.join(' ')}`, input, location);\n }\n return new ASTWithSource(ast, input, location, absoluteOffset, this.errors);\n }\n _reportError(message, input, errLocation, ctxLocation) {\n this.errors.push(new ParserError(message, input, errLocation, ctxLocation));\n }\n _parseBindingAst(input, location, absoluteOffset, interpolationConfig) {\n this._checkNoInterpolation(input, location, interpolationConfig);\n const sourceToLex = this._stripComments(input);\n const tokens = this._lexer.tokenize(sourceToLex);\n return new _ParseAST(input, location, absoluteOffset, tokens, 0 /* ParseFlags.None */, this.errors, 0)\n .parseChain();\n }\n /**\n * Parse microsyntax template expression and return a list of bindings or\n * parsing errors in case the given expression is invalid.\n *\n * For example,\n * ```\n * <div *ngFor=\"let item of items\">\n * ^ ^ absoluteValueOffset for `templateValue`\n * absoluteKeyOffset for `templateKey`\n * ```\n * contains three bindings:\n * 1. ngFor -> null\n * 2. item -> NgForOfContext.$implicit\n * 3. ngForOf -> items\n *\n * This is apparent from the de-sugared template:\n * ```\n * <ng-template ngFor let-item [ngForOf]=\"items\">\n * ```\n *\n * @param templateKey name of directive, without the * prefix. For example: ngIf, ngFor\n * @param templateValue RHS of the microsyntax attribute\n * @param templateUrl template filename if it's external, component filename if it's inline\n * @param absoluteKeyOffset start of the `templateKey`\n * @param absoluteValueOffset start of the `templateValue`\n */\n parseTemplateBindings(templateKey, templateValue, templateUrl, absoluteKeyOffset, absoluteValueOffset) {\n const tokens = this._lexer.tokenize(templateValue);\n const parser = new _ParseAST(templateValue, templateUrl, absoluteValueOffset, tokens, 0 /* ParseFlags.None */, this.errors, 0 /* relative offset */);\n return parser.parseTemplateBindings({\n source: templateKey,\n span: new AbsoluteSourceSpan(absoluteKeyOffset, absoluteKeyOffset + templateKey.length),\n });\n }\n parseInterpolation(input, location, absoluteOffset, interpolatedTokens, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {\n const { strings, expressions, offsets } = this.splitInterpolation(input, location, interpolatedTokens, interpolationConfig);\n if (expressions.length === 0)\n return null;\n const expressionNodes = [];\n for (let i = 0; i < expressions.length; ++i) {\n const expressionText = expressions[i].text;\n const sourceToLex = this._stripComments(expressionText);\n const tokens = this._lexer.tokenize(sourceToLex);\n const ast = new _ParseAST(input, location, absoluteOffset, tokens, 0 /* ParseFlags.None */, this.errors, offsets[i])\n .parseChain();\n expressionNodes.push(ast);\n }\n return this.createInterpolationAst(strings.map(s => s.text), expressionNodes, input, location, absoluteOffset);\n }\n /**\n * Similar to `parseInterpolation`, but treats the provided string as a single expression\n * element that would normally appear within the interpolation prefix and suffix (`{{` and `}}`).\n * This is used for parsing the switch expression in ICUs.\n */\n parseInterpolationExpression(expression, location, absoluteOffset) {\n const sourceToLex = this._stripComments(expression);\n const tokens = this._lexer.tokenize(sourceToLex);\n const ast = new _ParseAST(expression, location, absoluteOffset, tokens, 0 /* ParseFlags.None */, this.errors, 0)\n .parseChain();\n const strings = ['', '']; // The prefix and suffix strings are both empty\n return this.createInterpolationAst(strings, [ast], expression, location, absoluteOffset);\n }\n createInterpolationAst(strings, expressions, input, location, absoluteOffset) {\n const span = new ParseSpan(0, input.length);\n const interpolation = new Interpolation(span, span.toAbsolute(absoluteOffset), strings, expressions);\n return new ASTWithSource(interpolation, input, location, absoluteOffset, this.errors);\n }\n /**\n * Splits a string of text into \"raw\" text segments and expressions present in interpolations in\n * the string.\n * Returns `null` if there are no interpolations, otherwise a\n * `SplitInterpolation` with splits that look like\n * <raw text> <expression> <raw text> ... <raw text> <expression> <raw text>\n */\n splitInterpolation(input, location, interpolatedTokens, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {\n const strings = [];\n const expressions = [];\n const offsets = [];\n const inputToTemplateIndexMap = interpolatedTokens ? getIndexMapForOriginalTemplate(interpolatedTokens) : null;\n let i = 0;\n let atInterpolation = false;\n let extendLastString = false;\n let { start: interpStart, end: interpEnd } = interpolationConfig;\n while (i < input.length) {\n if (!atInterpolation) {\n // parse until starting {{\n const start = i;\n i = input.indexOf(interpStart, i);\n if (i === -1) {\n i = input.length;\n }\n const text = input.substring(start, i);\n strings.push({ text, start, end: i });\n atInterpolation = true;\n }\n else {\n // parse from starting {{ to ending }} while ignoring content inside quotes.\n const fullStart = i;\n const exprStart = fullStart + interpStart.length;\n const exprEnd = this._getInterpolationEndIndex(input, interpEnd, exprStart);\n if (exprEnd === -1) {\n // Could not find the end of the interpolation; do not parse an expression.\n // Instead we should extend the content on the last raw string.\n atInterpolation = false;\n extendLastString = true;\n break;\n }\n const fullEnd = exprEnd + interpEnd.length;\n const text = input.substring(exprStart, exprEnd);\n if (text.trim().length === 0) {\n this._reportError('Blank expressions are not allowed in interpolated strings', input, `at column ${i} in`, location);\n }\n expressions.push({ text, start: fullStart, end: fullEnd });\n const startInOriginalTemplate = inputToTemplateIndexMap?.get(fullStart) ?? fullStart;\n const offset = startInOriginalTemplate + interpStart.length;\n offsets.push(offset);\n i = fullEnd;\n atInterpolation = false;\n }\n }\n if (!atInterpolation) {\n // If we are now at a text section, add the remaining content as a raw string.\n if (extendLastString) {\n const piece = strings[strings.length - 1];\n piece.text += input.substring(i);\n piece.end = input.length;\n }\n else {\n strings.push({ text: input.substring(i), start: i, end: input.length });\n }\n }\n return new SplitInterpolation(strings, expressions, offsets);\n }\n wrapLiteralPrimitive(input, location, absoluteOffset) {\n const span = new ParseSpan(0, input == null ? 0 : input.length);\n return new ASTWithSource(new LiteralPrimitive(span, span.toAbsolute(absoluteOffset), input), input, location, absoluteOffset, this.errors);\n }\n _stripComments(input) {\n const i = this._commentStart(input);\n return i != null ? input.substring(0, i) : input;\n }\n _commentStart(input) {\n let outerQuote = null;\n for (let i = 0; i < input.length - 1; i++) {\n const char = input.charCodeAt(i);\n const nextChar = input.charCodeAt(i + 1);\n if (char === $SLASH && nextChar == $SLASH && outerQuote == null)\n return i;\n if (outerQuote === char) {\n outerQuote = null;\n }\n else if (outerQuote == null && isQuote(char)) {\n outerQuote = char;\n }\n }\n return null;\n }\n _checkNoInterpolation(input, location, { start, end }) {\n let startIndex = -1;\n let endIndex = -1;\n for (const charIndex of this._forEachUnquotedChar(input, 0)) {\n if (startIndex === -1) {\n if (input.startsWith(start)) {\n startIndex = charIndex;\n }\n }\n else {\n endIndex = this._getInterpolationEndIndex(input, end, charIndex);\n if (endIndex > -1) {\n break;\n }\n }\n }\n if (startIndex > -1 && endIndex > -1) {\n this._reportError(`Got interpolation (${start}${end}) where expression was expected`, input, `at column ${startIndex} in`, location);\n }\n }\n /**\n * Finds the index of the end of an interpolation expression\n * while ignoring comments and quoted content.\n */\n _getInterpolationEndIndex(input, expressionEnd, start) {\n for (const charIndex of this._forEachUnquotedChar(input, start)) {\n if (input.startsWith(expressionEnd, charIndex)) {\n return charIndex;\n }\n // Nothing else in the expression matters after we've\n // hit a comment so look directly for the end token.\n if (input.startsWith('//', charIndex)) {\n return input.indexOf(expressionEnd, charIndex);\n }\n }\n return -1;\n }\n /**\n * Generator used to iterate over the character indexes of a string that are outside of quotes.\n * @param input String to loop through.\n * @param start Index within the string at which to start.\n */\n *_forEachUnquotedChar(input, start) {\n let currentQuote = null;\n let escapeCount = 0;\n for (let i = start; i < input.length; i++) {\n const char = input[i];\n // Skip the characters inside quotes. Note that we only care about the outer-most\n // quotes matching up and we need to account for escape characters.\n if (isQuote(input.charCodeAt(i)) && (currentQuote === null || currentQuote === char) &&\n escapeCount % 2 === 0) {\n currentQuote = currentQuote === null ? char : null;\n }\n else if (currentQuote === null) {\n yield i;\n }\n escapeCount = char === '\\\\' ? escapeCount + 1 : 0;\n }\n }\n}\n/** Describes a stateful context an expression parser is in. */\nvar ParseContextFlags;\n(function (ParseContextFlags) {\n ParseContextFlags[ParseContextFlags[\"None\"] = 0] = \"None\";\n /**\n * A Writable context is one in which a value may be written to an lvalue.\n * For example, after we see a property access, we may expect a write to the\n * property via the \"=\" operator.\n * prop\n * ^ possible \"=\" after\n */\n ParseContextFlags[ParseContextFlags[\"Writable\"] = 1] = \"Writable\";\n})(ParseContextFlags || (ParseContextFlags = {}));\nclass _ParseAST {\n constructor(input, location, absoluteOffset, tokens, parseFlags, errors, offset) {\n this.input = input;\n this.location = location;\n this.absoluteOffset = absoluteOffset;\n this.tokens = tokens;\n this.parseFlags = parseFlags;\n this.errors = errors;\n this.offset = offset;\n this.rparensExpected = 0;\n this.rbracketsExpected = 0;\n this.rbracesExpected = 0;\n this.context = ParseContextFlags.None;\n // Cache of expression start and input indeces to the absolute source span they map to, used to\n // prevent creating superfluous source spans in `sourceSpan`.\n // A serial of the expression start and input index is used for mapping because both are stateful\n // and may change for subsequent expressions visited by the parser.\n this.sourceSpanCache = new Map();\n this.index = 0;\n }\n peek(offset) {\n const i = this.index + offset;\n return i < this.tokens.length ? this.tokens[i] : EOF;\n }\n get next() {\n return this.peek(0);\n }\n /** Whether all the parser input has been processed. */\n get atEOF() {\n return this.index >= this.tokens.length;\n }\n /**\n * Index of the next token to be processed, or the end of the last token if all have been\n * processed.\n */\n get inputIndex() {\n return this.atEOF ? this.currentEndIndex : this.next.index + this.offset;\n }\n /**\n * End index of the last processed token, or the start of the first token if none have been\n * processed.\n */\n get currentEndIndex() {\n if (this.index > 0) {\n const curToken = this.peek(-1);\n return curToken.end + this.offset;\n }\n // No tokens have been processed yet; return the next token's start or the length of the input\n // if there is no token.\n if (this.tokens.length === 0) {\n return this.input.length + this.offset;\n }\n return this.next.index + this.offset;\n }\n /**\n * Returns the absolute offset of the start of the current token.\n */\n get currentAbsoluteOffset() {\n return this.absoluteOffset + this.inputIndex;\n }\n /**\n * Retrieve a `ParseSpan` from `start` to the current position (or to `artificialEndIndex` if\n * provided).\n *\n * @param start Position from which the `ParseSpan` will start.\n * @param artificialEndIndex Optional ending index to be used if provided (and if greater than the\n * natural ending index)\n */\n span(start, artificialEndIndex) {\n let endIndex = this.currentEndIndex;\n if (artificialEndIndex !== undefined && artificialEndIndex > this.currentEndIndex) {\n endIndex = artificialEndIndex;\n }\n // In some unusual parsing scenarios (like when certain tokens are missing and an `EmptyExpr` is\n // being created), the current token may already be advanced beyond the `currentEndIndex`. This\n // appears to be a deep-seated parser bug.\n //\n // As a workaround for now, swap the start and end indices to ensure a valid `ParseSpan`.\n // TODO(alxhub): fix the bug upstream in the parser state, and remove this workaround.\n if (start > endIndex) {\n const tmp = endIndex;\n endIndex = start;\n start = tmp;\n }\n return new ParseSpan(start, endIndex);\n }\n sourceSpan(start, artificialEndIndex) {\n const serial = `${start}@${this.inputIndex}:${artificialEndIndex}`;\n if (!this.sourceSpanCache.has(serial)) {\n this.sourceSpanCache.set(serial, this.span(start, artificialEndIndex).toAbsolute(this.absoluteOffset));\n }\n return this.sourceSpanCache.get(serial);\n }\n advance() {\n this.index++;\n }\n /**\n * Executes a callback in the provided context.\n */\n withContext(context, cb) {\n this.context |= context;\n const ret = cb();\n this.context ^= context;\n return ret;\n }\n consumeOptionalCharacter(code) {\n if (this.next.isCharacter(code)) {\n this.advance();\n return true;\n }\n else {\n return false;\n }\n }\n peekKeywordLet() {\n return this.next.isKeywordLet();\n }\n peekKeywordAs() {\n return this.next.isKeywordAs();\n }\n /**\n * Consumes an expected character, otherwise emits an error about the missing expected character\n * and skips over the token stream until reaching a recoverable point.\n *\n * See `this.error` and `this.skip` for more details.\n */\n expectCharacter(code) {\n if (this.consumeOptionalCharacter(code))\n return;\n this.error(`Missing expected ${String.fromCharCode(code)}`);\n }\n consumeOptionalOperator(op) {\n if (this.next.isOperator(op)) {\n this.advance();\n return true;\n }\n else {\n return false;\n }\n }\n expectOperator(operator) {\n if (this.consumeOptionalOperator(operator))\n return;\n this.error(`Missing expected operator ${operator}`);\n }\n prettyPrintToken(tok) {\n return tok === EOF ? 'end of input' : `token ${tok}`;\n }\n expectIdentifierOrKeyword() {\n const n = this.next;\n if (!n.isIdentifier() && !n.isKeyword()) {\n if (n.isPrivateIdentifier()) {\n this._reportErrorForPrivateIdentifier(n, 'expected identifier or keyword');\n }\n else {\n this.error(`Unexpected ${this.prettyPrintToken(n)}, expected identifier or keyword`);\n }\n return null;\n }\n this.advance();\n return n.toString();\n }\n expectIdentifierOrKeywordOrString() {\n const n = this.next;\n if (!n.isIdentifier() && !n.isKeyword() && !n.isString()) {\n if (n.isPrivateIdentifier()) {\n this._reportErrorForPrivateIdentifier(n, 'expected identifier, keyword or string');\n }\n else {\n this.error(`Unexpected ${this.prettyPrintToken(n)}, expected identifier, keyword, or string`);\n }\n return '';\n }\n this.advance();\n return n.toString();\n }\n parseChain() {\n const exprs = [];\n const start = this.inputIndex;\n while (this.index < this.tokens.length) {\n const expr = this.parsePipe();\n exprs.push(expr);\n if (this.consumeOptionalCharacter($SEMICOLON)) {\n if (!(this.parseFlags & 1 /* ParseFlags.Action */)) {\n this.error('Binding expression cannot contain chained expression');\n }\n while (this.consumeOptionalCharacter($SEMICOLON)) {\n } // read all semicolons\n }\n else if (this.index < this.tokens.length) {\n const errorIndex = this.index;\n this.error(`Unexpected token '${this.next}'`);\n // The `error` call above will skip ahead to the next recovery point in an attempt to\n // recover part of the expression, but that might be the token we started from which will\n // lead to an infinite loop. If that's the case, break the loop assuming that we can't\n // parse further.\n if (this.index === errorIndex) {\n break;\n }\n }\n }\n if (exprs.length === 0) {\n // We have no expressions so create an empty expression that spans the entire input length\n const artificialStart = this.offset;\n const artificialEnd = this.offset + this.input.length;\n return new EmptyExpr(this.span(artificialStart, artificialEnd), this.sourceSpan(artificialStart, artificialEnd));\n }\n if (exprs.length == 1)\n return exprs[0];\n return new Chain(this.span(start), this.sourceSpan(start), exprs);\n }\n parsePipe() {\n const start = this.inputIndex;\n let result = this.parseExpression();\n if (this.consumeOptionalOperator('|')) {\n if (this.parseFlags & 1 /* ParseFlags.Action */) {\n this.error('Cannot have a pipe in an action expression');\n }\n do {\n const nameStart = this.inputIndex;\n let nameId = this.expectIdentifierOrKeyword();\n let nameSpan;\n let fullSpanEnd = undefined;\n if (nameId !== null) {\n nameSpan = this.sourceSpan(nameStart);\n }\n else {\n // No valid identifier was found, so we'll assume an empty pipe name ('').\n nameId = '';\n // However, there may have been whitespace present between the pipe character and the next\n // token in the sequence (or the end of input). We want to track this whitespace so that\n // the `BindingPipe` we produce covers not just the pipe character, but any trailing\n // whitespace beyond it. Another way of thinking about this is that the zero-length name\n // is assumed to be at the end of any whitespace beyond the pipe character.\n //\n // Therefore, we push the end of the `ParseSpan` for this pipe all the way up to the\n // beginning of the next token, or until the end of input if the next token is EOF.\n fullSpanEnd = this.next.index !== -1 ? this.next.index : this.input.length + this.offset;\n // The `nameSpan` for an empty pipe name is zero-length at the end of any whitespace\n // beyond the pipe character.\n nameSpan = new ParseSpan(fullSpanEnd, fullSpanEnd).toAbsolute(this.absoluteOffset);\n }\n const args = [];\n while (this.consumeOptionalCharacter($COLON)) {\n args.push(this.parseExpression());\n // If there are additional expressions beyond the name, then the artificial end for the\n // name is no longer relevant.\n }\n result = new BindingPipe(this.span(start), this.sourceSpan(start, fullSpanEnd), result, nameId, args, nameSpan);\n } while (this.consumeOptionalOperator('|'));\n }\n return result;\n }\n parseExpression() {\n return this.parseConditional();\n }\n parseConditional() {\n const start = this.inputIndex;\n const result = this.parseLogicalOr();\n if (this.consumeOptionalOperator('?')) {\n const yes = this.parsePipe();\n let no;\n if (!this.consumeOptionalCharacter($COLON)) {\n const end = this.inputIndex;\n const expression = this.input.substring(start, end);\n this.error(`Conditional expression ${expression} requires all 3 expressions`);\n no = new EmptyExpr(this.span(start), this.sourceSpan(start));\n }\n else {\n no = this.parsePipe();\n }\n return new Conditional(this.span(start), this.sourceSpan(start), result, yes, no);\n }\n else {\n return result;\n }\n }\n parseLogicalOr() {\n // '||'\n const start = this.inputIndex;\n let result = this.parseLogicalAnd();\n while (this.consumeOptionalOperator('||')) {\n const right = this.parseLogicalAnd();\n result = new Binary(this.span(start), this.sourceSpan(start), '||', result, right);\n }\n return result;\n }\n parseLogicalAnd() {\n // '&&'\n const start = this.inputIndex;\n let result = this.parseNullishCoalescing();\n while (this.consumeOptionalOperator('&&')) {\n const right = this.parseNullishCoalescing();\n result = new Binary(this.span(start), this.sourceSpan(start), '&&', result, right);\n }\n return result;\n }\n parseNullishCoalescing() {\n // '??'\n const start = this.inputIndex;\n let result = this.parseEquality();\n while (this.consumeOptionalOperator('??')) {\n const right = this.parseEquality();\n result = new Binary(this.span(start), this.sourceSpan(start), '??', result, right);\n }\n return result;\n }\n parseEquality() {\n // '==','!=','===','!=='\n const start = this.inputIndex;\n let result = this.parseRelational();\n while (this.next.type == TokenType.Operator) {\n const operator = this.next.strValue;\n switch (operator) {\n case '==':\n case '===':\n case '!=':\n case '!==':\n this.advance();\n const right = this.parseRelational();\n result = new Binary(this.span(start), this.sourceSpan(start), operator, result, right);\n continue;\n }\n break;\n }\n return result;\n }\n parseRelational() {\n // '<', '>', '<=', '>='\n const start = this.inputIndex;\n let result = this.parseAdditive();\n while (this.next.type == TokenType.Operator) {\n const operator = this.next.strValue;\n switch (operator) {\n case '<':\n case '>':\n case '<=':\n case '>=':\n this.advance();\n const right = this.parseAdditive();\n result = new Binary(this.span(start), this.sourceSpan(start), operator, result, right);\n continue;\n }\n break;\n }\n return result;\n }\n parseAdditive() {\n // '+', '-'\n const start = this.inputIndex;\n let result = this.parseMultiplicative();\n while (this.next.type == TokenType.Operator) {\n const operator = this.next.strValue;\n switch (operator) {\n case '+':\n case '-':\n this.advance();\n let right = this.parseMultiplicative();\n result = new Binary(this.span(start), this.sourceSpan(start), operator, result, right);\n continue;\n }\n break;\n }\n return result;\n }\n parseMultiplicative() {\n // '*', '%', '/'\n const start = this.inputIndex;\n let result = this.parsePrefix();\n while (this.next.type == TokenType.Operator) {\n const operator = this.next.strValue;\n switch (operator) {\n case '*':\n case '%':\n case '/':\n this.advance();\n let right = this.parsePrefix();\n result = new Binary(this.span(start), this.sourceSpan(start), operator, result, right);\n continue;\n }\n break;\n }\n return result;\n }\n parsePrefix() {\n if (this.next.type == TokenType.Operator) {\n const start = this.inputIndex;\n const operator = this.next.strValue;\n let result;\n switch (operator) {\n case '+':\n this.advance();\n result = this.parsePrefix();\n return Unary.createPlus(this.span(start), this.sourceSpan(start), result);\n case '-':\n this.advance();\n result = this.parsePrefix();\n return Unary.createMinus(this.span(start), this.sourceSpan(start), result);\n case '!':\n this.advance();\n result = this.parsePrefix();\n return new PrefixNot(this.span(start), this.sourceSpan(start), result);\n }\n }\n return this.parseCallChain();\n }\n parseCallChain() {\n const start = this.inputIndex;\n let result = this.parsePrimary();\n while (true) {\n if (this.consumeOptionalCharacter($PERIOD)) {\n result = this.parseAccessMember(result, start, false);\n }\n else if (this.consumeOptionalOperator('?.')) {\n if (this.consumeOptionalCharacter($LPAREN)) {\n result = this.parseCall(result, start, true);\n }\n else {\n result = this.consumeOptionalCharacter($LBRACKET) ?\n this.parseKeyedReadOrWrite(result, start, true) :\n this.parseAccessMember(result, start, true);\n }\n }\n else if (this.consumeOptionalCharacter($LBRACKET)) {\n result = this.parseKeyedReadOrWrite(result, start, false);\n }\n else if (this.consumeOptionalCharacter($LPAREN)) {\n result = this.parseCall(result, start, false);\n }\n else if (this.consumeOptionalOperator('!')) {\n result = new NonNullAssert(this.span(start), this.sourceSpan(start), result);\n }\n else {\n return result;\n }\n }\n }\n parsePrimary() {\n const start = this.inputIndex;\n if (this.consumeOptionalCharacter($LPAREN)) {\n this.rparensExpected++;\n const result = this.parsePipe();\n this.rparensExpected--;\n this.expectCharacter($RPAREN);\n return result;\n }\n else if (this.next.isKeywordNull()) {\n this.advance();\n return new LiteralPrimitive(this.span(start), this.sourceSpan(start), null);\n }\n else if (this.next.isKeywordUndefined()) {\n this.advance();\n return new LiteralPrimitive(this.span(start), this.sourceSpan(start), void 0);\n }\n else if (this.next.isKeywordTrue()) {\n this.advance();\n return new LiteralPrimitive(this.span(start), this.sourceSpan(start), true);\n }\n else if (this.next.isKeywordFalse()) {\n this.advance();\n return new LiteralPrimitive(this.span(start), this.sourceSpan(start), false);\n }\n else if (this.next.isKeywordThis()) {\n this.advance();\n return new ThisReceiver(this.span(start), this.sourceSpan(start));\n }\n else if (this.consumeOptionalCharacter($LBRACKET)) {\n this.rbracketsExpected++;\n const elements = this.parseExpressionList($RBRACKET);\n this.rbracketsExpected--;\n this.expectCharacter($RBRACKET);\n return new LiteralArray(this.span(start), this.sourceSpan(start), elements);\n }\n else if (this.next.isCharacter($LBRACE)) {\n return this.parseLiteralMap();\n }\n else if (this.next.isIdentifier()) {\n return this.parseAccessMember(new ImplicitReceiver(this.span(start), this.sourceSpan(start)), start, false);\n }\n else if (this.next.isNumber()) {\n const value = this.next.toNumber();\n this.advance();\n return new LiteralPrimitive(this.span(start), this.sourceSpan(start), value);\n }\n else if (this.next.isString()) {\n const literalValue = this.next.toString();\n this.advance();\n return new LiteralPrimitive(this.span(start), this.sourceSpan(start), literalValue);\n }\n else if (this.next.isPrivateIdentifier()) {\n this._reportErrorForPrivateIdentifier(this.next, null);\n return new EmptyExpr(this.span(start), this.sourceSpan(start));\n }\n else if (this.index >= this.tokens.length) {\n this.error(`Unexpected end of expression: ${this.input}`);\n return new EmptyExpr(this.span(start), this.sourceSpan(start));\n }\n else {\n this.error(`Unexpected token ${this.next}`);\n return new EmptyExpr(this.span(start), this.sourceSpan(start));\n }\n }\n parseExpressionList(terminator) {\n const result = [];\n do {\n if (!this.next.isCharacter(terminator)) {\n result.push(this.parsePipe());\n }\n else {\n break;\n }\n } while (this.consumeOptionalCharacter($COMMA));\n return result;\n }\n parseLiteralMap() {\n const keys = [];\n const values = [];\n const start = this.inputIndex;\n this.expectCharacter($LBRACE);\n if (!this.consumeOptionalCharacter($RBRACE)) {\n this.rbracesExpected++;\n do {\n const keyStart = this.inputIndex;\n const quoted = this.next.isString();\n const key = this.expectIdentifierOrKeywordOrString();\n keys.push({ key, quoted });\n // Properties with quoted keys can't use the shorthand syntax.\n if (quoted) {\n this.expectCharacter($COLON);\n values.push(this.parsePipe());\n }\n else if (this.consumeOptionalCharacter($COLON)) {\n values.push(this.parsePipe());\n }\n else {\n const span = this.span(keyStart);\n const sourceSpan = this.sourceSpan(keyStart);\n values.push(new PropertyRead(span, sourceSpan, sourceSpan, new ImplicitReceiver(span, sourceSpan), key));\n }\n } while (this.consumeOptionalCharacter($COMMA));\n this.rbracesExpected--;\n this.expectCharacter($RBRACE);\n }\n return new LiteralMap(this.span(start), this.sourceSpan(start), keys, values);\n }\n parseAccessMember(readReceiver, start, isSafe) {\n const nameStart = this.inputIndex;\n const id = this.withContext(ParseContextFlags.Writable, () => {\n const id = this.expectIdentifierOrKeyword() ?? '';\n if (id.length === 0) {\n this.error(`Expected identifier for property access`, readReceiver.span.end);\n }\n return id;\n });\n const nameSpan = this.sourceSpan(nameStart);\n let receiver;\n if (isSafe) {\n if (this.consumeOptionalAssignment()) {\n this.error('The \\'?.\\' operator cannot be used in the assignment');\n receiver = new EmptyExpr(this.span(start), this.sourceSpan(start));\n }\n else {\n receiver = new SafePropertyRead(this.span(start), this.sourceSpan(start), nameSpan, readReceiver, id);\n }\n }\n else {\n if (this.consumeOptionalAssignment()) {\n if (!(this.parseFlags & 1 /* ParseFlags.Action */)) {\n this.error('Bindings cannot contain assignments');\n return new EmptyExpr(this.span(start), this.sourceSpan(start));\n }\n const value = this.parseConditional();\n receiver = new PropertyWrite(this.span(start), this.sourceSpan(start), nameSpan, readReceiver, id, value);\n }\n else {\n receiver =\n new PropertyRead(this.span(start), this.sourceSpan(start), nameSpan, readReceiver, id);\n }\n }\n return receiver;\n }\n parseCall(receiver, start, isSafe) {\n const argumentStart = this.inputIndex;\n this.rparensExpected++;\n const args = this.parseCallArguments();\n const argumentSpan = this.span(argumentStart, this.inputIndex).toAbsolute(this.absoluteOffset);\n this.expectCharacter($RPAREN);\n this.rparensExpected--;\n const span = this.span(start);\n const sourceSpan = this.sourceSpan(start);\n return isSafe ? new SafeCall(span, sourceSpan, receiver, args, argumentSpan) :\n new Call(span, sourceSpan, receiver, args, argumentSpan);\n }\n consumeOptionalAssignment() {\n // When parsing assignment events (originating from two-way-binding aka banana-in-a-box syntax),\n // it is valid for the primary expression to be terminated by the non-null operator. This\n // primary expression is substituted as LHS of the assignment operator to achieve\n // two-way-binding, such that the LHS could be the non-null operator. The grammar doesn't\n // naturally allow for this syntax, so assignment events are parsed specially.\n if ((this.parseFlags & 2 /* ParseFlags.AssignmentEvent */) && this.next.isOperator('!') &&\n this.peek(1).isOperator('=')) {\n // First skip over the ! operator.\n this.advance();\n // Then skip over the = operator, to fully consume the optional assignment operator.\n this.advance();\n return true;\n }\n return this.consumeOptionalOperator('=');\n }\n parseCallArguments() {\n if (this.next.isCharacter($RPAREN))\n return [];\n const positionals = [];\n do {\n positionals.push(this.parsePipe());\n } while (this.consumeOptionalCharacter($COMMA));\n return positionals;\n }\n /**\n * Parses an identifier, a keyword, a string with an optional `-` in between,\n * and returns the string along with its absolute source span.\n */\n expectTemplateBindingKey() {\n let result = '';\n let operatorFound = false;\n const start = this.currentAbsoluteOffset;\n do {\n result += this.expectIdentifierOrKeywordOrString();\n operatorFound = this.consumeOptionalOperator('-');\n if (operatorFound) {\n result += '-';\n }\n } while (operatorFound);\n return {\n source: result,\n span: new AbsoluteSourceSpan(start, start + result.length),\n };\n }\n /**\n * Parse microsyntax template expression and return a list of bindings or\n * parsing errors in case the given expression is invalid.\n *\n * For example,\n * ```\n * <div *ngFor=\"let item of items; index as i; trackBy: func\">\n * ```\n * contains five bindings:\n * 1. ngFor -> null\n * 2. item -> NgForOfContext.$implicit\n * 3. ngForOf -> items\n * 4. i -> NgForOfContext.index\n * 5. ngForTrackBy -> func\n *\n * For a full description of the microsyntax grammar, see\n * https://gist.github.com/mhevery/d3530294cff2e4a1b3fe15ff75d08855\n *\n * @param templateKey name of the microsyntax directive, like ngIf, ngFor,\n * without the *, along with its absolute span.\n */\n parseTemplateBindings(templateKey) {\n const bindings = [];\n // The first binding is for the template key itself\n // In *ngFor=\"let item of items\", key = \"ngFor\", value = null\n // In *ngIf=\"cond | pipe\", key = \"ngIf\", value = \"cond | pipe\"\n bindings.push(...this.parseDirectiveKeywordBindings(templateKey));\n while (this.index < this.tokens.length) {\n // If it starts with 'let', then this must be variable declaration\n const letBinding = this.parseLetBinding();\n if (letBinding) {\n bindings.push(letBinding);\n }\n else {\n // Two possible cases here, either `value \"as\" key` or\n // \"directive-keyword expression\". We don't know which case, but both\n // \"value\" and \"directive-keyword\" are template binding key, so consume\n // the key first.\n const key = this.expectTemplateBindingKey();\n // Peek at the next token, if it is \"as\" then this must be variable\n // declaration.\n const binding = this.parseAsBinding(key);\n if (binding) {\n bindings.push(binding);\n }\n else {\n // Otherwise the key must be a directive keyword, like \"of\". Transform\n // the key to actual key. Eg. of -> ngForOf, trackBy -> ngForTrackBy\n key.source =\n templateKey.source + key.source.charAt(0).toUpperCase() + key.source.substring(1);\n bindings.push(...this.parseDirectiveKeywordBindings(key));\n }\n }\n this.consumeStatementTerminator();\n }\n return new TemplateBindingParseResult(bindings, [] /* warnings */, this.errors);\n }\n parseKeyedReadOrWrite(receiver, start, isSafe) {\n return this.withContext(ParseContextFlags.Writable, () => {\n this.rbracketsExpected++;\n const key = this.parsePipe();\n if (key instanceof EmptyExpr) {\n this.error(`Key access cannot be empty`);\n }\n this.rbracketsExpected--;\n this.expectCharacter($RBRACKET);\n if (this.consumeOptionalOperator('=')) {\n if (isSafe) {\n this.error('The \\'?.\\' operator cannot be used in the assignment');\n }\n else {\n const value = this.parseConditional();\n return new KeyedWrite(this.span(start), this.sourceSpan(start), receiver, key, value);\n }\n }\n else {\n return isSafe ? new SafeKeyedRead(this.span(start), this.sourceSpan(start), receiver, key) :\n new KeyedRead(this.span(start), this.sourceSpan(start), receiver, key);\n }\n return new EmptyExpr(this.span(start), this.sourceSpan(start));\n });\n }\n /**\n * Parse a directive keyword, followed by a mandatory expression.\n * For example, \"of items\", \"trackBy: func\".\n * The bindings are: ngForOf -> items, ngForTrackBy -> func\n * There could be an optional \"as\" binding that follows the expression.\n * For example,\n * ```\n * *ngFor=\"let item of items | slice:0:1 as collection\".\n * ^^ ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^\n * keyword bound target optional 'as' binding\n * ```\n *\n * @param key binding key, for example, ngFor, ngIf, ngForOf, along with its\n * absolute span.\n */\n parseDirectiveKeywordBindings(key) {\n const bindings = [];\n this.consumeOptionalCharacter($COLON); // trackBy: trackByFunction\n const value = this.getDirectiveBoundTarget();\n let spanEnd = this.currentAbsoluteOffset;\n // The binding could optionally be followed by \"as\". For example,\n // *ngIf=\"cond | pipe as x\". In this case, the key in the \"as\" binding\n // is \"x\" and the value is the template key itself (\"ngIf\"). Note that the\n // 'key' in the current context now becomes the \"value\" in the next binding.\n const asBinding = this.parseAsBinding(key);\n if (!asBinding) {\n this.consumeStatementTerminator();\n spanEnd = this.currentAbsoluteOffset;\n }\n const sourceSpan = new AbsoluteSourceSpan(key.span.start, spanEnd);\n bindings.push(new ExpressionBinding(sourceSpan, key, value));\n if (asBinding) {\n bindings.push(asBinding);\n }\n return bindings;\n }\n /**\n * Return the expression AST for the bound target of a directive keyword\n * binding. For example,\n * ```\n * *ngIf=\"condition | pipe\"\n * ^^^^^^^^^^^^^^^^ bound target for \"ngIf\"\n * *ngFor=\"let item of items\"\n * ^^^^^ bound target for \"ngForOf\"\n * ```\n */\n getDirectiveBoundTarget() {\n if (this.next === EOF || this.peekKeywordAs() || this.peekKeywordLet()) {\n return null;\n }\n const ast = this.parsePipe(); // example: \"condition | async\"\n const { start, end } = ast.span;\n const value = this.input.substring(start, end);\n return new ASTWithSource(ast, value, this.location, this.absoluteOffset + start, this.errors);\n }\n /**\n * Return the binding for a variable declared using `as`. Note that the order\n * of the key-value pair in this declaration is reversed. For example,\n * ```\n * *ngFor=\"let item of items; index as i\"\n * ^^^^^ ^\n * value key\n * ```\n *\n * @param value name of the value in the declaration, \"ngIf\" in the example\n * above, along with its absolute span.\n */\n parseAsBinding(value) {\n if (!this.peekKeywordAs()) {\n return null;\n }\n this.advance(); // consume the 'as' keyword\n const key = this.expectTemplateBindingKey();\n this.consumeStatementTerminator();\n const sourceSpan = new AbsoluteSourceSpan(value.span.start, this.currentAbsoluteOffset);\n return new VariableBinding(sourceSpan, key, value);\n }\n /**\n * Return the binding for a variable declared using `let`. For example,\n * ```\n * *ngFor=\"let item of items; let i=index;\"\n * ^^^^^^^^ ^^^^^^^^^^^\n * ```\n * In the first binding, `item` is bound to `NgForOfContext.$implicit`.\n * In the second binding, `i` is bound to `NgForOfContext.index`.\n */\n parseLetBinding() {\n if (!this.peekKeywordLet()) {\n return null;\n }\n const spanStart = this.currentAbsoluteOffset;\n this.advance(); // consume the 'let' keyword\n const key = this.expectTemplateBindingKey();\n let value = null;\n if (this.consumeOptionalOperator('=')) {\n value = this.expectTemplateBindingKey();\n }\n this.consumeStatementTerminator();\n const sourceSpan = new AbsoluteSourceSpan(spanStart, this.currentAbsoluteOffset);\n return new VariableBinding(sourceSpan, key, value);\n }\n /**\n * Consume the optional statement terminator: semicolon or comma.\n */\n consumeStatementTerminator() {\n this.consumeOptionalCharacter($SEMICOLON) || this.consumeOptionalCharacter($COMMA);\n }\n /**\n * Records an error and skips over the token stream until reaching a recoverable point. See\n * `this.skip` for more details on token skipping.\n */\n error(message, index = null) {\n this.errors.push(new ParserError(message, this.input, this.locationText(index), this.location));\n this.skip();\n }\n locationText(index = null) {\n if (index == null)\n index = this.index;\n return (index < this.tokens.length) ? `at column ${this.tokens[index].index + 1} in` :\n `at the end of the expression`;\n }\n /**\n * Records an error for an unexpected private identifier being discovered.\n * @param token Token representing a private identifier.\n * @param extraMessage Optional additional message being appended to the error.\n */\n _reportErrorForPrivateIdentifier(token, extraMessage) {\n let errorMessage = `Private identifiers are not supported. Unexpected private identifier: ${token}`;\n if (extraMessage !== null) {\n errorMessage += `, ${extraMessage}`;\n }\n this.error(errorMessage);\n }\n /**\n * Error recovery should skip tokens until it encounters a recovery point.\n *\n * The following are treated as unconditional recovery points:\n * - end of input\n * - ';' (parseChain() is always the root production, and it expects a ';')\n * - '|' (since pipes may be chained and each pipe expression may be treated independently)\n *\n * The following are conditional recovery points:\n * - ')', '}', ']' if one of calling productions is expecting one of these symbols\n * - This allows skip() to recover from errors such as '(a.) + 1' allowing more of the AST to\n * be retained (it doesn't skip any tokens as the ')' is retained because of the '(' begins\n * an '(' <expr> ')' production).\n * The recovery points of grouping symbols must be conditional as they must be skipped if\n * none of the calling productions are not expecting the closing token else we will never\n * make progress in the case of an extraneous group closing symbol (such as a stray ')').\n * That is, we skip a closing symbol if we are not in a grouping production.\n * - '=' in a `Writable` context\n * - In this context, we are able to recover after seeing the `=` operator, which\n * signals the presence of an independent rvalue expression following the `=` operator.\n *\n * If a production expects one of these token it increments the corresponding nesting count,\n * and then decrements it just prior to checking if the token is in the input.\n */\n skip() {\n let n = this.next;\n while (this.index < this.tokens.length && !n.isCharacter($SEMICOLON) &&\n !n.isOperator('|') && (this.rparensExpected <= 0 || !n.isCharacter($RPAREN)) &&\n (this.rbracesExpected <= 0 || !n.isCharacter($RBRACE)) &&\n (this.rbracketsExpected <= 0 || !n.isCharacter($RBRACKET)) &&\n (!(this.context & ParseContextFlags.Writable) || !n.isOperator('='))) {\n if (this.next.isError()) {\n this.errors.push(new ParserError(this.next.toString(), this.input, this.locationText(), this.location));\n }\n this.advance();\n n = this.next;\n }\n }\n}\nclass SimpleExpressionChecker extends RecursiveAstVisitor {\n constructor() {\n super(...arguments);\n this.errors = [];\n }\n visitPipe() {\n this.errors.push('pipes');\n }\n}\n/**\n * Computes the real offset in the original template for indexes in an interpolation.\n *\n * Because templates can have encoded HTML entities and the input passed to the parser at this stage\n * of the compiler is the _decoded_ value, we need to compute the real offset using the original\n * encoded values in the interpolated tokens. Note that this is only a special case handling for\n * `MlParserTokenType.ENCODED_ENTITY` token types. All other interpolated tokens are expected to\n * have parts which exactly match the input string for parsing the interpolation.\n *\n * @param interpolatedTokens The tokens for the interpolated value.\n *\n * @returns A map of index locations in the decoded template to indexes in the original template\n */\nfunction getIndexMapForOriginalTemplate(interpolatedTokens) {\n let offsetMap = new Map();\n let consumedInOriginalTemplate = 0;\n let consumedInInput = 0;\n let tokenIndex = 0;\n while (tokenIndex < interpolatedTokens.length) {\n const currentToken = interpolatedTokens[tokenIndex];\n if (currentToken.type === 9 /* MlParserTokenType.ENCODED_ENTITY */) {\n const [decoded, encoded] = currentToken.parts;\n consumedInOriginalTemplate += encoded.length;\n consumedInInput += decoded.length;\n }\n else {\n const lengthOfParts = currentToken.parts.reduce((sum, current) => sum + current.length, 0);\n consumedInInput += lengthOfParts;\n consumedInOriginalTemplate += lengthOfParts;\n }\n offsetMap.set(consumedInInput, consumedInOriginalTemplate);\n tokenIndex++;\n }\n return offsetMap;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass NodeWithI18n {\n constructor(sourceSpan, i18n) {\n this.sourceSpan = sourceSpan;\n this.i18n = i18n;\n }\n}\nclass Text extends NodeWithI18n {\n constructor(value, sourceSpan, tokens, i18n) {\n super(sourceSpan, i18n);\n this.value = value;\n this.tokens = tokens;\n }\n visit(visitor, context) {\n return visitor.visitText(this, context);\n }\n}\nclass Expansion extends NodeWithI18n {\n constructor(switchValue, type, cases, sourceSpan, switchValueSourceSpan, i18n) {\n super(sourceSpan, i18n);\n this.switchValue = switchValue;\n this.type = type;\n this.cases = cases;\n this.switchValueSourceSpan = switchValueSourceSpan;\n }\n visit(visitor, context) {\n return visitor.visitExpansion(this, context);\n }\n}\nclass ExpansionCase {\n constructor(value, expression, sourceSpan, valueSourceSpan, expSourceSpan) {\n this.value = value;\n this.expression = expression;\n this.sourceSpan = sourceSpan;\n this.valueSourceSpan = valueSourceSpan;\n this.expSourceSpan = expSourceSpan;\n }\n visit(visitor, context) {\n return visitor.visitExpansionCase(this, context);\n }\n}\nclass Attribute extends NodeWithI18n {\n constructor(name, value, sourceSpan, keySpan, valueSpan, valueTokens, i18n) {\n super(sourceSpan, i18n);\n this.name = name;\n this.value = value;\n this.keySpan = keySpan;\n this.valueSpan = valueSpan;\n this.valueTokens = valueTokens;\n }\n visit(visitor, context) {\n return visitor.visitAttribute(this, context);\n }\n}\nclass Element extends NodeWithI18n {\n constructor(name, attrs, children, sourceSpan, startSourceSpan, endSourceSpan = null, i18n) {\n super(sourceSpan, i18n);\n this.name = name;\n this.attrs = attrs;\n this.children = children;\n this.startSourceSpan = startSourceSpan;\n this.endSourceSpan = endSourceSpan;\n }\n visit(visitor, context) {\n return visitor.visitElement(this, context);\n }\n}\nclass Comment {\n constructor(value, sourceSpan) {\n this.value = value;\n this.sourceSpan = sourceSpan;\n }\n visit(visitor, context) {\n return visitor.visitComment(this, context);\n }\n}\nfunction visitAll(visitor, nodes, context = null) {\n const result = [];\n const visit = visitor.visit ?\n (ast) => visitor.visit(ast, context) || ast.visit(visitor, context) :\n (ast) => ast.visit(visitor, context);\n nodes.forEach(ast => {\n const astResult = visit(ast);\n if (astResult) {\n result.push(astResult);\n }\n });\n return result;\n}\nclass RecursiveVisitor {\n constructor() { }\n visitElement(ast, context) {\n this.visitChildren(context, visit => {\n visit(ast.attrs);\n visit(ast.children);\n });\n }\n visitAttribute(ast, context) { }\n visitText(ast, context) { }\n visitComment(ast, context) { }\n visitExpansion(ast, context) {\n return this.visitChildren(context, visit => {\n visit(ast.cases);\n });\n }\n visitExpansionCase(ast, context) { }\n visitChildren(context, cb) {\n let results = [];\n let t = this;\n function visit(children) {\n if (children)\n results.push(visitAll(t, children, context));\n }\n cb(visit);\n return Array.prototype.concat.apply([], results);\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Mapping between all HTML entity names and their unicode representation.\n// Generated from https://html.spec.whatwg.org/multipage/entities.json by stripping\n// the `&` and `;` from the keys and removing the duplicates.\n// see https://www.w3.org/TR/html51/syntax.html#named-character-references\nconst NAMED_ENTITIES = {\n 'AElig': '\\u00C6',\n 'AMP': '\\u0026',\n 'amp': '\\u0026',\n 'Aacute': '\\u00C1',\n 'Abreve': '\\u0102',\n 'Acirc': '\\u00C2',\n 'Acy': '\\u0410',\n 'Afr': '\\uD835\\uDD04',\n 'Agrave': '\\u00C0',\n 'Alpha': '\\u0391',\n 'Amacr': '\\u0100',\n 'And': '\\u2A53',\n 'Aogon': '\\u0104',\n 'Aopf': '\\uD835\\uDD38',\n 'ApplyFunction': '\\u2061',\n 'af': '\\u2061',\n 'Aring': '\\u00C5',\n 'angst': '\\u00C5',\n 'Ascr': '\\uD835\\uDC9C',\n 'Assign': '\\u2254',\n 'colone': '\\u2254',\n 'coloneq': '\\u2254',\n 'Atilde': '\\u00C3',\n 'Auml': '\\u00C4',\n 'Backslash': '\\u2216',\n 'setminus': '\\u2216',\n 'setmn': '\\u2216',\n 'smallsetminus': '\\u2216',\n 'ssetmn': '\\u2216',\n 'Barv': '\\u2AE7',\n 'Barwed': '\\u2306',\n 'doublebarwedge': '\\u2306',\n 'Bcy': '\\u0411',\n 'Because': '\\u2235',\n 'becaus': '\\u2235',\n 'because': '\\u2235',\n 'Bernoullis': '\\u212C',\n 'Bscr': '\\u212C',\n 'bernou': '\\u212C',\n 'Beta': '\\u0392',\n 'Bfr': '\\uD835\\uDD05',\n 'Bopf': '\\uD835\\uDD39',\n 'Breve': '\\u02D8',\n 'breve': '\\u02D8',\n 'Bumpeq': '\\u224E',\n 'HumpDownHump': '\\u224E',\n 'bump': '\\u224E',\n 'CHcy': '\\u0427',\n 'COPY': '\\u00A9',\n 'copy': '\\u00A9',\n 'Cacute': '\\u0106',\n 'Cap': '\\u22D2',\n 'CapitalDifferentialD': '\\u2145',\n 'DD': '\\u2145',\n 'Cayleys': '\\u212D',\n 'Cfr': '\\u212D',\n 'Ccaron': '\\u010C',\n 'Ccedil': '\\u00C7',\n 'Ccirc': '\\u0108',\n 'Cconint': '\\u2230',\n 'Cdot': '\\u010A',\n 'Cedilla': '\\u00B8',\n 'cedil': '\\u00B8',\n 'CenterDot': '\\u00B7',\n 'centerdot': '\\u00B7',\n 'middot': '\\u00B7',\n 'Chi': '\\u03A7',\n 'CircleDot': '\\u2299',\n 'odot': '\\u2299',\n 'CircleMinus': '\\u2296',\n 'ominus': '\\u2296',\n 'CirclePlus': '\\u2295',\n 'oplus': '\\u2295',\n 'CircleTimes': '\\u2297',\n 'otimes': '\\u2297',\n 'ClockwiseContourIntegral': '\\u2232',\n 'cwconint': '\\u2232',\n 'CloseCurlyDoubleQuote': '\\u201D',\n 'rdquo': '\\u201D',\n 'rdquor': '\\u201D',\n 'CloseCurlyQuote': '\\u2019',\n 'rsquo': '\\u2019',\n 'rsquor': '\\u2019',\n 'Colon': '\\u2237',\n 'Proportion': '\\u2237',\n 'Colone': '\\u2A74',\n 'Congruent': '\\u2261',\n 'equiv': '\\u2261',\n 'Conint': '\\u222F',\n 'DoubleContourIntegral': '\\u222F',\n 'ContourIntegral': '\\u222E',\n 'conint': '\\u222E',\n 'oint': '\\u222E',\n 'Copf': '\\u2102',\n 'complexes': '\\u2102',\n 'Coproduct': '\\u2210',\n 'coprod': '\\u2210',\n 'CounterClockwiseContourIntegral': '\\u2233',\n 'awconint': '\\u2233',\n 'Cross': '\\u2A2F',\n 'Cscr': '\\uD835\\uDC9E',\n 'Cup': '\\u22D3',\n 'CupCap': '\\u224D',\n 'asympeq': '\\u224D',\n 'DDotrahd': '\\u2911',\n 'DJcy': '\\u0402',\n 'DScy': '\\u0405',\n 'DZcy': '\\u040F',\n 'Dagger': '\\u2021',\n 'ddagger': '\\u2021',\n 'Darr': '\\u21A1',\n 'Dashv': '\\u2AE4',\n 'DoubleLeftTee': '\\u2AE4',\n 'Dcaron': '\\u010E',\n 'Dcy': '\\u0414',\n 'Del': '\\u2207',\n 'nabla': '\\u2207',\n 'Delta': '\\u0394',\n 'Dfr': '\\uD835\\uDD07',\n 'DiacriticalAcute': '\\u00B4',\n 'acute': '\\u00B4',\n 'DiacriticalDot': '\\u02D9',\n 'dot': '\\u02D9',\n 'DiacriticalDoubleAcute': '\\u02DD',\n 'dblac': '\\u02DD',\n 'DiacriticalGrave': '\\u0060',\n 'grave': '\\u0060',\n 'DiacriticalTilde': '\\u02DC',\n 'tilde': '\\u02DC',\n 'Diamond': '\\u22C4',\n 'diam': '\\u22C4',\n 'diamond': '\\u22C4',\n 'DifferentialD': '\\u2146',\n 'dd': '\\u2146',\n 'Dopf': '\\uD835\\uDD3B',\n 'Dot': '\\u00A8',\n 'DoubleDot': '\\u00A8',\n 'die': '\\u00A8',\n 'uml': '\\u00A8',\n 'DotDot': '\\u20DC',\n 'DotEqual': '\\u2250',\n 'doteq': '\\u2250',\n 'esdot': '\\u2250',\n 'DoubleDownArrow': '\\u21D3',\n 'Downarrow': '\\u21D3',\n 'dArr': '\\u21D3',\n 'DoubleLeftArrow': '\\u21D0',\n 'Leftarrow': '\\u21D0',\n 'lArr': '\\u21D0',\n 'DoubleLeftRightArrow': '\\u21D4',\n 'Leftrightarrow': '\\u21D4',\n 'hArr': '\\u21D4',\n 'iff': '\\u21D4',\n 'DoubleLongLeftArrow': '\\u27F8',\n 'Longleftarrow': '\\u27F8',\n 'xlArr': '\\u27F8',\n 'DoubleLongLeftRightArrow': '\\u27FA',\n 'Longleftrightarrow': '\\u27FA',\n 'xhArr': '\\u27FA',\n 'DoubleLongRightArrow': '\\u27F9',\n 'Longrightarrow': '\\u27F9',\n 'xrArr': '\\u27F9',\n 'DoubleRightArrow': '\\u21D2',\n 'Implies': '\\u21D2',\n 'Rightarrow': '\\u21D2',\n 'rArr': '\\u21D2',\n 'DoubleRightTee': '\\u22A8',\n 'vDash': '\\u22A8',\n 'DoubleUpArrow': '\\u21D1',\n 'Uparrow': '\\u21D1',\n 'uArr': '\\u21D1',\n 'DoubleUpDownArrow': '\\u21D5',\n 'Updownarrow': '\\u21D5',\n 'vArr': '\\u21D5',\n 'DoubleVerticalBar': '\\u2225',\n 'par': '\\u2225',\n 'parallel': '\\u2225',\n 'shortparallel': '\\u2225',\n 'spar': '\\u2225',\n 'DownArrow': '\\u2193',\n 'ShortDownArrow': '\\u2193',\n 'darr': '\\u2193',\n 'downarrow': '\\u2193',\n 'DownArrowBar': '\\u2913',\n 'DownArrowUpArrow': '\\u21F5',\n 'duarr': '\\u21F5',\n 'DownBreve': '\\u0311',\n 'DownLeftRightVector': '\\u2950',\n 'DownLeftTeeVector': '\\u295E',\n 'DownLeftVector': '\\u21BD',\n 'leftharpoondown': '\\u21BD',\n 'lhard': '\\u21BD',\n 'DownLeftVectorBar': '\\u2956',\n 'DownRightTeeVector': '\\u295F',\n 'DownRightVector': '\\u21C1',\n 'rhard': '\\u21C1',\n 'rightharpoondown': '\\u21C1',\n 'DownRightVectorBar': '\\u2957',\n 'DownTee': '\\u22A4',\n 'top': '\\u22A4',\n 'DownTeeArrow': '\\u21A7',\n 'mapstodown': '\\u21A7',\n 'Dscr': '\\uD835\\uDC9F',\n 'Dstrok': '\\u0110',\n 'ENG': '\\u014A',\n 'ETH': '\\u00D0',\n 'Eacute': '\\u00C9',\n 'Ecaron': '\\u011A',\n 'Ecirc': '\\u00CA',\n 'Ecy': '\\u042D',\n 'Edot': '\\u0116',\n 'Efr': '\\uD835\\uDD08',\n 'Egrave': '\\u00C8',\n 'Element': '\\u2208',\n 'in': '\\u2208',\n 'isin': '\\u2208',\n 'isinv': '\\u2208',\n 'Emacr': '\\u0112',\n 'EmptySmallSquare': '\\u25FB',\n 'EmptyVerySmallSquare': '\\u25AB',\n 'Eogon': '\\u0118',\n 'Eopf': '\\uD835\\uDD3C',\n 'Epsilon': '\\u0395',\n 'Equal': '\\u2A75',\n 'EqualTilde': '\\u2242',\n 'eqsim': '\\u2242',\n 'esim': '\\u2242',\n 'Equilibrium': '\\u21CC',\n 'rightleftharpoons': '\\u21CC',\n 'rlhar': '\\u21CC',\n 'Escr': '\\u2130',\n 'expectation': '\\u2130',\n 'Esim': '\\u2A73',\n 'Eta': '\\u0397',\n 'Euml': '\\u00CB',\n 'Exists': '\\u2203',\n 'exist': '\\u2203',\n 'ExponentialE': '\\u2147',\n 'ee': '\\u2147',\n 'exponentiale': '\\u2147',\n 'Fcy': '\\u0424',\n 'Ffr': '\\uD835\\uDD09',\n 'FilledSmallSquare': '\\u25FC',\n 'FilledVerySmallSquare': '\\u25AA',\n 'blacksquare': '\\u25AA',\n 'squarf': '\\u25AA',\n 'squf': '\\u25AA',\n 'Fopf': '\\uD835\\uDD3D',\n 'ForAll': '\\u2200',\n 'forall': '\\u2200',\n 'Fouriertrf': '\\u2131',\n 'Fscr': '\\u2131',\n 'GJcy': '\\u0403',\n 'GT': '\\u003E',\n 'gt': '\\u003E',\n 'Gamma': '\\u0393',\n 'Gammad': '\\u03DC',\n 'Gbreve': '\\u011E',\n 'Gcedil': '\\u0122',\n 'Gcirc': '\\u011C',\n 'Gcy': '\\u0413',\n 'Gdot': '\\u0120',\n 'Gfr': '\\uD835\\uDD0A',\n 'Gg': '\\u22D9',\n 'ggg': '\\u22D9',\n 'Gopf': '\\uD835\\uDD3E',\n 'GreaterEqual': '\\u2265',\n 'ge': '\\u2265',\n 'geq': '\\u2265',\n 'GreaterEqualLess': '\\u22DB',\n 'gel': '\\u22DB',\n 'gtreqless': '\\u22DB',\n 'GreaterFullEqual': '\\u2267',\n 'gE': '\\u2267',\n 'geqq': '\\u2267',\n 'GreaterGreater': '\\u2AA2',\n 'GreaterLess': '\\u2277',\n 'gl': '\\u2277',\n 'gtrless': '\\u2277',\n 'GreaterSlantEqual': '\\u2A7E',\n 'geqslant': '\\u2A7E',\n 'ges': '\\u2A7E',\n 'GreaterTilde': '\\u2273',\n 'gsim': '\\u2273',\n 'gtrsim': '\\u2273',\n 'Gscr': '\\uD835\\uDCA2',\n 'Gt': '\\u226B',\n 'NestedGreaterGreater': '\\u226B',\n 'gg': '\\u226B',\n 'HARDcy': '\\u042A',\n 'Hacek': '\\u02C7',\n 'caron': '\\u02C7',\n 'Hat': '\\u005E',\n 'Hcirc': '\\u0124',\n 'Hfr': '\\u210C',\n 'Poincareplane': '\\u210C',\n 'HilbertSpace': '\\u210B',\n 'Hscr': '\\u210B',\n 'hamilt': '\\u210B',\n 'Hopf': '\\u210D',\n 'quaternions': '\\u210D',\n 'HorizontalLine': '\\u2500',\n 'boxh': '\\u2500',\n 'Hstrok': '\\u0126',\n 'HumpEqual': '\\u224F',\n 'bumpe': '\\u224F',\n 'bumpeq': '\\u224F',\n 'IEcy': '\\u0415',\n 'IJlig': '\\u0132',\n 'IOcy': '\\u0401',\n 'Iacute': '\\u00CD',\n 'Icirc': '\\u00CE',\n 'Icy': '\\u0418',\n 'Idot': '\\u0130',\n 'Ifr': '\\u2111',\n 'Im': '\\u2111',\n 'image': '\\u2111',\n 'imagpart': '\\u2111',\n 'Igrave': '\\u00CC',\n 'Imacr': '\\u012A',\n 'ImaginaryI': '\\u2148',\n 'ii': '\\u2148',\n 'Int': '\\u222C',\n 'Integral': '\\u222B',\n 'int': '\\u222B',\n 'Intersection': '\\u22C2',\n 'bigcap': '\\u22C2',\n 'xcap': '\\u22C2',\n 'InvisibleComma': '\\u2063',\n 'ic': '\\u2063',\n 'InvisibleTimes': '\\u2062',\n 'it': '\\u2062',\n 'Iogon': '\\u012E',\n 'Iopf': '\\uD835\\uDD40',\n 'Iota': '\\u0399',\n 'Iscr': '\\u2110',\n 'imagline': '\\u2110',\n 'Itilde': '\\u0128',\n 'Iukcy': '\\u0406',\n 'Iuml': '\\u00CF',\n 'Jcirc': '\\u0134',\n 'Jcy': '\\u0419',\n 'Jfr': '\\uD835\\uDD0D',\n 'Jopf': '\\uD835\\uDD41',\n 'Jscr': '\\uD835\\uDCA5',\n 'Jsercy': '\\u0408',\n 'Jukcy': '\\u0404',\n 'KHcy': '\\u0425',\n 'KJcy': '\\u040C',\n 'Kappa': '\\u039A',\n 'Kcedil': '\\u0136',\n 'Kcy': '\\u041A',\n 'Kfr': '\\uD835\\uDD0E',\n 'Kopf': '\\uD835\\uDD42',\n 'Kscr': '\\uD835\\uDCA6',\n 'LJcy': '\\u0409',\n 'LT': '\\u003C',\n 'lt': '\\u003C',\n 'Lacute': '\\u0139',\n 'Lambda': '\\u039B',\n 'Lang': '\\u27EA',\n 'Laplacetrf': '\\u2112',\n 'Lscr': '\\u2112',\n 'lagran': '\\u2112',\n 'Larr': '\\u219E',\n 'twoheadleftarrow': '\\u219E',\n 'Lcaron': '\\u013D',\n 'Lcedil': '\\u013B',\n 'Lcy': '\\u041B',\n 'LeftAngleBracket': '\\u27E8',\n 'lang': '\\u27E8',\n 'langle': '\\u27E8',\n 'LeftArrow': '\\u2190',\n 'ShortLeftArrow': '\\u2190',\n 'larr': '\\u2190',\n 'leftarrow': '\\u2190',\n 'slarr': '\\u2190',\n 'LeftArrowBar': '\\u21E4',\n 'larrb': '\\u21E4',\n 'LeftArrowRightArrow': '\\u21C6',\n 'leftrightarrows': '\\u21C6',\n 'lrarr': '\\u21C6',\n 'LeftCeiling': '\\u2308',\n 'lceil': '\\u2308',\n 'LeftDoubleBracket': '\\u27E6',\n 'lobrk': '\\u27E6',\n 'LeftDownTeeVector': '\\u2961',\n 'LeftDownVector': '\\u21C3',\n 'dharl': '\\u21C3',\n 'downharpoonleft': '\\u21C3',\n 'LeftDownVectorBar': '\\u2959',\n 'LeftFloor': '\\u230A',\n 'lfloor': '\\u230A',\n 'LeftRightArrow': '\\u2194',\n 'harr': '\\u2194',\n 'leftrightarrow': '\\u2194',\n 'LeftRightVector': '\\u294E',\n 'LeftTee': '\\u22A3',\n 'dashv': '\\u22A3',\n 'LeftTeeArrow': '\\u21A4',\n 'mapstoleft': '\\u21A4',\n 'LeftTeeVector': '\\u295A',\n 'LeftTriangle': '\\u22B2',\n 'vartriangleleft': '\\u22B2',\n 'vltri': '\\u22B2',\n 'LeftTriangleBar': '\\u29CF',\n 'LeftTriangleEqual': '\\u22B4',\n 'ltrie': '\\u22B4',\n 'trianglelefteq': '\\u22B4',\n 'LeftUpDownVector': '\\u2951',\n 'LeftUpTeeVector': '\\u2960',\n 'LeftUpVector': '\\u21BF',\n 'uharl': '\\u21BF',\n 'upharpoonleft': '\\u21BF',\n 'LeftUpVectorBar': '\\u2958',\n 'LeftVector': '\\u21BC',\n 'leftharpoonup': '\\u21BC',\n 'lharu': '\\u21BC',\n 'LeftVectorBar': '\\u2952',\n 'LessEqualGreater': '\\u22DA',\n 'leg': '\\u22DA',\n 'lesseqgtr': '\\u22DA',\n 'LessFullEqual': '\\u2266',\n 'lE': '\\u2266',\n 'leqq': '\\u2266',\n 'LessGreater': '\\u2276',\n 'lessgtr': '\\u2276',\n 'lg': '\\u2276',\n 'LessLess': '\\u2AA1',\n 'LessSlantEqual': '\\u2A7D',\n 'leqslant': '\\u2A7D',\n 'les': '\\u2A7D',\n 'LessTilde': '\\u2272',\n 'lesssim': '\\u2272',\n 'lsim': '\\u2272',\n 'Lfr': '\\uD835\\uDD0F',\n 'Ll': '\\u22D8',\n 'Lleftarrow': '\\u21DA',\n 'lAarr': '\\u21DA',\n 'Lmidot': '\\u013F',\n 'LongLeftArrow': '\\u27F5',\n 'longleftarrow': '\\u27F5',\n 'xlarr': '\\u27F5',\n 'LongLeftRightArrow': '\\u27F7',\n 'longleftrightarrow': '\\u27F7',\n 'xharr': '\\u27F7',\n 'LongRightArrow': '\\u27F6',\n 'longrightarrow': '\\u27F6',\n 'xrarr': '\\u27F6',\n 'Lopf': '\\uD835\\uDD43',\n 'LowerLeftArrow': '\\u2199',\n 'swarr': '\\u2199',\n 'swarrow': '\\u2199',\n 'LowerRightArrow': '\\u2198',\n 'searr': '\\u2198',\n 'searrow': '\\u2198',\n 'Lsh': '\\u21B0',\n 'lsh': '\\u21B0',\n 'Lstrok': '\\u0141',\n 'Lt': '\\u226A',\n 'NestedLessLess': '\\u226A',\n 'll': '\\u226A',\n 'Map': '\\u2905',\n 'Mcy': '\\u041C',\n 'MediumSpace': '\\u205F',\n 'Mellintrf': '\\u2133',\n 'Mscr': '\\u2133',\n 'phmmat': '\\u2133',\n 'Mfr': '\\uD835\\uDD10',\n 'MinusPlus': '\\u2213',\n 'mnplus': '\\u2213',\n 'mp': '\\u2213',\n 'Mopf': '\\uD835\\uDD44',\n 'Mu': '\\u039C',\n 'NJcy': '\\u040A',\n 'Nacute': '\\u0143',\n 'Ncaron': '\\u0147',\n 'Ncedil': '\\u0145',\n 'Ncy': '\\u041D',\n 'NegativeMediumSpace': '\\u200B',\n 'NegativeThickSpace': '\\u200B',\n 'NegativeThinSpace': '\\u200B',\n 'NegativeVeryThinSpace': '\\u200B',\n 'ZeroWidthSpace': '\\u200B',\n 'NewLine': '\\u000A',\n 'Nfr': '\\uD835\\uDD11',\n 'NoBreak': '\\u2060',\n 'NonBreakingSpace': '\\u00A0',\n 'nbsp': '\\u00A0',\n 'Nopf': '\\u2115',\n 'naturals': '\\u2115',\n 'Not': '\\u2AEC',\n 'NotCongruent': '\\u2262',\n 'nequiv': '\\u2262',\n 'NotCupCap': '\\u226D',\n 'NotDoubleVerticalBar': '\\u2226',\n 'npar': '\\u2226',\n 'nparallel': '\\u2226',\n 'nshortparallel': '\\u2226',\n 'nspar': '\\u2226',\n 'NotElement': '\\u2209',\n 'notin': '\\u2209',\n 'notinva': '\\u2209',\n 'NotEqual': '\\u2260',\n 'ne': '\\u2260',\n 'NotEqualTilde': '\\u2242\\u0338',\n 'nesim': '\\u2242\\u0338',\n 'NotExists': '\\u2204',\n 'nexist': '\\u2204',\n 'nexists': '\\u2204',\n 'NotGreater': '\\u226F',\n 'ngt': '\\u226F',\n 'ngtr': '\\u226F',\n 'NotGreaterEqual': '\\u2271',\n 'nge': '\\u2271',\n 'ngeq': '\\u2271',\n 'NotGreaterFullEqual': '\\u2267\\u0338',\n 'ngE': '\\u2267\\u0338',\n 'ngeqq': '\\u2267\\u0338',\n 'NotGreaterGreater': '\\u226B\\u0338',\n 'nGtv': '\\u226B\\u0338',\n 'NotGreaterLess': '\\u2279',\n 'ntgl': '\\u2279',\n 'NotGreaterSlantEqual': '\\u2A7E\\u0338',\n 'ngeqslant': '\\u2A7E\\u0338',\n 'nges': '\\u2A7E\\u0338',\n 'NotGreaterTilde': '\\u2275',\n 'ngsim': '\\u2275',\n 'NotHumpDownHump': '\\u224E\\u0338',\n 'nbump': '\\u224E\\u0338',\n 'NotHumpEqual': '\\u224F\\u0338',\n 'nbumpe': '\\u224F\\u0338',\n 'NotLeftTriangle': '\\u22EA',\n 'nltri': '\\u22EA',\n 'ntriangleleft': '\\u22EA',\n 'NotLeftTriangleBar': '\\u29CF\\u0338',\n 'NotLeftTriangleEqual': '\\u22EC',\n 'nltrie': '\\u22EC',\n 'ntrianglelefteq': '\\u22EC',\n 'NotLess': '\\u226E',\n 'nless': '\\u226E',\n 'nlt': '\\u226E',\n 'NotLessEqual': '\\u2270',\n 'nle': '\\u2270',\n 'nleq': '\\u2270',\n 'NotLessGreater': '\\u2278',\n 'ntlg': '\\u2278',\n 'NotLessLess': '\\u226A\\u0338',\n 'nLtv': '\\u226A\\u0338',\n 'NotLessSlantEqual': '\\u2A7D\\u0338',\n 'nleqslant': '\\u2A7D\\u0338',\n 'nles': '\\u2A7D\\u0338',\n 'NotLessTilde': '\\u2274',\n 'nlsim': '\\u2274',\n 'NotNestedGreaterGreater': '\\u2AA2\\u0338',\n 'NotNestedLessLess': '\\u2AA1\\u0338',\n 'NotPrecedes': '\\u2280',\n 'npr': '\\u2280',\n 'nprec': '\\u2280',\n 'NotPrecedesEqual': '\\u2AAF\\u0338',\n 'npre': '\\u2AAF\\u0338',\n 'npreceq': '\\u2AAF\\u0338',\n 'NotPrecedesSlantEqual': '\\u22E0',\n 'nprcue': '\\u22E0',\n 'NotReverseElement': '\\u220C',\n 'notni': '\\u220C',\n 'notniva': '\\u220C',\n 'NotRightTriangle': '\\u22EB',\n 'nrtri': '\\u22EB',\n 'ntriangleright': '\\u22EB',\n 'NotRightTriangleBar': '\\u29D0\\u0338',\n 'NotRightTriangleEqual': '\\u22ED',\n 'nrtrie': '\\u22ED',\n 'ntrianglerighteq': '\\u22ED',\n 'NotSquareSubset': '\\u228F\\u0338',\n 'NotSquareSubsetEqual': '\\u22E2',\n 'nsqsube': '\\u22E2',\n 'NotSquareSuperset': '\\u2290\\u0338',\n 'NotSquareSupersetEqual': '\\u22E3',\n 'nsqsupe': '\\u22E3',\n 'NotSubset': '\\u2282\\u20D2',\n 'nsubset': '\\u2282\\u20D2',\n 'vnsub': '\\u2282\\u20D2',\n 'NotSubsetEqual': '\\u2288',\n 'nsube': '\\u2288',\n 'nsubseteq': '\\u2288',\n 'NotSucceeds': '\\u2281',\n 'nsc': '\\u2281',\n 'nsucc': '\\u2281',\n 'NotSucceedsEqual': '\\u2AB0\\u0338',\n 'nsce': '\\u2AB0\\u0338',\n 'nsucceq': '\\u2AB0\\u0338',\n 'NotSucceedsSlantEqual': '\\u22E1',\n 'nsccue': '\\u22E1',\n 'NotSucceedsTilde': '\\u227F\\u0338',\n 'NotSuperset': '\\u2283\\u20D2',\n 'nsupset': '\\u2283\\u20D2',\n 'vnsup': '\\u2283\\u20D2',\n 'NotSupersetEqual': '\\u2289',\n 'nsupe': '\\u2289',\n 'nsupseteq': '\\u2289',\n 'NotTilde': '\\u2241',\n 'nsim': '\\u2241',\n 'NotTildeEqual': '\\u2244',\n 'nsime': '\\u2244',\n 'nsimeq': '\\u2244',\n 'NotTildeFullEqual': '\\u2247',\n 'ncong': '\\u2247',\n 'NotTildeTilde': '\\u2249',\n 'nap': '\\u2249',\n 'napprox': '\\u2249',\n 'NotVerticalBar': '\\u2224',\n 'nmid': '\\u2224',\n 'nshortmid': '\\u2224',\n 'nsmid': '\\u2224',\n 'Nscr': '\\uD835\\uDCA9',\n 'Ntilde': '\\u00D1',\n 'Nu': '\\u039D',\n 'OElig': '\\u0152',\n 'Oacute': '\\u00D3',\n 'Ocirc': '\\u00D4',\n 'Ocy': '\\u041E',\n 'Odblac': '\\u0150',\n 'Ofr': '\\uD835\\uDD12',\n 'Ograve': '\\u00D2',\n 'Omacr': '\\u014C',\n 'Omega': '\\u03A9',\n 'ohm': '\\u03A9',\n 'Omicron': '\\u039F',\n 'Oopf': '\\uD835\\uDD46',\n 'OpenCurlyDoubleQuote': '\\u201C',\n 'ldquo': '\\u201C',\n 'OpenCurlyQuote': '\\u2018',\n 'lsquo': '\\u2018',\n 'Or': '\\u2A54',\n 'Oscr': '\\uD835\\uDCAA',\n 'Oslash': '\\u00D8',\n 'Otilde': '\\u00D5',\n 'Otimes': '\\u2A37',\n 'Ouml': '\\u00D6',\n 'OverBar': '\\u203E',\n 'oline': '\\u203E',\n 'OverBrace': '\\u23DE',\n 'OverBracket': '\\u23B4',\n 'tbrk': '\\u23B4',\n 'OverParenthesis': '\\u23DC',\n 'PartialD': '\\u2202',\n 'part': '\\u2202',\n 'Pcy': '\\u041F',\n 'Pfr': '\\uD835\\uDD13',\n 'Phi': '\\u03A6',\n 'Pi': '\\u03A0',\n 'PlusMinus': '\\u00B1',\n 'plusmn': '\\u00B1',\n 'pm': '\\u00B1',\n 'Popf': '\\u2119',\n 'primes': '\\u2119',\n 'Pr': '\\u2ABB',\n 'Precedes': '\\u227A',\n 'pr': '\\u227A',\n 'prec': '\\u227A',\n 'PrecedesEqual': '\\u2AAF',\n 'pre': '\\u2AAF',\n 'preceq': '\\u2AAF',\n 'PrecedesSlantEqual': '\\u227C',\n 'prcue': '\\u227C',\n 'preccurlyeq': '\\u227C',\n 'PrecedesTilde': '\\u227E',\n 'precsim': '\\u227E',\n 'prsim': '\\u227E',\n 'Prime': '\\u2033',\n 'Product': '\\u220F',\n 'prod': '\\u220F',\n 'Proportional': '\\u221D',\n 'prop': '\\u221D',\n 'propto': '\\u221D',\n 'varpropto': '\\u221D',\n 'vprop': '\\u221D',\n 'Pscr': '\\uD835\\uDCAB',\n 'Psi': '\\u03A8',\n 'QUOT': '\\u0022',\n 'quot': '\\u0022',\n 'Qfr': '\\uD835\\uDD14',\n 'Qopf': '\\u211A',\n 'rationals': '\\u211A',\n 'Qscr': '\\uD835\\uDCAC',\n 'RBarr': '\\u2910',\n 'drbkarow': '\\u2910',\n 'REG': '\\u00AE',\n 'circledR': '\\u00AE',\n 'reg': '\\u00AE',\n 'Racute': '\\u0154',\n 'Rang': '\\u27EB',\n 'Rarr': '\\u21A0',\n 'twoheadrightarrow': '\\u21A0',\n 'Rarrtl': '\\u2916',\n 'Rcaron': '\\u0158',\n 'Rcedil': '\\u0156',\n 'Rcy': '\\u0420',\n 'Re': '\\u211C',\n 'Rfr': '\\u211C',\n 'real': '\\u211C',\n 'realpart': '\\u211C',\n 'ReverseElement': '\\u220B',\n 'SuchThat': '\\u220B',\n 'ni': '\\u220B',\n 'niv': '\\u220B',\n 'ReverseEquilibrium': '\\u21CB',\n 'leftrightharpoons': '\\u21CB',\n 'lrhar': '\\u21CB',\n 'ReverseUpEquilibrium': '\\u296F',\n 'duhar': '\\u296F',\n 'Rho': '\\u03A1',\n 'RightAngleBracket': '\\u27E9',\n 'rang': '\\u27E9',\n 'rangle': '\\u27E9',\n 'RightArrow': '\\u2192',\n 'ShortRightArrow': '\\u2192',\n 'rarr': '\\u2192',\n 'rightarrow': '\\u2192',\n 'srarr': '\\u2192',\n 'RightArrowBar': '\\u21E5',\n 'rarrb': '\\u21E5',\n 'RightArrowLeftArrow': '\\u21C4',\n 'rightleftarrows': '\\u21C4',\n 'rlarr': '\\u21C4',\n 'RightCeiling': '\\u2309',\n 'rceil': '\\u2309',\n 'RightDoubleBracket': '\\u27E7',\n 'robrk': '\\u27E7',\n 'RightDownTeeVector': '\\u295D',\n 'RightDownVector': '\\u21C2',\n 'dharr': '\\u21C2',\n 'downharpoonright': '\\u21C2',\n 'RightDownVectorBar': '\\u2955',\n 'RightFloor': '\\u230B',\n 'rfloor': '\\u230B',\n 'RightTee': '\\u22A2',\n 'vdash': '\\u22A2',\n 'RightTeeArrow': '\\u21A6',\n 'map': '\\u21A6',\n 'mapsto': '\\u21A6',\n 'RightTeeVector': '\\u295B',\n 'RightTriangle': '\\u22B3',\n 'vartriangleright': '\\u22B3',\n 'vrtri': '\\u22B3',\n 'RightTriangleBar': '\\u29D0',\n 'RightTriangleEqual': '\\u22B5',\n 'rtrie': '\\u22B5',\n 'trianglerighteq': '\\u22B5',\n 'RightUpDownVector': '\\u294F',\n 'RightUpTeeVector': '\\u295C',\n 'RightUpVector': '\\u21BE',\n 'uharr': '\\u21BE',\n 'upharpoonright': '\\u21BE',\n 'RightUpVectorBar': '\\u2954',\n 'RightVector': '\\u21C0',\n 'rharu': '\\u21C0',\n 'rightharpoonup': '\\u21C0',\n 'RightVectorBar': '\\u2953',\n 'Ropf': '\\u211D',\n 'reals': '\\u211D',\n 'RoundImplies': '\\u2970',\n 'Rrightarrow': '\\u21DB',\n 'rAarr': '\\u21DB',\n 'Rscr': '\\u211B',\n 'realine': '\\u211B',\n 'Rsh': '\\u21B1',\n 'rsh': '\\u21B1',\n 'RuleDelayed': '\\u29F4',\n 'SHCHcy': '\\u0429',\n 'SHcy': '\\u0428',\n 'SOFTcy': '\\u042C',\n 'Sacute': '\\u015A',\n 'Sc': '\\u2ABC',\n 'Scaron': '\\u0160',\n 'Scedil': '\\u015E',\n 'Scirc': '\\u015C',\n 'Scy': '\\u0421',\n 'Sfr': '\\uD835\\uDD16',\n 'ShortUpArrow': '\\u2191',\n 'UpArrow': '\\u2191',\n 'uarr': '\\u2191',\n 'uparrow': '\\u2191',\n 'Sigma': '\\u03A3',\n 'SmallCircle': '\\u2218',\n 'compfn': '\\u2218',\n 'Sopf': '\\uD835\\uDD4A',\n 'Sqrt': '\\u221A',\n 'radic': '\\u221A',\n 'Square': '\\u25A1',\n 'squ': '\\u25A1',\n 'square': '\\u25A1',\n 'SquareIntersection': '\\u2293',\n 'sqcap': '\\u2293',\n 'SquareSubset': '\\u228F',\n 'sqsub': '\\u228F',\n 'sqsubset': '\\u228F',\n 'SquareSubsetEqual': '\\u2291',\n 'sqsube': '\\u2291',\n 'sqsubseteq': '\\u2291',\n 'SquareSuperset': '\\u2290',\n 'sqsup': '\\u2290',\n 'sqsupset': '\\u2290',\n 'SquareSupersetEqual': '\\u2292',\n 'sqsupe': '\\u2292',\n 'sqsupseteq': '\\u2292',\n 'SquareUnion': '\\u2294',\n 'sqcup': '\\u2294',\n 'Sscr': '\\uD835\\uDCAE',\n 'Star': '\\u22C6',\n 'sstarf': '\\u22C6',\n 'Sub': '\\u22D0',\n 'Subset': '\\u22D0',\n 'SubsetEqual': '\\u2286',\n 'sube': '\\u2286',\n 'subseteq': '\\u2286',\n 'Succeeds': '\\u227B',\n 'sc': '\\u227B',\n 'succ': '\\u227B',\n 'SucceedsEqual': '\\u2AB0',\n 'sce': '\\u2AB0',\n 'succeq': '\\u2AB0',\n 'SucceedsSlantEqual': '\\u227D',\n 'sccue': '\\u227D',\n 'succcurlyeq': '\\u227D',\n 'SucceedsTilde': '\\u227F',\n 'scsim': '\\u227F',\n 'succsim': '\\u227F',\n 'Sum': '\\u2211',\n 'sum': '\\u2211',\n 'Sup': '\\u22D1',\n 'Supset': '\\u22D1',\n 'Superset': '\\u2283',\n 'sup': '\\u2283',\n 'supset': '\\u2283',\n 'SupersetEqual': '\\u2287',\n 'supe': '\\u2287',\n 'supseteq': '\\u2287',\n 'THORN': '\\u00DE',\n 'TRADE': '\\u2122',\n 'trade': '\\u2122',\n 'TSHcy': '\\u040B',\n 'TScy': '\\u0426',\n 'Tab': '\\u0009',\n 'Tau': '\\u03A4',\n 'Tcaron': '\\u0164',\n 'Tcedil': '\\u0162',\n 'Tcy': '\\u0422',\n 'Tfr': '\\uD835\\uDD17',\n 'Therefore': '\\u2234',\n 'there4': '\\u2234',\n 'therefore': '\\u2234',\n 'Theta': '\\u0398',\n 'ThickSpace': '\\u205F\\u200A',\n 'ThinSpace': '\\u2009',\n 'thinsp': '\\u2009',\n 'Tilde': '\\u223C',\n 'sim': '\\u223C',\n 'thicksim': '\\u223C',\n 'thksim': '\\u223C',\n 'TildeEqual': '\\u2243',\n 'sime': '\\u2243',\n 'simeq': '\\u2243',\n 'TildeFullEqual': '\\u2245',\n 'cong': '\\u2245',\n 'TildeTilde': '\\u2248',\n 'ap': '\\u2248',\n 'approx': '\\u2248',\n 'asymp': '\\u2248',\n 'thickapprox': '\\u2248',\n 'thkap': '\\u2248',\n 'Topf': '\\uD835\\uDD4B',\n 'TripleDot': '\\u20DB',\n 'tdot': '\\u20DB',\n 'Tscr': '\\uD835\\uDCAF',\n 'Tstrok': '\\u0166',\n 'Uacute': '\\u00DA',\n 'Uarr': '\\u219F',\n 'Uarrocir': '\\u2949',\n 'Ubrcy': '\\u040E',\n 'Ubreve': '\\u016C',\n 'Ucirc': '\\u00DB',\n 'Ucy': '\\u0423',\n 'Udblac': '\\u0170',\n 'Ufr': '\\uD835\\uDD18',\n 'Ugrave': '\\u00D9',\n 'Umacr': '\\u016A',\n 'UnderBar': '\\u005F',\n 'lowbar': '\\u005F',\n 'UnderBrace': '\\u23DF',\n 'UnderBracket': '\\u23B5',\n 'bbrk': '\\u23B5',\n 'UnderParenthesis': '\\u23DD',\n 'Union': '\\u22C3',\n 'bigcup': '\\u22C3',\n 'xcup': '\\u22C3',\n 'UnionPlus': '\\u228E',\n 'uplus': '\\u228E',\n 'Uogon': '\\u0172',\n 'Uopf': '\\uD835\\uDD4C',\n 'UpArrowBar': '\\u2912',\n 'UpArrowDownArrow': '\\u21C5',\n 'udarr': '\\u21C5',\n 'UpDownArrow': '\\u2195',\n 'updownarrow': '\\u2195',\n 'varr': '\\u2195',\n 'UpEquilibrium': '\\u296E',\n 'udhar': '\\u296E',\n 'UpTee': '\\u22A5',\n 'bot': '\\u22A5',\n 'bottom': '\\u22A5',\n 'perp': '\\u22A5',\n 'UpTeeArrow': '\\u21A5',\n 'mapstoup': '\\u21A5',\n 'UpperLeftArrow': '\\u2196',\n 'nwarr': '\\u2196',\n 'nwarrow': '\\u2196',\n 'UpperRightArrow': '\\u2197',\n 'nearr': '\\u2197',\n 'nearrow': '\\u2197',\n 'Upsi': '\\u03D2',\n 'upsih': '\\u03D2',\n 'Upsilon': '\\u03A5',\n 'Uring': '\\u016E',\n 'Uscr': '\\uD835\\uDCB0',\n 'Utilde': '\\u0168',\n 'Uuml': '\\u00DC',\n 'VDash': '\\u22AB',\n 'Vbar': '\\u2AEB',\n 'Vcy': '\\u0412',\n 'Vdash': '\\u22A9',\n 'Vdashl': '\\u2AE6',\n 'Vee': '\\u22C1',\n 'bigvee': '\\u22C1',\n 'xvee': '\\u22C1',\n 'Verbar': '\\u2016',\n 'Vert': '\\u2016',\n 'VerticalBar': '\\u2223',\n 'mid': '\\u2223',\n 'shortmid': '\\u2223',\n 'smid': '\\u2223',\n 'VerticalLine': '\\u007C',\n 'verbar': '\\u007C',\n 'vert': '\\u007C',\n 'VerticalSeparator': '\\u2758',\n 'VerticalTilde': '\\u2240',\n 'wr': '\\u2240',\n 'wreath': '\\u2240',\n 'VeryThinSpace': '\\u200A',\n 'hairsp': '\\u200A',\n 'Vfr': '\\uD835\\uDD19',\n 'Vopf': '\\uD835\\uDD4D',\n 'Vscr': '\\uD835\\uDCB1',\n 'Vvdash': '\\u22AA',\n 'Wcirc': '\\u0174',\n 'Wedge': '\\u22C0',\n 'bigwedge': '\\u22C0',\n 'xwedge': '\\u22C0',\n 'Wfr': '\\uD835\\uDD1A',\n 'Wopf': '\\uD835\\uDD4E',\n 'Wscr': '\\uD835\\uDCB2',\n 'Xfr': '\\uD835\\uDD1B',\n 'Xi': '\\u039E',\n 'Xopf': '\\uD835\\uDD4F',\n 'Xscr': '\\uD835\\uDCB3',\n 'YAcy': '\\u042F',\n 'YIcy': '\\u0407',\n 'YUcy': '\\u042E',\n 'Yacute': '\\u00DD',\n 'Ycirc': '\\u0176',\n 'Ycy': '\\u042B',\n 'Yfr': '\\uD835\\uDD1C',\n 'Yopf': '\\uD835\\uDD50',\n 'Yscr': '\\uD835\\uDCB4',\n 'Yuml': '\\u0178',\n 'ZHcy': '\\u0416',\n 'Zacute': '\\u0179',\n 'Zcaron': '\\u017D',\n 'Zcy': '\\u0417',\n 'Zdot': '\\u017B',\n 'Zeta': '\\u0396',\n 'Zfr': '\\u2128',\n 'zeetrf': '\\u2128',\n 'Zopf': '\\u2124',\n 'integers': '\\u2124',\n 'Zscr': '\\uD835\\uDCB5',\n 'aacute': '\\u00E1',\n 'abreve': '\\u0103',\n 'ac': '\\u223E',\n 'mstpos': '\\u223E',\n 'acE': '\\u223E\\u0333',\n 'acd': '\\u223F',\n 'acirc': '\\u00E2',\n 'acy': '\\u0430',\n 'aelig': '\\u00E6',\n 'afr': '\\uD835\\uDD1E',\n 'agrave': '\\u00E0',\n 'alefsym': '\\u2135',\n 'aleph': '\\u2135',\n 'alpha': '\\u03B1',\n 'amacr': '\\u0101',\n 'amalg': '\\u2A3F',\n 'and': '\\u2227',\n 'wedge': '\\u2227',\n 'andand': '\\u2A55',\n 'andd': '\\u2A5C',\n 'andslope': '\\u2A58',\n 'andv': '\\u2A5A',\n 'ang': '\\u2220',\n 'angle': '\\u2220',\n 'ange': '\\u29A4',\n 'angmsd': '\\u2221',\n 'measuredangle': '\\u2221',\n 'angmsdaa': '\\u29A8',\n 'angmsdab': '\\u29A9',\n 'angmsdac': '\\u29AA',\n 'angmsdad': '\\u29AB',\n 'angmsdae': '\\u29AC',\n 'angmsdaf': '\\u29AD',\n 'angmsdag': '\\u29AE',\n 'angmsdah': '\\u29AF',\n 'angrt': '\\u221F',\n 'angrtvb': '\\u22BE',\n 'angrtvbd': '\\u299D',\n 'angsph': '\\u2222',\n 'angzarr': '\\u237C',\n 'aogon': '\\u0105',\n 'aopf': '\\uD835\\uDD52',\n 'apE': '\\u2A70',\n 'apacir': '\\u2A6F',\n 'ape': '\\u224A',\n 'approxeq': '\\u224A',\n 'apid': '\\u224B',\n 'apos': '\\u0027',\n 'aring': '\\u00E5',\n 'ascr': '\\uD835\\uDCB6',\n 'ast': '\\u002A',\n 'midast': '\\u002A',\n 'atilde': '\\u00E3',\n 'auml': '\\u00E4',\n 'awint': '\\u2A11',\n 'bNot': '\\u2AED',\n 'backcong': '\\u224C',\n 'bcong': '\\u224C',\n 'backepsilon': '\\u03F6',\n 'bepsi': '\\u03F6',\n 'backprime': '\\u2035',\n 'bprime': '\\u2035',\n 'backsim': '\\u223D',\n 'bsim': '\\u223D',\n 'backsimeq': '\\u22CD',\n 'bsime': '\\u22CD',\n 'barvee': '\\u22BD',\n 'barwed': '\\u2305',\n 'barwedge': '\\u2305',\n 'bbrktbrk': '\\u23B6',\n 'bcy': '\\u0431',\n 'bdquo': '\\u201E',\n 'ldquor': '\\u201E',\n 'bemptyv': '\\u29B0',\n 'beta': '\\u03B2',\n 'beth': '\\u2136',\n 'between': '\\u226C',\n 'twixt': '\\u226C',\n 'bfr': '\\uD835\\uDD1F',\n 'bigcirc': '\\u25EF',\n 'xcirc': '\\u25EF',\n 'bigodot': '\\u2A00',\n 'xodot': '\\u2A00',\n 'bigoplus': '\\u2A01',\n 'xoplus': '\\u2A01',\n 'bigotimes': '\\u2A02',\n 'xotime': '\\u2A02',\n 'bigsqcup': '\\u2A06',\n 'xsqcup': '\\u2A06',\n 'bigstar': '\\u2605',\n 'starf': '\\u2605',\n 'bigtriangledown': '\\u25BD',\n 'xdtri': '\\u25BD',\n 'bigtriangleup': '\\u25B3',\n 'xutri': '\\u25B3',\n 'biguplus': '\\u2A04',\n 'xuplus': '\\u2A04',\n 'bkarow': '\\u290D',\n 'rbarr': '\\u290D',\n 'blacklozenge': '\\u29EB',\n 'lozf': '\\u29EB',\n 'blacktriangle': '\\u25B4',\n 'utrif': '\\u25B4',\n 'blacktriangledown': '\\u25BE',\n 'dtrif': '\\u25BE',\n 'blacktriangleleft': '\\u25C2',\n 'ltrif': '\\u25C2',\n 'blacktriangleright': '\\u25B8',\n 'rtrif': '\\u25B8',\n 'blank': '\\u2423',\n 'blk12': '\\u2592',\n 'blk14': '\\u2591',\n 'blk34': '\\u2593',\n 'block': '\\u2588',\n 'bne': '\\u003D\\u20E5',\n 'bnequiv': '\\u2261\\u20E5',\n 'bnot': '\\u2310',\n 'bopf': '\\uD835\\uDD53',\n 'bowtie': '\\u22C8',\n 'boxDL': '\\u2557',\n 'boxDR': '\\u2554',\n 'boxDl': '\\u2556',\n 'boxDr': '\\u2553',\n 'boxH': '\\u2550',\n 'boxHD': '\\u2566',\n 'boxHU': '\\u2569',\n 'boxHd': '\\u2564',\n 'boxHu': '\\u2567',\n 'boxUL': '\\u255D',\n 'boxUR': '\\u255A',\n 'boxUl': '\\u255C',\n 'boxUr': '\\u2559',\n 'boxV': '\\u2551',\n 'boxVH': '\\u256C',\n 'boxVL': '\\u2563',\n 'boxVR': '\\u2560',\n 'boxVh': '\\u256B',\n 'boxVl': '\\u2562',\n 'boxVr': '\\u255F',\n 'boxbox': '\\u29C9',\n 'boxdL': '\\u2555',\n 'boxdR': '\\u2552',\n 'boxdl': '\\u2510',\n 'boxdr': '\\u250C',\n 'boxhD': '\\u2565',\n 'boxhU': '\\u2568',\n 'boxhd': '\\u252C',\n 'boxhu': '\\u2534',\n 'boxminus': '\\u229F',\n 'minusb': '\\u229F',\n 'boxplus': '\\u229E',\n 'plusb': '\\u229E',\n 'boxtimes': '\\u22A0',\n 'timesb': '\\u22A0',\n 'boxuL': '\\u255B',\n 'boxuR': '\\u2558',\n 'boxul': '\\u2518',\n 'boxur': '\\u2514',\n 'boxv': '\\u2502',\n 'boxvH': '\\u256A',\n 'boxvL': '\\u2561',\n 'boxvR': '\\u255E',\n 'boxvh': '\\u253C',\n 'boxvl': '\\u2524',\n 'boxvr': '\\u251C',\n 'brvbar': '\\u00A6',\n 'bscr': '\\uD835\\uDCB7',\n 'bsemi': '\\u204F',\n 'bsol': '\\u005C',\n 'bsolb': '\\u29C5',\n 'bsolhsub': '\\u27C8',\n 'bull': '\\u2022',\n 'bullet': '\\u2022',\n 'bumpE': '\\u2AAE',\n 'cacute': '\\u0107',\n 'cap': '\\u2229',\n 'capand': '\\u2A44',\n 'capbrcup': '\\u2A49',\n 'capcap': '\\u2A4B',\n 'capcup': '\\u2A47',\n 'capdot': '\\u2A40',\n 'caps': '\\u2229\\uFE00',\n 'caret': '\\u2041',\n 'ccaps': '\\u2A4D',\n 'ccaron': '\\u010D',\n 'ccedil': '\\u00E7',\n 'ccirc': '\\u0109',\n 'ccups': '\\u2A4C',\n 'ccupssm': '\\u2A50',\n 'cdot': '\\u010B',\n 'cemptyv': '\\u29B2',\n 'cent': '\\u00A2',\n 'cfr': '\\uD835\\uDD20',\n 'chcy': '\\u0447',\n 'check': '\\u2713',\n 'checkmark': '\\u2713',\n 'chi': '\\u03C7',\n 'cir': '\\u25CB',\n 'cirE': '\\u29C3',\n 'circ': '\\u02C6',\n 'circeq': '\\u2257',\n 'cire': '\\u2257',\n 'circlearrowleft': '\\u21BA',\n 'olarr': '\\u21BA',\n 'circlearrowright': '\\u21BB',\n 'orarr': '\\u21BB',\n 'circledS': '\\u24C8',\n 'oS': '\\u24C8',\n 'circledast': '\\u229B',\n 'oast': '\\u229B',\n 'circledcirc': '\\u229A',\n 'ocir': '\\u229A',\n 'circleddash': '\\u229D',\n 'odash': '\\u229D',\n 'cirfnint': '\\u2A10',\n 'cirmid': '\\u2AEF',\n 'cirscir': '\\u29C2',\n 'clubs': '\\u2663',\n 'clubsuit': '\\u2663',\n 'colon': '\\u003A',\n 'comma': '\\u002C',\n 'commat': '\\u0040',\n 'comp': '\\u2201',\n 'complement': '\\u2201',\n 'congdot': '\\u2A6D',\n 'copf': '\\uD835\\uDD54',\n 'copysr': '\\u2117',\n 'crarr': '\\u21B5',\n 'cross': '\\u2717',\n 'cscr': '\\uD835\\uDCB8',\n 'csub': '\\u2ACF',\n 'csube': '\\u2AD1',\n 'csup': '\\u2AD0',\n 'csupe': '\\u2AD2',\n 'ctdot': '\\u22EF',\n 'cudarrl': '\\u2938',\n 'cudarrr': '\\u2935',\n 'cuepr': '\\u22DE',\n 'curlyeqprec': '\\u22DE',\n 'cuesc': '\\u22DF',\n 'curlyeqsucc': '\\u22DF',\n 'cularr': '\\u21B6',\n 'curvearrowleft': '\\u21B6',\n 'cularrp': '\\u293D',\n 'cup': '\\u222A',\n 'cupbrcap': '\\u2A48',\n 'cupcap': '\\u2A46',\n 'cupcup': '\\u2A4A',\n 'cupdot': '\\u228D',\n 'cupor': '\\u2A45',\n 'cups': '\\u222A\\uFE00',\n 'curarr': '\\u21B7',\n 'curvearrowright': '\\u21B7',\n 'curarrm': '\\u293C',\n 'curlyvee': '\\u22CE',\n 'cuvee': '\\u22CE',\n 'curlywedge': '\\u22CF',\n 'cuwed': '\\u22CF',\n 'curren': '\\u00A4',\n 'cwint': '\\u2231',\n 'cylcty': '\\u232D',\n 'dHar': '\\u2965',\n 'dagger': '\\u2020',\n 'daleth': '\\u2138',\n 'dash': '\\u2010',\n 'hyphen': '\\u2010',\n 'dbkarow': '\\u290F',\n 'rBarr': '\\u290F',\n 'dcaron': '\\u010F',\n 'dcy': '\\u0434',\n 'ddarr': '\\u21CA',\n 'downdownarrows': '\\u21CA',\n 'ddotseq': '\\u2A77',\n 'eDDot': '\\u2A77',\n 'deg': '\\u00B0',\n 'delta': '\\u03B4',\n 'demptyv': '\\u29B1',\n 'dfisht': '\\u297F',\n 'dfr': '\\uD835\\uDD21',\n 'diamondsuit': '\\u2666',\n 'diams': '\\u2666',\n 'digamma': '\\u03DD',\n 'gammad': '\\u03DD',\n 'disin': '\\u22F2',\n 'div': '\\u00F7',\n 'divide': '\\u00F7',\n 'divideontimes': '\\u22C7',\n 'divonx': '\\u22C7',\n 'djcy': '\\u0452',\n 'dlcorn': '\\u231E',\n 'llcorner': '\\u231E',\n 'dlcrop': '\\u230D',\n 'dollar': '\\u0024',\n 'dopf': '\\uD835\\uDD55',\n 'doteqdot': '\\u2251',\n 'eDot': '\\u2251',\n 'dotminus': '\\u2238',\n 'minusd': '\\u2238',\n 'dotplus': '\\u2214',\n 'plusdo': '\\u2214',\n 'dotsquare': '\\u22A1',\n 'sdotb': '\\u22A1',\n 'drcorn': '\\u231F',\n 'lrcorner': '\\u231F',\n 'drcrop': '\\u230C',\n 'dscr': '\\uD835\\uDCB9',\n 'dscy': '\\u0455',\n 'dsol': '\\u29F6',\n 'dstrok': '\\u0111',\n 'dtdot': '\\u22F1',\n 'dtri': '\\u25BF',\n 'triangledown': '\\u25BF',\n 'dwangle': '\\u29A6',\n 'dzcy': '\\u045F',\n 'dzigrarr': '\\u27FF',\n 'eacute': '\\u00E9',\n 'easter': '\\u2A6E',\n 'ecaron': '\\u011B',\n 'ecir': '\\u2256',\n 'eqcirc': '\\u2256',\n 'ecirc': '\\u00EA',\n 'ecolon': '\\u2255',\n 'eqcolon': '\\u2255',\n 'ecy': '\\u044D',\n 'edot': '\\u0117',\n 'efDot': '\\u2252',\n 'fallingdotseq': '\\u2252',\n 'efr': '\\uD835\\uDD22',\n 'eg': '\\u2A9A',\n 'egrave': '\\u00E8',\n 'egs': '\\u2A96',\n 'eqslantgtr': '\\u2A96',\n 'egsdot': '\\u2A98',\n 'el': '\\u2A99',\n 'elinters': '\\u23E7',\n 'ell': '\\u2113',\n 'els': '\\u2A95',\n 'eqslantless': '\\u2A95',\n 'elsdot': '\\u2A97',\n 'emacr': '\\u0113',\n 'empty': '\\u2205',\n 'emptyset': '\\u2205',\n 'emptyv': '\\u2205',\n 'varnothing': '\\u2205',\n 'emsp13': '\\u2004',\n 'emsp14': '\\u2005',\n 'emsp': '\\u2003',\n 'eng': '\\u014B',\n 'ensp': '\\u2002',\n 'eogon': '\\u0119',\n 'eopf': '\\uD835\\uDD56',\n 'epar': '\\u22D5',\n 'eparsl': '\\u29E3',\n 'eplus': '\\u2A71',\n 'epsi': '\\u03B5',\n 'epsilon': '\\u03B5',\n 'epsiv': '\\u03F5',\n 'straightepsilon': '\\u03F5',\n 'varepsilon': '\\u03F5',\n 'equals': '\\u003D',\n 'equest': '\\u225F',\n 'questeq': '\\u225F',\n 'equivDD': '\\u2A78',\n 'eqvparsl': '\\u29E5',\n 'erDot': '\\u2253',\n 'risingdotseq': '\\u2253',\n 'erarr': '\\u2971',\n 'escr': '\\u212F',\n 'eta': '\\u03B7',\n 'eth': '\\u00F0',\n 'euml': '\\u00EB',\n 'euro': '\\u20AC',\n 'excl': '\\u0021',\n 'fcy': '\\u0444',\n 'female': '\\u2640',\n 'ffilig': '\\uFB03',\n 'fflig': '\\uFB00',\n 'ffllig': '\\uFB04',\n 'ffr': '\\uD835\\uDD23',\n 'filig': '\\uFB01',\n 'fjlig': '\\u0066\\u006A',\n 'flat': '\\u266D',\n 'fllig': '\\uFB02',\n 'fltns': '\\u25B1',\n 'fnof': '\\u0192',\n 'fopf': '\\uD835\\uDD57',\n 'fork': '\\u22D4',\n 'pitchfork': '\\u22D4',\n 'forkv': '\\u2AD9',\n 'fpartint': '\\u2A0D',\n 'frac12': '\\u00BD',\n 'half': '\\u00BD',\n 'frac13': '\\u2153',\n 'frac14': '\\u00BC',\n 'frac15': '\\u2155',\n 'frac16': '\\u2159',\n 'frac18': '\\u215B',\n 'frac23': '\\u2154',\n 'frac25': '\\u2156',\n 'frac34': '\\u00BE',\n 'frac35': '\\u2157',\n 'frac38': '\\u215C',\n 'frac45': '\\u2158',\n 'frac56': '\\u215A',\n 'frac58': '\\u215D',\n 'frac78': '\\u215E',\n 'frasl': '\\u2044',\n 'frown': '\\u2322',\n 'sfrown': '\\u2322',\n 'fscr': '\\uD835\\uDCBB',\n 'gEl': '\\u2A8C',\n 'gtreqqless': '\\u2A8C',\n 'gacute': '\\u01F5',\n 'gamma': '\\u03B3',\n 'gap': '\\u2A86',\n 'gtrapprox': '\\u2A86',\n 'gbreve': '\\u011F',\n 'gcirc': '\\u011D',\n 'gcy': '\\u0433',\n 'gdot': '\\u0121',\n 'gescc': '\\u2AA9',\n 'gesdot': '\\u2A80',\n 'gesdoto': '\\u2A82',\n 'gesdotol': '\\u2A84',\n 'gesl': '\\u22DB\\uFE00',\n 'gesles': '\\u2A94',\n 'gfr': '\\uD835\\uDD24',\n 'gimel': '\\u2137',\n 'gjcy': '\\u0453',\n 'glE': '\\u2A92',\n 'gla': '\\u2AA5',\n 'glj': '\\u2AA4',\n 'gnE': '\\u2269',\n 'gneqq': '\\u2269',\n 'gnap': '\\u2A8A',\n 'gnapprox': '\\u2A8A',\n 'gne': '\\u2A88',\n 'gneq': '\\u2A88',\n 'gnsim': '\\u22E7',\n 'gopf': '\\uD835\\uDD58',\n 'gscr': '\\u210A',\n 'gsime': '\\u2A8E',\n 'gsiml': '\\u2A90',\n 'gtcc': '\\u2AA7',\n 'gtcir': '\\u2A7A',\n 'gtdot': '\\u22D7',\n 'gtrdot': '\\u22D7',\n 'gtlPar': '\\u2995',\n 'gtquest': '\\u2A7C',\n 'gtrarr': '\\u2978',\n 'gvertneqq': '\\u2269\\uFE00',\n 'gvnE': '\\u2269\\uFE00',\n 'hardcy': '\\u044A',\n 'harrcir': '\\u2948',\n 'harrw': '\\u21AD',\n 'leftrightsquigarrow': '\\u21AD',\n 'hbar': '\\u210F',\n 'hslash': '\\u210F',\n 'planck': '\\u210F',\n 'plankv': '\\u210F',\n 'hcirc': '\\u0125',\n 'hearts': '\\u2665',\n 'heartsuit': '\\u2665',\n 'hellip': '\\u2026',\n 'mldr': '\\u2026',\n 'hercon': '\\u22B9',\n 'hfr': '\\uD835\\uDD25',\n 'hksearow': '\\u2925',\n 'searhk': '\\u2925',\n 'hkswarow': '\\u2926',\n 'swarhk': '\\u2926',\n 'hoarr': '\\u21FF',\n 'homtht': '\\u223B',\n 'hookleftarrow': '\\u21A9',\n 'larrhk': '\\u21A9',\n 'hookrightarrow': '\\u21AA',\n 'rarrhk': '\\u21AA',\n 'hopf': '\\uD835\\uDD59',\n 'horbar': '\\u2015',\n 'hscr': '\\uD835\\uDCBD',\n 'hstrok': '\\u0127',\n 'hybull': '\\u2043',\n 'iacute': '\\u00ED',\n 'icirc': '\\u00EE',\n 'icy': '\\u0438',\n 'iecy': '\\u0435',\n 'iexcl': '\\u00A1',\n 'ifr': '\\uD835\\uDD26',\n 'igrave': '\\u00EC',\n 'iiiint': '\\u2A0C',\n 'qint': '\\u2A0C',\n 'iiint': '\\u222D',\n 'tint': '\\u222D',\n 'iinfin': '\\u29DC',\n 'iiota': '\\u2129',\n 'ijlig': '\\u0133',\n 'imacr': '\\u012B',\n 'imath': '\\u0131',\n 'inodot': '\\u0131',\n 'imof': '\\u22B7',\n 'imped': '\\u01B5',\n 'incare': '\\u2105',\n 'infin': '\\u221E',\n 'infintie': '\\u29DD',\n 'intcal': '\\u22BA',\n 'intercal': '\\u22BA',\n 'intlarhk': '\\u2A17',\n 'intprod': '\\u2A3C',\n 'iprod': '\\u2A3C',\n 'iocy': '\\u0451',\n 'iogon': '\\u012F',\n 'iopf': '\\uD835\\uDD5A',\n 'iota': '\\u03B9',\n 'iquest': '\\u00BF',\n 'iscr': '\\uD835\\uDCBE',\n 'isinE': '\\u22F9',\n 'isindot': '\\u22F5',\n 'isins': '\\u22F4',\n 'isinsv': '\\u22F3',\n 'itilde': '\\u0129',\n 'iukcy': '\\u0456',\n 'iuml': '\\u00EF',\n 'jcirc': '\\u0135',\n 'jcy': '\\u0439',\n 'jfr': '\\uD835\\uDD27',\n 'jmath': '\\u0237',\n 'jopf': '\\uD835\\uDD5B',\n 'jscr': '\\uD835\\uDCBF',\n 'jsercy': '\\u0458',\n 'jukcy': '\\u0454',\n 'kappa': '\\u03BA',\n 'kappav': '\\u03F0',\n 'varkappa': '\\u03F0',\n 'kcedil': '\\u0137',\n 'kcy': '\\u043A',\n 'kfr': '\\uD835\\uDD28',\n 'kgreen': '\\u0138',\n 'khcy': '\\u0445',\n 'kjcy': '\\u045C',\n 'kopf': '\\uD835\\uDD5C',\n 'kscr': '\\uD835\\uDCC0',\n 'lAtail': '\\u291B',\n 'lBarr': '\\u290E',\n 'lEg': '\\u2A8B',\n 'lesseqqgtr': '\\u2A8B',\n 'lHar': '\\u2962',\n 'lacute': '\\u013A',\n 'laemptyv': '\\u29B4',\n 'lambda': '\\u03BB',\n 'langd': '\\u2991',\n 'lap': '\\u2A85',\n 'lessapprox': '\\u2A85',\n 'laquo': '\\u00AB',\n 'larrbfs': '\\u291F',\n 'larrfs': '\\u291D',\n 'larrlp': '\\u21AB',\n 'looparrowleft': '\\u21AB',\n 'larrpl': '\\u2939',\n 'larrsim': '\\u2973',\n 'larrtl': '\\u21A2',\n 'leftarrowtail': '\\u21A2',\n 'lat': '\\u2AAB',\n 'latail': '\\u2919',\n 'late': '\\u2AAD',\n 'lates': '\\u2AAD\\uFE00',\n 'lbarr': '\\u290C',\n 'lbbrk': '\\u2772',\n 'lbrace': '\\u007B',\n 'lcub': '\\u007B',\n 'lbrack': '\\u005B',\n 'lsqb': '\\u005B',\n 'lbrke': '\\u298B',\n 'lbrksld': '\\u298F',\n 'lbrkslu': '\\u298D',\n 'lcaron': '\\u013E',\n 'lcedil': '\\u013C',\n 'lcy': '\\u043B',\n 'ldca': '\\u2936',\n 'ldrdhar': '\\u2967',\n 'ldrushar': '\\u294B',\n 'ldsh': '\\u21B2',\n 'le': '\\u2264',\n 'leq': '\\u2264',\n 'leftleftarrows': '\\u21C7',\n 'llarr': '\\u21C7',\n 'leftthreetimes': '\\u22CB',\n 'lthree': '\\u22CB',\n 'lescc': '\\u2AA8',\n 'lesdot': '\\u2A7F',\n 'lesdoto': '\\u2A81',\n 'lesdotor': '\\u2A83',\n 'lesg': '\\u22DA\\uFE00',\n 'lesges': '\\u2A93',\n 'lessdot': '\\u22D6',\n 'ltdot': '\\u22D6',\n 'lfisht': '\\u297C',\n 'lfr': '\\uD835\\uDD29',\n 'lgE': '\\u2A91',\n 'lharul': '\\u296A',\n 'lhblk': '\\u2584',\n 'ljcy': '\\u0459',\n 'llhard': '\\u296B',\n 'lltri': '\\u25FA',\n 'lmidot': '\\u0140',\n 'lmoust': '\\u23B0',\n 'lmoustache': '\\u23B0',\n 'lnE': '\\u2268',\n 'lneqq': '\\u2268',\n 'lnap': '\\u2A89',\n 'lnapprox': '\\u2A89',\n 'lne': '\\u2A87',\n 'lneq': '\\u2A87',\n 'lnsim': '\\u22E6',\n 'loang': '\\u27EC',\n 'loarr': '\\u21FD',\n 'longmapsto': '\\u27FC',\n 'xmap': '\\u27FC',\n 'looparrowright': '\\u21AC',\n 'rarrlp': '\\u21AC',\n 'lopar': '\\u2985',\n 'lopf': '\\uD835\\uDD5D',\n 'loplus': '\\u2A2D',\n 'lotimes': '\\u2A34',\n 'lowast': '\\u2217',\n 'loz': '\\u25CA',\n 'lozenge': '\\u25CA',\n 'lpar': '\\u0028',\n 'lparlt': '\\u2993',\n 'lrhard': '\\u296D',\n 'lrm': '\\u200E',\n 'lrtri': '\\u22BF',\n 'lsaquo': '\\u2039',\n 'lscr': '\\uD835\\uDCC1',\n 'lsime': '\\u2A8D',\n 'lsimg': '\\u2A8F',\n 'lsquor': '\\u201A',\n 'sbquo': '\\u201A',\n 'lstrok': '\\u0142',\n 'ltcc': '\\u2AA6',\n 'ltcir': '\\u2A79',\n 'ltimes': '\\u22C9',\n 'ltlarr': '\\u2976',\n 'ltquest': '\\u2A7B',\n 'ltrPar': '\\u2996',\n 'ltri': '\\u25C3',\n 'triangleleft': '\\u25C3',\n 'lurdshar': '\\u294A',\n 'luruhar': '\\u2966',\n 'lvertneqq': '\\u2268\\uFE00',\n 'lvnE': '\\u2268\\uFE00',\n 'mDDot': '\\u223A',\n 'macr': '\\u00AF',\n 'strns': '\\u00AF',\n 'male': '\\u2642',\n 'malt': '\\u2720',\n 'maltese': '\\u2720',\n 'marker': '\\u25AE',\n 'mcomma': '\\u2A29',\n 'mcy': '\\u043C',\n 'mdash': '\\u2014',\n 'mfr': '\\uD835\\uDD2A',\n 'mho': '\\u2127',\n 'micro': '\\u00B5',\n 'midcir': '\\u2AF0',\n 'minus': '\\u2212',\n 'minusdu': '\\u2A2A',\n 'mlcp': '\\u2ADB',\n 'models': '\\u22A7',\n 'mopf': '\\uD835\\uDD5E',\n 'mscr': '\\uD835\\uDCC2',\n 'mu': '\\u03BC',\n 'multimap': '\\u22B8',\n 'mumap': '\\u22B8',\n 'nGg': '\\u22D9\\u0338',\n 'nGt': '\\u226B\\u20D2',\n 'nLeftarrow': '\\u21CD',\n 'nlArr': '\\u21CD',\n 'nLeftrightarrow': '\\u21CE',\n 'nhArr': '\\u21CE',\n 'nLl': '\\u22D8\\u0338',\n 'nLt': '\\u226A\\u20D2',\n 'nRightarrow': '\\u21CF',\n 'nrArr': '\\u21CF',\n 'nVDash': '\\u22AF',\n 'nVdash': '\\u22AE',\n 'nacute': '\\u0144',\n 'nang': '\\u2220\\u20D2',\n 'napE': '\\u2A70\\u0338',\n 'napid': '\\u224B\\u0338',\n 'napos': '\\u0149',\n 'natur': '\\u266E',\n 'natural': '\\u266E',\n 'ncap': '\\u2A43',\n 'ncaron': '\\u0148',\n 'ncedil': '\\u0146',\n 'ncongdot': '\\u2A6D\\u0338',\n 'ncup': '\\u2A42',\n 'ncy': '\\u043D',\n 'ndash': '\\u2013',\n 'neArr': '\\u21D7',\n 'nearhk': '\\u2924',\n 'nedot': '\\u2250\\u0338',\n 'nesear': '\\u2928',\n 'toea': '\\u2928',\n 'nfr': '\\uD835\\uDD2B',\n 'nharr': '\\u21AE',\n 'nleftrightarrow': '\\u21AE',\n 'nhpar': '\\u2AF2',\n 'nis': '\\u22FC',\n 'nisd': '\\u22FA',\n 'njcy': '\\u045A',\n 'nlE': '\\u2266\\u0338',\n 'nleqq': '\\u2266\\u0338',\n 'nlarr': '\\u219A',\n 'nleftarrow': '\\u219A',\n 'nldr': '\\u2025',\n 'nopf': '\\uD835\\uDD5F',\n 'not': '\\u00AC',\n 'notinE': '\\u22F9\\u0338',\n 'notindot': '\\u22F5\\u0338',\n 'notinvb': '\\u22F7',\n 'notinvc': '\\u22F6',\n 'notnivb': '\\u22FE',\n 'notnivc': '\\u22FD',\n 'nparsl': '\\u2AFD\\u20E5',\n 'npart': '\\u2202\\u0338',\n 'npolint': '\\u2A14',\n 'nrarr': '\\u219B',\n 'nrightarrow': '\\u219B',\n 'nrarrc': '\\u2933\\u0338',\n 'nrarrw': '\\u219D\\u0338',\n 'nscr': '\\uD835\\uDCC3',\n 'nsub': '\\u2284',\n 'nsubE': '\\u2AC5\\u0338',\n 'nsubseteqq': '\\u2AC5\\u0338',\n 'nsup': '\\u2285',\n 'nsupE': '\\u2AC6\\u0338',\n 'nsupseteqq': '\\u2AC6\\u0338',\n 'ntilde': '\\u00F1',\n 'nu': '\\u03BD',\n 'num': '\\u0023',\n 'numero': '\\u2116',\n 'numsp': '\\u2007',\n 'nvDash': '\\u22AD',\n 'nvHarr': '\\u2904',\n 'nvap': '\\u224D\\u20D2',\n 'nvdash': '\\u22AC',\n 'nvge': '\\u2265\\u20D2',\n 'nvgt': '\\u003E\\u20D2',\n 'nvinfin': '\\u29DE',\n 'nvlArr': '\\u2902',\n 'nvle': '\\u2264\\u20D2',\n 'nvlt': '\\u003C\\u20D2',\n 'nvltrie': '\\u22B4\\u20D2',\n 'nvrArr': '\\u2903',\n 'nvrtrie': '\\u22B5\\u20D2',\n 'nvsim': '\\u223C\\u20D2',\n 'nwArr': '\\u21D6',\n 'nwarhk': '\\u2923',\n 'nwnear': '\\u2927',\n 'oacute': '\\u00F3',\n 'ocirc': '\\u00F4',\n 'ocy': '\\u043E',\n 'odblac': '\\u0151',\n 'odiv': '\\u2A38',\n 'odsold': '\\u29BC',\n 'oelig': '\\u0153',\n 'ofcir': '\\u29BF',\n 'ofr': '\\uD835\\uDD2C',\n 'ogon': '\\u02DB',\n 'ograve': '\\u00F2',\n 'ogt': '\\u29C1',\n 'ohbar': '\\u29B5',\n 'olcir': '\\u29BE',\n 'olcross': '\\u29BB',\n 'olt': '\\u29C0',\n 'omacr': '\\u014D',\n 'omega': '\\u03C9',\n 'omicron': '\\u03BF',\n 'omid': '\\u29B6',\n 'oopf': '\\uD835\\uDD60',\n 'opar': '\\u29B7',\n 'operp': '\\u29B9',\n 'or': '\\u2228',\n 'vee': '\\u2228',\n 'ord': '\\u2A5D',\n 'order': '\\u2134',\n 'orderof': '\\u2134',\n 'oscr': '\\u2134',\n 'ordf': '\\u00AA',\n 'ordm': '\\u00BA',\n 'origof': '\\u22B6',\n 'oror': '\\u2A56',\n 'orslope': '\\u2A57',\n 'orv': '\\u2A5B',\n 'oslash': '\\u00F8',\n 'osol': '\\u2298',\n 'otilde': '\\u00F5',\n 'otimesas': '\\u2A36',\n 'ouml': '\\u00F6',\n 'ovbar': '\\u233D',\n 'para': '\\u00B6',\n 'parsim': '\\u2AF3',\n 'parsl': '\\u2AFD',\n 'pcy': '\\u043F',\n 'percnt': '\\u0025',\n 'period': '\\u002E',\n 'permil': '\\u2030',\n 'pertenk': '\\u2031',\n 'pfr': '\\uD835\\uDD2D',\n 'phi': '\\u03C6',\n 'phiv': '\\u03D5',\n 'straightphi': '\\u03D5',\n 'varphi': '\\u03D5',\n 'phone': '\\u260E',\n 'pi': '\\u03C0',\n 'piv': '\\u03D6',\n 'varpi': '\\u03D6',\n 'planckh': '\\u210E',\n 'plus': '\\u002B',\n 'plusacir': '\\u2A23',\n 'pluscir': '\\u2A22',\n 'plusdu': '\\u2A25',\n 'pluse': '\\u2A72',\n 'plussim': '\\u2A26',\n 'plustwo': '\\u2A27',\n 'pointint': '\\u2A15',\n 'popf': '\\uD835\\uDD61',\n 'pound': '\\u00A3',\n 'prE': '\\u2AB3',\n 'prap': '\\u2AB7',\n 'precapprox': '\\u2AB7',\n 'precnapprox': '\\u2AB9',\n 'prnap': '\\u2AB9',\n 'precneqq': '\\u2AB5',\n 'prnE': '\\u2AB5',\n 'precnsim': '\\u22E8',\n 'prnsim': '\\u22E8',\n 'prime': '\\u2032',\n 'profalar': '\\u232E',\n 'profline': '\\u2312',\n 'profsurf': '\\u2313',\n 'prurel': '\\u22B0',\n 'pscr': '\\uD835\\uDCC5',\n 'psi': '\\u03C8',\n 'puncsp': '\\u2008',\n 'qfr': '\\uD835\\uDD2E',\n 'qopf': '\\uD835\\uDD62',\n 'qprime': '\\u2057',\n 'qscr': '\\uD835\\uDCC6',\n 'quatint': '\\u2A16',\n 'quest': '\\u003F',\n 'rAtail': '\\u291C',\n 'rHar': '\\u2964',\n 'race': '\\u223D\\u0331',\n 'racute': '\\u0155',\n 'raemptyv': '\\u29B3',\n 'rangd': '\\u2992',\n 'range': '\\u29A5',\n 'raquo': '\\u00BB',\n 'rarrap': '\\u2975',\n 'rarrbfs': '\\u2920',\n 'rarrc': '\\u2933',\n 'rarrfs': '\\u291E',\n 'rarrpl': '\\u2945',\n 'rarrsim': '\\u2974',\n 'rarrtl': '\\u21A3',\n 'rightarrowtail': '\\u21A3',\n 'rarrw': '\\u219D',\n 'rightsquigarrow': '\\u219D',\n 'ratail': '\\u291A',\n 'ratio': '\\u2236',\n 'rbbrk': '\\u2773',\n 'rbrace': '\\u007D',\n 'rcub': '\\u007D',\n 'rbrack': '\\u005D',\n 'rsqb': '\\u005D',\n 'rbrke': '\\u298C',\n 'rbrksld': '\\u298E',\n 'rbrkslu': '\\u2990',\n 'rcaron': '\\u0159',\n 'rcedil': '\\u0157',\n 'rcy': '\\u0440',\n 'rdca': '\\u2937',\n 'rdldhar': '\\u2969',\n 'rdsh': '\\u21B3',\n 'rect': '\\u25AD',\n 'rfisht': '\\u297D',\n 'rfr': '\\uD835\\uDD2F',\n 'rharul': '\\u296C',\n 'rho': '\\u03C1',\n 'rhov': '\\u03F1',\n 'varrho': '\\u03F1',\n 'rightrightarrows': '\\u21C9',\n 'rrarr': '\\u21C9',\n 'rightthreetimes': '\\u22CC',\n 'rthree': '\\u22CC',\n 'ring': '\\u02DA',\n 'rlm': '\\u200F',\n 'rmoust': '\\u23B1',\n 'rmoustache': '\\u23B1',\n 'rnmid': '\\u2AEE',\n 'roang': '\\u27ED',\n 'roarr': '\\u21FE',\n 'ropar': '\\u2986',\n 'ropf': '\\uD835\\uDD63',\n 'roplus': '\\u2A2E',\n 'rotimes': '\\u2A35',\n 'rpar': '\\u0029',\n 'rpargt': '\\u2994',\n 'rppolint': '\\u2A12',\n 'rsaquo': '\\u203A',\n 'rscr': '\\uD835\\uDCC7',\n 'rtimes': '\\u22CA',\n 'rtri': '\\u25B9',\n 'triangleright': '\\u25B9',\n 'rtriltri': '\\u29CE',\n 'ruluhar': '\\u2968',\n 'rx': '\\u211E',\n 'sacute': '\\u015B',\n 'scE': '\\u2AB4',\n 'scap': '\\u2AB8',\n 'succapprox': '\\u2AB8',\n 'scaron': '\\u0161',\n 'scedil': '\\u015F',\n 'scirc': '\\u015D',\n 'scnE': '\\u2AB6',\n 'succneqq': '\\u2AB6',\n 'scnap': '\\u2ABA',\n 'succnapprox': '\\u2ABA',\n 'scnsim': '\\u22E9',\n 'succnsim': '\\u22E9',\n 'scpolint': '\\u2A13',\n 'scy': '\\u0441',\n 'sdot': '\\u22C5',\n 'sdote': '\\u2A66',\n 'seArr': '\\u21D8',\n 'sect': '\\u00A7',\n 'semi': '\\u003B',\n 'seswar': '\\u2929',\n 'tosa': '\\u2929',\n 'sext': '\\u2736',\n 'sfr': '\\uD835\\uDD30',\n 'sharp': '\\u266F',\n 'shchcy': '\\u0449',\n 'shcy': '\\u0448',\n 'shy': '\\u00AD',\n 'sigma': '\\u03C3',\n 'sigmaf': '\\u03C2',\n 'sigmav': '\\u03C2',\n 'varsigma': '\\u03C2',\n 'simdot': '\\u2A6A',\n 'simg': '\\u2A9E',\n 'simgE': '\\u2AA0',\n 'siml': '\\u2A9D',\n 'simlE': '\\u2A9F',\n 'simne': '\\u2246',\n 'simplus': '\\u2A24',\n 'simrarr': '\\u2972',\n 'smashp': '\\u2A33',\n 'smeparsl': '\\u29E4',\n 'smile': '\\u2323',\n 'ssmile': '\\u2323',\n 'smt': '\\u2AAA',\n 'smte': '\\u2AAC',\n 'smtes': '\\u2AAC\\uFE00',\n 'softcy': '\\u044C',\n 'sol': '\\u002F',\n 'solb': '\\u29C4',\n 'solbar': '\\u233F',\n 'sopf': '\\uD835\\uDD64',\n 'spades': '\\u2660',\n 'spadesuit': '\\u2660',\n 'sqcaps': '\\u2293\\uFE00',\n 'sqcups': '\\u2294\\uFE00',\n 'sscr': '\\uD835\\uDCC8',\n 'star': '\\u2606',\n 'sub': '\\u2282',\n 'subset': '\\u2282',\n 'subE': '\\u2AC5',\n 'subseteqq': '\\u2AC5',\n 'subdot': '\\u2ABD',\n 'subedot': '\\u2AC3',\n 'submult': '\\u2AC1',\n 'subnE': '\\u2ACB',\n 'subsetneqq': '\\u2ACB',\n 'subne': '\\u228A',\n 'subsetneq': '\\u228A',\n 'subplus': '\\u2ABF',\n 'subrarr': '\\u2979',\n 'subsim': '\\u2AC7',\n 'subsub': '\\u2AD5',\n 'subsup': '\\u2AD3',\n 'sung': '\\u266A',\n 'sup1': '\\u00B9',\n 'sup2': '\\u00B2',\n 'sup3': '\\u00B3',\n 'supE': '\\u2AC6',\n 'supseteqq': '\\u2AC6',\n 'supdot': '\\u2ABE',\n 'supdsub': '\\u2AD8',\n 'supedot': '\\u2AC4',\n 'suphsol': '\\u27C9',\n 'suphsub': '\\u2AD7',\n 'suplarr': '\\u297B',\n 'supmult': '\\u2AC2',\n 'supnE': '\\u2ACC',\n 'supsetneqq': '\\u2ACC',\n 'supne': '\\u228B',\n 'supsetneq': '\\u228B',\n 'supplus': '\\u2AC0',\n 'supsim': '\\u2AC8',\n 'supsub': '\\u2AD4',\n 'supsup': '\\u2AD6',\n 'swArr': '\\u21D9',\n 'swnwar': '\\u292A',\n 'szlig': '\\u00DF',\n 'target': '\\u2316',\n 'tau': '\\u03C4',\n 'tcaron': '\\u0165',\n 'tcedil': '\\u0163',\n 'tcy': '\\u0442',\n 'telrec': '\\u2315',\n 'tfr': '\\uD835\\uDD31',\n 'theta': '\\u03B8',\n 'thetasym': '\\u03D1',\n 'thetav': '\\u03D1',\n 'vartheta': '\\u03D1',\n 'thorn': '\\u00FE',\n 'times': '\\u00D7',\n 'timesbar': '\\u2A31',\n 'timesd': '\\u2A30',\n 'topbot': '\\u2336',\n 'topcir': '\\u2AF1',\n 'topf': '\\uD835\\uDD65',\n 'topfork': '\\u2ADA',\n 'tprime': '\\u2034',\n 'triangle': '\\u25B5',\n 'utri': '\\u25B5',\n 'triangleq': '\\u225C',\n 'trie': '\\u225C',\n 'tridot': '\\u25EC',\n 'triminus': '\\u2A3A',\n 'triplus': '\\u2A39',\n 'trisb': '\\u29CD',\n 'tritime': '\\u2A3B',\n 'trpezium': '\\u23E2',\n 'tscr': '\\uD835\\uDCC9',\n 'tscy': '\\u0446',\n 'tshcy': '\\u045B',\n 'tstrok': '\\u0167',\n 'uHar': '\\u2963',\n 'uacute': '\\u00FA',\n 'ubrcy': '\\u045E',\n 'ubreve': '\\u016D',\n 'ucirc': '\\u00FB',\n 'ucy': '\\u0443',\n 'udblac': '\\u0171',\n 'ufisht': '\\u297E',\n 'ufr': '\\uD835\\uDD32',\n 'ugrave': '\\u00F9',\n 'uhblk': '\\u2580',\n 'ulcorn': '\\u231C',\n 'ulcorner': '\\u231C',\n 'ulcrop': '\\u230F',\n 'ultri': '\\u25F8',\n 'umacr': '\\u016B',\n 'uogon': '\\u0173',\n 'uopf': '\\uD835\\uDD66',\n 'upsi': '\\u03C5',\n 'upsilon': '\\u03C5',\n 'upuparrows': '\\u21C8',\n 'uuarr': '\\u21C8',\n 'urcorn': '\\u231D',\n 'urcorner': '\\u231D',\n 'urcrop': '\\u230E',\n 'uring': '\\u016F',\n 'urtri': '\\u25F9',\n 'uscr': '\\uD835\\uDCCA',\n 'utdot': '\\u22F0',\n 'utilde': '\\u0169',\n 'uuml': '\\u00FC',\n 'uwangle': '\\u29A7',\n 'vBar': '\\u2AE8',\n 'vBarv': '\\u2AE9',\n 'vangrt': '\\u299C',\n 'varsubsetneq': '\\u228A\\uFE00',\n 'vsubne': '\\u228A\\uFE00',\n 'varsubsetneqq': '\\u2ACB\\uFE00',\n 'vsubnE': '\\u2ACB\\uFE00',\n 'varsupsetneq': '\\u228B\\uFE00',\n 'vsupne': '\\u228B\\uFE00',\n 'varsupsetneqq': '\\u2ACC\\uFE00',\n 'vsupnE': '\\u2ACC\\uFE00',\n 'vcy': '\\u0432',\n 'veebar': '\\u22BB',\n 'veeeq': '\\u225A',\n 'vellip': '\\u22EE',\n 'vfr': '\\uD835\\uDD33',\n 'vopf': '\\uD835\\uDD67',\n 'vscr': '\\uD835\\uDCCB',\n 'vzigzag': '\\u299A',\n 'wcirc': '\\u0175',\n 'wedbar': '\\u2A5F',\n 'wedgeq': '\\u2259',\n 'weierp': '\\u2118',\n 'wp': '\\u2118',\n 'wfr': '\\uD835\\uDD34',\n 'wopf': '\\uD835\\uDD68',\n 'wscr': '\\uD835\\uDCCC',\n 'xfr': '\\uD835\\uDD35',\n 'xi': '\\u03BE',\n 'xnis': '\\u22FB',\n 'xopf': '\\uD835\\uDD69',\n 'xscr': '\\uD835\\uDCCD',\n 'yacute': '\\u00FD',\n 'yacy': '\\u044F',\n 'ycirc': '\\u0177',\n 'ycy': '\\u044B',\n 'yen': '\\u00A5',\n 'yfr': '\\uD835\\uDD36',\n 'yicy': '\\u0457',\n 'yopf': '\\uD835\\uDD6A',\n 'yscr': '\\uD835\\uDCCE',\n 'yucy': '\\u044E',\n 'yuml': '\\u00FF',\n 'zacute': '\\u017A',\n 'zcaron': '\\u017E',\n 'zcy': '\\u0437',\n 'zdot': '\\u017C',\n 'zeta': '\\u03B6',\n 'zfr': '\\uD835\\uDD37',\n 'zhcy': '\\u0436',\n 'zigrarr': '\\u21DD',\n 'zopf': '\\uD835\\uDD6B',\n 'zscr': '\\uD835\\uDCCF',\n 'zwj': '\\u200D',\n 'zwnj': '\\u200C'\n};\n// The &ngsp; pseudo-entity is denoting a space. see:\n// https://github.com/dart-lang/angular/blob/0bb611387d29d65b5af7f9d2515ab571fd3fbee4/_tests/test/compiler/preserve_whitespace_test.dart\nconst NGSP_UNICODE = '\\uE500';\nNAMED_ENTITIES['ngsp'] = NGSP_UNICODE;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass TokenError extends ParseError {\n constructor(errorMsg, tokenType, span) {\n super(span, errorMsg);\n this.tokenType = tokenType;\n }\n}\nclass TokenizeResult {\n constructor(tokens, errors, nonNormalizedIcuExpressions) {\n this.tokens = tokens;\n this.errors = errors;\n this.nonNormalizedIcuExpressions = nonNormalizedIcuExpressions;\n }\n}\nfunction tokenize(source, url, getTagDefinition, options = {}) {\n const tokenizer = new _Tokenizer(new ParseSourceFile(source, url), getTagDefinition, options);\n tokenizer.tokenize();\n return new TokenizeResult(mergeTextTokens(tokenizer.tokens), tokenizer.errors, tokenizer.nonNormalizedIcuExpressions);\n}\nconst _CR_OR_CRLF_REGEXP = /\\r\\n?/g;\nfunction _unexpectedCharacterErrorMsg(charCode) {\n const char = charCode === $EOF ? 'EOF' : String.fromCharCode(charCode);\n return `Unexpected character \"${char}\"`;\n}\nfunction _unknownEntityErrorMsg(entitySrc) {\n return `Unknown entity \"${entitySrc}\" - use the \"&#<decimal>;\" or \"&#x<hex>;\" syntax`;\n}\nfunction _unparsableEntityErrorMsg(type, entityStr) {\n return `Unable to parse entity \"${entityStr}\" - ${type} character reference entities must end with \";\"`;\n}\nvar CharacterReferenceType;\n(function (CharacterReferenceType) {\n CharacterReferenceType[\"HEX\"] = \"hexadecimal\";\n CharacterReferenceType[\"DEC\"] = \"decimal\";\n})(CharacterReferenceType || (CharacterReferenceType = {}));\nclass _ControlFlowError {\n constructor(error) {\n this.error = error;\n }\n}\n// See https://www.w3.org/TR/html51/syntax.html#writing-html-documents\nclass _Tokenizer {\n /**\n * @param _file The html source file being tokenized.\n * @param _getTagDefinition A function that will retrieve a tag definition for a given tag name.\n * @param options Configuration of the tokenization.\n */\n constructor(_file, _getTagDefinition, options) {\n this._getTagDefinition = _getTagDefinition;\n this._currentTokenStart = null;\n this._currentTokenType = null;\n this._expansionCaseStack = [];\n this._inInterpolation = false;\n this.tokens = [];\n this.errors = [];\n this.nonNormalizedIcuExpressions = [];\n this._tokenizeIcu = options.tokenizeExpansionForms || false;\n this._interpolationConfig = options.interpolationConfig || DEFAULT_INTERPOLATION_CONFIG;\n this._leadingTriviaCodePoints =\n options.leadingTriviaChars && options.leadingTriviaChars.map(c => c.codePointAt(0) || 0);\n const range = options.range || { endPos: _file.content.length, startPos: 0, startLine: 0, startCol: 0 };\n this._cursor = options.escapedString ? new EscapedCharacterCursor(_file, range) :\n new PlainCharacterCursor(_file, range);\n this._preserveLineEndings = options.preserveLineEndings || false;\n this._escapedString = options.escapedString || false;\n this._i18nNormalizeLineEndingsInICUs = options.i18nNormalizeLineEndingsInICUs || false;\n try {\n this._cursor.init();\n }\n catch (e) {\n this.handleError(e);\n }\n }\n _processCarriageReturns(content) {\n if (this._preserveLineEndings) {\n return content;\n }\n // https://www.w3.org/TR/html51/syntax.html#preprocessing-the-input-stream\n // In order to keep the original position in the source, we can not\n // pre-process it.\n // Instead CRs are processed right before instantiating the tokens.\n return content.replace(_CR_OR_CRLF_REGEXP, '\\n');\n }\n tokenize() {\n while (this._cursor.peek() !== $EOF) {\n const start = this._cursor.clone();\n try {\n if (this._attemptCharCode($LT)) {\n if (this._attemptCharCode($BANG)) {\n if (this._attemptCharCode($LBRACKET)) {\n this._consumeCdata(start);\n }\n else if (this._attemptCharCode($MINUS)) {\n this._consumeComment(start);\n }\n else {\n this._consumeDocType(start);\n }\n }\n else if (this._attemptCharCode($SLASH)) {\n this._consumeTagClose(start);\n }\n else {\n this._consumeTagOpen(start);\n }\n }\n else if (!(this._tokenizeIcu && this._tokenizeExpansionForm())) {\n // In (possibly interpolated) text the end of the text is given by `isTextEnd()`, while\n // the premature end of an interpolation is given by the start of a new HTML element.\n this._consumeWithInterpolation(5 /* TokenType.TEXT */, 8 /* TokenType.INTERPOLATION */, () => this._isTextEnd(), () => this._isTagStart());\n }\n }\n catch (e) {\n this.handleError(e);\n }\n }\n this._beginToken(24 /* TokenType.EOF */);\n this._endToken([]);\n }\n /**\n * @returns whether an ICU token has been created\n * @internal\n */\n _tokenizeExpansionForm() {\n if (this.isExpansionFormStart()) {\n this._consumeExpansionFormStart();\n return true;\n }\n if (isExpansionCaseStart(this._cursor.peek()) && this._isInExpansionForm()) {\n this._consumeExpansionCaseStart();\n return true;\n }\n if (this._cursor.peek() === $RBRACE) {\n if (this._isInExpansionCase()) {\n this._consumeExpansionCaseEnd();\n return true;\n }\n if (this._isInExpansionForm()) {\n this._consumeExpansionFormEnd();\n return true;\n }\n }\n return false;\n }\n _beginToken(type, start = this._cursor.clone()) {\n this._currentTokenStart = start;\n this._currentTokenType = type;\n }\n _endToken(parts, end) {\n if (this._currentTokenStart === null) {\n throw new TokenError('Programming error - attempted to end a token when there was no start to the token', this._currentTokenType, this._cursor.getSpan(end));\n }\n if (this._currentTokenType === null) {\n throw new TokenError('Programming error - attempted to end a token which has no token type', null, this._cursor.getSpan(this._currentTokenStart));\n }\n const token = {\n type: this._currentTokenType,\n parts,\n sourceSpan: (end ?? this._cursor).getSpan(this._currentTokenStart, this._leadingTriviaCodePoints),\n };\n this.tokens.push(token);\n this._currentTokenStart = null;\n this._currentTokenType = null;\n return token;\n }\n _createError(msg, span) {\n if (this._isInExpansionForm()) {\n msg += ` (Do you have an unescaped \"{\" in your template? Use \"{{ '{' }}\") to escape it.)`;\n }\n const error = new TokenError(msg, this._currentTokenType, span);\n this._currentTokenStart = null;\n this._currentTokenType = null;\n return new _ControlFlowError(error);\n }\n handleError(e) {\n if (e instanceof CursorError) {\n e = this._createError(e.msg, this._cursor.getSpan(e.cursor));\n }\n if (e instanceof _ControlFlowError) {\n this.errors.push(e.error);\n }\n else {\n throw e;\n }\n }\n _attemptCharCode(charCode) {\n if (this._cursor.peek() === charCode) {\n this._cursor.advance();\n return true;\n }\n return false;\n }\n _attemptCharCodeCaseInsensitive(charCode) {\n if (compareCharCodeCaseInsensitive(this._cursor.peek(), charCode)) {\n this._cursor.advance();\n return true;\n }\n return false;\n }\n _requireCharCode(charCode) {\n const location = this._cursor.clone();\n if (!this._attemptCharCode(charCode)) {\n throw this._createError(_unexpectedCharacterErrorMsg(this._cursor.peek()), this._cursor.getSpan(location));\n }\n }\n _attemptStr(chars) {\n const len = chars.length;\n if (this._cursor.charsLeft() < len) {\n return false;\n }\n const initialPosition = this._cursor.clone();\n for (let i = 0; i < len; i++) {\n if (!this._attemptCharCode(chars.charCodeAt(i))) {\n // If attempting to parse the string fails, we want to reset the parser\n // to where it was before the attempt\n this._cursor = initialPosition;\n return false;\n }\n }\n return true;\n }\n _attemptStrCaseInsensitive(chars) {\n for (let i = 0; i < chars.length; i++) {\n if (!this._attemptCharCodeCaseInsensitive(chars.charCodeAt(i))) {\n return false;\n }\n }\n return true;\n }\n _requireStr(chars) {\n const location = this._cursor.clone();\n if (!this._attemptStr(chars)) {\n throw this._createError(_unexpectedCharacterErrorMsg(this._cursor.peek()), this._cursor.getSpan(location));\n }\n }\n _attemptCharCodeUntilFn(predicate) {\n while (!predicate(this._cursor.peek())) {\n this._cursor.advance();\n }\n }\n _requireCharCodeUntilFn(predicate, len) {\n const start = this._cursor.clone();\n this._attemptCharCodeUntilFn(predicate);\n if (this._cursor.diff(start) < len) {\n throw this._createError(_unexpectedCharacterErrorMsg(this._cursor.peek()), this._cursor.getSpan(start));\n }\n }\n _attemptUntilChar(char) {\n while (this._cursor.peek() !== char) {\n this._cursor.advance();\n }\n }\n _readChar() {\n // Don't rely upon reading directly from `_input` as the actual char value\n // may have been generated from an escape sequence.\n const char = String.fromCodePoint(this._cursor.peek());\n this._cursor.advance();\n return char;\n }\n _consumeEntity(textTokenType) {\n this._beginToken(9 /* TokenType.ENCODED_ENTITY */);\n const start = this._cursor.clone();\n this._cursor.advance();\n if (this._attemptCharCode($HASH)) {\n const isHex = this._attemptCharCode($x) || this._attemptCharCode($X);\n const codeStart = this._cursor.clone();\n this._attemptCharCodeUntilFn(isDigitEntityEnd);\n if (this._cursor.peek() != $SEMICOLON) {\n // Advance cursor to include the peeked character in the string provided to the error\n // message.\n this._cursor.advance();\n const entityType = isHex ? CharacterReferenceType.HEX : CharacterReferenceType.DEC;\n throw this._createError(_unparsableEntityErrorMsg(entityType, this._cursor.getChars(start)), this._cursor.getSpan());\n }\n const strNum = this._cursor.getChars(codeStart);\n this._cursor.advance();\n try {\n const charCode = parseInt(strNum, isHex ? 16 : 10);\n this._endToken([String.fromCharCode(charCode), this._cursor.getChars(start)]);\n }\n catch {\n throw this._createError(_unknownEntityErrorMsg(this._cursor.getChars(start)), this._cursor.getSpan());\n }\n }\n else {\n const nameStart = this._cursor.clone();\n this._attemptCharCodeUntilFn(isNamedEntityEnd);\n if (this._cursor.peek() != $SEMICOLON) {\n // No semicolon was found so abort the encoded entity token that was in progress, and treat\n // this as a text token\n this._beginToken(textTokenType, start);\n this._cursor = nameStart;\n this._endToken(['&']);\n }\n else {\n const name = this._cursor.getChars(nameStart);\n this._cursor.advance();\n const char = NAMED_ENTITIES[name];\n if (!char) {\n throw this._createError(_unknownEntityErrorMsg(name), this._cursor.getSpan(start));\n }\n this._endToken([char, `&${name};`]);\n }\n }\n }\n _consumeRawText(consumeEntities, endMarkerPredicate) {\n this._beginToken(consumeEntities ? 6 /* TokenType.ESCAPABLE_RAW_TEXT */ : 7 /* TokenType.RAW_TEXT */);\n const parts = [];\n while (true) {\n const tagCloseStart = this._cursor.clone();\n const foundEndMarker = endMarkerPredicate();\n this._cursor = tagCloseStart;\n if (foundEndMarker) {\n break;\n }\n if (consumeEntities && this._cursor.peek() === $AMPERSAND) {\n this._endToken([this._processCarriageReturns(parts.join(''))]);\n parts.length = 0;\n this._consumeEntity(6 /* TokenType.ESCAPABLE_RAW_TEXT */);\n this._beginToken(6 /* TokenType.ESCAPABLE_RAW_TEXT */);\n }\n else {\n parts.push(this._readChar());\n }\n }\n this._endToken([this._processCarriageReturns(parts.join(''))]);\n }\n _consumeComment(start) {\n this._beginToken(10 /* TokenType.COMMENT_START */, start);\n this._requireCharCode($MINUS);\n this._endToken([]);\n this._consumeRawText(false, () => this._attemptStr('-->'));\n this._beginToken(11 /* TokenType.COMMENT_END */);\n this._requireStr('-->');\n this._endToken([]);\n }\n _consumeCdata(start) {\n this._beginToken(12 /* TokenType.CDATA_START */, start);\n this._requireStr('CDATA[');\n this._endToken([]);\n this._consumeRawText(false, () => this._attemptStr(']]>'));\n this._beginToken(13 /* TokenType.CDATA_END */);\n this._requireStr(']]>');\n this._endToken([]);\n }\n _consumeDocType(start) {\n this._beginToken(18 /* TokenType.DOC_TYPE */, start);\n const contentStart = this._cursor.clone();\n this._attemptUntilChar($GT);\n const content = this._cursor.getChars(contentStart);\n this._cursor.advance();\n this._endToken([content]);\n }\n _consumePrefixAndName() {\n const nameOrPrefixStart = this._cursor.clone();\n let prefix = '';\n while (this._cursor.peek() !== $COLON && !isPrefixEnd(this._cursor.peek())) {\n this._cursor.advance();\n }\n let nameStart;\n if (this._cursor.peek() === $COLON) {\n prefix = this._cursor.getChars(nameOrPrefixStart);\n this._cursor.advance();\n nameStart = this._cursor.clone();\n }\n else {\n nameStart = nameOrPrefixStart;\n }\n this._requireCharCodeUntilFn(isNameEnd, prefix === '' ? 0 : 1);\n const name = this._cursor.getChars(nameStart);\n return [prefix, name];\n }\n _consumeTagOpen(start) {\n let tagName;\n let prefix;\n let openTagToken;\n try {\n if (!isAsciiLetter(this._cursor.peek())) {\n throw this._createError(_unexpectedCharacterErrorMsg(this._cursor.peek()), this._cursor.getSpan(start));\n }\n openTagToken = this._consumeTagOpenStart(start);\n prefix = openTagToken.parts[0];\n tagName = openTagToken.parts[1];\n this._attemptCharCodeUntilFn(isNotWhitespace);\n while (this._cursor.peek() !== $SLASH && this._cursor.peek() !== $GT &&\n this._cursor.peek() !== $LT && this._cursor.peek() !== $EOF) {\n this._consumeAttributeName();\n this._attemptCharCodeUntilFn(isNotWhitespace);\n if (this._attemptCharCode($EQ)) {\n this._attemptCharCodeUntilFn(isNotWhitespace);\n this._consumeAttributeValue();\n }\n this._attemptCharCodeUntilFn(isNotWhitespace);\n }\n this._consumeTagOpenEnd();\n }\n catch (e) {\n if (e instanceof _ControlFlowError) {\n if (openTagToken) {\n // We errored before we could close the opening tag, so it is incomplete.\n openTagToken.type = 4 /* TokenType.INCOMPLETE_TAG_OPEN */;\n }\n else {\n // When the start tag is invalid, assume we want a \"<\" as text.\n // Back to back text tokens are merged at the end.\n this._beginToken(5 /* TokenType.TEXT */, start);\n this._endToken(['<']);\n }\n return;\n }\n throw e;\n }\n const contentTokenType = this._getTagDefinition(tagName).getContentType(prefix);\n if (contentTokenType === TagContentType.RAW_TEXT) {\n this._consumeRawTextWithTagClose(prefix, tagName, false);\n }\n else if (contentTokenType === TagContentType.ESCAPABLE_RAW_TEXT) {\n this._consumeRawTextWithTagClose(prefix, tagName, true);\n }\n }\n _consumeRawTextWithTagClose(prefix, tagName, consumeEntities) {\n this._consumeRawText(consumeEntities, () => {\n if (!this._attemptCharCode($LT))\n return false;\n if (!this._attemptCharCode($SLASH))\n return false;\n this._attemptCharCodeUntilFn(isNotWhitespace);\n if (!this._attemptStrCaseInsensitive(tagName))\n return false;\n this._attemptCharCodeUntilFn(isNotWhitespace);\n return this._attemptCharCode($GT);\n });\n this._beginToken(3 /* TokenType.TAG_CLOSE */);\n this._requireCharCodeUntilFn(code => code === $GT, 3);\n this._cursor.advance(); // Consume the `>`\n this._endToken([prefix, tagName]);\n }\n _consumeTagOpenStart(start) {\n this._beginToken(0 /* TokenType.TAG_OPEN_START */, start);\n const parts = this._consumePrefixAndName();\n return this._endToken(parts);\n }\n _consumeAttributeName() {\n const attrNameStart = this._cursor.peek();\n if (attrNameStart === $SQ || attrNameStart === $DQ) {\n throw this._createError(_unexpectedCharacterErrorMsg(attrNameStart), this._cursor.getSpan());\n }\n this._beginToken(14 /* TokenType.ATTR_NAME */);\n const prefixAndName = this._consumePrefixAndName();\n this._endToken(prefixAndName);\n }\n _consumeAttributeValue() {\n let value;\n if (this._cursor.peek() === $SQ || this._cursor.peek() === $DQ) {\n const quoteChar = this._cursor.peek();\n this._consumeQuote(quoteChar);\n // In an attribute then end of the attribute value and the premature end to an interpolation\n // are both triggered by the `quoteChar`.\n const endPredicate = () => this._cursor.peek() === quoteChar;\n this._consumeWithInterpolation(16 /* TokenType.ATTR_VALUE_TEXT */, 17 /* TokenType.ATTR_VALUE_INTERPOLATION */, endPredicate, endPredicate);\n this._consumeQuote(quoteChar);\n }\n else {\n const endPredicate = () => isNameEnd(this._cursor.peek());\n this._consumeWithInterpolation(16 /* TokenType.ATTR_VALUE_TEXT */, 17 /* TokenType.ATTR_VALUE_INTERPOLATION */, endPredicate, endPredicate);\n }\n }\n _consumeQuote(quoteChar) {\n this._beginToken(15 /* TokenType.ATTR_QUOTE */);\n this._requireCharCode(quoteChar);\n this._endToken([String.fromCodePoint(quoteChar)]);\n }\n _consumeTagOpenEnd() {\n const tokenType = this._attemptCharCode($SLASH) ? 2 /* TokenType.TAG_OPEN_END_VOID */ : 1 /* TokenType.TAG_OPEN_END */;\n this._beginToken(tokenType);\n this._requireCharCode($GT);\n this._endToken([]);\n }\n _consumeTagClose(start) {\n this._beginToken(3 /* TokenType.TAG_CLOSE */, start);\n this._attemptCharCodeUntilFn(isNotWhitespace);\n const prefixAndName = this._consumePrefixAndName();\n this._attemptCharCodeUntilFn(isNotWhitespace);\n this._requireCharCode($GT);\n this._endToken(prefixAndName);\n }\n _consumeExpansionFormStart() {\n this._beginToken(19 /* TokenType.EXPANSION_FORM_START */);\n this._requireCharCode($LBRACE);\n this._endToken([]);\n this._expansionCaseStack.push(19 /* TokenType.EXPANSION_FORM_START */);\n this._beginToken(7 /* TokenType.RAW_TEXT */);\n const condition = this._readUntil($COMMA);\n const normalizedCondition = this._processCarriageReturns(condition);\n if (this._i18nNormalizeLineEndingsInICUs) {\n // We explicitly want to normalize line endings for this text.\n this._endToken([normalizedCondition]);\n }\n else {\n // We are not normalizing line endings.\n const conditionToken = this._endToken([condition]);\n if (normalizedCondition !== condition) {\n this.nonNormalizedIcuExpressions.push(conditionToken);\n }\n }\n this._requireCharCode($COMMA);\n this._attemptCharCodeUntilFn(isNotWhitespace);\n this._beginToken(7 /* TokenType.RAW_TEXT */);\n const type = this._readUntil($COMMA);\n this._endToken([type]);\n this._requireCharCode($COMMA);\n this._attemptCharCodeUntilFn(isNotWhitespace);\n }\n _consumeExpansionCaseStart() {\n this._beginToken(20 /* TokenType.EXPANSION_CASE_VALUE */);\n const value = this._readUntil($LBRACE).trim();\n this._endToken([value]);\n this._attemptCharCodeUntilFn(isNotWhitespace);\n this._beginToken(21 /* TokenType.EXPANSION_CASE_EXP_START */);\n this._requireCharCode($LBRACE);\n this._endToken([]);\n this._attemptCharCodeUntilFn(isNotWhitespace);\n this._expansionCaseStack.push(21 /* TokenType.EXPANSION_CASE_EXP_START */);\n }\n _consumeExpansionCaseEnd() {\n this._beginToken(22 /* TokenType.EXPANSION_CASE_EXP_END */);\n this._requireCharCode($RBRACE);\n this._endToken([]);\n this._attemptCharCodeUntilFn(isNotWhitespace);\n this._expansionCaseStack.pop();\n }\n _consumeExpansionFormEnd() {\n this._beginToken(23 /* TokenType.EXPANSION_FORM_END */);\n this._requireCharCode($RBRACE);\n this._endToken([]);\n this._expansionCaseStack.pop();\n }\n /**\n * Consume a string that may contain interpolation expressions.\n *\n * The first token consumed will be of `tokenType` and then there will be alternating\n * `interpolationTokenType` and `tokenType` tokens until the `endPredicate()` returns true.\n *\n * If an interpolation token ends prematurely it will have no end marker in its `parts` array.\n *\n * @param textTokenType the kind of tokens to interleave around interpolation tokens.\n * @param interpolationTokenType the kind of tokens that contain interpolation.\n * @param endPredicate a function that should return true when we should stop consuming.\n * @param endInterpolation a function that should return true if there is a premature end to an\n * interpolation expression - i.e. before we get to the normal interpolation closing marker.\n */\n _consumeWithInterpolation(textTokenType, interpolationTokenType, endPredicate, endInterpolation) {\n this._beginToken(textTokenType);\n const parts = [];\n while (!endPredicate()) {\n const current = this._cursor.clone();\n if (this._interpolationConfig && this._attemptStr(this._interpolationConfig.start)) {\n this._endToken([this._processCarriageReturns(parts.join(''))], current);\n parts.length = 0;\n this._consumeInterpolation(interpolationTokenType, current, endInterpolation);\n this._beginToken(textTokenType);\n }\n else if (this._cursor.peek() === $AMPERSAND) {\n this._endToken([this._processCarriageReturns(parts.join(''))]);\n parts.length = 0;\n this._consumeEntity(textTokenType);\n this._beginToken(textTokenType);\n }\n else {\n parts.push(this._readChar());\n }\n }\n // It is possible that an interpolation was started but not ended inside this text token.\n // Make sure that we reset the state of the lexer correctly.\n this._inInterpolation = false;\n this._endToken([this._processCarriageReturns(parts.join(''))]);\n }\n /**\n * Consume a block of text that has been interpreted as an Angular interpolation.\n *\n * @param interpolationTokenType the type of the interpolation token to generate.\n * @param interpolationStart a cursor that points to the start of this interpolation.\n * @param prematureEndPredicate a function that should return true if the next characters indicate\n * an end to the interpolation before its normal closing marker.\n */\n _consumeInterpolation(interpolationTokenType, interpolationStart, prematureEndPredicate) {\n const parts = [];\n this._beginToken(interpolationTokenType, interpolationStart);\n parts.push(this._interpolationConfig.start);\n // Find the end of the interpolation, ignoring content inside quotes.\n const expressionStart = this._cursor.clone();\n let inQuote = null;\n let inComment = false;\n while (this._cursor.peek() !== $EOF &&\n (prematureEndPredicate === null || !prematureEndPredicate())) {\n const current = this._cursor.clone();\n if (this._isTagStart()) {\n // We are starting what looks like an HTML element in the middle of this interpolation.\n // Reset the cursor to before the `<` character and end the interpolation token.\n // (This is actually wrong but here for backward compatibility).\n this._cursor = current;\n parts.push(this._getProcessedChars(expressionStart, current));\n this._endToken(parts);\n return;\n }\n if (inQuote === null) {\n if (this._attemptStr(this._interpolationConfig.end)) {\n // We are not in a string, and we hit the end interpolation marker\n parts.push(this._getProcessedChars(expressionStart, current));\n parts.push(this._interpolationConfig.end);\n this._endToken(parts);\n return;\n }\n else if (this._attemptStr('//')) {\n // Once we are in a comment we ignore any quotes\n inComment = true;\n }\n }\n const char = this._cursor.peek();\n this._cursor.advance();\n if (char === $BACKSLASH) {\n // Skip the next character because it was escaped.\n this._cursor.advance();\n }\n else if (char === inQuote) {\n // Exiting the current quoted string\n inQuote = null;\n }\n else if (!inComment && inQuote === null && isQuote(char)) {\n // Entering a new quoted string\n inQuote = char;\n }\n }\n // We hit EOF without finding a closing interpolation marker\n parts.push(this._getProcessedChars(expressionStart, this._cursor));\n this._endToken(parts);\n }\n _getProcessedChars(start, end) {\n return this._processCarriageReturns(end.getChars(start));\n }\n _isTextEnd() {\n if (this._isTagStart() || this._cursor.peek() === $EOF) {\n return true;\n }\n if (this._tokenizeIcu && !this._inInterpolation) {\n if (this.isExpansionFormStart()) {\n // start of an expansion form\n return true;\n }\n if (this._cursor.peek() === $RBRACE && this._isInExpansionCase()) {\n // end of and expansion case\n return true;\n }\n }\n return false;\n }\n /**\n * Returns true if the current cursor is pointing to the start of a tag\n * (opening/closing/comments/cdata/etc).\n */\n _isTagStart() {\n if (this._cursor.peek() === $LT) {\n // We assume that `<` followed by whitespace is not the start of an HTML element.\n const tmp = this._cursor.clone();\n tmp.advance();\n // If the next character is alphabetic, ! nor / then it is a tag start\n const code = tmp.peek();\n if (($a <= code && code <= $z) || ($A <= code && code <= $Z) ||\n code === $SLASH || code === $BANG) {\n return true;\n }\n }\n return false;\n }\n _readUntil(char) {\n const start = this._cursor.clone();\n this._attemptUntilChar(char);\n return this._cursor.getChars(start);\n }\n _isInExpansionCase() {\n return this._expansionCaseStack.length > 0 &&\n this._expansionCaseStack[this._expansionCaseStack.length - 1] ===\n 21 /* TokenType.EXPANSION_CASE_EXP_START */;\n }\n _isInExpansionForm() {\n return this._expansionCaseStack.length > 0 &&\n this._expansionCaseStack[this._expansionCaseStack.length - 1] ===\n 19 /* TokenType.EXPANSION_FORM_START */;\n }\n isExpansionFormStart() {\n if (this._cursor.peek() !== $LBRACE) {\n return false;\n }\n if (this._interpolationConfig) {\n const start = this._cursor.clone();\n const isInterpolation = this._attemptStr(this._interpolationConfig.start);\n this._cursor = start;\n return !isInterpolation;\n }\n return true;\n }\n}\nfunction isNotWhitespace(code) {\n return !isWhitespace(code) || code === $EOF;\n}\nfunction isNameEnd(code) {\n return isWhitespace(code) || code === $GT || code === $LT ||\n code === $SLASH || code === $SQ || code === $DQ || code === $EQ ||\n code === $EOF;\n}\nfunction isPrefixEnd(code) {\n return (code < $a || $z < code) && (code < $A || $Z < code) &&\n (code < $0 || code > $9);\n}\nfunction isDigitEntityEnd(code) {\n return code === $SEMICOLON || code === $EOF || !isAsciiHexDigit(code);\n}\nfunction isNamedEntityEnd(code) {\n return code === $SEMICOLON || code === $EOF || !isAsciiLetter(code);\n}\nfunction isExpansionCaseStart(peek) {\n return peek !== $RBRACE;\n}\nfunction compareCharCodeCaseInsensitive(code1, code2) {\n return toUpperCaseCharCode(code1) === toUpperCaseCharCode(code2);\n}\nfunction toUpperCaseCharCode(code) {\n return code >= $a && code <= $z ? code - $a + $A : code;\n}\nfunction mergeTextTokens(srcTokens) {\n const dstTokens = [];\n let lastDstToken = undefined;\n for (let i = 0; i < srcTokens.length; i++) {\n const token = srcTokens[i];\n if ((lastDstToken && lastDstToken.type === 5 /* TokenType.TEXT */ && token.type === 5 /* TokenType.TEXT */) ||\n (lastDstToken && lastDstToken.type === 16 /* TokenType.ATTR_VALUE_TEXT */ &&\n token.type === 16 /* TokenType.ATTR_VALUE_TEXT */)) {\n lastDstToken.parts[0] += token.parts[0];\n lastDstToken.sourceSpan.end = token.sourceSpan.end;\n }\n else {\n lastDstToken = token;\n dstTokens.push(lastDstToken);\n }\n }\n return dstTokens;\n}\nclass PlainCharacterCursor {\n constructor(fileOrCursor, range) {\n if (fileOrCursor instanceof PlainCharacterCursor) {\n this.file = fileOrCursor.file;\n this.input = fileOrCursor.input;\n this.end = fileOrCursor.end;\n const state = fileOrCursor.state;\n // Note: avoid using `{...fileOrCursor.state}` here as that has a severe performance penalty.\n // In ES5 bundles the object spread operator is translated into the `__assign` helper, which\n // is not optimized by VMs as efficiently as a raw object literal. Since this constructor is\n // called in tight loops, this difference matters.\n this.state = {\n peek: state.peek,\n offset: state.offset,\n line: state.line,\n column: state.column,\n };\n }\n else {\n if (!range) {\n throw new Error('Programming error: the range argument must be provided with a file argument.');\n }\n this.file = fileOrCursor;\n this.input = fileOrCursor.content;\n this.end = range.endPos;\n this.state = {\n peek: -1,\n offset: range.startPos,\n line: range.startLine,\n column: range.startCol,\n };\n }\n }\n clone() {\n return new PlainCharacterCursor(this);\n }\n peek() {\n return this.state.peek;\n }\n charsLeft() {\n return this.end - this.state.offset;\n }\n diff(other) {\n return this.state.offset - other.state.offset;\n }\n advance() {\n this.advanceState(this.state);\n }\n init() {\n this.updatePeek(this.state);\n }\n getSpan(start, leadingTriviaCodePoints) {\n start = start || this;\n let fullStart = start;\n if (leadingTriviaCodePoints) {\n while (this.diff(start) > 0 && leadingTriviaCodePoints.indexOf(start.peek()) !== -1) {\n if (fullStart === start) {\n start = start.clone();\n }\n start.advance();\n }\n }\n const startLocation = this.locationFromCursor(start);\n const endLocation = this.locationFromCursor(this);\n const fullStartLocation = fullStart !== start ? this.locationFromCursor(fullStart) : startLocation;\n return new ParseSourceSpan(startLocation, endLocation, fullStartLocation);\n }\n getChars(start) {\n return this.input.substring(start.state.offset, this.state.offset);\n }\n charAt(pos) {\n return this.input.charCodeAt(pos);\n }\n advanceState(state) {\n if (state.offset >= this.end) {\n this.state = state;\n throw new CursorError('Unexpected character \"EOF\"', this);\n }\n const currentChar = this.charAt(state.offset);\n if (currentChar === $LF) {\n state.line++;\n state.column = 0;\n }\n else if (!isNewLine(currentChar)) {\n state.column++;\n }\n state.offset++;\n this.updatePeek(state);\n }\n updatePeek(state) {\n state.peek = state.offset >= this.end ? $EOF : this.charAt(state.offset);\n }\n locationFromCursor(cursor) {\n return new ParseLocation(cursor.file, cursor.state.offset, cursor.state.line, cursor.state.column);\n }\n}\nclass EscapedCharacterCursor extends PlainCharacterCursor {\n constructor(fileOrCursor, range) {\n if (fileOrCursor instanceof EscapedCharacterCursor) {\n super(fileOrCursor);\n this.internalState = { ...fileOrCursor.internalState };\n }\n else {\n super(fileOrCursor, range);\n this.internalState = this.state;\n }\n }\n advance() {\n this.state = this.internalState;\n super.advance();\n this.processEscapeSequence();\n }\n init() {\n super.init();\n this.processEscapeSequence();\n }\n clone() {\n return new EscapedCharacterCursor(this);\n }\n getChars(start) {\n const cursor = start.clone();\n let chars = '';\n while (cursor.internalState.offset < this.internalState.offset) {\n chars += String.fromCodePoint(cursor.peek());\n cursor.advance();\n }\n return chars;\n }\n /**\n * Process the escape sequence that starts at the current position in the text.\n *\n * This method is called to ensure that `peek` has the unescaped value of escape sequences.\n */\n processEscapeSequence() {\n const peek = () => this.internalState.peek;\n if (peek() === $BACKSLASH) {\n // We have hit an escape sequence so we need the internal state to become independent\n // of the external state.\n this.internalState = { ...this.state };\n // Move past the backslash\n this.advanceState(this.internalState);\n // First check for standard control char sequences\n if (peek() === $n) {\n this.state.peek = $LF;\n }\n else if (peek() === $r) {\n this.state.peek = $CR;\n }\n else if (peek() === $v) {\n this.state.peek = $VTAB;\n }\n else if (peek() === $t) {\n this.state.peek = $TAB;\n }\n else if (peek() === $b) {\n this.state.peek = $BSPACE;\n }\n else if (peek() === $f) {\n this.state.peek = $FF;\n }\n // Now consider more complex sequences\n else if (peek() === $u) {\n // Unicode code-point sequence\n this.advanceState(this.internalState); // advance past the `u` char\n if (peek() === $LBRACE) {\n // Variable length Unicode, e.g. `\\x{123}`\n this.advanceState(this.internalState); // advance past the `{` char\n // Advance past the variable number of hex digits until we hit a `}` char\n const digitStart = this.clone();\n let length = 0;\n while (peek() !== $RBRACE) {\n this.advanceState(this.internalState);\n length++;\n }\n this.state.peek = this.decodeHexDigits(digitStart, length);\n }\n else {\n // Fixed length Unicode, e.g. `\\u1234`\n const digitStart = this.clone();\n this.advanceState(this.internalState);\n this.advanceState(this.internalState);\n this.advanceState(this.internalState);\n this.state.peek = this.decodeHexDigits(digitStart, 4);\n }\n }\n else if (peek() === $x) {\n // Hex char code, e.g. `\\x2F`\n this.advanceState(this.internalState); // advance past the `x` char\n const digitStart = this.clone();\n this.advanceState(this.internalState);\n this.state.peek = this.decodeHexDigits(digitStart, 2);\n }\n else if (isOctalDigit(peek())) {\n // Octal char code, e.g. `\\012`,\n let octal = '';\n let length = 0;\n let previous = this.clone();\n while (isOctalDigit(peek()) && length < 3) {\n previous = this.clone();\n octal += String.fromCodePoint(peek());\n this.advanceState(this.internalState);\n length++;\n }\n this.state.peek = parseInt(octal, 8);\n // Backup one char\n this.internalState = previous.internalState;\n }\n else if (isNewLine(this.internalState.peek)) {\n // Line continuation `\\` followed by a new line\n this.advanceState(this.internalState); // advance over the newline\n this.state = this.internalState;\n }\n else {\n // If none of the `if` blocks were executed then we just have an escaped normal character.\n // In that case we just, effectively, skip the backslash from the character.\n this.state.peek = this.internalState.peek;\n }\n }\n }\n decodeHexDigits(start, length) {\n const hex = this.input.slice(start.internalState.offset, start.internalState.offset + length);\n const charCode = parseInt(hex, 16);\n if (!isNaN(charCode)) {\n return charCode;\n }\n else {\n start.state = start.internalState;\n throw new CursorError('Invalid hexadecimal escape sequence', start);\n }\n }\n}\nclass CursorError {\n constructor(msg, cursor) {\n this.msg = msg;\n this.cursor = cursor;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass TreeError extends ParseError {\n constructor(elementName, span, msg) {\n super(span, msg);\n this.elementName = elementName;\n }\n static create(elementName, span, msg) {\n return new TreeError(elementName, span, msg);\n }\n}\nclass ParseTreeResult {\n constructor(rootNodes, errors) {\n this.rootNodes = rootNodes;\n this.errors = errors;\n }\n}\nclass Parser {\n constructor(getTagDefinition) {\n this.getTagDefinition = getTagDefinition;\n }\n parse(source, url, options) {\n const tokenizeResult = tokenize(source, url, this.getTagDefinition, options);\n const parser = new _TreeBuilder(tokenizeResult.tokens, this.getTagDefinition);\n parser.build();\n return new ParseTreeResult(parser.rootNodes, tokenizeResult.errors.concat(parser.errors));\n }\n}\nclass _TreeBuilder {\n constructor(tokens, getTagDefinition) {\n this.tokens = tokens;\n this.getTagDefinition = getTagDefinition;\n this._index = -1;\n this._elementStack = [];\n this.rootNodes = [];\n this.errors = [];\n this._advance();\n }\n build() {\n while (this._peek.type !== 24 /* TokenType.EOF */) {\n if (this._peek.type === 0 /* TokenType.TAG_OPEN_START */ ||\n this._peek.type === 4 /* TokenType.INCOMPLETE_TAG_OPEN */) {\n this._consumeStartTag(this._advance());\n }\n else if (this._peek.type === 3 /* TokenType.TAG_CLOSE */) {\n this._consumeEndTag(this._advance());\n }\n else if (this._peek.type === 12 /* TokenType.CDATA_START */) {\n this._closeVoidElement();\n this._consumeCdata(this._advance());\n }\n else if (this._peek.type === 10 /* TokenType.COMMENT_START */) {\n this._closeVoidElement();\n this._consumeComment(this._advance());\n }\n else if (this._peek.type === 5 /* TokenType.TEXT */ || this._peek.type === 7 /* TokenType.RAW_TEXT */ ||\n this._peek.type === 6 /* TokenType.ESCAPABLE_RAW_TEXT */) {\n this._closeVoidElement();\n this._consumeText(this._advance());\n }\n else if (this._peek.type === 19 /* TokenType.EXPANSION_FORM_START */) {\n this._consumeExpansion(this._advance());\n }\n else {\n // Skip all other tokens...\n this._advance();\n }\n }\n }\n _advance() {\n const prev = this._peek;\n if (this._index < this.tokens.length - 1) {\n // Note: there is always an EOF token at the end\n this._index++;\n }\n this._peek = this.tokens[this._index];\n return prev;\n }\n _advanceIf(type) {\n if (this._peek.type === type) {\n return this._advance();\n }\n return null;\n }\n _consumeCdata(_startToken) {\n this._consumeText(this._advance());\n this._advanceIf(13 /* TokenType.CDATA_END */);\n }\n _consumeComment(token) {\n const text = this._advanceIf(7 /* TokenType.RAW_TEXT */);\n this._advanceIf(11 /* TokenType.COMMENT_END */);\n const value = text != null ? text.parts[0].trim() : null;\n this._addToParent(new Comment(value, token.sourceSpan));\n }\n _consumeExpansion(token) {\n const switchValue = this._advance();\n const type = this._advance();\n const cases = [];\n // read =\n while (this._peek.type === 20 /* TokenType.EXPANSION_CASE_VALUE */) {\n const expCase = this._parseExpansionCase();\n if (!expCase)\n return; // error\n cases.push(expCase);\n }\n // read the final }\n if (this._peek.type !== 23 /* TokenType.EXPANSION_FORM_END */) {\n this.errors.push(TreeError.create(null, this._peek.sourceSpan, `Invalid ICU message. Missing '}'.`));\n return;\n }\n const sourceSpan = new ParseSourceSpan(token.sourceSpan.start, this._peek.sourceSpan.end, token.sourceSpan.fullStart);\n this._addToParent(new Expansion(switchValue.parts[0], type.parts[0], cases, sourceSpan, switchValue.sourceSpan));\n this._advance();\n }\n _parseExpansionCase() {\n const value = this._advance();\n // read {\n if (this._peek.type !== 21 /* TokenType.EXPANSION_CASE_EXP_START */) {\n this.errors.push(TreeError.create(null, this._peek.sourceSpan, `Invalid ICU message. Missing '{'.`));\n return null;\n }\n // read until }\n const start = this._advance();\n const exp = this._collectExpansionExpTokens(start);\n if (!exp)\n return null;\n const end = this._advance();\n exp.push({ type: 24 /* TokenType.EOF */, parts: [], sourceSpan: end.sourceSpan });\n // parse everything in between { and }\n const expansionCaseParser = new _TreeBuilder(exp, this.getTagDefinition);\n expansionCaseParser.build();\n if (expansionCaseParser.errors.length > 0) {\n this.errors = this.errors.concat(expansionCaseParser.errors);\n return null;\n }\n const sourceSpan = new ParseSourceSpan(value.sourceSpan.start, end.sourceSpan.end, value.sourceSpan.fullStart);\n const expSourceSpan = new ParseSourceSpan(start.sourceSpan.start, end.sourceSpan.end, start.sourceSpan.fullStart);\n return new ExpansionCase(value.parts[0], expansionCaseParser.rootNodes, sourceSpan, value.sourceSpan, expSourceSpan);\n }\n _collectExpansionExpTokens(start) {\n const exp = [];\n const expansionFormStack = [21 /* TokenType.EXPANSION_CASE_EXP_START */];\n while (true) {\n if (this._peek.type === 19 /* TokenType.EXPANSION_FORM_START */ ||\n this._peek.type === 21 /* TokenType.EXPANSION_CASE_EXP_START */) {\n expansionFormStack.push(this._peek.type);\n }\n if (this._peek.type === 22 /* TokenType.EXPANSION_CASE_EXP_END */) {\n if (lastOnStack(expansionFormStack, 21 /* TokenType.EXPANSION_CASE_EXP_START */)) {\n expansionFormStack.pop();\n if (expansionFormStack.length === 0)\n return exp;\n }\n else {\n this.errors.push(TreeError.create(null, start.sourceSpan, `Invalid ICU message. Missing '}'.`));\n return null;\n }\n }\n if (this._peek.type === 23 /* TokenType.EXPANSION_FORM_END */) {\n if (lastOnStack(expansionFormStack, 19 /* TokenType.EXPANSION_FORM_START */)) {\n expansionFormStack.pop();\n }\n else {\n this.errors.push(TreeError.create(null, start.sourceSpan, `Invalid ICU message. Missing '}'.`));\n return null;\n }\n }\n if (this._peek.type === 24 /* TokenType.EOF */) {\n this.errors.push(TreeError.create(null, start.sourceSpan, `Invalid ICU message. Missing '}'.`));\n return null;\n }\n exp.push(this._advance());\n }\n }\n _consumeText(token) {\n const tokens = [token];\n const startSpan = token.sourceSpan;\n let text = token.parts[0];\n if (text.length > 0 && text[0] === '\\n') {\n const parent = this._getParentElement();\n if (parent != null && parent.children.length === 0 &&\n this.getTagDefinition(parent.name).ignoreFirstLf) {\n text = text.substring(1);\n tokens[0] = { type: token.type, sourceSpan: token.sourceSpan, parts: [text] };\n }\n }\n while (this._peek.type === 8 /* TokenType.INTERPOLATION */ || this._peek.type === 5 /* TokenType.TEXT */ ||\n this._peek.type === 9 /* TokenType.ENCODED_ENTITY */) {\n token = this._advance();\n tokens.push(token);\n if (token.type === 8 /* TokenType.INTERPOLATION */) {\n // For backward compatibility we decode HTML entities that appear in interpolation\n // expressions. This is arguably a bug, but it could be a considerable breaking change to\n // fix it. It should be addressed in a larger project to refactor the entire parser/lexer\n // chain after View Engine has been removed.\n text += token.parts.join('').replace(/&([^;]+);/g, decodeEntity);\n }\n else if (token.type === 9 /* TokenType.ENCODED_ENTITY */) {\n text += token.parts[0];\n }\n else {\n text += token.parts.join('');\n }\n }\n if (text.length > 0) {\n const endSpan = token.sourceSpan;\n this._addToParent(new Text(text, new ParseSourceSpan(startSpan.start, endSpan.end, startSpan.fullStart, startSpan.details), tokens));\n }\n }\n _closeVoidElement() {\n const el = this._getParentElement();\n if (el && this.getTagDefinition(el.name).isVoid) {\n this._elementStack.pop();\n }\n }\n _consumeStartTag(startTagToken) {\n const [prefix, name] = startTagToken.parts;\n const attrs = [];\n while (this._peek.type === 14 /* TokenType.ATTR_NAME */) {\n attrs.push(this._consumeAttr(this._advance()));\n }\n const fullName = this._getElementFullName(prefix, name, this._getParentElement());\n let selfClosing = false;\n // Note: There could have been a tokenizer error\n // so that we don't get a token for the end tag...\n if (this._peek.type === 2 /* TokenType.TAG_OPEN_END_VOID */) {\n this._advance();\n selfClosing = true;\n const tagDef = this.getTagDefinition(fullName);\n if (!(tagDef.canSelfClose || getNsPrefix(fullName) !== null || tagDef.isVoid)) {\n this.errors.push(TreeError.create(fullName, startTagToken.sourceSpan, `Only void and foreign elements can be self closed \"${startTagToken.parts[1]}\"`));\n }\n }\n else if (this._peek.type === 1 /* TokenType.TAG_OPEN_END */) {\n this._advance();\n selfClosing = false;\n }\n const end = this._peek.sourceSpan.fullStart;\n const span = new ParseSourceSpan(startTagToken.sourceSpan.start, end, startTagToken.sourceSpan.fullStart);\n // Create a separate `startSpan` because `span` will be modified when there is an `end` span.\n const startSpan = new ParseSourceSpan(startTagToken.sourceSpan.start, end, startTagToken.sourceSpan.fullStart);\n const el = new Element(fullName, attrs, [], span, startSpan, undefined);\n this._pushElement(el);\n if (selfClosing) {\n // Elements that are self-closed have their `endSourceSpan` set to the full span, as the\n // element start tag also represents the end tag.\n this._popElement(fullName, span);\n }\n else if (startTagToken.type === 4 /* TokenType.INCOMPLETE_TAG_OPEN */) {\n // We already know the opening tag is not complete, so it is unlikely it has a corresponding\n // close tag. Let's optimistically parse it as a full element and emit an error.\n this._popElement(fullName, null);\n this.errors.push(TreeError.create(fullName, span, `Opening tag \"${fullName}\" not terminated.`));\n }\n }\n _pushElement(el) {\n const parentEl = this._getParentElement();\n if (parentEl && this.getTagDefinition(parentEl.name).isClosedByChild(el.name)) {\n this._elementStack.pop();\n }\n this._addToParent(el);\n this._elementStack.push(el);\n }\n _consumeEndTag(endTagToken) {\n const fullName = this._getElementFullName(endTagToken.parts[0], endTagToken.parts[1], this._getParentElement());\n if (this.getTagDefinition(fullName).isVoid) {\n this.errors.push(TreeError.create(fullName, endTagToken.sourceSpan, `Void elements do not have end tags \"${endTagToken.parts[1]}\"`));\n }\n else if (!this._popElement(fullName, endTagToken.sourceSpan)) {\n const errMsg = `Unexpected closing tag \"${fullName}\". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags`;\n this.errors.push(TreeError.create(fullName, endTagToken.sourceSpan, errMsg));\n }\n }\n /**\n * Closes the nearest element with the tag name `fullName` in the parse tree.\n * `endSourceSpan` is the span of the closing tag, or null if the element does\n * not have a closing tag (for example, this happens when an incomplete\n * opening tag is recovered).\n */\n _popElement(fullName, endSourceSpan) {\n let unexpectedCloseTagDetected = false;\n for (let stackIndex = this._elementStack.length - 1; stackIndex >= 0; stackIndex--) {\n const el = this._elementStack[stackIndex];\n if (el.name === fullName) {\n // Record the parse span with the element that is being closed. Any elements that are\n // removed from the element stack at this point are closed implicitly, so they won't get\n // an end source span (as there is no explicit closing element).\n el.endSourceSpan = endSourceSpan;\n el.sourceSpan.end = endSourceSpan !== null ? endSourceSpan.end : el.sourceSpan.end;\n this._elementStack.splice(stackIndex, this._elementStack.length - stackIndex);\n return !unexpectedCloseTagDetected;\n }\n if (!this.getTagDefinition(el.name).closedByParent) {\n // Note that we encountered an unexpected close tag but continue processing the element\n // stack so we can assign an `endSourceSpan` if there is a corresponding start tag for this\n // end tag in the stack.\n unexpectedCloseTagDetected = true;\n }\n }\n return false;\n }\n _consumeAttr(attrName) {\n const fullName = mergeNsAndName(attrName.parts[0], attrName.parts[1]);\n let attrEnd = attrName.sourceSpan.end;\n // Consume any quote\n if (this._peek.type === 15 /* TokenType.ATTR_QUOTE */) {\n this._advance();\n }\n // Consume the attribute value\n let value = '';\n const valueTokens = [];\n let valueStartSpan = undefined;\n let valueEnd = undefined;\n // NOTE: We need to use a new variable `nextTokenType` here to hide the actual type of\n // `_peek.type` from TS. Otherwise TS will narrow the type of `_peek.type` preventing it from\n // being able to consider `ATTR_VALUE_INTERPOLATION` as an option. This is because TS is not\n // able to see that `_advance()` will actually mutate `_peek`.\n const nextTokenType = this._peek.type;\n if (nextTokenType === 16 /* TokenType.ATTR_VALUE_TEXT */) {\n valueStartSpan = this._peek.sourceSpan;\n valueEnd = this._peek.sourceSpan.end;\n while (this._peek.type === 16 /* TokenType.ATTR_VALUE_TEXT */ ||\n this._peek.type === 17 /* TokenType.ATTR_VALUE_INTERPOLATION */ ||\n this._peek.type === 9 /* TokenType.ENCODED_ENTITY */) {\n const valueToken = this._advance();\n valueTokens.push(valueToken);\n if (valueToken.type === 17 /* TokenType.ATTR_VALUE_INTERPOLATION */) {\n // For backward compatibility we decode HTML entities that appear in interpolation\n // expressions. This is arguably a bug, but it could be a considerable breaking change to\n // fix it. It should be addressed in a larger project to refactor the entire parser/lexer\n // chain after View Engine has been removed.\n value += valueToken.parts.join('').replace(/&([^;]+);/g, decodeEntity);\n }\n else if (valueToken.type === 9 /* TokenType.ENCODED_ENTITY */) {\n value += valueToken.parts[0];\n }\n else {\n value += valueToken.parts.join('');\n }\n valueEnd = attrEnd = valueToken.sourceSpan.end;\n }\n }\n // Consume any quote\n if (this._peek.type === 15 /* TokenType.ATTR_QUOTE */) {\n const quoteToken = this._advance();\n attrEnd = quoteToken.sourceSpan.end;\n }\n const valueSpan = valueStartSpan && valueEnd &&\n new ParseSourceSpan(valueStartSpan.start, valueEnd, valueStartSpan.fullStart);\n return new Attribute(fullName, value, new ParseSourceSpan(attrName.sourceSpan.start, attrEnd, attrName.sourceSpan.fullStart), attrName.sourceSpan, valueSpan, valueTokens.length > 0 ? valueTokens : undefined, undefined);\n }\n _getParentElement() {\n return this._elementStack.length > 0 ? this._elementStack[this._elementStack.length - 1] : null;\n }\n _addToParent(node) {\n const parent = this._getParentElement();\n if (parent != null) {\n parent.children.push(node);\n }\n else {\n this.rootNodes.push(node);\n }\n }\n _getElementFullName(prefix, localName, parentElement) {\n if (prefix === '') {\n prefix = this.getTagDefinition(localName).implicitNamespacePrefix || '';\n if (prefix === '' && parentElement != null) {\n const parentTagName = splitNsName(parentElement.name)[1];\n const parentTagDefinition = this.getTagDefinition(parentTagName);\n if (!parentTagDefinition.preventNamespaceInheritance) {\n prefix = getNsPrefix(parentElement.name);\n }\n }\n }\n return mergeNsAndName(prefix, localName);\n }\n}\nfunction lastOnStack(stack, element) {\n return stack.length > 0 && stack[stack.length - 1] === element;\n}\n/**\n * Decode the `entity` string, which we believe is the contents of an HTML entity.\n *\n * If the string is not actually a valid/known entity then just return the original `match` string.\n */\nfunction decodeEntity(match, entity) {\n if (NAMED_ENTITIES[entity] !== undefined) {\n return NAMED_ENTITIES[entity] || match;\n }\n if (/^#x[a-f0-9]+$/i.test(entity)) {\n return String.fromCodePoint(parseInt(entity.slice(2), 16));\n }\n if (/^#\\d+$/.test(entity)) {\n return String.fromCodePoint(parseInt(entity.slice(1), 10));\n }\n return match;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass HtmlParser extends Parser {\n constructor() {\n super(getHtmlTagDefinition);\n }\n parse(source, url, options) {\n return super.parse(source, url, options);\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst PRESERVE_WS_ATTR_NAME = 'ngPreserveWhitespaces';\nconst SKIP_WS_TRIM_TAGS = new Set(['pre', 'template', 'textarea', 'script', 'style']);\n// Equivalent to \\s with \\u00a0 (non-breaking space) excluded.\n// Based on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp\nconst WS_CHARS = ' \\f\\n\\r\\t\\v\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\ufeff';\nconst NO_WS_REGEXP = new RegExp(`[^${WS_CHARS}]`);\nconst WS_REPLACE_REGEXP = new RegExp(`[${WS_CHARS}]{2,}`, 'g');\nfunction hasPreserveWhitespacesAttr(attrs) {\n return attrs.some((attr) => attr.name === PRESERVE_WS_ATTR_NAME);\n}\n/**\n * Angular Dart introduced &ngsp; as a placeholder for non-removable space, see:\n * https://github.com/dart-lang/angular/blob/0bb611387d29d65b5af7f9d2515ab571fd3fbee4/_tests/test/compiler/preserve_whitespace_test.dart#L25-L32\n * In Angular Dart &ngsp; is converted to the 0xE500 PUA (Private Use Areas) unicode character\n * and later on replaced by a space. We are re-implementing the same idea here.\n */\nfunction replaceNgsp(value) {\n // lexer is replacing the &ngsp; pseudo-entity with NGSP_UNICODE\n return value.replace(new RegExp(NGSP_UNICODE, 'g'), ' ');\n}\n/**\n * This visitor can walk HTML parse tree and remove / trim text nodes using the following rules:\n * - consider spaces, tabs and new lines as whitespace characters;\n * - drop text nodes consisting of whitespace characters only;\n * - for all other text nodes replace consecutive whitespace characters with one space;\n * - convert &ngsp; pseudo-entity to a single space;\n *\n * Removal and trimming of whitespaces have positive performance impact (less code to generate\n * while compiling templates, faster view creation). At the same time it can be \"destructive\"\n * in some cases (whitespaces can influence layout). Because of the potential of breaking layout\n * this visitor is not activated by default in Angular 5 and people need to explicitly opt-in for\n * whitespace removal. The default option for whitespace removal will be revisited in Angular 6\n * and might be changed to \"on\" by default.\n */\nclass WhitespaceVisitor {\n visitElement(element, context) {\n if (SKIP_WS_TRIM_TAGS.has(element.name) || hasPreserveWhitespacesAttr(element.attrs)) {\n // don't descent into elements where we need to preserve whitespaces\n // but still visit all attributes to eliminate one used as a market to preserve WS\n return new Element(element.name, visitAll(this, element.attrs), element.children, element.sourceSpan, element.startSourceSpan, element.endSourceSpan, element.i18n);\n }\n return new Element(element.name, element.attrs, visitAllWithSiblings(this, element.children), element.sourceSpan, element.startSourceSpan, element.endSourceSpan, element.i18n);\n }\n visitAttribute(attribute, context) {\n return attribute.name !== PRESERVE_WS_ATTR_NAME ? attribute : null;\n }\n visitText(text, context) {\n const isNotBlank = text.value.match(NO_WS_REGEXP);\n const hasExpansionSibling = context &&\n (context.prev instanceof Expansion || context.next instanceof Expansion);\n if (isNotBlank || hasExpansionSibling) {\n // Process the whitespace in the tokens of this Text node\n const tokens = text.tokens.map(token => token.type === 5 /* TokenType.TEXT */ ? createWhitespaceProcessedTextToken(token) : token);\n // Process the whitespace of the value of this Text node\n const value = processWhitespace(text.value);\n return new Text(value, text.sourceSpan, tokens, text.i18n);\n }\n return null;\n }\n visitComment(comment, context) {\n return comment;\n }\n visitExpansion(expansion, context) {\n return expansion;\n }\n visitExpansionCase(expansionCase, context) {\n return expansionCase;\n }\n}\nfunction createWhitespaceProcessedTextToken({ type, parts, sourceSpan }) {\n return { type, parts: [processWhitespace(parts[0])], sourceSpan };\n}\nfunction processWhitespace(text) {\n return replaceNgsp(text).replace(WS_REPLACE_REGEXP, ' ');\n}\nfunction removeWhitespaces(htmlAstWithErrors) {\n return new ParseTreeResult(visitAll(new WhitespaceVisitor(), htmlAstWithErrors.rootNodes), htmlAstWithErrors.errors);\n}\nfunction visitAllWithSiblings(visitor, nodes) {\n const result = [];\n nodes.forEach((ast, i) => {\n const context = { prev: nodes[i - 1], next: nodes[i + 1] };\n const astResult = ast.visit(visitor, context);\n if (astResult) {\n result.push(astResult);\n }\n });\n return result;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction mapEntry(key, value) {\n return { key, value, quoted: false };\n}\nfunction mapLiteral(obj, quoted = false) {\n return literalMap(Object.keys(obj).map(key => ({\n key,\n quoted,\n value: obj[key],\n })));\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// =================================================================================================\n// =================================================================================================\n// =========== S T O P - S T O P - S T O P - S T O P - S T O P - S T O P ===========\n// =================================================================================================\n// =================================================================================================\n//\n// DO NOT EDIT THIS LIST OF SECURITY SENSITIVE PROPERTIES WITHOUT A SECURITY REVIEW!\n// Reach out to mprobst for details.\n//\n// =================================================================================================\n/** Map from tagName|propertyName to SecurityContext. Properties applying to all tags use '*'. */\nlet _SECURITY_SCHEMA;\nfunction SECURITY_SCHEMA() {\n if (!_SECURITY_SCHEMA) {\n _SECURITY_SCHEMA = {};\n // Case is insignificant below, all element and attribute names are lower-cased for lookup.\n registerContext(SecurityContext.HTML, [\n 'iframe|srcdoc',\n '*|innerHTML',\n '*|outerHTML',\n ]);\n registerContext(SecurityContext.STYLE, ['*|style']);\n // NB: no SCRIPT contexts here, they are never allowed due to the parser stripping them.\n registerContext(SecurityContext.URL, [\n '*|formAction', 'area|href', 'area|ping', 'audio|src', 'a|href',\n 'a|ping', 'blockquote|cite', 'body|background', 'del|cite', 'form|action',\n 'img|src', 'img|srcset', 'input|src', 'ins|cite', 'q|cite',\n 'source|src', 'source|srcset', 'track|src', 'video|poster', 'video|src',\n ]);\n registerContext(SecurityContext.RESOURCE_URL, [\n 'applet|code',\n 'applet|codebase',\n 'base|href',\n 'embed|src',\n 'frame|src',\n 'head|profile',\n 'html|manifest',\n 'iframe|src',\n 'link|href',\n 'media|src',\n 'object|codebase',\n 'object|data',\n 'script|src',\n ]);\n }\n return _SECURITY_SCHEMA;\n}\nfunction registerContext(ctx, specs) {\n for (const spec of specs)\n _SECURITY_SCHEMA[spec.toLowerCase()] = ctx;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass ElementSchemaRegistry {\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst EVENT = 'event';\nconst BOOLEAN = 'boolean';\nconst NUMBER = 'number';\nconst STRING = 'string';\nconst OBJECT = 'object';\n/**\n * This array represents the DOM schema. It encodes inheritance, properties, and events.\n *\n * ## Overview\n *\n * Each line represents one kind of element. The `element_inheritance` and properties are joined\n * using `element_inheritance|properties` syntax.\n *\n * ## Element Inheritance\n *\n * The `element_inheritance` can be further subdivided as `element1,element2,...^parentElement`.\n * Here the individual elements are separated by `,` (commas). Every element in the list\n * has identical properties.\n *\n * An `element` may inherit additional properties from `parentElement` If no `^parentElement` is\n * specified then `\"\"` (blank) element is assumed.\n *\n * NOTE: The blank element inherits from root `[Element]` element, the super element of all\n * elements.\n *\n * NOTE an element prefix such as `:svg:` has no special meaning to the schema.\n *\n * ## Properties\n *\n * Each element has a set of properties separated by `,` (commas). Each property can be prefixed\n * by a special character designating its type:\n *\n * - (no prefix): property is a string.\n * - `*`: property represents an event.\n * - `!`: property is a boolean.\n * - `#`: property is a number.\n * - `%`: property is an object.\n *\n * ## Query\n *\n * The class creates an internal squas representation which allows to easily answer the query of\n * if a given property exist on a given element.\n *\n * NOTE: We don't yet support querying for types or events.\n * NOTE: This schema is auto extracted from `schema_extractor.ts` located in the test folder,\n * see dom_element_schema_registry_spec.ts\n */\n// =================================================================================================\n// =================================================================================================\n// =========== S T O P - S T O P - S T O P - S T O P - S T O P - S T O P ===========\n// =================================================================================================\n// =================================================================================================\n//\n// DO NOT EDIT THIS DOM SCHEMA WITHOUT A SECURITY REVIEW!\n//\n// Newly added properties must be security reviewed and assigned an appropriate SecurityContext in\n// dom_security_schema.ts. Reach out to mprobst & rjamet for details.\n//\n// =================================================================================================\nconst SCHEMA = [\n '[Element]|textContent,%classList,className,id,innerHTML,*beforecopy,*beforecut,*beforepaste,*copy,*cut,*paste,*search,*selectstart,*webkitfullscreenchange,*webkitfullscreenerror,*wheel,outerHTML,#scrollLeft,#scrollTop,slot' +\n /* added manually to avoid breaking changes */\n ',*message,*mozfullscreenchange,*mozfullscreenerror,*mozpointerlockchange,*mozpointerlockerror,*webglcontextcreationerror,*webglcontextlost,*webglcontextrestored',\n '[HTMLElement]^[Element]|accessKey,contentEditable,dir,!draggable,!hidden,innerText,lang,*abort,*auxclick,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*cuechange,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*seeked,*seeking,*select,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,outerText,!spellcheck,%style,#tabIndex,title,!translate',\n 'abbr,address,article,aside,b,bdi,bdo,cite,code,dd,dfn,dt,em,figcaption,figure,footer,header,i,kbd,main,mark,nav,noscript,rb,rp,rt,rtc,ruby,s,samp,section,small,strong,sub,sup,u,var,wbr^[HTMLElement]|accessKey,contentEditable,dir,!draggable,!hidden,innerText,lang,*abort,*auxclick,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*cuechange,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*seeked,*seeking,*select,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,outerText,!spellcheck,%style,#tabIndex,title,!translate',\n 'media^[HTMLElement]|!autoplay,!controls,%controlsList,%crossOrigin,#currentTime,!defaultMuted,#defaultPlaybackRate,!disableRemotePlayback,!loop,!muted,*encrypted,*waitingforkey,#playbackRate,preload,src,%srcObject,#volume',\n ':svg:^[HTMLElement]|*abort,*auxclick,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*cuechange,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*seeked,*seeking,*select,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,%style,#tabIndex',\n ':svg:graphics^:svg:|',\n ':svg:animation^:svg:|*begin,*end,*repeat',\n ':svg:geometry^:svg:|',\n ':svg:componentTransferFunction^:svg:|',\n ':svg:gradient^:svg:|',\n ':svg:textContent^:svg:graphics|',\n ':svg:textPositioning^:svg:textContent|',\n 'a^[HTMLElement]|charset,coords,download,hash,host,hostname,href,hreflang,name,password,pathname,ping,port,protocol,referrerPolicy,rel,rev,search,shape,target,text,type,username',\n 'area^[HTMLElement]|alt,coords,download,hash,host,hostname,href,!noHref,password,pathname,ping,port,protocol,referrerPolicy,rel,search,shape,target,username',\n 'audio^media|',\n 'br^[HTMLElement]|clear',\n 'base^[HTMLElement]|href,target',\n 'body^[HTMLElement]|aLink,background,bgColor,link,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,text,vLink',\n 'button^[HTMLElement]|!autofocus,!disabled,formAction,formEnctype,formMethod,!formNoValidate,formTarget,name,type,value',\n 'canvas^[HTMLElement]|#height,#width',\n 'content^[HTMLElement]|select',\n 'dl^[HTMLElement]|!compact',\n 'datalist^[HTMLElement]|',\n 'details^[HTMLElement]|!open',\n 'dialog^[HTMLElement]|!open,returnValue',\n 'dir^[HTMLElement]|!compact',\n 'div^[HTMLElement]|align',\n 'embed^[HTMLElement]|align,height,name,src,type,width',\n 'fieldset^[HTMLElement]|!disabled,name',\n 'font^[HTMLElement]|color,face,size',\n 'form^[HTMLElement]|acceptCharset,action,autocomplete,encoding,enctype,method,name,!noValidate,target',\n 'frame^[HTMLElement]|frameBorder,longDesc,marginHeight,marginWidth,name,!noResize,scrolling,src',\n 'frameset^[HTMLElement]|cols,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,rows',\n 'hr^[HTMLElement]|align,color,!noShade,size,width',\n 'head^[HTMLElement]|',\n 'h1,h2,h3,h4,h5,h6^[HTMLElement]|align',\n 'html^[HTMLElement]|version',\n 'iframe^[HTMLElement]|align,!allowFullscreen,frameBorder,height,longDesc,marginHeight,marginWidth,name,referrerPolicy,%sandbox,scrolling,src,srcdoc,width',\n 'img^[HTMLElement]|align,alt,border,%crossOrigin,#height,#hspace,!isMap,longDesc,lowsrc,name,referrerPolicy,sizes,src,srcset,useMap,#vspace,#width',\n 'input^[HTMLElement]|accept,align,alt,autocapitalize,autocomplete,!autofocus,!checked,!defaultChecked,defaultValue,dirName,!disabled,%files,formAction,formEnctype,formMethod,!formNoValidate,formTarget,#height,!incremental,!indeterminate,max,#maxLength,min,#minLength,!multiple,name,pattern,placeholder,!readOnly,!required,selectionDirection,#selectionEnd,#selectionStart,#size,src,step,type,useMap,value,%valueAsDate,#valueAsNumber,#width',\n 'li^[HTMLElement]|type,#value',\n 'label^[HTMLElement]|htmlFor',\n 'legend^[HTMLElement]|align',\n 'link^[HTMLElement]|as,charset,%crossOrigin,!disabled,href,hreflang,integrity,media,referrerPolicy,rel,%relList,rev,%sizes,target,type',\n 'map^[HTMLElement]|name',\n 'marquee^[HTMLElement]|behavior,bgColor,direction,height,#hspace,#loop,#scrollAmount,#scrollDelay,!trueSpeed,#vspace,width',\n 'menu^[HTMLElement]|!compact',\n 'meta^[HTMLElement]|content,httpEquiv,name,scheme',\n 'meter^[HTMLElement]|#high,#low,#max,#min,#optimum,#value',\n 'ins,del^[HTMLElement]|cite,dateTime',\n 'ol^[HTMLElement]|!compact,!reversed,#start,type',\n 'object^[HTMLElement]|align,archive,border,code,codeBase,codeType,data,!declare,height,#hspace,name,standby,type,useMap,#vspace,width',\n 'optgroup^[HTMLElement]|!disabled,label',\n 'option^[HTMLElement]|!defaultSelected,!disabled,label,!selected,text,value',\n 'output^[HTMLElement]|defaultValue,%htmlFor,name,value',\n 'p^[HTMLElement]|align',\n 'param^[HTMLElement]|name,type,value,valueType',\n 'picture^[HTMLElement]|',\n 'pre^[HTMLElement]|#width',\n 'progress^[HTMLElement]|#max,#value',\n 'q,blockquote,cite^[HTMLElement]|',\n 'script^[HTMLElement]|!async,charset,%crossOrigin,!defer,event,htmlFor,integrity,src,text,type',\n 'select^[HTMLElement]|autocomplete,!autofocus,!disabled,#length,!multiple,name,!required,#selectedIndex,#size,value',\n 'shadow^[HTMLElement]|',\n 'slot^[HTMLElement]|name',\n 'source^[HTMLElement]|media,sizes,src,srcset,type',\n 'span^[HTMLElement]|',\n 'style^[HTMLElement]|!disabled,media,type',\n 'caption^[HTMLElement]|align',\n 'th,td^[HTMLElement]|abbr,align,axis,bgColor,ch,chOff,#colSpan,headers,height,!noWrap,#rowSpan,scope,vAlign,width',\n 'col,colgroup^[HTMLElement]|align,ch,chOff,#span,vAlign,width',\n 'table^[HTMLElement]|align,bgColor,border,%caption,cellPadding,cellSpacing,frame,rules,summary,%tFoot,%tHead,width',\n 'tr^[HTMLElement]|align,bgColor,ch,chOff,vAlign',\n 'tfoot,thead,tbody^[HTMLElement]|align,ch,chOff,vAlign',\n 'template^[HTMLElement]|',\n 'textarea^[HTMLElement]|autocapitalize,autocomplete,!autofocus,#cols,defaultValue,dirName,!disabled,#maxLength,#minLength,name,placeholder,!readOnly,!required,#rows,selectionDirection,#selectionEnd,#selectionStart,value,wrap',\n 'title^[HTMLElement]|text',\n 'track^[HTMLElement]|!default,kind,label,src,srclang',\n 'ul^[HTMLElement]|!compact,type',\n 'unknown^[HTMLElement]|',\n 'video^media|#height,poster,#width',\n ':svg:a^:svg:graphics|',\n ':svg:animate^:svg:animation|',\n ':svg:animateMotion^:svg:animation|',\n ':svg:animateTransform^:svg:animation|',\n ':svg:circle^:svg:geometry|',\n ':svg:clipPath^:svg:graphics|',\n ':svg:defs^:svg:graphics|',\n ':svg:desc^:svg:|',\n ':svg:discard^:svg:|',\n ':svg:ellipse^:svg:geometry|',\n ':svg:feBlend^:svg:|',\n ':svg:feColorMatrix^:svg:|',\n ':svg:feComponentTransfer^:svg:|',\n ':svg:feComposite^:svg:|',\n ':svg:feConvolveMatrix^:svg:|',\n ':svg:feDiffuseLighting^:svg:|',\n ':svg:feDisplacementMap^:svg:|',\n ':svg:feDistantLight^:svg:|',\n ':svg:feDropShadow^:svg:|',\n ':svg:feFlood^:svg:|',\n ':svg:feFuncA^:svg:componentTransferFunction|',\n ':svg:feFuncB^:svg:componentTransferFunction|',\n ':svg:feFuncG^:svg:componentTransferFunction|',\n ':svg:feFuncR^:svg:componentTransferFunction|',\n ':svg:feGaussianBlur^:svg:|',\n ':svg:feImage^:svg:|',\n ':svg:feMerge^:svg:|',\n ':svg:feMergeNode^:svg:|',\n ':svg:feMorphology^:svg:|',\n ':svg:feOffset^:svg:|',\n ':svg:fePointLight^:svg:|',\n ':svg:feSpecularLighting^:svg:|',\n ':svg:feSpotLight^:svg:|',\n ':svg:feTile^:svg:|',\n ':svg:feTurbulence^:svg:|',\n ':svg:filter^:svg:|',\n ':svg:foreignObject^:svg:graphics|',\n ':svg:g^:svg:graphics|',\n ':svg:image^:svg:graphics|',\n ':svg:line^:svg:geometry|',\n ':svg:linearGradient^:svg:gradient|',\n ':svg:mpath^:svg:|',\n ':svg:marker^:svg:|',\n ':svg:mask^:svg:|',\n ':svg:metadata^:svg:|',\n ':svg:path^:svg:geometry|',\n ':svg:pattern^:svg:|',\n ':svg:polygon^:svg:geometry|',\n ':svg:polyline^:svg:geometry|',\n ':svg:radialGradient^:svg:gradient|',\n ':svg:rect^:svg:geometry|',\n ':svg:svg^:svg:graphics|#currentScale,#zoomAndPan',\n ':svg:script^:svg:|type',\n ':svg:set^:svg:animation|',\n ':svg:stop^:svg:|',\n ':svg:style^:svg:|!disabled,media,title,type',\n ':svg:switch^:svg:graphics|',\n ':svg:symbol^:svg:|',\n ':svg:tspan^:svg:textPositioning|',\n ':svg:text^:svg:textPositioning|',\n ':svg:textPath^:svg:textContent|',\n ':svg:title^:svg:|',\n ':svg:use^:svg:graphics|',\n ':svg:view^:svg:|#zoomAndPan',\n 'data^[HTMLElement]|value',\n 'keygen^[HTMLElement]|!autofocus,challenge,!disabled,form,keytype,name',\n 'menuitem^[HTMLElement]|type,label,icon,!disabled,!checked,radiogroup,!default',\n 'summary^[HTMLElement]|',\n 'time^[HTMLElement]|dateTime',\n ':svg:cursor^:svg:|',\n];\nconst _ATTR_TO_PROP = {\n 'class': 'className',\n 'for': 'htmlFor',\n 'formaction': 'formAction',\n 'innerHtml': 'innerHTML',\n 'readonly': 'readOnly',\n 'tabindex': 'tabIndex',\n};\n// Invert _ATTR_TO_PROP.\nconst _PROP_TO_ATTR = Object.keys(_ATTR_TO_PROP).reduce((inverted, attr) => {\n inverted[_ATTR_TO_PROP[attr]] = attr;\n return inverted;\n}, {});\nclass DomElementSchemaRegistry extends ElementSchemaRegistry {\n constructor() {\n super();\n this._schema = {};\n // We don't allow binding to events for security reasons. Allowing event bindings would almost\n // certainly introduce bad XSS vulnerabilities. Instead, we store events in a separate schema.\n this._eventSchema = {};\n SCHEMA.forEach(encodedType => {\n const type = {};\n const events = new Set();\n const [strType, strProperties] = encodedType.split('|');\n const properties = strProperties.split(',');\n const [typeNames, superName] = strType.split('^');\n typeNames.split(',').forEach(tag => {\n this._schema[tag.toLowerCase()] = type;\n this._eventSchema[tag.toLowerCase()] = events;\n });\n const superType = superName && this._schema[superName.toLowerCase()];\n if (superType) {\n Object.keys(superType).forEach((prop) => {\n type[prop] = superType[prop];\n });\n for (const superEvent of this._eventSchema[superName.toLowerCase()]) {\n events.add(superEvent);\n }\n }\n properties.forEach((property) => {\n if (property.length > 0) {\n switch (property[0]) {\n case '*':\n events.add(property.substring(1));\n break;\n case '!':\n type[property.substring(1)] = BOOLEAN;\n break;\n case '#':\n type[property.substring(1)] = NUMBER;\n break;\n case '%':\n type[property.substring(1)] = OBJECT;\n break;\n default:\n type[property] = STRING;\n }\n }\n });\n });\n }\n hasProperty(tagName, propName, schemaMetas) {\n if (schemaMetas.some((schema) => schema.name === NO_ERRORS_SCHEMA.name)) {\n return true;\n }\n if (tagName.indexOf('-') > -1) {\n if (isNgContainer(tagName) || isNgContent(tagName)) {\n return false;\n }\n if (schemaMetas.some((schema) => schema.name === CUSTOM_ELEMENTS_SCHEMA.name)) {\n // Can't tell now as we don't know which properties a custom element will get\n // once it is instantiated\n return true;\n }\n }\n const elementProperties = this._schema[tagName.toLowerCase()] || this._schema['unknown'];\n return !!elementProperties[propName];\n }\n hasElement(tagName, schemaMetas) {\n if (schemaMetas.some((schema) => schema.name === NO_ERRORS_SCHEMA.name)) {\n return true;\n }\n if (tagName.indexOf('-') > -1) {\n if (isNgContainer(tagName) || isNgContent(tagName)) {\n return true;\n }\n if (schemaMetas.some((schema) => schema.name === CUSTOM_ELEMENTS_SCHEMA.name)) {\n // Allow any custom elements\n return true;\n }\n }\n return !!this._schema[tagName.toLowerCase()];\n }\n /**\n * securityContext returns the security context for the given property on the given DOM tag.\n *\n * Tag and property name are statically known and cannot change at runtime, i.e. it is not\n * possible to bind a value into a changing attribute or tag name.\n *\n * The filtering is based on a list of allowed tags|attributes. All attributes in the schema\n * above are assumed to have the 'NONE' security context, i.e. that they are safe inert\n * string values. Only specific well known attack vectors are assigned their appropriate context.\n */\n securityContext(tagName, propName, isAttribute) {\n if (isAttribute) {\n // NB: For security purposes, use the mapped property name, not the attribute name.\n propName = this.getMappedPropName(propName);\n }\n // Make sure comparisons are case insensitive, so that case differences between attribute and\n // property names do not have a security impact.\n tagName = tagName.toLowerCase();\n propName = propName.toLowerCase();\n let ctx = SECURITY_SCHEMA()[tagName + '|' + propName];\n if (ctx) {\n return ctx;\n }\n ctx = SECURITY_SCHEMA()['*|' + propName];\n return ctx ? ctx : SecurityContext.NONE;\n }\n getMappedPropName(propName) {\n return _ATTR_TO_PROP[propName] || propName;\n }\n getDefaultComponentElementName() {\n return 'ng-component';\n }\n validateProperty(name) {\n if (name.toLowerCase().startsWith('on')) {\n const msg = `Binding to event property '${name}' is disallowed for security reasons, ` +\n `please use (${name.slice(2)})=...` +\n `\\nIf '${name}' is a directive input, make sure the directive is imported by the` +\n ` current module.`;\n return { error: true, msg: msg };\n }\n else {\n return { error: false };\n }\n }\n validateAttribute(name) {\n if (name.toLowerCase().startsWith('on')) {\n const msg = `Binding to event attribute '${name}' is disallowed for security reasons, ` +\n `please use (${name.slice(2)})=...`;\n return { error: true, msg: msg };\n }\n else {\n return { error: false };\n }\n }\n allKnownElementNames() {\n return Object.keys(this._schema);\n }\n allKnownAttributesOfElement(tagName) {\n const elementProperties = this._schema[tagName.toLowerCase()] || this._schema['unknown'];\n // Convert properties to attributes.\n return Object.keys(elementProperties).map(prop => _PROP_TO_ATTR[prop] ?? prop);\n }\n allKnownEventsOfElement(tagName) {\n return Array.from(this._eventSchema[tagName.toLowerCase()] ?? []);\n }\n normalizeAnimationStyleProperty(propName) {\n return dashCaseToCamelCase(propName);\n }\n normalizeAnimationStyleValue(camelCaseProp, userProvidedProp, val) {\n let unit = '';\n const strVal = val.toString().trim();\n let errorMsg = null;\n if (_isPixelDimensionStyle(camelCaseProp) && val !== 0 && val !== '0') {\n if (typeof val === 'number') {\n unit = 'px';\n }\n else {\n const valAndSuffixMatch = val.match(/^[+-]?[\\d\\.]+([a-z]*)$/);\n if (valAndSuffixMatch && valAndSuffixMatch[1].length == 0) {\n errorMsg = `Please provide a CSS unit value for ${userProvidedProp}:${val}`;\n }\n }\n }\n return { error: errorMsg, value: strVal + unit };\n }\n}\nfunction _isPixelDimensionStyle(prop) {\n switch (prop) {\n case 'width':\n case 'height':\n case 'minWidth':\n case 'minHeight':\n case 'maxWidth':\n case 'maxHeight':\n case 'left':\n case 'top':\n case 'bottom':\n case 'right':\n case 'fontSize':\n case 'outlineWidth':\n case 'outlineOffset':\n case 'paddingTop':\n case 'paddingLeft':\n case 'paddingBottom':\n case 'paddingRight':\n case 'marginTop':\n case 'marginLeft':\n case 'marginBottom':\n case 'marginRight':\n case 'borderRadius':\n case 'borderWidth':\n case 'borderTopWidth':\n case 'borderLeftWidth':\n case 'borderRightWidth':\n case 'borderBottomWidth':\n case 'textIndent':\n return true;\n default:\n return false;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Set of tagName|propertyName corresponding to Trusted Types sinks. Properties applying to all\n * tags use '*'.\n *\n * Extracted from, and should be kept in sync with\n * https://w3c.github.io/webappsec-trusted-types/dist/spec/#integrations\n */\nconst TRUSTED_TYPES_SINKS = new Set([\n // NOTE: All strings in this set *must* be lowercase!\n // TrustedHTML\n 'iframe|srcdoc',\n '*|innerhtml',\n '*|outerhtml',\n // NB: no TrustedScript here, as the corresponding tags are stripped by the compiler.\n // TrustedScriptURL\n 'embed|src',\n 'object|codebase',\n 'object|data',\n]);\n/**\n * isTrustedTypesSink returns true if the given property on the given DOM tag is a Trusted Types\n * sink. In that case, use `ElementSchemaRegistry.securityContext` to determine which particular\n * Trusted Type is required for values passed to the sink:\n * - SecurityContext.HTML corresponds to TrustedHTML\n * - SecurityContext.RESOURCE_URL corresponds to TrustedScriptURL\n */\nfunction isTrustedTypesSink(tagName, propName) {\n // Make sure comparisons are case insensitive, so that case differences between attribute and\n // property names do not have a security impact.\n tagName = tagName.toLowerCase();\n propName = propName.toLowerCase();\n return TRUSTED_TYPES_SINKS.has(tagName + '|' + propName) ||\n TRUSTED_TYPES_SINKS.has('*|' + propName);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst PROPERTY_PARTS_SEPARATOR = '.';\nconst ATTRIBUTE_PREFIX = 'attr';\nconst CLASS_PREFIX = 'class';\nconst STYLE_PREFIX = 'style';\nconst TEMPLATE_ATTR_PREFIX$1 = '*';\nconst ANIMATE_PROP_PREFIX = 'animate-';\n/**\n * Parses bindings in templates and in the directive host area.\n */\nclass BindingParser {\n constructor(_exprParser, _interpolationConfig, _schemaRegistry, errors) {\n this._exprParser = _exprParser;\n this._interpolationConfig = _interpolationConfig;\n this._schemaRegistry = _schemaRegistry;\n this.errors = errors;\n }\n get interpolationConfig() {\n return this._interpolationConfig;\n }\n createBoundHostProperties(properties, sourceSpan) {\n const boundProps = [];\n for (const propName of Object.keys(properties)) {\n const expression = properties[propName];\n if (typeof expression === 'string') {\n this.parsePropertyBinding(propName, expression, true, sourceSpan, sourceSpan.start.offset, undefined, [], \n // Use the `sourceSpan` for `keySpan`. This isn't really accurate, but neither is the\n // sourceSpan, as it represents the sourceSpan of the host itself rather than the\n // source of the host binding (which doesn't exist in the template). Regardless,\n // neither of these values are used in Ivy but are only here to satisfy the function\n // signature. This should likely be refactored in the future so that `sourceSpan`\n // isn't being used inaccurately.\n boundProps, sourceSpan);\n }\n else {\n this._reportError(`Value of the host property binding \"${propName}\" needs to be a string representing an expression but got \"${expression}\" (${typeof expression})`, sourceSpan);\n }\n }\n return boundProps;\n }\n createDirectiveHostEventAsts(hostListeners, sourceSpan) {\n const targetEvents = [];\n for (const propName of Object.keys(hostListeners)) {\n const expression = hostListeners[propName];\n if (typeof expression === 'string') {\n // Use the `sourceSpan` for `keySpan` and `handlerSpan`. This isn't really accurate, but\n // neither is the `sourceSpan`, as it represents the `sourceSpan` of the host itself\n // rather than the source of the host binding (which doesn't exist in the template).\n // Regardless, neither of these values are used in Ivy but are only here to satisfy the\n // function signature. This should likely be refactored in the future so that `sourceSpan`\n // isn't being used inaccurately.\n this.parseEvent(propName, expression, /* isAssignmentEvent */ false, sourceSpan, sourceSpan, [], targetEvents, sourceSpan);\n }\n else {\n this._reportError(`Value of the host listener \"${propName}\" needs to be a string representing an expression but got \"${expression}\" (${typeof expression})`, sourceSpan);\n }\n }\n return targetEvents;\n }\n parseInterpolation(value, sourceSpan, interpolatedTokens) {\n const sourceInfo = sourceSpan.start.toString();\n const absoluteOffset = sourceSpan.fullStart.offset;\n try {\n const ast = this._exprParser.parseInterpolation(value, sourceInfo, absoluteOffset, interpolatedTokens, this._interpolationConfig);\n if (ast)\n this._reportExpressionParserErrors(ast.errors, sourceSpan);\n return ast;\n }\n catch (e) {\n this._reportError(`${e}`, sourceSpan);\n return this._exprParser.wrapLiteralPrimitive('ERROR', sourceInfo, absoluteOffset);\n }\n }\n /**\n * Similar to `parseInterpolation`, but treats the provided string as a single expression\n * element that would normally appear within the interpolation prefix and suffix (`{{` and `}}`).\n * This is used for parsing the switch expression in ICUs.\n */\n parseInterpolationExpression(expression, sourceSpan) {\n const sourceInfo = sourceSpan.start.toString();\n const absoluteOffset = sourceSpan.start.offset;\n try {\n const ast = this._exprParser.parseInterpolationExpression(expression, sourceInfo, absoluteOffset);\n if (ast)\n this._reportExpressionParserErrors(ast.errors, sourceSpan);\n return ast;\n }\n catch (e) {\n this._reportError(`${e}`, sourceSpan);\n return this._exprParser.wrapLiteralPrimitive('ERROR', sourceInfo, absoluteOffset);\n }\n }\n /**\n * Parses the bindings in a microsyntax expression, and converts them to\n * `ParsedProperty` or `ParsedVariable`.\n *\n * @param tplKey template binding name\n * @param tplValue template binding value\n * @param sourceSpan span of template binding relative to entire the template\n * @param absoluteValueOffset start of the tplValue relative to the entire template\n * @param targetMatchableAttrs potential attributes to match in the template\n * @param targetProps target property bindings in the template\n * @param targetVars target variables in the template\n */\n parseInlineTemplateBinding(tplKey, tplValue, sourceSpan, absoluteValueOffset, targetMatchableAttrs, targetProps, targetVars, isIvyAst) {\n const absoluteKeyOffset = sourceSpan.start.offset + TEMPLATE_ATTR_PREFIX$1.length;\n const bindings = this._parseTemplateBindings(tplKey, tplValue, sourceSpan, absoluteKeyOffset, absoluteValueOffset);\n for (const binding of bindings) {\n // sourceSpan is for the entire HTML attribute. bindingSpan is for a particular\n // binding within the microsyntax expression so it's more narrow than sourceSpan.\n const bindingSpan = moveParseSourceSpan(sourceSpan, binding.sourceSpan);\n const key = binding.key.source;\n const keySpan = moveParseSourceSpan(sourceSpan, binding.key.span);\n if (binding instanceof VariableBinding) {\n const value = binding.value ? binding.value.source : '$implicit';\n const valueSpan = binding.value ? moveParseSourceSpan(sourceSpan, binding.value.span) : undefined;\n targetVars.push(new ParsedVariable(key, value, bindingSpan, keySpan, valueSpan));\n }\n else if (binding.value) {\n const srcSpan = isIvyAst ? bindingSpan : sourceSpan;\n const valueSpan = moveParseSourceSpan(sourceSpan, binding.value.ast.sourceSpan);\n this._parsePropertyAst(key, binding.value, srcSpan, keySpan, valueSpan, targetMatchableAttrs, targetProps);\n }\n else {\n targetMatchableAttrs.push([key, '' /* value */]);\n // Since this is a literal attribute with no RHS, source span should be\n // just the key span.\n this.parseLiteralAttr(key, null /* value */, keySpan, absoluteValueOffset, undefined /* valueSpan */, targetMatchableAttrs, targetProps, keySpan);\n }\n }\n }\n /**\n * Parses the bindings in a microsyntax expression, e.g.\n * ```\n * <tag *tplKey=\"let value1 = prop; let value2 = localVar\">\n * ```\n *\n * @param tplKey template binding name\n * @param tplValue template binding value\n * @param sourceSpan span of template binding relative to entire the template\n * @param absoluteKeyOffset start of the `tplKey`\n * @param absoluteValueOffset start of the `tplValue`\n */\n _parseTemplateBindings(tplKey, tplValue, sourceSpan, absoluteKeyOffset, absoluteValueOffset) {\n const sourceInfo = sourceSpan.start.toString();\n try {\n const bindingsResult = this._exprParser.parseTemplateBindings(tplKey, tplValue, sourceInfo, absoluteKeyOffset, absoluteValueOffset);\n this._reportExpressionParserErrors(bindingsResult.errors, sourceSpan);\n bindingsResult.warnings.forEach((warning) => {\n this._reportError(warning, sourceSpan, ParseErrorLevel.WARNING);\n });\n return bindingsResult.templateBindings;\n }\n catch (e) {\n this._reportError(`${e}`, sourceSpan);\n return [];\n }\n }\n parseLiteralAttr(name, value, sourceSpan, absoluteOffset, valueSpan, targetMatchableAttrs, targetProps, keySpan) {\n if (isAnimationLabel(name)) {\n name = name.substring(1);\n if (keySpan !== undefined) {\n keySpan = moveParseSourceSpan(keySpan, new AbsoluteSourceSpan(keySpan.start.offset + 1, keySpan.end.offset));\n }\n if (value) {\n this._reportError(`Assigning animation triggers via @prop=\"exp\" attributes with an expression is invalid.` +\n ` Use property bindings (e.g. [@prop]=\"exp\") or use an attribute without a value (e.g. @prop) instead.`, sourceSpan, ParseErrorLevel.ERROR);\n }\n this._parseAnimation(name, value, sourceSpan, absoluteOffset, keySpan, valueSpan, targetMatchableAttrs, targetProps);\n }\n else {\n targetProps.push(new ParsedProperty(name, this._exprParser.wrapLiteralPrimitive(value, '', absoluteOffset), ParsedPropertyType.LITERAL_ATTR, sourceSpan, keySpan, valueSpan));\n }\n }\n parsePropertyBinding(name, expression, isHost, sourceSpan, absoluteOffset, valueSpan, targetMatchableAttrs, targetProps, keySpan) {\n if (name.length === 0) {\n this._reportError(`Property name is missing in binding`, sourceSpan);\n }\n let isAnimationProp = false;\n if (name.startsWith(ANIMATE_PROP_PREFIX)) {\n isAnimationProp = true;\n name = name.substring(ANIMATE_PROP_PREFIX.length);\n if (keySpan !== undefined) {\n keySpan = moveParseSourceSpan(keySpan, new AbsoluteSourceSpan(keySpan.start.offset + ANIMATE_PROP_PREFIX.length, keySpan.end.offset));\n }\n }\n else if (isAnimationLabel(name)) {\n isAnimationProp = true;\n name = name.substring(1);\n if (keySpan !== undefined) {\n keySpan = moveParseSourceSpan(keySpan, new AbsoluteSourceSpan(keySpan.start.offset + 1, keySpan.end.offset));\n }\n }\n if (isAnimationProp) {\n this._parseAnimation(name, expression, sourceSpan, absoluteOffset, keySpan, valueSpan, targetMatchableAttrs, targetProps);\n }\n else {\n this._parsePropertyAst(name, this._parseBinding(expression, isHost, valueSpan || sourceSpan, absoluteOffset), sourceSpan, keySpan, valueSpan, targetMatchableAttrs, targetProps);\n }\n }\n parsePropertyInterpolation(name, value, sourceSpan, valueSpan, targetMatchableAttrs, targetProps, keySpan, interpolatedTokens) {\n const expr = this.parseInterpolation(value, valueSpan || sourceSpan, interpolatedTokens);\n if (expr) {\n this._parsePropertyAst(name, expr, sourceSpan, keySpan, valueSpan, targetMatchableAttrs, targetProps);\n return true;\n }\n return false;\n }\n _parsePropertyAst(name, ast, sourceSpan, keySpan, valueSpan, targetMatchableAttrs, targetProps) {\n targetMatchableAttrs.push([name, ast.source]);\n targetProps.push(new ParsedProperty(name, ast, ParsedPropertyType.DEFAULT, sourceSpan, keySpan, valueSpan));\n }\n _parseAnimation(name, expression, sourceSpan, absoluteOffset, keySpan, valueSpan, targetMatchableAttrs, targetProps) {\n if (name.length === 0) {\n this._reportError('Animation trigger is missing', sourceSpan);\n }\n // This will occur when a @trigger is not paired with an expression.\n // For animations it is valid to not have an expression since */void\n // states will be applied by angular when the element is attached/detached\n const ast = this._parseBinding(expression || 'undefined', false, valueSpan || sourceSpan, absoluteOffset);\n targetMatchableAttrs.push([name, ast.source]);\n targetProps.push(new ParsedProperty(name, ast, ParsedPropertyType.ANIMATION, sourceSpan, keySpan, valueSpan));\n }\n _parseBinding(value, isHostBinding, sourceSpan, absoluteOffset) {\n const sourceInfo = (sourceSpan && sourceSpan.start || '(unknown)').toString();\n try {\n const ast = isHostBinding ?\n this._exprParser.parseSimpleBinding(value, sourceInfo, absoluteOffset, this._interpolationConfig) :\n this._exprParser.parseBinding(value, sourceInfo, absoluteOffset, this._interpolationConfig);\n if (ast)\n this._reportExpressionParserErrors(ast.errors, sourceSpan);\n return ast;\n }\n catch (e) {\n this._reportError(`${e}`, sourceSpan);\n return this._exprParser.wrapLiteralPrimitive('ERROR', sourceInfo, absoluteOffset);\n }\n }\n createBoundElementProperty(elementSelector, boundProp, skipValidation = false, mapPropertyName = true) {\n if (boundProp.isAnimation) {\n return new BoundElementProperty(boundProp.name, 4 /* BindingType.Animation */, SecurityContext.NONE, boundProp.expression, null, boundProp.sourceSpan, boundProp.keySpan, boundProp.valueSpan);\n }\n let unit = null;\n let bindingType = undefined;\n let boundPropertyName = null;\n const parts = boundProp.name.split(PROPERTY_PARTS_SEPARATOR);\n let securityContexts = undefined;\n // Check for special cases (prefix style, attr, class)\n if (parts.length > 1) {\n if (parts[0] == ATTRIBUTE_PREFIX) {\n boundPropertyName = parts.slice(1).join(PROPERTY_PARTS_SEPARATOR);\n if (!skipValidation) {\n this._validatePropertyOrAttributeName(boundPropertyName, boundProp.sourceSpan, true);\n }\n securityContexts = calcPossibleSecurityContexts(this._schemaRegistry, elementSelector, boundPropertyName, true);\n const nsSeparatorIdx = boundPropertyName.indexOf(':');\n if (nsSeparatorIdx > -1) {\n const ns = boundPropertyName.substring(0, nsSeparatorIdx);\n const name = boundPropertyName.substring(nsSeparatorIdx + 1);\n boundPropertyName = mergeNsAndName(ns, name);\n }\n bindingType = 1 /* BindingType.Attribute */;\n }\n else if (parts[0] == CLASS_PREFIX) {\n boundPropertyName = parts[1];\n bindingType = 2 /* BindingType.Class */;\n securityContexts = [SecurityContext.NONE];\n }\n else if (parts[0] == STYLE_PREFIX) {\n unit = parts.length > 2 ? parts[2] : null;\n boundPropertyName = parts[1];\n bindingType = 3 /* BindingType.Style */;\n securityContexts = [SecurityContext.STYLE];\n }\n }\n // If not a special case, use the full property name\n if (boundPropertyName === null) {\n const mappedPropName = this._schemaRegistry.getMappedPropName(boundProp.name);\n boundPropertyName = mapPropertyName ? mappedPropName : boundProp.name;\n securityContexts = calcPossibleSecurityContexts(this._schemaRegistry, elementSelector, mappedPropName, false);\n bindingType = 0 /* BindingType.Property */;\n if (!skipValidation) {\n this._validatePropertyOrAttributeName(mappedPropName, boundProp.sourceSpan, false);\n }\n }\n return new BoundElementProperty(boundPropertyName, bindingType, securityContexts[0], boundProp.expression, unit, boundProp.sourceSpan, boundProp.keySpan, boundProp.valueSpan);\n }\n // TODO: keySpan should be required but was made optional to avoid changing VE parser.\n parseEvent(name, expression, isAssignmentEvent, sourceSpan, handlerSpan, targetMatchableAttrs, targetEvents, keySpan) {\n if (name.length === 0) {\n this._reportError(`Event name is missing in binding`, sourceSpan);\n }\n if (isAnimationLabel(name)) {\n name = name.slice(1);\n if (keySpan !== undefined) {\n keySpan = moveParseSourceSpan(keySpan, new AbsoluteSourceSpan(keySpan.start.offset + 1, keySpan.end.offset));\n }\n this._parseAnimationEvent(name, expression, isAssignmentEvent, sourceSpan, handlerSpan, targetEvents, keySpan);\n }\n else {\n this._parseRegularEvent(name, expression, isAssignmentEvent, sourceSpan, handlerSpan, targetMatchableAttrs, targetEvents, keySpan);\n }\n }\n calcPossibleSecurityContexts(selector, propName, isAttribute) {\n const prop = this._schemaRegistry.getMappedPropName(propName);\n return calcPossibleSecurityContexts(this._schemaRegistry, selector, prop, isAttribute);\n }\n _parseAnimationEvent(name, expression, isAssignmentEvent, sourceSpan, handlerSpan, targetEvents, keySpan) {\n const matches = splitAtPeriod(name, [name, '']);\n const eventName = matches[0];\n const phase = matches[1].toLowerCase();\n const ast = this._parseAction(expression, isAssignmentEvent, handlerSpan);\n targetEvents.push(new ParsedEvent(eventName, phase, 1 /* ParsedEventType.Animation */, ast, sourceSpan, handlerSpan, keySpan));\n if (eventName.length === 0) {\n this._reportError(`Animation event name is missing in binding`, sourceSpan);\n }\n if (phase) {\n if (phase !== 'start' && phase !== 'done') {\n this._reportError(`The provided animation output phase value \"${phase}\" for \"@${eventName}\" is not supported (use start or done)`, sourceSpan);\n }\n }\n else {\n this._reportError(`The animation trigger output event (@${eventName}) is missing its phase value name (start or done are currently supported)`, sourceSpan);\n }\n }\n _parseRegularEvent(name, expression, isAssignmentEvent, sourceSpan, handlerSpan, targetMatchableAttrs, targetEvents, keySpan) {\n // long format: 'target: eventName'\n const [target, eventName] = splitAtColon(name, [null, name]);\n const ast = this._parseAction(expression, isAssignmentEvent, handlerSpan);\n targetMatchableAttrs.push([name, ast.source]);\n targetEvents.push(new ParsedEvent(eventName, target, 0 /* ParsedEventType.Regular */, ast, sourceSpan, handlerSpan, keySpan));\n // Don't detect directives for event names for now,\n // so don't add the event name to the matchableAttrs\n }\n _parseAction(value, isAssignmentEvent, sourceSpan) {\n const sourceInfo = (sourceSpan && sourceSpan.start || '(unknown').toString();\n const absoluteOffset = (sourceSpan && sourceSpan.start) ? sourceSpan.start.offset : 0;\n try {\n const ast = this._exprParser.parseAction(value, isAssignmentEvent, sourceInfo, absoluteOffset, this._interpolationConfig);\n if (ast) {\n this._reportExpressionParserErrors(ast.errors, sourceSpan);\n }\n if (!ast || ast.ast instanceof EmptyExpr) {\n this._reportError(`Empty expressions are not allowed`, sourceSpan);\n return this._exprParser.wrapLiteralPrimitive('ERROR', sourceInfo, absoluteOffset);\n }\n return ast;\n }\n catch (e) {\n this._reportError(`${e}`, sourceSpan);\n return this._exprParser.wrapLiteralPrimitive('ERROR', sourceInfo, absoluteOffset);\n }\n }\n _reportError(message, sourceSpan, level = ParseErrorLevel.ERROR) {\n this.errors.push(new ParseError(sourceSpan, message, level));\n }\n _reportExpressionParserErrors(errors, sourceSpan) {\n for (const error of errors) {\n this._reportError(error.message, sourceSpan);\n }\n }\n /**\n * @param propName the name of the property / attribute\n * @param sourceSpan\n * @param isAttr true when binding to an attribute\n */\n _validatePropertyOrAttributeName(propName, sourceSpan, isAttr) {\n const report = isAttr ? this._schemaRegistry.validateAttribute(propName) :\n this._schemaRegistry.validateProperty(propName);\n if (report.error) {\n this._reportError(report.msg, sourceSpan, ParseErrorLevel.ERROR);\n }\n }\n}\nclass PipeCollector extends RecursiveAstVisitor {\n constructor() {\n super(...arguments);\n this.pipes = new Map();\n }\n visitPipe(ast, context) {\n this.pipes.set(ast.name, ast);\n ast.exp.visit(this);\n this.visitAll(ast.args, context);\n return null;\n }\n}\nfunction isAnimationLabel(name) {\n return name[0] == '@';\n}\nfunction calcPossibleSecurityContexts(registry, selector, propName, isAttribute) {\n const ctxs = [];\n CssSelector.parse(selector).forEach((selector) => {\n const elementNames = selector.element ? [selector.element] : registry.allKnownElementNames();\n const notElementNames = new Set(selector.notSelectors.filter(selector => selector.isElementSelector())\n .map((selector) => selector.element));\n const possibleElementNames = elementNames.filter(elementName => !notElementNames.has(elementName));\n ctxs.push(...possibleElementNames.map(elementName => registry.securityContext(elementName, propName, isAttribute)));\n });\n return ctxs.length === 0 ? [SecurityContext.NONE] : Array.from(new Set(ctxs)).sort();\n}\n/**\n * Compute a new ParseSourceSpan based off an original `sourceSpan` by using\n * absolute offsets from the specified `absoluteSpan`.\n *\n * @param sourceSpan original source span\n * @param absoluteSpan absolute source span to move to\n */\nfunction moveParseSourceSpan(sourceSpan, absoluteSpan) {\n // The difference of two absolute offsets provide the relative offset\n const startDiff = absoluteSpan.start - sourceSpan.start.offset;\n const endDiff = absoluteSpan.end - sourceSpan.end.offset;\n return new ParseSourceSpan(sourceSpan.start.moveBy(startDiff), sourceSpan.end.moveBy(endDiff), sourceSpan.fullStart.moveBy(startDiff), sourceSpan.details);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Some of the code comes from WebComponents.JS\n// https://github.com/webcomponents/webcomponentsjs/blob/master/src/HTMLImports/path.js\nfunction isStyleUrlResolvable(url) {\n if (url == null || url.length === 0 || url[0] == '/')\n return false;\n const schemeMatch = url.match(URL_WITH_SCHEMA_REGEXP);\n return schemeMatch === null || schemeMatch[1] == 'package' || schemeMatch[1] == 'asset';\n}\nconst URL_WITH_SCHEMA_REGEXP = /^([^:/?#]+):/;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst NG_CONTENT_SELECT_ATTR$1 = 'select';\nconst LINK_ELEMENT = 'link';\nconst LINK_STYLE_REL_ATTR = 'rel';\nconst LINK_STYLE_HREF_ATTR = 'href';\nconst LINK_STYLE_REL_VALUE = 'stylesheet';\nconst STYLE_ELEMENT = 'style';\nconst SCRIPT_ELEMENT = 'script';\nconst NG_NON_BINDABLE_ATTR = 'ngNonBindable';\nconst NG_PROJECT_AS = 'ngProjectAs';\nfunction preparseElement(ast) {\n let selectAttr = null;\n let hrefAttr = null;\n let relAttr = null;\n let nonBindable = false;\n let projectAs = '';\n ast.attrs.forEach(attr => {\n const lcAttrName = attr.name.toLowerCase();\n if (lcAttrName == NG_CONTENT_SELECT_ATTR$1) {\n selectAttr = attr.value;\n }\n else if (lcAttrName == LINK_STYLE_HREF_ATTR) {\n hrefAttr = attr.value;\n }\n else if (lcAttrName == LINK_STYLE_REL_ATTR) {\n relAttr = attr.value;\n }\n else if (attr.name == NG_NON_BINDABLE_ATTR) {\n nonBindable = true;\n }\n else if (attr.name == NG_PROJECT_AS) {\n if (attr.value.length > 0) {\n projectAs = attr.value;\n }\n }\n });\n selectAttr = normalizeNgContentSelect(selectAttr);\n const nodeName = ast.name.toLowerCase();\n let type = PreparsedElementType.OTHER;\n if (isNgContent(nodeName)) {\n type = PreparsedElementType.NG_CONTENT;\n }\n else if (nodeName == STYLE_ELEMENT) {\n type = PreparsedElementType.STYLE;\n }\n else if (nodeName == SCRIPT_ELEMENT) {\n type = PreparsedElementType.SCRIPT;\n }\n else if (nodeName == LINK_ELEMENT && relAttr == LINK_STYLE_REL_VALUE) {\n type = PreparsedElementType.STYLESHEET;\n }\n return new PreparsedElement(type, selectAttr, hrefAttr, nonBindable, projectAs);\n}\nvar PreparsedElementType;\n(function (PreparsedElementType) {\n PreparsedElementType[PreparsedElementType[\"NG_CONTENT\"] = 0] = \"NG_CONTENT\";\n PreparsedElementType[PreparsedElementType[\"STYLE\"] = 1] = \"STYLE\";\n PreparsedElementType[PreparsedElementType[\"STYLESHEET\"] = 2] = \"STYLESHEET\";\n PreparsedElementType[PreparsedElementType[\"SCRIPT\"] = 3] = \"SCRIPT\";\n PreparsedElementType[PreparsedElementType[\"OTHER\"] = 4] = \"OTHER\";\n})(PreparsedElementType || (PreparsedElementType = {}));\nclass PreparsedElement {\n constructor(type, selectAttr, hrefAttr, nonBindable, projectAs) {\n this.type = type;\n this.selectAttr = selectAttr;\n this.hrefAttr = hrefAttr;\n this.nonBindable = nonBindable;\n this.projectAs = projectAs;\n }\n}\nfunction normalizeNgContentSelect(selectAttr) {\n if (selectAttr === null || selectAttr.length === 0) {\n return '*';\n }\n return selectAttr;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst BIND_NAME_REGEXP = /^(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.*)$/;\n// Group 1 = \"bind-\"\nconst KW_BIND_IDX = 1;\n// Group 2 = \"let-\"\nconst KW_LET_IDX = 2;\n// Group 3 = \"ref-/#\"\nconst KW_REF_IDX = 3;\n// Group 4 = \"on-\"\nconst KW_ON_IDX = 4;\n// Group 5 = \"bindon-\"\nconst KW_BINDON_IDX = 5;\n// Group 6 = \"@\"\nconst KW_AT_IDX = 6;\n// Group 7 = the identifier after \"bind-\", \"let-\", \"ref-/#\", \"on-\", \"bindon-\" or \"@\"\nconst IDENT_KW_IDX = 7;\nconst BINDING_DELIMS = {\n BANANA_BOX: { start: '[(', end: ')]' },\n PROPERTY: { start: '[', end: ']' },\n EVENT: { start: '(', end: ')' },\n};\nconst TEMPLATE_ATTR_PREFIX = '*';\nfunction htmlAstToRender3Ast(htmlNodes, bindingParser, options) {\n const transformer = new HtmlAstToIvyAst(bindingParser, options);\n const ivyNodes = visitAll(transformer, htmlNodes);\n // Errors might originate in either the binding parser or the html to ivy transformer\n const allErrors = bindingParser.errors.concat(transformer.errors);\n const result = {\n nodes: ivyNodes,\n errors: allErrors,\n styleUrls: transformer.styleUrls,\n styles: transformer.styles,\n ngContentSelectors: transformer.ngContentSelectors\n };\n if (options.collectCommentNodes) {\n result.commentNodes = transformer.commentNodes;\n }\n return result;\n}\nclass HtmlAstToIvyAst {\n constructor(bindingParser, options) {\n this.bindingParser = bindingParser;\n this.options = options;\n this.errors = [];\n this.styles = [];\n this.styleUrls = [];\n this.ngContentSelectors = [];\n // This array will be populated if `Render3ParseOptions['collectCommentNodes']` is true\n this.commentNodes = [];\n this.inI18nBlock = false;\n }\n // HTML visitor\n visitElement(element) {\n const isI18nRootElement = isI18nRootNode(element.i18n);\n if (isI18nRootElement) {\n if (this.inI18nBlock) {\n this.reportError('Cannot mark an element as translatable inside of a translatable section. Please remove the nested i18n marker.', element.sourceSpan);\n }\n this.inI18nBlock = true;\n }\n const preparsedElement = preparseElement(element);\n if (preparsedElement.type === PreparsedElementType.SCRIPT) {\n return null;\n }\n else if (preparsedElement.type === PreparsedElementType.STYLE) {\n const contents = textContents(element);\n if (contents !== null) {\n this.styles.push(contents);\n }\n return null;\n }\n else if (preparsedElement.type === PreparsedElementType.STYLESHEET &&\n isStyleUrlResolvable(preparsedElement.hrefAttr)) {\n this.styleUrls.push(preparsedElement.hrefAttr);\n return null;\n }\n // Whether the element is a `<ng-template>`\n const isTemplateElement = isNgTemplate(element.name);\n const parsedProperties = [];\n const boundEvents = [];\n const variables = [];\n const references = [];\n const attributes = [];\n const i18nAttrsMeta = {};\n const templateParsedProperties = [];\n const templateVariables = [];\n // Whether the element has any *-attribute\n let elementHasInlineTemplate = false;\n for (const attribute of element.attrs) {\n let hasBinding = false;\n const normalizedName = normalizeAttributeName(attribute.name);\n // `*attr` defines template bindings\n let isTemplateBinding = false;\n if (attribute.i18n) {\n i18nAttrsMeta[attribute.name] = attribute.i18n;\n }\n if (normalizedName.startsWith(TEMPLATE_ATTR_PREFIX)) {\n // *-attributes\n if (elementHasInlineTemplate) {\n this.reportError(`Can't have multiple template bindings on one element. Use only one attribute prefixed with *`, attribute.sourceSpan);\n }\n isTemplateBinding = true;\n elementHasInlineTemplate = true;\n const templateValue = attribute.value;\n const templateKey = normalizedName.substring(TEMPLATE_ATTR_PREFIX.length);\n const parsedVariables = [];\n const absoluteValueOffset = attribute.valueSpan ?\n attribute.valueSpan.start.offset :\n // If there is no value span the attribute does not have a value, like `attr` in\n //`<div attr></div>`. In this case, point to one character beyond the last character of\n // the attribute name.\n attribute.sourceSpan.start.offset + attribute.name.length;\n this.bindingParser.parseInlineTemplateBinding(templateKey, templateValue, attribute.sourceSpan, absoluteValueOffset, [], templateParsedProperties, parsedVariables, true /* isIvyAst */);\n templateVariables.push(...parsedVariables.map(v => new Variable(v.name, v.value, v.sourceSpan, v.keySpan, v.valueSpan)));\n }\n else {\n // Check for variables, events, property bindings, interpolation\n hasBinding = this.parseAttribute(isTemplateElement, attribute, [], parsedProperties, boundEvents, variables, references);\n }\n if (!hasBinding && !isTemplateBinding) {\n // don't include the bindings as attributes as well in the AST\n attributes.push(this.visitAttribute(attribute));\n }\n }\n const children = visitAll(preparsedElement.nonBindable ? NON_BINDABLE_VISITOR : this, element.children);\n let parsedElement;\n if (preparsedElement.type === PreparsedElementType.NG_CONTENT) {\n // `<ng-content>`\n if (element.children &&\n !element.children.every((node) => isEmptyTextNode(node) || isCommentNode(node))) {\n this.reportError(`<ng-content> element cannot have content.`, element.sourceSpan);\n }\n const selector = preparsedElement.selectAttr;\n const attrs = element.attrs.map(attr => this.visitAttribute(attr));\n parsedElement = new Content(selector, attrs, element.sourceSpan, element.i18n);\n this.ngContentSelectors.push(selector);\n }\n else if (isTemplateElement) {\n // `<ng-template>`\n const attrs = this.extractAttributes(element.name, parsedProperties, i18nAttrsMeta);\n parsedElement = new Template(element.name, attributes, attrs.bound, boundEvents, [ /* no template attributes */], children, references, variables, element.sourceSpan, element.startSourceSpan, element.endSourceSpan, element.i18n);\n }\n else {\n const attrs = this.extractAttributes(element.name, parsedProperties, i18nAttrsMeta);\n parsedElement = new Element$1(element.name, attributes, attrs.bound, boundEvents, children, references, element.sourceSpan, element.startSourceSpan, element.endSourceSpan, element.i18n);\n }\n if (elementHasInlineTemplate) {\n // If this node is an inline-template (e.g. has *ngFor) then we need to create a template\n // node that contains this node.\n // Moreover, if the node is an element, then we need to hoist its attributes to the template\n // node for matching against content projection selectors.\n const attrs = this.extractAttributes('ng-template', templateParsedProperties, i18nAttrsMeta);\n const templateAttrs = [];\n attrs.literal.forEach(attr => templateAttrs.push(attr));\n attrs.bound.forEach(attr => templateAttrs.push(attr));\n const hoistedAttrs = parsedElement instanceof Element$1 ?\n {\n attributes: parsedElement.attributes,\n inputs: parsedElement.inputs,\n outputs: parsedElement.outputs,\n } :\n { attributes: [], inputs: [], outputs: [] };\n // For <ng-template>s with structural directives on them, avoid passing i18n information to\n // the wrapping template to prevent unnecessary i18n instructions from being generated. The\n // necessary i18n meta information will be extracted from child elements.\n const i18n = isTemplateElement && isI18nRootElement ? undefined : element.i18n;\n const name = parsedElement instanceof Template ? null : parsedElement.name;\n parsedElement = new Template(name, hoistedAttrs.attributes, hoistedAttrs.inputs, hoistedAttrs.outputs, templateAttrs, [parsedElement], [ /* no references */], templateVariables, element.sourceSpan, element.startSourceSpan, element.endSourceSpan, i18n);\n }\n if (isI18nRootElement) {\n this.inI18nBlock = false;\n }\n return parsedElement;\n }\n visitAttribute(attribute) {\n return new TextAttribute(attribute.name, attribute.value, attribute.sourceSpan, attribute.keySpan, attribute.valueSpan, attribute.i18n);\n }\n visitText(text) {\n return this._visitTextWithInterpolation(text.value, text.sourceSpan, text.tokens, text.i18n);\n }\n visitExpansion(expansion) {\n if (!expansion.i18n) {\n // do not generate Icu in case it was created\n // outside of i18n block in a template\n return null;\n }\n if (!isI18nRootNode(expansion.i18n)) {\n throw new Error(`Invalid type \"${expansion.i18n.constructor}\" for \"i18n\" property of ${expansion.sourceSpan.toString()}. Expected a \"Message\"`);\n }\n const message = expansion.i18n;\n const vars = {};\n const placeholders = {};\n // extract VARs from ICUs - we process them separately while\n // assembling resulting message via goog.getMsg function, since\n // we need to pass them to top-level goog.getMsg call\n Object.keys(message.placeholders).forEach(key => {\n const value = message.placeholders[key];\n if (key.startsWith(I18N_ICU_VAR_PREFIX)) {\n // Currently when the `plural` or `select` keywords in an ICU contain trailing spaces (e.g.\n // `{count, select , ...}`), these spaces are also included into the key names in ICU vars\n // (e.g. \"VAR_SELECT \"). These trailing spaces are not desirable, since they will later be\n // converted into `_` symbols while normalizing placeholder names, which might lead to\n // mismatches at runtime (i.e. placeholder will not be replaced with the correct value).\n const formattedKey = key.trim();\n const ast = this.bindingParser.parseInterpolationExpression(value.text, value.sourceSpan);\n vars[formattedKey] = new BoundText(ast, value.sourceSpan);\n }\n else {\n placeholders[key] = this._visitTextWithInterpolation(value.text, value.sourceSpan, null);\n }\n });\n return new Icu$1(vars, placeholders, expansion.sourceSpan, message);\n }\n visitExpansionCase(expansionCase) {\n return null;\n }\n visitComment(comment) {\n if (this.options.collectCommentNodes) {\n this.commentNodes.push(new Comment$1(comment.value || '', comment.sourceSpan));\n }\n return null;\n }\n // convert view engine `ParsedProperty` to a format suitable for IVY\n extractAttributes(elementName, properties, i18nPropsMeta) {\n const bound = [];\n const literal = [];\n properties.forEach(prop => {\n const i18n = i18nPropsMeta[prop.name];\n if (prop.isLiteral) {\n literal.push(new TextAttribute(prop.name, prop.expression.source || '', prop.sourceSpan, prop.keySpan, prop.valueSpan, i18n));\n }\n else {\n // Note that validation is skipped and property mapping is disabled\n // due to the fact that we need to make sure a given prop is not an\n // input of a directive and directive matching happens at runtime.\n const bep = this.bindingParser.createBoundElementProperty(elementName, prop, /* skipValidation */ true, /* mapPropertyName */ false);\n bound.push(BoundAttribute.fromBoundElementProperty(bep, i18n));\n }\n });\n return { bound, literal };\n }\n parseAttribute(isTemplateElement, attribute, matchableAttributes, parsedProperties, boundEvents, variables, references) {\n const name = normalizeAttributeName(attribute.name);\n const value = attribute.value;\n const srcSpan = attribute.sourceSpan;\n const absoluteOffset = attribute.valueSpan ? attribute.valueSpan.start.offset : srcSpan.start.offset;\n function createKeySpan(srcSpan, prefix, identifier) {\n // We need to adjust the start location for the keySpan to account for the removed 'data-'\n // prefix from `normalizeAttributeName`.\n const normalizationAdjustment = attribute.name.length - name.length;\n const keySpanStart = srcSpan.start.moveBy(prefix.length + normalizationAdjustment);\n const keySpanEnd = keySpanStart.moveBy(identifier.length);\n return new ParseSourceSpan(keySpanStart, keySpanEnd, keySpanStart, identifier);\n }\n const bindParts = name.match(BIND_NAME_REGEXP);\n if (bindParts) {\n if (bindParts[KW_BIND_IDX] != null) {\n const identifier = bindParts[IDENT_KW_IDX];\n const keySpan = createKeySpan(srcSpan, bindParts[KW_BIND_IDX], identifier);\n this.bindingParser.parsePropertyBinding(identifier, value, false, srcSpan, absoluteOffset, attribute.valueSpan, matchableAttributes, parsedProperties, keySpan);\n }\n else if (bindParts[KW_LET_IDX]) {\n if (isTemplateElement) {\n const identifier = bindParts[IDENT_KW_IDX];\n const keySpan = createKeySpan(srcSpan, bindParts[KW_LET_IDX], identifier);\n this.parseVariable(identifier, value, srcSpan, keySpan, attribute.valueSpan, variables);\n }\n else {\n this.reportError(`\"let-\" is only supported on ng-template elements.`, srcSpan);\n }\n }\n else if (bindParts[KW_REF_IDX]) {\n const identifier = bindParts[IDENT_KW_IDX];\n const keySpan = createKeySpan(srcSpan, bindParts[KW_REF_IDX], identifier);\n this.parseReference(identifier, value, srcSpan, keySpan, attribute.valueSpan, references);\n }\n else if (bindParts[KW_ON_IDX]) {\n const events = [];\n const identifier = bindParts[IDENT_KW_IDX];\n const keySpan = createKeySpan(srcSpan, bindParts[KW_ON_IDX], identifier);\n this.bindingParser.parseEvent(identifier, value, /* isAssignmentEvent */ false, srcSpan, attribute.valueSpan || srcSpan, matchableAttributes, events, keySpan);\n addEvents(events, boundEvents);\n }\n else if (bindParts[KW_BINDON_IDX]) {\n const identifier = bindParts[IDENT_KW_IDX];\n const keySpan = createKeySpan(srcSpan, bindParts[KW_BINDON_IDX], identifier);\n this.bindingParser.parsePropertyBinding(identifier, value, false, srcSpan, absoluteOffset, attribute.valueSpan, matchableAttributes, parsedProperties, keySpan);\n this.parseAssignmentEvent(identifier, value, srcSpan, attribute.valueSpan, matchableAttributes, boundEvents, keySpan);\n }\n else if (bindParts[KW_AT_IDX]) {\n const keySpan = createKeySpan(srcSpan, '', name);\n this.bindingParser.parseLiteralAttr(name, value, srcSpan, absoluteOffset, attribute.valueSpan, matchableAttributes, parsedProperties, keySpan);\n }\n return true;\n }\n // We didn't see a kw-prefixed property binding, but we have not yet checked\n // for the []/()/[()] syntax.\n let delims = null;\n if (name.startsWith(BINDING_DELIMS.BANANA_BOX.start)) {\n delims = BINDING_DELIMS.BANANA_BOX;\n }\n else if (name.startsWith(BINDING_DELIMS.PROPERTY.start)) {\n delims = BINDING_DELIMS.PROPERTY;\n }\n else if (name.startsWith(BINDING_DELIMS.EVENT.start)) {\n delims = BINDING_DELIMS.EVENT;\n }\n if (delims !== null &&\n // NOTE: older versions of the parser would match a start/end delimited\n // binding iff the property name was terminated by the ending delimiter\n // and the identifier in the binding was non-empty.\n // TODO(ayazhafiz): update this to handle malformed bindings.\n name.endsWith(delims.end) && name.length > delims.start.length + delims.end.length) {\n const identifier = name.substring(delims.start.length, name.length - delims.end.length);\n const keySpan = createKeySpan(srcSpan, delims.start, identifier);\n if (delims.start === BINDING_DELIMS.BANANA_BOX.start) {\n this.bindingParser.parsePropertyBinding(identifier, value, false, srcSpan, absoluteOffset, attribute.valueSpan, matchableAttributes, parsedProperties, keySpan);\n this.parseAssignmentEvent(identifier, value, srcSpan, attribute.valueSpan, matchableAttributes, boundEvents, keySpan);\n }\n else if (delims.start === BINDING_DELIMS.PROPERTY.start) {\n this.bindingParser.parsePropertyBinding(identifier, value, false, srcSpan, absoluteOffset, attribute.valueSpan, matchableAttributes, parsedProperties, keySpan);\n }\n else {\n const events = [];\n this.bindingParser.parseEvent(identifier, value, /* isAssignmentEvent */ false, srcSpan, attribute.valueSpan || srcSpan, matchableAttributes, events, keySpan);\n addEvents(events, boundEvents);\n }\n return true;\n }\n // No explicit binding found.\n const keySpan = createKeySpan(srcSpan, '' /* prefix */, name);\n const hasBinding = this.bindingParser.parsePropertyInterpolation(name, value, srcSpan, attribute.valueSpan, matchableAttributes, parsedProperties, keySpan, attribute.valueTokens ?? null);\n return hasBinding;\n }\n _visitTextWithInterpolation(value, sourceSpan, interpolatedTokens, i18n) {\n const valueNoNgsp = replaceNgsp(value);\n const expr = this.bindingParser.parseInterpolation(valueNoNgsp, sourceSpan, interpolatedTokens);\n return expr ? new BoundText(expr, sourceSpan, i18n) : new Text$3(valueNoNgsp, sourceSpan);\n }\n parseVariable(identifier, value, sourceSpan, keySpan, valueSpan, variables) {\n if (identifier.indexOf('-') > -1) {\n this.reportError(`\"-\" is not allowed in variable names`, sourceSpan);\n }\n else if (identifier.length === 0) {\n this.reportError(`Variable does not have a name`, sourceSpan);\n }\n variables.push(new Variable(identifier, value, sourceSpan, keySpan, valueSpan));\n }\n parseReference(identifier, value, sourceSpan, keySpan, valueSpan, references) {\n if (identifier.indexOf('-') > -1) {\n this.reportError(`\"-\" is not allowed in reference names`, sourceSpan);\n }\n else if (identifier.length === 0) {\n this.reportError(`Reference does not have a name`, sourceSpan);\n }\n else if (references.some(reference => reference.name === identifier)) {\n this.reportError(`Reference \"#${identifier}\" is defined more than once`, sourceSpan);\n }\n references.push(new Reference(identifier, value, sourceSpan, keySpan, valueSpan));\n }\n parseAssignmentEvent(name, expression, sourceSpan, valueSpan, targetMatchableAttrs, boundEvents, keySpan) {\n const events = [];\n this.bindingParser.parseEvent(`${name}Change`, `${expression} =$event`, /* isAssignmentEvent */ true, sourceSpan, valueSpan || sourceSpan, targetMatchableAttrs, events, keySpan);\n addEvents(events, boundEvents);\n }\n reportError(message, sourceSpan, level = ParseErrorLevel.ERROR) {\n this.errors.push(new ParseError(sourceSpan, message, level));\n }\n}\nclass NonBindableVisitor {\n visitElement(ast) {\n const preparsedElement = preparseElement(ast);\n if (preparsedElement.type === PreparsedElementType.SCRIPT ||\n preparsedElement.type === PreparsedElementType.STYLE ||\n preparsedElement.type === PreparsedElementType.STYLESHEET) {\n // Skipping <script> for security reasons\n // Skipping <style> and stylesheets as we already processed them\n // in the StyleCompiler\n return null;\n }\n const children = visitAll(this, ast.children, null);\n return new Element$1(ast.name, visitAll(this, ast.attrs), \n /* inputs */ [], /* outputs */ [], children, /* references */ [], ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan);\n }\n visitComment(comment) {\n return null;\n }\n visitAttribute(attribute) {\n return new TextAttribute(attribute.name, attribute.value, attribute.sourceSpan, attribute.keySpan, attribute.valueSpan, attribute.i18n);\n }\n visitText(text) {\n return new Text$3(text.value, text.sourceSpan);\n }\n visitExpansion(expansion) {\n return null;\n }\n visitExpansionCase(expansionCase) {\n return null;\n }\n}\nconst NON_BINDABLE_VISITOR = new NonBindableVisitor();\nfunction normalizeAttributeName(attrName) {\n return /^data-/i.test(attrName) ? attrName.substring(5) : attrName;\n}\nfunction addEvents(events, boundEvents) {\n boundEvents.push(...events.map(e => BoundEvent.fromParsedEvent(e)));\n}\nfunction isEmptyTextNode(node) {\n return node instanceof Text && node.value.trim().length == 0;\n}\nfunction isCommentNode(node) {\n return node instanceof Comment;\n}\nfunction textContents(node) {\n if (node.children.length !== 1 || !(node.children[0] instanceof Text)) {\n return null;\n }\n else {\n return node.children[0].value;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar TagType;\n(function (TagType) {\n TagType[TagType[\"ELEMENT\"] = 0] = \"ELEMENT\";\n TagType[TagType[\"TEMPLATE\"] = 1] = \"TEMPLATE\";\n})(TagType || (TagType = {}));\n/**\n * Generates an object that is used as a shared state between parent and all child contexts.\n */\nfunction setupRegistry() {\n return { getUniqueId: getSeqNumberGenerator(), icus: new Map() };\n}\n/**\n * I18nContext is a helper class which keeps track of all i18n-related aspects\n * (accumulates placeholders, bindings, etc) between i18nStart and i18nEnd instructions.\n *\n * When we enter a nested template, the top-level context is being passed down\n * to the nested component, which uses this context to generate a child instance\n * of I18nContext class (to handle nested template) and at the end, reconciles it back\n * with the parent context.\n *\n * @param index Instruction index of i18nStart, which initiates this context\n * @param ref Reference to a translation const that represents the content if thus context\n * @param level Nesting level defined for child contexts\n * @param templateIndex Instruction index of a template which this context belongs to\n * @param meta Meta information (id, meaning, description, etc) associated with this context\n */\nclass I18nContext {\n constructor(index, ref, level = 0, templateIndex = null, meta, registry) {\n this.index = index;\n this.ref = ref;\n this.level = level;\n this.templateIndex = templateIndex;\n this.meta = meta;\n this.registry = registry;\n this.bindings = new Set();\n this.placeholders = new Map();\n this.isEmitted = false;\n this._unresolvedCtxCount = 0;\n this._registry = registry || setupRegistry();\n this.id = this._registry.getUniqueId();\n }\n appendTag(type, node, index, closed) {\n if (node.isVoid && closed) {\n return; // ignore \"close\" for void tags\n }\n const ph = node.isVoid || !closed ? node.startName : node.closeName;\n const content = { type, index, ctx: this.id, isVoid: node.isVoid, closed };\n updatePlaceholderMap(this.placeholders, ph, content);\n }\n get icus() {\n return this._registry.icus;\n }\n get isRoot() {\n return this.level === 0;\n }\n get isResolved() {\n return this._unresolvedCtxCount === 0;\n }\n getSerializedPlaceholders() {\n const result = new Map();\n this.placeholders.forEach((values, key) => result.set(key, values.map(serializePlaceholderValue)));\n return result;\n }\n // public API to accumulate i18n-related content\n appendBinding(binding) {\n this.bindings.add(binding);\n }\n appendIcu(name, ref) {\n updatePlaceholderMap(this._registry.icus, name, ref);\n }\n appendBoundText(node) {\n const phs = assembleBoundTextPlaceholders(node, this.bindings.size, this.id);\n phs.forEach((values, key) => updatePlaceholderMap(this.placeholders, key, ...values));\n }\n appendTemplate(node, index) {\n // add open and close tags at the same time,\n // since we process nested templates separately\n this.appendTag(TagType.TEMPLATE, node, index, false);\n this.appendTag(TagType.TEMPLATE, node, index, true);\n this._unresolvedCtxCount++;\n }\n appendElement(node, index, closed) {\n this.appendTag(TagType.ELEMENT, node, index, closed);\n }\n appendProjection(node, index) {\n // Add open and close tags at the same time, since `<ng-content>` has no content,\n // so when we come across `<ng-content>` we can register both open and close tags.\n // Note: runtime i18n logic doesn't distinguish `<ng-content>` tag placeholders and\n // regular element tag placeholders, so we generate element placeholders for both types.\n this.appendTag(TagType.ELEMENT, node, index, false);\n this.appendTag(TagType.ELEMENT, node, index, true);\n }\n /**\n * Generates an instance of a child context based on the root one,\n * when we enter a nested template within I18n section.\n *\n * @param index Instruction index of corresponding i18nStart, which initiates this context\n * @param templateIndex Instruction index of a template which this context belongs to\n * @param meta Meta information (id, meaning, description, etc) associated with this context\n *\n * @returns I18nContext instance\n */\n forkChildContext(index, templateIndex, meta) {\n return new I18nContext(index, this.ref, this.level + 1, templateIndex, meta, this._registry);\n }\n /**\n * Reconciles child context into parent one once the end of the i18n block is reached (i18nEnd).\n *\n * @param context Child I18nContext instance to be reconciled with parent context.\n */\n reconcileChildContext(context) {\n // set the right context id for open and close\n // template tags, so we can use it as sub-block ids\n ['start', 'close'].forEach((op) => {\n const key = context.meta[`${op}Name`];\n const phs = this.placeholders.get(key) || [];\n const tag = phs.find(findTemplateFn(this.id, context.templateIndex));\n if (tag) {\n tag.ctx = context.id;\n }\n });\n // reconcile placeholders\n const childPhs = context.placeholders;\n childPhs.forEach((values, key) => {\n const phs = this.placeholders.get(key);\n if (!phs) {\n this.placeholders.set(key, values);\n return;\n }\n // try to find matching template...\n const tmplIdx = phs.findIndex(findTemplateFn(context.id, context.templateIndex));\n if (tmplIdx >= 0) {\n // ... if found - replace it with nested template content\n const isCloseTag = key.startsWith('CLOSE');\n const isTemplateTag = key.endsWith('NG-TEMPLATE');\n if (isTemplateTag) {\n // current template's content is placed before or after\n // parent template tag, depending on the open/close attribute\n phs.splice(tmplIdx + (isCloseTag ? 0 : 1), 0, ...values);\n }\n else {\n const idx = isCloseTag ? values.length - 1 : 0;\n values[idx].tmpl = phs[tmplIdx];\n phs.splice(tmplIdx, 1, ...values);\n }\n }\n else {\n // ... otherwise just append content to placeholder value\n phs.push(...values);\n }\n this.placeholders.set(key, phs);\n });\n this._unresolvedCtxCount--;\n }\n}\n//\n// Helper methods\n//\nfunction wrap(symbol, index, contextId, closed) {\n const state = closed ? '/' : '';\n return wrapI18nPlaceholder(`${state}${symbol}${index}`, contextId);\n}\nfunction wrapTag(symbol, { index, ctx, isVoid }, closed) {\n return isVoid ? wrap(symbol, index, ctx) + wrap(symbol, index, ctx, true) :\n wrap(symbol, index, ctx, closed);\n}\nfunction findTemplateFn(ctx, templateIndex) {\n return (token) => typeof token === 'object' && token.type === TagType.TEMPLATE &&\n token.index === templateIndex && token.ctx === ctx;\n}\nfunction serializePlaceholderValue(value) {\n const element = (data, closed) => wrapTag('#', data, closed);\n const template = (data, closed) => wrapTag('*', data, closed);\n const projection = (data, closed) => wrapTag('!', data, closed);\n switch (value.type) {\n case TagType.ELEMENT:\n // close element tag\n if (value.closed) {\n return element(value, true) + (value.tmpl ? template(value.tmpl, true) : '');\n }\n // open element tag that also initiates a template\n if (value.tmpl) {\n return template(value.tmpl) + element(value) +\n (value.isVoid ? template(value.tmpl, true) : '');\n }\n return element(value);\n case TagType.TEMPLATE:\n return template(value, value.closed);\n default:\n return value;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass IcuSerializerVisitor {\n visitText(text) {\n return text.value;\n }\n visitContainer(container) {\n return container.children.map(child => child.visit(this)).join('');\n }\n visitIcu(icu) {\n const strCases = Object.keys(icu.cases).map((k) => `${k} {${icu.cases[k].visit(this)}}`);\n const result = `{${icu.expressionPlaceholder}, ${icu.type}, ${strCases.join(' ')}}`;\n return result;\n }\n visitTagPlaceholder(ph) {\n return ph.isVoid ?\n this.formatPh(ph.startName) :\n `${this.formatPh(ph.startName)}${ph.children.map(child => child.visit(this)).join('')}${this.formatPh(ph.closeName)}`;\n }\n visitPlaceholder(ph) {\n return this.formatPh(ph.name);\n }\n visitIcuPlaceholder(ph, context) {\n return this.formatPh(ph.name);\n }\n formatPh(value) {\n return `{${formatI18nPlaceholderName(value, /* useCamelCase */ false)}}`;\n }\n}\nconst serializer = new IcuSerializerVisitor();\nfunction serializeIcuNode(icu) {\n return icu.visit(serializer);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst TAG_TO_PLACEHOLDER_NAMES = {\n 'A': 'LINK',\n 'B': 'BOLD_TEXT',\n 'BR': 'LINE_BREAK',\n 'EM': 'EMPHASISED_TEXT',\n 'H1': 'HEADING_LEVEL1',\n 'H2': 'HEADING_LEVEL2',\n 'H3': 'HEADING_LEVEL3',\n 'H4': 'HEADING_LEVEL4',\n 'H5': 'HEADING_LEVEL5',\n 'H6': 'HEADING_LEVEL6',\n 'HR': 'HORIZONTAL_RULE',\n 'I': 'ITALIC_TEXT',\n 'LI': 'LIST_ITEM',\n 'LINK': 'MEDIA_LINK',\n 'OL': 'ORDERED_LIST',\n 'P': 'PARAGRAPH',\n 'Q': 'QUOTATION',\n 'S': 'STRIKETHROUGH_TEXT',\n 'SMALL': 'SMALL_TEXT',\n 'SUB': 'SUBSTRIPT',\n 'SUP': 'SUPERSCRIPT',\n 'TBODY': 'TABLE_BODY',\n 'TD': 'TABLE_CELL',\n 'TFOOT': 'TABLE_FOOTER',\n 'TH': 'TABLE_HEADER_CELL',\n 'THEAD': 'TABLE_HEADER',\n 'TR': 'TABLE_ROW',\n 'TT': 'MONOSPACED_TEXT',\n 'U': 'UNDERLINED_TEXT',\n 'UL': 'UNORDERED_LIST',\n};\n/**\n * Creates unique names for placeholder with different content.\n *\n * Returns the same placeholder name when the content is identical.\n */\nclass PlaceholderRegistry {\n constructor() {\n // Count the occurrence of the base name top generate a unique name\n this._placeHolderNameCounts = {};\n // Maps signature to placeholder names\n this._signatureToName = {};\n }\n getStartTagPlaceholderName(tag, attrs, isVoid) {\n const signature = this._hashTag(tag, attrs, isVoid);\n if (this._signatureToName[signature]) {\n return this._signatureToName[signature];\n }\n const upperTag = tag.toUpperCase();\n const baseName = TAG_TO_PLACEHOLDER_NAMES[upperTag] || `TAG_${upperTag}`;\n const name = this._generateUniqueName(isVoid ? baseName : `START_${baseName}`);\n this._signatureToName[signature] = name;\n return name;\n }\n getCloseTagPlaceholderName(tag) {\n const signature = this._hashClosingTag(tag);\n if (this._signatureToName[signature]) {\n return this._signatureToName[signature];\n }\n const upperTag = tag.toUpperCase();\n const baseName = TAG_TO_PLACEHOLDER_NAMES[upperTag] || `TAG_${upperTag}`;\n const name = this._generateUniqueName(`CLOSE_${baseName}`);\n this._signatureToName[signature] = name;\n return name;\n }\n getPlaceholderName(name, content) {\n const upperName = name.toUpperCase();\n const signature = `PH: ${upperName}=${content}`;\n if (this._signatureToName[signature]) {\n return this._signatureToName[signature];\n }\n const uniqueName = this._generateUniqueName(upperName);\n this._signatureToName[signature] = uniqueName;\n return uniqueName;\n }\n getUniquePlaceholder(name) {\n return this._generateUniqueName(name.toUpperCase());\n }\n // Generate a hash for a tag - does not take attribute order into account\n _hashTag(tag, attrs, isVoid) {\n const start = `<${tag}`;\n const strAttrs = Object.keys(attrs).sort().map((name) => ` ${name}=${attrs[name]}`).join('');\n const end = isVoid ? '/>' : `></${tag}>`;\n return start + strAttrs + end;\n }\n _hashClosingTag(tag) {\n return this._hashTag(`/${tag}`, {}, false);\n }\n _generateUniqueName(base) {\n const seen = this._placeHolderNameCounts.hasOwnProperty(base);\n if (!seen) {\n this._placeHolderNameCounts[base] = 1;\n return base;\n }\n const id = this._placeHolderNameCounts[base];\n this._placeHolderNameCounts[base] = id + 1;\n return `${base}_${id}`;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst _expParser = new Parser$1(new Lexer());\n/**\n * Returns a function converting html nodes to an i18n Message given an interpolationConfig\n */\nfunction createI18nMessageFactory(interpolationConfig) {\n const visitor = new _I18nVisitor(_expParser, interpolationConfig);\n return (nodes, meaning, description, customId, visitNodeFn) => visitor.toI18nMessage(nodes, meaning, description, customId, visitNodeFn);\n}\nfunction noopVisitNodeFn(_html, i18n) {\n return i18n;\n}\nclass _I18nVisitor {\n constructor(_expressionParser, _interpolationConfig) {\n this._expressionParser = _expressionParser;\n this._interpolationConfig = _interpolationConfig;\n }\n toI18nMessage(nodes, meaning = '', description = '', customId = '', visitNodeFn) {\n const context = {\n isIcu: nodes.length == 1 && nodes[0] instanceof Expansion,\n icuDepth: 0,\n placeholderRegistry: new PlaceholderRegistry(),\n placeholderToContent: {},\n placeholderToMessage: {},\n visitNodeFn: visitNodeFn || noopVisitNodeFn,\n };\n const i18nodes = visitAll(this, nodes, context);\n return new Message(i18nodes, context.placeholderToContent, context.placeholderToMessage, meaning, description, customId);\n }\n visitElement(el, context) {\n const children = visitAll(this, el.children, context);\n const attrs = {};\n el.attrs.forEach(attr => {\n // Do not visit the attributes, translatable ones are top-level ASTs\n attrs[attr.name] = attr.value;\n });\n const isVoid = getHtmlTagDefinition(el.name).isVoid;\n const startPhName = context.placeholderRegistry.getStartTagPlaceholderName(el.name, attrs, isVoid);\n context.placeholderToContent[startPhName] = {\n text: el.startSourceSpan.toString(),\n sourceSpan: el.startSourceSpan,\n };\n let closePhName = '';\n if (!isVoid) {\n closePhName = context.placeholderRegistry.getCloseTagPlaceholderName(el.name);\n context.placeholderToContent[closePhName] = {\n text: `</${el.name}>`,\n sourceSpan: el.endSourceSpan ?? el.sourceSpan,\n };\n }\n const node = new TagPlaceholder(el.name, attrs, startPhName, closePhName, children, isVoid, el.sourceSpan, el.startSourceSpan, el.endSourceSpan);\n return context.visitNodeFn(el, node);\n }\n visitAttribute(attribute, context) {\n const node = attribute.valueTokens === undefined || attribute.valueTokens.length === 1 ?\n new Text$2(attribute.value, attribute.valueSpan || attribute.sourceSpan) :\n this._visitTextWithInterpolation(attribute.valueTokens, attribute.valueSpan || attribute.sourceSpan, context, attribute.i18n);\n return context.visitNodeFn(attribute, node);\n }\n visitText(text, context) {\n const node = text.tokens.length === 1 ?\n new Text$2(text.value, text.sourceSpan) :\n this._visitTextWithInterpolation(text.tokens, text.sourceSpan, context, text.i18n);\n return context.visitNodeFn(text, node);\n }\n visitComment(comment, context) {\n return null;\n }\n visitExpansion(icu, context) {\n context.icuDepth++;\n const i18nIcuCases = {};\n const i18nIcu = new Icu(icu.switchValue, icu.type, i18nIcuCases, icu.sourceSpan);\n icu.cases.forEach((caze) => {\n i18nIcuCases[caze.value] = new Container(caze.expression.map((node) => node.visit(this, context)), caze.expSourceSpan);\n });\n context.icuDepth--;\n if (context.isIcu || context.icuDepth > 0) {\n // Returns an ICU node when:\n // - the message (vs a part of the message) is an ICU message, or\n // - the ICU message is nested.\n const expPh = context.placeholderRegistry.getUniquePlaceholder(`VAR_${icu.type}`);\n i18nIcu.expressionPlaceholder = expPh;\n context.placeholderToContent[expPh] = {\n text: icu.switchValue,\n sourceSpan: icu.switchValueSourceSpan,\n };\n return context.visitNodeFn(icu, i18nIcu);\n }\n // Else returns a placeholder\n // ICU placeholders should not be replaced with their original content but with the their\n // translations.\n // TODO(vicb): add a html.Node -> i18n.Message cache to avoid having to re-create the msg\n const phName = context.placeholderRegistry.getPlaceholderName('ICU', icu.sourceSpan.toString());\n context.placeholderToMessage[phName] = this.toI18nMessage([icu], '', '', '', undefined);\n const node = new IcuPlaceholder(i18nIcu, phName, icu.sourceSpan);\n return context.visitNodeFn(icu, node);\n }\n visitExpansionCase(_icuCase, _context) {\n throw new Error('Unreachable code');\n }\n /**\n * Convert, text and interpolated tokens up into text and placeholder pieces.\n *\n * @param tokens The text and interpolated tokens.\n * @param sourceSpan The span of the whole of the `text` string.\n * @param context The current context of the visitor, used to compute and store placeholders.\n * @param previousI18n Any i18n metadata associated with this `text` from a previous pass.\n */\n _visitTextWithInterpolation(tokens, sourceSpan, context, previousI18n) {\n // Return a sequence of `Text` and `Placeholder` nodes grouped in a `Container`.\n const nodes = [];\n // We will only create a container if there are actually interpolations,\n // so this flag tracks that.\n let hasInterpolation = false;\n for (const token of tokens) {\n switch (token.type) {\n case 8 /* TokenType.INTERPOLATION */:\n case 17 /* TokenType.ATTR_VALUE_INTERPOLATION */:\n hasInterpolation = true;\n const expression = token.parts[1];\n const baseName = extractPlaceholderName(expression) || 'INTERPOLATION';\n const phName = context.placeholderRegistry.getPlaceholderName(baseName, expression);\n context.placeholderToContent[phName] = {\n text: token.parts.join(''),\n sourceSpan: token.sourceSpan\n };\n nodes.push(new Placeholder(expression, phName, token.sourceSpan));\n break;\n default:\n if (token.parts[0].length > 0) {\n // This token is text or an encoded entity.\n // If it is following on from a previous text node then merge it into that node\n // Otherwise, if it is following an interpolation, then add a new node.\n const previous = nodes[nodes.length - 1];\n if (previous instanceof Text$2) {\n previous.value += token.parts[0];\n previous.sourceSpan = new ParseSourceSpan(previous.sourceSpan.start, token.sourceSpan.end, previous.sourceSpan.fullStart, previous.sourceSpan.details);\n }\n else {\n nodes.push(new Text$2(token.parts[0], token.sourceSpan));\n }\n }\n break;\n }\n }\n if (hasInterpolation) {\n // Whitespace removal may have invalidated the interpolation source-spans.\n reusePreviousSourceSpans(nodes, previousI18n);\n return new Container(nodes, sourceSpan);\n }\n else {\n return nodes[0];\n }\n }\n}\n/**\n * Re-use the source-spans from `previousI18n` metadata for the `nodes`.\n *\n * Whitespace removal can invalidate the source-spans of interpolation nodes, so we\n * reuse the source-span stored from a previous pass before the whitespace was removed.\n *\n * @param nodes The `Text` and `Placeholder` nodes to be processed.\n * @param previousI18n Any i18n metadata for these `nodes` stored from a previous pass.\n */\nfunction reusePreviousSourceSpans(nodes, previousI18n) {\n if (previousI18n instanceof Message) {\n // The `previousI18n` is an i18n `Message`, so we are processing an `Attribute` with i18n\n // metadata. The `Message` should consist only of a single `Container` that contains the\n // parts (`Text` and `Placeholder`) to process.\n assertSingleContainerMessage(previousI18n);\n previousI18n = previousI18n.nodes[0];\n }\n if (previousI18n instanceof Container) {\n // The `previousI18n` is a `Container`, which means that this is a second i18n extraction pass\n // after whitespace has been removed from the AST nodes.\n assertEquivalentNodes(previousI18n.children, nodes);\n // Reuse the source-spans from the first pass.\n for (let i = 0; i < nodes.length; i++) {\n nodes[i].sourceSpan = previousI18n.children[i].sourceSpan;\n }\n }\n}\n/**\n * Asserts that the `message` contains exactly one `Container` node.\n */\nfunction assertSingleContainerMessage(message) {\n const nodes = message.nodes;\n if (nodes.length !== 1 || !(nodes[0] instanceof Container)) {\n throw new Error('Unexpected previous i18n message - expected it to consist of only a single `Container` node.');\n }\n}\n/**\n * Asserts that the `previousNodes` and `node` collections have the same number of elements and\n * corresponding elements have the same node type.\n */\nfunction assertEquivalentNodes(previousNodes, nodes) {\n if (previousNodes.length !== nodes.length) {\n throw new Error('The number of i18n message children changed between first and second pass.');\n }\n if (previousNodes.some((node, i) => nodes[i].constructor !== node.constructor)) {\n throw new Error('The types of the i18n message children changed between first and second pass.');\n }\n}\nconst _CUSTOM_PH_EXP = /\\/\\/[\\s\\S]*i18n[\\s\\S]*\\([\\s\\S]*ph[\\s\\S]*=[\\s\\S]*(\"|')([\\s\\S]*?)\\1[\\s\\S]*\\)/g;\nfunction extractPlaceholderName(input) {\n return input.split(_CUSTOM_PH_EXP)[2];\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * An i18n error.\n */\nclass I18nError extends ParseError {\n constructor(span, msg) {\n super(span, msg);\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst setI18nRefs = (htmlNode, i18nNode) => {\n if (htmlNode instanceof NodeWithI18n) {\n if (i18nNode instanceof IcuPlaceholder && htmlNode.i18n instanceof Message) {\n // This html node represents an ICU but this is a second processing pass, and the legacy id\n // was computed in the previous pass and stored in the `i18n` property as a message.\n // We are about to wipe out that property so capture the previous message to be reused when\n // generating the message for this ICU later. See `_generateI18nMessage()`.\n i18nNode.previousMessage = htmlNode.i18n;\n }\n htmlNode.i18n = i18nNode;\n }\n return i18nNode;\n};\n/**\n * This visitor walks over HTML parse tree and converts information stored in\n * i18n-related attributes (\"i18n\" and \"i18n-*\") into i18n meta object that is\n * stored with other element's and attribute's information.\n */\nclass I18nMetaVisitor {\n constructor(interpolationConfig = DEFAULT_INTERPOLATION_CONFIG, keepI18nAttrs = false, enableI18nLegacyMessageIdFormat = false) {\n this.interpolationConfig = interpolationConfig;\n this.keepI18nAttrs = keepI18nAttrs;\n this.enableI18nLegacyMessageIdFormat = enableI18nLegacyMessageIdFormat;\n // whether visited nodes contain i18n information\n this.hasI18nMeta = false;\n this._errors = [];\n // i18n message generation factory\n this._createI18nMessage = createI18nMessageFactory(this.interpolationConfig);\n }\n _generateI18nMessage(nodes, meta = '', visitNodeFn) {\n const { meaning, description, customId } = this._parseMetadata(meta);\n const message = this._createI18nMessage(nodes, meaning, description, customId, visitNodeFn);\n this._setMessageId(message, meta);\n this._setLegacyIds(message, meta);\n return message;\n }\n visitAllWithErrors(nodes) {\n const result = nodes.map(node => node.visit(this, null));\n return new ParseTreeResult(result, this._errors);\n }\n visitElement(element) {\n let message = undefined;\n if (hasI18nAttrs(element)) {\n this.hasI18nMeta = true;\n const attrs = [];\n const attrsMeta = {};\n for (const attr of element.attrs) {\n if (attr.name === I18N_ATTR) {\n // root 'i18n' node attribute\n const i18n = element.i18n || attr.value;\n message = this._generateI18nMessage(element.children, i18n, setI18nRefs);\n if (message.nodes.length === 0) {\n // Ignore the message if it is empty.\n message = undefined;\n }\n // Store the message on the element\n element.i18n = message;\n }\n else if (attr.name.startsWith(I18N_ATTR_PREFIX)) {\n // 'i18n-*' attributes\n const name = attr.name.slice(I18N_ATTR_PREFIX.length);\n if (isTrustedTypesSink(element.name, name)) {\n this._reportError(attr, `Translating attribute '${name}' is disallowed for security reasons.`);\n }\n else {\n attrsMeta[name] = attr.value;\n }\n }\n else {\n // non-i18n attributes\n attrs.push(attr);\n }\n }\n // set i18n meta for attributes\n if (Object.keys(attrsMeta).length) {\n for (const attr of attrs) {\n const meta = attrsMeta[attr.name];\n // do not create translation for empty attributes\n if (meta !== undefined && attr.value) {\n attr.i18n = this._generateI18nMessage([attr], attr.i18n || meta);\n }\n }\n }\n if (!this.keepI18nAttrs) {\n // update element's attributes,\n // keeping only non-i18n related ones\n element.attrs = attrs;\n }\n }\n visitAll(this, element.children, message);\n return element;\n }\n visitExpansion(expansion, currentMessage) {\n let message;\n const meta = expansion.i18n;\n this.hasI18nMeta = true;\n if (meta instanceof IcuPlaceholder) {\n // set ICU placeholder name (e.g. \"ICU_1\"),\n // generated while processing root element contents,\n // so we can reference it when we output translation\n const name = meta.name;\n message = this._generateI18nMessage([expansion], meta);\n const icu = icuFromI18nMessage(message);\n icu.name = name;\n if (currentMessage !== null) {\n // Also update the placeholderToMessage map with this new message\n currentMessage.placeholderToMessage[name] = message;\n }\n }\n else {\n // ICU is a top level message, try to use metadata from container element if provided via\n // `context` argument. Note: context may not be available for standalone ICUs (without\n // wrapping element), so fallback to ICU metadata in this case.\n message = this._generateI18nMessage([expansion], currentMessage || meta);\n }\n expansion.i18n = message;\n return expansion;\n }\n visitText(text) {\n return text;\n }\n visitAttribute(attribute) {\n return attribute;\n }\n visitComment(comment) {\n return comment;\n }\n visitExpansionCase(expansionCase) {\n return expansionCase;\n }\n /**\n * Parse the general form `meta` passed into extract the explicit metadata needed to create a\n * `Message`.\n *\n * There are three possibilities for the `meta` variable\n * 1) a string from an `i18n` template attribute: parse it to extract the metadata values.\n * 2) a `Message` from a previous processing pass: reuse the metadata values in the message.\n * 4) other: ignore this and just process the message metadata as normal\n *\n * @param meta the bucket that holds information about the message\n * @returns the parsed metadata.\n */\n _parseMetadata(meta) {\n return typeof meta === 'string' ? parseI18nMeta(meta) :\n meta instanceof Message ? meta :\n {};\n }\n /**\n * Generate (or restore) message id if not specified already.\n */\n _setMessageId(message, meta) {\n if (!message.id) {\n message.id = meta instanceof Message && meta.id || decimalDigest(message);\n }\n }\n /**\n * Update the `message` with a `legacyId` if necessary.\n *\n * @param message the message whose legacy id should be set\n * @param meta information about the message being processed\n */\n _setLegacyIds(message, meta) {\n if (this.enableI18nLegacyMessageIdFormat) {\n message.legacyIds = [computeDigest(message), computeDecimalDigest(message)];\n }\n else if (typeof meta !== 'string') {\n // This occurs if we are doing the 2nd pass after whitespace removal (see `parseTemplate()` in\n // `packages/compiler/src/render3/view/template.ts`).\n // In that case we want to reuse the legacy message generated in the 1st pass (see\n // `setI18nRefs()`).\n const previousMessage = meta instanceof Message ? meta :\n meta instanceof IcuPlaceholder ? meta.previousMessage :\n undefined;\n message.legacyIds = previousMessage ? previousMessage.legacyIds : [];\n }\n }\n _reportError(node, msg) {\n this._errors.push(new I18nError(node.sourceSpan, msg));\n }\n}\n/** I18n separators for metadata **/\nconst I18N_MEANING_SEPARATOR = '|';\nconst I18N_ID_SEPARATOR = '@@';\n/**\n * Parses i18n metas like:\n * - \"@@id\",\n * - \"description[@@id]\",\n * - \"meaning|description[@@id]\"\n * and returns an object with parsed output.\n *\n * @param meta String that represents i18n meta\n * @returns Object with id, meaning and description fields\n */\nfunction parseI18nMeta(meta = '') {\n let customId;\n let meaning;\n let description;\n meta = meta.trim();\n if (meta) {\n const idIndex = meta.indexOf(I18N_ID_SEPARATOR);\n const descIndex = meta.indexOf(I18N_MEANING_SEPARATOR);\n let meaningAndDesc;\n [meaningAndDesc, customId] =\n (idIndex > -1) ? [meta.slice(0, idIndex), meta.slice(idIndex + 2)] : [meta, ''];\n [meaning, description] = (descIndex > -1) ?\n [meaningAndDesc.slice(0, descIndex), meaningAndDesc.slice(descIndex + 1)] :\n ['', meaningAndDesc];\n }\n return { customId, meaning, description };\n}\n// Converts i18n meta information for a message (id, description, meaning)\n// to a JsDoc statement formatted as expected by the Closure compiler.\nfunction i18nMetaToJSDoc(meta) {\n const tags = [];\n if (meta.description) {\n tags.push({ tagName: \"desc\" /* o.JSDocTagName.Desc */, text: meta.description });\n }\n else {\n // Suppress the JSCompiler warning that a `@desc` was not given for this message.\n tags.push({ tagName: \"suppress\" /* o.JSDocTagName.Suppress */, text: '{msgDescriptions}' });\n }\n if (meta.meaning) {\n tags.push({ tagName: \"meaning\" /* o.JSDocTagName.Meaning */, text: meta.meaning });\n }\n return jsDocComment(tags);\n}\n\n/** Closure uses `goog.getMsg(message)` to lookup translations */\nconst GOOG_GET_MSG = 'goog.getMsg';\n/**\n * Generates a `goog.getMsg()` statement and reassignment. The template:\n *\n * ```html\n * <div i18n>Sent from {{ sender }} to <span class=\"receiver\">{{ receiver }}</span></div>\n * ```\n *\n * Generates:\n *\n * ```typescript\n * const MSG_FOO = goog.getMsg(\n * // Message template.\n * 'Sent from {$interpolation} to {$startTagSpan}{$interpolation_1}{$closeTagSpan}.',\n * // Placeholder values, set to magic strings which get replaced by the Angular runtime.\n * {\n * 'interpolation': '\\uFFFD0\\uFFFD',\n * 'startTagSpan': '\\uFFFD1\\uFFFD',\n * 'interpolation_1': '\\uFFFD2\\uFFFD',\n * 'closeTagSpan': '\\uFFFD3\\uFFFD',\n * },\n * // Options bag.\n * {\n * // Maps each placeholder to the original Angular source code which generates it's value.\n * original_code: {\n * 'interpolation': '{{ sender }}',\n * 'startTagSpan': '<span class=\"receiver\">',\n * 'interpolation_1': '{{ receiver }}',\n * 'closeTagSpan': '</span>',\n * },\n * },\n * );\n * const I18N_0 = MSG_FOO;\n * ```\n */\nfunction createGoogleGetMsgStatements(variable$1, message, closureVar, placeholderValues) {\n const messageString = serializeI18nMessageForGetMsg(message);\n const args = [literal(messageString)];\n if (Object.keys(placeholderValues).length) {\n // Message template parameters containing the magic strings replaced by the Angular runtime with\n // real data, e.g. `{'interpolation': '\\uFFFD0\\uFFFD'}`.\n args.push(mapLiteral(formatI18nPlaceholderNamesInMap(placeholderValues, true /* useCamelCase */), true /* quoted */));\n // Message options object, which contains original source code for placeholders (as they are\n // present in a template, e.g.\n // `{original_code: {'interpolation': '{{ name }}', 'startTagSpan': '<span>'}}`.\n args.push(mapLiteral({\n original_code: literalMap(Object.keys(placeholderValues)\n .map((param) => ({\n key: formatI18nPlaceholderName(param),\n quoted: true,\n value: message.placeholders[param] ?\n // Get source span for typical placeholder if it exists.\n literal(message.placeholders[param].sourceSpan.toString()) :\n // Otherwise must be an ICU expression, get it's source span.\n literal(message.placeholderToMessage[param]\n .nodes.map((node) => node.sourceSpan.toString())\n .join('')),\n }))),\n }));\n }\n // /**\n // * @desc description of message\n // * @meaning meaning of message\n // */\n // const MSG_... = goog.getMsg(..);\n // I18N_X = MSG_...;\n const googGetMsgStmt = closureVar.set(variable(GOOG_GET_MSG).callFn(args)).toConstDecl();\n googGetMsgStmt.addLeadingComment(i18nMetaToJSDoc(message));\n const i18nAssignmentStmt = new ExpressionStatement(variable$1.set(closureVar));\n return [googGetMsgStmt, i18nAssignmentStmt];\n}\n/**\n * This visitor walks over i18n tree and generates its string representation, including ICUs and\n * placeholders in `{$placeholder}` (for plain messages) or `{PLACEHOLDER}` (inside ICUs) format.\n */\nclass GetMsgSerializerVisitor {\n formatPh(value) {\n return `{$${formatI18nPlaceholderName(value)}}`;\n }\n visitText(text) {\n return text.value;\n }\n visitContainer(container) {\n return container.children.map(child => child.visit(this)).join('');\n }\n visitIcu(icu) {\n return serializeIcuNode(icu);\n }\n visitTagPlaceholder(ph) {\n return ph.isVoid ?\n this.formatPh(ph.startName) :\n `${this.formatPh(ph.startName)}${ph.children.map(child => child.visit(this)).join('')}${this.formatPh(ph.closeName)}`;\n }\n visitPlaceholder(ph) {\n return this.formatPh(ph.name);\n }\n visitIcuPlaceholder(ph, context) {\n return this.formatPh(ph.name);\n }\n}\nconst serializerVisitor = new GetMsgSerializerVisitor();\nfunction serializeI18nMessageForGetMsg(message) {\n return message.nodes.map(node => node.visit(serializerVisitor, null)).join('');\n}\n\nfunction createLocalizeStatements(variable, message, params) {\n const { messageParts, placeHolders } = serializeI18nMessageForLocalize(message);\n const sourceSpan = getSourceSpan(message);\n const expressions = placeHolders.map(ph => params[ph.text]);\n const localizedString$1 = localizedString(message, messageParts, placeHolders, expressions, sourceSpan);\n const variableInitialization = variable.set(localizedString$1);\n return [new ExpressionStatement(variableInitialization)];\n}\n/**\n * This visitor walks over an i18n tree, capturing literal strings and placeholders.\n *\n * The result can be used for generating the `$localize` tagged template literals.\n */\nclass LocalizeSerializerVisitor {\n constructor(placeholderToMessage, pieces) {\n this.placeholderToMessage = placeholderToMessage;\n this.pieces = pieces;\n }\n visitText(text) {\n if (this.pieces[this.pieces.length - 1] instanceof LiteralPiece) {\n // Two literal pieces in a row means that there was some comment node in-between.\n this.pieces[this.pieces.length - 1].text += text.value;\n }\n else {\n const sourceSpan = new ParseSourceSpan(text.sourceSpan.fullStart, text.sourceSpan.end, text.sourceSpan.fullStart, text.sourceSpan.details);\n this.pieces.push(new LiteralPiece(text.value, sourceSpan));\n }\n }\n visitContainer(container) {\n container.children.forEach(child => child.visit(this));\n }\n visitIcu(icu) {\n this.pieces.push(new LiteralPiece(serializeIcuNode(icu), icu.sourceSpan));\n }\n visitTagPlaceholder(ph) {\n this.pieces.push(this.createPlaceholderPiece(ph.startName, ph.startSourceSpan ?? ph.sourceSpan));\n if (!ph.isVoid) {\n ph.children.forEach(child => child.visit(this));\n this.pieces.push(this.createPlaceholderPiece(ph.closeName, ph.endSourceSpan ?? ph.sourceSpan));\n }\n }\n visitPlaceholder(ph) {\n this.pieces.push(this.createPlaceholderPiece(ph.name, ph.sourceSpan));\n }\n visitIcuPlaceholder(ph) {\n this.pieces.push(this.createPlaceholderPiece(ph.name, ph.sourceSpan, this.placeholderToMessage[ph.name]));\n }\n createPlaceholderPiece(name, sourceSpan, associatedMessage) {\n return new PlaceholderPiece(formatI18nPlaceholderName(name, /* useCamelCase */ false), sourceSpan, associatedMessage);\n }\n}\n/**\n * Serialize an i18n message into two arrays: messageParts and placeholders.\n *\n * These arrays will be used to generate `$localize` tagged template literals.\n *\n * @param message The message to be serialized.\n * @returns an object containing the messageParts and placeholders.\n */\nfunction serializeI18nMessageForLocalize(message) {\n const pieces = [];\n const serializerVisitor = new LocalizeSerializerVisitor(message.placeholderToMessage, pieces);\n message.nodes.forEach(node => node.visit(serializerVisitor));\n return processMessagePieces(pieces);\n}\nfunction getSourceSpan(message) {\n const startNode = message.nodes[0];\n const endNode = message.nodes[message.nodes.length - 1];\n return new ParseSourceSpan(startNode.sourceSpan.fullStart, endNode.sourceSpan.end, startNode.sourceSpan.fullStart, startNode.sourceSpan.details);\n}\n/**\n * Convert the list of serialized MessagePieces into two arrays.\n *\n * One contains the literal string pieces and the other the placeholders that will be replaced by\n * expressions when rendering `$localize` tagged template literals.\n *\n * @param pieces The pieces to process.\n * @returns an object containing the messageParts and placeholders.\n */\nfunction processMessagePieces(pieces) {\n const messageParts = [];\n const placeHolders = [];\n if (pieces[0] instanceof PlaceholderPiece) {\n // The first piece was a placeholder so we need to add an initial empty message part.\n messageParts.push(createEmptyMessagePart(pieces[0].sourceSpan.start));\n }\n for (let i = 0; i < pieces.length; i++) {\n const part = pieces[i];\n if (part instanceof LiteralPiece) {\n messageParts.push(part);\n }\n else {\n placeHolders.push(part);\n if (pieces[i - 1] instanceof PlaceholderPiece) {\n // There were two placeholders in a row, so we need to add an empty message part.\n messageParts.push(createEmptyMessagePart(pieces[i - 1].sourceSpan.end));\n }\n }\n }\n if (pieces[pieces.length - 1] instanceof PlaceholderPiece) {\n // The last piece was a placeholder so we need to add a final empty message part.\n messageParts.push(createEmptyMessagePart(pieces[pieces.length - 1].sourceSpan.end));\n }\n return { messageParts, placeHolders };\n}\nfunction createEmptyMessagePart(location) {\n return new LiteralPiece('', new ParseSourceSpan(location, location));\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Selector attribute name of `<ng-content>`\nconst NG_CONTENT_SELECT_ATTR = 'select';\n// Attribute name of `ngProjectAs`.\nconst NG_PROJECT_AS_ATTR_NAME = 'ngProjectAs';\n// Global symbols available only inside event bindings.\nconst EVENT_BINDING_SCOPE_GLOBALS = new Set(['$event']);\n// List of supported global targets for event listeners\nconst GLOBAL_TARGET_RESOLVERS = new Map([['window', Identifiers.resolveWindow], ['document', Identifiers.resolveDocument], ['body', Identifiers.resolveBody]]);\nconst LEADING_TRIVIA_CHARS = [' ', '\\n', '\\r', '\\t'];\n// if (rf & flags) { .. }\nfunction renderFlagCheckIfStmt(flags, statements) {\n return ifStmt(variable(RENDER_FLAGS).bitwiseAnd(literal(flags), null, false), statements);\n}\nfunction prepareEventListenerParameters(eventAst, handlerName = null, scope = null) {\n const { type, name, target, phase, handler } = eventAst;\n if (target && !GLOBAL_TARGET_RESOLVERS.has(target)) {\n throw new Error(`Unexpected global target '${target}' defined for '${name}' event.\n Supported list of global targets: ${Array.from(GLOBAL_TARGET_RESOLVERS.keys())}.`);\n }\n const eventArgumentName = '$event';\n const implicitReceiverAccesses = new Set();\n const implicitReceiverExpr = (scope === null || scope.bindingLevel === 0) ?\n variable(CONTEXT_NAME) :\n scope.getOrCreateSharedContextVar(0);\n const bindingStatements = convertActionBinding(scope, implicitReceiverExpr, handler, 'b', eventAst.handlerSpan, implicitReceiverAccesses, EVENT_BINDING_SCOPE_GLOBALS);\n const statements = [];\n const variableDeclarations = scope?.variableDeclarations();\n const restoreViewStatement = scope?.restoreViewStatement();\n if (variableDeclarations) {\n // `variableDeclarations` needs to run first, because\n // `restoreViewStatement` depends on the result.\n statements.push(...variableDeclarations);\n }\n statements.push(...bindingStatements);\n if (restoreViewStatement) {\n statements.unshift(restoreViewStatement);\n // If there's a `restoreView` call, we need to reset the view at the end of the listener\n // in order to avoid a leak. If there's a `return` statement already, we wrap it in the\n // call, e.g. `return resetView(ctx.foo())`. Otherwise we add the call as the last statement.\n const lastStatement = statements[statements.length - 1];\n if (lastStatement instanceof ReturnStatement) {\n statements[statements.length - 1] = new ReturnStatement(invokeInstruction(lastStatement.value.sourceSpan, Identifiers.resetView, [lastStatement.value]));\n }\n else {\n statements.push(new ExpressionStatement(invokeInstruction(null, Identifiers.resetView, [])));\n }\n }\n const eventName = type === 1 /* ParsedEventType.Animation */ ? prepareSyntheticListenerName(name, phase) : name;\n const fnName = handlerName && sanitizeIdentifier(handlerName);\n const fnArgs = [];\n if (implicitReceiverAccesses.has(eventArgumentName)) {\n fnArgs.push(new FnParam(eventArgumentName, DYNAMIC_TYPE));\n }\n const handlerFn = fn(fnArgs, statements, INFERRED_TYPE, null, fnName);\n const params = [literal(eventName), handlerFn];\n if (target) {\n params.push(literal(false), // `useCapture` flag, defaults to `false`\n importExpr(GLOBAL_TARGET_RESOLVERS.get(target)));\n }\n return params;\n}\nfunction createComponentDefConsts() {\n return {\n prepareStatements: [],\n constExpressions: [],\n i18nVarRefsCache: new Map(),\n };\n}\nclass TemplateDefinitionBuilder {\n constructor(constantPool, parentBindingScope, level = 0, contextName, i18nContext, templateIndex, templateName, _namespace, relativeContextFilePath, i18nUseExternalIds, _constants = createComponentDefConsts()) {\n this.constantPool = constantPool;\n this.level = level;\n this.contextName = contextName;\n this.i18nContext = i18nContext;\n this.templateIndex = templateIndex;\n this.templateName = templateName;\n this._namespace = _namespace;\n this.i18nUseExternalIds = i18nUseExternalIds;\n this._constants = _constants;\n this._dataIndex = 0;\n this._bindingContext = 0;\n this._prefixCode = [];\n /**\n * List of callbacks to generate creation mode instructions. We store them here as we process\n * the template so bindings in listeners are resolved only once all nodes have been visited.\n * This ensures all local refs and context variables are available for matching.\n */\n this._creationCodeFns = [];\n /**\n * List of callbacks to generate update mode instructions. We store them here as we process\n * the template so bindings are resolved only once all nodes have been visited. This ensures\n * all local refs and context variables are available for matching.\n */\n this._updateCodeFns = [];\n /** Index of the currently-selected node. */\n this._currentIndex = 0;\n /** Temporary variable declarations generated from visiting pipes, literals, etc. */\n this._tempVariables = [];\n /**\n * List of callbacks to build nested templates. Nested templates must not be visited until\n * after the parent template has finished visiting all of its nodes. This ensures that all\n * local ref bindings in nested templates are able to find local ref values if the refs\n * are defined after the template declaration.\n */\n this._nestedTemplateFns = [];\n // i18n context local to this template\n this.i18n = null;\n // Number of slots to reserve for pureFunctions\n this._pureFunctionSlots = 0;\n // Number of binding slots\n this._bindingSlots = 0;\n // Projection slots found in the template. Projection slots can distribute projected\n // nodes based on a selector, or can just use the wildcard selector to match\n // all nodes which aren't matching any selector.\n this._ngContentReservedSlots = [];\n // Number of non-default selectors found in all parent templates of this template. We need to\n // track it to properly adjust projection slot index in the `projection` instruction.\n this._ngContentSelectorsOffset = 0;\n // Expression that should be used as implicit receiver when converting template\n // expressions to output AST.\n this._implicitReceiverExpr = null;\n // These should be handled in the template or element directly.\n this.visitReference = invalid;\n this.visitVariable = invalid;\n this.visitTextAttribute = invalid;\n this.visitBoundAttribute = invalid;\n this.visitBoundEvent = invalid;\n this._bindingScope = parentBindingScope.nestedScope(level);\n // Turn the relative context file path into an identifier by replacing non-alphanumeric\n // characters with underscores.\n this.fileBasedI18nSuffix = relativeContextFilePath.replace(/[^A-Za-z0-9]/g, '_') + '_';\n this._valueConverter = new ValueConverter(constantPool, () => this.allocateDataSlot(), (numSlots) => this.allocatePureFunctionSlots(numSlots), (name, localName, slot, value) => {\n this._bindingScope.set(this.level, localName, value);\n this.creationInstruction(null, Identifiers.pipe, [literal(slot), literal(name)]);\n });\n }\n buildTemplateFunction(nodes, variables, ngContentSelectorsOffset = 0, i18n) {\n this._ngContentSelectorsOffset = ngContentSelectorsOffset;\n if (this._namespace !== Identifiers.namespaceHTML) {\n this.creationInstruction(null, this._namespace);\n }\n // Create variable bindings\n variables.forEach(v => this.registerContextVariables(v));\n // Initiate i18n context in case:\n // - this template has parent i18n context\n // - or the template has i18n meta associated with it,\n // but it's not initiated by the Element (e.g. <ng-template i18n>)\n const initI18nContext = this.i18nContext ||\n (isI18nRootNode(i18n) && !isSingleI18nIcu(i18n) &&\n !(isSingleElementTemplate(nodes) && nodes[0].i18n === i18n));\n const selfClosingI18nInstruction = hasTextChildrenOnly(nodes);\n if (initI18nContext) {\n this.i18nStart(null, i18n, selfClosingI18nInstruction);\n }\n // This is the initial pass through the nodes of this template. In this pass, we\n // queue all creation mode and update mode instructions for generation in the second\n // pass. It's necessary to separate the passes to ensure local refs are defined before\n // resolving bindings. We also count bindings in this pass as we walk bound expressions.\n visitAll$1(this, nodes);\n // Add total binding count to pure function count so pure function instructions are\n // generated with the correct slot offset when update instructions are processed.\n this._pureFunctionSlots += this._bindingSlots;\n // Pipes are walked in the first pass (to enqueue `pipe()` creation instructions and\n // `pipeBind` update instructions), so we have to update the slot offsets manually\n // to account for bindings.\n this._valueConverter.updatePipeSlotOffsets(this._bindingSlots);\n // Nested templates must be processed before creation instructions so template()\n // instructions can be generated with the correct internal const count.\n this._nestedTemplateFns.forEach(buildTemplateFn => buildTemplateFn());\n // Output the `projectionDef` instruction when some `<ng-content>` tags are present.\n // The `projectionDef` instruction is only emitted for the component template and\n // is skipped for nested templates (<ng-template> tags).\n if (this.level === 0 && this._ngContentReservedSlots.length) {\n const parameters = [];\n // By default the `projectionDef` instructions creates one slot for the wildcard\n // selector if no parameters are passed. Therefore we only want to allocate a new\n // array for the projection slots if the default projection slot is not sufficient.\n if (this._ngContentReservedSlots.length > 1 || this._ngContentReservedSlots[0] !== '*') {\n const r3ReservedSlots = this._ngContentReservedSlots.map(s => s !== '*' ? parseSelectorToR3Selector(s) : s);\n parameters.push(this.constantPool.getConstLiteral(asLiteral(r3ReservedSlots), true));\n }\n // Since we accumulate ngContent selectors while processing template elements,\n // we *prepend* `projectionDef` to creation instructions block, to put it before\n // any `projection` instructions\n this.creationInstruction(null, Identifiers.projectionDef, parameters, /* prepend */ true);\n }\n if (initI18nContext) {\n this.i18nEnd(null, selfClosingI18nInstruction);\n }\n // Generate all the creation mode instructions (e.g. resolve bindings in listeners)\n const creationStatements = getInstructionStatements(this._creationCodeFns);\n // Generate all the update mode instructions (e.g. resolve property or text bindings)\n const updateStatements = getInstructionStatements(this._updateCodeFns);\n // Variable declaration must occur after binding resolution so we can generate context\n // instructions that build on each other.\n // e.g. const b = nextContext().$implicit(); const b = nextContext();\n const creationVariables = this._bindingScope.viewSnapshotStatements();\n const updateVariables = this._bindingScope.variableDeclarations().concat(this._tempVariables);\n const creationBlock = creationStatements.length > 0 ?\n [renderFlagCheckIfStmt(1 /* core.RenderFlags.Create */, creationVariables.concat(creationStatements))] :\n [];\n const updateBlock = updateStatements.length > 0 ?\n [renderFlagCheckIfStmt(2 /* core.RenderFlags.Update */, updateVariables.concat(updateStatements))] :\n [];\n return fn(\n // i.e. (rf: RenderFlags, ctx: any)\n [new FnParam(RENDER_FLAGS, NUMBER_TYPE), new FnParam(CONTEXT_NAME, null)], [\n // Temporary variable declarations for query refresh (i.e. let _t: any;)\n ...this._prefixCode,\n // Creating mode (i.e. if (rf & RenderFlags.Create) { ... })\n ...creationBlock,\n // Binding and refresh mode (i.e. if (rf & RenderFlags.Update) {...})\n ...updateBlock,\n ], INFERRED_TYPE, null, this.templateName);\n }\n // LocalResolver\n getLocal(name) {\n return this._bindingScope.get(name);\n }\n // LocalResolver\n notifyImplicitReceiverUse() {\n this._bindingScope.notifyImplicitReceiverUse();\n }\n // LocalResolver\n maybeRestoreView() {\n this._bindingScope.maybeRestoreView();\n }\n i18nTranslate(message, params = {}, ref, transformFn) {\n const _ref = ref || this.i18nGenerateMainBlockVar();\n // Closure Compiler requires const names to start with `MSG_` but disallows any other const to\n // start with `MSG_`. We define a variable starting with `MSG_` just for the `goog.getMsg` call\n const closureVar = this.i18nGenerateClosureVar(message.id);\n const statements = getTranslationDeclStmts(message, _ref, closureVar, params, transformFn);\n this._constants.prepareStatements.push(...statements);\n return _ref;\n }\n registerContextVariables(variable$1) {\n const scopedName = this._bindingScope.freshReferenceName();\n const retrievalLevel = this.level;\n const lhs = variable(variable$1.name + scopedName);\n this._bindingScope.set(retrievalLevel, variable$1.name, lhs, 1 /* DeclarationPriority.CONTEXT */, (scope, relativeLevel) => {\n let rhs;\n if (scope.bindingLevel === retrievalLevel) {\n if (scope.isListenerScope() && scope.hasRestoreViewVariable()) {\n // e.g. restoredCtx.\n // We have to get the context from a view reference, if one is available, because\n // the context that was passed in during creation may not be correct anymore.\n // For more information see: https://github.com/angular/angular/pull/40360.\n rhs = variable(RESTORED_VIEW_CONTEXT_NAME);\n scope.notifyRestoredViewContextUse();\n }\n else {\n // e.g. ctx\n rhs = variable(CONTEXT_NAME);\n }\n }\n else {\n const sharedCtxVar = scope.getSharedContextName(retrievalLevel);\n // e.g. ctx_r0 OR x(2);\n rhs = sharedCtxVar ? sharedCtxVar : generateNextContextExpr(relativeLevel);\n }\n // e.g. const $item$ = x(2).$implicit;\n return [lhs.set(rhs.prop(variable$1.value || IMPLICIT_REFERENCE)).toConstDecl()];\n });\n }\n i18nAppendBindings(expressions) {\n if (expressions.length > 0) {\n expressions.forEach(expression => this.i18n.appendBinding(expression));\n }\n }\n i18nBindProps(props) {\n const bound = {};\n Object.keys(props).forEach(key => {\n const prop = props[key];\n if (prop instanceof Text$3) {\n bound[key] = literal(prop.value);\n }\n else {\n const value = prop.value.visit(this._valueConverter);\n this.allocateBindingSlots(value);\n if (value instanceof Interpolation) {\n const { strings, expressions } = value;\n const { id, bindings } = this.i18n;\n const label = assembleI18nBoundString(strings, bindings.size, id);\n this.i18nAppendBindings(expressions);\n bound[key] = literal(label);\n }\n }\n });\n return bound;\n }\n // Generates top level vars for i18n blocks (i.e. `i18n_N`).\n i18nGenerateMainBlockVar() {\n return variable(this.constantPool.uniqueName(TRANSLATION_VAR_PREFIX));\n }\n // Generates vars with Closure-specific names for i18n blocks (i.e. `MSG_XXX`).\n i18nGenerateClosureVar(messageId) {\n let name;\n const suffix = this.fileBasedI18nSuffix.toUpperCase();\n if (this.i18nUseExternalIds) {\n const prefix = getTranslationConstPrefix(`EXTERNAL_`);\n const uniqueSuffix = this.constantPool.uniqueName(suffix);\n name = `${prefix}${sanitizeIdentifier(messageId)}$$${uniqueSuffix}`;\n }\n else {\n const prefix = getTranslationConstPrefix(suffix);\n name = this.constantPool.uniqueName(prefix);\n }\n return variable(name);\n }\n i18nUpdateRef(context) {\n const { icus, meta, isRoot, isResolved, isEmitted } = context;\n if (isRoot && isResolved && !isEmitted && !isSingleI18nIcu(meta)) {\n context.isEmitted = true;\n const placeholders = context.getSerializedPlaceholders();\n let icuMapping = {};\n let params = placeholders.size ? placeholdersToParams(placeholders) : {};\n if (icus.size) {\n icus.forEach((refs, key) => {\n if (refs.length === 1) {\n // if we have one ICU defined for a given\n // placeholder - just output its reference\n params[key] = refs[0];\n }\n else {\n // ... otherwise we need to activate post-processing\n // to replace ICU placeholders with proper values\n const placeholder = wrapI18nPlaceholder(`${I18N_ICU_MAPPING_PREFIX}${key}`);\n params[key] = literal(placeholder);\n icuMapping[key] = literalArr(refs);\n }\n });\n }\n // translation requires post processing in 2 cases:\n // - if we have placeholders with multiple values (ex. `START_DIV`: [�#1�, �#2�, ...])\n // - if we have multiple ICUs that refer to the same placeholder name\n const needsPostprocessing = Array.from(placeholders.values()).some((value) => value.length > 1) ||\n Object.keys(icuMapping).length;\n let transformFn;\n if (needsPostprocessing) {\n transformFn = (raw) => {\n const args = [raw];\n if (Object.keys(icuMapping).length) {\n args.push(mapLiteral(icuMapping, true));\n }\n return invokeInstruction(null, Identifiers.i18nPostprocess, args);\n };\n }\n this.i18nTranslate(meta, params, context.ref, transformFn);\n }\n }\n i18nStart(span = null, meta, selfClosing) {\n const index = this.allocateDataSlot();\n this.i18n = this.i18nContext ?\n this.i18nContext.forkChildContext(index, this.templateIndex, meta) :\n new I18nContext(index, this.i18nGenerateMainBlockVar(), 0, this.templateIndex, meta);\n // generate i18nStart instruction\n const { id, ref } = this.i18n;\n const params = [literal(index), this.addToConsts(ref)];\n if (id > 0) {\n // do not push 3rd argument (sub-block id)\n // into i18nStart call for top level i18n context\n params.push(literal(id));\n }\n this.creationInstruction(span, selfClosing ? Identifiers.i18n : Identifiers.i18nStart, params);\n }\n i18nEnd(span = null, selfClosing) {\n if (!this.i18n) {\n throw new Error('i18nEnd is executed with no i18n context present');\n }\n if (this.i18nContext) {\n this.i18nContext.reconcileChildContext(this.i18n);\n this.i18nUpdateRef(this.i18nContext);\n }\n else {\n this.i18nUpdateRef(this.i18n);\n }\n // setup accumulated bindings\n const { index, bindings } = this.i18n;\n if (bindings.size) {\n for (const binding of bindings) {\n // for i18n block, advance to the most recent element index (by taking the current number of\n // elements and subtracting one) before invoking `i18nExp` instructions, to make sure the\n // necessary lifecycle hooks of components/directives are properly flushed.\n this.updateInstructionWithAdvance(this.getConstCount() - 1, span, Identifiers.i18nExp, () => this.convertPropertyBinding(binding));\n }\n this.updateInstruction(span, Identifiers.i18nApply, [literal(index)]);\n }\n if (!selfClosing) {\n this.creationInstruction(span, Identifiers.i18nEnd);\n }\n this.i18n = null; // reset local i18n context\n }\n i18nAttributesInstruction(nodeIndex, attrs, sourceSpan) {\n let hasBindings = false;\n const i18nAttrArgs = [];\n attrs.forEach(attr => {\n const message = attr.i18n;\n const converted = attr.value.visit(this._valueConverter);\n this.allocateBindingSlots(converted);\n if (converted instanceof Interpolation) {\n const placeholders = assembleBoundTextPlaceholders(message);\n const params = placeholdersToParams(placeholders);\n i18nAttrArgs.push(literal(attr.name), this.i18nTranslate(message, params));\n converted.expressions.forEach(expression => {\n hasBindings = true;\n this.updateInstructionWithAdvance(nodeIndex, sourceSpan, Identifiers.i18nExp, () => this.convertPropertyBinding(expression));\n });\n }\n });\n if (i18nAttrArgs.length > 0) {\n const index = literal(this.allocateDataSlot());\n const constIndex = this.addToConsts(literalArr(i18nAttrArgs));\n this.creationInstruction(sourceSpan, Identifiers.i18nAttributes, [index, constIndex]);\n if (hasBindings) {\n this.updateInstruction(sourceSpan, Identifiers.i18nApply, [index]);\n }\n }\n }\n getNamespaceInstruction(namespaceKey) {\n switch (namespaceKey) {\n case 'math':\n return Identifiers.namespaceMathML;\n case 'svg':\n return Identifiers.namespaceSVG;\n default:\n return Identifiers.namespaceHTML;\n }\n }\n addNamespaceInstruction(nsInstruction, element) {\n this._namespace = nsInstruction;\n this.creationInstruction(element.startSourceSpan, nsInstruction);\n }\n /**\n * Adds an update instruction for an interpolated property or attribute, such as\n * `prop=\"{{value}}\"` or `attr.title=\"{{value}}\"`\n */\n interpolatedUpdateInstruction(instruction, elementIndex, attrName, input, value, params) {\n this.updateInstructionWithAdvance(elementIndex, input.sourceSpan, instruction, () => [literal(attrName), ...this.getUpdateInstructionArguments(value), ...params]);\n }\n visitContent(ngContent) {\n const slot = this.allocateDataSlot();\n const projectionSlotIdx = this._ngContentSelectorsOffset + this._ngContentReservedSlots.length;\n const parameters = [literal(slot)];\n this._ngContentReservedSlots.push(ngContent.selector);\n const nonContentSelectAttributes = ngContent.attributes.filter(attr => attr.name.toLowerCase() !== NG_CONTENT_SELECT_ATTR);\n const attributes = this.getAttributeExpressions(ngContent.name, nonContentSelectAttributes, [], []);\n if (attributes.length > 0) {\n parameters.push(literal(projectionSlotIdx), literalArr(attributes));\n }\n else if (projectionSlotIdx !== 0) {\n parameters.push(literal(projectionSlotIdx));\n }\n this.creationInstruction(ngContent.sourceSpan, Identifiers.projection, parameters);\n if (this.i18n) {\n this.i18n.appendProjection(ngContent.i18n, slot);\n }\n }\n visitElement(element) {\n const elementIndex = this.allocateDataSlot();\n const stylingBuilder = new StylingBuilder(null);\n let isNonBindableMode = false;\n const isI18nRootElement = isI18nRootNode(element.i18n) && !isSingleI18nIcu(element.i18n);\n const outputAttrs = [];\n const [namespaceKey, elementName] = splitNsName(element.name);\n const isNgContainer$1 = isNgContainer(element.name);\n // Handle styling, i18n, ngNonBindable attributes\n for (const attr of element.attributes) {\n const { name, value } = attr;\n if (name === NON_BINDABLE_ATTR) {\n isNonBindableMode = true;\n }\n else if (name === 'style') {\n stylingBuilder.registerStyleAttr(value);\n }\n else if (name === 'class') {\n stylingBuilder.registerClassAttr(value);\n }\n else {\n outputAttrs.push(attr);\n }\n }\n // Regular element or ng-container creation mode\n const parameters = [literal(elementIndex)];\n if (!isNgContainer$1) {\n parameters.push(literal(elementName));\n }\n // Add the attributes\n const allOtherInputs = [];\n const boundI18nAttrs = [];\n element.inputs.forEach(input => {\n const stylingInputWasSet = stylingBuilder.registerBoundInput(input);\n if (!stylingInputWasSet) {\n if (input.type === 0 /* BindingType.Property */ && input.i18n) {\n boundI18nAttrs.push(input);\n }\n else {\n allOtherInputs.push(input);\n }\n }\n });\n // add attributes for directive and projection matching purposes\n const attributes = this.getAttributeExpressions(element.name, outputAttrs, allOtherInputs, element.outputs, stylingBuilder, [], boundI18nAttrs);\n parameters.push(this.addAttrsToConsts(attributes));\n // local refs (ex.: <div #foo #bar=\"baz\">)\n const refs = this.prepareRefsArray(element.references);\n parameters.push(this.addToConsts(refs));\n const wasInNamespace = this._namespace;\n const currentNamespace = this.getNamespaceInstruction(namespaceKey);\n // If the namespace is changing now, include an instruction to change it\n // during element creation.\n if (currentNamespace !== wasInNamespace) {\n this.addNamespaceInstruction(currentNamespace, element);\n }\n if (this.i18n) {\n this.i18n.appendElement(element.i18n, elementIndex);\n }\n // Note that we do not append text node instructions and ICUs inside i18n section,\n // so we exclude them while calculating whether current element has children\n const hasChildren = (!isI18nRootElement && this.i18n) ? !hasTextChildrenOnly(element.children) :\n element.children.length > 0;\n const createSelfClosingInstruction = !stylingBuilder.hasBindingsWithPipes &&\n element.outputs.length === 0 && boundI18nAttrs.length === 0 && !hasChildren;\n const createSelfClosingI18nInstruction = !createSelfClosingInstruction && hasTextChildrenOnly(element.children);\n if (createSelfClosingInstruction) {\n this.creationInstruction(element.sourceSpan, isNgContainer$1 ? Identifiers.elementContainer : Identifiers.element, trimTrailingNulls(parameters));\n }\n else {\n this.creationInstruction(element.startSourceSpan, isNgContainer$1 ? Identifiers.elementContainerStart : Identifiers.elementStart, trimTrailingNulls(parameters));\n if (isNonBindableMode) {\n this.creationInstruction(element.startSourceSpan, Identifiers.disableBindings);\n }\n if (boundI18nAttrs.length > 0) {\n this.i18nAttributesInstruction(elementIndex, boundI18nAttrs, element.startSourceSpan ?? element.sourceSpan);\n }\n // Generate Listeners (outputs)\n if (element.outputs.length > 0) {\n for (const outputAst of element.outputs) {\n this.creationInstruction(outputAst.sourceSpan, Identifiers.listener, this.prepareListenerParameter(element.name, outputAst, elementIndex));\n }\n }\n // Note: it's important to keep i18n/i18nStart instructions after i18nAttributes and\n // listeners, to make sure i18nAttributes instruction targets current element at runtime.\n if (isI18nRootElement) {\n this.i18nStart(element.startSourceSpan, element.i18n, createSelfClosingI18nInstruction);\n }\n }\n // the code here will collect all update-level styling instructions and add them to the\n // update block of the template function AOT code. Instructions like `styleProp`,\n // `styleMap`, `classMap`, `classProp`\n // are all generated and assigned in the code below.\n const stylingInstructions = stylingBuilder.buildUpdateLevelInstructions(this._valueConverter);\n const limit = stylingInstructions.length - 1;\n for (let i = 0; i <= limit; i++) {\n const instruction = stylingInstructions[i];\n this._bindingSlots += this.processStylingUpdateInstruction(elementIndex, instruction);\n }\n // the reason why `undefined` is used is because the renderer understands this as a\n // special value to symbolize that there is no RHS to this binding\n // TODO (matsko): revisit this once FW-959 is approached\n const emptyValueBindInstruction = literal(undefined);\n const propertyBindings = [];\n const attributeBindings = [];\n // Generate element input bindings\n allOtherInputs.forEach(input => {\n const inputType = input.type;\n if (inputType === 4 /* BindingType.Animation */) {\n const value = input.value.visit(this._valueConverter);\n // animation bindings can be presented in the following formats:\n // 1. [@binding]=\"fooExp\"\n // 2. [@binding]=\"{value:fooExp, params:{...}}\"\n // 3. [@binding]\n // 4. @binding\n // All formats will be valid for when a synthetic binding is created.\n // The reasoning for this is because the renderer should get each\n // synthetic binding value in the order of the array that they are\n // defined in...\n const hasValue = value instanceof LiteralPrimitive ? !!value.value : true;\n this.allocateBindingSlots(value);\n propertyBindings.push({\n span: input.sourceSpan,\n paramsOrFn: getBindingFunctionParams(() => hasValue ? this.convertPropertyBinding(value) : emptyValueBindInstruction, prepareSyntheticPropertyName(input.name))\n });\n }\n else {\n // we must skip attributes with associated i18n context, since these attributes are handled\n // separately and corresponding `i18nExp` and `i18nApply` instructions will be generated\n if (input.i18n)\n return;\n const value = input.value.visit(this._valueConverter);\n if (value !== undefined) {\n const params = [];\n const [attrNamespace, attrName] = splitNsName(input.name);\n const isAttributeBinding = inputType === 1 /* BindingType.Attribute */;\n const sanitizationRef = resolveSanitizationFn(input.securityContext, isAttributeBinding);\n if (sanitizationRef)\n params.push(sanitizationRef);\n if (attrNamespace) {\n const namespaceLiteral = literal(attrNamespace);\n if (sanitizationRef) {\n params.push(namespaceLiteral);\n }\n else {\n // If there wasn't a sanitization ref, we need to add\n // an extra param so that we can pass in the namespace.\n params.push(literal(null), namespaceLiteral);\n }\n }\n this.allocateBindingSlots(value);\n if (inputType === 0 /* BindingType.Property */) {\n if (value instanceof Interpolation) {\n // prop=\"{{value}}\" and friends\n this.interpolatedUpdateInstruction(getPropertyInterpolationExpression(value), elementIndex, attrName, input, value, params);\n }\n else {\n // [prop]=\"value\"\n // Collect all the properties so that we can chain into a single function at the end.\n propertyBindings.push({\n span: input.sourceSpan,\n paramsOrFn: getBindingFunctionParams(() => this.convertPropertyBinding(value), attrName, params)\n });\n }\n }\n else if (inputType === 1 /* BindingType.Attribute */) {\n if (value instanceof Interpolation && getInterpolationArgsLength(value) > 1) {\n // attr.name=\"text{{value}}\" and friends\n this.interpolatedUpdateInstruction(getAttributeInterpolationExpression(value), elementIndex, attrName, input, value, params);\n }\n else {\n const boundValue = value instanceof Interpolation ? value.expressions[0] : value;\n // [attr.name]=\"value\" or attr.name=\"{{value}}\"\n // Collect the attribute bindings so that they can be chained at the end.\n attributeBindings.push({\n span: input.sourceSpan,\n paramsOrFn: getBindingFunctionParams(() => this.convertPropertyBinding(boundValue), attrName, params)\n });\n }\n }\n else {\n // class prop\n this.updateInstructionWithAdvance(elementIndex, input.sourceSpan, Identifiers.classProp, () => {\n return [\n literal(elementIndex), literal(attrName), this.convertPropertyBinding(value),\n ...params\n ];\n });\n }\n }\n }\n });\n for (const propertyBinding of propertyBindings) {\n this.updateInstructionWithAdvance(elementIndex, propertyBinding.span, Identifiers.property, propertyBinding.paramsOrFn);\n }\n for (const attributeBinding of attributeBindings) {\n this.updateInstructionWithAdvance(elementIndex, attributeBinding.span, Identifiers.attribute, attributeBinding.paramsOrFn);\n }\n // Traverse element child nodes\n visitAll$1(this, element.children);\n if (!isI18nRootElement && this.i18n) {\n this.i18n.appendElement(element.i18n, elementIndex, true);\n }\n if (!createSelfClosingInstruction) {\n // Finish element construction mode.\n const span = element.endSourceSpan ?? element.sourceSpan;\n if (isI18nRootElement) {\n this.i18nEnd(span, createSelfClosingI18nInstruction);\n }\n if (isNonBindableMode) {\n this.creationInstruction(span, Identifiers.enableBindings);\n }\n this.creationInstruction(span, isNgContainer$1 ? Identifiers.elementContainerEnd : Identifiers.elementEnd);\n }\n }\n visitTemplate(template) {\n const NG_TEMPLATE_TAG_NAME = 'ng-template';\n const templateIndex = this.allocateDataSlot();\n if (this.i18n) {\n this.i18n.appendTemplate(template.i18n, templateIndex);\n }\n const tagNameWithoutNamespace = template.tagName ? splitNsName(template.tagName)[1] : template.tagName;\n const contextName = `${this.contextName}${template.tagName ? '_' + sanitizeIdentifier(template.tagName) : ''}_${templateIndex}`;\n const templateName = `${contextName}_Template`;\n const parameters = [\n literal(templateIndex),\n variable(templateName),\n // We don't care about the tag's namespace here, because we infer\n // it based on the parent nodes inside the template instruction.\n literal(tagNameWithoutNamespace),\n ];\n // prepare attributes parameter (including attributes used for directive matching)\n const attrsExprs = this.getAttributeExpressions(NG_TEMPLATE_TAG_NAME, template.attributes, template.inputs, template.outputs, undefined /* styles */, template.templateAttrs);\n parameters.push(this.addAttrsToConsts(attrsExprs));\n // local refs (ex.: <ng-template #foo>)\n if (template.references && template.references.length) {\n const refs = this.prepareRefsArray(template.references);\n parameters.push(this.addToConsts(refs));\n parameters.push(importExpr(Identifiers.templateRefExtractor));\n }\n // Create the template function\n const templateVisitor = new TemplateDefinitionBuilder(this.constantPool, this._bindingScope, this.level + 1, contextName, this.i18n, templateIndex, templateName, this._namespace, this.fileBasedI18nSuffix, this.i18nUseExternalIds, this._constants);\n // Nested templates must not be visited until after their parent templates have completed\n // processing, so they are queued here until after the initial pass. Otherwise, we wouldn't\n // be able to support bindings in nested templates to local refs that occur after the\n // template definition. e.g. <div *ngIf=\"showing\">{{ foo }}</div> <div #foo></div>\n this._nestedTemplateFns.push(() => {\n const templateFunctionExpr = templateVisitor.buildTemplateFunction(template.children, template.variables, this._ngContentReservedSlots.length + this._ngContentSelectorsOffset, template.i18n);\n this.constantPool.statements.push(templateFunctionExpr.toDeclStmt(templateName));\n if (templateVisitor._ngContentReservedSlots.length) {\n this._ngContentReservedSlots.push(...templateVisitor._ngContentReservedSlots);\n }\n });\n // e.g. template(1, MyComp_Template_1)\n this.creationInstruction(template.sourceSpan, Identifiers.templateCreate, () => {\n parameters.splice(2, 0, literal(templateVisitor.getConstCount()), literal(templateVisitor.getVarCount()));\n return trimTrailingNulls(parameters);\n });\n // handle property bindings e.g. ɵɵproperty('ngForOf', ctx.items), et al;\n this.templatePropertyBindings(templateIndex, template.templateAttrs);\n // Only add normal input/output binding instructions on explicit <ng-template> elements.\n if (tagNameWithoutNamespace === NG_TEMPLATE_TAG_NAME) {\n const [i18nInputs, inputs] = partitionArray(template.inputs, hasI18nMeta);\n // Add i18n attributes that may act as inputs to directives. If such attributes are present,\n // generate `i18nAttributes` instruction. Note: we generate it only for explicit <ng-template>\n // elements, in case of inline templates, corresponding instructions will be generated in the\n // nested template function.\n if (i18nInputs.length > 0) {\n this.i18nAttributesInstruction(templateIndex, i18nInputs, template.startSourceSpan ?? template.sourceSpan);\n }\n // Add the input bindings\n if (inputs.length > 0) {\n this.templatePropertyBindings(templateIndex, inputs);\n }\n // Generate listeners for directive output\n for (const outputAst of template.outputs) {\n this.creationInstruction(outputAst.sourceSpan, Identifiers.listener, this.prepareListenerParameter('ng_template', outputAst, templateIndex));\n }\n }\n }\n visitBoundText(text) {\n if (this.i18n) {\n const value = text.value.visit(this._valueConverter);\n this.allocateBindingSlots(value);\n if (value instanceof Interpolation) {\n this.i18n.appendBoundText(text.i18n);\n this.i18nAppendBindings(value.expressions);\n }\n return;\n }\n const nodeIndex = this.allocateDataSlot();\n this.creationInstruction(text.sourceSpan, Identifiers.text, [literal(nodeIndex)]);\n const value = text.value.visit(this._valueConverter);\n this.allocateBindingSlots(value);\n if (value instanceof Interpolation) {\n this.updateInstructionWithAdvance(nodeIndex, text.sourceSpan, getTextInterpolationExpression(value), () => this.getUpdateInstructionArguments(value));\n }\n else {\n error('Text nodes should be interpolated and never bound directly.');\n }\n }\n visitText(text) {\n // when a text element is located within a translatable\n // block, we exclude this text element from instructions set,\n // since it will be captured in i18n content and processed at runtime\n if (!this.i18n) {\n this.creationInstruction(text.sourceSpan, Identifiers.text, [literal(this.allocateDataSlot()), literal(text.value)]);\n }\n }\n visitIcu(icu) {\n let initWasInvoked = false;\n // if an ICU was created outside of i18n block, we still treat\n // it as a translatable entity and invoke i18nStart and i18nEnd\n // to generate i18n context and the necessary instructions\n if (!this.i18n) {\n initWasInvoked = true;\n this.i18nStart(null, icu.i18n, true);\n }\n const i18n = this.i18n;\n const vars = this.i18nBindProps(icu.vars);\n const placeholders = this.i18nBindProps(icu.placeholders);\n // output ICU directly and keep ICU reference in context\n const message = icu.i18n;\n // we always need post-processing function for ICUs, to make sure that:\n // - all placeholders in a form of {PLACEHOLDER} are replaced with actual values (note:\n // `goog.getMsg` does not process ICUs and uses the `{PLACEHOLDER}` format for placeholders\n // inside ICUs)\n // - all ICU vars (such as `VAR_SELECT` or `VAR_PLURAL`) are replaced with correct values\n const transformFn = (raw) => {\n const params = { ...vars, ...placeholders };\n const formatted = formatI18nPlaceholderNamesInMap(params, /* useCamelCase */ false);\n return invokeInstruction(null, Identifiers.i18nPostprocess, [raw, mapLiteral(formatted, true)]);\n };\n // in case the whole i18n message is a single ICU - we do not need to\n // create a separate top-level translation, we can use the root ref instead\n // and make this ICU a top-level translation\n // note: ICU placeholders are replaced with actual values in `i18nPostprocess` function\n // separately, so we do not pass placeholders into `i18nTranslate` function.\n if (isSingleI18nIcu(i18n.meta)) {\n this.i18nTranslate(message, /* placeholders */ {}, i18n.ref, transformFn);\n }\n else {\n // output ICU directly and keep ICU reference in context\n const ref = this.i18nTranslate(message, /* placeholders */ {}, /* ref */ undefined, transformFn);\n i18n.appendIcu(icuFromI18nMessage(message).name, ref);\n }\n if (initWasInvoked) {\n this.i18nEnd(null, true);\n }\n return null;\n }\n allocateDataSlot() {\n return this._dataIndex++;\n }\n getConstCount() {\n return this._dataIndex;\n }\n getVarCount() {\n return this._pureFunctionSlots;\n }\n getConsts() {\n return this._constants;\n }\n getNgContentSelectors() {\n return this._ngContentReservedSlots.length ?\n this.constantPool.getConstLiteral(asLiteral(this._ngContentReservedSlots), true) :\n null;\n }\n bindingContext() {\n return `${this._bindingContext++}`;\n }\n templatePropertyBindings(templateIndex, attrs) {\n const propertyBindings = [];\n for (const input of attrs) {\n if (!(input instanceof BoundAttribute)) {\n continue;\n }\n const value = input.value.visit(this._valueConverter);\n if (value === undefined) {\n continue;\n }\n this.allocateBindingSlots(value);\n if (value instanceof Interpolation) {\n // Params typically contain attribute namespace and value sanitizer, which is applicable\n // for regular HTML elements, but not applicable for <ng-template> (since props act as\n // inputs to directives), so keep params array empty.\n const params = [];\n // prop=\"{{value}}\" case\n this.interpolatedUpdateInstruction(getPropertyInterpolationExpression(value), templateIndex, input.name, input, value, params);\n }\n else {\n // [prop]=\"value\" case\n propertyBindings.push({\n span: input.sourceSpan,\n paramsOrFn: getBindingFunctionParams(() => this.convertPropertyBinding(value), input.name)\n });\n }\n }\n for (const propertyBinding of propertyBindings) {\n this.updateInstructionWithAdvance(templateIndex, propertyBinding.span, Identifiers.property, propertyBinding.paramsOrFn);\n }\n }\n // Bindings must only be resolved after all local refs have been visited, so all\n // instructions are queued in callbacks that execute once the initial pass has completed.\n // Otherwise, we wouldn't be able to support local refs that are defined after their\n // bindings. e.g. {{ foo }} <div #foo></div>\n instructionFn(fns, span, reference, paramsOrFn, prepend = false) {\n fns[prepend ? 'unshift' : 'push']({ span, reference, paramsOrFn });\n }\n processStylingUpdateInstruction(elementIndex, instruction) {\n let allocateBindingSlots = 0;\n if (instruction) {\n for (const call of instruction.calls) {\n allocateBindingSlots += call.allocateBindingSlots;\n this.updateInstructionWithAdvance(elementIndex, call.sourceSpan, instruction.reference, () => call.params(value => (call.supportsInterpolation && value instanceof Interpolation) ?\n this.getUpdateInstructionArguments(value) :\n this.convertPropertyBinding(value)));\n }\n }\n return allocateBindingSlots;\n }\n creationInstruction(span, reference, paramsOrFn, prepend) {\n this.instructionFn(this._creationCodeFns, span, reference, paramsOrFn || [], prepend);\n }\n updateInstructionWithAdvance(nodeIndex, span, reference, paramsOrFn) {\n this.addAdvanceInstructionIfNecessary(nodeIndex, span);\n this.updateInstruction(span, reference, paramsOrFn);\n }\n updateInstruction(span, reference, paramsOrFn) {\n this.instructionFn(this._updateCodeFns, span, reference, paramsOrFn || []);\n }\n addAdvanceInstructionIfNecessary(nodeIndex, span) {\n if (nodeIndex !== this._currentIndex) {\n const delta = nodeIndex - this._currentIndex;\n if (delta < 1) {\n throw new Error('advance instruction can only go forwards');\n }\n this.instructionFn(this._updateCodeFns, span, Identifiers.advance, [literal(delta)]);\n this._currentIndex = nodeIndex;\n }\n }\n allocatePureFunctionSlots(numSlots) {\n const originalSlots = this._pureFunctionSlots;\n this._pureFunctionSlots += numSlots;\n return originalSlots;\n }\n allocateBindingSlots(value) {\n this._bindingSlots += value instanceof Interpolation ? value.expressions.length : 1;\n }\n /**\n * Gets an expression that refers to the implicit receiver. The implicit\n * receiver is always the root level context.\n */\n getImplicitReceiverExpr() {\n if (this._implicitReceiverExpr) {\n return this._implicitReceiverExpr;\n }\n return this._implicitReceiverExpr = this.level === 0 ?\n variable(CONTEXT_NAME) :\n this._bindingScope.getOrCreateSharedContextVar(0);\n }\n convertPropertyBinding(value) {\n const convertedPropertyBinding = convertPropertyBinding(this, this.getImplicitReceiverExpr(), value, this.bindingContext());\n const valExpr = convertedPropertyBinding.currValExpr;\n this._tempVariables.push(...convertedPropertyBinding.stmts);\n return valExpr;\n }\n /**\n * Gets a list of argument expressions to pass to an update instruction expression. Also updates\n * the temp variables state with temp variables that were identified as needing to be created\n * while visiting the arguments.\n * @param value The original expression we will be resolving an arguments list from.\n */\n getUpdateInstructionArguments(value) {\n const { args, stmts } = convertUpdateArguments(this, this.getImplicitReceiverExpr(), value, this.bindingContext());\n this._tempVariables.push(...stmts);\n return args;\n }\n /**\n * Prepares all attribute expression values for the `TAttributes` array.\n *\n * The purpose of this function is to properly construct an attributes array that\n * is passed into the `elementStart` (or just `element`) functions. Because there\n * are many different types of attributes, the array needs to be constructed in a\n * special way so that `elementStart` can properly evaluate them.\n *\n * The format looks like this:\n *\n * ```\n * attrs = [prop, value, prop2, value2,\n * PROJECT_AS, selector,\n * CLASSES, class1, class2,\n * STYLES, style1, value1, style2, value2,\n * BINDINGS, name1, name2, name3,\n * TEMPLATE, name4, name5, name6,\n * I18N, name7, name8, ...]\n * ```\n *\n * Note that this function will fully ignore all synthetic (@foo) attribute values\n * because those values are intended to always be generated as property instructions.\n */\n getAttributeExpressions(elementName, renderAttributes, inputs, outputs, styles, templateAttrs = [], boundI18nAttrs = []) {\n const alreadySeen = new Set();\n const attrExprs = [];\n let ngProjectAsAttr;\n for (const attr of renderAttributes) {\n if (attr.name === NG_PROJECT_AS_ATTR_NAME) {\n ngProjectAsAttr = attr;\n }\n // Note that static i18n attributes aren't in the i18n array,\n // because they're treated in the same way as regular attributes.\n if (attr.i18n) {\n // When i18n attributes are present on elements with structural directives\n // (e.g. `<div *ngIf title=\"Hello\" i18n-title>`), we want to avoid generating\n // duplicate i18n translation blocks for `ɵɵtemplate` and `ɵɵelement` instruction\n // attributes. So we do a cache lookup to see if suitable i18n translation block\n // already exists.\n const { i18nVarRefsCache } = this._constants;\n let i18nVarRef;\n if (i18nVarRefsCache.has(attr.i18n)) {\n i18nVarRef = i18nVarRefsCache.get(attr.i18n);\n }\n else {\n i18nVarRef = this.i18nTranslate(attr.i18n);\n i18nVarRefsCache.set(attr.i18n, i18nVarRef);\n }\n attrExprs.push(literal(attr.name), i18nVarRef);\n }\n else {\n attrExprs.push(...getAttributeNameLiterals(attr.name), trustedConstAttribute(elementName, attr));\n }\n }\n // Keep ngProjectAs next to the other name, value pairs so we can verify that we match\n // ngProjectAs marker in the attribute name slot.\n if (ngProjectAsAttr) {\n attrExprs.push(...getNgProjectAsLiteral(ngProjectAsAttr));\n }\n function addAttrExpr(key, value) {\n if (typeof key === 'string') {\n if (!alreadySeen.has(key)) {\n attrExprs.push(...getAttributeNameLiterals(key));\n value !== undefined && attrExprs.push(value);\n alreadySeen.add(key);\n }\n }\n else {\n attrExprs.push(literal(key));\n }\n }\n // it's important that this occurs before BINDINGS and TEMPLATE because once `elementStart`\n // comes across the BINDINGS or TEMPLATE markers then it will continue reading each value as\n // as single property value cell by cell.\n if (styles) {\n styles.populateInitialStylingAttrs(attrExprs);\n }\n if (inputs.length || outputs.length) {\n const attrsLengthBeforeInputs = attrExprs.length;\n for (let i = 0; i < inputs.length; i++) {\n const input = inputs[i];\n // We don't want the animation and attribute bindings in the\n // attributes array since they aren't used for directive matching.\n if (input.type !== 4 /* BindingType.Animation */ && input.type !== 1 /* BindingType.Attribute */) {\n addAttrExpr(input.name);\n }\n }\n for (let i = 0; i < outputs.length; i++) {\n const output = outputs[i];\n if (output.type !== 1 /* ParsedEventType.Animation */) {\n addAttrExpr(output.name);\n }\n }\n // this is a cheap way of adding the marker only after all the input/output\n // values have been filtered (by not including the animation ones) and added\n // to the expressions. The marker is important because it tells the runtime\n // code that this is where attributes without values start...\n if (attrExprs.length !== attrsLengthBeforeInputs) {\n attrExprs.splice(attrsLengthBeforeInputs, 0, literal(3 /* core.AttributeMarker.Bindings */));\n }\n }\n if (templateAttrs.length) {\n attrExprs.push(literal(4 /* core.AttributeMarker.Template */));\n templateAttrs.forEach(attr => addAttrExpr(attr.name));\n }\n if (boundI18nAttrs.length) {\n attrExprs.push(literal(6 /* core.AttributeMarker.I18n */));\n boundI18nAttrs.forEach(attr => addAttrExpr(attr.name));\n }\n return attrExprs;\n }\n addToConsts(expression) {\n if (isNull(expression)) {\n return TYPED_NULL_EXPR;\n }\n const consts = this._constants.constExpressions;\n // Try to reuse a literal that's already in the array, if possible.\n for (let i = 0; i < consts.length; i++) {\n if (consts[i].isEquivalent(expression)) {\n return literal(i);\n }\n }\n return literal(consts.push(expression) - 1);\n }\n addAttrsToConsts(attrs) {\n return attrs.length > 0 ? this.addToConsts(literalArr(attrs)) : TYPED_NULL_EXPR;\n }\n prepareRefsArray(references) {\n if (!references || references.length === 0) {\n return TYPED_NULL_EXPR;\n }\n const refsParam = flatten(references.map(reference => {\n const slot = this.allocateDataSlot();\n // Generate the update temporary.\n const variableName = this._bindingScope.freshReferenceName();\n const retrievalLevel = this.level;\n const lhs = variable(variableName);\n this._bindingScope.set(retrievalLevel, reference.name, lhs, 0 /* DeclarationPriority.DEFAULT */, (scope, relativeLevel) => {\n // e.g. nextContext(2);\n const nextContextStmt = relativeLevel > 0 ? [generateNextContextExpr(relativeLevel).toStmt()] : [];\n // e.g. const $foo$ = reference(1);\n const refExpr = lhs.set(importExpr(Identifiers.reference).callFn([literal(slot)]));\n return nextContextStmt.concat(refExpr.toConstDecl());\n }, true);\n return [reference.name, reference.value];\n }));\n return asLiteral(refsParam);\n }\n prepareListenerParameter(tagName, outputAst, index) {\n return () => {\n const eventName = outputAst.name;\n const bindingFnName = outputAst.type === 1 /* ParsedEventType.Animation */ ?\n // synthetic @listener.foo values are treated the exact same as are standard listeners\n prepareSyntheticListenerFunctionName(eventName, outputAst.phase) :\n sanitizeIdentifier(eventName);\n const handlerName = `${this.templateName}_${tagName}_${bindingFnName}_${index}_listener`;\n const scope = this._bindingScope.nestedScope(this._bindingScope.bindingLevel, EVENT_BINDING_SCOPE_GLOBALS);\n return prepareEventListenerParameters(outputAst, handlerName, scope);\n };\n }\n}\nclass ValueConverter extends AstMemoryEfficientTransformer {\n constructor(constantPool, allocateSlot, allocatePureFunctionSlots, definePipe) {\n super();\n this.constantPool = constantPool;\n this.allocateSlot = allocateSlot;\n this.allocatePureFunctionSlots = allocatePureFunctionSlots;\n this.definePipe = definePipe;\n this._pipeBindExprs = [];\n }\n // AstMemoryEfficientTransformer\n visitPipe(pipe, context) {\n // Allocate a slot to create the pipe\n const slot = this.allocateSlot();\n const slotPseudoLocal = `PIPE:${slot}`;\n // Allocate one slot for the result plus one slot per pipe argument\n const pureFunctionSlot = this.allocatePureFunctionSlots(2 + pipe.args.length);\n const target = new PropertyRead(pipe.span, pipe.sourceSpan, pipe.nameSpan, new ImplicitReceiver(pipe.span, pipe.sourceSpan), slotPseudoLocal);\n const { identifier, isVarLength } = pipeBindingCallInfo(pipe.args);\n this.definePipe(pipe.name, slotPseudoLocal, slot, importExpr(identifier));\n const args = [pipe.exp, ...pipe.args];\n const convertedArgs = isVarLength ?\n this.visitAll([new LiteralArray(pipe.span, pipe.sourceSpan, args)]) :\n this.visitAll(args);\n const pipeBindExpr = new Call(pipe.span, pipe.sourceSpan, target, [\n new LiteralPrimitive(pipe.span, pipe.sourceSpan, slot),\n new LiteralPrimitive(pipe.span, pipe.sourceSpan, pureFunctionSlot),\n ...convertedArgs,\n ], null);\n this._pipeBindExprs.push(pipeBindExpr);\n return pipeBindExpr;\n }\n updatePipeSlotOffsets(bindingSlots) {\n this._pipeBindExprs.forEach((pipe) => {\n // update the slot offset arg (index 1) to account for binding slots\n const slotOffset = pipe.args[1];\n slotOffset.value += bindingSlots;\n });\n }\n visitLiteralArray(array, context) {\n return new BuiltinFunctionCall(array.span, array.sourceSpan, this.visitAll(array.expressions), values => {\n // If the literal has calculated (non-literal) elements transform it into\n // calls to literal factories that compose the literal and will cache intermediate\n // values.\n const literal = literalArr(values);\n return getLiteralFactory(this.constantPool, literal, this.allocatePureFunctionSlots);\n });\n }\n visitLiteralMap(map, context) {\n return new BuiltinFunctionCall(map.span, map.sourceSpan, this.visitAll(map.values), values => {\n // If the literal has calculated (non-literal) elements transform it into\n // calls to literal factories that compose the literal and will cache intermediate\n // values.\n const literal = literalMap(values.map((value, index) => ({ key: map.keys[index].key, value, quoted: map.keys[index].quoted })));\n return getLiteralFactory(this.constantPool, literal, this.allocatePureFunctionSlots);\n });\n }\n}\n// Pipes always have at least one parameter, the value they operate on\nconst pipeBindingIdentifiers = [Identifiers.pipeBind1, Identifiers.pipeBind2, Identifiers.pipeBind3, Identifiers.pipeBind4];\nfunction pipeBindingCallInfo(args) {\n const identifier = pipeBindingIdentifiers[args.length];\n return {\n identifier: identifier || Identifiers.pipeBindV,\n isVarLength: !identifier,\n };\n}\nconst pureFunctionIdentifiers = [\n Identifiers.pureFunction0, Identifiers.pureFunction1, Identifiers.pureFunction2, Identifiers.pureFunction3, Identifiers.pureFunction4,\n Identifiers.pureFunction5, Identifiers.pureFunction6, Identifiers.pureFunction7, Identifiers.pureFunction8\n];\nfunction pureFunctionCallInfo(args) {\n const identifier = pureFunctionIdentifiers[args.length];\n return {\n identifier: identifier || Identifiers.pureFunctionV,\n isVarLength: !identifier,\n };\n}\n// e.g. x(2);\nfunction generateNextContextExpr(relativeLevelDiff) {\n return importExpr(Identifiers.nextContext)\n .callFn(relativeLevelDiff > 1 ? [literal(relativeLevelDiff)] : []);\n}\nfunction getLiteralFactory(constantPool, literal$1, allocateSlots) {\n const { literalFactory, literalFactoryArguments } = constantPool.getLiteralFactory(literal$1);\n // Allocate 1 slot for the result plus 1 per argument\n const startSlot = allocateSlots(1 + literalFactoryArguments.length);\n const { identifier, isVarLength } = pureFunctionCallInfo(literalFactoryArguments);\n // Literal factories are pure functions that only need to be re-invoked when the parameters\n // change.\n const args = [literal(startSlot), literalFactory];\n if (isVarLength) {\n args.push(literalArr(literalFactoryArguments));\n }\n else {\n args.push(...literalFactoryArguments);\n }\n return importExpr(identifier).callFn(args);\n}\n/**\n * Gets an array of literals that can be added to an expression\n * to represent the name and namespace of an attribute. E.g.\n * `:xlink:href` turns into `[AttributeMarker.NamespaceURI, 'xlink', 'href']`.\n *\n * @param name Name of the attribute, including the namespace.\n */\nfunction getAttributeNameLiterals(name) {\n const [attributeNamespace, attributeName] = splitNsName(name);\n const nameLiteral = literal(attributeName);\n if (attributeNamespace) {\n return [\n literal(0 /* core.AttributeMarker.NamespaceURI */), literal(attributeNamespace), nameLiteral\n ];\n }\n return [nameLiteral];\n}\n/** The prefix used to get a shared context in BindingScope's map. */\nconst SHARED_CONTEXT_KEY = '$$shared_ctx$$';\nclass BindingScope {\n constructor(bindingLevel = 0, parent = null, globals) {\n this.bindingLevel = bindingLevel;\n this.parent = parent;\n this.globals = globals;\n /** Keeps a map from local variables to their BindingData. */\n this.map = new Map();\n this.referenceNameIndex = 0;\n this.restoreViewVariable = null;\n this.usesRestoredViewContext = false;\n if (globals !== undefined) {\n for (const name of globals) {\n this.set(0, name, variable(name));\n }\n }\n }\n static createRootScope() {\n return new BindingScope();\n }\n get(name) {\n let current = this;\n while (current) {\n let value = current.map.get(name);\n if (value != null) {\n if (current !== this) {\n // make a local copy and reset the `declare` state\n value = {\n retrievalLevel: value.retrievalLevel,\n lhs: value.lhs,\n declareLocalCallback: value.declareLocalCallback,\n declare: false,\n priority: value.priority\n };\n // Cache the value locally.\n this.map.set(name, value);\n // Possibly generate a shared context var\n this.maybeGenerateSharedContextVar(value);\n this.maybeRestoreView();\n }\n if (value.declareLocalCallback && !value.declare) {\n value.declare = true;\n }\n return value.lhs;\n }\n current = current.parent;\n }\n // If we get to this point, we are looking for a property on the top level component\n // - If level === 0, we are on the top and don't need to re-declare `ctx`.\n // - If level > 0, we are in an embedded view. We need to retrieve the name of the\n // local var we used to store the component context, e.g. const $comp$ = x();\n return this.bindingLevel === 0 ? null : this.getComponentProperty(name);\n }\n /**\n * Create a local variable for later reference.\n *\n * @param retrievalLevel The level from which this value can be retrieved\n * @param name Name of the variable.\n * @param lhs AST representing the left hand side of the `let lhs = rhs;`.\n * @param priority The sorting priority of this var\n * @param declareLocalCallback The callback to invoke when declaring this local var\n * @param localRef Whether or not this is a local ref\n */\n set(retrievalLevel, name, lhs, priority = 0 /* DeclarationPriority.DEFAULT */, declareLocalCallback, localRef) {\n if (this.map.has(name)) {\n if (localRef) {\n // Do not throw an error if it's a local ref and do not update existing value,\n // so the first defined ref is always returned.\n return this;\n }\n error(`The name ${name} is already defined in scope to be ${this.map.get(name)}`);\n }\n this.map.set(name, {\n retrievalLevel: retrievalLevel,\n lhs: lhs,\n declare: false,\n declareLocalCallback: declareLocalCallback,\n priority: priority,\n });\n return this;\n }\n // Implemented as part of LocalResolver.\n getLocal(name) {\n return this.get(name);\n }\n // Implemented as part of LocalResolver.\n notifyImplicitReceiverUse() {\n if (this.bindingLevel !== 0) {\n // Since the implicit receiver is accessed in an embedded view, we need to\n // ensure that we declare a shared context variable for the current template\n // in the update variables.\n this.map.get(SHARED_CONTEXT_KEY + 0).declare = true;\n }\n }\n nestedScope(level, globals) {\n const newScope = new BindingScope(level, this, globals);\n if (level > 0)\n newScope.generateSharedContextVar(0);\n return newScope;\n }\n /**\n * Gets or creates a shared context variable and returns its expression. Note that\n * this does not mean that the shared variable will be declared. Variables in the\n * binding scope will be only declared if they are used.\n */\n getOrCreateSharedContextVar(retrievalLevel) {\n const bindingKey = SHARED_CONTEXT_KEY + retrievalLevel;\n if (!this.map.has(bindingKey)) {\n this.generateSharedContextVar(retrievalLevel);\n }\n // Shared context variables are always generated as \"ReadVarExpr\".\n return this.map.get(bindingKey).lhs;\n }\n getSharedContextName(retrievalLevel) {\n const sharedCtxObj = this.map.get(SHARED_CONTEXT_KEY + retrievalLevel);\n // Shared context variables are always generated as \"ReadVarExpr\".\n return sharedCtxObj && sharedCtxObj.declare ? sharedCtxObj.lhs : null;\n }\n maybeGenerateSharedContextVar(value) {\n if (value.priority === 1 /* DeclarationPriority.CONTEXT */ &&\n value.retrievalLevel < this.bindingLevel) {\n const sharedCtxObj = this.map.get(SHARED_CONTEXT_KEY + value.retrievalLevel);\n if (sharedCtxObj) {\n sharedCtxObj.declare = true;\n }\n else {\n this.generateSharedContextVar(value.retrievalLevel);\n }\n }\n }\n generateSharedContextVar(retrievalLevel) {\n const lhs = variable(CONTEXT_NAME + this.freshReferenceName());\n this.map.set(SHARED_CONTEXT_KEY + retrievalLevel, {\n retrievalLevel: retrievalLevel,\n lhs: lhs,\n declareLocalCallback: (scope, relativeLevel) => {\n // const ctx_r0 = nextContext(2);\n return [lhs.set(generateNextContextExpr(relativeLevel)).toConstDecl()];\n },\n declare: false,\n priority: 2 /* DeclarationPriority.SHARED_CONTEXT */,\n });\n }\n getComponentProperty(name) {\n const componentValue = this.map.get(SHARED_CONTEXT_KEY + 0);\n componentValue.declare = true;\n this.maybeRestoreView();\n return componentValue.lhs.prop(name);\n }\n maybeRestoreView() {\n // View restoration is required for listener instructions inside embedded views, because\n // they only run in creation mode and they can have references to the context object.\n // If the context object changes in update mode, the reference will be incorrect, because\n // it was established during creation.\n if (this.isListenerScope()) {\n if (!this.parent.restoreViewVariable) {\n // parent saves variable to generate a shared `const $s$ = getCurrentView();` instruction\n this.parent.restoreViewVariable = variable(this.parent.freshReferenceName());\n }\n this.restoreViewVariable = this.parent.restoreViewVariable;\n }\n }\n restoreViewStatement() {\n if (this.restoreViewVariable) {\n const restoreCall = invokeInstruction(null, Identifiers.restoreView, [this.restoreViewVariable]);\n // Either `const restoredCtx = restoreView($state$);` or `restoreView($state$);`\n // depending on whether it is being used.\n return this.usesRestoredViewContext ?\n variable(RESTORED_VIEW_CONTEXT_NAME).set(restoreCall).toConstDecl() :\n restoreCall.toStmt();\n }\n return null;\n }\n viewSnapshotStatements() {\n // const $state$ = getCurrentView();\n return this.restoreViewVariable ?\n [\n this.restoreViewVariable.set(invokeInstruction(null, Identifiers.getCurrentView, [])).toConstDecl()\n ] :\n [];\n }\n isListenerScope() {\n return this.parent && this.parent.bindingLevel === this.bindingLevel;\n }\n variableDeclarations() {\n let currentContextLevel = 0;\n return Array.from(this.map.values())\n .filter(value => value.declare)\n .sort((a, b) => b.retrievalLevel - a.retrievalLevel || b.priority - a.priority)\n .reduce((stmts, value) => {\n const levelDiff = this.bindingLevel - value.retrievalLevel;\n const currStmts = value.declareLocalCallback(this, levelDiff - currentContextLevel);\n currentContextLevel = levelDiff;\n return stmts.concat(currStmts);\n }, []);\n }\n freshReferenceName() {\n let current = this;\n // Find the top scope as it maintains the global reference count\n while (current.parent)\n current = current.parent;\n const ref = `${REFERENCE_PREFIX}${current.referenceNameIndex++}`;\n return ref;\n }\n hasRestoreViewVariable() {\n return !!this.restoreViewVariable;\n }\n notifyRestoredViewContextUse() {\n this.usesRestoredViewContext = true;\n }\n}\n/**\n * Creates a `CssSelector` given a tag name and a map of attributes\n */\nfunction createCssSelector(elementName, attributes) {\n const cssSelector = new CssSelector();\n const elementNameNoNs = splitNsName(elementName)[1];\n cssSelector.setElement(elementNameNoNs);\n Object.getOwnPropertyNames(attributes).forEach((name) => {\n const nameNoNs = splitNsName(name)[1];\n const value = attributes[name];\n cssSelector.addAttribute(nameNoNs, value);\n if (name.toLowerCase() === 'class') {\n const classes = value.trim().split(/\\s+/);\n classes.forEach(className => cssSelector.addClassName(className));\n }\n });\n return cssSelector;\n}\n/**\n * Creates an array of expressions out of an `ngProjectAs` attributes\n * which can be added to the instruction parameters.\n */\nfunction getNgProjectAsLiteral(attribute) {\n // Parse the attribute value into a CssSelectorList. Note that we only take the\n // first selector, because we don't support multiple selectors in ngProjectAs.\n const parsedR3Selector = parseSelectorToR3Selector(attribute.value)[0];\n return [literal(5 /* core.AttributeMarker.ProjectAs */), asLiteral(parsedR3Selector)];\n}\n/**\n * Gets the instruction to generate for an interpolated property\n * @param interpolation An Interpolation AST\n */\nfunction getPropertyInterpolationExpression(interpolation) {\n switch (getInterpolationArgsLength(interpolation)) {\n case 1:\n return Identifiers.propertyInterpolate;\n case 3:\n return Identifiers.propertyInterpolate1;\n case 5:\n return Identifiers.propertyInterpolate2;\n case 7:\n return Identifiers.propertyInterpolate3;\n case 9:\n return Identifiers.propertyInterpolate4;\n case 11:\n return Identifiers.propertyInterpolate5;\n case 13:\n return Identifiers.propertyInterpolate6;\n case 15:\n return Identifiers.propertyInterpolate7;\n case 17:\n return Identifiers.propertyInterpolate8;\n default:\n return Identifiers.propertyInterpolateV;\n }\n}\n/**\n * Gets the instruction to generate for an interpolated attribute\n * @param interpolation An Interpolation AST\n */\nfunction getAttributeInterpolationExpression(interpolation) {\n switch (getInterpolationArgsLength(interpolation)) {\n case 3:\n return Identifiers.attributeInterpolate1;\n case 5:\n return Identifiers.attributeInterpolate2;\n case 7:\n return Identifiers.attributeInterpolate3;\n case 9:\n return Identifiers.attributeInterpolate4;\n case 11:\n return Identifiers.attributeInterpolate5;\n case 13:\n return Identifiers.attributeInterpolate6;\n case 15:\n return Identifiers.attributeInterpolate7;\n case 17:\n return Identifiers.attributeInterpolate8;\n default:\n return Identifiers.attributeInterpolateV;\n }\n}\n/**\n * Gets the instruction to generate for interpolated text.\n * @param interpolation An Interpolation AST\n */\nfunction getTextInterpolationExpression(interpolation) {\n switch (getInterpolationArgsLength(interpolation)) {\n case 1:\n return Identifiers.textInterpolate;\n case 3:\n return Identifiers.textInterpolate1;\n case 5:\n return Identifiers.textInterpolate2;\n case 7:\n return Identifiers.textInterpolate3;\n case 9:\n return Identifiers.textInterpolate4;\n case 11:\n return Identifiers.textInterpolate5;\n case 13:\n return Identifiers.textInterpolate6;\n case 15:\n return Identifiers.textInterpolate7;\n case 17:\n return Identifiers.textInterpolate8;\n default:\n return Identifiers.textInterpolateV;\n }\n}\n/**\n * Parse a template into render3 `Node`s and additional metadata, with no other dependencies.\n *\n * @param template text of the template to parse\n * @param templateUrl URL to use for source mapping of the parsed template\n * @param options options to modify how the template is parsed\n */\nfunction parseTemplate(template, templateUrl, options = {}) {\n const { interpolationConfig, preserveWhitespaces, enableI18nLegacyMessageIdFormat } = options;\n const bindingParser = makeBindingParser(interpolationConfig);\n const htmlParser = new HtmlParser();\n const parseResult = htmlParser.parse(template, templateUrl, { leadingTriviaChars: LEADING_TRIVIA_CHARS, ...options, tokenizeExpansionForms: true });\n if (!options.alwaysAttemptHtmlToR3AstConversion && parseResult.errors &&\n parseResult.errors.length > 0) {\n const parsedTemplate = {\n interpolationConfig,\n preserveWhitespaces,\n errors: parseResult.errors,\n nodes: [],\n styleUrls: [],\n styles: [],\n ngContentSelectors: []\n };\n if (options.collectCommentNodes) {\n parsedTemplate.commentNodes = [];\n }\n return parsedTemplate;\n }\n let rootNodes = parseResult.rootNodes;\n // process i18n meta information (scan attributes, generate ids)\n // before we run whitespace removal process, because existing i18n\n // extraction process (ng extract-i18n) relies on a raw content to generate\n // message ids\n const i18nMetaVisitor = new I18nMetaVisitor(interpolationConfig, /* keepI18nAttrs */ !preserveWhitespaces, enableI18nLegacyMessageIdFormat);\n const i18nMetaResult = i18nMetaVisitor.visitAllWithErrors(rootNodes);\n if (!options.alwaysAttemptHtmlToR3AstConversion && i18nMetaResult.errors &&\n i18nMetaResult.errors.length > 0) {\n const parsedTemplate = {\n interpolationConfig,\n preserveWhitespaces,\n errors: i18nMetaResult.errors,\n nodes: [],\n styleUrls: [],\n styles: [],\n ngContentSelectors: []\n };\n if (options.collectCommentNodes) {\n parsedTemplate.commentNodes = [];\n }\n return parsedTemplate;\n }\n rootNodes = i18nMetaResult.rootNodes;\n if (!preserveWhitespaces) {\n rootNodes = visitAll(new WhitespaceVisitor(), rootNodes);\n // run i18n meta visitor again in case whitespaces are removed (because that might affect\n // generated i18n message content) and first pass indicated that i18n content is present in a\n // template. During this pass i18n IDs generated at the first pass will be preserved, so we can\n // mimic existing extraction process (ng extract-i18n)\n if (i18nMetaVisitor.hasI18nMeta) {\n rootNodes = visitAll(new I18nMetaVisitor(interpolationConfig, /* keepI18nAttrs */ false), rootNodes);\n }\n }\n const { nodes, errors, styleUrls, styles, ngContentSelectors, commentNodes } = htmlAstToRender3Ast(rootNodes, bindingParser, { collectCommentNodes: !!options.collectCommentNodes });\n errors.push(...parseResult.errors, ...i18nMetaResult.errors);\n const parsedTemplate = {\n interpolationConfig,\n preserveWhitespaces,\n errors: errors.length > 0 ? errors : null,\n nodes,\n styleUrls,\n styles,\n ngContentSelectors\n };\n if (options.collectCommentNodes) {\n parsedTemplate.commentNodes = commentNodes;\n }\n return parsedTemplate;\n}\nconst elementRegistry = new DomElementSchemaRegistry();\n/**\n * Construct a `BindingParser` with a default configuration.\n */\nfunction makeBindingParser(interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {\n return new BindingParser(new Parser$1(new Lexer()), interpolationConfig, elementRegistry, []);\n}\nfunction resolveSanitizationFn(context, isAttribute) {\n switch (context) {\n case SecurityContext.HTML:\n return importExpr(Identifiers.sanitizeHtml);\n case SecurityContext.SCRIPT:\n return importExpr(Identifiers.sanitizeScript);\n case SecurityContext.STYLE:\n // the compiler does not fill in an instruction for [style.prop?] binding\n // values because the style algorithm knows internally what props are subject\n // to sanitization (only [attr.style] values are explicitly sanitized)\n return isAttribute ? importExpr(Identifiers.sanitizeStyle) : null;\n case SecurityContext.URL:\n return importExpr(Identifiers.sanitizeUrl);\n case SecurityContext.RESOURCE_URL:\n return importExpr(Identifiers.sanitizeResourceUrl);\n default:\n return null;\n }\n}\nfunction trustedConstAttribute(tagName, attr) {\n const value = asLiteral(attr.value);\n if (isTrustedTypesSink(tagName, attr.name)) {\n switch (elementRegistry.securityContext(tagName, attr.name, /* isAttribute */ true)) {\n case SecurityContext.HTML:\n return taggedTemplate(importExpr(Identifiers.trustConstantHtml), new TemplateLiteral([new TemplateLiteralElement(attr.value)], []), undefined, attr.valueSpan);\n // NB: no SecurityContext.SCRIPT here, as the corresponding tags are stripped by the compiler.\n case SecurityContext.RESOURCE_URL:\n return taggedTemplate(importExpr(Identifiers.trustConstantResourceUrl), new TemplateLiteral([new TemplateLiteralElement(attr.value)], []), undefined, attr.valueSpan);\n default:\n return value;\n }\n }\n else {\n return value;\n }\n}\nfunction isSingleElementTemplate(children) {\n return children.length === 1 && children[0] instanceof Element$1;\n}\nfunction isTextNode(node) {\n return node instanceof Text$3 || node instanceof BoundText || node instanceof Icu$1;\n}\nfunction hasTextChildrenOnly(children) {\n return children.every(isTextNode);\n}\nfunction getBindingFunctionParams(deferredParams, name, eagerParams) {\n return () => {\n const value = deferredParams();\n const fnParams = Array.isArray(value) ? value : [value];\n if (eagerParams) {\n fnParams.push(...eagerParams);\n }\n if (name) {\n // We want the property name to always be the first function parameter.\n fnParams.unshift(literal(name));\n }\n return fnParams;\n };\n}\n/** Name of the global variable that is used to determine if we use Closure translations or not */\nconst NG_I18N_CLOSURE_MODE = 'ngI18nClosureMode';\n/**\n * Generate statements that define a given translation message.\n *\n * ```\n * var I18N_1;\n * if (typeof ngI18nClosureMode !== undefined && ngI18nClosureMode) {\n * var MSG_EXTERNAL_XXX = goog.getMsg(\n * \"Some message with {$interpolation}!\",\n * { \"interpolation\": \"\\uFFFD0\\uFFFD\" }\n * );\n * I18N_1 = MSG_EXTERNAL_XXX;\n * }\n * else {\n * I18N_1 = $localize`Some message with ${'\\uFFFD0\\uFFFD'}!`;\n * }\n * ```\n *\n * @param message The original i18n AST message node\n * @param variable The variable that will be assigned the translation, e.g. `I18N_1`.\n * @param closureVar The variable for Closure `goog.getMsg` calls, e.g. `MSG_EXTERNAL_XXX`.\n * @param params Object mapping placeholder names to their values (e.g.\n * `{ \"interpolation\": \"\\uFFFD0\\uFFFD\" }`).\n * @param transformFn Optional transformation function that will be applied to the translation (e.g.\n * post-processing).\n * @returns An array of statements that defined a given translation.\n */\nfunction getTranslationDeclStmts(message, variable, closureVar, params = {}, transformFn) {\n const statements = [\n declareI18nVariable(variable),\n ifStmt(createClosureModeGuard(), createGoogleGetMsgStatements(variable, message, closureVar, params), createLocalizeStatements(variable, message, formatI18nPlaceholderNamesInMap(params, /* useCamelCase */ false))),\n ];\n if (transformFn) {\n statements.push(new ExpressionStatement(variable.set(transformFn(variable))));\n }\n return statements;\n}\n/**\n * Create the expression that will be used to guard the closure mode block\n * It is equivalent to:\n *\n * ```\n * typeof ngI18nClosureMode !== undefined && ngI18nClosureMode\n * ```\n */\nfunction createClosureModeGuard() {\n return typeofExpr(variable(NG_I18N_CLOSURE_MODE))\n .notIdentical(literal('undefined', STRING_TYPE))\n .and(variable(NG_I18N_CLOSURE_MODE));\n}\nfunction flatten(list) {\n return list.reduce((flat, item) => {\n const flatItem = Array.isArray(item) ? flatten(item) : item;\n return flat.concat(flatItem);\n }, []);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// This regex matches any binding names that contain the \"attr.\" prefix, e.g. \"attr.required\"\n// If there is a match, the first matching group will contain the attribute name to bind.\nconst ATTR_REGEX = /attr\\.([^\\]]+)/;\nconst COMPONENT_VARIABLE = '%COMP%';\nconst HOST_ATTR = `_nghost-${COMPONENT_VARIABLE}`;\nconst CONTENT_ATTR = `_ngcontent-${COMPONENT_VARIABLE}`;\nfunction baseDirectiveFields(meta, constantPool, bindingParser) {\n const definitionMap = new DefinitionMap();\n const selectors = parseSelectorToR3Selector(meta.selector);\n // e.g. `type: MyDirective`\n definitionMap.set('type', meta.internalType);\n // e.g. `selectors: [['', 'someDir', '']]`\n if (selectors.length > 0) {\n definitionMap.set('selectors', asLiteral(selectors));\n }\n if (meta.queries.length > 0) {\n // e.g. `contentQueries: (rf, ctx, dirIndex) => { ... }\n definitionMap.set('contentQueries', createContentQueriesFunction(meta.queries, constantPool, meta.name));\n }\n if (meta.viewQueries.length) {\n definitionMap.set('viewQuery', createViewQueriesFunction(meta.viewQueries, constantPool, meta.name));\n }\n // e.g. `hostBindings: (rf, ctx) => { ... }\n definitionMap.set('hostBindings', createHostBindingsFunction(meta.host, meta.typeSourceSpan, bindingParser, constantPool, meta.selector || '', meta.name, definitionMap));\n // e.g 'inputs: {a: 'a'}`\n definitionMap.set('inputs', conditionallyCreateMapObjectLiteral(meta.inputs, true));\n // e.g 'outputs: {a: 'a'}`\n definitionMap.set('outputs', conditionallyCreateMapObjectLiteral(meta.outputs));\n if (meta.exportAs !== null) {\n definitionMap.set('exportAs', literalArr(meta.exportAs.map(e => literal(e))));\n }\n if (meta.isStandalone) {\n definitionMap.set('standalone', literal(true));\n }\n return definitionMap;\n}\n/**\n * Add features to the definition map.\n */\nfunction addFeatures(definitionMap, meta) {\n // e.g. `features: [NgOnChangesFeature]`\n const features = [];\n const providers = meta.providers;\n const viewProviders = meta.viewProviders;\n if (providers || viewProviders) {\n const args = [providers || new LiteralArrayExpr([])];\n if (viewProviders) {\n args.push(viewProviders);\n }\n features.push(importExpr(Identifiers.ProvidersFeature).callFn(args));\n }\n if (meta.usesInheritance) {\n features.push(importExpr(Identifiers.InheritDefinitionFeature));\n }\n if (meta.fullInheritance) {\n features.push(importExpr(Identifiers.CopyDefinitionFeature));\n }\n if (meta.lifecycle.usesOnChanges) {\n features.push(importExpr(Identifiers.NgOnChangesFeature));\n }\n // TODO: better way of differentiating component vs directive metadata.\n if (meta.hasOwnProperty('template') && meta.isStandalone) {\n features.push(importExpr(Identifiers.StandaloneFeature));\n }\n if (features.length) {\n definitionMap.set('features', literalArr(features));\n }\n}\n/**\n * Compile a directive for the render3 runtime as defined by the `R3DirectiveMetadata`.\n */\nfunction compileDirectiveFromMetadata(meta, constantPool, bindingParser) {\n const definitionMap = baseDirectiveFields(meta, constantPool, bindingParser);\n addFeatures(definitionMap, meta);\n const expression = importExpr(Identifiers.defineDirective).callFn([definitionMap.toLiteralMap()], undefined, true);\n const type = createDirectiveType(meta);\n return { expression, type, statements: [] };\n}\n/**\n * Compile a component for the render3 runtime as defined by the `R3ComponentMetadata`.\n */\nfunction compileComponentFromMetadata(meta, constantPool, bindingParser) {\n const definitionMap = baseDirectiveFields(meta, constantPool, bindingParser);\n addFeatures(definitionMap, meta);\n const selector = meta.selector && CssSelector.parse(meta.selector);\n const firstSelector = selector && selector[0];\n // e.g. `attr: [\"class\", \".my.app\"]`\n // This is optional an only included if the first selector of a component specifies attributes.\n if (firstSelector) {\n const selectorAttributes = firstSelector.getAttrs();\n if (selectorAttributes.length) {\n definitionMap.set('attrs', constantPool.getConstLiteral(literalArr(selectorAttributes.map(value => value != null ? literal(value) : literal(undefined))), \n /* forceShared */ true));\n }\n }\n // e.g. `template: function MyComponent_Template(_ctx, _cm) {...}`\n const templateTypeName = meta.name;\n const templateName = templateTypeName ? `${templateTypeName}_Template` : null;\n const changeDetection = meta.changeDetection;\n const template = meta.template;\n const templateBuilder = new TemplateDefinitionBuilder(constantPool, BindingScope.createRootScope(), 0, templateTypeName, null, null, templateName, Identifiers.namespaceHTML, meta.relativeContextFilePath, meta.i18nUseExternalIds);\n const templateFunctionExpression = templateBuilder.buildTemplateFunction(template.nodes, []);\n // We need to provide this so that dynamically generated components know what\n // projected content blocks to pass through to the component when it is instantiated.\n const ngContentSelectors = templateBuilder.getNgContentSelectors();\n if (ngContentSelectors) {\n definitionMap.set('ngContentSelectors', ngContentSelectors);\n }\n // e.g. `decls: 2`\n definitionMap.set('decls', literal(templateBuilder.getConstCount()));\n // e.g. `vars: 2`\n definitionMap.set('vars', literal(templateBuilder.getVarCount()));\n // Generate `consts` section of ComponentDef:\n // - either as an array:\n // `consts: [['one', 'two'], ['three', 'four']]`\n // - or as a factory function in case additional statements are present (to support i18n):\n // `consts: function() { var i18n_0; if (ngI18nClosureMode) {...} else {...} return [i18n_0]; }`\n const { constExpressions, prepareStatements } = templateBuilder.getConsts();\n if (constExpressions.length > 0) {\n let constsExpr = literalArr(constExpressions);\n // Prepare statements are present - turn `consts` into a function.\n if (prepareStatements.length > 0) {\n constsExpr = fn([], [...prepareStatements, new ReturnStatement(constsExpr)]);\n }\n definitionMap.set('consts', constsExpr);\n }\n definitionMap.set('template', templateFunctionExpression);\n if (meta.declarations.length > 0) {\n definitionMap.set('dependencies', compileDeclarationList(literalArr(meta.declarations.map(decl => decl.type)), meta.declarationListEmitMode));\n }\n if (meta.encapsulation === null) {\n meta.encapsulation = ViewEncapsulation.Emulated;\n }\n // e.g. `styles: [str1, str2]`\n if (meta.styles && meta.styles.length) {\n const styleValues = meta.encapsulation == ViewEncapsulation.Emulated ?\n compileStyles(meta.styles, CONTENT_ATTR, HOST_ATTR) :\n meta.styles;\n const styleNodes = styleValues.reduce((result, style) => {\n if (style.trim().length > 0) {\n result.push(constantPool.getConstLiteral(literal(style)));\n }\n return result;\n }, []);\n if (styleNodes.length > 0) {\n definitionMap.set('styles', literalArr(styleNodes));\n }\n }\n else if (meta.encapsulation === ViewEncapsulation.Emulated) {\n // If there is no style, don't generate css selectors on elements\n meta.encapsulation = ViewEncapsulation.None;\n }\n // Only set view encapsulation if it's not the default value\n if (meta.encapsulation !== ViewEncapsulation.Emulated) {\n definitionMap.set('encapsulation', literal(meta.encapsulation));\n }\n // e.g. `animation: [trigger('123', [])]`\n if (meta.animations !== null) {\n definitionMap.set('data', literalMap([{ key: 'animation', value: meta.animations, quoted: false }]));\n }\n // Only set the change detection flag if it's defined and it's not the default.\n if (changeDetection != null && changeDetection !== ChangeDetectionStrategy.Default) {\n definitionMap.set('changeDetection', literal(changeDetection));\n }\n const expression = importExpr(Identifiers.defineComponent).callFn([definitionMap.toLiteralMap()], undefined, true);\n const type = createComponentType(meta);\n return { expression, type, statements: [] };\n}\n/**\n * Creates the type specification from the component meta. This type is inserted into .d.ts files\n * to be consumed by upstream compilations.\n */\nfunction createComponentType(meta) {\n const typeParams = createBaseDirectiveTypeParams(meta);\n typeParams.push(stringArrayAsType(meta.template.ngContentSelectors));\n typeParams.push(expressionType(literal(meta.isStandalone)));\n return expressionType(importExpr(Identifiers.ComponentDeclaration, typeParams));\n}\n/**\n * Compiles the array literal of declarations into an expression according to the provided emit\n * mode.\n */\nfunction compileDeclarationList(list, mode) {\n switch (mode) {\n case 0 /* DeclarationListEmitMode.Direct */:\n // directives: [MyDir],\n return list;\n case 1 /* DeclarationListEmitMode.Closure */:\n // directives: function () { return [MyDir]; }\n return fn([], [new ReturnStatement(list)]);\n case 2 /* DeclarationListEmitMode.ClosureResolved */:\n // directives: function () { return [MyDir].map(ng.resolveForwardRef); }\n const resolvedList = list.prop('map').callFn([importExpr(Identifiers.resolveForwardRef)]);\n return fn([], [new ReturnStatement(resolvedList)]);\n }\n}\nfunction prepareQueryParams(query, constantPool) {\n const parameters = [getQueryPredicate(query, constantPool), literal(toQueryFlags(query))];\n if (query.read) {\n parameters.push(query.read);\n }\n return parameters;\n}\n/**\n * Translates query flags into `TQueryFlags` type in packages/core/src/render3/interfaces/query.ts\n * @param query\n */\nfunction toQueryFlags(query) {\n return (query.descendants ? 1 /* QueryFlags.descendants */ : 0 /* QueryFlags.none */) |\n (query.static ? 2 /* QueryFlags.isStatic */ : 0 /* QueryFlags.none */) |\n (query.emitDistinctChangesOnly ? 4 /* QueryFlags.emitDistinctChangesOnly */ : 0 /* QueryFlags.none */);\n}\nfunction convertAttributesToExpressions(attributes) {\n const values = [];\n for (let key of Object.getOwnPropertyNames(attributes)) {\n const value = attributes[key];\n values.push(literal(key), value);\n }\n return values;\n}\n// Define and update any content queries\nfunction createContentQueriesFunction(queries, constantPool, name) {\n const createStatements = [];\n const updateStatements = [];\n const tempAllocator = temporaryAllocator(updateStatements, TEMPORARY_NAME);\n for (const query of queries) {\n // creation, e.g. r3.contentQuery(dirIndex, somePredicate, true, null);\n createStatements.push(importExpr(Identifiers.contentQuery)\n .callFn([variable('dirIndex'), ...prepareQueryParams(query, constantPool)])\n .toStmt());\n // update, e.g. (r3.queryRefresh(tmp = r3.loadQuery()) && (ctx.someDir = tmp));\n const temporary = tempAllocator();\n const getQueryList = importExpr(Identifiers.loadQuery).callFn([]);\n const refresh = importExpr(Identifiers.queryRefresh).callFn([temporary.set(getQueryList)]);\n const updateDirective = variable(CONTEXT_NAME)\n .prop(query.propertyName)\n .set(query.first ? temporary.prop('first') : temporary);\n updateStatements.push(refresh.and(updateDirective).toStmt());\n }\n const contentQueriesFnName = name ? `${name}_ContentQueries` : null;\n return fn([\n new FnParam(RENDER_FLAGS, NUMBER_TYPE), new FnParam(CONTEXT_NAME, null),\n new FnParam('dirIndex', null)\n ], [\n renderFlagCheckIfStmt(1 /* core.RenderFlags.Create */, createStatements),\n renderFlagCheckIfStmt(2 /* core.RenderFlags.Update */, updateStatements)\n ], INFERRED_TYPE, null, contentQueriesFnName);\n}\nfunction stringAsType(str) {\n return expressionType(literal(str));\n}\nfunction stringMapAsType(map) {\n const mapValues = Object.keys(map).map(key => {\n const value = Array.isArray(map[key]) ? map[key][0] : map[key];\n return {\n key,\n value: literal(value),\n quoted: true,\n };\n });\n return expressionType(literalMap(mapValues));\n}\nfunction stringArrayAsType(arr) {\n return arr.length > 0 ? expressionType(literalArr(arr.map(value => literal(value)))) :\n NONE_TYPE;\n}\nfunction createBaseDirectiveTypeParams(meta) {\n // On the type side, remove newlines from the selector as it will need to fit into a TypeScript\n // string literal, which must be on one line.\n const selectorForType = meta.selector !== null ? meta.selector.replace(/\\n/g, '') : null;\n return [\n typeWithParameters(meta.type.type, meta.typeArgumentCount),\n selectorForType !== null ? stringAsType(selectorForType) : NONE_TYPE,\n meta.exportAs !== null ? stringArrayAsType(meta.exportAs) : NONE_TYPE,\n stringMapAsType(meta.inputs),\n stringMapAsType(meta.outputs),\n stringArrayAsType(meta.queries.map(q => q.propertyName)),\n ];\n}\n/**\n * Creates the type specification from the directive meta. This type is inserted into .d.ts files\n * to be consumed by upstream compilations.\n */\nfunction createDirectiveType(meta) {\n const typeParams = createBaseDirectiveTypeParams(meta);\n // Directives have no NgContentSelectors slot, but instead express a `never` type\n // so that future fields align.\n typeParams.push(NONE_TYPE);\n typeParams.push(expressionType(literal(meta.isStandalone)));\n return expressionType(importExpr(Identifiers.DirectiveDeclaration, typeParams));\n}\n// Define and update any view queries\nfunction createViewQueriesFunction(viewQueries, constantPool, name) {\n const createStatements = [];\n const updateStatements = [];\n const tempAllocator = temporaryAllocator(updateStatements, TEMPORARY_NAME);\n viewQueries.forEach((query) => {\n // creation, e.g. r3.viewQuery(somePredicate, true);\n const queryDefinition = importExpr(Identifiers.viewQuery).callFn(prepareQueryParams(query, constantPool));\n createStatements.push(queryDefinition.toStmt());\n // update, e.g. (r3.queryRefresh(tmp = r3.loadQuery()) && (ctx.someDir = tmp));\n const temporary = tempAllocator();\n const getQueryList = importExpr(Identifiers.loadQuery).callFn([]);\n const refresh = importExpr(Identifiers.queryRefresh).callFn([temporary.set(getQueryList)]);\n const updateDirective = variable(CONTEXT_NAME)\n .prop(query.propertyName)\n .set(query.first ? temporary.prop('first') : temporary);\n updateStatements.push(refresh.and(updateDirective).toStmt());\n });\n const viewQueryFnName = name ? `${name}_Query` : null;\n return fn([new FnParam(RENDER_FLAGS, NUMBER_TYPE), new FnParam(CONTEXT_NAME, null)], [\n renderFlagCheckIfStmt(1 /* core.RenderFlags.Create */, createStatements),\n renderFlagCheckIfStmt(2 /* core.RenderFlags.Update */, updateStatements)\n ], INFERRED_TYPE, null, viewQueryFnName);\n}\n// Return a host binding function or null if one is not necessary.\nfunction createHostBindingsFunction(hostBindingsMetadata, typeSourceSpan, bindingParser, constantPool, selector, name, definitionMap) {\n const bindingContext = variable(CONTEXT_NAME);\n const styleBuilder = new StylingBuilder(bindingContext);\n const { styleAttr, classAttr } = hostBindingsMetadata.specialAttributes;\n if (styleAttr !== undefined) {\n styleBuilder.registerStyleAttr(styleAttr);\n }\n if (classAttr !== undefined) {\n styleBuilder.registerClassAttr(classAttr);\n }\n const createInstructions = [];\n const updateInstructions = [];\n const updateVariables = [];\n const hostBindingSourceSpan = typeSourceSpan;\n // Calculate host event bindings\n const eventBindings = bindingParser.createDirectiveHostEventAsts(hostBindingsMetadata.listeners, hostBindingSourceSpan);\n if (eventBindings && eventBindings.length) {\n createInstructions.push(...createHostListeners(eventBindings, name));\n }\n // Calculate the host property bindings\n const bindings = bindingParser.createBoundHostProperties(hostBindingsMetadata.properties, hostBindingSourceSpan);\n const allOtherBindings = [];\n // We need to calculate the total amount of binding slots required by\n // all the instructions together before any value conversions happen.\n // Value conversions may require additional slots for interpolation and\n // bindings with pipes. These calculates happen after this block.\n let totalHostVarsCount = 0;\n bindings && bindings.forEach((binding) => {\n const stylingInputWasSet = styleBuilder.registerInputBasedOnName(binding.name, binding.expression, hostBindingSourceSpan);\n if (stylingInputWasSet) {\n totalHostVarsCount += MIN_STYLING_BINDING_SLOTS_REQUIRED;\n }\n else {\n allOtherBindings.push(binding);\n totalHostVarsCount++;\n }\n });\n let valueConverter;\n const getValueConverter = () => {\n if (!valueConverter) {\n const hostVarsCountFn = (numSlots) => {\n const originalVarsCount = totalHostVarsCount;\n totalHostVarsCount += numSlots;\n return originalVarsCount;\n };\n valueConverter = new ValueConverter(constantPool, () => error('Unexpected node'), // new nodes are illegal here\n hostVarsCountFn, () => error('Unexpected pipe')); // pipes are illegal here\n }\n return valueConverter;\n };\n const propertyBindings = [];\n const attributeBindings = [];\n const syntheticHostBindings = [];\n for (const binding of allOtherBindings) {\n // resolve literal arrays and literal objects\n const value = binding.expression.visit(getValueConverter());\n const bindingExpr = bindingFn(bindingContext, value);\n const { bindingName, instruction, isAttribute } = getBindingNameAndInstruction(binding);\n const securityContexts = bindingParser.calcPossibleSecurityContexts(selector, bindingName, isAttribute)\n .filter(context => context !== SecurityContext.NONE);\n let sanitizerFn = null;\n if (securityContexts.length) {\n if (securityContexts.length === 2 &&\n securityContexts.indexOf(SecurityContext.URL) > -1 &&\n securityContexts.indexOf(SecurityContext.RESOURCE_URL) > -1) {\n // Special case for some URL attributes (such as \"src\" and \"href\") that may be a part\n // of different security contexts. In this case we use special sanitization function and\n // select the actual sanitizer at runtime based on a tag name that is provided while\n // invoking sanitization function.\n sanitizerFn = importExpr(Identifiers.sanitizeUrlOrResourceUrl);\n }\n else {\n sanitizerFn = resolveSanitizationFn(securityContexts[0], isAttribute);\n }\n }\n const instructionParams = [literal(bindingName), bindingExpr.currValExpr];\n if (sanitizerFn) {\n instructionParams.push(sanitizerFn);\n }\n updateVariables.push(...bindingExpr.stmts);\n if (instruction === Identifiers.hostProperty) {\n propertyBindings.push(instructionParams);\n }\n else if (instruction === Identifiers.attribute) {\n attributeBindings.push(instructionParams);\n }\n else if (instruction === Identifiers.syntheticHostProperty) {\n syntheticHostBindings.push(instructionParams);\n }\n else {\n updateInstructions.push({ reference: instruction, paramsOrFn: instructionParams, span: null });\n }\n }\n for (const bindingParams of propertyBindings) {\n updateInstructions.push({ reference: Identifiers.hostProperty, paramsOrFn: bindingParams, span: null });\n }\n for (const bindingParams of attributeBindings) {\n updateInstructions.push({ reference: Identifiers.attribute, paramsOrFn: bindingParams, span: null });\n }\n for (const bindingParams of syntheticHostBindings) {\n updateInstructions.push({ reference: Identifiers.syntheticHostProperty, paramsOrFn: bindingParams, span: null });\n }\n // since we're dealing with directives/components and both have hostBinding\n // functions, we need to generate a special hostAttrs instruction that deals\n // with both the assignment of styling as well as static attributes to the host\n // element. The instruction below will instruct all initial styling (styling\n // that is inside of a host binding within a directive/component) to be attached\n // to the host element alongside any of the provided host attributes that were\n // collected earlier.\n const hostAttrs = convertAttributesToExpressions(hostBindingsMetadata.attributes);\n styleBuilder.assignHostAttrs(hostAttrs, definitionMap);\n if (styleBuilder.hasBindings) {\n // finally each binding that was registered in the statement above will need to be added to\n // the update block of a component/directive templateFn/hostBindingsFn so that the bindings\n // are evaluated and updated for the element.\n styleBuilder.buildUpdateLevelInstructions(getValueConverter()).forEach(instruction => {\n for (const call of instruction.calls) {\n // we subtract a value of `1` here because the binding slot was already allocated\n // at the top of this method when all the input bindings were counted.\n totalHostVarsCount +=\n Math.max(call.allocateBindingSlots - MIN_STYLING_BINDING_SLOTS_REQUIRED, 0);\n updateInstructions.push({\n reference: instruction.reference,\n paramsOrFn: convertStylingCall(call, bindingContext, bindingFn),\n span: null\n });\n }\n });\n }\n if (totalHostVarsCount) {\n definitionMap.set('hostVars', literal(totalHostVarsCount));\n }\n if (createInstructions.length > 0 || updateInstructions.length > 0) {\n const hostBindingsFnName = name ? `${name}_HostBindings` : null;\n const statements = [];\n if (createInstructions.length > 0) {\n statements.push(renderFlagCheckIfStmt(1 /* core.RenderFlags.Create */, getInstructionStatements(createInstructions)));\n }\n if (updateInstructions.length > 0) {\n statements.push(renderFlagCheckIfStmt(2 /* core.RenderFlags.Update */, updateVariables.concat(getInstructionStatements(updateInstructions))));\n }\n return fn([new FnParam(RENDER_FLAGS, NUMBER_TYPE), new FnParam(CONTEXT_NAME, null)], statements, INFERRED_TYPE, null, hostBindingsFnName);\n }\n return null;\n}\nfunction bindingFn(implicit, value) {\n return convertPropertyBinding(null, implicit, value, 'b');\n}\nfunction convertStylingCall(call, bindingContext, bindingFn) {\n return call.params(value => bindingFn(bindingContext, value).currValExpr);\n}\nfunction getBindingNameAndInstruction(binding) {\n let bindingName = binding.name;\n let instruction;\n // Check to see if this is an attr binding or a property binding\n const attrMatches = bindingName.match(ATTR_REGEX);\n if (attrMatches) {\n bindingName = attrMatches[1];\n instruction = Identifiers.attribute;\n }\n else {\n if (binding.isAnimation) {\n bindingName = prepareSyntheticPropertyName(bindingName);\n // host bindings that have a synthetic property (e.g. @foo) should always be rendered\n // in the context of the component and not the parent. Therefore there is a special\n // compatibility instruction available for this purpose.\n instruction = Identifiers.syntheticHostProperty;\n }\n else {\n instruction = Identifiers.hostProperty;\n }\n }\n return { bindingName, instruction, isAttribute: !!attrMatches };\n}\nfunction createHostListeners(eventBindings, name) {\n const listenerParams = [];\n const syntheticListenerParams = [];\n const instructions = [];\n for (const binding of eventBindings) {\n let bindingName = binding.name && sanitizeIdentifier(binding.name);\n const bindingFnName = binding.type === 1 /* ParsedEventType.Animation */ ?\n prepareSyntheticListenerFunctionName(bindingName, binding.targetOrPhase) :\n bindingName;\n const handlerName = name && bindingName ? `${name}_${bindingFnName}_HostBindingHandler` : null;\n const params = prepareEventListenerParameters(BoundEvent.fromParsedEvent(binding), handlerName);\n if (binding.type == 1 /* ParsedEventType.Animation */) {\n syntheticListenerParams.push(params);\n }\n else {\n listenerParams.push(params);\n }\n }\n for (const params of syntheticListenerParams) {\n instructions.push({ reference: Identifiers.syntheticHostListener, paramsOrFn: params, span: null });\n }\n for (const params of listenerParams) {\n instructions.push({ reference: Identifiers.listener, paramsOrFn: params, span: null });\n }\n return instructions;\n}\nconst HOST_REG_EXP = /^(?:\\[([^\\]]+)\\])|(?:\\(([^\\)]+)\\))$/;\nfunction parseHostBindings(host) {\n const attributes = {};\n const listeners = {};\n const properties = {};\n const specialAttributes = {};\n for (const key of Object.keys(host)) {\n const value = host[key];\n const matches = key.match(HOST_REG_EXP);\n if (matches === null) {\n switch (key) {\n case 'class':\n if (typeof value !== 'string') {\n // TODO(alxhub): make this a diagnostic.\n throw new Error(`Class binding must be string`);\n }\n specialAttributes.classAttr = value;\n break;\n case 'style':\n if (typeof value !== 'string') {\n // TODO(alxhub): make this a diagnostic.\n throw new Error(`Style binding must be string`);\n }\n specialAttributes.styleAttr = value;\n break;\n default:\n if (typeof value === 'string') {\n attributes[key] = literal(value);\n }\n else {\n attributes[key] = value;\n }\n }\n }\n else if (matches[1 /* HostBindingGroup.Binding */] != null) {\n if (typeof value !== 'string') {\n // TODO(alxhub): make this a diagnostic.\n throw new Error(`Property binding must be string`);\n }\n // synthetic properties (the ones that have a `@` as a prefix)\n // are still treated the same as regular properties. Therefore\n // there is no point in storing them in a separate map.\n properties[matches[1 /* HostBindingGroup.Binding */]] = value;\n }\n else if (matches[2 /* HostBindingGroup.Event */] != null) {\n if (typeof value !== 'string') {\n // TODO(alxhub): make this a diagnostic.\n throw new Error(`Event binding must be string`);\n }\n listeners[matches[2 /* HostBindingGroup.Event */]] = value;\n }\n }\n return { attributes, listeners, properties, specialAttributes };\n}\n/**\n * Verifies host bindings and returns the list of errors (if any). Empty array indicates that a\n * given set of host bindings has no errors.\n *\n * @param bindings set of host bindings to verify.\n * @param sourceSpan source span where host bindings were defined.\n * @returns array of errors associated with a given set of host bindings.\n */\nfunction verifyHostBindings(bindings, sourceSpan) {\n // TODO: abstract out host bindings verification logic and use it instead of\n // creating events and properties ASTs to detect errors (FW-996)\n const bindingParser = makeBindingParser();\n bindingParser.createDirectiveHostEventAsts(bindings.listeners, sourceSpan);\n bindingParser.createBoundHostProperties(bindings.properties, sourceSpan);\n return bindingParser.errors;\n}\nfunction compileStyles(styles, selector, hostSelector) {\n const shadowCss = new ShadowCss();\n return styles.map(style => {\n return shadowCss.shimCssText(style, selector, hostSelector);\n });\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * An interface for retrieving documents by URL that the compiler uses to\n * load templates.\n *\n * This is an abstract class, rather than an interface, so that it can be used\n * as injection token.\n */\nclass ResourceLoader {\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass CompilerFacadeImpl {\n constructor(jitEvaluator = new JitEvaluator()) {\n this.jitEvaluator = jitEvaluator;\n this.FactoryTarget = FactoryTarget$1;\n this.ResourceLoader = ResourceLoader;\n this.elementSchemaRegistry = new DomElementSchemaRegistry();\n }\n compilePipe(angularCoreEnv, sourceMapUrl, facade) {\n const metadata = {\n name: facade.name,\n type: wrapReference(facade.type),\n internalType: new WrappedNodeExpr(facade.type),\n typeArgumentCount: 0,\n deps: null,\n pipeName: facade.pipeName,\n pure: facade.pure,\n isStandalone: facade.isStandalone,\n };\n const res = compilePipeFromMetadata(metadata);\n return this.jitExpression(res.expression, angularCoreEnv, sourceMapUrl, []);\n }\n compilePipeDeclaration(angularCoreEnv, sourceMapUrl, declaration) {\n const meta = convertDeclarePipeFacadeToMetadata(declaration);\n const res = compilePipeFromMetadata(meta);\n return this.jitExpression(res.expression, angularCoreEnv, sourceMapUrl, []);\n }\n compileInjectable(angularCoreEnv, sourceMapUrl, facade) {\n const { expression, statements } = compileInjectable({\n name: facade.name,\n type: wrapReference(facade.type),\n internalType: new WrappedNodeExpr(facade.type),\n typeArgumentCount: facade.typeArgumentCount,\n providedIn: computeProvidedIn(facade.providedIn),\n useClass: convertToProviderExpression(facade, 'useClass'),\n useFactory: wrapExpression(facade, 'useFactory'),\n useValue: convertToProviderExpression(facade, 'useValue'),\n useExisting: convertToProviderExpression(facade, 'useExisting'),\n deps: facade.deps?.map(convertR3DependencyMetadata),\n }, \n /* resolveForwardRefs */ true);\n return this.jitExpression(expression, angularCoreEnv, sourceMapUrl, statements);\n }\n compileInjectableDeclaration(angularCoreEnv, sourceMapUrl, facade) {\n const { expression, statements } = compileInjectable({\n name: facade.type.name,\n type: wrapReference(facade.type),\n internalType: new WrappedNodeExpr(facade.type),\n typeArgumentCount: 0,\n providedIn: computeProvidedIn(facade.providedIn),\n useClass: convertToProviderExpression(facade, 'useClass'),\n useFactory: wrapExpression(facade, 'useFactory'),\n useValue: convertToProviderExpression(facade, 'useValue'),\n useExisting: convertToProviderExpression(facade, 'useExisting'),\n deps: facade.deps?.map(convertR3DeclareDependencyMetadata),\n }, \n /* resolveForwardRefs */ true);\n return this.jitExpression(expression, angularCoreEnv, sourceMapUrl, statements);\n }\n compileInjector(angularCoreEnv, sourceMapUrl, facade) {\n const meta = {\n name: facade.name,\n type: wrapReference(facade.type),\n internalType: new WrappedNodeExpr(facade.type),\n providers: facade.providers && facade.providers.length > 0 ?\n new WrappedNodeExpr(facade.providers) :\n null,\n imports: facade.imports.map(i => new WrappedNodeExpr(i)),\n };\n const res = compileInjector(meta);\n return this.jitExpression(res.expression, angularCoreEnv, sourceMapUrl, []);\n }\n compileInjectorDeclaration(angularCoreEnv, sourceMapUrl, declaration) {\n const meta = convertDeclareInjectorFacadeToMetadata(declaration);\n const res = compileInjector(meta);\n return this.jitExpression(res.expression, angularCoreEnv, sourceMapUrl, []);\n }\n compileNgModule(angularCoreEnv, sourceMapUrl, facade) {\n const meta = {\n type: wrapReference(facade.type),\n internalType: new WrappedNodeExpr(facade.type),\n adjacentType: new WrappedNodeExpr(facade.type),\n bootstrap: facade.bootstrap.map(wrapReference),\n declarations: facade.declarations.map(wrapReference),\n publicDeclarationTypes: null,\n imports: facade.imports.map(wrapReference),\n includeImportTypes: true,\n exports: facade.exports.map(wrapReference),\n selectorScopeMode: R3SelectorScopeMode.Inline,\n containsForwardDecls: false,\n schemas: facade.schemas ? facade.schemas.map(wrapReference) : null,\n id: facade.id ? new WrappedNodeExpr(facade.id) : null,\n };\n const res = compileNgModule(meta);\n return this.jitExpression(res.expression, angularCoreEnv, sourceMapUrl, []);\n }\n compileNgModuleDeclaration(angularCoreEnv, sourceMapUrl, declaration) {\n const expression = compileNgModuleDeclarationExpression(declaration);\n return this.jitExpression(expression, angularCoreEnv, sourceMapUrl, []);\n }\n compileDirective(angularCoreEnv, sourceMapUrl, facade) {\n const meta = convertDirectiveFacadeToMetadata(facade);\n return this.compileDirectiveFromMeta(angularCoreEnv, sourceMapUrl, meta);\n }\n compileDirectiveDeclaration(angularCoreEnv, sourceMapUrl, declaration) {\n const typeSourceSpan = this.createParseSourceSpan('Directive', declaration.type.name, sourceMapUrl);\n const meta = convertDeclareDirectiveFacadeToMetadata(declaration, typeSourceSpan);\n return this.compileDirectiveFromMeta(angularCoreEnv, sourceMapUrl, meta);\n }\n compileDirectiveFromMeta(angularCoreEnv, sourceMapUrl, meta) {\n const constantPool = new ConstantPool();\n const bindingParser = makeBindingParser();\n const res = compileDirectiveFromMetadata(meta, constantPool, bindingParser);\n return this.jitExpression(res.expression, angularCoreEnv, sourceMapUrl, constantPool.statements);\n }\n compileComponent(angularCoreEnv, sourceMapUrl, facade) {\n // Parse the template and check for errors.\n const { template, interpolation } = parseJitTemplate(facade.template, facade.name, sourceMapUrl, facade.preserveWhitespaces, facade.interpolation);\n // Compile the component metadata, including template, into an expression.\n const meta = {\n ...facade,\n ...convertDirectiveFacadeToMetadata(facade),\n selector: facade.selector || this.elementSchemaRegistry.getDefaultComponentElementName(),\n template,\n declarations: facade.declarations.map(convertDeclarationFacadeToMetadata),\n declarationListEmitMode: 0 /* DeclarationListEmitMode.Direct */,\n styles: [...facade.styles, ...template.styles],\n encapsulation: facade.encapsulation,\n interpolation,\n changeDetection: facade.changeDetection,\n animations: facade.animations != null ? new WrappedNodeExpr(facade.animations) : null,\n viewProviders: facade.viewProviders != null ? new WrappedNodeExpr(facade.viewProviders) :\n null,\n relativeContextFilePath: '',\n i18nUseExternalIds: true,\n };\n const jitExpressionSourceMap = `ng:///${facade.name}.js`;\n return this.compileComponentFromMeta(angularCoreEnv, jitExpressionSourceMap, meta);\n }\n compileComponentDeclaration(angularCoreEnv, sourceMapUrl, declaration) {\n const typeSourceSpan = this.createParseSourceSpan('Component', declaration.type.name, sourceMapUrl);\n const meta = convertDeclareComponentFacadeToMetadata(declaration, typeSourceSpan, sourceMapUrl);\n return this.compileComponentFromMeta(angularCoreEnv, sourceMapUrl, meta);\n }\n compileComponentFromMeta(angularCoreEnv, sourceMapUrl, meta) {\n const constantPool = new ConstantPool();\n const bindingParser = makeBindingParser(meta.interpolation);\n const res = compileComponentFromMetadata(meta, constantPool, bindingParser);\n return this.jitExpression(res.expression, angularCoreEnv, sourceMapUrl, constantPool.statements);\n }\n compileFactory(angularCoreEnv, sourceMapUrl, meta) {\n const factoryRes = compileFactoryFunction({\n name: meta.name,\n type: wrapReference(meta.type),\n internalType: new WrappedNodeExpr(meta.type),\n typeArgumentCount: meta.typeArgumentCount,\n deps: convertR3DependencyMetadataArray(meta.deps),\n target: meta.target,\n });\n return this.jitExpression(factoryRes.expression, angularCoreEnv, sourceMapUrl, factoryRes.statements);\n }\n compileFactoryDeclaration(angularCoreEnv, sourceMapUrl, meta) {\n const factoryRes = compileFactoryFunction({\n name: meta.type.name,\n type: wrapReference(meta.type),\n internalType: new WrappedNodeExpr(meta.type),\n typeArgumentCount: 0,\n deps: Array.isArray(meta.deps) ? meta.deps.map(convertR3DeclareDependencyMetadata) :\n meta.deps,\n target: meta.target,\n });\n return this.jitExpression(factoryRes.expression, angularCoreEnv, sourceMapUrl, factoryRes.statements);\n }\n createParseSourceSpan(kind, typeName, sourceUrl) {\n return r3JitTypeSourceSpan(kind, typeName, sourceUrl);\n }\n /**\n * JIT compiles an expression and returns the result of executing that expression.\n *\n * @param def the definition which will be compiled and executed to get the value to patch\n * @param context an object map of @angular/core symbol names to symbols which will be available\n * in the context of the compiled expression\n * @param sourceUrl a URL to use for the source map of the compiled expression\n * @param preStatements a collection of statements that should be evaluated before the expression.\n */\n jitExpression(def, context, sourceUrl, preStatements) {\n // The ConstantPool may contain Statements which declare variables used in the final expression.\n // Therefore, its statements need to precede the actual JIT operation. The final statement is a\n // declaration of $def which is set to the expression being compiled.\n const statements = [\n ...preStatements,\n new DeclareVarStmt('$def', def, undefined, StmtModifier.Exported),\n ];\n const res = this.jitEvaluator.evaluateStatements(sourceUrl, statements, new R3JitReflector(context), /* enableSourceMaps */ true);\n return res['$def'];\n }\n}\nfunction convertToR3QueryMetadata(facade) {\n return {\n ...facade,\n predicate: convertQueryPredicate(facade.predicate),\n read: facade.read ? new WrappedNodeExpr(facade.read) : null,\n static: facade.static,\n emitDistinctChangesOnly: facade.emitDistinctChangesOnly,\n };\n}\nfunction convertQueryDeclarationToMetadata(declaration) {\n return {\n propertyName: declaration.propertyName,\n first: declaration.first ?? false,\n predicate: convertQueryPredicate(declaration.predicate),\n descendants: declaration.descendants ?? false,\n read: declaration.read ? new WrappedNodeExpr(declaration.read) : null,\n static: declaration.static ?? false,\n emitDistinctChangesOnly: declaration.emitDistinctChangesOnly ?? true,\n };\n}\nfunction convertQueryPredicate(predicate) {\n return Array.isArray(predicate) ?\n // The predicate is an array of strings so pass it through.\n predicate :\n // The predicate is a type - assume that we will need to unwrap any `forwardRef()` calls.\n createMayBeForwardRefExpression(new WrappedNodeExpr(predicate), 1 /* ForwardRefHandling.Wrapped */);\n}\nfunction convertDirectiveFacadeToMetadata(facade) {\n const inputsFromMetadata = parseInputOutputs(facade.inputs || []);\n const outputsFromMetadata = parseInputOutputs(facade.outputs || []);\n const propMetadata = facade.propMetadata;\n const inputsFromType = {};\n const outputsFromType = {};\n for (const field in propMetadata) {\n if (propMetadata.hasOwnProperty(field)) {\n propMetadata[field].forEach(ann => {\n if (isInput(ann)) {\n inputsFromType[field] =\n ann.bindingPropertyName ? [ann.bindingPropertyName, field] : field;\n }\n else if (isOutput(ann)) {\n outputsFromType[field] = ann.bindingPropertyName || field;\n }\n });\n }\n }\n return {\n ...facade,\n typeArgumentCount: 0,\n typeSourceSpan: facade.typeSourceSpan,\n type: wrapReference(facade.type),\n internalType: new WrappedNodeExpr(facade.type),\n deps: null,\n host: extractHostBindings(facade.propMetadata, facade.typeSourceSpan, facade.host),\n inputs: { ...inputsFromMetadata, ...inputsFromType },\n outputs: { ...outputsFromMetadata, ...outputsFromType },\n queries: facade.queries.map(convertToR3QueryMetadata),\n providers: facade.providers != null ? new WrappedNodeExpr(facade.providers) : null,\n viewQueries: facade.viewQueries.map(convertToR3QueryMetadata),\n fullInheritance: false,\n };\n}\nfunction convertDeclareDirectiveFacadeToMetadata(declaration, typeSourceSpan) {\n return {\n name: declaration.type.name,\n type: wrapReference(declaration.type),\n typeSourceSpan,\n internalType: new WrappedNodeExpr(declaration.type),\n selector: declaration.selector ?? null,\n inputs: declaration.inputs ?? {},\n outputs: declaration.outputs ?? {},\n host: convertHostDeclarationToMetadata(declaration.host),\n queries: (declaration.queries ?? []).map(convertQueryDeclarationToMetadata),\n viewQueries: (declaration.viewQueries ?? []).map(convertQueryDeclarationToMetadata),\n providers: declaration.providers !== undefined ? new WrappedNodeExpr(declaration.providers) :\n null,\n exportAs: declaration.exportAs ?? null,\n usesInheritance: declaration.usesInheritance ?? false,\n lifecycle: { usesOnChanges: declaration.usesOnChanges ?? false },\n deps: null,\n typeArgumentCount: 0,\n fullInheritance: false,\n isStandalone: declaration.isStandalone ?? false,\n };\n}\nfunction convertHostDeclarationToMetadata(host = {}) {\n return {\n attributes: convertOpaqueValuesToExpressions(host.attributes ?? {}),\n listeners: host.listeners ?? {},\n properties: host.properties ?? {},\n specialAttributes: {\n classAttr: host.classAttribute,\n styleAttr: host.styleAttribute,\n },\n };\n}\nfunction convertOpaqueValuesToExpressions(obj) {\n const result = {};\n for (const key of Object.keys(obj)) {\n result[key] = new WrappedNodeExpr(obj[key]);\n }\n return result;\n}\nfunction convertDeclareComponentFacadeToMetadata(decl, typeSourceSpan, sourceMapUrl) {\n const { template, interpolation } = parseJitTemplate(decl.template, decl.type.name, sourceMapUrl, decl.preserveWhitespaces ?? false, decl.interpolation);\n const declarations = [];\n if (decl.dependencies) {\n for (const innerDep of decl.dependencies) {\n switch (innerDep.kind) {\n case 'directive':\n case 'component':\n declarations.push(convertDirectiveDeclarationToMetadata(innerDep));\n break;\n case 'pipe':\n declarations.push(convertPipeDeclarationToMetadata(innerDep));\n break;\n }\n }\n }\n else if (decl.components || decl.directives || decl.pipes) {\n // Existing declarations on NPM may not be using the new `dependencies` merged field, and may\n // have separate fields for dependencies instead. Unify them for JIT compilation.\n decl.components &&\n declarations.push(...decl.components.map(dir => convertDirectiveDeclarationToMetadata(dir, /* isComponent */ true)));\n decl.directives &&\n declarations.push(...decl.directives.map(dir => convertDirectiveDeclarationToMetadata(dir)));\n decl.pipes && declarations.push(...convertPipeMapToMetadata(decl.pipes));\n }\n return {\n ...convertDeclareDirectiveFacadeToMetadata(decl, typeSourceSpan),\n template,\n styles: decl.styles ?? [],\n declarations,\n viewProviders: decl.viewProviders !== undefined ? new WrappedNodeExpr(decl.viewProviders) :\n null,\n animations: decl.animations !== undefined ? new WrappedNodeExpr(decl.animations) : null,\n changeDetection: decl.changeDetection ?? ChangeDetectionStrategy.Default,\n encapsulation: decl.encapsulation ?? ViewEncapsulation.Emulated,\n interpolation,\n declarationListEmitMode: 2 /* DeclarationListEmitMode.ClosureResolved */,\n relativeContextFilePath: '',\n i18nUseExternalIds: true,\n };\n}\nfunction convertDeclarationFacadeToMetadata(declaration) {\n return {\n ...declaration,\n type: new WrappedNodeExpr(declaration.type),\n };\n}\nfunction convertDirectiveDeclarationToMetadata(declaration, isComponent = null) {\n return {\n kind: R3TemplateDependencyKind.Directive,\n isComponent: isComponent || declaration.kind === 'component',\n selector: declaration.selector,\n type: new WrappedNodeExpr(declaration.type),\n inputs: declaration.inputs ?? [],\n outputs: declaration.outputs ?? [],\n exportAs: declaration.exportAs ?? null,\n };\n}\nfunction convertPipeMapToMetadata(pipes) {\n if (!pipes) {\n return [];\n }\n return Object.keys(pipes).map(name => {\n return {\n kind: R3TemplateDependencyKind.Pipe,\n name,\n type: new WrappedNodeExpr(pipes[name]),\n };\n });\n}\nfunction convertPipeDeclarationToMetadata(pipe) {\n return {\n kind: R3TemplateDependencyKind.Pipe,\n name: pipe.name,\n type: new WrappedNodeExpr(pipe.type),\n };\n}\nfunction parseJitTemplate(template, typeName, sourceMapUrl, preserveWhitespaces, interpolation) {\n const interpolationConfig = interpolation ? InterpolationConfig.fromArray(interpolation) : DEFAULT_INTERPOLATION_CONFIG;\n // Parse the template and check for errors.\n const parsed = parseTemplate(template, sourceMapUrl, { preserveWhitespaces, interpolationConfig });\n if (parsed.errors !== null) {\n const errors = parsed.errors.map(err => err.toString()).join(', ');\n throw new Error(`Errors during JIT compilation of template for ${typeName}: ${errors}`);\n }\n return { template: parsed, interpolation: interpolationConfig };\n}\n/**\n * Convert the expression, if present to an `R3ProviderExpression`.\n *\n * In JIT mode we do not want the compiler to wrap the expression in a `forwardRef()` call because,\n * if it is referencing a type that has not yet been defined, it will have already been wrapped in\n * a `forwardRef()` - either by the application developer or during partial-compilation. Thus we can\n * use `ForwardRefHandling.None`.\n */\nfunction convertToProviderExpression(obj, property) {\n if (obj.hasOwnProperty(property)) {\n return createMayBeForwardRefExpression(new WrappedNodeExpr(obj[property]), 0 /* ForwardRefHandling.None */);\n }\n else {\n return undefined;\n }\n}\nfunction wrapExpression(obj, property) {\n if (obj.hasOwnProperty(property)) {\n return new WrappedNodeExpr(obj[property]);\n }\n else {\n return undefined;\n }\n}\nfunction computeProvidedIn(providedIn) {\n const expression = typeof providedIn === 'function' ? new WrappedNodeExpr(providedIn) :\n new LiteralExpr(providedIn ?? null);\n // See `convertToProviderExpression()` for why this uses `ForwardRefHandling.None`.\n return createMayBeForwardRefExpression(expression, 0 /* ForwardRefHandling.None */);\n}\nfunction convertR3DependencyMetadataArray(facades) {\n return facades == null ? null : facades.map(convertR3DependencyMetadata);\n}\nfunction convertR3DependencyMetadata(facade) {\n const isAttributeDep = facade.attribute != null; // both `null` and `undefined`\n const rawToken = facade.token === null ? null : new WrappedNodeExpr(facade.token);\n // In JIT mode, if the dep is an `@Attribute()` then we use the attribute name given in\n // `attribute` rather than the `token`.\n const token = isAttributeDep ? new WrappedNodeExpr(facade.attribute) : rawToken;\n return createR3DependencyMetadata(token, isAttributeDep, facade.host, facade.optional, facade.self, facade.skipSelf);\n}\nfunction convertR3DeclareDependencyMetadata(facade) {\n const isAttributeDep = facade.attribute ?? false;\n const token = facade.token === null ? null : new WrappedNodeExpr(facade.token);\n return createR3DependencyMetadata(token, isAttributeDep, facade.host ?? false, facade.optional ?? false, facade.self ?? false, facade.skipSelf ?? false);\n}\nfunction createR3DependencyMetadata(token, isAttributeDep, host, optional, self, skipSelf) {\n // If the dep is an `@Attribute()` the `attributeNameType` ought to be the `unknown` type.\n // But types are not available at runtime so we just use a literal `\"<unknown>\"` string as a dummy\n // marker.\n const attributeNameType = isAttributeDep ? literal('unknown') : null;\n return { token, attributeNameType, host, optional, self, skipSelf };\n}\nfunction extractHostBindings(propMetadata, sourceSpan, host) {\n // First parse the declarations from the metadata.\n const bindings = parseHostBindings(host || {});\n // After that check host bindings for errors\n const errors = verifyHostBindings(bindings, sourceSpan);\n if (errors.length) {\n throw new Error(errors.map((error) => error.msg).join('\\n'));\n }\n // Next, loop over the properties of the object, looking for @HostBinding and @HostListener.\n for (const field in propMetadata) {\n if (propMetadata.hasOwnProperty(field)) {\n propMetadata[field].forEach(ann => {\n if (isHostBinding(ann)) {\n // Since this is a decorator, we know that the value is a class member. Always access it\n // through `this` so that further down the line it can't be confused for a literal value\n // (e.g. if there's a property called `true`).\n bindings.properties[ann.hostPropertyName || field] =\n getSafePropertyAccessString('this', field);\n }\n else if (isHostListener(ann)) {\n bindings.listeners[ann.eventName || field] = `${field}(${(ann.args || []).join(',')})`;\n }\n });\n }\n }\n return bindings;\n}\nfunction isHostBinding(value) {\n return value.ngMetadataName === 'HostBinding';\n}\nfunction isHostListener(value) {\n return value.ngMetadataName === 'HostListener';\n}\nfunction isInput(value) {\n return value.ngMetadataName === 'Input';\n}\nfunction isOutput(value) {\n return value.ngMetadataName === 'Output';\n}\nfunction parseInputOutputs(values) {\n return values.reduce((results, value) => {\n const [field, property] = value.split(':', 2).map(str => str.trim());\n results[field] = property || field;\n return results;\n }, {});\n}\nfunction convertDeclarePipeFacadeToMetadata(declaration) {\n return {\n name: declaration.type.name,\n type: wrapReference(declaration.type),\n internalType: new WrappedNodeExpr(declaration.type),\n typeArgumentCount: 0,\n pipeName: declaration.name,\n deps: null,\n pure: declaration.pure ?? true,\n isStandalone: declaration.isStandalone ?? false,\n };\n}\nfunction convertDeclareInjectorFacadeToMetadata(declaration) {\n return {\n name: declaration.type.name,\n type: wrapReference(declaration.type),\n internalType: new WrappedNodeExpr(declaration.type),\n providers: declaration.providers !== undefined && declaration.providers.length > 0 ?\n new WrappedNodeExpr(declaration.providers) :\n null,\n imports: declaration.imports !== undefined ?\n declaration.imports.map(i => new WrappedNodeExpr(i)) :\n [],\n };\n}\nfunction publishFacade(global) {\n const ng = global.ng || (global.ng = {});\n ng.ɵcompilerFacade = new CompilerFacadeImpl();\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst VERSION = new Version('14.2.0');\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass CompilerConfig {\n constructor({ defaultEncapsulation = ViewEncapsulation.Emulated, useJit = true, jitDevMode = false, missingTranslation = null, preserveWhitespaces, strictInjectionParameters } = {}) {\n this.defaultEncapsulation = defaultEncapsulation;\n this.useJit = !!useJit;\n this.jitDevMode = !!jitDevMode;\n this.missingTranslation = missingTranslation;\n this.preserveWhitespaces = preserveWhitespacesDefault(noUndefined(preserveWhitespaces));\n this.strictInjectionParameters = strictInjectionParameters === true;\n }\n}\nfunction preserveWhitespacesDefault(preserveWhitespacesOption, defaultSetting = false) {\n return preserveWhitespacesOption === null ? defaultSetting : preserveWhitespacesOption;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst _I18N_ATTR = 'i18n';\nconst _I18N_ATTR_PREFIX = 'i18n-';\nconst _I18N_COMMENT_PREFIX_REGEXP = /^i18n:?/;\nconst MEANING_SEPARATOR = '|';\nconst ID_SEPARATOR = '@@';\nlet i18nCommentsWarned = false;\n/**\n * Extract translatable messages from an html AST\n */\nfunction extractMessages(nodes, interpolationConfig, implicitTags, implicitAttrs) {\n const visitor = new _Visitor(implicitTags, implicitAttrs);\n return visitor.extract(nodes, interpolationConfig);\n}\nfunction mergeTranslations(nodes, translations, interpolationConfig, implicitTags, implicitAttrs) {\n const visitor = new _Visitor(implicitTags, implicitAttrs);\n return visitor.merge(nodes, translations, interpolationConfig);\n}\nclass ExtractionResult {\n constructor(messages, errors) {\n this.messages = messages;\n this.errors = errors;\n }\n}\nvar _VisitorMode;\n(function (_VisitorMode) {\n _VisitorMode[_VisitorMode[\"Extract\"] = 0] = \"Extract\";\n _VisitorMode[_VisitorMode[\"Merge\"] = 1] = \"Merge\";\n})(_VisitorMode || (_VisitorMode = {}));\n/**\n * This Visitor is used:\n * 1. to extract all the translatable strings from an html AST (see `extract()`),\n * 2. to replace the translatable strings with the actual translations (see `merge()`)\n *\n * @internal\n */\nclass _Visitor {\n constructor(_implicitTags, _implicitAttrs) {\n this._implicitTags = _implicitTags;\n this._implicitAttrs = _implicitAttrs;\n }\n /**\n * Extracts the messages from the tree\n */\n extract(nodes, interpolationConfig) {\n this._init(_VisitorMode.Extract, interpolationConfig);\n nodes.forEach(node => node.visit(this, null));\n if (this._inI18nBlock) {\n this._reportError(nodes[nodes.length - 1], 'Unclosed block');\n }\n return new ExtractionResult(this._messages, this._errors);\n }\n /**\n * Returns a tree where all translatable nodes are translated\n */\n merge(nodes, translations, interpolationConfig) {\n this._init(_VisitorMode.Merge, interpolationConfig);\n this._translations = translations;\n // Construct a single fake root element\n const wrapper = new Element('wrapper', [], nodes, undefined, undefined, undefined);\n const translatedNode = wrapper.visit(this, null);\n if (this._inI18nBlock) {\n this._reportError(nodes[nodes.length - 1], 'Unclosed block');\n }\n return new ParseTreeResult(translatedNode.children, this._errors);\n }\n visitExpansionCase(icuCase, context) {\n // Parse cases for translatable html attributes\n const expression = visitAll(this, icuCase.expression, context);\n if (this._mode === _VisitorMode.Merge) {\n return new ExpansionCase(icuCase.value, expression, icuCase.sourceSpan, icuCase.valueSourceSpan, icuCase.expSourceSpan);\n }\n }\n visitExpansion(icu, context) {\n this._mayBeAddBlockChildren(icu);\n const wasInIcu = this._inIcu;\n if (!this._inIcu) {\n // nested ICU messages should not be extracted but top-level translated as a whole\n if (this._isInTranslatableSection) {\n this._addMessage([icu]);\n }\n this._inIcu = true;\n }\n const cases = visitAll(this, icu.cases, context);\n if (this._mode === _VisitorMode.Merge) {\n icu = new Expansion(icu.switchValue, icu.type, cases, icu.sourceSpan, icu.switchValueSourceSpan);\n }\n this._inIcu = wasInIcu;\n return icu;\n }\n visitComment(comment, context) {\n const isOpening = _isOpeningComment(comment);\n if (isOpening && this._isInTranslatableSection) {\n this._reportError(comment, 'Could not start a block inside a translatable section');\n return;\n }\n const isClosing = _isClosingComment(comment);\n if (isClosing && !this._inI18nBlock) {\n this._reportError(comment, 'Trying to close an unopened block');\n return;\n }\n if (!this._inI18nNode && !this._inIcu) {\n if (!this._inI18nBlock) {\n if (isOpening) {\n // deprecated from v5 you should use <ng-container i18n> instead of i18n comments\n if (!i18nCommentsWarned && console && console.warn) {\n i18nCommentsWarned = true;\n const details = comment.sourceSpan.details ? `, ${comment.sourceSpan.details}` : '';\n // TODO(ocombe): use a log service once there is a public one available\n console.warn(`I18n comments are deprecated, use an <ng-container> element instead (${comment.sourceSpan.start}${details})`);\n }\n this._inI18nBlock = true;\n this._blockStartDepth = this._depth;\n this._blockChildren = [];\n this._blockMeaningAndDesc =\n comment.value.replace(_I18N_COMMENT_PREFIX_REGEXP, '').trim();\n this._openTranslatableSection(comment);\n }\n }\n else {\n if (isClosing) {\n if (this._depth == this._blockStartDepth) {\n this._closeTranslatableSection(comment, this._blockChildren);\n this._inI18nBlock = false;\n const message = this._addMessage(this._blockChildren, this._blockMeaningAndDesc);\n // merge attributes in sections\n const nodes = this._translateMessage(comment, message);\n return visitAll(this, nodes);\n }\n else {\n this._reportError(comment, 'I18N blocks should not cross element boundaries');\n return;\n }\n }\n }\n }\n }\n visitText(text, context) {\n if (this._isInTranslatableSection) {\n this._mayBeAddBlockChildren(text);\n }\n return text;\n }\n visitElement(el, context) {\n this._mayBeAddBlockChildren(el);\n this._depth++;\n const wasInI18nNode = this._inI18nNode;\n const wasInImplicitNode = this._inImplicitNode;\n let childNodes = [];\n let translatedChildNodes = undefined;\n // Extract:\n // - top level nodes with the (implicit) \"i18n\" attribute if not already in a section\n // - ICU messages\n const i18nAttr = _getI18nAttr(el);\n const i18nMeta = i18nAttr ? i18nAttr.value : '';\n const isImplicit = this._implicitTags.some(tag => el.name === tag) && !this._inIcu &&\n !this._isInTranslatableSection;\n const isTopLevelImplicit = !wasInImplicitNode && isImplicit;\n this._inImplicitNode = wasInImplicitNode || isImplicit;\n if (!this._isInTranslatableSection && !this._inIcu) {\n if (i18nAttr || isTopLevelImplicit) {\n this._inI18nNode = true;\n const message = this._addMessage(el.children, i18nMeta);\n translatedChildNodes = this._translateMessage(el, message);\n }\n if (this._mode == _VisitorMode.Extract) {\n const isTranslatable = i18nAttr || isTopLevelImplicit;\n if (isTranslatable)\n this._openTranslatableSection(el);\n visitAll(this, el.children);\n if (isTranslatable)\n this._closeTranslatableSection(el, el.children);\n }\n }\n else {\n if (i18nAttr || isTopLevelImplicit) {\n this._reportError(el, 'Could not mark an element as translatable inside a translatable section');\n }\n if (this._mode == _VisitorMode.Extract) {\n // Descend into child nodes for extraction\n visitAll(this, el.children);\n }\n }\n if (this._mode === _VisitorMode.Merge) {\n const visitNodes = translatedChildNodes || el.children;\n visitNodes.forEach(child => {\n const visited = child.visit(this, context);\n if (visited && !this._isInTranslatableSection) {\n // Do not add the children from translatable sections (= i18n blocks here)\n // They will be added later in this loop when the block closes (i.e. on `<!-- /i18n -->`)\n childNodes = childNodes.concat(visited);\n }\n });\n }\n this._visitAttributesOf(el);\n this._depth--;\n this._inI18nNode = wasInI18nNode;\n this._inImplicitNode = wasInImplicitNode;\n if (this._mode === _VisitorMode.Merge) {\n const translatedAttrs = this._translateAttributes(el);\n return new Element(el.name, translatedAttrs, childNodes, el.sourceSpan, el.startSourceSpan, el.endSourceSpan);\n }\n return null;\n }\n visitAttribute(attribute, context) {\n throw new Error('unreachable code');\n }\n _init(mode, interpolationConfig) {\n this._mode = mode;\n this._inI18nBlock = false;\n this._inI18nNode = false;\n this._depth = 0;\n this._inIcu = false;\n this._msgCountAtSectionStart = undefined;\n this._errors = [];\n this._messages = [];\n this._inImplicitNode = false;\n this._createI18nMessage = createI18nMessageFactory(interpolationConfig);\n }\n // looks for translatable attributes\n _visitAttributesOf(el) {\n const explicitAttrNameToValue = {};\n const implicitAttrNames = this._implicitAttrs[el.name] || [];\n el.attrs.filter(attr => attr.name.startsWith(_I18N_ATTR_PREFIX))\n .forEach(attr => explicitAttrNameToValue[attr.name.slice(_I18N_ATTR_PREFIX.length)] =\n attr.value);\n el.attrs.forEach(attr => {\n if (attr.name in explicitAttrNameToValue) {\n this._addMessage([attr], explicitAttrNameToValue[attr.name]);\n }\n else if (implicitAttrNames.some(name => attr.name === name)) {\n this._addMessage([attr]);\n }\n });\n }\n // add a translatable message\n _addMessage(ast, msgMeta) {\n if (ast.length == 0 ||\n ast.length == 1 && ast[0] instanceof Attribute && !ast[0].value) {\n // Do not create empty messages\n return null;\n }\n const { meaning, description, id } = _parseMessageMeta(msgMeta);\n const message = this._createI18nMessage(ast, meaning, description, id);\n this._messages.push(message);\n return message;\n }\n // Translates the given message given the `TranslationBundle`\n // This is used for translating elements / blocks - see `_translateAttributes` for attributes\n // no-op when called in extraction mode (returns [])\n _translateMessage(el, message) {\n if (message && this._mode === _VisitorMode.Merge) {\n const nodes = this._translations.get(message);\n if (nodes) {\n return nodes;\n }\n this._reportError(el, `Translation unavailable for message id=\"${this._translations.digest(message)}\"`);\n }\n return [];\n }\n // translate the attributes of an element and remove i18n specific attributes\n _translateAttributes(el) {\n const attributes = el.attrs;\n const i18nParsedMessageMeta = {};\n attributes.forEach(attr => {\n if (attr.name.startsWith(_I18N_ATTR_PREFIX)) {\n i18nParsedMessageMeta[attr.name.slice(_I18N_ATTR_PREFIX.length)] =\n _parseMessageMeta(attr.value);\n }\n });\n const translatedAttributes = [];\n attributes.forEach((attr) => {\n if (attr.name === _I18N_ATTR || attr.name.startsWith(_I18N_ATTR_PREFIX)) {\n // strip i18n specific attributes\n return;\n }\n if (attr.value && attr.value != '' && i18nParsedMessageMeta.hasOwnProperty(attr.name)) {\n const { meaning, description, id } = i18nParsedMessageMeta[attr.name];\n const message = this._createI18nMessage([attr], meaning, description, id);\n const nodes = this._translations.get(message);\n if (nodes) {\n if (nodes.length == 0) {\n translatedAttributes.push(new Attribute(attr.name, '', attr.sourceSpan, undefined /* keySpan */, undefined /* valueSpan */, undefined /* valueTokens */, undefined /* i18n */));\n }\n else if (nodes[0] instanceof Text) {\n const value = nodes[0].value;\n translatedAttributes.push(new Attribute(attr.name, value, attr.sourceSpan, undefined /* keySpan */, undefined /* valueSpan */, undefined /* valueTokens */, undefined /* i18n */));\n }\n else {\n this._reportError(el, `Unexpected translation for attribute \"${attr.name}\" (id=\"${id || this._translations.digest(message)}\")`);\n }\n }\n else {\n this._reportError(el, `Translation unavailable for attribute \"${attr.name}\" (id=\"${id || this._translations.digest(message)}\")`);\n }\n }\n else {\n translatedAttributes.push(attr);\n }\n });\n return translatedAttributes;\n }\n /**\n * Add the node as a child of the block when:\n * - we are in a block,\n * - we are not inside a ICU message (those are handled separately),\n * - the node is a \"direct child\" of the block\n */\n _mayBeAddBlockChildren(node) {\n if (this._inI18nBlock && !this._inIcu && this._depth == this._blockStartDepth) {\n this._blockChildren.push(node);\n }\n }\n /**\n * Marks the start of a section, see `_closeTranslatableSection`\n */\n _openTranslatableSection(node) {\n if (this._isInTranslatableSection) {\n this._reportError(node, 'Unexpected section start');\n }\n else {\n this._msgCountAtSectionStart = this._messages.length;\n }\n }\n /**\n * A translatable section could be:\n * - the content of translatable element,\n * - nodes between `<!-- i18n -->` and `<!-- /i18n -->` comments\n */\n get _isInTranslatableSection() {\n return this._msgCountAtSectionStart !== void 0;\n }\n /**\n * Terminates a section.\n *\n * If a section has only one significant children (comments not significant) then we should not\n * keep the message from this children:\n *\n * `<p i18n=\"meaning|description\">{ICU message}</p>` would produce two messages:\n * - one for the <p> content with meaning and description,\n * - another one for the ICU message.\n *\n * In this case the last message is discarded as it contains less information (the AST is\n * otherwise identical).\n *\n * Note that we should still keep messages extracted from attributes inside the section (ie in the\n * ICU message here)\n */\n _closeTranslatableSection(node, directChildren) {\n if (!this._isInTranslatableSection) {\n this._reportError(node, 'Unexpected section end');\n return;\n }\n const startIndex = this._msgCountAtSectionStart;\n const significantChildren = directChildren.reduce((count, node) => count + (node instanceof Comment ? 0 : 1), 0);\n if (significantChildren == 1) {\n for (let i = this._messages.length - 1; i >= startIndex; i--) {\n const ast = this._messages[i].nodes;\n if (!(ast.length == 1 && ast[0] instanceof Text$2)) {\n this._messages.splice(i, 1);\n break;\n }\n }\n }\n this._msgCountAtSectionStart = undefined;\n }\n _reportError(node, msg) {\n this._errors.push(new I18nError(node.sourceSpan, msg));\n }\n}\nfunction _isOpeningComment(n) {\n return !!(n instanceof Comment && n.value && n.value.startsWith('i18n'));\n}\nfunction _isClosingComment(n) {\n return !!(n instanceof Comment && n.value && n.value === '/i18n');\n}\nfunction _getI18nAttr(p) {\n return p.attrs.find(attr => attr.name === _I18N_ATTR) || null;\n}\nfunction _parseMessageMeta(i18n) {\n if (!i18n)\n return { meaning: '', description: '', id: '' };\n const idIndex = i18n.indexOf(ID_SEPARATOR);\n const descIndex = i18n.indexOf(MEANING_SEPARATOR);\n const [meaningAndDesc, id] = (idIndex > -1) ? [i18n.slice(0, idIndex), i18n.slice(idIndex + 2)] : [i18n, ''];\n const [meaning, description] = (descIndex > -1) ?\n [meaningAndDesc.slice(0, descIndex), meaningAndDesc.slice(descIndex + 1)] :\n ['', meaningAndDesc];\n return { meaning, description, id: id.trim() };\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass XmlTagDefinition {\n constructor() {\n this.closedByParent = false;\n this.isVoid = false;\n this.ignoreFirstLf = false;\n this.canSelfClose = true;\n this.preventNamespaceInheritance = false;\n }\n requireExtraParent(currentParent) {\n return false;\n }\n isClosedByChild(name) {\n return false;\n }\n getContentType() {\n return TagContentType.PARSABLE_DATA;\n }\n}\nconst _TAG_DEFINITION = new XmlTagDefinition();\nfunction getXmlTagDefinition(tagName) {\n return _TAG_DEFINITION;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass XmlParser extends Parser {\n constructor() {\n super(getXmlTagDefinition);\n }\n parse(source, url, options) {\n return super.parse(source, url, options);\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst _VERSION$1 = '1.2';\nconst _XMLNS$1 = 'urn:oasis:names:tc:xliff:document:1.2';\n// TODO(vicb): make this a param (s/_/-/)\nconst _DEFAULT_SOURCE_LANG$1 = 'en';\nconst _PLACEHOLDER_TAG$2 = 'x';\nconst _MARKER_TAG$1 = 'mrk';\nconst _FILE_TAG = 'file';\nconst _SOURCE_TAG$1 = 'source';\nconst _SEGMENT_SOURCE_TAG = 'seg-source';\nconst _ALT_TRANS_TAG = 'alt-trans';\nconst _TARGET_TAG$1 = 'target';\nconst _UNIT_TAG$1 = 'trans-unit';\nconst _CONTEXT_GROUP_TAG = 'context-group';\nconst _CONTEXT_TAG = 'context';\n// https://docs.oasis-open.org/xliff/v1.2/os/xliff-core.html\n// https://docs.oasis-open.org/xliff/v1.2/xliff-profile-html/xliff-profile-html-1.2.html\nclass Xliff extends Serializer {\n write(messages, locale) {\n const visitor = new _WriteVisitor$1();\n const transUnits = [];\n messages.forEach(message => {\n let contextTags = [];\n message.sources.forEach((source) => {\n let contextGroupTag = new Tag(_CONTEXT_GROUP_TAG, { purpose: 'location' });\n contextGroupTag.children.push(new CR(10), new Tag(_CONTEXT_TAG, { 'context-type': 'sourcefile' }, [new Text$1(source.filePath)]), new CR(10), new Tag(_CONTEXT_TAG, { 'context-type': 'linenumber' }, [new Text$1(`${source.startLine}`)]), new CR(8));\n contextTags.push(new CR(8), contextGroupTag);\n });\n const transUnit = new Tag(_UNIT_TAG$1, { id: message.id, datatype: 'html' });\n transUnit.children.push(new CR(8), new Tag(_SOURCE_TAG$1, {}, visitor.serialize(message.nodes)), ...contextTags);\n if (message.description) {\n transUnit.children.push(new CR(8), new Tag('note', { priority: '1', from: 'description' }, [new Text$1(message.description)]));\n }\n if (message.meaning) {\n transUnit.children.push(new CR(8), new Tag('note', { priority: '1', from: 'meaning' }, [new Text$1(message.meaning)]));\n }\n transUnit.children.push(new CR(6));\n transUnits.push(new CR(6), transUnit);\n });\n const body = new Tag('body', {}, [...transUnits, new CR(4)]);\n const file = new Tag('file', {\n 'source-language': locale || _DEFAULT_SOURCE_LANG$1,\n datatype: 'plaintext',\n original: 'ng2.template',\n }, [new CR(4), body, new CR(2)]);\n const xliff = new Tag('xliff', { version: _VERSION$1, xmlns: _XMLNS$1 }, [new CR(2), file, new CR()]);\n return serialize([\n new Declaration({ version: '1.0', encoding: 'UTF-8' }), new CR(), xliff, new CR()\n ]);\n }\n load(content, url) {\n // xliff to xml nodes\n const xliffParser = new XliffParser();\n const { locale, msgIdToHtml, errors } = xliffParser.parse(content, url);\n // xml nodes to i18n nodes\n const i18nNodesByMsgId = {};\n const converter = new XmlToI18n$2();\n Object.keys(msgIdToHtml).forEach(msgId => {\n const { i18nNodes, errors: e } = converter.convert(msgIdToHtml[msgId], url);\n errors.push(...e);\n i18nNodesByMsgId[msgId] = i18nNodes;\n });\n if (errors.length) {\n throw new Error(`xliff parse errors:\\n${errors.join('\\n')}`);\n }\n return { locale: locale, i18nNodesByMsgId };\n }\n digest(message) {\n return digest$1(message);\n }\n}\nclass _WriteVisitor$1 {\n visitText(text, context) {\n return [new Text$1(text.value)];\n }\n visitContainer(container, context) {\n const nodes = [];\n container.children.forEach((node) => nodes.push(...node.visit(this)));\n return nodes;\n }\n visitIcu(icu, context) {\n const nodes = [new Text$1(`{${icu.expressionPlaceholder}, ${icu.type}, `)];\n Object.keys(icu.cases).forEach((c) => {\n nodes.push(new Text$1(`${c} {`), ...icu.cases[c].visit(this), new Text$1(`} `));\n });\n nodes.push(new Text$1(`}`));\n return nodes;\n }\n visitTagPlaceholder(ph, context) {\n const ctype = getCtypeForTag(ph.tag);\n if (ph.isVoid) {\n // void tags have no children nor closing tags\n return [new Tag(_PLACEHOLDER_TAG$2, { id: ph.startName, ctype, 'equiv-text': `<${ph.tag}/>` })];\n }\n const startTagPh = new Tag(_PLACEHOLDER_TAG$2, { id: ph.startName, ctype, 'equiv-text': `<${ph.tag}>` });\n const closeTagPh = new Tag(_PLACEHOLDER_TAG$2, { id: ph.closeName, ctype, 'equiv-text': `</${ph.tag}>` });\n return [startTagPh, ...this.serialize(ph.children), closeTagPh];\n }\n visitPlaceholder(ph, context) {\n return [new Tag(_PLACEHOLDER_TAG$2, { id: ph.name, 'equiv-text': `{{${ph.value}}}` })];\n }\n visitIcuPlaceholder(ph, context) {\n const equivText = `{${ph.value.expression}, ${ph.value.type}, ${Object.keys(ph.value.cases).map((value) => value + ' {...}').join(' ')}}`;\n return [new Tag(_PLACEHOLDER_TAG$2, { id: ph.name, 'equiv-text': equivText })];\n }\n serialize(nodes) {\n return [].concat(...nodes.map(node => node.visit(this)));\n }\n}\n// TODO(vicb): add error management (structure)\n// Extract messages as xml nodes from the xliff file\nclass XliffParser {\n constructor() {\n this._locale = null;\n }\n parse(xliff, url) {\n this._unitMlString = null;\n this._msgIdToHtml = {};\n const xml = new XmlParser().parse(xliff, url);\n this._errors = xml.errors;\n visitAll(this, xml.rootNodes, null);\n return {\n msgIdToHtml: this._msgIdToHtml,\n errors: this._errors,\n locale: this._locale,\n };\n }\n visitElement(element, context) {\n switch (element.name) {\n case _UNIT_TAG$1:\n this._unitMlString = null;\n const idAttr = element.attrs.find((attr) => attr.name === 'id');\n if (!idAttr) {\n this._addError(element, `<${_UNIT_TAG$1}> misses the \"id\" attribute`);\n }\n else {\n const id = idAttr.value;\n if (this._msgIdToHtml.hasOwnProperty(id)) {\n this._addError(element, `Duplicated translations for msg ${id}`);\n }\n else {\n visitAll(this, element.children, null);\n if (typeof this._unitMlString === 'string') {\n this._msgIdToHtml[id] = this._unitMlString;\n }\n else {\n this._addError(element, `Message ${id} misses a translation`);\n }\n }\n }\n break;\n // ignore those tags\n case _SOURCE_TAG$1:\n case _SEGMENT_SOURCE_TAG:\n case _ALT_TRANS_TAG:\n break;\n case _TARGET_TAG$1:\n const innerTextStart = element.startSourceSpan.end.offset;\n const innerTextEnd = element.endSourceSpan.start.offset;\n const content = element.startSourceSpan.start.file.content;\n const innerText = content.slice(innerTextStart, innerTextEnd);\n this._unitMlString = innerText;\n break;\n case _FILE_TAG:\n const localeAttr = element.attrs.find((attr) => attr.name === 'target-language');\n if (localeAttr) {\n this._locale = localeAttr.value;\n }\n visitAll(this, element.children, null);\n break;\n default:\n // TODO(vicb): assert file structure, xliff version\n // For now only recurse on unhandled nodes\n visitAll(this, element.children, null);\n }\n }\n visitAttribute(attribute, context) { }\n visitText(text, context) { }\n visitComment(comment, context) { }\n visitExpansion(expansion, context) { }\n visitExpansionCase(expansionCase, context) { }\n _addError(node, message) {\n this._errors.push(new I18nError(node.sourceSpan, message));\n }\n}\n// Convert ml nodes (xliff syntax) to i18n nodes\nclass XmlToI18n$2 {\n convert(message, url) {\n const xmlIcu = new XmlParser().parse(message, url, { tokenizeExpansionForms: true });\n this._errors = xmlIcu.errors;\n const i18nNodes = this._errors.length > 0 || xmlIcu.rootNodes.length == 0 ?\n [] :\n [].concat(...visitAll(this, xmlIcu.rootNodes));\n return {\n i18nNodes: i18nNodes,\n errors: this._errors,\n };\n }\n visitText(text, context) {\n return new Text$2(text.value, text.sourceSpan);\n }\n visitElement(el, context) {\n if (el.name === _PLACEHOLDER_TAG$2) {\n const nameAttr = el.attrs.find((attr) => attr.name === 'id');\n if (nameAttr) {\n return new Placeholder('', nameAttr.value, el.sourceSpan);\n }\n this._addError(el, `<${_PLACEHOLDER_TAG$2}> misses the \"id\" attribute`);\n return null;\n }\n if (el.name === _MARKER_TAG$1) {\n return [].concat(...visitAll(this, el.children));\n }\n this._addError(el, `Unexpected tag`);\n return null;\n }\n visitExpansion(icu, context) {\n const caseMap = {};\n visitAll(this, icu.cases).forEach((c) => {\n caseMap[c.value] = new Container(c.nodes, icu.sourceSpan);\n });\n return new Icu(icu.switchValue, icu.type, caseMap, icu.sourceSpan);\n }\n visitExpansionCase(icuCase, context) {\n return {\n value: icuCase.value,\n nodes: visitAll(this, icuCase.expression),\n };\n }\n visitComment(comment, context) { }\n visitAttribute(attribute, context) { }\n _addError(node, message) {\n this._errors.push(new I18nError(node.sourceSpan, message));\n }\n}\nfunction getCtypeForTag(tag) {\n switch (tag.toLowerCase()) {\n case 'br':\n return 'lb';\n case 'img':\n return 'image';\n default:\n return `x-${tag}`;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst _VERSION = '2.0';\nconst _XMLNS = 'urn:oasis:names:tc:xliff:document:2.0';\n// TODO(vicb): make this a param (s/_/-/)\nconst _DEFAULT_SOURCE_LANG = 'en';\nconst _PLACEHOLDER_TAG$1 = 'ph';\nconst _PLACEHOLDER_SPANNING_TAG = 'pc';\nconst _MARKER_TAG = 'mrk';\nconst _XLIFF_TAG = 'xliff';\nconst _SOURCE_TAG = 'source';\nconst _TARGET_TAG = 'target';\nconst _UNIT_TAG = 'unit';\n// https://docs.oasis-open.org/xliff/xliff-core/v2.0/os/xliff-core-v2.0-os.html\nclass Xliff2 extends Serializer {\n write(messages, locale) {\n const visitor = new _WriteVisitor();\n const units = [];\n messages.forEach(message => {\n const unit = new Tag(_UNIT_TAG, { id: message.id });\n const notes = new Tag('notes');\n if (message.description || message.meaning) {\n if (message.description) {\n notes.children.push(new CR(8), new Tag('note', { category: 'description' }, [new Text$1(message.description)]));\n }\n if (message.meaning) {\n notes.children.push(new CR(8), new Tag('note', { category: 'meaning' }, [new Text$1(message.meaning)]));\n }\n }\n message.sources.forEach((source) => {\n notes.children.push(new CR(8), new Tag('note', { category: 'location' }, [\n new Text$1(`${source.filePath}:${source.startLine}${source.endLine !== source.startLine ? ',' + source.endLine : ''}`)\n ]));\n });\n notes.children.push(new CR(6));\n unit.children.push(new CR(6), notes);\n const segment = new Tag('segment');\n segment.children.push(new CR(8), new Tag(_SOURCE_TAG, {}, visitor.serialize(message.nodes)), new CR(6));\n unit.children.push(new CR(6), segment, new CR(4));\n units.push(new CR(4), unit);\n });\n const file = new Tag('file', { 'original': 'ng.template', id: 'ngi18n' }, [...units, new CR(2)]);\n const xliff = new Tag(_XLIFF_TAG, { version: _VERSION, xmlns: _XMLNS, srcLang: locale || _DEFAULT_SOURCE_LANG }, [new CR(2), file, new CR()]);\n return serialize([\n new Declaration({ version: '1.0', encoding: 'UTF-8' }), new CR(), xliff, new CR()\n ]);\n }\n load(content, url) {\n // xliff to xml nodes\n const xliff2Parser = new Xliff2Parser();\n const { locale, msgIdToHtml, errors } = xliff2Parser.parse(content, url);\n // xml nodes to i18n nodes\n const i18nNodesByMsgId = {};\n const converter = new XmlToI18n$1();\n Object.keys(msgIdToHtml).forEach(msgId => {\n const { i18nNodes, errors: e } = converter.convert(msgIdToHtml[msgId], url);\n errors.push(...e);\n i18nNodesByMsgId[msgId] = i18nNodes;\n });\n if (errors.length) {\n throw new Error(`xliff2 parse errors:\\n${errors.join('\\n')}`);\n }\n return { locale: locale, i18nNodesByMsgId };\n }\n digest(message) {\n return decimalDigest(message);\n }\n}\nclass _WriteVisitor {\n visitText(text, context) {\n return [new Text$1(text.value)];\n }\n visitContainer(container, context) {\n const nodes = [];\n container.children.forEach((node) => nodes.push(...node.visit(this)));\n return nodes;\n }\n visitIcu(icu, context) {\n const nodes = [new Text$1(`{${icu.expressionPlaceholder}, ${icu.type}, `)];\n Object.keys(icu.cases).forEach((c) => {\n nodes.push(new Text$1(`${c} {`), ...icu.cases[c].visit(this), new Text$1(`} `));\n });\n nodes.push(new Text$1(`}`));\n return nodes;\n }\n visitTagPlaceholder(ph, context) {\n const type = getTypeForTag(ph.tag);\n if (ph.isVoid) {\n const tagPh = new Tag(_PLACEHOLDER_TAG$1, {\n id: (this._nextPlaceholderId++).toString(),\n equiv: ph.startName,\n type: type,\n disp: `<${ph.tag}/>`,\n });\n return [tagPh];\n }\n const tagPc = new Tag(_PLACEHOLDER_SPANNING_TAG, {\n id: (this._nextPlaceholderId++).toString(),\n equivStart: ph.startName,\n equivEnd: ph.closeName,\n type: type,\n dispStart: `<${ph.tag}>`,\n dispEnd: `</${ph.tag}>`,\n });\n const nodes = [].concat(...ph.children.map(node => node.visit(this)));\n if (nodes.length) {\n nodes.forEach((node) => tagPc.children.push(node));\n }\n else {\n tagPc.children.push(new Text$1(''));\n }\n return [tagPc];\n }\n visitPlaceholder(ph, context) {\n const idStr = (this._nextPlaceholderId++).toString();\n return [new Tag(_PLACEHOLDER_TAG$1, {\n id: idStr,\n equiv: ph.name,\n disp: `{{${ph.value}}}`,\n })];\n }\n visitIcuPlaceholder(ph, context) {\n const cases = Object.keys(ph.value.cases).map((value) => value + ' {...}').join(' ');\n const idStr = (this._nextPlaceholderId++).toString();\n return [new Tag(_PLACEHOLDER_TAG$1, { id: idStr, equiv: ph.name, disp: `{${ph.value.expression}, ${ph.value.type}, ${cases}}` })];\n }\n serialize(nodes) {\n this._nextPlaceholderId = 0;\n return [].concat(...nodes.map(node => node.visit(this)));\n }\n}\n// Extract messages as xml nodes from the xliff file\nclass Xliff2Parser {\n constructor() {\n this._locale = null;\n }\n parse(xliff, url) {\n this._unitMlString = null;\n this._msgIdToHtml = {};\n const xml = new XmlParser().parse(xliff, url);\n this._errors = xml.errors;\n visitAll(this, xml.rootNodes, null);\n return {\n msgIdToHtml: this._msgIdToHtml,\n errors: this._errors,\n locale: this._locale,\n };\n }\n visitElement(element, context) {\n switch (element.name) {\n case _UNIT_TAG:\n this._unitMlString = null;\n const idAttr = element.attrs.find((attr) => attr.name === 'id');\n if (!idAttr) {\n this._addError(element, `<${_UNIT_TAG}> misses the \"id\" attribute`);\n }\n else {\n const id = idAttr.value;\n if (this._msgIdToHtml.hasOwnProperty(id)) {\n this._addError(element, `Duplicated translations for msg ${id}`);\n }\n else {\n visitAll(this, element.children, null);\n if (typeof this._unitMlString === 'string') {\n this._msgIdToHtml[id] = this._unitMlString;\n }\n else {\n this._addError(element, `Message ${id} misses a translation`);\n }\n }\n }\n break;\n case _SOURCE_TAG:\n // ignore source message\n break;\n case _TARGET_TAG:\n const innerTextStart = element.startSourceSpan.end.offset;\n const innerTextEnd = element.endSourceSpan.start.offset;\n const content = element.startSourceSpan.start.file.content;\n const innerText = content.slice(innerTextStart, innerTextEnd);\n this._unitMlString = innerText;\n break;\n case _XLIFF_TAG:\n const localeAttr = element.attrs.find((attr) => attr.name === 'trgLang');\n if (localeAttr) {\n this._locale = localeAttr.value;\n }\n const versionAttr = element.attrs.find((attr) => attr.name === 'version');\n if (versionAttr) {\n const version = versionAttr.value;\n if (version !== '2.0') {\n this._addError(element, `The XLIFF file version ${version} is not compatible with XLIFF 2.0 serializer`);\n }\n else {\n visitAll(this, element.children, null);\n }\n }\n break;\n default:\n visitAll(this, element.children, null);\n }\n }\n visitAttribute(attribute, context) { }\n visitText(text, context) { }\n visitComment(comment, context) { }\n visitExpansion(expansion, context) { }\n visitExpansionCase(expansionCase, context) { }\n _addError(node, message) {\n this._errors.push(new I18nError(node.sourceSpan, message));\n }\n}\n// Convert ml nodes (xliff syntax) to i18n nodes\nclass XmlToI18n$1 {\n convert(message, url) {\n const xmlIcu = new XmlParser().parse(message, url, { tokenizeExpansionForms: true });\n this._errors = xmlIcu.errors;\n const i18nNodes = this._errors.length > 0 || xmlIcu.rootNodes.length == 0 ?\n [] :\n [].concat(...visitAll(this, xmlIcu.rootNodes));\n return {\n i18nNodes,\n errors: this._errors,\n };\n }\n visitText(text, context) {\n return new Text$2(text.value, text.sourceSpan);\n }\n visitElement(el, context) {\n switch (el.name) {\n case _PLACEHOLDER_TAG$1:\n const nameAttr = el.attrs.find((attr) => attr.name === 'equiv');\n if (nameAttr) {\n return [new Placeholder('', nameAttr.value, el.sourceSpan)];\n }\n this._addError(el, `<${_PLACEHOLDER_TAG$1}> misses the \"equiv\" attribute`);\n break;\n case _PLACEHOLDER_SPANNING_TAG:\n const startAttr = el.attrs.find((attr) => attr.name === 'equivStart');\n const endAttr = el.attrs.find((attr) => attr.name === 'equivEnd');\n if (!startAttr) {\n this._addError(el, `<${_PLACEHOLDER_TAG$1}> misses the \"equivStart\" attribute`);\n }\n else if (!endAttr) {\n this._addError(el, `<${_PLACEHOLDER_TAG$1}> misses the \"equivEnd\" attribute`);\n }\n else {\n const startId = startAttr.value;\n const endId = endAttr.value;\n const nodes = [];\n return nodes.concat(new Placeholder('', startId, el.sourceSpan), ...el.children.map(node => node.visit(this, null)), new Placeholder('', endId, el.sourceSpan));\n }\n break;\n case _MARKER_TAG:\n return [].concat(...visitAll(this, el.children));\n default:\n this._addError(el, `Unexpected tag`);\n }\n return null;\n }\n visitExpansion(icu, context) {\n const caseMap = {};\n visitAll(this, icu.cases).forEach((c) => {\n caseMap[c.value] = new Container(c.nodes, icu.sourceSpan);\n });\n return new Icu(icu.switchValue, icu.type, caseMap, icu.sourceSpan);\n }\n visitExpansionCase(icuCase, context) {\n return {\n value: icuCase.value,\n nodes: [].concat(...visitAll(this, icuCase.expression)),\n };\n }\n visitComment(comment, context) { }\n visitAttribute(attribute, context) { }\n _addError(node, message) {\n this._errors.push(new I18nError(node.sourceSpan, message));\n }\n}\nfunction getTypeForTag(tag) {\n switch (tag.toLowerCase()) {\n case 'br':\n case 'b':\n case 'i':\n case 'u':\n return 'fmt';\n case 'img':\n return 'image';\n case 'a':\n return 'link';\n default:\n return 'other';\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst _TRANSLATIONS_TAG = 'translationbundle';\nconst _TRANSLATION_TAG = 'translation';\nconst _PLACEHOLDER_TAG = 'ph';\nclass Xtb extends Serializer {\n write(messages, locale) {\n throw new Error('Unsupported');\n }\n load(content, url) {\n // xtb to xml nodes\n const xtbParser = new XtbParser();\n const { locale, msgIdToHtml, errors } = xtbParser.parse(content, url);\n // xml nodes to i18n nodes\n const i18nNodesByMsgId = {};\n const converter = new XmlToI18n();\n // Because we should be able to load xtb files that rely on features not supported by angular,\n // we need to delay the conversion of html to i18n nodes so that non angular messages are not\n // converted\n Object.keys(msgIdToHtml).forEach(msgId => {\n const valueFn = function () {\n const { i18nNodes, errors } = converter.convert(msgIdToHtml[msgId], url);\n if (errors.length) {\n throw new Error(`xtb parse errors:\\n${errors.join('\\n')}`);\n }\n return i18nNodes;\n };\n createLazyProperty(i18nNodesByMsgId, msgId, valueFn);\n });\n if (errors.length) {\n throw new Error(`xtb parse errors:\\n${errors.join('\\n')}`);\n }\n return { locale: locale, i18nNodesByMsgId };\n }\n digest(message) {\n return digest(message);\n }\n createNameMapper(message) {\n return new SimplePlaceholderMapper(message, toPublicName);\n }\n}\nfunction createLazyProperty(messages, id, valueFn) {\n Object.defineProperty(messages, id, {\n configurable: true,\n enumerable: true,\n get: function () {\n const value = valueFn();\n Object.defineProperty(messages, id, { enumerable: true, value });\n return value;\n },\n set: _ => {\n throw new Error('Could not overwrite an XTB translation');\n },\n });\n}\n// Extract messages as xml nodes from the xtb file\nclass XtbParser {\n constructor() {\n this._locale = null;\n }\n parse(xtb, url) {\n this._bundleDepth = 0;\n this._msgIdToHtml = {};\n // We can not parse the ICU messages at this point as some messages might not originate\n // from Angular that could not be lex'd.\n const xml = new XmlParser().parse(xtb, url);\n this._errors = xml.errors;\n visitAll(this, xml.rootNodes);\n return {\n msgIdToHtml: this._msgIdToHtml,\n errors: this._errors,\n locale: this._locale,\n };\n }\n visitElement(element, context) {\n switch (element.name) {\n case _TRANSLATIONS_TAG:\n this._bundleDepth++;\n if (this._bundleDepth > 1) {\n this._addError(element, `<${_TRANSLATIONS_TAG}> elements can not be nested`);\n }\n const langAttr = element.attrs.find((attr) => attr.name === 'lang');\n if (langAttr) {\n this._locale = langAttr.value;\n }\n visitAll(this, element.children, null);\n this._bundleDepth--;\n break;\n case _TRANSLATION_TAG:\n const idAttr = element.attrs.find((attr) => attr.name === 'id');\n if (!idAttr) {\n this._addError(element, `<${_TRANSLATION_TAG}> misses the \"id\" attribute`);\n }\n else {\n const id = idAttr.value;\n if (this._msgIdToHtml.hasOwnProperty(id)) {\n this._addError(element, `Duplicated translations for msg ${id}`);\n }\n else {\n const innerTextStart = element.startSourceSpan.end.offset;\n const innerTextEnd = element.endSourceSpan.start.offset;\n const content = element.startSourceSpan.start.file.content;\n const innerText = content.slice(innerTextStart, innerTextEnd);\n this._msgIdToHtml[id] = innerText;\n }\n }\n break;\n default:\n this._addError(element, 'Unexpected tag');\n }\n }\n visitAttribute(attribute, context) { }\n visitText(text, context) { }\n visitComment(comment, context) { }\n visitExpansion(expansion, context) { }\n visitExpansionCase(expansionCase, context) { }\n _addError(node, message) {\n this._errors.push(new I18nError(node.sourceSpan, message));\n }\n}\n// Convert ml nodes (xtb syntax) to i18n nodes\nclass XmlToI18n {\n convert(message, url) {\n const xmlIcu = new XmlParser().parse(message, url, { tokenizeExpansionForms: true });\n this._errors = xmlIcu.errors;\n const i18nNodes = this._errors.length > 0 || xmlIcu.rootNodes.length == 0 ?\n [] :\n visitAll(this, xmlIcu.rootNodes);\n return {\n i18nNodes,\n errors: this._errors,\n };\n }\n visitText(text, context) {\n return new Text$2(text.value, text.sourceSpan);\n }\n visitExpansion(icu, context) {\n const caseMap = {};\n visitAll(this, icu.cases).forEach(c => {\n caseMap[c.value] = new Container(c.nodes, icu.sourceSpan);\n });\n return new Icu(icu.switchValue, icu.type, caseMap, icu.sourceSpan);\n }\n visitExpansionCase(icuCase, context) {\n return {\n value: icuCase.value,\n nodes: visitAll(this, icuCase.expression),\n };\n }\n visitElement(el, context) {\n if (el.name === _PLACEHOLDER_TAG) {\n const nameAttr = el.attrs.find((attr) => attr.name === 'name');\n if (nameAttr) {\n return new Placeholder('', nameAttr.value, el.sourceSpan);\n }\n this._addError(el, `<${_PLACEHOLDER_TAG}> misses the \"name\" attribute`);\n }\n else {\n this._addError(el, `Unexpected tag`);\n }\n return null;\n }\n visitComment(comment, context) { }\n visitAttribute(attribute, context) { }\n _addError(node, message) {\n this._errors.push(new I18nError(node.sourceSpan, message));\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A container for translated messages\n */\nclass TranslationBundle {\n constructor(_i18nNodesByMsgId = {}, locale, digest, mapperFactory, missingTranslationStrategy = MissingTranslationStrategy.Warning, console) {\n this._i18nNodesByMsgId = _i18nNodesByMsgId;\n this.digest = digest;\n this.mapperFactory = mapperFactory;\n this._i18nToHtml = new I18nToHtmlVisitor(_i18nNodesByMsgId, locale, digest, mapperFactory, missingTranslationStrategy, console);\n }\n // Creates a `TranslationBundle` by parsing the given `content` with the `serializer`.\n static load(content, url, serializer, missingTranslationStrategy, console) {\n const { locale, i18nNodesByMsgId } = serializer.load(content, url);\n const digestFn = (m) => serializer.digest(m);\n const mapperFactory = (m) => serializer.createNameMapper(m);\n return new TranslationBundle(i18nNodesByMsgId, locale, digestFn, mapperFactory, missingTranslationStrategy, console);\n }\n // Returns the translation as HTML nodes from the given source message.\n get(srcMsg) {\n const html = this._i18nToHtml.convert(srcMsg);\n if (html.errors.length) {\n throw new Error(html.errors.join('\\n'));\n }\n return html.nodes;\n }\n has(srcMsg) {\n return this.digest(srcMsg) in this._i18nNodesByMsgId;\n }\n}\nclass I18nToHtmlVisitor {\n constructor(_i18nNodesByMsgId = {}, _locale, _digest, _mapperFactory, _missingTranslationStrategy, _console) {\n this._i18nNodesByMsgId = _i18nNodesByMsgId;\n this._locale = _locale;\n this._digest = _digest;\n this._mapperFactory = _mapperFactory;\n this._missingTranslationStrategy = _missingTranslationStrategy;\n this._console = _console;\n this._contextStack = [];\n this._errors = [];\n }\n convert(srcMsg) {\n this._contextStack.length = 0;\n this._errors.length = 0;\n // i18n to text\n const text = this._convertToText(srcMsg);\n // text to html\n const url = srcMsg.nodes[0].sourceSpan.start.file.url;\n const html = new HtmlParser().parse(text, url, { tokenizeExpansionForms: true });\n return {\n nodes: html.rootNodes,\n errors: [...this._errors, ...html.errors],\n };\n }\n visitText(text, context) {\n // `convert()` uses an `HtmlParser` to return `html.Node`s\n // we should then make sure that any special characters are escaped\n return escapeXml(text.value);\n }\n visitContainer(container, context) {\n return container.children.map(n => n.visit(this)).join('');\n }\n visitIcu(icu, context) {\n const cases = Object.keys(icu.cases).map(k => `${k} {${icu.cases[k].visit(this)}}`);\n // TODO(vicb): Once all format switch to using expression placeholders\n // we should throw when the placeholder is not in the source message\n const exp = this._srcMsg.placeholders.hasOwnProperty(icu.expression) ?\n this._srcMsg.placeholders[icu.expression].text :\n icu.expression;\n return `{${exp}, ${icu.type}, ${cases.join(' ')}}`;\n }\n visitPlaceholder(ph, context) {\n const phName = this._mapper(ph.name);\n if (this._srcMsg.placeholders.hasOwnProperty(phName)) {\n return this._srcMsg.placeholders[phName].text;\n }\n if (this._srcMsg.placeholderToMessage.hasOwnProperty(phName)) {\n return this._convertToText(this._srcMsg.placeholderToMessage[phName]);\n }\n this._addError(ph, `Unknown placeholder \"${ph.name}\"`);\n return '';\n }\n // Loaded message contains only placeholders (vs tag and icu placeholders).\n // However when a translation can not be found, we need to serialize the source message\n // which can contain tag placeholders\n visitTagPlaceholder(ph, context) {\n const tag = `${ph.tag}`;\n const attrs = Object.keys(ph.attrs).map(name => `${name}=\"${ph.attrs[name]}\"`).join(' ');\n if (ph.isVoid) {\n return `<${tag} ${attrs}/>`;\n }\n const children = ph.children.map((c) => c.visit(this)).join('');\n return `<${tag} ${attrs}>${children}</${tag}>`;\n }\n // Loaded message contains only placeholders (vs tag and icu placeholders).\n // However when a translation can not be found, we need to serialize the source message\n // which can contain tag placeholders\n visitIcuPlaceholder(ph, context) {\n // An ICU placeholder references the source message to be serialized\n return this._convertToText(this._srcMsg.placeholderToMessage[ph.name]);\n }\n /**\n * Convert a source message to a translated text string:\n * - text nodes are replaced with their translation,\n * - placeholders are replaced with their content,\n * - ICU nodes are converted to ICU expressions.\n */\n _convertToText(srcMsg) {\n const id = this._digest(srcMsg);\n const mapper = this._mapperFactory ? this._mapperFactory(srcMsg) : null;\n let nodes;\n this._contextStack.push({ msg: this._srcMsg, mapper: this._mapper });\n this._srcMsg = srcMsg;\n if (this._i18nNodesByMsgId.hasOwnProperty(id)) {\n // When there is a translation use its nodes as the source\n // And create a mapper to convert serialized placeholder names to internal names\n nodes = this._i18nNodesByMsgId[id];\n this._mapper = (name) => mapper ? mapper.toInternalName(name) : name;\n }\n else {\n // When no translation has been found\n // - report an error / a warning / nothing,\n // - use the nodes from the original message\n // - placeholders are already internal and need no mapper\n if (this._missingTranslationStrategy === MissingTranslationStrategy.Error) {\n const ctx = this._locale ? ` for locale \"${this._locale}\"` : '';\n this._addError(srcMsg.nodes[0], `Missing translation for message \"${id}\"${ctx}`);\n }\n else if (this._console &&\n this._missingTranslationStrategy === MissingTranslationStrategy.Warning) {\n const ctx = this._locale ? ` for locale \"${this._locale}\"` : '';\n this._console.warn(`Missing translation for message \"${id}\"${ctx}`);\n }\n nodes = srcMsg.nodes;\n this._mapper = (name) => name;\n }\n const text = nodes.map(node => node.visit(this)).join('');\n const context = this._contextStack.pop();\n this._srcMsg = context.msg;\n this._mapper = context.mapper;\n return text;\n }\n _addError(el, msg) {\n this._errors.push(new I18nError(el.sourceSpan, msg));\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass I18NHtmlParser {\n constructor(_htmlParser, translations, translationsFormat, missingTranslation = MissingTranslationStrategy.Warning, console) {\n this._htmlParser = _htmlParser;\n if (translations) {\n const serializer = createSerializer(translationsFormat);\n this._translationBundle =\n TranslationBundle.load(translations, 'i18n', serializer, missingTranslation, console);\n }\n else {\n this._translationBundle =\n new TranslationBundle({}, null, digest$1, undefined, missingTranslation, console);\n }\n }\n parse(source, url, options = {}) {\n const interpolationConfig = options.interpolationConfig || DEFAULT_INTERPOLATION_CONFIG;\n const parseResult = this._htmlParser.parse(source, url, { interpolationConfig, ...options });\n if (parseResult.errors.length) {\n return new ParseTreeResult(parseResult.rootNodes, parseResult.errors);\n }\n return mergeTranslations(parseResult.rootNodes, this._translationBundle, interpolationConfig, [], {});\n }\n}\nfunction createSerializer(format) {\n format = (format || 'xlf').toLowerCase();\n switch (format) {\n case 'xmb':\n return new Xmb();\n case 'xtb':\n return new Xtb();\n case 'xliff2':\n case 'xlf2':\n return new Xliff2();\n case 'xliff':\n case 'xlf':\n default:\n return new Xliff();\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A container for message extracted from the templates.\n */\nclass MessageBundle {\n constructor(_htmlParser, _implicitTags, _implicitAttrs, _locale = null) {\n this._htmlParser = _htmlParser;\n this._implicitTags = _implicitTags;\n this._implicitAttrs = _implicitAttrs;\n this._locale = _locale;\n this._messages = [];\n }\n updateFromTemplate(html, url, interpolationConfig) {\n const htmlParserResult = this._htmlParser.parse(html, url, { tokenizeExpansionForms: true, interpolationConfig });\n if (htmlParserResult.errors.length) {\n return htmlParserResult.errors;\n }\n const i18nParserResult = extractMessages(htmlParserResult.rootNodes, interpolationConfig, this._implicitTags, this._implicitAttrs);\n if (i18nParserResult.errors.length) {\n return i18nParserResult.errors;\n }\n this._messages.push(...i18nParserResult.messages);\n return [];\n }\n // Return the message in the internal format\n // The public (serialized) format might be different, see the `write` method.\n getMessages() {\n return this._messages;\n }\n write(serializer, filterSources) {\n const messages = {};\n const mapperVisitor = new MapPlaceholderNames();\n // Deduplicate messages based on their ID\n this._messages.forEach(message => {\n const id = serializer.digest(message);\n if (!messages.hasOwnProperty(id)) {\n messages[id] = message;\n }\n else {\n messages[id].sources.push(...message.sources);\n }\n });\n // Transform placeholder names using the serializer mapping\n const msgList = Object.keys(messages).map(id => {\n const mapper = serializer.createNameMapper(messages[id]);\n const src = messages[id];\n const nodes = mapper ? mapperVisitor.convert(src.nodes, mapper) : src.nodes;\n let transformedMessage = new Message(nodes, {}, {}, src.meaning, src.description, id);\n transformedMessage.sources = src.sources;\n if (filterSources) {\n transformedMessage.sources.forEach((source) => source.filePath = filterSources(source.filePath));\n }\n return transformedMessage;\n });\n return serializer.write(msgList, this._locale);\n }\n}\n// Transform an i18n AST by renaming the placeholder nodes with the given mapper\nclass MapPlaceholderNames extends CloneVisitor {\n convert(nodes, mapper) {\n return mapper ? nodes.map(n => n.visit(this, mapper)) : nodes;\n }\n visitTagPlaceholder(ph, mapper) {\n const startName = mapper.toPublicName(ph.startName);\n const closeName = ph.closeName ? mapper.toPublicName(ph.closeName) : ph.closeName;\n const children = ph.children.map(n => n.visit(this, mapper));\n return new TagPlaceholder(ph.tag, ph.attrs, startName, closeName, children, ph.isVoid, ph.sourceSpan, ph.startSourceSpan, ph.endSourceSpan);\n }\n visitPlaceholder(ph, mapper) {\n return new Placeholder(ph.value, mapper.toPublicName(ph.name), ph.sourceSpan);\n }\n visitIcuPlaceholder(ph, mapper) {\n return new IcuPlaceholder(ph.value, mapper.toPublicName(ph.name), ph.sourceSpan);\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nvar FactoryTarget;\n(function (FactoryTarget) {\n FactoryTarget[FactoryTarget[\"Directive\"] = 0] = \"Directive\";\n FactoryTarget[FactoryTarget[\"Component\"] = 1] = \"Component\";\n FactoryTarget[FactoryTarget[\"Injectable\"] = 2] = \"Injectable\";\n FactoryTarget[FactoryTarget[\"Pipe\"] = 3] = \"Pipe\";\n FactoryTarget[FactoryTarget[\"NgModule\"] = 4] = \"NgModule\";\n})(FactoryTarget || (FactoryTarget = {}));\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Processes `Target`s with a given set of directives and performs a binding operation, which\n * returns an object similar to TypeScript's `ts.TypeChecker` that contains knowledge about the\n * target.\n */\nclass R3TargetBinder {\n constructor(directiveMatcher) {\n this.directiveMatcher = directiveMatcher;\n }\n /**\n * Perform a binding operation on the given `Target` and return a `BoundTarget` which contains\n * metadata about the types referenced in the template.\n */\n bind(target) {\n if (!target.template) {\n // TODO(alxhub): handle targets which contain things like HostBindings, etc.\n throw new Error('Binding without a template not yet supported');\n }\n // First, parse the template into a `Scope` structure. This operation captures the syntactic\n // scopes in the template and makes them available for later use.\n const scope = Scope.apply(target.template);\n // Use the `Scope` to extract the entities present at every level of the template.\n const templateEntities = extractTemplateEntities(scope);\n // Next, perform directive matching on the template using the `DirectiveBinder`. This returns:\n // - directives: Map of nodes (elements & ng-templates) to the directives on them.\n // - bindings: Map of inputs, outputs, and attributes to the directive/element that claims\n // them. TODO(alxhub): handle multiple directives claiming an input/output/etc.\n // - references: Map of #references to their targets.\n const { directives, bindings, references } = DirectiveBinder.apply(target.template, this.directiveMatcher);\n // Finally, run the TemplateBinder to bind references, variables, and other entities within the\n // template. This extracts all the metadata that doesn't depend on directive matching.\n const { expressions, symbols, nestingLevel, usedPipes } = TemplateBinder.applyWithScope(target.template, scope);\n return new R3BoundTarget(target, directives, bindings, references, expressions, symbols, nestingLevel, templateEntities, usedPipes);\n }\n}\n/**\n * Represents a binding scope within a template.\n *\n * Any variables, references, or other named entities declared within the template will\n * be captured and available by name in `namedEntities`. Additionally, child templates will\n * be analyzed and have their child `Scope`s available in `childScopes`.\n */\nclass Scope {\n constructor(parentScope, template) {\n this.parentScope = parentScope;\n this.template = template;\n /**\n * Named members of the `Scope`, such as `Reference`s or `Variable`s.\n */\n this.namedEntities = new Map();\n /**\n * Child `Scope`s for immediately nested `Template`s.\n */\n this.childScopes = new Map();\n }\n static newRootScope() {\n return new Scope(null, null);\n }\n /**\n * Process a template (either as a `Template` sub-template with variables, or a plain array of\n * template `Node`s) and construct its `Scope`.\n */\n static apply(template) {\n const scope = Scope.newRootScope();\n scope.ingest(template);\n return scope;\n }\n /**\n * Internal method to process the template and populate the `Scope`.\n */\n ingest(template) {\n if (template instanceof Template) {\n // Variables on an <ng-template> are defined in the inner scope.\n template.variables.forEach(node => this.visitVariable(node));\n // Process the nodes of the template.\n template.children.forEach(node => node.visit(this));\n }\n else {\n // No overarching `Template` instance, so process the nodes directly.\n template.forEach(node => node.visit(this));\n }\n }\n visitElement(element) {\n // `Element`s in the template may have `Reference`s which are captured in the scope.\n element.references.forEach(node => this.visitReference(node));\n // Recurse into the `Element`'s children.\n element.children.forEach(node => node.visit(this));\n }\n visitTemplate(template) {\n // References on a <ng-template> are defined in the outer scope, so capture them before\n // processing the template's child scope.\n template.references.forEach(node => this.visitReference(node));\n // Next, create an inner scope and process the template within it.\n const scope = new Scope(this, template);\n scope.ingest(template);\n this.childScopes.set(template, scope);\n }\n visitVariable(variable) {\n // Declare the variable if it's not already.\n this.maybeDeclare(variable);\n }\n visitReference(reference) {\n // Declare the variable if it's not already.\n this.maybeDeclare(reference);\n }\n // Unused visitors.\n visitContent(content) { }\n visitBoundAttribute(attr) { }\n visitBoundEvent(event) { }\n visitBoundText(text) { }\n visitText(text) { }\n visitTextAttribute(attr) { }\n visitIcu(icu) { }\n maybeDeclare(thing) {\n // Declare something with a name, as long as that name isn't taken.\n if (!this.namedEntities.has(thing.name)) {\n this.namedEntities.set(thing.name, thing);\n }\n }\n /**\n * Look up a variable within this `Scope`.\n *\n * This can recurse into a parent `Scope` if it's available.\n */\n lookup(name) {\n if (this.namedEntities.has(name)) {\n // Found in the local scope.\n return this.namedEntities.get(name);\n }\n else if (this.parentScope !== null) {\n // Not in the local scope, but there's a parent scope so check there.\n return this.parentScope.lookup(name);\n }\n else {\n // At the top level and it wasn't found.\n return null;\n }\n }\n /**\n * Get the child scope for a `Template`.\n *\n * This should always be defined.\n */\n getChildScope(template) {\n const res = this.childScopes.get(template);\n if (res === undefined) {\n throw new Error(`Assertion error: child scope for ${template} not found`);\n }\n return res;\n }\n}\n/**\n * Processes a template and matches directives on nodes (elements and templates).\n *\n * Usually used via the static `apply()` method.\n */\nclass DirectiveBinder {\n constructor(matcher, directives, bindings, references) {\n this.matcher = matcher;\n this.directives = directives;\n this.bindings = bindings;\n this.references = references;\n }\n /**\n * Process a template (list of `Node`s) and perform directive matching against each node.\n *\n * @param template the list of template `Node`s to match (recursively).\n * @param selectorMatcher a `SelectorMatcher` containing the directives that are in scope for\n * this template.\n * @returns three maps which contain information about directives in the template: the\n * `directives` map which lists directives matched on each node, the `bindings` map which\n * indicates which directives claimed which bindings (inputs, outputs, etc), and the `references`\n * map which resolves #references (`Reference`s) within the template to the named directive or\n * template node.\n */\n static apply(template, selectorMatcher) {\n const directives = new Map();\n const bindings = new Map();\n const references = new Map();\n const matcher = new DirectiveBinder(selectorMatcher, directives, bindings, references);\n matcher.ingest(template);\n return { directives, bindings, references };\n }\n ingest(template) {\n template.forEach(node => node.visit(this));\n }\n visitElement(element) {\n this.visitElementOrTemplate(element.name, element);\n }\n visitTemplate(template) {\n this.visitElementOrTemplate('ng-template', template);\n }\n visitElementOrTemplate(elementName, node) {\n // First, determine the HTML shape of the node for the purpose of directive matching.\n // Do this by building up a `CssSelector` for the node.\n const cssSelector = createCssSelector(elementName, getAttrsForDirectiveMatching(node));\n // Next, use the `SelectorMatcher` to get the list of directives on the node.\n const directives = [];\n this.matcher.match(cssSelector, (_, directive) => directives.push(directive));\n if (directives.length > 0) {\n this.directives.set(node, directives);\n }\n // Resolve any references that are created on this node.\n node.references.forEach(ref => {\n let dirTarget = null;\n // If the reference expression is empty, then it matches the \"primary\" directive on the node\n // (if there is one). Otherwise it matches the host node itself (either an element or\n // <ng-template> node).\n if (ref.value.trim() === '') {\n // This could be a reference to a component if there is one.\n dirTarget = directives.find(dir => dir.isComponent) || null;\n }\n else {\n // This should be a reference to a directive exported via exportAs.\n dirTarget =\n directives.find(dir => dir.exportAs !== null && dir.exportAs.some(value => value === ref.value)) ||\n null;\n // Check if a matching directive was found.\n if (dirTarget === null) {\n // No matching directive was found - this reference points to an unknown target. Leave it\n // unmapped.\n return;\n }\n }\n if (dirTarget !== null) {\n // This reference points to a directive.\n this.references.set(ref, { directive: dirTarget, node });\n }\n else {\n // This reference points to the node itself.\n this.references.set(ref, node);\n }\n });\n const setAttributeBinding = (attribute, ioType) => {\n const dir = directives.find(dir => dir[ioType].hasBindingPropertyName(attribute.name));\n const binding = dir !== undefined ? dir : node;\n this.bindings.set(attribute, binding);\n };\n // Node inputs (bound attributes) and text attributes can be bound to an\n // input on a directive.\n node.inputs.forEach(input => setAttributeBinding(input, 'inputs'));\n node.attributes.forEach(attr => setAttributeBinding(attr, 'inputs'));\n if (node instanceof Template) {\n node.templateAttrs.forEach(attr => setAttributeBinding(attr, 'inputs'));\n }\n // Node outputs (bound events) can be bound to an output on a directive.\n node.outputs.forEach(output => setAttributeBinding(output, 'outputs'));\n // Recurse into the node's children.\n node.children.forEach(child => child.visit(this));\n }\n // Unused visitors.\n visitContent(content) { }\n visitVariable(variable) { }\n visitReference(reference) { }\n visitTextAttribute(attribute) { }\n visitBoundAttribute(attribute) { }\n visitBoundEvent(attribute) { }\n visitBoundAttributeOrEvent(node) { }\n visitText(text) { }\n visitBoundText(text) { }\n visitIcu(icu) { }\n}\n/**\n * Processes a template and extract metadata about expressions and symbols within.\n *\n * This is a companion to the `DirectiveBinder` that doesn't require knowledge of directives matched\n * within the template in order to operate.\n *\n * Expressions are visited by the superclass `RecursiveAstVisitor`, with custom logic provided\n * by overridden methods from that visitor.\n */\nclass TemplateBinder extends RecursiveAstVisitor {\n constructor(bindings, symbols, usedPipes, nestingLevel, scope, template, level) {\n super();\n this.bindings = bindings;\n this.symbols = symbols;\n this.usedPipes = usedPipes;\n this.nestingLevel = nestingLevel;\n this.scope = scope;\n this.template = template;\n this.level = level;\n this.pipesUsed = [];\n // Save a bit of processing time by constructing this closure in advance.\n this.visitNode = (node) => node.visit(this);\n }\n // This method is defined to reconcile the type of TemplateBinder since both\n // RecursiveAstVisitor and Visitor define the visit() method in their\n // interfaces.\n visit(node, context) {\n if (node instanceof AST) {\n node.visit(this, context);\n }\n else {\n node.visit(this);\n }\n }\n /**\n * Process a template and extract metadata about expressions and symbols within.\n *\n * @param template the nodes of the template to process\n * @param scope the `Scope` of the template being processed.\n * @returns three maps which contain metadata about the template: `expressions` which interprets\n * special `AST` nodes in expressions as pointing to references or variables declared within the\n * template, `symbols` which maps those variables and references to the nested `Template` which\n * declares them, if any, and `nestingLevel` which associates each `Template` with a integer\n * nesting level (how many levels deep within the template structure the `Template` is), starting\n * at 1.\n */\n static applyWithScope(template, scope) {\n const expressions = new Map();\n const symbols = new Map();\n const nestingLevel = new Map();\n const usedPipes = new Set();\n // The top-level template has nesting level 0.\n const binder = new TemplateBinder(expressions, symbols, usedPipes, nestingLevel, scope, template instanceof Template ? template : null, 0);\n binder.ingest(template);\n return { expressions, symbols, nestingLevel, usedPipes };\n }\n ingest(template) {\n if (template instanceof Template) {\n // For <ng-template>s, process only variables and child nodes. Inputs, outputs, templateAttrs,\n // and references were all processed in the scope of the containing template.\n template.variables.forEach(this.visitNode);\n template.children.forEach(this.visitNode);\n // Set the nesting level.\n this.nestingLevel.set(template, this.level);\n }\n else {\n // Visit each node from the top-level template.\n template.forEach(this.visitNode);\n }\n }\n visitElement(element) {\n // Visit the inputs, outputs, and children of the element.\n element.inputs.forEach(this.visitNode);\n element.outputs.forEach(this.visitNode);\n element.children.forEach(this.visitNode);\n }\n visitTemplate(template) {\n // First, visit inputs, outputs and template attributes of the template node.\n template.inputs.forEach(this.visitNode);\n template.outputs.forEach(this.visitNode);\n template.templateAttrs.forEach(this.visitNode);\n // References are also evaluated in the outer context.\n template.references.forEach(this.visitNode);\n // Next, recurse into the template using its scope, and bumping the nesting level up by one.\n const childScope = this.scope.getChildScope(template);\n const binder = new TemplateBinder(this.bindings, this.symbols, this.usedPipes, this.nestingLevel, childScope, template, this.level + 1);\n binder.ingest(template);\n }\n visitVariable(variable) {\n // Register the `Variable` as a symbol in the current `Template`.\n if (this.template !== null) {\n this.symbols.set(variable, this.template);\n }\n }\n visitReference(reference) {\n // Register the `Reference` as a symbol in the current `Template`.\n if (this.template !== null) {\n this.symbols.set(reference, this.template);\n }\n }\n // Unused template visitors\n visitText(text) { }\n visitContent(content) { }\n visitTextAttribute(attribute) { }\n visitIcu(icu) {\n Object.keys(icu.vars).forEach(key => icu.vars[key].visit(this));\n Object.keys(icu.placeholders).forEach(key => icu.placeholders[key].visit(this));\n }\n // The remaining visitors are concerned with processing AST expressions within template bindings\n visitBoundAttribute(attribute) {\n attribute.value.visit(this);\n }\n visitBoundEvent(event) {\n event.handler.visit(this);\n }\n visitBoundText(text) {\n text.value.visit(this);\n }\n visitPipe(ast, context) {\n this.usedPipes.add(ast.name);\n return super.visitPipe(ast, context);\n }\n // These five types of AST expressions can refer to expression roots, which could be variables\n // or references in the current scope.\n visitPropertyRead(ast, context) {\n this.maybeMap(context, ast, ast.name);\n return super.visitPropertyRead(ast, context);\n }\n visitSafePropertyRead(ast, context) {\n this.maybeMap(context, ast, ast.name);\n return super.visitSafePropertyRead(ast, context);\n }\n visitPropertyWrite(ast, context) {\n this.maybeMap(context, ast, ast.name);\n return super.visitPropertyWrite(ast, context);\n }\n maybeMap(scope, ast, name) {\n // If the receiver of the expression isn't the `ImplicitReceiver`, this isn't the root of an\n // `AST` expression that maps to a `Variable` or `Reference`.\n if (!(ast.receiver instanceof ImplicitReceiver)) {\n return;\n }\n // Check whether the name exists in the current scope. If so, map it. Otherwise, the name is\n // probably a property on the top-level component context.\n let target = this.scope.lookup(name);\n if (target !== null) {\n this.bindings.set(ast, target);\n }\n }\n}\n/**\n * Metadata container for a `Target` that allows queries for specific bits of metadata.\n *\n * See `BoundTarget` for documentation on the individual methods.\n */\nclass R3BoundTarget {\n constructor(target, directives, bindings, references, exprTargets, symbols, nestingLevel, templateEntities, usedPipes) {\n this.target = target;\n this.directives = directives;\n this.bindings = bindings;\n this.references = references;\n this.exprTargets = exprTargets;\n this.symbols = symbols;\n this.nestingLevel = nestingLevel;\n this.templateEntities = templateEntities;\n this.usedPipes = usedPipes;\n }\n getEntitiesInTemplateScope(template) {\n return this.templateEntities.get(template) ?? new Set();\n }\n getDirectivesOfNode(node) {\n return this.directives.get(node) || null;\n }\n getReferenceTarget(ref) {\n return this.references.get(ref) || null;\n }\n getConsumerOfBinding(binding) {\n return this.bindings.get(binding) || null;\n }\n getExpressionTarget(expr) {\n return this.exprTargets.get(expr) || null;\n }\n getTemplateOfSymbol(symbol) {\n return this.symbols.get(symbol) || null;\n }\n getNestingLevel(template) {\n return this.nestingLevel.get(template) || 0;\n }\n getUsedDirectives() {\n const set = new Set();\n this.directives.forEach(dirs => dirs.forEach(dir => set.add(dir)));\n return Array.from(set.values());\n }\n getUsedPipes() {\n return Array.from(this.usedPipes);\n }\n}\nfunction extractTemplateEntities(rootScope) {\n const entityMap = new Map();\n function extractScopeEntities(scope) {\n if (entityMap.has(scope.template)) {\n return entityMap.get(scope.template);\n }\n const currentEntities = scope.namedEntities;\n let templateEntities;\n if (scope.parentScope !== null) {\n templateEntities = new Map([...extractScopeEntities(scope.parentScope), ...currentEntities]);\n }\n else {\n templateEntities = new Map(currentEntities);\n }\n entityMap.set(scope.template, templateEntities);\n return templateEntities;\n }\n const scopesToProcess = [rootScope];\n while (scopesToProcess.length > 0) {\n const scope = scopesToProcess.pop();\n for (const childScope of scope.childScopes.values()) {\n scopesToProcess.push(childScope);\n }\n extractScopeEntities(scope);\n }\n const templateEntities = new Map();\n for (const [template, entities] of entityMap) {\n templateEntities.set(template, new Set(entities.values()));\n }\n return templateEntities;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction compileClassMetadata(metadata) {\n // Generate an ngDevMode guarded call to setClassMetadata with the class identifier and its\n // metadata.\n const fnCall = importExpr(Identifiers.setClassMetadata).callFn([\n metadata.type,\n metadata.decorators,\n metadata.ctorParameters ?? literal(null),\n metadata.propDecorators ?? literal(null),\n ]);\n const iife = fn([], [devOnlyGuardedExpression(fnCall).toStmt()]);\n return iife.callFn([]);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Every time we make a breaking change to the declaration interface or partial-linker behavior, we\n * must update this constant to prevent old partial-linkers from incorrectly processing the\n * declaration.\n *\n * Do not include any prerelease in these versions as they are ignored.\n */\nconst MINIMUM_PARTIAL_LINKER_VERSION$6 = '12.0.0';\nfunction compileDeclareClassMetadata(metadata) {\n const definitionMap = new DefinitionMap();\n definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$6));\n definitionMap.set('version', literal('14.2.0'));\n definitionMap.set('ngImport', importExpr(Identifiers.core));\n definitionMap.set('type', metadata.type);\n definitionMap.set('decorators', metadata.decorators);\n definitionMap.set('ctorParameters', metadata.ctorParameters);\n definitionMap.set('propDecorators', metadata.propDecorators);\n return importExpr(Identifiers.declareClassMetadata).callFn([definitionMap.toLiteralMap()]);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Creates an array literal expression from the given array, mapping all values to an expression\n * using the provided mapping function. If the array is empty or null, then null is returned.\n *\n * @param values The array to transfer into literal array expression.\n * @param mapper The logic to use for creating an expression for the array's values.\n * @returns An array literal expression representing `values`, or null if `values` is empty or\n * is itself null.\n */\nfunction toOptionalLiteralArray(values, mapper) {\n if (values === null || values.length === 0) {\n return null;\n }\n return literalArr(values.map(value => mapper(value)));\n}\n/**\n * Creates an object literal expression from the given object, mapping all values to an expression\n * using the provided mapping function. If the object has no keys, then null is returned.\n *\n * @param object The object to transfer into an object literal expression.\n * @param mapper The logic to use for creating an expression for the object's values.\n * @returns An object literal expression representing `object`, or null if `object` does not have\n * any keys.\n */\nfunction toOptionalLiteralMap(object, mapper) {\n const entries = Object.keys(object).map(key => {\n const value = object[key];\n return { key, value: mapper(value), quoted: true };\n });\n if (entries.length > 0) {\n return literalMap(entries);\n }\n else {\n return null;\n }\n}\nfunction compileDependencies(deps) {\n if (deps === 'invalid') {\n // The `deps` can be set to the string \"invalid\" by the `unwrapConstructorDependencies()`\n // function, which tries to convert `ConstructorDeps` into `R3DependencyMetadata[]`.\n return literal('invalid');\n }\n else if (deps === null) {\n return literal(null);\n }\n else {\n return literalArr(deps.map(compileDependency));\n }\n}\nfunction compileDependency(dep) {\n const depMeta = new DefinitionMap();\n depMeta.set('token', dep.token);\n if (dep.attributeNameType !== null) {\n depMeta.set('attribute', literal(true));\n }\n if (dep.host) {\n depMeta.set('host', literal(true));\n }\n if (dep.optional) {\n depMeta.set('optional', literal(true));\n }\n if (dep.self) {\n depMeta.set('self', literal(true));\n }\n if (dep.skipSelf) {\n depMeta.set('skipSelf', literal(true));\n }\n return depMeta.toLiteralMap();\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Every time we make a breaking change to the declaration interface or partial-linker behavior, we\n * must update this constant to prevent old partial-linkers from incorrectly processing the\n * declaration.\n *\n * Do not include any prerelease in these versions as they are ignored.\n */\nconst MINIMUM_PARTIAL_LINKER_VERSION$5 = '14.0.0';\n/**\n * Compile a directive declaration defined by the `R3DirectiveMetadata`.\n */\nfunction compileDeclareDirectiveFromMetadata(meta) {\n const definitionMap = createDirectiveDefinitionMap(meta);\n const expression = importExpr(Identifiers.declareDirective).callFn([definitionMap.toLiteralMap()]);\n const type = createDirectiveType(meta);\n return { expression, type, statements: [] };\n}\n/**\n * Gathers the declaration fields for a directive into a `DefinitionMap`. This allows for reusing\n * this logic for components, as they extend the directive metadata.\n */\nfunction createDirectiveDefinitionMap(meta) {\n const definitionMap = new DefinitionMap();\n definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$5));\n definitionMap.set('version', literal('14.2.0'));\n // e.g. `type: MyDirective`\n definitionMap.set('type', meta.internalType);\n if (meta.isStandalone) {\n definitionMap.set('isStandalone', literal(meta.isStandalone));\n }\n // e.g. `selector: 'some-dir'`\n if (meta.selector !== null) {\n definitionMap.set('selector', literal(meta.selector));\n }\n definitionMap.set('inputs', conditionallyCreateMapObjectLiteral(meta.inputs, true));\n definitionMap.set('outputs', conditionallyCreateMapObjectLiteral(meta.outputs));\n definitionMap.set('host', compileHostMetadata(meta.host));\n definitionMap.set('providers', meta.providers);\n if (meta.queries.length > 0) {\n definitionMap.set('queries', literalArr(meta.queries.map(compileQuery)));\n }\n if (meta.viewQueries.length > 0) {\n definitionMap.set('viewQueries', literalArr(meta.viewQueries.map(compileQuery)));\n }\n if (meta.exportAs !== null) {\n definitionMap.set('exportAs', asLiteral(meta.exportAs));\n }\n if (meta.usesInheritance) {\n definitionMap.set('usesInheritance', literal(true));\n }\n if (meta.lifecycle.usesOnChanges) {\n definitionMap.set('usesOnChanges', literal(true));\n }\n definitionMap.set('ngImport', importExpr(Identifiers.core));\n return definitionMap;\n}\n/**\n * Compiles the metadata of a single query into its partial declaration form as declared\n * by `R3DeclareQueryMetadata`.\n */\nfunction compileQuery(query) {\n const meta = new DefinitionMap();\n meta.set('propertyName', literal(query.propertyName));\n if (query.first) {\n meta.set('first', literal(true));\n }\n meta.set('predicate', Array.isArray(query.predicate) ? asLiteral(query.predicate) :\n convertFromMaybeForwardRefExpression(query.predicate));\n if (!query.emitDistinctChangesOnly) {\n // `emitDistinctChangesOnly` is special because we expect it to be `true`.\n // Therefore we explicitly emit the field, and explicitly place it only when it's `false`.\n meta.set('emitDistinctChangesOnly', literal(false));\n }\n else {\n // The linker will assume that an absent `emitDistinctChangesOnly` flag is by default `true`.\n }\n if (query.descendants) {\n meta.set('descendants', literal(true));\n }\n meta.set('read', query.read);\n if (query.static) {\n meta.set('static', literal(true));\n }\n return meta.toLiteralMap();\n}\n/**\n * Compiles the host metadata into its partial declaration form as declared\n * in `R3DeclareDirectiveMetadata['host']`\n */\nfunction compileHostMetadata(meta) {\n const hostMetadata = new DefinitionMap();\n hostMetadata.set('attributes', toOptionalLiteralMap(meta.attributes, expression => expression));\n hostMetadata.set('listeners', toOptionalLiteralMap(meta.listeners, literal));\n hostMetadata.set('properties', toOptionalLiteralMap(meta.properties, literal));\n if (meta.specialAttributes.styleAttr) {\n hostMetadata.set('styleAttribute', literal(meta.specialAttributes.styleAttr));\n }\n if (meta.specialAttributes.classAttr) {\n hostMetadata.set('classAttribute', literal(meta.specialAttributes.classAttr));\n }\n if (hostMetadata.values.length > 0) {\n return hostMetadata.toLiteralMap();\n }\n else {\n return null;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Compile a component declaration defined by the `R3ComponentMetadata`.\n */\nfunction compileDeclareComponentFromMetadata(meta, template, additionalTemplateInfo) {\n const definitionMap = createComponentDefinitionMap(meta, template, additionalTemplateInfo);\n const expression = importExpr(Identifiers.declareComponent).callFn([definitionMap.toLiteralMap()]);\n const type = createComponentType(meta);\n return { expression, type, statements: [] };\n}\n/**\n * Gathers the declaration fields for a component into a `DefinitionMap`.\n */\nfunction createComponentDefinitionMap(meta, template, templateInfo) {\n const definitionMap = createDirectiveDefinitionMap(meta);\n definitionMap.set('template', getTemplateExpression(template, templateInfo));\n if (templateInfo.isInline) {\n definitionMap.set('isInline', literal(true));\n }\n definitionMap.set('styles', toOptionalLiteralArray(meta.styles, literal));\n definitionMap.set('dependencies', compileUsedDependenciesMetadata(meta));\n definitionMap.set('viewProviders', meta.viewProviders);\n definitionMap.set('animations', meta.animations);\n if (meta.changeDetection !== undefined) {\n definitionMap.set('changeDetection', importExpr(Identifiers.ChangeDetectionStrategy)\n .prop(ChangeDetectionStrategy[meta.changeDetection]));\n }\n if (meta.encapsulation !== ViewEncapsulation.Emulated) {\n definitionMap.set('encapsulation', importExpr(Identifiers.ViewEncapsulation).prop(ViewEncapsulation[meta.encapsulation]));\n }\n if (meta.interpolation !== DEFAULT_INTERPOLATION_CONFIG) {\n definitionMap.set('interpolation', literalArr([literal(meta.interpolation.start), literal(meta.interpolation.end)]));\n }\n if (template.preserveWhitespaces === true) {\n definitionMap.set('preserveWhitespaces', literal(true));\n }\n return definitionMap;\n}\nfunction getTemplateExpression(template, templateInfo) {\n // If the template has been defined using a direct literal, we use that expression directly\n // without any modifications. This is ensures proper source mapping from the partially\n // compiled code to the source file declaring the template. Note that this does not capture\n // template literals referenced indirectly through an identifier.\n if (templateInfo.inlineTemplateLiteralExpression !== null) {\n return templateInfo.inlineTemplateLiteralExpression;\n }\n // If the template is defined inline but not through a literal, the template has been resolved\n // through static interpretation. We create a literal but cannot provide any source span. Note\n // that we cannot use the expression defining the template because the linker expects the template\n // to be defined as a literal in the declaration.\n if (templateInfo.isInline) {\n return literal(templateInfo.content, null, null);\n }\n // The template is external so we must synthesize an expression node with\n // the appropriate source-span.\n const contents = templateInfo.content;\n const file = new ParseSourceFile(contents, templateInfo.sourceUrl);\n const start = new ParseLocation(file, 0, 0, 0);\n const end = computeEndLocation(file, contents);\n const span = new ParseSourceSpan(start, end);\n return literal(contents, null, span);\n}\nfunction computeEndLocation(file, contents) {\n const length = contents.length;\n let lineStart = 0;\n let lastLineStart = 0;\n let line = 0;\n do {\n lineStart = contents.indexOf('\\n', lastLineStart);\n if (lineStart !== -1) {\n lastLineStart = lineStart + 1;\n line++;\n }\n } while (lineStart !== -1);\n return new ParseLocation(file, length, line, length - lastLineStart);\n}\nfunction compileUsedDependenciesMetadata(meta) {\n const wrapType = meta.declarationListEmitMode !== 0 /* DeclarationListEmitMode.Direct */ ?\n generateForwardRef :\n (expr) => expr;\n return toOptionalLiteralArray(meta.declarations, decl => {\n switch (decl.kind) {\n case R3TemplateDependencyKind.Directive:\n const dirMeta = new DefinitionMap();\n dirMeta.set('kind', literal(decl.isComponent ? 'component' : 'directive'));\n dirMeta.set('type', wrapType(decl.type));\n dirMeta.set('selector', literal(decl.selector));\n dirMeta.set('inputs', toOptionalLiteralArray(decl.inputs, literal));\n dirMeta.set('outputs', toOptionalLiteralArray(decl.outputs, literal));\n dirMeta.set('exportAs', toOptionalLiteralArray(decl.exportAs, literal));\n return dirMeta.toLiteralMap();\n case R3TemplateDependencyKind.Pipe:\n const pipeMeta = new DefinitionMap();\n pipeMeta.set('kind', literal('pipe'));\n pipeMeta.set('type', wrapType(decl.type));\n pipeMeta.set('name', literal(decl.name));\n return pipeMeta.toLiteralMap();\n case R3TemplateDependencyKind.NgModule:\n const ngModuleMeta = new DefinitionMap();\n ngModuleMeta.set('kind', literal('ngmodule'));\n ngModuleMeta.set('type', wrapType(decl.type));\n return ngModuleMeta.toLiteralMap();\n }\n });\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Every time we make a breaking change to the declaration interface or partial-linker behavior, we\n * must update this constant to prevent old partial-linkers from incorrectly processing the\n * declaration.\n *\n * Do not include any prerelease in these versions as they are ignored.\n */\nconst MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';\nfunction compileDeclareFactoryFunction(meta) {\n const definitionMap = new DefinitionMap();\n definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$4));\n definitionMap.set('version', literal('14.2.0'));\n definitionMap.set('ngImport', importExpr(Identifiers.core));\n definitionMap.set('type', meta.internalType);\n definitionMap.set('deps', compileDependencies(meta.deps));\n definitionMap.set('target', importExpr(Identifiers.FactoryTarget).prop(FactoryTarget$1[meta.target]));\n return {\n expression: importExpr(Identifiers.declareFactory).callFn([definitionMap.toLiteralMap()]),\n statements: [],\n type: createFactoryType(meta),\n };\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Every time we make a breaking change to the declaration interface or partial-linker behavior, we\n * must update this constant to prevent old partial-linkers from incorrectly processing the\n * declaration.\n *\n * Do not include any prerelease in these versions as they are ignored.\n */\nconst MINIMUM_PARTIAL_LINKER_VERSION$3 = '12.0.0';\n/**\n * Compile a Injectable declaration defined by the `R3InjectableMetadata`.\n */\nfunction compileDeclareInjectableFromMetadata(meta) {\n const definitionMap = createInjectableDefinitionMap(meta);\n const expression = importExpr(Identifiers.declareInjectable).callFn([definitionMap.toLiteralMap()]);\n const type = createInjectableType(meta);\n return { expression, type, statements: [] };\n}\n/**\n * Gathers the declaration fields for a Injectable into a `DefinitionMap`.\n */\nfunction createInjectableDefinitionMap(meta) {\n const definitionMap = new DefinitionMap();\n definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$3));\n definitionMap.set('version', literal('14.2.0'));\n definitionMap.set('ngImport', importExpr(Identifiers.core));\n definitionMap.set('type', meta.internalType);\n // Only generate providedIn property if it has a non-null value\n if (meta.providedIn !== undefined) {\n const providedIn = convertFromMaybeForwardRefExpression(meta.providedIn);\n if (providedIn.value !== null) {\n definitionMap.set('providedIn', providedIn);\n }\n }\n if (meta.useClass !== undefined) {\n definitionMap.set('useClass', convertFromMaybeForwardRefExpression(meta.useClass));\n }\n if (meta.useExisting !== undefined) {\n definitionMap.set('useExisting', convertFromMaybeForwardRefExpression(meta.useExisting));\n }\n if (meta.useValue !== undefined) {\n definitionMap.set('useValue', convertFromMaybeForwardRefExpression(meta.useValue));\n }\n // Factories do not contain `ForwardRef`s since any types are already wrapped in a function call\n // so the types will not be eagerly evaluated. Therefore we do not need to process this expression\n // with `convertFromProviderExpression()`.\n if (meta.useFactory !== undefined) {\n definitionMap.set('useFactory', meta.useFactory);\n }\n if (meta.deps !== undefined) {\n definitionMap.set('deps', literalArr(meta.deps.map(compileDependency)));\n }\n return definitionMap;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Every time we make a breaking change to the declaration interface or partial-linker behavior, we\n * must update this constant to prevent old partial-linkers from incorrectly processing the\n * declaration.\n *\n * Do not include any prerelease in these versions as they are ignored.\n */\nconst MINIMUM_PARTIAL_LINKER_VERSION$2 = '12.0.0';\nfunction compileDeclareInjectorFromMetadata(meta) {\n const definitionMap = createInjectorDefinitionMap(meta);\n const expression = importExpr(Identifiers.declareInjector).callFn([definitionMap.toLiteralMap()]);\n const type = createInjectorType(meta);\n return { expression, type, statements: [] };\n}\n/**\n * Gathers the declaration fields for an Injector into a `DefinitionMap`.\n */\nfunction createInjectorDefinitionMap(meta) {\n const definitionMap = new DefinitionMap();\n definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$2));\n definitionMap.set('version', literal('14.2.0'));\n definitionMap.set('ngImport', importExpr(Identifiers.core));\n definitionMap.set('type', meta.internalType);\n definitionMap.set('providers', meta.providers);\n if (meta.imports.length > 0) {\n definitionMap.set('imports', literalArr(meta.imports));\n }\n return definitionMap;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Every time we make a breaking change to the declaration interface or partial-linker behavior, we\n * must update this constant to prevent old partial-linkers from incorrectly processing the\n * declaration.\n *\n * Do not include any prerelease in these versions as they are ignored.\n */\nconst MINIMUM_PARTIAL_LINKER_VERSION$1 = '14.0.0';\nfunction compileDeclareNgModuleFromMetadata(meta) {\n const definitionMap = createNgModuleDefinitionMap(meta);\n const expression = importExpr(Identifiers.declareNgModule).callFn([definitionMap.toLiteralMap()]);\n const type = createNgModuleType(meta);\n return { expression, type, statements: [] };\n}\n/**\n * Gathers the declaration fields for an NgModule into a `DefinitionMap`.\n */\nfunction createNgModuleDefinitionMap(meta) {\n const definitionMap = new DefinitionMap();\n definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$1));\n definitionMap.set('version', literal('14.2.0'));\n definitionMap.set('ngImport', importExpr(Identifiers.core));\n definitionMap.set('type', meta.internalType);\n // We only generate the keys in the metadata if the arrays contain values.\n // We must wrap the arrays inside a function if any of the values are a forward reference to a\n // not-yet-declared class. This is to support JIT execution of the `ɵɵngDeclareNgModule()` call.\n // In the linker these wrappers are stripped and then reapplied for the `ɵɵdefineNgModule()` call.\n if (meta.bootstrap.length > 0) {\n definitionMap.set('bootstrap', refsToArray(meta.bootstrap, meta.containsForwardDecls));\n }\n if (meta.declarations.length > 0) {\n definitionMap.set('declarations', refsToArray(meta.declarations, meta.containsForwardDecls));\n }\n if (meta.imports.length > 0) {\n definitionMap.set('imports', refsToArray(meta.imports, meta.containsForwardDecls));\n }\n if (meta.exports.length > 0) {\n definitionMap.set('exports', refsToArray(meta.exports, meta.containsForwardDecls));\n }\n if (meta.schemas !== null && meta.schemas.length > 0) {\n definitionMap.set('schemas', literalArr(meta.schemas.map(ref => ref.value)));\n }\n if (meta.id !== null) {\n definitionMap.set('id', meta.id);\n }\n return definitionMap;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Every time we make a breaking change to the declaration interface or partial-linker behavior, we\n * must update this constant to prevent old partial-linkers from incorrectly processing the\n * declaration.\n *\n * Do not include any prerelease in these versions as they are ignored.\n */\nconst MINIMUM_PARTIAL_LINKER_VERSION = '14.0.0';\n/**\n * Compile a Pipe declaration defined by the `R3PipeMetadata`.\n */\nfunction compileDeclarePipeFromMetadata(meta) {\n const definitionMap = createPipeDefinitionMap(meta);\n const expression = importExpr(Identifiers.declarePipe).callFn([definitionMap.toLiteralMap()]);\n const type = createPipeType(meta);\n return { expression, type, statements: [] };\n}\n/**\n * Gathers the declaration fields for a Pipe into a `DefinitionMap`.\n */\nfunction createPipeDefinitionMap(meta) {\n const definitionMap = new DefinitionMap();\n definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION));\n definitionMap.set('version', literal('14.2.0'));\n definitionMap.set('ngImport', importExpr(Identifiers.core));\n // e.g. `type: MyPipe`\n definitionMap.set('type', meta.internalType);\n if (meta.isStandalone) {\n definitionMap.set('isStandalone', literal(meta.isStandalone));\n }\n // e.g. `name: \"myPipe\"`\n definitionMap.set('name', literal(meta.pipeName));\n if (meta.pure === false) {\n // e.g. `pure: false`\n definitionMap.set('pure', literal(meta.pure));\n }\n return definitionMap;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// This file only reexports content of the `src` folder. Keep it that way.\n// This function call has a global side effects and publishes the compiler into global namespace for\n// the late binding of the Compiler to the @angular/core for jit compilation.\npublishFacade(_global);\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// This file only reexports content of the `src` folder. Keep it that way.\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport { AST, ASTWithName, ASTWithSource, AbsoluteSourceSpan, ArrayType, AstMemoryEfficientTransformer, AstTransformer, Attribute, Binary, BinaryOperator, BinaryOperatorExpr, BindingPipe, BoundElementProperty, BuiltinType, BuiltinTypeName, CUSTOM_ELEMENTS_SCHEMA, Call, Chain, ChangeDetectionStrategy, CommaExpr, Comment, CompilerConfig, Conditional, ConditionalExpr, ConstantPool, CssSelector, DEFAULT_INTERPOLATION_CONFIG, DYNAMIC_TYPE, DeclareFunctionStmt, DeclareVarStmt, DomElementSchemaRegistry, EOF, Element, ElementSchemaRegistry, EmitterVisitorContext, EmptyExpr, Expansion, ExpansionCase, Expression, ExpressionBinding, ExpressionStatement, ExpressionType, ExternalExpr, ExternalReference, FactoryTarget$1 as FactoryTarget, FunctionExpr, HtmlParser, HtmlTagDefinition, I18NHtmlParser, IfStmt, ImplicitReceiver, InstantiateExpr, Interpolation, InterpolationConfig, InvokeFunctionExpr, JSDocComment, JitEvaluator, KeyedRead, KeyedWrite, LeadingComment, Lexer, LiteralArray, LiteralArrayExpr, LiteralExpr, LiteralMap, LiteralMapExpr, LiteralPrimitive, LocalizedString, MapType, MessageBundle, NONE_TYPE, NO_ERRORS_SCHEMA, NodeWithI18n, NonNullAssert, NotExpr, ParseError, ParseErrorLevel, ParseLocation, ParseSourceFile, ParseSourceSpan, ParseSpan, ParseTreeResult, ParsedEvent, ParsedProperty, ParsedPropertyType, ParsedVariable, Parser$1 as Parser, ParserError, PrefixNot, PropertyRead, PropertyWrite, R3BoundTarget, Identifiers as R3Identifiers, R3SelectorScopeMode, R3TargetBinder, R3TemplateDependencyKind, ReadKeyExpr, ReadPropExpr, ReadVarExpr, RecursiveAstVisitor, RecursiveVisitor, ResourceLoader, ReturnStatement, STRING_TYPE, SafeCall, SafeKeyedRead, SafePropertyRead, SelectorContext, SelectorListContext, SelectorMatcher, Serializer, SplitInterpolation, Statement, StmtModifier, TagContentType, TaggedTemplateExpr, TemplateBindingParseResult, TemplateLiteral, TemplateLiteralElement, Text, ThisReceiver, BoundAttribute as TmplAstBoundAttribute, BoundEvent as TmplAstBoundEvent, BoundText as TmplAstBoundText, Content as TmplAstContent, Element$1 as TmplAstElement, Icu$1 as TmplAstIcu, RecursiveVisitor$1 as TmplAstRecursiveVisitor, Reference as TmplAstReference, Template as TmplAstTemplate, Text$3 as TmplAstText, TextAttribute as TmplAstTextAttribute, Variable as TmplAstVariable, Token, TokenType, TreeError, Type, TypeModifier, TypeofExpr, Unary, UnaryOperator, UnaryOperatorExpr, VERSION, VariableBinding, Version, ViewEncapsulation, WrappedNodeExpr, WriteKeyExpr, WritePropExpr, WriteVarExpr, Xliff, Xliff2, Xmb, XmlParser, Xtb, _ParseAST, compileClassMetadata, compileComponentFromMetadata, compileDeclareClassMetadata, compileDeclareComponentFromMetadata, compileDeclareDirectiveFromMetadata, compileDeclareFactoryFunction, compileDeclareInjectableFromMetadata, compileDeclareInjectorFromMetadata, compileDeclareNgModuleFromMetadata, compileDeclarePipeFromMetadata, compileDirectiveFromMetadata, compileFactoryFunction, compileInjectable, compileInjector, compileNgModule, compilePipeFromMetadata, computeMsgId, core, createInjectableType, createMayBeForwardRefExpression, devOnlyGuardedExpression, emitDistinctChangesOnlyDefaultValue, getHtmlTagDefinition, getNsPrefix, getSafePropertyAccessString, identifierName, isIdentifier, isNgContainer, isNgContent, isNgTemplate, jsDocComment, leadingComment, literalMap, makeBindingParser, mergeNsAndName, output_ast as outputAst, parseHostBindings, parseTemplate, preserveWhitespacesDefault, publishFacade, r3JitTypeSourceSpan, sanitizeIdentifier, splitNsName, verifyHostBindings, visitAll };\n","/**\n * @license Angular v14.2.0\n * (c) 2010-2022 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport { computeMsgId } from '@angular/compiler';\nexport { computeMsgId as ɵcomputeMsgId } from '@angular/compiler';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * The character used to mark the start and end of a \"block\" in a `$localize` tagged string.\n * A block can indicate metadata about the message or specify a name of a placeholder for a\n * substitution expressions.\n *\n * For example:\n *\n * ```ts\n * $localize`Hello, ${title}:title:!`;\n * $localize`:meaning|description@@id:source message text`;\n * ```\n */\nconst BLOCK_MARKER$1 = ':';\n/**\n * The marker used to separate a message's \"meaning\" from its \"description\" in a metadata block.\n *\n * For example:\n *\n * ```ts\n * $localize `:correct|Indicates that the user got the answer correct: Right!`;\n * $localize `:movement|Button label for moving to the right: Right!`;\n * ```\n */\nconst MEANING_SEPARATOR = '|';\n/**\n * The marker used to separate a message's custom \"id\" from its \"description\" in a metadata block.\n *\n * For example:\n *\n * ```ts\n * $localize `:A welcome message on the home page@@myApp-homepage-welcome: Welcome!`;\n * ```\n */\nconst ID_SEPARATOR = '@@';\n/**\n * The marker used to separate legacy message ids from the rest of a metadata block.\n *\n * For example:\n *\n * ```ts\n * $localize `:@@custom-id␟2df64767cd895a8fabe3e18b94b5b6b6f9e2e3f0: Welcome!`;\n * ```\n *\n * Note that this character is the \"symbol for the unit separator\" (␟) not the \"unit separator\n * character\" itself, since that has no visual representation. See https://graphemica.com/%E2%90%9F.\n *\n * Here is some background for the original \"unit separator character\":\n * https://stackoverflow.com/questions/8695118/whats-the-file-group-record-unit-separator-control-characters-and-its-usage\n */\nconst LEGACY_ID_INDICATOR = '\\u241F';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Parse a `$localize` tagged string into a structure that can be used for translation or\n * extraction.\n *\n * See `ParsedMessage` for an example.\n */\nfunction parseMessage(messageParts, expressions, location, messagePartLocations, expressionLocations = []) {\n const substitutions = {};\n const substitutionLocations = {};\n const associatedMessageIds = {};\n const metadata = parseMetadata(messageParts[0], messageParts.raw[0]);\n const cleanedMessageParts = [metadata.text];\n const placeholderNames = [];\n let messageString = metadata.text;\n for (let i = 1; i < messageParts.length; i++) {\n const { messagePart, placeholderName = computePlaceholderName(i), associatedMessageId } = parsePlaceholder(messageParts[i], messageParts.raw[i]);\n messageString += `{$${placeholderName}}${messagePart}`;\n if (expressions !== undefined) {\n substitutions[placeholderName] = expressions[i - 1];\n substitutionLocations[placeholderName] = expressionLocations[i - 1];\n }\n placeholderNames.push(placeholderName);\n if (associatedMessageId !== undefined) {\n associatedMessageIds[placeholderName] = associatedMessageId;\n }\n cleanedMessageParts.push(messagePart);\n }\n const messageId = metadata.customId || computeMsgId(messageString, metadata.meaning || '');\n const legacyIds = metadata.legacyIds ? metadata.legacyIds.filter(id => id !== messageId) : [];\n return {\n id: messageId,\n legacyIds,\n substitutions,\n substitutionLocations,\n text: messageString,\n customId: metadata.customId,\n meaning: metadata.meaning || '',\n description: metadata.description || '',\n messageParts: cleanedMessageParts,\n messagePartLocations,\n placeholderNames,\n associatedMessageIds,\n location,\n };\n}\n/**\n * Parse the given message part (`cooked` + `raw`) to extract the message metadata from the text.\n *\n * If the message part has a metadata block this function will extract the `meaning`,\n * `description`, `customId` and `legacyId` (if provided) from the block. These metadata properties\n * are serialized in the string delimited by `|`, `@@` and `␟` respectively.\n *\n * (Note that `␟` is the `LEGACY_ID_INDICATOR` - see `constants.ts`.)\n *\n * For example:\n *\n * ```ts\n * `:meaning|description@@custom-id:`\n * `:meaning|@@custom-id:`\n * `:meaning|description:`\n * `:description@@custom-id:`\n * `:meaning|:`\n * `:description:`\n * `:@@custom-id:`\n * `:meaning|description@@custom-id␟legacy-id-1␟legacy-id-2:`\n * ```\n *\n * @param cooked The cooked version of the message part to parse.\n * @param raw The raw version of the message part to parse.\n * @returns A object containing any metadata that was parsed from the message part.\n */\nfunction parseMetadata(cooked, raw) {\n const { text: messageString, block } = splitBlock(cooked, raw);\n if (block === undefined) {\n return { text: messageString };\n }\n else {\n const [meaningDescAndId, ...legacyIds] = block.split(LEGACY_ID_INDICATOR);\n const [meaningAndDesc, customId] = meaningDescAndId.split(ID_SEPARATOR, 2);\n let [meaning, description] = meaningAndDesc.split(MEANING_SEPARATOR, 2);\n if (description === undefined) {\n description = meaning;\n meaning = undefined;\n }\n if (description === '') {\n description = undefined;\n }\n return { text: messageString, meaning, description, customId, legacyIds };\n }\n}\n/**\n * Parse the given message part (`cooked` + `raw`) to extract any placeholder metadata from the\n * text.\n *\n * If the message part has a metadata block this function will extract the `placeholderName` and\n * `associatedMessageId` (if provided) from the block.\n *\n * These metadata properties are serialized in the string delimited by `@@`.\n *\n * For example:\n *\n * ```ts\n * `:placeholder-name@@associated-id:`\n * ```\n *\n * @param cooked The cooked version of the message part to parse.\n * @param raw The raw version of the message part to parse.\n * @returns A object containing the metadata (`placeholderName` and `associatedMessageId`) of the\n * preceding placeholder, along with the static text that follows.\n */\nfunction parsePlaceholder(cooked, raw) {\n const { text: messagePart, block } = splitBlock(cooked, raw);\n if (block === undefined) {\n return { messagePart };\n }\n else {\n const [placeholderName, associatedMessageId] = block.split(ID_SEPARATOR);\n return { messagePart, placeholderName, associatedMessageId };\n }\n}\n/**\n * Split a message part (`cooked` + `raw`) into an optional delimited \"block\" off the front and the\n * rest of the text of the message part.\n *\n * Blocks appear at the start of message parts. They are delimited by a colon `:` character at the\n * start and end of the block.\n *\n * If the block is in the first message part then it will be metadata about the whole message:\n * meaning, description, id. Otherwise it will be metadata about the immediately preceding\n * substitution: placeholder name.\n *\n * Since blocks are optional, it is possible that the content of a message block actually starts\n * with a block marker. In this case the marker must be escaped `\\:`.\n *\n * @param cooked The cooked version of the message part to parse.\n * @param raw The raw version of the message part to parse.\n * @returns An object containing the `text` of the message part and the text of the `block`, if it\n * exists.\n * @throws an error if the `block` is unterminated\n */\nfunction splitBlock(cooked, raw) {\n if (raw.charAt(0) !== BLOCK_MARKER$1) {\n return { text: cooked };\n }\n else {\n const endOfBlock = findEndOfBlock(cooked, raw);\n return {\n block: cooked.substring(1, endOfBlock),\n text: cooked.substring(endOfBlock + 1),\n };\n }\n}\nfunction computePlaceholderName(index) {\n return index === 1 ? 'PH' : `PH_${index - 1}`;\n}\n/**\n * Find the end of a \"marked block\" indicated by the first non-escaped colon.\n *\n * @param cooked The cooked string (where escaped chars have been processed)\n * @param raw The raw string (where escape sequences are still in place)\n *\n * @returns the index of the end of block marker\n * @throws an error if the block is unterminated\n */\nfunction findEndOfBlock(cooked, raw) {\n for (let cookedIndex = 1, rawIndex = 1; cookedIndex < cooked.length; cookedIndex++, rawIndex++) {\n if (raw[rawIndex] === '\\\\') {\n rawIndex++;\n }\n else if (cooked[cookedIndex] === BLOCK_MARKER$1) {\n return cookedIndex;\n }\n }\n throw new Error(`Unterminated $localize metadata block in \"${raw}\".`);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass MissingTranslationError extends Error {\n constructor(parsedMessage) {\n super(`No translation found for ${describeMessage(parsedMessage)}.`);\n this.parsedMessage = parsedMessage;\n this.type = 'MissingTranslationError';\n }\n}\nfunction isMissingTranslationError(e) {\n return e.type === 'MissingTranslationError';\n}\n/**\n * Translate the text of the `$localize` tagged-string (i.e. `messageParts` and\n * `substitutions`) using the given `translations`.\n *\n * The tagged-string is parsed to extract its `messageId` which is used to find an appropriate\n * `ParsedTranslation`. If this doesn't match and there are legacy ids then try matching a\n * translation using those.\n *\n * If one is found then it is used to translate the message into a new set of `messageParts` and\n * `substitutions`.\n * The translation may reorder (or remove) substitutions as appropriate.\n *\n * If there is no translation with a matching message id then an error is thrown.\n * If a translation contains a placeholder that is not found in the message being translated then an\n * error is thrown.\n */\nfunction translate$1(translations, messageParts, substitutions) {\n const message = parseMessage(messageParts, substitutions);\n // Look up the translation using the messageId, and then the legacyId if available.\n let translation = translations[message.id];\n // If the messageId did not match a translation, try matching the legacy ids instead\n if (message.legacyIds !== undefined) {\n for (let i = 0; i < message.legacyIds.length && translation === undefined; i++) {\n translation = translations[message.legacyIds[i]];\n }\n }\n if (translation === undefined) {\n throw new MissingTranslationError(message);\n }\n return [\n translation.messageParts, translation.placeholderNames.map(placeholder => {\n if (message.substitutions.hasOwnProperty(placeholder)) {\n return message.substitutions[placeholder];\n }\n else {\n throw new Error(`There is a placeholder name mismatch with the translation provided for the message ${describeMessage(message)}.\\n` +\n `The translation contains a placeholder with name ${placeholder}, which does not exist in the message.`);\n }\n })\n ];\n}\n/**\n * Parse the `messageParts` and `placeholderNames` out of a target `message`.\n *\n * Used by `loadTranslations()` to convert target message strings into a structure that is more\n * appropriate for doing translation.\n *\n * @param message the message to be parsed.\n */\nfunction parseTranslation(messageString) {\n const parts = messageString.split(/{\\$([^}]*)}/);\n const messageParts = [parts[0]];\n const placeholderNames = [];\n for (let i = 1; i < parts.length - 1; i += 2) {\n placeholderNames.push(parts[i]);\n messageParts.push(`${parts[i + 1]}`);\n }\n const rawMessageParts = messageParts.map(part => part.charAt(0) === BLOCK_MARKER$1 ? '\\\\' + part : part);\n return {\n text: messageString,\n messageParts: makeTemplateObject(messageParts, rawMessageParts),\n placeholderNames,\n };\n}\n/**\n * Create a `ParsedTranslation` from a set of `messageParts` and `placeholderNames`.\n *\n * @param messageParts The message parts to appear in the ParsedTranslation.\n * @param placeholderNames The names of the placeholders to intersperse between the `messageParts`.\n */\nfunction makeParsedTranslation(messageParts, placeholderNames = []) {\n let messageString = messageParts[0];\n for (let i = 0; i < placeholderNames.length; i++) {\n messageString += `{$${placeholderNames[i]}}${messageParts[i + 1]}`;\n }\n return {\n text: messageString,\n messageParts: makeTemplateObject(messageParts, messageParts),\n placeholderNames\n };\n}\n/**\n * Create the specialized array that is passed to tagged-string tag functions.\n *\n * @param cooked The message parts with their escape codes processed.\n * @param raw The message parts with their escaped codes as-is.\n */\nfunction makeTemplateObject(cooked, raw) {\n Object.defineProperty(cooked, 'raw', { value: raw });\n return cooked;\n}\nfunction describeMessage(message) {\n const meaningString = message.meaning && ` - \"${message.meaning}\"`;\n const legacy = message.legacyIds && message.legacyIds.length > 0 ?\n ` [${message.legacyIds.map(l => `\"${l}\"`).join(', ')}]` :\n '';\n return `\"${message.id}\"${legacy} (\"${message.text}\"${meaningString})`;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Load translations for use by `$localize`, if doing runtime translation.\n *\n * If the `$localize` tagged strings are not going to be replaced at compiled time, it is possible\n * to load a set of translations that will be applied to the `$localize` tagged strings at runtime,\n * in the browser.\n *\n * Loading a new translation will overwrite a previous translation if it has the same `MessageId`.\n *\n * Note that `$localize` messages are only processed once, when the tagged string is first\n * encountered, and does not provide dynamic language changing without refreshing the browser.\n * Loading new translations later in the application life-cycle will not change the translated text\n * of messages that have already been translated.\n *\n * The message IDs and translations are in the same format as that rendered to \"simple JSON\"\n * translation files when extracting messages. In particular, placeholders in messages are rendered\n * using the `{$PLACEHOLDER_NAME}` syntax. For example the message from the following template:\n *\n * ```html\n * <div i18n>pre<span>inner-pre<b>bold</b>inner-post</span>post</div>\n * ```\n *\n * would have the following form in the `translations` map:\n *\n * ```ts\n * {\n * \"2932901491976224757\":\n * \"pre{$START_TAG_SPAN}inner-pre{$START_BOLD_TEXT}bold{$CLOSE_BOLD_TEXT}inner-post{$CLOSE_TAG_SPAN}post\"\n * }\n * ```\n *\n * @param translations A map from message ID to translated message.\n *\n * These messages are processed and added to a lookup based on their `MessageId`.\n *\n * @see `clearTranslations()` for removing translations loaded using this function.\n * @see `$localize` for tagging messages as needing to be translated.\n * @publicApi\n */\nfunction loadTranslations(translations) {\n // Ensure the translate function exists\n if (!$localize.translate) {\n $localize.translate = translate;\n }\n if (!$localize.TRANSLATIONS) {\n $localize.TRANSLATIONS = {};\n }\n Object.keys(translations).forEach(key => {\n $localize.TRANSLATIONS[key] = parseTranslation(translations[key]);\n });\n}\n/**\n * Remove all translations for `$localize`, if doing runtime translation.\n *\n * All translations that had been loading into memory using `loadTranslations()` will be removed.\n *\n * @see `loadTranslations()` for loading translations at runtime.\n * @see `$localize` for tagging messages as needing to be translated.\n *\n * @publicApi\n */\nfunction clearTranslations() {\n $localize.translate = undefined;\n $localize.TRANSLATIONS = {};\n}\n/**\n * Translate the text of the given message, using the loaded translations.\n *\n * This function may reorder (or remove) substitutions as indicated in the matching translation.\n */\nfunction translate(messageParts, substitutions) {\n try {\n return translate$1($localize.TRANSLATIONS, messageParts, substitutions);\n }\n catch (e) {\n console.warn(e.message);\n return [messageParts, substitutions];\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Always use __globalThis if available, which is the spec-defined global variable across all\n// environments, then fallback to __global first, because in Node tests both __global and\n// __window may be defined and _global should be __global in that case. Note: Typeof/Instanceof\n// checks are considered side-effects in Terser. We explicitly mark this as side-effect free:\n// https://github.com/terser/terser/issues/250.\nconst _global = ( /* @__PURE__ */(() => (typeof globalThis !== 'undefined' && globalThis) ||\n (typeof global !== 'undefined' && global) || (typeof window !== 'undefined' && window) ||\n (typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' &&\n self instanceof WorkerGlobalScope && self))());\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Tag a template literal string for localization.\n *\n * For example:\n *\n * ```ts\n * $localize `some string to localize`\n * ```\n *\n * **Providing meaning, description and id**\n *\n * You can optionally specify one or more of `meaning`, `description` and `id` for a localized\n * string by pre-pending it with a colon delimited block of the form:\n *\n * ```ts\n * $localize`:meaning|description@@id:source message text`;\n *\n * $localize`:meaning|:source message text`;\n * $localize`:description:source message text`;\n * $localize`:@@id:source message text`;\n * ```\n *\n * This format is the same as that used for `i18n` markers in Angular templates. See the\n * [Angular i18n guide](guide/i18n-common-prepare#mark-text-in-component-template).\n *\n * **Naming placeholders**\n *\n * If the template literal string contains expressions, then the expressions will be automatically\n * associated with placeholder names for you.\n *\n * For example:\n *\n * ```ts\n * $localize `Hi ${name}! There are ${items.length} items.`;\n * ```\n *\n * will generate a message-source of `Hi {$PH}! There are {$PH_1} items`.\n *\n * The recommended practice is to name the placeholder associated with each expression though.\n *\n * Do this by providing the placeholder name wrapped in `:` characters directly after the\n * expression. These placeholder names are stripped out of the rendered localized string.\n *\n * For example, to name the `items.length` expression placeholder `itemCount` you write:\n *\n * ```ts\n * $localize `There are ${items.length}:itemCount: items`;\n * ```\n *\n * **Escaping colon markers**\n *\n * If you need to use a `:` character directly at the start of a tagged string that has no\n * metadata block, or directly after a substitution expression that has no name you must escape\n * the `:` by preceding it with a backslash:\n *\n * For example:\n *\n * ```ts\n * // message has a metadata block so no need to escape colon\n * $localize `:some description::this message starts with a colon (:)`;\n * // no metadata block so the colon must be escaped\n * $localize `\\:this message starts with a colon (:)`;\n * ```\n *\n * ```ts\n * // named substitution so no need to escape colon\n * $localize `${label}:label:: ${}`\n * // anonymous substitution so colon must be escaped\n * $localize `${label}\\: ${}`\n * ```\n *\n * **Processing localized strings:**\n *\n * There are three scenarios:\n *\n * * **compile-time inlining**: the `$localize` tag is transformed at compile time by a\n * transpiler, removing the tag and replacing the template literal string with a translated\n * literal string from a collection of translations provided to the transpilation tool.\n *\n * * **run-time evaluation**: the `$localize` tag is a run-time function that replaces and\n * reorders the parts (static strings and expressions) of the template literal string with strings\n * from a collection of translations loaded at run-time.\n *\n * * **pass-through evaluation**: the `$localize` tag is a run-time function that simply evaluates\n * the original template literal string without applying any translations to the parts. This\n * version is used during development or where there is no need to translate the localized\n * template literals.\n *\n * @param messageParts a collection of the static parts of the template string.\n * @param expressions a collection of the values of each placeholder in the template string.\n * @returns the translated string, with the `messageParts` and `expressions` interleaved together.\n *\n * @globalApi\n * @publicApi\n */\nconst $localize$1 = function (messageParts, ...expressions) {\n if ($localize$1.translate) {\n // Don't use array expansion here to avoid the compiler adding `__read()` helper unnecessarily.\n const translation = $localize$1.translate(messageParts, expressions);\n messageParts = translation[0];\n expressions = translation[1];\n }\n let message = stripBlock(messageParts[0], messageParts.raw[0]);\n for (let i = 1; i < messageParts.length; i++) {\n message += expressions[i - 1] + stripBlock(messageParts[i], messageParts.raw[i]);\n }\n return message;\n};\nconst BLOCK_MARKER = ':';\n/**\n * Strip a delimited \"block\" from the start of the `messagePart`, if it is found.\n *\n * If a marker character (:) actually appears in the content at the start of a tagged string or\n * after a substitution expression, where a block has not been provided the character must be\n * escaped with a backslash, `\\:`. This function checks for this by looking at the `raw`\n * messagePart, which should still contain the backslash.\n *\n * @param messagePart The cooked message part to process.\n * @param rawMessagePart The raw message part to check.\n * @returns the message part with the placeholder name stripped, if found.\n * @throws an error if the block is unterminated\n */\nfunction stripBlock(messagePart, rawMessagePart) {\n return rawMessagePart.charAt(0) === BLOCK_MARKER ?\n messagePart.substring(findEndOfBlock(messagePart, rawMessagePart) + 1) :\n messagePart;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport { clearTranslations, loadTranslations, $localize$1 as ɵ$localize, MissingTranslationError as ɵMissingTranslationError, _global as ɵ_global, findEndOfBlock as ɵfindEndOfBlock, isMissingTranslationError as ɵisMissingTranslationError, makeParsedTranslation as ɵmakeParsedTranslation, makeTemplateObject as ɵmakeTemplateObject, parseMessage as ɵparseMessage, parseMetadata as ɵparseMetadata, parseTranslation as ɵparseTranslation, splitBlock as ɵsplitBlock, translate$1 as ɵtranslate };\n","/**\n * @license Angular v14.2.0\n * (c) 2010-2022 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport { ɵ_global, ɵ$localize } from '@angular/localize';\nexport { ɵ$localize as $localize } from '@angular/localize';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Attach $localize to the global context, as a side-effect of this module.\nɵ_global.$localize = ɵ$localize;\n","'use strict';\n/**\n * @license Angular v14.2.0-next.0\n * (c) 2010-2022 Google LLC. https://angular.io/\n * License: MIT\n */\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n((function (global) {\n const performance = global['performance'];\n function mark(name) {\n performance && performance['mark'] && performance['mark'](name);\n }\n function performanceMeasure(name, label) {\n performance && performance['measure'] && performance['measure'](name, label);\n }\n mark('Zone');\n // Initialize before it's accessed below.\n // __Zone_symbol_prefix global can be used to override the default zone\n // symbol prefix with a custom one if needed.\n const symbolPrefix = global['__Zone_symbol_prefix'] || '__zone_symbol__';\n function __symbol__(name) {\n return symbolPrefix + name;\n }\n const checkDuplicate = global[__symbol__('forceDuplicateZoneCheck')] === true;\n if (global['Zone']) {\n // if global['Zone'] already exists (maybe zone.js was already loaded or\n // some other lib also registered a global object named Zone), we may need\n // to throw an error, but sometimes user may not want this error.\n // For example,\n // we have two web pages, page1 includes zone.js, page2 doesn't.\n // and the 1st time user load page1 and page2, everything work fine,\n // but when user load page2 again, error occurs because global['Zone'] already exists.\n // so we add a flag to let user choose whether to throw this error or not.\n // By default, if existing Zone is from zone.js, we will not throw the error.\n if (checkDuplicate || typeof global['Zone'].__symbol__ !== 'function') {\n throw new Error('Zone already loaded.');\n }\n else {\n return global['Zone'];\n }\n }\n class Zone {\n constructor(parent, zoneSpec) {\n this._parent = parent;\n this._name = zoneSpec ? zoneSpec.name || 'unnamed' : '<root>';\n this._properties = zoneSpec && zoneSpec.properties || {};\n this._zoneDelegate =\n new _ZoneDelegate(this, this._parent && this._parent._zoneDelegate, zoneSpec);\n }\n static assertZonePatched() {\n if (global['Promise'] !== patches['ZoneAwarePromise']) {\n throw new Error('Zone.js has detected that ZoneAwarePromise `(window|global).Promise` ' +\n 'has been overwritten.\\n' +\n 'Most likely cause is that a Promise polyfill has been loaded ' +\n 'after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. ' +\n 'If you must load one, do so before loading zone.js.)');\n }\n }\n static get root() {\n let zone = Zone.current;\n while (zone.parent) {\n zone = zone.parent;\n }\n return zone;\n }\n static get current() {\n return _currentZoneFrame.zone;\n }\n static get currentTask() {\n return _currentTask;\n }\n // tslint:disable-next-line:require-internal-with-underscore\n static __load_patch(name, fn, ignoreDuplicate = false) {\n if (patches.hasOwnProperty(name)) {\n // `checkDuplicate` option is defined from global variable\n // so it works for all modules.\n // `ignoreDuplicate` can work for the specified module\n if (!ignoreDuplicate && checkDuplicate) {\n throw Error('Already loaded patch: ' + name);\n }\n }\n else if (!global['__Zone_disable_' + name]) {\n const perfName = 'Zone:' + name;\n mark(perfName);\n patches[name] = fn(global, Zone, _api);\n performanceMeasure(perfName, perfName);\n }\n }\n get parent() {\n return this._parent;\n }\n get name() {\n return this._name;\n }\n get(key) {\n const zone = this.getZoneWith(key);\n if (zone)\n return zone._properties[key];\n }\n getZoneWith(key) {\n let current = this;\n while (current) {\n if (current._properties.hasOwnProperty(key)) {\n return current;\n }\n current = current._parent;\n }\n return null;\n }\n fork(zoneSpec) {\n if (!zoneSpec)\n throw new Error('ZoneSpec required!');\n return this._zoneDelegate.fork(this, zoneSpec);\n }\n wrap(callback, source) {\n if (typeof callback !== 'function') {\n throw new Error('Expecting function got: ' + callback);\n }\n const _callback = this._zoneDelegate.intercept(this, callback, source);\n const zone = this;\n return function () {\n return zone.runGuarded(_callback, this, arguments, source);\n };\n }\n run(callback, applyThis, applyArgs, source) {\n _currentZoneFrame = { parent: _currentZoneFrame, zone: this };\n try {\n return this._zoneDelegate.invoke(this, callback, applyThis, applyArgs, source);\n }\n finally {\n _currentZoneFrame = _currentZoneFrame.parent;\n }\n }\n runGuarded(callback, applyThis = null, applyArgs, source) {\n _currentZoneFrame = { parent: _currentZoneFrame, zone: this };\n try {\n try {\n return this._zoneDelegate.invoke(this, callback, applyThis, applyArgs, source);\n }\n catch (error) {\n if (this._zoneDelegate.handleError(this, error)) {\n throw error;\n }\n }\n }\n finally {\n _currentZoneFrame = _currentZoneFrame.parent;\n }\n }\n runTask(task, applyThis, applyArgs) {\n if (task.zone != this) {\n throw new Error('A task can only be run in the zone of creation! (Creation: ' +\n (task.zone || NO_ZONE).name + '; Execution: ' + this.name + ')');\n }\n // https://github.com/angular/zone.js/issues/778, sometimes eventTask\n // will run in notScheduled(canceled) state, we should not try to\n // run such kind of task but just return\n if (task.state === notScheduled && (task.type === eventTask || task.type === macroTask)) {\n return;\n }\n const reEntryGuard = task.state != running;\n reEntryGuard && task._transitionTo(running, scheduled);\n task.runCount++;\n const previousTask = _currentTask;\n _currentTask = task;\n _currentZoneFrame = { parent: _currentZoneFrame, zone: this };\n try {\n if (task.type == macroTask && task.data && !task.data.isPeriodic) {\n task.cancelFn = undefined;\n }\n try {\n return this._zoneDelegate.invokeTask(this, task, applyThis, applyArgs);\n }\n catch (error) {\n if (this._zoneDelegate.handleError(this, error)) {\n throw error;\n }\n }\n }\n finally {\n // if the task's state is notScheduled or unknown, then it has already been cancelled\n // we should not reset the state to scheduled\n if (task.state !== notScheduled && task.state !== unknown) {\n if (task.type == eventTask || (task.data && task.data.isPeriodic)) {\n reEntryGuard && task._transitionTo(scheduled, running);\n }\n else {\n task.runCount = 0;\n this._updateTaskCount(task, -1);\n reEntryGuard &&\n task._transitionTo(notScheduled, running, notScheduled);\n }\n }\n _currentZoneFrame = _currentZoneFrame.parent;\n _currentTask = previousTask;\n }\n }\n scheduleTask(task) {\n if (task.zone && task.zone !== this) {\n // check if the task was rescheduled, the newZone\n // should not be the children of the original zone\n let newZone = this;\n while (newZone) {\n if (newZone === task.zone) {\n throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${task.zone.name}`);\n }\n newZone = newZone.parent;\n }\n }\n task._transitionTo(scheduling, notScheduled);\n const zoneDelegates = [];\n task._zoneDelegates = zoneDelegates;\n task._zone = this;\n try {\n task = this._zoneDelegate.scheduleTask(this, task);\n }\n catch (err) {\n // should set task's state to unknown when scheduleTask throw error\n // because the err may from reschedule, so the fromState maybe notScheduled\n task._transitionTo(unknown, scheduling, notScheduled);\n // TODO: @JiaLiPassion, should we check the result from handleError?\n this._zoneDelegate.handleError(this, err);\n throw err;\n }\n if (task._zoneDelegates === zoneDelegates) {\n // we have to check because internally the delegate can reschedule the task.\n this._updateTaskCount(task, 1);\n }\n if (task.state == scheduling) {\n task._transitionTo(scheduled, scheduling);\n }\n return task;\n }\n scheduleMicroTask(source, callback, data, customSchedule) {\n return this.scheduleTask(new ZoneTask(microTask, source, callback, data, customSchedule, undefined));\n }\n scheduleMacroTask(source, callback, data, customSchedule, customCancel) {\n return this.scheduleTask(new ZoneTask(macroTask, source, callback, data, customSchedule, customCancel));\n }\n scheduleEventTask(source, callback, data, customSchedule, customCancel) {\n return this.scheduleTask(new ZoneTask(eventTask, source, callback, data, customSchedule, customCancel));\n }\n cancelTask(task) {\n if (task.zone != this)\n throw new Error('A task can only be cancelled in the zone of creation! (Creation: ' +\n (task.zone || NO_ZONE).name + '; Execution: ' + this.name + ')');\n task._transitionTo(canceling, scheduled, running);\n try {\n this._zoneDelegate.cancelTask(this, task);\n }\n catch (err) {\n // if error occurs when cancelTask, transit the state to unknown\n task._transitionTo(unknown, canceling);\n this._zoneDelegate.handleError(this, err);\n throw err;\n }\n this._updateTaskCount(task, -1);\n task._transitionTo(notScheduled, canceling);\n task.runCount = 0;\n return task;\n }\n _updateTaskCount(task, count) {\n const zoneDelegates = task._zoneDelegates;\n if (count == -1) {\n task._zoneDelegates = null;\n }\n for (let i = 0; i < zoneDelegates.length; i++) {\n zoneDelegates[i]._updateTaskCount(task.type, count);\n }\n }\n }\n // tslint:disable-next-line:require-internal-with-underscore\n Zone.__symbol__ = __symbol__;\n const DELEGATE_ZS = {\n name: '',\n onHasTask: (delegate, _, target, hasTaskState) => delegate.hasTask(target, hasTaskState),\n onScheduleTask: (delegate, _, target, task) => delegate.scheduleTask(target, task),\n onInvokeTask: (delegate, _, target, task, applyThis, applyArgs) => delegate.invokeTask(target, task, applyThis, applyArgs),\n onCancelTask: (delegate, _, target, task) => delegate.cancelTask(target, task)\n };\n class _ZoneDelegate {\n constructor(zone, parentDelegate, zoneSpec) {\n this._taskCounts = { 'microTask': 0, 'macroTask': 0, 'eventTask': 0 };\n this.zone = zone;\n this._parentDelegate = parentDelegate;\n this._forkZS = zoneSpec && (zoneSpec && zoneSpec.onFork ? zoneSpec : parentDelegate._forkZS);\n this._forkDlgt = zoneSpec && (zoneSpec.onFork ? parentDelegate : parentDelegate._forkDlgt);\n this._forkCurrZone =\n zoneSpec && (zoneSpec.onFork ? this.zone : parentDelegate._forkCurrZone);\n this._interceptZS =\n zoneSpec && (zoneSpec.onIntercept ? zoneSpec : parentDelegate._interceptZS);\n this._interceptDlgt =\n zoneSpec && (zoneSpec.onIntercept ? parentDelegate : parentDelegate._interceptDlgt);\n this._interceptCurrZone =\n zoneSpec && (zoneSpec.onIntercept ? this.zone : parentDelegate._interceptCurrZone);\n this._invokeZS = zoneSpec && (zoneSpec.onInvoke ? zoneSpec : parentDelegate._invokeZS);\n this._invokeDlgt =\n zoneSpec && (zoneSpec.onInvoke ? parentDelegate : parentDelegate._invokeDlgt);\n this._invokeCurrZone =\n zoneSpec && (zoneSpec.onInvoke ? this.zone : parentDelegate._invokeCurrZone);\n this._handleErrorZS =\n zoneSpec && (zoneSpec.onHandleError ? zoneSpec : parentDelegate._handleErrorZS);\n this._handleErrorDlgt =\n zoneSpec && (zoneSpec.onHandleError ? parentDelegate : parentDelegate._handleErrorDlgt);\n this._handleErrorCurrZone =\n zoneSpec && (zoneSpec.onHandleError ? this.zone : parentDelegate._handleErrorCurrZone);\n this._scheduleTaskZS =\n zoneSpec && (zoneSpec.onScheduleTask ? zoneSpec : parentDelegate._scheduleTaskZS);\n this._scheduleTaskDlgt = zoneSpec &&\n (zoneSpec.onScheduleTask ? parentDelegate : parentDelegate._scheduleTaskDlgt);\n this._scheduleTaskCurrZone =\n zoneSpec && (zoneSpec.onScheduleTask ? this.zone : parentDelegate._scheduleTaskCurrZone);\n this._invokeTaskZS =\n zoneSpec && (zoneSpec.onInvokeTask ? zoneSpec : parentDelegate._invokeTaskZS);\n this._invokeTaskDlgt =\n zoneSpec && (zoneSpec.onInvokeTask ? parentDelegate : parentDelegate._invokeTaskDlgt);\n this._invokeTaskCurrZone =\n zoneSpec && (zoneSpec.onInvokeTask ? this.zone : parentDelegate._invokeTaskCurrZone);\n this._cancelTaskZS =\n zoneSpec && (zoneSpec.onCancelTask ? zoneSpec : parentDelegate._cancelTaskZS);\n this._cancelTaskDlgt =\n zoneSpec && (zoneSpec.onCancelTask ? parentDelegate : parentDelegate._cancelTaskDlgt);\n this._cancelTaskCurrZone =\n zoneSpec && (zoneSpec.onCancelTask ? this.zone : parentDelegate._cancelTaskCurrZone);\n this._hasTaskZS = null;\n this._hasTaskDlgt = null;\n this._hasTaskDlgtOwner = null;\n this._hasTaskCurrZone = null;\n const zoneSpecHasTask = zoneSpec && zoneSpec.onHasTask;\n const parentHasTask = parentDelegate && parentDelegate._hasTaskZS;\n if (zoneSpecHasTask || parentHasTask) {\n // If we need to report hasTask, than this ZS needs to do ref counting on tasks. In such\n // a case all task related interceptors must go through this ZD. We can't short circuit it.\n this._hasTaskZS = zoneSpecHasTask ? zoneSpec : DELEGATE_ZS;\n this._hasTaskDlgt = parentDelegate;\n this._hasTaskDlgtOwner = this;\n this._hasTaskCurrZone = zone;\n if (!zoneSpec.onScheduleTask) {\n this._scheduleTaskZS = DELEGATE_ZS;\n this._scheduleTaskDlgt = parentDelegate;\n this._scheduleTaskCurrZone = this.zone;\n }\n if (!zoneSpec.onInvokeTask) {\n this._invokeTaskZS = DELEGATE_ZS;\n this._invokeTaskDlgt = parentDelegate;\n this._invokeTaskCurrZone = this.zone;\n }\n if (!zoneSpec.onCancelTask) {\n this._cancelTaskZS = DELEGATE_ZS;\n this._cancelTaskDlgt = parentDelegate;\n this._cancelTaskCurrZone = this.zone;\n }\n }\n }\n fork(targetZone, zoneSpec) {\n return this._forkZS ? this._forkZS.onFork(this._forkDlgt, this.zone, targetZone, zoneSpec) :\n new Zone(targetZone, zoneSpec);\n }\n intercept(targetZone, callback, source) {\n return this._interceptZS ?\n this._interceptZS.onIntercept(this._interceptDlgt, this._interceptCurrZone, targetZone, callback, source) :\n callback;\n }\n invoke(targetZone, callback, applyThis, applyArgs, source) {\n return this._invokeZS ? this._invokeZS.onInvoke(this._invokeDlgt, this._invokeCurrZone, targetZone, callback, applyThis, applyArgs, source) :\n callback.apply(applyThis, applyArgs);\n }\n handleError(targetZone, error) {\n return this._handleErrorZS ?\n this._handleErrorZS.onHandleError(this._handleErrorDlgt, this._handleErrorCurrZone, targetZone, error) :\n true;\n }\n scheduleTask(targetZone, task) {\n let returnTask = task;\n if (this._scheduleTaskZS) {\n if (this._hasTaskZS) {\n returnTask._zoneDelegates.push(this._hasTaskDlgtOwner);\n }\n // clang-format off\n returnTask = this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt, this._scheduleTaskCurrZone, targetZone, task);\n // clang-format on\n if (!returnTask)\n returnTask = task;\n }\n else {\n if (task.scheduleFn) {\n task.scheduleFn(task);\n }\n else if (task.type == microTask) {\n scheduleMicroTask(task);\n }\n else {\n throw new Error('Task is missing scheduleFn.');\n }\n }\n return returnTask;\n }\n invokeTask(targetZone, task, applyThis, applyArgs) {\n return this._invokeTaskZS ? this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt, this._invokeTaskCurrZone, targetZone, task, applyThis, applyArgs) :\n task.callback.apply(applyThis, applyArgs);\n }\n cancelTask(targetZone, task) {\n let value;\n if (this._cancelTaskZS) {\n value = this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt, this._cancelTaskCurrZone, targetZone, task);\n }\n else {\n if (!task.cancelFn) {\n throw Error('Task is not cancelable');\n }\n value = task.cancelFn(task);\n }\n return value;\n }\n hasTask(targetZone, isEmpty) {\n // hasTask should not throw error so other ZoneDelegate\n // can still trigger hasTask callback\n try {\n this._hasTaskZS &&\n this._hasTaskZS.onHasTask(this._hasTaskDlgt, this._hasTaskCurrZone, targetZone, isEmpty);\n }\n catch (err) {\n this.handleError(targetZone, err);\n }\n }\n // tslint:disable-next-line:require-internal-with-underscore\n _updateTaskCount(type, count) {\n const counts = this._taskCounts;\n const prev = counts[type];\n const next = counts[type] = prev + count;\n if (next < 0) {\n throw new Error('More tasks executed then were scheduled.');\n }\n if (prev == 0 || next == 0) {\n const isEmpty = {\n microTask: counts['microTask'] > 0,\n macroTask: counts['macroTask'] > 0,\n eventTask: counts['eventTask'] > 0,\n change: type\n };\n this.hasTask(this.zone, isEmpty);\n }\n }\n }\n class ZoneTask {\n constructor(type, source, callback, options, scheduleFn, cancelFn) {\n // tslint:disable-next-line:require-internal-with-underscore\n this._zone = null;\n this.runCount = 0;\n // tslint:disable-next-line:require-internal-with-underscore\n this._zoneDelegates = null;\n // tslint:disable-next-line:require-internal-with-underscore\n this._state = 'notScheduled';\n this.type = type;\n this.source = source;\n this.data = options;\n this.scheduleFn = scheduleFn;\n this.cancelFn = cancelFn;\n if (!callback) {\n throw new Error('callback is not defined');\n }\n this.callback = callback;\n const self = this;\n // TODO: @JiaLiPassion options should have interface\n if (type === eventTask && options && options.useG) {\n this.invoke = ZoneTask.invokeTask;\n }\n else {\n this.invoke = function () {\n return ZoneTask.invokeTask.call(global, self, this, arguments);\n };\n }\n }\n static invokeTask(task, target, args) {\n if (!task) {\n task = this;\n }\n _numberOfNestedTaskFrames++;\n try {\n task.runCount++;\n return task.zone.runTask(task, target, args);\n }\n finally {\n if (_numberOfNestedTaskFrames == 1) {\n drainMicroTaskQueue();\n }\n _numberOfNestedTaskFrames--;\n }\n }\n get zone() {\n return this._zone;\n }\n get state() {\n return this._state;\n }\n cancelScheduleRequest() {\n this._transitionTo(notScheduled, scheduling);\n }\n // tslint:disable-next-line:require-internal-with-underscore\n _transitionTo(toState, fromState1, fromState2) {\n if (this._state === fromState1 || this._state === fromState2) {\n this._state = toState;\n if (toState == notScheduled) {\n this._zoneDelegates = null;\n }\n }\n else {\n throw new Error(`${this.type} '${this.source}': can not transition to '${toState}', expecting state '${fromState1}'${fromState2 ? ' or \\'' + fromState2 + '\\'' : ''}, was '${this._state}'.`);\n }\n }\n toString() {\n if (this.data && typeof this.data.handleId !== 'undefined') {\n return this.data.handleId.toString();\n }\n else {\n return Object.prototype.toString.call(this);\n }\n }\n // add toJSON method to prevent cyclic error when\n // call JSON.stringify(zoneTask)\n toJSON() {\n return {\n type: this.type,\n state: this.state,\n source: this.source,\n zone: this.zone.name,\n runCount: this.runCount\n };\n }\n }\n //////////////////////////////////////////////////////\n //////////////////////////////////////////////////////\n /// MICROTASK QUEUE\n //////////////////////////////////////////////////////\n //////////////////////////////////////////////////////\n const symbolSetTimeout = __symbol__('setTimeout');\n const symbolPromise = __symbol__('Promise');\n const symbolThen = __symbol__('then');\n let _microTaskQueue = [];\n let _isDrainingMicrotaskQueue = false;\n let nativeMicroTaskQueuePromise;\n function nativeScheduleMicroTask(func) {\n if (!nativeMicroTaskQueuePromise) {\n if (global[symbolPromise]) {\n nativeMicroTaskQueuePromise = global[symbolPromise].resolve(0);\n }\n }\n if (nativeMicroTaskQueuePromise) {\n let nativeThen = nativeMicroTaskQueuePromise[symbolThen];\n if (!nativeThen) {\n // native Promise is not patchable, we need to use `then` directly\n // issue 1078\n nativeThen = nativeMicroTaskQueuePromise['then'];\n }\n nativeThen.call(nativeMicroTaskQueuePromise, func);\n }\n else {\n global[symbolSetTimeout](func, 0);\n }\n }\n function scheduleMicroTask(task) {\n // if we are not running in any task, and there has not been anything scheduled\n // we must bootstrap the initial task creation by manually scheduling the drain\n if (_numberOfNestedTaskFrames === 0 && _microTaskQueue.length === 0) {\n // We are not running in Task, so we need to kickstart the microtask queue.\n nativeScheduleMicroTask(drainMicroTaskQueue);\n }\n task && _microTaskQueue.push(task);\n }\n function drainMicroTaskQueue() {\n if (!_isDrainingMicrotaskQueue) {\n _isDrainingMicrotaskQueue = true;\n while (_microTaskQueue.length) {\n const queue = _microTaskQueue;\n _microTaskQueue = [];\n for (let i = 0; i < queue.length; i++) {\n const task = queue[i];\n try {\n task.zone.runTask(task, null, null);\n }\n catch (error) {\n _api.onUnhandledError(error);\n }\n }\n }\n _api.microtaskDrainDone();\n _isDrainingMicrotaskQueue = false;\n }\n }\n //////////////////////////////////////////////////////\n //////////////////////////////////////////////////////\n /// BOOTSTRAP\n //////////////////////////////////////////////////////\n //////////////////////////////////////////////////////\n const NO_ZONE = { name: 'NO ZONE' };\n const notScheduled = 'notScheduled', scheduling = 'scheduling', scheduled = 'scheduled', running = 'running', canceling = 'canceling', unknown = 'unknown';\n const microTask = 'microTask', macroTask = 'macroTask', eventTask = 'eventTask';\n const patches = {};\n const _api = {\n symbol: __symbol__,\n currentZoneFrame: () => _currentZoneFrame,\n onUnhandledError: noop,\n microtaskDrainDone: noop,\n scheduleMicroTask: scheduleMicroTask,\n showUncaughtError: () => !Zone[__symbol__('ignoreConsoleErrorUncaughtError')],\n patchEventTarget: () => [],\n patchOnProperties: noop,\n patchMethod: () => noop,\n bindArguments: () => [],\n patchThen: () => noop,\n patchMacroTask: () => noop,\n patchEventPrototype: () => noop,\n isIEOrEdge: () => false,\n getGlobalObjects: () => undefined,\n ObjectDefineProperty: () => noop,\n ObjectGetOwnPropertyDescriptor: () => undefined,\n ObjectCreate: () => undefined,\n ArraySlice: () => [],\n patchClass: () => noop,\n wrapWithCurrentZone: () => noop,\n filterProperties: () => [],\n attachOriginToPatched: () => noop,\n _redefineProperty: () => noop,\n patchCallbacks: () => noop,\n nativeScheduleMicroTask: nativeScheduleMicroTask\n };\n let _currentZoneFrame = { parent: null, zone: new Zone(null, null) };\n let _currentTask = null;\n let _numberOfNestedTaskFrames = 0;\n function noop() { }\n performanceMeasure('Zone', 'Zone');\n return global['Zone'] = Zone;\n}))(typeof window !== 'undefined' && window || typeof self !== 'undefined' && self || global);\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Suppress closure compiler errors about unknown 'Zone' variable\n * @fileoverview\n * @suppress {undefinedVars,globalThis,missingRequire}\n */\n/// <reference types=\"node\"/>\n// issue #989, to reduce bundle size, use short name\n/** Object.getOwnPropertyDescriptor */\nconst ObjectGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n/** Object.defineProperty */\nconst ObjectDefineProperty = Object.defineProperty;\n/** Object.getPrototypeOf */\nconst ObjectGetPrototypeOf = Object.getPrototypeOf;\n/** Object.create */\nconst ObjectCreate = Object.create;\n/** Array.prototype.slice */\nconst ArraySlice = Array.prototype.slice;\n/** addEventListener string const */\nconst ADD_EVENT_LISTENER_STR = 'addEventListener';\n/** removeEventListener string const */\nconst REMOVE_EVENT_LISTENER_STR = 'removeEventListener';\n/** zoneSymbol addEventListener */\nconst ZONE_SYMBOL_ADD_EVENT_LISTENER = Zone.__symbol__(ADD_EVENT_LISTENER_STR);\n/** zoneSymbol removeEventListener */\nconst ZONE_SYMBOL_REMOVE_EVENT_LISTENER = Zone.__symbol__(REMOVE_EVENT_LISTENER_STR);\n/** true string const */\nconst TRUE_STR = 'true';\n/** false string const */\nconst FALSE_STR = 'false';\n/** Zone symbol prefix string const. */\nconst ZONE_SYMBOL_PREFIX = Zone.__symbol__('');\nfunction wrapWithCurrentZone(callback, source) {\n return Zone.current.wrap(callback, source);\n}\nfunction scheduleMacroTaskWithCurrentZone(source, callback, data, customSchedule, customCancel) {\n return Zone.current.scheduleMacroTask(source, callback, data, customSchedule, customCancel);\n}\nconst zoneSymbol = Zone.__symbol__;\nconst isWindowExists = typeof window !== 'undefined';\nconst internalWindow = isWindowExists ? window : undefined;\nconst _global = isWindowExists && internalWindow || typeof self === 'object' && self || global;\nconst REMOVE_ATTRIBUTE = 'removeAttribute';\nfunction bindArguments(args, source) {\n for (let i = args.length - 1; i >= 0; i--) {\n if (typeof args[i] === 'function') {\n args[i] = wrapWithCurrentZone(args[i], source + '_' + i);\n }\n }\n return args;\n}\nfunction patchPrototype(prototype, fnNames) {\n const source = prototype.constructor['name'];\n for (let i = 0; i < fnNames.length; i++) {\n const name = fnNames[i];\n const delegate = prototype[name];\n if (delegate) {\n const prototypeDesc = ObjectGetOwnPropertyDescriptor(prototype, name);\n if (!isPropertyWritable(prototypeDesc)) {\n continue;\n }\n prototype[name] = ((delegate) => {\n const patched = function () {\n return delegate.apply(this, bindArguments(arguments, source + '.' + name));\n };\n attachOriginToPatched(patched, delegate);\n return patched;\n })(delegate);\n }\n }\n}\nfunction isPropertyWritable(propertyDesc) {\n if (!propertyDesc) {\n return true;\n }\n if (propertyDesc.writable === false) {\n return false;\n }\n return !(typeof propertyDesc.get === 'function' && typeof propertyDesc.set === 'undefined');\n}\nconst isWebWorker = (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope);\n// Make sure to access `process` through `_global` so that WebPack does not accidentally browserify\n// this code.\nconst isNode = (!('nw' in _global) && typeof _global.process !== 'undefined' &&\n {}.toString.call(_global.process) === '[object process]');\nconst isBrowser = !isNode && !isWebWorker && !!(isWindowExists && internalWindow['HTMLElement']);\n// we are in electron of nw, so we are both browser and nodejs\n// Make sure to access `process` through `_global` so that WebPack does not accidentally browserify\n// this code.\nconst isMix = typeof _global.process !== 'undefined' &&\n {}.toString.call(_global.process) === '[object process]' && !isWebWorker &&\n !!(isWindowExists && internalWindow['HTMLElement']);\nconst zoneSymbolEventNames$1 = {};\nconst wrapFn = function (event) {\n // https://github.com/angular/zone.js/issues/911, in IE, sometimes\n // event will be undefined, so we need to use window.event\n event = event || _global.event;\n if (!event) {\n return;\n }\n let eventNameSymbol = zoneSymbolEventNames$1[event.type];\n if (!eventNameSymbol) {\n eventNameSymbol = zoneSymbolEventNames$1[event.type] = zoneSymbol('ON_PROPERTY' + event.type);\n }\n const target = this || event.target || _global;\n const listener = target[eventNameSymbol];\n let result;\n if (isBrowser && target === internalWindow && event.type === 'error') {\n // window.onerror have different signature\n // https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onerror#window.onerror\n // and onerror callback will prevent default when callback return true\n const errorEvent = event;\n result = listener &&\n listener.call(this, errorEvent.message, errorEvent.filename, errorEvent.lineno, errorEvent.colno, errorEvent.error);\n if (result === true) {\n event.preventDefault();\n }\n }\n else {\n result = listener && listener.apply(this, arguments);\n if (result != undefined && !result) {\n event.preventDefault();\n }\n }\n return result;\n};\nfunction patchProperty(obj, prop, prototype) {\n let desc = ObjectGetOwnPropertyDescriptor(obj, prop);\n if (!desc && prototype) {\n // when patch window object, use prototype to check prop exist or not\n const prototypeDesc = ObjectGetOwnPropertyDescriptor(prototype, prop);\n if (prototypeDesc) {\n desc = { enumerable: true, configurable: true };\n }\n }\n // if the descriptor not exists or is not configurable\n // just return\n if (!desc || !desc.configurable) {\n return;\n }\n const onPropPatchedSymbol = zoneSymbol('on' + prop + 'patched');\n if (obj.hasOwnProperty(onPropPatchedSymbol) && obj[onPropPatchedSymbol]) {\n return;\n }\n // A property descriptor cannot have getter/setter and be writable\n // deleting the writable and value properties avoids this error:\n //\n // TypeError: property descriptors must not specify a value or be writable when a\n // getter or setter has been specified\n delete desc.writable;\n delete desc.value;\n const originalDescGet = desc.get;\n const originalDescSet = desc.set;\n // slice(2) cuz 'onclick' -> 'click', etc\n const eventName = prop.slice(2);\n let eventNameSymbol = zoneSymbolEventNames$1[eventName];\n if (!eventNameSymbol) {\n eventNameSymbol = zoneSymbolEventNames$1[eventName] = zoneSymbol('ON_PROPERTY' + eventName);\n }\n desc.set = function (newValue) {\n // in some of windows's onproperty callback, this is undefined\n // so we need to check it\n let target = this;\n if (!target && obj === _global) {\n target = _global;\n }\n if (!target) {\n return;\n }\n const previousValue = target[eventNameSymbol];\n if (typeof previousValue === 'function') {\n target.removeEventListener(eventName, wrapFn);\n }\n // issue #978, when onload handler was added before loading zone.js\n // we should remove it with originalDescSet\n originalDescSet && originalDescSet.call(target, null);\n target[eventNameSymbol] = newValue;\n if (typeof newValue === 'function') {\n target.addEventListener(eventName, wrapFn, false);\n }\n };\n // The getter would return undefined for unassigned properties but the default value of an\n // unassigned property is null\n desc.get = function () {\n // in some of windows's onproperty callback, this is undefined\n // so we need to check it\n let target = this;\n if (!target && obj === _global) {\n target = _global;\n }\n if (!target) {\n return null;\n }\n const listener = target[eventNameSymbol];\n if (listener) {\n return listener;\n }\n else if (originalDescGet) {\n // result will be null when use inline event attribute,\n // such as <button onclick=\"func();\">OK</button>\n // because the onclick function is internal raw uncompiled handler\n // the onclick will be evaluated when first time event was triggered or\n // the property is accessed, https://github.com/angular/zone.js/issues/525\n // so we should use original native get to retrieve the handler\n let value = originalDescGet.call(this);\n if (value) {\n desc.set.call(this, value);\n if (typeof target[REMOVE_ATTRIBUTE] === 'function') {\n target.removeAttribute(prop);\n }\n return value;\n }\n }\n return null;\n };\n ObjectDefineProperty(obj, prop, desc);\n obj[onPropPatchedSymbol] = true;\n}\nfunction patchOnProperties(obj, properties, prototype) {\n if (properties) {\n for (let i = 0; i < properties.length; i++) {\n patchProperty(obj, 'on' + properties[i], prototype);\n }\n }\n else {\n const onProperties = [];\n for (const prop in obj) {\n if (prop.slice(0, 2) == 'on') {\n onProperties.push(prop);\n }\n }\n for (let j = 0; j < onProperties.length; j++) {\n patchProperty(obj, onProperties[j], prototype);\n }\n }\n}\nconst originalInstanceKey = zoneSymbol('originalInstance');\n// wrap some native API on `window`\nfunction patchClass(className) {\n const OriginalClass = _global[className];\n if (!OriginalClass)\n return;\n // keep original class in global\n _global[zoneSymbol(className)] = OriginalClass;\n _global[className] = function () {\n const a = bindArguments(arguments, className);\n switch (a.length) {\n case 0:\n this[originalInstanceKey] = new OriginalClass();\n break;\n case 1:\n this[originalInstanceKey] = new OriginalClass(a[0]);\n break;\n case 2:\n this[originalInstanceKey] = new OriginalClass(a[0], a[1]);\n break;\n case 3:\n this[originalInstanceKey] = new OriginalClass(a[0], a[1], a[2]);\n break;\n case 4:\n this[originalInstanceKey] = new OriginalClass(a[0], a[1], a[2], a[3]);\n break;\n default:\n throw new Error('Arg list too long.');\n }\n };\n // attach original delegate to patched function\n attachOriginToPatched(_global[className], OriginalClass);\n const instance = new OriginalClass(function () { });\n let prop;\n for (prop in instance) {\n // https://bugs.webkit.org/show_bug.cgi?id=44721\n if (className === 'XMLHttpRequest' && prop === 'responseBlob')\n continue;\n (function (prop) {\n if (typeof instance[prop] === 'function') {\n _global[className].prototype[prop] = function () {\n return this[originalInstanceKey][prop].apply(this[originalInstanceKey], arguments);\n };\n }\n else {\n ObjectDefineProperty(_global[className].prototype, prop, {\n set: function (fn) {\n if (typeof fn === 'function') {\n this[originalInstanceKey][prop] = wrapWithCurrentZone(fn, className + '.' + prop);\n // keep callback in wrapped function so we can\n // use it in Function.prototype.toString to return\n // the native one.\n attachOriginToPatched(this[originalInstanceKey][prop], fn);\n }\n else {\n this[originalInstanceKey][prop] = fn;\n }\n },\n get: function () {\n return this[originalInstanceKey][prop];\n }\n });\n }\n }(prop));\n }\n for (prop in OriginalClass) {\n if (prop !== 'prototype' && OriginalClass.hasOwnProperty(prop)) {\n _global[className][prop] = OriginalClass[prop];\n }\n }\n}\nfunction patchMethod(target, name, patchFn) {\n let proto = target;\n while (proto && !proto.hasOwnProperty(name)) {\n proto = ObjectGetPrototypeOf(proto);\n }\n if (!proto && target[name]) {\n // somehow we did not find it, but we can see it. This happens on IE for Window properties.\n proto = target;\n }\n const delegateName = zoneSymbol(name);\n let delegate = null;\n if (proto && (!(delegate = proto[delegateName]) || !proto.hasOwnProperty(delegateName))) {\n delegate = proto[delegateName] = proto[name];\n // check whether proto[name] is writable\n // some property is readonly in safari, such as HtmlCanvasElement.prototype.toBlob\n const desc = proto && ObjectGetOwnPropertyDescriptor(proto, name);\n if (isPropertyWritable(desc)) {\n const patchDelegate = patchFn(delegate, delegateName, name);\n proto[name] = function () {\n return patchDelegate(this, arguments);\n };\n attachOriginToPatched(proto[name], delegate);\n }\n }\n return delegate;\n}\n// TODO: @JiaLiPassion, support cancel task later if necessary\nfunction patchMacroTask(obj, funcName, metaCreator) {\n let setNative = null;\n function scheduleTask(task) {\n const data = task.data;\n data.args[data.cbIdx] = function () {\n task.invoke.apply(this, arguments);\n };\n setNative.apply(data.target, data.args);\n return task;\n }\n setNative = patchMethod(obj, funcName, (delegate) => function (self, args) {\n const meta = metaCreator(self, args);\n if (meta.cbIdx >= 0 && typeof args[meta.cbIdx] === 'function') {\n return scheduleMacroTaskWithCurrentZone(meta.name, args[meta.cbIdx], meta, scheduleTask);\n }\n else {\n // cause an error by calling it directly.\n return delegate.apply(self, args);\n }\n });\n}\nfunction attachOriginToPatched(patched, original) {\n patched[zoneSymbol('OriginalDelegate')] = original;\n}\nlet isDetectedIEOrEdge = false;\nlet ieOrEdge = false;\nfunction isIE() {\n try {\n const ua = internalWindow.navigator.userAgent;\n if (ua.indexOf('MSIE ') !== -1 || ua.indexOf('Trident/') !== -1) {\n return true;\n }\n }\n catch (error) {\n }\n return false;\n}\nfunction isIEOrEdge() {\n if (isDetectedIEOrEdge) {\n return ieOrEdge;\n }\n isDetectedIEOrEdge = true;\n try {\n const ua = internalWindow.navigator.userAgent;\n if (ua.indexOf('MSIE ') !== -1 || ua.indexOf('Trident/') !== -1 || ua.indexOf('Edge/') !== -1) {\n ieOrEdge = true;\n }\n }\n catch (error) {\n }\n return ieOrEdge;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nZone.__load_patch('ZoneAwarePromise', (global, Zone, api) => {\n const ObjectGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n const ObjectDefineProperty = Object.defineProperty;\n function readableObjectToString(obj) {\n if (obj && obj.toString === Object.prototype.toString) {\n const className = obj.constructor && obj.constructor.name;\n return (className ? className : '') + ': ' + JSON.stringify(obj);\n }\n return obj ? obj.toString() : Object.prototype.toString.call(obj);\n }\n const __symbol__ = api.symbol;\n const _uncaughtPromiseErrors = [];\n const isDisableWrappingUncaughtPromiseRejection = global[__symbol__('DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION')] === true;\n const symbolPromise = __symbol__('Promise');\n const symbolThen = __symbol__('then');\n const creationTrace = '__creationTrace__';\n api.onUnhandledError = (e) => {\n if (api.showUncaughtError()) {\n const rejection = e && e.rejection;\n if (rejection) {\n console.error('Unhandled Promise rejection:', rejection instanceof Error ? rejection.message : rejection, '; Zone:', e.zone.name, '; Task:', e.task && e.task.source, '; Value:', rejection, rejection instanceof Error ? rejection.stack : undefined);\n }\n else {\n console.error(e);\n }\n }\n };\n api.microtaskDrainDone = () => {\n while (_uncaughtPromiseErrors.length) {\n const uncaughtPromiseError = _uncaughtPromiseErrors.shift();\n try {\n uncaughtPromiseError.zone.runGuarded(() => {\n if (uncaughtPromiseError.throwOriginal) {\n throw uncaughtPromiseError.rejection;\n }\n throw uncaughtPromiseError;\n });\n }\n catch (error) {\n handleUnhandledRejection(error);\n }\n }\n };\n const UNHANDLED_PROMISE_REJECTION_HANDLER_SYMBOL = __symbol__('unhandledPromiseRejectionHandler');\n function handleUnhandledRejection(e) {\n api.onUnhandledError(e);\n try {\n const handler = Zone[UNHANDLED_PROMISE_REJECTION_HANDLER_SYMBOL];\n if (typeof handler === 'function') {\n handler.call(this, e);\n }\n }\n catch (err) {\n }\n }\n function isThenable(value) {\n return value && value.then;\n }\n function forwardResolution(value) {\n return value;\n }\n function forwardRejection(rejection) {\n return ZoneAwarePromise.reject(rejection);\n }\n const symbolState = __symbol__('state');\n const symbolValue = __symbol__('value');\n const symbolFinally = __symbol__('finally');\n const symbolParentPromiseValue = __symbol__('parentPromiseValue');\n const symbolParentPromiseState = __symbol__('parentPromiseState');\n const source = 'Promise.then';\n const UNRESOLVED = null;\n const RESOLVED = true;\n const REJECTED = false;\n const REJECTED_NO_CATCH = 0;\n function makeResolver(promise, state) {\n return (v) => {\n try {\n resolvePromise(promise, state, v);\n }\n catch (err) {\n resolvePromise(promise, false, err);\n }\n // Do not return value or you will break the Promise spec.\n };\n }\n const once = function () {\n let wasCalled = false;\n return function wrapper(wrappedFunction) {\n return function () {\n if (wasCalled) {\n return;\n }\n wasCalled = true;\n wrappedFunction.apply(null, arguments);\n };\n };\n };\n const TYPE_ERROR = 'Promise resolved with itself';\n const CURRENT_TASK_TRACE_SYMBOL = __symbol__('currentTaskTrace');\n // Promise Resolution\n function resolvePromise(promise, state, value) {\n const onceWrapper = once();\n if (promise === value) {\n throw new TypeError(TYPE_ERROR);\n }\n if (promise[symbolState] === UNRESOLVED) {\n // should only get value.then once based on promise spec.\n let then = null;\n try {\n if (typeof value === 'object' || typeof value === 'function') {\n then = value && value.then;\n }\n }\n catch (err) {\n onceWrapper(() => {\n resolvePromise(promise, false, err);\n })();\n return promise;\n }\n // if (value instanceof ZoneAwarePromise) {\n if (state !== REJECTED && value instanceof ZoneAwarePromise &&\n value.hasOwnProperty(symbolState) && value.hasOwnProperty(symbolValue) &&\n value[symbolState] !== UNRESOLVED) {\n clearRejectedNoCatch(value);\n resolvePromise(promise, value[symbolState], value[symbolValue]);\n }\n else if (state !== REJECTED && typeof then === 'function') {\n try {\n then.call(value, onceWrapper(makeResolver(promise, state)), onceWrapper(makeResolver(promise, false)));\n }\n catch (err) {\n onceWrapper(() => {\n resolvePromise(promise, false, err);\n })();\n }\n }\n else {\n promise[symbolState] = state;\n const queue = promise[symbolValue];\n promise[symbolValue] = value;\n if (promise[symbolFinally] === symbolFinally) {\n // the promise is generated by Promise.prototype.finally\n if (state === RESOLVED) {\n // the state is resolved, should ignore the value\n // and use parent promise value\n promise[symbolState] = promise[symbolParentPromiseState];\n promise[symbolValue] = promise[symbolParentPromiseValue];\n }\n }\n // record task information in value when error occurs, so we can\n // do some additional work such as render longStackTrace\n if (state === REJECTED && value instanceof Error) {\n // check if longStackTraceZone is here\n const trace = Zone.currentTask && Zone.currentTask.data &&\n Zone.currentTask.data[creationTrace];\n if (trace) {\n // only keep the long stack trace into error when in longStackTraceZone\n ObjectDefineProperty(value, CURRENT_TASK_TRACE_SYMBOL, { configurable: true, enumerable: false, writable: true, value: trace });\n }\n }\n for (let i = 0; i < queue.length;) {\n scheduleResolveOrReject(promise, queue[i++], queue[i++], queue[i++], queue[i++]);\n }\n if (queue.length == 0 && state == REJECTED) {\n promise[symbolState] = REJECTED_NO_CATCH;\n let uncaughtPromiseError = value;\n try {\n // Here we throws a new Error to print more readable error log\n // and if the value is not an error, zone.js builds an `Error`\n // Object here to attach the stack information.\n throw new Error('Uncaught (in promise): ' + readableObjectToString(value) +\n (value && value.stack ? '\\n' + value.stack : ''));\n }\n catch (err) {\n uncaughtPromiseError = err;\n }\n if (isDisableWrappingUncaughtPromiseRejection) {\n // If disable wrapping uncaught promise reject\n // use the value instead of wrapping it.\n uncaughtPromiseError.throwOriginal = true;\n }\n uncaughtPromiseError.rejection = value;\n uncaughtPromiseError.promise = promise;\n uncaughtPromiseError.zone = Zone.current;\n uncaughtPromiseError.task = Zone.currentTask;\n _uncaughtPromiseErrors.push(uncaughtPromiseError);\n api.scheduleMicroTask(); // to make sure that it is running\n }\n }\n }\n // Resolving an already resolved promise is a noop.\n return promise;\n }\n const REJECTION_HANDLED_HANDLER = __symbol__('rejectionHandledHandler');\n function clearRejectedNoCatch(promise) {\n if (promise[symbolState] === REJECTED_NO_CATCH) {\n // if the promise is rejected no catch status\n // and queue.length > 0, means there is a error handler\n // here to handle the rejected promise, we should trigger\n // windows.rejectionhandled eventHandler or nodejs rejectionHandled\n // eventHandler\n try {\n const handler = Zone[REJECTION_HANDLED_HANDLER];\n if (handler && typeof handler === 'function') {\n handler.call(this, { rejection: promise[symbolValue], promise: promise });\n }\n }\n catch (err) {\n }\n promise[symbolState] = REJECTED;\n for (let i = 0; i < _uncaughtPromiseErrors.length; i++) {\n if (promise === _uncaughtPromiseErrors[i].promise) {\n _uncaughtPromiseErrors.splice(i, 1);\n }\n }\n }\n }\n function scheduleResolveOrReject(promise, zone, chainPromise, onFulfilled, onRejected) {\n clearRejectedNoCatch(promise);\n const promiseState = promise[symbolState];\n const delegate = promiseState ?\n (typeof onFulfilled === 'function') ? onFulfilled : forwardResolution :\n (typeof onRejected === 'function') ? onRejected :\n forwardRejection;\n zone.scheduleMicroTask(source, () => {\n try {\n const parentPromiseValue = promise[symbolValue];\n const isFinallyPromise = !!chainPromise && symbolFinally === chainPromise[symbolFinally];\n if (isFinallyPromise) {\n // if the promise is generated from finally call, keep parent promise's state and value\n chainPromise[symbolParentPromiseValue] = parentPromiseValue;\n chainPromise[symbolParentPromiseState] = promiseState;\n }\n // should not pass value to finally callback\n const value = zone.run(delegate, undefined, isFinallyPromise && delegate !== forwardRejection && delegate !== forwardResolution ?\n [] :\n [parentPromiseValue]);\n resolvePromise(chainPromise, true, value);\n }\n catch (error) {\n // if error occurs, should always return this error\n resolvePromise(chainPromise, false, error);\n }\n }, chainPromise);\n }\n const ZONE_AWARE_PROMISE_TO_STRING = 'function ZoneAwarePromise() { [native code] }';\n const noop = function () { };\n const AggregateError = global.AggregateError;\n class ZoneAwarePromise {\n static toString() {\n return ZONE_AWARE_PROMISE_TO_STRING;\n }\n static resolve(value) {\n return resolvePromise(new this(null), RESOLVED, value);\n }\n static reject(error) {\n return resolvePromise(new this(null), REJECTED, error);\n }\n static any(values) {\n if (!values || typeof values[Symbol.iterator] !== 'function') {\n return Promise.reject(new AggregateError([], 'All promises were rejected'));\n }\n const promises = [];\n let count = 0;\n try {\n for (let v of values) {\n count++;\n promises.push(ZoneAwarePromise.resolve(v));\n }\n }\n catch (err) {\n return Promise.reject(new AggregateError([], 'All promises were rejected'));\n }\n if (count === 0) {\n return Promise.reject(new AggregateError([], 'All promises were rejected'));\n }\n let finished = false;\n const errors = [];\n return new ZoneAwarePromise((resolve, reject) => {\n for (let i = 0; i < promises.length; i++) {\n promises[i].then(v => {\n if (finished) {\n return;\n }\n finished = true;\n resolve(v);\n }, err => {\n errors.push(err);\n count--;\n if (count === 0) {\n finished = true;\n reject(new AggregateError(errors, 'All promises were rejected'));\n }\n });\n }\n });\n }\n ;\n static race(values) {\n let resolve;\n let reject;\n let promise = new this((res, rej) => {\n resolve = res;\n reject = rej;\n });\n function onResolve(value) {\n resolve(value);\n }\n function onReject(error) {\n reject(error);\n }\n for (let value of values) {\n if (!isThenable(value)) {\n value = this.resolve(value);\n }\n value.then(onResolve, onReject);\n }\n return promise;\n }\n static all(values) {\n return ZoneAwarePromise.allWithCallback(values);\n }\n static allSettled(values) {\n const P = this && this.prototype instanceof ZoneAwarePromise ? this : ZoneAwarePromise;\n return P.allWithCallback(values, {\n thenCallback: (value) => ({ status: 'fulfilled', value }),\n errorCallback: (err) => ({ status: 'rejected', reason: err })\n });\n }\n static allWithCallback(values, callback) {\n let resolve;\n let reject;\n let promise = new this((res, rej) => {\n resolve = res;\n reject = rej;\n });\n // Start at 2 to prevent prematurely resolving if .then is called immediately.\n let unresolvedCount = 2;\n let valueIndex = 0;\n const resolvedValues = [];\n for (let value of values) {\n if (!isThenable(value)) {\n value = this.resolve(value);\n }\n const curValueIndex = valueIndex;\n try {\n value.then((value) => {\n resolvedValues[curValueIndex] = callback ? callback.thenCallback(value) : value;\n unresolvedCount--;\n if (unresolvedCount === 0) {\n resolve(resolvedValues);\n }\n }, (err) => {\n if (!callback) {\n reject(err);\n }\n else {\n resolvedValues[curValueIndex] = callback.errorCallback(err);\n unresolvedCount--;\n if (unresolvedCount === 0) {\n resolve(resolvedValues);\n }\n }\n });\n }\n catch (thenErr) {\n reject(thenErr);\n }\n unresolvedCount++;\n valueIndex++;\n }\n // Make the unresolvedCount zero-based again.\n unresolvedCount -= 2;\n if (unresolvedCount === 0) {\n resolve(resolvedValues);\n }\n return promise;\n }\n constructor(executor) {\n const promise = this;\n if (!(promise instanceof ZoneAwarePromise)) {\n throw new Error('Must be an instanceof Promise.');\n }\n promise[symbolState] = UNRESOLVED;\n promise[symbolValue] = []; // queue;\n try {\n const onceWrapper = once();\n executor &&\n executor(onceWrapper(makeResolver(promise, RESOLVED)), onceWrapper(makeResolver(promise, REJECTED)));\n }\n catch (error) {\n resolvePromise(promise, false, error);\n }\n }\n get [Symbol.toStringTag]() {\n return 'Promise';\n }\n get [Symbol.species]() {\n return ZoneAwarePromise;\n }\n then(onFulfilled, onRejected) {\n var _a;\n // We must read `Symbol.species` safely because `this` may be anything. For instance, `this`\n // may be an object without a prototype (created through `Object.create(null)`); thus\n // `this.constructor` will be undefined. One of the use cases is SystemJS creating\n // prototype-less objects (modules) via `Object.create(null)`. The SystemJS creates an empty\n // object and copies promise properties into that object (within the `getOrCreateLoad`\n // function). The zone.js then checks if the resolved value has the `then` method and invokes\n // it with the `value` context. Otherwise, this will throw an error: `TypeError: Cannot read\n // properties of undefined (reading 'Symbol(Symbol.species)')`.\n let C = (_a = this.constructor) === null || _a === void 0 ? void 0 : _a[Symbol.species];\n if (!C || typeof C !== 'function') {\n C = this.constructor || ZoneAwarePromise;\n }\n const chainPromise = new C(noop);\n const zone = Zone.current;\n if (this[symbolState] == UNRESOLVED) {\n this[symbolValue].push(zone, chainPromise, onFulfilled, onRejected);\n }\n else {\n scheduleResolveOrReject(this, zone, chainPromise, onFulfilled, onRejected);\n }\n return chainPromise;\n }\n catch(onRejected) {\n return this.then(null, onRejected);\n }\n finally(onFinally) {\n var _a;\n // See comment on the call to `then` about why thee `Symbol.species` is safely accessed.\n let C = (_a = this.constructor) === null || _a === void 0 ? void 0 : _a[Symbol.species];\n if (!C || typeof C !== 'function') {\n C = ZoneAwarePromise;\n }\n const chainPromise = new C(noop);\n chainPromise[symbolFinally] = symbolFinally;\n const zone = Zone.current;\n if (this[symbolState] == UNRESOLVED) {\n this[symbolValue].push(zone, chainPromise, onFinally, onFinally);\n }\n else {\n scheduleResolveOrReject(this, zone, chainPromise, onFinally, onFinally);\n }\n return chainPromise;\n }\n }\n // Protect against aggressive optimizers dropping seemingly unused properties.\n // E.g. Closure Compiler in advanced mode.\n ZoneAwarePromise['resolve'] = ZoneAwarePromise.resolve;\n ZoneAwarePromise['reject'] = ZoneAwarePromise.reject;\n ZoneAwarePromise['race'] = ZoneAwarePromise.race;\n ZoneAwarePromise['all'] = ZoneAwarePromise.all;\n const NativePromise = global[symbolPromise] = global['Promise'];\n global['Promise'] = ZoneAwarePromise;\n const symbolThenPatched = __symbol__('thenPatched');\n function patchThen(Ctor) {\n const proto = Ctor.prototype;\n const prop = ObjectGetOwnPropertyDescriptor(proto, 'then');\n if (prop && (prop.writable === false || !prop.configurable)) {\n // check Ctor.prototype.then propertyDescriptor is writable or not\n // in meteor env, writable is false, we should ignore such case\n return;\n }\n const originalThen = proto.then;\n // Keep a reference to the original method.\n proto[symbolThen] = originalThen;\n Ctor.prototype.then = function (onResolve, onReject) {\n const wrapped = new ZoneAwarePromise((resolve, reject) => {\n originalThen.call(this, resolve, reject);\n });\n return wrapped.then(onResolve, onReject);\n };\n Ctor[symbolThenPatched] = true;\n }\n api.patchThen = patchThen;\n function zoneify(fn) {\n return function (self, args) {\n let resultPromise = fn.apply(self, args);\n if (resultPromise instanceof ZoneAwarePromise) {\n return resultPromise;\n }\n let ctor = resultPromise.constructor;\n if (!ctor[symbolThenPatched]) {\n patchThen(ctor);\n }\n return resultPromise;\n };\n }\n if (NativePromise) {\n patchThen(NativePromise);\n patchMethod(global, 'fetch', delegate => zoneify(delegate));\n }\n // This is not part of public API, but it is useful for tests, so we expose it.\n Promise[Zone.__symbol__('uncaughtPromiseErrors')] = _uncaughtPromiseErrors;\n return ZoneAwarePromise;\n});\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// override Function.prototype.toString to make zone.js patched function\n// look like native function\nZone.__load_patch('toString', (global) => {\n // patch Func.prototype.toString to let them look like native\n const originalFunctionToString = Function.prototype.toString;\n const ORIGINAL_DELEGATE_SYMBOL = zoneSymbol('OriginalDelegate');\n const PROMISE_SYMBOL = zoneSymbol('Promise');\n const ERROR_SYMBOL = zoneSymbol('Error');\n const newFunctionToString = function toString() {\n if (typeof this === 'function') {\n const originalDelegate = this[ORIGINAL_DELEGATE_SYMBOL];\n if (originalDelegate) {\n if (typeof originalDelegate === 'function') {\n return originalFunctionToString.call(originalDelegate);\n }\n else {\n return Object.prototype.toString.call(originalDelegate);\n }\n }\n if (this === Promise) {\n const nativePromise = global[PROMISE_SYMBOL];\n if (nativePromise) {\n return originalFunctionToString.call(nativePromise);\n }\n }\n if (this === Error) {\n const nativeError = global[ERROR_SYMBOL];\n if (nativeError) {\n return originalFunctionToString.call(nativeError);\n }\n }\n }\n return originalFunctionToString.call(this);\n };\n newFunctionToString[ORIGINAL_DELEGATE_SYMBOL] = originalFunctionToString;\n Function.prototype.toString = newFunctionToString;\n // patch Object.prototype.toString to let them look like native\n const originalObjectToString = Object.prototype.toString;\n const PROMISE_OBJECT_TO_STRING = '[object Promise]';\n Object.prototype.toString = function () {\n if (typeof Promise === 'function' && this instanceof Promise) {\n return PROMISE_OBJECT_TO_STRING;\n }\n return originalObjectToString.call(this);\n };\n});\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nlet passiveSupported = false;\nif (typeof window !== 'undefined') {\n try {\n const options = Object.defineProperty({}, 'passive', {\n get: function () {\n passiveSupported = true;\n }\n });\n // Note: We pass the `options` object as the event handler too. This is not compatible with the\n // signature of `addEventListener` or `removeEventListener` but enables us to remove the handler\n // without an actual handler.\n window.addEventListener('test', options, options);\n window.removeEventListener('test', options, options);\n }\n catch (err) {\n passiveSupported = false;\n }\n}\n// an identifier to tell ZoneTask do not create a new invoke closure\nconst OPTIMIZED_ZONE_EVENT_TASK_DATA = {\n useG: true\n};\nconst zoneSymbolEventNames = {};\nconst globalSources = {};\nconst EVENT_NAME_SYMBOL_REGX = new RegExp('^' + ZONE_SYMBOL_PREFIX + '(\\\\w+)(true|false)$');\nconst IMMEDIATE_PROPAGATION_SYMBOL = zoneSymbol('propagationStopped');\nfunction prepareEventNames(eventName, eventNameToString) {\n const falseEventName = (eventNameToString ? eventNameToString(eventName) : eventName) + FALSE_STR;\n const trueEventName = (eventNameToString ? eventNameToString(eventName) : eventName) + TRUE_STR;\n const symbol = ZONE_SYMBOL_PREFIX + falseEventName;\n const symbolCapture = ZONE_SYMBOL_PREFIX + trueEventName;\n zoneSymbolEventNames[eventName] = {};\n zoneSymbolEventNames[eventName][FALSE_STR] = symbol;\n zoneSymbolEventNames[eventName][TRUE_STR] = symbolCapture;\n}\nfunction patchEventTarget(_global, api, apis, patchOptions) {\n const ADD_EVENT_LISTENER = (patchOptions && patchOptions.add) || ADD_EVENT_LISTENER_STR;\n const REMOVE_EVENT_LISTENER = (patchOptions && patchOptions.rm) || REMOVE_EVENT_LISTENER_STR;\n const LISTENERS_EVENT_LISTENER = (patchOptions && patchOptions.listeners) || 'eventListeners';\n const REMOVE_ALL_LISTENERS_EVENT_LISTENER = (patchOptions && patchOptions.rmAll) || 'removeAllListeners';\n const zoneSymbolAddEventListener = zoneSymbol(ADD_EVENT_LISTENER);\n const ADD_EVENT_LISTENER_SOURCE = '.' + ADD_EVENT_LISTENER + ':';\n const PREPEND_EVENT_LISTENER = 'prependListener';\n const PREPEND_EVENT_LISTENER_SOURCE = '.' + PREPEND_EVENT_LISTENER + ':';\n const invokeTask = function (task, target, event) {\n // for better performance, check isRemoved which is set\n // by removeEventListener\n if (task.isRemoved) {\n return;\n }\n const delegate = task.callback;\n if (typeof delegate === 'object' && delegate.handleEvent) {\n // create the bind version of handleEvent when invoke\n task.callback = (event) => delegate.handleEvent(event);\n task.originalDelegate = delegate;\n }\n // invoke static task.invoke\n // need to try/catch error here, otherwise, the error in one event listener\n // will break the executions of the other event listeners. Also error will\n // not remove the event listener when `once` options is true.\n let error;\n try {\n task.invoke(task, target, [event]);\n }\n catch (err) {\n error = err;\n }\n const options = task.options;\n if (options && typeof options === 'object' && options.once) {\n // if options.once is true, after invoke once remove listener here\n // only browser need to do this, nodejs eventEmitter will cal removeListener\n // inside EventEmitter.once\n const delegate = task.originalDelegate ? task.originalDelegate : task.callback;\n target[REMOVE_EVENT_LISTENER].call(target, event.type, delegate, options);\n }\n return error;\n };\n function globalCallback(context, event, isCapture) {\n // https://github.com/angular/zone.js/issues/911, in IE, sometimes\n // event will be undefined, so we need to use window.event\n event = event || _global.event;\n if (!event) {\n return;\n }\n // event.target is needed for Samsung TV and SourceBuffer\n // || global is needed https://github.com/angular/zone.js/issues/190\n const target = context || event.target || _global;\n const tasks = target[zoneSymbolEventNames[event.type][isCapture ? TRUE_STR : FALSE_STR]];\n if (tasks) {\n const errors = [];\n // invoke all tasks which attached to current target with given event.type and capture = false\n // for performance concern, if task.length === 1, just invoke\n if (tasks.length === 1) {\n const err = invokeTask(tasks[0], target, event);\n err && errors.push(err);\n }\n else {\n // https://github.com/angular/zone.js/issues/836\n // copy the tasks array before invoke, to avoid\n // the callback will remove itself or other listener\n const copyTasks = tasks.slice();\n for (let i = 0; i < copyTasks.length; i++) {\n if (event && event[IMMEDIATE_PROPAGATION_SYMBOL] === true) {\n break;\n }\n const err = invokeTask(copyTasks[i], target, event);\n err && errors.push(err);\n }\n }\n // Since there is only one error, we don't need to schedule microTask\n // to throw the error.\n if (errors.length === 1) {\n throw errors[0];\n }\n else {\n for (let i = 0; i < errors.length; i++) {\n const err = errors[i];\n api.nativeScheduleMicroTask(() => {\n throw err;\n });\n }\n }\n }\n }\n // global shared zoneAwareCallback to handle all event callback with capture = false\n const globalZoneAwareCallback = function (event) {\n return globalCallback(this, event, false);\n };\n // global shared zoneAwareCallback to handle all event callback with capture = true\n const globalZoneAwareCaptureCallback = function (event) {\n return globalCallback(this, event, true);\n };\n function patchEventTargetMethods(obj, patchOptions) {\n if (!obj) {\n return false;\n }\n let useGlobalCallback = true;\n if (patchOptions && patchOptions.useG !== undefined) {\n useGlobalCallback = patchOptions.useG;\n }\n const validateHandler = patchOptions && patchOptions.vh;\n let checkDuplicate = true;\n if (patchOptions && patchOptions.chkDup !== undefined) {\n checkDuplicate = patchOptions.chkDup;\n }\n let returnTarget = false;\n if (patchOptions && patchOptions.rt !== undefined) {\n returnTarget = patchOptions.rt;\n }\n let proto = obj;\n while (proto && !proto.hasOwnProperty(ADD_EVENT_LISTENER)) {\n proto = ObjectGetPrototypeOf(proto);\n }\n if (!proto && obj[ADD_EVENT_LISTENER]) {\n // somehow we did not find it, but we can see it. This happens on IE for Window properties.\n proto = obj;\n }\n if (!proto) {\n return false;\n }\n if (proto[zoneSymbolAddEventListener]) {\n return false;\n }\n const eventNameToString = patchOptions && patchOptions.eventNameToString;\n // a shared global taskData to pass data for scheduleEventTask\n // so we do not need to create a new object just for pass some data\n const taskData = {};\n const nativeAddEventListener = proto[zoneSymbolAddEventListener] = proto[ADD_EVENT_LISTENER];\n const nativeRemoveEventListener = proto[zoneSymbol(REMOVE_EVENT_LISTENER)] =\n proto[REMOVE_EVENT_LISTENER];\n const nativeListeners = proto[zoneSymbol(LISTENERS_EVENT_LISTENER)] =\n proto[LISTENERS_EVENT_LISTENER];\n const nativeRemoveAllListeners = proto[zoneSymbol(REMOVE_ALL_LISTENERS_EVENT_LISTENER)] =\n proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER];\n let nativePrependEventListener;\n if (patchOptions && patchOptions.prepend) {\n nativePrependEventListener = proto[zoneSymbol(patchOptions.prepend)] =\n proto[patchOptions.prepend];\n }\n /**\n * This util function will build an option object with passive option\n * to handle all possible input from the user.\n */\n function buildEventListenerOptions(options, passive) {\n if (!passiveSupported && typeof options === 'object' && options) {\n // doesn't support passive but user want to pass an object as options.\n // this will not work on some old browser, so we just pass a boolean\n // as useCapture parameter\n return !!options.capture;\n }\n if (!passiveSupported || !passive) {\n return options;\n }\n if (typeof options === 'boolean') {\n return { capture: options, passive: true };\n }\n if (!options) {\n return { passive: true };\n }\n if (typeof options === 'object' && options.passive !== false) {\n return Object.assign(Object.assign({}, options), { passive: true });\n }\n return options;\n }\n const customScheduleGlobal = function (task) {\n // if there is already a task for the eventName + capture,\n // just return, because we use the shared globalZoneAwareCallback here.\n if (taskData.isExisting) {\n return;\n }\n return nativeAddEventListener.call(taskData.target, taskData.eventName, taskData.capture ? globalZoneAwareCaptureCallback : globalZoneAwareCallback, taskData.options);\n };\n const customCancelGlobal = function (task) {\n // if task is not marked as isRemoved, this call is directly\n // from Zone.prototype.cancelTask, we should remove the task\n // from tasksList of target first\n if (!task.isRemoved) {\n const symbolEventNames = zoneSymbolEventNames[task.eventName];\n let symbolEventName;\n if (symbolEventNames) {\n symbolEventName = symbolEventNames[task.capture ? TRUE_STR : FALSE_STR];\n }\n const existingTasks = symbolEventName && task.target[symbolEventName];\n if (existingTasks) {\n for (let i = 0; i < existingTasks.length; i++) {\n const existingTask = existingTasks[i];\n if (existingTask === task) {\n existingTasks.splice(i, 1);\n // set isRemoved to data for faster invokeTask check\n task.isRemoved = true;\n if (existingTasks.length === 0) {\n // all tasks for the eventName + capture have gone,\n // remove globalZoneAwareCallback and remove the task cache from target\n task.allRemoved = true;\n task.target[symbolEventName] = null;\n }\n break;\n }\n }\n }\n }\n // if all tasks for the eventName + capture have gone,\n // we will really remove the global event callback,\n // if not, return\n if (!task.allRemoved) {\n return;\n }\n return nativeRemoveEventListener.call(task.target, task.eventName, task.capture ? globalZoneAwareCaptureCallback : globalZoneAwareCallback, task.options);\n };\n const customScheduleNonGlobal = function (task) {\n return nativeAddEventListener.call(taskData.target, taskData.eventName, task.invoke, taskData.options);\n };\n const customSchedulePrepend = function (task) {\n return nativePrependEventListener.call(taskData.target, taskData.eventName, task.invoke, taskData.options);\n };\n const customCancelNonGlobal = function (task) {\n return nativeRemoveEventListener.call(task.target, task.eventName, task.invoke, task.options);\n };\n const customSchedule = useGlobalCallback ? customScheduleGlobal : customScheduleNonGlobal;\n const customCancel = useGlobalCallback ? customCancelGlobal : customCancelNonGlobal;\n const compareTaskCallbackVsDelegate = function (task, delegate) {\n const typeOfDelegate = typeof delegate;\n return (typeOfDelegate === 'function' && task.callback === delegate) ||\n (typeOfDelegate === 'object' && task.originalDelegate === delegate);\n };\n const compare = (patchOptions && patchOptions.diff) ? patchOptions.diff : compareTaskCallbackVsDelegate;\n const unpatchedEvents = Zone[zoneSymbol('UNPATCHED_EVENTS')];\n const passiveEvents = _global[zoneSymbol('PASSIVE_EVENTS')];\n const makeAddListener = function (nativeListener, addSource, customScheduleFn, customCancelFn, returnTarget = false, prepend = false) {\n return function () {\n const target = this || _global;\n let eventName = arguments[0];\n if (patchOptions && patchOptions.transferEventName) {\n eventName = patchOptions.transferEventName(eventName);\n }\n let delegate = arguments[1];\n if (!delegate) {\n return nativeListener.apply(this, arguments);\n }\n if (isNode && eventName === 'uncaughtException') {\n // don't patch uncaughtException of nodejs to prevent endless loop\n return nativeListener.apply(this, arguments);\n }\n // don't create the bind delegate function for handleEvent\n // case here to improve addEventListener performance\n // we will create the bind delegate when invoke\n let isHandleEvent = false;\n if (typeof delegate !== 'function') {\n if (!delegate.handleEvent) {\n return nativeListener.apply(this, arguments);\n }\n isHandleEvent = true;\n }\n if (validateHandler && !validateHandler(nativeListener, delegate, target, arguments)) {\n return;\n }\n const passive = passiveSupported && !!passiveEvents && passiveEvents.indexOf(eventName) !== -1;\n const options = buildEventListenerOptions(arguments[2], passive);\n if (unpatchedEvents) {\n // check unpatched list\n for (let i = 0; i < unpatchedEvents.length; i++) {\n if (eventName === unpatchedEvents[i]) {\n if (passive) {\n return nativeListener.call(target, eventName, delegate, options);\n }\n else {\n return nativeListener.apply(this, arguments);\n }\n }\n }\n }\n const capture = !options ? false : typeof options === 'boolean' ? true : options.capture;\n const once = options && typeof options === 'object' ? options.once : false;\n const zone = Zone.current;\n let symbolEventNames = zoneSymbolEventNames[eventName];\n if (!symbolEventNames) {\n prepareEventNames(eventName, eventNameToString);\n symbolEventNames = zoneSymbolEventNames[eventName];\n }\n const symbolEventName = symbolEventNames[capture ? TRUE_STR : FALSE_STR];\n let existingTasks = target[symbolEventName];\n let isExisting = false;\n if (existingTasks) {\n // already have task registered\n isExisting = true;\n if (checkDuplicate) {\n for (let i = 0; i < existingTasks.length; i++) {\n if (compare(existingTasks[i], delegate)) {\n // same callback, same capture, same event name, just return\n return;\n }\n }\n }\n }\n else {\n existingTasks = target[symbolEventName] = [];\n }\n let source;\n const constructorName = target.constructor['name'];\n const targetSource = globalSources[constructorName];\n if (targetSource) {\n source = targetSource[eventName];\n }\n if (!source) {\n source = constructorName + addSource +\n (eventNameToString ? eventNameToString(eventName) : eventName);\n }\n // do not create a new object as task.data to pass those things\n // just use the global shared one\n taskData.options = options;\n if (once) {\n // if addEventListener with once options, we don't pass it to\n // native addEventListener, instead we keep the once setting\n // and handle ourselves.\n taskData.options.once = false;\n }\n taskData.target = target;\n taskData.capture = capture;\n taskData.eventName = eventName;\n taskData.isExisting = isExisting;\n const data = useGlobalCallback ? OPTIMIZED_ZONE_EVENT_TASK_DATA : undefined;\n // keep taskData into data to allow onScheduleEventTask to access the task information\n if (data) {\n data.taskData = taskData;\n }\n const task = zone.scheduleEventTask(source, delegate, data, customScheduleFn, customCancelFn);\n // should clear taskData.target to avoid memory leak\n // issue, https://github.com/angular/angular/issues/20442\n taskData.target = null;\n // need to clear up taskData because it is a global object\n if (data) {\n data.taskData = null;\n }\n // have to save those information to task in case\n // application may call task.zone.cancelTask() directly\n if (once) {\n options.once = true;\n }\n if (!(!passiveSupported && typeof task.options === 'boolean')) {\n // if not support passive, and we pass an option object\n // to addEventListener, we should save the options to task\n task.options = options;\n }\n task.target = target;\n task.capture = capture;\n task.eventName = eventName;\n if (isHandleEvent) {\n // save original delegate for compare to check duplicate\n task.originalDelegate = delegate;\n }\n if (!prepend) {\n existingTasks.push(task);\n }\n else {\n existingTasks.unshift(task);\n }\n if (returnTarget) {\n return target;\n }\n };\n };\n proto[ADD_EVENT_LISTENER] = makeAddListener(nativeAddEventListener, ADD_EVENT_LISTENER_SOURCE, customSchedule, customCancel, returnTarget);\n if (nativePrependEventListener) {\n proto[PREPEND_EVENT_LISTENER] = makeAddListener(nativePrependEventListener, PREPEND_EVENT_LISTENER_SOURCE, customSchedulePrepend, customCancel, returnTarget, true);\n }\n proto[REMOVE_EVENT_LISTENER] = function () {\n const target = this || _global;\n let eventName = arguments[0];\n if (patchOptions && patchOptions.transferEventName) {\n eventName = patchOptions.transferEventName(eventName);\n }\n const options = arguments[2];\n const capture = !options ? false : typeof options === 'boolean' ? true : options.capture;\n const delegate = arguments[1];\n if (!delegate) {\n return nativeRemoveEventListener.apply(this, arguments);\n }\n if (validateHandler &&\n !validateHandler(nativeRemoveEventListener, delegate, target, arguments)) {\n return;\n }\n const symbolEventNames = zoneSymbolEventNames[eventName];\n let symbolEventName;\n if (symbolEventNames) {\n symbolEventName = symbolEventNames[capture ? TRUE_STR : FALSE_STR];\n }\n const existingTasks = symbolEventName && target[symbolEventName];\n if (existingTasks) {\n for (let i = 0; i < existingTasks.length; i++) {\n const existingTask = existingTasks[i];\n if (compare(existingTask, delegate)) {\n existingTasks.splice(i, 1);\n // set isRemoved to data for faster invokeTask check\n existingTask.isRemoved = true;\n if (existingTasks.length === 0) {\n // all tasks for the eventName + capture have gone,\n // remove globalZoneAwareCallback and remove the task cache from target\n existingTask.allRemoved = true;\n target[symbolEventName] = null;\n // in the target, we have an event listener which is added by on_property\n // such as target.onclick = function() {}, so we need to clear this internal\n // property too if all delegates all removed\n if (typeof eventName === 'string') {\n const onPropertySymbol = ZONE_SYMBOL_PREFIX + 'ON_PROPERTY' + eventName;\n target[onPropertySymbol] = null;\n }\n }\n existingTask.zone.cancelTask(existingTask);\n if (returnTarget) {\n return target;\n }\n return;\n }\n }\n }\n // issue 930, didn't find the event name or callback\n // from zone kept existingTasks, the callback maybe\n // added outside of zone, we need to call native removeEventListener\n // to try to remove it.\n return nativeRemoveEventListener.apply(this, arguments);\n };\n proto[LISTENERS_EVENT_LISTENER] = function () {\n const target = this || _global;\n let eventName = arguments[0];\n if (patchOptions && patchOptions.transferEventName) {\n eventName = patchOptions.transferEventName(eventName);\n }\n const listeners = [];\n const tasks = findEventTasks(target, eventNameToString ? eventNameToString(eventName) : eventName);\n for (let i = 0; i < tasks.length; i++) {\n const task = tasks[i];\n let delegate = task.originalDelegate ? task.originalDelegate : task.callback;\n listeners.push(delegate);\n }\n return listeners;\n };\n proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER] = function () {\n const target = this || _global;\n let eventName = arguments[0];\n if (!eventName) {\n const keys = Object.keys(target);\n for (let i = 0; i < keys.length; i++) {\n const prop = keys[i];\n const match = EVENT_NAME_SYMBOL_REGX.exec(prop);\n let evtName = match && match[1];\n // in nodejs EventEmitter, removeListener event is\n // used for monitoring the removeListener call,\n // so just keep removeListener eventListener until\n // all other eventListeners are removed\n if (evtName && evtName !== 'removeListener') {\n this[REMOVE_ALL_LISTENERS_EVENT_LISTENER].call(this, evtName);\n }\n }\n // remove removeListener listener finally\n this[REMOVE_ALL_LISTENERS_EVENT_LISTENER].call(this, 'removeListener');\n }\n else {\n if (patchOptions && patchOptions.transferEventName) {\n eventName = patchOptions.transferEventName(eventName);\n }\n const symbolEventNames = zoneSymbolEventNames[eventName];\n if (symbolEventNames) {\n const symbolEventName = symbolEventNames[FALSE_STR];\n const symbolCaptureEventName = symbolEventNames[TRUE_STR];\n const tasks = target[symbolEventName];\n const captureTasks = target[symbolCaptureEventName];\n if (tasks) {\n const removeTasks = tasks.slice();\n for (let i = 0; i < removeTasks.length; i++) {\n const task = removeTasks[i];\n let delegate = task.originalDelegate ? task.originalDelegate : task.callback;\n this[REMOVE_EVENT_LISTENER].call(this, eventName, delegate, task.options);\n }\n }\n if (captureTasks) {\n const removeTasks = captureTasks.slice();\n for (let i = 0; i < removeTasks.length; i++) {\n const task = removeTasks[i];\n let delegate = task.originalDelegate ? task.originalDelegate : task.callback;\n this[REMOVE_EVENT_LISTENER].call(this, eventName, delegate, task.options);\n }\n }\n }\n }\n if (returnTarget) {\n return this;\n }\n };\n // for native toString patch\n attachOriginToPatched(proto[ADD_EVENT_LISTENER], nativeAddEventListener);\n attachOriginToPatched(proto[REMOVE_EVENT_LISTENER], nativeRemoveEventListener);\n if (nativeRemoveAllListeners) {\n attachOriginToPatched(proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER], nativeRemoveAllListeners);\n }\n if (nativeListeners) {\n attachOriginToPatched(proto[LISTENERS_EVENT_LISTENER], nativeListeners);\n }\n return true;\n }\n let results = [];\n for (let i = 0; i < apis.length; i++) {\n results[i] = patchEventTargetMethods(apis[i], patchOptions);\n }\n return results;\n}\nfunction findEventTasks(target, eventName) {\n if (!eventName) {\n const foundTasks = [];\n for (let prop in target) {\n const match = EVENT_NAME_SYMBOL_REGX.exec(prop);\n let evtName = match && match[1];\n if (evtName && (!eventName || evtName === eventName)) {\n const tasks = target[prop];\n if (tasks) {\n for (let i = 0; i < tasks.length; i++) {\n foundTasks.push(tasks[i]);\n }\n }\n }\n }\n return foundTasks;\n }\n let symbolEventName = zoneSymbolEventNames[eventName];\n if (!symbolEventName) {\n prepareEventNames(eventName);\n symbolEventName = zoneSymbolEventNames[eventName];\n }\n const captureFalseTasks = target[symbolEventName[FALSE_STR]];\n const captureTrueTasks = target[symbolEventName[TRUE_STR]];\n if (!captureFalseTasks) {\n return captureTrueTasks ? captureTrueTasks.slice() : [];\n }\n else {\n return captureTrueTasks ? captureFalseTasks.concat(captureTrueTasks) :\n captureFalseTasks.slice();\n }\n}\nfunction patchEventPrototype(global, api) {\n const Event = global['Event'];\n if (Event && Event.prototype) {\n api.patchMethod(Event.prototype, 'stopImmediatePropagation', (delegate) => function (self, args) {\n self[IMMEDIATE_PROPAGATION_SYMBOL] = true;\n // we need to call the native stopImmediatePropagation\n // in case in some hybrid application, some part of\n // application will be controlled by zone, some are not\n delegate && delegate.apply(self, args);\n });\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction patchCallbacks(api, target, targetName, method, callbacks) {\n const symbol = Zone.__symbol__(method);\n if (target[symbol]) {\n return;\n }\n const nativeDelegate = target[symbol] = target[method];\n target[method] = function (name, opts, options) {\n if (opts && opts.prototype) {\n callbacks.forEach(function (callback) {\n const source = `${targetName}.${method}::` + callback;\n const prototype = opts.prototype;\n // Note: the `patchCallbacks` is used for patching the `document.registerElement` and\n // `customElements.define`. We explicitly wrap the patching code into try-catch since\n // callbacks may be already patched by other web components frameworks (e.g. LWC), and they\n // make those properties non-writable. This means that patching callback will throw an error\n // `cannot assign to read-only property`. See this code as an example:\n // https://github.com/salesforce/lwc/blob/master/packages/@lwc/engine-core/src/framework/base-bridge-element.ts#L180-L186\n // We don't want to stop the application rendering if we couldn't patch some\n // callback, e.g. `attributeChangedCallback`.\n try {\n if (prototype.hasOwnProperty(callback)) {\n const descriptor = api.ObjectGetOwnPropertyDescriptor(prototype, callback);\n if (descriptor && descriptor.value) {\n descriptor.value = api.wrapWithCurrentZone(descriptor.value, source);\n api._redefineProperty(opts.prototype, callback, descriptor);\n }\n else if (prototype[callback]) {\n prototype[callback] = api.wrapWithCurrentZone(prototype[callback], source);\n }\n }\n else if (prototype[callback]) {\n prototype[callback] = api.wrapWithCurrentZone(prototype[callback], source);\n }\n }\n catch (_a) {\n // Note: we leave the catch block empty since there's no way to handle the error related\n // to non-writable property.\n }\n });\n }\n return nativeDelegate.call(target, name, opts, options);\n };\n api.attachOriginToPatched(target[method], nativeDelegate);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction filterProperties(target, onProperties, ignoreProperties) {\n if (!ignoreProperties || ignoreProperties.length === 0) {\n return onProperties;\n }\n const tip = ignoreProperties.filter(ip => ip.target === target);\n if (!tip || tip.length === 0) {\n return onProperties;\n }\n const targetIgnoreProperties = tip[0].ignoreProperties;\n return onProperties.filter(op => targetIgnoreProperties.indexOf(op) === -1);\n}\nfunction patchFilteredProperties(target, onProperties, ignoreProperties, prototype) {\n // check whether target is available, sometimes target will be undefined\n // because different browser or some 3rd party plugin.\n if (!target) {\n return;\n }\n const filteredProperties = filterProperties(target, onProperties, ignoreProperties);\n patchOnProperties(target, filteredProperties, prototype);\n}\n/**\n * Get all event name properties which the event name startsWith `on`\n * from the target object itself, inherited properties are not considered.\n */\nfunction getOnEventNames(target) {\n return Object.getOwnPropertyNames(target)\n .filter(name => name.startsWith('on') && name.length > 2)\n .map(name => name.substring(2));\n}\nfunction propertyDescriptorPatch(api, _global) {\n if (isNode && !isMix) {\n return;\n }\n if (Zone[api.symbol('patchEvents')]) {\n // events are already been patched by legacy patch.\n return;\n }\n const ignoreProperties = _global['__Zone_ignore_on_properties'];\n // for browsers that we can patch the descriptor: Chrome & Firefox\n let patchTargets = [];\n if (isBrowser) {\n const internalWindow = window;\n patchTargets = patchTargets.concat([\n 'Document', 'SVGElement', 'Element', 'HTMLElement', 'HTMLBodyElement', 'HTMLMediaElement',\n 'HTMLFrameSetElement', 'HTMLFrameElement', 'HTMLIFrameElement', 'HTMLMarqueeElement', 'Worker'\n ]);\n const ignoreErrorProperties = isIE() ? [{ target: internalWindow, ignoreProperties: ['error'] }] : [];\n // in IE/Edge, onProp not exist in window object, but in WindowPrototype\n // so we need to pass WindowPrototype to check onProp exist or not\n patchFilteredProperties(internalWindow, getOnEventNames(internalWindow), ignoreProperties ? ignoreProperties.concat(ignoreErrorProperties) : ignoreProperties, ObjectGetPrototypeOf(internalWindow));\n }\n patchTargets = patchTargets.concat([\n 'XMLHttpRequest', 'XMLHttpRequestEventTarget', 'IDBIndex', 'IDBRequest', 'IDBOpenDBRequest',\n 'IDBDatabase', 'IDBTransaction', 'IDBCursor', 'WebSocket'\n ]);\n for (let i = 0; i < patchTargets.length; i++) {\n const target = _global[patchTargets[i]];\n target && target.prototype &&\n patchFilteredProperties(target.prototype, getOnEventNames(target.prototype), ignoreProperties);\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nZone.__load_patch('util', (global, Zone, api) => {\n // Collect native event names by looking at properties\n // on the global namespace, e.g. 'onclick'.\n const eventNames = getOnEventNames(global);\n api.patchOnProperties = patchOnProperties;\n api.patchMethod = patchMethod;\n api.bindArguments = bindArguments;\n api.patchMacroTask = patchMacroTask;\n // In earlier version of zone.js (<0.9.0), we use env name `__zone_symbol__BLACK_LISTED_EVENTS` to\n // define which events will not be patched by `Zone.js`.\n // In newer version (>=0.9.0), we change the env name to `__zone_symbol__UNPATCHED_EVENTS` to keep\n // the name consistent with angular repo.\n // The `__zone_symbol__BLACK_LISTED_EVENTS` is deprecated, but it is still be supported for\n // backwards compatibility.\n const SYMBOL_BLACK_LISTED_EVENTS = Zone.__symbol__('BLACK_LISTED_EVENTS');\n const SYMBOL_UNPATCHED_EVENTS = Zone.__symbol__('UNPATCHED_EVENTS');\n if (global[SYMBOL_UNPATCHED_EVENTS]) {\n global[SYMBOL_BLACK_LISTED_EVENTS] = global[SYMBOL_UNPATCHED_EVENTS];\n }\n if (global[SYMBOL_BLACK_LISTED_EVENTS]) {\n Zone[SYMBOL_BLACK_LISTED_EVENTS] = Zone[SYMBOL_UNPATCHED_EVENTS] =\n global[SYMBOL_BLACK_LISTED_EVENTS];\n }\n api.patchEventPrototype = patchEventPrototype;\n api.patchEventTarget = patchEventTarget;\n api.isIEOrEdge = isIEOrEdge;\n api.ObjectDefineProperty = ObjectDefineProperty;\n api.ObjectGetOwnPropertyDescriptor = ObjectGetOwnPropertyDescriptor;\n api.ObjectCreate = ObjectCreate;\n api.ArraySlice = ArraySlice;\n api.patchClass = patchClass;\n api.wrapWithCurrentZone = wrapWithCurrentZone;\n api.filterProperties = filterProperties;\n api.attachOriginToPatched = attachOriginToPatched;\n api._redefineProperty = Object.defineProperty;\n api.patchCallbacks = patchCallbacks;\n api.getGlobalObjects = () => ({\n globalSources,\n zoneSymbolEventNames,\n eventNames,\n isBrowser,\n isMix,\n isNode,\n TRUE_STR,\n FALSE_STR,\n ZONE_SYMBOL_PREFIX,\n ADD_EVENT_LISTENER_STR,\n REMOVE_EVENT_LISTENER_STR\n });\n});\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst taskSymbol = zoneSymbol('zoneTask');\nfunction patchTimer(window, setName, cancelName, nameSuffix) {\n let setNative = null;\n let clearNative = null;\n setName += nameSuffix;\n cancelName += nameSuffix;\n const tasksByHandleId = {};\n function scheduleTask(task) {\n const data = task.data;\n data.args[0] = function () {\n return task.invoke.apply(this, arguments);\n };\n data.handleId = setNative.apply(window, data.args);\n return task;\n }\n function clearTask(task) {\n return clearNative.call(window, task.data.handleId);\n }\n setNative =\n patchMethod(window, setName, (delegate) => function (self, args) {\n if (typeof args[0] === 'function') {\n const options = {\n isPeriodic: nameSuffix === 'Interval',\n delay: (nameSuffix === 'Timeout' || nameSuffix === 'Interval') ? args[1] || 0 :\n undefined,\n args: args\n };\n const callback = args[0];\n args[0] = function timer() {\n try {\n return callback.apply(this, arguments);\n }\n finally {\n // issue-934, task will be cancelled\n // even it is a periodic task such as\n // setInterval\n // https://github.com/angular/angular/issues/40387\n // Cleanup tasksByHandleId should be handled before scheduleTask\n // Since some zoneSpec may intercept and doesn't trigger\n // scheduleFn(scheduleTask) provided here.\n if (!(options.isPeriodic)) {\n if (typeof options.handleId === 'number') {\n // in non-nodejs env, we remove timerId\n // from local cache\n delete tasksByHandleId[options.handleId];\n }\n else if (options.handleId) {\n // Node returns complex objects as handleIds\n // we remove task reference from timer object\n options.handleId[taskSymbol] = null;\n }\n }\n }\n };\n const task = scheduleMacroTaskWithCurrentZone(setName, args[0], options, scheduleTask, clearTask);\n if (!task) {\n return task;\n }\n // Node.js must additionally support the ref and unref functions.\n const handle = task.data.handleId;\n if (typeof handle === 'number') {\n // for non nodejs env, we save handleId: task\n // mapping in local cache for clearTimeout\n tasksByHandleId[handle] = task;\n }\n else if (handle) {\n // for nodejs env, we save task\n // reference in timerId Object for clearTimeout\n handle[taskSymbol] = task;\n }\n // check whether handle is null, because some polyfill or browser\n // may return undefined from setTimeout/setInterval/setImmediate/requestAnimationFrame\n if (handle && handle.ref && handle.unref && typeof handle.ref === 'function' &&\n typeof handle.unref === 'function') {\n task.ref = handle.ref.bind(handle);\n task.unref = handle.unref.bind(handle);\n }\n if (typeof handle === 'number' || handle) {\n return handle;\n }\n return task;\n }\n else {\n // cause an error by calling it directly.\n return delegate.apply(window, args);\n }\n });\n clearNative =\n patchMethod(window, cancelName, (delegate) => function (self, args) {\n const id = args[0];\n let task;\n if (typeof id === 'number') {\n // non nodejs env.\n task = tasksByHandleId[id];\n }\n else {\n // nodejs env.\n task = id && id[taskSymbol];\n // other environments.\n if (!task) {\n task = id;\n }\n }\n if (task && typeof task.type === 'string') {\n if (task.state !== 'notScheduled' &&\n (task.cancelFn && task.data.isPeriodic || task.runCount === 0)) {\n if (typeof id === 'number') {\n delete tasksByHandleId[id];\n }\n else if (id) {\n id[taskSymbol] = null;\n }\n // Do not cancel already canceled functions\n task.zone.cancelTask(task);\n }\n }\n else {\n // cause an error by calling it directly.\n delegate.apply(window, args);\n }\n });\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction patchCustomElements(_global, api) {\n const { isBrowser, isMix } = api.getGlobalObjects();\n if ((!isBrowser && !isMix) || !_global['customElements'] || !('customElements' in _global)) {\n return;\n }\n const callbacks = ['connectedCallback', 'disconnectedCallback', 'adoptedCallback', 'attributeChangedCallback'];\n api.patchCallbacks(api, _global.customElements, 'customElements', 'define', callbacks);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction eventTargetPatch(_global, api) {\n if (Zone[api.symbol('patchEventTarget')]) {\n // EventTarget is already patched.\n return;\n }\n const { eventNames, zoneSymbolEventNames, TRUE_STR, FALSE_STR, ZONE_SYMBOL_PREFIX } = api.getGlobalObjects();\n // predefine all __zone_symbol__ + eventName + true/false string\n for (let i = 0; i < eventNames.length; i++) {\n const eventName = eventNames[i];\n const falseEventName = eventName + FALSE_STR;\n const trueEventName = eventName + TRUE_STR;\n const symbol = ZONE_SYMBOL_PREFIX + falseEventName;\n const symbolCapture = ZONE_SYMBOL_PREFIX + trueEventName;\n zoneSymbolEventNames[eventName] = {};\n zoneSymbolEventNames[eventName][FALSE_STR] = symbol;\n zoneSymbolEventNames[eventName][TRUE_STR] = symbolCapture;\n }\n const EVENT_TARGET = _global['EventTarget'];\n if (!EVENT_TARGET || !EVENT_TARGET.prototype) {\n return;\n }\n api.patchEventTarget(_global, api, [EVENT_TARGET && EVENT_TARGET.prototype]);\n return true;\n}\nfunction patchEvent(global, api) {\n api.patchEventPrototype(global, api);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nZone.__load_patch('legacy', (global) => {\n const legacyPatch = global[Zone.__symbol__('legacyPatch')];\n if (legacyPatch) {\n legacyPatch();\n }\n});\nZone.__load_patch('queueMicrotask', (global, Zone, api) => {\n api.patchMethod(global, 'queueMicrotask', delegate => {\n return function (self, args) {\n Zone.current.scheduleMicroTask('queueMicrotask', args[0]);\n };\n });\n});\nZone.__load_patch('timers', (global) => {\n const set = 'set';\n const clear = 'clear';\n patchTimer(global, set, clear, 'Timeout');\n patchTimer(global, set, clear, 'Interval');\n patchTimer(global, set, clear, 'Immediate');\n});\nZone.__load_patch('requestAnimationFrame', (global) => {\n patchTimer(global, 'request', 'cancel', 'AnimationFrame');\n patchTimer(global, 'mozRequest', 'mozCancel', 'AnimationFrame');\n patchTimer(global, 'webkitRequest', 'webkitCancel', 'AnimationFrame');\n});\nZone.__load_patch('blocking', (global, Zone) => {\n const blockingMethods = ['alert', 'prompt', 'confirm'];\n for (let i = 0; i < blockingMethods.length; i++) {\n const name = blockingMethods[i];\n patchMethod(global, name, (delegate, symbol, name) => {\n return function (s, args) {\n return Zone.current.run(delegate, global, args, name);\n };\n });\n }\n});\nZone.__load_patch('EventTarget', (global, Zone, api) => {\n patchEvent(global, api);\n eventTargetPatch(global, api);\n // patch XMLHttpRequestEventTarget's addEventListener/removeEventListener\n const XMLHttpRequestEventTarget = global['XMLHttpRequestEventTarget'];\n if (XMLHttpRequestEventTarget && XMLHttpRequestEventTarget.prototype) {\n api.patchEventTarget(global, api, [XMLHttpRequestEventTarget.prototype]);\n }\n});\nZone.__load_patch('MutationObserver', (global, Zone, api) => {\n patchClass('MutationObserver');\n patchClass('WebKitMutationObserver');\n});\nZone.__load_patch('IntersectionObserver', (global, Zone, api) => {\n patchClass('IntersectionObserver');\n});\nZone.__load_patch('FileReader', (global, Zone, api) => {\n patchClass('FileReader');\n});\nZone.__load_patch('on_property', (global, Zone, api) => {\n propertyDescriptorPatch(api, global);\n});\nZone.__load_patch('customElements', (global, Zone, api) => {\n patchCustomElements(global, api);\n});\nZone.__load_patch('XHR', (global, Zone) => {\n // Treat XMLHttpRequest as a macrotask.\n patchXHR(global);\n const XHR_TASK = zoneSymbol('xhrTask');\n const XHR_SYNC = zoneSymbol('xhrSync');\n const XHR_LISTENER = zoneSymbol('xhrListener');\n const XHR_SCHEDULED = zoneSymbol('xhrScheduled');\n const XHR_URL = zoneSymbol('xhrURL');\n const XHR_ERROR_BEFORE_SCHEDULED = zoneSymbol('xhrErrorBeforeScheduled');\n function patchXHR(window) {\n const XMLHttpRequest = window['XMLHttpRequest'];\n if (!XMLHttpRequest) {\n // XMLHttpRequest is not available in service worker\n return;\n }\n const XMLHttpRequestPrototype = XMLHttpRequest.prototype;\n function findPendingTask(target) {\n return target[XHR_TASK];\n }\n let oriAddListener = XMLHttpRequestPrototype[ZONE_SYMBOL_ADD_EVENT_LISTENER];\n let oriRemoveListener = XMLHttpRequestPrototype[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];\n if (!oriAddListener) {\n const XMLHttpRequestEventTarget = window['XMLHttpRequestEventTarget'];\n if (XMLHttpRequestEventTarget) {\n const XMLHttpRequestEventTargetPrototype = XMLHttpRequestEventTarget.prototype;\n oriAddListener = XMLHttpRequestEventTargetPrototype[ZONE_SYMBOL_ADD_EVENT_LISTENER];\n oriRemoveListener = XMLHttpRequestEventTargetPrototype[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];\n }\n }\n const READY_STATE_CHANGE = 'readystatechange';\n const SCHEDULED = 'scheduled';\n function scheduleTask(task) {\n const data = task.data;\n const target = data.target;\n target[XHR_SCHEDULED] = false;\n target[XHR_ERROR_BEFORE_SCHEDULED] = false;\n // remove existing event listener\n const listener = target[XHR_LISTENER];\n if (!oriAddListener) {\n oriAddListener = target[ZONE_SYMBOL_ADD_EVENT_LISTENER];\n oriRemoveListener = target[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];\n }\n if (listener) {\n oriRemoveListener.call(target, READY_STATE_CHANGE, listener);\n }\n const newListener = target[XHR_LISTENER] = () => {\n if (target.readyState === target.DONE) {\n // sometimes on some browsers XMLHttpRequest will fire onreadystatechange with\n // readyState=4 multiple times, so we need to check task state here\n if (!data.aborted && target[XHR_SCHEDULED] && task.state === SCHEDULED) {\n // check whether the xhr has registered onload listener\n // if that is the case, the task should invoke after all\n // onload listeners finish.\n // Also if the request failed without response (status = 0), the load event handler\n // will not be triggered, in that case, we should also invoke the placeholder callback\n // to close the XMLHttpRequest::send macroTask.\n // https://github.com/angular/angular/issues/38795\n const loadTasks = target[Zone.__symbol__('loadfalse')];\n if (target.status !== 0 && loadTasks && loadTasks.length > 0) {\n const oriInvoke = task.invoke;\n task.invoke = function () {\n // need to load the tasks again, because in other\n // load listener, they may remove themselves\n const loadTasks = target[Zone.__symbol__('loadfalse')];\n for (let i = 0; i < loadTasks.length; i++) {\n if (loadTasks[i] === task) {\n loadTasks.splice(i, 1);\n }\n }\n if (!data.aborted && task.state === SCHEDULED) {\n oriInvoke.call(task);\n }\n };\n loadTasks.push(task);\n }\n else {\n task.invoke();\n }\n }\n else if (!data.aborted && target[XHR_SCHEDULED] === false) {\n // error occurs when xhr.send()\n target[XHR_ERROR_BEFORE_SCHEDULED] = true;\n }\n }\n };\n oriAddListener.call(target, READY_STATE_CHANGE, newListener);\n const storedTask = target[XHR_TASK];\n if (!storedTask) {\n target[XHR_TASK] = task;\n }\n sendNative.apply(target, data.args);\n target[XHR_SCHEDULED] = true;\n return task;\n }\n function placeholderCallback() { }\n function clearTask(task) {\n const data = task.data;\n // Note - ideally, we would call data.target.removeEventListener here, but it's too late\n // to prevent it from firing. So instead, we store info for the event listener.\n data.aborted = true;\n return abortNative.apply(data.target, data.args);\n }\n const openNative = patchMethod(XMLHttpRequestPrototype, 'open', () => function (self, args) {\n self[XHR_SYNC] = args[2] == false;\n self[XHR_URL] = args[1];\n return openNative.apply(self, args);\n });\n const XMLHTTPREQUEST_SOURCE = 'XMLHttpRequest.send';\n const fetchTaskAborting = zoneSymbol('fetchTaskAborting');\n const fetchTaskScheduling = zoneSymbol('fetchTaskScheduling');\n const sendNative = patchMethod(XMLHttpRequestPrototype, 'send', () => function (self, args) {\n if (Zone.current[fetchTaskScheduling] === true) {\n // a fetch is scheduling, so we are using xhr to polyfill fetch\n // and because we already schedule macroTask for fetch, we should\n // not schedule a macroTask for xhr again\n return sendNative.apply(self, args);\n }\n if (self[XHR_SYNC]) {\n // if the XHR is sync there is no task to schedule, just execute the code.\n return sendNative.apply(self, args);\n }\n else {\n const options = { target: self, url: self[XHR_URL], isPeriodic: false, args: args, aborted: false };\n const task = scheduleMacroTaskWithCurrentZone(XMLHTTPREQUEST_SOURCE, placeholderCallback, options, scheduleTask, clearTask);\n if (self && self[XHR_ERROR_BEFORE_SCHEDULED] === true && !options.aborted &&\n task.state === SCHEDULED) {\n // xhr request throw error when send\n // we should invoke task instead of leaving a scheduled\n // pending macroTask\n task.invoke();\n }\n }\n });\n const abortNative = patchMethod(XMLHttpRequestPrototype, 'abort', () => function (self, args) {\n const task = findPendingTask(self);\n if (task && typeof task.type == 'string') {\n // If the XHR has already completed, do nothing.\n // If the XHR has already been aborted, do nothing.\n // Fix #569, call abort multiple times before done will cause\n // macroTask task count be negative number\n if (task.cancelFn == null || (task.data && task.data.aborted)) {\n return;\n }\n task.zone.cancelTask(task);\n }\n else if (Zone.current[fetchTaskAborting] === true) {\n // the abort is called from fetch polyfill, we need to call native abort of XHR.\n return abortNative.apply(self, args);\n }\n // Otherwise, we are trying to abort an XHR which has not yet been sent, so there is no\n // task\n // to cancel. Do nothing.\n });\n }\n});\nZone.__load_patch('geolocation', (global) => {\n /// GEO_LOCATION\n if (global['navigator'] && global['navigator'].geolocation) {\n patchPrototype(global['navigator'].geolocation, ['getCurrentPosition', 'watchPosition']);\n }\n});\nZone.__load_patch('PromiseRejectionEvent', (global, Zone) => {\n // handle unhandled promise rejection\n function findPromiseRejectionHandler(evtName) {\n return function (e) {\n const eventTasks = findEventTasks(global, evtName);\n eventTasks.forEach(eventTask => {\n // windows has added unhandledrejection event listener\n // trigger the event listener\n const PromiseRejectionEvent = global['PromiseRejectionEvent'];\n if (PromiseRejectionEvent) {\n const evt = new PromiseRejectionEvent(evtName, { promise: e.promise, reason: e.rejection });\n eventTask.invoke(evt);\n }\n });\n };\n }\n if (global['PromiseRejectionEvent']) {\n Zone[zoneSymbol('unhandledPromiseRejectionHandler')] =\n findPromiseRejectionHandler('unhandledrejection');\n Zone[zoneSymbol('rejectionHandledHandler')] =\n findPromiseRejectionHandler('rejectionhandled');\n }\n});\n"],"x_google_ignoreList":[0,1,2,3]}