blob: 0ef034155b5fb97d5921626ed28c5851d5982fe5 [file] [log] [blame]
{"version":3,"sources":["packages/core/core.umd.js"],"names":["global","factory","exports","module","require","define","amd","self","ng","core","rxjs","operators","this","getClosureSafeProperty","objWithPropertyToExtract","key","Error","fillProperties","target","source","hasOwnProperty","stringify","token","Array","isArray","map","join","overriddenName","name","res","toString","newLineIndex","indexOf","substring","concatStringsWithSpace","before","after","__forward_ref__","forwardRef","forwardRefFn","resolveForwardRef","type","isForwardRef","fn","extendStatics","d","b","Object","setPrototypeOf","__proto__","p","__extends","__","constructor","prototype","create","__values","o","s","Symbol","iterator","m","i","call","length","next","value","done","TypeError","__read","n","r","e","ar","push","error","__spread","arguments","concat","RuntimeError","_super","code","message","_this","formatRuntimeError","renderStringify","String","stringifyForError","throwProviderNotFoundError","injectorName","injectorDetails","assertNumber","actual","msg","throwError","assertDefined","expected","comparison","ɵɵdefineInjectable","opts","providedIn","undefined","Set","defineInjectable","ɵɵdefineInjector","options","providers","imports","getInjectableDef","getOwnDefinition","NG_PROV_DEF","NG_INJECTABLE_DEF","field","getInjectorDef","NG_INJ_DEF","NG_INJECTOR_DEF","InjectFlags","_injectImplementation","ChangeDetectionStrategy","ChangeDetectorStatus","ɵprov","ɵinj","ngInjectableDef","ngInjectorDef","getInjectImplementation","setInjectImplementation","impl","previous","injectRootLimpMode","notFoundValue","flags","injectableDef","Optional","noSideEffects","ɵChangeDetectorStatus","ViewEncapsulation","__globalThis","globalThis","__window","window","__self","WorkerGlobalScope","__global","_global","EMPTY_OBJ","EMPTY_ARRAY","EMPTY_ARRAY$1","NG_COMP_DEF","ɵcmp","NG_DIR_DEF","ɵdir","NG_PIPE_DEF","ɵpipe","NG_MOD_DEF","ɵmod","NG_LOC_ID_DEF","ɵloc","NG_FACTORY_DEF","ɵfac","NG_ELEMENT_ID","__NG_ELEMENT_ID__","_renderCompCount","ɵɵdefineComponent","componentDefinition","declaredInputs","def","providersResolver","decls","vars","template","consts","ngContentSelectors","hostBindings","hostVars","hostAttrs","contentQueries","inputs","outputs","exportAs","onPush","changeDetection","OnPush","directiveDefs","pipeDefs","selectors","viewQuery","features","data","encapsulation","Emulated","id","styles","_","setInput","schemas","tView","directiveTypes","directives","feature","pipeTypes","pipes","invertObject","forEach","extractDirectiveDef","extractPipeDef","ɵɵsetComponentScope","getComponentDef","getDirectiveDef","getPipeDef","autoRegisterModuleById","ɵɵdefineNgModule","bootstrap","declarations","transitiveCompileScopes","ɵɵsetNgModuleScope","scope","ngModuleDef","getNgModuleDef","obj","secondary","newLookup","minifiedKey","publicName","declaredName","ɵɵdefineDirective","ɵɵdefinePipe","pipeDef","pure","onDestroy","ngOnDestroy","throwNotFound","TViewTypeAsString","isLView","isLContainer","isContentQueryHost","tNode","isComponentHost","isDirectiveHost","isComponentDef","getFactoryDef","SimpleChange","previousValue","currentValue","firstChange","isFirstChange","ɵɵNgOnChangesFeature","NgOnChangesFeatureImpl","definition","ngOnChanges","ngOnChangesSetInput","rememberChangeHistoryAndInvokeOnChangesHook","simpleChangesStore","getSimpleChangesStore","current","instance","privateName","setSimpleChangesStore","store","previousChange","ngInherit","RendererStyleFlags3","profilerCallback","setProfiler","profiler","event","hookOrListener","DOCUMENT","getDocument","document","isProceduralRenderer","renderer","domRendererFactory3","createRenderer","hostElement","rendererType","unwrapRNode","getNativeByIndex","index","lView","getNativeByTNode","getTNode","load","view","getComponentLViewByIndex","nodeIndex","hostView","slotValue","readPatchedData","readPatchedLView","isCreationMode","viewAttachedToChangeDetector","getConstant","resetPreOrderHookFlags","updateTransplantedViewCount","lContainer","amount","viewOrContainer","parent","instructionState","lFrame","createLFrame","bindingsEnabled","isInCheckNoChangesMode","getBindingsEnabled","ɵɵenableBindings","ɵɵdisableBindings","getLView","getTView","ɵɵrestoreView","viewToRestore","contextLView","getCurrentTNode","currentTNode","getCurrentTNodePlaceholderOk","getCurrentParentTNode","isParent","setCurrentTNode","isCurrentTNodeParent","setCurrentTNodeAsNotParent","setIsInCheckNoChangesMode","mode","getBindingRoot","bindingRootIndex","bindingStartIndex","getBindingIndex","bindingIndex","setBindingIndex","nextBindingIndex","incrementBindingIndex","count","setInI18nBlock","isInI18nBlock","inI18n","setCurrentDirectiveIndex","currentDirectiveIndex","getCurrentDirectiveDef","tData","getCurrentQueryIndex","currentQueryIndex","setCurrentQueryIndex","getDeclarationTNode","declTNode","enterDI","SkipSelf","parentTNode","parentLView","Host","allocLFrame","enterView","newView","newLFrame","firstChild","currentLFrame","childLFrame","child","selectedIndex","elementDepthCount","currentNamespace","leaveViewLight","oldLFrame","leaveDI","leaveView","nextContextImpl","level","walkUpViews","nestingLevel","currentView","getSelectedIndex","setSelectedIndex","getSelectedTNode","ɵɵnamespaceSVG","ɵɵnamespaceMathML","ɵɵnamespaceHTML","namespaceHTMLInternal","registerPostOrderHooks","directiveStart","end","directiveEnd","lifecycleHooks","ngAfterContentInit","ngAfterContentChecked","ngAfterViewInit","ngAfterViewChecked","contentHooks","contentCheckHooks","viewHooks","viewCheckHooks","destroyHooks","executeCheckHooks","hooks","callHooks","executeInitAndCheckHooks","initPhase","incrementInitPhaseFlags","arr","currentNodeIndex","nodeIndexLimit","max","lastNodeIndexFound","callHook","isInitHook","hook","directive","NodeInjectorFactory","isViewProvider","injectImplementation","resolving","canSeeViewProviders","injectImpl","toTNodeTypeAsString","tNodeType","text","setUpAttributes","native","attrs","isProc","namespaceURI","attrName","attrVal","setAttribute","setAttributeNS","isAnimationProp","setProperty","isNameOnlyAttributeMarker","marker","charCodeAt","mergeHostAttrs","dst","src","slice","srcMarker","item","mergeHostAttribute","key1","key2","markerInsertPosition","dstValue","splice","hasParentInjector","parentLocation","getParentInjectorIndex","getParentInjectorView","location","startView","viewOffset","getParentInjectorViewOffset","parentView","includeViewProviders","setIncludeViewProviders","v","oldValue","nextNgElementId","getOrCreateNodeInjectorForNode","existingInjectorIndex","getInjectorIndex","firstCreatePass","injectorIndex","insertBloom","blueprint","parentLoc","getParentInjectorLocation","parentIndex","parentData","footer","declarationViewOffset","lViewCursor","tViewType","diPublicInInjector","bloomAdd","bloomHash","BLOOM_SIZE","injectAttributeImpl","attrNameToInject","classes","attrsLength","notFoundValueOrThrow","lookupTokenUsingModuleInjector","Self","moduleInjector","previousInjectImplementation","get","getOrCreateInjectable","Default","bloomHashBitOrFactory","tokenId","createNodeInjector","previousTView","hostTElementNode","shouldSearchParent","bloomHasToken","searchTokensOnInjector","NOT_FOUND","NodeInjector","currentTView","injectableIdx","locateDirectiveOrProvider","getNodeInjectable","canAccessViewProviders","isHostSpecialCase","nodeProviderIndexes","providerIndexes","tInjectables","injectablesStart","directivesStart","cptViewProvidersCount","endIndex","providerTokenOrDef","dirDef","isFactory","throwCyclicDependencyError","path","depPath","previousIncludeViewProviders","registerPreOrderHooks","directiveIndex","directiveDef","_a","ngOnInit","ngDoCheck","wrappedOnChanges","preOrderHooks","preOrderCheckHooks","injectorView","isFirstHostTNode","_tNode","_lView","ɵɵgetInheritedFactory","ownConstructor","ownFactory","getFactoryOf","objectPrototype","getPrototypeOf","t","ɵɵinjectAttribute","ANNOTATIONS","PARAMETERS","PROP_METADATA","makeDecorator","props","parentClass","additionalProcessing","typeFn","metaCtor","makeMetadataCtor","DecoratorFactory","args","_i","apply","annotationInstance","bind","TypeDecorator","cls","defineProperty","ngMetadataName","annotationCls","ctor","values","propName","makeParamDecorator","ParamDecoratorFactory","ParamDecorator","annotation","unusedKey","parameters","makePropDecorator","PropDecoratorFactory","decoratorInstance","PropDecorator","meta","unshift","R3ResolvedDependencyType","R3FactoryTarget","Query","Attribute","CREATE_ATTRIBUTE_DECORATOR__PRE_R3__","attributeName","CREATE_ATTRIBUTE_DECORATOR_IMPL","InjectionToken","_desc","ANALYZE_FOR_ENTRY_COMPONENTS","ContentChildren","selector","assign","first","isViewQuery","descendants","emitDistinctChangesOnly","ContentChild","ViewChildren","ViewChild","getCompilerFacade","globalNg","ɵcompilerFacade","Type","Function","isType","flatten","list","deepForEach","input","addToArray","removeFromArray","pop","newArray","size","keyValueArraySet","keyValueArray","keyValueArrayIndexOf","arrayInsert2","array","value1","value2","keyValueArrayGet","_arrayIndexOfSorted","shift","start","middle","ES5_DELEGATE_CTOR","ES2015_INHERITED_CLASS","ES2015_INHERITED_CLASS_WITH_CTOR","ES2015_INHERITED_CLASS_WITH_DELEGATE_CTOR","ReflectionCapabilities","reflect","_reflect","isReflectionEnabled","_zipTypesAndAnnotations","paramTypes","paramAnnotations","result","_ownParameters","parentCtor","isDelegateCtor","typeStr","test","tsickleCtorParams","ctorParameters","paramTypes_1","ctorParam","paramAnnotations_1","convertTsickleDecoratorIntoMetadata","decorators","getOwnMetadata","getParentCtor","_ownAnnotations","typeOrFunc","annotations","ownAnnotations","_ownPropMetadata","propMetadata","propDecorators","propDecorators_1","propMetadata_1","keys","prop","parentPropMetadata_1","ownPropMetadata","hasLifecycleHook","lcProperty","guards","getter","setter","method","importUri","resourceUri","resolveIdentifier","moduleUrl","members","runtime","resolveEnum","enumIdentifier","decoratorInvocations","decoratorInvocation","parentProto","THROW_IF_NOT_FOUND","NEW_LINE","USE_VALUE","provide","useValue","_currentInjector","setCurrentInjector","injector","former","injectInjectorOnly","ɵɵinject","ɵɵinvalidFactoryDep","inject","injectArgs","types","arg","j","flag","attachInjectFlag","decorator","catchInjectorError","injectorErrorName","tokenPath","formatError","charAt","substr","context","parts","JSON","replace","ɵ0$3","Inject","getReflect","reflectDependencies","convertDependencies","deps","compiler","dep","reflectDependency","host","optional","resolved","Token","skipSelf","setTokenAndResolvedType","param","proto","__ChangeDetectorRef__","ChangeDetectorRef","Invalid","resolveComponentResources","resourceResolver","componentResolved","urlMap","Map","cachedResourceResolve","url","promise","resp","set","then","unwrapResponse","componentResourceResolutionQueue","component","promises","templateUrl","styleUrls","styleOffset","styleUrl","style","fullyResolved","Promise","all","componentDefResolved","componentDefPendingResolution","delete","clearResolutionOfComponentResourcesQueue","policy","policy$1","componentNeedsResolution","old","response","getPolicy","trustedTypes","createPolicy","createHTML","createScript","createScriptURL","trustedHTMLFromString","html","getPolicy$1","trustedHTMLFromStringBypass","trustedScriptFromStringBypass","script","trustedScriptURLFromStringBypass","SafeValueImpl","changingThisBreaksApplicationSecurity","SafeHtmlImpl","getTypeName","SafeStyleImpl","SafeScriptImpl","SafeUrlImpl","SafeResourceUrlImpl","unwrapSafeValue","allowSanitizationBypassAndThrow","actualType","getSanitizationBypassType","getInertBodyHelper","defaultDoc","inertDocumentHelper","InertDocumentHelper","isDOMParserAvailable","DOMParser","parseFromString","DOMParserHelper","getInertBodyElement","body","removeChild","inertDocument","implementation","createHTMLDocument","inertHtml","createElement","appendChild","inertBodyElement","templateEl","innerHTML","inertBody","documentMode","stripCustomNsAttrs","el","elAttrs","attributes","removeAttribute","childNode","nodeType","Node","ELEMENT_NODE","nextSibling","SAFE_URL_PATTERN","DATA_URL_PATTERN","_sanitizeUrl","match","sanitizeSrcset","srcset","split","trim","tagSet","tags","e_1","_b","_c","e_1_1","return","merge","e_2","sets","sets_1","sets_1_1","e_2_1","inertBodyHelper","SecurityContext","VOID_ELEMENTS","OPTIONAL_END_TAG_BLOCK_ELEMENTS","OPTIONAL_END_TAG_INLINE_ELEMENTS","OPTIONAL_END_TAG_ELEMENTS","BLOCK_ELEMENTS","INLINE_ELEMENTS","VALID_ELEMENTS","URI_ATTRS","SRCSET_ATTRS","HTML_ATTRS","ARIA_ATTRS","VALID_ATTRS","SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS","SanitizingHtmlSerializer","sanitizedSomething","buf","sanitizeChildren","traverseContent","startElement","TEXT_NODE","chars","nodeValue","endElement","checkClobberedElement","parentNode","element","tagName","nodeName","toLowerCase","elAttr","lower","encodeEntities","node","nextNode","compareDocumentPosition","DOCUMENT_POSITION_CONTAINED_BY","outerHTML","SURROGATE_PAIR_REGEXP","NON_ALPHANUMERIC_REGEXP","_sanitizeHtml","unsafeHtmlInput","unsafeHtml","mXSSAttempts","parsedHtml","getTemplateContent","isTemplateElement","content","ɵɵsanitizeHtml","sanitizer","getSanitizer","sanitize","HTML","ɵɵsanitizeStyle","unsafeStyle","STYLE","ɵɵsanitizeUrl","unsafeUrl","URL","ɵɵsanitizeResourceUrl","unsafeResourceUrl","RESOURCE_URL","ɵɵsanitizeScript","unsafeScript","SCRIPT","ɵɵtrustConstantHtml","ɵɵtrustConstantResourceUrl","trustedScriptURLFromString","getUrlSanitizer","tag","ɵɵsanitizeUrlOrResourceUrl","getDebugContext","getOriginalError","defaultErrorLogger","console","ErrorHandler","_console","handleError","originalError","_findOriginalError","_findContext","errorLogger","getErrorLogger","COMMENT_DISALLOWED","COMMENT_DELIMITER","escapeCommentText","CAMEL_CASE_REGEXP","normalizeDebugBindingValue","getLContext","mpValue","isComponentInstance","findViaComponent","isDirectiveInstance","findViaDirective","directiveInstance","directiveIndexEnd","traverseNextElement","getDirectivesAtNodeIndex","findViaNativeElement","existingCtx","createLContext","attachPatchData","rElement","parentContext","localRefs","getComponentViewByInstance","componentInstance","componentIndices","components","elementComponentIndex","includeComponents","directiveStartIndex","RendererStyleFlags2","_icuContainerIterate","defaultScheduler","requestAnimationFrame","setTimeout","ɵɵresolveWindow","ownerDocument","defaultView","ɵɵresolveDocument","ɵɵresolveBody","maybeUnwrapFn","icuContainerIterate","tIcuContainerNode","getLViewParent","getRootContext","viewOrComponent","getRootView","componentOrLView","getFirstLContainer","getNearestLContainer","getNextLContainer","container","applyToElementOrContainer","action","lNodeToHandle","beforeNode","isComponent","rNode","nativeAppendChild","nativeInsertBefore","nativeRemoveNode","destroyNode","applyContainer","parentRElement","anchor","applyView","createTextNode","createText","updateTextNode","setValue","textContent","createCommentNode","createComment","createElementNode","namespace","createElementNS","detachMovedView","declarationContainer","movedViews","declarationViewIndex","insertionLContainer","detachView","removeIndex","indexInContainer","viewToDetach","declarationLContainer","removedLView","removeViewFromContainer","lQueries","destroyLView","destroyViewTree","rootView","lViewOrLContainer","cleanUpView","firstView","executeOnDestroys","toCall","callContext","processCleanups","tCleanup","cleanup","lCleanup","lastLCleanupIndex","idxOrTargetGetter","listener","useCaptureOrSubIdx","removeEventListener","unsubscribe","instanceCleanupFn","destroy","getParentRElement","getClosestRElement","None","isMove","insertBefore","nativeAppendOrInsertBefore","nativeParentNode","getInsertInFrontOfRNode","_getInsertInFrontOfRNodeWithI18n","getInsertInFrontOfRNodeWithNoI18n","_processI18nInsertBefore","setI18nHandling","getInsertInFrontOfRNodeWithI18n","processI18nInsertBefore","childRNode","childTNode","parentRNode","anchorNode","getProjectionNodes","projection","isHostElement","nativeParent","nativeRemoveChild","applyNodes","isProjection","rawSlotValue","nextRNode","applyProjectionRecursive","projectionNext","tProjectionNode","componentLView","nodeToProjectOrRNodes","writeDirectStyle","newValue","cssText","writeDirectClass","className","classIndexOf","classToSearch","startingIndex","foundIndex","isCssClassMatching","cssClassToMatch","isProjectionMode","isInlineTemplate","hasTagAndTypeMatch","currentSelector","isNodeMatchingSelector","nodeAttrs","nameOnlyMarkerIdx","getNameOnlyMarkerIndex","skipToNextSelector","isPositive","selectorAttrValue","attrIndexInNode","findAttrIndexInNode","nodeAttrValue","compareAgainstClassName","bindingsMode","maybeAttrName","matchTemplateAttribute","attr","isNodeMatchingSelectorList","isSelectorInSelectorList","selectorListLoop","currentSelectorInList","maybeWrapInNotSelector","isNegativeMode","chunk","stringifyCSSSelector","currentChunk","valueOrMarker","attrValue","NO_CHANGE","ɵɵadvance","delta","selectIndexInternal","checkNoChangesMode","toTStylingRange","prev","getTStylingRangePrev","tStylingRange","getTStylingRangePrevDuplicate","setTStylingRangePrevDuplicate","getTStylingRangeNext","setTStylingRangeNext","getTStylingRangeNextDuplicate","setTStylingRangeNextDuplicate","toDebugStyleBinding","isClassBased","tView_","bindings","range","classBindings","styleBindings","isTemplate","cursor","itemRange","prevDuplicate","nextDuplicate","nextIndex","prevIndex","residualClasses","residualStyles","processTNodeChildren","template_","toDebug","debug","toHtml","includeChildren","COMMENT_NODE","mapToHTML","children","toLViewRange","l","toDebugNodes","debugNodes","tNodeCursor","buildDebugNode","factories","instances","buildNodeInjectorDebug","injectorResolutionPath","debugNodeInjectorPath","viewProviders","providerIndexStart_","providerIndexEnd_","bloom","toBloom","cumulativeBloom","parentInjectorIndex","binary","idx","TView","queries","expandoStartIndex","hostBindingOpCodes","firstUpdatePass","staticViewQueries","staticContentQueries","directiveRegistry","pipeRegistry","incompleteFirstPass","_decls","_vars","enumerable","configurable","TNode","insertBeforeIndex","directiveStylingLast","propertyBindings","mergedAttrs","localNames","initialInputs","tViews","stylesWithoutHost","classesWithoutHost","type_","flags_","LViewDebug","_raw_lView","__raw__flags__","initPhaseState","creationMode","firstViewPass","checkAlways","dirty","attached","destroyed","isRoot","indexWithinInitPhase","nodes","childViews","childHead","LContainerDebug","_raw_lContainer","_CLEAN_PROMISE","resolve","refreshContentQueries","directiveDefIdx","createLView","tHostNode","rendererFactory","getOrCreateTNode","createTNodeAtIndex","createTNode","tParent","allocExpando","numSlotsToAlloc","initialValue","allocIdx","renderView","executeViewQueryFn","templateFn","executeTemplate","renderChildComponents","hostLView","renderComponent","refreshView","isInCheckNoChangesPass","hooksInitPhaseCompleted","markTransplantedViewsForRefresh","movedLView","refreshEmbeddedViews","embeddedLView","embeddedTView","processHostBindingOpCodes","opCode","directiveIdx","bindingRootIndx","hostBindingFn","refreshChildComponents","refreshComponent","renderComponentOrTemplate","normalExecutionPath","creationModeIsActive","begin","rf","prevSelectedIndex","isUpdatePhase","executeContentQueries","createDirectivesInstances","instantiateAllDirectives","addComponentLogic","setInputsFromAttrs","invokeDirectivesHostBindings","elementIndex","getCurrentDirectiveIndex","dirIndex","invokeHostBindingsInCreationMode","saveResolvedLocalsInData","viewData","localRefExtractor","localIndex","getOrCreateTComponentView","createTView","constsOrFactory","initialViewLength","createViewBlueprint","fill","locateHostElement","elementOrSelector","selectRootElement","ShadowDom","querySelector","storeCleanupWithContext","cleanupFn","getOrCreateLViewCleanup","getOrCreateTViewCleanup","generatePropertyAliases","inputAliasMap","propStore","internalName","elementPropertyInternal","nativeOnly","dataValue","inputData","setInputsForProperty","markDirtyIfOnPush","viewIndex","childComponentLView","mapPropName","resolveDirectives","hasDirectives","findDirectiveDefMatches","registry","matches","markAsComponentHost","exportsMap","","initTNodeFlags","preOrderHooksFound","preOrderCheckHooksFound","configureViewWithDirective","saveNameToExportMap","lifeCycleHooks","initializeInputAndOutputAliases","tViewData","tNodeAttrs","inputsFromAttrs","inputsStore","outputsStore","directiveInputs","generateInitialInputs","cacheMatchingLocalNames","registerHostBindingOpCodes","directiveVarsIdx","elementIndx","lastSelectedElementIdx","hostTNode","numberOfDirectives","directiveFactory","nodeInjectorFactory","componentView","addToViewTree","elementAttributeInternal","setElementAttribute","strValue","initialInputData","inputsToStore","createLContainer","hostNative","componentHostIdx","refreshContainsDirtyView","componentTView","syncViewWithBlueprint","markViewDirty","tickRootContext","rootContext","rootComponent","detectChangesInternal","detectChangesInRootView","viewQueryFn","CLEAN_PROMISE","loadComponentRenderer","currentDef","unwrapLView","errorHandler","textBindingInternal","computeStaticStyling","writeToHost","detectChanges","markDirty","scheduleTick","res_1","clean","scheduler","playerHandler","flushPlayers","INJECTOR$1","NullInjector","INJECTOR_SCOPE","NOT_YET","CIRCULAR","EMPTY_ARRAY$2","NULL_INJECTOR","getNullInjector","createInjector","defType","additionalProviders","createInjectorWithoutInjectorInstances","_resolveInjectorDefTypes","R3Injector","records","injectorDefTypes","_destroyed","dedupStack","provider","processProvider","injectorDef","processInjectorType","makeRecord","record","assertNotDestroyed","service","clear","previousInjector","couldBeInjectableType","injectableDefInScope","injectableDefOrInjectorDefFactory","hydrate","tokens","defOrWrappedDef","parents","ngModule","isDuplicate","importTypesWithProviders_1","imported","_loop_1","ngModule_1","add","defProviders","injectorType_1","ngModuleType","isTypeProvider","providerToRecord","isValueProvider","providerToFactory","multi","multiRecord_1","hasOnDestroy","has","getUndecoratedInjectableFactory","paramLength","inheritedInjectableDef","getInheritedInjectableDef","typeName","warn","unwrappedProvider","isFactoryProvider","useFactory","isExistingProvider","useExisting","classRef_1","useClass","hasDeps","INJECTOR_IMPL","INJECTOR_IMPL__PRE_R3__","StaticInjector","Injector","NULL","IDENT","EMPTY","CIRCULAR$1","MULTI_PROVIDER_FN","_records","useNew","recursivelyProcessProviders","staticError","resolvedProvider","resolveProvider","multiProvider","multiProviderMixError","lastInjector","tryResolveToken","resolveToken","NO_NEW_LINE$1","depRecords","depRecord","childRecord","computeDeps","providerDeps","getComponent","assertDomElement","loadLContext","getComponentAtNodeIndex","getContext","getOwningComponent","elementOrDir","getRootComponents","getInjector","getDirectives","throwOnNotFound","getHostElement","componentOrDirective","getListeners","lContext","listeners","firstParam","secondParam","listenerElement","callback","useCaptureOrIndx","useCapture","sort","sortListeners","a","Element","applyChanges","_published","publishGlobalUtil","COMPILED","createRootComponentView","hostRenderer","viewRenderer","createRootComponent","componentDef","rootLView","hostFeatures","instantiateRootComponent","rootTNode","createRootContext","LifecycleHooksFeature","getSuperType","ɵɵInheritDefinitionFeature","superType","shouldInheritFields","inheritanceChain","superDef","writeableDef","maybeUnwrapEmpty","superHostBindings","inheritHostBindings","superViewQuery","superContentQueries","inheritViewQuery","inheritContentQueries","animation","defData","mergeHostAttrsAcrossInheritance","prevViewQuery","ctx","prevContentQueries","prevHostBindings","COPY_DIRECTIVE_FIELDS","COPY_COMPONENT_FIELDS","ɵɵCopyDefinitionFeature","defAny","COPY_DIRECTIVE_FIELDS_1","COPY_DIRECTIVE_FIELDS_1_1","COPY_COMPONENT_FIELDS_1","COPY_COMPONENT_FIELDS_1_1","_symbolIterator","getSymbolIterator","getOwnPropertyNames","devModeEqual","isListLikeIterableA","isListLikeIterable","isListLikeIterableB","areIterablesEqual","comparator","iterator1","iterator2","item1","item2","is","WrappedValue","wrapped","wrap","unwrap","isWrapped","isJsObject","updateBinding","getBinding","bindingUpdated","bindingUpdated2","exp1","exp2","different","bindingUpdated3","exp3","bindingUpdated4","exp4","ɵɵattribute","interpolationV","isBindingUpdated","interpolation1","prefix","v0","suffix","interpolation2","i0","v1","interpolation3","i1","v2","interpolation4","i2","v3","interpolation5","i3","v4","interpolation6","i4","v5","interpolation7","i5","v6","interpolation8","i6","v7","ɵɵattributeInterpolate1","interpolatedValue","ɵɵattributeInterpolate2","ɵɵattributeInterpolate3","ɵɵattributeInterpolate4","ɵɵattributeInterpolate5","ɵɵattributeInterpolate6","ɵɵattributeInterpolate7","ɵɵattributeInterpolate8","ɵɵattributeInterpolateV","interpolated","ɵɵtemplate","attrsIndex","localRefsIndex","adjustedIndex","templateFirstCreatePass","tViewConsts","comment","ɵɵreference","getContextLView","angularCoreDiEnv","USE_VALUE$1","isUseClassProvider","isUseFactoryProvider","getInjectableMetadata","srcMeta","compilerMeta","typeArgumentCount","userDeps","isUseValueProvider","isUseExistingProvider","USE_VALUE$2","EMPTY_ARRAY$3","convertInjectableProviderToFactory","deps_1","reflectionCapabilities","valueProvider_1","existingProvider_1","factoryProvider_1","classProvider_1","deps_2","deps_3","Injectable","SWITCH_COMPILE_INJECTABLE","render2CompileInjectable","injectableType","constructResolvingPath","findFirstClosedCycle","reverse","k","injectionError","constructResolvingMessage","errMsg","wrappedError","addKey","injectors","noAnnotationError","params","signature","ii","parameter","ReflectiveKey","displayName","_globalKeyRegistry","numberOfKeys","KeyRegistry","_allKeys","newKey","reflector","Reflector","updateCapabilities","caps","identifier","ReflectiveDependency","visibility","fromKey","_EMPTY_LIST","ResolvedReflectiveProvider_","resolvedFactories","resolvedFactory","ResolvedReflectiveFactory","dependencies","resolveReflectiveFactory","factoryFn","resolvedDeps","_dependenciesFor","aliasInstance","constructDependencies","params_1","_extractToken","resolveReflectiveProvider","resolveReflectiveProviders","resolvedProviderMap","mergeResolvedReflectiveProviders","normalizedProvidersMap","existing","_normalizeProviders","invalidProviderError","from","some","metadata","_createDependency","paramMetadata","UNDEFINED","ReflectiveInjector","resolveAndCreate","ResolvedReflectiveProviders","fromResolvedProviders","ReflectiveInjector_","_providers","_parent","_constructionCounter","len","keyIds","objs","_getByKey","resolveAndCreateChild","createChildFromResolved","inj","resolveAndInstantiate","instantiateResolved","_instantiateProvider","getProviderAtIndex","outOfBoundsError","_new","_getMaxNumberOfObjects","cyclicDependencyError","_instantiate","_getByReflectiveDependency","instantiationError","originalException","originalStack","INJECTOR_KEY","_getByKeySelf","_getByKeyDefault","_getObjByKeyId","keyId","_throwOrNull","noProviderError","inj_","_mapProviders","ɵɵdirectiveInject","ɵɵinvalidFactory","ɵɵproperty","setDirectiveInputsWhichShadowsStyling","property","ɵɵelementStart","getNamespace","elementStartFirstCreatePass","elementStart","getElementDepthCount","increaseElementDepthCount","ɵɵelementEnd","decreaseElementDepthCount","elementEnd","hasClassInput","hasStyleInput","ɵɵelement","ɵɵelementContainerStart","elementContainerStartFirstCreatePass","ɵɵelementContainerEnd","ɵɵelementContainer","ɵɵgetCurrentView","isPromise","isSubscribable","subscribe","isObservable","ɵɵlistener","eventName","listenerFn","eventTargetResolver","listenerInternal","ɵɵsyntheticHostListener","isTNodeDirectiveHost","processOutputs","lCleanupIndex","existingListener","findExistingListener","tNodeIdx","cleanupEventName","listenerIdxInLCleanup","__ngLastListenerFn__","__ngNextListenerFn__","wrapListener","listen","addEventListener","propsLength","subscription","executeListenerWithErrorHandling","wrapWithPreventDefault","wrapListenerIn_markDirtyAndPreventDefault","nextListenerFn","preventDefault","returnValue","ɵɵnextContext","matchingProjectionSlotIndex","projectionSlots","wildcardNgContentIndex","ngProjectAsAttrVal","getProjectAsAttrValue","ngProjectAsAttrIdx","ɵɵprojectionDef","componentNode","projectionHeads","tails","componentChild","slotIndex","ɵɵprojection","selectorIndex","applyProjection","ɵɵpropertyInterpolate","ɵɵpropertyInterpolate1","ɵɵpropertyInterpolate2","ɵɵpropertyInterpolate3","ɵɵpropertyInterpolate4","ɵɵpropertyInterpolate5","ɵɵpropertyInterpolate6","ɵɵpropertyInterpolate7","ɵɵpropertyInterpolate8","ɵɵpropertyInterpolateV","markDuplicates","tStylingKey","isPrevDir","isClassBinding","tStylingAtIndex","isMap","foundDuplicate","tStyleRangeAtCursor","isStylingMatch","tStylingKeyCursor","parserState","textEnd","keyEnd","valueEnd","getLastParsedKey","getLastParsedValue","parseClassNameNext","consumeClassToken","startIndex","consumeWhitespace","parseStyleNext","consumeStyleKey","ch","consumeSeparator","consumeStyleValue","ch1","ch2","ch3","lastChIndex","consumeQuotedText","resetParserState","separator","quoteCharCode","ɵɵstyleProp","checkStylingProperty","ɵɵclassProp","ɵɵstyleMap","checkStylingMap","styleKeyValueArraySet","styleStringParser","parseStyle","ɵɵclassMap","classStringParser","parseClassName","stylingFirstUpdatePass","updateStyling","normalizeSuffix","stringParser","hasStylingInputShadow","isInHostBindings","staticPrefix","updateStylingMap","oldKeyValueArray","newKeyValueArray","oldIndex","newIndex","oldKey","setKey","toStylingKeyValueArray","styleKeyValueArray","unwrappedValue","isHostBindings","wrapInStaticStylingKey","stylingKey","hostDirectiveDef","residual","collectStylingFromTAttrs","collectStylingFromDirectives","templateStylingKey","getTemplateHeadTStylingKey","setTemplateHeadTStylingKey","collectResidual","insertTStylingBinding","tStylingKeyWithStatic","isHostBinding","tBindings","tmplHead","tmplTail","isKeyDuplicateOfStatic","previousNode","setTStylingRangePrev","markDuplicateOfResidualStyling","currentDirective","desiredMarker","currentMarker","tRange","isStylingValuePresent","findStylingValue","applyStyling","isProcedural","addClass","classList","removeClass","remove","DashCase","removeStyle","removeProperty","isImportant","endsWith","Important","setStyle","isPrevDirection","rawKey","containsStatics","isStylingMap","valueAtLViewIndex","ɵɵtext","textNative","ɵɵtextInterpolate","ɵɵtextInterpolate1","ɵɵtextInterpolate2","ɵɵtextInterpolate3","ɵɵtextInterpolate4","ɵɵtextInterpolate5","ɵɵtextInterpolate6","ɵɵtextInterpolate7","ɵɵtextInterpolate8","ɵɵtextInterpolateV","ɵɵclassMapInterpolate1","ɵɵclassMapInterpolate2","ɵɵclassMapInterpolate3","ɵɵclassMapInterpolate4","ɵɵclassMapInterpolate5","ɵɵclassMapInterpolate6","ɵɵclassMapInterpolate7","ɵɵclassMapInterpolate8","ɵɵclassMapInterpolateV","ɵɵstyleMapInterpolate1","ɵɵstyleMapInterpolate2","ɵɵstyleMapInterpolate3","ɵɵstyleMapInterpolate4","ɵɵstyleMapInterpolate5","ɵɵstyleMapInterpolate6","ɵɵstyleMapInterpolate7","ɵɵstyleMapInterpolate8","ɵɵstyleMapInterpolateV","ɵɵstylePropInterpolate1","valueSuffix","ɵɵstylePropInterpolate2","ɵɵstylePropInterpolate3","ɵɵstylePropInterpolate4","ɵɵstylePropInterpolate5","ɵɵstylePropInterpolate6","ɵɵstylePropInterpolate7","ɵɵstylePropInterpolate8","ɵɵstylePropInterpolateV","ɵɵhostProperty","ɵɵsyntheticHostProperty","LocaleDataIndex","u","localeEn","plural","Math","floor","abs","LOCALE_DATA","findLocaleData","locale","normalizedLocale","normalizeLocale","getLocaleData","parentLocale","getLocalePluralCase","ɵLocaleDataIndex","PluralCase","common","locales","I18nCreateOpCode","pluralMapping","ELEMENT_MARKER","ICU_MARKER","LOCALE_ID","setLocaleId","localeId","tNodeInsertBeforeIndex","i18nParent","anchorRNode","addTNodeAndUpdateInsertBeforeIndex","previousTNodes","newTNode","existingTNode","isI18nText","isNewTNodeCreatedBefore","setInsertBeforeIndex","getTIcu","createTNodePlaceholder","getCurrentICUCaseIndex","tIcu","currentCase","currentCaseLViewIndex","getRefFromIcuCreateOpCode","mergedCode","changeMask","changeMaskCounter","applyUpdateOpCodes","updateOpCodes","bindingsStartIndex","checkBit","skipCodes","sanitizeFn","tNodeOrTagName","rText","applyIcuSwitchCase","applyIcuUpdateCase","activeCaseIndex","mask","update","caseIndex","getCaseIndex","icuExpression","bindingValue","cases","resolvedCase","getPluralCase","parseInt","getLocaleId","applyIcuSwitchCaseRemove","removeCodes","nodeOrIcuIndex","anchorIdx","applyMutableOpCodes","mutableOpCodes","rootRNode","rootIdx","textNodeIndex","parentIdx","insertInFrontOf","refIdx","elementNodeIndex","commentValue","commentNodeIndex","loadIcuContainerVisitor","_removes","_stack","_index","enterIcu","icuContainerIteratorNext","removeOpCode","icuContainerIteratorStart","OpCodeParser","codes","hasMore","consumeNumber","consumeString","assertString","consumeFunction","consumeNumberOrString","consumeNumberStringOrMarker","BINDING_REGEXP","ICU_REGEXP","NESTED_ICU","ICU_BLOCK_REGEXP","SUBTEMPLATE_REGEXP","PH_REGEXP","NGSP_UNICODE_REGEXP","createTNodeAndAddOpCode","existingTNodes","createOpCodes","isICU","i18nNodeIdx","SHIFT","APPEND_EAGERLY","COMMENT","ensureIcuContainerVisitorLoaded","loader","setTNodeInsertBeforeIndex","assertEqual","i18nStartFirstCreatePassProcessTextNode","hasBinding","generateBindingUpdateOpCodes","str","destinationNode","bindingStart","maskIndex","sizeIndex","textParts","textValue","toMaskBit","countBindings","opCodes","min","removeInnerTemplateTranslation","tagMatched","inTemplate","exec","MARKER","icuStart","bindingMask","addUpdateIcuSwitch","mainBinding","setTIcu","valueArr","nestedIcus","icuIndex","parseIcuCase","addUpdateIcuUpdate","parseICUBlock","pattern","icuType","i18nParseTextIntoPartsAndICU","binding","pos","blocks","prevPos","braceStack","results","braces","lastIndex","block","substring_1","caseName","unsafeCaseHtml","inertRootNode","walkIcuTree","sharedUpdateOpCodes","depth","currentNode","addCreateNodeAndAppend","lowerAttrName","addCreateAttribute","addRemoveNode","isNestedIcu","addRemoveNestedIcu","appendToParentIdx","createAtIdx","icuCreateOpCode","PP_MULTI_VALUE_PLACEHOLDERS_REGEXP","PP_PLACEHOLDERS_REGEXP","PP_ICU_VARS_REGEXP","PP_ICU_PLACEHOLDERS_REGEXP","PP_ICUS_REGEXP","PP_CLOSE_TEMPLATE_REGEXP","PP_TEMPLATE_ID_REGEXP","i18nPostprocess","replacements","matches_1","templateIdsStack_1","phs","tmpl","placeholders","placeholder","templateId","isCloseTemplateTag","currentTemplateId","_type","_idx","ɵɵi18nStart","messageIndex","subTemplateIndex","i18nStartFirstCreatePass","parentTNodeIndex","existingTNodeStack","msgParts","replaceNgsp","getTranslationForTemplate","isRootTemplateMessage","search","RegExp","part","isClosing","index_1","Number","tI18n","applyCreateOpCodes","appendNow","ɵɵi18nEnd","ɵɵi18n","ɵɵi18nAttributes","i18nAttributesFirstPass","previousElementIndex","ɵɵi18nExp","setMaskBit","hasChange","ɵɵi18nApply","applyI18n","ɵɵi18nPostprocess","resolveProvider$1","lInjectablesBlueprint","providerFactory","beginIndex","existingFactoryIndex","registerDestroyHooksIfSupported","existingProvidersFactoryIndex","existingViewProvidersFactoryIndex","doesViewProvidersFactoryExist","multiFactory","f","componentProviders","multiFactoryAdd","multiViewProvidersFactoryResolver","multiProvidersFactoryResolver","contextIndex","indexInFactory","providerIsTypeProvider","isClassProvider","existingCallbacksIndex","isComponentProvider","lData","multiResolve","componentCount","multiProviders","ɵɵProvidersFeature","processProvidersFn","ComponentRef","ComponentFactory","noComponentFactoryError","ERROR_COMPONENT","ComponentFactoryResolver","_NullComponentFactoryResolver","resolveComponentFactory","CodegenComponentFactoryResolver","_ngModule","_factories","componentType","ComponentFactoryBoundToModule","projectableNodes","rootSelectorOrNode","noop","injectElementRef","createElementRef","ElementRef","SWITCH_ELEMENT_REF_FACTORY__POST_R3__","unwrapElementRef","nativeElement","Renderer2","RendererFactory2","SWITCH_RENDERER2_FACTORY","Sanitizer","SWITCH_RENDERER2_FACTORY__POST_R3__","injectRenderer2","nodeAtIndex","getOrCreateRenderer2","Version","VERSION","full","major","minor","patch","DefaultIterableDifferFactory","supports","trackByFn","DefaultIterableDiffer","trackByIdentity","_linkedRecords","_unlinkedRecords","_previousItHead","_itHead","_itTail","_additionsHead","_additionsTail","_movesHead","_movesTail","_removalsHead","_removalsTail","_identityChangesHead","_identityChangesTail","_trackByFn","forEachItem","_next","forEachOperation","nextIt","nextRemove","addRemoveOffset","moveOffsets","currentIndex","getPreviousIndex","adjPreviousIndex","_nextRemoved","previousIndex","localMovePreviousIndex","localCurrentIndex","offset","forEachPreviousItem","_nextPrevious","forEachAddedItem","_nextAdded","forEachMovedItem","_nextMoved","forEachRemovedItem","forEachIdentityChange","_nextIdentityChange","diff","collection","check","_reset","itemTrackBy","mayBeDirty","trackById","_verifyReinsertion","_addIdentityChange","_mismatch","iterateListLike","_truncate","isDirty","previousRecord","_prev","_remove","_reinsertAfter","_moveAfter","_addAfter","IterableChangeRecord_","reinsertRecord","_addToMoves","nextRecord","_addToRemovals","_unlink","prevRecord","_prevRemoved","_insertAfter","_DuplicateMap","put","toIndex","_prevDup","_nextDup","_DuplicateItemRecordList","_head","_tail","atOrAfterIndex","duplicates","recordList","moveOffset","DefaultKeyValueDifferFactory","DefaultKeyValueDiffer","_mapHead","_appendAfter","_previousMapHead","_changesHead","_changesTail","forEachChangedItem","_nextChanged","_forEach","_maybeAddToChanges","_getOrCreateRecordForKey","_insertBeforeOrAppend","record_1","KeyValueChangeRecord_","_addToAdditions","_addToChanges","defaultIterableDiffersFactory","IterableDiffers","copied","extend","find","iterable","getTypeNameForDebugging","defaultKeyValueDiffersFactory","KeyValueDiffers","kv","ViewRef","_cdRefInjectingView","_appRef","_attachedToViewContainer","collectNativeNodes","lNode","lViewInAContainer","lViewFirstChildTNode","nodesInSlot","viewRefs","markForCheck","detach","reattach","checkNoChanges","checkNoChangesInternal","attachToViewContainerRef","detachFromAppRef","renderDetachView","attachToAppRef","appRef","RootViewRef","_view","checkNoChangesInRootView","SWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__","injectChangeDetectorRef","isPipe","createViewRef","TemplateRef","keyValDiff","iterableDiff","defaultIterableDiffers","defaultKeyValueDiffers","SWITCH_TEMPLATE_REF_FACTORY__POST_R3__","injectTemplateRef","R3TemplateRef","_declarationLView","_declarationTContainer","elementRef","createEmbeddedView","declarationViewLQueries","createTemplateRef","ViewContainerRef","NgModuleRef","NgModuleFactory","SWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__","injectViewContainerRef","createContainerRef","R3ViewContainerRef","_lContainer","_hostTNode","_hostLView","getViewRefs","templateRef","viewRef","insert","createComponent","componentFactory","ngModuleRef","contextInjector","parentInjector","componentRef","viewAttachedToContainer","prevIdx","prevLContainer","prevVCRef","adjustedIdx","_adjustIndex","insertView","containerLength","trackMovedView","getBeforeNodeForView","viewIndexInContainer","nextViewIndex","firstTNodeOfView","getFirstNativeNode","elIcuContainerChild","rNodeOrLContainer","projectionNodes","addViewToContainer","parentNativeNode","getOrCreateViewRefs","move","viewRefsArr","detachedView","commentNode","nativeNextSibling","expressionChangedAfterItHasBeenCheckedError","currValue","isFirstCheck","viewDebugError","err","_addDebugContext","logError","viewDestroyedError","shiftInitState","priorInitState","newInitState","state","initState","initIndex","shouldCallLifecycleInitHook","asTextData","asElementData","asProviderData","asPureExpressionData","asQueryList","DebugContext","Services","setCurrentNode","createRootView","createComponentView","createNgModuleRef","overrideProvider","overrideComponentView","clearOverrides","checkAndUpdateView","checkNoChangesView","destroyView","resolveDep","createDebugContext","handleEvent","updateDirectives","updateRenderer","dirtyParentQueries","NOOP","_tokenKeyCache","tokenKey","_renderCompCount$1","checkBinding","bindingIdx","oldValues","checkAndUpdateBinding","checkBindingNoChanges","bindingName","markParentViewsForCheck","currView","viewContainerParent","markParentViewsForCheckProjectedViews","endView","dispatchEvent","root","declaredViewContainer","parentNodeDef","viewParentEl","renderNode","renderElement","renderText","isComponentView","isEmbeddedView","filterQueryId","queryId","splitMatchedQueriesDsl","matchedQueriesDsl","matchedQueries","matchedQueryIds","references","valueType","splitDepsDsl","sourceName","getParentRenderElement","renderHost","renderParent","componentRendererType","DEFINITION_CACHE","WeakMap","resolveDefinition","visitRootRenderNodes","lastRenderRootNode","visitSiblingRenderNodes","nodeDef","visitRenderNode","childCount","visitProjectedRenderNodes","ngContentIndex","compView","hostElDef","projectedNodes","execRenderNodeAction","ngContent","rn","bindingFlags","embeddedViews","viewContainer","_embeddedViews","NS_PREFIX_RE","splitNamespace","calcBindingFlags","_toStringWithNull","UNDEFINED_VALUE","InjectorRefTokenKey","INJECTORRefTokenKey","NgModuleRefTokenKey","resolveNgModuleDep","depDef","tokenKey_1","providerDef","_def","providersByKey","providerInstance","_createProviderInstance","targetsModule","moduleTransitivelyPresent","modules","injectable","_createClass","depValues","_callFactory","detachEmbeddedView","elementData","renderDetachView$1","renderAttachEmbeddedView","prevView","prevRenderNode","EMPTY_CONTEXT","getComponentViewDefinitionFactory","viewDefFactory","ComponentFactory_","_inputs","_outputs","inputsArr","templateName","outputsArr","viewDef","componentNodeIndex","componentProvider","ComponentRef_","ViewRef_","_viewRef","_component","_elDef","changeDetectorRef","Injector_","createViewContainerData","elDef","elData","ViewContainerRef_","_data","ref","viewRef_","attachEmbeddedView","attachProjectedView","vcElementData","dvcElementData","projectedViews","_projectedViews","markNodeAsProjectedTemplate","nodeFlags","childFlags","moveEmbeddedView","oldViewIndex","newViewIndex","createChangeDetectorRef","_viewContainerRef","rootRenderNodes","renderNodes","fs","disposables","vcRef","createTemplateData","TemplateRef_","_parentView","createInjector$1","moduleType","bootstrapComponents","NgModuleRef_","_moduleType","_bootstrapComponents","_destroyListeners","initNgModule","provDef","injectFlags","callNgModuleLifecycle","lifecycles","Renderer2TokenKey","ElementRefTokenKey","ViewContainerRefTokenKey","TemplateRefTokenKey","ChangeDetectorRefTokenKey","InjectorRefTokenKey$1","INJECTORRefTokenKey$1","checkIndex","depDefs","outputIndex","directChildFlags","childMatchedQueries","query","createProviderInstance","_createProviderInstance$1","createPipeInstance","createClass","createDirectiveInstance","output","outputObservable","eventHandlerClosure","allowPrivateServices","callFactory","NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR","searchView","findCompView","providerDef_1","allProviders","publicProviders","providerData","updateProp","changes","nonMinifiedName","callLifecycleHooksChildrenFirst","callProviderLifecycles","callElementProvidersLifecycles","ComponentFactoryResolver$1","ComponentFactory$1","toRefArray","nonMinified","SCHEDULER","stringifyCSSSelectorList","selectorList","isBoundToModule","tElementNode","rootViewInjector","createChainedInjector","elementName","hostRNode","getNamespace$1","rootFlags","rootTView","extractAttrsAndClassesFromSelector","nodesforSlot","ComponentRef$1","_rootLView","assertSameOrNotExisting","incoming","registerNgModuleType","visited","recurse","imports_1","imports_1_1","getRegisteredNgModuleType","NgModuleRef$1","destroyCbs","componentFactoryResolver","ngLocaleIdDef","getNgLocaleIdDef","_r3Injector","NgModuleFactory$1","ɵɵpureFunction0","slotOffset","pureFn","thisArg","ɵɵpureFunction1","exp","pureFunction1Internal","ɵɵpureFunction2","pureFunction2Internal","ɵɵpureFunction3","pureFunction3Internal","ɵɵpureFunction4","pureFunction4Internal","ɵɵpureFunction5","exp5","ɵɵpureFunction6","exp6","ɵɵpureFunction7","exp7","ɵɵpureFunction8","exp8","ɵɵpureFunctionV","exps","pureFunctionVInternal","getPureFunctionReturnValue","returnValueIndex","lastReturnValue","bindingRoot","ɵɵpipe","pipeName","getPipeDef$1","pipeFactory","pipeInstance","ɵɵpipeBind1","unwrapValue$1","isPure","transform","ɵɵpipeBind2","ɵɵpipeBind3","ɵɵpipeBind4","ɵɵpipeBindV","_wrapInTimeout","EventEmitter","EventEmitter_","isAsync","__isAsync","emit","observerOrNext","complete","nextFn","errorFn","completeFn","observer","sink","Subscription","Subject","symbolIterator","_results","QueryList","_emitDistinctChangesOnly","_changesDetected","_changes","last","symbol","filter","reduce","init","toArray","reset","resultsTree","identityAccessor","newResultFlat","arrayEquals","valueA","valueB","notifyOnChanges","setDirty","LQuery_","queryList","clone","LQueries_","tQueries","noOfInheritedQueries","viewLQueries","tQuery","getByIndex","indexInDeclarationView","dirtyQueriesWithMatches","getTQuery","TQueryMetadata_","predicate","read","TQueries_","queriesForTemplateRef","childQueryIndex","tqueryClone","track","tquery","TQuery_","crossesNgTemplate","_appliesToNextNode","_declarationNodeIndex","isApplyingToNode","matchTNode","addMatch","declarationNodeIdx","matchTNodeWithReadOption","getIdxOfMatchingSelector","nodeMatchIdx","directiveOrProviderIdx","matchIdx","createResultForNode","matchingIdx","createResultByTNodeType","createSpecialToken","materializeViewResults","queryIndex","lQuery","tQueryMatches","matchedNodeIdx","ɵɵqueryRefresh","collectQueryResults","lViewResults","i_1","embeddedLViews","i_2","ɵɵviewQuery","createTQuery","createLQuery","ɵɵcontentQuery","saveContentQueryAndDirectiveIndex","tViewContentQueries","ɵɵloadQuery","loadQueryInternal","ɵɵtemplateRefExtractor","ɵɵinjectPipeChangeDetectorRef","angularCoreEnv","jitOptions","EMPTY_ARRAY$5","moduleQueue","flushingModuleQueue","flushModuleScopingQueueAsMuchAsPossible","every","isResolvedDeclaration","setScopeOnDeclaredComponents","declaration","compileNgModule","compileNgModuleDefs","enqueueModuleForDelayedScoping","allowDuplicateDeclarationsInRoot","expandModuleWithProviders","ngFactoryDef","compileFactory","injectFn","NgModule","compileInjector","transitiveScopes","transitiveScopesFor","patchComponentDefWithScope","ngSelectorScope","compilation","dir","pipe","isNgModule","scopes","exported","importedType","importedScope","entry","declared","exportedType","exportedScope","isModuleWithProviders","compilationDepth","compileComponent","ngComponentDef","maybeQueueResolutionOfComponentResources","addDirectiveFactoryDef","getJitOptions","preserveWhitespaces","defaultEncapsulation","directiveMetadata","typeSourceSpan","createParseSourceSpan","animations","interpolation","usesInheritance","addDirectiveDefToUndecoratedParents","hasSelectorScope","compileDirective","ngDirectiveDef","getDirectiveMetadata","sourceMapUrl","facade","Directive","extendsDirectlyFromObject","extractQueriesMetadata","isContentQuery","lifecycle","usesOnChanges","splitByComma","viewQueries","objPrototype","shouldAddAbstractDirective","isQueryAnn","queriesMeta","annotations_1","ann","isInputAnnotation","convertToR3QueryMetadata","propertyName","static","piece","LIFECYCLE_HOOKS","hookName","metadataName","compilePipe","ngPipeDef","getPipeMetadata","Pipe","SWITCH_COMPILE_DIRECTIVE","Component","c","SWITCH_COMPILE_COMPONENT","SWITCH_COMPILE_PIPE","Input","bindingPropertyName","Output","HostBinding","hostPropertyName","HostListener","SWITCH_COMPILE_COMPONENT__POST_R3__","SWITCH_COMPILE_DIRECTIVE__POST_R3__","SWITCH_COMPILE_PIPE__POST_R3__","SWITCH_COMPILE_NGMODULE","SWITCH_COMPILE_NGMODULE__POST_R3__","preR3NgModuleCompile","moduleInjectorType","APP_INITIALIZER","ApplicationInitStatus","appInits","reject","initialized","donePromise","rej","runInitializers","asyncInitPromises","initResult","catch","APP_ID","_appIdRandomProviderFactory","_randomChar","APP_ID_RANDOM_PROVIDER","fromCharCode","random","PLATFORM_INITIALIZER","PLATFORM_ID","APP_BOOTSTRAP_LISTENER","PACKAGE_ROOT_URL","Console","log","MissingTranslationStrategy","LOCALE_ID$1","DEFAULT_CURRENCY_CODE","TRANSLATIONS","TRANSLATIONS_FORMAT","ModuleWithComponentFactories","ngModuleFactory","componentFactories","_throwError","Compiler_compileModuleSync__POST_R3__","Compiler_compileModuleSync","Compiler_compileModuleAsync","Compiler_compileModuleAndAllComponentsSync__POST_R3__","Compiler_compileModuleAndAllComponentsSync","Compiler_compileModuleAndAllComponentsAsync","Compiler","compileModuleSync","compileModuleAsync","compileModuleAndAllComponentsSync","compileModuleAndAllComponentsAsync","clearCache","clearCacheFor","getModuleId","COMPILER_OPTIONS","CompilerFactory","scheduleMicroTask","Zone","NgZone","enableLongStackTrace","shouldCoalesceEventChangeDetection","_d","shouldCoalesceRunChangeDetection","hasPendingMacrotasks","hasPendingMicrotasks","isStable","onUnstable","onMicrotaskEmpty","onStable","onError","assertZonePatched","_nesting","_outer","_inner","fork","lastRequestAnimationFrameId","nativeRequestAnimationFrame","getNativeRequestAnimationFrame","nativeCancelAnimationFrame","unpatchedRequestAnimationFrame","__symbol__","unpatchedCancelAnimationFrame","forkInnerZoneWithAngularBehavior","zone","delayChangeDetectionForEventsDelegate","delayChangeDetectionForEvents","fakeTopEventTask","scheduleEventTask","updateMicroTaskStatus","checkStable","invoke","properties","isAngularZone","onInvokeTask","delegate","task","applyThis","applyArgs","onEnter","invokeTask","onLeave","onInvoke","onHasTask","hasTaskState","hasTask","change","_hasPendingMicrotasks","microTask","macroTask","onHandleError","runOutsideAngular","isInAngularZone","assertInAngularZone","assertNotInAngularZone","run","runTask","EMPTY_PAYLOAD","cancelTask","runGuarded","NoopNgZone","Testability","_ngZone","_pendingCount","_isZoneStable","_didWork","_callbacks","taskTrackingZone","_watchAngularEvents","_runCallbacksIfReady","increasePendingRequestCount","decreasePendingRequestCount","cb","clearTimeout","timeoutId","doneCb","pending_1","getPendingTasks","updateCb","macroTasks","creationLocation","addCallback","timeout","whenStable","getPendingRequestCount","findProviders","using","exactMatch","TestabilityRegistry","_applications","_testabilityGetter","addToWindow","registerApplication","testability","unregisterApplication","unregisterAllApplications","getTestability","elem","getAllTestabilities","getAllRootElements","findTestabilityInTree","findInAncestors","_platform","_NoopGetTestability","_devMode","_runModeLocked","isDevMode","ALLOW_MULTIPLE_PLATFORMS","NgProbeToken","createPlatform","PlatformRef","inits","createPlatformFactory","parentPlatformFactory","desc","extraProviders","platform","getPlatform","injectedProviders","assertPlatform","requiredToken","_injector","_modules","bootstrapModuleFactory","moduleFactory","ngZone","getNgZone","ngZoneOption","extra","ngZoneEventCoalescing","ngZoneRunCoalescing","ngZoneInjector","moduleRef","exceptionHandler","_callAndReportToErrorHandler","initStatus","_moduleDoBootstrap","bootstrapModule","compilerOptions","optionsReducer","compileNgModuleFactory__PRE_R3__","createCompiler","compileNgModuleFactory","ApplicationRef","ngDoBootstrap","_zone","_exceptionHandler","_componentFactoryResolver","_initStatus","_bootstrapListeners","_views","_runningTick","_stable","componentTypes","_onMicrotaskEmptySubscription","tick","isCurrentlyStable","Observable","stableSub","unstableSub","share","componentOrFactory","isBoundToModule__PRE_R3__","cf","compRef","testabilityRegistry","_loadComponent","attachView","_lastDefined","NgModuleFactoryLoader","getModuleFactory__PRE_R3__","noModuleError","getModuleFactory","SystemJsNgModuleLoaderConfig","DEFAULT_CONFIG","factoryPathPrefix","factoryPathSuffix","SystemJsNgModuleLoader","_compiler","config","_config","loadFactory","loadAndCompile","exportName","System","import","checkNotEmpty","factoryClassSuffix","modulePath","ViewRef$1","EmbeddedViewRef","DebugEventListener","DebugNode__PRE_R3__","nativeNode","_debugContext","DebugElement__PRE_R3__","addChild","providerTokens","childNodes","childIndex","insertChildrenAfter","newChildren","siblingIndex","refChild","newChild","refIndex","queryAll","_queryElementChildren","queryAllNodes","_queryNodeChildren","triggerEventHandler","eventObj","DebugNode__POST_R3__","DebugElement__POST_R3__","getLocalRefs","discoverLocalRefs","getInjectionTokens","copyDomProperties","NodePrototype","descriptors","getOwnPropertyDescriptors","startsWith","isPrimitiveValue","collectPropertyBindings","bindingIndexes","metadataParts","lowercaseTNodeAttrs","eAttrs","lowercaseName","baseVal","getDebugNode__POST_R3__","_queryAllR3","invokedListeners","eventListeners","unwrappedListener","parentElement","elementsOnly","_queryNodeChildrenR3","_queryNativeNodeDescendants","rootNativeNode","getNativeByTNodeOrNull","_addQueryMatchR3","nodeOrContainer","_queryNodeChildrenInContainerR3","head","head_1","head_1_1","nextTNode","nextLView","childView","debugNode","getDebugNode$1","_nativeNodeToDebugNode","getDebugNode__PRE_R3__","getDebugNodeR2__PRE_R3__","getDebugNodeR2","indexDebugNode","DebugNode","DebugElement","platformCore","_iterableDiffersFactory","_keyValueDiffersFactory","_localeFactory","ViewAction","ApplicationModule","APPLICATION_MODULE_PROVIDERS","zoneSchedulerFactory","queue","selectorOrNode","ns","parentEl","listenToElementOutputs","handleEventClosure","renderEventHandlerClosure","listenTarget","listenerView","disposable","checkAndUpdateElementValue","setElementAttribute$1","securityContext","renderValue","setElementClass","setElementStyle","unit","setElementProperty","queryIds","nodeMatchedQueries","tplDef","filterId","checkAndUpdateQuery","newValues","elementDef","calcQueryValues","notify","boundValue","bindingType","queryDef","getQueryValue","embeddedView","dvc","projectedView","queryValueType","appendNgContent","_pureExpressionDef","propertyNames","_addInterpolationPart","isNgContainer","validateNode","nodeCount","parentEnd","anchorDef","createView","initView","createViewNodes","compRenderer","outputCount","bindingCount","nodeData","compViewDef","execComponentViewsAction","CreateViewNodes","execQueriesAction","markProjectedViewsForCheck","execEmbeddedViewsAction","CheckNoChanges","CheckAndUpdate","callInit","checkAndUpdateNode","argStyle","v8","v9","checkAndUpdateNodeInline","checkAndUpdateElementInline","bindLen","changed","checkAndUpdateTextInline","checkAndUpdateDirectiveInline","checkAndUpdatePureExpressionInline","checkAndUpdateNodeDynamic","checkAndUpdateElementDynamic","checkAndUpdateTextDynamic","checkAndUpdateDirectiveDynamic","checkAndUpdatePureExpressionDynamic","checkNoChangesNode","checkNoChangesNodeInline","checkNoChangesNodeDynamic","checkNoChangesQuery","Destroy","detachProjectedView","destroyViewNodes","callViewAction","viewState","execProjectedViewsAction","CheckNoChangesProjectedViews","CheckAndUpdateProjectedViews","queryFlags","staticDynamicQueryFlag","checkType","initServicesIfNeeded","services","createDebugServices","debugSetCurrentNode","debugCreateRootView","debugCreateEmbeddedView","debugCreateComponentView","debugCreateNgModuleRef","debugOverrideProvider","debugOverrideComponentView","debugClearOverrides","debugCheckAndUpdateView","debugCheckNoChangesView","debugDestroyView","DebugContext_","debugHandleEvent","debugUpdateDirectives","debugUpdateRenderer","createProdServices","createProdRootView","prodCheckAndUpdateNode","prodCheckNoChangesNode","elInjector","createRootData","DebugRendererFactory2","defWithOverride","applyProviderOverridesToView","callWithDebugContext","DebugAction","viewDefOverrides","applyProviderOverridesToNgModule","calcHasOverrides","hasOverrides","hasDeprecatedOverrides","providerOverrides","override","deprecatedBehavior","providerOverridesWithScope","applyProviderOverrides","moduleSet_1","_currentAction","_currentView","_currentNodeIndex","comp","compFactory","hostViewDef","elementIndicesWithOverwrittenProviders","findElementIndicesWithOverwrittenProviders","elIndicesWithOverwrittenProviders","lastElementDef","applyProviderOverridesToElement","elIndex","nextDirectiveWithBinding","debugCheckDirectivesFn","debugCheckAndUpdateNode","debugCheckNoChangesNode","nextRenderNodeWithBinding","debugCheckRenderNodeFn","givenValues","bindingValues","camelCaseToDashCase","elView","elOrCompView","childDef","collectReferences","findHostElement","logViewDef","logNodeIndex","renderNodeIndex","getRenderNodeIndex","currRenderNodeIndex","nodeLogger","refName","oldAction","oldView","oldNodeIndex","isViewDebugError","viewWrappedDebugError","getCurrentDebugContext","renderData","DebugRenderer2","whenRenderingDone","debugContextFactory","removeDebugNodeFromIndex","debugCtx","debugEl","debugChildEl","debugRefEl","oldChild","preserveContent","NgModuleFactory_","_ngModuleDefFactory","cloneNgModuleDefinition","CUSTOM_ELEMENTS_SCHEMA","INJECTOR","NO_ERRORS_SCHEMA","asNativeElements","debugEls","destroyPlatform","enableProdMode","getDebugNode","setTestabilityGetter","ɵ0","ɵALLOW_MULTIPLE_PLATFORMS","ɵAPP_ID_RANDOM_PROVIDER","ɵCREATE_ATTRIBUTE_DECORATOR__POST_R3__","CREATE_ATTRIBUTE_DECORATOR__POST_R3__","ɵCodegenComponentFactoryResolver","ɵCompiler_compileModuleAndAllComponentsAsync__POST_R3__","ɵCompiler_compileModuleAndAllComponentsSync__POST_R3__","ɵCompiler_compileModuleAsync__POST_R3__","ɵCompiler_compileModuleSync__POST_R3__","ɵComponentFactory","ɵConsole","ɵDEFAULT_LOCALE_ID","ɵEMPTY_ARRAY","ɵEMPTY_MAP","ɵINJECTOR_IMPL__POST_R3__","INJECTOR_IMPL__POST_R3__","ɵINJECTOR_SCOPE","ɵLifecycleHooksFeature","ɵNG_COMP_DEF","ɵNG_DIR_DEF","ɵNG_ELEMENT_ID","ɵNG_INJ_DEF","ɵNG_MOD_DEF","ɵNG_PIPE_DEF","ɵNG_PROV_DEF","ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR","ɵNO_CHANGE","ɵNgModuleFactory","ɵNoopNgZone","ɵReflectionCapabilities","ɵRender3ComponentFactory","ɵRender3ComponentRef","ɵRender3NgModuleRef","ɵRuntimeError","ɵSWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__","ɵSWITCH_COMPILE_COMPONENT__POST_R3__","ɵSWITCH_COMPILE_DIRECTIVE__POST_R3__","ɵSWITCH_COMPILE_INJECTABLE__POST_R3__","compileInjectable","ɵSWITCH_COMPILE_NGMODULE__POST_R3__","ɵSWITCH_COMPILE_PIPE__POST_R3__","ɵSWITCH_ELEMENT_REF_FACTORY__POST_R3__","ɵSWITCH_IVY_ENABLED__POST_R3__","ɵSWITCH_RENDERER2_FACTORY__POST_R3__","ɵSWITCH_TEMPLATE_REF_FACTORY__POST_R3__","ɵSWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__","ɵ_sanitizeHtml","ɵ_sanitizeUrl","ɵallowSanitizationBypassAndThrow","ɵand","templateFactory","ɵangular_packages_core_core_a","ɵangular_packages_core_core_b","ɵangular_packages_core_core_ba","ɵangular_packages_core_core_bb","ɵangular_packages_core_core_bc","ɵangular_packages_core_core_bd","ɵangular_packages_core_core_be","ɵangular_packages_core_core_bf","ɵangular_packages_core_core_bg","ɵangular_packages_core_core_bh","ɵangular_packages_core_core_bi","ɵangular_packages_core_core_bj","ɵangular_packages_core_core_bl","ɵangular_packages_core_core_bm","ɵangular_packages_core_core_bn","ɵangular_packages_core_core_bo","ɵangular_packages_core_core_bp","ɵangular_packages_core_core_bq","ɵangular_packages_core_core_br","ɵangular_packages_core_core_bs","ɵangular_packages_core_core_bv","ɵangular_packages_core_core_bw","ɵangular_packages_core_core_bx","ɵangular_packages_core_core_bz","ɵangular_packages_core_core_c","ɵangular_packages_core_core_cb","ɵangular_packages_core_core_cc","ɵangular_packages_core_core_d","ɵangular_packages_core_core_e","ɵangular_packages_core_core_f","ɵangular_packages_core_core_g","ɵangular_packages_core_core_h","ɵangular_packages_core_core_i","ɵangular_packages_core_core_j","ɵangular_packages_core_core_k","ɵangular_packages_core_core_l","ɵangular_packages_core_core_m","ɵangular_packages_core_core_n","ɵangular_packages_core_core_o","ɵangular_packages_core_core_p","ɵangular_packages_core_core_q","ɵangular_packages_core_core_r","ɵangular_packages_core_core_s","ɵangular_packages_core_core_t","ɵangular_packages_core_core_u","ɵangular_packages_core_core_v","ɵangular_packages_core_core_w","ɵangular_packages_core_core_x","ɵangular_packages_core_core_y","ɵangular_packages_core_core_z","ɵbypassSanitizationTrustHtml","bypassSanitizationTrustHtml","trustedHtml","ɵbypassSanitizationTrustResourceUrl","bypassSanitizationTrustResourceUrl","trustedResourceUrl","ɵbypassSanitizationTrustScript","bypassSanitizationTrustScript","trustedScript","ɵbypassSanitizationTrustStyle","bypassSanitizationTrustStyle","trustedStyle","ɵbypassSanitizationTrustUrl","bypassSanitizationTrustUrl","trustedUrl","ɵccf","createComponentFactory","ɵclearOverrides","ɵclearResolutionOfComponentResourcesQueue","ɵcmf","createNgModuleFactory","defFactory","ɵcompileComponent","ɵcompileDirective","ɵcompileNgModule","ɵcompileNgModuleDefs","ɵcompileNgModuleFactory__POST_R3__","compileNgModuleFactory__POST_R3__","ngJitMode","setJitOptions","isComponentResourceResolutionQueueEmpty","compilerProviders","_mergeArrays","resourceLoader","ResourceLoader","ɵcompilePipe","ɵcreateInjector","ɵcrt","createRendererType2","ɵdefaultIterableDiffers","ɵdefaultKeyValueDiffers","ɵdetectChanges","ɵdevModeEqual","ɵdid","outputDefs","ɵeld","namespaceAndName","fixedAttrs","bindingDefs","suffixOrSecurityContext","ns_1","name_1","_e","resolveRendererType2","isFilled","ɵfindLocaleData","ɵflushModuleScopingQueueAsMuchAsPossible","ɵgetComponentViewDefinitionFactory","ɵgetDebugNodeR2","ɵgetDebugNode__POST_R3__","ɵgetDirectives","ɵgetHostElement","ɵgetInjectableDef","ɵgetLContext","ɵgetLocaleCurrencyCode","getLocaleCurrencyCode","CurrencyCode","ɵgetLocalePluralCase","ɵgetModuleFactory__POST_R3__","getModuleFactory__POST_R3__","ɵgetSanitizationBypassType","ɵglobal","ɵinitServicesIfNeeded","ɵinlineInterpolate","inlineInterpolate","valueCount","c0","a1","c1","a2","c2","a3","c3","a4","c4","a5","c5","a6","c6","a7","c7","a8","c8","a9","c9","ɵinterpolate","interpolate","constAndInterp","ɵisBoundToModule__POST_R3__","isBoundToModule__POST_R3__","ɵisDefaultChangeDetectionStrategy","isDefaultChangeDetectionStrategy","changeDetectionStrategy","ɵisListLikeIterable","ɵisObservable","ɵisPromise","ɵisSubscribable","ɵivyEnabled","ɵmakeDecorator","ɵmarkDirty","moduleDef","ɵmpd","moduleProvideDef","ɵncd","ngContentDef","ɵnoSideEffects","ɵnov","ɵoverrideComponentView","ɵoverrideProvider","ɵpad","pureArrayDef","argCount","ɵpatchComponentDefWithScope","ɵpid","ɵpod","pureObjectDef","propToIndex","nbKeys","ɵppd","purePipeDef","ɵprd","ɵpublishDefaultGlobalUtils","publishDefaultGlobalUtils","ɵpublishGlobalUtil","ɵqud","ɵregisterLocaleData","registerLocaleData","extraData","LocaleId","ExtraData","ɵregisterModuleFactory","registerModuleFactory","ɵregisterNgModuleType","ɵrenderComponent","renderComponent$1","componentTag","ɵresetCompiledComponents","resetCompiledComponents","ɵresetJitOptions","resetJitOptions","ɵresolveComponentResources","ɵsetClassMetadata","setClassMetadata","clazz","ɵsetCurrentInjector","ɵsetDocument","setDocument","ɵsetLocaleId","ɵstore","ɵstringify","ɵted","textDef","staticText","ɵtransitiveScopesFor","ɵunregisterLocaleData","unregisterAllLocaleData","ɵunv","unwrapValue","nodeIdx","globalBindingIdx","ɵunwrapSafeValue","ɵvid","viewBindingCount","viewDisposableCount","viewNodeFlags","viewRootNodeFlags","viewMatchedQueries","currentParent","currentRenderParent","currentElementHasPublicProviders","currentElementHasPrivateProviders","newParent","rootNodeFlags","ɵwhenRendered","whenRendered","ɵɵngDeclareComponent","decl","compileComponentDeclaration","ɵɵngDeclareDirective","compileDirectiveDeclaration","ɵɵngDeclarePipe","compilePipeDeclaration"],"mappings":";;;;;CAMC,SAAUA,EAAQC,GACI,iBAAZC,SAA0C,oBAAXC,OAAyBF,EAAQC,QAASE,QAAQ,QAASA,QAAQ,mBACvF,mBAAXC,QAAyBA,OAAOC,IAAMD,OAAO,gBAAiB,CAAC,UAAW,OAAQ,kBAAmBJ,GAClFA,IAAzBD,EAASA,GAAUO,MAAsBC,GAAKR,EAAOQ,IAAM,GAAIR,EAAOQ,GAAGC,KAAO,IAAKT,EAAOU,KAAMV,EAAOU,KAAKC,WAHnH,CAIEC,MAAM,SAAWV,EAASQ,EAAMC,GAAa;;;;;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4D,EAAQo4D,uBAAyBA,GACjCp4D,EAAQq4D,uBAAyBA,GACjCr4D,EAAQs4D,uBAAyBA,GACjCt4D,EAAQu4D,uBAAyBA,GACjCv4D,EAAQw4D,uBAAyBA,GACjCx4D,EAAQy4D,uBAAyBA,GACjCz4D,EAAQ04D,uBAAyBA,GACjC14D,EAAQoyD,YAAcA,GACtBpyD,EAAQ24D,wBAA0BA,GAClC34D,EAAQ64D,wBAA0BA,GAClC74D,EAAQ84D,wBAA0BA,GAClC94D,EAAQ+4D,wBAA0BA,GAClC/4D,EAAQg5D,wBAA0BA,GAClCh5D,EAAQi5D,wBAA0BA,GAClCj5D,EAAQk5D,wBAA0BA,GAClCl5D,EAAQm5D,wBAA0BA,GAClCn5D,EAAQo5D,wBAA0BA,GAClCp5D,EAAQmtD,wBAA0BA,GAClCntD,EAAQs5D,wBAA0BA,GAClCt5D,EAAQkjD,WAAaA,GACrBljD,EAAQqwF,uBAAyBA,GACjCrwF,EAAQ62D,OAASA,GACjB72D,EAAQ+2D,kBAAoBA,GAC5B/2D,EAAQg3D,mBAAqBA,GAC7Bh3D,EAAQi3D,mBAAqBA,GAC7Bj3D,EAAQk3D,mBAAqBA,GAC7Bl3D,EAAQm3D,mBAAqBA,GAC7Bn3D,EAAQo3D,mBAAqBA,GAC7Bp3D,EAAQq3D,mBAAqBA,GAC7Br3D,EAAQs3D,mBAAqBA,GAC7Bt3D,EAAQu3D,mBAAqBA,GAC7Bv3D,EAAQw3D,mBAAqBA,GAC7Bx3D,EAAQi4B,oBAAsBA,GAC9Bj4B,EAAQk4B,2BAA6BA,GACrCl4B,EAAQ6vF,YAAcA,GAEtBhtF,OAAOyf,eAAetiB,EAAS,aAAc,CAAEgE,OAAO","sourcesContent":["/**\n * @license Angular v11.2.14\n * (c) 2010-2021 Google LLC. https://angular.io/\n * License: MIT\n */\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('rxjs'), require('rxjs/operators')) :\n typeof define === 'function' && define.amd ? define('@angular/core', ['exports', 'rxjs', 'rxjs/operators'], factory) :\n (global = global || self, factory((global.ng = global.ng || {}, global.ng.core = {}), global.rxjs, global.rxjs.operators));\n}(this, (function (exports, rxjs, operators) { 'use strict';\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 getClosureSafeProperty(objWithPropertyToExtract) {\n for (var key in objWithPropertyToExtract) {\n if (objWithPropertyToExtract[key] === getClosureSafeProperty) {\n return key;\n }\n }\n throw Error('Could not find renamed property on target object.');\n }\n /**\n * Sets properties on a target object from a source object, but only if\n * the property doesn't already exist on the target object.\n * @param target The target to set properties on\n * @param source The source of the property keys and values to set\n */\n function fillProperties(target, source) {\n for (var key in source) {\n if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n target[key] = source[key];\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 function 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 var res = token.toString();\n if (res == null) {\n return '' + res;\n }\n var newLineIndex = res.indexOf('\\n');\n return newLineIndex === -1 ? res : res.substring(0, newLineIndex);\n }\n /**\n * Concatenates two strings with separator, allocating new strings only when necessary.\n *\n * @param before before string.\n * @param separator separator string.\n * @param after after string.\n * @returns concatenated string.\n */\n function concatStringsWithSpace(before, after) {\n return (before == null || before === '') ?\n (after === null ? '' : after) :\n ((after == null || after === '') ? before : before + ' ' + after);\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 var __forward_ref__ = getClosureSafeProperty({ __forward_ref__: getClosureSafeProperty });\n /**\n * Allows to refer to references which are not yet defined.\n *\n * For instance, `forwardRef` is used when the `token` which we need to refer to for the purposes of\n * DI is declared, but not yet defined. It is also used when the `token` which we use when creating\n * a query is not yet defined.\n *\n * @usageNotes\n * ### Example\n * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref'}\n * @publicApi\n */\n function forwardRef(forwardRefFn) {\n forwardRefFn.__forward_ref__ = forwardRef;\n forwardRefFn.toString = function () {\n return stringify(this());\n };\n return forwardRefFn;\n }\n /**\n * Lazily retrieves the reference value from a forwardRef.\n *\n * Acts as the identity function when given a non-forward-ref value.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='resolve_forward_ref'}\n *\n * @see `forwardRef`\n * @publicApi\n */\n function resolveForwardRef(type) {\n return isForwardRef(type) ? type() : type;\n }\n /** Checks whether a function is wrapped by a `forwardRef`. */\n function isForwardRef(fn) {\n return typeof fn === 'function' && fn.hasOwnProperty(__forward_ref__) &&\n fn.__forward_ref__ === forwardRef;\n }\n\n /*! *****************************************************************************\n Copyright (c) Microsoft Corporation.\n\n Permission to use, copy, modify, and/or distribute this software for any\n purpose with or without fee is hereby granted.\n\n THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\n REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\n AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\n INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\n LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\n OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\n PERFORMANCE OF THIS SOFTWARE.\n ***************************************************************************** */\n /* global Reflect, Promise */\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b)\n if (b.hasOwnProperty(p))\n d[p] = b[p]; };\n return extendStatics(d, b);\n };\n function __extends(d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n }\n var __assign = function () {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s)\n if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n };\n function __rest(s, e) {\n var t = {};\n for (var p in s)\n if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n }\n function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\")\n r = Reflect.decorate(decorators, target, key, desc);\n else\n for (var i = decorators.length - 1; i >= 0; i--)\n if (d = decorators[i])\n r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n }\n function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); };\n }\n function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\")\n return Reflect.metadata(metadataKey, metadataValue);\n }\n function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try {\n step(generator.next(value));\n }\n catch (e) {\n reject(e);\n } }\n function rejected(value) { try {\n step(generator[\"throw\"](value));\n }\n catch (e) {\n reject(e);\n } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n }\n function __generator(thisArg, body) {\n var _ = { label: 0, sent: function () { if (t[0] & 1)\n throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function () { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f)\n throw new TypeError(\"Generator is already executing.\");\n while (_)\n try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)\n return t;\n if (y = 0, t)\n op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0:\n case 1:\n t = op;\n break;\n case 4:\n _.label++;\n return { value: op[1], done: false };\n case 5:\n _.label++;\n y = op[1];\n op = [0];\n continue;\n case 7:\n op = _.ops.pop();\n _.trys.pop();\n continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _ = 0;\n continue;\n }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {\n _.label = op[1];\n break;\n }\n if (op[0] === 6 && _.label < t[1]) {\n _.label = t[1];\n t = op;\n break;\n }\n if (t && _.label < t[2]) {\n _.label = t[2];\n _.ops.push(op);\n break;\n }\n if (t[2])\n _.ops.pop();\n _.trys.pop();\n continue;\n }\n op = body.call(thisArg, _);\n }\n catch (e) {\n op = [6, e];\n y = 0;\n }\n finally {\n f = t = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n }\n var __createBinding = Object.create ? (function (o, m, k, k2) {\n if (k2 === undefined)\n k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });\n }) : (function (o, m, k, k2) {\n if (k2 === undefined)\n k2 = k;\n o[k2] = m[k];\n });\n function __exportStar(m, exports) {\n for (var p in m)\n if (p !== \"default\" && !exports.hasOwnProperty(p))\n __createBinding(exports, m, p);\n }\n function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m)\n return m.call(o);\n if (o && typeof o.length === \"number\")\n return {\n next: function () {\n if (o && i >= o.length)\n o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n }\n function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m)\n return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done)\n ar.push(r.value);\n }\n catch (error) {\n e = { error: error };\n }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"]))\n m.call(i);\n }\n finally {\n if (e)\n throw e.error;\n }\n }\n return ar;\n }\n function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n }\n function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++)\n s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n }\n ;\n function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n }\n function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator)\n throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\n function verb(n) { if (g[n])\n i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\n function resume(n, v) { try {\n step(g[n](v));\n }\n catch (e) {\n settle(q[0][3], e);\n } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length)\n resume(q[0][0], q[0][1]); }\n }\n function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\n }\n function __asyncValues(o) {\n if (!Symbol.asyncIterator)\n throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }\n }\n function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) {\n Object.defineProperty(cooked, \"raw\", { value: raw });\n }\n else {\n cooked.raw = raw;\n }\n return cooked;\n }\n ;\n var __setModuleDefault = Object.create ? (function (o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n }) : function (o, v) {\n o[\"default\"] = v;\n };\n function __importStar(mod) {\n if (mod && mod.__esModule)\n return mod;\n var result = {};\n if (mod != null)\n for (var k in mod)\n if (Object.hasOwnProperty.call(mod, k))\n __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n }\n function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n }\n function __classPrivateFieldGet(receiver, privateMap) {\n if (!privateMap.has(receiver)) {\n throw new TypeError(\"attempted to get private field on non-instance\");\n }\n return privateMap.get(receiver);\n }\n function __classPrivateFieldSet(receiver, privateMap, value) {\n if (!privateMap.has(receiver)) {\n throw new TypeError(\"attempted to set private field on non-instance\");\n }\n privateMap.set(receiver, value);\n return 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 */\n // Base URL for the error details page.\n // Keep this value in sync with a similar const in\n // `packages/compiler-cli/src/ngtsc/diagnostics/src/error_code.ts`.\n var ERROR_DETAILS_PAGE_BASE_URL = 'https://angular.io/errors';\n var RuntimeError = /** @class */ (function (_super) {\n __extends(RuntimeError, _super);\n function RuntimeError(code, message) {\n var _this = _super.call(this, formatRuntimeError(code, message)) || this;\n _this.code = code;\n return _this;\n }\n return RuntimeError;\n }(Error));\n // Contains a set of error messages that have details guides at angular.io.\n // Full list of available error guides can be found at https://angular.io/errors\n /* tslint:disable:no-toplevel-property-access */\n var RUNTIME_ERRORS_WITH_GUIDES = new Set([\n \"100\" /* EXPRESSION_CHANGED_AFTER_CHECKED */,\n \"200\" /* CYCLIC_DI_DEPENDENCY */,\n \"201\" /* PROVIDER_NOT_FOUND */,\n \"300\" /* MULTIPLE_COMPONENTS_MATCH */,\n \"301\" /* EXPORT_NOT_FOUND */,\n \"302\" /* PIPE_NOT_FOUND */,\n ]);\n /* tslint:enable:no-toplevel-property-access */\n /** Called to format a runtime error */\n function formatRuntimeError(code, message) {\n var fullCode = code ? \"NG0\" + code + \": \" : '';\n var errorMessage = \"\" + fullCode + message;\n // Some runtime errors are still thrown without `ngDevMode` (for example\n // `throwProviderNotFoundError`), so we add `ngDevMode` check here to avoid pulling\n // `RUNTIME_ERRORS_WITH_GUIDES` symbol into prod bundles.\n // TODO: revisit all instances where `RuntimeError` is thrown and see if `ngDevMode` can be added\n // there instead to tree-shake more devmode-only code (and eventually remove `ngDevMode` check\n // from this code).\n if (ngDevMode && RUNTIME_ERRORS_WITH_GUIDES.has(code)) {\n errorMessage = errorMessage + \". Find more at \" + ERROR_DETAILS_PAGE_BASE_URL + \"/NG0\" + code;\n }\n return errorMessage;\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 * Used for stringify render output in Ivy.\n * Important! This function is very performance-sensitive and we should\n * be extra careful not to introduce megamorphic reads in it.\n * Check `core/test/render3/perf/render_stringify` for benchmarks and alternate implementations.\n */\n function renderStringify(value) {\n if (typeof value === 'string')\n return value;\n if (value == null)\n return '';\n // Use `String` so that it invokes the `toString` method of the value. Note that this\n // appears to be faster than calling `value.toString` (see `render_stringify` benchmark).\n return String(value);\n }\n /**\n * Used to stringify a value so that it can be displayed in an error message.\n * Important! This function contains a megamorphic read and should only be\n * used for error messages.\n */\n function stringifyForError(value) {\n if (typeof value === 'function')\n return value.name || value.toString();\n if (typeof value === 'object' && value != null && typeof value.type === 'function') {\n return value.type.name || value.type.toString();\n }\n return renderStringify(value);\n }\n\n /** Called when directives inject each other (creating a circular dependency) */\n function throwCyclicDependencyError(token, path) {\n var depPath = path ? \". Dependency path: \" + path.join(' > ') + \" > \" + token : '';\n throw new RuntimeError(\"200\" /* CYCLIC_DI_DEPENDENCY */, \"Circular dependency in DI detected for \" + token + depPath);\n }\n function throwMixedMultiProviderError() {\n throw new Error(\"Cannot mix multi providers and regular providers\");\n }\n function throwInvalidProviderError(ngModuleType, providers, provider) {\n var ngModuleDetail = '';\n if (ngModuleType && providers) {\n var providerDetail = providers.map(function (v) { return v == provider ? '?' + provider + '?' : '...'; });\n ngModuleDetail =\n \" - only instances of Provider and Type are allowed, got: [\" + providerDetail.join(', ') + \"]\";\n }\n throw new Error(\"Invalid provider for the NgModule '\" + stringify(ngModuleType) + \"'\" + ngModuleDetail);\n }\n /** Throws an error when a token is not found in DI. */\n function throwProviderNotFoundError(token, injectorName) {\n var injectorDetails = injectorName ? \" in \" + injectorName : '';\n throw new RuntimeError(\"201\" /* PROVIDER_NOT_FOUND */, \"No provider for \" + stringifyForError(token) + \" found\" + injectorDetails);\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 function assertNumber(actual, msg) {\n if (!(typeof actual === 'number')) {\n throwError(msg, typeof actual, 'number', '===');\n }\n }\n function assertNumberInRange(actual, minInclusive, maxInclusive) {\n assertNumber(actual, 'Expected a number');\n assertLessThanOrEqual(actual, maxInclusive, 'Expected number to be less than or equal to');\n assertGreaterThanOrEqual(actual, minInclusive, 'Expected number to be greater than or equal to');\n }\n function assertString(actual, msg) {\n if (!(typeof actual === 'string')) {\n throwError(msg, actual === null ? 'null' : typeof actual, 'string', '===');\n }\n }\n function assertFunction(actual, msg) {\n if (!(typeof actual === 'function')) {\n throwError(msg, actual === null ? 'null' : typeof actual, 'function', '===');\n }\n }\n function assertEqual(actual, expected, msg) {\n if (!(actual == expected)) {\n throwError(msg, actual, expected, '==');\n }\n }\n function assertNotEqual(actual, expected, msg) {\n if (!(actual != expected)) {\n throwError(msg, actual, expected, '!=');\n }\n }\n function assertSame(actual, expected, msg) {\n if (!(actual === expected)) {\n throwError(msg, actual, expected, '===');\n }\n }\n function assertNotSame(actual, expected, msg) {\n if (!(actual !== expected)) {\n throwError(msg, actual, expected, '!==');\n }\n }\n function assertLessThan(actual, expected, msg) {\n if (!(actual < expected)) {\n throwError(msg, actual, expected, '<');\n }\n }\n function assertLessThanOrEqual(actual, expected, msg) {\n if (!(actual <= expected)) {\n throwError(msg, actual, expected, '<=');\n }\n }\n function assertGreaterThan(actual, expected, msg) {\n if (!(actual > expected)) {\n throwError(msg, actual, expected, '>');\n }\n }\n function assertGreaterThanOrEqual(actual, expected, msg) {\n if (!(actual >= expected)) {\n throwError(msg, actual, expected, '>=');\n }\n }\n function assertNotDefined(actual, msg) {\n if (actual != null) {\n throwError(msg, actual, null, '==');\n }\n }\n function assertDefined(actual, msg) {\n if (actual == null) {\n throwError(msg, actual, null, '!=');\n }\n }\n function throwError(msg, actual, expected, comparison) {\n throw new Error(\"ASSERTION ERROR: \" + msg +\n (comparison == null ? '' : \" [Expected=> \" + expected + \" \" + comparison + \" \" + actual + \" <=Actual]\"));\n }\n function assertDomNode(node) {\n // If we're in a worker, `Node` will not be defined.\n if (!(typeof Node !== 'undefined' && node instanceof Node) &&\n !(typeof node === 'object' && node != null &&\n node.constructor.name === 'WebWorkerRenderNode')) {\n throwError(\"The provided value must be an instance of a DOM Node but got \" + stringify(node));\n }\n }\n function assertIndexInRange(arr, index) {\n assertDefined(arr, 'Array must be defined.');\n var maxLen = arr.length;\n if (index < 0 || index >= maxLen) {\n throwError(\"Index expected to be less than \" + maxLen + \" but got \" + index);\n }\n }\n function assertOneOf(value) {\n var validValues = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n validValues[_i - 1] = arguments[_i];\n }\n if (validValues.indexOf(value) !== -1)\n return true;\n throwError(\"Expected value to be one of \" + JSON.stringify(validValues) + \" but was \" + JSON.stringify(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 */\n /**\n * Construct an `InjectableDef` which defines how a token will be constructed by the DI system, and\n * in which injectors (if any) it will be available.\n *\n * This should be assigned to a static `ɵprov` field on a type, which will then be an\n * `InjectableType`.\n *\n * Options:\n * * `providedIn` determines which injectors will include the injectable, by either associating it\n * with an `@NgModule` or other `InjectorType`, or by specifying that this injectable should be\n * provided in the `'root'` injector, which will be the application-level injector in most apps.\n * * `factory` gives the zero argument function which will create an instance of the injectable.\n * The factory can call `inject` to access the `Injector` and request injection of dependencies.\n *\n * @codeGenApi\n * @publicApi This instruction has been emitted by ViewEngine for some time and is deployed to npm.\n */\n function ɵɵdefineInjectable(opts) {\n return {\n token: opts.token,\n providedIn: opts.providedIn || null,\n factory: opts.factory,\n value: undefined,\n };\n }\n /**\n * @deprecated in v8, delete after v10. This API should be used only by generated code, and that\n * code should now use ɵɵdefineInjectable instead.\n * @publicApi\n */\n var defineInjectable = ɵɵdefineInjectable;\n /**\n * Construct an `InjectorDef` which configures an injector.\n *\n * This should be assigned to a static injector def (`ɵinj`) field on a type, which will then be an\n * `InjectorType`.\n *\n * Options:\n *\n * * `providers`: an optional array of providers to add to the injector. Each provider must\n * either have a factory or point to a type which has a `ɵprov` static property (the\n * type must be an `InjectableType`).\n * * `imports`: an optional array of imports of other `InjectorType`s or `InjectorTypeWithModule`s\n * whose providers will also be added to the injector. Locally provided types will override\n * providers from imports.\n *\n * @codeGenApi\n */\n function ɵɵdefineInjector(options) {\n return { providers: options.providers || [], imports: options.imports || [] };\n }\n /**\n * Read the injectable def (`ɵprov`) for `type` in a way which is immune to accidentally reading\n * inherited value.\n *\n * @param type A type which may have its own (non-inherited) `ɵprov`.\n */\n function getInjectableDef(type) {\n return getOwnDefinition(type, NG_PROV_DEF) || getOwnDefinition(type, NG_INJECTABLE_DEF);\n }\n /**\n * Return definition only if it is defined directly on `type` and is not inherited from a base\n * class of `type`.\n */\n function getOwnDefinition(type, field) {\n return type.hasOwnProperty(field) ? type[field] : null;\n }\n /**\n * Read the injectable def (`ɵprov`) for `type` or read the `ɵprov` from one of its ancestors.\n *\n * @param type A type which may have `ɵprov`, via inheritance.\n *\n * @deprecated Will be removed in a future version of Angular, where an error will occur in the\n * scenario if we find the `ɵprov` on an ancestor only.\n */\n function getInheritedInjectableDef(type) {\n var def = type && (type[NG_PROV_DEF] || type[NG_INJECTABLE_DEF]);\n if (def) {\n var typeName = getTypeName(type);\n // TODO(FW-1307): Re-add ngDevMode when closure can handle it\n // ngDevMode &&\n console.warn(\"DEPRECATED: DI is instantiating a token \\\"\" + typeName + \"\\\" that inherits its @Injectable decorator but does not provide one itself.\\n\" +\n (\"This will become an error in a future version of Angular. Please add @Injectable() to the \\\"\" + typeName + \"\\\" class.\"));\n return def;\n }\n else {\n return null;\n }\n }\n /** Gets the name of a type, accounting for some cross-browser differences. */\n function getTypeName(type) {\n // `Function.prototype.name` behaves differently between IE and other browsers. In most browsers\n // it'll always return the name of the function itself, no matter how many other functions it\n // inherits from. On IE the function doesn't have its own `name` property, but it takes it from\n // the lowest level in the prototype chain. E.g. if we have `class Foo extends Parent` most\n // browsers will evaluate `Foo.name` to `Foo` while IE will return `Parent`. We work around\n // the issue by converting the function to a string and parsing its name out that way via a regex.\n if (type.hasOwnProperty('name')) {\n return type.name;\n }\n var match = ('' + type).match(/^function\\s*([^\\s(]+)/);\n return match === null ? '' : match[1];\n }\n /**\n * Read the injector def type in a way which is immune to accidentally reading inherited value.\n *\n * @param type type which may have an injector def (`ɵinj`)\n */\n function getInjectorDef(type) {\n return type && (type.hasOwnProperty(NG_INJ_DEF) || type.hasOwnProperty(NG_INJECTOR_DEF)) ?\n type[NG_INJ_DEF] :\n null;\n }\n var NG_PROV_DEF = getClosureSafeProperty({ ɵprov: getClosureSafeProperty });\n var NG_INJ_DEF = getClosureSafeProperty({ ɵinj: getClosureSafeProperty });\n // We need to keep these around so we can read off old defs if new defs are unavailable\n var NG_INJECTABLE_DEF = getClosureSafeProperty({ ngInjectableDef: getClosureSafeProperty });\n var NG_INJECTOR_DEF = getClosureSafeProperty({ ngInjectorDef: getClosureSafeProperty });\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 (InjectFlags) {\n // TODO(alxhub): make this 'const' (and remove `InternalInjectFlags` enum) when ngc no longer\n // writes exports of it into ngfactory files.\n /** Check self and check parent injector if needed */\n InjectFlags[InjectFlags[\"Default\"] = 0] = \"Default\";\n /**\n * Specifies that an injector should retrieve a dependency from any injector until reaching the\n * host element of the current component. (Only used with Element Injector)\n */\n InjectFlags[InjectFlags[\"Host\"] = 1] = \"Host\";\n /** Don't ascend to ancestors of the node requesting injection. */\n InjectFlags[InjectFlags[\"Self\"] = 2] = \"Self\";\n /** Skip the node that is requesting injection. */\n InjectFlags[InjectFlags[\"SkipSelf\"] = 4] = \"SkipSelf\";\n /** Inject `defaultValue` instead if token not found. */\n InjectFlags[InjectFlags[\"Optional\"] = 8] = \"Optional\";\n })(exports.InjectFlags || (exports.InjectFlags = {}));\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 * Current implementation of inject.\n *\n * By default, it is `injectInjectorOnly`, which makes it `Injector`-only aware. It can be changed\n * to `directiveInject`, which brings in the `NodeInjector` system of ivy. It is designed this\n * way for two reasons:\n * 1. `Injector` should not depend on ivy logic.\n * 2. To maintain tree shake-ability we don't want to bring in unnecessary code.\n */\n var _injectImplementation;\n function getInjectImplementation() {\n return _injectImplementation;\n }\n /**\n * Sets the current inject implementation.\n */\n function setInjectImplementation(impl) {\n var previous = _injectImplementation;\n _injectImplementation = impl;\n return previous;\n }\n /**\n * Injects `root` tokens in limp mode.\n *\n * If no injector exists, we can still inject tree-shakable providers which have `providedIn` set to\n * `\"root\"`. This is known as the limp mode injection. In such case the value is stored in the\n * `InjectableDef`.\n */\n function injectRootLimpMode(token, notFoundValue, flags) {\n var injectableDef = getInjectableDef(token);\n if (injectableDef && injectableDef.providedIn == 'root') {\n return injectableDef.value === undefined ? injectableDef.value = injectableDef.factory() :\n injectableDef.value;\n }\n if (flags & exports.InjectFlags.Optional)\n return null;\n if (notFoundValue !== undefined)\n return notFoundValue;\n throwProviderNotFoundError(stringify(token), 'Injector');\n }\n /**\n * Assert that `_injectImplementation` is not `fn`.\n *\n * This is useful, to prevent infinite recursion.\n *\n * @param fn Function which it should not equal to\n */\n function assertInjectImplementationNotEqual(fn) {\n ngDevMode &&\n assertNotEqual(_injectImplementation, fn, 'Calling ɵɵinject would cause infinite recursion');\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 * Convince closure compiler that the wrapped function has no side-effects.\n *\n * Closure compiler always assumes that `toString` has no side-effects. We use this quirk to\n * allow us to execute a function but have closure compiler mark the call as no-side-effects.\n * It is important that the return value for the `noSideEffects` function be assigned\n * to something which is retained otherwise the call to `noSideEffects` will be removed by closure\n * compiler.\n */\n function noSideEffects(fn) {\n return { toString: fn }.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 (function (ChangeDetectionStrategy) {\n /**\n * Use the `CheckOnce` strategy, meaning that automatic change detection is deactivated\n * until reactivated by setting the strategy to `Default` (`CheckAlways`).\n * Change detection can still be explicitly invoked.\n * This strategy applies to all child directives and cannot be overridden.\n */\n ChangeDetectionStrategy[ChangeDetectionStrategy[\"OnPush\"] = 0] = \"OnPush\";\n /**\n * Use the default `CheckAlways` strategy, in which change detection is automatic until\n * explicitly deactivated.\n */\n ChangeDetectionStrategy[ChangeDetectionStrategy[\"Default\"] = 1] = \"Default\";\n })(exports.ChangeDetectionStrategy || (exports.ChangeDetectionStrategy = {}));\n (function (ChangeDetectorStatus) {\n /**\n * A state in which, after calling `detectChanges()`, the change detector\n * state becomes `Checked`, and must be explicitly invoked or reactivated.\n */\n ChangeDetectorStatus[ChangeDetectorStatus[\"CheckOnce\"] = 0] = \"CheckOnce\";\n /**\n * A state in which change detection is skipped until the change detector mode\n * becomes `CheckOnce`.\n */\n ChangeDetectorStatus[ChangeDetectorStatus[\"Checked\"] = 1] = \"Checked\";\n /**\n * A state in which change detection continues automatically until explicitly\n * deactivated.\n */\n ChangeDetectorStatus[ChangeDetectorStatus[\"CheckAlways\"] = 2] = \"CheckAlways\";\n /**\n * A state in which a change detector sub tree is not a part of the main tree and\n * should be skipped.\n */\n ChangeDetectorStatus[ChangeDetectorStatus[\"Detached\"] = 3] = \"Detached\";\n /**\n * Indicates that the change detector encountered an error checking a binding\n * or calling a directive lifecycle method and is now in an inconsistent state. Change\n * detectors in this state do not detect changes.\n */\n ChangeDetectorStatus[ChangeDetectorStatus[\"Errored\"] = 4] = \"Errored\";\n /**\n * Indicates that the change detector has been destroyed.\n */\n ChangeDetectorStatus[ChangeDetectorStatus[\"Destroyed\"] = 5] = \"Destroyed\";\n })(exports.ɵChangeDetectorStatus || (exports.ɵChangeDetectorStatus = {}));\n /**\n * Reports whether a given strategy is currently the default for change detection.\n * @param changeDetectionStrategy The strategy to check.\n * @returns True if the given strategy is the current default, false otherwise.\n * @see `ChangeDetectorStatus`\n * @see `ChangeDetectorRef`\n */\n function isDefaultChangeDetectionStrategy(changeDetectionStrategy) {\n return changeDetectionStrategy == null ||\n changeDetectionStrategy === exports.ChangeDetectionStrategy.Default;\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 (function (ViewEncapsulation) {\n /**\n * Emulate `Native` scoping of styles by adding an attribute containing surrogate id to the Host\n * Element and pre-processing the style rules provided via {@link Component#styles styles} or\n * {@link Component#styleUrls styleUrls}, and adding the new Host Element attribute to all\n * selectors.\n *\n * This is the default option.\n */\n ViewEncapsulation[ViewEncapsulation[\"Emulated\"] = 0] = \"Emulated\";\n // Historically the 1 value was for `Native` encapsulation which has been removed as of v11.\n /**\n * Don't provide any template or style encapsulation.\n */\n ViewEncapsulation[ViewEncapsulation[\"None\"] = 2] = \"None\";\n /**\n * Use Shadow DOM to encapsulate styles.\n *\n * For the DOM this means using modern [Shadow\n * DOM](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM) and\n * creating a ShadowRoot for Component's Host Element.\n */\n ViewEncapsulation[ViewEncapsulation[\"ShadowDom\"] = 3] = \"ShadowDom\";\n })(exports.ViewEncapsulation || (exports.ViewEncapsulation = {}));\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 var __globalThis = typeof globalThis !== 'undefined' && globalThis;\n var __window = typeof window !== 'undefined' && window;\n var __self = typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' &&\n self instanceof WorkerGlobalScope && self;\n var __global = typeof global !== 'undefined' && global;\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.\n var _global = __globalThis || __global || __window || __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 function ngDevModeResetPerfCounters() {\n var locationString = typeof location !== 'undefined' ? location.toString() : '';\n var newCounters = {\n namedConstructors: locationString.indexOf('ngDevMode=namedConstructors') != -1,\n firstCreatePass: 0,\n tNode: 0,\n tView: 0,\n rendererCreateTextNode: 0,\n rendererSetText: 0,\n rendererCreateElement: 0,\n rendererAddEventListener: 0,\n rendererSetAttribute: 0,\n rendererRemoveAttribute: 0,\n rendererSetProperty: 0,\n rendererSetClassName: 0,\n rendererAddClass: 0,\n rendererRemoveClass: 0,\n rendererSetStyle: 0,\n rendererRemoveStyle: 0,\n rendererDestroy: 0,\n rendererDestroyNode: 0,\n rendererMoveNode: 0,\n rendererRemoveNode: 0,\n rendererAppendChild: 0,\n rendererInsertBefore: 0,\n rendererCreateComment: 0,\n };\n // Make sure to refer to ngDevMode as ['ngDevMode'] for closure.\n var allowNgDevModeTrue = locationString.indexOf('ngDevMode=false') === -1;\n _global['ngDevMode'] = allowNgDevModeTrue && newCounters;\n return newCounters;\n }\n /**\n * This function checks to see if the `ngDevMode` has been set. If yes,\n * then we honor it, otherwise we default to dev mode with additional checks.\n *\n * The idea is that unless we are doing production build where we explicitly\n * set `ngDevMode == false` we should be helping the developer by providing\n * as much early warning and errors as possible.\n *\n * `ɵɵdefineComponent` is guaranteed to have been called before any component template functions\n * (and thus Ivy instructions), so a single initialization there is sufficient to ensure ngDevMode\n * is defined for the entire instruction set.\n *\n * When checking `ngDevMode` on toplevel, always init it before referencing it\n * (e.g. `((typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode())`), otherwise you can\n * get a `ReferenceError` like in https://github.com/angular/angular/issues/31595.\n *\n * Details on possible values for `ngDevMode` can be found on its docstring.\n *\n * NOTE:\n * - changes to the `ngDevMode` name must be synced with `compiler-cli/src/tooling.ts`.\n */\n function initNgDevMode() {\n // The below checks are to ensure that calling `initNgDevMode` multiple times does not\n // reset the counters.\n // If the `ngDevMode` is not an object, then it means we have not created the perf counters\n // yet.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (typeof ngDevMode !== 'object') {\n ngDevModeResetPerfCounters();\n }\n return typeof ngDevMode !== 'undefined' && !!ngDevMode;\n }\n return false;\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 contains reuseable \"empty\" symbols that can be used as default return values\n * in different parts of the rendering code. Because the same symbols are returned, this\n * allows for identity checks against these values to be consistently used by the framework\n * code.\n */\n var EMPTY_OBJ = {};\n var EMPTY_ARRAY = [];\n // freezing the values prevents any code from accidentally inserting new values in\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode()) {\n // These property accesses can be ignored because ngDevMode will be set to false\n // when optimizing code and the whole if statement will be dropped.\n // tslint:disable-next-line:no-toplevel-property-access\n Object.freeze(EMPTY_OBJ);\n // tslint:disable-next-line:no-toplevel-property-access\n Object.freeze(EMPTY_ARRAY);\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 contains reuseable \"empty\" symbols that can be used as default return values\n * in different parts of the rendering code. Because the same symbols are returned, this\n * allows for identity checks against these values to be consistently used by the framework\n * code.\n */\n var EMPTY_ARRAY$1 = [];\n // freezing the values prevents any code from accidentally inserting new values in\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode()) {\n // These property accesses can be ignored because ngDevMode will be set to false\n // when optimizing code and the whole if statement will be dropped.\n // tslint:disable-next-line:no-toplevel-property-access\n Object.freeze(EMPTY_ARRAY$1);\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 var NG_COMP_DEF = getClosureSafeProperty({ ɵcmp: getClosureSafeProperty });\n var NG_DIR_DEF = getClosureSafeProperty({ ɵdir: getClosureSafeProperty });\n var NG_PIPE_DEF = getClosureSafeProperty({ ɵpipe: getClosureSafeProperty });\n var NG_MOD_DEF = getClosureSafeProperty({ ɵmod: getClosureSafeProperty });\n var NG_LOC_ID_DEF = getClosureSafeProperty({ ɵloc: getClosureSafeProperty });\n var NG_FACTORY_DEF = getClosureSafeProperty({ ɵfac: getClosureSafeProperty });\n /**\n * If a directive is diPublic, bloomAdd sets a property on the type with this constant as\n * the key and the directive's unique ID as the value. This allows us to map directives to their\n * bloom filter bit for DI.\n */\n // TODO(misko): This is wrong. The NG_ELEMENT_ID should never be minified.\n var NG_ELEMENT_ID = getClosureSafeProperty({ __NG_ELEMENT_ID__: getClosureSafeProperty });\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 var _renderCompCount = 0;\n /**\n * Create a component definition object.\n *\n *\n * # Example\n * ```\n * class MyDirective {\n * // Generated by Angular Template Compiler\n * // [Symbol] syntax will not be supported by TypeScript until v2.7\n * static ɵcmp = defineComponent({\n * ...\n * });\n * }\n * ```\n * @codeGenApi\n */\n function ɵɵdefineComponent(componentDefinition) {\n return noSideEffects(function () {\n // Initialize ngDevMode. This must be the first statement in ɵɵdefineComponent.\n // See the `initNgDevMode` docstring for more information.\n (typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode();\n var type = componentDefinition.type;\n var declaredInputs = {};\n var def = {\n type: type,\n providersResolver: null,\n decls: componentDefinition.decls,\n vars: componentDefinition.vars,\n factory: null,\n template: componentDefinition.template || null,\n consts: componentDefinition.consts || null,\n ngContentSelectors: componentDefinition.ngContentSelectors,\n hostBindings: componentDefinition.hostBindings || null,\n hostVars: componentDefinition.hostVars || 0,\n hostAttrs: componentDefinition.hostAttrs || null,\n contentQueries: componentDefinition.contentQueries || null,\n declaredInputs: declaredInputs,\n inputs: null,\n outputs: null,\n exportAs: componentDefinition.exportAs || null,\n onPush: componentDefinition.changeDetection === exports.ChangeDetectionStrategy.OnPush,\n directiveDefs: null,\n pipeDefs: null,\n selectors: componentDefinition.selectors || EMPTY_ARRAY$1,\n viewQuery: componentDefinition.viewQuery || null,\n features: componentDefinition.features || null,\n data: componentDefinition.data || {},\n // TODO(misko): convert ViewEncapsulation into const enum so that it can be used\n // directly in the next line. Also `None` should be 0 not 2.\n encapsulation: componentDefinition.encapsulation || exports.ViewEncapsulation.Emulated,\n id: 'c',\n styles: componentDefinition.styles || EMPTY_ARRAY$1,\n _: null,\n setInput: null,\n schemas: componentDefinition.schemas || null,\n tView: null,\n };\n var directiveTypes = componentDefinition.directives;\n var feature = componentDefinition.features;\n var pipeTypes = componentDefinition.pipes;\n def.id += _renderCompCount++;\n def.inputs = invertObject(componentDefinition.inputs, declaredInputs),\n def.outputs = invertObject(componentDefinition.outputs),\n feature && feature.forEach(function (fn) { return fn(def); });\n def.directiveDefs = directiveTypes ?\n function () { return (typeof directiveTypes === 'function' ? directiveTypes() : directiveTypes)\n .map(extractDirectiveDef); } :\n null;\n def.pipeDefs = pipeTypes ?\n function () { return (typeof pipeTypes === 'function' ? pipeTypes() : pipeTypes).map(extractPipeDef); } :\n null;\n return def;\n });\n }\n /**\n * Generated next to NgModules to monkey-patch directive and pipe references onto a component's\n * definition, when generating a direct reference in the component file would otherwise create an\n * import cycle.\n *\n * See [this explanation](https://hackmd.io/Odw80D0pR6yfsOjg_7XCJg?view) for more details.\n *\n * @codeGenApi\n */\n function ɵɵsetComponentScope(type, directives, pipes) {\n var def = type.ɵcmp;\n def.directiveDefs = function () { return directives.map(extractDirectiveDef); };\n def.pipeDefs = function () { return pipes.map(extractPipeDef); };\n }\n function extractDirectiveDef(type) {\n var def = getComponentDef(type) || getDirectiveDef(type);\n if (ngDevMode && !def) {\n throw new Error(\"'\" + type.name + \"' is neither 'ComponentType' or 'DirectiveType'.\");\n }\n return def;\n }\n function extractPipeDef(type) {\n var def = getPipeDef(type);\n if (ngDevMode && !def) {\n throw new Error(\"'\" + type.name + \"' is not a 'PipeType'.\");\n }\n return def;\n }\n var autoRegisterModuleById = {};\n /**\n * @codeGenApi\n */\n function ɵɵdefineNgModule(def) {\n var res = {\n type: def.type,\n bootstrap: def.bootstrap || EMPTY_ARRAY$1,\n declarations: def.declarations || EMPTY_ARRAY$1,\n imports: def.imports || EMPTY_ARRAY$1,\n exports: def.exports || EMPTY_ARRAY$1,\n transitiveCompileScopes: null,\n schemas: def.schemas || null,\n id: def.id || null,\n };\n if (def.id != null) {\n noSideEffects(function () {\n autoRegisterModuleById[def.id] = def.type;\n });\n }\n return res;\n }\n /**\n * Adds the module metadata that is necessary to compute the module's transitive scope to an\n * existing module definition.\n *\n * Scope metadata of modules is not used in production builds, so calls to this function can be\n * marked pure to tree-shake it from the bundle, allowing for all referenced declarations\n * to become eligible for tree-shaking as well.\n *\n * @codeGenApi\n */\n function ɵɵsetNgModuleScope(type, scope) {\n return noSideEffects(function () {\n var ngModuleDef = getNgModuleDef(type, true);\n ngModuleDef.declarations = scope.declarations || EMPTY_ARRAY$1;\n ngModuleDef.imports = scope.imports || EMPTY_ARRAY$1;\n ngModuleDef.exports = scope.exports || EMPTY_ARRAY$1;\n });\n }\n /**\n * Inverts an inputs or outputs lookup such that the keys, which were the\n * minified keys, are part of the values, and the values are parsed so that\n * the publicName of the property is the new key\n *\n * e.g. for\n *\n * ```\n * class Comp {\n * @Input()\n * propName1: string;\n *\n * @Input('publicName2')\n * declaredPropName2: number;\n * }\n * ```\n *\n * will be serialized as\n *\n * ```\n * {\n * propName1: 'propName1',\n * declaredPropName2: ['publicName2', 'declaredPropName2'],\n * }\n * ```\n *\n * which is than translated by the minifier as:\n *\n * ```\n * {\n * minifiedPropName1: 'propName1',\n * minifiedPropName2: ['publicName2', 'declaredPropName2'],\n * }\n * ```\n *\n * becomes: (public name => minifiedName)\n *\n * ```\n * {\n * 'propName1': 'minifiedPropName1',\n * 'publicName2': 'minifiedPropName2',\n * }\n * ```\n *\n * Optionally the function can take `secondary` which will result in: (public name => declared name)\n *\n * ```\n * {\n * 'propName1': 'propName1',\n * 'publicName2': 'declaredPropName2',\n * }\n * ```\n *\n\n */\n function invertObject(obj, secondary) {\n if (obj == null)\n return EMPTY_OBJ;\n var newLookup = {};\n for (var minifiedKey in obj) {\n if (obj.hasOwnProperty(minifiedKey)) {\n var publicName = obj[minifiedKey];\n var declaredName = publicName;\n if (Array.isArray(publicName)) {\n declaredName = publicName[1];\n publicName = publicName[0];\n }\n newLookup[publicName] = minifiedKey;\n if (secondary) {\n (secondary[publicName] = declaredName);\n }\n }\n }\n return newLookup;\n }\n /**\n * Create a directive definition object.\n *\n * # Example\n * ```ts\n * class MyDirective {\n * // Generated by Angular Template Compiler\n * // [Symbol] syntax will not be supported by TypeScript until v2.7\n * static ɵdir = ɵɵdefineDirective({\n * ...\n * });\n * }\n * ```\n *\n * @codeGenApi\n */\n var ɵɵdefineDirective = ɵɵdefineComponent;\n /**\n * Create a pipe definition object.\n *\n * # Example\n * ```\n * class MyPipe implements PipeTransform {\n * // Generated by Angular Template Compiler\n * static ɵpipe = definePipe({\n * ...\n * });\n * }\n * ```\n * @param pipeDef Pipe definition generated by the compiler\n *\n * @codeGenApi\n */\n function ɵɵdefinePipe(pipeDef) {\n return {\n type: pipeDef.type,\n name: pipeDef.name,\n factory: null,\n pure: pipeDef.pure !== false,\n onDestroy: pipeDef.type.prototype.ngOnDestroy || null\n };\n }\n /**\n * The following getter methods retrieve the definition from the type. Currently the retrieval\n * honors inheritance, but in the future we may change the rule to require that definitions are\n * explicit. This would require some sort of migration strategy.\n */\n function getComponentDef(type) {\n return type[NG_COMP_DEF] || null;\n }\n function getDirectiveDef(type) {\n return type[NG_DIR_DEF] || null;\n }\n function getPipeDef(type) {\n return type[NG_PIPE_DEF] || null;\n }\n function getNgModuleDef(type, throwNotFound) {\n var ngModuleDef = type[NG_MOD_DEF] || null;\n if (!ngModuleDef && throwNotFound === true) {\n throw new Error(\"Type \" + stringify(type) + \" does not have '\\u0275mod' property.\");\n }\n return ngModuleDef;\n }\n function getNgLocaleIdDef(type) {\n return type[NG_LOC_ID_DEF] || null;\n }\n\n /**\n * Special location which allows easy identification of type. If we have an array which was\n * retrieved from the `LView` and that array has `true` at `TYPE` location, we know it is\n * `LContainer`.\n */\n var TYPE = 1;\n /**\n * Below are constants for LContainer indices to help us look up LContainer members\n * without having to remember the specific indices.\n * Uglify will inline these when minifying so there shouldn't be a cost.\n */\n /**\n * Flag to signify that this `LContainer` may have transplanted views which need to be change\n * detected. (see: `LView[DECLARATION_COMPONENT_VIEW])`.\n *\n * This flag, once set, is never unset for the `LContainer`. This means that when unset we can skip\n * a lot of work in `refreshEmbeddedViews`. But when set we still need to verify\n * that the `MOVED_VIEWS` are transplanted and on-push.\n */\n var HAS_TRANSPLANTED_VIEWS = 2;\n // PARENT, NEXT, TRANSPLANTED_VIEWS_TO_REFRESH are indices 3, 4, and 5\n // As we already have these constants in LView, we don't need to re-create them.\n // T_HOST is index 6\n // We already have this constants in LView, we don't need to re-create it.\n var NATIVE = 7;\n var VIEW_REFS = 8;\n var MOVED_VIEWS = 9;\n /**\n * Size of LContainer's header. Represents the index after which all views in the\n * container will be inserted. We need to keep a record of current views so we know\n * which views are already in the DOM (and don't need to be re-added) and so we can\n * remove views from the DOM when they are no longer required.\n */\n var CONTAINER_HEADER_OFFSET = 10;\n // Note: This hack is necessary so we don't erroneously get a circular dependency\n // failure based on types.\n var unusedValueExportToPlacateAjd = 1;\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 // Below are constants for LView indices to help us look up LView members\n // without having to remember the specific indices.\n // Uglify will inline these when minifying so there shouldn't be a cost.\n var HOST = 0;\n var TVIEW = 1;\n var FLAGS = 2;\n var PARENT = 3;\n var NEXT = 4;\n var TRANSPLANTED_VIEWS_TO_REFRESH = 5;\n var T_HOST = 6;\n var CLEANUP = 7;\n var CONTEXT = 8;\n var INJECTOR = 9;\n var RENDERER_FACTORY = 10;\n var RENDERER = 11;\n var SANITIZER = 12;\n var CHILD_HEAD = 13;\n var CHILD_TAIL = 14;\n // FIXME(misko): Investigate if the three declarations aren't all same thing.\n var DECLARATION_VIEW = 15;\n var DECLARATION_COMPONENT_VIEW = 16;\n var DECLARATION_LCONTAINER = 17;\n var PREORDER_HOOK_FLAGS = 18;\n var QUERIES = 19;\n /**\n * Size of LView's header. Necessary to adjust for it when setting slots.\n *\n * IMPORTANT: `HEADER_OFFSET` should only be referred to the in the `ɵɵ*` instructions to translate\n * instruction index into `LView` index. All other indexes should be in the `LView` index space and\n * there should be no need to refer to `HEADER_OFFSET` anywhere else.\n */\n var HEADER_OFFSET = 20;\n /**\n * Converts `TViewType` into human readable text.\n * Make sure this matches with `TViewType`\n */\n var TViewTypeAsString = [\n 'Root',\n 'Component',\n 'Embedded',\n ];\n // Note: This hack is necessary so we don't erroneously get a circular dependency\n // failure based on types.\n var unusedValueExportToPlacateAjd$1 = 1;\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 * True if `value` is `LView`.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\n function isLView(value) {\n return Array.isArray(value) && typeof value[TYPE] === 'object';\n }\n /**\n * True if `value` is `LContainer`.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\n function isLContainer(value) {\n return Array.isArray(value) && value[TYPE] === true;\n }\n function isContentQueryHost(tNode) {\n return (tNode.flags & 8 /* hasContentQuery */) !== 0;\n }\n function isComponentHost(tNode) {\n return (tNode.flags & 2 /* isComponentHost */) === 2 /* isComponentHost */;\n }\n function isDirectiveHost(tNode) {\n return (tNode.flags & 1 /* isDirectiveHost */) === 1 /* isDirectiveHost */;\n }\n function isComponentDef(def) {\n return def.template !== null;\n }\n function isRootView(target) {\n return (target[FLAGS] & 512 /* IsRoot */) !== 0;\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 // [Assert functions do not constraint type when they are guarded by a truthy\n // expression.](https://github.com/microsoft/TypeScript/issues/37295)\n function assertTNodeForLView(tNode, lView) {\n assertTNodeForTView(tNode, lView[TVIEW]);\n }\n function assertTNodeForTView(tNode, tView) {\n assertTNode(tNode);\n tNode.hasOwnProperty('tView_') &&\n assertEqual(tNode.tView_, tView, 'This TNode does not belong to this TView.');\n }\n function assertTNode(tNode) {\n assertDefined(tNode, 'TNode must be defined');\n if (!(tNode && typeof tNode === 'object' && tNode.hasOwnProperty('directiveStylingLast'))) {\n throwError('Not of type TNode, got: ' + tNode);\n }\n }\n function assertTIcu(tIcu) {\n assertDefined(tIcu, 'Expected TIcu to be defined');\n if (!(typeof tIcu.currentCaseLViewIndex === 'number')) {\n throwError('Object is not of TIcu type.');\n }\n }\n function assertComponentType(actual, msg) {\n if (msg === void 0) { msg = 'Type passed in is not ComponentType, it does not have \\'ɵcmp\\' property.'; }\n if (!getComponentDef(actual)) {\n throwError(msg);\n }\n }\n function assertNgModuleType(actual, msg) {\n if (msg === void 0) { msg = 'Type passed in is not NgModuleType, it does not have \\'ɵmod\\' property.'; }\n if (!getNgModuleDef(actual)) {\n throwError(msg);\n }\n }\n function assertCurrentTNodeIsParent(isParent) {\n assertEqual(isParent, true, 'currentTNode should be a parent');\n }\n function assertHasParent(tNode) {\n assertDefined(tNode, 'currentTNode should exist!');\n assertDefined(tNode.parent, 'currentTNode should have a parent');\n }\n function assertDataNext(lView, index, arr) {\n if (arr == null)\n arr = lView;\n assertEqual(arr.length, index, \"index \" + index + \" expected to be at the end of arr (length \" + arr.length + \")\");\n }\n function assertLContainer(value) {\n assertDefined(value, 'LContainer must be defined');\n assertEqual(isLContainer(value), true, 'Expecting LContainer');\n }\n function assertLViewOrUndefined(value) {\n value && assertEqual(isLView(value), true, 'Expecting LView or undefined or null');\n }\n function assertLView(value) {\n assertDefined(value, 'LView must be defined');\n assertEqual(isLView(value), true, 'Expecting LView');\n }\n function assertFirstCreatePass(tView, errMessage) {\n assertEqual(tView.firstCreatePass, true, errMessage || 'Should only be called in first create pass.');\n }\n function assertFirstUpdatePass(tView, errMessage) {\n assertEqual(tView.firstUpdatePass, true, errMessage || 'Should only be called in first update pass.');\n }\n /**\n * This is a basic sanity check that an object is probably a directive def. DirectiveDef is\n * an interface, so we can't do a direct instanceof check.\n */\n function assertDirectiveDef(obj) {\n if (obj.type === undefined || obj.selectors == undefined || obj.inputs === undefined) {\n throwError(\"Expected a DirectiveDef/ComponentDef and this object does not seem to have the expected shape.\");\n }\n }\n function assertIndexInDeclRange(lView, index) {\n var tView = lView[1];\n assertBetween(HEADER_OFFSET, tView.bindingStartIndex, index);\n }\n function assertIndexInVarsRange(lView, index) {\n var tView = lView[1];\n assertBetween(tView.bindingStartIndex, tView.expandoStartIndex, index);\n }\n function assertIndexInExpandoRange(lView, index) {\n var tView = lView[1];\n assertBetween(tView.expandoStartIndex, lView.length, index);\n }\n function assertBetween(lower, upper, index) {\n if (!(lower <= index && index < upper)) {\n throwError(\"Index out of range (expecting \" + lower + \" <= \" + index + \" < \" + upper + \")\");\n }\n }\n function assertProjectionSlots(lView, errMessage) {\n assertDefined(lView[DECLARATION_COMPONENT_VIEW], 'Component views should exist.');\n assertDefined(lView[DECLARATION_COMPONENT_VIEW][T_HOST].projection, errMessage ||\n 'Components with projection nodes (<ng-content>) must have projection slots defined.');\n }\n function assertParentView(lView, errMessage) {\n assertDefined(lView, errMessage || 'Component views should always have a parent view (component\\'s host view)');\n }\n /**\n * This is a basic sanity check that the `injectorIndex` seems to point to what looks like a\n * NodeInjector data structure.\n *\n * @param lView `LView` which should be checked.\n * @param injectorIndex index into the `LView` where the `NodeInjector` is expected.\n */\n function assertNodeInjector(lView, injectorIndex) {\n assertIndexInExpandoRange(lView, injectorIndex);\n assertIndexInExpandoRange(lView, injectorIndex + 8 /* PARENT */);\n assertNumber(lView[injectorIndex + 0], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 1], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 2], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 3], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 4], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 5], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 6], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 7], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 8 /* PARENT */], 'injectorIndex should point to parent injector');\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 function getFactoryDef(type, throwNotFound) {\n var hasFactoryDef = type.hasOwnProperty(NG_FACTORY_DEF);\n if (!hasFactoryDef && throwNotFound === true && ngDevMode) {\n throw new Error(\"Type \" + stringify(type) + \" does not have '\\u0275fac' property.\");\n }\n return hasFactoryDef ? type[NG_FACTORY_DEF] : null;\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 basic change from a previous to a new value for a single\n * property on a directive instance. Passed as a value in a\n * {@link SimpleChanges} object to the `ngOnChanges` hook.\n *\n * @see `OnChanges`\n *\n * @publicApi\n */\n var SimpleChange = /** @class */ (function () {\n function SimpleChange(previousValue, currentValue, firstChange) {\n this.previousValue = previousValue;\n this.currentValue = currentValue;\n this.firstChange = firstChange;\n }\n /**\n * Check whether the new value is the first value assigned.\n */\n SimpleChange.prototype.isFirstChange = function () {\n return this.firstChange;\n };\n return SimpleChange;\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 NgOnChangesFeature decorates a component with support for the ngOnChanges\n * lifecycle hook, so it should be included in any component that implements\n * that hook.\n *\n * If the component or directive uses inheritance, the NgOnChangesFeature MUST\n * be included as a feature AFTER {@link InheritDefinitionFeature}, otherwise\n * inherited properties will not be propagated to the ngOnChanges lifecycle\n * hook.\n *\n * Example usage:\n *\n * ```\n * static ɵcmp = defineComponent({\n * ...\n * inputs: {name: 'publicName'},\n * features: [NgOnChangesFeature]\n * });\n * ```\n *\n * @codeGenApi\n */\n function ɵɵNgOnChangesFeature() {\n return NgOnChangesFeatureImpl;\n }\n function NgOnChangesFeatureImpl(definition) {\n if (definition.type.prototype.ngOnChanges) {\n definition.setInput = ngOnChangesSetInput;\n }\n return rememberChangeHistoryAndInvokeOnChangesHook;\n }\n // This option ensures that the ngOnChanges lifecycle hook will be inherited\n // from superclasses (in InheritDefinitionFeature).\n /** @nocollapse */\n // tslint:disable-next-line:no-toplevel-property-access\n ɵɵNgOnChangesFeature.ngInherit = true;\n /**\n * This is a synthetic lifecycle hook which gets inserted into `TView.preOrderHooks` to simulate\n * `ngOnChanges`.\n *\n * The hook reads the `NgSimpleChangesStore` data from the component instance and if changes are\n * found it invokes `ngOnChanges` on the component instance.\n *\n * @param this Component instance. Because this function gets inserted into `TView.preOrderHooks`,\n * it is guaranteed to be called with component instance.\n */\n function rememberChangeHistoryAndInvokeOnChangesHook() {\n var simpleChangesStore = getSimpleChangesStore(this);\n var current = simpleChangesStore === null || simpleChangesStore === void 0 ? void 0 : simpleChangesStore.current;\n if (current) {\n var previous = simpleChangesStore.previous;\n if (previous === EMPTY_OBJ) {\n simpleChangesStore.previous = current;\n }\n else {\n // New changes are copied to the previous store, so that we don't lose history for inputs\n // which were not changed this time\n for (var key in current) {\n previous[key] = current[key];\n }\n }\n simpleChangesStore.current = null;\n this.ngOnChanges(current);\n }\n }\n function ngOnChangesSetInput(instance, value, publicName, privateName) {\n var simpleChangesStore = getSimpleChangesStore(instance) ||\n setSimpleChangesStore(instance, { previous: EMPTY_OBJ, current: null });\n var current = simpleChangesStore.current || (simpleChangesStore.current = {});\n var previous = simpleChangesStore.previous;\n var declaredName = this.declaredInputs[publicName];\n var previousChange = previous[declaredName];\n current[declaredName] = new SimpleChange(previousChange && previousChange.currentValue, value, previous === EMPTY_OBJ);\n instance[privateName] = value;\n }\n var SIMPLE_CHANGES_STORE = '__ngSimpleChanges__';\n function getSimpleChangesStore(instance) {\n return instance[SIMPLE_CHANGES_STORE] || null;\n }\n function setSimpleChangesStore(instance, store) {\n return instance[SIMPLE_CHANGES_STORE] = store;\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 var profilerCallback = null;\n /**\n * Sets the callback function which will be invoked before and after performing certain actions at\n * runtime (for example, before and after running change detection).\n *\n * Warning: this function is *INTERNAL* and should not be relied upon in application's code.\n * The contract of the function might be changed in any release and/or the function can be removed\n * completely.\n *\n * @param profiler function provided by the caller or null value to disable profiling.\n */\n var setProfiler = function (profiler) {\n profilerCallback = profiler;\n };\n /**\n * Profiler function which wraps user code executed by the runtime.\n *\n * @param event ProfilerEvent corresponding to the execution context\n * @param instance component instance\n * @param hookOrListener lifecycle hook function or output listener. The value depends on the\n * execution context\n * @returns\n */\n var profiler = function (event, instance, hookOrListener) {\n if (profilerCallback != null /* both `null` and `undefined` */) {\n profilerCallback(event, instance, hookOrListener);\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 var SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\n var MATH_ML_NAMESPACE = 'http://www.w3.org/1998/MathML/';\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 property will be monkey-patched on elements, components and directives\n */\n var MONKEY_PATCH_KEY_NAME = '__ngContext__';\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 * Most of the use of `document` in Angular is from within the DI system so it is possible to simply\n * inject the `DOCUMENT` token and are done.\n *\n * Ivy is special because it does not rely upon the DI and must get hold of the document some other\n * way.\n *\n * The solution is to define `getDocument()` and `setDocument()` top-level functions for ivy.\n * Wherever ivy needs the global document, it calls `getDocument()` instead.\n *\n * When running ivy outside of a browser environment, it is necessary to call `setDocument()` to\n * tell ivy what the global `document` is.\n *\n * Angular does this for us in each of the standard platforms (`Browser`, `Server`, and `WebWorker`)\n * by calling `setDocument()` when providing the `DOCUMENT` token.\n */\n var DOCUMENT = undefined;\n /**\n * Tell ivy what the `document` is for this platform.\n *\n * It is only necessary to call this if the current platform is not a browser.\n *\n * @param document The object representing the global `document` in this environment.\n */\n function setDocument(document) {\n DOCUMENT = document;\n }\n /**\n * Access the object that represents the `document` for this platform.\n *\n * Ivy calls this whenever it needs to access the `document` object.\n * For example to create the renderer or to do sanitization.\n */\n function getDocument() {\n if (DOCUMENT !== undefined) {\n return DOCUMENT;\n }\n else if (typeof document !== 'undefined') {\n return document;\n }\n // No \"document\" can be found. This should only happen if we are running ivy outside Angular and\n // the current platform is not a browser. Since this is not a supported scenario at the moment\n // this should not happen in Angular apps.\n // Once we support running ivy outside of Angular we will need to publish `setDocument()` as a\n // public API. Meanwhile we just return `undefined` and let the application fail.\n return undefined;\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 // TODO: cleanup once the code is merged in angular/angular\n var RendererStyleFlags3;\n (function (RendererStyleFlags3) {\n RendererStyleFlags3[RendererStyleFlags3[\"Important\"] = 1] = \"Important\";\n RendererStyleFlags3[RendererStyleFlags3[\"DashCase\"] = 2] = \"DashCase\";\n })(RendererStyleFlags3 || (RendererStyleFlags3 = {}));\n /** Returns whether the `renderer` is a `ProceduralRenderer3` */\n function isProceduralRenderer(renderer) {\n return !!(renderer.listen);\n }\n var ɵ0 = function (hostElement, rendererType) {\n return getDocument();\n };\n var domRendererFactory3 = {\n createRenderer: ɵ0\n };\n // Note: This hack is necessary so we don't erroneously get a circular dependency\n // failure based on types.\n var unusedValueExportToPlacateAjd$2 = 1;\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 * For efficiency reasons we often put several different data types (`RNode`, `LView`, `LContainer`)\n * in same location in `LView`. This is because we don't want to pre-allocate space for it\n * because the storage is sparse. This file contains utilities for dealing with such data types.\n *\n * How do we know what is stored at a given location in `LView`.\n * - `Array.isArray(value) === false` => `RNode` (The normal storage value)\n * - `Array.isArray(value) === true` => then the `value[0]` represents the wrapped value.\n * - `typeof value[TYPE] === 'object'` => `LView`\n * - This happens when we have a component at a given location\n * - `typeof value[TYPE] === true` => `LContainer`\n * - This happens when we have `LContainer` binding at a given location.\n *\n *\n * NOTE: it is assumed that `Array.isArray` and `typeof` operations are very efficient.\n */\n /**\n * Returns `RNode`.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\n function unwrapRNode(value) {\n while (Array.isArray(value)) {\n value = value[HOST];\n }\n return value;\n }\n /**\n * Returns `LView` or `null` if not found.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\n function unwrapLView(value) {\n while (Array.isArray(value)) {\n // This check is same as `isLView()` but we don't call at as we don't want to call\n // `Array.isArray()` twice and give JITer more work for inlining.\n if (typeof value[TYPE] === 'object')\n return value;\n value = value[HOST];\n }\n return null;\n }\n /**\n * Returns `LContainer` or `null` if not found.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\n function unwrapLContainer(value) {\n while (Array.isArray(value)) {\n // This check is same as `isLContainer()` but we don't call at as we don't want to call\n // `Array.isArray()` twice and give JITer more work for inlining.\n if (value[TYPE] === true)\n return value;\n value = value[HOST];\n }\n return null;\n }\n /**\n * Retrieves an element value from the provided `viewData`, by unwrapping\n * from any containers, component views, or style contexts.\n */\n function getNativeByIndex(index, lView) {\n ngDevMode && assertIndexInRange(lView, index);\n ngDevMode && assertGreaterThanOrEqual(index, HEADER_OFFSET, 'Expected to be past HEADER_OFFSET');\n return unwrapRNode(lView[index]);\n }\n /**\n * Retrieve an `RNode` for a given `TNode` and `LView`.\n *\n * This function guarantees in dev mode to retrieve a non-null `RNode`.\n *\n * @param tNode\n * @param lView\n */\n function getNativeByTNode(tNode, lView) {\n ngDevMode && assertTNodeForLView(tNode, lView);\n ngDevMode && assertIndexInRange(lView, tNode.index);\n var node = unwrapRNode(lView[tNode.index]);\n ngDevMode && !isProceduralRenderer(lView[RENDERER]) && assertDomNode(node);\n return node;\n }\n /**\n * Retrieve an `RNode` or `null` for a given `TNode` and `LView`.\n *\n * Some `TNode`s don't have associated `RNode`s. For example `Projection`\n *\n * @param tNode\n * @param lView\n */\n function getNativeByTNodeOrNull(tNode, lView) {\n var index = tNode === null ? -1 : tNode.index;\n if (index !== -1) {\n ngDevMode && assertTNodeForLView(tNode, lView);\n var node = unwrapRNode(lView[index]);\n ngDevMode && node !== null && !isProceduralRenderer(lView[RENDERER]) && assertDomNode(node);\n return node;\n }\n return null;\n }\n // fixme(misko): The return Type should be `TNode|null`\n function getTNode(tView, index) {\n ngDevMode && assertGreaterThan(index, -1, 'wrong index for TNode');\n ngDevMode && assertLessThan(index, tView.data.length, 'wrong index for TNode');\n var tNode = tView.data[index];\n ngDevMode && tNode !== null && assertTNode(tNode);\n return tNode;\n }\n /** Retrieves a value from any `LView` or `TData`. */\n function load(view, index) {\n ngDevMode && assertIndexInRange(view, index);\n return view[index];\n }\n function getComponentLViewByIndex(nodeIndex, hostView) {\n // Could be an LView or an LContainer. If LContainer, unwrap to find LView.\n ngDevMode && assertIndexInRange(hostView, nodeIndex);\n var slotValue = hostView[nodeIndex];\n var lView = isLView(slotValue) ? slotValue : slotValue[HOST];\n return lView;\n }\n /**\n * Returns the monkey-patch value data present on the target (which could be\n * a component, directive or a DOM node).\n */\n function readPatchedData(target) {\n ngDevMode && assertDefined(target, 'Target expected');\n return target[MONKEY_PATCH_KEY_NAME] || null;\n }\n function readPatchedLView(target) {\n var value = readPatchedData(target);\n if (value) {\n return Array.isArray(value) ? value : value.lView;\n }\n return null;\n }\n /** Checks whether a given view is in creation mode */\n function isCreationMode(view) {\n return (view[FLAGS] & 4 /* CreationMode */) === 4 /* CreationMode */;\n }\n /**\n * Returns a boolean for whether the view is attached to the change detection tree.\n *\n * Note: This determines whether a view should be checked, not whether it's inserted\n * into a container. For that, you'll want `viewAttachedToContainer` below.\n */\n function viewAttachedToChangeDetector(view) {\n return (view[FLAGS] & 128 /* Attached */) === 128 /* Attached */;\n }\n /** Returns a boolean for whether the view is attached to a container. */\n function viewAttachedToContainer(view) {\n return isLContainer(view[PARENT]);\n }\n function getConstant(consts, index) {\n if (index === null || index === undefined)\n return null;\n ngDevMode && assertIndexInRange(consts, index);\n return consts[index];\n }\n /**\n * Resets the pre-order hook flags of the view.\n * @param lView the LView on which the flags are reset\n */\n function resetPreOrderHookFlags(lView) {\n lView[PREORDER_HOOK_FLAGS] = 0;\n }\n /**\n * Updates the `TRANSPLANTED_VIEWS_TO_REFRESH` counter on the `LContainer` as well as the parents\n * whose\n * 1. counter goes from 0 to 1, indicating that there is a new child that has a view to refresh\n * or\n * 2. counter goes from 1 to 0, indicating there are no more descendant views to refresh\n */\n function updateTransplantedViewCount(lContainer, amount) {\n lContainer[TRANSPLANTED_VIEWS_TO_REFRESH] += amount;\n var viewOrContainer = lContainer;\n var parent = lContainer[PARENT];\n while (parent !== null &&\n ((amount === 1 && viewOrContainer[TRANSPLANTED_VIEWS_TO_REFRESH] === 1) ||\n (amount === -1 && viewOrContainer[TRANSPLANTED_VIEWS_TO_REFRESH] === 0))) {\n parent[TRANSPLANTED_VIEWS_TO_REFRESH] += amount;\n viewOrContainer = parent;\n parent = parent[PARENT];\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 var instructionState = {\n lFrame: createLFrame(null),\n bindingsEnabled: true,\n isInCheckNoChangesMode: false,\n };\n /**\n * Returns true if the instruction state stack is empty.\n *\n * Intended to be called from tests only (tree shaken otherwise).\n */\n function specOnlyIsInstructionStateEmpty() {\n return instructionState.lFrame.parent === null;\n }\n function getElementDepthCount() {\n return instructionState.lFrame.elementDepthCount;\n }\n function increaseElementDepthCount() {\n instructionState.lFrame.elementDepthCount++;\n }\n function decreaseElementDepthCount() {\n instructionState.lFrame.elementDepthCount--;\n }\n function getBindingsEnabled() {\n return instructionState.bindingsEnabled;\n }\n /**\n * Enables directive matching on elements.\n *\n * * Example:\n * ```\n * <my-comp my-directive>\n * Should match component / directive.\n * </my-comp>\n * <div ngNonBindable>\n * <!-- ɵɵdisableBindings() -->\n * <my-comp my-directive>\n * Should not match component / directive because we are in ngNonBindable.\n * </my-comp>\n * <!-- ɵɵenableBindings() -->\n * </div>\n * ```\n *\n * @codeGenApi\n */\n function ɵɵenableBindings() {\n instructionState.bindingsEnabled = true;\n }\n /**\n * Disables directive matching on element.\n *\n * * Example:\n * ```\n * <my-comp my-directive>\n * Should match component / directive.\n * </my-comp>\n * <div ngNonBindable>\n * <!-- ɵɵdisableBindings() -->\n * <my-comp my-directive>\n * Should not match component / directive because we are in ngNonBindable.\n * </my-comp>\n * <!-- ɵɵenableBindings() -->\n * </div>\n * ```\n *\n * @codeGenApi\n */\n function ɵɵdisableBindings() {\n instructionState.bindingsEnabled = false;\n }\n /**\n * Return the current `LView`.\n */\n function getLView() {\n return instructionState.lFrame.lView;\n }\n /**\n * Return the current `TView`.\n */\n function getTView() {\n return instructionState.lFrame.tView;\n }\n /**\n * Restores `contextViewData` to the given OpaqueViewState instance.\n *\n * Used in conjunction with the getCurrentView() instruction to save a snapshot\n * of the current view and restore it when listeners are invoked. This allows\n * walking the declaration view tree in listeners to get vars from parent views.\n *\n * @param viewToRestore The OpaqueViewState instance to restore.\n *\n * @codeGenApi\n */\n function ɵɵrestoreView(viewToRestore) {\n instructionState.lFrame.contextLView = viewToRestore;\n }\n function getCurrentTNode() {\n var currentTNode = getCurrentTNodePlaceholderOk();\n while (currentTNode !== null && currentTNode.type === 64 /* Placeholder */) {\n currentTNode = currentTNode.parent;\n }\n return currentTNode;\n }\n function getCurrentTNodePlaceholderOk() {\n return instructionState.lFrame.currentTNode;\n }\n function getCurrentParentTNode() {\n var lFrame = instructionState.lFrame;\n var currentTNode = lFrame.currentTNode;\n return lFrame.isParent ? currentTNode : currentTNode.parent;\n }\n function setCurrentTNode(tNode, isParent) {\n ngDevMode && tNode && assertTNodeForTView(tNode, instructionState.lFrame.tView);\n var lFrame = instructionState.lFrame;\n lFrame.currentTNode = tNode;\n lFrame.isParent = isParent;\n }\n function isCurrentTNodeParent() {\n return instructionState.lFrame.isParent;\n }\n function setCurrentTNodeAsNotParent() {\n instructionState.lFrame.isParent = false;\n }\n function setCurrentTNodeAsParent() {\n instructionState.lFrame.isParent = true;\n }\n function getContextLView() {\n return instructionState.lFrame.contextLView;\n }\n function isInCheckNoChangesMode() {\n // TODO(misko): remove this from the LView since it is ngDevMode=true mode only.\n return instructionState.isInCheckNoChangesMode;\n }\n function setIsInCheckNoChangesMode(mode) {\n instructionState.isInCheckNoChangesMode = mode;\n }\n // top level variables should not be exported for performance reasons (PERF_NOTES.md)\n function getBindingRoot() {\n var lFrame = instructionState.lFrame;\n var index = lFrame.bindingRootIndex;\n if (index === -1) {\n index = lFrame.bindingRootIndex = lFrame.tView.bindingStartIndex;\n }\n return index;\n }\n function getBindingIndex() {\n return instructionState.lFrame.bindingIndex;\n }\n function setBindingIndex(value) {\n return instructionState.lFrame.bindingIndex = value;\n }\n function nextBindingIndex() {\n return instructionState.lFrame.bindingIndex++;\n }\n function incrementBindingIndex(count) {\n var lFrame = instructionState.lFrame;\n var index = lFrame.bindingIndex;\n lFrame.bindingIndex = lFrame.bindingIndex + count;\n return index;\n }\n function isInI18nBlock() {\n return instructionState.lFrame.inI18n;\n }\n function setInI18nBlock(isInI18nBlock) {\n instructionState.lFrame.inI18n = isInI18nBlock;\n }\n /**\n * Set a new binding root index so that host template functions can execute.\n *\n * Bindings inside the host template are 0 index. But because we don't know ahead of time\n * how many host bindings we have we can't pre-compute them. For this reason they are all\n * 0 index and we just shift the root so that they match next available location in the LView.\n *\n * @param bindingRootIndex Root index for `hostBindings`\n * @param currentDirectiveIndex `TData[currentDirectiveIndex]` will point to the current directive\n * whose `hostBindings` are being processed.\n */\n function setBindingRootForHostBindings(bindingRootIndex, currentDirectiveIndex) {\n var lFrame = instructionState.lFrame;\n lFrame.bindingIndex = lFrame.bindingRootIndex = bindingRootIndex;\n setCurrentDirectiveIndex(currentDirectiveIndex);\n }\n /**\n * When host binding is executing this points to the directive index.\n * `TView.data[getCurrentDirectiveIndex()]` is `DirectiveDef`\n * `LView[getCurrentDirectiveIndex()]` is directive instance.\n */\n function getCurrentDirectiveIndex() {\n return instructionState.lFrame.currentDirectiveIndex;\n }\n /**\n * Sets an index of a directive whose `hostBindings` are being processed.\n *\n * @param currentDirectiveIndex `TData` index where current directive instance can be found.\n */\n function setCurrentDirectiveIndex(currentDirectiveIndex) {\n instructionState.lFrame.currentDirectiveIndex = currentDirectiveIndex;\n }\n /**\n * Retrieve the current `DirectiveDef` which is active when `hostBindings` instruction is being\n * executed.\n *\n * @param tData Current `TData` where the `DirectiveDef` will be looked up at.\n */\n function getCurrentDirectiveDef(tData) {\n var currentDirectiveIndex = instructionState.lFrame.currentDirectiveIndex;\n return currentDirectiveIndex === -1 ? null : tData[currentDirectiveIndex];\n }\n function getCurrentQueryIndex() {\n return instructionState.lFrame.currentQueryIndex;\n }\n function setCurrentQueryIndex(value) {\n instructionState.lFrame.currentQueryIndex = value;\n }\n /**\n * Returns a `TNode` of the location where the current `LView` is declared at.\n *\n * @param lView an `LView` that we want to find parent `TNode` for.\n */\n function getDeclarationTNode(lView) {\n var tView = lView[TVIEW];\n // Return the declaration parent for embedded views\n if (tView.type === 2 /* Embedded */) {\n ngDevMode && assertDefined(tView.declTNode, 'Embedded TNodes should have declaration parents.');\n return tView.declTNode;\n }\n // Components don't have `TView.declTNode` because each instance of component could be\n // inserted in different location, hence `TView.declTNode` is meaningless.\n // Falling back to `T_HOST` in case we cross component boundary.\n if (tView.type === 1 /* Component */) {\n return lView[T_HOST];\n }\n // Remaining TNode type is `TViewType.Root` which doesn't have a parent TNode.\n return null;\n }\n /**\n * This is a light weight version of the `enterView` which is needed by the DI system.\n *\n * @param lView `LView` location of the DI context.\n * @param tNode `TNode` for DI context\n * @param flags DI context flags. if `SkipSelf` flag is set than we walk up the declaration\n * tree from `tNode` until we find parent declared `TElementNode`.\n * @returns `true` if we have successfully entered DI associated with `tNode` (or with declared\n * `TNode` if `flags` has `SkipSelf`). Failing to enter DI implies that no associated\n * `NodeInjector` can be found and we should instead use `ModuleInjector`.\n * - If `true` than this call must be fallowed by `leaveDI`\n * - If `false` than this call failed and we should NOT call `leaveDI`\n */\n function enterDI(lView, tNode, flags) {\n ngDevMode && assertLViewOrUndefined(lView);\n if (flags & exports.InjectFlags.SkipSelf) {\n ngDevMode && assertTNodeForTView(tNode, lView[TVIEW]);\n var parentTNode = tNode;\n var parentLView = lView;\n while (true) {\n ngDevMode && assertDefined(parentTNode, 'Parent TNode should be defined');\n parentTNode = parentTNode.parent;\n if (parentTNode === null && !(flags & exports.InjectFlags.Host)) {\n parentTNode = getDeclarationTNode(parentLView);\n if (parentTNode === null)\n break;\n // In this case, a parent exists and is definitely an element. So it will definitely\n // have an existing lView as the declaration view, which is why we can assume it's defined.\n ngDevMode && assertDefined(parentLView, 'Parent LView should be defined');\n parentLView = parentLView[DECLARATION_VIEW];\n // In Ivy there are Comment nodes that correspond to ngIf and NgFor embedded directives\n // We want to skip those and look only at Elements and ElementContainers to ensure\n // we're looking at true parent nodes, and not content or other types.\n if (parentTNode.type & (2 /* Element */ | 8 /* ElementContainer */)) {\n break;\n }\n }\n else {\n break;\n }\n }\n if (parentTNode === null) {\n // If we failed to find a parent TNode this means that we should use module injector.\n return false;\n }\n else {\n tNode = parentTNode;\n lView = parentLView;\n }\n }\n ngDevMode && assertTNodeForLView(tNode, lView);\n var lFrame = instructionState.lFrame = allocLFrame();\n lFrame.currentTNode = tNode;\n lFrame.lView = lView;\n return true;\n }\n /**\n * Swap the current lView with a new lView.\n *\n * For performance reasons we store the lView in the top level of the module.\n * This way we minimize the number of properties to read. Whenever a new view\n * is entered we have to store the lView for later, and when the view is\n * exited the state has to be restored\n *\n * @param newView New lView to become active\n * @returns the previously active lView;\n */\n function enterView(newView) {\n ngDevMode && assertNotEqual(newView[0], newView[1], '????');\n ngDevMode && assertLViewOrUndefined(newView);\n var newLFrame = allocLFrame();\n if (ngDevMode) {\n assertEqual(newLFrame.isParent, true, 'Expected clean LFrame');\n assertEqual(newLFrame.lView, null, 'Expected clean LFrame');\n assertEqual(newLFrame.tView, null, 'Expected clean LFrame');\n assertEqual(newLFrame.selectedIndex, -1, 'Expected clean LFrame');\n assertEqual(newLFrame.elementDepthCount, 0, 'Expected clean LFrame');\n assertEqual(newLFrame.currentDirectiveIndex, -1, 'Expected clean LFrame');\n assertEqual(newLFrame.currentNamespace, null, 'Expected clean LFrame');\n assertEqual(newLFrame.bindingRootIndex, -1, 'Expected clean LFrame');\n assertEqual(newLFrame.currentQueryIndex, 0, 'Expected clean LFrame');\n }\n var tView = newView[TVIEW];\n instructionState.lFrame = newLFrame;\n ngDevMode && tView.firstChild && assertTNodeForTView(tView.firstChild, tView);\n newLFrame.currentTNode = tView.firstChild;\n newLFrame.lView = newView;\n newLFrame.tView = tView;\n newLFrame.contextLView = newView;\n newLFrame.bindingIndex = tView.bindingStartIndex;\n newLFrame.inI18n = false;\n }\n /**\n * Allocates next free LFrame. This function tries to reuse the `LFrame`s to lower memory pressure.\n */\n function allocLFrame() {\n var currentLFrame = instructionState.lFrame;\n var childLFrame = currentLFrame === null ? null : currentLFrame.child;\n var newLFrame = childLFrame === null ? createLFrame(currentLFrame) : childLFrame;\n return newLFrame;\n }\n function createLFrame(parent) {\n var lFrame = {\n currentTNode: null,\n isParent: true,\n lView: null,\n tView: null,\n selectedIndex: -1,\n contextLView: null,\n elementDepthCount: 0,\n currentNamespace: null,\n currentDirectiveIndex: -1,\n bindingRootIndex: -1,\n bindingIndex: -1,\n currentQueryIndex: 0,\n parent: parent,\n child: null,\n inI18n: false,\n };\n parent !== null && (parent.child = lFrame); // link the new LFrame for reuse.\n return lFrame;\n }\n /**\n * A lightweight version of leave which is used with DI.\n *\n * This function only resets `currentTNode` and `LView` as those are the only properties\n * used with DI (`enterDI()`).\n *\n * NOTE: This function is reexported as `leaveDI`. However `leaveDI` has return type of `void` where\n * as `leaveViewLight` has `LFrame`. This is so that `leaveViewLight` can be used in `leaveView`.\n */\n function leaveViewLight() {\n var oldLFrame = instructionState.lFrame;\n instructionState.lFrame = oldLFrame.parent;\n oldLFrame.currentTNode = null;\n oldLFrame.lView = null;\n return oldLFrame;\n }\n /**\n * This is a lightweight version of the `leaveView` which is needed by the DI system.\n *\n * NOTE: this function is an alias so that we can change the type of the function to have `void`\n * return type.\n */\n var leaveDI = leaveViewLight;\n /**\n * Leave the current `LView`\n *\n * This pops the `LFrame` with the associated `LView` from the stack.\n *\n * IMPORTANT: We must zero out the `LFrame` values here otherwise they will be retained. This is\n * because for performance reasons we don't release `LFrame` but rather keep it for next use.\n */\n function leaveView() {\n var oldLFrame = leaveViewLight();\n oldLFrame.isParent = true;\n oldLFrame.tView = null;\n oldLFrame.selectedIndex = -1;\n oldLFrame.contextLView = null;\n oldLFrame.elementDepthCount = 0;\n oldLFrame.currentDirectiveIndex = -1;\n oldLFrame.currentNamespace = null;\n oldLFrame.bindingRootIndex = -1;\n oldLFrame.bindingIndex = -1;\n oldLFrame.currentQueryIndex = 0;\n }\n function nextContextImpl(level) {\n var contextLView = instructionState.lFrame.contextLView =\n walkUpViews(level, instructionState.lFrame.contextLView);\n return contextLView[CONTEXT];\n }\n function walkUpViews(nestingLevel, currentView) {\n while (nestingLevel > 0) {\n ngDevMode &&\n assertDefined(currentView[DECLARATION_VIEW], 'Declaration view should be defined if nesting level is greater than 0.');\n currentView = currentView[DECLARATION_VIEW];\n nestingLevel--;\n }\n return currentView;\n }\n /**\n * Gets the currently selected element index.\n *\n * Used with {@link property} instruction (and more in the future) to identify the index in the\n * current `LView` to act on.\n */\n function getSelectedIndex() {\n return instructionState.lFrame.selectedIndex;\n }\n /**\n * Sets the most recent index passed to {@link select}\n *\n * Used with {@link property} instruction (and more in the future) to identify the index in the\n * current `LView` to act on.\n *\n * (Note that if an \"exit function\" was set earlier (via `setElementExitFn()`) then that will be\n * run if and when the provided `index` value is different from the current selected index value.)\n */\n function setSelectedIndex(index) {\n ngDevMode && index !== -1 &&\n assertGreaterThanOrEqual(index, HEADER_OFFSET, 'Index must be past HEADER_OFFSET (or -1).');\n ngDevMode &&\n assertLessThan(index, instructionState.lFrame.lView.length, 'Can\\'t set index passed end of LView');\n instructionState.lFrame.selectedIndex = index;\n }\n /**\n * Gets the `tNode` that represents currently selected element.\n */\n function getSelectedTNode() {\n var lFrame = instructionState.lFrame;\n return getTNode(lFrame.tView, lFrame.selectedIndex);\n }\n /**\n * Sets the namespace used to create elements to `'http://www.w3.org/2000/svg'` in global state.\n *\n * @codeGenApi\n */\n function ɵɵnamespaceSVG() {\n instructionState.lFrame.currentNamespace = SVG_NAMESPACE;\n }\n /**\n * Sets the namespace used to create elements to `'http://www.w3.org/1998/MathML/'` in global state.\n *\n * @codeGenApi\n */\n function ɵɵnamespaceMathML() {\n instructionState.lFrame.currentNamespace = MATH_ML_NAMESPACE;\n }\n /**\n * Sets the namespace used to create elements to `null`, which forces element creation to use\n * `createElement` rather than `createElementNS`.\n *\n * @codeGenApi\n */\n function ɵɵnamespaceHTML() {\n namespaceHTMLInternal();\n }\n /**\n * Sets the namespace used to create elements to `null`, which forces element creation to use\n * `createElement` rather than `createElementNS`.\n */\n function namespaceHTMLInternal() {\n instructionState.lFrame.currentNamespace = null;\n }\n function getNamespace() {\n return instructionState.lFrame.currentNamespace;\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 * Adds all directive lifecycle hooks from the given `DirectiveDef` to the given `TView`.\n *\n * Must be run *only* on the first template pass.\n *\n * Sets up the pre-order hooks on the provided `tView`,\n * see {@link HookData} for details about the data structure.\n *\n * @param directiveIndex The index of the directive in LView\n * @param directiveDef The definition containing the hooks to setup in tView\n * @param tView The current TView\n */\n function registerPreOrderHooks(directiveIndex, directiveDef, tView) {\n ngDevMode && assertFirstCreatePass(tView);\n var _a = directiveDef.type.prototype, ngOnChanges = _a.ngOnChanges, ngOnInit = _a.ngOnInit, ngDoCheck = _a.ngDoCheck;\n if (ngOnChanges) {\n var wrappedOnChanges = NgOnChangesFeatureImpl(directiveDef);\n (tView.preOrderHooks || (tView.preOrderHooks = [])).push(directiveIndex, wrappedOnChanges);\n (tView.preOrderCheckHooks || (tView.preOrderCheckHooks = []))\n .push(directiveIndex, wrappedOnChanges);\n }\n if (ngOnInit) {\n (tView.preOrderHooks || (tView.preOrderHooks = [])).push(0 - directiveIndex, ngOnInit);\n }\n if (ngDoCheck) {\n (tView.preOrderHooks || (tView.preOrderHooks = [])).push(directiveIndex, ngDoCheck);\n (tView.preOrderCheckHooks || (tView.preOrderCheckHooks = [])).push(directiveIndex, ngDoCheck);\n }\n }\n /**\n *\n * Loops through the directives on the provided `tNode` and queues hooks to be\n * run that are not initialization hooks.\n *\n * Should be executed during `elementEnd()` and similar to\n * preserve hook execution order. Content, view, and destroy hooks for projected\n * components and directives must be called *before* their hosts.\n *\n * Sets up the content, view, and destroy hooks on the provided `tView`,\n * see {@link HookData} for details about the data structure.\n *\n * NOTE: This does not set up `onChanges`, `onInit` or `doCheck`, those are set up\n * separately at `elementStart`.\n *\n * @param tView The current TView\n * @param tNode The TNode whose directives are to be searched for hooks to queue\n */\n function registerPostOrderHooks(tView, tNode) {\n ngDevMode && assertFirstCreatePass(tView);\n // It's necessary to loop through the directives at elementEnd() (rather than processing in\n // directiveCreate) so we can preserve the current hook order. Content, view, and destroy\n // hooks for projected components and directives must be called *before* their hosts.\n for (var i = tNode.directiveStart, end = tNode.directiveEnd; i < end; i++) {\n var directiveDef = tView.data[i];\n ngDevMode && assertDefined(directiveDef, 'Expecting DirectiveDef');\n var lifecycleHooks = directiveDef.type.prototype;\n var ngAfterContentInit = lifecycleHooks.ngAfterContentInit, ngAfterContentChecked = lifecycleHooks.ngAfterContentChecked, ngAfterViewInit = lifecycleHooks.ngAfterViewInit, ngAfterViewChecked = lifecycleHooks.ngAfterViewChecked, ngOnDestroy = lifecycleHooks.ngOnDestroy;\n if (ngAfterContentInit) {\n (tView.contentHooks || (tView.contentHooks = [])).push(-i, ngAfterContentInit);\n }\n if (ngAfterContentChecked) {\n (tView.contentHooks || (tView.contentHooks = [])).push(i, ngAfterContentChecked);\n (tView.contentCheckHooks || (tView.contentCheckHooks = [])).push(i, ngAfterContentChecked);\n }\n if (ngAfterViewInit) {\n (tView.viewHooks || (tView.viewHooks = [])).push(-i, ngAfterViewInit);\n }\n if (ngAfterViewChecked) {\n (tView.viewHooks || (tView.viewHooks = [])).push(i, ngAfterViewChecked);\n (tView.viewCheckHooks || (tView.viewCheckHooks = [])).push(i, ngAfterViewChecked);\n }\n if (ngOnDestroy != null) {\n (tView.destroyHooks || (tView.destroyHooks = [])).push(i, ngOnDestroy);\n }\n }\n }\n /**\n * Executing hooks requires complex logic as we need to deal with 2 constraints.\n *\n * 1. Init hooks (ngOnInit, ngAfterContentInit, ngAfterViewInit) must all be executed once and only\n * once, across many change detection cycles. This must be true even if some hooks throw, or if\n * some recursively trigger a change detection cycle.\n * To solve that, it is required to track the state of the execution of these init hooks.\n * This is done by storing and maintaining flags in the view: the {@link InitPhaseState},\n * and the index within that phase. They can be seen as a cursor in the following structure:\n * [[onInit1, onInit2], [afterContentInit1], [afterViewInit1, afterViewInit2, afterViewInit3]]\n * They are are stored as flags in LView[FLAGS].\n *\n * 2. Pre-order hooks can be executed in batches, because of the select instruction.\n * To be able to pause and resume their execution, we also need some state about the hook's array\n * that is being processed:\n * - the index of the next hook to be executed\n * - the number of init hooks already found in the processed part of the array\n * They are are stored as flags in LView[PREORDER_HOOK_FLAGS].\n */\n /**\n * Executes pre-order check hooks ( OnChanges, DoChanges) given a view where all the init hooks were\n * executed once. This is a light version of executeInitAndCheckPreOrderHooks where we can skip read\n * / write of the init-hooks related flags.\n * @param lView The LView where hooks are defined\n * @param hooks Hooks to be run\n * @param nodeIndex 3 cases depending on the value:\n * - undefined: all hooks from the array should be executed (post-order case)\n * - null: execute hooks only from the saved index until the end of the array (pre-order case, when\n * flushing the remaining hooks)\n * - number: execute hooks only from the saved index until that node index exclusive (pre-order\n * case, when executing select(number))\n */\n function executeCheckHooks(lView, hooks, nodeIndex) {\n callHooks(lView, hooks, 3 /* InitPhaseCompleted */, nodeIndex);\n }\n /**\n * Executes post-order init and check hooks (one of AfterContentInit, AfterContentChecked,\n * AfterViewInit, AfterViewChecked) given a view where there are pending init hooks to be executed.\n * @param lView The LView where hooks are defined\n * @param hooks Hooks to be run\n * @param initPhase A phase for which hooks should be run\n * @param nodeIndex 3 cases depending on the value:\n * - undefined: all hooks from the array should be executed (post-order case)\n * - null: execute hooks only from the saved index until the end of the array (pre-order case, when\n * flushing the remaining hooks)\n * - number: execute hooks only from the saved index until that node index exclusive (pre-order\n * case, when executing select(number))\n */\n function executeInitAndCheckHooks(lView, hooks, initPhase, nodeIndex) {\n ngDevMode &&\n assertNotEqual(initPhase, 3 /* InitPhaseCompleted */, 'Init pre-order hooks should not be called more than once');\n if ((lView[FLAGS] & 3 /* InitPhaseStateMask */) === initPhase) {\n callHooks(lView, hooks, initPhase, nodeIndex);\n }\n }\n function incrementInitPhaseFlags(lView, initPhase) {\n ngDevMode &&\n assertNotEqual(initPhase, 3 /* InitPhaseCompleted */, 'Init hooks phase should not be incremented after all init hooks have been run.');\n var flags = lView[FLAGS];\n if ((flags & 3 /* InitPhaseStateMask */) === initPhase) {\n flags &= 2047 /* IndexWithinInitPhaseReset */;\n flags += 1 /* InitPhaseStateIncrementer */;\n lView[FLAGS] = flags;\n }\n }\n /**\n * Calls lifecycle hooks with their contexts, skipping init hooks if it's not\n * the first LView pass\n *\n * @param currentView The current view\n * @param arr The array in which the hooks are found\n * @param initPhaseState the current state of the init phase\n * @param currentNodeIndex 3 cases depending on the value:\n * - undefined: all hooks from the array should be executed (post-order case)\n * - null: execute hooks only from the saved index until the end of the array (pre-order case, when\n * flushing the remaining hooks)\n * - number: execute hooks only from the saved index until that node index exclusive (pre-order\n * case, when executing select(number))\n */\n function callHooks(currentView, arr, initPhase, currentNodeIndex) {\n ngDevMode &&\n assertEqual(isInCheckNoChangesMode(), false, 'Hooks should never be run when in check no changes mode.');\n var startIndex = currentNodeIndex !== undefined ?\n (currentView[PREORDER_HOOK_FLAGS] & 65535 /* IndexOfTheNextPreOrderHookMaskMask */) :\n 0;\n var nodeIndexLimit = currentNodeIndex != null ? currentNodeIndex : -1;\n var max = arr.length - 1; // Stop the loop at length - 1, because we look for the hook at i + 1\n var lastNodeIndexFound = 0;\n for (var i = startIndex; i < max; i++) {\n var hook = arr[i + 1];\n if (typeof hook === 'number') {\n lastNodeIndexFound = arr[i];\n if (currentNodeIndex != null && lastNodeIndexFound >= currentNodeIndex) {\n break;\n }\n }\n else {\n var isInitHook = arr[i] < 0;\n if (isInitHook)\n currentView[PREORDER_HOOK_FLAGS] += 65536 /* NumberOfInitHooksCalledIncrementer */;\n if (lastNodeIndexFound < nodeIndexLimit || nodeIndexLimit == -1) {\n callHook(currentView, initPhase, arr, i);\n currentView[PREORDER_HOOK_FLAGS] =\n (currentView[PREORDER_HOOK_FLAGS] & 4294901760 /* NumberOfInitHooksCalledMask */) + i +\n 2;\n }\n i++;\n }\n }\n }\n /**\n * Execute one hook against the current `LView`.\n *\n * @param currentView The current view\n * @param initPhaseState the current state of the init phase\n * @param arr The array in which the hooks are found\n * @param i The current index within the hook data array\n */\n function callHook(currentView, initPhase, arr, i) {\n var isInitHook = arr[i] < 0;\n var hook = arr[i + 1];\n var directiveIndex = isInitHook ? -arr[i] : arr[i];\n var directive = currentView[directiveIndex];\n if (isInitHook) {\n var indexWithintInitPhase = currentView[FLAGS] >> 11 /* IndexWithinInitPhaseShift */;\n // The init phase state must be always checked here as it may have been recursively updated.\n if (indexWithintInitPhase <\n (currentView[PREORDER_HOOK_FLAGS] >> 16 /* NumberOfInitHooksCalledShift */) &&\n (currentView[FLAGS] & 3 /* InitPhaseStateMask */) === initPhase) {\n currentView[FLAGS] += 2048 /* IndexWithinInitPhaseIncrementer */;\n profiler(4 /* LifecycleHookStart */, directive, hook);\n try {\n hook.call(directive);\n }\n finally {\n profiler(5 /* LifecycleHookEnd */, directive, hook);\n }\n }\n }\n else {\n profiler(4 /* LifecycleHookStart */, directive, hook);\n try {\n hook.call(directive);\n }\n finally {\n profiler(5 /* LifecycleHookEnd */, directive, hook);\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 var NO_PARENT_INJECTOR = -1;\n /**\n * Each injector is saved in 9 contiguous slots in `LView` and 9 contiguous slots in\n * `TView.data`. This allows us to store information about the current node's tokens (which\n * can be shared in `TView`) as well as the tokens of its ancestor nodes (which cannot be\n * shared, so they live in `LView`).\n *\n * Each of these slots (aside from the last slot) contains a bloom filter. This bloom filter\n * determines whether a directive is available on the associated node or not. This prevents us\n * from searching the directives array at this level unless it's probable the directive is in it.\n *\n * See: https://en.wikipedia.org/wiki/Bloom_filter for more about bloom filters.\n *\n * Because all injectors have been flattened into `LView` and `TViewData`, they cannot typed\n * using interfaces as they were previously. The start index of each `LInjector` and `TInjector`\n * will differ based on where it is flattened into the main array, so it's not possible to know\n * the indices ahead of time and save their types here. The interfaces are still included here\n * for documentation purposes.\n *\n * export interface LInjector extends Array<any> {\n *\n * // Cumulative bloom for directive IDs 0-31 (IDs are % BLOOM_SIZE)\n * [0]: number;\n *\n * // Cumulative bloom for directive IDs 32-63\n * [1]: number;\n *\n * // Cumulative bloom for directive IDs 64-95\n * [2]: number;\n *\n * // Cumulative bloom for directive IDs 96-127\n * [3]: number;\n *\n * // Cumulative bloom for directive IDs 128-159\n * [4]: number;\n *\n * // Cumulative bloom for directive IDs 160 - 191\n * [5]: number;\n *\n * // Cumulative bloom for directive IDs 192 - 223\n * [6]: number;\n *\n * // Cumulative bloom for directive IDs 224 - 255\n * [7]: number;\n *\n * // We need to store a reference to the injector's parent so DI can keep looking up\n * // the injector tree until it finds the dependency it's looking for.\n * [PARENT_INJECTOR]: number;\n * }\n *\n * export interface TInjector extends Array<any> {\n *\n * // Shared node bloom for directive IDs 0-31 (IDs are % BLOOM_SIZE)\n * [0]: number;\n *\n * // Shared node bloom for directive IDs 32-63\n * [1]: number;\n *\n * // Shared node bloom for directive IDs 64-95\n * [2]: number;\n *\n * // Shared node bloom for directive IDs 96-127\n * [3]: number;\n *\n * // Shared node bloom for directive IDs 128-159\n * [4]: number;\n *\n * // Shared node bloom for directive IDs 160 - 191\n * [5]: number;\n *\n * // Shared node bloom for directive IDs 192 - 223\n * [6]: number;\n *\n * // Shared node bloom for directive IDs 224 - 255\n * [7]: number;\n *\n * // Necessary to find directive indices for a particular node.\n * [TNODE]: TElementNode|TElementContainerNode|TContainerNode;\n * }\n */\n /**\n * Factory for creating instances of injectors in the NodeInjector.\n *\n * This factory is complicated by the fact that it can resolve `multi` factories as well.\n *\n * NOTE: Some of the fields are optional which means that this class has two hidden classes.\n * - One without `multi` support (most common)\n * - One with `multi` values, (rare).\n *\n * Since VMs can cache up to 4 inline hidden classes this is OK.\n *\n * - Single factory: Only `resolving` and `factory` is defined.\n * - `providers` factory: `componentProviders` is a number and `index = -1`.\n * - `viewProviders` factory: `componentProviders` is a number and `index` points to `providers`.\n */\n var NodeInjectorFactory = /** @class */ (function () {\n function NodeInjectorFactory(\n /**\n * Factory to invoke in order to create a new instance.\n */\n factory, \n /**\n * Set to `true` if the token is declared in `viewProviders` (or if it is component).\n */\n isViewProvider, injectImplementation) {\n this.factory = factory;\n /**\n * Marker set to true during factory invocation to see if we get into recursive loop.\n * Recursive loop causes an error to be displayed.\n */\n this.resolving = false;\n ngDevMode && assertDefined(factory, 'Factory not specified');\n ngDevMode && assertEqual(typeof factory, 'function', 'Expected factory function.');\n this.canSeeViewProviders = isViewProvider;\n this.injectImpl = injectImplementation;\n }\n return NodeInjectorFactory;\n }());\n function isFactory(obj) {\n return obj instanceof NodeInjectorFactory;\n }\n // Note: This hack is necessary so we don't erroneously get a circular dependency\n // failure based on types.\n var unusedValueExportToPlacateAjd$3 = 1;\n\n /**\n * Converts `TNodeType` into human readable text.\n * Make sure this matches with `TNodeType`\n */\n function toTNodeTypeAsString(tNodeType) {\n var text = '';\n (tNodeType & 1 /* Text */) && (text += '|Text');\n (tNodeType & 2 /* Element */) && (text += '|Element');\n (tNodeType & 4 /* Container */) && (text += '|Container');\n (tNodeType & 8 /* ElementContainer */) && (text += '|ElementContainer');\n (tNodeType & 16 /* Projection */) && (text += '|Projection');\n (tNodeType & 32 /* Icu */) && (text += '|IcuContainer');\n (tNodeType & 64 /* Placeholder */) && (text += '|Placeholder');\n return text.length > 0 ? text.substring(1) : text;\n }\n // Note: This hack is necessary so we don't erroneously get a circular dependency\n // failure based on types.\n var unusedValueExportToPlacateAjd$4 = 1;\n /**\n * Returns `true` if the `TNode` has a directive which has `@Input()` for `class` binding.\n *\n * ```\n * <div my-dir [class]=\"exp\"></div>\n * ```\n * and\n * ```\n * @Directive({\n * })\n * class MyDirective {\n * @Input()\n * class: string;\n * }\n * ```\n *\n * In the above case it is necessary to write the reconciled styling information into the\n * directive's input.\n *\n * @param tNode\n */\n function hasClassInput(tNode) {\n return (tNode.flags & 16 /* hasClassInput */) !== 0;\n }\n /**\n * Returns `true` if the `TNode` has a directive which has `@Input()` for `style` binding.\n *\n * ```\n * <div my-dir [style]=\"exp\"></div>\n * ```\n * and\n * ```\n * @Directive({\n * })\n * class MyDirective {\n * @Input()\n * class: string;\n * }\n * ```\n *\n * In the above case it is necessary to write the reconciled styling information into the\n * directive's input.\n *\n * @param tNode\n */\n function hasStyleInput(tNode) {\n return (tNode.flags & 32 /* hasStyleInput */) !== 0;\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 function assertTNodeType(tNode, expectedTypes, message) {\n assertDefined(tNode, 'should be called with a TNode');\n if ((tNode.type & expectedTypes) === 0) {\n throwError(message ||\n \"Expected [\" + toTNodeTypeAsString(expectedTypes) + \"] but got \" + toTNodeTypeAsString(tNode.type) + \".\");\n }\n }\n function assertPureTNodeType(type) {\n if (!(type === 2 /* Element */ || //\n type === 1 /* Text */ || //\n type === 4 /* Container */ || //\n type === 8 /* ElementContainer */ || //\n type === 32 /* Icu */ || //\n type === 16 /* Projection */ || //\n type === 64 /* Placeholder */)) {\n throwError(\"Expected TNodeType to have only a single type selected, but got \" + toTNodeTypeAsString(type) + \".\");\n }\n }\n\n /**\n * Assigns all attribute values to the provided element via the inferred renderer.\n *\n * This function accepts two forms of attribute entries:\n *\n * default: (key, value):\n * attrs = [key1, value1, key2, value2]\n *\n * namespaced: (NAMESPACE_MARKER, uri, name, value)\n * attrs = [NAMESPACE_MARKER, uri, name, value, NAMESPACE_MARKER, uri, name, value]\n *\n * The `attrs` array can contain a mix of both the default and namespaced entries.\n * The \"default\" values are set without a marker, but if the function comes across\n * a marker value then it will attempt to set a namespaced value. If the marker is\n * not of a namespaced value then the function will quit and return the index value\n * where it stopped during the iteration of the attrs array.\n *\n * See [AttributeMarker] to understand what the namespace marker value is.\n *\n * Note that this instruction does not support assigning style and class values to\n * an element. See `elementStart` and `elementHostAttrs` to learn how styling values\n * are applied to an element.\n * @param renderer The renderer to be used\n * @param native The element that the attributes will be assigned to\n * @param attrs The attribute array of values that will be assigned to the element\n * @returns the index value that was last accessed in the attributes array\n */\n function setUpAttributes(renderer, native, attrs) {\n var isProc = isProceduralRenderer(renderer);\n var i = 0;\n while (i < attrs.length) {\n var value = attrs[i];\n if (typeof value === 'number') {\n // only namespaces are supported. Other value types (such as style/class\n // entries) are not supported in this function.\n if (value !== 0 /* NamespaceURI */) {\n break;\n }\n // we just landed on the marker value ... therefore\n // we should skip to the next entry\n i++;\n var namespaceURI = attrs[i++];\n var attrName = attrs[i++];\n var attrVal = attrs[i++];\n ngDevMode && ngDevMode.rendererSetAttribute++;\n isProc ?\n renderer.setAttribute(native, attrName, attrVal, namespaceURI) :\n native.setAttributeNS(namespaceURI, attrName, attrVal);\n }\n else {\n // attrName is string;\n var attrName = value;\n var attrVal = attrs[++i];\n // Standard attributes\n ngDevMode && ngDevMode.rendererSetAttribute++;\n if (isAnimationProp(attrName)) {\n if (isProc) {\n renderer.setProperty(native, attrName, attrVal);\n }\n }\n else {\n isProc ?\n renderer.setAttribute(native, attrName, attrVal) :\n native.setAttribute(attrName, attrVal);\n }\n i++;\n }\n }\n // another piece of code may iterate over the same attributes array. Therefore\n // it may be helpful to return the exact spot where the attributes array exited\n // whether by running into an unsupported marker or if all the static values were\n // iterated over.\n return i;\n }\n /**\n * Test whether the given value is a marker that indicates that the following\n * attribute values in a `TAttributes` array are only the names of attributes,\n * and not name-value pairs.\n * @param marker The attribute marker to test.\n * @returns true if the marker is a \"name-only\" marker (e.g. `Bindings`, `Template` or `I18n`).\n */\n function isNameOnlyAttributeMarker(marker) {\n return marker === 3 /* Bindings */ || marker === 4 /* Template */ ||\n marker === 6 /* I18n */;\n }\n function isAnimationProp(name) {\n // Perf note: accessing charCodeAt to check for the first character of a string is faster as\n // compared to accessing a character at index 0 (ex. name[0]). The main reason for this is that\n // charCodeAt doesn't allocate memory to return a substring.\n return name.charCodeAt(0) === 64 /* AT_SIGN */;\n }\n /**\n * Merges `src` `TAttributes` into `dst` `TAttributes` removing any duplicates in the process.\n *\n * This merge function keeps the order of attrs same.\n *\n * @param dst Location of where the merged `TAttributes` should end up.\n * @param src `TAttributes` which should be appended to `dst`\n */\n function mergeHostAttrs(dst, src) {\n if (src === null || src.length === 0) {\n // do nothing\n }\n else if (dst === null || dst.length === 0) {\n // We have source, but dst is empty, just make a copy.\n dst = src.slice();\n }\n else {\n var srcMarker = -1 /* ImplicitAttributes */;\n for (var i = 0; i < src.length; i++) {\n var item = src[i];\n if (typeof item === 'number') {\n srcMarker = item;\n }\n else {\n if (srcMarker === 0 /* NamespaceURI */) {\n // Case where we need to consume `key1`, `key2`, `value` items.\n }\n else if (srcMarker === -1 /* ImplicitAttributes */ ||\n srcMarker === 2 /* Styles */) {\n // Case where we have to consume `key1` and `value` only.\n mergeHostAttribute(dst, srcMarker, item, null, src[++i]);\n }\n else {\n // Case where we have to consume `key1` only.\n mergeHostAttribute(dst, srcMarker, item, null, null);\n }\n }\n }\n }\n return dst;\n }\n /**\n * Append `key`/`value` to existing `TAttributes` taking region marker and duplicates into account.\n *\n * @param dst `TAttributes` to append to.\n * @param marker Region where the `key`/`value` should be added.\n * @param key1 Key to add to `TAttributes`\n * @param key2 Key to add to `TAttributes` (in case of `AttributeMarker.NamespaceURI`)\n * @param value Value to add or to overwrite to `TAttributes` Only used if `marker` is not Class.\n */\n function mergeHostAttribute(dst, marker, key1, key2, value) {\n var i = 0;\n // Assume that new markers will be inserted at the end.\n var markerInsertPosition = dst.length;\n // scan until correct type.\n if (marker === -1 /* ImplicitAttributes */) {\n markerInsertPosition = -1;\n }\n else {\n while (i < dst.length) {\n var dstValue = dst[i++];\n if (typeof dstValue === 'number') {\n if (dstValue === marker) {\n markerInsertPosition = -1;\n break;\n }\n else if (dstValue > marker) {\n // We need to save this as we want the markers to be inserted in specific order.\n markerInsertPosition = i - 1;\n break;\n }\n }\n }\n }\n // search until you find place of insertion\n while (i < dst.length) {\n var item = dst[i];\n if (typeof item === 'number') {\n // since `i` started as the index after the marker, we did not find it if we are at the next\n // marker\n break;\n }\n else if (item === key1) {\n // We already have same token\n if (key2 === null) {\n if (value !== null) {\n dst[i + 1] = value;\n }\n return;\n }\n else if (key2 === dst[i + 1]) {\n dst[i + 2] = value;\n return;\n }\n }\n // Increment counter.\n i++;\n if (key2 !== null)\n i++;\n if (value !== null)\n i++;\n }\n // insert at location.\n if (markerInsertPosition !== -1) {\n dst.splice(markerInsertPosition, 0, marker);\n i = markerInsertPosition + 1;\n }\n dst.splice(i++, 0, key1);\n if (key2 !== null) {\n dst.splice(i++, 0, key2);\n }\n if (value !== null) {\n dst.splice(i++, 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 */\n /// Parent Injector Utils ///////////////////////////////////////////////////////////////\n function hasParentInjector(parentLocation) {\n return parentLocation !== NO_PARENT_INJECTOR;\n }\n function getParentInjectorIndex(parentLocation) {\n ngDevMode && assertNumber(parentLocation, 'Number expected');\n ngDevMode && assertNotEqual(parentLocation, -1, 'Not a valid state.');\n var parentInjectorIndex = parentLocation & 32767 /* InjectorIndexMask */;\n ngDevMode &&\n assertGreaterThan(parentInjectorIndex, HEADER_OFFSET, 'Parent injector must be pointing past HEADER_OFFSET.');\n return parentLocation & 32767 /* InjectorIndexMask */;\n }\n function getParentInjectorViewOffset(parentLocation) {\n return parentLocation >> 16 /* ViewOffsetShift */;\n }\n /**\n * Unwraps a parent injector location number to find the view offset from the current injector,\n * then walks up the declaration view tree until the view is found that contains the parent\n * injector.\n *\n * @param location The location of the parent injector, which contains the view offset\n * @param startView The LView instance from which to start walking up the view tree\n * @returns The LView instance that contains the parent injector\n */\n function getParentInjectorView(location, startView) {\n var viewOffset = getParentInjectorViewOffset(location);\n var parentView = startView;\n // For most cases, the parent injector can be found on the host node (e.g. for component\n // or container), but we must keep the loop here to support the rarer case of deeply nested\n // <ng-template> tags or inline views, where the parent injector might live many views\n // above the child injector.\n while (viewOffset > 0) {\n parentView = parentView[DECLARATION_VIEW];\n viewOffset--;\n }\n return parentView;\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 * Defines if the call to `inject` should include `viewProviders` in its resolution.\n *\n * This is set to true when we try to instantiate a component. This value is reset in\n * `getNodeInjectable` to a value which matches the declaration location of the token about to be\n * instantiated. This is done so that if we are injecting a token which was declared outside of\n * `viewProviders` we don't accidentally pull `viewProviders` in.\n *\n * Example:\n *\n * ```\n * @Injectable()\n * class MyService {\n * constructor(public value: String) {}\n * }\n *\n * @Component({\n * providers: [\n * MyService,\n * {provide: String, value: 'providers' }\n * ]\n * viewProviders: [\n * {provide: String, value: 'viewProviders'}\n * ]\n * })\n * class MyComponent {\n * constructor(myService: MyService, value: String) {\n * // We expect that Component can see into `viewProviders`.\n * expect(value).toEqual('viewProviders');\n * // `MyService` was not declared in `viewProviders` hence it can't see it.\n * expect(myService.value).toEqual('providers');\n * }\n * }\n *\n * ```\n */\n var includeViewProviders = true;\n function setIncludeViewProviders(v) {\n var oldValue = includeViewProviders;\n includeViewProviders = v;\n return oldValue;\n }\n /**\n * The number of slots in each bloom filter (used by DI). The larger this number, the fewer\n * directives that will share slots, and thus, the fewer false positives when checking for\n * the existence of a directive.\n */\n var BLOOM_SIZE = 256;\n var BLOOM_MASK = BLOOM_SIZE - 1;\n /**\n * The number of bits that is represented by a single bloom bucket. JS bit operations are 32 bits,\n * so each bucket represents 32 distinct tokens which accounts for log2(32) = 5 bits of a bloom hash\n * number.\n */\n var BLOOM_BUCKET_BITS = 5;\n /** Counter used to generate unique IDs for directives. */\n var nextNgElementId = 0;\n /**\n * Registers this directive as present in its node's injector by flipping the directive's\n * corresponding bit in the injector's bloom filter.\n *\n * @param injectorIndex The index of the node injector where this token should be registered\n * @param tView The TView for the injector's bloom filters\n * @param type The directive token to register\n */\n function bloomAdd(injectorIndex, tView, type) {\n ngDevMode && assertEqual(tView.firstCreatePass, true, 'expected firstCreatePass to be true');\n var id;\n if (typeof type === 'string') {\n id = type.charCodeAt(0) || 0;\n }\n else if (type.hasOwnProperty(NG_ELEMENT_ID)) {\n id = type[NG_ELEMENT_ID];\n }\n // Set a unique ID on the directive type, so if something tries to inject the directive,\n // we can easily retrieve the ID and hash it into the bloom bit that should be checked.\n if (id == null) {\n id = type[NG_ELEMENT_ID] = nextNgElementId++;\n }\n // We only have BLOOM_SIZE (256) slots in our bloom filter (8 buckets * 32 bits each),\n // so all unique IDs must be modulo-ed into a number from 0 - 255 to fit into the filter.\n var bloomHash = id & BLOOM_MASK;\n // Create a mask that targets the specific bit associated with the directive.\n // JS bit operations are 32 bits, so this will be a number between 2^0 and 2^31, corresponding\n // to bit positions 0 - 31 in a 32 bit integer.\n var mask = 1 << bloomHash;\n // Each bloom bucket in `tData` represents `BLOOM_BUCKET_BITS` number of bits of `bloomHash`.\n // Any bits in `bloomHash` beyond `BLOOM_BUCKET_BITS` indicate the bucket offset that the mask\n // should be written to.\n tView.data[injectorIndex + (bloomHash >> BLOOM_BUCKET_BITS)] |= mask;\n }\n /**\n * Creates (or gets an existing) injector for a given element or container.\n *\n * @param tNode for which an injector should be retrieved / created.\n * @param lView View where the node is stored\n * @returns Node injector\n */\n function getOrCreateNodeInjectorForNode(tNode, lView) {\n var existingInjectorIndex = getInjectorIndex(tNode, lView);\n if (existingInjectorIndex !== -1) {\n return existingInjectorIndex;\n }\n var tView = lView[TVIEW];\n if (tView.firstCreatePass) {\n tNode.injectorIndex = lView.length;\n insertBloom(tView.data, tNode); // foundation for node bloom\n insertBloom(lView, null); // foundation for cumulative bloom\n insertBloom(tView.blueprint, null);\n }\n var parentLoc = getParentInjectorLocation(tNode, lView);\n var injectorIndex = tNode.injectorIndex;\n // If a parent injector can't be found, its location is set to -1.\n // In that case, we don't need to set up a cumulative bloom\n if (hasParentInjector(parentLoc)) {\n var parentIndex = getParentInjectorIndex(parentLoc);\n var parentLView = getParentInjectorView(parentLoc, lView);\n var parentData = parentLView[TVIEW].data;\n // Creates a cumulative bloom filter that merges the parent's bloom filter\n // and its own cumulative bloom (which contains tokens for all ancestors)\n for (var i = 0; i < 8 /* BLOOM_SIZE */; i++) {\n lView[injectorIndex + i] = parentLView[parentIndex + i] | parentData[parentIndex + i];\n }\n }\n lView[injectorIndex + 8 /* PARENT */] = parentLoc;\n return injectorIndex;\n }\n function insertBloom(arr, footer) {\n arr.push(0, 0, 0, 0, 0, 0, 0, 0, footer);\n }\n function getInjectorIndex(tNode, lView) {\n if (tNode.injectorIndex === -1 ||\n // If the injector index is the same as its parent's injector index, then the index has been\n // copied down from the parent node. No injector has been created yet on this node.\n (tNode.parent && tNode.parent.injectorIndex === tNode.injectorIndex) ||\n // After the first template pass, the injector index might exist but the parent values\n // might not have been calculated yet for this instance\n lView[tNode.injectorIndex + 8 /* PARENT */] === null) {\n return -1;\n }\n else {\n ngDevMode && assertIndexInRange(lView, tNode.injectorIndex);\n return tNode.injectorIndex;\n }\n }\n /**\n * Finds the index of the parent injector, with a view offset if applicable. Used to set the\n * parent injector initially.\n *\n * @returns Returns a number that is the combination of the number of LViews that we have to go up\n * to find the LView containing the parent inject AND the index of the injector within that LView.\n */\n function getParentInjectorLocation(tNode, lView) {\n if (tNode.parent && tNode.parent.injectorIndex !== -1) {\n // If we have a parent `TNode` and there is an injector associated with it we are done, because\n // the parent injector is within the current `LView`.\n return tNode.parent.injectorIndex; // ViewOffset is 0\n }\n // When parent injector location is computed it may be outside of the current view. (ie it could\n // be pointing to a declared parent location). This variable stores number of declaration parents\n // we need to walk up in order to find the parent injector location.\n var declarationViewOffset = 0;\n var parentTNode = null;\n var lViewCursor = lView;\n // The parent injector is not in the current `LView`. We will have to walk the declared parent\n // `LView` hierarchy and look for it. If we walk of the top, that means that there is no parent\n // `NodeInjector`.\n while (lViewCursor !== null) {\n // First determine the `parentTNode` location. The parent pointer differs based on `TView.type`.\n var tView = lViewCursor[TVIEW];\n var tViewType = tView.type;\n if (tViewType === 2 /* Embedded */) {\n ngDevMode &&\n assertDefined(tView.declTNode, 'Embedded TNodes should have declaration parents.');\n parentTNode = tView.declTNode;\n }\n else if (tViewType === 1 /* Component */) {\n // Components don't have `TView.declTNode` because each instance of component could be\n // inserted in different location, hence `TView.declTNode` is meaningless.\n parentTNode = lViewCursor[T_HOST];\n }\n else {\n ngDevMode && assertEqual(tView.type, 0 /* Root */, 'Root type expected');\n parentTNode = null;\n }\n if (parentTNode === null) {\n // If we have no parent, than we are done.\n return NO_PARENT_INJECTOR;\n }\n ngDevMode && parentTNode && assertTNodeForLView(parentTNode, lViewCursor[DECLARATION_VIEW]);\n // Every iteration of the loop requires that we go to the declared parent.\n declarationViewOffset++;\n lViewCursor = lViewCursor[DECLARATION_VIEW];\n if (parentTNode.injectorIndex !== -1) {\n // We found a NodeInjector which points to something.\n return (parentTNode.injectorIndex |\n (declarationViewOffset << 16 /* ViewOffsetShift */));\n }\n }\n return NO_PARENT_INJECTOR;\n }\n /**\n * Makes a type or an injection token public to the DI system by adding it to an\n * injector's bloom filter.\n *\n * @param di The node injector in which a directive will be added\n * @param token The type or the injection token to be made public\n */\n function diPublicInInjector(injectorIndex, tView, token) {\n bloomAdd(injectorIndex, tView, token);\n }\n /**\n * Inject static attribute value into directive constructor.\n *\n * This method is used with `factory` functions which are generated as part of\n * `defineDirective` or `defineComponent`. The method retrieves the static value\n * of an attribute. (Dynamic attributes are not supported since they are not resolved\n * at the time of injection and can change over time.)\n *\n * # Example\n * Given:\n * ```\n * @Component(...)\n * class MyComponent {\n * constructor(@Attribute('title') title: string) { ... }\n * }\n * ```\n * When instantiated with\n * ```\n * <my-component title=\"Hello\"></my-component>\n * ```\n *\n * Then factory method generated is:\n * ```\n * MyComponent.ɵcmp = defineComponent({\n * factory: () => new MyComponent(injectAttribute('title'))\n * ...\n * })\n * ```\n *\n * @publicApi\n */\n function injectAttributeImpl(tNode, attrNameToInject) {\n ngDevMode && assertTNodeType(tNode, 12 /* AnyContainer */ | 3 /* AnyRNode */);\n ngDevMode && assertDefined(tNode, 'expecting tNode');\n if (attrNameToInject === 'class') {\n return tNode.classes;\n }\n if (attrNameToInject === 'style') {\n return tNode.styles;\n }\n var attrs = tNode.attrs;\n if (attrs) {\n var attrsLength = attrs.length;\n var i = 0;\n while (i < attrsLength) {\n var value = attrs[i];\n // If we hit a `Bindings` or `Template` marker then we are done.\n if (isNameOnlyAttributeMarker(value))\n break;\n // Skip namespaced attributes\n if (value === 0 /* NamespaceURI */) {\n // we skip the next two values\n // as namespaced attributes looks like\n // [..., AttributeMarker.NamespaceURI, 'http://someuri.com/test', 'test:exist',\n // 'existValue', ...]\n i = i + 2;\n }\n else if (typeof value === 'number') {\n // Skip to the first value of the marked attribute.\n i++;\n while (i < attrsLength && typeof attrs[i] === 'string') {\n i++;\n }\n }\n else if (value === attrNameToInject) {\n return attrs[i + 1];\n }\n else {\n i = i + 2;\n }\n }\n }\n return null;\n }\n function notFoundValueOrThrow(notFoundValue, token, flags) {\n if (flags & exports.InjectFlags.Optional) {\n return notFoundValue;\n }\n else {\n throwProviderNotFoundError(token, 'NodeInjector');\n }\n }\n /**\n * Returns the value associated to the given token from the ModuleInjector or throws exception\n *\n * @param lView The `LView` that contains the `tNode`\n * @param token The token to look for\n * @param flags Injection flags\n * @param notFoundValue The value to return when the injection flags is `InjectFlags.Optional`\n * @returns the value from the injector or throws an exception\n */\n function lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue) {\n if (flags & exports.InjectFlags.Optional && notFoundValue === undefined) {\n // This must be set or the NullInjector will throw for optional deps\n notFoundValue = null;\n }\n if ((flags & (exports.InjectFlags.Self | exports.InjectFlags.Host)) === 0) {\n var moduleInjector = lView[INJECTOR];\n // switch to `injectInjectorOnly` implementation for module injector, since module injector\n // should not have access to Component/Directive DI scope (that may happen through\n // `directiveInject` implementation)\n var previousInjectImplementation = setInjectImplementation(undefined);\n try {\n if (moduleInjector) {\n return moduleInjector.get(token, notFoundValue, flags & exports.InjectFlags.Optional);\n }\n else {\n return injectRootLimpMode(token, notFoundValue, flags & exports.InjectFlags.Optional);\n }\n }\n finally {\n setInjectImplementation(previousInjectImplementation);\n }\n }\n return notFoundValueOrThrow(notFoundValue, token, flags);\n }\n /**\n * Returns the value associated to the given token from the NodeInjectors => ModuleInjector.\n *\n * Look for the injector providing the token by walking up the node injector tree and then\n * the module injector tree.\n *\n * This function patches `token` with `__NG_ELEMENT_ID__` which contains the id for the bloom\n * filter. `-1` is reserved for injecting `Injector` (implemented by `NodeInjector`)\n *\n * @param tNode The Node where the search for the injector should start\n * @param lView The `LView` that contains the `tNode`\n * @param token The token to look for\n * @param flags Injection flags\n * @param notFoundValue The value to return when the injection flags is `InjectFlags.Optional`\n * @returns the value from the injector, `null` when not found, or `notFoundValue` if provided\n */\n function getOrCreateInjectable(tNode, lView, token, flags, notFoundValue) {\n if (flags === void 0) { flags = exports.InjectFlags.Default; }\n if (tNode !== null) {\n var bloomHash = bloomHashBitOrFactory(token);\n // If the ID stored here is a function, this is a special object like ElementRef or TemplateRef\n // so just call the factory function to create it.\n if (typeof bloomHash === 'function') {\n if (!enterDI(lView, tNode, flags)) {\n // Failed to enter DI, try module injector instead. If a token is injected with the @Host\n // flag, the module injector is not searched for that token in Ivy.\n return (flags & exports.InjectFlags.Host) ?\n notFoundValueOrThrow(notFoundValue, token, flags) :\n lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue);\n }\n try {\n var value = bloomHash();\n if (value == null && !(flags & exports.InjectFlags.Optional)) {\n throwProviderNotFoundError(token);\n }\n else {\n return value;\n }\n }\n finally {\n leaveDI();\n }\n }\n else if (typeof bloomHash === 'number') {\n // A reference to the previous injector TView that was found while climbing the element\n // injector tree. This is used to know if viewProviders can be accessed on the current\n // injector.\n var previousTView = null;\n var injectorIndex = getInjectorIndex(tNode, lView);\n var parentLocation = NO_PARENT_INJECTOR;\n var hostTElementNode = flags & exports.InjectFlags.Host ? lView[DECLARATION_COMPONENT_VIEW][T_HOST] : null;\n // If we should skip this injector, or if there is no injector on this node, start by\n // searching the parent injector.\n if (injectorIndex === -1 || flags & exports.InjectFlags.SkipSelf) {\n parentLocation = injectorIndex === -1 ? getParentInjectorLocation(tNode, lView) :\n lView[injectorIndex + 8 /* PARENT */];\n if (parentLocation === NO_PARENT_INJECTOR || !shouldSearchParent(flags, false)) {\n injectorIndex = -1;\n }\n else {\n previousTView = lView[TVIEW];\n injectorIndex = getParentInjectorIndex(parentLocation);\n lView = getParentInjectorView(parentLocation, lView);\n }\n }\n // Traverse up the injector tree until we find a potential match or until we know there\n // *isn't* a match.\n while (injectorIndex !== -1) {\n ngDevMode && assertNodeInjector(lView, injectorIndex);\n // Check the current injector. If it matches, see if it contains token.\n var tView = lView[TVIEW];\n ngDevMode &&\n assertTNodeForLView(tView.data[injectorIndex + 8 /* TNODE */], lView);\n if (bloomHasToken(bloomHash, injectorIndex, tView.data)) {\n // At this point, we have an injector which *may* contain the token, so we step through\n // the providers and directives associated with the injector's corresponding node to get\n // the instance.\n var instance = searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode);\n if (instance !== NOT_FOUND) {\n return instance;\n }\n }\n parentLocation = lView[injectorIndex + 8 /* PARENT */];\n if (parentLocation !== NO_PARENT_INJECTOR &&\n shouldSearchParent(flags, lView[TVIEW].data[injectorIndex + 8 /* TNODE */] === hostTElementNode) &&\n bloomHasToken(bloomHash, injectorIndex, lView)) {\n // The def wasn't found anywhere on this node, so it was a false positive.\n // Traverse up the tree and continue searching.\n previousTView = tView;\n injectorIndex = getParentInjectorIndex(parentLocation);\n lView = getParentInjectorView(parentLocation, lView);\n }\n else {\n // If we should not search parent OR If the ancestor bloom filter value does not have the\n // bit corresponding to the directive we can give up on traversing up to find the specific\n // injector.\n injectorIndex = -1;\n }\n }\n }\n }\n return lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue);\n }\n var NOT_FOUND = {};\n function createNodeInjector() {\n return new NodeInjector(getCurrentTNode(), getLView());\n }\n function searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode) {\n var currentTView = lView[TVIEW];\n var tNode = currentTView.data[injectorIndex + 8 /* TNODE */];\n // First, we need to determine if view providers can be accessed by the starting element.\n // There are two possibilities\n var canAccessViewProviders = previousTView == null ?\n // 1) This is the first invocation `previousTView == null` which means that we are at the\n // `TNode` of where injector is starting to look. In such a case the only time we are allowed\n // to look into the ViewProviders is if:\n // - we are on a component\n // - AND the injector set `includeViewProviders` to true (implying that the token can see\n // ViewProviders because it is the Component or a Service which itself was declared in\n // ViewProviders)\n (isComponentHost(tNode) && includeViewProviders) :\n // 2) `previousTView != null` which means that we are now walking across the parent nodes.\n // In such a case we are only allowed to look into the ViewProviders if:\n // - We just crossed from child View to Parent View `previousTView != currentTView`\n // - AND the parent TNode is an Element.\n // This means that we just came from the Component's View and therefore are allowed to see\n // into the ViewProviders.\n (previousTView != currentTView && ((tNode.type & 3 /* AnyRNode */) !== 0));\n // This special case happens when there is a @host on the inject and when we are searching\n // on the host element node.\n var isHostSpecialCase = (flags & exports.InjectFlags.Host) && hostTElementNode === tNode;\n var injectableIdx = locateDirectiveOrProvider(tNode, currentTView, token, canAccessViewProviders, isHostSpecialCase);\n if (injectableIdx !== null) {\n return getNodeInjectable(lView, currentTView, injectableIdx, tNode);\n }\n else {\n return NOT_FOUND;\n }\n }\n /**\n * Searches for the given token among the node's directives and providers.\n *\n * @param tNode TNode on which directives are present.\n * @param tView The tView we are currently processing\n * @param token Provider token or type of a directive to look for.\n * @param canAccessViewProviders Whether view providers should be considered.\n * @param isHostSpecialCase Whether the host special case applies.\n * @returns Index of a found directive or provider, or null when none found.\n */\n function locateDirectiveOrProvider(tNode, tView, token, canAccessViewProviders, isHostSpecialCase) {\n var nodeProviderIndexes = tNode.providerIndexes;\n var tInjectables = tView.data;\n var injectablesStart = nodeProviderIndexes & 1048575 /* ProvidersStartIndexMask */;\n var directivesStart = tNode.directiveStart;\n var directiveEnd = tNode.directiveEnd;\n var cptViewProvidersCount = nodeProviderIndexes >> 20 /* CptViewProvidersCountShift */;\n var startingIndex = canAccessViewProviders ? injectablesStart : injectablesStart + cptViewProvidersCount;\n // When the host special case applies, only the viewProviders and the component are visible\n var endIndex = isHostSpecialCase ? injectablesStart + cptViewProvidersCount : directiveEnd;\n for (var i = startingIndex; i < endIndex; i++) {\n var providerTokenOrDef = tInjectables[i];\n if (i < directivesStart && token === providerTokenOrDef ||\n i >= directivesStart && providerTokenOrDef.type === token) {\n return i;\n }\n }\n if (isHostSpecialCase) {\n var dirDef = tInjectables[directivesStart];\n if (dirDef && isComponentDef(dirDef) && dirDef.type === token) {\n return directivesStart;\n }\n }\n return null;\n }\n /**\n * Retrieve or instantiate the injectable from the `LView` at particular `index`.\n *\n * This function checks to see if the value has already been instantiated and if so returns the\n * cached `injectable`. Otherwise if it detects that the value is still a factory it\n * instantiates the `injectable` and caches the value.\n */\n function getNodeInjectable(lView, tView, index, tNode) {\n var value = lView[index];\n var tData = tView.data;\n if (isFactory(value)) {\n var factory = value;\n if (factory.resolving) {\n throwCyclicDependencyError(stringifyForError(tData[index]));\n }\n var previousIncludeViewProviders = setIncludeViewProviders(factory.canSeeViewProviders);\n factory.resolving = true;\n var previousInjectImplementation = factory.injectImpl ? setInjectImplementation(factory.injectImpl) : null;\n var success = enterDI(lView, tNode, exports.InjectFlags.Default);\n ngDevMode &&\n assertEqual(success, true, 'Because flags do not contain \\`SkipSelf\\' we expect this to always succeed.');\n try {\n value = lView[index] = factory.factory(undefined, tData, lView, tNode);\n // This code path is hit for both directives and providers.\n // For perf reasons, we want to avoid searching for hooks on providers.\n // It does no harm to try (the hooks just won't exist), but the extra\n // checks are unnecessary and this is a hot path. So we check to see\n // if the index of the dependency is in the directive range for this\n // tNode. If it's not, we know it's a provider and skip hook registration.\n if (tView.firstCreatePass && index >= tNode.directiveStart) {\n ngDevMode && assertDirectiveDef(tData[index]);\n registerPreOrderHooks(index, tData[index], tView);\n }\n }\n finally {\n previousInjectImplementation !== null &&\n setInjectImplementation(previousInjectImplementation);\n setIncludeViewProviders(previousIncludeViewProviders);\n factory.resolving = false;\n leaveDI();\n }\n }\n return value;\n }\n /**\n * Returns the bit in an injector's bloom filter that should be used to determine whether or not\n * the directive might be provided by the injector.\n *\n * When a directive is public, it is added to the bloom filter and given a unique ID that can be\n * retrieved on the Type. When the directive isn't public or the token is not a directive `null`\n * is returned as the node injector can not possibly provide that token.\n *\n * @param token the injection token\n * @returns the matching bit to check in the bloom filter or `null` if the token is not known.\n * When the returned value is negative then it represents special values such as `Injector`.\n */\n function bloomHashBitOrFactory(token) {\n ngDevMode && assertDefined(token, 'token must be defined');\n if (typeof token === 'string') {\n return token.charCodeAt(0) || 0;\n }\n var tokenId = \n // First check with `hasOwnProperty` so we don't get an inherited ID.\n token.hasOwnProperty(NG_ELEMENT_ID) ? token[NG_ELEMENT_ID] : undefined;\n // Negative token IDs are used for special objects such as `Injector`\n if (typeof tokenId === 'number') {\n if (tokenId >= 0) {\n return tokenId & BLOOM_MASK;\n }\n else {\n ngDevMode &&\n assertEqual(tokenId, -1 /* Injector */, 'Expecting to get Special Injector Id');\n return createNodeInjector;\n }\n }\n else {\n return tokenId;\n }\n }\n function bloomHasToken(bloomHash, injectorIndex, injectorView) {\n // Create a mask that targets the specific bit associated with the directive we're looking for.\n // JS bit operations are 32 bits, so this will be a number between 2^0 and 2^31, corresponding\n // to bit positions 0 - 31 in a 32 bit integer.\n var mask = 1 << bloomHash;\n // Each bloom bucket in `injectorView` represents `BLOOM_BUCKET_BITS` number of bits of\n // `bloomHash`. Any bits in `bloomHash` beyond `BLOOM_BUCKET_BITS` indicate the bucket offset\n // that should be used.\n var value = injectorView[injectorIndex + (bloomHash >> BLOOM_BUCKET_BITS)];\n // If the bloom filter value has the bit corresponding to the directive's bloomBit flipped on,\n // this injector is a potential match.\n return !!(value & mask);\n }\n /** Returns true if flags prevent parent injector from being searched for tokens */\n function shouldSearchParent(flags, isFirstHostTNode) {\n return !(flags & exports.InjectFlags.Self) && !(flags & exports.InjectFlags.Host && isFirstHostTNode);\n }\n var NodeInjector = /** @class */ (function () {\n function NodeInjector(_tNode, _lView) {\n this._tNode = _tNode;\n this._lView = _lView;\n }\n NodeInjector.prototype.get = function (token, notFoundValue) {\n return getOrCreateInjectable(this._tNode, this._lView, token, undefined, notFoundValue);\n };\n return NodeInjector;\n }());\n /**\n * @codeGenApi\n */\n function ɵɵgetInheritedFactory(type) {\n return noSideEffects(function () {\n var ownConstructor = type.prototype.constructor;\n var ownFactory = ownConstructor[NG_FACTORY_DEF] || getFactoryOf(ownConstructor);\n var objectPrototype = Object.prototype;\n var parent = Object.getPrototypeOf(type.prototype).constructor;\n // Go up the prototype until we hit `Object`.\n while (parent && parent !== objectPrototype) {\n var factory = parent[NG_FACTORY_DEF] || getFactoryOf(parent);\n // If we hit something that has a factory and the factory isn't the same as the type,\n // we've found the inherited factory. Note the check that the factory isn't the type's\n // own factory is redundant in most cases, but if the user has custom decorators on the\n // class, this lookup will start one level down in the prototype chain, causing us to\n // find the own factory first and potentially triggering an infinite loop downstream.\n if (factory && factory !== ownFactory) {\n return factory;\n }\n parent = Object.getPrototypeOf(parent);\n }\n // There is no factory defined. Either this was improper usage of inheritance\n // (no Angular decorator on the superclass) or there is no constructor at all\n // in the inheritance chain. Since the two cases cannot be distinguished, the\n // latter has to be assumed.\n return function (t) { return new t(); };\n });\n }\n function getFactoryOf(type) {\n if (isForwardRef(type)) {\n return function () {\n var factory = getFactoryOf(resolveForwardRef(type));\n return factory && factory();\n };\n }\n return getFactoryDef(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 * Facade for the attribute injection from DI.\n *\n * @codeGenApi\n */\n function ɵɵinjectAttribute(attrNameToInject) {\n return injectAttributeImpl(getCurrentTNode(), attrNameToInject);\n }\n\n var ANNOTATIONS = '__annotations__';\n var PARAMETERS = '__parameters__';\n var PROP_METADATA = '__prop__metadata__';\n /**\n * @suppress {globalThis}\n */\n function makeDecorator(name, props, parentClass, additionalProcessing, typeFn) {\n return noSideEffects(function () {\n var metaCtor = makeMetadataCtor(props);\n function DecoratorFactory() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (this instanceof DecoratorFactory) {\n metaCtor.call.apply(metaCtor, __spread([this], args));\n return this;\n }\n var annotationInstance = new (DecoratorFactory.bind.apply(DecoratorFactory, __spread([void 0], args)))();\n return function TypeDecorator(cls) {\n if (typeFn)\n typeFn.apply(void 0, __spread([cls], args));\n // Use of Object.defineProperty is important since it creates non-enumerable property which\n // prevents the property is copied during subclassing.\n var annotations = cls.hasOwnProperty(ANNOTATIONS) ?\n cls[ANNOTATIONS] :\n Object.defineProperty(cls, ANNOTATIONS, { value: [] })[ANNOTATIONS];\n annotations.push(annotationInstance);\n if (additionalProcessing)\n additionalProcessing(cls);\n return cls;\n };\n }\n if (parentClass) {\n DecoratorFactory.prototype = Object.create(parentClass.prototype);\n }\n DecoratorFactory.prototype.ngMetadataName = name;\n DecoratorFactory.annotationCls = DecoratorFactory;\n return DecoratorFactory;\n });\n }\n function makeMetadataCtor(props) {\n return function ctor() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (props) {\n var values = props.apply(void 0, __spread(args));\n for (var propName in values) {\n this[propName] = values[propName];\n }\n }\n };\n }\n function makeParamDecorator(name, props, parentClass) {\n return noSideEffects(function () {\n var metaCtor = makeMetadataCtor(props);\n function ParamDecoratorFactory() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (this instanceof ParamDecoratorFactory) {\n metaCtor.apply(this, args);\n return this;\n }\n var annotationInstance = new (ParamDecoratorFactory.bind.apply(ParamDecoratorFactory, __spread([void 0], args)))();\n ParamDecorator.annotation = annotationInstance;\n return ParamDecorator;\n function ParamDecorator(cls, unusedKey, index) {\n // Use of Object.defineProperty is important since it creates non-enumerable property which\n // prevents the property is copied during subclassing.\n var parameters = cls.hasOwnProperty(PARAMETERS) ?\n cls[PARAMETERS] :\n Object.defineProperty(cls, PARAMETERS, { value: [] })[PARAMETERS];\n // there might be gaps if some in between parameters do not have annotations.\n // we pad with nulls.\n while (parameters.length <= index) {\n parameters.push(null);\n }\n (parameters[index] = parameters[index] || []).push(annotationInstance);\n return cls;\n }\n }\n if (parentClass) {\n ParamDecoratorFactory.prototype = Object.create(parentClass.prototype);\n }\n ParamDecoratorFactory.prototype.ngMetadataName = name;\n ParamDecoratorFactory.annotationCls = ParamDecoratorFactory;\n return ParamDecoratorFactory;\n });\n }\n function makePropDecorator(name, props, parentClass, additionalProcessing) {\n return noSideEffects(function () {\n var metaCtor = makeMetadataCtor(props);\n function PropDecoratorFactory() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (this instanceof PropDecoratorFactory) {\n metaCtor.apply(this, args);\n return this;\n }\n var decoratorInstance = new (PropDecoratorFactory.bind.apply(PropDecoratorFactory, __spread([void 0], args)))();\n function PropDecorator(target, name) {\n var constructor = target.constructor;\n // Use of Object.defineProperty is important because it creates a non-enumerable property\n // which prevents the property from being copied during subclassing.\n var meta = constructor.hasOwnProperty(PROP_METADATA) ?\n constructor[PROP_METADATA] :\n Object.defineProperty(constructor, PROP_METADATA, { value: {} })[PROP_METADATA];\n meta[name] = meta.hasOwnProperty(name) && meta[name] || [];\n meta[name].unshift(decoratorInstance);\n if (additionalProcessing)\n additionalProcessing.apply(void 0, __spread([target, name], args));\n }\n return PropDecorator;\n }\n if (parentClass) {\n PropDecoratorFactory.prototype = Object.create(parentClass.prototype);\n }\n PropDecoratorFactory.prototype.ngMetadataName = name;\n PropDecoratorFactory.annotationCls = PropDecoratorFactory;\n return PropDecoratorFactory;\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 function CREATE_ATTRIBUTE_DECORATOR__PRE_R3__() {\n return makeParamDecorator('Attribute', function (attributeName) { return ({ attributeName: attributeName }); });\n }\n function CREATE_ATTRIBUTE_DECORATOR__POST_R3__() {\n return makeParamDecorator('Attribute', function (attributeName) { return ({ attributeName: attributeName, __NG_ELEMENT_ID__: function () { return ɵɵinjectAttribute(attributeName); } }); });\n }\n var CREATE_ATTRIBUTE_DECORATOR_IMPL = CREATE_ATTRIBUTE_DECORATOR__PRE_R3__;\n /**\n * Attribute decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\n var Attribute = CREATE_ATTRIBUTE_DECORATOR_IMPL();\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 a token that can be used in a DI Provider.\n *\n * Use an `InjectionToken` whenever the type you are injecting is not reified (does not have a\n * runtime representation) such as when injecting an interface, callable type, array or\n * parameterized type.\n *\n * `InjectionToken` is parameterized on `T` which is the type of object which will be returned by\n * the `Injector`. This provides additional level of type safety.\n *\n * ```\n * interface MyInterface {...}\n * var myInterface = injector.get(new InjectionToken<MyInterface>('SomeToken'));\n * // myInterface is inferred to be MyInterface.\n * ```\n *\n * When creating an `InjectionToken`, you can optionally specify a factory function which returns\n * (possibly by creating) a default value of the parameterized type `T`. This sets up the\n * `InjectionToken` using this factory as a provider as if it was defined explicitly in the\n * application's root injector. If the factory function, which takes zero arguments, needs to inject\n * dependencies, it can do so using the `inject` function. See below for an example.\n *\n * Additionally, if a `factory` is specified you can also specify the `providedIn` option, which\n * overrides the above behavior and marks the token as belonging to a particular `@NgModule`. As\n * mentioned above, `'root'` is the default value for `providedIn`.\n *\n * @usageNotes\n * ### Basic Example\n *\n * ### Plain InjectionToken\n *\n * {@example core/di/ts/injector_spec.ts region='InjectionToken'}\n *\n * ### Tree-shakable InjectionToken\n *\n * {@example core/di/ts/injector_spec.ts region='ShakableInjectionToken'}\n *\n *\n * @publicApi\n */\n var InjectionToken = /** @class */ (function () {\n function InjectionToken(_desc, options) {\n this._desc = _desc;\n /** @internal */\n this.ngMetadataName = 'InjectionToken';\n this.ɵprov = undefined;\n if (typeof options == 'number') {\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n assertLessThan(options, 0, 'Only negative numbers are supported here');\n // This is a special hack to assign __NG_ELEMENT_ID__ to this instance.\n // See `InjectorMarkers`\n this.__NG_ELEMENT_ID__ = options;\n }\n else if (options !== undefined) {\n this.ɵprov = ɵɵdefineInjectable({\n token: this,\n providedIn: options.providedIn || 'root',\n factory: options.factory,\n });\n }\n }\n InjectionToken.prototype.toString = function () {\n return \"InjectionToken \" + this._desc;\n };\n return InjectionToken;\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 DI token that you can use to create a virtual [provider](guide/glossary#provider)\n * that will populate the `entryComponents` field of components and NgModules\n * based on its `useValue` property value.\n * All components that are referenced in the `useValue` value (either directly\n * or in a nested array or map) are added to the `entryComponents` property.\n *\n * @usageNotes\n *\n * The following example shows how the router can populate the `entryComponents`\n * field of an NgModule based on a router configuration that refers\n * to components.\n *\n * ```typescript\n * // helper function inside the router\n * function provideRoutes(routes) {\n * return [\n * {provide: ROUTES, useValue: routes},\n * {provide: ANALYZE_FOR_ENTRY_COMPONENTS, useValue: routes, multi: true}\n * ];\n * }\n *\n * // user code\n * let routes = [\n * {path: '/root', component: RootComp},\n * {path: '/teams', component: TeamsComp}\n * ];\n *\n * @NgModule({\n * providers: [provideRoutes(routes)]\n * })\n * class ModuleWithRoutes {}\n * ```\n *\n * @publicApi\n * @deprecated Since 9.0.0. With Ivy, this property is no longer necessary.\n */\n var ANALYZE_FOR_ENTRY_COMPONENTS = new InjectionToken('AnalyzeForEntryComponents');\n // Stores the default value of `emitDistinctChangesOnly` when the `emitDistinctChangesOnly` is not\n // explicitly set. This value will be changed to `true` in v12.\n // TODO(misko): switch the default in v12 to `true`. See: packages/compiler/src/core.ts\n var emitDistinctChangesOnlyDefaultValue = false;\n /**\n * Base class for query metadata.\n *\n * @see `ContentChildren`.\n * @see `ContentChild`.\n * @see `ViewChildren`.\n * @see `ViewChild`.\n *\n * @publicApi\n */\n var Query = /** @class */ (function () {\n function Query() {\n }\n return Query;\n }());\n var ɵ0$1 = function (selector, data) {\n if (data === void 0) { data = {}; }\n return (Object.assign({ selector: selector, first: false, isViewQuery: false, descendants: false, emitDistinctChangesOnly: emitDistinctChangesOnlyDefaultValue }, data));\n };\n /**\n * ContentChildren decorator and metadata.\n *\n *\n * @Annotation\n * @publicApi\n */\n var ContentChildren = makePropDecorator('ContentChildren', ɵ0$1, Query);\n var ɵ1 = function (selector, data) {\n if (data === void 0) { data = {}; }\n return (Object.assign({ selector: selector, first: true, isViewQuery: false, descendants: true }, data));\n };\n /**\n * ContentChild decorator and metadata.\n *\n *\n * @Annotation\n *\n * @publicApi\n */\n var ContentChild = makePropDecorator('ContentChild', ɵ1, Query);\n var ɵ2 = function (selector, data) {\n if (data === void 0) { data = {}; }\n return (Object.assign({ selector: selector, first: false, isViewQuery: true, descendants: true, emitDistinctChangesOnly: emitDistinctChangesOnlyDefaultValue }, data));\n };\n /**\n * ViewChildren decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\n var ViewChildren = makePropDecorator('ViewChildren', ɵ2, Query);\n var ɵ3 = function (selector, data) { return (Object.assign({ selector: selector, first: true, isViewQuery: true, descendants: true }, data)); };\n /**\n * ViewChild decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\n var ViewChild = makePropDecorator('ViewChild', ɵ3, Query);\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 var R3ResolvedDependencyType;\n (function (R3ResolvedDependencyType) {\n R3ResolvedDependencyType[R3ResolvedDependencyType[\"Token\"] = 0] = \"Token\";\n R3ResolvedDependencyType[R3ResolvedDependencyType[\"Attribute\"] = 1] = \"Attribute\";\n R3ResolvedDependencyType[R3ResolvedDependencyType[\"ChangeDetectorRef\"] = 2] = \"ChangeDetectorRef\";\n R3ResolvedDependencyType[R3ResolvedDependencyType[\"Invalid\"] = 3] = \"Invalid\";\n })(R3ResolvedDependencyType || (R3ResolvedDependencyType = {}));\n var R3FactoryTarget;\n (function (R3FactoryTarget) {\n R3FactoryTarget[R3FactoryTarget[\"Directive\"] = 0] = \"Directive\";\n R3FactoryTarget[R3FactoryTarget[\"Component\"] = 1] = \"Component\";\n R3FactoryTarget[R3FactoryTarget[\"Injectable\"] = 2] = \"Injectable\";\n R3FactoryTarget[R3FactoryTarget[\"Pipe\"] = 3] = \"Pipe\";\n R3FactoryTarget[R3FactoryTarget[\"NgModule\"] = 4] = \"NgModule\";\n })(R3FactoryTarget || (R3FactoryTarget = {}));\n var 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 = {}));\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 getCompilerFacade() {\n var globalNg = _global['ng'];\n if (!globalNg || !globalNg.ɵcompilerFacade) {\n throw new Error(\"Angular JIT compilation failed: '@angular/compiler' not loaded!\\n\" +\n \" - JIT compilation is discouraged for production use-cases! Consider AOT mode instead.\\n\" +\n \" - Did you bootstrap using '@angular/platform-browser-dynamic' or '@angular/platform-server'?\\n\" +\n \" - Alternatively provide the compiler with 'import \\\"@angular/compiler\\\";' before bootstrapping.\");\n }\n return globalNg.ɵcompilerFacade;\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 * @description\n *\n * Represents a type that a Component or other object is instances of.\n *\n * An example of a `Type` is `MyCustomComponent` class, which in JavaScript is represented by\n * the `MyCustomComponent` constructor function.\n *\n * @publicApi\n */\n var Type = Function;\n function isType(v) {\n return typeof v === 'function';\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 * Equivalent to ES6 spread, add each item to an array.\n *\n * @param items The items to add\n * @param arr The array to which you want to add the items\n */\n function addAllToArray(items, arr) {\n for (var i = 0; i < items.length; i++) {\n arr.push(items[i]);\n }\n }\n /**\n * Determines if the contents of two arrays is identical\n *\n * @param a first array\n * @param b second array\n * @param identityAccessor Optional function for extracting stable object identity from a value in\n * the array.\n */\n function arrayEquals(a, b, identityAccessor) {\n if (a.length !== b.length)\n return false;\n for (var i = 0; i < a.length; i++) {\n var valueA = a[i];\n var valueB = b[i];\n if (identityAccessor) {\n valueA = identityAccessor(valueA);\n valueB = identityAccessor(valueB);\n }\n if (valueB !== valueA) {\n return false;\n }\n }\n return true;\n }\n /**\n * Flattens an array.\n */\n function flatten(list, dst) {\n if (dst === undefined)\n dst = list;\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n if (Array.isArray(item)) {\n // we need to inline it.\n if (dst === list) {\n // Our assumption that the list was already flat was wrong and\n // we need to clone flat since we need to write to it.\n dst = list.slice(0, i);\n }\n flatten(item, dst);\n }\n else if (dst !== list) {\n dst.push(item);\n }\n }\n return dst;\n }\n function deepForEach(input, fn) {\n input.forEach(function (value) { return Array.isArray(value) ? deepForEach(value, fn) : fn(value); });\n }\n function addToArray(arr, index, value) {\n // perf: array.push is faster than array.splice!\n if (index >= arr.length) {\n arr.push(value);\n }\n else {\n arr.splice(index, 0, value);\n }\n }\n function removeFromArray(arr, index) {\n // perf: array.pop is faster than array.splice!\n if (index >= arr.length - 1) {\n return arr.pop();\n }\n else {\n return arr.splice(index, 1)[0];\n }\n }\n function newArray(size, value) {\n var list = [];\n for (var i = 0; i < size; i++) {\n list.push(value);\n }\n return list;\n }\n /**\n * Remove item from array (Same as `Array.splice()` but faster.)\n *\n * `Array.splice()` is not as fast because it has to allocate an array for the elements which were\n * removed. This causes memory pressure and slows down code when most of the time we don't\n * care about the deleted items array.\n *\n * https://jsperf.com/fast-array-splice (About 20x faster)\n *\n * @param array Array to splice\n * @param index Index of element in array to remove.\n * @param count Number of items to remove.\n */\n function arraySplice(array, index, count) {\n var length = array.length - count;\n while (index < length) {\n array[index] = array[index + count];\n index++;\n }\n while (count--) {\n array.pop(); // shrink the array\n }\n }\n /**\n * Same as `Array.splice(index, 0, value)` but faster.\n *\n * `Array.splice()` is not fast because it has to allocate an array for the elements which were\n * removed. This causes memory pressure and slows down code when most of the time we don't\n * care about the deleted items array.\n *\n * @param array Array to splice.\n * @param index Index in array where the `value` should be added.\n * @param value Value to add to array.\n */\n function arrayInsert(array, index, value) {\n ngDevMode && assertLessThanOrEqual(index, array.length, 'Can\\'t insert past array end.');\n var end = array.length;\n while (end > index) {\n var previousEnd = end - 1;\n array[end] = array[previousEnd];\n end = previousEnd;\n }\n array[index] = value;\n }\n /**\n * Same as `Array.splice2(index, 0, value1, value2)` but faster.\n *\n * `Array.splice()` is not fast because it has to allocate an array for the elements which were\n * removed. This causes memory pressure and slows down code when most of the time we don't\n * care about the deleted items array.\n *\n * @param array Array to splice.\n * @param index Index in array where the `value` should be added.\n * @param value1 Value to add to array.\n * @param value2 Value to add to array.\n */\n function arrayInsert2(array, index, value1, value2) {\n ngDevMode && assertLessThanOrEqual(index, array.length, 'Can\\'t insert past array end.');\n var end = array.length;\n if (end == index) {\n // inserting at the end.\n array.push(value1, value2);\n }\n else if (end === 1) {\n // corner case when we have less items in array than we have items to insert.\n array.push(value2, array[0]);\n array[0] = value1;\n }\n else {\n end--;\n array.push(array[end - 1], array[end]);\n while (end > index) {\n var previousEnd = end - 2;\n array[end] = array[previousEnd];\n end--;\n }\n array[index] = value1;\n array[index + 1] = value2;\n }\n }\n /**\n * Insert a `value` into an `array` so that the array remains sorted.\n *\n * NOTE:\n * - Duplicates are not allowed, and are ignored.\n * - This uses binary search algorithm for fast inserts.\n *\n * @param array A sorted array to insert into.\n * @param value The value to insert.\n * @returns index of the inserted value.\n */\n function arrayInsertSorted(array, value) {\n var index = arrayIndexOfSorted(array, value);\n if (index < 0) {\n // if we did not find it insert it.\n index = ~index;\n arrayInsert(array, index, value);\n }\n return index;\n }\n /**\n * Remove `value` from a sorted `array`.\n *\n * NOTE:\n * - This uses binary search algorithm for fast removals.\n *\n * @param array A sorted array to remove from.\n * @param value The value to remove.\n * @returns index of the removed value.\n * - positive index if value found and removed.\n * - negative index if value not found. (`~index` to get the value where it should have been\n * inserted)\n */\n function arrayRemoveSorted(array, value) {\n var index = arrayIndexOfSorted(array, value);\n if (index >= 0) {\n arraySplice(array, index, 1);\n }\n return index;\n }\n /**\n * Get an index of an `value` in a sorted `array`.\n *\n * NOTE:\n * - This uses binary search algorithm for fast removals.\n *\n * @param array A sorted array to binary search.\n * @param value The value to look for.\n * @returns index of the value.\n * - positive index if value found.\n * - negative index if value not found. (`~index` to get the value where it should have been\n * located)\n */\n function arrayIndexOfSorted(array, value) {\n return _arrayIndexOfSorted(array, value, 0);\n }\n /**\n * Set a `value` for a `key`.\n *\n * @param keyValueArray to modify.\n * @param key The key to locate or create.\n * @param value The value to set for a `key`.\n * @returns index (always even) of where the value vas set.\n */\n function keyValueArraySet(keyValueArray, key, value) {\n var index = keyValueArrayIndexOf(keyValueArray, key);\n if (index >= 0) {\n // if we found it set it.\n keyValueArray[index | 1] = value;\n }\n else {\n index = ~index;\n arrayInsert2(keyValueArray, index, key, value);\n }\n return index;\n }\n /**\n * Retrieve a `value` for a `key` (on `undefined` if not found.)\n *\n * @param keyValueArray to search.\n * @param key The key to locate.\n * @return The `value` stored at the `key` location or `undefined if not found.\n */\n function keyValueArrayGet(keyValueArray, key) {\n var index = keyValueArrayIndexOf(keyValueArray, key);\n if (index >= 0) {\n // if we found it retrieve it.\n return keyValueArray[index | 1];\n }\n return undefined;\n }\n /**\n * Retrieve a `key` index value in the array or `-1` if not found.\n *\n * @param keyValueArray to search.\n * @param key The key to locate.\n * @returns index of where the key is (or should have been.)\n * - positive (even) index if key found.\n * - negative index if key not found. (`~index` (even) to get the index where it should have\n * been inserted.)\n */\n function keyValueArrayIndexOf(keyValueArray, key) {\n return _arrayIndexOfSorted(keyValueArray, key, 1);\n }\n /**\n * Delete a `key` (and `value`) from the `KeyValueArray`.\n *\n * @param keyValueArray to modify.\n * @param key The key to locate or delete (if exist).\n * @returns index of where the key was (or should have been.)\n * - positive (even) index if key found and deleted.\n * - negative index if key not found. (`~index` (even) to get the index where it should have\n * been.)\n */\n function keyValueArrayDelete(keyValueArray, key) {\n var index = keyValueArrayIndexOf(keyValueArray, key);\n if (index >= 0) {\n // if we found it remove it.\n arraySplice(keyValueArray, index, 2);\n }\n return index;\n }\n /**\n * INTERNAL: Get an index of an `value` in a sorted `array` by grouping search by `shift`.\n *\n * NOTE:\n * - This uses binary search algorithm for fast removals.\n *\n * @param array A sorted array to binary search.\n * @param value The value to look for.\n * @param shift grouping shift.\n * - `0` means look at every location\n * - `1` means only look at every other (even) location (the odd locations are to be ignored as\n * they are values.)\n * @returns index of the value.\n * - positive index if value found.\n * - negative index if value not found. (`~index` to get the value where it should have been\n * inserted)\n */\n function _arrayIndexOfSorted(array, value, shift) {\n ngDevMode && assertEqual(Array.isArray(array), true, 'Expecting an array');\n var start = 0;\n var end = array.length >> shift;\n while (end !== start) {\n var middle = start + ((end - start) >> 1); // find the middle.\n var current = array[middle << shift];\n if (value === current) {\n return (middle << shift);\n }\n else if (current > value) {\n end = middle;\n }\n else {\n start = middle + 1; // We already searched middle so make it non-inclusive by adding 1\n }\n }\n return ~(end << shift);\n }\n\n /*\n * #########################\n * Attention: These Regular expressions have to hold even if the code is minified!\n * ##########################\n */\n /**\n * Regular expression that detects pass-through constructors for ES5 output. This Regex\n * intends to capture the common delegation pattern emitted by TypeScript and Babel. Also\n * it intends to capture the pattern where existing constructors have been downleveled from\n * ES2015 to ES5 using TypeScript w/ downlevel iteration. e.g.\n *\n * ```\n * function MyClass() {\n * var _this = _super.apply(this, arguments) || this;\n * ```\n *\n * ```\n * function MyClass() {\n * var _this = _super.apply(this, __spread(arguments)) || this;\n * ```\n *\n * More details can be found in: https://github.com/angular/angular/issues/38453.\n */\n var ES5_DELEGATE_CTOR = /^function\\s+\\S+\\(\\)\\s*{[\\s\\S]+\\.apply\\(this,\\s*(arguments|[^()]+\\(arguments\\))\\)/;\n /** Regular expression that detects ES2015 classes which extend from other classes. */\n var ES2015_INHERITED_CLASS = /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[^{]+{/;\n /**\n * Regular expression that detects ES2015 classes which extend from other classes and\n * have an explicit constructor defined.\n */\n var ES2015_INHERITED_CLASS_WITH_CTOR = /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[^{]+{[\\s\\S]*constructor\\s*\\(/;\n /**\n * Regular expression that detects ES2015 classes which extend from other classes\n * and inherit a constructor.\n */\n var ES2015_INHERITED_CLASS_WITH_DELEGATE_CTOR = /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[^{]+{[\\s\\S]*constructor\\s*\\(\\)\\s*{\\s*super\\(\\.\\.\\.arguments\\)/;\n /**\n * Determine whether a stringified type is a class which delegates its constructor\n * to its parent.\n *\n * This is not trivial since compiled code can actually contain a constructor function\n * even if the original source code did not. For instance, when the child class contains\n * an initialized instance property.\n */\n function isDelegateCtor(typeStr) {\n return ES5_DELEGATE_CTOR.test(typeStr) ||\n ES2015_INHERITED_CLASS_WITH_DELEGATE_CTOR.test(typeStr) ||\n (ES2015_INHERITED_CLASS.test(typeStr) && !ES2015_INHERITED_CLASS_WITH_CTOR.test(typeStr));\n }\n var ReflectionCapabilities = /** @class */ (function () {\n function ReflectionCapabilities(reflect) {\n this._reflect = reflect || _global['Reflect'];\n }\n ReflectionCapabilities.prototype.isReflectionEnabled = function () {\n return true;\n };\n ReflectionCapabilities.prototype.factory = function (t) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return new (t.bind.apply(t, __spread([void 0], args)))();\n };\n };\n /** @internal */\n ReflectionCapabilities.prototype._zipTypesAndAnnotations = function (paramTypes, paramAnnotations) {\n var result;\n if (typeof paramTypes === 'undefined') {\n result = newArray(paramAnnotations.length);\n }\n else {\n result = newArray(paramTypes.length);\n }\n for (var i = 0; i < result.length; i++) {\n // TS outputs Object for parameters without types, while Traceur omits\n // the annotations. For now we preserve the Traceur behavior to aid\n // migration, but this can be revisited.\n if (typeof paramTypes === 'undefined') {\n result[i] = [];\n }\n else if (paramTypes[i] && paramTypes[i] != Object) {\n result[i] = [paramTypes[i]];\n }\n else {\n result[i] = [];\n }\n if (paramAnnotations && paramAnnotations[i] != null) {\n result[i] = result[i].concat(paramAnnotations[i]);\n }\n }\n return result;\n };\n ReflectionCapabilities.prototype._ownParameters = function (type, parentCtor) {\n var typeStr = type.toString();\n // If we have no decorators, we only have function.length as metadata.\n // In that case, to detect whether a child class declared an own constructor or not,\n // we need to look inside of that constructor to check whether it is\n // just calling the parent.\n // This also helps to work around for https://github.com/Microsoft/TypeScript/issues/12439\n // that sets 'design:paramtypes' to []\n // if a class inherits from another class but has no ctor declared itself.\n if (isDelegateCtor(typeStr)) {\n return null;\n }\n // Prefer the direct API.\n if (type.parameters && type.parameters !== parentCtor.parameters) {\n return type.parameters;\n }\n // API of tsickle for lowering decorators to properties on the class.\n var tsickleCtorParams = type.ctorParameters;\n if (tsickleCtorParams && tsickleCtorParams !== parentCtor.ctorParameters) {\n // Newer tsickle uses a function closure\n // Retain the non-function case for compatibility with older tsickle\n var ctorParameters = typeof tsickleCtorParams === 'function' ? tsickleCtorParams() : tsickleCtorParams;\n var paramTypes_1 = ctorParameters.map(function (ctorParam) { return ctorParam && ctorParam.type; });\n var paramAnnotations_1 = ctorParameters.map(function (ctorParam) { return ctorParam && convertTsickleDecoratorIntoMetadata(ctorParam.decorators); });\n return this._zipTypesAndAnnotations(paramTypes_1, paramAnnotations_1);\n }\n // API for metadata created by invoking the decorators.\n var paramAnnotations = type.hasOwnProperty(PARAMETERS) && type[PARAMETERS];\n var paramTypes = this._reflect && this._reflect.getOwnMetadata &&\n this._reflect.getOwnMetadata('design:paramtypes', type);\n if (paramTypes || paramAnnotations) {\n return this._zipTypesAndAnnotations(paramTypes, paramAnnotations);\n }\n // If a class has no decorators, at least create metadata\n // based on function.length.\n // Note: We know that this is a real constructor as we checked\n // the content of the constructor above.\n return newArray(type.length);\n };\n ReflectionCapabilities.prototype.parameters = function (type) {\n // Note: only report metadata if we have at least one class decorator\n // to stay in sync with the static reflector.\n if (!isType(type)) {\n return [];\n }\n var parentCtor = getParentCtor(type);\n var parameters = this._ownParameters(type, parentCtor);\n if (!parameters && parentCtor !== Object) {\n parameters = this.parameters(parentCtor);\n }\n return parameters || [];\n };\n ReflectionCapabilities.prototype._ownAnnotations = function (typeOrFunc, parentCtor) {\n // Prefer the direct API.\n if (typeOrFunc.annotations && typeOrFunc.annotations !== parentCtor.annotations) {\n var annotations = typeOrFunc.annotations;\n if (typeof annotations === 'function' && annotations.annotations) {\n annotations = annotations.annotations;\n }\n return annotations;\n }\n // API of tsickle for lowering decorators to properties on the class.\n if (typeOrFunc.decorators && typeOrFunc.decorators !== parentCtor.decorators) {\n return convertTsickleDecoratorIntoMetadata(typeOrFunc.decorators);\n }\n // API for metadata created by invoking the decorators.\n if (typeOrFunc.hasOwnProperty(ANNOTATIONS)) {\n return typeOrFunc[ANNOTATIONS];\n }\n return null;\n };\n ReflectionCapabilities.prototype.annotations = function (typeOrFunc) {\n if (!isType(typeOrFunc)) {\n return [];\n }\n var parentCtor = getParentCtor(typeOrFunc);\n var ownAnnotations = this._ownAnnotations(typeOrFunc, parentCtor) || [];\n var parentAnnotations = parentCtor !== Object ? this.annotations(parentCtor) : [];\n return parentAnnotations.concat(ownAnnotations);\n };\n ReflectionCapabilities.prototype._ownPropMetadata = function (typeOrFunc, parentCtor) {\n // Prefer the direct API.\n if (typeOrFunc.propMetadata &&\n typeOrFunc.propMetadata !== parentCtor.propMetadata) {\n var propMetadata = typeOrFunc.propMetadata;\n if (typeof propMetadata === 'function' && propMetadata.propMetadata) {\n propMetadata = propMetadata.propMetadata;\n }\n return propMetadata;\n }\n // API of tsickle for lowering decorators to properties on the class.\n if (typeOrFunc.propDecorators &&\n typeOrFunc.propDecorators !== parentCtor.propDecorators) {\n var propDecorators_1 = typeOrFunc.propDecorators;\n var propMetadata_1 = {};\n Object.keys(propDecorators_1).forEach(function (prop) {\n propMetadata_1[prop] = convertTsickleDecoratorIntoMetadata(propDecorators_1[prop]);\n });\n return propMetadata_1;\n }\n // API for metadata created by invoking the decorators.\n if (typeOrFunc.hasOwnProperty(PROP_METADATA)) {\n return typeOrFunc[PROP_METADATA];\n }\n return null;\n };\n ReflectionCapabilities.prototype.propMetadata = function (typeOrFunc) {\n if (!isType(typeOrFunc)) {\n return {};\n }\n var parentCtor = getParentCtor(typeOrFunc);\n var propMetadata = {};\n if (parentCtor !== Object) {\n var parentPropMetadata_1 = this.propMetadata(parentCtor);\n Object.keys(parentPropMetadata_1).forEach(function (propName) {\n propMetadata[propName] = parentPropMetadata_1[propName];\n });\n }\n var ownPropMetadata = this._ownPropMetadata(typeOrFunc, parentCtor);\n if (ownPropMetadata) {\n Object.keys(ownPropMetadata).forEach(function (propName) {\n var decorators = [];\n if (propMetadata.hasOwnProperty(propName)) {\n decorators.push.apply(decorators, __spread(propMetadata[propName]));\n }\n decorators.push.apply(decorators, __spread(ownPropMetadata[propName]));\n propMetadata[propName] = decorators;\n });\n }\n return propMetadata;\n };\n ReflectionCapabilities.prototype.ownPropMetadata = function (typeOrFunc) {\n if (!isType(typeOrFunc)) {\n return {};\n }\n return this._ownPropMetadata(typeOrFunc, getParentCtor(typeOrFunc)) || {};\n };\n ReflectionCapabilities.prototype.hasLifecycleHook = function (type, lcProperty) {\n return type instanceof Type && lcProperty in type.prototype;\n };\n ReflectionCapabilities.prototype.guards = function (type) {\n return {};\n };\n ReflectionCapabilities.prototype.getter = function (name) {\n return new Function('o', 'return o.' + name + ';');\n };\n ReflectionCapabilities.prototype.setter = function (name) {\n return new Function('o', 'v', 'return o.' + name + ' = v;');\n };\n ReflectionCapabilities.prototype.method = function (name) {\n var functionBody = \"if (!o.\" + name + \") throw new Error('\\\"\" + name + \"\\\" is undefined');\\n return o.\" + name + \".apply(o, args);\";\n return new Function('o', 'args', functionBody);\n };\n // There is not a concept of import uri in Js, but this is useful in developing Dart applications.\n ReflectionCapabilities.prototype.importUri = function (type) {\n // StaticSymbol\n if (typeof type === 'object' && type['filePath']) {\n return type['filePath'];\n }\n // Runtime type\n return \"./\" + stringify(type);\n };\n ReflectionCapabilities.prototype.resourceUri = function (type) {\n return \"./\" + stringify(type);\n };\n ReflectionCapabilities.prototype.resolveIdentifier = function (name, moduleUrl, members, runtime) {\n return runtime;\n };\n ReflectionCapabilities.prototype.resolveEnum = function (enumIdentifier, name) {\n return enumIdentifier[name];\n };\n return ReflectionCapabilities;\n }());\n function convertTsickleDecoratorIntoMetadata(decoratorInvocations) {\n if (!decoratorInvocations) {\n return [];\n }\n return decoratorInvocations.map(function (decoratorInvocation) {\n var decoratorType = decoratorInvocation.type;\n var annotationCls = decoratorType.annotationCls;\n var annotationArgs = decoratorInvocation.args ? decoratorInvocation.args : [];\n return new (annotationCls.bind.apply(annotationCls, __spread([void 0], annotationArgs)))();\n });\n }\n function getParentCtor(ctor) {\n var parentProto = ctor.prototype ? Object.getPrototypeOf(ctor.prototype) : null;\n var parentCtor = parentProto ? parentProto.constructor : null;\n // Note: We always use `Object` as the null value\n // to simplify checking later on.\n return parentCtor || Object;\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 var _THROW_IF_NOT_FOUND = {};\n var THROW_IF_NOT_FOUND = _THROW_IF_NOT_FOUND;\n /*\n * Name of a property (that we patch onto DI decorator), which is used as an annotation of which\n * InjectFlag this decorator represents. This allows to avoid direct references to the DI decorators\n * in the code, thus making them tree-shakable.\n */\n var DI_DECORATOR_FLAG = '__NG_DI_FLAG__';\n var NG_TEMP_TOKEN_PATH = 'ngTempTokenPath';\n var NG_TOKEN_PATH = 'ngTokenPath';\n var NEW_LINE = /\\n/gm;\n var NO_NEW_LINE = 'ɵ';\n var SOURCE = '__source';\n var ɵ0$2 = getClosureSafeProperty;\n var USE_VALUE = getClosureSafeProperty({ provide: String, useValue: ɵ0$2 });\n /**\n * Current injector value used by `inject`.\n * - `undefined`: it is an error to call `inject`\n * - `null`: `inject` can be called but there is no injector (limp-mode).\n * - Injector instance: Use the injector for resolution.\n */\n var _currentInjector = undefined;\n function setCurrentInjector(injector) {\n var former = _currentInjector;\n _currentInjector = injector;\n return former;\n }\n function injectInjectorOnly(token, flags) {\n if (flags === void 0) { flags = exports.InjectFlags.Default; }\n if (_currentInjector === undefined) {\n throw new Error(\"inject() must be called from an injection context\");\n }\n else if (_currentInjector === null) {\n return injectRootLimpMode(token, undefined, flags);\n }\n else {\n return _currentInjector.get(token, flags & exports.InjectFlags.Optional ? null : undefined, flags);\n }\n }\n function ɵɵinject(token, flags) {\n if (flags === void 0) { flags = exports.InjectFlags.Default; }\n return (getInjectImplementation() || injectInjectorOnly)(resolveForwardRef(token), flags);\n }\n /**\n * Throws an error indicating that a factory function could not be generated by the compiler for a\n * particular class.\n *\n * This instruction allows the actual error message to be optimized away when ngDevMode is turned\n * off, saving bytes of generated code while still providing a good experience in dev mode.\n *\n * The name of the class is not mentioned here, but will be in the generated factory function name\n * and thus in the stack trace.\n *\n * @codeGenApi\n */\n function ɵɵinvalidFactoryDep(index) {\n var msg = ngDevMode ?\n \"This constructor is not compatible with Angular Dependency Injection because its dependency at index \" + index + \" of the parameter list is invalid.\\nThis can happen if the dependency type is a primitive like a string or if an ancestor of this class is missing an Angular decorator.\\n\\nPlease check that 1) the type for the parameter at index \" + index + \" is correct and 2) the correct Angular decorators are defined for this class and its ancestors.\" :\n 'invalid';\n throw new Error(msg);\n }\n /**\n * Injects a token from the currently active injector.\n *\n * Must be used in the context of a factory function such as one defined for an\n * `InjectionToken`. Throws an error if not called from such a context.\n *\n * Within such a factory function, using this function to request injection of a dependency\n * is faster and more type-safe than providing an additional array of dependencies\n * (as has been common with `useFactory` providers).\n *\n * @param token The injection token for the dependency to be injected.\n * @param flags Optional flags that control how injection is executed.\n * The flags correspond to injection strategies that can be specified with\n * parameter decorators `@Host`, `@Self`, `@SkipSef`, and `@Optional`.\n * @returns the injected value if injection is successful, `null` otherwise.\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example core/di/ts/injector_spec.ts region='ShakableInjectionToken'}\n *\n * @publicApi\n */\n var inject = ɵɵinject;\n function injectArgs(types) {\n var args = [];\n for (var i = 0; i < types.length; i++) {\n var arg = resolveForwardRef(types[i]);\n if (Array.isArray(arg)) {\n if (arg.length === 0) {\n throw new Error('Arguments array must have arguments.');\n }\n var type = undefined;\n var flags = exports.InjectFlags.Default;\n for (var j = 0; j < arg.length; j++) {\n var meta = arg[j];\n var flag = getInjectFlag(meta);\n if (typeof flag === 'number') {\n // Special case when we handle @Inject decorator.\n if (flag === -1 /* Inject */) {\n type = meta.token;\n }\n else {\n flags |= flag;\n }\n }\n else {\n type = meta;\n }\n }\n args.push(ɵɵinject(type, flags));\n }\n else {\n args.push(ɵɵinject(arg));\n }\n }\n return args;\n }\n /**\n * Attaches a given InjectFlag to a given decorator using monkey-patching.\n * Since DI decorators can be used in providers `deps` array (when provider is configured using\n * `useFactory`) without initialization (e.g. `Host`) and as an instance (e.g. `new Host()`), we\n * attach the flag to make it available both as a static property and as a field on decorator\n * instance.\n *\n * @param decorator Provided DI decorator.\n * @param flag InjectFlag that should be applied.\n */\n function attachInjectFlag(decorator, flag) {\n decorator[DI_DECORATOR_FLAG] = flag;\n decorator.prototype[DI_DECORATOR_FLAG] = flag;\n return decorator;\n }\n /**\n * Reads monkey-patched property that contains InjectFlag attached to a decorator.\n *\n * @param token Token that may contain monkey-patched DI flags property.\n */\n function getInjectFlag(token) {\n return token[DI_DECORATOR_FLAG];\n }\n function catchInjectorError(e, token, injectorErrorName, source) {\n var tokenPath = e[NG_TEMP_TOKEN_PATH];\n if (token[SOURCE]) {\n tokenPath.unshift(token[SOURCE]);\n }\n e.message = formatError('\\n' + e.message, tokenPath, injectorErrorName, source);\n e[NG_TOKEN_PATH] = tokenPath;\n e[NG_TEMP_TOKEN_PATH] = null;\n throw e;\n }\n function formatError(text, obj, injectorErrorName, source) {\n if (source === void 0) { source = null; }\n text = text && text.charAt(0) === '\\n' && text.charAt(1) == NO_NEW_LINE ? text.substr(2) : text;\n var context = stringify(obj);\n if (Array.isArray(obj)) {\n context = obj.map(stringify).join(' -> ');\n }\n else if (typeof obj === 'object') {\n var parts = [];\n for (var key in obj) {\n if (obj.hasOwnProperty(key)) {\n var value = obj[key];\n parts.push(key + ':' + (typeof value === 'string' ? JSON.stringify(value) : stringify(value)));\n }\n }\n context = \"{\" + parts.join(', ') + \"}\";\n }\n return \"\" + injectorErrorName + (source ? '(' + source + ')' : '') + \"[\" + context + \"]: \" + text.replace(NEW_LINE, '\\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 var ɵ0$3 = function (token) { return ({ token: token }); };\n /**\n * Inject decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\n var Inject = attachInjectFlag(\n // Disable tslint because `DecoratorFlags` is a const enum which gets inlined.\n // tslint:disable-next-line: no-toplevel-property-access\n makeParamDecorator('Inject', ɵ0$3), -1 /* Inject */);\n /**\n * Optional decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\n var Optional = \n // Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n // tslint:disable-next-line: no-toplevel-property-access\n attachInjectFlag(makeParamDecorator('Optional'), 8 /* Optional */);\n /**\n * Self decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\n var Self = \n // Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n // tslint:disable-next-line: no-toplevel-property-access\n attachInjectFlag(makeParamDecorator('Self'), 2 /* Self */);\n /**\n * `SkipSelf` decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\n var SkipSelf = \n // Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n // tslint:disable-next-line: no-toplevel-property-access\n attachInjectFlag(makeParamDecorator('SkipSelf'), 4 /* SkipSelf */);\n /**\n * Host decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\n var Host = \n // Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n // tslint:disable-next-line: no-toplevel-property-access\n attachInjectFlag(makeParamDecorator('Host'), 1 /* Host */);\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 var _reflect = null;\n function getReflect() {\n return (_reflect = _reflect || new ReflectionCapabilities());\n }\n function reflectDependencies(type) {\n return convertDependencies(getReflect().parameters(type));\n }\n function convertDependencies(deps) {\n var compiler = getCompilerFacade();\n return deps.map(function (dep) { return reflectDependency(compiler, dep); });\n }\n function reflectDependency(compiler, dep) {\n var meta = {\n token: null,\n host: false,\n optional: false,\n resolved: compiler.R3ResolvedDependencyType.Token,\n self: false,\n skipSelf: false,\n };\n function setTokenAndResolvedType(token) {\n meta.resolved = compiler.R3ResolvedDependencyType.Token;\n meta.token = token;\n }\n if (Array.isArray(dep) && dep.length > 0) {\n for (var j = 0; j < dep.length; j++) {\n var param = dep[j];\n if (param === undefined) {\n // param may be undefined if type of dep is not set by ngtsc\n continue;\n }\n var proto = Object.getPrototypeOf(param);\n if (param instanceof Optional || proto.ngMetadataName === 'Optional') {\n meta.optional = true;\n }\n else if (param instanceof SkipSelf || proto.ngMetadataName === 'SkipSelf') {\n meta.skipSelf = true;\n }\n else if (param instanceof Self || proto.ngMetadataName === 'Self') {\n meta.self = true;\n }\n else if (param instanceof Host || proto.ngMetadataName === 'Host') {\n meta.host = true;\n }\n else if (param instanceof Inject) {\n meta.token = param.token;\n }\n else if (param instanceof Attribute) {\n if (param.attributeName === undefined) {\n throw new Error(\"Attribute name must be defined.\");\n }\n meta.token = param.attributeName;\n meta.resolved = compiler.R3ResolvedDependencyType.Attribute;\n }\n else if (param.__ChangeDetectorRef__ === true) {\n meta.token = param;\n meta.resolved = compiler.R3ResolvedDependencyType.ChangeDetectorRef;\n }\n else {\n setTokenAndResolvedType(param);\n }\n }\n }\n else if (dep === undefined || (Array.isArray(dep) && dep.length === 0)) {\n meta.token = undefined;\n meta.resolved = R3ResolvedDependencyType.Invalid;\n }\n else {\n setTokenAndResolvedType(dep);\n }\n return meta;\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 * Used to resolve resource URLs on `@Component` when used with JIT compilation.\n *\n * Example:\n * ```\n * @Component({\n * selector: 'my-comp',\n * templateUrl: 'my-comp.html', // This requires asynchronous resolution\n * })\n * class MyComponent{\n * }\n *\n * // Calling `renderComponent` will fail because `renderComponent` is a synchronous process\n * // and `MyComponent`'s `@Component.templateUrl` needs to be resolved asynchronously.\n *\n * // Calling `resolveComponentResources()` will resolve `@Component.templateUrl` into\n * // `@Component.template`, which allows `renderComponent` to proceed in a synchronous manner.\n *\n * // Use browser's `fetch()` function as the default resource resolution strategy.\n * resolveComponentResources(fetch).then(() => {\n * // After resolution all URLs have been converted into `template` strings.\n * renderComponent(MyComponent);\n * });\n *\n * ```\n *\n * NOTE: In AOT the resolution happens during compilation, and so there should be no need\n * to call this method outside JIT mode.\n *\n * @param resourceResolver a function which is responsible for returning a `Promise` to the\n * contents of the resolved URL. Browser's `fetch()` method is a good default implementation.\n */\n function resolveComponentResources(resourceResolver) {\n // Store all promises which are fetching the resources.\n var componentResolved = [];\n // Cache so that we don't fetch the same resource more than once.\n var urlMap = new Map();\n function cachedResourceResolve(url) {\n var promise = urlMap.get(url);\n if (!promise) {\n var resp = resourceResolver(url);\n urlMap.set(url, promise = resp.then(unwrapResponse));\n }\n return promise;\n }\n componentResourceResolutionQueue.forEach(function (component, type) {\n var promises = [];\n if (component.templateUrl) {\n promises.push(cachedResourceResolve(component.templateUrl).then(function (template) {\n component.template = template;\n }));\n }\n var styleUrls = component.styleUrls;\n var styles = component.styles || (component.styles = []);\n var styleOffset = component.styles.length;\n styleUrls && styleUrls.forEach(function (styleUrl, index) {\n styles.push(''); // pre-allocate array.\n promises.push(cachedResourceResolve(styleUrl).then(function (style) {\n styles[styleOffset + index] = style;\n styleUrls.splice(styleUrls.indexOf(styleUrl), 1);\n if (styleUrls.length == 0) {\n component.styleUrls = undefined;\n }\n }));\n });\n var fullyResolved = Promise.all(promises).then(function () { return componentDefResolved(type); });\n componentResolved.push(fullyResolved);\n });\n clearResolutionOfComponentResourcesQueue();\n return Promise.all(componentResolved).then(function () { return undefined; });\n }\n var componentResourceResolutionQueue = new Map();\n // Track when existing ɵcmp for a Type is waiting on resources.\n var componentDefPendingResolution = new Set();\n function maybeQueueResolutionOfComponentResources(type, metadata) {\n if (componentNeedsResolution(metadata)) {\n componentResourceResolutionQueue.set(type, metadata);\n componentDefPendingResolution.add(type);\n }\n }\n function isComponentDefPendingResolution(type) {\n return componentDefPendingResolution.has(type);\n }\n function componentNeedsResolution(component) {\n return !!((component.templateUrl && !component.hasOwnProperty('template')) ||\n component.styleUrls && component.styleUrls.length);\n }\n function clearResolutionOfComponentResourcesQueue() {\n var old = componentResourceResolutionQueue;\n componentResourceResolutionQueue = new Map();\n return old;\n }\n function restoreComponentResolutionQueue(queue) {\n componentDefPendingResolution.clear();\n queue.forEach(function (_, type) { return componentDefPendingResolution.add(type); });\n componentResourceResolutionQueue = queue;\n }\n function isComponentResourceResolutionQueueEmpty() {\n return componentResourceResolutionQueue.size === 0;\n }\n function unwrapResponse(response) {\n return typeof response == 'string' ? response : response.text();\n }\n function componentDefResolved(type) {\n componentDefPendingResolution.delete(type);\n }\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 */\n var 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 */\n function getPolicy() {\n if (policy === undefined) {\n policy = null;\n if (_global.trustedTypes) {\n try {\n policy = _global.trustedTypes.createPolicy('angular', {\n createHTML: function (s) { return s; },\n createScript: function (s) { return s; },\n createScriptURL: function (s) { return s; },\n });\n }\n catch (_a) {\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 TrustedHTML, falling back to strings when\n * Trusted Types are not available.\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 the\n * provided string will never cause an XSS vulnerability if used in a context\n * that will be interpreted as HTML by a browser, e.g. when assigning to\n * element.innerHTML.\n */\n function trustedHTMLFromString(html) {\n var _a;\n return ((_a = getPolicy()) === null || _a === void 0 ? void 0 : _a.createHTML(html)) || html;\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 */\n function trustedScriptFromString(script) {\n var _a;\n return ((_a = getPolicy()) === null || _a === void 0 ? void 0 : _a.createScript(script)) || script;\n }\n /**\n * Unsafely promote a string to a TrustedScriptURL, falling back to strings\n * when Trusted Types are not available.\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 the\n * provided string will never cause an XSS vulnerability if used in a context\n * that will cause a browser to load and execute a resource, e.g. when\n * assigning to script.src.\n */\n function trustedScriptURLFromString(url) {\n var _a;\n return ((_a = getPolicy()) === null || _a === void 0 ? void 0 : _a.createScriptURL(url)) || url;\n }\n /**\n * Unsafely call the Function constructor with the given string arguments. It\n * is only available in development mode, and should be stripped out of\n * production code.\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 development code, as use in production code can lead to\n * XSS vulnerabilities.\n */\n function newTrustedFunctionForDev() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (typeof ngDevMode === 'undefined') {\n throw new Error('newTrustedFunctionForDev should never be called in production');\n }\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.bind.apply(Function, __spread([void 0], 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 var fnArgs = args.slice(0, -1).join(',');\n var fnBody = args[args.length - 1];\n var 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 var 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.bind.apply(Function, __spread([void 0], 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 = function () { return 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 * 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 */\n var policy$1;\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 */\n function getPolicy$1() {\n if (policy$1 === undefined) {\n policy$1 = null;\n if (_global.trustedTypes) {\n try {\n policy$1 = _global.trustedTypes\n .createPolicy('angular#unsafe-bypass', {\n createHTML: function (s) { return s; },\n createScript: function (s) { return s; },\n createScriptURL: function (s) { return s; },\n });\n }\n catch (_a) {\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$1;\n }\n /**\n * Unsafely promote a string to a TrustedHTML, falling back to strings when\n * Trusted Types are not available.\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 passed strings that come directly from custom sanitizers or the\n * bypassSecurityTrust* functions.\n */\n function trustedHTMLFromStringBypass(html) {\n var _a;\n return ((_a = getPolicy$1()) === null || _a === void 0 ? void 0 : _a.createHTML(html)) || html;\n }\n /**\n * Unsafely promote a string to a TrustedScript, falling back to strings when\n * Trusted Types are not available.\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 passed strings that come directly from custom sanitizers or the\n * bypassSecurityTrust* functions.\n */\n function trustedScriptFromStringBypass(script) {\n var _a;\n return ((_a = getPolicy$1()) === null || _a === void 0 ? void 0 : _a.createScript(script)) || script;\n }\n /**\n * Unsafely promote a string to a TrustedScriptURL, falling back to strings\n * when Trusted Types are not available.\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 passed strings that come directly from custom sanitizers or the\n * bypassSecurityTrust* functions.\n */\n function trustedScriptURLFromStringBypass(url) {\n var _a;\n return ((_a = getPolicy$1()) === null || _a === void 0 ? void 0 : _a.createScriptURL(url)) || url;\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 var SafeValueImpl = /** @class */ (function () {\n function SafeValueImpl(changingThisBreaksApplicationSecurity) {\n this.changingThisBreaksApplicationSecurity = changingThisBreaksApplicationSecurity;\n }\n SafeValueImpl.prototype.toString = function () {\n return \"SafeValue must use [property]=binding: \" + this.changingThisBreaksApplicationSecurity +\n \" (see https://g.co/ng/security#xss)\";\n };\n return SafeValueImpl;\n }());\n var SafeHtmlImpl = /** @class */ (function (_super) {\n __extends(SafeHtmlImpl, _super);\n function SafeHtmlImpl() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SafeHtmlImpl.prototype.getTypeName = function () {\n return \"HTML\" /* Html */;\n };\n return SafeHtmlImpl;\n }(SafeValueImpl));\n var SafeStyleImpl = /** @class */ (function (_super) {\n __extends(SafeStyleImpl, _super);\n function SafeStyleImpl() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SafeStyleImpl.prototype.getTypeName = function () {\n return \"Style\" /* Style */;\n };\n return SafeStyleImpl;\n }(SafeValueImpl));\n var SafeScriptImpl = /** @class */ (function (_super) {\n __extends(SafeScriptImpl, _super);\n function SafeScriptImpl() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SafeScriptImpl.prototype.getTypeName = function () {\n return \"Script\" /* Script */;\n };\n return SafeScriptImpl;\n }(SafeValueImpl));\n var SafeUrlImpl = /** @class */ (function (_super) {\n __extends(SafeUrlImpl, _super);\n function SafeUrlImpl() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SafeUrlImpl.prototype.getTypeName = function () {\n return \"URL\" /* Url */;\n };\n return SafeUrlImpl;\n }(SafeValueImpl));\n var SafeResourceUrlImpl = /** @class */ (function (_super) {\n __extends(SafeResourceUrlImpl, _super);\n function SafeResourceUrlImpl() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SafeResourceUrlImpl.prototype.getTypeName = function () {\n return \"ResourceURL\" /* ResourceUrl */;\n };\n return SafeResourceUrlImpl;\n }(SafeValueImpl));\n function unwrapSafeValue(value) {\n return value instanceof SafeValueImpl ? value.changingThisBreaksApplicationSecurity :\n value;\n }\n function allowSanitizationBypassAndThrow(value, type) {\n var actualType = getSanitizationBypassType(value);\n if (actualType != null && actualType !== type) {\n // Allow ResourceURLs in URL contexts, they are strictly more trusted.\n if (actualType === \"ResourceURL\" /* ResourceUrl */ && type === \"URL\" /* Url */)\n return true;\n throw new Error(\"Required a safe \" + type + \", got a \" + actualType + \" (see https://g.co/ng/security#xss)\");\n }\n return actualType === type;\n }\n function getSanitizationBypassType(value) {\n return value instanceof SafeValueImpl && value.getTypeName() || null;\n }\n /**\n * Mark `html` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link htmlSanitizer} to be trusted implicitly.\n *\n * @param trustedHtml `html` string which needs to be implicitly trusted.\n * @returns a `html` which has been branded to be implicitly trusted.\n */\n function bypassSanitizationTrustHtml(trustedHtml) {\n return new SafeHtmlImpl(trustedHtml);\n }\n /**\n * Mark `style` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link styleSanitizer} to be trusted implicitly.\n *\n * @param trustedStyle `style` string which needs to be implicitly trusted.\n * @returns a `style` hich has been branded to be implicitly trusted.\n */\n function bypassSanitizationTrustStyle(trustedStyle) {\n return new SafeStyleImpl(trustedStyle);\n }\n /**\n * Mark `script` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link scriptSanitizer} to be trusted implicitly.\n *\n * @param trustedScript `script` string which needs to be implicitly trusted.\n * @returns a `script` which has been branded to be implicitly trusted.\n */\n function bypassSanitizationTrustScript(trustedScript) {\n return new SafeScriptImpl(trustedScript);\n }\n /**\n * Mark `url` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link urlSanitizer} to be trusted implicitly.\n *\n * @param trustedUrl `url` string which needs to be implicitly trusted.\n * @returns a `url` which has been branded to be implicitly trusted.\n */\n function bypassSanitizationTrustUrl(trustedUrl) {\n return new SafeUrlImpl(trustedUrl);\n }\n /**\n * Mark `url` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link resourceUrlSanitizer} to be trusted implicitly.\n *\n * @param trustedResourceUrl `url` string which needs to be implicitly trusted.\n * @returns a `url` which has been branded to be implicitly trusted.\n */\n function bypassSanitizationTrustResourceUrl(trustedResourceUrl) {\n return new SafeResourceUrlImpl(trustedResourceUrl);\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 helper is used to get hold of an inert tree of DOM elements containing dirty HTML\n * that needs sanitizing.\n * Depending upon browser support we use one of two strategies for doing this.\n * Default: DOMParser strategy\n * Fallback: InertDocument strategy\n */\n function getInertBodyHelper(defaultDoc) {\n var inertDocumentHelper = new InertDocumentHelper(defaultDoc);\n return isDOMParserAvailable() ? new DOMParserHelper(inertDocumentHelper) : inertDocumentHelper;\n }\n /**\n * Uses DOMParser to create and fill an inert body element.\n * This is the default strategy used in browsers that support it.\n */\n var DOMParserHelper = /** @class */ (function () {\n function DOMParserHelper(inertDocumentHelper) {\n this.inertDocumentHelper = inertDocumentHelper;\n }\n DOMParserHelper.prototype.getInertBodyElement = function (html) {\n // We add these extra elements to ensure that the rest of the content is parsed as expected\n // e.g. leading whitespace is maintained and tags like `<meta>` do not get hoisted to the\n // `<head>` tag. Note that the `<body>` tag is closed implicitly to prevent unclosed tags\n // in `html` from consuming the otherwise explicit `</body>` tag.\n html = '<body><remove></remove>' + html;\n try {\n var body = new window.DOMParser()\n .parseFromString(trustedHTMLFromString(html), 'text/html')\n .body;\n if (body === null) {\n // In some browsers (e.g. Mozilla/5.0 iPad AppleWebKit Mobile) the `body` property only\n // becomes available in the following tick of the JS engine. In that case we fall back to\n // the `inertDocumentHelper` instead.\n return this.inertDocumentHelper.getInertBodyElement(html);\n }\n body.removeChild(body.firstChild);\n return body;\n }\n catch (_a) {\n return null;\n }\n };\n return DOMParserHelper;\n }());\n /**\n * Use an HTML5 `template` element, if supported, or an inert body element created via\n * `createHtmlDocument` to create and fill an inert DOM element.\n * This is the fallback strategy if the browser does not support DOMParser.\n */\n var InertDocumentHelper = /** @class */ (function () {\n function InertDocumentHelper(defaultDoc) {\n this.defaultDoc = defaultDoc;\n this.inertDocument = this.defaultDoc.implementation.createHTMLDocument('sanitization-inert');\n if (this.inertDocument.body == null) {\n // usually there should be only one body element in the document, but IE doesn't have any, so\n // we need to create one.\n var inertHtml = this.inertDocument.createElement('html');\n this.inertDocument.appendChild(inertHtml);\n var inertBodyElement = this.inertDocument.createElement('body');\n inertHtml.appendChild(inertBodyElement);\n }\n }\n InertDocumentHelper.prototype.getInertBodyElement = function (html) {\n // Prefer using <template> element if supported.\n var templateEl = this.inertDocument.createElement('template');\n if ('content' in templateEl) {\n templateEl.innerHTML = trustedHTMLFromString(html);\n return templateEl;\n }\n // Note that previously we used to do something like `this.inertDocument.body.innerHTML = html`\n // and we returned the inert `body` node. This was changed, because IE seems to treat setting\n // `innerHTML` on an inserted element differently, compared to one that hasn't been inserted\n // yet. In particular, IE appears to split some of the text into multiple text nodes rather\n // than keeping them in a single one which ends up messing with Ivy's i18n parsing further\n // down the line. This has been worked around by creating a new inert `body` and using it as\n // the root node in which we insert the HTML.\n var inertBody = this.inertDocument.createElement('body');\n inertBody.innerHTML = trustedHTMLFromString(html);\n // Support: IE 11 only\n // strip custom-namespaced attributes on IE<=11\n if (this.defaultDoc.documentMode) {\n this.stripCustomNsAttrs(inertBody);\n }\n return inertBody;\n };\n /**\n * When IE11 comes across an unknown namespaced attribute e.g. 'xlink:foo' it adds 'xmlns:ns1'\n * attribute to declare ns1 namespace and prefixes the attribute with 'ns1' (e.g.\n * 'ns1:xlink:foo').\n *\n * This is undesirable since we don't want to allow any of these custom attributes. This method\n * strips them all.\n */\n InertDocumentHelper.prototype.stripCustomNsAttrs = function (el) {\n var elAttrs = el.attributes;\n // loop backwards so that we can support removals.\n for (var i = elAttrs.length - 1; 0 < i; i--) {\n var attrib = elAttrs.item(i);\n var attrName = attrib.name;\n if (attrName === 'xmlns:ns1' || attrName.indexOf('ns1:') === 0) {\n el.removeAttribute(attrName);\n }\n }\n var childNode = el.firstChild;\n while (childNode) {\n if (childNode.nodeType === Node.ELEMENT_NODE)\n this.stripCustomNsAttrs(childNode);\n childNode = childNode.nextSibling;\n }\n };\n return InertDocumentHelper;\n }());\n /**\n * We need to determine whether the DOMParser exists in the global context and\n * supports parsing HTML; HTML parsing support is not as wide as other formats, see\n * https://developer.mozilla.org/en-US/docs/Web/API/DOMParser#Browser_compatibility.\n *\n * @suppress {uselessCode}\n */\n function isDOMParserAvailable() {\n try {\n return !!new window.DOMParser().parseFromString(trustedHTMLFromString(''), 'text/html');\n }\n catch (_a) {\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 * A pattern that recognizes a commonly useful subset of URLs that are safe.\n *\n * This regular expression matches a subset of URLs that will not cause script\n * execution if used in URL context within a HTML document. Specifically, this\n * regular expression matches if (comment from here on and regex copied from\n * Soy's EscapingConventions):\n * (1) Either an allowed protocol (http, https, mailto or ftp).\n * (2) or no protocol. A protocol must be followed by a colon. The below\n * allows that by allowing colons only after one of the characters [/?#].\n * A colon after a hash (#) must be in the fragment.\n * Otherwise, a colon after a (?) must be in a query.\n * Otherwise, a colon after a single solidus (/) must be in a path.\n * Otherwise, a colon after a double solidus (//) must be in the authority\n * (before port).\n *\n * The pattern disallows &, used in HTML entity declarations before\n * one of the characters in [/?#]. This disallows HTML entities used in the\n * protocol name, which should never happen, e.g. \"h&#116;tp\" for \"http\".\n * It also disallows HTML entities in the first path part of a relative path,\n * e.g. \"foo&lt;bar/baz\". Our existing escaping functions should not produce\n * that. More importantly, it disallows masking of a colon,\n * e.g. \"javascript&#58;...\".\n *\n * This regular expression was taken from the Closure sanitization library.\n */\n var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file|sms):|[^&:/?#]*(?:[/?#]|$))/gi;\n /* A pattern that matches safe srcset values */\n var SAFE_SRCSET_PATTERN = /^(?:(?:https?|file):|[^&:/?#]*(?:[/?#]|$))/gi;\n /** A pattern that matches safe data URLs. Only matches image, video and audio types. */\n var DATA_URL_PATTERN = /^data:(?:image\\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\\/(?:mpeg|mp4|ogg|webm)|audio\\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\\/]+=*$/i;\n function _sanitizeUrl(url) {\n url = String(url);\n if (url.match(SAFE_URL_PATTERN) || url.match(DATA_URL_PATTERN))\n return url;\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n console.warn(\"WARNING: sanitizing unsafe URL value \" + url + \" (see https://g.co/ng/security#xss)\");\n }\n return 'unsafe:' + url;\n }\n function sanitizeSrcset(srcset) {\n srcset = String(srcset);\n return srcset.split(',').map(function (srcset) { return _sanitizeUrl(srcset.trim()); }).join(', ');\n }\n\n function tagSet(tags) {\n var e_1, _a;\n var res = {};\n try {\n for (var _b = __values(tags.split(',')), _c = _b.next(); !_c.done; _c = _b.next()) {\n var t = _c.value;\n res[t] = true;\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return res;\n }\n function merge() {\n var e_2, _a;\n var sets = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n sets[_i] = arguments[_i];\n }\n var res = {};\n try {\n for (var sets_1 = __values(sets), sets_1_1 = sets_1.next(); !sets_1_1.done; sets_1_1 = sets_1.next()) {\n var s = sets_1_1.value;\n for (var v in s) {\n if (s.hasOwnProperty(v))\n res[v] = true;\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (sets_1_1 && !sets_1_1.done && (_a = sets_1.return)) _a.call(sets_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n return res;\n }\n // Good source of info about elements and attributes\n // https://html.spec.whatwg.org/#semantics\n // https://simon.html5.org/html-elements\n // Safe Void Elements - HTML5\n // https://html.spec.whatwg.org/#void-elements\n var VOID_ELEMENTS = tagSet('area,br,col,hr,img,wbr');\n // Elements that you can, intentionally, leave open (and which close themselves)\n // https://html.spec.whatwg.org/#optional-tags\n var OPTIONAL_END_TAG_BLOCK_ELEMENTS = tagSet('colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr');\n var OPTIONAL_END_TAG_INLINE_ELEMENTS = tagSet('rp,rt');\n var OPTIONAL_END_TAG_ELEMENTS = merge(OPTIONAL_END_TAG_INLINE_ELEMENTS, OPTIONAL_END_TAG_BLOCK_ELEMENTS);\n // Safe Block Elements - HTML5\n var BLOCK_ELEMENTS = merge(OPTIONAL_END_TAG_BLOCK_ELEMENTS, tagSet('address,article,' +\n 'aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,' +\n 'h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul'));\n // Inline Elements - HTML5\n var INLINE_ELEMENTS = merge(OPTIONAL_END_TAG_INLINE_ELEMENTS, tagSet('a,abbr,acronym,audio,b,' +\n 'bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,' +\n 'samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video'));\n var VALID_ELEMENTS = merge(VOID_ELEMENTS, BLOCK_ELEMENTS, INLINE_ELEMENTS, OPTIONAL_END_TAG_ELEMENTS);\n // Attributes that have href and hence need to be sanitized\n var URI_ATTRS = tagSet('background,cite,href,itemtype,longdesc,poster,src,xlink:href');\n // Attributes that have special href set hence need to be sanitized\n var SRCSET_ATTRS = tagSet('srcset');\n var HTML_ATTRS = tagSet('abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,' +\n 'compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,' +\n 'ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,' +\n 'scope,scrolling,shape,size,sizes,span,srclang,start,summary,tabindex,target,title,translate,type,usemap,' +\n 'valign,value,vspace,width');\n // Accessibility attributes as per WAI-ARIA 1.1 (W3C Working Draft 14 December 2018)\n var ARIA_ATTRS = tagSet('aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,' +\n 'aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,' +\n 'aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,' +\n 'aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,' +\n 'aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,' +\n 'aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,' +\n 'aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext');\n // NB: This currently consciously doesn't support SVG. SVG sanitization has had several security\n // issues in the past, so it seems safer to leave it out if possible. If support for binding SVG via\n // innerHTML is required, SVG attributes should be added here.\n // NB: Sanitization does not allow <form> elements or other active elements (<button> etc). Those\n // can be sanitized, but they increase security surface area without a legitimate use case, so they\n // are left out here.\n var VALID_ATTRS = merge(URI_ATTRS, SRCSET_ATTRS, HTML_ATTRS, ARIA_ATTRS);\n // Elements whose content should not be traversed/preserved, if the elements themselves are invalid.\n //\n // Typically, `<invalid>Some content</invalid>` would traverse (and in this case preserve)\n // `Some content`, but strip `invalid-element` opening/closing tags. For some elements, though, we\n // don't want to preserve the content, if the elements themselves are going to be removed.\n var SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS = tagSet('script,style,template');\n /**\n * SanitizingHtmlSerializer serializes a DOM fragment, stripping out any unsafe elements and unsafe\n * attributes.\n */\n var SanitizingHtmlSerializer = /** @class */ (function () {\n function SanitizingHtmlSerializer() {\n // Explicitly track if something was stripped, to avoid accidentally warning of sanitization just\n // because characters were re-encoded.\n this.sanitizedSomething = false;\n this.buf = [];\n }\n SanitizingHtmlSerializer.prototype.sanitizeChildren = function (el) {\n // This cannot use a TreeWalker, as it has to run on Angular's various DOM adapters.\n // However this code never accesses properties off of `document` before deleting its contents\n // again, so it shouldn't be vulnerable to DOM clobbering.\n var current = el.firstChild;\n var traverseContent = true;\n while (current) {\n if (current.nodeType === Node.ELEMENT_NODE) {\n traverseContent = this.startElement(current);\n }\n else if (current.nodeType === Node.TEXT_NODE) {\n this.chars(current.nodeValue);\n }\n else {\n // Strip non-element, non-text nodes.\n this.sanitizedSomething = true;\n }\n if (traverseContent && current.firstChild) {\n current = current.firstChild;\n continue;\n }\n while (current) {\n // Leaving the element. Walk up and to the right, closing tags as we go.\n if (current.nodeType === Node.ELEMENT_NODE) {\n this.endElement(current);\n }\n var next = this.checkClobberedElement(current, current.nextSibling);\n if (next) {\n current = next;\n break;\n }\n current = this.checkClobberedElement(current, current.parentNode);\n }\n }\n return this.buf.join('');\n };\n /**\n * Sanitizes an opening element tag (if valid) and returns whether the element's contents should\n * be traversed. Element content must always be traversed (even if the element itself is not\n * valid/safe), unless the element is one of `SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS`.\n *\n * @param element The element to sanitize.\n * @return True if the element's contents should be traversed.\n */\n SanitizingHtmlSerializer.prototype.startElement = function (element) {\n var tagName = element.nodeName.toLowerCase();\n if (!VALID_ELEMENTS.hasOwnProperty(tagName)) {\n this.sanitizedSomething = true;\n return !SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS.hasOwnProperty(tagName);\n }\n this.buf.push('<');\n this.buf.push(tagName);\n var elAttrs = element.attributes;\n for (var i = 0; i < elAttrs.length; i++) {\n var elAttr = elAttrs.item(i);\n var attrName = elAttr.name;\n var lower = attrName.toLowerCase();\n if (!VALID_ATTRS.hasOwnProperty(lower)) {\n this.sanitizedSomething = true;\n continue;\n }\n var value = elAttr.value;\n // TODO(martinprobst): Special case image URIs for data:image/...\n if (URI_ATTRS[lower])\n value = _sanitizeUrl(value);\n if (SRCSET_ATTRS[lower])\n value = sanitizeSrcset(value);\n this.buf.push(' ', attrName, '=\"', encodeEntities(value), '\"');\n }\n this.buf.push('>');\n return true;\n };\n SanitizingHtmlSerializer.prototype.endElement = function (current) {\n var tagName = current.nodeName.toLowerCase();\n if (VALID_ELEMENTS.hasOwnProperty(tagName) && !VOID_ELEMENTS.hasOwnProperty(tagName)) {\n this.buf.push('</');\n this.buf.push(tagName);\n this.buf.push('>');\n }\n };\n SanitizingHtmlSerializer.prototype.chars = function (chars) {\n this.buf.push(encodeEntities(chars));\n };\n SanitizingHtmlSerializer.prototype.checkClobberedElement = function (node, nextNode) {\n if (nextNode &&\n (node.compareDocumentPosition(nextNode) &\n Node.DOCUMENT_POSITION_CONTAINED_BY) === Node.DOCUMENT_POSITION_CONTAINED_BY) {\n throw new Error(\"Failed to sanitize html because the element is clobbered: \" + node.outerHTML);\n }\n return nextNode;\n };\n return SanitizingHtmlSerializer;\n }());\n // Regular Expressions for parsing tags and attributes\n var SURROGATE_PAIR_REGEXP = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g;\n // ! to ~ is the ASCII range.\n var NON_ALPHANUMERIC_REGEXP = /([^\\#-~ |!])/g;\n /**\n * Escapes all potentially dangerous characters, so that the\n * resulting string can be safely inserted into attribute or\n * element text.\n * @param value\n */\n function encodeEntities(value) {\n return value.replace(/&/g, '&amp;')\n .replace(SURROGATE_PAIR_REGEXP, function (match) {\n var hi = match.charCodeAt(0);\n var low = match.charCodeAt(1);\n return '&#' + (((hi - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000) + ';';\n })\n .replace(NON_ALPHANUMERIC_REGEXP, function (match) {\n return '&#' + match.charCodeAt(0) + ';';\n })\n .replace(/</g, '&lt;')\n .replace(/>/g, '&gt;');\n }\n var inertBodyHelper;\n /**\n * Sanitizes the given unsafe, untrusted HTML fragment, and returns HTML text that is safe to add to\n * the DOM in a browser environment.\n */\n function _sanitizeHtml(defaultDoc, unsafeHtmlInput) {\n var inertBodyElement = null;\n try {\n inertBodyHelper = inertBodyHelper || getInertBodyHelper(defaultDoc);\n // Make sure unsafeHtml is actually a string (TypeScript types are not enforced at runtime).\n var unsafeHtml = unsafeHtmlInput ? String(unsafeHtmlInput) : '';\n inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeHtml);\n // mXSS protection. Repeatedly parse the document to make sure it stabilizes, so that a browser\n // trying to auto-correct incorrect HTML cannot cause formerly inert HTML to become dangerous.\n var mXSSAttempts = 5;\n var parsedHtml = unsafeHtml;\n do {\n if (mXSSAttempts === 0) {\n throw new Error('Failed to sanitize html because the input is unstable');\n }\n mXSSAttempts--;\n unsafeHtml = parsedHtml;\n parsedHtml = inertBodyElement.innerHTML;\n inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeHtml);\n } while (unsafeHtml !== parsedHtml);\n var sanitizer = new SanitizingHtmlSerializer();\n var safeHtml = sanitizer.sanitizeChildren(getTemplateContent(inertBodyElement) || inertBodyElement);\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && sanitizer.sanitizedSomething) {\n console.warn('WARNING: sanitizing HTML stripped some content, see https://g.co/ng/security#xss');\n }\n return trustedHTMLFromString(safeHtml);\n }\n finally {\n // In case anything goes wrong, clear out inertElement to reset the entire DOM structure.\n if (inertBodyElement) {\n var parent = getTemplateContent(inertBodyElement) || inertBodyElement;\n while (parent.firstChild) {\n parent.removeChild(parent.firstChild);\n }\n }\n }\n }\n function getTemplateContent(el) {\n return 'content' in el /** Microsoft/TypeScript#21517 */ && isTemplateElement(el) ?\n el.content :\n null;\n }\n function isTemplateElement(el) {\n return el.nodeType === Node.ELEMENT_NODE && el.nodeName === 'TEMPLATE';\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 (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 })(exports.SecurityContext || (exports.SecurityContext = {}));\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 `html` sanitizer which converts untrusted `html` **string** into trusted string by removing\n * dangerous content.\n *\n * This method parses the `html` and locates potentially dangerous content (such as urls and\n * javascript) and removes it.\n *\n * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustHtml}.\n *\n * @param unsafeHtml untrusted `html`, typically from the user.\n * @returns `html` string which is safe to display to user, because all of the dangerous javascript\n * and urls have been removed.\n *\n * @codeGenApi\n */\n function ɵɵsanitizeHtml(unsafeHtml) {\n var sanitizer = getSanitizer();\n if (sanitizer) {\n return trustedHTMLFromStringBypass(sanitizer.sanitize(exports.SecurityContext.HTML, unsafeHtml) || '');\n }\n if (allowSanitizationBypassAndThrow(unsafeHtml, \"HTML\" /* Html */)) {\n return trustedHTMLFromStringBypass(unwrapSafeValue(unsafeHtml));\n }\n return _sanitizeHtml(getDocument(), renderStringify(unsafeHtml));\n }\n /**\n * A `style` sanitizer which converts untrusted `style` **string** into trusted string by removing\n * dangerous content.\n *\n * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustStyle}.\n *\n * @param unsafeStyle untrusted `style`, typically from the user.\n * @returns `style` string which is safe to bind to the `style` properties.\n *\n * @codeGenApi\n */\n function ɵɵsanitizeStyle(unsafeStyle) {\n var sanitizer = getSanitizer();\n if (sanitizer) {\n return sanitizer.sanitize(exports.SecurityContext.STYLE, unsafeStyle) || '';\n }\n if (allowSanitizationBypassAndThrow(unsafeStyle, \"Style\" /* Style */)) {\n return unwrapSafeValue(unsafeStyle);\n }\n return renderStringify(unsafeStyle);\n }\n /**\n * A `url` sanitizer which converts untrusted `url` **string** into trusted string by removing\n * dangerous\n * content.\n *\n * This method parses the `url` and locates potentially dangerous content (such as javascript) and\n * removes it.\n *\n * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustUrl}.\n *\n * @param unsafeUrl untrusted `url`, typically from the user.\n * @returns `url` string which is safe to bind to the `src` properties such as `<img src>`, because\n * all of the dangerous javascript has been removed.\n *\n * @codeGenApi\n */\n function ɵɵsanitizeUrl(unsafeUrl) {\n var sanitizer = getSanitizer();\n if (sanitizer) {\n return sanitizer.sanitize(exports.SecurityContext.URL, unsafeUrl) || '';\n }\n if (allowSanitizationBypassAndThrow(unsafeUrl, \"URL\" /* Url */)) {\n return unwrapSafeValue(unsafeUrl);\n }\n return _sanitizeUrl(renderStringify(unsafeUrl));\n }\n /**\n * A `url` sanitizer which only lets trusted `url`s through.\n *\n * This passes only `url`s marked trusted by calling {@link bypassSanitizationTrustResourceUrl}.\n *\n * @param unsafeResourceUrl untrusted `url`, typically from the user.\n * @returns `url` string which is safe to bind to the `src` properties such as `<img src>`, because\n * only trusted `url`s have been allowed to pass.\n *\n * @codeGenApi\n */\n function ɵɵsanitizeResourceUrl(unsafeResourceUrl) {\n var sanitizer = getSanitizer();\n if (sanitizer) {\n return trustedScriptURLFromStringBypass(sanitizer.sanitize(exports.SecurityContext.RESOURCE_URL, unsafeResourceUrl) || '');\n }\n if (allowSanitizationBypassAndThrow(unsafeResourceUrl, \"ResourceURL\" /* ResourceUrl */)) {\n return trustedScriptURLFromStringBypass(unwrapSafeValue(unsafeResourceUrl));\n }\n throw new Error('unsafe value used in a resource URL context (see https://g.co/ng/security#xss)');\n }\n /**\n * A `script` sanitizer which only lets trusted javascript through.\n *\n * This passes only `script`s marked trusted by calling {@link\n * bypassSanitizationTrustScript}.\n *\n * @param unsafeScript untrusted `script`, typically from the user.\n * @returns `url` string which is safe to bind to the `<script>` element such as `<img src>`,\n * because only trusted `scripts` have been allowed to pass.\n *\n * @codeGenApi\n */\n function ɵɵsanitizeScript(unsafeScript) {\n var sanitizer = getSanitizer();\n if (sanitizer) {\n return trustedScriptFromStringBypass(sanitizer.sanitize(exports.SecurityContext.SCRIPT, unsafeScript) || '');\n }\n if (allowSanitizationBypassAndThrow(unsafeScript, \"Script\" /* Script */)) {\n return trustedScriptFromStringBypass(unwrapSafeValue(unsafeScript));\n }\n throw new Error('unsafe value used in a script context');\n }\n /**\n * A template tag function for promoting the associated constant literal to a\n * TrustedHTML. Interpolation is explicitly not allowed.\n *\n * @param html constant template literal containing trusted HTML.\n * @returns TrustedHTML wrapping `html`.\n *\n * @security This is a security-sensitive function and should only be used to\n * convert constant values of attributes and properties found in\n * application-provided Angular templates to TrustedHTML.\n *\n * @codeGenApi\n */\n function ɵɵtrustConstantHtml(html) {\n // The following runtime check ensures that the function was called as a\n // template tag (e.g. ɵɵtrustConstantHtml`content`), without any interpolation\n // (e.g. not ɵɵtrustConstantHtml`content ${variable}`). A TemplateStringsArray\n // is an array with a `raw` property that is also an array. The associated\n // template literal has no interpolation if and only if the length of the\n // TemplateStringsArray is 1.\n if (ngDevMode && (!Array.isArray(html) || !Array.isArray(html.raw) || html.length !== 1)) {\n throw new Error(\"Unexpected interpolation in trusted HTML constant: \" + html.join('?'));\n }\n return trustedHTMLFromString(html[0]);\n }\n /**\n * A template tag function for promoting the associated constant literal to a\n * TrustedScriptURL. Interpolation is explicitly not allowed.\n *\n * @param url constant template literal containing a trusted script URL.\n * @returns TrustedScriptURL wrapping `url`.\n *\n * @security This is a security-sensitive function and should only be used to\n * convert constant values of attributes and properties found in\n * application-provided Angular templates to TrustedScriptURL.\n *\n * @codeGenApi\n */\n function ɵɵtrustConstantResourceUrl(url) {\n // The following runtime check ensures that the function was called as a\n // template tag (e.g. ɵɵtrustConstantResourceUrl`content`), without any\n // interpolation (e.g. not ɵɵtrustConstantResourceUrl`content ${variable}`). A\n // TemplateStringsArray is an array with a `raw` property that is also an\n // array. The associated template literal has no interpolation if and only if\n // the length of the TemplateStringsArray is 1.\n if (ngDevMode && (!Array.isArray(url) || !Array.isArray(url.raw) || url.length !== 1)) {\n throw new Error(\"Unexpected interpolation in trusted URL constant: \" + url.join('?'));\n }\n return trustedScriptURLFromString(url[0]);\n }\n /**\n * Detects which sanitizer to use for URL property, based on tag name and prop name.\n *\n * The rules are based on the RESOURCE_URL context config from\n * `packages/compiler/src/schema/dom_security_schema.ts`.\n * If tag and prop names don't match Resource URL schema, use URL sanitizer.\n */\n function getUrlSanitizer(tag, prop) {\n if ((prop === 'src' &&\n (tag === 'embed' || tag === 'frame' || tag === 'iframe' || tag === 'media' ||\n tag === 'script')) ||\n (prop === 'href' && (tag === 'base' || tag === 'link'))) {\n return ɵɵsanitizeResourceUrl;\n }\n return ɵɵsanitizeUrl;\n }\n /**\n * Sanitizes URL, selecting sanitizer function based on tag and property names.\n *\n * This function is used in case we can't define security context at compile time, when only prop\n * name is available. This happens when we generate host bindings for Directives/Components. The\n * host element is unknown at compile time, so we defer calculation of specific sanitizer to\n * runtime.\n *\n * @param unsafeUrl untrusted `url`, typically from the user.\n * @param tag target element tag name.\n * @param prop name of the property that contains the value.\n * @returns `url` string which is safe to bind.\n *\n * @codeGenApi\n */\n function ɵɵsanitizeUrlOrResourceUrl(unsafeUrl, tag, prop) {\n return getUrlSanitizer(tag, prop)(unsafeUrl);\n }\n function validateAgainstEventProperties(name) {\n if (name.toLowerCase().startsWith('on')) {\n var 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 throw new Error(msg);\n }\n }\n function validateAgainstEventAttributes(name) {\n if (name.toLowerCase().startsWith('on')) {\n var msg = \"Binding to event attribute '\" + name + \"' is disallowed for security reasons, \" +\n (\"please use (\" + name.slice(2) + \")=...\");\n throw new Error(msg);\n }\n }\n function getSanitizer() {\n var lView = getLView();\n return lView && lView[SANITIZER];\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 var ERROR_TYPE = 'ngType';\n var ERROR_DEBUG_CONTEXT = 'ngDebugContext';\n var ERROR_ORIGINAL_ERROR = 'ngOriginalError';\n var ERROR_LOGGER = 'ngErrorLogger';\n function wrappedError(message, originalError) {\n var msg = message + \" caused by: \" + (originalError instanceof Error ? originalError.message : originalError);\n var error = Error(msg);\n error[ERROR_ORIGINAL_ERROR] = originalError;\n return error;\n }\n\n function getType(error) {\n return error[ERROR_TYPE];\n }\n function getDebugContext(error) {\n return error[ERROR_DEBUG_CONTEXT];\n }\n function getOriginalError(error) {\n return error[ERROR_ORIGINAL_ERROR];\n }\n function getErrorLogger(error) {\n return error[ERROR_LOGGER] || defaultErrorLogger;\n }\n function defaultErrorLogger(console) {\n var values = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n values[_i - 1] = arguments[_i];\n }\n console.error.apply(console, __spread(values));\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 * Provides a hook for centralized exception handling.\n *\n * The default implementation of `ErrorHandler` prints error messages to the `console`. To\n * intercept error handling, write a custom exception handler that replaces this default as\n * appropriate for your app.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * class MyErrorHandler implements ErrorHandler {\n * handleError(error) {\n * // do something with the exception\n * }\n * }\n *\n * @NgModule({\n * providers: [{provide: ErrorHandler, useClass: MyErrorHandler}]\n * })\n * class MyModule {}\n * ```\n *\n * @publicApi\n */\n var ErrorHandler = /** @class */ (function () {\n function ErrorHandler() {\n /**\n * @internal\n */\n this._console = console;\n }\n ErrorHandler.prototype.handleError = function (error) {\n var originalError = this._findOriginalError(error);\n var context = this._findContext(error);\n // Note: Browser consoles show the place from where console.error was called.\n // We can use this to give users additional information about the error.\n var errorLogger = getErrorLogger(error);\n errorLogger(this._console, \"ERROR\", error);\n if (originalError) {\n errorLogger(this._console, \"ORIGINAL ERROR\", originalError);\n }\n if (context) {\n errorLogger(this._console, 'ERROR CONTEXT', context);\n }\n };\n /** @internal */\n ErrorHandler.prototype._findContext = function (error) {\n if (error) {\n return getDebugContext(error) ? getDebugContext(error) :\n this._findContext(getOriginalError(error));\n }\n return null;\n };\n /** @internal */\n ErrorHandler.prototype._findOriginalError = function (error) {\n var e = getOriginalError(error);\n while (e && getOriginalError(e)) {\n e = getOriginalError(e);\n }\n return e;\n };\n return ErrorHandler;\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 * Defines a schema that allows an NgModule to contain the following:\n * - Non-Angular elements named with dash case (`-`).\n * - Element properties named with dash case (`-`).\n * Dash case is the naming convention for custom elements.\n *\n * @publicApi\n */\n var CUSTOM_ELEMENTS_SCHEMA = {\n name: 'custom-elements'\n };\n /**\n * Defines a schema that allows any property on any element.\n *\n * @publicApi\n */\n var NO_ERRORS_SCHEMA = {\n name: 'no-errors-schema'\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 * Disallowed strings in the comment.\n *\n * see: https://html.spec.whatwg.org/multipage/syntax.html#comments\n */\n var COMMENT_DISALLOWED = /^>|^->|<!--|-->|--!>|<!-$/g;\n /**\n * Delimiter in the disallowed strings which needs to be wrapped with zero with character.\n */\n var COMMENT_DELIMITER = /(<|>)/;\n var COMMENT_DELIMITER_ESCAPED = '\\u200B$1\\u200B';\n /**\n * Escape the content of comment strings so that it can be safely inserted into a comment node.\n *\n * The issue is that HTML does not specify any way to escape comment end text inside the comment.\n * Consider: `<!-- The way you close a comment is with \">\", and \"->\" at the beginning or by \"-->\" or\n * \"--!>\" at the end. -->`. Above the `\"-->\"` is meant to be text not an end to the comment. This\n * can be created programmatically through DOM APIs. (`<!--` are also disallowed.)\n *\n * see: https://html.spec.whatwg.org/multipage/syntax.html#comments\n *\n * ```\n * div.innerHTML = div.innerHTML\n * ```\n *\n * One would expect that the above code would be safe to do, but it turns out that because comment\n * text is not escaped, the comment may contain text which will prematurely close the comment\n * opening up the application for XSS attack. (In SSR we programmatically create comment nodes which\n * may contain such text and expect them to be safe.)\n *\n * This function escapes the comment text by looking for comment delimiters (`<` and `>`) and\n * surrounding them with `_>_` where the `_` is a zero width space `\\u200B`. The result is that if a\n * comment contains any of the comment start/end delimiters (such as `<!--`, `-->` or `--!>`) the\n * text it will render normally but it will not cause the HTML parser to close/open the comment.\n *\n * @param value text to make safe for comment node by escaping the comment open/close character\n * sequence.\n */\n function escapeCommentText(value) {\n return value.replace(COMMENT_DISALLOWED, function (text) { return text.replace(COMMENT_DELIMITER, COMMENT_DELIMITER_ESCAPED); });\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 CONTAINS CODE WHICH SHOULD BE TREE SHAKEN AND NEVER CALLED FROM PRODUCTION CODE!!!\n */\n /**\n * Creates an `Array` construction with a given name. This is useful when\n * looking for memory consumption to see what time of array it is.\n *\n *\n * @param name Name to give to the constructor\n * @returns A subclass of `Array` if possible. This can only be done in\n * environments which support `class` construct.\n */\n function createNamedArrayType(name) {\n // This should never be called in prod mode, so let's verify that is the case.\n if (ngDevMode) {\n try {\n // If this function were compromised the following could lead to arbitrary\n // script execution. We bless it with Trusted Types anyway since this\n // function is stripped out of production binaries.\n return (newTrustedFunctionForDev('Array', \"return class \" + name + \" extends Array{}\"))(Array);\n }\n catch (e) {\n // If it does not work just give up and fall back to regular Array.\n return Array;\n }\n }\n else {\n throw new Error('Looks like we are in \\'prod mode\\', but we are creating a named Array type, which is wrong! Check your code');\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 function normalizeDebugBindingName(name) {\n // Attribute names with `$` (eg `x-y$`) are valid per spec, but unsupported by some browsers\n name = camelCaseToDashCase(name.replace(/[$@]/g, '_'));\n return \"ng-reflect-\" + name;\n }\n var CAMEL_CASE_REGEXP = /([A-Z])/g;\n function camelCaseToDashCase(input) {\n return input.replace(CAMEL_CASE_REGEXP, function () {\n var m = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n m[_i] = arguments[_i];\n }\n return '-' + m[1].toLowerCase();\n });\n }\n function normalizeDebugBindingValue(value) {\n try {\n // Limit the size of the value as otherwise the DOM just gets polluted.\n return value != null ? value.toString().slice(0, 30) : value;\n }\n catch (e) {\n return '[ERROR] Exception while trying to serialize the 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 */\n /**\n * Returns the matching `LContext` data for a given DOM node, directive or component instance.\n *\n * This function will examine the provided DOM element, component, or directive instance\\'s\n * monkey-patched property to derive the `LContext` data. Once called then the monkey-patched\n * value will be that of the newly created `LContext`.\n *\n * If the monkey-patched value is the `LView` instance then the context value for that\n * target will be created and the monkey-patch reference will be updated. Therefore when this\n * function is called it may mutate the provided element\\'s, component\\'s or any of the associated\n * directive\\'s monkey-patch values.\n *\n * If the monkey-patch value is not detected then the code will walk up the DOM until an element\n * is found which contains a monkey-patch reference. When that occurs then the provided element\n * will be updated with a new context (which is then returned). If the monkey-patch value is not\n * detected for a component/directive instance then it will throw an error (all components and\n * directives should be automatically monkey-patched by ivy).\n *\n * @param target Component, Directive or DOM Node.\n */\n function getLContext(target) {\n var mpValue = readPatchedData(target);\n if (mpValue) {\n // only when it's an array is it considered an LView instance\n // ... otherwise it's an already constructed LContext instance\n if (Array.isArray(mpValue)) {\n var lView = mpValue;\n var nodeIndex = void 0;\n var component = undefined;\n var directives = undefined;\n if (isComponentInstance(target)) {\n nodeIndex = findViaComponent(lView, target);\n if (nodeIndex == -1) {\n throw new Error('The provided component was not found in the application');\n }\n component = target;\n }\n else if (isDirectiveInstance(target)) {\n nodeIndex = findViaDirective(lView, target);\n if (nodeIndex == -1) {\n throw new Error('The provided directive was not found in the application');\n }\n directives = getDirectivesAtNodeIndex(nodeIndex, lView, false);\n }\n else {\n nodeIndex = findViaNativeElement(lView, target);\n if (nodeIndex == -1) {\n return null;\n }\n }\n // the goal is not to fill the entire context full of data because the lookups\n // are expensive. Instead, only the target data (the element, component, container, ICU\n // expression or directive details) are filled into the context. If called multiple times\n // with different target values then the missing target data will be filled in.\n var native = unwrapRNode(lView[nodeIndex]);\n var existingCtx = readPatchedData(native);\n var context = (existingCtx && !Array.isArray(existingCtx)) ?\n existingCtx :\n createLContext(lView, nodeIndex, native);\n // only when the component has been discovered then update the monkey-patch\n if (component && context.component === undefined) {\n context.component = component;\n attachPatchData(context.component, context);\n }\n // only when the directives have been discovered then update the monkey-patch\n if (directives && context.directives === undefined) {\n context.directives = directives;\n for (var i = 0; i < directives.length; i++) {\n attachPatchData(directives[i], context);\n }\n }\n attachPatchData(context.native, context);\n mpValue = context;\n }\n }\n else {\n var rElement = target;\n ngDevMode && assertDomNode(rElement);\n // if the context is not found then we need to traverse upwards up the DOM\n // to find the nearest element that has already been monkey patched with data\n var parent = rElement;\n while (parent = parent.parentNode) {\n var parentContext = readPatchedData(parent);\n if (parentContext) {\n var lView = void 0;\n if (Array.isArray(parentContext)) {\n lView = parentContext;\n }\n else {\n lView = parentContext.lView;\n }\n // the edge of the app was also reached here through another means\n // (maybe because the DOM was changed manually).\n if (!lView) {\n return null;\n }\n var index = findViaNativeElement(lView, rElement);\n if (index >= 0) {\n var native = unwrapRNode(lView[index]);\n var context = createLContext(lView, index, native);\n attachPatchData(native, context);\n mpValue = context;\n break;\n }\n }\n }\n }\n return mpValue || null;\n }\n /**\n * Creates an empty instance of a `LContext` context\n */\n function createLContext(lView, nodeIndex, native) {\n return {\n lView: lView,\n nodeIndex: nodeIndex,\n native: native,\n component: undefined,\n directives: undefined,\n localRefs: undefined,\n };\n }\n /**\n * Takes a component instance and returns the view for that component.\n *\n * @param componentInstance\n * @returns The component's view\n */\n function getComponentViewByInstance(componentInstance) {\n var lView = readPatchedData(componentInstance);\n var view;\n if (Array.isArray(lView)) {\n var nodeIndex = findViaComponent(lView, componentInstance);\n view = getComponentLViewByIndex(nodeIndex, lView);\n var context = createLContext(lView, nodeIndex, view[HOST]);\n context.component = componentInstance;\n attachPatchData(componentInstance, context);\n attachPatchData(context.native, context);\n }\n else {\n var context = lView;\n view = getComponentLViewByIndex(context.nodeIndex, context.lView);\n }\n return view;\n }\n /**\n * Assigns the given data to the given target (which could be a component,\n * directive or DOM node instance) using monkey-patching.\n */\n function attachPatchData(target, data) {\n target[MONKEY_PATCH_KEY_NAME] = data;\n }\n function isComponentInstance(instance) {\n return instance && instance.constructor && instance.constructor.ɵcmp;\n }\n function isDirectiveInstance(instance) {\n return instance && instance.constructor && instance.constructor.ɵdir;\n }\n /**\n * Locates the element within the given LView and returns the matching index\n */\n function findViaNativeElement(lView, target) {\n var tView = lView[TVIEW];\n for (var i = HEADER_OFFSET; i < tView.bindingStartIndex; i++) {\n if (unwrapRNode(lView[i]) === target) {\n return i;\n }\n }\n return -1;\n }\n /**\n * Locates the next tNode (child, sibling or parent).\n */\n function traverseNextElement(tNode) {\n if (tNode.child) {\n return tNode.child;\n }\n else if (tNode.next) {\n return tNode.next;\n }\n else {\n // Let's take the following template: <div><span>text</span></div><component/>\n // After checking the text node, we need to find the next parent that has a \"next\" TNode,\n // in this case the parent `div`, so that we can find the component.\n while (tNode.parent && !tNode.parent.next) {\n tNode = tNode.parent;\n }\n return tNode.parent && tNode.parent.next;\n }\n }\n /**\n * Locates the component within the given LView and returns the matching index\n */\n function findViaComponent(lView, componentInstance) {\n var componentIndices = lView[TVIEW].components;\n if (componentIndices) {\n for (var i = 0; i < componentIndices.length; i++) {\n var elementComponentIndex = componentIndices[i];\n var componentView = getComponentLViewByIndex(elementComponentIndex, lView);\n if (componentView[CONTEXT] === componentInstance) {\n return elementComponentIndex;\n }\n }\n }\n else {\n var rootComponentView = getComponentLViewByIndex(HEADER_OFFSET, lView);\n var rootComponent = rootComponentView[CONTEXT];\n if (rootComponent === componentInstance) {\n // we are dealing with the root element here therefore we know that the\n // element is the very first element after the HEADER data in the lView\n return HEADER_OFFSET;\n }\n }\n return -1;\n }\n /**\n * Locates the directive within the given LView and returns the matching index\n */\n function findViaDirective(lView, directiveInstance) {\n // if a directive is monkey patched then it will (by default)\n // have a reference to the LView of the current view. The\n // element bound to the directive being search lives somewhere\n // in the view data. We loop through the nodes and check their\n // list of directives for the instance.\n var tNode = lView[TVIEW].firstChild;\n while (tNode) {\n var directiveIndexStart = tNode.directiveStart;\n var directiveIndexEnd = tNode.directiveEnd;\n for (var i = directiveIndexStart; i < directiveIndexEnd; i++) {\n if (lView[i] === directiveInstance) {\n return tNode.index;\n }\n }\n tNode = traverseNextElement(tNode);\n }\n return -1;\n }\n /**\n * Returns a list of directives extracted from the given view based on the\n * provided list of directive index values.\n *\n * @param nodeIndex The node index\n * @param lView The target view data\n * @param includeComponents Whether or not to include components in returned directives\n */\n function getDirectivesAtNodeIndex(nodeIndex, lView, includeComponents) {\n var tNode = lView[TVIEW].data[nodeIndex];\n var directiveStartIndex = tNode.directiveStart;\n if (directiveStartIndex == 0)\n return EMPTY_ARRAY$1;\n var directiveEndIndex = tNode.directiveEnd;\n if (!includeComponents && tNode.flags & 2 /* isComponentHost */)\n directiveStartIndex++;\n return lView.slice(directiveStartIndex, directiveEndIndex);\n }\n function getComponentAtNodeIndex(nodeIndex, lView) {\n var tNode = lView[TVIEW].data[nodeIndex];\n var directiveStartIndex = tNode.directiveStart;\n return tNode.flags & 2 /* isComponentHost */ ? lView[directiveStartIndex] : null;\n }\n /**\n * Returns a map of local references (local reference name => element or directive instance) that\n * exist on a given element.\n */\n function discoverLocalRefs(lView, nodeIndex) {\n var tNode = lView[TVIEW].data[nodeIndex];\n if (tNode && tNode.localNames) {\n var result = {};\n var localIndex = tNode.index + 1;\n for (var i = 0; i < tNode.localNames.length; i += 2) {\n result[tNode.localNames[i]] = lView[localIndex];\n localIndex++;\n }\n return result;\n }\n return null;\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 var ɵ0$4 = function () { return (typeof requestAnimationFrame !== 'undefined' &&\n requestAnimationFrame || // browser only\n setTimeout // everything else\n )\n .bind(_global); };\n var defaultScheduler = (ɵ0$4)();\n /**\n *\n * @codeGenApi\n */\n function ɵɵresolveWindow(element) {\n return { name: 'window', target: element.ownerDocument.defaultView };\n }\n /**\n *\n * @codeGenApi\n */\n function ɵɵresolveDocument(element) {\n return { name: 'document', target: element.ownerDocument };\n }\n /**\n *\n * @codeGenApi\n */\n function ɵɵresolveBody(element) {\n return { name: 'body', target: element.ownerDocument.body };\n }\n /**\n * The special delimiter we use to separate property names, prefixes, and suffixes\n * in property binding metadata. See storeBindingMetadata().\n *\n * We intentionally use the Unicode \"REPLACEMENT CHARACTER\" (U+FFFD) as a delimiter\n * because it is a very uncommon character that is unlikely to be part of a user's\n * property names or interpolation strings. If it is in fact used in a property\n * binding, DebugElement.properties will not return the correct value for that\n * binding. However, there should be no runtime effect for real applications.\n *\n * This character is typically rendered as a question mark inside of a diamond.\n * See https://en.wikipedia.org/wiki/Specials_(Unicode_block)\n *\n */\n var INTERPOLATION_DELIMITER = \"\\uFFFD\";\n /**\n * Unwrap a value which might be behind a closure (for forward declaration reasons).\n */\n function maybeUnwrapFn(value) {\n if (value instanceof Function) {\n return value();\n }\n else {\n return value;\n }\n }\n\n /** Called when there are multiple component selectors that match a given node */\n function throwMultipleComponentError(tNode) {\n throw new RuntimeError(\"300\" /* MULTIPLE_COMPONENTS_MATCH */, \"Multiple components match node with tagname \" + tNode.value);\n }\n /** Throws an ExpressionChangedAfterChecked error if checkNoChanges mode is on. */\n function throwErrorIfNoChangesMode(creationMode, oldValue, currValue, propName) {\n var field = propName ? \" for '\" + propName + \"'\" : '';\n var msg = \"ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value\" + field + \": '\" + oldValue + \"'. Current value: '\" + currValue + \"'.\";\n if (creationMode) {\n msg +=\n \" It seems like the view has been created after its parent and its children have been dirty checked.\" +\n \" Has it been created in a change detection hook?\";\n }\n // TODO: include debug context, see `viewDebugError` function in\n // `packages/core/src/view/errors.ts` for reference.\n throw new RuntimeError(\"100\" /* EXPRESSION_CHANGED_AFTER_CHECKED */, msg);\n }\n function constructDetailsForInterpolation(lView, rootIndex, expressionIndex, meta, changedValue) {\n var _a = __read(meta.split(INTERPOLATION_DELIMITER)), propName = _a[0], prefix = _a[1], chunks = _a.slice(2);\n var oldValue = prefix, newValue = prefix;\n for (var i = 0; i < chunks.length; i++) {\n var slotIdx = rootIndex + i;\n oldValue += \"\" + lView[slotIdx] + chunks[i];\n newValue += \"\" + (slotIdx === expressionIndex ? changedValue : lView[slotIdx]) + chunks[i];\n }\n return { propName: propName, oldValue: oldValue, newValue: newValue };\n }\n /**\n * Constructs an object that contains details for the ExpressionChangedAfterItHasBeenCheckedError:\n * - property name (for property bindings or interpolations)\n * - old and new values, enriched using information from metadata\n *\n * More information on the metadata storage format can be found in `storePropertyBindingMetadata`\n * function description.\n */\n function getExpressionChangedErrorDetails(lView, bindingIndex, oldValue, newValue) {\n var tData = lView[TVIEW].data;\n var metadata = tData[bindingIndex];\n if (typeof metadata === 'string') {\n // metadata for property interpolation\n if (metadata.indexOf(INTERPOLATION_DELIMITER) > -1) {\n return constructDetailsForInterpolation(lView, bindingIndex, bindingIndex, metadata, newValue);\n }\n // metadata for property binding\n return { propName: metadata, oldValue: oldValue, newValue: newValue };\n }\n // metadata is not available for this expression, check if this expression is a part of the\n // property interpolation by going from the current binding index left and look for a string that\n // contains INTERPOLATION_DELIMITER, the layout in tView.data for this case will look like this:\n // [..., 'id�Prefix � and � suffix', null, null, null, ...]\n if (metadata === null) {\n var idx = bindingIndex - 1;\n while (typeof tData[idx] !== 'string' && tData[idx + 1] === null) {\n idx--;\n }\n var meta = tData[idx];\n if (typeof meta === 'string') {\n var matches = meta.match(new RegExp(INTERPOLATION_DELIMITER, 'g'));\n // first interpolation delimiter separates property name from interpolation parts (in case of\n // property interpolations), so we subtract one from total number of found delimiters\n if (matches && (matches.length - 1) > bindingIndex - idx) {\n return constructDetailsForInterpolation(lView, idx, bindingIndex, meta, newValue);\n }\n }\n }\n return { propName: undefined, oldValue: oldValue, newValue: newValue };\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 (function (RendererStyleFlags2) {\n // TODO(misko): This needs to be refactored into a separate file so that it can be imported from\n // `node_manipulation.ts` Currently doing the import cause resolution order to change and fails\n // the tests. The work around is to have hard coded value in `node_manipulation.ts` for now.\n /**\n * Marks a style as important.\n */\n RendererStyleFlags2[RendererStyleFlags2[\"Important\"] = 1] = \"Important\";\n /**\n * Marks a style as using dash case naming (this-is-dash-case).\n */\n RendererStyleFlags2[RendererStyleFlags2[\"DashCase\"] = 2] = \"DashCase\";\n })(exports.RendererStyleFlags2 || (exports.RendererStyleFlags2 = {}));\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 var _icuContainerIterate;\n /**\n * Iterator which provides ability to visit all of the `TIcuContainerNode` root `RNode`s.\n */\n function icuContainerIterate(tIcuContainerNode, lView) {\n return _icuContainerIterate(tIcuContainerNode, lView);\n }\n /**\n * Ensures that `IcuContainerVisitor`'s implementation is present.\n *\n * This function is invoked when i18n instruction comes across an ICU. The purpose is to allow the\n * bundler to tree shake ICU logic and only load it if ICU instruction is executed.\n */\n function ensureIcuContainerVisitorLoaded(loader) {\n if (_icuContainerIterate === undefined) {\n // Do not inline this function. We want to keep `ensureIcuContainerVisitorLoaded` light, so it\n // can be inlined into call-site.\n _icuContainerIterate = loader();\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 // Note: This hack is necessary so we don't erroneously get a circular dependency\n // failure based on types.\n var unusedValueExportToPlacateAjd$5 = 1;\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 * Gets the parent LView of the passed LView, if the PARENT is an LContainer, will get the parent of\n * that LContainer, which is an LView\n * @param lView the lView whose parent to get\n */\n function getLViewParent(lView) {\n ngDevMode && assertLView(lView);\n var parent = lView[PARENT];\n return isLContainer(parent) ? parent[PARENT] : parent;\n }\n /**\n * Retrieve the root view from any component or `LView` by walking the parent `LView` until\n * reaching the root `LView`.\n *\n * @param componentOrLView any component or `LView`\n */\n function getRootView(componentOrLView) {\n ngDevMode && assertDefined(componentOrLView, 'component');\n var lView = isLView(componentOrLView) ? componentOrLView : readPatchedLView(componentOrLView);\n while (lView && !(lView[FLAGS] & 512 /* IsRoot */)) {\n lView = getLViewParent(lView);\n }\n ngDevMode && assertLView(lView);\n return lView;\n }\n /**\n * Returns the `RootContext` instance that is associated with\n * the application where the target is situated. It does this by walking the parent views until it\n * gets to the root view, then getting the context off of that.\n *\n * @param viewOrComponent the `LView` or component to get the root context for.\n */\n function getRootContext(viewOrComponent) {\n var rootView = getRootView(viewOrComponent);\n ngDevMode &&\n assertDefined(rootView[CONTEXT], 'RootView has no context. Perhaps it is disconnected?');\n return rootView[CONTEXT];\n }\n /**\n * Gets the first `LContainer` in the LView or `null` if none exists.\n */\n function getFirstLContainer(lView) {\n return getNearestLContainer(lView[CHILD_HEAD]);\n }\n /**\n * Gets the next `LContainer` that is a sibling of the given container.\n */\n function getNextLContainer(container) {\n return getNearestLContainer(container[NEXT]);\n }\n function getNearestLContainer(viewOrContainer) {\n while (viewOrContainer !== null && !isLContainer(viewOrContainer)) {\n viewOrContainer = viewOrContainer[NEXT];\n }\n return viewOrContainer;\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 var unusedValueToPlacateAjd = unusedValueExportToPlacateAjd + unusedValueExportToPlacateAjd$4 + unusedValueExportToPlacateAjd$5 + unusedValueExportToPlacateAjd$2 + unusedValueExportToPlacateAjd$1;\n /**\n * NOTE: for performance reasons, the possible actions are inlined within the function instead of\n * being passed as an argument.\n */\n function applyToElementOrContainer(action, renderer, parent, lNodeToHandle, beforeNode) {\n // If this slot was allocated for a text node dynamically created by i18n, the text node itself\n // won't be created until i18nApply() in the update block, so this node should be skipped.\n // For more info, see \"ICU expressions should work inside an ngTemplateOutlet inside an ngFor\"\n // in `i18n_spec.ts`.\n if (lNodeToHandle != null) {\n var lContainer = void 0;\n var isComponent = false;\n // We are expecting an RNode, but in the case of a component or LContainer the `RNode` is\n // wrapped in an array which needs to be unwrapped. We need to know if it is a component and if\n // it has LContainer so that we can process all of those cases appropriately.\n if (isLContainer(lNodeToHandle)) {\n lContainer = lNodeToHandle;\n }\n else if (isLView(lNodeToHandle)) {\n isComponent = true;\n ngDevMode && assertDefined(lNodeToHandle[HOST], 'HOST must be defined for a component LView');\n lNodeToHandle = lNodeToHandle[HOST];\n }\n var rNode = unwrapRNode(lNodeToHandle);\n ngDevMode && !isProceduralRenderer(renderer) && assertDomNode(rNode);\n if (action === 0 /* Create */ && parent !== null) {\n if (beforeNode == null) {\n nativeAppendChild(renderer, parent, rNode);\n }\n else {\n nativeInsertBefore(renderer, parent, rNode, beforeNode || null, true);\n }\n }\n else if (action === 1 /* Insert */ && parent !== null) {\n nativeInsertBefore(renderer, parent, rNode, beforeNode || null, true);\n }\n else if (action === 2 /* Detach */) {\n nativeRemoveNode(renderer, rNode, isComponent);\n }\n else if (action === 3 /* Destroy */) {\n ngDevMode && ngDevMode.rendererDestroyNode++;\n renderer.destroyNode(rNode);\n }\n if (lContainer != null) {\n applyContainer(renderer, action, lContainer, parent, beforeNode);\n }\n }\n }\n function createTextNode(renderer, value) {\n ngDevMode && ngDevMode.rendererCreateTextNode++;\n ngDevMode && ngDevMode.rendererSetText++;\n return isProceduralRenderer(renderer) ? renderer.createText(value) :\n renderer.createTextNode(value);\n }\n function updateTextNode(renderer, rNode, value) {\n ngDevMode && ngDevMode.rendererSetText++;\n isProceduralRenderer(renderer) ? renderer.setValue(rNode, value) : rNode.textContent = value;\n }\n function createCommentNode(renderer, value) {\n ngDevMode && ngDevMode.rendererCreateComment++;\n // isProceduralRenderer check is not needed because both `Renderer2` and `Renderer3` have the same\n // method name.\n return renderer.createComment(escapeCommentText(value));\n }\n /**\n * Creates a native element from a tag name, using a renderer.\n * @param renderer A renderer to use\n * @param name the tag name\n * @param namespace Optional namespace for element.\n * @returns the element created\n */\n function createElementNode(renderer, name, namespace) {\n ngDevMode && ngDevMode.rendererCreateElement++;\n if (isProceduralRenderer(renderer)) {\n return renderer.createElement(name, namespace);\n }\n else {\n return namespace === null ? renderer.createElement(name) :\n renderer.createElementNS(namespace, name);\n }\n }\n /**\n * Removes all DOM elements associated with a view.\n *\n * Because some root nodes of the view may be containers, we sometimes need\n * to propagate deeply into the nested containers to remove all elements in the\n * views beneath it.\n *\n * @param tView The `TView' of the `LView` from which elements should be added or removed\n * @param lView The view from which elements should be added or removed\n */\n function removeViewFromContainer(tView, lView) {\n var renderer = lView[RENDERER];\n applyView(tView, lView, renderer, 2 /* Detach */, null, null);\n lView[HOST] = null;\n lView[T_HOST] = null;\n }\n /**\n * Adds all DOM elements associated with a view.\n *\n * Because some root nodes of the view may be containers, we sometimes need\n * to propagate deeply into the nested containers to add all elements in the\n * views beneath it.\n *\n * @param tView The `TView' of the `LView` from which elements should be added or removed\n * @param parentTNode The `TNode` where the `LView` should be attached to.\n * @param renderer Current renderer to use for DOM manipulations.\n * @param lView The view from which elements should be added or removed\n * @param parentNativeNode The parent `RElement` where it should be inserted into.\n * @param beforeNode The node before which elements should be added, if insert mode\n */\n function addViewToContainer(tView, parentTNode, renderer, lView, parentNativeNode, beforeNode) {\n lView[HOST] = parentNativeNode;\n lView[T_HOST] = parentTNode;\n applyView(tView, lView, renderer, 1 /* Insert */, parentNativeNode, beforeNode);\n }\n /**\n * Detach a `LView` from the DOM by detaching its nodes.\n *\n * @param tView The `TView' of the `LView` to be detached\n * @param lView the `LView` to be detached.\n */\n function renderDetachView(tView, lView) {\n applyView(tView, lView, lView[RENDERER], 2 /* Detach */, null, null);\n }\n /**\n * Traverses down and up the tree of views and containers to remove listeners and\n * call onDestroy callbacks.\n *\n * Notes:\n * - Because it's used for onDestroy calls, it needs to be bottom-up.\n * - Must process containers instead of their views to avoid splicing\n * when views are destroyed and re-added.\n * - Using a while loop because it's faster than recursion\n * - Destroy only called on movement to sibling or movement to parent (laterally or up)\n *\n * @param rootView The view to destroy\n */\n function destroyViewTree(rootView) {\n // If the view has no children, we can clean it up and return early.\n var lViewOrLContainer = rootView[CHILD_HEAD];\n if (!lViewOrLContainer) {\n return cleanUpView(rootView[TVIEW], rootView);\n }\n while (lViewOrLContainer) {\n var next = null;\n if (isLView(lViewOrLContainer)) {\n // If LView, traverse down to child.\n next = lViewOrLContainer[CHILD_HEAD];\n }\n else {\n ngDevMode && assertLContainer(lViewOrLContainer);\n // If container, traverse down to its first LView.\n var firstView = lViewOrLContainer[CONTAINER_HEADER_OFFSET];\n if (firstView)\n next = firstView;\n }\n if (!next) {\n // Only clean up view when moving to the side or up, as destroy hooks\n // should be called in order from the bottom up.\n while (lViewOrLContainer && !lViewOrLContainer[NEXT] && lViewOrLContainer !== rootView) {\n if (isLView(lViewOrLContainer)) {\n cleanUpView(lViewOrLContainer[TVIEW], lViewOrLContainer);\n }\n lViewOrLContainer = lViewOrLContainer[PARENT];\n }\n if (lViewOrLContainer === null)\n lViewOrLContainer = rootView;\n if (isLView(lViewOrLContainer)) {\n cleanUpView(lViewOrLContainer[TVIEW], lViewOrLContainer);\n }\n next = lViewOrLContainer && lViewOrLContainer[NEXT];\n }\n lViewOrLContainer = next;\n }\n }\n /**\n * Inserts a view into a container.\n *\n * This adds the view to the container's array of active views in the correct\n * position. It also adds the view's elements to the DOM if the container isn't a\n * root node of another view (in that case, the view's elements will be added when\n * the container's parent view is added later).\n *\n * @param tView The `TView' of the `LView` to insert\n * @param lView The view to insert\n * @param lContainer The container into which the view should be inserted\n * @param index Which index in the container to insert the child view into\n */\n function insertView(tView, lView, lContainer, index) {\n ngDevMode && assertLView(lView);\n ngDevMode && assertLContainer(lContainer);\n var indexInContainer = CONTAINER_HEADER_OFFSET + index;\n var containerLength = lContainer.length;\n if (index > 0) {\n // This is a new view, we need to add it to the children.\n lContainer[indexInContainer - 1][NEXT] = lView;\n }\n if (index < containerLength - CONTAINER_HEADER_OFFSET) {\n lView[NEXT] = lContainer[indexInContainer];\n addToArray(lContainer, CONTAINER_HEADER_OFFSET + index, lView);\n }\n else {\n lContainer.push(lView);\n lView[NEXT] = null;\n }\n lView[PARENT] = lContainer;\n // track views where declaration and insertion points are different\n var declarationLContainer = lView[DECLARATION_LCONTAINER];\n if (declarationLContainer !== null && lContainer !== declarationLContainer) {\n trackMovedView(declarationLContainer, lView);\n }\n // notify query that a new view has been added\n var lQueries = lView[QUERIES];\n if (lQueries !== null) {\n lQueries.insertView(tView);\n }\n // Sets the attached flag\n lView[FLAGS] |= 128 /* Attached */;\n }\n /**\n * Track views created from the declaration container (TemplateRef) and inserted into a\n * different LContainer.\n */\n function trackMovedView(declarationContainer, lView) {\n ngDevMode && assertDefined(lView, 'LView required');\n ngDevMode && assertLContainer(declarationContainer);\n var movedViews = declarationContainer[MOVED_VIEWS];\n var insertedLContainer = lView[PARENT];\n ngDevMode && assertLContainer(insertedLContainer);\n var insertedComponentLView = insertedLContainer[PARENT][DECLARATION_COMPONENT_VIEW];\n ngDevMode && assertDefined(insertedComponentLView, 'Missing insertedComponentLView');\n var declaredComponentLView = lView[DECLARATION_COMPONENT_VIEW];\n ngDevMode && assertDefined(declaredComponentLView, 'Missing declaredComponentLView');\n if (declaredComponentLView !== insertedComponentLView) {\n // At this point the declaration-component is not same as insertion-component; this means that\n // this is a transplanted view. Mark the declared lView as having transplanted views so that\n // those views can participate in CD.\n declarationContainer[HAS_TRANSPLANTED_VIEWS] = true;\n }\n if (movedViews === null) {\n declarationContainer[MOVED_VIEWS] = [lView];\n }\n else {\n movedViews.push(lView);\n }\n }\n function detachMovedView(declarationContainer, lView) {\n ngDevMode && assertLContainer(declarationContainer);\n ngDevMode &&\n assertDefined(declarationContainer[MOVED_VIEWS], 'A projected view should belong to a non-empty projected views collection');\n var movedViews = declarationContainer[MOVED_VIEWS];\n var declarationViewIndex = movedViews.indexOf(lView);\n var insertionLContainer = lView[PARENT];\n ngDevMode && assertLContainer(insertionLContainer);\n // If the view was marked for refresh but then detached before it was checked (where the flag\n // would be cleared and the counter decremented), we need to decrement the view counter here\n // instead.\n if (lView[FLAGS] & 1024 /* RefreshTransplantedView */) {\n lView[FLAGS] &= ~1024 /* RefreshTransplantedView */;\n updateTransplantedViewCount(insertionLContainer, -1);\n }\n movedViews.splice(declarationViewIndex, 1);\n }\n /**\n * Detaches a view from a container.\n *\n * This method removes the view from the container's array of active views. It also\n * removes the view's elements from the DOM.\n *\n * @param lContainer The container from which to detach a view\n * @param removeIndex The index of the view to detach\n * @returns Detached LView instance.\n */\n function detachView(lContainer, removeIndex) {\n if (lContainer.length <= CONTAINER_HEADER_OFFSET)\n return;\n var indexInContainer = CONTAINER_HEADER_OFFSET + removeIndex;\n var viewToDetach = lContainer[indexInContainer];\n if (viewToDetach) {\n var declarationLContainer = viewToDetach[DECLARATION_LCONTAINER];\n if (declarationLContainer !== null && declarationLContainer !== lContainer) {\n detachMovedView(declarationLContainer, viewToDetach);\n }\n if (removeIndex > 0) {\n lContainer[indexInContainer - 1][NEXT] = viewToDetach[NEXT];\n }\n var removedLView = removeFromArray(lContainer, CONTAINER_HEADER_OFFSET + removeIndex);\n removeViewFromContainer(viewToDetach[TVIEW], viewToDetach);\n // notify query that a view has been removed\n var lQueries = removedLView[QUERIES];\n if (lQueries !== null) {\n lQueries.detachView(removedLView[TVIEW]);\n }\n viewToDetach[PARENT] = null;\n viewToDetach[NEXT] = null;\n // Unsets the attached flag\n viewToDetach[FLAGS] &= ~128 /* Attached */;\n }\n return viewToDetach;\n }\n /**\n * A standalone function which destroys an LView,\n * conducting clean up (e.g. removing listeners, calling onDestroys).\n *\n * @param tView The `TView' of the `LView` to be destroyed\n * @param lView The view to be destroyed.\n */\n function destroyLView(tView, lView) {\n if (!(lView[FLAGS] & 256 /* Destroyed */)) {\n var renderer = lView[RENDERER];\n if (isProceduralRenderer(renderer) && renderer.destroyNode) {\n applyView(tView, lView, renderer, 3 /* Destroy */, null, null);\n }\n destroyViewTree(lView);\n }\n }\n /**\n * Calls onDestroys hooks for all directives and pipes in a given view and then removes all\n * listeners. Listeners are removed as the last step so events delivered in the onDestroys hooks\n * can be propagated to @Output listeners.\n *\n * @param tView `TView` for the `LView` to clean up.\n * @param lView The LView to clean up\n */\n function cleanUpView(tView, lView) {\n if (!(lView[FLAGS] & 256 /* Destroyed */)) {\n // Usually the Attached flag is removed when the view is detached from its parent, however\n // if it's a root view, the flag won't be unset hence why we're also removing on destroy.\n lView[FLAGS] &= ~128 /* Attached */;\n // Mark the LView as destroyed *before* executing the onDestroy hooks. An onDestroy hook\n // runs arbitrary user code, which could include its own `viewRef.destroy()` (or similar). If\n // We don't flag the view as destroyed before the hooks, this could lead to an infinite loop.\n // This also aligns with the ViewEngine behavior. It also means that the onDestroy hook is\n // really more of an \"afterDestroy\" hook if you think about it.\n lView[FLAGS] |= 256 /* Destroyed */;\n executeOnDestroys(tView, lView);\n processCleanups(tView, lView);\n // For component views only, the local renderer is destroyed at clean up time.\n if (lView[TVIEW].type === 1 /* Component */ && isProceduralRenderer(lView[RENDERER])) {\n ngDevMode && ngDevMode.rendererDestroy++;\n lView[RENDERER].destroy();\n }\n var declarationContainer = lView[DECLARATION_LCONTAINER];\n // we are dealing with an embedded view that is still inserted into a container\n if (declarationContainer !== null && isLContainer(lView[PARENT])) {\n // and this is a projected view\n if (declarationContainer !== lView[PARENT]) {\n detachMovedView(declarationContainer, lView);\n }\n // For embedded views still attached to a container: remove query result from this view.\n var lQueries = lView[QUERIES];\n if (lQueries !== null) {\n lQueries.detachView(tView);\n }\n }\n }\n }\n /** Removes listeners and unsubscribes from output subscriptions */\n function processCleanups(tView, lView) {\n var tCleanup = tView.cleanup;\n var lCleanup = lView[CLEANUP];\n // `LCleanup` contains both share information with `TCleanup` as well as instance specific\n // information appended at the end. We need to know where the end of the `TCleanup` information\n // is, and we track this with `lastLCleanupIndex`.\n var lastLCleanupIndex = -1;\n if (tCleanup !== null) {\n for (var i = 0; i < tCleanup.length - 1; i += 2) {\n if (typeof tCleanup[i] === 'string') {\n // This is a native DOM listener\n var idxOrTargetGetter = tCleanup[i + 1];\n var target = typeof idxOrTargetGetter === 'function' ?\n idxOrTargetGetter(lView) :\n unwrapRNode(lView[idxOrTargetGetter]);\n var listener = lCleanup[lastLCleanupIndex = tCleanup[i + 2]];\n var useCaptureOrSubIdx = tCleanup[i + 3];\n if (typeof useCaptureOrSubIdx === 'boolean') {\n // native DOM listener registered with Renderer3\n target.removeEventListener(tCleanup[i], listener, useCaptureOrSubIdx);\n }\n else {\n if (useCaptureOrSubIdx >= 0) {\n // unregister\n lCleanup[lastLCleanupIndex = useCaptureOrSubIdx]();\n }\n else {\n // Subscription\n lCleanup[lastLCleanupIndex = -useCaptureOrSubIdx].unsubscribe();\n }\n }\n i += 2;\n }\n else {\n // This is a cleanup function that is grouped with the index of its context\n var context = lCleanup[lastLCleanupIndex = tCleanup[i + 1]];\n tCleanup[i].call(context);\n }\n }\n }\n if (lCleanup !== null) {\n for (var i = lastLCleanupIndex + 1; i < lCleanup.length; i++) {\n var instanceCleanupFn = lCleanup[i];\n ngDevMode && assertFunction(instanceCleanupFn, 'Expecting instance cleanup function.');\n instanceCleanupFn();\n }\n lView[CLEANUP] = null;\n }\n }\n /** Calls onDestroy hooks for this view */\n function executeOnDestroys(tView, lView) {\n var destroyHooks;\n if (tView != null && (destroyHooks = tView.destroyHooks) != null) {\n for (var i = 0; i < destroyHooks.length; i += 2) {\n var context = lView[destroyHooks[i]];\n // Only call the destroy hook if the context has been requested.\n if (!(context instanceof NodeInjectorFactory)) {\n var toCall = destroyHooks[i + 1];\n if (Array.isArray(toCall)) {\n for (var j = 0; j < toCall.length; j += 2) {\n var callContext = context[toCall[j]];\n var hook = toCall[j + 1];\n profiler(4 /* LifecycleHookStart */, callContext, hook);\n try {\n hook.call(callContext);\n }\n finally {\n profiler(5 /* LifecycleHookEnd */, callContext, hook);\n }\n }\n }\n else {\n profiler(4 /* LifecycleHookStart */, context, toCall);\n try {\n toCall.call(context);\n }\n finally {\n profiler(5 /* LifecycleHookEnd */, context, toCall);\n }\n }\n }\n }\n }\n }\n /**\n * Returns a native element if a node can be inserted into the given parent.\n *\n * There are two reasons why we may not be able to insert a element immediately.\n * - Projection: When creating a child content element of a component, we have to skip the\n * insertion because the content of a component will be projected.\n * `<component><content>delayed due to projection</content></component>`\n * - Parent container is disconnected: This can happen when we are inserting a view into\n * parent container, which itself is disconnected. For example the parent container is part\n * of a View which has not be inserted or is made for projection but has not been inserted\n * into destination.\n *\n * @param tView: Current `TView`.\n * @param tNode: `TNode` for which we wish to retrieve render parent.\n * @param lView: Current `LView`.\n */\n function getParentRElement(tView, tNode, lView) {\n return getClosestRElement(tView, tNode.parent, lView);\n }\n /**\n * Get closest `RElement` or `null` if it can't be found.\n *\n * If `TNode` is `TNodeType.Element` => return `RElement` at `LView[tNode.index]` location.\n * If `TNode` is `TNodeType.ElementContainer|IcuContain` => return the parent (recursively).\n * If `TNode` is `null` then return host `RElement`:\n * - return `null` if projection\n * - return `null` if parent container is disconnected (we have no parent.)\n *\n * @param tView: Current `TView`.\n * @param tNode: `TNode` for which we wish to retrieve `RElement` (or `null` if host element is\n * needed).\n * @param lView: Current `LView`.\n * @returns `null` if the `RElement` can't be determined at this time (no parent / projection)\n */\n function getClosestRElement(tView, tNode, lView) {\n var parentTNode = tNode;\n // Skip over element and ICU containers as those are represented by a comment node and\n // can't be used as a render parent.\n while (parentTNode !== null &&\n (parentTNode.type & (8 /* ElementContainer */ | 32 /* Icu */))) {\n tNode = parentTNode;\n parentTNode = tNode.parent;\n }\n // If the parent tNode is null, then we are inserting across views: either into an embedded view\n // or a component view.\n if (parentTNode === null) {\n // We are inserting a root element of the component view into the component host element and\n // it should always be eager.\n return lView[HOST];\n }\n else {\n ngDevMode && assertTNodeType(parentTNode, 3 /* AnyRNode */ | 4 /* Container */);\n if (parentTNode.flags & 2 /* isComponentHost */) {\n ngDevMode && assertTNodeForLView(parentTNode, lView);\n var encapsulation = tView.data[parentTNode.directiveStart].encapsulation;\n // We've got a parent which is an element in the current view. We just need to verify if the\n // parent element is not a component. Component's content nodes are not inserted immediately\n // because they will be projected, and so doing insert at this point would be wasteful.\n // Since the projection would then move it to its final destination. Note that we can't\n // make this assumption when using the Shadow DOM, because the native projection placeholders\n // (<content> or <slot>) have to be in place as elements are being inserted.\n if (encapsulation === exports.ViewEncapsulation.None ||\n encapsulation === exports.ViewEncapsulation.Emulated) {\n return null;\n }\n }\n return getNativeByTNode(parentTNode, lView);\n }\n }\n /**\n * Inserts a native node before another native node for a given parent using {@link Renderer3}.\n * This is a utility function that can be used when native nodes were determined - it abstracts an\n * actual renderer being used.\n */\n function nativeInsertBefore(renderer, parent, child, beforeNode, isMove) {\n ngDevMode && ngDevMode.rendererInsertBefore++;\n if (isProceduralRenderer(renderer)) {\n renderer.insertBefore(parent, child, beforeNode, isMove);\n }\n else {\n parent.insertBefore(child, beforeNode, isMove);\n }\n }\n function nativeAppendChild(renderer, parent, child) {\n ngDevMode && ngDevMode.rendererAppendChild++;\n ngDevMode && assertDefined(parent, 'parent node must be defined');\n if (isProceduralRenderer(renderer)) {\n renderer.appendChild(parent, child);\n }\n else {\n parent.appendChild(child);\n }\n }\n function nativeAppendOrInsertBefore(renderer, parent, child, beforeNode, isMove) {\n if (beforeNode !== null) {\n nativeInsertBefore(renderer, parent, child, beforeNode, isMove);\n }\n else {\n nativeAppendChild(renderer, parent, child);\n }\n }\n /** Removes a node from the DOM given its native parent. */\n function nativeRemoveChild(renderer, parent, child, isHostElement) {\n if (isProceduralRenderer(renderer)) {\n renderer.removeChild(parent, child, isHostElement);\n }\n else {\n parent.removeChild(child);\n }\n }\n /**\n * Returns a native parent of a given native node.\n */\n function nativeParentNode(renderer, node) {\n return (isProceduralRenderer(renderer) ? renderer.parentNode(node) : node.parentNode);\n }\n /**\n * Returns a native sibling of a given native node.\n */\n function nativeNextSibling(renderer, node) {\n return isProceduralRenderer(renderer) ? renderer.nextSibling(node) : node.nextSibling;\n }\n /**\n * Find a node in front of which `currentTNode` should be inserted.\n *\n * This method determines the `RNode` in front of which we should insert the `currentRNode`. This\n * takes `TNode.insertBeforeIndex` into account if i18n code has been invoked.\n *\n * @param parentTNode parent `TNode`\n * @param currentTNode current `TNode` (The node which we would like to insert into the DOM)\n * @param lView current `LView`\n */\n function getInsertInFrontOfRNode(parentTNode, currentTNode, lView) {\n return _getInsertInFrontOfRNodeWithI18n(parentTNode, currentTNode, lView);\n }\n /**\n * Find a node in front of which `currentTNode` should be inserted. (Does not take i18n into\n * account)\n *\n * This method determines the `RNode` in front of which we should insert the `currentRNode`. This\n * does not take `TNode.insertBeforeIndex` into account.\n *\n * @param parentTNode parent `TNode`\n * @param currentTNode current `TNode` (The node which we would like to insert into the DOM)\n * @param lView current `LView`\n */\n function getInsertInFrontOfRNodeWithNoI18n(parentTNode, currentTNode, lView) {\n if (parentTNode.type & (8 /* ElementContainer */ | 32 /* Icu */)) {\n return getNativeByTNode(parentTNode, lView);\n }\n return null;\n }\n /**\n * Tree shakable boundary for `getInsertInFrontOfRNodeWithI18n` function.\n *\n * This function will only be set if i18n code runs.\n */\n var _getInsertInFrontOfRNodeWithI18n = getInsertInFrontOfRNodeWithNoI18n;\n /**\n * Tree shakable boundary for `processI18nInsertBefore` function.\n *\n * This function will only be set if i18n code runs.\n */\n var _processI18nInsertBefore;\n function setI18nHandling(getInsertInFrontOfRNodeWithI18n, processI18nInsertBefore) {\n _getInsertInFrontOfRNodeWithI18n = getInsertInFrontOfRNodeWithI18n;\n _processI18nInsertBefore = processI18nInsertBefore;\n }\n /**\n * Appends the `child` native node (or a collection of nodes) to the `parent`.\n *\n * @param tView The `TView' to be appended\n * @param lView The current LView\n * @param childRNode The native child (or children) that should be appended\n * @param childTNode The TNode of the child element\n */\n function appendChild(tView, lView, childRNode, childTNode) {\n var parentRNode = getParentRElement(tView, childTNode, lView);\n var renderer = lView[RENDERER];\n var parentTNode = childTNode.parent || lView[T_HOST];\n var anchorNode = getInsertInFrontOfRNode(parentTNode, childTNode, lView);\n if (parentRNode != null) {\n if (Array.isArray(childRNode)) {\n for (var i = 0; i < childRNode.length; i++) {\n nativeAppendOrInsertBefore(renderer, parentRNode, childRNode[i], anchorNode, false);\n }\n }\n else {\n nativeAppendOrInsertBefore(renderer, parentRNode, childRNode, anchorNode, false);\n }\n }\n _processI18nInsertBefore !== undefined &&\n _processI18nInsertBefore(renderer, childTNode, lView, childRNode, parentRNode);\n }\n /**\n * Returns the first native node for a given LView, starting from the provided TNode.\n *\n * Native nodes are returned in the order in which those appear in the native tree (DOM).\n */\n function getFirstNativeNode(lView, tNode) {\n if (tNode !== null) {\n ngDevMode &&\n assertTNodeType(tNode, 3 /* AnyRNode */ | 12 /* AnyContainer */ | 32 /* Icu */ | 16 /* Projection */);\n var tNodeType = tNode.type;\n if (tNodeType & 3 /* AnyRNode */) {\n return getNativeByTNode(tNode, lView);\n }\n else if (tNodeType & 4 /* Container */) {\n return getBeforeNodeForView(-1, lView[tNode.index]);\n }\n else if (tNodeType & 8 /* ElementContainer */) {\n var elIcuContainerChild = tNode.child;\n if (elIcuContainerChild !== null) {\n return getFirstNativeNode(lView, elIcuContainerChild);\n }\n else {\n var rNodeOrLContainer = lView[tNode.index];\n if (isLContainer(rNodeOrLContainer)) {\n return getBeforeNodeForView(-1, rNodeOrLContainer);\n }\n else {\n return unwrapRNode(rNodeOrLContainer);\n }\n }\n }\n else if (tNodeType & 32 /* Icu */) {\n var nextRNode = icuContainerIterate(tNode, lView);\n var rNode = nextRNode();\n // If the ICU container has no nodes, than we use the ICU anchor as the node.\n return rNode || unwrapRNode(lView[tNode.index]);\n }\n else {\n var projectionNodes = getProjectionNodes(lView, tNode);\n if (projectionNodes !== null) {\n if (Array.isArray(projectionNodes)) {\n return projectionNodes[0];\n }\n var parentView = getLViewParent(lView[DECLARATION_COMPONENT_VIEW]);\n ngDevMode && assertParentView(parentView);\n return getFirstNativeNode(parentView, projectionNodes);\n }\n else {\n return getFirstNativeNode(lView, tNode.next);\n }\n }\n }\n return null;\n }\n function getProjectionNodes(lView, tNode) {\n if (tNode !== null) {\n var componentView = lView[DECLARATION_COMPONENT_VIEW];\n var componentHost = componentView[T_HOST];\n var slotIdx = tNode.projection;\n ngDevMode && assertProjectionSlots(lView);\n return componentHost.projection[slotIdx];\n }\n return null;\n }\n function getBeforeNodeForView(viewIndexInContainer, lContainer) {\n var nextViewIndex = CONTAINER_HEADER_OFFSET + viewIndexInContainer + 1;\n if (nextViewIndex < lContainer.length) {\n var lView = lContainer[nextViewIndex];\n var firstTNodeOfView = lView[TVIEW].firstChild;\n if (firstTNodeOfView !== null) {\n return getFirstNativeNode(lView, firstTNodeOfView);\n }\n }\n return lContainer[NATIVE];\n }\n /**\n * Removes a native node itself using a given renderer. To remove the node we are looking up its\n * parent from the native tree as not all platforms / browsers support the equivalent of\n * node.remove().\n *\n * @param renderer A renderer to be used\n * @param rNode The native node that should be removed\n * @param isHostElement A flag indicating if a node to be removed is a host of a component.\n */\n function nativeRemoveNode(renderer, rNode, isHostElement) {\n ngDevMode && ngDevMode.rendererRemoveNode++;\n var nativeParent = nativeParentNode(renderer, rNode);\n if (nativeParent) {\n nativeRemoveChild(renderer, nativeParent, rNode, isHostElement);\n }\n }\n /**\n * Performs the operation of `action` on the node. Typically this involves inserting or removing\n * nodes on the LView or projection boundary.\n */\n function applyNodes(renderer, action, tNode, lView, parentRElement, beforeNode, isProjection) {\n while (tNode != null) {\n ngDevMode && assertTNodeForLView(tNode, lView);\n ngDevMode &&\n assertTNodeType(tNode, 3 /* AnyRNode */ | 12 /* AnyContainer */ | 16 /* Projection */ | 32 /* Icu */);\n var rawSlotValue = lView[tNode.index];\n var tNodeType = tNode.type;\n if (isProjection) {\n if (action === 0 /* Create */) {\n rawSlotValue && attachPatchData(unwrapRNode(rawSlotValue), lView);\n tNode.flags |= 4 /* isProjected */;\n }\n }\n if ((tNode.flags & 64 /* isDetached */) !== 64 /* isDetached */) {\n if (tNodeType & 8 /* ElementContainer */) {\n applyNodes(renderer, action, tNode.child, lView, parentRElement, beforeNode, false);\n applyToElementOrContainer(action, renderer, parentRElement, rawSlotValue, beforeNode);\n }\n else if (tNodeType & 32 /* Icu */) {\n var nextRNode = icuContainerIterate(tNode, lView);\n var rNode = void 0;\n while (rNode = nextRNode()) {\n applyToElementOrContainer(action, renderer, parentRElement, rNode, beforeNode);\n }\n applyToElementOrContainer(action, renderer, parentRElement, rawSlotValue, beforeNode);\n }\n else if (tNodeType & 16 /* Projection */) {\n applyProjectionRecursive(renderer, action, lView, tNode, parentRElement, beforeNode);\n }\n else {\n ngDevMode && assertTNodeType(tNode, 3 /* AnyRNode */ | 4 /* Container */);\n applyToElementOrContainer(action, renderer, parentRElement, rawSlotValue, beforeNode);\n }\n }\n tNode = isProjection ? tNode.projectionNext : tNode.next;\n }\n }\n function applyView(tView, lView, renderer, action, parentRElement, beforeNode) {\n applyNodes(renderer, action, tView.firstChild, lView, parentRElement, beforeNode, false);\n }\n /**\n * `applyProjection` performs operation on the projection.\n *\n * Inserting a projection requires us to locate the projected nodes from the parent component. The\n * complication is that those nodes themselves could be re-projected from their parent component.\n *\n * @param tView The `TView` of `LView` which needs to be inserted, detached, destroyed\n * @param lView The `LView` which needs to be inserted, detached, destroyed.\n * @param tProjectionNode node to project\n */\n function applyProjection(tView, lView, tProjectionNode) {\n var renderer = lView[RENDERER];\n var parentRNode = getParentRElement(tView, tProjectionNode, lView);\n var parentTNode = tProjectionNode.parent || lView[T_HOST];\n var beforeNode = getInsertInFrontOfRNode(parentTNode, tProjectionNode, lView);\n applyProjectionRecursive(renderer, 0 /* Create */, lView, tProjectionNode, parentRNode, beforeNode);\n }\n /**\n * `applyProjectionRecursive` performs operation on the projection specified by `action` (insert,\n * detach, destroy)\n *\n * Inserting a projection requires us to locate the projected nodes from the parent component. The\n * complication is that those nodes themselves could be re-projected from their parent component.\n *\n * @param renderer Render to use\n * @param action action to perform (insert, detach, destroy)\n * @param lView The LView which needs to be inserted, detached, destroyed.\n * @param tProjectionNode node to project\n * @param parentRElement parent DOM element for insertion/removal.\n * @param beforeNode Before which node the insertions should happen.\n */\n function applyProjectionRecursive(renderer, action, lView, tProjectionNode, parentRElement, beforeNode) {\n var componentLView = lView[DECLARATION_COMPONENT_VIEW];\n var componentNode = componentLView[T_HOST];\n ngDevMode &&\n assertEqual(typeof tProjectionNode.projection, 'number', 'expecting projection index');\n var nodeToProjectOrRNodes = componentNode.projection[tProjectionNode.projection];\n if (Array.isArray(nodeToProjectOrRNodes)) {\n // This should not exist, it is a bit of a hack. When we bootstrap a top level node and we\n // need to support passing projectable nodes, so we cheat and put them in the TNode\n // of the Host TView. (Yes we put instance info at the T Level). We can get away with it\n // because we know that that TView is not shared and therefore it will not be a problem.\n // This should be refactored and cleaned up.\n for (var i = 0; i < nodeToProjectOrRNodes.length; i++) {\n var rNode = nodeToProjectOrRNodes[i];\n applyToElementOrContainer(action, renderer, parentRElement, rNode, beforeNode);\n }\n }\n else {\n var nodeToProject = nodeToProjectOrRNodes;\n var projectedComponentLView = componentLView[PARENT];\n applyNodes(renderer, action, nodeToProject, projectedComponentLView, parentRElement, beforeNode, true);\n }\n }\n /**\n * `applyContainer` performs an operation on the container and its views as specified by\n * `action` (insert, detach, destroy)\n *\n * Inserting a Container is complicated by the fact that the container may have Views which\n * themselves have containers or projections.\n *\n * @param renderer Renderer to use\n * @param action action to perform (insert, detach, destroy)\n * @param lContainer The LContainer which needs to be inserted, detached, destroyed.\n * @param parentRElement parent DOM element for insertion/removal.\n * @param beforeNode Before which node the insertions should happen.\n */\n function applyContainer(renderer, action, lContainer, parentRElement, beforeNode) {\n ngDevMode && assertLContainer(lContainer);\n var anchor = lContainer[NATIVE]; // LContainer has its own before node.\n var native = unwrapRNode(lContainer);\n // An LContainer can be created dynamically on any node by injecting ViewContainerRef.\n // Asking for a ViewContainerRef on an element will result in a creation of a separate anchor\n // node (comment in the DOM) that will be different from the LContainer's host node. In this\n // particular case we need to execute action on 2 nodes:\n // - container's host node (this is done in the executeActionOnElementOrContainer)\n // - container's host node (this is done here)\n if (anchor !== native) {\n // This is very strange to me (Misko). I would expect that the native is same as anchor. I\n // don't see a reason why they should be different, but they are.\n //\n // If they are we need to process the second anchor as well.\n applyToElementOrContainer(action, renderer, parentRElement, anchor, beforeNode);\n }\n for (var i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n var lView = lContainer[i];\n applyView(lView[TVIEW], lView, renderer, action, parentRElement, anchor);\n }\n }\n /**\n * Writes class/style to element.\n *\n * @param renderer Renderer to use.\n * @param isClassBased `true` if it should be written to `class` (`false` to write to `style`)\n * @param rNode The Node to write to.\n * @param prop Property to write to. This would be the class/style name.\n * @param value Value to write. If `null`/`undefined`/`false` this is considered a remove (set/add\n * otherwise).\n */\n function applyStyling(renderer, isClassBased, rNode, prop, value) {\n var isProcedural = isProceduralRenderer(renderer);\n if (isClassBased) {\n // We actually want JS true/false here because any truthy value should add the class\n if (!value) {\n ngDevMode && ngDevMode.rendererRemoveClass++;\n if (isProcedural) {\n renderer.removeClass(rNode, prop);\n }\n else {\n rNode.classList.remove(prop);\n }\n }\n else {\n ngDevMode && ngDevMode.rendererAddClass++;\n if (isProcedural) {\n renderer.addClass(rNode, prop);\n }\n else {\n ngDevMode && assertDefined(rNode.classList, 'HTMLElement expected');\n rNode.classList.add(prop);\n }\n }\n }\n else {\n var flags = prop.indexOf('-') === -1 ? undefined : exports.RendererStyleFlags2.DashCase;\n if (value == null /** || value === undefined */) {\n ngDevMode && ngDevMode.rendererRemoveStyle++;\n if (isProcedural) {\n renderer.removeStyle(rNode, prop, flags);\n }\n else {\n rNode.style.removeProperty(prop);\n }\n }\n else {\n // A value is important if it ends with `!important`. The style\n // parser strips any semicolons at the end of the value.\n var isImportant = typeof value === 'string' ? value.endsWith('!important') : false;\n if (isImportant) {\n // !important has to be stripped from the value for it to be valid.\n value = value.slice(0, -10);\n flags |= exports.RendererStyleFlags2.Important;\n }\n ngDevMode && ngDevMode.rendererSetStyle++;\n if (isProcedural) {\n renderer.setStyle(rNode, prop, value, flags);\n }\n else {\n ngDevMode && assertDefined(rNode.style, 'HTMLElement expected');\n rNode.style.setProperty(prop, value, isImportant ? 'important' : '');\n }\n }\n }\n }\n /**\n * Write `cssText` to `RElement`.\n *\n * This function does direct write without any reconciliation. Used for writing initial values, so\n * that static styling values do not pull in the style parser.\n *\n * @param renderer Renderer to use\n * @param element The element which needs to be updated.\n * @param newValue The new class list to write.\n */\n function writeDirectStyle(renderer, element, newValue) {\n ngDevMode && assertString(newValue, '\\'newValue\\' should be a string');\n if (isProceduralRenderer(renderer)) {\n renderer.setAttribute(element, 'style', newValue);\n }\n else {\n element.style.cssText = newValue;\n }\n ngDevMode && ngDevMode.rendererSetStyle++;\n }\n /**\n * Write `className` to `RElement`.\n *\n * This function does direct write without any reconciliation. Used for writing initial values, so\n * that static styling values do not pull in the style parser.\n *\n * @param renderer Renderer to use\n * @param element The element which needs to be updated.\n * @param newValue The new class list to write.\n */\n function writeDirectClass(renderer, element, newValue) {\n ngDevMode && assertString(newValue, '\\'newValue\\' should be a string');\n if (isProceduralRenderer(renderer)) {\n if (newValue === '') {\n // There are tests in `google3` which expect `element.getAttribute('class')` to be `null`.\n renderer.removeAttribute(element, 'class');\n }\n else {\n renderer.setAttribute(element, 'class', newValue);\n }\n }\n else {\n element.className = newValue;\n }\n ngDevMode && ngDevMode.rendererSetClassName++;\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 * Returns an index of `classToSearch` in `className` taking token boundaries into account.\n *\n * `classIndexOf('AB A', 'A', 0)` will be 3 (not 0 since `AB!==A`)\n *\n * @param className A string containing classes (whitespace separated)\n * @param classToSearch A class name to locate\n * @param startingIndex Starting location of search\n * @returns an index of the located class (or -1 if not found)\n */\n function classIndexOf(className, classToSearch, startingIndex) {\n ngDevMode && assertNotEqual(classToSearch, '', 'can not look for \"\" string.');\n var end = className.length;\n while (true) {\n var foundIndex = className.indexOf(classToSearch, startingIndex);\n if (foundIndex === -1)\n return foundIndex;\n if (foundIndex === 0 || className.charCodeAt(foundIndex - 1) <= 32 /* SPACE */) {\n // Ensure that it has leading whitespace\n var length = classToSearch.length;\n if (foundIndex + length === end ||\n className.charCodeAt(foundIndex + length) <= 32 /* SPACE */) {\n // Ensure that it has trailing whitespace\n return foundIndex;\n }\n }\n // False positive, keep searching from where we left off.\n startingIndex = foundIndex + 1;\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 var unusedValueToPlacateAjd$1 = unusedValueExportToPlacateAjd$4 + unusedValueExportToPlacateAjd$5;\n var NG_TEMPLATE_SELECTOR = 'ng-template';\n /**\n * Search the `TAttributes` to see if it contains `cssClassToMatch` (case insensitive)\n *\n * @param attrs `TAttributes` to search through.\n * @param cssClassToMatch class to match (lowercase)\n * @param isProjectionMode Whether or not class matching should look into the attribute `class` in\n * addition to the `AttributeMarker.Classes`.\n */\n function isCssClassMatching(attrs, cssClassToMatch, isProjectionMode) {\n // TODO(misko): The fact that this function needs to know about `isProjectionMode` seems suspect.\n // It is strange to me that sometimes the class information comes in form of `class` attribute\n // and sometimes in form of `AttributeMarker.Classes`. Some investigation is needed to determine\n // if that is the right behavior.\n ngDevMode &&\n assertEqual(cssClassToMatch, cssClassToMatch.toLowerCase(), 'Class name expected to be lowercase.');\n var i = 0;\n while (i < attrs.length) {\n var item = attrs[i++];\n if (isProjectionMode && item === 'class') {\n item = attrs[i];\n if (classIndexOf(item.toLowerCase(), cssClassToMatch, 0) !== -1) {\n return true;\n }\n }\n else if (item === 1 /* Classes */) {\n // We found the classes section. Start searching for the class.\n while (i < attrs.length && typeof (item = attrs[i++]) == 'string') {\n // while we have strings\n if (item.toLowerCase() === cssClassToMatch)\n return true;\n }\n return false;\n }\n }\n return false;\n }\n /**\n * Checks whether the `tNode` represents an inline template (e.g. `*ngFor`).\n *\n * @param tNode current TNode\n */\n function isInlineTemplate(tNode) {\n return tNode.type === 4 /* Container */ && tNode.value !== NG_TEMPLATE_SELECTOR;\n }\n /**\n * Function that checks whether a given tNode matches tag-based selector and has a valid type.\n *\n * Matching can be performed in 2 modes: projection mode (when we project nodes) and regular\n * directive matching mode:\n * - in the \"directive matching\" mode we do _not_ take TContainer's tagName into account if it is\n * different from NG_TEMPLATE_SELECTOR (value different from NG_TEMPLATE_SELECTOR indicates that a\n * tag name was extracted from * syntax so we would match the same directive twice);\n * - in the \"projection\" mode, we use a tag name potentially extracted from the * syntax processing\n * (applicable to TNodeType.Container only).\n */\n function hasTagAndTypeMatch(tNode, currentSelector, isProjectionMode) {\n var tagNameToCompare = tNode.type === 4 /* Container */ && !isProjectionMode ? NG_TEMPLATE_SELECTOR : tNode.value;\n return currentSelector === tagNameToCompare;\n }\n /**\n * A utility function to match an Ivy node static data against a simple CSS selector\n *\n * @param node static data of the node to match\n * @param selector The selector to try matching against the node.\n * @param isProjectionMode if `true` we are matching for content projection, otherwise we are doing\n * directive matching.\n * @returns true if node matches the selector.\n */\n function isNodeMatchingSelector(tNode, selector, isProjectionMode) {\n ngDevMode && assertDefined(selector[0], 'Selector should have a tag name');\n var mode = 4 /* ELEMENT */;\n var nodeAttrs = tNode.attrs || [];\n // Find the index of first attribute that has no value, only a name.\n var nameOnlyMarkerIdx = getNameOnlyMarkerIndex(nodeAttrs);\n // When processing \":not\" selectors, we skip to the next \":not\" if the\n // current one doesn't match\n var skipToNextSelector = false;\n for (var i = 0; i < selector.length; i++) {\n var current = selector[i];\n if (typeof current === 'number') {\n // If we finish processing a :not selector and it hasn't failed, return false\n if (!skipToNextSelector && !isPositive(mode) && !isPositive(current)) {\n return false;\n }\n // If we are skipping to the next :not() and this mode flag is positive,\n // it's a part of the current :not() selector, and we should keep skipping\n if (skipToNextSelector && isPositive(current))\n continue;\n skipToNextSelector = false;\n mode = current | (mode & 1 /* NOT */);\n continue;\n }\n if (skipToNextSelector)\n continue;\n if (mode & 4 /* ELEMENT */) {\n mode = 2 /* ATTRIBUTE */ | mode & 1 /* NOT */;\n if (current !== '' && !hasTagAndTypeMatch(tNode, current, isProjectionMode) ||\n current === '' && selector.length === 1) {\n if (isPositive(mode))\n return false;\n skipToNextSelector = true;\n }\n }\n else {\n var selectorAttrValue = mode & 8 /* CLASS */ ? current : selector[++i];\n // special case for matching against classes when a tNode has been instantiated with\n // class and style values as separate attribute values (e.g. ['title', CLASS, 'foo'])\n if ((mode & 8 /* CLASS */) && tNode.attrs !== null) {\n if (!isCssClassMatching(tNode.attrs, selectorAttrValue, isProjectionMode)) {\n if (isPositive(mode))\n return false;\n skipToNextSelector = true;\n }\n continue;\n }\n var attrName = (mode & 8 /* CLASS */) ? 'class' : current;\n var attrIndexInNode = findAttrIndexInNode(attrName, nodeAttrs, isInlineTemplate(tNode), isProjectionMode);\n if (attrIndexInNode === -1) {\n if (isPositive(mode))\n return false;\n skipToNextSelector = true;\n continue;\n }\n if (selectorAttrValue !== '') {\n var nodeAttrValue = void 0;\n if (attrIndexInNode > nameOnlyMarkerIdx) {\n nodeAttrValue = '';\n }\n else {\n ngDevMode &&\n assertNotEqual(nodeAttrs[attrIndexInNode], 0 /* NamespaceURI */, 'We do not match directives on namespaced attributes');\n // we lowercase the attribute value to be able to match\n // selectors without case-sensitivity\n // (selectors are already in lowercase when generated)\n nodeAttrValue = nodeAttrs[attrIndexInNode + 1].toLowerCase();\n }\n var compareAgainstClassName = mode & 8 /* CLASS */ ? nodeAttrValue : null;\n if (compareAgainstClassName &&\n classIndexOf(compareAgainstClassName, selectorAttrValue, 0) !== -1 ||\n mode & 2 /* ATTRIBUTE */ && selectorAttrValue !== nodeAttrValue) {\n if (isPositive(mode))\n return false;\n skipToNextSelector = true;\n }\n }\n }\n }\n return isPositive(mode) || skipToNextSelector;\n }\n function isPositive(mode) {\n return (mode & 1 /* NOT */) === 0;\n }\n /**\n * Examines the attribute's definition array for a node to find the index of the\n * attribute that matches the given `name`.\n *\n * NOTE: This will not match namespaced attributes.\n *\n * Attribute matching depends upon `isInlineTemplate` and `isProjectionMode`.\n * The following table summarizes which types of attributes we attempt to match:\n *\n * ===========================================================================================================\n * Modes | Normal Attributes | Bindings Attributes | Template Attributes | I18n\n * Attributes\n * ===========================================================================================================\n * Inline + Projection | YES | YES | NO | YES\n * -----------------------------------------------------------------------------------------------------------\n * Inline + Directive | NO | NO | YES | NO\n * -----------------------------------------------------------------------------------------------------------\n * Non-inline + Projection | YES | YES | NO | YES\n * -----------------------------------------------------------------------------------------------------------\n * Non-inline + Directive | YES | YES | NO | YES\n * ===========================================================================================================\n *\n * @param name the name of the attribute to find\n * @param attrs the attribute array to examine\n * @param isInlineTemplate true if the node being matched is an inline template (e.g. `*ngFor`)\n * rather than a manually expanded template node (e.g `<ng-template>`).\n * @param isProjectionMode true if we are matching against content projection otherwise we are\n * matching against directives.\n */\n function findAttrIndexInNode(name, attrs, isInlineTemplate, isProjectionMode) {\n if (attrs === null)\n return -1;\n var i = 0;\n if (isProjectionMode || !isInlineTemplate) {\n var bindingsMode = false;\n while (i < attrs.length) {\n var maybeAttrName = attrs[i];\n if (maybeAttrName === name) {\n return i;\n }\n else if (maybeAttrName === 3 /* Bindings */ || maybeAttrName === 6 /* I18n */) {\n bindingsMode = true;\n }\n else if (maybeAttrName === 1 /* Classes */ || maybeAttrName === 2 /* Styles */) {\n var value = attrs[++i];\n // We should skip classes here because we have a separate mechanism for\n // matching classes in projection mode.\n while (typeof value === 'string') {\n value = attrs[++i];\n }\n continue;\n }\n else if (maybeAttrName === 4 /* Template */) {\n // We do not care about Template attributes in this scenario.\n break;\n }\n else if (maybeAttrName === 0 /* NamespaceURI */) {\n // Skip the whole namespaced attribute and value. This is by design.\n i += 4;\n continue;\n }\n // In binding mode there are only names, rather than name-value pairs.\n i += bindingsMode ? 1 : 2;\n }\n // We did not match the attribute\n return -1;\n }\n else {\n return matchTemplateAttribute(attrs, name);\n }\n }\n function isNodeMatchingSelectorList(tNode, selector, isProjectionMode) {\n if (isProjectionMode === void 0) { isProjectionMode = false; }\n for (var i = 0; i < selector.length; i++) {\n if (isNodeMatchingSelector(tNode, selector[i], isProjectionMode)) {\n return true;\n }\n }\n return false;\n }\n function getProjectAsAttrValue(tNode) {\n var nodeAttrs = tNode.attrs;\n if (nodeAttrs != null) {\n var ngProjectAsAttrIdx = nodeAttrs.indexOf(5 /* ProjectAs */);\n // only check for ngProjectAs in attribute names, don't accidentally match attribute's value\n // (attribute names are stored at even indexes)\n if ((ngProjectAsAttrIdx & 1) === 0) {\n return nodeAttrs[ngProjectAsAttrIdx + 1];\n }\n }\n return null;\n }\n function getNameOnlyMarkerIndex(nodeAttrs) {\n for (var i = 0; i < nodeAttrs.length; i++) {\n var nodeAttr = nodeAttrs[i];\n if (isNameOnlyAttributeMarker(nodeAttr)) {\n return i;\n }\n }\n return nodeAttrs.length;\n }\n function matchTemplateAttribute(attrs, name) {\n var i = attrs.indexOf(4 /* Template */);\n if (i > -1) {\n i++;\n while (i < attrs.length) {\n var attr = attrs[i];\n // Return in case we checked all template attrs and are switching to the next section in the\n // attrs array (that starts with a number that represents an attribute marker).\n if (typeof attr === 'number')\n return -1;\n if (attr === name)\n return i;\n i++;\n }\n }\n return -1;\n }\n /**\n * Checks whether a selector is inside a CssSelectorList\n * @param selector Selector to be checked.\n * @param list List in which to look for the selector.\n */\n function isSelectorInSelectorList(selector, list) {\n selectorListLoop: for (var i = 0; i < list.length; i++) {\n var currentSelectorInList = list[i];\n if (selector.length !== currentSelectorInList.length) {\n continue;\n }\n for (var j = 0; j < selector.length; j++) {\n if (selector[j] !== currentSelectorInList[j]) {\n continue selectorListLoop;\n }\n }\n return true;\n }\n return false;\n }\n function maybeWrapInNotSelector(isNegativeMode, chunk) {\n return isNegativeMode ? ':not(' + chunk.trim() + ')' : chunk;\n }\n function stringifyCSSSelector(selector) {\n var result = selector[0];\n var i = 1;\n var mode = 2 /* ATTRIBUTE */;\n var currentChunk = '';\n var isNegativeMode = false;\n while (i < selector.length) {\n var valueOrMarker = selector[i];\n if (typeof valueOrMarker === 'string') {\n if (mode & 2 /* ATTRIBUTE */) {\n var attrValue = selector[++i];\n currentChunk +=\n '[' + valueOrMarker + (attrValue.length > 0 ? '=\"' + attrValue + '\"' : '') + ']';\n }\n else if (mode & 8 /* CLASS */) {\n currentChunk += '.' + valueOrMarker;\n }\n else if (mode & 4 /* ELEMENT */) {\n currentChunk += ' ' + valueOrMarker;\n }\n }\n else {\n //\n // Append current chunk to the final result in case we come across SelectorFlag, which\n // indicates that the previous section of a selector is over. We need to accumulate content\n // between flags to make sure we wrap the chunk later in :not() selector if needed, e.g.\n // ```\n // ['', Flags.CLASS, '.classA', Flags.CLASS | Flags.NOT, '.classB', '.classC']\n // ```\n // should be transformed to `.classA :not(.classB .classC)`.\n //\n // Note: for negative selector part, we accumulate content between flags until we find the\n // next negative flag. This is needed to support a case where `:not()` rule contains more than\n // one chunk, e.g. the following selector:\n // ```\n // ['', Flags.ELEMENT | Flags.NOT, 'p', Flags.CLASS, 'foo', Flags.CLASS | Flags.NOT, 'bar']\n // ```\n // should be stringified to `:not(p.foo) :not(.bar)`\n //\n if (currentChunk !== '' && !isPositive(valueOrMarker)) {\n result += maybeWrapInNotSelector(isNegativeMode, currentChunk);\n currentChunk = '';\n }\n mode = valueOrMarker;\n // According to CssSelector spec, once we come across `SelectorFlags.NOT` flag, the negative\n // mode is maintained for remaining chunks of a selector.\n isNegativeMode = isNegativeMode || !isPositive(mode);\n }\n i++;\n }\n if (currentChunk !== '') {\n result += maybeWrapInNotSelector(isNegativeMode, currentChunk);\n }\n return result;\n }\n /**\n * Generates string representation of CSS selector in parsed form.\n *\n * ComponentDef and DirectiveDef are generated with the selector in parsed form to avoid doing\n * additional parsing at runtime (for example, for directive matching). However in some cases (for\n * example, while bootstrapping a component), a string version of the selector is required to query\n * for the host element on the page. This function takes the parsed form of a selector and returns\n * its string representation.\n *\n * @param selectorList selector in parsed form\n * @returns string representation of a given selector\n */\n function stringifyCSSSelectorList(selectorList) {\n return selectorList.map(stringifyCSSSelector).join(',');\n }\n /**\n * Extracts attributes and classes information from a given CSS selector.\n *\n * This function is used while creating a component dynamically. In this case, the host element\n * (that is created dynamically) should contain attributes and classes specified in component's CSS\n * selector.\n *\n * @param selector CSS selector in parsed form (in a form of array)\n * @returns object with `attrs` and `classes` fields that contain extracted information\n */\n function extractAttrsAndClassesFromSelector(selector) {\n var attrs = [];\n var classes = [];\n var i = 1;\n var mode = 2 /* ATTRIBUTE */;\n while (i < selector.length) {\n var valueOrMarker = selector[i];\n if (typeof valueOrMarker === 'string') {\n if (mode === 2 /* ATTRIBUTE */) {\n if (valueOrMarker !== '') {\n attrs.push(valueOrMarker, selector[++i]);\n }\n }\n else if (mode === 8 /* CLASS */) {\n classes.push(valueOrMarker);\n }\n }\n else {\n // According to CssSelector spec, once we come across `SelectorFlags.NOT` flag, the negative\n // mode is maintained for remaining chunks of a selector. Since attributes and classes are\n // extracted only for \"positive\" part of the selector, we can stop here.\n if (!isPositive(mode))\n break;\n mode = valueOrMarker;\n }\n i++;\n }\n return { attrs: attrs, classes: classes };\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 /** A special value which designates that a value has not changed. */\n var NO_CHANGE = (typeof ngDevMode === 'undefined' || ngDevMode) ? { __brand__: 'NO_CHANGE' } : {};\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 * Advances to an element for later binding instructions.\n *\n * Used in conjunction with instructions like {@link property} to act on elements with specified\n * indices, for example those created with {@link element} or {@link elementStart}.\n *\n * ```ts\n * (rf: RenderFlags, ctx: any) => {\n * if (rf & 1) {\n * text(0, 'Hello');\n * text(1, 'Goodbye')\n * element(2, 'div');\n * }\n * if (rf & 2) {\n * advance(2); // Advance twice to the <div>.\n * property('title', 'test');\n * }\n * }\n * ```\n * @param delta Number of elements to advance forwards by.\n *\n * @codeGenApi\n */\n function ɵɵadvance(delta) {\n ngDevMode && assertGreaterThan(delta, 0, 'Can only advance forward');\n selectIndexInternal(getTView(), getLView(), getSelectedIndex() + delta, isInCheckNoChangesMode());\n }\n function selectIndexInternal(tView, lView, index, checkNoChangesMode) {\n ngDevMode && assertIndexInDeclRange(lView, index);\n // Flush the initial hooks for elements in the view that have been added up to this point.\n // PERF WARNING: do NOT extract this to a separate function without running benchmarks\n if (!checkNoChangesMode) {\n var hooksInitPhaseCompleted = (lView[FLAGS] & 3 /* InitPhaseStateMask */) === 3 /* InitPhaseCompleted */;\n if (hooksInitPhaseCompleted) {\n var preOrderCheckHooks = tView.preOrderCheckHooks;\n if (preOrderCheckHooks !== null) {\n executeCheckHooks(lView, preOrderCheckHooks, index);\n }\n }\n else {\n var preOrderHooks = tView.preOrderHooks;\n if (preOrderHooks !== null) {\n executeInitAndCheckHooks(lView, preOrderHooks, 0 /* OnInitHooksToBeRun */, index);\n }\n }\n }\n // We must set the selected index *after* running the hooks, because hooks may have side-effects\n // that cause other template functions to run, thus updating the selected index, which is global\n // state. If we run `setSelectedIndex` *before* we run the hooks, in some cases the selected index\n // will be altered by the time we leave the `ɵɵadvance` instruction.\n setSelectedIndex(index);\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 function toTStylingRange(prev, next) {\n ngDevMode && assertNumberInRange(prev, 0, 32767 /* UNSIGNED_MASK */);\n ngDevMode && assertNumberInRange(next, 0, 32767 /* UNSIGNED_MASK */);\n return (prev << 17 /* PREV_SHIFT */ | next << 2 /* NEXT_SHIFT */);\n }\n function getTStylingRangePrev(tStylingRange) {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n return (tStylingRange >> 17 /* PREV_SHIFT */) & 32767 /* UNSIGNED_MASK */;\n }\n function getTStylingRangePrevDuplicate(tStylingRange) {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n return (tStylingRange & 2 /* PREV_DUPLICATE */) ==\n 2 /* PREV_DUPLICATE */;\n }\n function setTStylingRangePrev(tStylingRange, previous) {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n ngDevMode && assertNumberInRange(previous, 0, 32767 /* UNSIGNED_MASK */);\n return ((tStylingRange & ~4294836224 /* PREV_MASK */) |\n (previous << 17 /* PREV_SHIFT */));\n }\n function setTStylingRangePrevDuplicate(tStylingRange) {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n return (tStylingRange | 2 /* PREV_DUPLICATE */);\n }\n function getTStylingRangeNext(tStylingRange) {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n return (tStylingRange & 131068 /* NEXT_MASK */) >> 2 /* NEXT_SHIFT */;\n }\n function setTStylingRangeNext(tStylingRange, next) {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n ngDevMode && assertNumberInRange(next, 0, 32767 /* UNSIGNED_MASK */);\n return ((tStylingRange & ~131068 /* NEXT_MASK */) | //\n next << 2 /* NEXT_SHIFT */);\n }\n function getTStylingRangeNextDuplicate(tStylingRange) {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n return (tStylingRange & 1 /* NEXT_DUPLICATE */) ===\n 1 /* NEXT_DUPLICATE */;\n }\n function setTStylingRangeNextDuplicate(tStylingRange) {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n return (tStylingRange | 1 /* NEXT_DUPLICATE */);\n }\n function getTStylingRangeTail(tStylingRange) {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n var next = getTStylingRangeNext(tStylingRange);\n return next === 0 ? getTStylingRangePrev(tStylingRange) : next;\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 * Patch a `debug` property on top of the existing object.\n *\n * NOTE: always call this method with `ngDevMode && attachDebugObject(...)`\n *\n * @param obj Object to patch\n * @param debug Value to patch\n */\n function attachDebugObject(obj, debug) {\n if (ngDevMode) {\n Object.defineProperty(obj, 'debug', { value: debug, enumerable: false });\n }\n else {\n throw new Error('This method should be guarded with `ngDevMode` so that it can be tree shaken in production!');\n }\n }\n /**\n * Patch a `debug` property getter on top of the existing object.\n *\n * NOTE: always call this method with `ngDevMode && attachDebugObject(...)`\n *\n * @param obj Object to patch\n * @param debugGetter Getter returning a value to patch\n */\n function attachDebugGetter(obj, debugGetter) {\n if (ngDevMode) {\n Object.defineProperty(obj, 'debug', { get: debugGetter, enumerable: false });\n }\n else {\n throw new Error('This method should be guarded with `ngDevMode` so that it can be tree shaken in production!');\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 var NG_DEV_MODE = ((typeof ngDevMode === 'undefined' || !!ngDevMode) && initNgDevMode());\n /*\n * This file contains conditionally attached classes which provide human readable (debug) level\n * information for `LView`, `LContainer` and other internal data structures. These data structures\n * are stored internally as array which makes it very difficult during debugging to reason about the\n * current state of the system.\n *\n * Patching the array with extra property does change the array's hidden class' but it does not\n * change the cost of access, therefore this patching should not have significant if any impact in\n * `ngDevMode` mode. (see: https://jsperf.com/array-vs-monkey-patch-array)\n *\n * So instead of seeing:\n * ```\n * Array(30) [Object, 659, null, …]\n * ```\n *\n * You get to see:\n * ```\n * LViewDebug {\n * views: [...],\n * flags: {attached: true, ...}\n * nodes: [\n * {html: '<div id=\"123\">', ..., nodes: [\n * {html: '<span>', ..., nodes: null}\n * ]}\n * ]\n * }\n * ```\n */\n var LVIEW_COMPONENT_CACHE;\n var LVIEW_EMBEDDED_CACHE;\n var LVIEW_ROOT;\n /**\n * This function clones a blueprint and creates LView.\n *\n * Simple slice will keep the same type, and we need it to be LView\n */\n function cloneToLViewFromTViewBlueprint(tView) {\n var debugTView = tView;\n var lView = getLViewToClone(debugTView.type, tView.template && tView.template.name);\n return lView.concat(tView.blueprint);\n }\n function getLViewToClone(type, name) {\n switch (type) {\n case 0 /* Root */:\n if (LVIEW_ROOT === undefined)\n LVIEW_ROOT = new (createNamedArrayType('LRootView'))();\n return LVIEW_ROOT;\n case 1 /* Component */:\n if (LVIEW_COMPONENT_CACHE === undefined)\n LVIEW_COMPONENT_CACHE = new Map();\n var componentArray = LVIEW_COMPONENT_CACHE.get(name);\n if (componentArray === undefined) {\n componentArray = new (createNamedArrayType('LComponentView' + nameSuffix(name)))();\n LVIEW_COMPONENT_CACHE.set(name, componentArray);\n }\n return componentArray;\n case 2 /* Embedded */:\n if (LVIEW_EMBEDDED_CACHE === undefined)\n LVIEW_EMBEDDED_CACHE = new Map();\n var embeddedArray = LVIEW_EMBEDDED_CACHE.get(name);\n if (embeddedArray === undefined) {\n embeddedArray = new (createNamedArrayType('LEmbeddedView' + nameSuffix(name)))();\n LVIEW_EMBEDDED_CACHE.set(name, embeddedArray);\n }\n return embeddedArray;\n }\n }\n function nameSuffix(text) {\n if (text == null)\n return '';\n var index = text.lastIndexOf('_Template');\n return '_' + (index === -1 ? text : text.substr(0, index));\n }\n /**\n * This class is a debug version of Object literal so that we can have constructor name show up\n * in\n * debug tools in ngDevMode.\n */\n var TViewConstructor = /** @class */ (function () {\n function TView(type, blueprint, template, queries, viewQuery, declTNode, data, bindingStartIndex, expandoStartIndex, hostBindingOpCodes, firstCreatePass, firstUpdatePass, staticViewQueries, staticContentQueries, preOrderHooks, preOrderCheckHooks, contentHooks, contentCheckHooks, viewHooks, viewCheckHooks, destroyHooks, cleanup, contentQueries, components, directiveRegistry, pipeRegistry, firstChild, schemas, consts, incompleteFirstPass, _decls, _vars) {\n this.type = type;\n this.blueprint = blueprint;\n this.template = template;\n this.queries = queries;\n this.viewQuery = viewQuery;\n this.declTNode = declTNode;\n this.data = data;\n this.bindingStartIndex = bindingStartIndex;\n this.expandoStartIndex = expandoStartIndex;\n this.hostBindingOpCodes = hostBindingOpCodes;\n this.firstCreatePass = firstCreatePass;\n this.firstUpdatePass = firstUpdatePass;\n this.staticViewQueries = staticViewQueries;\n this.staticContentQueries = staticContentQueries;\n this.preOrderHooks = preOrderHooks;\n this.preOrderCheckHooks = preOrderCheckHooks;\n this.contentHooks = contentHooks;\n this.contentCheckHooks = contentCheckHooks;\n this.viewHooks = viewHooks;\n this.viewCheckHooks = viewCheckHooks;\n this.destroyHooks = destroyHooks;\n this.cleanup = cleanup;\n this.contentQueries = contentQueries;\n this.components = components;\n this.directiveRegistry = directiveRegistry;\n this.pipeRegistry = pipeRegistry;\n this.firstChild = firstChild;\n this.schemas = schemas;\n this.consts = consts;\n this.incompleteFirstPass = incompleteFirstPass;\n this._decls = _decls;\n this._vars = _vars;\n }\n Object.defineProperty(TView.prototype, \"template_\", {\n get: function () {\n var buf = [];\n processTNodeChildren(this.firstChild, buf);\n return buf.join('');\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(TView.prototype, \"type_\", {\n get: function () {\n return TViewTypeAsString[this.type] || \"TViewType.?\" + this.type + \"?\";\n },\n enumerable: false,\n configurable: true\n });\n return TView;\n }());\n var TNode = /** @class */ (function () {\n function TNode(tView_, //\n type, //\n index, //\n insertBeforeIndex, //\n injectorIndex, //\n directiveStart, //\n directiveEnd, //\n directiveStylingLast, //\n propertyBindings, //\n flags, //\n providerIndexes, //\n value, //\n attrs, //\n mergedAttrs, //\n localNames, //\n initialInputs, //\n inputs, //\n outputs, //\n tViews, //\n next, //\n projectionNext, //\n child, //\n parent, //\n projection, //\n styles, //\n stylesWithoutHost, //\n residualStyles, //\n classes, //\n classesWithoutHost, //\n residualClasses, //\n classBindings, //\n styleBindings) {\n this.tView_ = tView_;\n this.type = type;\n this.index = index;\n this.insertBeforeIndex = insertBeforeIndex;\n this.injectorIndex = injectorIndex;\n this.directiveStart = directiveStart;\n this.directiveEnd = directiveEnd;\n this.directiveStylingLast = directiveStylingLast;\n this.propertyBindings = propertyBindings;\n this.flags = flags;\n this.providerIndexes = providerIndexes;\n this.value = value;\n this.attrs = attrs;\n this.mergedAttrs = mergedAttrs;\n this.localNames = localNames;\n this.initialInputs = initialInputs;\n this.inputs = inputs;\n this.outputs = outputs;\n this.tViews = tViews;\n this.next = next;\n this.projectionNext = projectionNext;\n this.child = child;\n this.parent = parent;\n this.projection = projection;\n this.styles = styles;\n this.stylesWithoutHost = stylesWithoutHost;\n this.residualStyles = residualStyles;\n this.classes = classes;\n this.classesWithoutHost = classesWithoutHost;\n this.residualClasses = residualClasses;\n this.classBindings = classBindings;\n this.styleBindings = styleBindings;\n }\n /**\n * Return a human debug version of the set of `NodeInjector`s which will be consulted when\n * resolving tokens from this `TNode`.\n *\n * When debugging applications, it is often difficult to determine which `NodeInjector`s will be\n * consulted. This method shows a list of `DebugNode`s representing the `TNode`s which will be\n * consulted in order when resolving a token starting at this `TNode`.\n *\n * The original data is stored in `LView` and `TView` with a lot of offset indexes, and so it is\n * difficult to reason about.\n *\n * @param lView The `LView` instance for this `TNode`.\n */\n TNode.prototype.debugNodeInjectorPath = function (lView) {\n var path = [];\n var injectorIndex = getInjectorIndex(this, lView);\n if (injectorIndex === -1) {\n // Looks like the current `TNode` does not have `NodeInjector` associated with it => look for\n // parent NodeInjector.\n var parentLocation = getParentInjectorLocation(this, lView);\n if (parentLocation !== NO_PARENT_INJECTOR) {\n // We found a parent, so start searching from the parent location.\n injectorIndex = getParentInjectorIndex(parentLocation);\n lView = getParentInjectorView(parentLocation, lView);\n }\n else {\n // No parents have been found, so there are no `NodeInjector`s to consult.\n }\n }\n while (injectorIndex !== -1) {\n ngDevMode && assertNodeInjector(lView, injectorIndex);\n var tNode = lView[TVIEW].data[injectorIndex + 8 /* TNODE */];\n path.push(buildDebugNode(tNode, lView));\n var parentLocation = lView[injectorIndex + 8 /* PARENT */];\n if (parentLocation === NO_PARENT_INJECTOR) {\n injectorIndex = -1;\n }\n else {\n injectorIndex = getParentInjectorIndex(parentLocation);\n lView = getParentInjectorView(parentLocation, lView);\n }\n }\n return path;\n };\n Object.defineProperty(TNode.prototype, \"type_\", {\n get: function () {\n return toTNodeTypeAsString(this.type) || \"TNodeType.?\" + this.type + \"?\";\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(TNode.prototype, \"flags_\", {\n get: function () {\n var flags = [];\n if (this.flags & 16 /* hasClassInput */)\n flags.push('TNodeFlags.hasClassInput');\n if (this.flags & 8 /* hasContentQuery */)\n flags.push('TNodeFlags.hasContentQuery');\n if (this.flags & 32 /* hasStyleInput */)\n flags.push('TNodeFlags.hasStyleInput');\n if (this.flags & 128 /* hasHostBindings */)\n flags.push('TNodeFlags.hasHostBindings');\n if (this.flags & 2 /* isComponentHost */)\n flags.push('TNodeFlags.isComponentHost');\n if (this.flags & 1 /* isDirectiveHost */)\n flags.push('TNodeFlags.isDirectiveHost');\n if (this.flags & 64 /* isDetached */)\n flags.push('TNodeFlags.isDetached');\n if (this.flags & 4 /* isProjected */)\n flags.push('TNodeFlags.isProjected');\n return flags.join('|');\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(TNode.prototype, \"template_\", {\n get: function () {\n if (this.type & 1 /* Text */)\n return this.value;\n var buf = [];\n var tagName = typeof this.value === 'string' && this.value || this.type_;\n buf.push('<', tagName);\n if (this.flags) {\n buf.push(' ', this.flags_);\n }\n if (this.attrs) {\n for (var i = 0; i < this.attrs.length;) {\n var attrName = this.attrs[i++];\n if (typeof attrName == 'number') {\n break;\n }\n var attrValue = this.attrs[i++];\n buf.push(' ', attrName, '=\"', attrValue, '\"');\n }\n }\n buf.push('>');\n processTNodeChildren(this.child, buf);\n buf.push('</', tagName, '>');\n return buf.join('');\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(TNode.prototype, \"styleBindings_\", {\n get: function () {\n return toDebugStyleBinding(this, false);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(TNode.prototype, \"classBindings_\", {\n get: function () {\n return toDebugStyleBinding(this, true);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(TNode.prototype, \"providerIndexStart_\", {\n get: function () {\n return this.providerIndexes & 1048575 /* ProvidersStartIndexMask */;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(TNode.prototype, \"providerIndexEnd_\", {\n get: function () {\n return this.providerIndexStart_ +\n (this.providerIndexes >>> 20 /* CptViewProvidersCountShift */);\n },\n enumerable: false,\n configurable: true\n });\n return TNode;\n }());\n var TNodeDebug = TNode;\n function toDebugStyleBinding(tNode, isClassBased) {\n var tData = tNode.tView_.data;\n var bindings = [];\n var range = isClassBased ? tNode.classBindings : tNode.styleBindings;\n var prev = getTStylingRangePrev(range);\n var next = getTStylingRangeNext(range);\n var isTemplate = next !== 0;\n var cursor = isTemplate ? next : prev;\n while (cursor !== 0) {\n var itemKey = tData[cursor];\n var itemRange = tData[cursor + 1];\n bindings.unshift({\n key: itemKey,\n index: cursor,\n isTemplate: isTemplate,\n prevDuplicate: getTStylingRangePrevDuplicate(itemRange),\n nextDuplicate: getTStylingRangeNextDuplicate(itemRange),\n nextIndex: getTStylingRangeNext(itemRange),\n prevIndex: getTStylingRangePrev(itemRange),\n });\n if (cursor === prev)\n isTemplate = false;\n cursor = getTStylingRangePrev(itemRange);\n }\n bindings.push((isClassBased ? tNode.residualClasses : tNode.residualStyles) || null);\n return bindings;\n }\n function processTNodeChildren(tNode, buf) {\n while (tNode) {\n buf.push(tNode.template_);\n tNode = tNode.next;\n }\n }\n var TViewData = NG_DEV_MODE && createNamedArrayType('TViewData') || null;\n var TVIEWDATA_EMPTY; // can't initialize here or it will not be tree shaken, because\n // `LView` constructor could have side-effects.\n /**\n * This function clones a blueprint and creates TData.\n *\n * Simple slice will keep the same type, and we need it to be TData\n */\n function cloneToTViewData(list) {\n if (TVIEWDATA_EMPTY === undefined)\n TVIEWDATA_EMPTY = new TViewData();\n return TVIEWDATA_EMPTY.concat(list);\n }\n var LViewBlueprint = NG_DEV_MODE && createNamedArrayType('LViewBlueprint') || null;\n var MatchesArray = NG_DEV_MODE && createNamedArrayType('MatchesArray') || null;\n var TViewComponents = NG_DEV_MODE && createNamedArrayType('TViewComponents') || null;\n var TNodeLocalNames = NG_DEV_MODE && createNamedArrayType('TNodeLocalNames') || null;\n var TNodeInitialInputs = NG_DEV_MODE && createNamedArrayType('TNodeInitialInputs') || null;\n var TNodeInitialData = NG_DEV_MODE && createNamedArrayType('TNodeInitialData') || null;\n var LCleanup = NG_DEV_MODE && createNamedArrayType('LCleanup') || null;\n var TCleanup = NG_DEV_MODE && createNamedArrayType('TCleanup') || null;\n function attachLViewDebug(lView) {\n attachDebugObject(lView, new LViewDebug(lView));\n }\n function attachLContainerDebug(lContainer) {\n attachDebugObject(lContainer, new LContainerDebug(lContainer));\n }\n function toDebug(obj) {\n if (obj) {\n var debug = obj.debug;\n assertDefined(debug, 'Object does not have a debug representation.');\n return debug;\n }\n else {\n return obj;\n }\n }\n /**\n * Use this method to unwrap a native element in `LView` and convert it into HTML for easier\n * reading.\n *\n * @param value possibly wrapped native DOM node.\n * @param includeChildren If `true` then the serialized HTML form will include child elements\n * (same\n * as `outerHTML`). If `false` then the serialized HTML form will only contain the element\n * itself\n * (will not serialize child elements).\n */\n function toHtml(value, includeChildren) {\n if (includeChildren === void 0) { includeChildren = false; }\n var node = unwrapRNode(value);\n if (node) {\n switch (node.nodeType) {\n case Node.TEXT_NODE:\n return node.textContent;\n case Node.COMMENT_NODE:\n return \"<!--\" + node.textContent + \"-->\";\n case Node.ELEMENT_NODE:\n var outerHTML = node.outerHTML;\n if (includeChildren) {\n return outerHTML;\n }\n else {\n var innerHTML = '>' + node.innerHTML + '<';\n return (outerHTML.split(innerHTML)[0]) + '>';\n }\n }\n }\n return null;\n }\n var LViewDebug = /** @class */ (function () {\n function LViewDebug(_raw_lView) {\n this._raw_lView = _raw_lView;\n }\n Object.defineProperty(LViewDebug.prototype, \"flags\", {\n /**\n * Flags associated with the `LView` unpacked into a more readable state.\n */\n get: function () {\n var flags = this._raw_lView[FLAGS];\n return {\n __raw__flags__: flags,\n initPhaseState: flags & 3 /* InitPhaseStateMask */,\n creationMode: !!(flags & 4 /* CreationMode */),\n firstViewPass: !!(flags & 8 /* FirstLViewPass */),\n checkAlways: !!(flags & 16 /* CheckAlways */),\n dirty: !!(flags & 64 /* Dirty */),\n attached: !!(flags & 128 /* Attached */),\n destroyed: !!(flags & 256 /* Destroyed */),\n isRoot: !!(flags & 512 /* IsRoot */),\n indexWithinInitPhase: flags >> 11 /* IndexWithinInitPhaseShift */,\n };\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(LViewDebug.prototype, \"parent\", {\n get: function () {\n return toDebug(this._raw_lView[PARENT]);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(LViewDebug.prototype, \"hostHTML\", {\n get: function () {\n return toHtml(this._raw_lView[HOST], true);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(LViewDebug.prototype, \"html\", {\n get: function () {\n return (this.nodes || []).map(mapToHTML).join('');\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(LViewDebug.prototype, \"context\", {\n get: function () {\n return this._raw_lView[CONTEXT];\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(LViewDebug.prototype, \"nodes\", {\n /**\n * The tree of nodes associated with the current `LView`. The nodes have been normalized into\n * a tree structure with relevant details pulled out for readability.\n */\n get: function () {\n var lView = this._raw_lView;\n var tNode = lView[TVIEW].firstChild;\n return toDebugNodes(tNode, lView);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(LViewDebug.prototype, \"template\", {\n get: function () {\n return this.tView.template_;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(LViewDebug.prototype, \"tView\", {\n get: function () {\n return this._raw_lView[TVIEW];\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(LViewDebug.prototype, \"cleanup\", {\n get: function () {\n return this._raw_lView[CLEANUP];\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(LViewDebug.prototype, \"injector\", {\n get: function () {\n return this._raw_lView[INJECTOR];\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(LViewDebug.prototype, \"rendererFactory\", {\n get: function () {\n return this._raw_lView[RENDERER_FACTORY];\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(LViewDebug.prototype, \"renderer\", {\n get: function () {\n return this._raw_lView[RENDERER];\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(LViewDebug.prototype, \"sanitizer\", {\n get: function () {\n return this._raw_lView[SANITIZER];\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(LViewDebug.prototype, \"childHead\", {\n get: function () {\n return toDebug(this._raw_lView[CHILD_HEAD]);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(LViewDebug.prototype, \"next\", {\n get: function () {\n return toDebug(this._raw_lView[NEXT]);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(LViewDebug.prototype, \"childTail\", {\n get: function () {\n return toDebug(this._raw_lView[CHILD_TAIL]);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(LViewDebug.prototype, \"declarationView\", {\n get: function () {\n return toDebug(this._raw_lView[DECLARATION_VIEW]);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(LViewDebug.prototype, \"queries\", {\n get: function () {\n return this._raw_lView[QUERIES];\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(LViewDebug.prototype, \"tHost\", {\n get: function () {\n return this._raw_lView[T_HOST];\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(LViewDebug.prototype, \"decls\", {\n get: function () {\n return toLViewRange(this.tView, this._raw_lView, HEADER_OFFSET, this.tView.bindingStartIndex);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(LViewDebug.prototype, \"vars\", {\n get: function () {\n return toLViewRange(this.tView, this._raw_lView, this.tView.bindingStartIndex, this.tView.expandoStartIndex);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(LViewDebug.prototype, \"expando\", {\n get: function () {\n return toLViewRange(this.tView, this._raw_lView, this.tView.expandoStartIndex, this._raw_lView.length);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(LViewDebug.prototype, \"childViews\", {\n /**\n * Normalized view of child views (and containers) attached at this location.\n */\n get: function () {\n var childViews = [];\n var child = this.childHead;\n while (child) {\n childViews.push(child);\n child = child.next;\n }\n return childViews;\n },\n enumerable: false,\n configurable: true\n });\n return LViewDebug;\n }());\n function mapToHTML(node) {\n if (node.type === 'ElementContainer') {\n return (node.children || []).map(mapToHTML).join('');\n }\n else if (node.type === 'IcuContainer') {\n throw new Error('Not implemented');\n }\n else {\n return toHtml(node.native, true) || '';\n }\n }\n function toLViewRange(tView, lView, start, end) {\n var content = [];\n for (var index = start; index < end; index++) {\n content.push({ index: index, t: tView.data[index], l: lView[index] });\n }\n return { start: start, end: end, length: end - start, content: content };\n }\n /**\n * Turns a flat list of nodes into a tree by walking the associated `TNode` tree.\n *\n * @param tNode\n * @param lView\n */\n function toDebugNodes(tNode, lView) {\n if (tNode) {\n var debugNodes = [];\n var tNodeCursor = tNode;\n while (tNodeCursor) {\n debugNodes.push(buildDebugNode(tNodeCursor, lView));\n tNodeCursor = tNodeCursor.next;\n }\n return debugNodes;\n }\n else {\n return [];\n }\n }\n function buildDebugNode(tNode, lView) {\n var rawValue = lView[tNode.index];\n var native = unwrapRNode(rawValue);\n var factories = [];\n var instances = [];\n var tView = lView[TVIEW];\n for (var i = tNode.directiveStart; i < tNode.directiveEnd; i++) {\n var def = tView.data[i];\n factories.push(def.type);\n instances.push(lView[i]);\n }\n return {\n html: toHtml(native),\n type: toTNodeTypeAsString(tNode.type),\n tNode: tNode,\n native: native,\n children: toDebugNodes(tNode.child, lView),\n factories: factories,\n instances: instances,\n injector: buildNodeInjectorDebug(tNode, tView, lView),\n get injectorResolutionPath() {\n return tNode.debugNodeInjectorPath(lView);\n },\n };\n }\n function buildNodeInjectorDebug(tNode, tView, lView) {\n var viewProviders = [];\n for (var i = tNode.providerIndexStart_; i < tNode.providerIndexEnd_; i++) {\n viewProviders.push(tView.data[i]);\n }\n var providers = [];\n for (var i = tNode.providerIndexEnd_; i < tNode.directiveEnd; i++) {\n providers.push(tView.data[i]);\n }\n var nodeInjectorDebug = {\n bloom: toBloom(lView, tNode.injectorIndex),\n cumulativeBloom: toBloom(tView.data, tNode.injectorIndex),\n providers: providers,\n viewProviders: viewProviders,\n parentInjectorIndex: lView[tNode.providerIndexStart_ - 1],\n };\n return nodeInjectorDebug;\n }\n /**\n * Convert a number at `idx` location in `array` into binary representation.\n *\n * @param array\n * @param idx\n */\n function binary(array, idx) {\n var value = array[idx];\n // If not a number we print 8 `?` to retain alignment but let user know that it was called on\n // wrong type.\n if (typeof value !== 'number')\n return '????????';\n // We prefix 0s so that we have constant length number\n var text = '00000000' + value.toString(2);\n return text.substring(text.length - 8);\n }\n /**\n * Convert a bloom filter at location `idx` in `array` into binary representation.\n *\n * @param array\n * @param idx\n */\n function toBloom(array, idx) {\n if (idx < 0) {\n return 'NO_NODE_INJECTOR';\n }\n return binary(array, idx + 7) + \"_\" + binary(array, idx + 6) + \"_\" + binary(array, idx + 5) + \"_\" + binary(array, idx + 4) + \"_\" + binary(array, idx + 3) + \"_\" + binary(array, idx + 2) + \"_\" + binary(array, idx + 1) + \"_\" + binary(array, idx + 0);\n }\n var LContainerDebug = /** @class */ (function () {\n function LContainerDebug(_raw_lContainer) {\n this._raw_lContainer = _raw_lContainer;\n }\n Object.defineProperty(LContainerDebug.prototype, \"hasTransplantedViews\", {\n get: function () {\n return this._raw_lContainer[HAS_TRANSPLANTED_VIEWS];\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(LContainerDebug.prototype, \"views\", {\n get: function () {\n return this._raw_lContainer.slice(CONTAINER_HEADER_OFFSET)\n .map(toDebug);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(LContainerDebug.prototype, \"parent\", {\n get: function () {\n return toDebug(this._raw_lContainer[PARENT]);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(LContainerDebug.prototype, \"movedViews\", {\n get: function () {\n return this._raw_lContainer[MOVED_VIEWS];\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(LContainerDebug.prototype, \"host\", {\n get: function () {\n return this._raw_lContainer[HOST];\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(LContainerDebug.prototype, \"native\", {\n get: function () {\n return this._raw_lContainer[NATIVE];\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(LContainerDebug.prototype, \"next\", {\n get: function () {\n return toDebug(this._raw_lContainer[NEXT]);\n },\n enumerable: false,\n configurable: true\n });\n return LContainerDebug;\n }());\n\n var ɵ0$5 = function () { return Promise.resolve(null); };\n /**\n * A permanent marker promise which signifies that the current CD tree is\n * clean.\n */\n var _CLEAN_PROMISE = (ɵ0$5)();\n /**\n * Invoke `HostBindingsFunction`s for view.\n *\n * This methods executes `TView.hostBindingOpCodes`. It is used to execute the\n * `HostBindingsFunction`s associated with the current `LView`.\n *\n * @param tView Current `TView`.\n * @param lView Current `LView`.\n */\n function processHostBindingOpCodes(tView, lView) {\n var hostBindingOpCodes = tView.hostBindingOpCodes;\n if (hostBindingOpCodes === null)\n return;\n try {\n for (var i = 0; i < hostBindingOpCodes.length; i++) {\n var opCode = hostBindingOpCodes[i];\n if (opCode < 0) {\n // Negative numbers are element indexes.\n setSelectedIndex(~opCode);\n }\n else {\n // Positive numbers are NumberTuple which store bindingRootIndex and directiveIndex.\n var directiveIdx = opCode;\n var bindingRootIndx = hostBindingOpCodes[++i];\n var hostBindingFn = hostBindingOpCodes[++i];\n setBindingRootForHostBindings(bindingRootIndx, directiveIdx);\n var context = lView[directiveIdx];\n hostBindingFn(2 /* Update */, context);\n }\n }\n }\n finally {\n setSelectedIndex(-1);\n }\n }\n /** Refreshes all content queries declared by directives in a given view */\n function refreshContentQueries(tView, lView) {\n var contentQueries = tView.contentQueries;\n if (contentQueries !== null) {\n for (var i = 0; i < contentQueries.length; i += 2) {\n var queryStartIdx = contentQueries[i];\n var directiveDefIdx = contentQueries[i + 1];\n if (directiveDefIdx !== -1) {\n var directiveDef = tView.data[directiveDefIdx];\n ngDevMode && assertDefined(directiveDef, 'DirectiveDef not found.');\n ngDevMode &&\n assertDefined(directiveDef.contentQueries, 'contentQueries function should be defined');\n setCurrentQueryIndex(queryStartIdx);\n directiveDef.contentQueries(2 /* Update */, lView[directiveDefIdx], directiveDefIdx);\n }\n }\n }\n }\n /** Refreshes child components in the current view (update mode). */\n function refreshChildComponents(hostLView, components) {\n for (var i = 0; i < components.length; i++) {\n refreshComponent(hostLView, components[i]);\n }\n }\n /** Renders child components in the current view (creation mode). */\n function renderChildComponents(hostLView, components) {\n for (var i = 0; i < components.length; i++) {\n renderComponent(hostLView, components[i]);\n }\n }\n function createLView(parentLView, tView, context, flags, host, tHostNode, rendererFactory, renderer, sanitizer, injector) {\n var lView = ngDevMode ? cloneToLViewFromTViewBlueprint(tView) : tView.blueprint.slice();\n lView[HOST] = host;\n lView[FLAGS] = flags | 4 /* CreationMode */ | 128 /* Attached */ | 8 /* FirstLViewPass */;\n resetPreOrderHookFlags(lView);\n ngDevMode && tView.declTNode && parentLView && assertTNodeForLView(tView.declTNode, parentLView);\n lView[PARENT] = lView[DECLARATION_VIEW] = parentLView;\n lView[CONTEXT] = context;\n lView[RENDERER_FACTORY] = (rendererFactory || parentLView && parentLView[RENDERER_FACTORY]);\n ngDevMode && assertDefined(lView[RENDERER_FACTORY], 'RendererFactory is required');\n lView[RENDERER] = (renderer || parentLView && parentLView[RENDERER]);\n ngDevMode && assertDefined(lView[RENDERER], 'Renderer is required');\n lView[SANITIZER] = sanitizer || parentLView && parentLView[SANITIZER] || null;\n lView[INJECTOR] = injector || parentLView && parentLView[INJECTOR] || null;\n lView[T_HOST] = tHostNode;\n ngDevMode &&\n assertEqual(tView.type == 2 /* Embedded */ ? parentLView !== null : true, true, 'Embedded views must have parentLView');\n lView[DECLARATION_COMPONENT_VIEW] =\n tView.type == 2 /* Embedded */ ? parentLView[DECLARATION_COMPONENT_VIEW] : lView;\n ngDevMode && attachLViewDebug(lView);\n return lView;\n }\n function getOrCreateTNode(tView, index, type, name, attrs) {\n ngDevMode && index !== 0 && // 0 are bogus nodes and they are OK. See `createContainerRef` in\n // `view_engine_compatibility` for additional context.\n assertGreaterThanOrEqual(index, HEADER_OFFSET, 'TNodes can\\'t be in the LView header.');\n // Keep this function short, so that the VM will inline it.\n ngDevMode && assertPureTNodeType(type);\n var tNode = tView.data[index];\n if (tNode === null) {\n tNode = createTNodeAtIndex(tView, index, type, name, attrs);\n if (isInI18nBlock()) {\n // If we are in i18n block then all elements should be pre declared through `Placeholder`\n // See `TNodeType.Placeholder` and `LFrame.inI18n` for more context.\n // If the `TNode` was not pre-declared than it means it was not mentioned which means it was\n // removed, so we mark it as detached.\n tNode.flags |= 64 /* isDetached */;\n }\n }\n else if (tNode.type & 64 /* Placeholder */) {\n tNode.type = type;\n tNode.value = name;\n tNode.attrs = attrs;\n var parent = getCurrentParentTNode();\n tNode.injectorIndex = parent === null ? -1 : parent.injectorIndex;\n ngDevMode && assertTNodeForTView(tNode, tView);\n ngDevMode && assertEqual(index, tNode.index, 'Expecting same index');\n }\n setCurrentTNode(tNode, true);\n return tNode;\n }\n function createTNodeAtIndex(tView, index, type, name, attrs) {\n var currentTNode = getCurrentTNodePlaceholderOk();\n var isParent = isCurrentTNodeParent();\n var parent = isParent ? currentTNode : currentTNode && currentTNode.parent;\n // Parents cannot cross component boundaries because components will be used in multiple places.\n var tNode = tView.data[index] =\n createTNode(tView, parent, type, index, name, attrs);\n // Assign a pointer to the first child node of a given view. The first node is not always the one\n // at index 0, in case of i18n, index 0 can be the instruction `i18nStart` and the first node has\n // the index 1 or more, so we can't just check node index.\n if (tView.firstChild === null) {\n tView.firstChild = tNode;\n }\n if (currentTNode !== null) {\n if (isParent) {\n // FIXME(misko): This logic looks unnecessarily complicated. Could we simplify?\n if (currentTNode.child == null && tNode.parent !== null) {\n // We are in the same view, which means we are adding content node to the parent view.\n currentTNode.child = tNode;\n }\n }\n else {\n if (currentTNode.next === null) {\n // In the case of i18n the `currentTNode` may already be linked, in which case we don't want\n // to break the links which i18n created.\n currentTNode.next = tNode;\n }\n }\n }\n return tNode;\n }\n /**\n * When elements are created dynamically after a view blueprint is created (e.g. through\n * i18nApply()), we need to adjust the blueprint for future\n * template passes.\n *\n * @param tView `TView` associated with `LView`\n * @param lView The `LView` containing the blueprint to adjust\n * @param numSlotsToAlloc The number of slots to alloc in the LView, should be >0\n * @param initialValue Initial value to store in blueprint\n */\n function allocExpando(tView, lView, numSlotsToAlloc, initialValue) {\n if (numSlotsToAlloc === 0)\n return -1;\n if (ngDevMode) {\n assertFirstCreatePass(tView);\n assertSame(tView, lView[TVIEW], '`LView` must be associated with `TView`!');\n assertEqual(tView.data.length, lView.length, 'Expecting LView to be same size as TView');\n assertEqual(tView.data.length, tView.blueprint.length, 'Expecting Blueprint to be same size as TView');\n assertFirstUpdatePass(tView);\n }\n var allocIdx = lView.length;\n for (var i = 0; i < numSlotsToAlloc; i++) {\n lView.push(initialValue);\n tView.blueprint.push(initialValue);\n tView.data.push(null);\n }\n return allocIdx;\n }\n //////////////////////////\n //// Render\n //////////////////////////\n /**\n * Processes a view in the creation mode. This includes a number of steps in a specific order:\n * - creating view query functions (if any);\n * - executing a template function in the creation mode;\n * - updating static queries (if any);\n * - creating child components defined in a given view.\n */\n function renderView(tView, lView, context) {\n ngDevMode && assertEqual(isCreationMode(lView), true, 'Should be run in creation mode');\n enterView(lView);\n try {\n var viewQuery = tView.viewQuery;\n if (viewQuery !== null) {\n executeViewQueryFn(1 /* Create */, viewQuery, context);\n }\n // Execute a template associated with this view, if it exists. A template function might not be\n // defined for the root component views.\n var templateFn = tView.template;\n if (templateFn !== null) {\n executeTemplate(tView, lView, templateFn, 1 /* Create */, context);\n }\n // This needs to be set before children are processed to support recursive components.\n // This must be set to false immediately after the first creation run because in an\n // ngFor loop, all the views will be created together before update mode runs and turns\n // off firstCreatePass. If we don't set it here, instances will perform directive\n // matching, etc again and again.\n if (tView.firstCreatePass) {\n tView.firstCreatePass = false;\n }\n // We resolve content queries specifically marked as `static` in creation mode. Dynamic\n // content queries are resolved during change detection (i.e. update mode), after embedded\n // views are refreshed (see block above).\n if (tView.staticContentQueries) {\n refreshContentQueries(tView, lView);\n }\n // We must materialize query results before child components are processed\n // in case a child component has projected a container. The LContainer needs\n // to exist so the embedded views are properly attached by the container.\n if (tView.staticViewQueries) {\n executeViewQueryFn(2 /* Update */, tView.viewQuery, context);\n }\n // Render child component views.\n var components = tView.components;\n if (components !== null) {\n renderChildComponents(lView, components);\n }\n }\n catch (error) {\n // If we didn't manage to get past the first template pass due to\n // an error, mark the view as corrupted so we can try to recover.\n if (tView.firstCreatePass) {\n tView.incompleteFirstPass = true;\n }\n throw error;\n }\n finally {\n lView[FLAGS] &= ~4 /* CreationMode */;\n leaveView();\n }\n }\n /**\n * Processes a view in update mode. This includes a number of steps in a specific order:\n * - executing a template function in update mode;\n * - executing hooks;\n * - refreshing queries;\n * - setting host bindings;\n * - refreshing child (embedded and component) views.\n */\n function refreshView(tView, lView, templateFn, context) {\n ngDevMode && assertEqual(isCreationMode(lView), false, 'Should be run in update mode');\n var flags = lView[FLAGS];\n if ((flags & 256 /* Destroyed */) === 256 /* Destroyed */)\n return;\n enterView(lView);\n // Check no changes mode is a dev only mode used to verify that bindings have not changed\n // since they were assigned. We do not want to execute lifecycle hooks in that mode.\n var isInCheckNoChangesPass = isInCheckNoChangesMode();\n try {\n resetPreOrderHookFlags(lView);\n setBindingIndex(tView.bindingStartIndex);\n if (templateFn !== null) {\n executeTemplate(tView, lView, templateFn, 2 /* Update */, context);\n }\n var hooksInitPhaseCompleted = (flags & 3 /* InitPhaseStateMask */) === 3 /* InitPhaseCompleted */;\n // execute pre-order hooks (OnInit, OnChanges, DoCheck)\n // PERF WARNING: do NOT extract this to a separate function without running benchmarks\n if (!isInCheckNoChangesPass) {\n if (hooksInitPhaseCompleted) {\n var preOrderCheckHooks = tView.preOrderCheckHooks;\n if (preOrderCheckHooks !== null) {\n executeCheckHooks(lView, preOrderCheckHooks, null);\n }\n }\n else {\n var preOrderHooks = tView.preOrderHooks;\n if (preOrderHooks !== null) {\n executeInitAndCheckHooks(lView, preOrderHooks, 0 /* OnInitHooksToBeRun */, null);\n }\n incrementInitPhaseFlags(lView, 0 /* OnInitHooksToBeRun */);\n }\n }\n // First mark transplanted views that are declared in this lView as needing a refresh at their\n // insertion points. This is needed to avoid the situation where the template is defined in this\n // `LView` but its declaration appears after the insertion component.\n markTransplantedViewsForRefresh(lView);\n refreshEmbeddedViews(lView);\n // Content query results must be refreshed before content hooks are called.\n if (tView.contentQueries !== null) {\n refreshContentQueries(tView, lView);\n }\n // execute content hooks (AfterContentInit, AfterContentChecked)\n // PERF WARNING: do NOT extract this to a separate function without running benchmarks\n if (!isInCheckNoChangesPass) {\n if (hooksInitPhaseCompleted) {\n var contentCheckHooks = tView.contentCheckHooks;\n if (contentCheckHooks !== null) {\n executeCheckHooks(lView, contentCheckHooks);\n }\n }\n else {\n var contentHooks = tView.contentHooks;\n if (contentHooks !== null) {\n executeInitAndCheckHooks(lView, contentHooks, 1 /* AfterContentInitHooksToBeRun */);\n }\n incrementInitPhaseFlags(lView, 1 /* AfterContentInitHooksToBeRun */);\n }\n }\n processHostBindingOpCodes(tView, lView);\n // Refresh child component views.\n var components = tView.components;\n if (components !== null) {\n refreshChildComponents(lView, components);\n }\n // View queries must execute after refreshing child components because a template in this view\n // could be inserted in a child component. If the view query executes before child component\n // refresh, the template might not yet be inserted.\n var viewQuery = tView.viewQuery;\n if (viewQuery !== null) {\n executeViewQueryFn(2 /* Update */, viewQuery, context);\n }\n // execute view hooks (AfterViewInit, AfterViewChecked)\n // PERF WARNING: do NOT extract this to a separate function without running benchmarks\n if (!isInCheckNoChangesPass) {\n if (hooksInitPhaseCompleted) {\n var viewCheckHooks = tView.viewCheckHooks;\n if (viewCheckHooks !== null) {\n executeCheckHooks(lView, viewCheckHooks);\n }\n }\n else {\n var viewHooks = tView.viewHooks;\n if (viewHooks !== null) {\n executeInitAndCheckHooks(lView, viewHooks, 2 /* AfterViewInitHooksToBeRun */);\n }\n incrementInitPhaseFlags(lView, 2 /* AfterViewInitHooksToBeRun */);\n }\n }\n if (tView.firstUpdatePass === true) {\n // We need to make sure that we only flip the flag on successful `refreshView` only\n // Don't do this in `finally` block.\n // If we did this in `finally` block then an exception could block the execution of styling\n // instructions which in turn would be unable to insert themselves into the styling linked\n // list. The result of this would be that if the exception would not be throw on subsequent CD\n // the styling would be unable to process it data and reflect to the DOM.\n tView.firstUpdatePass = false;\n }\n // Do not reset the dirty state when running in check no changes mode. We don't want components\n // to behave differently depending on whether check no changes is enabled or not. For example:\n // Marking an OnPush component as dirty from within the `ngAfterViewInit` hook in order to\n // refresh a `NgClass` binding should work. If we would reset the dirty state in the check\n // no changes cycle, the component would be not be dirty for the next update pass. This would\n // be different in production mode where the component dirty state is not reset.\n if (!isInCheckNoChangesPass) {\n lView[FLAGS] &= ~(64 /* Dirty */ | 8 /* FirstLViewPass */);\n }\n if (lView[FLAGS] & 1024 /* RefreshTransplantedView */) {\n lView[FLAGS] &= ~1024 /* RefreshTransplantedView */;\n updateTransplantedViewCount(lView[PARENT], -1);\n }\n }\n finally {\n leaveView();\n }\n }\n function renderComponentOrTemplate(tView, lView, templateFn, context) {\n var rendererFactory = lView[RENDERER_FACTORY];\n var normalExecutionPath = !isInCheckNoChangesMode();\n var creationModeIsActive = isCreationMode(lView);\n try {\n if (normalExecutionPath && !creationModeIsActive && rendererFactory.begin) {\n rendererFactory.begin();\n }\n if (creationModeIsActive) {\n renderView(tView, lView, context);\n }\n refreshView(tView, lView, templateFn, context);\n }\n finally {\n if (normalExecutionPath && !creationModeIsActive && rendererFactory.end) {\n rendererFactory.end();\n }\n }\n }\n function executeTemplate(tView, lView, templateFn, rf, context) {\n var prevSelectedIndex = getSelectedIndex();\n var isUpdatePhase = rf & 2 /* Update */;\n try {\n setSelectedIndex(-1);\n if (isUpdatePhase && lView.length > HEADER_OFFSET) {\n // When we're updating, inherently select 0 so we don't\n // have to generate that instruction for most update blocks.\n selectIndexInternal(tView, lView, HEADER_OFFSET, isInCheckNoChangesMode());\n }\n var preHookType = isUpdatePhase ? 2 /* TemplateUpdateStart */ : 0 /* TemplateCreateStart */;\n profiler(preHookType, context);\n templateFn(rf, context);\n }\n finally {\n setSelectedIndex(prevSelectedIndex);\n var postHookType = isUpdatePhase ? 3 /* TemplateUpdateEnd */ : 1 /* TemplateCreateEnd */;\n profiler(postHookType, context);\n }\n }\n //////////////////////////\n //// Element\n //////////////////////////\n function executeContentQueries(tView, tNode, lView) {\n if (isContentQueryHost(tNode)) {\n var start = tNode.directiveStart;\n var end = tNode.directiveEnd;\n for (var directiveIndex = start; directiveIndex < end; directiveIndex++) {\n var def = tView.data[directiveIndex];\n if (def.contentQueries) {\n def.contentQueries(1 /* Create */, lView[directiveIndex], directiveIndex);\n }\n }\n }\n }\n /**\n * Creates directive instances.\n */\n function createDirectivesInstances(tView, lView, tNode) {\n if (!getBindingsEnabled())\n return;\n instantiateAllDirectives(tView, lView, tNode, getNativeByTNode(tNode, lView));\n if ((tNode.flags & 128 /* hasHostBindings */) === 128 /* hasHostBindings */) {\n invokeDirectivesHostBindings(tView, lView, tNode);\n }\n }\n /**\n * Takes a list of local names and indices and pushes the resolved local variable values\n * to LView in the same order as they are loaded in the template with load().\n */\n function saveResolvedLocalsInData(viewData, tNode, localRefExtractor) {\n if (localRefExtractor === void 0) { localRefExtractor = getNativeByTNode; }\n var localNames = tNode.localNames;\n if (localNames !== null) {\n var localIndex = tNode.index + 1;\n for (var i = 0; i < localNames.length; i += 2) {\n var index = localNames[i + 1];\n var value = index === -1 ?\n localRefExtractor(tNode, viewData) :\n viewData[index];\n viewData[localIndex++] = value;\n }\n }\n }\n /**\n * Gets TView from a template function or creates a new TView\n * if it doesn't already exist.\n *\n * @param def ComponentDef\n * @returns TView\n */\n function getOrCreateTComponentView(def) {\n var tView = def.tView;\n // Create a TView if there isn't one, or recreate it if the first create pass didn't\n // complete successfully since we can't know for sure whether it's in a usable shape.\n if (tView === null || tView.incompleteFirstPass) {\n // Declaration node here is null since this function is called when we dynamically create a\n // component and hence there is no declaration.\n var declTNode = null;\n return def.tView = createTView(1 /* Component */, declTNode, def.template, def.decls, def.vars, def.directiveDefs, def.pipeDefs, def.viewQuery, def.schemas, def.consts);\n }\n return tView;\n }\n /**\n * Creates a TView instance\n *\n * @param type Type of `TView`.\n * @param declTNode Declaration location of this `TView`.\n * @param templateFn Template function\n * @param decls The number of nodes, local refs, and pipes in this template\n * @param directives Registry of directives for this view\n * @param pipes Registry of pipes for this view\n * @param viewQuery View queries for this view\n * @param schemas Schemas for this view\n * @param consts Constants for this view\n */\n function createTView(type, declTNode, templateFn, decls, vars, directives, pipes, viewQuery, schemas, constsOrFactory) {\n ngDevMode && ngDevMode.tView++;\n var bindingStartIndex = HEADER_OFFSET + decls;\n // This length does not yet contain host bindings from child directives because at this point,\n // we don't know which directives are active on this template. As soon as a directive is matched\n // that has a host binding, we will update the blueprint with that def's hostVars count.\n var initialViewLength = bindingStartIndex + vars;\n var blueprint = createViewBlueprint(bindingStartIndex, initialViewLength);\n var consts = typeof constsOrFactory === 'function' ? constsOrFactory() : constsOrFactory;\n var tView = blueprint[TVIEW] = ngDevMode ?\n new TViewConstructor(type, // type: TViewType,\n blueprint, // blueprint: LView,\n templateFn, // template: ComponentTemplate<{}>|null,\n null, // queries: TQueries|null\n viewQuery, // viewQuery: ViewQueriesFunction<{}>|null,\n declTNode, // declTNode: TNode|null,\n cloneToTViewData(blueprint).fill(null, bindingStartIndex), // data: TData,\n bindingStartIndex, // bindingStartIndex: number,\n initialViewLength, // expandoStartIndex: number,\n null, // hostBindingOpCodes: HostBindingOpCodes,\n true, // firstCreatePass: boolean,\n true, // firstUpdatePass: boolean,\n false, // staticViewQueries: boolean,\n false, // staticContentQueries: boolean,\n null, // preOrderHooks: HookData|null,\n null, // preOrderCheckHooks: HookData|null,\n null, // contentHooks: HookData|null,\n null, // contentCheckHooks: HookData|null,\n null, // viewHooks: HookData|null,\n null, // viewCheckHooks: HookData|null,\n null, // destroyHooks: DestroyHookData|null,\n null, // cleanup: any[]|null,\n null, // contentQueries: number[]|null,\n null, // components: number[]|null,\n typeof directives === 'function' ? //\n directives() : //\n directives, // directiveRegistry: DirectiveDefList|null,\n typeof pipes === 'function' ? pipes() : pipes, // pipeRegistry: PipeDefList|null,\n null, // firstChild: TNode|null,\n schemas, // schemas: SchemaMetadata[]|null,\n consts, // consts: TConstants|null\n false, // incompleteFirstPass: boolean\n decls, // ngDevMode only: decls\n vars) :\n {\n type: type,\n blueprint: blueprint,\n template: templateFn,\n queries: null,\n viewQuery: viewQuery,\n declTNode: declTNode,\n data: blueprint.slice().fill(null, bindingStartIndex),\n bindingStartIndex: bindingStartIndex,\n expandoStartIndex: initialViewLength,\n hostBindingOpCodes: null,\n firstCreatePass: true,\n firstUpdatePass: true,\n staticViewQueries: false,\n staticContentQueries: false,\n preOrderHooks: null,\n preOrderCheckHooks: null,\n contentHooks: null,\n contentCheckHooks: null,\n viewHooks: null,\n viewCheckHooks: null,\n destroyHooks: null,\n cleanup: null,\n contentQueries: null,\n components: null,\n directiveRegistry: typeof directives === 'function' ? directives() : directives,\n pipeRegistry: typeof pipes === 'function' ? pipes() : pipes,\n firstChild: null,\n schemas: schemas,\n consts: consts,\n incompleteFirstPass: false\n };\n if (ngDevMode) {\n // For performance reasons it is important that the tView retains the same shape during runtime.\n // (To make sure that all of the code is monomorphic.) For this reason we seal the object to\n // prevent class transitions.\n Object.seal(tView);\n }\n return tView;\n }\n function createViewBlueprint(bindingStartIndex, initialViewLength) {\n var blueprint = ngDevMode ? new LViewBlueprint() : [];\n for (var i = 0; i < initialViewLength; i++) {\n blueprint.push(i < bindingStartIndex ? null : NO_CHANGE);\n }\n return blueprint;\n }\n function createError(text, token) {\n return new Error(\"Renderer: \" + text + \" [\" + stringifyForError(token) + \"]\");\n }\n function assertHostNodeExists(rElement, elementOrSelector) {\n if (!rElement) {\n if (typeof elementOrSelector === 'string') {\n throw createError('Host node with selector not found:', elementOrSelector);\n }\n else {\n throw createError('Host node is required:', elementOrSelector);\n }\n }\n }\n /**\n * Locates the host native element, used for bootstrapping existing nodes into rendering pipeline.\n *\n * @param rendererFactory Factory function to create renderer instance.\n * @param elementOrSelector Render element or CSS selector to locate the element.\n * @param encapsulation View Encapsulation defined for component that requests host element.\n */\n function locateHostElement(renderer, elementOrSelector, encapsulation) {\n if (isProceduralRenderer(renderer)) {\n // When using native Shadow DOM, do not clear host element to allow native slot projection\n var preserveContent = encapsulation === exports.ViewEncapsulation.ShadowDom;\n return renderer.selectRootElement(elementOrSelector, preserveContent);\n }\n var rElement = typeof elementOrSelector === 'string' ?\n renderer.querySelector(elementOrSelector) :\n elementOrSelector;\n ngDevMode && assertHostNodeExists(rElement, elementOrSelector);\n // Always clear host element's content when Renderer3 is in use. For procedural renderer case we\n // make it depend on whether ShadowDom encapsulation is used (in which case the content should be\n // preserved to allow native slot projection). ShadowDom encapsulation requires procedural\n // renderer, and procedural renderer case is handled above.\n rElement.textContent = '';\n return rElement;\n }\n /**\n * Saves context for this cleanup function in LView.cleanupInstances.\n *\n * On the first template pass, saves in TView:\n * - Cleanup function\n * - Index of context we just saved in LView.cleanupInstances\n *\n * This function can also be used to store instance specific cleanup fns. In that case the `context`\n * is `null` and the function is store in `LView` (rather than it `TView`).\n */\n function storeCleanupWithContext(tView, lView, context, cleanupFn) {\n var lCleanup = getOrCreateLViewCleanup(lView);\n if (context === null) {\n // If context is null that this is instance specific callback. These callbacks can only be\n // inserted after template shared instances. For this reason in ngDevMode we freeze the TView.\n if (ngDevMode) {\n Object.freeze(getOrCreateTViewCleanup(tView));\n }\n lCleanup.push(cleanupFn);\n }\n else {\n lCleanup.push(context);\n if (tView.firstCreatePass) {\n getOrCreateTViewCleanup(tView).push(cleanupFn, lCleanup.length - 1);\n }\n }\n }\n function createTNode(tView, tParent, type, index, value, attrs) {\n ngDevMode && index !== 0 && // 0 are bogus nodes and they are OK. See `createContainerRef` in\n // `view_engine_compatibility` for additional context.\n assertGreaterThanOrEqual(index, HEADER_OFFSET, 'TNodes can\\'t be in the LView header.');\n ngDevMode && assertNotSame(attrs, undefined, '\\'undefined\\' is not valid value for \\'attrs\\'');\n ngDevMode && ngDevMode.tNode++;\n ngDevMode && tParent && assertTNodeForTView(tParent, tView);\n var injectorIndex = tParent ? tParent.injectorIndex : -1;\n var tNode = ngDevMode ?\n new TNodeDebug(tView, // tView_: TView\n type, // type: TNodeType\n index, // index: number\n null, // insertBeforeIndex: null|-1|number|number[]\n injectorIndex, // injectorIndex: number\n -1, // directiveStart: number\n -1, // directiveEnd: number\n -1, // directiveStylingLast: number\n null, // propertyBindings: number[]|null\n 0, // flags: TNodeFlags\n 0, // providerIndexes: TNodeProviderIndexes\n value, // value: string|null\n attrs, // attrs: (string|AttributeMarker|(string|SelectorFlags)[])[]|null\n null, // mergedAttrs\n null, // localNames: (string|number)[]|null\n undefined, // initialInputs: (string[]|null)[]|null|undefined\n null, // inputs: PropertyAliases|null\n null, // outputs: PropertyAliases|null\n null, // tViews: ITView|ITView[]|null\n null, // next: ITNode|null\n null, // projectionNext: ITNode|null\n null, // child: ITNode|null\n tParent, // parent: TElementNode|TContainerNode|null\n null, // projection: number|(ITNode|RNode[])[]|null\n null, // styles: string|null\n null, // stylesWithoutHost: string|null\n undefined, // residualStyles: string|null\n null, // classes: string|null\n null, // classesWithoutHost: string|null\n undefined, // residualClasses: string|null\n 0, // classBindings: TStylingRange;\n 0) :\n {\n type: type,\n index: index,\n insertBeforeIndex: null,\n injectorIndex: injectorIndex,\n directiveStart: -1,\n directiveEnd: -1,\n directiveStylingLast: -1,\n propertyBindings: null,\n flags: 0,\n providerIndexes: 0,\n value: value,\n attrs: attrs,\n mergedAttrs: null,\n localNames: null,\n initialInputs: undefined,\n inputs: null,\n outputs: null,\n tViews: null,\n next: null,\n projectionNext: null,\n child: null,\n parent: tParent,\n projection: null,\n styles: null,\n stylesWithoutHost: null,\n residualStyles: undefined,\n classes: null,\n classesWithoutHost: null,\n residualClasses: undefined,\n classBindings: 0,\n styleBindings: 0,\n };\n if (ngDevMode) {\n // For performance reasons it is important that the tNode retains the same shape during runtime.\n // (To make sure that all of the code is monomorphic.) For this reason we seal the object to\n // prevent class transitions.\n Object.seal(tNode);\n }\n return tNode;\n }\n function generatePropertyAliases(inputAliasMap, directiveDefIdx, propStore) {\n for (var publicName in inputAliasMap) {\n if (inputAliasMap.hasOwnProperty(publicName)) {\n propStore = propStore === null ? {} : propStore;\n var internalName = inputAliasMap[publicName];\n if (propStore.hasOwnProperty(publicName)) {\n propStore[publicName].push(directiveDefIdx, internalName);\n }\n else {\n (propStore[publicName] = [directiveDefIdx, internalName]);\n }\n }\n }\n return propStore;\n }\n /**\n * Initializes data structures required to work with directive inputs and outputs.\n * Initialization is done for all directives matched on a given TNode.\n */\n function initializeInputAndOutputAliases(tView, tNode) {\n ngDevMode && assertFirstCreatePass(tView);\n var start = tNode.directiveStart;\n var end = tNode.directiveEnd;\n var tViewData = tView.data;\n var tNodeAttrs = tNode.attrs;\n var inputsFromAttrs = ngDevMode ? new TNodeInitialInputs() : [];\n var inputsStore = null;\n var outputsStore = null;\n for (var i = start; i < end; i++) {\n var directiveDef = tViewData[i];\n var directiveInputs = directiveDef.inputs;\n // Do not use unbound attributes as inputs to structural directives, since structural\n // directive inputs can only be set using microsyntax (e.g. `<div *dir=\"exp\">`).\n // TODO(FW-1930): microsyntax expressions may also contain unbound/static attributes, which\n // should be set for inline templates.\n var initialInputs = (tNodeAttrs !== null && !isInlineTemplate(tNode)) ?\n generateInitialInputs(directiveInputs, tNodeAttrs) :\n null;\n inputsFromAttrs.push(initialInputs);\n inputsStore = generatePropertyAliases(directiveInputs, i, inputsStore);\n outputsStore = generatePropertyAliases(directiveDef.outputs, i, outputsStore);\n }\n if (inputsStore !== null) {\n if (inputsStore.hasOwnProperty('class')) {\n tNode.flags |= 16 /* hasClassInput */;\n }\n if (inputsStore.hasOwnProperty('style')) {\n tNode.flags |= 32 /* hasStyleInput */;\n }\n }\n tNode.initialInputs = inputsFromAttrs;\n tNode.inputs = inputsStore;\n tNode.outputs = outputsStore;\n }\n /**\n * Mapping between attributes names that don't correspond to their element property names.\n *\n * Performance note: this function is written as a series of if checks (instead of, say, a property\n * object lookup) for performance reasons - the series of `if` checks seems to be the fastest way of\n * mapping property names. Do NOT change without benchmarking.\n *\n * Note: this mapping has to be kept in sync with the equally named mapping in the template\n * type-checking machinery of ngtsc.\n */\n function mapPropName(name) {\n if (name === 'class')\n return 'className';\n if (name === 'for')\n return 'htmlFor';\n if (name === 'formaction')\n return 'formAction';\n if (name === 'innerHtml')\n return 'innerHTML';\n if (name === 'readonly')\n return 'readOnly';\n if (name === 'tabindex')\n return 'tabIndex';\n return name;\n }\n function elementPropertyInternal(tView, tNode, lView, propName, value, renderer, sanitizer, nativeOnly) {\n ngDevMode && assertNotSame(value, NO_CHANGE, 'Incoming value should never be NO_CHANGE.');\n var element = getNativeByTNode(tNode, lView);\n var inputData = tNode.inputs;\n var dataValue;\n if (!nativeOnly && inputData != null && (dataValue = inputData[propName])) {\n setInputsForProperty(tView, lView, dataValue, propName, value);\n if (isComponentHost(tNode))\n markDirtyIfOnPush(lView, tNode.index);\n if (ngDevMode) {\n setNgReflectProperties(lView, element, tNode.type, dataValue, value);\n }\n }\n else if (tNode.type & 3 /* AnyRNode */) {\n propName = mapPropName(propName);\n if (ngDevMode) {\n validateAgainstEventProperties(propName);\n if (!validateProperty(tView, element, propName, tNode)) {\n // Return here since we only log warnings for unknown properties.\n logUnknownPropertyError(propName, tNode);\n return;\n }\n ngDevMode.rendererSetProperty++;\n }\n // It is assumed that the sanitizer is only added when the compiler determines that the\n // property is risky, so sanitization can be done without further checks.\n value = sanitizer != null ? sanitizer(value, tNode.value || '', propName) : value;\n if (isProceduralRenderer(renderer)) {\n renderer.setProperty(element, propName, value);\n }\n else if (!isAnimationProp(propName)) {\n element.setProperty ? element.setProperty(propName, value) :\n element[propName] = value;\n }\n }\n else if (tNode.type & 12 /* AnyContainer */) {\n // If the node is a container and the property didn't\n // match any of the inputs or schemas we should throw.\n if (ngDevMode && !matchingSchemas(tView, tNode.value)) {\n logUnknownPropertyError(propName, tNode);\n }\n }\n }\n /** If node is an OnPush component, marks its LView dirty. */\n function markDirtyIfOnPush(lView, viewIndex) {\n ngDevMode && assertLView(lView);\n var childComponentLView = getComponentLViewByIndex(viewIndex, lView);\n if (!(childComponentLView[FLAGS] & 16 /* CheckAlways */)) {\n childComponentLView[FLAGS] |= 64 /* Dirty */;\n }\n }\n function setNgReflectProperty(lView, element, type, attrName, value) {\n var _a;\n var renderer = lView[RENDERER];\n attrName = normalizeDebugBindingName(attrName);\n var debugValue = normalizeDebugBindingValue(value);\n if (type & 3 /* AnyRNode */) {\n if (value == null) {\n isProceduralRenderer(renderer) ? renderer.removeAttribute(element, attrName) :\n element.removeAttribute(attrName);\n }\n else {\n isProceduralRenderer(renderer) ?\n renderer.setAttribute(element, attrName, debugValue) :\n element.setAttribute(attrName, debugValue);\n }\n }\n else {\n var textContent = escapeCommentText(\"bindings=\" + JSON.stringify((_a = {}, _a[attrName] = debugValue, _a), null, 2));\n if (isProceduralRenderer(renderer)) {\n renderer.setValue(element, textContent);\n }\n else {\n element.textContent = textContent;\n }\n }\n }\n function setNgReflectProperties(lView, element, type, dataValue, value) {\n if (type & (3 /* AnyRNode */ | 4 /* Container */)) {\n /**\n * dataValue is an array containing runtime input or output names for the directives:\n * i+0: directive instance index\n * i+1: privateName\n *\n * e.g. [0, 'change', 'change-minified']\n * we want to set the reflected property with the privateName: dataValue[i+1]\n */\n for (var i = 0; i < dataValue.length; i += 2) {\n setNgReflectProperty(lView, element, type, dataValue[i + 1], value);\n }\n }\n }\n function validateProperty(tView, element, propName, tNode) {\n // If `schemas` is set to `null`, that's an indication that this Component was compiled in AOT\n // mode where this check happens at compile time. In JIT mode, `schemas` is always present and\n // defined as an array (as an empty array in case `schemas` field is not defined) and we should\n // execute the check below.\n if (tView.schemas === null)\n return true;\n // The property is considered valid if the element matches the schema, it exists on the element\n // or it is synthetic, and we are in a browser context (web worker nodes should be skipped).\n if (matchingSchemas(tView, tNode.value) || propName in element || isAnimationProp(propName)) {\n return true;\n }\n // Note: `typeof Node` returns 'function' in most browsers, but on IE it is 'object' so we\n // need to account for both here, while being careful for `typeof null` also returning 'object'.\n return typeof Node === 'undefined' || Node === null || !(element instanceof Node);\n }\n function matchingSchemas(tView, tagName) {\n var schemas = tView.schemas;\n if (schemas !== null) {\n for (var i = 0; i < schemas.length; i++) {\n var schema = schemas[i];\n if (schema === NO_ERRORS_SCHEMA ||\n schema === CUSTOM_ELEMENTS_SCHEMA && tagName && tagName.indexOf('-') > -1) {\n return true;\n }\n }\n }\n return false;\n }\n /**\n * Logs an error that a property is not supported on an element.\n * @param propName Name of the invalid property.\n * @param tNode Node on which we encountered the property.\n */\n function logUnknownPropertyError(propName, tNode) {\n var message = \"Can't bind to '\" + propName + \"' since it isn't a known property of '\" + tNode.value + \"'.\";\n console.error(formatRuntimeError(\"303\" /* UNKNOWN_BINDING */, message));\n }\n /**\n * Instantiate a root component.\n */\n function instantiateRootComponent(tView, lView, def) {\n var rootTNode = getCurrentTNode();\n if (tView.firstCreatePass) {\n if (def.providersResolver)\n def.providersResolver(def);\n var directiveIndex = allocExpando(tView, lView, 1, null);\n ngDevMode &&\n assertEqual(directiveIndex, rootTNode.directiveStart, 'Because this is a root component the allocated expando should match the TNode component.');\n configureViewWithDirective(tView, rootTNode, lView, directiveIndex, def);\n }\n var directive = getNodeInjectable(lView, tView, rootTNode.directiveStart, rootTNode);\n attachPatchData(directive, lView);\n var native = getNativeByTNode(rootTNode, lView);\n if (native) {\n attachPatchData(native, lView);\n }\n return directive;\n }\n /**\n * Resolve the matched directives on a node.\n */\n function resolveDirectives(tView, lView, tNode, localRefs) {\n // Please make sure to have explicit type for `exportsMap`. Inferred type triggers bug in\n // tsickle.\n ngDevMode && assertFirstCreatePass(tView);\n var hasDirectives = false;\n if (getBindingsEnabled()) {\n var directiveDefs = findDirectiveDefMatches(tView, lView, tNode);\n var exportsMap = localRefs === null ? null : { '': -1 };\n if (directiveDefs !== null) {\n hasDirectives = true;\n initTNodeFlags(tNode, tView.data.length, directiveDefs.length);\n // When the same token is provided by several directives on the same node, some rules apply in\n // the viewEngine:\n // - viewProviders have priority over providers\n // - the last directive in NgModule.declarations has priority over the previous one\n // So to match these rules, the order in which providers are added in the arrays is very\n // important.\n for (var i = 0; i < directiveDefs.length; i++) {\n var def = directiveDefs[i];\n if (def.providersResolver)\n def.providersResolver(def);\n }\n var preOrderHooksFound = false;\n var preOrderCheckHooksFound = false;\n var directiveIdx = allocExpando(tView, lView, directiveDefs.length, null);\n ngDevMode &&\n assertSame(directiveIdx, tNode.directiveStart, 'TNode.directiveStart should point to just allocated space');\n for (var i = 0; i < directiveDefs.length; i++) {\n var def = directiveDefs[i];\n // Merge the attrs in the order of matches. This assumes that the first directive is the\n // component itself, so that the component has the least priority.\n tNode.mergedAttrs = mergeHostAttrs(tNode.mergedAttrs, def.hostAttrs);\n configureViewWithDirective(tView, tNode, lView, directiveIdx, def);\n saveNameToExportMap(directiveIdx, def, exportsMap);\n if (def.contentQueries !== null)\n tNode.flags |= 8 /* hasContentQuery */;\n if (def.hostBindings !== null || def.hostAttrs !== null || def.hostVars !== 0)\n tNode.flags |= 128 /* hasHostBindings */;\n var lifeCycleHooks = def.type.prototype;\n // Only push a node index into the preOrderHooks array if this is the first\n // pre-order hook found on this node.\n if (!preOrderHooksFound &&\n (lifeCycleHooks.ngOnChanges || lifeCycleHooks.ngOnInit || lifeCycleHooks.ngDoCheck)) {\n // We will push the actual hook function into this array later during dir instantiation.\n // We cannot do it now because we must ensure hooks are registered in the same\n // order that directives are created (i.e. injection order).\n (tView.preOrderHooks || (tView.preOrderHooks = [])).push(tNode.index);\n preOrderHooksFound = true;\n }\n if (!preOrderCheckHooksFound && (lifeCycleHooks.ngOnChanges || lifeCycleHooks.ngDoCheck)) {\n (tView.preOrderCheckHooks || (tView.preOrderCheckHooks = [])).push(tNode.index);\n preOrderCheckHooksFound = true;\n }\n directiveIdx++;\n }\n initializeInputAndOutputAliases(tView, tNode);\n }\n if (exportsMap)\n cacheMatchingLocalNames(tNode, localRefs, exportsMap);\n }\n // Merge the template attrs last so that they have the highest priority.\n tNode.mergedAttrs = mergeHostAttrs(tNode.mergedAttrs, tNode.attrs);\n return hasDirectives;\n }\n /**\n * Add `hostBindings` to the `TView.hostBindingOpCodes`.\n *\n * @param tView `TView` to which the `hostBindings` should be added.\n * @param tNode `TNode` the element which contains the directive\n * @param lView `LView` current `LView`\n * @param directiveIdx Directive index in view.\n * @param directiveVarsIdx Where will the directive's vars be stored\n * @param def `ComponentDef`/`DirectiveDef`, which contains the `hostVars`/`hostBindings` to add.\n */\n function registerHostBindingOpCodes(tView, tNode, lView, directiveIdx, directiveVarsIdx, def) {\n ngDevMode && assertFirstCreatePass(tView);\n var hostBindings = def.hostBindings;\n if (hostBindings) {\n var hostBindingOpCodes = tView.hostBindingOpCodes;\n if (hostBindingOpCodes === null) {\n hostBindingOpCodes = tView.hostBindingOpCodes = [];\n }\n var elementIndx = ~tNode.index;\n if (lastSelectedElementIdx(hostBindingOpCodes) != elementIndx) {\n // Conditionally add select element so that we are more efficient in execution.\n // NOTE: this is strictly not necessary and it trades code size for runtime perf.\n // (We could just always add it.)\n hostBindingOpCodes.push(elementIndx);\n }\n hostBindingOpCodes.push(directiveIdx, directiveVarsIdx, hostBindings);\n }\n }\n /**\n * Returns the last selected element index in the `HostBindingOpCodes`\n *\n * For perf reasons we don't need to update the selected element index in `HostBindingOpCodes` only\n * if it changes. This method returns the last index (or '0' if not found.)\n *\n * Selected element index are only the ones which are negative.\n */\n function lastSelectedElementIdx(hostBindingOpCodes) {\n var i = hostBindingOpCodes.length;\n while (i > 0) {\n var value = hostBindingOpCodes[--i];\n if (typeof value === 'number' && value < 0) {\n return value;\n }\n }\n return 0;\n }\n /**\n * Instantiate all the directives that were previously resolved on the current node.\n */\n function instantiateAllDirectives(tView, lView, tNode, native) {\n var start = tNode.directiveStart;\n var end = tNode.directiveEnd;\n if (!tView.firstCreatePass) {\n getOrCreateNodeInjectorForNode(tNode, lView);\n }\n attachPatchData(native, lView);\n var initialInputs = tNode.initialInputs;\n for (var i = start; i < end; i++) {\n var def = tView.data[i];\n var isComponent = isComponentDef(def);\n if (isComponent) {\n ngDevMode && assertTNodeType(tNode, 3 /* AnyRNode */);\n addComponentLogic(lView, tNode, def);\n }\n var directive = getNodeInjectable(lView, tView, i, tNode);\n attachPatchData(directive, lView);\n if (initialInputs !== null) {\n setInputsFromAttrs(lView, i - start, directive, def, tNode, initialInputs);\n }\n if (isComponent) {\n var componentView = getComponentLViewByIndex(tNode.index, lView);\n componentView[CONTEXT] = directive;\n }\n }\n }\n function invokeDirectivesHostBindings(tView, lView, tNode) {\n var start = tNode.directiveStart;\n var end = tNode.directiveEnd;\n var firstCreatePass = tView.firstCreatePass;\n var elementIndex = tNode.index;\n var currentDirectiveIndex = getCurrentDirectiveIndex();\n try {\n setSelectedIndex(elementIndex);\n for (var dirIndex = start; dirIndex < end; dirIndex++) {\n var def = tView.data[dirIndex];\n var directive = lView[dirIndex];\n setCurrentDirectiveIndex(dirIndex);\n if (def.hostBindings !== null || def.hostVars !== 0 || def.hostAttrs !== null) {\n invokeHostBindingsInCreationMode(def, directive);\n }\n }\n }\n finally {\n setSelectedIndex(-1);\n setCurrentDirectiveIndex(currentDirectiveIndex);\n }\n }\n /**\n * Invoke the host bindings in creation mode.\n *\n * @param def `DirectiveDef` which may contain the `hostBindings` function.\n * @param directive Instance of directive.\n */\n function invokeHostBindingsInCreationMode(def, directive) {\n if (def.hostBindings !== null) {\n def.hostBindings(1 /* Create */, directive);\n }\n }\n /**\n * Matches the current node against all available selectors.\n * If a component is matched (at most one), it is returned in first position in the array.\n */\n function findDirectiveDefMatches(tView, viewData, tNode) {\n ngDevMode && assertFirstCreatePass(tView);\n ngDevMode && assertTNodeType(tNode, 3 /* AnyRNode */ | 12 /* AnyContainer */);\n var registry = tView.directiveRegistry;\n var matches = null;\n if (registry) {\n for (var i = 0; i < registry.length; i++) {\n var def = registry[i];\n if (isNodeMatchingSelectorList(tNode, def.selectors, /* isProjectionMode */ false)) {\n matches || (matches = ngDevMode ? new MatchesArray() : []);\n diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, viewData), tView, def.type);\n if (isComponentDef(def)) {\n if (ngDevMode) {\n assertTNodeType(tNode, 2 /* Element */, \"\\\"\" + tNode.value + \"\\\" tags cannot be used as component hosts. \" +\n (\"Please use a different tag to activate the \" + stringify(def.type) + \" component.\"));\n if (tNode.flags & 2 /* isComponentHost */)\n throwMultipleComponentError(tNode);\n }\n markAsComponentHost(tView, tNode);\n // The component is always stored first with directives after.\n matches.unshift(def);\n }\n else {\n matches.push(def);\n }\n }\n }\n }\n return matches;\n }\n /**\n * Marks a given TNode as a component's host. This consists of:\n * - setting appropriate TNode flags;\n * - storing index of component's host element so it will be queued for view refresh during CD.\n */\n function markAsComponentHost(tView, hostTNode) {\n ngDevMode && assertFirstCreatePass(tView);\n hostTNode.flags |= 2 /* isComponentHost */;\n (tView.components || (tView.components = ngDevMode ? new TViewComponents() : []))\n .push(hostTNode.index);\n }\n /** Caches local names and their matching directive indices for query and template lookups. */\n function cacheMatchingLocalNames(tNode, localRefs, exportsMap) {\n if (localRefs) {\n var localNames = tNode.localNames = ngDevMode ? new TNodeLocalNames() : [];\n // Local names must be stored in tNode in the same order that localRefs are defined\n // in the template to ensure the data is loaded in the same slots as their refs\n // in the template (for template queries).\n for (var i = 0; i < localRefs.length; i += 2) {\n var index = exportsMap[localRefs[i + 1]];\n if (index == null)\n throw new RuntimeError(\"301\" /* EXPORT_NOT_FOUND */, \"Export of name '\" + localRefs[i + 1] + \"' not found!\");\n localNames.push(localRefs[i], index);\n }\n }\n }\n /**\n * Builds up an export map as directives are created, so local refs can be quickly mapped\n * to their directive instances.\n */\n function saveNameToExportMap(directiveIdx, def, exportsMap) {\n if (exportsMap) {\n if (def.exportAs) {\n for (var i = 0; i < def.exportAs.length; i++) {\n exportsMap[def.exportAs[i]] = directiveIdx;\n }\n }\n if (isComponentDef(def))\n exportsMap[''] = directiveIdx;\n }\n }\n /**\n * Initializes the flags on the current node, setting all indices to the initial index,\n * the directive count to 0, and adding the isComponent flag.\n * @param index the initial index\n */\n function initTNodeFlags(tNode, index, numberOfDirectives) {\n ngDevMode &&\n assertNotEqual(numberOfDirectives, tNode.directiveEnd - tNode.directiveStart, 'Reached the max number of directives');\n tNode.flags |= 1 /* isDirectiveHost */;\n // When the first directive is created on a node, save the index\n tNode.directiveStart = index;\n tNode.directiveEnd = index + numberOfDirectives;\n tNode.providerIndexes = index;\n }\n /**\n * Setup directive for instantiation.\n *\n * We need to create a `NodeInjectorFactory` which is then inserted in both the `Blueprint` as well\n * as `LView`. `TView` gets the `DirectiveDef`.\n *\n * @param tView `TView`\n * @param tNode `TNode`\n * @param lView `LView`\n * @param directiveIndex Index where the directive will be stored in the Expando.\n * @param def `DirectiveDef`\n */\n function configureViewWithDirective(tView, tNode, lView, directiveIndex, def) {\n ngDevMode &&\n assertGreaterThanOrEqual(directiveIndex, HEADER_OFFSET, 'Must be in Expando section');\n tView.data[directiveIndex] = def;\n var directiveFactory = def.factory || (def.factory = getFactoryDef(def.type, true));\n var nodeInjectorFactory = new NodeInjectorFactory(directiveFactory, isComponentDef(def), null);\n tView.blueprint[directiveIndex] = nodeInjectorFactory;\n lView[directiveIndex] = nodeInjectorFactory;\n registerHostBindingOpCodes(tView, tNode, lView, directiveIndex, allocExpando(tView, lView, def.hostVars, NO_CHANGE), def);\n }\n function addComponentLogic(lView, hostTNode, def) {\n var native = getNativeByTNode(hostTNode, lView);\n var tView = getOrCreateTComponentView(def);\n // Only component views should be added to the view tree directly. Embedded views are\n // accessed through their containers because they may be removed / re-added later.\n var rendererFactory = lView[RENDERER_FACTORY];\n var componentView = addToViewTree(lView, createLView(lView, tView, null, def.onPush ? 64 /* Dirty */ : 16 /* CheckAlways */, native, hostTNode, rendererFactory, rendererFactory.createRenderer(native, def), null, null));\n // Component view will always be created before any injected LContainers,\n // so this is a regular element, wrap it with the component view\n lView[hostTNode.index] = componentView;\n }\n function elementAttributeInternal(tNode, lView, name, value, sanitizer, namespace) {\n if (ngDevMode) {\n assertNotSame(value, NO_CHANGE, 'Incoming value should never be NO_CHANGE.');\n validateAgainstEventAttributes(name);\n assertTNodeType(tNode, 2 /* Element */, \"Attempted to set attribute `\" + name + \"` on a container node. \" +\n \"Host bindings are not valid on ng-container or ng-template.\");\n }\n var element = getNativeByTNode(tNode, lView);\n setElementAttribute(lView[RENDERER], element, namespace, tNode.value, name, value, sanitizer);\n }\n function setElementAttribute(renderer, element, namespace, tagName, name, value, sanitizer) {\n if (value == null) {\n ngDevMode && ngDevMode.rendererRemoveAttribute++;\n isProceduralRenderer(renderer) ? renderer.removeAttribute(element, name, namespace) :\n element.removeAttribute(name);\n }\n else {\n ngDevMode && ngDevMode.rendererSetAttribute++;\n var strValue = sanitizer == null ? renderStringify(value) : sanitizer(value, tagName || '', name);\n if (isProceduralRenderer(renderer)) {\n renderer.setAttribute(element, name, strValue, namespace);\n }\n else {\n namespace ? element.setAttributeNS(namespace, name, strValue) :\n element.setAttribute(name, strValue);\n }\n }\n }\n /**\n * Sets initial input properties on directive instances from attribute data\n *\n * @param lView Current LView that is being processed.\n * @param directiveIndex Index of the directive in directives array\n * @param instance Instance of the directive on which to set the initial inputs\n * @param def The directive def that contains the list of inputs\n * @param tNode The static data for this node\n */\n function setInputsFromAttrs(lView, directiveIndex, instance, def, tNode, initialInputData) {\n var initialInputs = initialInputData[directiveIndex];\n if (initialInputs !== null) {\n var setInput = def.setInput;\n for (var i = 0; i < initialInputs.length;) {\n var publicName = initialInputs[i++];\n var privateName = initialInputs[i++];\n var value = initialInputs[i++];\n if (setInput !== null) {\n def.setInput(instance, value, publicName, privateName);\n }\n else {\n instance[privateName] = value;\n }\n if (ngDevMode) {\n var nativeElement = getNativeByTNode(tNode, lView);\n setNgReflectProperty(lView, nativeElement, tNode.type, privateName, value);\n }\n }\n }\n }\n /**\n * Generates initialInputData for a node and stores it in the template's static storage\n * so subsequent template invocations don't have to recalculate it.\n *\n * initialInputData is an array containing values that need to be set as input properties\n * for directives on this node, but only once on creation. We need this array to support\n * the case where you set an @Input property of a directive using attribute-like syntax.\n * e.g. if you have a `name` @Input, you can set it once like this:\n *\n * <my-component name=\"Bess\"></my-component>\n *\n * @param inputs The list of inputs from the directive def\n * @param attrs The static attrs on this node\n */\n function generateInitialInputs(inputs, attrs) {\n var inputsToStore = null;\n var i = 0;\n while (i < attrs.length) {\n var attrName = attrs[i];\n if (attrName === 0 /* NamespaceURI */) {\n // We do not allow inputs on namespaced attributes.\n i += 4;\n continue;\n }\n else if (attrName === 5 /* ProjectAs */) {\n // Skip over the `ngProjectAs` value.\n i += 2;\n continue;\n }\n // If we hit any other attribute markers, we're done anyway. None of those are valid inputs.\n if (typeof attrName === 'number')\n break;\n if (inputs.hasOwnProperty(attrName)) {\n if (inputsToStore === null)\n inputsToStore = [];\n inputsToStore.push(attrName, inputs[attrName], attrs[i + 1]);\n }\n i += 2;\n }\n return inputsToStore;\n }\n //////////////////////////\n //// ViewContainer & View\n //////////////////////////\n // Not sure why I need to do `any` here but TS complains later.\n var LContainerArray = ((typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode()) &&\n createNamedArrayType('LContainer');\n /**\n * Creates a LContainer, either from a container instruction, or for a ViewContainerRef.\n *\n * @param hostNative The host element for the LContainer\n * @param hostTNode The host TNode for the LContainer\n * @param currentView The parent view of the LContainer\n * @param native The native comment element\n * @param isForViewContainerRef Optional a flag indicating the ViewContainerRef case\n * @returns LContainer\n */\n function createLContainer(hostNative, currentView, native, tNode) {\n ngDevMode && assertLView(currentView);\n ngDevMode && !isProceduralRenderer(currentView[RENDERER]) && assertDomNode(native);\n // https://jsperf.com/array-literal-vs-new-array-really\n var lContainer = new (ngDevMode ? LContainerArray : Array)(hostNative, // host native\n true, // Boolean `true` in this position signifies that this is an `LContainer`\n false, // has transplanted views\n currentView, // parent\n null, // next\n 0, // transplanted views to refresh count\n tNode, // t_host\n native, // native,\n null, // view refs\n null);\n ngDevMode &&\n assertEqual(lContainer.length, CONTAINER_HEADER_OFFSET, 'Should allocate correct number of slots for LContainer header.');\n ngDevMode && attachLContainerDebug(lContainer);\n return lContainer;\n }\n /**\n * Goes over embedded views (ones created through ViewContainerRef APIs) and refreshes\n * them by executing an associated template function.\n */\n function refreshEmbeddedViews(lView) {\n for (var lContainer = getFirstLContainer(lView); lContainer !== null; lContainer = getNextLContainer(lContainer)) {\n for (var i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n var embeddedLView = lContainer[i];\n var embeddedTView = embeddedLView[TVIEW];\n ngDevMode && assertDefined(embeddedTView, 'TView must be allocated');\n if (viewAttachedToChangeDetector(embeddedLView)) {\n refreshView(embeddedTView, embeddedLView, embeddedTView.template, embeddedLView[CONTEXT]);\n }\n }\n }\n }\n /**\n * Mark transplanted views as needing to be refreshed at their insertion points.\n *\n * @param lView The `LView` that may have transplanted views.\n */\n function markTransplantedViewsForRefresh(lView) {\n for (var lContainer = getFirstLContainer(lView); lContainer !== null; lContainer = getNextLContainer(lContainer)) {\n if (!lContainer[HAS_TRANSPLANTED_VIEWS])\n continue;\n var movedViews = lContainer[MOVED_VIEWS];\n ngDevMode && assertDefined(movedViews, 'Transplanted View flags set but missing MOVED_VIEWS');\n for (var i = 0; i < movedViews.length; i++) {\n var movedLView = movedViews[i];\n var insertionLContainer = movedLView[PARENT];\n ngDevMode && assertLContainer(insertionLContainer);\n // We don't want to increment the counter if the moved LView was already marked for\n // refresh.\n if ((movedLView[FLAGS] & 1024 /* RefreshTransplantedView */) === 0) {\n updateTransplantedViewCount(insertionLContainer, 1);\n }\n // Note, it is possible that the `movedViews` is tracking views that are transplanted *and*\n // those that aren't (declaration component === insertion component). In the latter case,\n // it's fine to add the flag, as we will clear it immediately in\n // `refreshEmbeddedViews` for the view currently being refreshed.\n movedLView[FLAGS] |= 1024 /* RefreshTransplantedView */;\n }\n }\n }\n /////////////\n /**\n * Refreshes components by entering the component view and processing its bindings, queries, etc.\n *\n * @param componentHostIdx Element index in LView[] (adjusted for HEADER_OFFSET)\n */\n function refreshComponent(hostLView, componentHostIdx) {\n ngDevMode && assertEqual(isCreationMode(hostLView), false, 'Should be run in update mode');\n var componentView = getComponentLViewByIndex(componentHostIdx, hostLView);\n // Only attached components that are CheckAlways or OnPush and dirty should be refreshed\n if (viewAttachedToChangeDetector(componentView)) {\n var tView = componentView[TVIEW];\n if (componentView[FLAGS] & (16 /* CheckAlways */ | 64 /* Dirty */)) {\n refreshView(tView, componentView, tView.template, componentView[CONTEXT]);\n }\n else if (componentView[TRANSPLANTED_VIEWS_TO_REFRESH] > 0) {\n // Only attached components that are CheckAlways or OnPush and dirty should be refreshed\n refreshContainsDirtyView(componentView);\n }\n }\n }\n /**\n * Refreshes all transplanted views marked with `LViewFlags.RefreshTransplantedView` that are\n * children or descendants of the given lView.\n *\n * @param lView The lView which contains descendant transplanted views that need to be refreshed.\n */\n function refreshContainsDirtyView(lView) {\n for (var lContainer = getFirstLContainer(lView); lContainer !== null; lContainer = getNextLContainer(lContainer)) {\n for (var i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n var embeddedLView = lContainer[i];\n if (embeddedLView[FLAGS] & 1024 /* RefreshTransplantedView */) {\n var embeddedTView = embeddedLView[TVIEW];\n ngDevMode && assertDefined(embeddedTView, 'TView must be allocated');\n refreshView(embeddedTView, embeddedLView, embeddedTView.template, embeddedLView[CONTEXT]);\n }\n else if (embeddedLView[TRANSPLANTED_VIEWS_TO_REFRESH] > 0) {\n refreshContainsDirtyView(embeddedLView);\n }\n }\n }\n var tView = lView[TVIEW];\n // Refresh child component views.\n var components = tView.components;\n if (components !== null) {\n for (var i = 0; i < components.length; i++) {\n var componentView = getComponentLViewByIndex(components[i], lView);\n // Only attached components that are CheckAlways or OnPush and dirty should be refreshed\n if (viewAttachedToChangeDetector(componentView) &&\n componentView[TRANSPLANTED_VIEWS_TO_REFRESH] > 0) {\n refreshContainsDirtyView(componentView);\n }\n }\n }\n }\n function renderComponent(hostLView, componentHostIdx) {\n ngDevMode && assertEqual(isCreationMode(hostLView), true, 'Should be run in creation mode');\n var componentView = getComponentLViewByIndex(componentHostIdx, hostLView);\n var componentTView = componentView[TVIEW];\n syncViewWithBlueprint(componentTView, componentView);\n renderView(componentTView, componentView, componentView[CONTEXT]);\n }\n /**\n * Syncs an LView instance with its blueprint if they have gotten out of sync.\n *\n * Typically, blueprints and their view instances should always be in sync, so the loop here\n * will be skipped. However, consider this case of two components side-by-side:\n *\n * App template:\n * ```\n * <comp></comp>\n * <comp></comp>\n * ```\n *\n * The following will happen:\n * 1. App template begins processing.\n * 2. First <comp> is matched as a component and its LView is created.\n * 3. Second <comp> is matched as a component and its LView is created.\n * 4. App template completes processing, so it's time to check child templates.\n * 5. First <comp> template is checked. It has a directive, so its def is pushed to blueprint.\n * 6. Second <comp> template is checked. Its blueprint has been updated by the first\n * <comp> template, but its LView was created before this update, so it is out of sync.\n *\n * Note that embedded views inside ngFor loops will never be out of sync because these views\n * are processed as soon as they are created.\n *\n * @param tView The `TView` that contains the blueprint for syncing\n * @param lView The view to sync\n */\n function syncViewWithBlueprint(tView, lView) {\n for (var i = lView.length; i < tView.blueprint.length; i++) {\n lView.push(tView.blueprint[i]);\n }\n }\n /**\n * Adds LView or LContainer to the end of the current view tree.\n *\n * This structure will be used to traverse through nested views to remove listeners\n * and call onDestroy callbacks.\n *\n * @param lView The view where LView or LContainer should be added\n * @param adjustedHostIndex Index of the view's host node in LView[], adjusted for header\n * @param lViewOrLContainer The LView or LContainer to add to the view tree\n * @returns The state passed in\n */\n function addToViewTree(lView, lViewOrLContainer) {\n // TODO(benlesh/misko): This implementation is incorrect, because it always adds the LContainer\n // to the end of the queue, which means if the developer retrieves the LContainers from RNodes out\n // of order, the change detection will run out of order, as the act of retrieving the the\n // LContainer from the RNode is what adds it to the queue.\n if (lView[CHILD_HEAD]) {\n lView[CHILD_TAIL][NEXT] = lViewOrLContainer;\n }\n else {\n lView[CHILD_HEAD] = lViewOrLContainer;\n }\n lView[CHILD_TAIL] = lViewOrLContainer;\n return lViewOrLContainer;\n }\n ///////////////////////////////\n //// Change detection\n ///////////////////////////////\n /**\n * Marks current view and all ancestors dirty.\n *\n * Returns the root view because it is found as a byproduct of marking the view tree\n * dirty, and can be used by methods that consume markViewDirty() to easily schedule\n * change detection. Otherwise, such methods would need to traverse up the view tree\n * an additional time to get the root view and schedule a tick on it.\n *\n * @param lView The starting LView to mark dirty\n * @returns the root LView\n */\n function markViewDirty(lView) {\n while (lView) {\n lView[FLAGS] |= 64 /* Dirty */;\n var parent = getLViewParent(lView);\n // Stop traversing up as soon as you find a root view that wasn't attached to any container\n if (isRootView(lView) && !parent) {\n return lView;\n }\n // continue otherwise\n lView = parent;\n }\n return null;\n }\n /**\n * Used to schedule change detection on the whole application.\n *\n * Unlike `tick`, `scheduleTick` coalesces multiple calls into one change detection run.\n * It is usually called indirectly by calling `markDirty` when the view needs to be\n * re-rendered.\n *\n * Typically `scheduleTick` uses `requestAnimationFrame` to coalesce multiple\n * `scheduleTick` requests. The scheduling function can be overridden in\n * `renderComponent`'s `scheduler` option.\n */\n function scheduleTick(rootContext, flags) {\n var nothingScheduled = rootContext.flags === 0 /* Empty */;\n if (nothingScheduled && rootContext.clean == _CLEAN_PROMISE) {\n // https://github.com/angular/angular/issues/39296\n // should only attach the flags when really scheduling a tick\n rootContext.flags |= flags;\n var res_1;\n rootContext.clean = new Promise(function (r) { return res_1 = r; });\n rootContext.scheduler(function () {\n if (rootContext.flags & 1 /* DetectChanges */) {\n rootContext.flags &= ~1 /* DetectChanges */;\n tickRootContext(rootContext);\n }\n if (rootContext.flags & 2 /* FlushPlayers */) {\n rootContext.flags &= ~2 /* FlushPlayers */;\n var playerHandler = rootContext.playerHandler;\n if (playerHandler) {\n playerHandler.flushPlayers();\n }\n }\n rootContext.clean = _CLEAN_PROMISE;\n res_1(null);\n });\n }\n }\n function tickRootContext(rootContext) {\n for (var i = 0; i < rootContext.components.length; i++) {\n var rootComponent = rootContext.components[i];\n var lView = readPatchedLView(rootComponent);\n var tView = lView[TVIEW];\n renderComponentOrTemplate(tView, lView, tView.template, rootComponent);\n }\n }\n function detectChangesInternal(tView, lView, context) {\n var rendererFactory = lView[RENDERER_FACTORY];\n if (rendererFactory.begin)\n rendererFactory.begin();\n try {\n refreshView(tView, lView, tView.template, context);\n }\n catch (error) {\n handleError(lView, error);\n throw error;\n }\n finally {\n if (rendererFactory.end)\n rendererFactory.end();\n }\n }\n /**\n * Synchronously perform change detection on a root view and its components.\n *\n * @param lView The view which the change detection should be performed on.\n */\n function detectChangesInRootView(lView) {\n tickRootContext(lView[CONTEXT]);\n }\n function checkNoChangesInternal(tView, view, context) {\n setIsInCheckNoChangesMode(true);\n try {\n detectChangesInternal(tView, view, context);\n }\n finally {\n setIsInCheckNoChangesMode(false);\n }\n }\n /**\n * Checks the change detector on a root view and its components, and throws if any changes are\n * detected.\n *\n * This is used in development mode to verify that running change detection doesn't\n * introduce other changes.\n *\n * @param lView The view which the change detection should be checked on.\n */\n function checkNoChangesInRootView(lView) {\n setIsInCheckNoChangesMode(true);\n try {\n detectChangesInRootView(lView);\n }\n finally {\n setIsInCheckNoChangesMode(false);\n }\n }\n function executeViewQueryFn(flags, viewQueryFn, component) {\n ngDevMode && assertDefined(viewQueryFn, 'View queries function to execute must be defined.');\n setCurrentQueryIndex(0);\n viewQueryFn(flags, component);\n }\n ///////////////////////////////\n //// Bindings & interpolations\n ///////////////////////////////\n /**\n * Stores meta-data for a property binding to be used by TestBed's `DebugElement.properties`.\n *\n * In order to support TestBed's `DebugElement.properties` we need to save, for each binding:\n * - a bound property name;\n * - a static parts of interpolated strings;\n *\n * A given property metadata is saved at the binding's index in the `TView.data` (in other words, a\n * property binding metadata will be stored in `TView.data` at the same index as a bound value in\n * `LView`). Metadata are represented as `INTERPOLATION_DELIMITER`-delimited string with the\n * following format:\n * - `propertyName` for bound properties;\n * - `propertyName�prefix�interpolation_static_part1�..interpolation_static_partN�suffix` for\n * interpolated properties.\n *\n * @param tData `TData` where meta-data will be saved;\n * @param tNode `TNode` that is a target of the binding;\n * @param propertyName bound property name;\n * @param bindingIndex binding index in `LView`\n * @param interpolationParts static interpolation parts (for property interpolations)\n */\n function storePropertyBindingMetadata(tData, tNode, propertyName, bindingIndex) {\n var interpolationParts = [];\n for (var _i = 4; _i < arguments.length; _i++) {\n interpolationParts[_i - 4] = arguments[_i];\n }\n // Binding meta-data are stored only the first time a given property instruction is processed.\n // Since we don't have a concept of the \"first update pass\" we need to check for presence of the\n // binding meta-data to decide if one should be stored (or if was stored already).\n if (tData[bindingIndex] === null) {\n if (tNode.inputs == null || !tNode.inputs[propertyName]) {\n var propBindingIdxs = tNode.propertyBindings || (tNode.propertyBindings = []);\n propBindingIdxs.push(bindingIndex);\n var bindingMetadata = propertyName;\n if (interpolationParts.length > 0) {\n bindingMetadata +=\n INTERPOLATION_DELIMITER + interpolationParts.join(INTERPOLATION_DELIMITER);\n }\n tData[bindingIndex] = bindingMetadata;\n }\n }\n }\n var CLEAN_PROMISE = _CLEAN_PROMISE;\n function getOrCreateLViewCleanup(view) {\n // top level variables should not be exported for performance reasons (PERF_NOTES.md)\n return view[CLEANUP] || (view[CLEANUP] = ngDevMode ? new LCleanup() : []);\n }\n function getOrCreateTViewCleanup(tView) {\n return tView.cleanup || (tView.cleanup = ngDevMode ? new TCleanup() : []);\n }\n /**\n * There are cases where the sub component's renderer needs to be included\n * instead of the current renderer (see the componentSyntheticHost* instructions).\n */\n function loadComponentRenderer(currentDef, tNode, lView) {\n // TODO(FW-2043): the `currentDef` is null when host bindings are invoked while creating root\n // component (see packages/core/src/render3/component.ts). This is not consistent with the process\n // of creating inner components, when current directive index is available in the state. In order\n // to avoid relying on current def being `null` (thus special-casing root component creation), the\n // process of creating root component should be unified with the process of creating inner\n // components.\n if (currentDef === null || isComponentDef(currentDef)) {\n lView = unwrapLView(lView[tNode.index]);\n }\n return lView[RENDERER];\n }\n /** Handles an error thrown in an LView. */\n function handleError(lView, error) {\n var injector = lView[INJECTOR];\n var errorHandler = injector ? injector.get(ErrorHandler, null) : null;\n errorHandler && errorHandler.handleError(error);\n }\n /**\n * Set the inputs of directives at the current node to corresponding value.\n *\n * @param tView The current TView\n * @param lView the `LView` which contains the directives.\n * @param inputs mapping between the public \"input\" name and privately-known,\n * possibly minified, property names to write to.\n * @param value Value to set.\n */\n function setInputsForProperty(tView, lView, inputs, publicName, value) {\n for (var i = 0; i < inputs.length;) {\n var index = inputs[i++];\n var privateName = inputs[i++];\n var instance = lView[index];\n ngDevMode && assertIndexInRange(lView, index);\n var def = tView.data[index];\n if (def.setInput !== null) {\n def.setInput(instance, value, publicName, privateName);\n }\n else {\n instance[privateName] = value;\n }\n }\n }\n /**\n * Updates a text binding at a given index in a given LView.\n */\n function textBindingInternal(lView, index, value) {\n ngDevMode && assertString(value, 'Value should be a string');\n ngDevMode && assertNotSame(value, NO_CHANGE, 'value should not be NO_CHANGE');\n ngDevMode && assertIndexInRange(lView, index);\n var element = getNativeByIndex(index, lView);\n ngDevMode && assertDefined(element, 'native element should exist');\n updateTextNode(lView[RENDERER], element, 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 */\n /**\n * Compute the static styling (class/style) from `TAttributes`.\n *\n * This function should be called during `firstCreatePass` only.\n *\n * @param tNode The `TNode` into which the styling information should be loaded.\n * @param attrs `TAttributes` containing the styling information.\n * @param writeToHost Where should the resulting static styles be written?\n * - `false` Write to `TNode.stylesWithoutHost` / `TNode.classesWithoutHost`\n * - `true` Write to `TNode.styles` / `TNode.classes`\n */\n function computeStaticStyling(tNode, attrs, writeToHost) {\n ngDevMode &&\n assertFirstCreatePass(getTView(), 'Expecting to be called in first template pass only');\n var styles = writeToHost ? tNode.styles : null;\n var classes = writeToHost ? tNode.classes : null;\n var mode = 0;\n if (attrs !== null) {\n for (var i = 0; i < attrs.length; i++) {\n var value = attrs[i];\n if (typeof value === 'number') {\n mode = value;\n }\n else if (mode == 1 /* Classes */) {\n classes = concatStringsWithSpace(classes, value);\n }\n else if (mode == 2 /* Styles */) {\n var style = value;\n var styleValue = attrs[++i];\n styles = concatStringsWithSpace(styles, style + ': ' + styleValue + ';');\n }\n }\n }\n writeToHost ? tNode.styles = styles : tNode.stylesWithoutHost = styles;\n writeToHost ? tNode.classes = classes : tNode.classesWithoutHost = classes;\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 * Synchronously perform change detection on a component (and possibly its sub-components).\n *\n * This function triggers change detection in a synchronous way on a component.\n *\n * @param component The component which the change detection should be performed on.\n */\n function detectChanges(component) {\n var view = getComponentViewByInstance(component);\n detectChangesInternal(view[TVIEW], view, component);\n }\n /**\n * Marks the component as dirty (needing change detection). Marking a component dirty will\n * schedule a change detection on it at some point in the future.\n *\n * Marking an already dirty component as dirty won't do anything. Only one outstanding change\n * detection can be scheduled per component tree.\n *\n * @param component Component to mark as dirty.\n */\n function markDirty(component) {\n ngDevMode && assertDefined(component, 'component');\n var rootView = markViewDirty(getComponentViewByInstance(component));\n ngDevMode && assertDefined(rootView[CONTEXT], 'rootContext should be defined');\n scheduleTick(rootView[CONTEXT], 1 /* DetectChanges */);\n }\n /**\n * Used to perform change detection on the whole application.\n *\n * This is equivalent to `detectChanges`, but invoked on root component. Additionally, `tick`\n * executes lifecycle hooks and conditionally checks components based on their\n * `ChangeDetectionStrategy` and dirtiness.\n *\n * The preferred way to trigger change detection is to call `markDirty`. `markDirty` internally\n * schedules `tick` using a scheduler in order to coalesce multiple `markDirty` calls into a\n * single change detection run. By default, the scheduler is `requestAnimationFrame`, but can\n * be changed when calling `renderComponent` and providing the `scheduler` option.\n */\n function tick(component) {\n var rootView = getRootView(component);\n var rootContext = rootView[CONTEXT];\n tickRootContext(rootContext);\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 InjectionToken that gets the current `Injector` for `createInjector()`-style injectors.\n *\n * Requesting this token instead of `Injector` allows `StaticInjector` to be tree-shaken from a\n * project.\n *\n * @publicApi\n */\n var INJECTOR$1 = new InjectionToken('INJECTOR', \n // Dissable tslint because this is const enum which gets inlined not top level prop access.\n // tslint:disable-next-line: no-toplevel-property-access\n -1 /* Injector */);\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 var NullInjector = /** @class */ (function () {\n function NullInjector() {\n }\n NullInjector.prototype.get = function (token, notFoundValue) {\n if (notFoundValue === void 0) { notFoundValue = THROW_IF_NOT_FOUND; }\n if (notFoundValue === THROW_IF_NOT_FOUND) {\n var error = new Error(\"NullInjectorError: No provider for \" + stringify(token) + \"!\");\n error.name = 'NullInjectorError';\n throw error;\n }\n return notFoundValue;\n };\n return NullInjector;\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 internal token whose presence in an injector indicates that the injector should treat itself\n * as a root scoped injector when processing requests for unknown tokens which may indicate\n * they are provided in the root scope.\n */\n var INJECTOR_SCOPE = new InjectionToken('Set Injector scope.');\n\n /**\n * Marker which indicates that a value has not yet been created from the factory function.\n */\n var NOT_YET = {};\n /**\n * Marker which indicates that the factory function for a token is in the process of being called.\n *\n * If the injector is asked to inject a token with its value set to CIRCULAR, that indicates\n * injection of a dependency has recursively attempted to inject the original token, and there is\n * a circular dependency among the providers.\n */\n var CIRCULAR = {};\n var EMPTY_ARRAY$2 = [];\n /**\n * A lazily initialized NullInjector.\n */\n var NULL_INJECTOR = undefined;\n function getNullInjector() {\n if (NULL_INJECTOR === undefined) {\n NULL_INJECTOR = new NullInjector();\n }\n return NULL_INJECTOR;\n }\n /**\n * Create a new `Injector` which is configured using a `defType` of `InjectorType<any>`s.\n *\n * @publicApi\n */\n function createInjector(defType, parent, additionalProviders, name) {\n if (parent === void 0) { parent = null; }\n if (additionalProviders === void 0) { additionalProviders = null; }\n var injector = createInjectorWithoutInjectorInstances(defType, parent, additionalProviders, name);\n injector._resolveInjectorDefTypes();\n return injector;\n }\n /**\n * Creates a new injector without eagerly resolving its injector types. Can be used in places\n * where resolving the injector types immediately can lead to an infinite loop. The injector types\n * should be resolved at a later point by calling `_resolveInjectorDefTypes`.\n */\n function createInjectorWithoutInjectorInstances(defType, parent, additionalProviders, name) {\n if (parent === void 0) { parent = null; }\n if (additionalProviders === void 0) { additionalProviders = null; }\n return new R3Injector(defType, additionalProviders, parent || getNullInjector(), name);\n }\n var R3Injector = /** @class */ (function () {\n function R3Injector(def, additionalProviders, parent, source) {\n var _this = this;\n if (source === void 0) { source = null; }\n this.parent = parent;\n /**\n * Map of tokens to records which contain the instances of those tokens.\n * - `null` value implies that we don't have the record. Used by tree-shakable injectors\n * to prevent further searches.\n */\n this.records = new Map();\n /**\n * The transitive set of `InjectorType`s which define this injector.\n */\n this.injectorDefTypes = new Set();\n /**\n * Set of values instantiated by this injector which contain `ngOnDestroy` lifecycle hooks.\n */\n this.onDestroy = new Set();\n this._destroyed = false;\n var dedupStack = [];\n // Start off by creating Records for every provider declared in every InjectorType\n // included transitively in additional providers then do the same for `def`. This order is\n // important because `def` may include providers that override ones in additionalProviders.\n additionalProviders &&\n deepForEach(additionalProviders, function (provider) { return _this.processProvider(provider, def, additionalProviders); });\n deepForEach([def], function (injectorDef) { return _this.processInjectorType(injectorDef, [], dedupStack); });\n // Make sure the INJECTOR token provides this injector.\n this.records.set(INJECTOR$1, makeRecord(undefined, this));\n // Detect whether this injector has the APP_ROOT_SCOPE token and thus should provide\n // any injectable scoped to APP_ROOT_SCOPE.\n var record = this.records.get(INJECTOR_SCOPE);\n this.scope = record != null ? record.value : null;\n // Source name, used for debugging\n this.source = source || (typeof def === 'object' ? null : stringify(def));\n }\n Object.defineProperty(R3Injector.prototype, \"destroyed\", {\n /**\n * Flag indicating that this injector was previously destroyed.\n */\n get: function () {\n return this._destroyed;\n },\n enumerable: false,\n configurable: true\n });\n /**\n * Destroy the injector and release references to every instance or provider associated with it.\n *\n * Also calls the `OnDestroy` lifecycle hooks of every instance that was created for which a\n * hook was found.\n */\n R3Injector.prototype.destroy = function () {\n this.assertNotDestroyed();\n // Set destroyed = true first, in case lifecycle hooks re-enter destroy().\n this._destroyed = true;\n try {\n // Call all the lifecycle hooks.\n this.onDestroy.forEach(function (service) { return service.ngOnDestroy(); });\n }\n finally {\n // Release all references.\n this.records.clear();\n this.onDestroy.clear();\n this.injectorDefTypes.clear();\n }\n };\n R3Injector.prototype.get = function (token, notFoundValue, flags) {\n if (notFoundValue === void 0) { notFoundValue = THROW_IF_NOT_FOUND; }\n if (flags === void 0) { flags = exports.InjectFlags.Default; }\n this.assertNotDestroyed();\n // Set the injection context.\n var previousInjector = setCurrentInjector(this);\n try {\n // Check for the SkipSelf flag.\n if (!(flags & exports.InjectFlags.SkipSelf)) {\n // SkipSelf isn't set, check if the record belongs to this injector.\n var record = this.records.get(token);\n if (record === undefined) {\n // No record, but maybe the token is scoped to this injector. Look for an injectable\n // def with a scope matching this injector.\n var def = couldBeInjectableType(token) && getInjectableDef(token);\n if (def && this.injectableDefInScope(def)) {\n // Found an injectable def and it's scoped to this injector. Pretend as if it was here\n // all along.\n record = makeRecord(injectableDefOrInjectorDefFactory(token), NOT_YET);\n }\n else {\n record = null;\n }\n this.records.set(token, record);\n }\n // If a record was found, get the instance for it and return it.\n if (record != null /* NOT null || undefined */) {\n return this.hydrate(token, record);\n }\n }\n // Select the next injector based on the Self flag - if self is set, the next injector is\n // the NullInjector, otherwise it's the parent.\n var nextInjector = !(flags & exports.InjectFlags.Self) ? this.parent : getNullInjector();\n // Set the notFoundValue based on the Optional flag - if optional is set and notFoundValue\n // is undefined, the value is null, otherwise it's the notFoundValue.\n notFoundValue = (flags & exports.InjectFlags.Optional) && notFoundValue === THROW_IF_NOT_FOUND ?\n null :\n notFoundValue;\n return nextInjector.get(token, notFoundValue);\n }\n catch (e) {\n if (e.name === 'NullInjectorError') {\n var path = e[NG_TEMP_TOKEN_PATH] = e[NG_TEMP_TOKEN_PATH] || [];\n path.unshift(stringify(token));\n if (previousInjector) {\n // We still have a parent injector, keep throwing\n throw e;\n }\n else {\n // Format & throw the final error message when we don't have any previous injector\n return catchInjectorError(e, token, 'R3InjectorError', this.source);\n }\n }\n else {\n throw e;\n }\n }\n finally {\n // Lastly, clean up the state by restoring the previous injector.\n setCurrentInjector(previousInjector);\n }\n };\n /** @internal */\n R3Injector.prototype._resolveInjectorDefTypes = function () {\n var _this = this;\n this.injectorDefTypes.forEach(function (defType) { return _this.get(defType); });\n };\n R3Injector.prototype.toString = function () {\n var tokens = [], records = this.records;\n records.forEach(function (v, token) { return tokens.push(stringify(token)); });\n return \"R3Injector[\" + tokens.join(', ') + \"]\";\n };\n R3Injector.prototype.assertNotDestroyed = function () {\n if (this._destroyed) {\n throw new Error('Injector has already been destroyed.');\n }\n };\n /**\n * Add an `InjectorType` or `InjectorTypeWithProviders` and all of its transitive providers\n * to this injector.\n *\n * If an `InjectorTypeWithProviders` that declares providers besides the type is specified,\n * the function will return \"true\" to indicate that the providers of the type definition need\n * to be processed. This allows us to process providers of injector types after all imports of\n * an injector definition are processed. (following View Engine semantics: see FW-1349)\n */\n R3Injector.prototype.processInjectorType = function (defOrWrappedDef, parents, dedupStack) {\n var _this = this;\n defOrWrappedDef = resolveForwardRef(defOrWrappedDef);\n if (!defOrWrappedDef)\n return false;\n // Either the defOrWrappedDef is an InjectorType (with injector def) or an\n // InjectorDefTypeWithProviders (aka ModuleWithProviders). Detecting either is a megamorphic\n // read, so care is taken to only do the read once.\n // First attempt to read the injector def (`ɵinj`).\n var def = getInjectorDef(defOrWrappedDef);\n // If that's not present, then attempt to read ngModule from the InjectorDefTypeWithProviders.\n var ngModule = (def == null) && defOrWrappedDef.ngModule || undefined;\n // Determine the InjectorType. In the case where `defOrWrappedDef` is an `InjectorType`,\n // then this is easy. In the case of an InjectorDefTypeWithProviders, then the definition type\n // is the `ngModule`.\n var defType = (ngModule === undefined) ? defOrWrappedDef : ngModule;\n // Check for circular dependencies.\n if (ngDevMode && parents.indexOf(defType) !== -1) {\n var defName = stringify(defType);\n var path = parents.map(stringify);\n throwCyclicDependencyError(defName, path);\n }\n // Check for multiple imports of the same module\n var isDuplicate = dedupStack.indexOf(defType) !== -1;\n // Finally, if defOrWrappedType was an `InjectorDefTypeWithProviders`, then the actual\n // `InjectorDef` is on its `ngModule`.\n if (ngModule !== undefined) {\n def = getInjectorDef(ngModule);\n }\n // If no definition was found, it might be from exports. Remove it.\n if (def == null) {\n return false;\n }\n // Add providers in the same way that @NgModule resolution did:\n // First, include providers from any imports.\n if (def.imports != null && !isDuplicate) {\n // Before processing defType's imports, add it to the set of parents. This way, if it ends\n // up deeply importing itself, this can be detected.\n ngDevMode && parents.push(defType);\n // Add it to the set of dedups. This way we can detect multiple imports of the same module\n dedupStack.push(defType);\n var importTypesWithProviders_1;\n try {\n deepForEach(def.imports, function (imported) {\n if (_this.processInjectorType(imported, parents, dedupStack)) {\n if (importTypesWithProviders_1 === undefined)\n importTypesWithProviders_1 = [];\n // If the processed import is an injector type with providers, we store it in the\n // list of import types with providers, so that we can process those afterwards.\n importTypesWithProviders_1.push(imported);\n }\n });\n }\n finally {\n // Remove it from the parents set when finished.\n ngDevMode && parents.pop();\n }\n // Imports which are declared with providers (TypeWithProviders) need to be processed\n // after all imported modules are processed. This is similar to how View Engine\n // processes/merges module imports in the metadata resolver. See: FW-1349.\n if (importTypesWithProviders_1 !== undefined) {\n var _loop_1 = function (i) {\n var _a = importTypesWithProviders_1[i], ngModule_1 = _a.ngModule, providers = _a.providers;\n deepForEach(providers, function (provider) { return _this.processProvider(provider, ngModule_1, providers || EMPTY_ARRAY$2); });\n };\n for (var i = 0; i < importTypesWithProviders_1.length; i++) {\n _loop_1(i);\n }\n }\n }\n // Track the InjectorType and add a provider for it. It's important that this is done after the\n // def's imports.\n this.injectorDefTypes.add(defType);\n var factory = getFactoryDef(defType) || (function () { return new defType(); });\n this.records.set(defType, makeRecord(factory, NOT_YET));\n // Next, include providers listed on the definition itself.\n var defProviders = def.providers;\n if (defProviders != null && !isDuplicate) {\n var injectorType_1 = defOrWrappedDef;\n deepForEach(defProviders, function (provider) { return _this.processProvider(provider, injectorType_1, defProviders); });\n }\n return (ngModule !== undefined &&\n defOrWrappedDef.providers !== undefined);\n };\n /**\n * Process a `SingleProvider` and add it.\n */\n R3Injector.prototype.processProvider = function (provider, ngModuleType, providers) {\n // Determine the token from the provider. Either it's its own token, or has a {provide: ...}\n // property.\n provider = resolveForwardRef(provider);\n var token = isTypeProvider(provider) ? provider : resolveForwardRef(provider && provider.provide);\n // Construct a `Record` for the provider.\n var record = providerToRecord(provider, ngModuleType, providers);\n if (!isTypeProvider(provider) && provider.multi === true) {\n // If the provider indicates that it's a multi-provider, process it specially.\n // First check whether it's been defined already.\n var multiRecord_1 = this.records.get(token);\n if (multiRecord_1) {\n // It has. Throw a nice error if\n if (ngDevMode && multiRecord_1.multi === undefined) {\n throwMixedMultiProviderError();\n }\n }\n else {\n multiRecord_1 = makeRecord(undefined, NOT_YET, true);\n multiRecord_1.factory = function () { return injectArgs(multiRecord_1.multi); };\n this.records.set(token, multiRecord_1);\n }\n token = provider;\n multiRecord_1.multi.push(provider);\n }\n else {\n var existing = this.records.get(token);\n if (ngDevMode && existing && existing.multi !== undefined) {\n throwMixedMultiProviderError();\n }\n }\n this.records.set(token, record);\n };\n R3Injector.prototype.hydrate = function (token, record) {\n if (ngDevMode && record.value === CIRCULAR) {\n throwCyclicDependencyError(stringify(token));\n }\n else if (record.value === NOT_YET) {\n record.value = CIRCULAR;\n record.value = record.factory();\n }\n if (typeof record.value === 'object' && record.value && hasOnDestroy(record.value)) {\n this.onDestroy.add(record.value);\n }\n return record.value;\n };\n R3Injector.prototype.injectableDefInScope = function (def) {\n if (!def.providedIn) {\n return false;\n }\n else if (typeof def.providedIn === 'string') {\n return def.providedIn === 'any' || (def.providedIn === this.scope);\n }\n else {\n return this.injectorDefTypes.has(def.providedIn);\n }\n };\n return R3Injector;\n }());\n function injectableDefOrInjectorDefFactory(token) {\n // Most tokens will have an injectable def directly on them, which specifies a factory directly.\n var injectableDef = getInjectableDef(token);\n var factory = injectableDef !== null ? injectableDef.factory : getFactoryDef(token);\n if (factory !== null) {\n return factory;\n }\n // InjectionTokens should have an injectable def (ɵprov) and thus should be handled above.\n // If it's missing that, it's an error.\n if (token instanceof InjectionToken) {\n throw new Error(\"Token \" + stringify(token) + \" is missing a \\u0275prov definition.\");\n }\n // Undecorated types can sometimes be created if they have no constructor arguments.\n if (token instanceof Function) {\n return getUndecoratedInjectableFactory(token);\n }\n // There was no way to resolve a factory for this token.\n throw new Error('unreachable');\n }\n function getUndecoratedInjectableFactory(token) {\n // If the token has parameters then it has dependencies that we cannot resolve implicitly.\n var paramLength = token.length;\n if (paramLength > 0) {\n var args = newArray(paramLength, '?');\n throw new Error(\"Can't resolve all parameters for \" + stringify(token) + \": (\" + args.join(', ') + \").\");\n }\n // The constructor function appears to have no parameters.\n // This might be because it inherits from a super-class. In which case, use an injectable\n // def from an ancestor if there is one.\n // Otherwise this really is a simple class with no dependencies, so return a factory that\n // just instantiates the zero-arg constructor.\n var inheritedInjectableDef = getInheritedInjectableDef(token);\n if (inheritedInjectableDef !== null) {\n return function () { return inheritedInjectableDef.factory(token); };\n }\n else {\n return function () { return new token(); };\n }\n }\n function providerToRecord(provider, ngModuleType, providers) {\n if (isValueProvider(provider)) {\n return makeRecord(undefined, provider.useValue);\n }\n else {\n var factory = providerToFactory(provider, ngModuleType, providers);\n return makeRecord(factory, NOT_YET);\n }\n }\n /**\n * Converts a `SingleProvider` into a factory function.\n *\n * @param provider provider to convert to factory\n */\n function providerToFactory(provider, ngModuleType, providers) {\n var factory = undefined;\n if (isTypeProvider(provider)) {\n var unwrappedProvider = resolveForwardRef(provider);\n return getFactoryDef(unwrappedProvider) || injectableDefOrInjectorDefFactory(unwrappedProvider);\n }\n else {\n if (isValueProvider(provider)) {\n factory = function () { return resolveForwardRef(provider.useValue); };\n }\n else if (isFactoryProvider(provider)) {\n factory = function () { return provider.useFactory.apply(provider, __spread(injectArgs(provider.deps || []))); };\n }\n else if (isExistingProvider(provider)) {\n factory = function () { return ɵɵinject(resolveForwardRef(provider.useExisting)); };\n }\n else {\n var classRef_1 = resolveForwardRef(provider &&\n (provider.useClass || provider.provide));\n if (ngDevMode && !classRef_1) {\n throwInvalidProviderError(ngModuleType, providers, provider);\n }\n if (hasDeps(provider)) {\n factory = function () { return new ((classRef_1).bind.apply((classRef_1), __spread([void 0], injectArgs(provider.deps))))(); };\n }\n else {\n return getFactoryDef(classRef_1) || injectableDefOrInjectorDefFactory(classRef_1);\n }\n }\n }\n return factory;\n }\n function makeRecord(factory, value, multi) {\n if (multi === void 0) { multi = false; }\n return {\n factory: factory,\n value: value,\n multi: multi ? [] : undefined,\n };\n }\n function isValueProvider(value) {\n return value !== null && typeof value == 'object' && USE_VALUE in value;\n }\n function isExistingProvider(value) {\n return !!(value && value.useExisting);\n }\n function isFactoryProvider(value) {\n return !!(value && value.useFactory);\n }\n function isTypeProvider(value) {\n return typeof value === 'function';\n }\n function isClassProvider(value) {\n return !!value.useClass;\n }\n function hasDeps(value) {\n return !!value.deps;\n }\n function hasOnDestroy(value) {\n return value !== null && typeof value === 'object' &&\n typeof value.ngOnDestroy === 'function';\n }\n function couldBeInjectableType(value) {\n return (typeof value === 'function') ||\n (typeof value === 'object' && value instanceof InjectionToken);\n }\n\n function INJECTOR_IMPL__PRE_R3__(providers, parent, name) {\n return new StaticInjector(providers, parent, name);\n }\n function INJECTOR_IMPL__POST_R3__(providers, parent, name) {\n return createInjector({ name: name }, parent, providers, name);\n }\n var INJECTOR_IMPL = INJECTOR_IMPL__PRE_R3__;\n /**\n * Concrete injectors implement this interface. Injectors are configured\n * with [providers](guide/glossary#provider) that associate\n * dependencies of various types with [injection tokens](guide/glossary#di-token).\n *\n * @see [\"DI Providers\"](guide/dependency-injection-providers).\n * @see `StaticProvider`\n *\n * @usageNotes\n *\n * The following example creates a service injector instance.\n *\n * {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}\n *\n * ### Usage example\n *\n * {@example core/di/ts/injector_spec.ts region='Injector'}\n *\n * `Injector` returns itself when given `Injector` as a token:\n *\n * {@example core/di/ts/injector_spec.ts region='injectInjector'}\n *\n * @publicApi\n */\n var Injector = /** @class */ (function () {\n function Injector() {\n }\n Injector.create = function (options, parent) {\n if (Array.isArray(options)) {\n return INJECTOR_IMPL(options, parent, '');\n }\n else {\n return INJECTOR_IMPL(options.providers, options.parent, options.name || '');\n }\n };\n return Injector;\n }());\n Injector.THROW_IF_NOT_FOUND = THROW_IF_NOT_FOUND;\n Injector.NULL = new NullInjector();\n /** @nocollapse */\n Injector.ɵprov = ɵɵdefineInjectable({\n token: Injector,\n providedIn: 'any',\n factory: function () { return ɵɵinject(INJECTOR$1); },\n });\n /**\n * @internal\n * @nocollapse\n */\n Injector.__NG_ELEMENT_ID__ = -1 /* Injector */;\n var IDENT = function (value) {\n return value;\n };\n var ɵ0$6 = IDENT;\n var EMPTY = [];\n var CIRCULAR$1 = IDENT;\n var MULTI_PROVIDER_FN = function () {\n return Array.prototype.slice.call(arguments);\n };\n var ɵ1$1 = MULTI_PROVIDER_FN;\n var NO_NEW_LINE$1 = 'ɵ';\n var StaticInjector = /** @class */ (function () {\n function StaticInjector(providers, parent, source) {\n if (parent === void 0) { parent = Injector.NULL; }\n if (source === void 0) { source = null; }\n this.parent = parent;\n this.source = source;\n var records = this._records = new Map();\n records.set(Injector, { token: Injector, fn: IDENT, deps: EMPTY, value: this, useNew: false });\n records.set(INJECTOR$1, { token: INJECTOR$1, fn: IDENT, deps: EMPTY, value: this, useNew: false });\n this.scope = recursivelyProcessProviders(records, providers);\n }\n StaticInjector.prototype.get = function (token, notFoundValue, flags) {\n if (flags === void 0) { flags = exports.InjectFlags.Default; }\n var records = this._records;\n var record = records.get(token);\n if (record === undefined) {\n // This means we have never seen this record, see if it is tree shakable provider.\n var injectableDef = getInjectableDef(token);\n if (injectableDef) {\n var providedIn = injectableDef && injectableDef.providedIn;\n if (providedIn === 'any' || providedIn != null && providedIn === this.scope) {\n records.set(token, record = resolveProvider({ provide: token, useFactory: injectableDef.factory, deps: EMPTY }));\n }\n }\n if (record === undefined) {\n // Set record to null to make sure that we don't go through expensive lookup above again.\n records.set(token, null);\n }\n }\n var lastInjector = setCurrentInjector(this);\n try {\n return tryResolveToken(token, record, records, this.parent, notFoundValue, flags);\n }\n catch (e) {\n return catchInjectorError(e, token, 'StaticInjectorError', this.source);\n }\n finally {\n setCurrentInjector(lastInjector);\n }\n };\n StaticInjector.prototype.toString = function () {\n var tokens = [], records = this._records;\n records.forEach(function (v, token) { return tokens.push(stringify(token)); });\n return \"StaticInjector[\" + tokens.join(', ') + \"]\";\n };\n return StaticInjector;\n }());\n function resolveProvider(provider) {\n var deps = computeDeps(provider);\n var fn = IDENT;\n var value = EMPTY;\n var useNew = false;\n var provide = resolveForwardRef(provider.provide);\n if (USE_VALUE in provider) {\n // We need to use USE_VALUE in provider since provider.useValue could be defined as undefined.\n value = provider.useValue;\n }\n else if (provider.useFactory) {\n fn = provider.useFactory;\n }\n else if (provider.useExisting) {\n // Just use IDENT\n }\n else if (provider.useClass) {\n useNew = true;\n fn = resolveForwardRef(provider.useClass);\n }\n else if (typeof provide == 'function') {\n useNew = true;\n fn = provide;\n }\n else {\n throw staticError('StaticProvider does not have [useValue|useFactory|useExisting|useClass] or [provide] is not newable', provider);\n }\n return { deps: deps, fn: fn, useNew: useNew, value: value };\n }\n function multiProviderMixError(token) {\n return staticError('Cannot mix multi providers and regular providers', token);\n }\n function recursivelyProcessProviders(records, provider) {\n var scope = null;\n if (provider) {\n provider = resolveForwardRef(provider);\n if (Array.isArray(provider)) {\n // if we have an array recurse into the array\n for (var i = 0; i < provider.length; i++) {\n scope = recursivelyProcessProviders(records, provider[i]) || scope;\n }\n }\n else if (typeof provider === 'function') {\n // Functions were supported in ReflectiveInjector, but are not here. For safety give useful\n // error messages\n throw staticError('Function/Class not supported', provider);\n }\n else if (provider && typeof provider === 'object' && provider.provide) {\n // At this point we have what looks like a provider: {provide: ?, ....}\n var token = resolveForwardRef(provider.provide);\n var resolvedProvider = resolveProvider(provider);\n if (provider.multi === true) {\n // This is a multi provider.\n var multiProvider = records.get(token);\n if (multiProvider) {\n if (multiProvider.fn !== MULTI_PROVIDER_FN) {\n throw multiProviderMixError(token);\n }\n }\n else {\n // Create a placeholder factory which will look up the constituents of the multi provider.\n records.set(token, multiProvider = {\n token: provider.provide,\n deps: [],\n useNew: false,\n fn: MULTI_PROVIDER_FN,\n value: EMPTY\n });\n }\n // Treat the provider as the token.\n token = provider;\n multiProvider.deps.push({ token: token, options: 6 /* Default */ });\n }\n var record = records.get(token);\n if (record && record.fn == MULTI_PROVIDER_FN) {\n throw multiProviderMixError(token);\n }\n if (token === INJECTOR_SCOPE) {\n scope = resolvedProvider.value;\n }\n records.set(token, resolvedProvider);\n }\n else {\n throw staticError('Unexpected provider', provider);\n }\n }\n return scope;\n }\n function tryResolveToken(token, record, records, parent, notFoundValue, flags) {\n try {\n return resolveToken(token, record, records, parent, notFoundValue, flags);\n }\n catch (e) {\n // ensure that 'e' is of type Error.\n if (!(e instanceof Error)) {\n e = new Error(e);\n }\n var path = e[NG_TEMP_TOKEN_PATH] = e[NG_TEMP_TOKEN_PATH] || [];\n path.unshift(token);\n if (record && record.value == CIRCULAR$1) {\n // Reset the Circular flag.\n record.value = EMPTY;\n }\n throw e;\n }\n }\n function resolveToken(token, record, records, parent, notFoundValue, flags) {\n var value;\n if (record && !(flags & exports.InjectFlags.SkipSelf)) {\n // If we don't have a record, this implies that we don't own the provider hence don't know how\n // to resolve it.\n value = record.value;\n if (value == CIRCULAR$1) {\n throw Error(NO_NEW_LINE$1 + 'Circular dependency');\n }\n else if (value === EMPTY) {\n record.value = CIRCULAR$1;\n var obj = undefined;\n var useNew = record.useNew;\n var fn = record.fn;\n var depRecords = record.deps;\n var deps = EMPTY;\n if (depRecords.length) {\n deps = [];\n for (var i = 0; i < depRecords.length; i++) {\n var depRecord = depRecords[i];\n var options = depRecord.options;\n var childRecord = options & 2 /* CheckSelf */ ? records.get(depRecord.token) : undefined;\n deps.push(tryResolveToken(\n // Current Token to resolve\n depRecord.token, \n // A record which describes how to resolve the token.\n // If undefined, this means we don't have such a record\n childRecord, \n // Other records we know about.\n records, \n // If we don't know how to resolve dependency and we should not check parent for it,\n // than pass in Null injector.\n !childRecord && !(options & 4 /* CheckParent */) ? Injector.NULL : parent, options & 1 /* Optional */ ? null : Injector.THROW_IF_NOT_FOUND, exports.InjectFlags.Default));\n }\n }\n record.value = value = useNew ? new (fn.bind.apply(fn, __spread([void 0], deps)))() : fn.apply(obj, deps);\n }\n }\n else if (!(flags & exports.InjectFlags.Self)) {\n value = parent.get(token, notFoundValue, exports.InjectFlags.Default);\n }\n else if (!(flags & exports.InjectFlags.Optional)) {\n value = Injector.NULL.get(token, notFoundValue);\n }\n else {\n value = Injector.NULL.get(token, typeof notFoundValue !== 'undefined' ? notFoundValue : null);\n }\n return value;\n }\n function computeDeps(provider) {\n var deps = EMPTY;\n var providerDeps = provider.deps;\n if (providerDeps && providerDeps.length) {\n deps = [];\n for (var i = 0; i < providerDeps.length; i++) {\n var options = 6 /* Default */;\n var token = resolveForwardRef(providerDeps[i]);\n if (Array.isArray(token)) {\n for (var j = 0, annotations = token; j < annotations.length; j++) {\n var annotation = annotations[j];\n if (annotation instanceof Optional || annotation == Optional) {\n options = options | 1 /* Optional */;\n }\n else if (annotation instanceof SkipSelf || annotation == SkipSelf) {\n options = options & ~2 /* CheckSelf */;\n }\n else if (annotation instanceof Self || annotation == Self) {\n options = options & ~4 /* CheckParent */;\n }\n else if (annotation instanceof Inject) {\n token = annotation.token;\n }\n else {\n token = resolveForwardRef(annotation);\n }\n }\n }\n deps.push({ token: token, options: options });\n }\n }\n else if (provider.useExisting) {\n var token = resolveForwardRef(provider.useExisting);\n deps = [{ token: token, options: 6 /* Default */ }];\n }\n else if (!providerDeps && !(USE_VALUE in provider)) {\n // useValue & useExisting are the only ones which are exempt from deps all others need it.\n throw staticError('\\'deps\\' required', provider);\n }\n return deps;\n }\n function staticError(text, obj) {\n return new Error(formatError(text, obj, 'StaticInjectorError'));\n }\n\n /**\n * Retrieves the component instance associated with a given DOM element.\n *\n * @usageNotes\n * Given the following DOM structure:\n * ```html\n * <my-app>\n * <div>\n * <child-comp></child-comp>\n * </div>\n * </my-app>\n * ```\n * Calling `getComponent` on `<child-comp>` will return the instance of `ChildComponent`\n * associated with this DOM element.\n *\n * Calling the function on `<my-app>` will return the `MyApp` instance.\n *\n *\n * @param element DOM element from which the component should be retrieved.\n * @returns Component instance associated with the element or `null` if there\n * is no component associated with it.\n *\n * @publicApi\n * @globalApi ng\n */\n function getComponent(element) {\n assertDomElement(element);\n var context = loadLContext(element, false);\n if (context === null)\n return null;\n if (context.component === undefined) {\n context.component = getComponentAtNodeIndex(context.nodeIndex, context.lView);\n }\n return context.component;\n }\n /**\n * If inside an embedded view (e.g. `*ngIf` or `*ngFor`), retrieves the context of the embedded\n * view that the element is part of. Otherwise retrieves the instance of the component whose view\n * owns the element (in this case, the result is the same as calling `getOwningComponent`).\n *\n * @param element Element for which to get the surrounding component instance.\n * @returns Instance of the component that is around the element or null if the element isn't\n * inside any component.\n *\n * @publicApi\n * @globalApi ng\n */\n function getContext(element) {\n assertDomElement(element);\n var context = loadLContext(element, false);\n return context === null ? null : context.lView[CONTEXT];\n }\n /**\n * Retrieves the component instance whose view contains the DOM element.\n *\n * For example, if `<child-comp>` is used in the template of `<app-comp>`\n * (i.e. a `ViewChild` of `<app-comp>`), calling `getOwningComponent` on `<child-comp>`\n * would return `<app-comp>`.\n *\n * @param elementOrDir DOM element, component or directive instance\n * for which to retrieve the root components.\n * @returns Component instance whose view owns the DOM element or null if the element is not\n * part of a component view.\n *\n * @publicApi\n * @globalApi ng\n */\n function getOwningComponent(elementOrDir) {\n var context = loadLContext(elementOrDir, false);\n if (context === null)\n return null;\n var lView = context.lView;\n var parent;\n ngDevMode && assertLView(lView);\n while (lView[TVIEW].type === 2 /* Embedded */ && (parent = getLViewParent(lView))) {\n lView = parent;\n }\n return lView[FLAGS] & 512 /* IsRoot */ ? null : lView[CONTEXT];\n }\n /**\n * Retrieves all root components associated with a DOM element, directive or component instance.\n * Root components are those which have been bootstrapped by Angular.\n *\n * @param elementOrDir DOM element, component or directive instance\n * for which to retrieve the root components.\n * @returns Root components associated with the target object.\n *\n * @publicApi\n * @globalApi ng\n */\n function getRootComponents(elementOrDir) {\n return __spread(getRootContext(elementOrDir).components);\n }\n /**\n * Retrieves an `Injector` associated with an element, component or directive instance.\n *\n * @param elementOrDir DOM element, component or directive instance for which to\n * retrieve the injector.\n * @returns Injector associated with the element, component or directive instance.\n *\n * @publicApi\n * @globalApi ng\n */\n function getInjector(elementOrDir) {\n var context = loadLContext(elementOrDir, false);\n if (context === null)\n return Injector.NULL;\n var tNode = context.lView[TVIEW].data[context.nodeIndex];\n return new NodeInjector(tNode, context.lView);\n }\n /**\n * Retrieve a set of injection tokens at a given DOM node.\n *\n * @param element Element for which the injection tokens should be retrieved.\n */\n function getInjectionTokens(element) {\n var context = loadLContext(element, false);\n if (context === null)\n return [];\n var lView = context.lView;\n var tView = lView[TVIEW];\n var tNode = tView.data[context.nodeIndex];\n var providerTokens = [];\n var startIndex = tNode.providerIndexes & 1048575 /* ProvidersStartIndexMask */;\n var endIndex = tNode.directiveEnd;\n for (var i = startIndex; i < endIndex; i++) {\n var value = tView.data[i];\n if (isDirectiveDefHack(value)) {\n // The fact that we sometimes store Type and sometimes DirectiveDef in this location is a\n // design flaw. We should always store same type so that we can be monomorphic. The issue\n // is that for Components/Directives we store the def instead the type. The correct behavior\n // is that we should always be storing injectable type in this location.\n value = value.type;\n }\n providerTokens.push(value);\n }\n return providerTokens;\n }\n /**\n * Retrieves directive instances associated with a given DOM element. Does not include\n * component instances.\n *\n * @usageNotes\n * Given the following DOM structure:\n * ```\n * <my-app>\n * <button my-button></button>\n * <my-comp></my-comp>\n * </my-app>\n * ```\n * Calling `getDirectives` on `<button>` will return an array with an instance of the `MyButton`\n * directive that is associated with the DOM element.\n *\n * Calling `getDirectives` on `<my-comp>` will return an empty array.\n *\n * @param element DOM element for which to get the directives.\n * @returns Array of directives associated with the element.\n *\n * @publicApi\n * @globalApi ng\n */\n function getDirectives(element) {\n var context = loadLContext(element);\n if (context.directives === undefined) {\n context.directives = getDirectivesAtNodeIndex(context.nodeIndex, context.lView, false);\n }\n // The `directives` in this case are a named array called `LComponentView`. Clone the\n // result so we don't expose an internal data structure in the user's console.\n return context.directives === null ? [] : __spread(context.directives);\n }\n function loadLContext(target, throwOnNotFound) {\n if (throwOnNotFound === void 0) { throwOnNotFound = true; }\n var context = getLContext(target);\n if (!context && throwOnNotFound) {\n throw new Error(ngDevMode ? \"Unable to find context associated with \" + stringifyForError(target) :\n 'Invalid ng target');\n }\n return context;\n }\n /**\n * Retrieve map of local references.\n *\n * The references are retrieved as a map of local reference name to element or directive instance.\n *\n * @param target DOM element, component or directive instance for which to retrieve\n * the local references.\n */\n function getLocalRefs(target) {\n var context = loadLContext(target, false);\n if (context === null)\n return {};\n if (context.localRefs === undefined) {\n context.localRefs = discoverLocalRefs(context.lView, context.nodeIndex);\n }\n return context.localRefs || {};\n }\n /**\n * Retrieves the host element of a component or directive instance.\n * The host element is the DOM element that matched the selector of the directive.\n *\n * @param componentOrDirective Component or directive instance for which the host\n * element should be retrieved.\n * @returns Host element of the target.\n *\n * @publicApi\n * @globalApi ng\n */\n function getHostElement(componentOrDirective) {\n return getLContext(componentOrDirective).native;\n }\n /**\n * Retrieves the rendered text for a given component.\n *\n * This function retrieves the host element of a component and\n * and then returns the `textContent` for that element. This implies\n * that the text returned will include re-projected content of\n * the component as well.\n *\n * @param component The component to return the content text for.\n */\n function getRenderedText(component) {\n var hostElement = getHostElement(component);\n return hostElement.textContent || '';\n }\n function loadLContextFromNode(node) {\n if (!(node instanceof Node))\n throw new Error('Expecting instance of DOM Element');\n return loadLContext(node);\n }\n /**\n * Retrieves a list of event listeners associated with a DOM element. The list does include host\n * listeners, but it does not include event listeners defined outside of the Angular context\n * (e.g. through `addEventListener`).\n *\n * @usageNotes\n * Given the following DOM structure:\n * ```\n * <my-app>\n * <div (click)=\"doSomething()\"></div>\n * </my-app>\n *\n * ```\n * Calling `getListeners` on `<div>` will return an object that looks as follows:\n * ```\n * {\n * name: 'click',\n * element: <div>,\n * callback: () => doSomething(),\n * useCapture: false\n * }\n * ```\n *\n * @param element Element for which the DOM listeners should be retrieved.\n * @returns Array of event listeners on the DOM element.\n *\n * @publicApi\n * @globalApi ng\n */\n function getListeners(element) {\n assertDomElement(element);\n var lContext = loadLContext(element, false);\n if (lContext === null)\n return [];\n var lView = lContext.lView;\n var tView = lView[TVIEW];\n var lCleanup = lView[CLEANUP];\n var tCleanup = tView.cleanup;\n var listeners = [];\n if (tCleanup && lCleanup) {\n for (var i = 0; i < tCleanup.length;) {\n var firstParam = tCleanup[i++];\n var secondParam = tCleanup[i++];\n if (typeof firstParam === 'string') {\n var name = firstParam;\n var listenerElement = unwrapRNode(lView[secondParam]);\n var callback = lCleanup[tCleanup[i++]];\n var useCaptureOrIndx = tCleanup[i++];\n // if useCaptureOrIndx is boolean then report it as is.\n // if useCaptureOrIndx is positive number then it in unsubscribe method\n // if useCaptureOrIndx is negative number then it is a Subscription\n var type = (typeof useCaptureOrIndx === 'boolean' || useCaptureOrIndx >= 0) ? 'dom' : 'output';\n var useCapture = typeof useCaptureOrIndx === 'boolean' ? useCaptureOrIndx : false;\n if (element == listenerElement) {\n listeners.push({ element: element, name: name, callback: callback, useCapture: useCapture, type: type });\n }\n }\n }\n }\n listeners.sort(sortListeners);\n return listeners;\n }\n function sortListeners(a, b) {\n if (a.name == b.name)\n return 0;\n return a.name < b.name ? -1 : 1;\n }\n /**\n * This function should not exist because it is megamorphic and only mostly correct.\n *\n * See call site for more info.\n */\n function isDirectiveDefHack(obj) {\n return obj.type !== undefined && obj.template !== undefined && obj.declaredInputs !== undefined;\n }\n /**\n * Returns the attached `DebugNode` instance for an element in the DOM.\n *\n * @param element DOM element which is owned by an existing component's view.\n */\n function getDebugNode(element) {\n var debugNode = null;\n var lContext = loadLContextFromNode(element);\n var lView = lContext.lView;\n var nodeIndex = lContext.nodeIndex;\n if (nodeIndex !== -1) {\n var valueInLView = lView[nodeIndex];\n // this means that value in the lView is a component with its own\n // data. In this situation the TNode is not accessed at the same spot.\n var tNode = isLView(valueInLView) ? valueInLView[T_HOST] : getTNode(lView[TVIEW], nodeIndex);\n ngDevMode &&\n assertEqual(tNode.index, nodeIndex, 'Expecting that TNode at index is same as index');\n debugNode = buildDebugNode(tNode, lView);\n }\n return debugNode;\n }\n /**\n * Retrieve the component `LView` from component/element.\n *\n * NOTE: `LView` is a private and should not be leaked outside.\n * Don't export this method to `ng.*` on window.\n *\n * @param target DOM element or component instance for which to retrieve the LView.\n */\n function getComponentLView(target) {\n var lContext = loadLContext(target);\n var nodeIndx = lContext.nodeIndex;\n var lView = lContext.lView;\n var componentLView = lView[nodeIndx];\n ngDevMode && assertLView(componentLView);\n return componentLView;\n }\n /** Asserts that a value is a DOM Element. */\n function assertDomElement(value) {\n if (typeof Element !== 'undefined' && !(value instanceof Element)) {\n throw new Error('Expecting instance of DOM Element');\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 * Marks a component for check (in case of OnPush components) and synchronously\n * performs change detection on the application this component belongs to.\n *\n * @param component Component to {@link ChangeDetectorRef#markForCheck mark for check}.\n *\n * @publicApi\n * @globalApi ng\n */\n function applyChanges(component) {\n markDirty(component);\n getRootComponents(component).forEach(function (rootComponent) { return detectChanges(rootComponent); });\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 introduces series of globally accessible debug tools\n * to allow for the Angular debugging story to function.\n *\n * To see this in action run the following command:\n *\n * bazel run --config=ivy\n * //packages/core/test/bundling/todo:devserver\n *\n * Then load `localhost:5432` and start using the console tools.\n */\n /**\n * This value reflects the property on the window where the dev\n * tools are patched (window.ng).\n * */\n var GLOBAL_PUBLISH_EXPANDO_KEY = 'ng';\n var _published = false;\n /**\n * Publishes a collection of default debug tools onto`window.ng`.\n *\n * These functions are available globally when Angular is in development\n * mode and are automatically stripped away from prod mode is on.\n */\n function publishDefaultGlobalUtils() {\n if (!_published) {\n _published = true;\n /**\n * Warning: this function is *INTERNAL* and should not be relied upon in application's code.\n * The contract of the function might be changed in any release and/or the function can be\n * removed completely.\n */\n publishGlobalUtil('ɵsetProfiler', setProfiler);\n publishGlobalUtil('getComponent', getComponent);\n publishGlobalUtil('getContext', getContext);\n publishGlobalUtil('getListeners', getListeners);\n publishGlobalUtil('getOwningComponent', getOwningComponent);\n publishGlobalUtil('getHostElement', getHostElement);\n publishGlobalUtil('getInjector', getInjector);\n publishGlobalUtil('getRootComponents', getRootComponents);\n publishGlobalUtil('getDirectives', getDirectives);\n publishGlobalUtil('applyChanges', applyChanges);\n }\n }\n /**\n * Publishes the given function to `window.ng` so that it can be\n * used from the browser console when an application is not in production.\n */\n function publishGlobalUtil(name, fn) {\n if (typeof COMPILED === 'undefined' || !COMPILED) {\n // Note: we can't export `ng` when using closure enhanced optimization as:\n // - closure declares globals itself for minified names, which sometimes clobber our `ng` global\n // - we can't declare a closure extern as the namespace `ng` is already used within Google\n // for typings for AngularJS (via `goog.provide('ng....')`).\n var w = _global;\n ngDevMode && assertDefined(fn, 'function not defined');\n if (w) {\n var container = w[GLOBAL_PUBLISH_EXPANDO_KEY];\n if (!container) {\n container = w[GLOBAL_PUBLISH_EXPANDO_KEY] = {};\n }\n container[name] = fn;\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 var ɵ0$7 = function (token, notFoundValue) {\n throwProviderNotFoundError(token, 'NullInjector');\n };\n // TODO: A hack to not pull in the NullInjector from @angular/core.\n var NULL_INJECTOR$1 = {\n get: ɵ0$7\n };\n /**\n * Bootstraps a Component into an existing host element and returns an instance\n * of the component.\n *\n * Use this function to bootstrap a component into the DOM tree. Each invocation\n * of this function will create a separate tree of components, injectors and\n * change detection cycles and lifetimes. To dynamically insert a new component\n * into an existing tree such that it shares the same injection, change detection\n * and object lifetime, use {@link ViewContainer#createComponent}.\n *\n * @param componentType Component to bootstrap\n * @param options Optional parameters which control bootstrapping\n */\n function renderComponent$1(componentType /* Type as workaround for: Microsoft/TypeScript/issues/4881 */, opts) {\n if (opts === void 0) { opts = {}; }\n ngDevMode && publishDefaultGlobalUtils();\n ngDevMode && assertComponentType(componentType);\n var rendererFactory = opts.rendererFactory || domRendererFactory3;\n var sanitizer = opts.sanitizer || null;\n var componentDef = getComponentDef(componentType);\n if (componentDef.type != componentType)\n componentDef.type = componentType;\n // The first index of the first selector is the tag name.\n var componentTag = componentDef.selectors[0][0];\n var hostRenderer = rendererFactory.createRenderer(null, null);\n var hostRNode = locateHostElement(hostRenderer, opts.host || componentTag, componentDef.encapsulation);\n var rootFlags = componentDef.onPush ? 64 /* Dirty */ | 512 /* IsRoot */ :\n 16 /* CheckAlways */ | 512 /* IsRoot */;\n var rootContext = createRootContext(opts.scheduler, opts.playerHandler);\n var renderer = rendererFactory.createRenderer(hostRNode, componentDef);\n var rootTView = createTView(0 /* Root */, null, null, 1, 0, null, null, null, null, null);\n var rootView = createLView(null, rootTView, rootContext, rootFlags, null, null, rendererFactory, renderer, null, opts.injector || null);\n enterView(rootView);\n var component;\n try {\n if (rendererFactory.begin)\n rendererFactory.begin();\n var componentView = createRootComponentView(hostRNode, componentDef, rootView, rendererFactory, renderer, sanitizer);\n component = createRootComponent(componentView, componentDef, rootView, rootContext, opts.hostFeatures || null);\n // create mode pass\n renderView(rootTView, rootView, null);\n // update mode pass\n refreshView(rootTView, rootView, null, null);\n }\n finally {\n leaveView();\n if (rendererFactory.end)\n rendererFactory.end();\n }\n return component;\n }\n /**\n * Creates the root component view and the root component node.\n *\n * @param rNode Render host element.\n * @param def ComponentDef\n * @param rootView The parent view where the host node is stored\n * @param rendererFactory Factory to be used for creating child renderers.\n * @param hostRenderer The current renderer\n * @param sanitizer The sanitizer, if provided\n *\n * @returns Component view created\n */\n function createRootComponentView(rNode, def, rootView, rendererFactory, hostRenderer, sanitizer) {\n var tView = rootView[TVIEW];\n var index = HEADER_OFFSET;\n ngDevMode && assertIndexInRange(rootView, index);\n rootView[index] = rNode;\n // '#host' is added here as we don't know the real host DOM name (we don't want to read it) and at\n // the same time we want to communicate the debug `TNode` that this is a special `TNode`\n // representing a host element.\n var tNode = getOrCreateTNode(tView, index, 2 /* Element */, '#host', null);\n var mergedAttrs = tNode.mergedAttrs = def.hostAttrs;\n if (mergedAttrs !== null) {\n computeStaticStyling(tNode, mergedAttrs, true);\n if (rNode !== null) {\n setUpAttributes(hostRenderer, rNode, mergedAttrs);\n if (tNode.classes !== null) {\n writeDirectClass(hostRenderer, rNode, tNode.classes);\n }\n if (tNode.styles !== null) {\n writeDirectStyle(hostRenderer, rNode, tNode.styles);\n }\n }\n }\n var viewRenderer = rendererFactory.createRenderer(rNode, def);\n var componentView = createLView(rootView, getOrCreateTComponentView(def), null, def.onPush ? 64 /* Dirty */ : 16 /* CheckAlways */, rootView[index], tNode, rendererFactory, viewRenderer, sanitizer || null, null);\n if (tView.firstCreatePass) {\n diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, rootView), tView, def.type);\n markAsComponentHost(tView, tNode);\n initTNodeFlags(tNode, rootView.length, 1);\n }\n addToViewTree(rootView, componentView);\n // Store component view at node index, with node as the HOST\n return rootView[index] = componentView;\n }\n /**\n * Creates a root component and sets it up with features and host bindings. Shared by\n * renderComponent() and ViewContainerRef.createComponent().\n */\n function createRootComponent(componentView, componentDef, rootLView, rootContext, hostFeatures) {\n var tView = rootLView[TVIEW];\n // Create directive instance with factory() and store at next index in viewData\n var component = instantiateRootComponent(tView, rootLView, componentDef);\n rootContext.components.push(component);\n componentView[CONTEXT] = component;\n hostFeatures && hostFeatures.forEach(function (feature) { return feature(component, componentDef); });\n // We want to generate an empty QueryList for root content queries for backwards\n // compatibility with ViewEngine.\n if (componentDef.contentQueries) {\n var tNode = getCurrentTNode();\n ngDevMode && assertDefined(tNode, 'TNode expected');\n componentDef.contentQueries(1 /* Create */, component, tNode.directiveStart);\n }\n var rootTNode = getCurrentTNode();\n ngDevMode && assertDefined(rootTNode, 'tNode should have been already created');\n if (tView.firstCreatePass &&\n (componentDef.hostBindings !== null || componentDef.hostAttrs !== null)) {\n setSelectedIndex(rootTNode.index);\n var rootTView = rootLView[TVIEW];\n registerHostBindingOpCodes(rootTView, rootTNode, rootLView, rootTNode.directiveStart, rootTNode.directiveEnd, componentDef);\n invokeHostBindingsInCreationMode(componentDef, component);\n }\n return component;\n }\n function createRootContext(scheduler, playerHandler) {\n return {\n components: [],\n scheduler: scheduler || defaultScheduler,\n clean: CLEAN_PROMISE,\n playerHandler: playerHandler || null,\n flags: 0 /* Empty */\n };\n }\n /**\n * Used to enable lifecycle hooks on the root component.\n *\n * Include this feature when calling `renderComponent` if the root component\n * you are rendering has lifecycle hooks defined. Otherwise, the hooks won't\n * be called properly.\n *\n * Example:\n *\n * ```\n * renderComponent(AppComponent, {hostFeatures: [LifecycleHooksFeature]});\n * ```\n */\n function LifecycleHooksFeature(component, def) {\n var lView = readPatchedLView(component);\n ngDevMode && assertDefined(lView, 'LView is required');\n var tView = lView[TVIEW];\n var tNode = getCurrentTNode();\n ngDevMode && assertDefined(tNode, 'TNode is required');\n registerPostOrderHooks(tView, tNode);\n }\n /**\n * Wait on component until it is rendered.\n *\n * This function returns a `Promise` which is resolved when the component's\n * change detection is executed. This is determined by finding the scheduler\n * associated with the `component`'s render tree and waiting until the scheduler\n * flushes. If nothing is scheduled, the function returns a resolved promise.\n *\n * Example:\n * ```\n * await whenRendered(myComponent);\n * ```\n *\n * @param component Component to wait upon\n * @returns Promise which resolves when the component is rendered.\n */\n function whenRendered(component) {\n return getRootContext(component).clean;\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 function getSuperType(type) {\n return Object.getPrototypeOf(type.prototype).constructor;\n }\n /**\n * Merges the definition from a super class to a sub class.\n * @param definition The definition that is a SubClass of another directive of component\n *\n * @codeGenApi\n */\n function ɵɵInheritDefinitionFeature(definition) {\n var superType = getSuperType(definition.type);\n var shouldInheritFields = true;\n var inheritanceChain = [definition];\n while (superType) {\n var superDef = undefined;\n if (isComponentDef(definition)) {\n // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance.\n superDef = superType.ɵcmp || superType.ɵdir;\n }\n else {\n if (superType.ɵcmp) {\n throw new Error('Directives cannot inherit Components');\n }\n // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance.\n superDef = superType.ɵdir;\n }\n if (superDef) {\n if (shouldInheritFields) {\n inheritanceChain.push(superDef);\n // Some fields in the definition may be empty, if there were no values to put in them that\n // would've justified object creation. Unwrap them if necessary.\n var writeableDef = definition;\n writeableDef.inputs = maybeUnwrapEmpty(definition.inputs);\n writeableDef.declaredInputs = maybeUnwrapEmpty(definition.declaredInputs);\n writeableDef.outputs = maybeUnwrapEmpty(definition.outputs);\n // Merge hostBindings\n var superHostBindings = superDef.hostBindings;\n superHostBindings && inheritHostBindings(definition, superHostBindings);\n // Merge queries\n var superViewQuery = superDef.viewQuery;\n var superContentQueries = superDef.contentQueries;\n superViewQuery && inheritViewQuery(definition, superViewQuery);\n superContentQueries && inheritContentQueries(definition, superContentQueries);\n // Merge inputs and outputs\n fillProperties(definition.inputs, superDef.inputs);\n fillProperties(definition.declaredInputs, superDef.declaredInputs);\n fillProperties(definition.outputs, superDef.outputs);\n // Merge animations metadata.\n // If `superDef` is a Component, the `data` field is present (defaults to an empty object).\n if (isComponentDef(superDef) && superDef.data.animation) {\n // If super def is a Component, the `definition` is also a Component, since Directives can\n // not inherit Components (we throw an error above and cannot reach this code).\n var defData = definition.data;\n defData.animation = (defData.animation || []).concat(superDef.data.animation);\n }\n }\n // Run parent features\n var features = superDef.features;\n if (features) {\n for (var i = 0; i < features.length; i++) {\n var feature = features[i];\n if (feature && feature.ngInherit) {\n feature(definition);\n }\n // If `InheritDefinitionFeature` is a part of the current `superDef`, it means that this\n // def already has all the necessary information inherited from its super class(es), so we\n // can stop merging fields from super classes. However we need to iterate through the\n // prototype chain to look for classes that might contain other \"features\" (like\n // NgOnChanges), which we should invoke for the original `definition`. We set the\n // `shouldInheritFields` flag to indicate that, essentially skipping fields inheritance\n // logic and only invoking functions from the \"features\" list.\n if (feature === ɵɵInheritDefinitionFeature) {\n shouldInheritFields = false;\n }\n }\n }\n }\n superType = Object.getPrototypeOf(superType);\n }\n mergeHostAttrsAcrossInheritance(inheritanceChain);\n }\n /**\n * Merge the `hostAttrs` and `hostVars` from the inherited parent to the base class.\n *\n * @param inheritanceChain A list of `WritableDefs` starting at the top most type and listing\n * sub-types in order. For each type take the `hostAttrs` and `hostVars` and merge it with the child\n * type.\n */\n function mergeHostAttrsAcrossInheritance(inheritanceChain) {\n var hostVars = 0;\n var hostAttrs = null;\n // We process the inheritance order from the base to the leaves here.\n for (var i = inheritanceChain.length - 1; i >= 0; i--) {\n var def = inheritanceChain[i];\n // For each `hostVars`, we need to add the superclass amount.\n def.hostVars = (hostVars += def.hostVars);\n // for each `hostAttrs` we need to merge it with superclass.\n def.hostAttrs =\n mergeHostAttrs(def.hostAttrs, hostAttrs = mergeHostAttrs(hostAttrs, def.hostAttrs));\n }\n }\n function maybeUnwrapEmpty(value) {\n if (value === EMPTY_OBJ) {\n return {};\n }\n else if (value === EMPTY_ARRAY$1) {\n return [];\n }\n else {\n return value;\n }\n }\n function inheritViewQuery(definition, superViewQuery) {\n var prevViewQuery = definition.viewQuery;\n if (prevViewQuery) {\n definition.viewQuery = function (rf, ctx) {\n superViewQuery(rf, ctx);\n prevViewQuery(rf, ctx);\n };\n }\n else {\n definition.viewQuery = superViewQuery;\n }\n }\n function inheritContentQueries(definition, superContentQueries) {\n var prevContentQueries = definition.contentQueries;\n if (prevContentQueries) {\n definition.contentQueries = function (rf, ctx, directiveIndex) {\n superContentQueries(rf, ctx, directiveIndex);\n prevContentQueries(rf, ctx, directiveIndex);\n };\n }\n else {\n definition.contentQueries = superContentQueries;\n }\n }\n function inheritHostBindings(definition, superHostBindings) {\n var prevHostBindings = definition.hostBindings;\n if (prevHostBindings) {\n definition.hostBindings = function (rf, ctx) {\n superHostBindings(rf, ctx);\n prevHostBindings(rf, ctx);\n };\n }\n else {\n definition.hostBindings = superHostBindings;\n }\n }\n\n /**\n * Fields which exist on either directive or component definitions, and need to be copied from\n * parent to child classes by the `ɵɵCopyDefinitionFeature`.\n */\n var COPY_DIRECTIVE_FIELDS = [\n // The child class should use the providers of its parent.\n 'providersResolver',\n ];\n /**\n * Fields which exist only on component definitions, and need to be copied from parent to child\n * classes by the `ɵɵCopyDefinitionFeature`.\n *\n * The type here allows any field of `ComponentDef` which is not also a property of `DirectiveDef`,\n * since those should go in `COPY_DIRECTIVE_FIELDS` above.\n */\n var COPY_COMPONENT_FIELDS = [\n // The child class should use the template function of its parent, including all template\n // semantics.\n 'template',\n 'decls',\n 'consts',\n 'vars',\n 'onPush',\n 'ngContentSelectors',\n // The child class should use the CSS styles of its parent, including all styling semantics.\n 'styles',\n 'encapsulation',\n // The child class should be checked by the runtime in the same way as its parent.\n 'schemas',\n ];\n /**\n * Copies the fields not handled by the `ɵɵInheritDefinitionFeature` from the supertype of a\n * definition.\n *\n * This exists primarily to support ngcc migration of an existing View Engine pattern, where an\n * entire decorator is inherited from a parent to a child class. When ngcc detects this case, it\n * generates a skeleton definition on the child class, and applies this feature.\n *\n * The `ɵɵCopyDefinitionFeature` then copies any needed fields from the parent class' definition,\n * including things like the component template function.\n *\n * @param definition The definition of a child class which inherits from a parent class with its\n * own definition.\n *\n * @codeGenApi\n */\n function ɵɵCopyDefinitionFeature(definition) {\n var e_1, _a, e_2, _b;\n var superType = getSuperType(definition.type);\n var superDef = undefined;\n if (isComponentDef(definition)) {\n // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance.\n superDef = superType.ɵcmp;\n }\n else {\n // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance.\n superDef = superType.ɵdir;\n }\n // Needed because `definition` fields are readonly.\n var defAny = definition;\n try {\n // Copy over any fields that apply to either directives or components.\n for (var COPY_DIRECTIVE_FIELDS_1 = __values(COPY_DIRECTIVE_FIELDS), COPY_DIRECTIVE_FIELDS_1_1 = COPY_DIRECTIVE_FIELDS_1.next(); !COPY_DIRECTIVE_FIELDS_1_1.done; COPY_DIRECTIVE_FIELDS_1_1 = COPY_DIRECTIVE_FIELDS_1.next()) {\n var field = COPY_DIRECTIVE_FIELDS_1_1.value;\n defAny[field] = superDef[field];\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (COPY_DIRECTIVE_FIELDS_1_1 && !COPY_DIRECTIVE_FIELDS_1_1.done && (_a = COPY_DIRECTIVE_FIELDS_1.return)) _a.call(COPY_DIRECTIVE_FIELDS_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n if (isComponentDef(superDef)) {\n try {\n // Copy over any component-specific fields.\n for (var COPY_COMPONENT_FIELDS_1 = __values(COPY_COMPONENT_FIELDS), COPY_COMPONENT_FIELDS_1_1 = COPY_COMPONENT_FIELDS_1.next(); !COPY_COMPONENT_FIELDS_1_1.done; COPY_COMPONENT_FIELDS_1_1 = COPY_COMPONENT_FIELDS_1.next()) {\n var field = COPY_COMPONENT_FIELDS_1_1.value;\n defAny[field] = superDef[field];\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (COPY_COMPONENT_FIELDS_1_1 && !COPY_COMPONENT_FIELDS_1_1.done && (_b = COPY_COMPONENT_FIELDS_1.return)) _b.call(COPY_COMPONENT_FIELDS_1);\n }\n finally { if (e_2) throw e_2.error; }\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 var _symbolIterator = null;\n function getSymbolIterator() {\n if (!_symbolIterator) {\n var Symbol = _global['Symbol'];\n if (Symbol && Symbol.iterator) {\n _symbolIterator = Symbol.iterator;\n }\n else {\n // es6-shim specific logic\n var keys = Object.getOwnPropertyNames(Map.prototype);\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n if (key !== 'entries' && key !== 'size' &&\n Map.prototype[key] === Map.prototype['entries']) {\n _symbolIterator = key;\n }\n }\n }\n }\n return _symbolIterator;\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 function devModeEqual(a, b) {\n var isListLikeIterableA = isListLikeIterable(a);\n var isListLikeIterableB = isListLikeIterable(b);\n if (isListLikeIterableA && isListLikeIterableB) {\n return areIterablesEqual(a, b, devModeEqual);\n }\n else {\n var isAObject = a && (typeof a === 'object' || typeof a === 'function');\n var isBObject = b && (typeof b === 'object' || typeof b === 'function');\n if (!isListLikeIterableA && isAObject && !isListLikeIterableB && isBObject) {\n return true;\n }\n else {\n return Object.is(a, b);\n }\n }\n }\n /**\n * Indicates that the result of a {@link Pipe} transformation has changed even though the\n * reference has not changed.\n *\n * Wrapped values are unwrapped automatically during the change detection, and the unwrapped value\n * is stored.\n *\n * Example:\n *\n * ```\n * if (this._latestValue === this._latestReturnedValue) {\n * return this._latestReturnedValue;\n * } else {\n * this._latestReturnedValue = this._latestValue;\n * return WrappedValue.wrap(this._latestValue); // this will force update\n * }\n * ```\n *\n * @publicApi\n * @deprecated from v10 stop using. (No replacement, deemed unnecessary.)\n */\n var WrappedValue = /** @class */ (function () {\n function WrappedValue(value) {\n this.wrapped = value;\n }\n /** Creates a wrapped value. */\n WrappedValue.wrap = function (value) {\n return new WrappedValue(value);\n };\n /**\n * Returns the underlying value of a wrapped value.\n * Returns the given `value` when it is not wrapped.\n **/\n WrappedValue.unwrap = function (value) {\n return WrappedValue.isWrapped(value) ? value.wrapped : value;\n };\n /** Returns true if `value` is a wrapped value. */\n WrappedValue.isWrapped = function (value) {\n return value instanceof WrappedValue;\n };\n return WrappedValue;\n }());\n function isListLikeIterable(obj) {\n if (!isJsObject(obj))\n return false;\n return Array.isArray(obj) ||\n (!(obj instanceof Map) && // JS Map are iterables but return entries as [k, v]\n getSymbolIterator() in obj); // JS Iterable have a Symbol.iterator prop\n }\n function areIterablesEqual(a, b, comparator) {\n var iterator1 = a[getSymbolIterator()]();\n var iterator2 = b[getSymbolIterator()]();\n while (true) {\n var item1 = iterator1.next();\n var item2 = iterator2.next();\n if (item1.done && item2.done)\n return true;\n if (item1.done || item2.done)\n return false;\n if (!comparator(item1.value, item2.value))\n return false;\n }\n }\n function iterateListLike(obj, fn) {\n if (Array.isArray(obj)) {\n for (var i = 0; i < obj.length; i++) {\n fn(obj[i]);\n }\n }\n else {\n var iterator = obj[getSymbolIterator()]();\n var item = void 0;\n while (!((item = iterator.next()).done)) {\n fn(item.value);\n }\n }\n }\n function isJsObject(o) {\n return o !== null && (typeof o === 'function' || typeof o === 'object');\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 // TODO(misko): consider inlining\n /** Updates binding and returns the value. */\n function updateBinding(lView, bindingIndex, value) {\n return lView[bindingIndex] = value;\n }\n /** Gets the current binding value. */\n function getBinding(lView, bindingIndex) {\n ngDevMode && assertIndexInRange(lView, bindingIndex);\n ngDevMode &&\n assertNotSame(lView[bindingIndex], NO_CHANGE, 'Stored value should never be NO_CHANGE.');\n return lView[bindingIndex];\n }\n /**\n * Updates binding if changed, then returns whether it was updated.\n *\n * This function also checks the `CheckNoChangesMode` and throws if changes are made.\n * Some changes (Objects/iterables) during `CheckNoChangesMode` are exempt to comply with VE\n * behavior.\n *\n * @param lView current `LView`\n * @param bindingIndex The binding in the `LView` to check\n * @param value New value to check against `lView[bindingIndex]`\n * @returns `true` if the bindings has changed. (Throws if binding has changed during\n * `CheckNoChangesMode`)\n */\n function bindingUpdated(lView, bindingIndex, value) {\n ngDevMode && assertNotSame(value, NO_CHANGE, 'Incoming value should never be NO_CHANGE.');\n ngDevMode &&\n assertLessThan(bindingIndex, lView.length, \"Slot should have been initialized to NO_CHANGE\");\n var oldValue = lView[bindingIndex];\n if (Object.is(oldValue, value)) {\n return false;\n }\n else {\n if (ngDevMode && isInCheckNoChangesMode()) {\n // View engine didn't report undefined values as changed on the first checkNoChanges pass\n // (before the change detection was run).\n var oldValueToCompare = oldValue !== NO_CHANGE ? oldValue : undefined;\n if (!devModeEqual(oldValueToCompare, value)) {\n var details = getExpressionChangedErrorDetails(lView, bindingIndex, oldValueToCompare, value);\n throwErrorIfNoChangesMode(oldValue === NO_CHANGE, details.oldValue, details.newValue, details.propName);\n }\n // There was a change, but the `devModeEqual` decided that the change is exempt from an error.\n // For this reason we exit as if no change. The early exit is needed to prevent the changed\n // value to be written into `LView` (If we would write the new value that we would not see it\n // as change on next CD.)\n return false;\n }\n lView[bindingIndex] = value;\n return true;\n }\n }\n /** Updates 2 bindings if changed, then returns whether either was updated. */\n function bindingUpdated2(lView, bindingIndex, exp1, exp2) {\n var different = bindingUpdated(lView, bindingIndex, exp1);\n return bindingUpdated(lView, bindingIndex + 1, exp2) || different;\n }\n /** Updates 3 bindings if changed, then returns whether any was updated. */\n function bindingUpdated3(lView, bindingIndex, exp1, exp2, exp3) {\n var different = bindingUpdated2(lView, bindingIndex, exp1, exp2);\n return bindingUpdated(lView, bindingIndex + 2, exp3) || different;\n }\n /** Updates 4 bindings if changed, then returns whether any was updated. */\n function bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4) {\n var different = bindingUpdated2(lView, bindingIndex, exp1, exp2);\n return bindingUpdated2(lView, bindingIndex + 2, exp3, exp4) || different;\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 * Updates the value of or removes a bound attribute on an Element.\n *\n * Used in the case of `[attr.title]=\"value\"`\n *\n * @param name name The name of the attribute.\n * @param value value The attribute is removed when value is `null` or `undefined`.\n * Otherwise the attribute value is set to the stringified value.\n * @param sanitizer An optional function used to sanitize the value.\n * @param namespace Optional namespace to use when setting the attribute.\n *\n * @codeGenApi\n */\n function ɵɵattribute(name, value, sanitizer, namespace) {\n var lView = getLView();\n var bindingIndex = nextBindingIndex();\n if (bindingUpdated(lView, bindingIndex, value)) {\n var tView = getTView();\n var tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, name, value, sanitizer, namespace);\n ngDevMode && storePropertyBindingMetadata(tView.data, tNode, 'attr.' + name, bindingIndex);\n }\n return ɵɵattribute;\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 * Create interpolation bindings with a variable number of expressions.\n *\n * If there are 1 to 8 expressions `interpolation1()` to `interpolation8()` should be used instead.\n * Those are faster because there is no need to create an array of expressions and iterate over it.\n *\n * `values`:\n * - has static text at even indexes,\n * - has evaluated expressions at odd indexes.\n *\n * Returns the concatenated string when any of the arguments changes, `NO_CHANGE` otherwise.\n */\n function interpolationV(lView, values) {\n ngDevMode && assertLessThan(2, values.length, 'should have at least 3 values');\n ngDevMode && assertEqual(values.length % 2, 1, 'should have an odd number of values');\n var isBindingUpdated = false;\n var bindingIndex = getBindingIndex();\n for (var i = 1; i < values.length; i += 2) {\n // Check if bindings (odd indexes) have changed\n isBindingUpdated = bindingUpdated(lView, bindingIndex++, values[i]) || isBindingUpdated;\n }\n setBindingIndex(bindingIndex);\n if (!isBindingUpdated) {\n return NO_CHANGE;\n }\n // Build the updated content\n var content = values[0];\n for (var i = 1; i < values.length; i += 2) {\n content += renderStringify(values[i]) + values[i + 1];\n }\n return content;\n }\n /**\n * Creates an interpolation binding with 1 expression.\n *\n * @param prefix static value used for concatenation only.\n * @param v0 value checked for change.\n * @param suffix static value used for concatenation only.\n */\n function interpolation1(lView, prefix, v0, suffix) {\n var different = bindingUpdated(lView, nextBindingIndex(), v0);\n return different ? prefix + renderStringify(v0) + suffix : NO_CHANGE;\n }\n /**\n * Creates an interpolation binding with 2 expressions.\n */\n function interpolation2(lView, prefix, v0, i0, v1, suffix) {\n var bindingIndex = getBindingIndex();\n var different = bindingUpdated2(lView, bindingIndex, v0, v1);\n incrementBindingIndex(2);\n return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + suffix : NO_CHANGE;\n }\n /**\n * Creates an interpolation binding with 3 expressions.\n */\n function interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix) {\n var bindingIndex = getBindingIndex();\n var different = bindingUpdated3(lView, bindingIndex, v0, v1, v2);\n incrementBindingIndex(3);\n return different ?\n prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + suffix :\n NO_CHANGE;\n }\n /**\n * Create an interpolation binding with 4 expressions.\n */\n function interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix) {\n var bindingIndex = getBindingIndex();\n var different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n incrementBindingIndex(4);\n return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 +\n renderStringify(v2) + i2 + renderStringify(v3) + suffix :\n NO_CHANGE;\n }\n /**\n * Creates an interpolation binding with 5 expressions.\n */\n function interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix) {\n var bindingIndex = getBindingIndex();\n var different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n different = bindingUpdated(lView, bindingIndex + 4, v4) || different;\n incrementBindingIndex(5);\n return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 +\n renderStringify(v2) + i2 + renderStringify(v3) + i3 + renderStringify(v4) + suffix :\n NO_CHANGE;\n }\n /**\n * Creates an interpolation binding with 6 expressions.\n */\n function interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix) {\n var bindingIndex = getBindingIndex();\n var different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n different = bindingUpdated2(lView, bindingIndex + 4, v4, v5) || different;\n incrementBindingIndex(6);\n return different ?\n prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + i2 +\n renderStringify(v3) + i3 + renderStringify(v4) + i4 + renderStringify(v5) + suffix :\n NO_CHANGE;\n }\n /**\n * Creates an interpolation binding with 7 expressions.\n */\n function interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix) {\n var bindingIndex = getBindingIndex();\n var different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n different = bindingUpdated3(lView, bindingIndex + 4, v4, v5, v6) || different;\n incrementBindingIndex(7);\n return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 +\n renderStringify(v2) + i2 + renderStringify(v3) + i3 + renderStringify(v4) + i4 +\n renderStringify(v5) + i5 + renderStringify(v6) + suffix :\n NO_CHANGE;\n }\n /**\n * Creates an interpolation binding with 8 expressions.\n */\n function interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix) {\n var bindingIndex = getBindingIndex();\n var different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n different = bindingUpdated4(lView, bindingIndex + 4, v4, v5, v6, v7) || different;\n incrementBindingIndex(8);\n return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 +\n renderStringify(v2) + i2 + renderStringify(v3) + i3 + renderStringify(v4) + i4 +\n renderStringify(v5) + i5 + renderStringify(v6) + i6 + renderStringify(v7) + suffix :\n NO_CHANGE;\n }\n\n /**\n *\n * Update an interpolated attribute on an element with single bound value surrounded by text.\n *\n * Used when the value passed to a property has 1 interpolated value in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate1('title', 'prefix', v0, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\n function ɵɵattributeInterpolate1(attrName, prefix, v0, suffix, sanitizer, namespace) {\n var lView = getLView();\n var interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n var tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n ngDevMode &&\n storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 1, prefix, suffix);\n }\n return ɵɵattributeInterpolate1;\n }\n /**\n *\n * Update an interpolated attribute on an element with 2 bound values surrounded by text.\n *\n * Used when the value passed to a property has 2 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate2('title', 'prefix', v0, '-', v1, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\n function ɵɵattributeInterpolate2(attrName, prefix, v0, i0, v1, suffix, sanitizer, namespace) {\n var lView = getLView();\n var interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n var tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n ngDevMode &&\n storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 2, prefix, i0, suffix);\n }\n return ɵɵattributeInterpolate2;\n }\n /**\n *\n * Update an interpolated attribute on an element with 3 bound values surrounded by text.\n *\n * Used when the value passed to a property has 3 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate3(\n * 'title', 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\n function ɵɵattributeInterpolate3(attrName, prefix, v0, i0, v1, i1, v2, suffix, sanitizer, namespace) {\n var lView = getLView();\n var interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n var tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n ngDevMode &&\n storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 3, prefix, i0, i1, suffix);\n }\n return ɵɵattributeInterpolate3;\n }\n /**\n *\n * Update an interpolated attribute on an element with 4 bound values surrounded by text.\n *\n * Used when the value passed to a property has 4 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate4(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\n function ɵɵattributeInterpolate4(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, suffix, sanitizer, namespace) {\n var lView = getLView();\n var interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n var tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n ngDevMode &&\n storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 4, prefix, i0, i1, i2, suffix);\n }\n return ɵɵattributeInterpolate4;\n }\n /**\n *\n * Update an interpolated attribute on an element with 5 bound values surrounded by text.\n *\n * Used when the value passed to a property has 5 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate5(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\n function ɵɵattributeInterpolate5(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix, sanitizer, namespace) {\n var lView = getLView();\n var interpolatedValue = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n var tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n ngDevMode &&\n storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 5, prefix, i0, i1, i2, i3, suffix);\n }\n return ɵɵattributeInterpolate5;\n }\n /**\n *\n * Update an interpolated attribute on an element with 6 bound values surrounded by text.\n *\n * Used when the value passed to a property has 6 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate6(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\n function ɵɵattributeInterpolate6(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix, sanitizer, namespace) {\n var lView = getLView();\n var interpolatedValue = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n var tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n ngDevMode &&\n storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 6, prefix, i0, i1, i2, i3, i4, suffix);\n }\n return ɵɵattributeInterpolate6;\n }\n /**\n *\n * Update an interpolated attribute on an element with 7 bound values surrounded by text.\n *\n * Used when the value passed to a property has 7 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate7(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\n function ɵɵattributeInterpolate7(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix, sanitizer, namespace) {\n var lView = getLView();\n var interpolatedValue = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n var tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n ngDevMode &&\n storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 7, prefix, i0, i1, i2, i3, i4, i5, suffix);\n }\n return ɵɵattributeInterpolate7;\n }\n /**\n *\n * Update an interpolated attribute on an element with 8 bound values surrounded by text.\n *\n * Used when the value passed to a property has 8 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate8(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param i6 Static value used for concatenation only.\n * @param v7 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\n function ɵɵattributeInterpolate8(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix, sanitizer, namespace) {\n var lView = getLView();\n var interpolatedValue = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n var tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n ngDevMode &&\n storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 8, prefix, i0, i1, i2, i3, i4, i5, i6, suffix);\n }\n return ɵɵattributeInterpolate8;\n }\n /**\n * Update an interpolated attribute on an element with 9 or more bound values surrounded by text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div\n * title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolateV(\n * 'title', ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n * 'suffix']);\n * ```\n *\n * @param attrName The name of the attribute to update.\n * @param values The collection of values and the strings in-between those values, beginning with\n * a string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\n function ɵɵattributeInterpolateV(attrName, values, sanitizer, namespace) {\n var lView = getLView();\n var interpolated = interpolationV(lView, values);\n if (interpolated !== NO_CHANGE) {\n var tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolated, sanitizer, namespace);\n if (ngDevMode) {\n var interpolationInBetween = [values[0]]; // prefix\n for (var i = 2; i < values.length; i += 2) {\n interpolationInBetween.push(values[i]);\n }\n storePropertyBindingMetadata.apply(void 0, __spread([getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - interpolationInBetween.length + 1], interpolationInBetween));\n }\n }\n return ɵɵattributeInterpolateV;\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 function templateFirstCreatePass(index, tView, lView, templateFn, decls, vars, tagName, attrsIndex, localRefsIndex) {\n ngDevMode && assertFirstCreatePass(tView);\n ngDevMode && ngDevMode.firstCreatePass++;\n var tViewConsts = tView.consts;\n // TODO(pk): refactor getOrCreateTNode to have the \"create\" only version\n var tNode = getOrCreateTNode(tView, index, 4 /* Container */, tagName || null, getConstant(tViewConsts, attrsIndex));\n resolveDirectives(tView, lView, tNode, getConstant(tViewConsts, localRefsIndex));\n registerPostOrderHooks(tView, tNode);\n var embeddedTView = tNode.tViews = createTView(2 /* Embedded */, tNode, templateFn, decls, vars, tView.directiveRegistry, tView.pipeRegistry, null, tView.schemas, tViewConsts);\n if (tView.queries !== null) {\n tView.queries.template(tView, tNode);\n embeddedTView.queries = tView.queries.embeddedTView(tNode);\n }\n return tNode;\n }\n /**\n * Creates an LContainer for an ng-template (dynamically-inserted view), e.g.\n *\n * <ng-template #foo>\n * <div></div>\n * </ng-template>\n *\n * @param index The index of the container in the data array\n * @param templateFn Inline template\n * @param decls The number of nodes, local refs, and pipes for this template\n * @param vars The number of bindings for this template\n * @param tagName The name of the container element, if applicable\n * @param attrsIndex Index of template attributes in the `consts` array.\n * @param localRefs Index of the local references in the `consts` array.\n * @param localRefExtractor A function which extracts local-refs values from the template.\n * Defaults to the current element associated with the local-ref.\n *\n * @codeGenApi\n */\n function ɵɵtemplate(index, templateFn, decls, vars, tagName, attrsIndex, localRefsIndex, localRefExtractor) {\n var lView = getLView();\n var tView = getTView();\n var adjustedIndex = index + HEADER_OFFSET;\n var tNode = tView.firstCreatePass ? templateFirstCreatePass(adjustedIndex, tView, lView, templateFn, decls, vars, tagName, attrsIndex, localRefsIndex) :\n tView.data[adjustedIndex];\n setCurrentTNode(tNode, false);\n var comment = lView[RENDERER].createComment(ngDevMode ? 'container' : '');\n appendChild(tView, lView, comment, tNode);\n attachPatchData(comment, lView);\n addToViewTree(lView, lView[adjustedIndex] = createLContainer(comment, lView, comment, tNode));\n if (isDirectiveHost(tNode)) {\n createDirectivesInstances(tView, lView, tNode);\n }\n if (localRefsIndex != null) {\n saveResolvedLocalsInData(lView, tNode, localRefExtractor);\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 /** Store a value in the `data` at a given `index`. */\n function store(tView, lView, index, value) {\n // We don't store any static data for local variables, so the first time\n // we see the template, we should store as null to avoid a sparse array\n if (index >= tView.data.length) {\n tView.data[index] = null;\n tView.blueprint[index] = null;\n }\n lView[index] = value;\n }\n /**\n * Retrieves a local reference from the current contextViewData.\n *\n * If the reference to retrieve is in a parent view, this instruction is used in conjunction\n * with a nextContext() call, which walks up the tree and updates the contextViewData instance.\n *\n * @param index The index of the local ref in contextViewData.\n *\n * @codeGenApi\n */\n function ɵɵreference(index) {\n var contextLView = getContextLView();\n return load(contextLView, HEADER_OFFSET + index);\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 mapping of the @angular/core API surface used in generated expressions to the actual symbols.\n *\n * This should be kept up to date with the public exports of @angular/core.\n */\n var angularCoreDiEnv = {\n 'ɵɵdefineInjectable': ɵɵdefineInjectable,\n 'ɵɵdefineInjector': ɵɵdefineInjector,\n 'ɵɵinject': ɵɵinject,\n 'ɵɵinvalidFactoryDep': ɵɵinvalidFactoryDep,\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 an Angular injectable according to its `Injectable` metadata, and patch the resulting\n * injectable def (`ɵprov`) onto the injectable type.\n */\n function compileInjectable(type, srcMeta) {\n var ngInjectableDef = null;\n var ngFactoryDef = null;\n // if NG_PROV_DEF is already defined on this class then don't overwrite it\n if (!type.hasOwnProperty(NG_PROV_DEF)) {\n Object.defineProperty(type, NG_PROV_DEF, {\n get: function () {\n if (ngInjectableDef === null) {\n ngInjectableDef = getCompilerFacade().compileInjectable(angularCoreDiEnv, \"ng:///\" + type.name + \"/\\u0275prov.js\", getInjectableMetadata(type, srcMeta));\n }\n return ngInjectableDef;\n },\n });\n }\n // if NG_FACTORY_DEF is already defined on this class then don't overwrite it\n if (!type.hasOwnProperty(NG_FACTORY_DEF)) {\n Object.defineProperty(type, NG_FACTORY_DEF, {\n get: function () {\n if (ngFactoryDef === null) {\n var metadata = getInjectableMetadata(type, srcMeta);\n var compiler = getCompilerFacade();\n ngFactoryDef = compiler.compileFactory(angularCoreDiEnv, \"ng:///\" + type.name + \"/\\u0275fac.js\", {\n name: metadata.name,\n type: metadata.type,\n typeArgumentCount: metadata.typeArgumentCount,\n deps: reflectDependencies(type),\n injectFn: 'inject',\n target: compiler.R3FactoryTarget.Injectable\n });\n }\n return ngFactoryDef;\n },\n // Leave this configurable so that the factories from directives or pipes can take precedence.\n configurable: true\n });\n }\n }\n var ɵ0$8 = getClosureSafeProperty;\n var USE_VALUE$1 = getClosureSafeProperty({ provide: String, useValue: ɵ0$8 });\n function isUseClassProvider(meta) {\n return meta.useClass !== undefined;\n }\n function isUseValueProvider(meta) {\n return USE_VALUE$1 in meta;\n }\n function isUseFactoryProvider(meta) {\n return meta.useFactory !== undefined;\n }\n function isUseExistingProvider(meta) {\n return meta.useExisting !== undefined;\n }\n function getInjectableMetadata(type, srcMeta) {\n // Allow the compilation of a class with a `@Injectable()` decorator without parameters\n var meta = srcMeta || { providedIn: null };\n var compilerMeta = {\n name: type.name,\n type: type,\n typeArgumentCount: 0,\n providedIn: meta.providedIn,\n userDeps: undefined,\n };\n if ((isUseClassProvider(meta) || isUseFactoryProvider(meta)) && meta.deps !== undefined) {\n compilerMeta.userDeps = convertDependencies(meta.deps);\n }\n if (isUseClassProvider(meta)) {\n // The user explicitly specified useClass, and may or may not have provided deps.\n compilerMeta.useClass = resolveForwardRef(meta.useClass);\n }\n else if (isUseValueProvider(meta)) {\n // The user explicitly specified useValue.\n compilerMeta.useValue = resolveForwardRef(meta.useValue);\n }\n else if (isUseFactoryProvider(meta)) {\n // The user explicitly specified useFactory.\n compilerMeta.useFactory = meta.useFactory;\n }\n else if (isUseExistingProvider(meta)) {\n // The user explicitly specified useExisting.\n compilerMeta.useExisting = resolveForwardRef(meta.useExisting);\n }\n return compilerMeta;\n }\n\n var ɵ0$9 = getClosureSafeProperty;\n var USE_VALUE$2 = getClosureSafeProperty({ provide: String, useValue: ɵ0$9 });\n var EMPTY_ARRAY$3 = [];\n function convertInjectableProviderToFactory(type, provider) {\n if (!provider) {\n var reflectionCapabilities = new ReflectionCapabilities();\n var deps_1 = reflectionCapabilities.parameters(type);\n // TODO - convert to flags.\n return function () { return new (type.bind.apply(type, __spread([void 0], injectArgs(deps_1))))(); };\n }\n if (USE_VALUE$2 in provider) {\n var valueProvider_1 = provider;\n return function () { return valueProvider_1.useValue; };\n }\n else if (provider.useExisting) {\n var existingProvider_1 = provider;\n return function () { return ɵɵinject(resolveForwardRef(existingProvider_1.useExisting)); };\n }\n else if (provider.useFactory) {\n var factoryProvider_1 = provider;\n return function () { return factoryProvider_1.useFactory.apply(factoryProvider_1, __spread(injectArgs(factoryProvider_1.deps || EMPTY_ARRAY$3))); };\n }\n else if (provider.useClass) {\n var classProvider_1 = provider;\n var deps_2 = provider.deps;\n if (!deps_2) {\n var reflectionCapabilities = new ReflectionCapabilities();\n deps_2 = reflectionCapabilities.parameters(type);\n }\n return function () {\n var _a;\n return new ((_a = (resolveForwardRef(classProvider_1.useClass))).bind.apply(_a, __spread([void 0], injectArgs(deps_2))))();\n };\n }\n else {\n var deps_3 = provider.deps;\n if (!deps_3) {\n var reflectionCapabilities = new ReflectionCapabilities();\n deps_3 = reflectionCapabilities.parameters(type);\n }\n return function () { return new (type.bind.apply(type, __spread([void 0], injectArgs(deps_3))))(); };\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 var ɵ0$a = function (type, meta) { return SWITCH_COMPILE_INJECTABLE(type, meta); };\n /**\n * Injectable decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\n var Injectable = makeDecorator('Injectable', undefined, undefined, undefined, ɵ0$a);\n /**\n * Supports @Injectable() in JIT mode for Render2.\n */\n function render2CompileInjectable(injectableType, options) {\n if (options && options.providedIn !== undefined && !getInjectableDef(injectableType)) {\n injectableType.ɵprov = ɵɵdefineInjectable({\n token: injectableType,\n providedIn: options.providedIn,\n factory: convertInjectableProviderToFactory(injectableType, options),\n });\n }\n }\n var SWITCH_COMPILE_INJECTABLE__POST_R3__ = compileInjectable;\n var SWITCH_COMPILE_INJECTABLE__PRE_R3__ = render2CompileInjectable;\n var SWITCH_COMPILE_INJECTABLE = SWITCH_COMPILE_INJECTABLE__PRE_R3__;\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 findFirstClosedCycle(keys) {\n var res = [];\n for (var i = 0; i < keys.length; ++i) {\n if (res.indexOf(keys[i]) > -1) {\n res.push(keys[i]);\n return res;\n }\n res.push(keys[i]);\n }\n return res;\n }\n function constructResolvingPath(keys) {\n if (keys.length > 1) {\n var reversed = findFirstClosedCycle(keys.slice().reverse());\n var tokenStrs = reversed.map(function (k) { return stringify(k.token); });\n return ' (' + tokenStrs.join(' -> ') + ')';\n }\n return '';\n }\n function injectionError(injector, key, constructResolvingMessage, originalError) {\n var keys = [key];\n var errMsg = constructResolvingMessage(keys);\n var error = (originalError ? wrappedError(errMsg, originalError) : Error(errMsg));\n error.addKey = addKey;\n error.keys = keys;\n error.injectors = [injector];\n error.constructResolvingMessage = constructResolvingMessage;\n error[ERROR_ORIGINAL_ERROR] = originalError;\n return error;\n }\n function addKey(injector, key) {\n this.injectors.push(injector);\n this.keys.push(key);\n // Note: This updated message won't be reflected in the `.stack` property\n this.message = this.constructResolvingMessage(this.keys);\n }\n /**\n * Thrown when trying to retrieve a dependency by key from {@link Injector}, but the\n * {@link Injector} does not have a {@link Provider} for the given key.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class A {\n * constructor(b:B) {}\n * }\n *\n * expect(() => Injector.resolveAndCreate([A])).toThrowError();\n * ```\n */\n function noProviderError(injector, key) {\n return injectionError(injector, key, function (keys) {\n var first = stringify(keys[0].token);\n return \"No provider for \" + first + \"!\" + constructResolvingPath(keys);\n });\n }\n /**\n * Thrown when dependencies form a cycle.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * var injector = Injector.resolveAndCreate([\n * {provide: \"one\", useFactory: (two) => \"two\", deps: [[new Inject(\"two\")]]},\n * {provide: \"two\", useFactory: (one) => \"one\", deps: [[new Inject(\"one\")]]}\n * ]);\n *\n * expect(() => injector.get(\"one\")).toThrowError();\n * ```\n *\n * Retrieving `A` or `B` throws a `CyclicDependencyError` as the graph above cannot be constructed.\n */\n function cyclicDependencyError(injector, key) {\n return injectionError(injector, key, function (keys) {\n return \"Cannot instantiate cyclic dependency!\" + constructResolvingPath(keys);\n });\n }\n /**\n * Thrown when a constructing type returns with an Error.\n *\n * The `InstantiationError` class contains the original error plus the dependency graph which caused\n * this object to be instantiated.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class A {\n * constructor() {\n * throw new Error('message');\n * }\n * }\n *\n * var injector = Injector.resolveAndCreate([A]);\n\n * try {\n * injector.get(A);\n * } catch (e) {\n * expect(e instanceof InstantiationError).toBe(true);\n * expect(e.originalException.message).toEqual(\"message\");\n * expect(e.originalStack).toBeDefined();\n * }\n * ```\n */\n function instantiationError(injector, originalException, originalStack, key) {\n return injectionError(injector, key, function (keys) {\n var first = stringify(keys[0].token);\n return originalException.message + \": Error during instantiation of \" + first + \"!\" + constructResolvingPath(keys) + \".\";\n }, originalException);\n }\n /**\n * Thrown when an object other then {@link Provider} (or `Type`) is passed to {@link Injector}\n * creation.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * expect(() => Injector.resolveAndCreate([\"not a type\"])).toThrowError();\n * ```\n */\n function invalidProviderError(provider) {\n return Error(\"Invalid provider - only instances of Provider and Type are allowed, got: \" + provider);\n }\n /**\n * Thrown when the class has no annotation information.\n *\n * Lack of annotation information prevents the {@link Injector} from determining which dependencies\n * need to be injected into the constructor.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class A {\n * constructor(b) {}\n * }\n *\n * expect(() => Injector.resolveAndCreate([A])).toThrowError();\n * ```\n *\n * This error is also thrown when the class not marked with {@link Injectable} has parameter types.\n *\n * ```typescript\n * class B {}\n *\n * class A {\n * constructor(b:B) {} // no information about the parameter types of A is available at runtime.\n * }\n *\n * expect(() => Injector.resolveAndCreate([A,B])).toThrowError();\n * ```\n *\n */\n function noAnnotationError(typeOrFunc, params) {\n var signature = [];\n for (var i = 0, ii = params.length; i < ii; i++) {\n var parameter = params[i];\n if (!parameter || parameter.length == 0) {\n signature.push('?');\n }\n else {\n signature.push(parameter.map(stringify).join(' '));\n }\n }\n return Error('Cannot resolve all parameters for \\'' + stringify(typeOrFunc) + '\\'(' +\n signature.join(', ') + '). ' +\n 'Make sure that all the parameters are decorated with Inject or have valid type annotations and that \\'' +\n stringify(typeOrFunc) + '\\' is decorated with Injectable.');\n }\n /**\n * Thrown when getting an object by index.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class A {}\n *\n * var injector = Injector.resolveAndCreate([A]);\n *\n * expect(() => injector.getAt(100)).toThrowError();\n * ```\n *\n */\n function outOfBoundsError(index) {\n return Error(\"Index \" + index + \" is out-of-bounds.\");\n }\n // TODO: add a working example after alpha38 is released\n /**\n * Thrown when a multi provider and a regular provider are bound to the same token.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * expect(() => Injector.resolveAndCreate([\n * { provide: \"Strings\", useValue: \"string1\", multi: true},\n * { provide: \"Strings\", useValue: \"string2\", multi: false}\n * ])).toThrowError();\n * ```\n */\n function mixingMultiProvidersWithRegularProvidersError(provider1, provider2) {\n return Error(\"Cannot mix multi providers and regular providers, got: \" + provider1 + \" \" + provider2);\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 unique object used for retrieving items from the {@link ReflectiveInjector}.\n *\n * Keys have:\n * - a system-wide unique `id`.\n * - a `token`.\n *\n * `Key` is used internally by {@link ReflectiveInjector} because its system-wide unique `id` allows\n * the\n * injector to store created objects in a more efficient way.\n *\n * `Key` should not be created directly. {@link ReflectiveInjector} creates keys automatically when\n * resolving\n * providers.\n *\n * @deprecated No replacement\n * @publicApi\n */\n var ReflectiveKey = /** @class */ (function () {\n /**\n * Private\n */\n function ReflectiveKey(token, id) {\n this.token = token;\n this.id = id;\n if (!token) {\n throw new Error('Token must be defined!');\n }\n this.displayName = stringify(this.token);\n }\n /**\n * Retrieves a `Key` for a token.\n */\n ReflectiveKey.get = function (token) {\n return _globalKeyRegistry.get(resolveForwardRef(token));\n };\n Object.defineProperty(ReflectiveKey, \"numberOfKeys\", {\n /**\n * @returns the number of keys registered in the system.\n */\n get: function () {\n return _globalKeyRegistry.numberOfKeys;\n },\n enumerable: false,\n configurable: true\n });\n return ReflectiveKey;\n }());\n var KeyRegistry = /** @class */ (function () {\n function KeyRegistry() {\n this._allKeys = new Map();\n }\n KeyRegistry.prototype.get = function (token) {\n if (token instanceof ReflectiveKey)\n return token;\n if (this._allKeys.has(token)) {\n return this._allKeys.get(token);\n }\n var newKey = new ReflectiveKey(token, ReflectiveKey.numberOfKeys);\n this._allKeys.set(token, newKey);\n return newKey;\n };\n Object.defineProperty(KeyRegistry.prototype, \"numberOfKeys\", {\n get: function () {\n return this._allKeys.size;\n },\n enumerable: false,\n configurable: true\n });\n return KeyRegistry;\n }());\n var _globalKeyRegistry = new KeyRegistry();\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 * Provides access to reflection data about symbols. Used internally by Angular\n * to power dependency injection and compilation.\n */\n var Reflector = /** @class */ (function () {\n function Reflector(reflectionCapabilities) {\n this.reflectionCapabilities = reflectionCapabilities;\n }\n Reflector.prototype.updateCapabilities = function (caps) {\n this.reflectionCapabilities = caps;\n };\n Reflector.prototype.factory = function (type) {\n return this.reflectionCapabilities.factory(type);\n };\n Reflector.prototype.parameters = function (typeOrFunc) {\n return this.reflectionCapabilities.parameters(typeOrFunc);\n };\n Reflector.prototype.annotations = function (typeOrFunc) {\n return this.reflectionCapabilities.annotations(typeOrFunc);\n };\n Reflector.prototype.propMetadata = function (typeOrFunc) {\n return this.reflectionCapabilities.propMetadata(typeOrFunc);\n };\n Reflector.prototype.hasLifecycleHook = function (type, lcProperty) {\n return this.reflectionCapabilities.hasLifecycleHook(type, lcProperty);\n };\n Reflector.prototype.getter = function (name) {\n return this.reflectionCapabilities.getter(name);\n };\n Reflector.prototype.setter = function (name) {\n return this.reflectionCapabilities.setter(name);\n };\n Reflector.prototype.method = function (name) {\n return this.reflectionCapabilities.method(name);\n };\n Reflector.prototype.importUri = function (type) {\n return this.reflectionCapabilities.importUri(type);\n };\n Reflector.prototype.resourceUri = function (type) {\n return this.reflectionCapabilities.resourceUri(type);\n };\n Reflector.prototype.resolveIdentifier = function (name, moduleUrl, members, runtime) {\n return this.reflectionCapabilities.resolveIdentifier(name, moduleUrl, members, runtime);\n };\n Reflector.prototype.resolveEnum = function (identifier, name) {\n return this.reflectionCapabilities.resolveEnum(identifier, name);\n };\n return Reflector;\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 {@link Reflector} used internally in Angular to access metadata\n * about symbols.\n */\n var reflector = new Reflector(new ReflectionCapabilities());\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 * `Dependency` is used by the framework to extend DI.\n * This is internal to Angular and should not be used directly.\n */\n var ReflectiveDependency = /** @class */ (function () {\n function ReflectiveDependency(key, optional, visibility) {\n this.key = key;\n this.optional = optional;\n this.visibility = visibility;\n }\n ReflectiveDependency.fromKey = function (key) {\n return new ReflectiveDependency(key, false, null);\n };\n return ReflectiveDependency;\n }());\n var _EMPTY_LIST = [];\n var ResolvedReflectiveProvider_ = /** @class */ (function () {\n function ResolvedReflectiveProvider_(key, resolvedFactories, multiProvider) {\n this.key = key;\n this.resolvedFactories = resolvedFactories;\n this.multiProvider = multiProvider;\n this.resolvedFactory = this.resolvedFactories[0];\n }\n return ResolvedReflectiveProvider_;\n }());\n /**\n * An internal resolved representation of a factory function created by resolving `Provider`.\n * @publicApi\n */\n var ResolvedReflectiveFactory = /** @class */ (function () {\n function ResolvedReflectiveFactory(\n /**\n * Factory function which can return an instance of an object represented by a key.\n */\n factory, \n /**\n * Arguments (dependencies) to the `factory` function.\n */\n dependencies) {\n this.factory = factory;\n this.dependencies = dependencies;\n }\n return ResolvedReflectiveFactory;\n }());\n /**\n * Resolve a single provider.\n */\n function resolveReflectiveFactory(provider) {\n var factoryFn;\n var resolvedDeps;\n if (provider.useClass) {\n var useClass = resolveForwardRef(provider.useClass);\n factoryFn = reflector.factory(useClass);\n resolvedDeps = _dependenciesFor(useClass);\n }\n else if (provider.useExisting) {\n factoryFn = function (aliasInstance) { return aliasInstance; };\n resolvedDeps = [ReflectiveDependency.fromKey(ReflectiveKey.get(provider.useExisting))];\n }\n else if (provider.useFactory) {\n factoryFn = provider.useFactory;\n resolvedDeps = constructDependencies(provider.useFactory, provider.deps);\n }\n else {\n factoryFn = function () { return provider.useValue; };\n resolvedDeps = _EMPTY_LIST;\n }\n return new ResolvedReflectiveFactory(factoryFn, resolvedDeps);\n }\n /**\n * Converts the `Provider` into `ResolvedProvider`.\n *\n * `Injector` internally only uses `ResolvedProvider`, `Provider` contains convenience provider\n * syntax.\n */\n function resolveReflectiveProvider(provider) {\n return new ResolvedReflectiveProvider_(ReflectiveKey.get(provider.provide), [resolveReflectiveFactory(provider)], provider.multi || false);\n }\n /**\n * Resolve a list of Providers.\n */\n function resolveReflectiveProviders(providers) {\n var normalized = _normalizeProviders(providers, []);\n var resolved = normalized.map(resolveReflectiveProvider);\n var resolvedProviderMap = mergeResolvedReflectiveProviders(resolved, new Map());\n return Array.from(resolvedProviderMap.values());\n }\n /**\n * Merges a list of ResolvedProviders into a list where each key is contained exactly once and\n * multi providers have been merged.\n */\n function mergeResolvedReflectiveProviders(providers, normalizedProvidersMap) {\n for (var i = 0; i < providers.length; i++) {\n var provider = providers[i];\n var existing = normalizedProvidersMap.get(provider.key.id);\n if (existing) {\n if (provider.multiProvider !== existing.multiProvider) {\n throw mixingMultiProvidersWithRegularProvidersError(existing, provider);\n }\n if (provider.multiProvider) {\n for (var j = 0; j < provider.resolvedFactories.length; j++) {\n existing.resolvedFactories.push(provider.resolvedFactories[j]);\n }\n }\n else {\n normalizedProvidersMap.set(provider.key.id, provider);\n }\n }\n else {\n var resolvedProvider = void 0;\n if (provider.multiProvider) {\n resolvedProvider = new ResolvedReflectiveProvider_(provider.key, provider.resolvedFactories.slice(), provider.multiProvider);\n }\n else {\n resolvedProvider = provider;\n }\n normalizedProvidersMap.set(provider.key.id, resolvedProvider);\n }\n }\n return normalizedProvidersMap;\n }\n function _normalizeProviders(providers, res) {\n providers.forEach(function (b) {\n if (b instanceof Type) {\n res.push({ provide: b, useClass: b });\n }\n else if (b && typeof b == 'object' && b.provide !== undefined) {\n res.push(b);\n }\n else if (Array.isArray(b)) {\n _normalizeProviders(b, res);\n }\n else {\n throw invalidProviderError(b);\n }\n });\n return res;\n }\n function constructDependencies(typeOrFunc, dependencies) {\n if (!dependencies) {\n return _dependenciesFor(typeOrFunc);\n }\n else {\n var params_1 = dependencies.map(function (t) { return [t]; });\n return dependencies.map(function (t) { return _extractToken(typeOrFunc, t, params_1); });\n }\n }\n function _dependenciesFor(typeOrFunc) {\n var params = reflector.parameters(typeOrFunc);\n if (!params)\n return [];\n if (params.some(function (p) { return p == null; })) {\n throw noAnnotationError(typeOrFunc, params);\n }\n return params.map(function (p) { return _extractToken(typeOrFunc, p, params); });\n }\n function _extractToken(typeOrFunc, metadata, params) {\n var token = null;\n var optional = false;\n if (!Array.isArray(metadata)) {\n if (metadata instanceof Inject) {\n return _createDependency(metadata.token, optional, null);\n }\n else {\n return _createDependency(metadata, optional, null);\n }\n }\n var visibility = null;\n for (var i = 0; i < metadata.length; ++i) {\n var paramMetadata = metadata[i];\n if (paramMetadata instanceof Type) {\n token = paramMetadata;\n }\n else if (paramMetadata instanceof Inject) {\n token = paramMetadata.token;\n }\n else if (paramMetadata instanceof Optional) {\n optional = true;\n }\n else if (paramMetadata instanceof Self || paramMetadata instanceof SkipSelf) {\n visibility = paramMetadata;\n }\n else if (paramMetadata instanceof InjectionToken) {\n token = paramMetadata;\n }\n }\n token = resolveForwardRef(token);\n if (token != null) {\n return _createDependency(token, optional, visibility);\n }\n else {\n throw noAnnotationError(typeOrFunc, params);\n }\n }\n function _createDependency(token, optional, visibility) {\n return new ReflectiveDependency(ReflectiveKey.get(token), optional, visibility);\n }\n\n // Threshold for the dynamic version\n var UNDEFINED = {};\n /**\n * A ReflectiveDependency injection container used for instantiating objects and resolving\n * dependencies.\n *\n * An `Injector` is a replacement for a `new` operator, which can automatically resolve the\n * constructor dependencies.\n *\n * In typical use, application code asks for the dependencies in the constructor and they are\n * resolved by the `Injector`.\n *\n * @usageNotes\n * ### Example\n *\n * The following example creates an `Injector` configured to create `Engine` and `Car`.\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n * constructor(public engine:Engine) {}\n * }\n *\n * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);\n * var car = injector.get(Car);\n * expect(car instanceof Car).toBe(true);\n * expect(car.engine instanceof Engine).toBe(true);\n * ```\n *\n * Notice, we don't use the `new` operator because we explicitly want to have the `Injector`\n * resolve all of the object's dependencies automatically.\n *\n * @deprecated from v5 - slow and brings in a lot of code, Use `Injector.create` instead.\n * @publicApi\n */\n var ReflectiveInjector = /** @class */ (function () {\n function ReflectiveInjector() {\n }\n /**\n * Turns an array of provider definitions into an array of resolved providers.\n *\n * A resolution is a process of flattening multiple nested arrays and converting individual\n * providers into an array of `ResolvedReflectiveProvider`s.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n * constructor(public engine:Engine) {}\n * }\n *\n * var providers = ReflectiveInjector.resolve([Car, [[Engine]]]);\n *\n * expect(providers.length).toEqual(2);\n *\n * expect(providers[0] instanceof ResolvedReflectiveProvider).toBe(true);\n * expect(providers[0].key.displayName).toBe(\"Car\");\n * expect(providers[0].dependencies.length).toEqual(1);\n * expect(providers[0].factory).toBeDefined();\n *\n * expect(providers[1].key.displayName).toBe(\"Engine\");\n * });\n * ```\n *\n */\n ReflectiveInjector.resolve = function (providers) {\n return resolveReflectiveProviders(providers);\n };\n /**\n * Resolves an array of providers and creates an injector from those providers.\n *\n * The passed-in providers can be an array of `Type`, `Provider`,\n * or a recursive array of more providers.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n * constructor(public engine:Engine) {}\n * }\n *\n * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);\n * expect(injector.get(Car) instanceof Car).toBe(true);\n * ```\n */\n ReflectiveInjector.resolveAndCreate = function (providers, parent) {\n var ResolvedReflectiveProviders = ReflectiveInjector.resolve(providers);\n return ReflectiveInjector.fromResolvedProviders(ResolvedReflectiveProviders, parent);\n };\n /**\n * Creates an injector from previously resolved providers.\n *\n * This API is the recommended way to construct injectors in performance-sensitive parts.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n * constructor(public engine:Engine) {}\n * }\n *\n * var providers = ReflectiveInjector.resolve([Car, Engine]);\n * var injector = ReflectiveInjector.fromResolvedProviders(providers);\n * expect(injector.get(Car) instanceof Car).toBe(true);\n * ```\n */\n ReflectiveInjector.fromResolvedProviders = function (providers, parent) {\n return new ReflectiveInjector_(providers, parent);\n };\n return ReflectiveInjector;\n }());\n var ReflectiveInjector_ = /** @class */ (function () {\n /**\n * Private\n */\n function ReflectiveInjector_(_providers, _parent) {\n /** @internal */\n this._constructionCounter = 0;\n this._providers = _providers;\n this.parent = _parent || null;\n var len = _providers.length;\n this.keyIds = [];\n this.objs = [];\n for (var i = 0; i < len; i++) {\n this.keyIds[i] = _providers[i].key.id;\n this.objs[i] = UNDEFINED;\n }\n }\n ReflectiveInjector_.prototype.get = function (token, notFoundValue) {\n if (notFoundValue === void 0) { notFoundValue = THROW_IF_NOT_FOUND; }\n return this._getByKey(ReflectiveKey.get(token), null, notFoundValue);\n };\n ReflectiveInjector_.prototype.resolveAndCreateChild = function (providers) {\n var ResolvedReflectiveProviders = ReflectiveInjector.resolve(providers);\n return this.createChildFromResolved(ResolvedReflectiveProviders);\n };\n ReflectiveInjector_.prototype.createChildFromResolved = function (providers) {\n var inj = new ReflectiveInjector_(providers);\n inj.parent = this;\n return inj;\n };\n ReflectiveInjector_.prototype.resolveAndInstantiate = function (provider) {\n return this.instantiateResolved(ReflectiveInjector.resolve([provider])[0]);\n };\n ReflectiveInjector_.prototype.instantiateResolved = function (provider) {\n return this._instantiateProvider(provider);\n };\n ReflectiveInjector_.prototype.getProviderAtIndex = function (index) {\n if (index < 0 || index >= this._providers.length) {\n throw outOfBoundsError(index);\n }\n return this._providers[index];\n };\n /** @internal */\n ReflectiveInjector_.prototype._new = function (provider) {\n if (this._constructionCounter++ > this._getMaxNumberOfObjects()) {\n throw cyclicDependencyError(this, provider.key);\n }\n return this._instantiateProvider(provider);\n };\n ReflectiveInjector_.prototype._getMaxNumberOfObjects = function () {\n return this.objs.length;\n };\n ReflectiveInjector_.prototype._instantiateProvider = function (provider) {\n if (provider.multiProvider) {\n var res = [];\n for (var i = 0; i < provider.resolvedFactories.length; ++i) {\n res[i] = this._instantiate(provider, provider.resolvedFactories[i]);\n }\n return res;\n }\n else {\n return this._instantiate(provider, provider.resolvedFactories[0]);\n }\n };\n ReflectiveInjector_.prototype._instantiate = function (provider, ResolvedReflectiveFactory) {\n var _this = this;\n var factory = ResolvedReflectiveFactory.factory;\n var deps;\n try {\n deps =\n ResolvedReflectiveFactory.dependencies.map(function (dep) { return _this._getByReflectiveDependency(dep); });\n }\n catch (e) {\n if (e.addKey) {\n e.addKey(this, provider.key);\n }\n throw e;\n }\n var obj;\n try {\n obj = factory.apply(void 0, __spread(deps));\n }\n catch (e) {\n throw instantiationError(this, e, e.stack, provider.key);\n }\n return obj;\n };\n ReflectiveInjector_.prototype._getByReflectiveDependency = function (dep) {\n return this._getByKey(dep.key, dep.visibility, dep.optional ? null : THROW_IF_NOT_FOUND);\n };\n ReflectiveInjector_.prototype._getByKey = function (key, visibility, notFoundValue) {\n if (key === ReflectiveInjector_.INJECTOR_KEY) {\n return this;\n }\n if (visibility instanceof Self) {\n return this._getByKeySelf(key, notFoundValue);\n }\n else {\n return this._getByKeyDefault(key, notFoundValue, visibility);\n }\n };\n ReflectiveInjector_.prototype._getObjByKeyId = function (keyId) {\n for (var i = 0; i < this.keyIds.length; i++) {\n if (this.keyIds[i] === keyId) {\n if (this.objs[i] === UNDEFINED) {\n this.objs[i] = this._new(this._providers[i]);\n }\n return this.objs[i];\n }\n }\n return UNDEFINED;\n };\n /** @internal */\n ReflectiveInjector_.prototype._throwOrNull = function (key, notFoundValue) {\n if (notFoundValue !== THROW_IF_NOT_FOUND) {\n return notFoundValue;\n }\n else {\n throw noProviderError(this, key);\n }\n };\n /** @internal */\n ReflectiveInjector_.prototype._getByKeySelf = function (key, notFoundValue) {\n var obj = this._getObjByKeyId(key.id);\n return (obj !== UNDEFINED) ? obj : this._throwOrNull(key, notFoundValue);\n };\n /** @internal */\n ReflectiveInjector_.prototype._getByKeyDefault = function (key, notFoundValue, visibility) {\n var inj;\n if (visibility instanceof SkipSelf) {\n inj = this.parent;\n }\n else {\n inj = this;\n }\n while (inj instanceof ReflectiveInjector_) {\n var inj_ = inj;\n var obj = inj_._getObjByKeyId(key.id);\n if (obj !== UNDEFINED)\n return obj;\n inj = inj_.parent;\n }\n if (inj !== null) {\n return inj.get(key.token, notFoundValue);\n }\n else {\n return this._throwOrNull(key, notFoundValue);\n }\n };\n Object.defineProperty(ReflectiveInjector_.prototype, \"displayName\", {\n get: function () {\n var providers = _mapProviders(this, function (b) { return ' \"' + b.key.displayName + '\" '; })\n .join(', ');\n return \"ReflectiveInjector(providers: [\" + providers + \"])\";\n },\n enumerable: false,\n configurable: true\n });\n ReflectiveInjector_.prototype.toString = function () {\n return this.displayName;\n };\n return ReflectiveInjector_;\n }());\n ReflectiveInjector_.INJECTOR_KEY = ReflectiveKey.get(Injector);\n function _mapProviders(injector, fn) {\n var res = [];\n for (var i = 0; i < injector._providers.length; ++i) {\n res[i] = fn(injector.getProviderAtIndex(i));\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 */\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 function ɵɵdirectiveInject(token, flags) {\n if (flags === void 0) { flags = exports.InjectFlags.Default; }\n var lView = getLView();\n // Fall back to inject() if view hasn't been created. This situation can happen in tests\n // if inject utilities are used before bootstrapping.\n if (lView === null) {\n // Verify that we will not get into infinite loop.\n ngDevMode && assertInjectImplementationNotEqual(ɵɵdirectiveInject);\n return ɵɵinject(token, flags);\n }\n var tNode = getCurrentTNode();\n return getOrCreateInjectable(tNode, lView, resolveForwardRef(token), flags);\n }\n /**\n * Throws an error indicating that a factory function could not be generated by the compiler for a\n * particular class.\n *\n * This instruction allows the actual error message to be optimized away when ngDevMode is turned\n * off, saving bytes of generated code while still providing a good experience in dev mode.\n *\n * The name of the class is not mentioned here, but will be in the generated factory function name\n * and thus in the stack trace.\n *\n * @codeGenApi\n */\n function ɵɵinvalidFactory() {\n var msg = ngDevMode ? \"This constructor was not compatible with Dependency Injection.\" : 'invalid';\n throw new Error(msg);\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 * Update a property on a selected element.\n *\n * Operates on the element selected by index via the {@link select} instruction.\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled\n *\n * @param propName Name of property. Because it is going to DOM, this is not subject to\n * renaming as part of minification.\n * @param value New value to write.\n * @param sanitizer An optional function used to sanitize the value.\n * @returns This function returns itself so that it may be chained\n * (e.g. `property('name', ctx.name)('title', ctx.title)`)\n *\n * @codeGenApi\n */\n function ɵɵproperty(propName, value, sanitizer) {\n var lView = getLView();\n var bindingIndex = nextBindingIndex();\n if (bindingUpdated(lView, bindingIndex, value)) {\n var tView = getTView();\n var tNode = getSelectedTNode();\n elementPropertyInternal(tView, tNode, lView, propName, value, lView[RENDERER], sanitizer, false);\n ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, bindingIndex);\n }\n return ɵɵproperty;\n }\n /**\n * Given `<div style=\"...\" my-dir>` and `MyDir` with `@Input('style')` we need to write to\n * directive input.\n */\n function setDirectiveInputsWhichShadowsStyling(tView, tNode, lView, value, isClassBased) {\n var inputs = tNode.inputs;\n var property = isClassBased ? 'class' : 'style';\n // We support both 'class' and `className` hence the fallback.\n setInputsForProperty(tView, lView, inputs[property], property, 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 */\n function elementStartFirstCreatePass(index, tView, lView, native, name, attrsIndex, localRefsIndex) {\n ngDevMode && assertFirstCreatePass(tView);\n ngDevMode && ngDevMode.firstCreatePass++;\n var tViewConsts = tView.consts;\n var attrs = getConstant(tViewConsts, attrsIndex);\n var tNode = getOrCreateTNode(tView, index, 2 /* Element */, name, attrs);\n var hasDirectives = resolveDirectives(tView, lView, tNode, getConstant(tViewConsts, localRefsIndex));\n ngDevMode && logUnknownElementError(tView, native, tNode, hasDirectives);\n if (tNode.attrs !== null) {\n computeStaticStyling(tNode, tNode.attrs, false);\n }\n if (tNode.mergedAttrs !== null) {\n computeStaticStyling(tNode, tNode.mergedAttrs, true);\n }\n if (tView.queries !== null) {\n tView.queries.elementStart(tView, tNode);\n }\n return tNode;\n }\n /**\n * Create DOM element. The instruction must later be followed by `elementEnd()` call.\n *\n * @param index Index of the element in the LView array\n * @param name Name of the DOM Node\n * @param attrsIndex Index of the element's attributes in the `consts` array.\n * @param localRefsIndex Index of the element's local references in the `consts` array.\n *\n * Attributes and localRefs are passed as an array of strings where elements with an even index\n * hold an attribute name and elements with an odd index hold an attribute value, ex.:\n * ['id', 'warning5', 'class', 'alert']\n *\n * @codeGenApi\n */\n function ɵɵelementStart(index, name, attrsIndex, localRefsIndex) {\n var lView = getLView();\n var tView = getTView();\n var adjustedIndex = HEADER_OFFSET + index;\n ngDevMode &&\n assertEqual(getBindingIndex(), tView.bindingStartIndex, 'elements should be created before any bindings');\n ngDevMode && assertIndexInRange(lView, adjustedIndex);\n var renderer = lView[RENDERER];\n var native = lView[adjustedIndex] = createElementNode(renderer, name, getNamespace());\n var tNode = tView.firstCreatePass ?\n elementStartFirstCreatePass(adjustedIndex, tView, lView, native, name, attrsIndex, localRefsIndex) :\n tView.data[adjustedIndex];\n setCurrentTNode(tNode, true);\n var mergedAttrs = tNode.mergedAttrs;\n if (mergedAttrs !== null) {\n setUpAttributes(renderer, native, mergedAttrs);\n }\n var classes = tNode.classes;\n if (classes !== null) {\n writeDirectClass(renderer, native, classes);\n }\n var styles = tNode.styles;\n if (styles !== null) {\n writeDirectStyle(renderer, native, styles);\n }\n if ((tNode.flags & 64 /* isDetached */) !== 64 /* isDetached */) {\n // In the i18n case, the translation may have removed this element, so only add it if it is not\n // detached. See `TNodeType.Placeholder` and `LFrame.inI18n` for more context.\n appendChild(tView, lView, native, tNode);\n }\n // any immediate children of a component or template container must be pre-emptively\n // monkey-patched with the component view data so that the element can be inspected\n // later on using any element discovery utility methods (see `element_discovery.ts`)\n if (getElementDepthCount() === 0) {\n attachPatchData(native, lView);\n }\n increaseElementDepthCount();\n if (isDirectiveHost(tNode)) {\n createDirectivesInstances(tView, lView, tNode);\n executeContentQueries(tView, tNode, lView);\n }\n if (localRefsIndex !== null) {\n saveResolvedLocalsInData(lView, tNode);\n }\n }\n /**\n * Mark the end of the element.\n *\n * @codeGenApi\n */\n function ɵɵelementEnd() {\n var currentTNode = getCurrentTNode();\n ngDevMode && assertDefined(currentTNode, 'No parent node to close.');\n if (isCurrentTNodeParent()) {\n setCurrentTNodeAsNotParent();\n }\n else {\n ngDevMode && assertHasParent(getCurrentTNode());\n currentTNode = currentTNode.parent;\n setCurrentTNode(currentTNode, false);\n }\n var tNode = currentTNode;\n ngDevMode && assertTNodeType(tNode, 3 /* AnyRNode */);\n decreaseElementDepthCount();\n var tView = getTView();\n if (tView.firstCreatePass) {\n registerPostOrderHooks(tView, currentTNode);\n if (isContentQueryHost(currentTNode)) {\n tView.queries.elementEnd(currentTNode);\n }\n }\n if (tNode.classesWithoutHost != null && hasClassInput(tNode)) {\n setDirectiveInputsWhichShadowsStyling(tView, tNode, getLView(), tNode.classesWithoutHost, true);\n }\n if (tNode.stylesWithoutHost != null && hasStyleInput(tNode)) {\n setDirectiveInputsWhichShadowsStyling(tView, tNode, getLView(), tNode.stylesWithoutHost, false);\n }\n }\n /**\n * Creates an empty element using {@link elementStart} and {@link elementEnd}\n *\n * @param index Index of the element in the data array\n * @param name Name of the DOM Node\n * @param attrsIndex Index of the element's attributes in the `consts` array.\n * @param localRefsIndex Index of the element's local references in the `consts` array.\n *\n * @codeGenApi\n */\n function ɵɵelement(index, name, attrsIndex, localRefsIndex) {\n ɵɵelementStart(index, name, attrsIndex, localRefsIndex);\n ɵɵelementEnd();\n }\n function logUnknownElementError(tView, element, tNode, hasDirectives) {\n var schemas = tView.schemas;\n // If `schemas` is set to `null`, that's an indication that this Component was compiled in AOT\n // mode where this check happens at compile time. In JIT mode, `schemas` is always present and\n // defined as an array (as an empty array in case `schemas` field is not defined) and we should\n // execute the check below.\n if (schemas === null)\n return;\n var tagName = tNode.value;\n // If the element matches any directive, it's considered as valid.\n if (!hasDirectives && tagName !== null) {\n // The element is unknown if it's an instance of HTMLUnknownElement or it isn't registered\n // as a custom element. Note that unknown elements with a dash in their name won't be instances\n // of HTMLUnknownElement in browsers that support web components.\n var isUnknown = \n // Note that we can't check for `typeof HTMLUnknownElement === 'function'`,\n // because while most browsers return 'function', IE returns 'object'.\n (typeof HTMLUnknownElement !== 'undefined' && HTMLUnknownElement &&\n element instanceof HTMLUnknownElement) ||\n (typeof customElements !== 'undefined' && tagName.indexOf('-') > -1 &&\n !customElements.get(tagName));\n if (isUnknown && !matchingSchemas(tView, tagName)) {\n var message = \"'\" + tagName + \"' is not a known element:\\n\";\n message += \"1. If '\" + tagName + \"' is an Angular component, then verify that it is part of this module.\\n\";\n if (tagName && tagName.indexOf('-') > -1) {\n message += \"2. If '\" + tagName + \"' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.\";\n }\n else {\n message +=\n \"2. To allow any element add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.\";\n }\n console.error(formatRuntimeError(\"304\" /* UNKNOWN_ELEMENT */, message));\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 function elementContainerStartFirstCreatePass(index, tView, lView, attrsIndex, localRefsIndex) {\n ngDevMode && ngDevMode.firstCreatePass++;\n var tViewConsts = tView.consts;\n var attrs = getConstant(tViewConsts, attrsIndex);\n var tNode = getOrCreateTNode(tView, index, 8 /* ElementContainer */, 'ng-container', attrs);\n // While ng-container doesn't necessarily support styling, we use the style context to identify\n // and execute directives on the ng-container.\n if (attrs !== null) {\n computeStaticStyling(tNode, attrs, true);\n }\n var localRefs = getConstant(tViewConsts, localRefsIndex);\n resolveDirectives(tView, lView, tNode, localRefs);\n if (tView.queries !== null) {\n tView.queries.elementStart(tView, tNode);\n }\n return tNode;\n }\n /**\n * Creates a logical container for other nodes (<ng-container>) backed by a comment node in the DOM.\n * The instruction must later be followed by `elementContainerEnd()` call.\n *\n * @param index Index of the element in the LView array\n * @param attrsIndex Index of the container attributes in the `consts` array.\n * @param localRefsIndex Index of the container's local references in the `consts` array.\n *\n * Even if this instruction accepts a set of attributes no actual attribute values are propagated to\n * the DOM (as a comment node can't have attributes). Attributes are here only for directive\n * matching purposes and setting initial inputs of directives.\n *\n * @codeGenApi\n */\n function ɵɵelementContainerStart(index, attrsIndex, localRefsIndex) {\n var lView = getLView();\n var tView = getTView();\n var adjustedIndex = index + HEADER_OFFSET;\n ngDevMode && assertIndexInRange(lView, adjustedIndex);\n ngDevMode &&\n assertEqual(getBindingIndex(), tView.bindingStartIndex, 'element containers should be created before any bindings');\n var tNode = tView.firstCreatePass ?\n elementContainerStartFirstCreatePass(adjustedIndex, tView, lView, attrsIndex, localRefsIndex) :\n tView.data[adjustedIndex];\n setCurrentTNode(tNode, true);\n ngDevMode && ngDevMode.rendererCreateComment++;\n var native = lView[adjustedIndex] =\n lView[RENDERER].createComment(ngDevMode ? 'ng-container' : '');\n appendChild(tView, lView, native, tNode);\n attachPatchData(native, lView);\n if (isDirectiveHost(tNode)) {\n createDirectivesInstances(tView, lView, tNode);\n executeContentQueries(tView, tNode, lView);\n }\n if (localRefsIndex != null) {\n saveResolvedLocalsInData(lView, tNode);\n }\n }\n /**\n * Mark the end of the <ng-container>.\n *\n * @codeGenApi\n */\n function ɵɵelementContainerEnd() {\n var currentTNode = getCurrentTNode();\n var tView = getTView();\n if (isCurrentTNodeParent()) {\n setCurrentTNodeAsNotParent();\n }\n else {\n ngDevMode && assertHasParent(currentTNode);\n currentTNode = currentTNode.parent;\n setCurrentTNode(currentTNode, false);\n }\n ngDevMode && assertTNodeType(currentTNode, 8 /* ElementContainer */);\n if (tView.firstCreatePass) {\n registerPostOrderHooks(tView, currentTNode);\n if (isContentQueryHost(currentTNode)) {\n tView.queries.elementEnd(currentTNode);\n }\n }\n }\n /**\n * Creates an empty logical container using {@link elementContainerStart}\n * and {@link elementContainerEnd}\n *\n * @param index Index of the element in the LView array\n * @param attrsIndex Index of the container attributes in the `consts` array.\n * @param localRefsIndex Index of the container's local references in the `consts` array.\n *\n * @codeGenApi\n */\n function ɵɵelementContainer(index, attrsIndex, localRefsIndex) {\n ɵɵelementContainerStart(index, attrsIndex, localRefsIndex);\n ɵɵelementContainerEnd();\n }\n\n /**\n * Returns the current OpaqueViewState instance.\n *\n * Used in conjunction with the restoreView() instruction to save a snapshot\n * of the current view and restore it when listeners are invoked. This allows\n * walking the declaration view tree in listeners to get vars from parent views.\n *\n * @codeGenApi\n */\n function ɵɵgetCurrentView() {\n return getLView();\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 * Determine if the argument is shaped like a Promise\n */\n function isPromise(obj) {\n // allow any Promise/A+ compliant thenable.\n // It's up to the caller to ensure that obj.then conforms to the spec\n return !!obj && typeof obj.then === 'function';\n }\n /**\n * Determine if the argument is a Subscribable\n */\n function isSubscribable(obj) {\n return !!obj && typeof obj.subscribe === 'function';\n }\n /**\n * Determine if the argument is an Observable\n *\n * Strictly this tests that the `obj` is `Subscribable`, since `Observable`\n * types need additional methods, such as `lift()`. But it is adequate for our\n * needs since within the Angular framework code we only ever need to use the\n * `subscribe()` method, and RxJS has mechanisms to wrap `Subscribable` objects\n * into `Observable` as needed.\n */\n var isObservable = isSubscribable;\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 * Adds an event listener to the current node.\n *\n * If an output exists on one of the node's directives, it also subscribes to the output\n * and saves the subscription for later cleanup.\n *\n * @param eventName Name of the event\n * @param listenerFn The function to be called when event emits\n * @param useCapture Whether or not to use capture in event listener\n * @param eventTargetResolver Function that returns global target information in case this listener\n * should be attached to a global object like window, document or body\n *\n * @codeGenApi\n */\n function ɵɵlistener(eventName, listenerFn, useCapture, eventTargetResolver) {\n if (useCapture === void 0) { useCapture = false; }\n var lView = getLView();\n var tView = getTView();\n var tNode = getCurrentTNode();\n listenerInternal(tView, lView, lView[RENDERER], tNode, eventName, listenerFn, useCapture, eventTargetResolver);\n return ɵɵlistener;\n }\n /**\n * Registers a synthetic host listener (e.g. `(@foo.start)`) on a component or directive.\n *\n * This instruction is for compatibility purposes and is designed to ensure that a\n * synthetic host listener (e.g. `@HostListener('@foo.start')`) properly gets rendered\n * in the component's renderer. Normally all host listeners are evaluated with the\n * parent component's renderer, but, in the case of animation @triggers, they need\n * to be evaluated with the sub component's renderer (because that's where the\n * animation triggers are defined).\n *\n * Do not use this instruction as a replacement for `listener`. This instruction\n * only exists to ensure compatibility with the ViewEngine's host binding behavior.\n *\n * @param eventName Name of the event\n * @param listenerFn The function to be called when event emits\n * @param useCapture Whether or not to use capture in event listener\n * @param eventTargetResolver Function that returns global target information in case this listener\n * should be attached to a global object like window, document or body\n *\n * @codeGenApi\n */\n function ɵɵsyntheticHostListener(eventName, listenerFn, useCapture, eventTargetResolver) {\n if (useCapture === void 0) { useCapture = false; }\n var tNode = getCurrentTNode();\n var lView = getLView();\n var tView = getTView();\n var currentDef = getCurrentDirectiveDef(tView.data);\n var renderer = loadComponentRenderer(currentDef, tNode, lView);\n listenerInternal(tView, lView, renderer, tNode, eventName, listenerFn, useCapture, eventTargetResolver);\n return ɵɵsyntheticHostListener;\n }\n /**\n * A utility function that checks if a given element has already an event handler registered for an\n * event with a specified name. The TView.cleanup data structure is used to find out which events\n * are registered for a given element.\n */\n function findExistingListener(tView, lView, eventName, tNodeIdx) {\n var tCleanup = tView.cleanup;\n if (tCleanup != null) {\n for (var i = 0; i < tCleanup.length - 1; i += 2) {\n var cleanupEventName = tCleanup[i];\n if (cleanupEventName === eventName && tCleanup[i + 1] === tNodeIdx) {\n // We have found a matching event name on the same node but it might not have been\n // registered yet, so we must explicitly verify entries in the LView cleanup data\n // structures.\n var lCleanup = lView[CLEANUP];\n var listenerIdxInLCleanup = tCleanup[i + 2];\n return lCleanup.length > listenerIdxInLCleanup ? lCleanup[listenerIdxInLCleanup] : null;\n }\n // TView.cleanup can have a mix of 4-elements entries (for event handler cleanups) or\n // 2-element entries (for directive and queries destroy hooks). As such we can encounter\n // blocks of 4 or 2 items in the tView.cleanup and this is why we iterate over 2 elements\n // first and jump another 2 elements if we detect listeners cleanup (4 elements). Also check\n // documentation of TView.cleanup for more details of this data structure layout.\n if (typeof cleanupEventName === 'string') {\n i += 2;\n }\n }\n }\n return null;\n }\n function listenerInternal(tView, lView, renderer, tNode, eventName, listenerFn, useCapture, eventTargetResolver) {\n if (useCapture === void 0) { useCapture = false; }\n var isTNodeDirectiveHost = isDirectiveHost(tNode);\n var firstCreatePass = tView.firstCreatePass;\n var tCleanup = firstCreatePass && getOrCreateTViewCleanup(tView);\n var context = lView[CONTEXT];\n // When the ɵɵlistener instruction was generated and is executed we know that there is either a\n // native listener or a directive output on this element. As such we we know that we will have to\n // register a listener and store its cleanup function on LView.\n var lCleanup = getOrCreateLViewCleanup(lView);\n ngDevMode && assertTNodeType(tNode, 3 /* AnyRNode */ | 12 /* AnyContainer */);\n var processOutputs = true;\n // add native event listener - applicable to elements only\n if (tNode.type & 3 /* AnyRNode */) {\n var native = getNativeByTNode(tNode, lView);\n var resolved = eventTargetResolver ? eventTargetResolver(native) : EMPTY_OBJ;\n var target = resolved.target || native;\n var lCleanupIndex = lCleanup.length;\n var idxOrTargetGetter = eventTargetResolver ?\n function (_lView) { return eventTargetResolver(unwrapRNode(_lView[tNode.index])).target; } :\n tNode.index;\n // In order to match current behavior, native DOM event listeners must be added for all\n // events (including outputs).\n if (isProceduralRenderer(renderer)) {\n // There might be cases where multiple directives on the same element try to register an event\n // handler function for the same event. In this situation we want to avoid registration of\n // several native listeners as each registration would be intercepted by NgZone and\n // trigger change detection. This would mean that a single user action would result in several\n // change detections being invoked. To avoid this situation we want to have only one call to\n // native handler registration (for the same element and same type of event).\n //\n // In order to have just one native event handler in presence of multiple handler functions,\n // we just register a first handler function as a native event listener and then chain\n // (coalesce) other handler functions on top of the first native handler function.\n var existingListener = null;\n // Please note that the coalescing described here doesn't happen for events specifying an\n // alternative target (ex. (document:click)) - this is to keep backward compatibility with the\n // view engine.\n // Also, we don't have to search for existing listeners is there are no directives\n // matching on a given node as we can't register multiple event handlers for the same event in\n // a template (this would mean having duplicate attributes).\n if (!eventTargetResolver && isTNodeDirectiveHost) {\n existingListener = findExistingListener(tView, lView, eventName, tNode.index);\n }\n if (existingListener !== null) {\n // Attach a new listener to coalesced listeners list, maintaining the order in which\n // listeners are registered. For performance reasons, we keep a reference to the last\n // listener in that list (in `__ngLastListenerFn__` field), so we can avoid going through\n // the entire set each time we need to add a new listener.\n var lastListenerFn = existingListener.__ngLastListenerFn__ || existingListener;\n lastListenerFn.__ngNextListenerFn__ = listenerFn;\n existingListener.__ngLastListenerFn__ = listenerFn;\n processOutputs = false;\n }\n else {\n // The first argument of `listen` function in Procedural Renderer is:\n // - either a target name (as a string) in case of global target (window, document, body)\n // - or element reference (in all other cases)\n listenerFn = wrapListener(tNode, lView, context, listenerFn, false /** preventDefault */);\n var cleanupFn = renderer.listen(resolved.name || target, eventName, listenerFn);\n ngDevMode && ngDevMode.rendererAddEventListener++;\n lCleanup.push(listenerFn, cleanupFn);\n tCleanup && tCleanup.push(eventName, idxOrTargetGetter, lCleanupIndex, lCleanupIndex + 1);\n }\n }\n else {\n listenerFn = wrapListener(tNode, lView, context, listenerFn, true /** preventDefault */);\n target.addEventListener(eventName, listenerFn, useCapture);\n ngDevMode && ngDevMode.rendererAddEventListener++;\n lCleanup.push(listenerFn);\n tCleanup && tCleanup.push(eventName, idxOrTargetGetter, lCleanupIndex, useCapture);\n }\n }\n else {\n // Even if there is no native listener to add, we still need to wrap the listener so that OnPush\n // ancestors are marked dirty when an event occurs.\n listenerFn = wrapListener(tNode, lView, context, listenerFn, false /** preventDefault */);\n }\n // subscribe to directive outputs\n var outputs = tNode.outputs;\n var props;\n if (processOutputs && outputs !== null && (props = outputs[eventName])) {\n var propsLength = props.length;\n if (propsLength) {\n for (var i = 0; i < propsLength; i += 2) {\n var index = props[i];\n ngDevMode && assertIndexInRange(lView, index);\n var minifiedName = props[i + 1];\n var directiveInstance = lView[index];\n var output = directiveInstance[minifiedName];\n if (ngDevMode && !isObservable(output)) {\n throw new Error(\"@Output \" + minifiedName + \" not initialized in '\" + directiveInstance.constructor.name + \"'.\");\n }\n var subscription = output.subscribe(listenerFn);\n var idx = lCleanup.length;\n lCleanup.push(listenerFn, subscription);\n tCleanup && tCleanup.push(eventName, tNode.index, idx, -(idx + 1));\n }\n }\n }\n }\n function executeListenerWithErrorHandling(lView, context, listenerFn, e) {\n try {\n profiler(6 /* OutputStart */, context, listenerFn);\n // Only explicitly returning false from a listener should preventDefault\n return listenerFn(e) !== false;\n }\n catch (error) {\n handleError(lView, error);\n return false;\n }\n finally {\n profiler(7 /* OutputEnd */, context, listenerFn);\n }\n }\n /**\n * Wraps an event listener with a function that marks ancestors dirty and prevents default behavior,\n * if applicable.\n *\n * @param tNode The TNode associated with this listener\n * @param lView The LView that contains this listener\n * @param listenerFn The listener function to call\n * @param wrapWithPreventDefault Whether or not to prevent default behavior\n * (the procedural renderer does this already, so in those cases, we should skip)\n */\n function wrapListener(tNode, lView, context, listenerFn, wrapWithPreventDefault) {\n // Note: we are performing most of the work in the listener function itself\n // to optimize listener registration.\n return function wrapListenerIn_markDirtyAndPreventDefault(e) {\n // Ivy uses `Function` as a special token that allows us to unwrap the function\n // so that it can be invoked programmatically by `DebugNode.triggerEventHandler`.\n if (e === Function) {\n return listenerFn;\n }\n // In order to be backwards compatible with View Engine, events on component host nodes\n // must also mark the component view itself dirty (i.e. the view that it owns).\n var startView = tNode.flags & 2 /* isComponentHost */ ?\n getComponentLViewByIndex(tNode.index, lView) :\n lView;\n // See interfaces/view.ts for more on LViewFlags.ManualOnPush\n if ((lView[FLAGS] & 32 /* ManualOnPush */) === 0) {\n markViewDirty(startView);\n }\n var result = executeListenerWithErrorHandling(lView, context, listenerFn, e);\n // A just-invoked listener function might have coalesced listeners so we need to check for\n // their presence and invoke as needed.\n var nextListenerFn = wrapListenerIn_markDirtyAndPreventDefault.__ngNextListenerFn__;\n while (nextListenerFn) {\n // We should prevent default if any of the listeners explicitly return false\n result = executeListenerWithErrorHandling(lView, context, nextListenerFn, e) && result;\n nextListenerFn = nextListenerFn.__ngNextListenerFn__;\n }\n if (wrapWithPreventDefault && result === false) {\n e.preventDefault();\n // Necessary for legacy browsers that don't support preventDefault (e.g. IE)\n e.returnValue = false;\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\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 * Retrieves a context at the level specified and saves it as the global, contextViewData.\n * Will get the next level up if level is not specified.\n *\n * This is used to save contexts of parent views so they can be bound in embedded views, or\n * in conjunction with reference() to bind a ref from a parent view.\n *\n * @param level The relative level of the view from which to grab context compared to contextVewData\n * @returns context\n *\n * @codeGenApi\n */\n function ɵɵnextContext(level) {\n if (level === void 0) { level = 1; }\n return nextContextImpl(level);\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 a given node against matching projection slots and returns the\n * determined slot index. Returns \"null\" if no slot matched the given node.\n *\n * This function takes into account the parsed ngProjectAs selector from the\n * node's attributes. If present, it will check whether the ngProjectAs selector\n * matches any of the projection slot selectors.\n */\n function matchingProjectionSlotIndex(tNode, projectionSlots) {\n var wildcardNgContentIndex = null;\n var ngProjectAsAttrVal = getProjectAsAttrValue(tNode);\n for (var i = 0; i < projectionSlots.length; i++) {\n var slotValue = projectionSlots[i];\n // The last wildcard projection slot should match all nodes which aren't matching\n // any selector. This is necessary to be backwards compatible with view engine.\n if (slotValue === '*') {\n wildcardNgContentIndex = i;\n continue;\n }\n // If we ran into an `ngProjectAs` attribute, we should match its parsed selector\n // to the list of selectors, otherwise we fall back to matching against the node.\n if (ngProjectAsAttrVal === null ?\n isNodeMatchingSelectorList(tNode, slotValue, /* isProjectionMode */ true) :\n isSelectorInSelectorList(ngProjectAsAttrVal, slotValue)) {\n return i; // first matching selector \"captures\" a given node\n }\n }\n return wildcardNgContentIndex;\n }\n /**\n * Instruction to distribute projectable nodes among <ng-content> occurrences in a given template.\n * It takes all the selectors from the entire component's template and decides where\n * each projected node belongs (it re-distributes nodes among \"buckets\" where each \"bucket\" is\n * backed by a selector).\n *\n * This function requires CSS selectors to be provided in 2 forms: parsed (by a compiler) and text,\n * un-parsed form.\n *\n * The parsed form is needed for efficient matching of a node against a given CSS selector.\n * The un-parsed, textual form is needed for support of the ngProjectAs attribute.\n *\n * Having a CSS selector in 2 different formats is not ideal, but alternatives have even more\n * drawbacks:\n * - having only a textual form would require runtime parsing of CSS selectors;\n * - we can't have only a parsed as we can't re-construct textual form from it (as entered by a\n * template author).\n *\n * @param projectionSlots? A collection of projection slots. A projection slot can be based\n * on a parsed CSS selectors or set to the wildcard selector (\"*\") in order to match\n * all nodes which do not match any selector. If not specified, a single wildcard\n * selector projection slot will be defined.\n *\n * @codeGenApi\n */\n function ɵɵprojectionDef(projectionSlots) {\n var componentNode = getLView()[DECLARATION_COMPONENT_VIEW][T_HOST];\n if (!componentNode.projection) {\n // If no explicit projection slots are defined, fall back to a single\n // projection slot with the wildcard selector.\n var numProjectionSlots = projectionSlots ? projectionSlots.length : 1;\n var projectionHeads = componentNode.projection =\n newArray(numProjectionSlots, null);\n var tails = projectionHeads.slice();\n var componentChild = componentNode.child;\n while (componentChild !== null) {\n var slotIndex = projectionSlots ? matchingProjectionSlotIndex(componentChild, projectionSlots) : 0;\n if (slotIndex !== null) {\n if (tails[slotIndex]) {\n tails[slotIndex].projectionNext = componentChild;\n }\n else {\n projectionHeads[slotIndex] = componentChild;\n }\n tails[slotIndex] = componentChild;\n }\n componentChild = componentChild.next;\n }\n }\n }\n /**\n * Inserts previously re-distributed projected nodes. This instruction must be preceded by a call\n * to the projectionDef instruction.\n *\n * @param nodeIndex\n * @param selectorIndex:\n * - 0 when the selector is `*` (or unspecified as this is the default value),\n * - 1 based index of the selector from the {@link projectionDef}\n *\n * @codeGenApi\n */\n function ɵɵprojection(nodeIndex, selectorIndex, attrs) {\n if (selectorIndex === void 0) { selectorIndex = 0; }\n var lView = getLView();\n var tView = getTView();\n var tProjectionNode = getOrCreateTNode(tView, HEADER_OFFSET + nodeIndex, 16 /* Projection */, null, attrs || null);\n // We can't use viewData[HOST_NODE] because projection nodes can be nested in embedded views.\n if (tProjectionNode.projection === null)\n tProjectionNode.projection = selectorIndex;\n // `<ng-content>` has no content\n setCurrentTNodeAsNotParent();\n if ((tProjectionNode.flags & 64 /* isDetached */) !== 64 /* isDetached */) {\n // re-distribution of projectable nodes is stored on a component's view level\n applyProjection(tView, lView, tProjectionNode);\n }\n }\n\n /**\n *\n * Update an interpolated property on an element with a lone bound value\n *\n * Used when the value passed to a property has 1 interpolated value in it, an no additional text\n * surrounds that interpolated value:\n *\n * ```html\n * <div title=\"{{v0}}\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate('title', v0);\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\n function ɵɵpropertyInterpolate(propName, v0, sanitizer) {\n ɵɵpropertyInterpolate1(propName, '', v0, '', sanitizer);\n return ɵɵpropertyInterpolate;\n }\n /**\n *\n * Update an interpolated property on an element with single bound value surrounded by text.\n *\n * Used when the value passed to a property has 1 interpolated value in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate1('title', 'prefix', v0, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\n function ɵɵpropertyInterpolate1(propName, prefix, v0, suffix, sanitizer) {\n var lView = getLView();\n var interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n var tView = getTView();\n var tNode = getSelectedTNode();\n elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n ngDevMode &&\n storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 1, prefix, suffix);\n }\n return ɵɵpropertyInterpolate1;\n }\n /**\n *\n * Update an interpolated property on an element with 2 bound values surrounded by text.\n *\n * Used when the value passed to a property has 2 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate2('title', 'prefix', v0, '-', v1, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\n function ɵɵpropertyInterpolate2(propName, prefix, v0, i0, v1, suffix, sanitizer) {\n var lView = getLView();\n var interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n var tView = getTView();\n var tNode = getSelectedTNode();\n elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n ngDevMode &&\n storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 2, prefix, i0, suffix);\n }\n return ɵɵpropertyInterpolate2;\n }\n /**\n *\n * Update an interpolated property on an element with 3 bound values surrounded by text.\n *\n * Used when the value passed to a property has 3 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate3(\n * 'title', 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\n function ɵɵpropertyInterpolate3(propName, prefix, v0, i0, v1, i1, v2, suffix, sanitizer) {\n var lView = getLView();\n var interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n var tView = getTView();\n var tNode = getSelectedTNode();\n elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n ngDevMode &&\n storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 3, prefix, i0, i1, suffix);\n }\n return ɵɵpropertyInterpolate3;\n }\n /**\n *\n * Update an interpolated property on an element with 4 bound values surrounded by text.\n *\n * Used when the value passed to a property has 4 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate4(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\n function ɵɵpropertyInterpolate4(propName, prefix, v0, i0, v1, i1, v2, i2, v3, suffix, sanitizer) {\n var lView = getLView();\n var interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n var tView = getTView();\n var tNode = getSelectedTNode();\n elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n ngDevMode &&\n storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 4, prefix, i0, i1, i2, suffix);\n }\n return ɵɵpropertyInterpolate4;\n }\n /**\n *\n * Update an interpolated property on an element with 5 bound values surrounded by text.\n *\n * Used when the value passed to a property has 5 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate5(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\n function ɵɵpropertyInterpolate5(propName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix, sanitizer) {\n var lView = getLView();\n var interpolatedValue = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n var tView = getTView();\n var tNode = getSelectedTNode();\n elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n ngDevMode &&\n storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 5, prefix, i0, i1, i2, i3, suffix);\n }\n return ɵɵpropertyInterpolate5;\n }\n /**\n *\n * Update an interpolated property on an element with 6 bound values surrounded by text.\n *\n * Used when the value passed to a property has 6 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate6(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\n function ɵɵpropertyInterpolate6(propName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix, sanitizer) {\n var lView = getLView();\n var interpolatedValue = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n var tView = getTView();\n var tNode = getSelectedTNode();\n elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n ngDevMode &&\n storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 6, prefix, i0, i1, i2, i3, i4, suffix);\n }\n return ɵɵpropertyInterpolate6;\n }\n /**\n *\n * Update an interpolated property on an element with 7 bound values surrounded by text.\n *\n * Used when the value passed to a property has 7 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate7(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\n function ɵɵpropertyInterpolate7(propName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix, sanitizer) {\n var lView = getLView();\n var interpolatedValue = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n var tView = getTView();\n var tNode = getSelectedTNode();\n elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n ngDevMode &&\n storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 7, prefix, i0, i1, i2, i3, i4, i5, suffix);\n }\n return ɵɵpropertyInterpolate7;\n }\n /**\n *\n * Update an interpolated property on an element with 8 bound values surrounded by text.\n *\n * Used when the value passed to a property has 8 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate8(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param i6 Static value used for concatenation only.\n * @param v7 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\n function ɵɵpropertyInterpolate8(propName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix, sanitizer) {\n var lView = getLView();\n var interpolatedValue = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n var tView = getTView();\n var tNode = getSelectedTNode();\n elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n ngDevMode &&\n storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 8, prefix, i0, i1, i2, i3, i4, i5, i6, suffix);\n }\n return ɵɵpropertyInterpolate8;\n }\n /**\n * Update an interpolated property on an element with 9 or more bound values surrounded by text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div\n * title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolateV(\n * 'title', ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n * 'suffix']);\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update.\n * @param values The collection of values and the strings inbetween those values, beginning with a\n * string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\n function ɵɵpropertyInterpolateV(propName, values, sanitizer) {\n var lView = getLView();\n var interpolatedValue = interpolationV(lView, values);\n if (interpolatedValue !== NO_CHANGE) {\n var tView = getTView();\n var tNode = getSelectedTNode();\n elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n if (ngDevMode) {\n var interpolationInBetween = [values[0]]; // prefix\n for (var i = 2; i < values.length; i += 2) {\n interpolationInBetween.push(values[i]);\n }\n storePropertyBindingMetadata.apply(void 0, __spread([tView.data, tNode, propName, getBindingIndex() - interpolationInBetween.length + 1], interpolationInBetween));\n }\n }\n return ɵɵpropertyInterpolateV;\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 * NOTE: The word `styling` is used interchangeably as style or class styling.\n *\n * This file contains code to link styling instructions together so that they can be replayed in\n * priority order. The file exists because Ivy styling instruction execution order does not match\n * that of the priority order. The purpose of this code is to create a linked list so that the\n * instructions can be traversed in priority order when computing the styles.\n *\n * Assume we are dealing with the following code:\n * ```\n * @Component({\n * template: `\n * <my-cmp [style]=\" {color: '#001'} \"\n * [style.color]=\" #002 \"\n * dir-style-color-1\n * dir-style-color-2> `\n * })\n * class ExampleComponent {\n * static ngComp = ... {\n * ...\n * // Compiler ensures that `ɵɵstyleProp` is after `ɵɵstyleMap`\n * ɵɵstyleMap({color: '#001'});\n * ɵɵstyleProp('color', '#002');\n * ...\n * }\n * }\n *\n * @Directive({\n * selector: `[dir-style-color-1]',\n * })\n * class Style1Directive {\n * @HostBinding('style') style = {color: '#005'};\n * @HostBinding('style.color') color = '#006';\n *\n * static ngDir = ... {\n * ...\n * // Compiler ensures that `ɵɵstyleProp` is after `ɵɵstyleMap`\n * ɵɵstyleMap({color: '#005'});\n * ɵɵstyleProp('color', '#006');\n * ...\n * }\n * }\n *\n * @Directive({\n * selector: `[dir-style-color-2]',\n * })\n * class Style2Directive {\n * @HostBinding('style') style = {color: '#007'};\n * @HostBinding('style.color') color = '#008';\n *\n * static ngDir = ... {\n * ...\n * // Compiler ensures that `ɵɵstyleProp` is after `ɵɵstyleMap`\n * ɵɵstyleMap({color: '#007'});\n * ɵɵstyleProp('color', '#008');\n * ...\n * }\n * }\n *\n * @Directive({\n * selector: `my-cmp',\n * })\n * class MyComponent {\n * @HostBinding('style') style = {color: '#003'};\n * @HostBinding('style.color') color = '#004';\n *\n * static ngComp = ... {\n * ...\n * // Compiler ensures that `ɵɵstyleProp` is after `ɵɵstyleMap`\n * ɵɵstyleMap({color: '#003'});\n * ɵɵstyleProp('color', '#004');\n * ...\n * }\n * }\n * ```\n *\n * The Order of instruction execution is:\n *\n * NOTE: the comment binding location is for illustrative purposes only.\n *\n * ```\n * // Template: (ExampleComponent)\n * ɵɵstyleMap({color: '#001'}); // Binding index: 10\n * ɵɵstyleProp('color', '#002'); // Binding index: 12\n * // MyComponent\n * ɵɵstyleMap({color: '#003'}); // Binding index: 20\n * ɵɵstyleProp('color', '#004'); // Binding index: 22\n * // Style1Directive\n * ɵɵstyleMap({color: '#005'}); // Binding index: 24\n * ɵɵstyleProp('color', '#006'); // Binding index: 26\n * // Style2Directive\n * ɵɵstyleMap({color: '#007'}); // Binding index: 28\n * ɵɵstyleProp('color', '#008'); // Binding index: 30\n * ```\n *\n * The correct priority order of concatenation is:\n *\n * ```\n * // MyComponent\n * ɵɵstyleMap({color: '#003'}); // Binding index: 20\n * ɵɵstyleProp('color', '#004'); // Binding index: 22\n * // Style1Directive\n * ɵɵstyleMap({color: '#005'}); // Binding index: 24\n * ɵɵstyleProp('color', '#006'); // Binding index: 26\n * // Style2Directive\n * ɵɵstyleMap({color: '#007'}); // Binding index: 28\n * ɵɵstyleProp('color', '#008'); // Binding index: 30\n * // Template: (ExampleComponent)\n * ɵɵstyleMap({color: '#001'}); // Binding index: 10\n * ɵɵstyleProp('color', '#002'); // Binding index: 12\n * ```\n *\n * What color should be rendered?\n *\n * Once the items are correctly sorted in the list, the answer is simply the last item in the\n * concatenation list which is `#002`.\n *\n * To do so we keep a linked list of all of the bindings which pertain to this element.\n * Notice that the bindings are inserted in the order of execution, but the `TView.data` allows\n * us to traverse them in the order of priority.\n *\n * |Idx|`TView.data`|`LView` | Notes\n * |---|------------|-----------------|--------------\n * |...| | |\n * |10 |`null` |`{color: '#001'}`| `ɵɵstyleMap('color', {color: '#001'})`\n * |11 |`30 | 12` | ... |\n * |12 |`color` |`'#002'` | `ɵɵstyleProp('color', '#002')`\n * |13 |`10 | 0` | ... |\n * |...| | |\n * |20 |`null` |`{color: '#003'}`| `ɵɵstyleMap('color', {color: '#003'})`\n * |21 |`0 | 22` | ... |\n * |22 |`color` |`'#004'` | `ɵɵstyleProp('color', '#004')`\n * |23 |`20 | 24` | ... |\n * |24 |`null` |`{color: '#005'}`| `ɵɵstyleMap('color', {color: '#005'})`\n * |25 |`22 | 26` | ... |\n * |26 |`color` |`'#006'` | `ɵɵstyleProp('color', '#006')`\n * |27 |`24 | 28` | ... |\n * |28 |`null` |`{color: '#007'}`| `ɵɵstyleMap('color', {color: '#007'})`\n * |29 |`26 | 30` | ... |\n * |30 |`color` |`'#008'` | `ɵɵstyleProp('color', '#008')`\n * |31 |`28 | 10` | ... |\n *\n * The above data structure allows us to re-concatenate the styling no matter which data binding\n * changes.\n *\n * NOTE: in addition to keeping track of next/previous index the `TView.data` also stores prev/next\n * duplicate bit. The duplicate bit if true says there either is a binding with the same name or\n * there is a map (which may contain the name). This information is useful in knowing if other\n * styles with higher priority need to be searched for overwrites.\n *\n * NOTE: See `should support example in 'tnode_linked_list.ts' documentation` in\n * `tnode_linked_list_spec.ts` for working example.\n */\n var __unused_const_as_closure_does_not_like_standalone_comment_blocks__;\n /**\n * Insert new `tStyleValue` at `TData` and link existing style bindings such that we maintain linked\n * list of styles and compute the duplicate flag.\n *\n * Note: this function is executed during `firstUpdatePass` only to populate the `TView.data`.\n *\n * The function works by keeping track of `tStylingRange` which contains two pointers pointing to\n * the head/tail of the template portion of the styles.\n * - if `isHost === false` (we are template) then insertion is at tail of `TStylingRange`\n * - if `isHost === true` (we are host binding) then insertion is at head of `TStylingRange`\n *\n * @param tData The `TData` to insert into.\n * @param tNode `TNode` associated with the styling element.\n * @param tStylingKey See `TStylingKey`.\n * @param index location of where `tStyleValue` should be stored (and linked into list.)\n * @param isHostBinding `true` if the insertion is for a `hostBinding`. (insertion is in front of\n * template.)\n * @param isClassBinding True if the associated `tStylingKey` as a `class` styling.\n * `tNode.classBindings` should be used (or `tNode.styleBindings` otherwise.)\n */\n function insertTStylingBinding(tData, tNode, tStylingKeyWithStatic, index, isHostBinding, isClassBinding) {\n ngDevMode && assertFirstUpdatePass(getTView());\n var tBindings = isClassBinding ? tNode.classBindings : tNode.styleBindings;\n var tmplHead = getTStylingRangePrev(tBindings);\n var tmplTail = getTStylingRangeNext(tBindings);\n tData[index] = tStylingKeyWithStatic;\n var isKeyDuplicateOfStatic = false;\n var tStylingKey;\n if (Array.isArray(tStylingKeyWithStatic)) {\n // We are case when the `TStylingKey` contains static fields as well.\n var staticKeyValueArray = tStylingKeyWithStatic;\n tStylingKey = staticKeyValueArray[1]; // unwrap.\n // We need to check if our key is present in the static so that we can mark it as duplicate.\n if (tStylingKey === null ||\n keyValueArrayIndexOf(staticKeyValueArray, tStylingKey) > 0) {\n // tStylingKey is present in the statics, need to mark it as duplicate.\n isKeyDuplicateOfStatic = true;\n }\n }\n else {\n tStylingKey = tStylingKeyWithStatic;\n }\n if (isHostBinding) {\n // We are inserting host bindings\n // If we don't have template bindings then `tail` is 0.\n var hasTemplateBindings = tmplTail !== 0;\n // This is important to know because that means that the `head` can't point to the first\n // template bindings (there are none.) Instead the head points to the tail of the template.\n if (hasTemplateBindings) {\n // template head's \"prev\" will point to last host binding or to 0 if no host bindings yet\n var previousNode = getTStylingRangePrev(tData[tmplHead + 1]);\n tData[index + 1] = toTStylingRange(previousNode, tmplHead);\n // if a host binding has already been registered, we need to update the next of that host\n // binding to point to this one\n if (previousNode !== 0) {\n // We need to update the template-tail value to point to us.\n tData[previousNode + 1] =\n setTStylingRangeNext(tData[previousNode + 1], index);\n }\n // The \"previous\" of the template binding head should point to this host binding\n tData[tmplHead + 1] = setTStylingRangePrev(tData[tmplHead + 1], index);\n }\n else {\n tData[index + 1] = toTStylingRange(tmplHead, 0);\n // if a host binding has already been registered, we need to update the next of that host\n // binding to point to this one\n if (tmplHead !== 0) {\n // We need to update the template-tail value to point to us.\n tData[tmplHead + 1] = setTStylingRangeNext(tData[tmplHead + 1], index);\n }\n // if we don't have template, the head points to template-tail, and needs to be advanced.\n tmplHead = index;\n }\n }\n else {\n // We are inserting in template section.\n // We need to set this binding's \"previous\" to the current template tail\n tData[index + 1] = toTStylingRange(tmplTail, 0);\n ngDevMode &&\n assertEqual(tmplHead !== 0 && tmplTail === 0, false, 'Adding template bindings after hostBindings is not allowed.');\n if (tmplHead === 0) {\n tmplHead = index;\n }\n else {\n // We need to update the previous value \"next\" to point to this binding\n tData[tmplTail + 1] = setTStylingRangeNext(tData[tmplTail + 1], index);\n }\n tmplTail = index;\n }\n // Now we need to update / compute the duplicates.\n // Starting with our location search towards head (least priority)\n if (isKeyDuplicateOfStatic) {\n tData[index + 1] = setTStylingRangePrevDuplicate(tData[index + 1]);\n }\n markDuplicates(tData, tStylingKey, index, true, isClassBinding);\n markDuplicates(tData, tStylingKey, index, false, isClassBinding);\n markDuplicateOfResidualStyling(tNode, tStylingKey, tData, index, isClassBinding);\n tBindings = toTStylingRange(tmplHead, tmplTail);\n if (isClassBinding) {\n tNode.classBindings = tBindings;\n }\n else {\n tNode.styleBindings = tBindings;\n }\n }\n /**\n * Look into the residual styling to see if the current `tStylingKey` is duplicate of residual.\n *\n * @param tNode `TNode` where the residual is stored.\n * @param tStylingKey `TStylingKey` to store.\n * @param tData `TData` associated with the current `LView`.\n * @param index location of where `tStyleValue` should be stored (and linked into list.)\n * @param isClassBinding True if the associated `tStylingKey` as a `class` styling.\n * `tNode.classBindings` should be used (or `tNode.styleBindings` otherwise.)\n */\n function markDuplicateOfResidualStyling(tNode, tStylingKey, tData, index, isClassBinding) {\n var residual = isClassBinding ? tNode.residualClasses : tNode.residualStyles;\n if (residual != null /* or undefined */ && typeof tStylingKey == 'string' &&\n keyValueArrayIndexOf(residual, tStylingKey) >= 0) {\n // We have duplicate in the residual so mark ourselves as duplicate.\n tData[index + 1] = setTStylingRangeNextDuplicate(tData[index + 1]);\n }\n }\n /**\n * Marks `TStyleValue`s as duplicates if another style binding in the list has the same\n * `TStyleValue`.\n *\n * NOTE: this function is intended to be called twice once with `isPrevDir` set to `true` and once\n * with it set to `false` to search both the previous as well as next items in the list.\n *\n * No duplicate case\n * ```\n * [style.color]\n * [style.width.px] <<- index\n * [style.height.px]\n * ```\n *\n * In the above case adding `[style.width.px]` to the existing `[style.color]` produces no\n * duplicates because `width` is not found in any other part of the linked list.\n *\n * Duplicate case\n * ```\n * [style.color]\n * [style.width.em]\n * [style.width.px] <<- index\n * ```\n * In the above case adding `[style.width.px]` will produce a duplicate with `[style.width.em]`\n * because `width` is found in the chain.\n *\n * Map case 1\n * ```\n * [style.width.px]\n * [style.color]\n * [style] <<- index\n * ```\n * In the above case adding `[style]` will produce a duplicate with any other bindings because\n * `[style]` is a Map and as such is fully dynamic and could produce `color` or `width`.\n *\n * Map case 2\n * ```\n * [style]\n * [style.width.px]\n * [style.color] <<- index\n * ```\n * In the above case adding `[style.color]` will produce a duplicate because there is already a\n * `[style]` binding which is a Map and as such is fully dynamic and could produce `color` or\n * `width`.\n *\n * NOTE: Once `[style]` (Map) is added into the system all things are mapped as duplicates.\n * NOTE: We use `style` as example, but same logic is applied to `class`es as well.\n *\n * @param tData `TData` where the linked list is stored.\n * @param tStylingKey `TStylingKeyPrimitive` which contains the value to compare to other keys in\n * the linked list.\n * @param index Starting location in the linked list to search from\n * @param isPrevDir Direction.\n * - `true` for previous (lower priority);\n * - `false` for next (higher priority).\n */\n function markDuplicates(tData, tStylingKey, index, isPrevDir, isClassBinding) {\n var tStylingAtIndex = tData[index + 1];\n var isMap = tStylingKey === null;\n var cursor = isPrevDir ? getTStylingRangePrev(tStylingAtIndex) : getTStylingRangeNext(tStylingAtIndex);\n var foundDuplicate = false;\n // We keep iterating as long as we have a cursor\n // AND either:\n // - we found what we are looking for, OR\n // - we are a map in which case we have to continue searching even after we find what we were\n // looking for since we are a wild card and everything needs to be flipped to duplicate.\n while (cursor !== 0 && (foundDuplicate === false || isMap)) {\n ngDevMode && assertIndexInRange(tData, cursor);\n var tStylingValueAtCursor = tData[cursor];\n var tStyleRangeAtCursor = tData[cursor + 1];\n if (isStylingMatch(tStylingValueAtCursor, tStylingKey)) {\n foundDuplicate = true;\n tData[cursor + 1] = isPrevDir ? setTStylingRangeNextDuplicate(tStyleRangeAtCursor) :\n setTStylingRangePrevDuplicate(tStyleRangeAtCursor);\n }\n cursor = isPrevDir ? getTStylingRangePrev(tStyleRangeAtCursor) :\n getTStylingRangeNext(tStyleRangeAtCursor);\n }\n if (foundDuplicate) {\n // if we found a duplicate, than mark ourselves.\n tData[index + 1] = isPrevDir ? setTStylingRangePrevDuplicate(tStylingAtIndex) :\n setTStylingRangeNextDuplicate(tStylingAtIndex);\n }\n }\n /**\n * Determines if two `TStylingKey`s are a match.\n *\n * When computing whether a binding contains a duplicate, we need to compare if the instruction\n * `TStylingKey` has a match.\n *\n * Here are examples of `TStylingKey`s which match given `tStylingKeyCursor` is:\n * - `color`\n * - `color` // Match another color\n * - `null` // That means that `tStylingKey` is a `classMap`/`styleMap` instruction\n * - `['', 'color', 'other', true]` // wrapped `color` so match\n * - `['', null, 'other', true]` // wrapped `null` so match\n * - `['', 'width', 'color', 'value']` // wrapped static value contains a match on `'color'`\n * - `null` // `tStylingKeyCursor` always match as it is `classMap`/`styleMap` instruction\n *\n * @param tStylingKeyCursor\n * @param tStylingKey\n */\n function isStylingMatch(tStylingKeyCursor, tStylingKey) {\n ngDevMode &&\n assertNotEqual(Array.isArray(tStylingKey), true, 'Expected that \\'tStylingKey\\' has been unwrapped');\n if (tStylingKeyCursor === null || // If the cursor is `null` it means that we have map at that\n // location so we must assume that we have a match.\n tStylingKey == null || // If `tStylingKey` is `null` then it is a map therefor assume that it\n // contains a match.\n (Array.isArray(tStylingKeyCursor) ? tStylingKeyCursor[1] : tStylingKeyCursor) ===\n tStylingKey // If the keys match explicitly than we are a match.\n ) {\n return true;\n }\n else if (Array.isArray(tStylingKeyCursor) && typeof tStylingKey === 'string') {\n // if we did not find a match, but `tStylingKeyCursor` is `KeyValueArray` that means cursor has\n // statics and we need to check those as well.\n return keyValueArrayIndexOf(tStylingKeyCursor, tStylingKey) >=\n 0; // see if we are matching the key\n }\n return false;\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 // Global state of the parser. (This makes parser non-reentrant, but that is not an issue)\n var parserState = {\n textEnd: 0,\n key: 0,\n keyEnd: 0,\n value: 0,\n valueEnd: 0,\n };\n /**\n * Retrieves the last parsed `key` of style.\n * @param text the text to substring the key from.\n */\n function getLastParsedKey(text) {\n return text.substring(parserState.key, parserState.keyEnd);\n }\n /**\n * Retrieves the last parsed `value` of style.\n * @param text the text to substring the key from.\n */\n function getLastParsedValue(text) {\n return text.substring(parserState.value, parserState.valueEnd);\n }\n /**\n * Initializes `className` string for parsing and parses the first token.\n *\n * This function is intended to be used in this format:\n * ```\n * for (let i = parseClassName(text); i >= 0; i = parseClassNameNext(text, i)) {\n * const key = getLastParsedKey();\n * ...\n * }\n * ```\n * @param text `className` to parse\n * @returns index where the next invocation of `parseClassNameNext` should resume.\n */\n function parseClassName(text) {\n resetParserState(text);\n return parseClassNameNext(text, consumeWhitespace(text, 0, parserState.textEnd));\n }\n /**\n * Parses next `className` token.\n *\n * This function is intended to be used in this format:\n * ```\n * for (let i = parseClassName(text); i >= 0; i = parseClassNameNext(text, i)) {\n * const key = getLastParsedKey();\n * ...\n * }\n * ```\n *\n * @param text `className` to parse\n * @param index where the parsing should resume.\n * @returns index where the next invocation of `parseClassNameNext` should resume.\n */\n function parseClassNameNext(text, index) {\n var end = parserState.textEnd;\n if (end === index) {\n return -1;\n }\n index = parserState.keyEnd = consumeClassToken(text, parserState.key = index, end);\n return consumeWhitespace(text, index, end);\n }\n /**\n * Initializes `cssText` string for parsing and parses the first key/values.\n *\n * This function is intended to be used in this format:\n * ```\n * for (let i = parseStyle(text); i >= 0; i = parseStyleNext(text, i))) {\n * const key = getLastParsedKey();\n * const value = getLastParsedValue();\n * ...\n * }\n * ```\n * @param text `cssText` to parse\n * @returns index where the next invocation of `parseStyleNext` should resume.\n */\n function parseStyle(text) {\n resetParserState(text);\n return parseStyleNext(text, consumeWhitespace(text, 0, parserState.textEnd));\n }\n /**\n * Parses the next `cssText` key/values.\n *\n * This function is intended to be used in this format:\n * ```\n * for (let i = parseStyle(text); i >= 0; i = parseStyleNext(text, i))) {\n * const key = getLastParsedKey();\n * const value = getLastParsedValue();\n * ...\n * }\n *\n * @param text `cssText` to parse\n * @param index where the parsing should resume.\n * @returns index where the next invocation of `parseStyleNext` should resume.\n */\n function parseStyleNext(text, startIndex) {\n var end = parserState.textEnd;\n var index = parserState.key = consumeWhitespace(text, startIndex, end);\n if (end === index) {\n // we reached an end so just quit\n return -1;\n }\n index = parserState.keyEnd = consumeStyleKey(text, index, end);\n index = consumeSeparator(text, index, end, 58 /* COLON */);\n index = parserState.value = consumeWhitespace(text, index, end);\n index = parserState.valueEnd = consumeStyleValue(text, index, end);\n return consumeSeparator(text, index, end, 59 /* SEMI_COLON */);\n }\n /**\n * Reset the global state of the styling parser.\n * @param text The styling text to parse.\n */\n function resetParserState(text) {\n parserState.key = 0;\n parserState.keyEnd = 0;\n parserState.value = 0;\n parserState.valueEnd = 0;\n parserState.textEnd = text.length;\n }\n /**\n * Returns index of next non-whitespace character.\n *\n * @param text Text to scan\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index of next non-whitespace character (May be the same as `start` if no whitespace at\n * that location.)\n */\n function consumeWhitespace(text, startIndex, endIndex) {\n while (startIndex < endIndex && text.charCodeAt(startIndex) <= 32 /* SPACE */) {\n startIndex++;\n }\n return startIndex;\n }\n /**\n * Returns index of last char in class token.\n *\n * @param text Text to scan\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index after last char in class token.\n */\n function consumeClassToken(text, startIndex, endIndex) {\n while (startIndex < endIndex && text.charCodeAt(startIndex) > 32 /* SPACE */) {\n startIndex++;\n }\n return startIndex;\n }\n /**\n * Consumes all of the characters belonging to style key and token.\n *\n * @param text Text to scan\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index after last style key character.\n */\n function consumeStyleKey(text, startIndex, endIndex) {\n var ch;\n while (startIndex < endIndex &&\n ((ch = text.charCodeAt(startIndex)) === 45 /* DASH */ || ch === 95 /* UNDERSCORE */ ||\n ((ch & -33 /* UPPER_CASE */) >= 65 /* A */ && (ch & -33 /* UPPER_CASE */) <= 90 /* Z */) ||\n (ch >= 48 /* ZERO */ && ch <= 57 /* NINE */))) {\n startIndex++;\n }\n return startIndex;\n }\n /**\n * Consumes all whitespace and the separator `:` after the style key.\n *\n * @param text Text to scan\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index after separator and surrounding whitespace.\n */\n function consumeSeparator(text, startIndex, endIndex, separator) {\n startIndex = consumeWhitespace(text, startIndex, endIndex);\n if (startIndex < endIndex) {\n if (ngDevMode && text.charCodeAt(startIndex) !== separator) {\n malformedStyleError(text, String.fromCharCode(separator), startIndex);\n }\n startIndex++;\n }\n return startIndex;\n }\n /**\n * Consumes style value honoring `url()` and `\"\"` text.\n *\n * @param text Text to scan\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index after last style value character.\n */\n function consumeStyleValue(text, startIndex, endIndex) {\n var ch1 = -1; // 1st previous character\n var ch2 = -1; // 2nd previous character\n var ch3 = -1; // 3rd previous character\n var i = startIndex;\n var lastChIndex = i;\n while (i < endIndex) {\n var ch = text.charCodeAt(i++);\n if (ch === 59 /* SEMI_COLON */) {\n return lastChIndex;\n }\n else if (ch === 34 /* DOUBLE_QUOTE */ || ch === 39 /* SINGLE_QUOTE */) {\n lastChIndex = i = consumeQuotedText(text, ch, i, endIndex);\n }\n else if (startIndex ===\n i - 4 && // We have seen only 4 characters so far \"URL(\" (Ignore \"foo_URL()\")\n ch3 === 85 /* U */ &&\n ch2 === 82 /* R */ && ch1 === 76 /* L */ && ch === 40 /* OPEN_PAREN */) {\n lastChIndex = i = consumeQuotedText(text, 41 /* CLOSE_PAREN */, i, endIndex);\n }\n else if (ch > 32 /* SPACE */) {\n // if we have a non-whitespace character then capture its location\n lastChIndex = i;\n }\n ch3 = ch2;\n ch2 = ch1;\n ch1 = ch & -33 /* UPPER_CASE */;\n }\n return lastChIndex;\n }\n /**\n * Consumes all of the quoted characters.\n *\n * @param text Text to scan\n * @param quoteCharCode CharCode of either `\"` or `'` quote or `)` for `url(...)`.\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index after quoted characters.\n */\n function consumeQuotedText(text, quoteCharCode, startIndex, endIndex) {\n var ch1 = -1; // 1st previous character\n var index = startIndex;\n while (index < endIndex) {\n var ch = text.charCodeAt(index++);\n if (ch == quoteCharCode && ch1 !== 92 /* BACK_SLASH */) {\n return index;\n }\n if (ch == 92 /* BACK_SLASH */ && ch1 === 92 /* BACK_SLASH */) {\n // two back slashes cancel each other out. For example `\"\\\\\"` should properly end the\n // quotation. (It should not assume that the last `\"` is escaped.)\n ch1 = 0;\n }\n else {\n ch1 = ch;\n }\n }\n throw ngDevMode ? malformedStyleError(text, String.fromCharCode(quoteCharCode), endIndex) :\n new Error();\n }\n function malformedStyleError(text, expecting, index) {\n ngDevMode && assertEqual(typeof text === 'string', true, 'String expected here');\n throw throwError(\"Malformed style at location \" + index + \" in string '\" + text.substring(0, index) + '[>>' +\n text.substring(index, index + 1) + '<<]' + text.substr(index + 1) +\n (\"'. Expecting '\" + expecting + \"'.\"));\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 * Update a style binding on an element with the provided value.\n *\n * If the style value is falsy then it will be removed from the element\n * (or assigned a different value depending if there are any styles placed\n * on the element with `styleMap` or any static styles that are\n * present from when the element was created with `styling`).\n *\n * Note that the styling element is updated as part of `stylingApply`.\n *\n * @param prop A valid CSS property.\n * @param value New value to write (`null` or an empty string to remove).\n * @param suffix Optional suffix. Used with scalar values to add unit such as `px`.\n *\n * Note that this will apply the provided style value to the host element if this function is called\n * within a host binding function.\n *\n * @codeGenApi\n */\n function ɵɵstyleProp(prop, value, suffix) {\n checkStylingProperty(prop, value, suffix, false);\n return ɵɵstyleProp;\n }\n /**\n * Update a class binding on an element with the provided value.\n *\n * This instruction is meant to handle the `[class.foo]=\"exp\"` case and,\n * therefore, the class binding itself must already be allocated using\n * `styling` within the creation block.\n *\n * @param prop A valid CSS class (only one).\n * @param value A true/false value which will turn the class on or off.\n *\n * Note that this will apply the provided class value to the host element if this function\n * is called within a host binding function.\n *\n * @codeGenApi\n */\n function ɵɵclassProp(className, value) {\n checkStylingProperty(className, value, null, true);\n return ɵɵclassProp;\n }\n /**\n * Update style bindings using an object literal on an element.\n *\n * This instruction is meant to apply styling via the `[style]=\"exp\"` template bindings.\n * When styles are applied to the element they will then be updated with respect to\n * any styles/classes set via `styleProp`. If any styles are set to falsy\n * then they will be removed from the element.\n *\n * Note that the styling instruction will not be applied until `stylingApply` is called.\n *\n * @param styles A key/value style map of the styles that will be applied to the given element.\n * Any missing styles (that have already been applied to the element beforehand) will be\n * removed (unset) from the element's styling.\n *\n * Note that this will apply the provided styleMap value to the host element if this function\n * is called within a host binding.\n *\n * @codeGenApi\n */\n function ɵɵstyleMap(styles) {\n checkStylingMap(styleKeyValueArraySet, styleStringParser, styles, false);\n }\n /**\n * Parse text as style and add values to KeyValueArray.\n *\n * This code is pulled out to a separate function so that it can be tree shaken away if it is not\n * needed. It is only referenced from `ɵɵstyleMap`.\n *\n * @param keyValueArray KeyValueArray to add parsed values to.\n * @param text text to parse.\n */\n function styleStringParser(keyValueArray, text) {\n for (var i = parseStyle(text); i >= 0; i = parseStyleNext(text, i)) {\n styleKeyValueArraySet(keyValueArray, getLastParsedKey(text), getLastParsedValue(text));\n }\n }\n /**\n * Update class bindings using an object literal or class-string on an element.\n *\n * This instruction is meant to apply styling via the `[class]=\"exp\"` template bindings.\n * When classes are applied to the element they will then be updated with\n * respect to any styles/classes set via `classProp`. If any\n * classes are set to falsy then they will be removed from the element.\n *\n * Note that the styling instruction will not be applied until `stylingApply` is called.\n * Note that this will the provided classMap value to the host element if this function is called\n * within a host binding.\n *\n * @param classes A key/value map or string of CSS classes that will be added to the\n * given element. Any missing classes (that have already been applied to the element\n * beforehand) will be removed (unset) from the element's list of CSS classes.\n *\n * @codeGenApi\n */\n function ɵɵclassMap(classes) {\n checkStylingMap(keyValueArraySet, classStringParser, classes, true);\n }\n /**\n * Parse text as class and add values to KeyValueArray.\n *\n * This code is pulled out to a separate function so that it can be tree shaken away if it is not\n * needed. It is only referenced from `ɵɵclassMap`.\n *\n * @param keyValueArray KeyValueArray to add parsed values to.\n * @param text text to parse.\n */\n function classStringParser(keyValueArray, text) {\n for (var i = parseClassName(text); i >= 0; i = parseClassNameNext(text, i)) {\n keyValueArraySet(keyValueArray, getLastParsedKey(text), true);\n }\n }\n /**\n * Common code between `ɵɵclassProp` and `ɵɵstyleProp`.\n *\n * @param prop property name.\n * @param value binding value.\n * @param suffix suffix for the property (e.g. `em` or `px`)\n * @param isClassBased `true` if `class` change (`false` if `style`)\n */\n function checkStylingProperty(prop, value, suffix, isClassBased) {\n var lView = getLView();\n var tView = getTView();\n // Styling instructions use 2 slots per binding.\n // 1. one for the value / TStylingKey\n // 2. one for the intermittent-value / TStylingRange\n var bindingIndex = incrementBindingIndex(2);\n if (tView.firstUpdatePass) {\n stylingFirstUpdatePass(tView, prop, bindingIndex, isClassBased);\n }\n if (value !== NO_CHANGE && bindingUpdated(lView, bindingIndex, value)) {\n var tNode = tView.data[getSelectedIndex()];\n updateStyling(tView, tNode, lView, lView[RENDERER], prop, lView[bindingIndex + 1] = normalizeSuffix(value, suffix), isClassBased, bindingIndex);\n }\n }\n /**\n * Common code between `ɵɵclassMap` and `ɵɵstyleMap`.\n *\n * @param keyValueArraySet (See `keyValueArraySet` in \"util/array_utils\") Gets passed in as a\n * function so that `style` can be processed. This is done for tree shaking purposes.\n * @param stringParser Parser used to parse `value` if `string`. (Passed in as `style` and `class`\n * have different parsers.)\n * @param value bound value from application\n * @param isClassBased `true` if `class` change (`false` if `style`)\n */\n function checkStylingMap(keyValueArraySet, stringParser, value, isClassBased) {\n var tView = getTView();\n var bindingIndex = incrementBindingIndex(2);\n if (tView.firstUpdatePass) {\n stylingFirstUpdatePass(tView, null, bindingIndex, isClassBased);\n }\n var lView = getLView();\n if (value !== NO_CHANGE && bindingUpdated(lView, bindingIndex, value)) {\n // `getSelectedIndex()` should be here (rather than in instruction) so that it is guarded by the\n // if so as not to read unnecessarily.\n var tNode = tView.data[getSelectedIndex()];\n if (hasStylingInputShadow(tNode, isClassBased) && !isInHostBindings(tView, bindingIndex)) {\n if (ngDevMode) {\n // verify that if we are shadowing then `TData` is appropriately marked so that we skip\n // processing this binding in styling resolution.\n var tStylingKey = tView.data[bindingIndex];\n assertEqual(Array.isArray(tStylingKey) ? tStylingKey[1] : tStylingKey, false, 'Styling linked list shadow input should be marked as \\'false\\'');\n }\n // VE does not concatenate the static portion like we are doing here.\n // Instead VE just ignores the static completely if dynamic binding is present.\n // Because of locality we have already set the static portion because we don't know if there\n // is a dynamic portion until later. If we would ignore the static portion it would look like\n // the binding has removed it. This would confuse `[ngStyle]`/`[ngClass]` to do the wrong\n // thing as it would think that the static portion was removed. For this reason we\n // concatenate it so that `[ngStyle]`/`[ngClass]` can continue to work on changed.\n var staticPrefix = isClassBased ? tNode.classesWithoutHost : tNode.stylesWithoutHost;\n ngDevMode && isClassBased === false && staticPrefix !== null &&\n assertEqual(staticPrefix.endsWith(';'), true, 'Expecting static portion to end with \\';\\'');\n if (staticPrefix !== null) {\n // We want to make sure that falsy values of `value` become empty strings.\n value = concatStringsWithSpace(staticPrefix, value ? value : '');\n }\n // Given `<div [style] my-dir>` such that `my-dir` has `@Input('style')`.\n // This takes over the `[style]` binding. (Same for `[class]`)\n setDirectiveInputsWhichShadowsStyling(tView, tNode, lView, value, isClassBased);\n }\n else {\n updateStylingMap(tView, tNode, lView, lView[RENDERER], lView[bindingIndex + 1], lView[bindingIndex + 1] = toStylingKeyValueArray(keyValueArraySet, stringParser, value), isClassBased, bindingIndex);\n }\n }\n }\n /**\n * Determines when the binding is in `hostBindings` section\n *\n * @param tView Current `TView`\n * @param bindingIndex index of binding which we would like if it is in `hostBindings`\n */\n function isInHostBindings(tView, bindingIndex) {\n // All host bindings are placed after the expando section.\n return bindingIndex >= tView.expandoStartIndex;\n }\n /**\n * Collects the necessary information to insert the binding into a linked list of style bindings\n * using `insertTStylingBinding`.\n *\n * @param tView `TView` where the binding linked list will be stored.\n * @param tStylingKey Property/key of the binding.\n * @param bindingIndex Index of binding associated with the `prop`\n * @param isClassBased `true` if `class` change (`false` if `style`)\n */\n function stylingFirstUpdatePass(tView, tStylingKey, bindingIndex, isClassBased) {\n ngDevMode && assertFirstUpdatePass(tView);\n var tData = tView.data;\n if (tData[bindingIndex + 1] === null) {\n // The above check is necessary because we don't clear first update pass until first successful\n // (no exception) template execution. This prevents the styling instruction from double adding\n // itself to the list.\n // `getSelectedIndex()` should be here (rather than in instruction) so that it is guarded by the\n // if so as not to read unnecessarily.\n var tNode = tData[getSelectedIndex()];\n ngDevMode && assertDefined(tNode, 'TNode expected');\n var isHostBindings = isInHostBindings(tView, bindingIndex);\n if (hasStylingInputShadow(tNode, isClassBased) && tStylingKey === null && !isHostBindings) {\n // `tStylingKey === null` implies that we are either `[style]` or `[class]` binding.\n // If there is a directive which uses `@Input('style')` or `@Input('class')` than\n // we need to neutralize this binding since that directive is shadowing it.\n // We turn this into a noop by setting the key to `false`\n tStylingKey = false;\n }\n tStylingKey = wrapInStaticStylingKey(tData, tNode, tStylingKey, isClassBased);\n insertTStylingBinding(tData, tNode, tStylingKey, bindingIndex, isHostBindings, isClassBased);\n }\n }\n /**\n * Adds static styling information to the binding if applicable.\n *\n * The linked list of styles not only stores the list and keys, but also stores static styling\n * information on some of the keys. This function determines if the key should contain the styling\n * information and computes it.\n *\n * See `TStylingStatic` for more details.\n *\n * @param tData `TData` where the linked list is stored.\n * @param tNode `TNode` for which the styling is being computed.\n * @param stylingKey `TStylingKeyPrimitive` which may need to be wrapped into `TStylingKey`\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\n function wrapInStaticStylingKey(tData, tNode, stylingKey, isClassBased) {\n var hostDirectiveDef = getCurrentDirectiveDef(tData);\n var residual = isClassBased ? tNode.residualClasses : tNode.residualStyles;\n if (hostDirectiveDef === null) {\n // We are in template node.\n // If template node already had styling instruction then it has already collected the static\n // styling and there is no need to collect them again. We know that we are the first styling\n // instruction because the `TNode.*Bindings` points to 0 (nothing has been inserted yet).\n var isFirstStylingInstructionInTemplate = (isClassBased ? tNode.classBindings : tNode.styleBindings) === 0;\n if (isFirstStylingInstructionInTemplate) {\n // It would be nice to be able to get the statics from `mergeAttrs`, however, at this point\n // they are already merged and it would not be possible to figure which property belongs where\n // in the priority.\n stylingKey = collectStylingFromDirectives(null, tData, tNode, stylingKey, isClassBased);\n stylingKey = collectStylingFromTAttrs(stylingKey, tNode.attrs, isClassBased);\n // We know that if we have styling binding in template we can't have residual.\n residual = null;\n }\n }\n else {\n // We are in host binding node and there was no binding instruction in template node.\n // This means that we need to compute the residual.\n var directiveStylingLast = tNode.directiveStylingLast;\n var isFirstStylingInstructionInHostBinding = directiveStylingLast === -1 || tData[directiveStylingLast] !== hostDirectiveDef;\n if (isFirstStylingInstructionInHostBinding) {\n stylingKey =\n collectStylingFromDirectives(hostDirectiveDef, tData, tNode, stylingKey, isClassBased);\n if (residual === null) {\n // - If `null` than either:\n // - Template styling instruction already ran and it has consumed the static\n // styling into its `TStylingKey` and so there is no need to update residual. Instead\n // we need to update the `TStylingKey` associated with the first template node\n // instruction. OR\n // - Some other styling instruction ran and determined that there are no residuals\n var templateStylingKey = getTemplateHeadTStylingKey(tData, tNode, isClassBased);\n if (templateStylingKey !== undefined && Array.isArray(templateStylingKey)) {\n // Only recompute if `templateStylingKey` had static values. (If no static value found\n // then there is nothing to do since this operation can only produce less static keys, not\n // more.)\n templateStylingKey = collectStylingFromDirectives(null, tData, tNode, templateStylingKey[1] /* unwrap previous statics */, isClassBased);\n templateStylingKey =\n collectStylingFromTAttrs(templateStylingKey, tNode.attrs, isClassBased);\n setTemplateHeadTStylingKey(tData, tNode, isClassBased, templateStylingKey);\n }\n }\n else {\n // We only need to recompute residual if it is not `null`.\n // - If existing residual (implies there was no template styling). This means that some of\n // the statics may have moved from the residual to the `stylingKey` and so we have to\n // recompute.\n // - If `undefined` this is the first time we are running.\n residual = collectResidual(tData, tNode, isClassBased);\n }\n }\n }\n if (residual !== undefined) {\n isClassBased ? (tNode.residualClasses = residual) : (tNode.residualStyles = residual);\n }\n return stylingKey;\n }\n /**\n * Retrieve the `TStylingKey` for the template styling instruction.\n *\n * This is needed since `hostBinding` styling instructions are inserted after the template\n * instruction. While the template instruction needs to update the residual in `TNode` the\n * `hostBinding` instructions need to update the `TStylingKey` of the template instruction because\n * the template instruction is downstream from the `hostBindings` instructions.\n *\n * @param tData `TData` where the linked list is stored.\n * @param tNode `TNode` for which the styling is being computed.\n * @param isClassBased `true` if `class` (`false` if `style`)\n * @return `TStylingKey` if found or `undefined` if not found.\n */\n function getTemplateHeadTStylingKey(tData, tNode, isClassBased) {\n var bindings = isClassBased ? tNode.classBindings : tNode.styleBindings;\n if (getTStylingRangeNext(bindings) === 0) {\n // There does not seem to be a styling instruction in the `template`.\n return undefined;\n }\n return tData[getTStylingRangePrev(bindings)];\n }\n /**\n * Update the `TStylingKey` of the first template instruction in `TNode`.\n *\n * Logically `hostBindings` styling instructions are of lower priority than that of the template.\n * However, they execute after the template styling instructions. This means that they get inserted\n * in front of the template styling instructions.\n *\n * If we have a template styling instruction and a new `hostBindings` styling instruction is\n * executed it means that it may need to steal static fields from the template instruction. This\n * method allows us to update the first template instruction `TStylingKey` with a new value.\n *\n * Assume:\n * ```\n * <div my-dir style=\"color: red\" [style.color]=\"tmplExp\"></div>\n *\n * @Directive({\n * host: {\n * 'style': 'width: 100px',\n * '[style.color]': 'dirExp',\n * }\n * })\n * class MyDir {}\n * ```\n *\n * when `[style.color]=\"tmplExp\"` executes it creates this data structure.\n * ```\n * ['', 'color', 'color', 'red', 'width', '100px'],\n * ```\n *\n * The reason for this is that the template instruction does not know if there are styling\n * instructions and must assume that there are none and must collect all of the static styling.\n * (both\n * `color' and 'width`)\n *\n * When `'[style.color]': 'dirExp',` executes we need to insert a new data into the linked list.\n * ```\n * ['', 'color', 'width', '100px'], // newly inserted\n * ['', 'color', 'color', 'red', 'width', '100px'], // this is wrong\n * ```\n *\n * Notice that the template statics is now wrong as it incorrectly contains `width` so we need to\n * update it like so:\n * ```\n * ['', 'color', 'width', '100px'],\n * ['', 'color', 'color', 'red'], // UPDATE\n * ```\n *\n * @param tData `TData` where the linked list is stored.\n * @param tNode `TNode` for which the styling is being computed.\n * @param isClassBased `true` if `class` (`false` if `style`)\n * @param tStylingKey New `TStylingKey` which is replacing the old one.\n */\n function setTemplateHeadTStylingKey(tData, tNode, isClassBased, tStylingKey) {\n var bindings = isClassBased ? tNode.classBindings : tNode.styleBindings;\n ngDevMode &&\n assertNotEqual(getTStylingRangeNext(bindings), 0, 'Expecting to have at least one template styling binding.');\n tData[getTStylingRangePrev(bindings)] = tStylingKey;\n }\n /**\n * Collect all static values after the current `TNode.directiveStylingLast` index.\n *\n * Collect the remaining styling information which has not yet been collected by an existing\n * styling instruction.\n *\n * @param tData `TData` where the `DirectiveDefs` are stored.\n * @param tNode `TNode` which contains the directive range.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\n function collectResidual(tData, tNode, isClassBased) {\n var residual = undefined;\n var directiveEnd = tNode.directiveEnd;\n ngDevMode &&\n assertNotEqual(tNode.directiveStylingLast, -1, 'By the time this function gets called at least one hostBindings-node styling instruction must have executed.');\n // We add `1 + tNode.directiveStart` because we need to skip the current directive (as we are\n // collecting things after the last `hostBindings` directive which had a styling instruction.)\n for (var i = 1 + tNode.directiveStylingLast; i < directiveEnd; i++) {\n var attrs = tData[i].hostAttrs;\n residual = collectStylingFromTAttrs(residual, attrs, isClassBased);\n }\n return collectStylingFromTAttrs(residual, tNode.attrs, isClassBased);\n }\n /**\n * Collect the static styling information with lower priority than `hostDirectiveDef`.\n *\n * (This is opposite of residual styling.)\n *\n * @param hostDirectiveDef `DirectiveDef` for which we want to collect lower priority static\n * styling. (Or `null` if template styling)\n * @param tData `TData` where the linked list is stored.\n * @param tNode `TNode` for which the styling is being computed.\n * @param stylingKey Existing `TStylingKey` to update or wrap.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\n function collectStylingFromDirectives(hostDirectiveDef, tData, tNode, stylingKey, isClassBased) {\n // We need to loop because there can be directives which have `hostAttrs` but don't have\n // `hostBindings` so this loop catches up to the current directive..\n var currentDirective = null;\n var directiveEnd = tNode.directiveEnd;\n var directiveStylingLast = tNode.directiveStylingLast;\n if (directiveStylingLast === -1) {\n directiveStylingLast = tNode.directiveStart;\n }\n else {\n directiveStylingLast++;\n }\n while (directiveStylingLast < directiveEnd) {\n currentDirective = tData[directiveStylingLast];\n ngDevMode && assertDefined(currentDirective, 'expected to be defined');\n stylingKey = collectStylingFromTAttrs(stylingKey, currentDirective.hostAttrs, isClassBased);\n if (currentDirective === hostDirectiveDef)\n break;\n directiveStylingLast++;\n }\n if (hostDirectiveDef !== null) {\n // we only advance the styling cursor if we are collecting data from host bindings.\n // Template executes before host bindings and so if we would update the index,\n // host bindings would not get their statics.\n tNode.directiveStylingLast = directiveStylingLast;\n }\n return stylingKey;\n }\n /**\n * Convert `TAttrs` into `TStylingStatic`.\n *\n * @param stylingKey existing `TStylingKey` to update or wrap.\n * @param attrs `TAttributes` to process.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\n function collectStylingFromTAttrs(stylingKey, attrs, isClassBased) {\n var desiredMarker = isClassBased ? 1 /* Classes */ : 2 /* Styles */;\n var currentMarker = -1 /* ImplicitAttributes */;\n if (attrs !== null) {\n for (var i = 0; i < attrs.length; i++) {\n var item = attrs[i];\n if (typeof item === 'number') {\n currentMarker = item;\n }\n else {\n if (currentMarker === desiredMarker) {\n if (!Array.isArray(stylingKey)) {\n stylingKey = stylingKey === undefined ? [] : ['', stylingKey];\n }\n keyValueArraySet(stylingKey, item, isClassBased ? true : attrs[++i]);\n }\n }\n }\n }\n return stylingKey === undefined ? null : stylingKey;\n }\n /**\n * Convert user input to `KeyValueArray`.\n *\n * This function takes user input which could be `string`, Object literal, or iterable and converts\n * it into a consistent representation. The output of this is `KeyValueArray` (which is an array\n * where\n * even indexes contain keys and odd indexes contain values for those keys).\n *\n * The advantage of converting to `KeyValueArray` is that we can perform diff in an input\n * independent\n * way.\n * (ie we can compare `foo bar` to `['bar', 'baz'] and determine a set of changes which need to be\n * applied)\n *\n * The fact that `KeyValueArray` is sorted is very important because it allows us to compute the\n * difference in linear fashion without the need to allocate any additional data.\n *\n * For example if we kept this as a `Map` we would have to iterate over previous `Map` to determine\n * which values need to be deleted, over the new `Map` to determine additions, and we would have to\n * keep additional `Map` to keep track of duplicates or items which have not yet been visited.\n *\n * @param keyValueArraySet (See `keyValueArraySet` in \"util/array_utils\") Gets passed in as a\n * function so that `style` can be processed. This is done\n * for tree shaking purposes.\n * @param stringParser The parser is passed in so that it will be tree shakable. See\n * `styleStringParser` and `classStringParser`\n * @param value The value to parse/convert to `KeyValueArray`\n */\n function toStylingKeyValueArray(keyValueArraySet, stringParser, value) {\n if (value == null /*|| value === undefined */ || value === '')\n return EMPTY_ARRAY;\n var styleKeyValueArray = [];\n var unwrappedValue = unwrapSafeValue(value);\n if (Array.isArray(unwrappedValue)) {\n for (var i = 0; i < unwrappedValue.length; i++) {\n keyValueArraySet(styleKeyValueArray, unwrappedValue[i], true);\n }\n }\n else if (typeof unwrappedValue === 'object') {\n for (var key in unwrappedValue) {\n if (unwrappedValue.hasOwnProperty(key)) {\n keyValueArraySet(styleKeyValueArray, key, unwrappedValue[key]);\n }\n }\n }\n else if (typeof unwrappedValue === 'string') {\n stringParser(styleKeyValueArray, unwrappedValue);\n }\n else {\n ngDevMode &&\n throwError('Unsupported styling type ' + typeof unwrappedValue + ': ' + unwrappedValue);\n }\n return styleKeyValueArray;\n }\n /**\n * Set a `value` for a `key`.\n *\n * See: `keyValueArraySet` for details\n *\n * @param keyValueArray KeyValueArray to add to.\n * @param key Style key to add.\n * @param value The value to set.\n */\n function styleKeyValueArraySet(keyValueArray, key, value) {\n keyValueArraySet(keyValueArray, key, unwrapSafeValue(value));\n }\n /**\n * Update map based styling.\n *\n * Map based styling could be anything which contains more than one binding. For example `string`,\n * or object literal. Dealing with all of these types would complicate the logic so\n * instead this function expects that the complex input is first converted into normalized\n * `KeyValueArray`. The advantage of normalization is that we get the values sorted, which makes it\n * very cheap to compute deltas between the previous and current value.\n *\n * @param tView Associated `TView.data` contains the linked list of binding priorities.\n * @param tNode `TNode` where the binding is located.\n * @param lView `LView` contains the values associated with other styling binding at this `TNode`.\n * @param renderer Renderer to use if any updates.\n * @param oldKeyValueArray Previous value represented as `KeyValueArray`\n * @param newKeyValueArray Current value represented as `KeyValueArray`\n * @param isClassBased `true` if `class` (`false` if `style`)\n * @param bindingIndex Binding index of the binding.\n */\n function updateStylingMap(tView, tNode, lView, renderer, oldKeyValueArray, newKeyValueArray, isClassBased, bindingIndex) {\n if (oldKeyValueArray === NO_CHANGE) {\n // On first execution the oldKeyValueArray is NO_CHANGE => treat it as empty KeyValueArray.\n oldKeyValueArray = EMPTY_ARRAY;\n }\n var oldIndex = 0;\n var newIndex = 0;\n var oldKey = 0 < oldKeyValueArray.length ? oldKeyValueArray[0] : null;\n var newKey = 0 < newKeyValueArray.length ? newKeyValueArray[0] : null;\n while (oldKey !== null || newKey !== null) {\n ngDevMode && assertLessThan(oldIndex, 999, 'Are we stuck in infinite loop?');\n ngDevMode && assertLessThan(newIndex, 999, 'Are we stuck in infinite loop?');\n var oldValue = oldIndex < oldKeyValueArray.length ? oldKeyValueArray[oldIndex + 1] : undefined;\n var newValue = newIndex < newKeyValueArray.length ? newKeyValueArray[newIndex + 1] : undefined;\n var setKey = null;\n var setValue = undefined;\n if (oldKey === newKey) {\n // UPDATE: Keys are equal => new value is overwriting old value.\n oldIndex += 2;\n newIndex += 2;\n if (oldValue !== newValue) {\n setKey = newKey;\n setValue = newValue;\n }\n }\n else if (newKey === null || oldKey !== null && oldKey < newKey) {\n // DELETE: oldKey key is missing or we did not find the oldKey in the newValue\n // (because the keyValueArray is sorted and `newKey` is found later alphabetically).\n // `\"background\" < \"color\"` so we need to delete `\"background\"` because it is not found in the\n // new array.\n oldIndex += 2;\n setKey = oldKey;\n }\n else {\n // CREATE: newKey's is earlier alphabetically than oldKey's (or no oldKey) => we have new key.\n // `\"color\" > \"background\"` so we need to add `color` because it is in new array but not in\n // old array.\n ngDevMode && assertDefined(newKey, 'Expecting to have a valid key');\n newIndex += 2;\n setKey = newKey;\n setValue = newValue;\n }\n if (setKey !== null) {\n updateStyling(tView, tNode, lView, renderer, setKey, setValue, isClassBased, bindingIndex);\n }\n oldKey = oldIndex < oldKeyValueArray.length ? oldKeyValueArray[oldIndex] : null;\n newKey = newIndex < newKeyValueArray.length ? newKeyValueArray[newIndex] : null;\n }\n }\n /**\n * Update a simple (property name) styling.\n *\n * This function takes `prop` and updates the DOM to that value. The function takes the binding\n * value as well as binding priority into consideration to determine which value should be written\n * to DOM. (For example it may be determined that there is a higher priority overwrite which blocks\n * the DOM write, or if the value goes to `undefined` a lower priority overwrite may be consulted.)\n *\n * @param tView Associated `TView.data` contains the linked list of binding priorities.\n * @param tNode `TNode` where the binding is located.\n * @param lView `LView` contains the values associated with other styling binding at this `TNode`.\n * @param renderer Renderer to use if any updates.\n * @param prop Either style property name or a class name.\n * @param value Either style value for `prop` or `true`/`false` if `prop` is class.\n * @param isClassBased `true` if `class` (`false` if `style`)\n * @param bindingIndex Binding index of the binding.\n */\n function updateStyling(tView, tNode, lView, renderer, prop, value, isClassBased, bindingIndex) {\n if (!(tNode.type & 3 /* AnyRNode */)) {\n // It is possible to have styling on non-elements (such as ng-container).\n // This is rare, but it does happen. In such a case, just ignore the binding.\n return;\n }\n var tData = tView.data;\n var tRange = tData[bindingIndex + 1];\n var higherPriorityValue = getTStylingRangeNextDuplicate(tRange) ?\n findStylingValue(tData, tNode, lView, prop, getTStylingRangeNext(tRange), isClassBased) :\n undefined;\n if (!isStylingValuePresent(higherPriorityValue)) {\n // We don't have a next duplicate, or we did not find a duplicate value.\n if (!isStylingValuePresent(value)) {\n // We should delete current value or restore to lower priority value.\n if (getTStylingRangePrevDuplicate(tRange)) {\n // We have a possible prev duplicate, let's retrieve it.\n value = findStylingValue(tData, null, lView, prop, bindingIndex, isClassBased);\n }\n }\n var rNode = getNativeByIndex(getSelectedIndex(), lView);\n applyStyling(renderer, isClassBased, rNode, prop, value);\n }\n }\n /**\n * Search for styling value with higher priority which is overwriting current value, or a\n * value of lower priority to which we should fall back if the value is `undefined`.\n *\n * When value is being applied at a location, related values need to be consulted.\n * - If there is a higher priority binding, we should be using that one instead.\n * For example `<div [style]=\"{color:exp1}\" [style.color]=\"exp2\">` change to `exp1`\n * requires that we check `exp2` to see if it is set to value other than `undefined`.\n * - If there is a lower priority binding and we are changing to `undefined`\n * For example `<div [style]=\"{color:exp1}\" [style.color]=\"exp2\">` change to `exp2` to\n * `undefined` requires that we check `exp1` (and static values) and use that as new value.\n *\n * NOTE: The styling stores two values.\n * 1. The raw value which came from the application is stored at `index + 0` location. (This value\n * is used for dirty checking).\n * 2. The normalized value is stored at `index + 1`.\n *\n * @param tData `TData` used for traversing the priority.\n * @param tNode `TNode` to use for resolving static styling. Also controls search direction.\n * - `TNode` search next and quit as soon as `isStylingValuePresent(value)` is true.\n * If no value found consult `tNode.residualStyle`/`tNode.residualClass` for default value.\n * - `null` search prev and go all the way to end. Return last value where\n * `isStylingValuePresent(value)` is true.\n * @param lView `LView` used for retrieving the actual values.\n * @param prop Property which we are interested in.\n * @param index Starting index in the linked list of styling bindings where the search should start.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\n function findStylingValue(tData, tNode, lView, prop, index, isClassBased) {\n // `TNode` to use for resolving static styling. Also controls search direction.\n // - `TNode` search next and quit as soon as `isStylingValuePresent(value)` is true.\n // If no value found consult `tNode.residualStyle`/`tNode.residualClass` for default value.\n // - `null` search prev and go all the way to end. Return last value where\n // `isStylingValuePresent(value)` is true.\n var isPrevDirection = tNode === null;\n var value = undefined;\n while (index > 0) {\n var rawKey = tData[index];\n var containsStatics = Array.isArray(rawKey);\n // Unwrap the key if we contain static values.\n var key = containsStatics ? rawKey[1] : rawKey;\n var isStylingMap = key === null;\n var valueAtLViewIndex = lView[index + 1];\n if (valueAtLViewIndex === NO_CHANGE) {\n // In firstUpdatePass the styling instructions create a linked list of styling.\n // On subsequent passes it is possible for a styling instruction to try to read a binding\n // which\n // has not yet executed. In that case we will find `NO_CHANGE` and we should assume that\n // we have `undefined` (or empty array in case of styling-map instruction) instead. This\n // allows the resolution to apply the value (which may later be overwritten when the\n // binding actually executes.)\n valueAtLViewIndex = isStylingMap ? EMPTY_ARRAY : undefined;\n }\n var currentValue = isStylingMap ? keyValueArrayGet(valueAtLViewIndex, prop) :\n key === prop ? valueAtLViewIndex : undefined;\n if (containsStatics && !isStylingValuePresent(currentValue)) {\n currentValue = keyValueArrayGet(rawKey, prop);\n }\n if (isStylingValuePresent(currentValue)) {\n value = currentValue;\n if (isPrevDirection) {\n return value;\n }\n }\n var tRange = tData[index + 1];\n index = isPrevDirection ? getTStylingRangePrev(tRange) : getTStylingRangeNext(tRange);\n }\n if (tNode !== null) {\n // in case where we are going in next direction AND we did not find anything, we need to\n // consult residual styling\n var residual = isClassBased ? tNode.residualClasses : tNode.residualStyles;\n if (residual != null /** OR residual !=== undefined */) {\n value = keyValueArrayGet(residual, prop);\n }\n }\n return value;\n }\n /**\n * Determines if the binding value should be used (or if the value is 'undefined' and hence priority\n * resolution should be used.)\n *\n * @param value Binding style value.\n */\n function isStylingValuePresent(value) {\n // Currently only `undefined` value is considered non-binding. That is `undefined` says I don't\n // have an opinion as to what this binding should be and you should consult other bindings by\n // priority to determine the valid value.\n // This is extracted into a single function so that we have a single place to control this.\n return value !== undefined;\n }\n /**\n * Normalizes and/or adds a suffix to the value.\n *\n * If value is `null`/`undefined` no suffix is added\n * @param value\n * @param suffix\n */\n function normalizeSuffix(value, suffix) {\n if (value == null /** || value === undefined */) {\n // do nothing\n }\n else if (typeof suffix === 'string') {\n value = value + suffix;\n }\n else if (typeof value === 'object') {\n value = stringify(unwrapSafeValue(value));\n }\n return value;\n }\n /**\n * Tests if the `TNode` has input shadow.\n *\n * An input shadow is when a directive steals (shadows) the input by using `@Input('style')` or\n * `@Input('class')` as input.\n *\n * @param tNode `TNode` which we would like to see if it has shadow.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\n function hasStylingInputShadow(tNode, isClassBased) {\n return (tNode.flags & (isClassBased ? 16 /* hasClassInput */ : 32 /* hasStyleInput */)) !== 0;\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 * Create static text node\n *\n * @param index Index of the node in the data array\n * @param value Static string value to write.\n *\n * @codeGenApi\n */\n function ɵɵtext(index, value) {\n if (value === void 0) { value = ''; }\n var lView = getLView();\n var tView = getTView();\n var adjustedIndex = index + HEADER_OFFSET;\n ngDevMode &&\n assertEqual(getBindingIndex(), tView.bindingStartIndex, 'text nodes should be created before any bindings');\n ngDevMode && assertIndexInRange(lView, adjustedIndex);\n var tNode = tView.firstCreatePass ?\n getOrCreateTNode(tView, adjustedIndex, 1 /* Text */, value, null) :\n tView.data[adjustedIndex];\n var textNative = lView[adjustedIndex] = createTextNode(lView[RENDERER], value);\n appendChild(tView, lView, textNative, tNode);\n // Text nodes are self closing.\n setCurrentTNode(tNode, false);\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 * Update text content with a lone bound value\n *\n * Used when a text node has 1 interpolated value in it, an no additional text\n * surrounds that interpolated value:\n *\n * ```html\n * <div>{{v0}}</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate(v0);\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\n function ɵɵtextInterpolate(v0) {\n ɵɵtextInterpolate1('', v0, '');\n return ɵɵtextInterpolate;\n }\n /**\n *\n * Update text content with single bound value surrounded by other text.\n *\n * Used when a text node has 1 interpolated value in it:\n *\n * ```html\n * <div>prefix{{v0}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate1('prefix', v0, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\n function ɵɵtextInterpolate1(prefix, v0, suffix) {\n var lView = getLView();\n var interpolated = interpolation1(lView, prefix, v0, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), interpolated);\n }\n return ɵɵtextInterpolate1;\n }\n /**\n *\n * Update text content with 2 bound values surrounded by other text.\n *\n * Used when a text node has 2 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate2('prefix', v0, '-', v1, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\n function ɵɵtextInterpolate2(prefix, v0, i0, v1, suffix) {\n var lView = getLView();\n var interpolated = interpolation2(lView, prefix, v0, i0, v1, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), interpolated);\n }\n return ɵɵtextInterpolate2;\n }\n /**\n *\n * Update text content with 3 bound values surrounded by other text.\n *\n * Used when a text node has 3 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate3(\n * 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\n function ɵɵtextInterpolate3(prefix, v0, i0, v1, i1, v2, suffix) {\n var lView = getLView();\n var interpolated = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), interpolated);\n }\n return ɵɵtextInterpolate3;\n }\n /**\n *\n * Update text content with 4 bound values surrounded by other text.\n *\n * Used when a text node has 4 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate4(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see ɵɵtextInterpolateV\n * @codeGenApi\n */\n function ɵɵtextInterpolate4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix) {\n var lView = getLView();\n var interpolated = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), interpolated);\n }\n return ɵɵtextInterpolate4;\n }\n /**\n *\n * Update text content with 5 bound values surrounded by other text.\n *\n * Used when a text node has 5 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate5(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\n function ɵɵtextInterpolate5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix) {\n var lView = getLView();\n var interpolated = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), interpolated);\n }\n return ɵɵtextInterpolate5;\n }\n /**\n *\n * Update text content with 6 bound values surrounded by other text.\n *\n * Used when a text node has 6 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate6(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change. @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\n function ɵɵtextInterpolate6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix) {\n var lView = getLView();\n var interpolated = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), interpolated);\n }\n return ɵɵtextInterpolate6;\n }\n /**\n *\n * Update text content with 7 bound values surrounded by other text.\n *\n * Used when a text node has 7 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate7(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\n function ɵɵtextInterpolate7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix) {\n var lView = getLView();\n var interpolated = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), interpolated);\n }\n return ɵɵtextInterpolate7;\n }\n /**\n *\n * Update text content with 8 bound values surrounded by other text.\n *\n * Used when a text node has 8 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate8(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\n function ɵɵtextInterpolate8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix) {\n var lView = getLView();\n var interpolated = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), interpolated);\n }\n return ɵɵtextInterpolate8;\n }\n /**\n * Update text content with 9 or more bound values other surrounded by text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolateV(\n * ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n * 'suffix']);\n * ```\n *.\n * @param values The collection of values and the strings in between those values, beginning with\n * a string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n *\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\n function ɵɵtextInterpolateV(values) {\n var lView = getLView();\n var interpolated = interpolationV(lView, values);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), interpolated);\n }\n return ɵɵtextInterpolateV;\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 * Update an interpolated class on an element with single bound value surrounded by text.\n *\n * Used when the value passed to a property has 1 interpolated value in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate1('prefix', v0, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\n function ɵɵclassMapInterpolate1(prefix, v0, suffix) {\n var lView = getLView();\n var interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n }\n /**\n *\n * Update an interpolated class on an element with 2 bound values surrounded by text.\n *\n * Used when the value passed to a property has 2 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate2('prefix', v0, '-', v1, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\n function ɵɵclassMapInterpolate2(prefix, v0, i0, v1, suffix) {\n var lView = getLView();\n var interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n }\n /**\n *\n * Update an interpolated class on an element with 3 bound values surrounded by text.\n *\n * Used when the value passed to a property has 3 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate3(\n * 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\n function ɵɵclassMapInterpolate3(prefix, v0, i0, v1, i1, v2, suffix) {\n var lView = getLView();\n var interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n }\n /**\n *\n * Update an interpolated class on an element with 4 bound values surrounded by text.\n *\n * Used when the value passed to a property has 4 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate4(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\n function ɵɵclassMapInterpolate4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix) {\n var lView = getLView();\n var interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n }\n /**\n *\n * Update an interpolated class on an element with 5 bound values surrounded by text.\n *\n * Used when the value passed to a property has 5 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate5(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\n function ɵɵclassMapInterpolate5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix) {\n var lView = getLView();\n var interpolatedValue = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n }\n /**\n *\n * Update an interpolated class on an element with 6 bound values surrounded by text.\n *\n * Used when the value passed to a property has 6 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate6(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\n function ɵɵclassMapInterpolate6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix) {\n var lView = getLView();\n var interpolatedValue = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n }\n /**\n *\n * Update an interpolated class on an element with 7 bound values surrounded by text.\n *\n * Used when the value passed to a property has 7 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate7(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\n function ɵɵclassMapInterpolate7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix) {\n var lView = getLView();\n var interpolatedValue = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n }\n /**\n *\n * Update an interpolated class on an element with 8 bound values surrounded by text.\n *\n * Used when the value passed to a property has 8 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate8(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param i6 Static value used for concatenation only.\n * @param v7 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\n function ɵɵclassMapInterpolate8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix) {\n var lView = getLView();\n var interpolatedValue = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n }\n /**\n * Update an interpolated class on an element with 9 or more bound values surrounded by text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div\n * class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolateV(\n * ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n * 'suffix']);\n * ```\n *.\n * @param values The collection of values and the strings in-between those values, beginning with\n * a string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n * @codeGenApi\n */\n function ɵɵclassMapInterpolateV(values) {\n var lView = getLView();\n var interpolatedValue = interpolationV(lView, values);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\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 * Update an interpolated style on an element with single bound value surrounded by text.\n *\n * Used when the value passed to a property has 1 interpolated value in it:\n *\n * ```html\n * <div style=\"key: {{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate1('key: ', v0, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\n function ɵɵstyleMapInterpolate1(prefix, v0, suffix) {\n var lView = getLView();\n var interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n ɵɵstyleMap(interpolatedValue);\n }\n /**\n *\n * Update an interpolated style on an element with 2 bound values surrounded by text.\n *\n * Used when the value passed to a property has 2 interpolated values in it:\n *\n * ```html\n * <div style=\"key: {{v0}}; key1: {{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate2('key: ', v0, '; key1: ', v1, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\n function ɵɵstyleMapInterpolate2(prefix, v0, i0, v1, suffix) {\n var lView = getLView();\n var interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n ɵɵstyleMap(interpolatedValue);\n }\n /**\n *\n * Update an interpolated style on an element with 3 bound values surrounded by text.\n *\n * Used when the value passed to a property has 3 interpolated values in it:\n *\n * ```html\n * <div style=\"key: {{v0}}; key2: {{v1}}; key2: {{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate3(\n * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\n function ɵɵstyleMapInterpolate3(prefix, v0, i0, v1, i1, v2, suffix) {\n var lView = getLView();\n var interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n ɵɵstyleMap(interpolatedValue);\n }\n /**\n *\n * Update an interpolated style on an element with 4 bound values surrounded by text.\n *\n * Used when the value passed to a property has 4 interpolated values in it:\n *\n * ```html\n * <div style=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate4(\n * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\n function ɵɵstyleMapInterpolate4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix) {\n var lView = getLView();\n var interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n ɵɵstyleMap(interpolatedValue);\n }\n /**\n *\n * Update an interpolated style on an element with 5 bound values surrounded by text.\n *\n * Used when the value passed to a property has 5 interpolated values in it:\n *\n * ```html\n * <div style=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate5(\n * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\n function ɵɵstyleMapInterpolate5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix) {\n var lView = getLView();\n var interpolatedValue = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n ɵɵstyleMap(interpolatedValue);\n }\n /**\n *\n * Update an interpolated style on an element with 6 bound values surrounded by text.\n *\n * Used when the value passed to a property has 6 interpolated values in it:\n *\n * ```html\n * <div style=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}};\n * key5: {{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate6(\n * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,\n * 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\n function ɵɵstyleMapInterpolate6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix) {\n var lView = getLView();\n var interpolatedValue = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n ɵɵstyleMap(interpolatedValue);\n }\n /**\n *\n * Update an interpolated style on an element with 7 bound values surrounded by text.\n *\n * Used when the value passed to a property has 7 interpolated values in it:\n *\n * ```html\n * <div style=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}};\n * key6: {{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate7(\n * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,\n * '; key6: ', v6, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\n function ɵɵstyleMapInterpolate7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix) {\n var lView = getLView();\n var interpolatedValue = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n ɵɵstyleMap(interpolatedValue);\n }\n /**\n *\n * Update an interpolated style on an element with 8 bound values surrounded by text.\n *\n * Used when the value passed to a property has 8 interpolated values in it:\n *\n * ```html\n * <div style=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}};\n * key6: {{v6}}; key7: {{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate8(\n * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,\n * '; key6: ', v6, '; key7: ', v7, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param i6 Static value used for concatenation only.\n * @param v7 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\n function ɵɵstyleMapInterpolate8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix) {\n var lView = getLView();\n var interpolatedValue = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n ɵɵstyleMap(interpolatedValue);\n }\n /**\n * Update an interpolated style on an element with 9 or more bound values surrounded by text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div\n * class=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}};\n * key6: {{v6}}; key7: {{v7}}; key8: {{v8}}; key9: {{v9}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolateV(\n * ['key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,\n * '; key6: ', v6, '; key7: ', v7, '; key8: ', v8, '; key9: ', v9, 'suffix']);\n * ```\n *.\n * @param values The collection of values and the strings in-between those values, beginning with\n * a string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '; key2: ', value1, '; key2: ', value2, ..., value99, 'suffix']`)\n * @codeGenApi\n */\n function ɵɵstyleMapInterpolateV(values) {\n var lView = getLView();\n var interpolatedValue = interpolationV(lView, values);\n ɵɵstyleMap(interpolatedValue);\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 * Update an interpolated style property on an element with single bound value surrounded by text.\n *\n * Used when the value passed to a property has 1 interpolated value in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate1(0, 'prefix', v0, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n * index of the style in the style bindings array that was passed into\n * `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\n function ɵɵstylePropInterpolate1(prop, prefix, v0, suffix, valueSuffix) {\n var lView = getLView();\n var interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolate1;\n }\n /**\n *\n * Update an interpolated style property on an element with 2 bound values surrounded by text.\n *\n * Used when the value passed to a property has 2 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate2(0, 'prefix', v0, '-', v1, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n * index of the style in the style bindings array that was passed into\n * `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\n function ɵɵstylePropInterpolate2(prop, prefix, v0, i0, v1, suffix, valueSuffix) {\n var lView = getLView();\n var interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolate2;\n }\n /**\n *\n * Update an interpolated style property on an element with 3 bound values surrounded by text.\n *\n * Used when the value passed to a property has 3 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}-{{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate3(0, 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n * index of the style in the style bindings array that was passed into\n * `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\n function ɵɵstylePropInterpolate3(prop, prefix, v0, i0, v1, i1, v2, suffix, valueSuffix) {\n var lView = getLView();\n var interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolate3;\n }\n /**\n *\n * Update an interpolated style property on an element with 4 bound values surrounded by text.\n *\n * Used when the value passed to a property has 4 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate4(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n * index of the style in the style bindings array that was passed into\n * `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\n function ɵɵstylePropInterpolate4(prop, prefix, v0, i0, v1, i1, v2, i2, v3, suffix, valueSuffix) {\n var lView = getLView();\n var interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolate4;\n }\n /**\n *\n * Update an interpolated style property on an element with 5 bound values surrounded by text.\n *\n * Used when the value passed to a property has 5 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate5(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n * index of the style in the style bindings array that was passed into\n * `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\n function ɵɵstylePropInterpolate5(prop, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix, valueSuffix) {\n var lView = getLView();\n var interpolatedValue = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolate5;\n }\n /**\n *\n * Update an interpolated style property on an element with 6 bound values surrounded by text.\n *\n * Used when the value passed to a property has 6 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate6(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n * index of the style in the style bindings array that was passed into\n * `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\n function ɵɵstylePropInterpolate6(prop, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix, valueSuffix) {\n var lView = getLView();\n var interpolatedValue = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolate6;\n }\n /**\n *\n * Update an interpolated style property on an element with 7 bound values surrounded by text.\n *\n * Used when the value passed to a property has 7 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate7(\n * 0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n * index of the style in the style bindings array that was passed into\n * `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\n function ɵɵstylePropInterpolate7(prop, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix, valueSuffix) {\n var lView = getLView();\n var interpolatedValue = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolate7;\n }\n /**\n *\n * Update an interpolated style property on an element with 8 bound values surrounded by text.\n *\n * Used when the value passed to a property has 8 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate8(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6,\n * '-', v7, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n * index of the style in the style bindings array that was passed into\n * `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param i6 Static value used for concatenation only.\n * @param v7 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\n function ɵɵstylePropInterpolate8(prop, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix, valueSuffix) {\n var lView = getLView();\n var interpolatedValue = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolate8;\n }\n /**\n * Update an interpolated style property on an element with 9 or more bound values surrounded by\n * text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div\n * style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix\">\n * </div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolateV(\n * 0, ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n * 'suffix']);\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n * index of the style in the style bindings array that was passed into\n * `styling`..\n * @param values The collection of values and the strings in-between those values, beginning with\n * a string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\n function ɵɵstylePropInterpolateV(prop, values, valueSuffix) {\n var lView = getLView();\n var interpolatedValue = interpolationV(lView, values);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolateV;\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 * Update a property on a host element. Only applies to native node properties, not inputs.\n *\n * Operates on the element selected by index via the {@link select} instruction.\n *\n * @param propName Name of property. Because it is going to DOM, this is not subject to\n * renaming as part of minification.\n * @param value New value to write.\n * @param sanitizer An optional function used to sanitize the value.\n * @returns This function returns itself so that it may be chained\n * (e.g. `property('name', ctx.name)('title', ctx.title)`)\n *\n * @codeGenApi\n */\n function ɵɵhostProperty(propName, value, sanitizer) {\n var lView = getLView();\n var bindingIndex = nextBindingIndex();\n if (bindingUpdated(lView, bindingIndex, value)) {\n var tView = getTView();\n var tNode = getSelectedTNode();\n elementPropertyInternal(tView, tNode, lView, propName, value, lView[RENDERER], sanitizer, true);\n ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, bindingIndex);\n }\n return ɵɵhostProperty;\n }\n /**\n * Updates a synthetic host binding (e.g. `[@foo]`) on a component or directive.\n *\n * This instruction is for compatibility purposes and is designed to ensure that a\n * synthetic host binding (e.g. `@HostBinding('@foo')`) properly gets rendered in\n * the component's renderer. Normally all host bindings are evaluated with the parent\n * component's renderer, but, in the case of animation @triggers, they need to be\n * evaluated with the sub component's renderer (because that's where the animation\n * triggers are defined).\n *\n * Do not use this instruction as a replacement for `elementProperty`. This instruction\n * only exists to ensure compatibility with the ViewEngine's host binding behavior.\n *\n * @param index The index of the element to update in the data array\n * @param propName Name of property. Because it is going to DOM, this is not subject to\n * renaming as part of minification.\n * @param value New value to write.\n * @param sanitizer An optional function used to sanitize the value.\n *\n * @codeGenApi\n */\n function ɵɵsyntheticHostProperty(propName, value, sanitizer) {\n var lView = getLView();\n var bindingIndex = nextBindingIndex();\n if (bindingUpdated(lView, bindingIndex, value)) {\n var tView = getTView();\n var tNode = getSelectedTNode();\n var currentDef = getCurrentDirectiveDef(tView.data);\n var renderer = loadComponentRenderer(currentDef, tNode, lView);\n elementPropertyInternal(tView, tNode, lView, propName, value, renderer, sanitizer, true);\n ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, bindingIndex);\n }\n return ɵɵsyntheticHostProperty;\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 * NOTE: changes to the `ngI18nClosureMode` name must be synced with `compiler-cli/src/tooling.ts`.\n */\n if (typeof ngI18nClosureMode === 'undefined') {\n // These property accesses can be ignored because ngI18nClosureMode will be set to false\n // when optimizing code and the whole if statement will be dropped.\n // Make sure to refer to ngI18nClosureMode as ['ngI18nClosureMode'] for closure.\n // NOTE: we need to have it in IIFE so that the tree-shaker is happy.\n (function () {\n // tslint:disable-next-line:no-toplevel-property-access\n _global['ngI18nClosureMode'] =\n // TODO(FW-1250): validate that this actually, you know, works.\n // tslint:disable-next-line:no-toplevel-property-access\n typeof goog !== 'undefined' && typeof goog.getMsg === 'function';\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 CODE IS GENERATED - DO NOT MODIFY\n // See angular/tools/gulp-tasks/cldr/extract.js\n var u = undefined;\n function plural(n) {\n var i = Math.floor(Math.abs(n)), v = n.toString().replace(/^[^.]*\\.?/, '').length;\n if (i === 1 && v === 0)\n return 1;\n return 5;\n }\n var localeEn = [\n 'en',\n [['a', 'p'], ['AM', 'PM'], u],\n [['AM', 'PM'], u, u],\n [\n ['S', 'M', 'T', 'W', 'T', 'F', 'S'], ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],\n ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa']\n ],\n u,\n [\n ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'],\n ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],\n [\n 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September',\n 'October', 'November', 'December'\n ]\n ],\n u,\n [['B', 'A'], ['BC', 'AD'], ['Before Christ', 'Anno Domini']],\n 0,\n [6, 0],\n ['M/d/yy', 'MMM d, y', 'MMMM d, y', 'EEEE, MMMM d, y'],\n ['h:mm a', 'h:mm:ss a', 'h:mm:ss a z', 'h:mm:ss a zzzz'],\n ['{1}, {0}', u, '{1} \\'at\\' {0}', u],\n ['.', ',', ';', '%', '+', '-', 'E', '×', '‰', '∞', 'NaN', ':'],\n ['#,##0.###', '#,##0%', '¤#,##0.00', '#E0'],\n 'USD',\n '$',\n 'US Dollar',\n {},\n 'ltr',\n plural\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 const is used to store the locale data registered with `registerLocaleData`\n */\n var LOCALE_DATA = {};\n /**\n * Register locale data to be used internally by Angular. See the\n * [\"I18n guide\"](guide/i18n#i18n-pipes) to know how to import additional locale data.\n *\n * The signature `registerLocaleData(data: any, extraData?: any)` is deprecated since v5.1\n */\n function registerLocaleData(data, localeId, extraData) {\n if (typeof localeId !== 'string') {\n extraData = localeId;\n localeId = data[exports.ɵLocaleDataIndex.LocaleId];\n }\n localeId = localeId.toLowerCase().replace(/_/g, '-');\n LOCALE_DATA[localeId] = data;\n if (extraData) {\n LOCALE_DATA[localeId][exports.ɵLocaleDataIndex.ExtraData] = extraData;\n }\n }\n /**\n * Finds the locale data for a given locale.\n *\n * @param locale The locale code.\n * @returns The locale data.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n */\n function findLocaleData(locale) {\n var normalizedLocale = normalizeLocale(locale);\n var match = getLocaleData(normalizedLocale);\n if (match) {\n return match;\n }\n // let's try to find a parent locale\n var parentLocale = normalizedLocale.split('-')[0];\n match = getLocaleData(parentLocale);\n if (match) {\n return match;\n }\n if (parentLocale === 'en') {\n return localeEn;\n }\n throw new Error(\"Missing locale data for the locale \\\"\" + locale + \"\\\".\");\n }\n /**\n * Retrieves the default currency code for the given locale.\n *\n * The default is defined as the first currency which is still in use.\n *\n * @param locale The code of the locale whose currency code we want.\n * @returns The code of the default currency for the given locale.\n *\n */\n function getLocaleCurrencyCode(locale) {\n var data = findLocaleData(locale);\n return data[exports.ɵLocaleDataIndex.CurrencyCode] || null;\n }\n /**\n * Retrieves the plural function used by ICU expressions to determine the plural case to use\n * for a given locale.\n * @param locale A locale code for the locale format rules to use.\n * @returns The plural function for the locale.\n * @see `NgPlural`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n */\n function getLocalePluralCase(locale) {\n var data = findLocaleData(locale);\n return data[exports.ɵLocaleDataIndex.PluralCase];\n }\n /**\n * Helper function to get the given `normalizedLocale` from `LOCALE_DATA`\n * or from the global `ng.common.locale`.\n */\n function getLocaleData(normalizedLocale) {\n if (!(normalizedLocale in LOCALE_DATA)) {\n LOCALE_DATA[normalizedLocale] = _global.ng && _global.ng.common && _global.ng.common.locales &&\n _global.ng.common.locales[normalizedLocale];\n }\n return LOCALE_DATA[normalizedLocale];\n }\n /**\n * Helper function to remove all the locale data from `LOCALE_DATA`.\n */\n function unregisterAllLocaleData() {\n LOCALE_DATA = {};\n }\n (function (LocaleDataIndex) {\n LocaleDataIndex[LocaleDataIndex[\"LocaleId\"] = 0] = \"LocaleId\";\n LocaleDataIndex[LocaleDataIndex[\"DayPeriodsFormat\"] = 1] = \"DayPeriodsFormat\";\n LocaleDataIndex[LocaleDataIndex[\"DayPeriodsStandalone\"] = 2] = \"DayPeriodsStandalone\";\n LocaleDataIndex[LocaleDataIndex[\"DaysFormat\"] = 3] = \"DaysFormat\";\n LocaleDataIndex[LocaleDataIndex[\"DaysStandalone\"] = 4] = \"DaysStandalone\";\n LocaleDataIndex[LocaleDataIndex[\"MonthsFormat\"] = 5] = \"MonthsFormat\";\n LocaleDataIndex[LocaleDataIndex[\"MonthsStandalone\"] = 6] = \"MonthsStandalone\";\n LocaleDataIndex[LocaleDataIndex[\"Eras\"] = 7] = \"Eras\";\n LocaleDataIndex[LocaleDataIndex[\"FirstDayOfWeek\"] = 8] = \"FirstDayOfWeek\";\n LocaleDataIndex[LocaleDataIndex[\"WeekendRange\"] = 9] = \"WeekendRange\";\n LocaleDataIndex[LocaleDataIndex[\"DateFormat\"] = 10] = \"DateFormat\";\n LocaleDataIndex[LocaleDataIndex[\"TimeFormat\"] = 11] = \"TimeFormat\";\n LocaleDataIndex[LocaleDataIndex[\"DateTimeFormat\"] = 12] = \"DateTimeFormat\";\n LocaleDataIndex[LocaleDataIndex[\"NumberSymbols\"] = 13] = \"NumberSymbols\";\n LocaleDataIndex[LocaleDataIndex[\"NumberFormats\"] = 14] = \"NumberFormats\";\n LocaleDataIndex[LocaleDataIndex[\"CurrencyCode\"] = 15] = \"CurrencyCode\";\n LocaleDataIndex[LocaleDataIndex[\"CurrencySymbol\"] = 16] = \"CurrencySymbol\";\n LocaleDataIndex[LocaleDataIndex[\"CurrencyName\"] = 17] = \"CurrencyName\";\n LocaleDataIndex[LocaleDataIndex[\"Currencies\"] = 18] = \"Currencies\";\n LocaleDataIndex[LocaleDataIndex[\"Directionality\"] = 19] = \"Directionality\";\n LocaleDataIndex[LocaleDataIndex[\"PluralCase\"] = 20] = \"PluralCase\";\n LocaleDataIndex[LocaleDataIndex[\"ExtraData\"] = 21] = \"ExtraData\";\n })(exports.ɵLocaleDataIndex || (exports.ɵLocaleDataIndex = {}));\n /**\n * Returns the canonical form of a locale name - lowercase with `_` replaced with `-`.\n */\n function normalizeLocale(locale) {\n return locale.toLowerCase().replace(/_/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 var pluralMapping = ['zero', 'one', 'two', 'few', 'many'];\n /**\n * Returns the plural case based on the locale\n */\n function getPluralCase(value, locale) {\n var plural = getLocalePluralCase(locale)(parseInt(value, 10));\n var result = pluralMapping[plural];\n return (result !== undefined) ? result : 'other';\n }\n /**\n * The locale id that the application is using by default (for translations and ICU expressions).\n */\n var DEFAULT_LOCALE_ID = 'en-US';\n /**\n * USD currency code that the application uses by default for CurrencyPipe when no\n * DEFAULT_CURRENCY_CODE is provided.\n */\n var USD_CURRENCY_CODE = 'USD';\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 * Marks that the next string is an element name.\n *\n * See `I18nMutateOpCodes` documentation.\n */\n var ELEMENT_MARKER = {\n marker: 'element'\n };\n /**\n * Marks that the next string is comment text need for ICU.\n *\n * See `I18nMutateOpCodes` documentation.\n */\n var ICU_MARKER = {\n marker: 'ICU'\n };\n /**\n * See `I18nCreateOpCodes`\n */\n var I18nCreateOpCode;\n (function (I18nCreateOpCode) {\n /**\n * Number of bits to shift index so that it can be combined with the `APPEND_EAGERLY` and\n * `COMMENT`.\n */\n I18nCreateOpCode[I18nCreateOpCode[\"SHIFT\"] = 2] = \"SHIFT\";\n /**\n * Should the node be appended to parent imedditatly after creation.\n */\n I18nCreateOpCode[I18nCreateOpCode[\"APPEND_EAGERLY\"] = 1] = \"APPEND_EAGERLY\";\n /**\n * If set the node should be comment (rather than a text) node.\n */\n I18nCreateOpCode[I18nCreateOpCode[\"COMMENT\"] = 2] = \"COMMENT\";\n })(I18nCreateOpCode || (I18nCreateOpCode = {}));\n // Note: This hack is necessary so we don't erroneously get a circular dependency\n // failure based on types.\n var unusedValueExportToPlacateAjd$6 = 1;\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 locale id that the application is currently using (for translations and ICU expressions).\n * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine\n * but is now defined as a global value.\n */\n var LOCALE_ID = DEFAULT_LOCALE_ID;\n /**\n * Sets the locale id that will be used for translations and ICU expressions.\n * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine\n * but is now defined as a global value.\n *\n * @param localeId\n */\n function setLocaleId(localeId) {\n assertDefined(localeId, \"Expected localeId to be defined\");\n if (typeof localeId === 'string') {\n LOCALE_ID = localeId.toLowerCase().replace(/_/g, '-');\n }\n }\n /**\n * Gets the locale id that will be used for translations and ICU expressions.\n * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine\n * but is now defined as a global value.\n */\n function getLocaleId() {\n return LOCALE_ID;\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 * Find a node in front of which `currentTNode` should be inserted (takes i18n into account).\n *\n * This method determines the `RNode` in front of which we should insert the `currentRNode`. This\n * takes `TNode.insertBeforeIndex` into account.\n *\n * @param parentTNode parent `TNode`\n * @param currentTNode current `TNode` (The node which we would like to insert into the DOM)\n * @param lView current `LView`\n */\n function getInsertInFrontOfRNodeWithI18n(parentTNode, currentTNode, lView) {\n var tNodeInsertBeforeIndex = currentTNode.insertBeforeIndex;\n var insertBeforeIndex = Array.isArray(tNodeInsertBeforeIndex) ? tNodeInsertBeforeIndex[0] : tNodeInsertBeforeIndex;\n if (insertBeforeIndex === null) {\n return getInsertInFrontOfRNodeWithNoI18n(parentTNode, currentTNode, lView);\n }\n else {\n ngDevMode && assertIndexInRange(lView, insertBeforeIndex);\n return unwrapRNode(lView[insertBeforeIndex]);\n }\n }\n /**\n * Process `TNode.insertBeforeIndex` by adding i18n text nodes.\n *\n * See `TNode.insertBeforeIndex`\n */\n function processI18nInsertBefore(renderer, childTNode, lView, childRNode, parentRElement) {\n var tNodeInsertBeforeIndex = childTNode.insertBeforeIndex;\n if (Array.isArray(tNodeInsertBeforeIndex)) {\n // An array indicates that there are i18n nodes that need to be added as children of this\n // `childRNode`. These i18n nodes were created before this `childRNode` was available and so\n // only now can be added. The first element of the array is the normal index where we should\n // insert the `childRNode`. Additional elements are the extra nodes to be added as children of\n // `childRNode`.\n ngDevMode && assertDomNode(childRNode);\n var i18nParent = childRNode;\n var anchorRNode = null;\n if (!(childTNode.type & 3 /* AnyRNode */)) {\n anchorRNode = i18nParent;\n i18nParent = parentRElement;\n }\n if (i18nParent !== null && (childTNode.flags & 2 /* isComponentHost */) === 0) {\n for (var i = 1; i < tNodeInsertBeforeIndex.length; i++) {\n // No need to `unwrapRNode` because all of the indexes point to i18n text nodes.\n // see `assertDomNode` below.\n var i18nChild = lView[tNodeInsertBeforeIndex[i]];\n nativeInsertBefore(renderer, i18nParent, i18nChild, anchorRNode, false);\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 */\n /**\n * Add `tNode` to `previousTNodes` list and update relevant `TNode`s in `previousTNodes` list\n * `tNode.insertBeforeIndex`.\n *\n * Things to keep in mind:\n * 1. All i18n text nodes are encoded as `TNodeType.Element` and are created eagerly by the\n * `ɵɵi18nStart` instruction.\n * 2. All `TNodeType.Placeholder` `TNodes` are elements which will be created later by\n * `ɵɵelementStart` instruction.\n * 3. `ɵɵelementStart` instruction will create `TNode`s in the ascending `TNode.index` order. (So a\n * smaller index `TNode` is guaranteed to be created before a larger one)\n *\n * We use the above three invariants to determine `TNode.insertBeforeIndex`.\n *\n * In an ideal world `TNode.insertBeforeIndex` would always be `TNode.next.index`. However,\n * this will not work because `TNode.next.index` may be larger than `TNode.index` which means that\n * the next node is not yet created and therefore we can't insert in front of it.\n *\n * Rule1: `TNode.insertBeforeIndex = null` if `TNode.next === null` (Initial condition, as we don't\n * know if there will be further `TNode`s inserted after.)\n * Rule2: If `previousTNode` is created after the `tNode` being inserted, then\n * `previousTNode.insertBeforeNode = tNode.index` (So when a new `tNode` is added we check\n * previous to see if we can update its `insertBeforeTNode`)\n *\n * See `TNode.insertBeforeIndex` for more context.\n *\n * @param previousTNodes A list of previous TNodes so that we can easily traverse `TNode`s in\n * reverse order. (If `TNode` would have `previous` this would not be necessary.)\n * @param newTNode A TNode to add to the `previousTNodes` list.\n */\n function addTNodeAndUpdateInsertBeforeIndex(previousTNodes, newTNode) {\n // Start with Rule1\n ngDevMode &&\n assertEqual(newTNode.insertBeforeIndex, null, 'We expect that insertBeforeIndex is not set');\n previousTNodes.push(newTNode);\n if (previousTNodes.length > 1) {\n for (var i = previousTNodes.length - 2; i >= 0; i--) {\n var existingTNode = previousTNodes[i];\n // Text nodes are created eagerly and so they don't need their `indexBeforeIndex` updated.\n // It is safe to ignore them.\n if (!isI18nText(existingTNode)) {\n if (isNewTNodeCreatedBefore(existingTNode, newTNode) &&\n getInsertBeforeIndex(existingTNode) === null) {\n // If it was created before us in time, (and it does not yet have `insertBeforeIndex`)\n // then add the `insertBeforeIndex`.\n setInsertBeforeIndex(existingTNode, newTNode.index);\n }\n }\n }\n }\n }\n function isI18nText(tNode) {\n return !(tNode.type & 64 /* Placeholder */);\n }\n function isNewTNodeCreatedBefore(existingTNode, newTNode) {\n return isI18nText(newTNode) || existingTNode.index > newTNode.index;\n }\n function getInsertBeforeIndex(tNode) {\n var index = tNode.insertBeforeIndex;\n return Array.isArray(index) ? index[0] : index;\n }\n function setInsertBeforeIndex(tNode, value) {\n var index = tNode.insertBeforeIndex;\n if (Array.isArray(index)) {\n // Array is stored if we have to insert child nodes. See `TNode.insertBeforeIndex`\n index[0] = value;\n }\n else {\n setI18nHandling(getInsertInFrontOfRNodeWithI18n, processI18nInsertBefore);\n tNode.insertBeforeIndex = 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 */\n /**\n * Retrieve `TIcu` at a given `index`.\n *\n * The `TIcu` can be stored either directly (if it is nested ICU) OR\n * it is stored inside tho `TIcuContainer` if it is top level ICU.\n *\n * The reason for this is that the top level ICU need a `TNode` so that they are part of the render\n * tree, but nested ICU's have no TNode, because we don't know ahead of time if the nested ICU is\n * expressed (parent ICU may have selected a case which does not contain it.)\n *\n * @param tView Current `TView`.\n * @param index Index where the value should be read from.\n */\n function getTIcu(tView, index) {\n var value = tView.data[index];\n if (value === null || typeof value === 'string')\n return null;\n if (ngDevMode &&\n !(value.hasOwnProperty('tViews') || value.hasOwnProperty('currentCaseLViewIndex'))) {\n throwError('We expect to get \\'null\\'|\\'TIcu\\'|\\'TIcuContainer\\', but got: ' + value);\n }\n // Here the `value.hasOwnProperty('currentCaseLViewIndex')` is a polymorphic read as it can be\n // either TIcu or TIcuContainerNode. This is not ideal, but we still think it is OK because it\n // will be just two cases which fits into the browser inline cache (inline cache can take up to\n // 4)\n var tIcu = value.hasOwnProperty('currentCaseLViewIndex') ? value :\n value.value;\n ngDevMode && assertTIcu(tIcu);\n return tIcu;\n }\n /**\n * Store `TIcu` at a give `index`.\n *\n * The `TIcu` can be stored either directly (if it is nested ICU) OR\n * it is stored inside tho `TIcuContainer` if it is top level ICU.\n *\n * The reason for this is that the top level ICU need a `TNode` so that they are part of the render\n * tree, but nested ICU's have no TNode, because we don't know ahead of time if the nested ICU is\n * expressed (parent ICU may have selected a case which does not contain it.)\n *\n * @param tView Current `TView`.\n * @param index Index where the value should be stored at in `Tview.data`\n * @param tIcu The TIcu to store.\n */\n function setTIcu(tView, index, tIcu) {\n var tNode = tView.data[index];\n ngDevMode &&\n assertEqual(tNode === null || tNode.hasOwnProperty('tViews'), true, 'We expect to get \\'null\\'|\\'TIcuContainer\\'');\n if (tNode === null) {\n tView.data[index] = tIcu;\n }\n else {\n ngDevMode && assertTNodeType(tNode, 32 /* Icu */);\n tNode.value = tIcu;\n }\n }\n /**\n * Set `TNode.insertBeforeIndex` taking the `Array` into account.\n *\n * See `TNode.insertBeforeIndex`\n */\n function setTNodeInsertBeforeIndex(tNode, index) {\n ngDevMode && assertTNode(tNode);\n var insertBeforeIndex = tNode.insertBeforeIndex;\n if (insertBeforeIndex === null) {\n setI18nHandling(getInsertInFrontOfRNodeWithI18n, processI18nInsertBefore);\n insertBeforeIndex = tNode.insertBeforeIndex =\n [null /* may be updated to number later */, index];\n }\n else {\n assertEqual(Array.isArray(insertBeforeIndex), true, 'Expecting array here');\n insertBeforeIndex.push(index);\n }\n }\n /**\n * Create `TNode.type=TNodeType.Placeholder` node.\n *\n * See `TNodeType.Placeholder` for more information.\n */\n function createTNodePlaceholder(tView, previousTNodes, index) {\n var tNode = createTNodeAtIndex(tView, index, 64 /* Placeholder */, null, null);\n addTNodeAndUpdateInsertBeforeIndex(previousTNodes, tNode);\n return tNode;\n }\n /**\n * Returns current ICU case.\n *\n * ICU cases are stored as index into the `TIcu.cases`.\n * At times it is necessary to communicate that the ICU case just switched and that next ICU update\n * should update all bindings regardless of the mask. In such a case the we store negative numbers\n * for cases which have just been switched. This function removes the negative flag.\n */\n function getCurrentICUCaseIndex(tIcu, lView) {\n var currentCase = lView[tIcu.currentCaseLViewIndex];\n return currentCase === null ? currentCase : (currentCase < 0 ? ~currentCase : currentCase);\n }\n function getParentFromIcuCreateOpCode(mergedCode) {\n return mergedCode >>> 17 /* SHIFT_PARENT */;\n }\n function getRefFromIcuCreateOpCode(mergedCode) {\n return (mergedCode & 131070 /* MASK_REF */) >>> 1 /* SHIFT_REF */;\n }\n function getInstructionFromIcuCreateOpCode(mergedCode) {\n return mergedCode & 1 /* MASK_INSTRUCTION */;\n }\n function icuCreateOpCode(opCode, parentIdx, refIdx) {\n ngDevMode && assertGreaterThanOrEqual(parentIdx, 0, 'Missing parent index');\n ngDevMode && assertGreaterThan(refIdx, 0, 'Missing ref index');\n return opCode | parentIdx << 17 /* SHIFT_PARENT */ | refIdx << 1 /* SHIFT_REF */;\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 * Keep track of which input bindings in `ɵɵi18nExp` have changed.\n *\n * This is used to efficiently update expressions in i18n only when the corresponding input has\n * changed.\n *\n * 1) Each bit represents which of the `ɵɵi18nExp` has changed.\n * 2) There are 32 bits allowed in JS.\n * 3) Bit 32 is special as it is shared for all changes past 32. (In other words if you have more\n * than 32 `ɵɵi18nExp` then all changes past 32nd `ɵɵi18nExp` will be mapped to same bit. This means\n * that we may end up changing more than we need to. But i18n expressions with 32 bindings is rare\n * so in practice it should not be an issue.)\n */\n var changeMask = 0;\n /**\n * Keeps track of which bit needs to be updated in `changeMask`\n *\n * This value gets incremented on every call to `ɵɵi18nExp`\n */\n var changeMaskCounter = 0;\n /**\n * Keep track of which input bindings in `ɵɵi18nExp` have changed.\n *\n * `setMaskBit` gets invoked by each call to `ɵɵi18nExp`.\n *\n * @param hasChange did `ɵɵi18nExp` detect a change.\n */\n function setMaskBit(hasChange) {\n if (hasChange) {\n changeMask = changeMask | (1 << Math.min(changeMaskCounter, 31));\n }\n changeMaskCounter++;\n }\n function applyI18n(tView, lView, index) {\n if (changeMaskCounter > 0) {\n ngDevMode && assertDefined(tView, \"tView should be defined\");\n var tI18n = tView.data[index];\n // When `index` points to an `ɵɵi18nAttributes` then we have an array otherwise `TI18n`\n var updateOpCodes = Array.isArray(tI18n) ? tI18n : tI18n.update;\n var bindingsStartIndex = getBindingIndex() - changeMaskCounter - 1;\n applyUpdateOpCodes(tView, lView, updateOpCodes, bindingsStartIndex, changeMask);\n }\n // Reset changeMask & maskBit to default for the next update cycle\n changeMask = 0;\n changeMaskCounter = 0;\n }\n /**\n * Apply `I18nCreateOpCodes` op-codes as stored in `TI18n.create`.\n *\n * Creates text (and comment) nodes which are internationalized.\n *\n * @param lView Current lView\n * @param createOpCodes Set of op-codes to apply\n * @param parentRNode Parent node (so that direct children can be added eagerly) or `null` if it is\n * a root node.\n * @param insertInFrontOf DOM node that should be used as an anchor.\n */\n function applyCreateOpCodes(lView, createOpCodes, parentRNode, insertInFrontOf) {\n var renderer = lView[RENDERER];\n for (var i = 0; i < createOpCodes.length; i++) {\n var opCode = createOpCodes[i++];\n var text = createOpCodes[i];\n var isComment = (opCode & I18nCreateOpCode.COMMENT) === I18nCreateOpCode.COMMENT;\n var appendNow = (opCode & I18nCreateOpCode.APPEND_EAGERLY) === I18nCreateOpCode.APPEND_EAGERLY;\n var index = opCode >>> I18nCreateOpCode.SHIFT;\n var rNode = lView[index];\n if (rNode === null) {\n // We only create new DOM nodes if they don't already exist: If ICU switches case back to a\n // case which was already instantiated, no need to create new DOM nodes.\n rNode = lView[index] =\n isComment ? renderer.createComment(text) : createTextNode(renderer, text);\n }\n if (appendNow && parentRNode !== null) {\n nativeInsertBefore(renderer, parentRNode, rNode, insertInFrontOf, false);\n }\n }\n }\n /**\n * Apply `I18nMutateOpCodes` OpCodes.\n *\n * @param tView Current `TView`\n * @param mutableOpCodes Mutable OpCodes to process\n * @param lView Current `LView`\n * @param anchorRNode place where the i18n node should be inserted.\n */\n function applyMutableOpCodes(tView, mutableOpCodes, lView, anchorRNode) {\n ngDevMode && assertDomNode(anchorRNode);\n var renderer = lView[RENDERER];\n // `rootIdx` represents the node into which all inserts happen.\n var rootIdx = null;\n // `rootRNode` represents the real node into which we insert. This can be different from\n // `lView[rootIdx]` if we have projection.\n // - null we don't have a parent (as can be the case in when we are inserting into a root of\n // LView which has no parent.)\n // - `RElement` The element representing the root after taking projection into account.\n var rootRNode;\n for (var i = 0; i < mutableOpCodes.length; i++) {\n var opCode = mutableOpCodes[i];\n if (typeof opCode == 'string') {\n var textNodeIndex = mutableOpCodes[++i];\n if (lView[textNodeIndex] === null) {\n ngDevMode && ngDevMode.rendererCreateTextNode++;\n ngDevMode && assertIndexInRange(lView, textNodeIndex);\n lView[textNodeIndex] = createTextNode(renderer, opCode);\n }\n }\n else if (typeof opCode == 'number') {\n switch (opCode & 1 /* MASK_INSTRUCTION */) {\n case 0 /* AppendChild */:\n var parentIdx = getParentFromIcuCreateOpCode(opCode);\n if (rootIdx === null) {\n // The first operation should save the `rootIdx` because the first operation\n // must insert into the root. (Only subsequent operations can insert into a dynamic\n // parent)\n rootIdx = parentIdx;\n rootRNode = nativeParentNode(renderer, anchorRNode);\n }\n var insertInFrontOf = void 0;\n var parentRNode = void 0;\n if (parentIdx === rootIdx) {\n insertInFrontOf = anchorRNode;\n parentRNode = rootRNode;\n }\n else {\n insertInFrontOf = null;\n parentRNode = unwrapRNode(lView[parentIdx]);\n }\n // FIXME(misko): Refactor with `processI18nText`\n if (parentRNode !== null) {\n // This can happen if the `LView` we are adding to is not attached to a parent `LView`.\n // In such a case there is no \"root\" we can attach to. This is fine, as we still need to\n // create the elements. When the `LView` gets later added to a parent these \"root\" nodes\n // get picked up and added.\n ngDevMode && assertDomNode(parentRNode);\n var refIdx = getRefFromIcuCreateOpCode(opCode);\n ngDevMode && assertGreaterThan(refIdx, HEADER_OFFSET, 'Missing ref');\n // `unwrapRNode` is not needed here as all of these point to RNodes as part of the i18n\n // which can't have components.\n var child = lView[refIdx];\n ngDevMode && assertDomNode(child);\n nativeInsertBefore(renderer, parentRNode, child, insertInFrontOf, false);\n var tIcu = getTIcu(tView, refIdx);\n if (tIcu !== null && typeof tIcu === 'object') {\n // If we just added a comment node which has ICU then that ICU may have already been\n // rendered and therefore we need to re-add it here.\n ngDevMode && assertTIcu(tIcu);\n var caseIndex = getCurrentICUCaseIndex(tIcu, lView);\n if (caseIndex !== null) {\n applyMutableOpCodes(tView, tIcu.create[caseIndex], lView, lView[tIcu.anchorIdx]);\n }\n }\n }\n break;\n case 1 /* Attr */:\n var elementNodeIndex = opCode >>> 1 /* SHIFT_REF */;\n var attrName = mutableOpCodes[++i];\n var attrValue = mutableOpCodes[++i];\n // This code is used for ICU expressions only, since we don't support\n // directives/components in ICUs, we don't need to worry about inputs here\n setElementAttribute(renderer, getNativeByIndex(elementNodeIndex, lView), null, null, attrName, attrValue, null);\n break;\n default:\n throw new Error(\"Unable to determine the type of mutate operation for \\\"\" + opCode + \"\\\"\");\n }\n }\n else {\n switch (opCode) {\n case ICU_MARKER:\n var commentValue = mutableOpCodes[++i];\n var commentNodeIndex = mutableOpCodes[++i];\n if (lView[commentNodeIndex] === null) {\n ngDevMode &&\n assertEqual(typeof commentValue, 'string', \"Expected \\\"\" + commentValue + \"\\\" to be a comment node value\");\n ngDevMode && ngDevMode.rendererCreateComment++;\n ngDevMode && assertIndexInExpandoRange(lView, commentNodeIndex);\n var commentRNode = lView[commentNodeIndex] =\n createCommentNode(renderer, commentValue);\n // FIXME(misko): Attaching patch data is only needed for the root (Also add tests)\n attachPatchData(commentRNode, lView);\n }\n break;\n case ELEMENT_MARKER:\n var tagName = mutableOpCodes[++i];\n var elementNodeIndex = mutableOpCodes[++i];\n if (lView[elementNodeIndex] === null) {\n ngDevMode &&\n assertEqual(typeof tagName, 'string', \"Expected \\\"\" + tagName + \"\\\" to be an element node tag name\");\n ngDevMode && ngDevMode.rendererCreateElement++;\n ngDevMode && assertIndexInExpandoRange(lView, elementNodeIndex);\n var elementRNode = lView[elementNodeIndex] =\n createElementNode(renderer, tagName, null);\n // FIXME(misko): Attaching patch data is only needed for the root (Also add tests)\n attachPatchData(elementRNode, lView);\n }\n break;\n default:\n ngDevMode &&\n throwError(\"Unable to determine the type of mutate operation for \\\"\" + opCode + \"\\\"\");\n }\n }\n }\n }\n /**\n * Apply `I18nUpdateOpCodes` OpCodes\n *\n * @param tView Current `TView`\n * @param lView Current `LView`\n * @param updateOpCodes OpCodes to process\n * @param bindingsStartIndex Location of the first `ɵɵi18nApply`\n * @param changeMask Each bit corresponds to a `ɵɵi18nExp` (Counting backwards from\n * `bindingsStartIndex`)\n */\n function applyUpdateOpCodes(tView, lView, updateOpCodes, bindingsStartIndex, changeMask) {\n for (var i = 0; i < updateOpCodes.length; i++) {\n // bit code to check if we should apply the next update\n var checkBit = updateOpCodes[i];\n // Number of opCodes to skip until next set of update codes\n var skipCodes = updateOpCodes[++i];\n if (checkBit & changeMask) {\n // The value has been updated since last checked\n var value = '';\n for (var j = i + 1; j <= (i + skipCodes); j++) {\n var opCode = updateOpCodes[j];\n if (typeof opCode == 'string') {\n value += opCode;\n }\n else if (typeof opCode == 'number') {\n if (opCode < 0) {\n // Negative opCode represent `i18nExp` values offset.\n value += renderStringify(lView[bindingsStartIndex - opCode]);\n }\n else {\n var nodeIndex = (opCode >>> 2 /* SHIFT_REF */);\n switch (opCode & 3 /* MASK_OPCODE */) {\n case 1 /* Attr */:\n var propName = updateOpCodes[++j];\n var sanitizeFn = updateOpCodes[++j];\n var tNodeOrTagName = tView.data[nodeIndex];\n ngDevMode && assertDefined(tNodeOrTagName, 'Experting TNode or string');\n if (typeof tNodeOrTagName === 'string') {\n // IF we don't have a `TNode`, then we are an element in ICU (as ICU content does\n // not have TNode), in which case we know that there are no directives, and hence\n // we use attribute setting.\n setElementAttribute(lView[RENDERER], lView[nodeIndex], null, tNodeOrTagName, propName, value, sanitizeFn);\n }\n else {\n elementPropertyInternal(tView, tNodeOrTagName, lView, propName, value, lView[RENDERER], sanitizeFn, false);\n }\n break;\n case 0 /* Text */:\n var rText = lView[nodeIndex];\n rText !== null && updateTextNode(lView[RENDERER], rText, value);\n break;\n case 2 /* IcuSwitch */:\n applyIcuSwitchCase(tView, getTIcu(tView, nodeIndex), lView, value);\n break;\n case 3 /* IcuUpdate */:\n applyIcuUpdateCase(tView, getTIcu(tView, nodeIndex), bindingsStartIndex, lView);\n break;\n }\n }\n }\n }\n }\n else {\n var opCode = updateOpCodes[i + 1];\n if (opCode > 0 && (opCode & 3 /* MASK_OPCODE */) === 3 /* IcuUpdate */) {\n // Special case for the `icuUpdateCase`. It could be that the mask did not match, but\n // we still need to execute `icuUpdateCase` because the case has changed recently due to\n // previous `icuSwitchCase` instruction. (`icuSwitchCase` and `icuUpdateCase` always come in\n // pairs.)\n var nodeIndex = (opCode >>> 2 /* SHIFT_REF */);\n var tIcu = getTIcu(tView, nodeIndex);\n var currentIndex = lView[tIcu.currentCaseLViewIndex];\n if (currentIndex < 0) {\n applyIcuUpdateCase(tView, tIcu, bindingsStartIndex, lView);\n }\n }\n }\n i += skipCodes;\n }\n }\n /**\n * Apply OpCodes associated with updating an existing ICU.\n *\n * @param tView Current `TView`\n * @param tIcu Current `TIcu`\n * @param bindingsStartIndex Location of the first `ɵɵi18nApply`\n * @param lView Current `LView`\n */\n function applyIcuUpdateCase(tView, tIcu, bindingsStartIndex, lView) {\n ngDevMode && assertIndexInRange(lView, tIcu.currentCaseLViewIndex);\n var activeCaseIndex = lView[tIcu.currentCaseLViewIndex];\n if (activeCaseIndex !== null) {\n var mask = changeMask;\n if (activeCaseIndex < 0) {\n // Clear the flag.\n // Negative number means that the ICU was freshly created and we need to force the update.\n activeCaseIndex = lView[tIcu.currentCaseLViewIndex] = ~activeCaseIndex;\n // -1 is same as all bits on, which simulates creation since it marks all bits dirty\n mask = -1;\n }\n applyUpdateOpCodes(tView, lView, tIcu.update[activeCaseIndex], bindingsStartIndex, mask);\n }\n }\n /**\n * Apply OpCodes associated with switching a case on ICU.\n *\n * This involves tearing down existing case and than building up a new case.\n *\n * @param tView Current `TView`\n * @param tIcu Current `TIcu`\n * @param lView Current `LView`\n * @param value Value of the case to update to.\n */\n function applyIcuSwitchCase(tView, tIcu, lView, value) {\n // Rebuild a new case for this ICU\n var caseIndex = getCaseIndex(tIcu, value);\n var activeCaseIndex = getCurrentICUCaseIndex(tIcu, lView);\n if (activeCaseIndex !== caseIndex) {\n applyIcuSwitchCaseRemove(tView, tIcu, lView);\n lView[tIcu.currentCaseLViewIndex] = caseIndex === null ? null : ~caseIndex;\n if (caseIndex !== null) {\n // Add the nodes for the new case\n var anchorRNode = lView[tIcu.anchorIdx];\n if (anchorRNode) {\n ngDevMode && assertDomNode(anchorRNode);\n applyMutableOpCodes(tView, tIcu.create[caseIndex], lView, anchorRNode);\n }\n }\n }\n }\n /**\n * Apply OpCodes associated with tearing ICU case.\n *\n * This involves tearing down existing case and than building up a new case.\n *\n * @param tView Current `TView`\n * @param tIcu Current `TIcu`\n * @param lView Current `LView`\n */\n function applyIcuSwitchCaseRemove(tView, tIcu, lView) {\n var activeCaseIndex = getCurrentICUCaseIndex(tIcu, lView);\n if (activeCaseIndex !== null) {\n var removeCodes = tIcu.remove[activeCaseIndex];\n for (var i = 0; i < removeCodes.length; i++) {\n var nodeOrIcuIndex = removeCodes[i];\n if (nodeOrIcuIndex > 0) {\n // Positive numbers are `RNode`s.\n var rNode = getNativeByIndex(nodeOrIcuIndex, lView);\n rNode !== null && nativeRemoveNode(lView[RENDERER], rNode);\n }\n else {\n // Negative numbers are ICUs\n applyIcuSwitchCaseRemove(tView, getTIcu(tView, ~nodeOrIcuIndex), lView);\n }\n }\n }\n }\n /**\n * Returns the index of the current case of an ICU expression depending on the main binding value\n *\n * @param icuExpression\n * @param bindingValue The value of the main binding used by this ICU expression\n */\n function getCaseIndex(icuExpression, bindingValue) {\n var index = icuExpression.cases.indexOf(bindingValue);\n if (index === -1) {\n switch (icuExpression.type) {\n case 1 /* plural */: {\n var resolvedCase = getPluralCase(bindingValue, getLocaleId());\n index = icuExpression.cases.indexOf(resolvedCase);\n if (index === -1 && resolvedCase !== 'other') {\n index = icuExpression.cases.indexOf('other');\n }\n break;\n }\n case 0 /* select */: {\n index = icuExpression.cases.indexOf('other');\n break;\n }\n }\n }\n return index === -1 ? null : index;\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 function loadIcuContainerVisitor() {\n var _stack = [];\n var _index = -1;\n var _lView;\n var _removes;\n /**\n * Retrieves a set of root nodes from `TIcu.remove`. Used by `TNodeType.ICUContainer`\n * to determine which root belong to the ICU.\n *\n * Example of usage.\n * ```\n * const nextRNode = icuContainerIteratorStart(tIcuContainerNode, lView);\n * let rNode: RNode|null;\n * while(rNode = nextRNode()) {\n * console.log(rNode);\n * }\n * ```\n *\n * @param tIcuContainerNode Current `TIcuContainerNode`\n * @param lView `LView` where the `RNode`s should be looked up.\n */\n function icuContainerIteratorStart(tIcuContainerNode, lView) {\n _lView = lView;\n while (_stack.length)\n _stack.pop();\n ngDevMode && assertTNodeForLView(tIcuContainerNode, lView);\n enterIcu(tIcuContainerNode.value, lView);\n return icuContainerIteratorNext;\n }\n function enterIcu(tIcu, lView) {\n _index = 0;\n var currentCase = getCurrentICUCaseIndex(tIcu, lView);\n if (currentCase !== null) {\n ngDevMode && assertNumberInRange(currentCase, 0, tIcu.cases.length - 1);\n _removes = tIcu.remove[currentCase];\n }\n else {\n _removes = EMPTY_ARRAY$1;\n }\n }\n function icuContainerIteratorNext() {\n if (_index < _removes.length) {\n var removeOpCode = _removes[_index++];\n ngDevMode && assertNumber(removeOpCode, 'Expecting OpCode number');\n if (removeOpCode > 0) {\n var rNode = _lView[removeOpCode];\n ngDevMode && assertDomNode(rNode);\n return rNode;\n }\n else {\n _stack.push(_index, _removes);\n // ICUs are represented by negative indices\n var tIcuIndex = ~removeOpCode;\n var tIcu = _lView[TVIEW].data[tIcuIndex];\n ngDevMode && assertTIcu(tIcu);\n enterIcu(tIcu, _lView);\n return icuContainerIteratorNext();\n }\n }\n else {\n if (_stack.length === 0) {\n return null;\n }\n else {\n _removes = _stack.pop();\n _index = _stack.pop();\n return icuContainerIteratorNext();\n }\n }\n }\n return icuContainerIteratorStart;\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 * Converts `I18nCreateOpCodes` array into a human readable format.\n *\n * This function is attached to the `I18nCreateOpCodes.debug` property if `ngDevMode` is enabled.\n * This function provides a human readable view of the opcodes. This is useful when debugging the\n * application as well as writing more readable tests.\n *\n * @param this `I18nCreateOpCodes` if attached as a method.\n * @param opcodes `I18nCreateOpCodes` if invoked as a function.\n */\n function i18nCreateOpCodesToString(opcodes) {\n var createOpCodes = opcodes || (Array.isArray(this) ? this : []);\n var lines = [];\n for (var i = 0; i < createOpCodes.length; i++) {\n var opCode = createOpCodes[i++];\n var text = createOpCodes[i];\n var isComment = (opCode & I18nCreateOpCode.COMMENT) === I18nCreateOpCode.COMMENT;\n var appendNow = (opCode & I18nCreateOpCode.APPEND_EAGERLY) === I18nCreateOpCode.APPEND_EAGERLY;\n var index = opCode >>> I18nCreateOpCode.SHIFT;\n lines.push(\"lView[\" + index + \"] = document.\" + (isComment ? 'createComment' : 'createText') + \"(\" + JSON.stringify(text) + \");\");\n if (appendNow) {\n lines.push(\"parent.appendChild(lView[\" + index + \"]);\");\n }\n }\n return lines;\n }\n /**\n * Converts `I18nUpdateOpCodes` array into a human readable format.\n *\n * This function is attached to the `I18nUpdateOpCodes.debug` property if `ngDevMode` is enabled.\n * This function provides a human readable view of the opcodes. This is useful when debugging the\n * application as well as writing more readable tests.\n *\n * @param this `I18nUpdateOpCodes` if attached as a method.\n * @param opcodes `I18nUpdateOpCodes` if invoked as a function.\n */\n function i18nUpdateOpCodesToString(opcodes) {\n var parser = new OpCodeParser(opcodes || (Array.isArray(this) ? this : []));\n var lines = [];\n function consumeOpCode(value) {\n var ref = value >>> 2 /* SHIFT_REF */;\n var opCode = value & 3 /* MASK_OPCODE */;\n switch (opCode) {\n case 0 /* Text */:\n return \"(lView[\" + ref + \"] as Text).textContent = $$$\";\n case 1 /* Attr */:\n var attrName = parser.consumeString();\n var sanitizationFn = parser.consumeFunction();\n var value_1 = sanitizationFn ? \"(\" + sanitizationFn + \")($$$)\" : '$$$';\n return \"(lView[\" + ref + \"] as Element).setAttribute('\" + attrName + \"', \" + value_1 + \")\";\n case 2 /* IcuSwitch */:\n return \"icuSwitchCase(\" + ref + \", $$$)\";\n case 3 /* IcuUpdate */:\n return \"icuUpdateCase(\" + ref + \")\";\n }\n throw new Error('unexpected OpCode');\n }\n while (parser.hasMore()) {\n var mask = parser.consumeNumber();\n var size = parser.consumeNumber();\n var end = parser.i + size;\n var statements = [];\n var statement = '';\n while (parser.i < end) {\n var value = parser.consumeNumberOrString();\n if (typeof value === 'string') {\n statement += value;\n }\n else if (value < 0) {\n // Negative numbers are ref indexes\n // Here `i` refers to current binding index. It is to signify that the value is relative,\n // rather than absolute.\n statement += '${lView[i' + value + ']}';\n }\n else {\n // Positive numbers are operations.\n var opCodeText = consumeOpCode(value);\n statements.push(opCodeText.replace('$$$', '`' + statement + '`') + ';');\n statement = '';\n }\n }\n lines.push(\"if (mask & 0b\" + mask.toString(2) + \") { \" + statements.join(' ') + \" }\");\n }\n return lines;\n }\n /**\n * Converts `I18nCreateOpCodes` array into a human readable format.\n *\n * This function is attached to the `I18nCreateOpCodes.debug` if `ngDevMode` is enabled. This\n * function provides a human readable view of the opcodes. This is useful when debugging the\n * application as well as writing more readable tests.\n *\n * @param this `I18nCreateOpCodes` if attached as a method.\n * @param opcodes `I18nCreateOpCodes` if invoked as a function.\n */\n function icuCreateOpCodesToString(opcodes) {\n var parser = new OpCodeParser(opcodes || (Array.isArray(this) ? this : []));\n var lines = [];\n function consumeOpCode(opCode) {\n var parent = getParentFromIcuCreateOpCode(opCode);\n var ref = getRefFromIcuCreateOpCode(opCode);\n switch (getInstructionFromIcuCreateOpCode(opCode)) {\n case 0 /* AppendChild */:\n return \"(lView[\" + parent + \"] as Element).appendChild(lView[\" + lastRef + \"])\";\n case 1 /* Attr */:\n return \"(lView[\" + ref + \"] as Element).setAttribute(\\\"\" + parser.consumeString() + \"\\\", \\\"\" + parser.consumeString() + \"\\\")\";\n }\n throw new Error('Unexpected OpCode: ' + getInstructionFromIcuCreateOpCode(opCode));\n }\n var lastRef = -1;\n while (parser.hasMore()) {\n var value = parser.consumeNumberStringOrMarker();\n if (value === ICU_MARKER) {\n var text = parser.consumeString();\n lastRef = parser.consumeNumber();\n lines.push(\"lView[\" + lastRef + \"] = document.createComment(\\\"\" + text + \"\\\")\");\n }\n else if (value === ELEMENT_MARKER) {\n var text = parser.consumeString();\n lastRef = parser.consumeNumber();\n lines.push(\"lView[\" + lastRef + \"] = document.createElement(\\\"\" + text + \"\\\")\");\n }\n else if (typeof value === 'string') {\n lastRef = parser.consumeNumber();\n lines.push(\"lView[\" + lastRef + \"] = document.createTextNode(\\\"\" + value + \"\\\")\");\n }\n else if (typeof value === 'number') {\n var line = consumeOpCode(value);\n line && lines.push(line);\n }\n else {\n throw new Error('Unexpected value');\n }\n }\n return lines;\n }\n /**\n * Converts `I18nRemoveOpCodes` array into a human readable format.\n *\n * This function is attached to the `I18nRemoveOpCodes.debug` if `ngDevMode` is enabled. This\n * function provides a human readable view of the opcodes. This is useful when debugging the\n * application as well as writing more readable tests.\n *\n * @param this `I18nRemoveOpCodes` if attached as a method.\n * @param opcodes `I18nRemoveOpCodes` if invoked as a function.\n */\n function i18nRemoveOpCodesToString(opcodes) {\n var removeCodes = opcodes || (Array.isArray(this) ? this : []);\n var lines = [];\n for (var i = 0; i < removeCodes.length; i++) {\n var nodeOrIcuIndex = removeCodes[i];\n if (nodeOrIcuIndex > 0) {\n // Positive numbers are `RNode`s.\n lines.push(\"remove(lView[\" + nodeOrIcuIndex + \"])\");\n }\n else {\n // Negative numbers are ICUs\n lines.push(\"removeNestedICU(\" + ~nodeOrIcuIndex + \")\");\n }\n }\n return lines;\n }\n var OpCodeParser = /** @class */ (function () {\n function OpCodeParser(codes) {\n this.i = 0;\n this.codes = codes;\n }\n OpCodeParser.prototype.hasMore = function () {\n return this.i < this.codes.length;\n };\n OpCodeParser.prototype.consumeNumber = function () {\n var value = this.codes[this.i++];\n assertNumber(value, 'expecting number in OpCode');\n return value;\n };\n OpCodeParser.prototype.consumeString = function () {\n var value = this.codes[this.i++];\n assertString(value, 'expecting string in OpCode');\n return value;\n };\n OpCodeParser.prototype.consumeFunction = function () {\n var value = this.codes[this.i++];\n if (value === null || typeof value === 'function') {\n return value;\n }\n throw new Error('expecting function in OpCode');\n };\n OpCodeParser.prototype.consumeNumberOrString = function () {\n var value = this.codes[this.i++];\n if (typeof value === 'string') {\n return value;\n }\n assertNumber(value, 'expecting number or string in OpCode');\n return value;\n };\n OpCodeParser.prototype.consumeNumberStringOrMarker = function () {\n var value = this.codes[this.i++];\n if (typeof value === 'string' || typeof value === 'number' || value == ICU_MARKER ||\n value == ELEMENT_MARKER) {\n return value;\n }\n assertNumber(value, 'expecting number, string, ICU_MARKER or ELEMENT_MARKER in OpCode');\n return value;\n };\n return OpCodeParser;\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 var BINDING_REGEXP = /�(\\d+):?\\d*�/gi;\n var ICU_REGEXP = /({\\s*�\\d+:?\\d*�\\s*,\\s*\\S{6}\\s*,[\\s\\S]*})/gi;\n var NESTED_ICU = /�(\\d+)�/;\n var ICU_BLOCK_REGEXP = /^\\s*(�\\d+:?\\d*�)\\s*,\\s*(select|plural)\\s*,/;\n var MARKER = \"\\uFFFD\";\n var SUBTEMPLATE_REGEXP = /�\\/?\\*(\\d+:\\d+)�/gi;\n var PH_REGEXP = /�(\\/?[#*]\\d+):?\\d*�/gi;\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, since translations\n * might contain this special character.\n */\n var NGSP_UNICODE_REGEXP = /\\uE500/g;\n function replaceNgsp(value) {\n return value.replace(NGSP_UNICODE_REGEXP, ' ');\n }\n /**\n * Create dynamic nodes from i18n translation block.\n *\n * - Text nodes are created synchronously\n * - TNodes are linked into tree lazily\n *\n * @param tView Current `TView`\n * @parentTNodeIndex index to the parent TNode of this i18n block\n * @param lView Current `LView`\n * @param index Index of `ɵɵi18nStart` instruction.\n * @param message Message to translate.\n * @param subTemplateIndex Index into the sub template of message translation. (ie in case of\n * `ngIf`) (-1 otherwise)\n */\n function i18nStartFirstCreatePass(tView, parentTNodeIndex, lView, index, message, subTemplateIndex) {\n var rootTNode = getCurrentParentTNode();\n var createOpCodes = [];\n var updateOpCodes = [];\n var existingTNodeStack = [[]];\n if (ngDevMode) {\n attachDebugGetter(createOpCodes, i18nCreateOpCodesToString);\n attachDebugGetter(updateOpCodes, i18nUpdateOpCodesToString);\n }\n message = getTranslationForTemplate(message, subTemplateIndex);\n var msgParts = replaceNgsp(message).split(PH_REGEXP);\n for (var i = 0; i < msgParts.length; i++) {\n var value = msgParts[i];\n if ((i & 1) === 0) {\n // Even indexes are text (including bindings & ICU expressions)\n var parts = i18nParseTextIntoPartsAndICU(value);\n for (var j = 0; j < parts.length; j++) {\n var part = parts[j];\n if ((j & 1) === 0) {\n // `j` is odd therefore `part` is string\n var text = part;\n ngDevMode && assertString(text, 'Parsed ICU part should be string');\n if (text !== '') {\n i18nStartFirstCreatePassProcessTextNode(tView, rootTNode, existingTNodeStack[0], createOpCodes, updateOpCodes, lView, text);\n }\n }\n else {\n // `j` is Even therefor `part` is an `ICUExpression`\n var icuExpression = part;\n // Verify that ICU expression has the right shape. Translations might contain invalid\n // constructions (while original messages were correct), so ICU parsing at runtime may\n // not succeed (thus `icuExpression` remains a string).\n // Note: we intentionally retain the error here by not using `ngDevMode`, because\n // the value can change based on the locale and users aren't guaranteed to hit\n // an invalid string while they're developing.\n if (typeof icuExpression !== 'object') {\n throw new Error(\"Unable to parse ICU expression in \\\"\" + message + \"\\\" message.\");\n }\n var icuContainerTNode = createTNodeAndAddOpCode(tView, rootTNode, existingTNodeStack[0], lView, createOpCodes, ngDevMode ? \"ICU \" + index + \":\" + icuExpression.mainBinding : '', true);\n var icuNodeIndex = icuContainerTNode.index;\n ngDevMode &&\n assertGreaterThanOrEqual(icuNodeIndex, HEADER_OFFSET, 'Index must be in absolute LView offset');\n icuStart(tView, lView, updateOpCodes, parentTNodeIndex, icuExpression, icuNodeIndex);\n }\n }\n }\n else {\n // Odd indexes are placeholders (elements and sub-templates)\n // At this point value is something like: '/#1:2' (originally coming from '�/#1:2�')\n var isClosing = value.charCodeAt(0) === 47 /* SLASH */;\n var type = value.charCodeAt(isClosing ? 1 : 0);\n ngDevMode && assertOneOf(type, 42 /* STAR */, 35 /* HASH */);\n var index_1 = HEADER_OFFSET + Number.parseInt(value.substring((isClosing ? 2 : 1)));\n if (isClosing) {\n existingTNodeStack.shift();\n setCurrentTNode(getCurrentParentTNode(), false);\n }\n else {\n var tNode = createTNodePlaceholder(tView, existingTNodeStack[0], index_1);\n existingTNodeStack.unshift([]);\n setCurrentTNode(tNode, true);\n }\n }\n }\n tView.data[index] = {\n create: createOpCodes,\n update: updateOpCodes,\n };\n }\n /**\n * Allocate space in i18n Range add create OpCode instruction to crete a text or comment node.\n *\n * @param tView Current `TView` needed to allocate space in i18n range.\n * @param rootTNode Root `TNode` of the i18n block. This node determines if the new TNode will be\n * added as part of the `i18nStart` instruction or as part of the `TNode.insertBeforeIndex`.\n * @param existingTNodes internal state for `addTNodeAndUpdateInsertBeforeIndex`.\n * @param lView Current `LView` needed to allocate space in i18n range.\n * @param createOpCodes Array storing `I18nCreateOpCodes` where new opCodes will be added.\n * @param text Text to be added when the `Text` or `Comment` node will be created.\n * @param isICU true if a `Comment` node for ICU (instead of `Text`) node should be created.\n */\n function createTNodeAndAddOpCode(tView, rootTNode, existingTNodes, lView, createOpCodes, text, isICU) {\n var i18nNodeIdx = allocExpando(tView, lView, 1, null);\n var opCode = i18nNodeIdx << I18nCreateOpCode.SHIFT;\n var parentTNode = getCurrentParentTNode();\n if (rootTNode === parentTNode) {\n // FIXME(misko): A null `parentTNode` should represent when we fall of the `LView` boundary.\n // (there is no parent), but in some circumstances (because we are inconsistent about how we set\n // `previousOrParentTNode`) it could point to `rootTNode` So this is a work around.\n parentTNode = null;\n }\n if (parentTNode === null) {\n // If we don't have a parent that means that we can eagerly add nodes.\n // If we have a parent than these nodes can't be added now (as the parent has not been created\n // yet) and instead the `parentTNode` is responsible for adding it. See\n // `TNode.insertBeforeIndex`\n opCode |= I18nCreateOpCode.APPEND_EAGERLY;\n }\n if (isICU) {\n opCode |= I18nCreateOpCode.COMMENT;\n ensureIcuContainerVisitorLoaded(loadIcuContainerVisitor);\n }\n createOpCodes.push(opCode, text === null ? '' : text);\n // We store `{{?}}` so that when looking at debug `TNodeType.template` we can see where the\n // bindings are.\n var tNode = createTNodeAtIndex(tView, i18nNodeIdx, isICU ? 32 /* Icu */ : 1 /* Text */, text === null ? (ngDevMode ? '{{?}}' : '') : text, null);\n addTNodeAndUpdateInsertBeforeIndex(existingTNodes, tNode);\n var tNodeIdx = tNode.index;\n setCurrentTNode(tNode, false /* Text nodes are self closing */);\n if (parentTNode !== null && rootTNode !== parentTNode) {\n // We are a child of deeper node (rather than a direct child of `i18nStart` instruction.)\n // We have to make sure to add ourselves to the parent.\n setTNodeInsertBeforeIndex(parentTNode, tNodeIdx);\n }\n return tNode;\n }\n /**\n * Processes text node in i18n block.\n *\n * Text nodes can have:\n * - Create instruction in `createOpCodes` for creating the text node.\n * - Allocate spec for text node in i18n range of `LView`\n * - If contains binding:\n * - bindings => allocate space in i18n range of `LView` to store the binding value.\n * - populate `updateOpCodes` with update instructions.\n *\n * @param tView Current `TView`\n * @param rootTNode Root `TNode` of the i18n block. This node determines if the new TNode will\n * be added as part of the `i18nStart` instruction or as part of the\n * `TNode.insertBeforeIndex`.\n * @param existingTNodes internal state for `addTNodeAndUpdateInsertBeforeIndex`.\n * @param createOpCodes Location where the creation OpCodes will be stored.\n * @param lView Current `LView`\n * @param text The translated text (which may contain binding)\n */\n function i18nStartFirstCreatePassProcessTextNode(tView, rootTNode, existingTNodes, createOpCodes, updateOpCodes, lView, text) {\n var hasBinding = text.match(BINDING_REGEXP);\n var tNode = createTNodeAndAddOpCode(tView, rootTNode, existingTNodes, lView, createOpCodes, hasBinding ? null : text, false);\n if (hasBinding) {\n generateBindingUpdateOpCodes(updateOpCodes, text, tNode.index, null, 0, null);\n }\n }\n /**\n * See `i18nAttributes` above.\n */\n function i18nAttributesFirstPass(tView, index, values) {\n var previousElement = getCurrentTNode();\n var previousElementIndex = previousElement.index;\n var updateOpCodes = [];\n if (ngDevMode) {\n attachDebugGetter(updateOpCodes, i18nUpdateOpCodesToString);\n }\n if (tView.firstCreatePass && tView.data[index] === null) {\n for (var i = 0; i < values.length; i += 2) {\n var attrName = values[i];\n var message = values[i + 1];\n if (message !== '') {\n // Check if attribute value contains an ICU and throw an error if that's the case.\n // ICUs in element attributes are not supported.\n // Note: we intentionally retain the error here by not using `ngDevMode`, because\n // the `value` can change based on the locale and users aren't guaranteed to hit\n // an invalid string while they're developing.\n if (ICU_REGEXP.test(message)) {\n throw new Error(\"ICU expressions are not supported in attributes. Message: \\\"\" + message + \"\\\".\");\n }\n // i18n attributes that hit this code path are guaranteed to have bindings, because\n // the compiler treats static i18n attributes as regular attribute bindings.\n // Since this may not be the first i18n attribute on this element we need to pass in how\n // many previous bindings there have already been.\n generateBindingUpdateOpCodes(updateOpCodes, message, previousElementIndex, attrName, countBindings(updateOpCodes), null);\n }\n }\n tView.data[index] = updateOpCodes;\n }\n }\n /**\n * Generate the OpCodes to update the bindings of a string.\n *\n * @param updateOpCodes Place where the update opcodes will be stored.\n * @param str The string containing the bindings.\n * @param destinationNode Index of the destination node which will receive the binding.\n * @param attrName Name of the attribute, if the string belongs to an attribute.\n * @param sanitizeFn Sanitization function used to sanitize the string after update, if necessary.\n * @param bindingStart The lView index of the next expression that can be bound via an opCode.\n * @returns The mask value for these bindings\n */\n function generateBindingUpdateOpCodes(updateOpCodes, str, destinationNode, attrName, bindingStart, sanitizeFn) {\n ngDevMode &&\n assertGreaterThanOrEqual(destinationNode, HEADER_OFFSET, 'Index must be in absolute LView offset');\n var maskIndex = updateOpCodes.length; // Location of mask\n var sizeIndex = maskIndex + 1; // location of size for skipping\n updateOpCodes.push(null, null); // Alloc space for mask and size\n var startIndex = maskIndex + 2; // location of first allocation.\n if (ngDevMode) {\n attachDebugGetter(updateOpCodes, i18nUpdateOpCodesToString);\n }\n var textParts = str.split(BINDING_REGEXP);\n var mask = 0;\n for (var j = 0; j < textParts.length; j++) {\n var textValue = textParts[j];\n if (j & 1) {\n // Odd indexes are bindings\n var bindingIndex = bindingStart + parseInt(textValue, 10);\n updateOpCodes.push(-1 - bindingIndex);\n mask = mask | toMaskBit(bindingIndex);\n }\n else if (textValue !== '') {\n // Even indexes are text\n updateOpCodes.push(textValue);\n }\n }\n updateOpCodes.push(destinationNode << 2 /* SHIFT_REF */ |\n (attrName ? 1 /* Attr */ : 0 /* Text */));\n if (attrName) {\n updateOpCodes.push(attrName, sanitizeFn);\n }\n updateOpCodes[maskIndex] = mask;\n updateOpCodes[sizeIndex] = updateOpCodes.length - startIndex;\n return mask;\n }\n /**\n * Count the number of bindings in the given `opCodes`.\n *\n * It could be possible to speed this up, by passing the number of bindings found back from\n * `generateBindingUpdateOpCodes()` to `i18nAttributesFirstPass()` but this would then require more\n * complexity in the code and/or transient objects to be created.\n *\n * Since this function is only called once when the template is instantiated, is trivial in the\n * first instance (since `opCodes` will be an empty array), and it is not common for elements to\n * contain multiple i18n bound attributes, it seems like this is a reasonable compromise.\n */\n function countBindings(opCodes) {\n var count = 0;\n for (var i = 0; i < opCodes.length; i++) {\n var opCode = opCodes[i];\n // Bindings are negative numbers.\n if (typeof opCode === 'number' && opCode < 0) {\n count++;\n }\n }\n return count;\n }\n /**\n * Convert binding index to mask bit.\n *\n * Each index represents a single bit on the bit-mask. Because bit-mask only has 32 bits, we make\n * the 32nd bit share all masks for all bindings higher than 32. Since it is extremely rare to\n * have more than 32 bindings this will be hit very rarely. The downside of hitting this corner\n * case is that we will execute binding code more often than necessary. (penalty of performance)\n */\n function toMaskBit(bindingIndex) {\n return 1 << Math.min(bindingIndex, 31);\n }\n function isRootTemplateMessage(subTemplateIndex) {\n return subTemplateIndex === -1;\n }\n /**\n * Removes everything inside the sub-templates of a message.\n */\n function removeInnerTemplateTranslation(message) {\n var match;\n var res = '';\n var index = 0;\n var inTemplate = false;\n var tagMatched;\n while ((match = SUBTEMPLATE_REGEXP.exec(message)) !== null) {\n if (!inTemplate) {\n res += message.substring(index, match.index + match[0].length);\n tagMatched = match[1];\n inTemplate = true;\n }\n else {\n if (match[0] === MARKER + \"/*\" + tagMatched + MARKER) {\n index = match.index;\n inTemplate = false;\n }\n }\n }\n ngDevMode &&\n assertEqual(inTemplate, false, \"Tag mismatch: unable to find the end of the sub-template in the translation \\\"\" + message + \"\\\"\");\n res += message.substr(index);\n return res;\n }\n /**\n * Extracts a part of a message and removes the rest.\n *\n * This method is used for extracting a part of the message associated with a template. A\n * translated message can span multiple templates.\n *\n * Example:\n * ```\n * <div i18n>Translate <span *ngIf>me</span>!</div>\n * ```\n *\n * @param message The message to crop\n * @param subTemplateIndex Index of the sub-template to extract. If undefined it returns the\n * external template and removes all sub-templates.\n */\n function getTranslationForTemplate(message, subTemplateIndex) {\n if (isRootTemplateMessage(subTemplateIndex)) {\n // We want the root template message, ignore all sub-templates\n return removeInnerTemplateTranslation(message);\n }\n else {\n // We want a specific sub-template\n var start = message.indexOf(\":\" + subTemplateIndex + MARKER) + 2 + subTemplateIndex.toString().length;\n var end = message.search(new RegExp(MARKER + \"\\\\/\\\\*\\\\d+:\" + subTemplateIndex + MARKER));\n return removeInnerTemplateTranslation(message.substring(start, end));\n }\n }\n /**\n * Generate the OpCodes for ICU expressions.\n *\n * @param icuExpression\n * @param index Index where the anchor is stored and an optional `TIcuContainerNode`\n * - `lView[anchorIdx]` points to a `Comment` node representing the anchor for the ICU.\n * - `tView.data[anchorIdx]` points to the `TIcuContainerNode` if ICU is root (`null` otherwise)\n */\n function icuStart(tView, lView, updateOpCodes, parentIdx, icuExpression, anchorIdx) {\n ngDevMode && assertDefined(icuExpression, 'ICU expression must be defined');\n var bindingMask = 0;\n var tIcu = {\n type: icuExpression.type,\n currentCaseLViewIndex: allocExpando(tView, lView, 1, null),\n anchorIdx: anchorIdx,\n cases: [],\n create: [],\n remove: [],\n update: []\n };\n addUpdateIcuSwitch(updateOpCodes, icuExpression, anchorIdx);\n setTIcu(tView, anchorIdx, tIcu);\n var values = icuExpression.values;\n for (var i = 0; i < values.length; i++) {\n // Each value is an array of strings & other ICU expressions\n var valueArr = values[i];\n var nestedIcus = [];\n for (var j = 0; j < valueArr.length; j++) {\n var value = valueArr[j];\n if (typeof value !== 'string') {\n // It is an nested ICU expression\n var icuIndex = nestedIcus.push(value) - 1;\n // Replace nested ICU expression by a comment node\n valueArr[j] = \"<!--\\uFFFD\" + icuIndex + \"\\uFFFD-->\";\n }\n }\n bindingMask = parseIcuCase(tView, tIcu, lView, updateOpCodes, parentIdx, icuExpression.cases[i], valueArr.join(''), nestedIcus) |\n bindingMask;\n }\n if (bindingMask) {\n addUpdateIcuUpdate(updateOpCodes, bindingMask, anchorIdx);\n }\n }\n /**\n * Parses text containing an ICU expression and produces a JSON object for it.\n * Original code from closure library, modified for Angular.\n *\n * @param pattern Text containing an ICU expression that needs to be parsed.\n *\n */\n function parseICUBlock(pattern) {\n var cases = [];\n var values = [];\n var icuType = 1 /* plural */;\n var mainBinding = 0;\n pattern = pattern.replace(ICU_BLOCK_REGEXP, function (str, binding, type) {\n if (type === 'select') {\n icuType = 0 /* select */;\n }\n else {\n icuType = 1 /* plural */;\n }\n mainBinding = parseInt(binding.substr(1), 10);\n return '';\n });\n var parts = i18nParseTextIntoPartsAndICU(pattern);\n // Looking for (key block)+ sequence. One of the keys has to be \"other\".\n for (var pos = 0; pos < parts.length;) {\n var key = parts[pos++].trim();\n if (icuType === 1 /* plural */) {\n // Key can be \"=x\", we just want \"x\"\n key = key.replace(/\\s*(?:=)?(\\w+)\\s*/, '$1');\n }\n if (key.length) {\n cases.push(key);\n }\n var blocks = i18nParseTextIntoPartsAndICU(parts[pos++]);\n if (cases.length > values.length) {\n values.push(blocks);\n }\n }\n // TODO(ocombe): support ICU expressions in attributes, see #21615\n return { type: icuType, mainBinding: mainBinding, cases: cases, values: values };\n }\n /**\n * Breaks pattern into strings and top level {...} blocks.\n * Can be used to break a message into text and ICU expressions, or to break an ICU expression\n * into keys and cases. Original code from closure library, modified for Angular.\n *\n * @param pattern (sub)Pattern to be broken.\n * @returns An `Array<string|IcuExpression>` where:\n * - odd positions: `string` => text between ICU expressions\n * - even positions: `ICUExpression` => ICU expression parsed into `ICUExpression` record.\n */\n function i18nParseTextIntoPartsAndICU(pattern) {\n if (!pattern) {\n return [];\n }\n var prevPos = 0;\n var braceStack = [];\n var results = [];\n var braces = /[{}]/g;\n // lastIndex doesn't get set to 0 so we have to.\n braces.lastIndex = 0;\n var match;\n while (match = braces.exec(pattern)) {\n var pos = match.index;\n if (match[0] == '}') {\n braceStack.pop();\n if (braceStack.length == 0) {\n // End of the block.\n var block = pattern.substring(prevPos, pos);\n if (ICU_BLOCK_REGEXP.test(block)) {\n results.push(parseICUBlock(block));\n }\n else {\n results.push(block);\n }\n prevPos = pos + 1;\n }\n }\n else {\n if (braceStack.length == 0) {\n var substring_1 = pattern.substring(prevPos, pos);\n results.push(substring_1);\n prevPos = pos + 1;\n }\n braceStack.push('{');\n }\n }\n var substring = pattern.substring(prevPos);\n results.push(substring);\n return results;\n }\n /**\n * Parses a node, its children and its siblings, and generates the mutate & update OpCodes.\n *\n */\n function parseIcuCase(tView, tIcu, lView, updateOpCodes, parentIdx, caseName, unsafeCaseHtml, nestedIcus) {\n var create = [];\n var remove = [];\n var update = [];\n if (ngDevMode) {\n attachDebugGetter(create, icuCreateOpCodesToString);\n attachDebugGetter(remove, i18nRemoveOpCodesToString);\n attachDebugGetter(update, i18nUpdateOpCodesToString);\n }\n tIcu.cases.push(caseName);\n tIcu.create.push(create);\n tIcu.remove.push(remove);\n tIcu.update.push(update);\n var inertBodyHelper = getInertBodyHelper(getDocument());\n var inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeCaseHtml);\n ngDevMode && assertDefined(inertBodyElement, 'Unable to generate inert body element');\n var inertRootNode = getTemplateContent(inertBodyElement) || inertBodyElement;\n if (inertRootNode) {\n return walkIcuTree(tView, tIcu, lView, updateOpCodes, create, remove, update, inertRootNode, parentIdx, nestedIcus, 0);\n }\n else {\n return 0;\n }\n }\n function walkIcuTree(tView, tIcu, lView, sharedUpdateOpCodes, create, remove, update, parentNode, parentIdx, nestedIcus, depth) {\n var bindingMask = 0;\n var currentNode = parentNode.firstChild;\n while (currentNode) {\n var newIndex = allocExpando(tView, lView, 1, null);\n switch (currentNode.nodeType) {\n case Node.ELEMENT_NODE:\n var element = currentNode;\n var tagName = element.tagName.toLowerCase();\n if (VALID_ELEMENTS.hasOwnProperty(tagName)) {\n addCreateNodeAndAppend(create, ELEMENT_MARKER, tagName, parentIdx, newIndex);\n tView.data[newIndex] = tagName;\n var elAttrs = element.attributes;\n for (var i = 0; i < elAttrs.length; i++) {\n var attr = elAttrs.item(i);\n var lowerAttrName = attr.name.toLowerCase();\n var hasBinding_1 = !!attr.value.match(BINDING_REGEXP);\n // we assume the input string is safe, unless it's using a binding\n if (hasBinding_1) {\n if (VALID_ATTRS.hasOwnProperty(lowerAttrName)) {\n if (URI_ATTRS[lowerAttrName]) {\n generateBindingUpdateOpCodes(update, attr.value, newIndex, attr.name, 0, _sanitizeUrl);\n }\n else if (SRCSET_ATTRS[lowerAttrName]) {\n generateBindingUpdateOpCodes(update, attr.value, newIndex, attr.name, 0, sanitizeSrcset);\n }\n else {\n generateBindingUpdateOpCodes(update, attr.value, newIndex, attr.name, 0, null);\n }\n }\n else {\n ngDevMode &&\n console.warn(\"WARNING: ignoring unsafe attribute value \" +\n (lowerAttrName + \" on element \" + tagName + \" \") +\n \"(see https://g.co/ng/security#xss)\");\n }\n }\n else {\n addCreateAttribute(create, newIndex, attr);\n }\n }\n // Parse the children of this node (if any)\n bindingMask = walkIcuTree(tView, tIcu, lView, sharedUpdateOpCodes, create, remove, update, currentNode, newIndex, nestedIcus, depth + 1) |\n bindingMask;\n addRemoveNode(remove, newIndex, depth);\n }\n break;\n case Node.TEXT_NODE:\n var value = currentNode.textContent || '';\n var hasBinding = value.match(BINDING_REGEXP);\n addCreateNodeAndAppend(create, null, hasBinding ? '' : value, parentIdx, newIndex);\n addRemoveNode(remove, newIndex, depth);\n if (hasBinding) {\n bindingMask =\n generateBindingUpdateOpCodes(update, value, newIndex, null, 0, null) | bindingMask;\n }\n break;\n case Node.COMMENT_NODE:\n // Check if the comment node is a placeholder for a nested ICU\n var isNestedIcu = NESTED_ICU.exec(currentNode.textContent || '');\n if (isNestedIcu) {\n var nestedIcuIndex = parseInt(isNestedIcu[1], 10);\n var icuExpression = nestedIcus[nestedIcuIndex];\n // Create the comment node that will anchor the ICU expression\n addCreateNodeAndAppend(create, ICU_MARKER, ngDevMode ? \"nested ICU \" + nestedIcuIndex : '', parentIdx, newIndex);\n icuStart(tView, lView, sharedUpdateOpCodes, parentIdx, icuExpression, newIndex);\n addRemoveNestedIcu(remove, newIndex, depth);\n }\n break;\n }\n currentNode = currentNode.nextSibling;\n }\n return bindingMask;\n }\n function addRemoveNode(remove, index, depth) {\n if (depth === 0) {\n remove.push(index);\n }\n }\n function addRemoveNestedIcu(remove, index, depth) {\n if (depth === 0) {\n remove.push(~index); // remove ICU at `index`\n remove.push(index); // remove ICU comment at `index`\n }\n }\n function addUpdateIcuSwitch(update, icuExpression, index) {\n update.push(toMaskBit(icuExpression.mainBinding), 2, -1 - icuExpression.mainBinding, index << 2 /* SHIFT_REF */ | 2 /* IcuSwitch */);\n }\n function addUpdateIcuUpdate(update, bindingMask, index) {\n update.push(bindingMask, 1, index << 2 /* SHIFT_REF */ | 3 /* IcuUpdate */);\n }\n function addCreateNodeAndAppend(create, marker, text, appendToParentIdx, createAtIdx) {\n if (marker !== null) {\n create.push(marker);\n }\n create.push(text, createAtIdx, icuCreateOpCode(0 /* AppendChild */, appendToParentIdx, createAtIdx));\n }\n function addCreateAttribute(create, newIndex, attr) {\n create.push(newIndex << 1 /* SHIFT_REF */ | 1 /* Attr */, attr.name, attr.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 */\n // i18nPostprocess consts\n var ROOT_TEMPLATE_ID = 0;\n var PP_MULTI_VALUE_PLACEHOLDERS_REGEXP = /\\[(�.+?�?)\\]/;\n var PP_PLACEHOLDERS_REGEXP = /\\[(�.+?�?)\\]|(�\\/?\\*\\d+:\\d+�)/g;\n var PP_ICU_VARS_REGEXP = /({\\s*)(VAR_(PLURAL|SELECT)(_\\d+)?)(\\s*,)/g;\n var PP_ICU_PLACEHOLDERS_REGEXP = /{([A-Z0-9_]+)}/g;\n var PP_ICUS_REGEXP = /�I18N_EXP_(ICU(_\\d+)?)�/g;\n var PP_CLOSE_TEMPLATE_REGEXP = /\\/\\*/;\n var PP_TEMPLATE_ID_REGEXP = /\\d+\\:(\\d+)/;\n /**\n * Handles message string post-processing for internationalization.\n *\n * Handles message string post-processing by transforming it from intermediate\n * format (that might contain some markers that we need to replace) to the final\n * form, consumable by i18nStart instruction. Post processing steps include:\n *\n * 1. Resolve all multi-value cases (like [�*1:1��#2:1�|�#4:1�|�5�])\n * 2. Replace all ICU vars (like \"VAR_PLURAL\")\n * 3. Replace all placeholders used inside ICUs in a form of {PLACEHOLDER}\n * 4. Replace all ICU references with corresponding values (like �ICU_EXP_ICU_1�)\n * in case multiple ICUs have the same placeholder name\n *\n * @param message Raw translation string for post processing\n * @param replacements Set of replacements that should be applied\n *\n * @returns Transformed string that can be consumed by i18nStart instruction\n *\n * @codeGenApi\n */\n function i18nPostprocess(message, replacements) {\n if (replacements === void 0) { replacements = {}; }\n /**\n * Step 1: resolve all multi-value placeholders like [�#5�|�*1:1��#2:1�|�#4:1�]\n *\n * Note: due to the way we process nested templates (BFS), multi-value placeholders are typically\n * grouped by templates, for example: [�#5�|�#6�|�#1:1�|�#3:2�] where �#5� and �#6� belong to root\n * template, �#1:1� belong to nested template with index 1 and �#1:2� - nested template with index\n * 3. However in real templates the order might be different: i.e. �#1:1� and/or �#3:2� may go in\n * front of �#6�. The post processing step restores the right order by keeping track of the\n * template id stack and looks for placeholders that belong to the currently active template.\n */\n var result = message;\n if (PP_MULTI_VALUE_PLACEHOLDERS_REGEXP.test(message)) {\n var matches_1 = {};\n var templateIdsStack_1 = [ROOT_TEMPLATE_ID];\n result = result.replace(PP_PLACEHOLDERS_REGEXP, function (m, phs, tmpl) {\n var content = phs || tmpl;\n var placeholders = matches_1[content] || [];\n if (!placeholders.length) {\n content.split('|').forEach(function (placeholder) {\n var match = placeholder.match(PP_TEMPLATE_ID_REGEXP);\n var templateId = match ? parseInt(match[1], 10) : ROOT_TEMPLATE_ID;\n var isCloseTemplateTag = PP_CLOSE_TEMPLATE_REGEXP.test(placeholder);\n placeholders.push([templateId, isCloseTemplateTag, placeholder]);\n });\n matches_1[content] = placeholders;\n }\n if (!placeholders.length) {\n throw new Error(\"i18n postprocess: unmatched placeholder - \" + content);\n }\n var currentTemplateId = templateIdsStack_1[templateIdsStack_1.length - 1];\n var idx = 0;\n // find placeholder index that matches current template id\n for (var i = 0; i < placeholders.length; i++) {\n if (placeholders[i][0] === currentTemplateId) {\n idx = i;\n break;\n }\n }\n // update template id stack based on the current tag extracted\n var _a = __read(placeholders[idx], 3), templateId = _a[0], isCloseTemplateTag = _a[1], placeholder = _a[2];\n if (isCloseTemplateTag) {\n templateIdsStack_1.pop();\n }\n else if (currentTemplateId !== templateId) {\n templateIdsStack_1.push(templateId);\n }\n // remove processed tag from the list\n placeholders.splice(idx, 1);\n return placeholder;\n });\n }\n // return current result if no replacements specified\n if (!Object.keys(replacements).length) {\n return result;\n }\n /**\n * Step 2: replace all ICU vars (like \"VAR_PLURAL\")\n */\n result = result.replace(PP_ICU_VARS_REGEXP, function (match, start, key, _type, _idx, end) {\n return replacements.hasOwnProperty(key) ? \"\" + start + replacements[key] + end : match;\n });\n /**\n * Step 3: replace all placeholders used inside ICUs in a form of {PLACEHOLDER}\n */\n result = result.replace(PP_ICU_PLACEHOLDERS_REGEXP, function (match, key) {\n return replacements.hasOwnProperty(key) ? replacements[key] : match;\n });\n /**\n * Step 4: replace all ICU references with corresponding values (like �ICU_EXP_ICU_1�) in case\n * multiple ICUs have the same placeholder name\n */\n result = result.replace(PP_ICUS_REGEXP, function (match, key) {\n if (replacements.hasOwnProperty(key)) {\n var list = replacements[key];\n if (!list.length) {\n throw new Error(\"i18n postprocess: unmatched ICU - \" + match + \" with key: \" + key);\n }\n return list.shift();\n }\n return match;\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 */\n /**\n * Marks a block of text as translatable.\n *\n * The instructions `i18nStart` and `i18nEnd` mark the translation block in the template.\n * The translation `message` is the value which is locale specific. The translation string may\n * contain placeholders which associate inner elements and sub-templates within the translation.\n *\n * The translation `message` placeholders are:\n * - `�{index}(:{block})�`: *Binding Placeholder*: Marks a location where an expression will be\n * interpolated into. The placeholder `index` points to the expression binding index. An optional\n * `block` that matches the sub-template in which it was declared.\n * - `�#{index}(:{block})�`/`�/#{index}(:{block})�`: *Element Placeholder*: Marks the beginning\n * and end of DOM element that were embedded in the original translation block. The placeholder\n * `index` points to the element index in the template instructions set. An optional `block` that\n * matches the sub-template in which it was declared.\n * - `�*{index}:{block}�`/`�/*{index}:{block}�`: *Sub-template Placeholder*: Sub-templates must be\n * split up and translated separately in each angular template function. The `index` points to the\n * `template` instruction index. A `block` that matches the sub-template in which it was declared.\n *\n * @param index A unique index of the translation in the static block.\n * @param messageIndex An index of the translation message from the `def.consts` array.\n * @param subTemplateIndex Optional sub-template index in the `message`.\n *\n * @codeGenApi\n */\n function ɵɵi18nStart(index, messageIndex, subTemplateIndex) {\n if (subTemplateIndex === void 0) { subTemplateIndex = -1; }\n var tView = getTView();\n var lView = getLView();\n var adjustedIndex = HEADER_OFFSET + index;\n ngDevMode && assertDefined(tView, \"tView should be defined\");\n var message = getConstant(tView.consts, messageIndex);\n var parentTNode = getCurrentParentTNode();\n if (tView.firstCreatePass) {\n i18nStartFirstCreatePass(tView, parentTNode === null ? 0 : parentTNode.index, lView, adjustedIndex, message, subTemplateIndex);\n }\n var tI18n = tView.data[adjustedIndex];\n var sameViewParentTNode = parentTNode === lView[T_HOST] ? null : parentTNode;\n var parentRNode = getClosestRElement(tView, sameViewParentTNode, lView);\n // If `parentTNode` is an `ElementContainer` than it has `<!--ng-container--->`.\n // When we do inserts we have to make sure to insert in front of `<!--ng-container--->`.\n var insertInFrontOf = parentTNode && (parentTNode.type & 8 /* ElementContainer */) ?\n lView[parentTNode.index] :\n null;\n applyCreateOpCodes(lView, tI18n.create, parentRNode, insertInFrontOf);\n setInI18nBlock(true);\n }\n /**\n * Translates a translation block marked by `i18nStart` and `i18nEnd`. It inserts the text/ICU nodes\n * into the render tree, moves the placeholder nodes and removes the deleted nodes.\n *\n * @codeGenApi\n */\n function ɵɵi18nEnd() {\n setInI18nBlock(false);\n }\n /**\n *\n * Use this instruction to create a translation block that doesn't contain any placeholder.\n * It calls both {@link i18nStart} and {@link i18nEnd} in one instruction.\n *\n * The translation `message` is the value which is locale specific. The translation string may\n * contain placeholders which associate inner elements and sub-templates within the translation.\n *\n * The translation `message` placeholders are:\n * - `�{index}(:{block})�`: *Binding Placeholder*: Marks a location where an expression will be\n * interpolated into. The placeholder `index` points to the expression binding index. An optional\n * `block` that matches the sub-template in which it was declared.\n * - `�#{index}(:{block})�`/`�/#{index}(:{block})�`: *Element Placeholder*: Marks the beginning\n * and end of DOM element that were embedded in the original translation block. The placeholder\n * `index` points to the element index in the template instructions set. An optional `block` that\n * matches the sub-template in which it was declared.\n * - `�*{index}:{block}�`/`�/*{index}:{block}�`: *Sub-template Placeholder*: Sub-templates must be\n * split up and translated separately in each angular template function. The `index` points to the\n * `template` instruction index. A `block` that matches the sub-template in which it was declared.\n *\n * @param index A unique index of the translation in the static block.\n * @param messageIndex An index of the translation message from the `def.consts` array.\n * @param subTemplateIndex Optional sub-template index in the `message`.\n *\n * @codeGenApi\n */\n function ɵɵi18n(index, messageIndex, subTemplateIndex) {\n ɵɵi18nStart(index, messageIndex, subTemplateIndex);\n ɵɵi18nEnd();\n }\n /**\n * Marks a list of attributes as translatable.\n *\n * @param index A unique index in the static block\n * @param values\n *\n * @codeGenApi\n */\n function ɵɵi18nAttributes(index, attrsIndex) {\n var tView = getTView();\n ngDevMode && assertDefined(tView, \"tView should be defined\");\n var attrs = getConstant(tView.consts, attrsIndex);\n i18nAttributesFirstPass(tView, index + HEADER_OFFSET, attrs);\n }\n /**\n * Stores the values of the bindings during each update cycle in order to determine if we need to\n * update the translated nodes.\n *\n * @param value The binding's value\n * @returns This function returns itself so that it may be chained\n * (e.g. `i18nExp(ctx.name)(ctx.title)`)\n *\n * @codeGenApi\n */\n function ɵɵi18nExp(value) {\n var lView = getLView();\n setMaskBit(bindingUpdated(lView, nextBindingIndex(), value));\n return ɵɵi18nExp;\n }\n /**\n * Updates a translation block or an i18n attribute when the bindings have changed.\n *\n * @param index Index of either {@link i18nStart} (translation block) or {@link i18nAttributes}\n * (i18n attribute) on which it should update the content.\n *\n * @codeGenApi\n */\n function ɵɵi18nApply(index) {\n applyI18n(getTView(), getLView(), index + HEADER_OFFSET);\n }\n /**\n * Handles message string post-processing for internationalization.\n *\n * Handles message string post-processing by transforming it from intermediate\n * format (that might contain some markers that we need to replace) to the final\n * form, consumable by i18nStart instruction. Post processing steps include:\n *\n * 1. Resolve all multi-value cases (like [�*1:1��#2:1�|�#4:1�|�5�])\n * 2. Replace all ICU vars (like \"VAR_PLURAL\")\n * 3. Replace all placeholders used inside ICUs in a form of {PLACEHOLDER}\n * 4. Replace all ICU references with corresponding values (like �ICU_EXP_ICU_1�)\n * in case multiple ICUs have the same placeholder name\n *\n * @param message Raw translation string for post processing\n * @param replacements Set of replacements that should be applied\n *\n * @returns Transformed string that can be consumed by i18nStart instruction\n *\n * @codeGenApi\n */\n function ɵɵi18nPostprocess(message, replacements) {\n if (replacements === void 0) { replacements = {}; }\n return i18nPostprocess(message, replacements);\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 * Resolves the providers which are defined in the DirectiveDef.\n *\n * When inserting the tokens and the factories in their respective arrays, we can assume that\n * this method is called first for the component (if any), and then for other directives on the same\n * node.\n * As a consequence,the providers are always processed in that order:\n * 1) The view providers of the component\n * 2) The providers of the component\n * 3) The providers of the other directives\n * This matches the structure of the injectables arrays of a view (for each node).\n * So the tokens and the factories can be pushed at the end of the arrays, except\n * in one case for multi providers.\n *\n * @param def the directive definition\n * @param providers: Array of `providers`.\n * @param viewProviders: Array of `viewProviders`.\n */\n function providersResolver(def, providers, viewProviders) {\n var tView = getTView();\n if (tView.firstCreatePass) {\n var isComponent = isComponentDef(def);\n // The list of view providers is processed first, and the flags are updated\n resolveProvider$1(viewProviders, tView.data, tView.blueprint, isComponent, true);\n // Then, the list of providers is processed, and the flags are updated\n resolveProvider$1(providers, tView.data, tView.blueprint, isComponent, false);\n }\n }\n /**\n * Resolves a provider and publishes it to the DI system.\n */\n function resolveProvider$1(provider, tInjectables, lInjectablesBlueprint, isComponent, isViewProvider) {\n provider = resolveForwardRef(provider);\n if (Array.isArray(provider)) {\n // Recursively call `resolveProvider`\n // Recursion is OK in this case because this code will not be in hot-path once we implement\n // cloning of the initial state.\n for (var i = 0; i < provider.length; i++) {\n resolveProvider$1(provider[i], tInjectables, lInjectablesBlueprint, isComponent, isViewProvider);\n }\n }\n else {\n var tView = getTView();\n var lView = getLView();\n var token = isTypeProvider(provider) ? provider : resolveForwardRef(provider.provide);\n var providerFactory = providerToFactory(provider);\n var tNode = getCurrentTNode();\n var beginIndex = tNode.providerIndexes & 1048575 /* ProvidersStartIndexMask */;\n var endIndex = tNode.directiveStart;\n var cptViewProvidersCount = tNode.providerIndexes >> 20 /* CptViewProvidersCountShift */;\n if (isTypeProvider(provider) || !provider.multi) {\n // Single provider case: the factory is created and pushed immediately\n var factory = new NodeInjectorFactory(providerFactory, isViewProvider, ɵɵdirectiveInject);\n var existingFactoryIndex = indexOf(token, tInjectables, isViewProvider ? beginIndex : beginIndex + cptViewProvidersCount, endIndex);\n if (existingFactoryIndex === -1) {\n diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, lView), tView, token);\n registerDestroyHooksIfSupported(tView, provider, tInjectables.length);\n tInjectables.push(token);\n tNode.directiveStart++;\n tNode.directiveEnd++;\n if (isViewProvider) {\n tNode.providerIndexes += 1048576 /* CptViewProvidersCountShifter */;\n }\n lInjectablesBlueprint.push(factory);\n lView.push(factory);\n }\n else {\n lInjectablesBlueprint[existingFactoryIndex] = factory;\n lView[existingFactoryIndex] = factory;\n }\n }\n else {\n // Multi provider case:\n // We create a multi factory which is going to aggregate all the values.\n // Since the output of such a factory depends on content or view injection,\n // we create two of them, which are linked together.\n //\n // The first one (for view providers) is always in the first block of the injectables array,\n // and the second one (for providers) is always in the second block.\n // This is important because view providers have higher priority. When a multi token\n // is being looked up, the view providers should be found first.\n // Note that it is not possible to have a multi factory in the third block (directive block).\n //\n // The algorithm to process multi providers is as follows:\n // 1) If the multi provider comes from the `viewProviders` of the component:\n // a) If the special view providers factory doesn't exist, it is created and pushed.\n // b) Else, the multi provider is added to the existing multi factory.\n // 2) If the multi provider comes from the `providers` of the component or of another\n // directive:\n // a) If the multi factory doesn't exist, it is created and provider pushed into it.\n // It is also linked to the multi factory for view providers, if it exists.\n // b) Else, the multi provider is added to the existing multi factory.\n var existingProvidersFactoryIndex = indexOf(token, tInjectables, beginIndex + cptViewProvidersCount, endIndex);\n var existingViewProvidersFactoryIndex = indexOf(token, tInjectables, beginIndex, beginIndex + cptViewProvidersCount);\n var doesProvidersFactoryExist = existingProvidersFactoryIndex >= 0 &&\n lInjectablesBlueprint[existingProvidersFactoryIndex];\n var doesViewProvidersFactoryExist = existingViewProvidersFactoryIndex >= 0 &&\n lInjectablesBlueprint[existingViewProvidersFactoryIndex];\n if (isViewProvider && !doesViewProvidersFactoryExist ||\n !isViewProvider && !doesProvidersFactoryExist) {\n // Cases 1.a and 2.a\n diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, lView), tView, token);\n var factory = multiFactory(isViewProvider ? multiViewProvidersFactoryResolver : multiProvidersFactoryResolver, lInjectablesBlueprint.length, isViewProvider, isComponent, providerFactory);\n if (!isViewProvider && doesViewProvidersFactoryExist) {\n lInjectablesBlueprint[existingViewProvidersFactoryIndex].providerFactory = factory;\n }\n registerDestroyHooksIfSupported(tView, provider, tInjectables.length, 0);\n tInjectables.push(token);\n tNode.directiveStart++;\n tNode.directiveEnd++;\n if (isViewProvider) {\n tNode.providerIndexes += 1048576 /* CptViewProvidersCountShifter */;\n }\n lInjectablesBlueprint.push(factory);\n lView.push(factory);\n }\n else {\n // Cases 1.b and 2.b\n var indexInFactory = multiFactoryAdd(lInjectablesBlueprint[isViewProvider ? existingViewProvidersFactoryIndex :\n existingProvidersFactoryIndex], providerFactory, !isViewProvider && isComponent);\n registerDestroyHooksIfSupported(tView, provider, existingProvidersFactoryIndex > -1 ? existingProvidersFactoryIndex :\n existingViewProvidersFactoryIndex, indexInFactory);\n }\n if (!isViewProvider && isComponent && doesViewProvidersFactoryExist) {\n lInjectablesBlueprint[existingViewProvidersFactoryIndex].componentProviders++;\n }\n }\n }\n }\n /**\n * Registers the `ngOnDestroy` hook of a provider, if the provider supports destroy hooks.\n * @param tView `TView` in which to register the hook.\n * @param provider Provider whose hook should be registered.\n * @param contextIndex Index under which to find the context for the hook when it's being invoked.\n * @param indexInFactory Only required for `multi` providers. Index of the provider in the multi\n * provider factory.\n */\n function registerDestroyHooksIfSupported(tView, provider, contextIndex, indexInFactory) {\n var providerIsTypeProvider = isTypeProvider(provider);\n if (providerIsTypeProvider || isClassProvider(provider)) {\n var prototype = (provider.useClass || provider).prototype;\n var ngOnDestroy = prototype.ngOnDestroy;\n if (ngOnDestroy) {\n var hooks = tView.destroyHooks || (tView.destroyHooks = []);\n if (!providerIsTypeProvider && provider.multi) {\n ngDevMode &&\n assertDefined(indexInFactory, 'indexInFactory when registering multi factory destroy hook');\n var existingCallbacksIndex = hooks.indexOf(contextIndex);\n if (existingCallbacksIndex === -1) {\n hooks.push(contextIndex, [indexInFactory, ngOnDestroy]);\n }\n else {\n hooks[existingCallbacksIndex + 1].push(indexInFactory, ngOnDestroy);\n }\n }\n else {\n hooks.push(contextIndex, ngOnDestroy);\n }\n }\n }\n }\n /**\n * Add a factory in a multi factory.\n * @returns Index at which the factory was inserted.\n */\n function multiFactoryAdd(multiFactory, factory, isComponentProvider) {\n if (isComponentProvider) {\n multiFactory.componentProviders++;\n }\n return multiFactory.multi.push(factory) - 1;\n }\n /**\n * Returns the index of item in the array, but only in the begin to end range.\n */\n function indexOf(item, arr, begin, end) {\n for (var i = begin; i < end; i++) {\n if (arr[i] === item)\n return i;\n }\n return -1;\n }\n /**\n * Use this with `multi` `providers`.\n */\n function multiProvidersFactoryResolver(_, tData, lData, tNode) {\n return multiResolve(this.multi, []);\n }\n /**\n * Use this with `multi` `viewProviders`.\n *\n * This factory knows how to concatenate itself with the existing `multi` `providers`.\n */\n function multiViewProvidersFactoryResolver(_, tData, lView, tNode) {\n var factories = this.multi;\n var result;\n if (this.providerFactory) {\n var componentCount = this.providerFactory.componentProviders;\n var multiProviders = getNodeInjectable(lView, lView[TVIEW], this.providerFactory.index, tNode);\n // Copy the section of the array which contains `multi` `providers` from the component\n result = multiProviders.slice(0, componentCount);\n // Insert the `viewProvider` instances.\n multiResolve(factories, result);\n // Copy the section of the array which contains `multi` `providers` from other directives\n for (var i = componentCount; i < multiProviders.length; i++) {\n result.push(multiProviders[i]);\n }\n }\n else {\n result = [];\n // Insert the `viewProvider` instances.\n multiResolve(factories, result);\n }\n return result;\n }\n /**\n * Maps an array of factories into an array of values.\n */\n function multiResolve(factories, result) {\n for (var i = 0; i < factories.length; i++) {\n var factory = factories[i];\n result.push(factory());\n }\n return result;\n }\n /**\n * Creates a multi factory.\n */\n function multiFactory(factoryFn, index, isViewProvider, isComponent, f) {\n var factory = new NodeInjectorFactory(factoryFn, isViewProvider, ɵɵdirectiveInject);\n factory.multi = [];\n factory.index = index;\n factory.componentProviders = 0;\n multiFactoryAdd(factory, f, isComponent && !isViewProvider);\n return factory;\n }\n\n /**\n * This feature resolves the providers of a directive (or component),\n * and publish them into the DI system, making it visible to others for injection.\n *\n * For example:\n * ```ts\n * class ComponentWithProviders {\n * constructor(private greeter: GreeterDE) {}\n *\n * static ɵcmp = defineComponent({\n * type: ComponentWithProviders,\n * selectors: [['component-with-providers']],\n * factory: () => new ComponentWithProviders(directiveInject(GreeterDE as any)),\n * decls: 1,\n * vars: 1,\n * template: function(fs: RenderFlags, ctx: ComponentWithProviders) {\n * if (fs & RenderFlags.Create) {\n * ɵɵtext(0);\n * }\n * if (fs & RenderFlags.Update) {\n * ɵɵtextInterpolate(ctx.greeter.greet());\n * }\n * },\n * features: [ɵɵProvidersFeature([GreeterDE])]\n * });\n * }\n * ```\n *\n * @param definition\n *\n * @codeGenApi\n */\n function ɵɵProvidersFeature(providers, viewProviders) {\n if (viewProviders === void 0) { viewProviders = []; }\n return function (definition) {\n definition.providersResolver =\n function (def, processProvidersFn) {\n return providersResolver(def, //\n processProvidersFn ? processProvidersFn(providers) : providers, //\n viewProviders);\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 * Represents a component created by a `ComponentFactory`.\n * Provides access to the component instance and related objects,\n * and provides the means of destroying the instance.\n *\n * @publicApi\n */\n var ComponentRef = /** @class */ (function () {\n function ComponentRef() {\n }\n return ComponentRef;\n }());\n /**\n * Base class for a factory that can create a component dynamically.\n * Instantiate a factory for a given type of component with `resolveComponentFactory()`.\n * Use the resulting `ComponentFactory.create()` method to create a component of that type.\n *\n * @see [Dynamic Components](guide/dynamic-component-loader)\n *\n * @publicApi\n */\n var ComponentFactory = /** @class */ (function () {\n function ComponentFactory() {\n }\n return ComponentFactory;\n }());\n\n function noComponentFactoryError(component) {\n var error = Error(\"No component factory found for \" + stringify(component) + \". Did you add it to @NgModule.entryComponents?\");\n error[ERROR_COMPONENT] = component;\n return error;\n }\n var ERROR_COMPONENT = 'ngComponent';\n function getComponent$1(error) {\n return error[ERROR_COMPONENT];\n }\n var _NullComponentFactoryResolver = /** @class */ (function () {\n function _NullComponentFactoryResolver() {\n }\n _NullComponentFactoryResolver.prototype.resolveComponentFactory = function (component) {\n throw noComponentFactoryError(component);\n };\n return _NullComponentFactoryResolver;\n }());\n /**\n * A simple registry that maps `Components` to generated `ComponentFactory` classes\n * that can be used to create instances of components.\n * Use to obtain the factory for a given component type,\n * then use the factory's `create()` method to create a component of that type.\n *\n * @see [Dynamic Components](guide/dynamic-component-loader)\n * @publicApi\n */\n var ComponentFactoryResolver = /** @class */ (function () {\n function ComponentFactoryResolver() {\n }\n return ComponentFactoryResolver;\n }());\n ComponentFactoryResolver.NULL = new _NullComponentFactoryResolver();\n var CodegenComponentFactoryResolver = /** @class */ (function () {\n function CodegenComponentFactoryResolver(factories, _parent, _ngModule) {\n this._parent = _parent;\n this._ngModule = _ngModule;\n this._factories = new Map();\n for (var i = 0; i < factories.length; i++) {\n var factory = factories[i];\n this._factories.set(factory.componentType, factory);\n }\n }\n CodegenComponentFactoryResolver.prototype.resolveComponentFactory = function (component) {\n var factory = this._factories.get(component);\n if (!factory && this._parent) {\n factory = this._parent.resolveComponentFactory(component);\n }\n if (!factory) {\n throw noComponentFactoryError(component);\n }\n return new ComponentFactoryBoundToModule(factory, this._ngModule);\n };\n return CodegenComponentFactoryResolver;\n }());\n var ComponentFactoryBoundToModule = /** @class */ (function (_super) {\n __extends(ComponentFactoryBoundToModule, _super);\n function ComponentFactoryBoundToModule(factory, ngModule) {\n var _this = _super.call(this) || this;\n _this.factory = factory;\n _this.ngModule = ngModule;\n _this.selector = factory.selector;\n _this.componentType = factory.componentType;\n _this.ngContentSelectors = factory.ngContentSelectors;\n _this.inputs = factory.inputs;\n _this.outputs = factory.outputs;\n return _this;\n }\n ComponentFactoryBoundToModule.prototype.create = function (injector, projectableNodes, rootSelectorOrNode, ngModule) {\n return this.factory.create(injector, projectableNodes, rootSelectorOrNode, ngModule || this.ngModule);\n };\n return ComponentFactoryBoundToModule;\n }(ComponentFactory));\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 noop() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n // Do nothing.\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 ElementRef from the most recent node.\n *\n * @returns The ElementRef instance to use\n */\n function injectElementRef() {\n return createElementRef(getCurrentTNode(), getLView());\n }\n /**\n * Creates an ElementRef given a node.\n *\n * @param tNode The node for which you'd like an ElementRef\n * @param lView The view to which the node belongs\n * @returns The ElementRef instance to use\n */\n function createElementRef(tNode, lView) {\n return new ElementRef(getNativeByTNode(tNode, lView));\n }\n var SWITCH_ELEMENT_REF_FACTORY__POST_R3__ = injectElementRef;\n var SWITCH_ELEMENT_REF_FACTORY__PRE_R3__ = noop;\n var SWITCH_ELEMENT_REF_FACTORY = SWITCH_ELEMENT_REF_FACTORY__PRE_R3__;\n /**\n * A wrapper around a native element inside of a View.\n *\n * An `ElementRef` is backed by a render-specific element. In the browser, this is usually a DOM\n * element.\n *\n * @security Permitting direct access to the DOM can make your application more vulnerable to\n * XSS attacks. Carefully review any use of `ElementRef` in your code. For more detail, see the\n * [Security Guide](https://g.co/ng/security).\n *\n * @publicApi\n */\n // Note: We don't expose things like `Injector`, `ViewContainer`, ... here,\n // i.e. users have to ask for what they need. With that, we can build better analysis tools\n // and could do better codegen in the future.\n var ElementRef = /** @class */ (function () {\n function ElementRef(nativeElement) {\n this.nativeElement = nativeElement;\n }\n return ElementRef;\n }());\n /**\n * @internal\n * @nocollapse\n */\n ElementRef.__NG_ELEMENT_ID__ = SWITCH_ELEMENT_REF_FACTORY;\n /**\n * Unwraps `ElementRef` and return the `nativeElement`.\n *\n * @param value value to unwrap\n * @returns `nativeElement` if `ElementRef` otherwise returns value as is.\n */\n function unwrapElementRef(value) {\n return value instanceof ElementRef ? value.nativeElement : 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 */\n var Renderer2Interceptor = new InjectionToken('Renderer2Interceptor');\n /**\n * Creates and initializes a custom renderer that implements the `Renderer2` base class.\n *\n * @publicApi\n */\n var RendererFactory2 = /** @class */ (function () {\n function RendererFactory2() {\n }\n return RendererFactory2;\n }());\n /**\n * Extend this base class to implement custom rendering. By default, Angular\n * renders a template into DOM. You can use custom rendering to intercept\n * rendering calls, or to render to something other than DOM.\n *\n * Create your custom renderer using `RendererFactory2`.\n *\n * Use a custom renderer to bypass Angular's templating and\n * make custom UI changes that can't be expressed declaratively.\n * For example if you need to set a property or an attribute whose name is\n * not statically known, use the `setProperty()` or\n * `setAttribute()` method.\n *\n * @publicApi\n */\n var Renderer2 = /** @class */ (function () {\n function Renderer2() {\n }\n return Renderer2;\n }());\n /**\n * @internal\n * @nocollapse\n */\n Renderer2.__NG_ELEMENT_ID__ = function () { return SWITCH_RENDERER2_FACTORY(); };\n var SWITCH_RENDERER2_FACTORY__POST_R3__ = injectRenderer2;\n var SWITCH_RENDERER2_FACTORY__PRE_R3__ = noop;\n var SWITCH_RENDERER2_FACTORY = SWITCH_RENDERER2_FACTORY__PRE_R3__;\n /** Returns a Renderer2 (or throws when application was bootstrapped with Renderer3) */\n function getOrCreateRenderer2(lView) {\n var renderer = lView[RENDERER];\n if (ngDevMode && !isProceduralRenderer(renderer)) {\n throw new Error('Cannot inject Renderer2 when the application uses Renderer3!');\n }\n return renderer;\n }\n /** Injects a Renderer2 for the current component. */\n function injectRenderer2() {\n // We need the Renderer to be based on the component that it's being injected into, however since\n // DI happens before we've entered its view, `getLView` will return the parent view instead.\n var lView = getLView();\n var tNode = getCurrentTNode();\n var nodeAtIndex = getComponentLViewByIndex(tNode.index, lView);\n return getOrCreateRenderer2(isLView(nodeAtIndex) ? nodeAtIndex : lView);\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 * Sanitizer is used by the views to sanitize potentially dangerous values.\n *\n * @publicApi\n */\n var Sanitizer = /** @class */ (function () {\n function Sanitizer() {\n }\n return Sanitizer;\n }());\n /** @nocollapse */\n Sanitizer.ɵprov = ɵɵdefineInjectable({\n token: Sanitizer,\n providedIn: 'root',\n factory: function () { return null; },\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 * @description Represents the version of Angular\n *\n * @publicApi\n */\n var Version = /** @class */ (function () {\n function Version(full) {\n this.full = full;\n this.major = full.split('.')[0];\n this.minor = full.split('.')[1];\n this.patch = full.split('.').slice(2).join('.');\n }\n return Version;\n }());\n /**\n * @publicApi\n */\n var VERSION = new Version('11.2.14');\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 var DefaultIterableDifferFactory = /** @class */ (function () {\n function DefaultIterableDifferFactory() {\n }\n DefaultIterableDifferFactory.prototype.supports = function (obj) {\n return isListLikeIterable(obj);\n };\n DefaultIterableDifferFactory.prototype.create = function (trackByFn) {\n return new DefaultIterableDiffer(trackByFn);\n };\n return DefaultIterableDifferFactory;\n }());\n var trackByIdentity = function (index, item) { return item; };\n var ɵ0$b = trackByIdentity;\n /**\n * @deprecated v4.0.0 - Should not be part of public API.\n * @publicApi\n */\n var DefaultIterableDiffer = /** @class */ (function () {\n function DefaultIterableDiffer(trackByFn) {\n this.length = 0;\n // Keeps track of the used records at any point in time (during & across `_check()` calls)\n this._linkedRecords = null;\n // Keeps track of the removed records at any point in time during `_check()` calls.\n this._unlinkedRecords = null;\n this._previousItHead = null;\n this._itHead = null;\n this._itTail = null;\n this._additionsHead = null;\n this._additionsTail = null;\n this._movesHead = null;\n this._movesTail = null;\n this._removalsHead = null;\n this._removalsTail = null;\n // Keeps track of records where custom track by is the same, but item identity has changed\n this._identityChangesHead = null;\n this._identityChangesTail = null;\n this._trackByFn = trackByFn || trackByIdentity;\n }\n DefaultIterableDiffer.prototype.forEachItem = function (fn) {\n var record;\n for (record = this._itHead; record !== null; record = record._next) {\n fn(record);\n }\n };\n DefaultIterableDiffer.prototype.forEachOperation = function (fn) {\n var nextIt = this._itHead;\n var nextRemove = this._removalsHead;\n var addRemoveOffset = 0;\n var moveOffsets = null;\n while (nextIt || nextRemove) {\n // Figure out which is the next record to process\n // Order: remove, add, move\n var record = !nextRemove ||\n nextIt &&\n nextIt.currentIndex <\n getPreviousIndex(nextRemove, addRemoveOffset, moveOffsets) ?\n nextIt :\n nextRemove;\n var adjPreviousIndex = getPreviousIndex(record, addRemoveOffset, moveOffsets);\n var currentIndex = record.currentIndex;\n // consume the item, and adjust the addRemoveOffset and update moveDistance if necessary\n if (record === nextRemove) {\n addRemoveOffset--;\n nextRemove = nextRemove._nextRemoved;\n }\n else {\n nextIt = nextIt._next;\n if (record.previousIndex == null) {\n addRemoveOffset++;\n }\n else {\n // INVARIANT: currentIndex < previousIndex\n if (!moveOffsets)\n moveOffsets = [];\n var localMovePreviousIndex = adjPreviousIndex - addRemoveOffset;\n var localCurrentIndex = currentIndex - addRemoveOffset;\n if (localMovePreviousIndex != localCurrentIndex) {\n for (var i = 0; i < localMovePreviousIndex; i++) {\n var offset = i < moveOffsets.length ? moveOffsets[i] : (moveOffsets[i] = 0);\n var index = offset + i;\n if (localCurrentIndex <= index && index < localMovePreviousIndex) {\n moveOffsets[i] = offset + 1;\n }\n }\n var previousIndex = record.previousIndex;\n moveOffsets[previousIndex] = localCurrentIndex - localMovePreviousIndex;\n }\n }\n }\n if (adjPreviousIndex !== currentIndex) {\n fn(record, adjPreviousIndex, currentIndex);\n }\n }\n };\n DefaultIterableDiffer.prototype.forEachPreviousItem = function (fn) {\n var record;\n for (record = this._previousItHead; record !== null; record = record._nextPrevious) {\n fn(record);\n }\n };\n DefaultIterableDiffer.prototype.forEachAddedItem = function (fn) {\n var record;\n for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n fn(record);\n }\n };\n DefaultIterableDiffer.prototype.forEachMovedItem = function (fn) {\n var record;\n for (record = this._movesHead; record !== null; record = record._nextMoved) {\n fn(record);\n }\n };\n DefaultIterableDiffer.prototype.forEachRemovedItem = function (fn) {\n var record;\n for (record = this._removalsHead; record !== null; record = record._nextRemoved) {\n fn(record);\n }\n };\n DefaultIterableDiffer.prototype.forEachIdentityChange = function (fn) {\n var record;\n for (record = this._identityChangesHead; record !== null; record = record._nextIdentityChange) {\n fn(record);\n }\n };\n DefaultIterableDiffer.prototype.diff = function (collection) {\n if (collection == null)\n collection = [];\n if (!isListLikeIterable(collection)) {\n throw new Error(\"Error trying to diff '\" + stringify(collection) + \"'. Only arrays and iterables are allowed\");\n }\n if (this.check(collection)) {\n return this;\n }\n else {\n return null;\n }\n };\n DefaultIterableDiffer.prototype.onDestroy = function () { };\n DefaultIterableDiffer.prototype.check = function (collection) {\n var _this = this;\n this._reset();\n var record = this._itHead;\n var mayBeDirty = false;\n var index;\n var item;\n var itemTrackBy;\n if (Array.isArray(collection)) {\n this.length = collection.length;\n for (var index_1 = 0; index_1 < this.length; index_1++) {\n item = collection[index_1];\n itemTrackBy = this._trackByFn(index_1, item);\n if (record === null || !Object.is(record.trackById, itemTrackBy)) {\n record = this._mismatch(record, item, itemTrackBy, index_1);\n mayBeDirty = true;\n }\n else {\n if (mayBeDirty) {\n // TODO(misko): can we limit this to duplicates only?\n record = this._verifyReinsertion(record, item, itemTrackBy, index_1);\n }\n if (!Object.is(record.item, item))\n this._addIdentityChange(record, item);\n }\n record = record._next;\n }\n }\n else {\n index = 0;\n iterateListLike(collection, function (item) {\n itemTrackBy = _this._trackByFn(index, item);\n if (record === null || !Object.is(record.trackById, itemTrackBy)) {\n record = _this._mismatch(record, item, itemTrackBy, index);\n mayBeDirty = true;\n }\n else {\n if (mayBeDirty) {\n // TODO(misko): can we limit this to duplicates only?\n record = _this._verifyReinsertion(record, item, itemTrackBy, index);\n }\n if (!Object.is(record.item, item))\n _this._addIdentityChange(record, item);\n }\n record = record._next;\n index++;\n });\n this.length = index;\n }\n this._truncate(record);\n this.collection = collection;\n return this.isDirty;\n };\n Object.defineProperty(DefaultIterableDiffer.prototype, \"isDirty\", {\n /* CollectionChanges is considered dirty if it has any additions, moves, removals, or identity\n * changes.\n */\n get: function () {\n return this._additionsHead !== null || this._movesHead !== null ||\n this._removalsHead !== null || this._identityChangesHead !== null;\n },\n enumerable: false,\n configurable: true\n });\n /**\n * Reset the state of the change objects to show no changes. This means set previousKey to\n * currentKey, and clear all of the queues (additions, moves, removals).\n * Set the previousIndexes of moved and added items to their currentIndexes\n * Reset the list of additions, moves and removals\n *\n * @internal\n */\n DefaultIterableDiffer.prototype._reset = function () {\n if (this.isDirty) {\n var record = void 0;\n for (record = this._previousItHead = this._itHead; record !== null; record = record._next) {\n record._nextPrevious = record._next;\n }\n for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n record.previousIndex = record.currentIndex;\n }\n this._additionsHead = this._additionsTail = null;\n for (record = this._movesHead; record !== null; record = record._nextMoved) {\n record.previousIndex = record.currentIndex;\n }\n this._movesHead = this._movesTail = null;\n this._removalsHead = this._removalsTail = null;\n this._identityChangesHead = this._identityChangesTail = null;\n // TODO(vicb): when assert gets supported\n // assert(!this.isDirty);\n }\n };\n /**\n * This is the core function which handles differences between collections.\n *\n * - `record` is the record which we saw at this position last time. If null then it is a new\n * item.\n * - `item` is the current item in the collection\n * - `index` is the position of the item in the collection\n *\n * @internal\n */\n DefaultIterableDiffer.prototype._mismatch = function (record, item, itemTrackBy, index) {\n // The previous record after which we will append the current one.\n var previousRecord;\n if (record === null) {\n previousRecord = this._itTail;\n }\n else {\n previousRecord = record._prev;\n // Remove the record from the collection since we know it does not match the item.\n this._remove(record);\n }\n // See if we have evicted the item, which used to be at some anterior position of _itHead list.\n record = this._unlinkedRecords === null ? null : this._unlinkedRecords.get(itemTrackBy, null);\n if (record !== null) {\n // It is an item which we have evicted earlier: reinsert it back into the list.\n // But first we need to check if identity changed, so we can update in view if necessary.\n if (!Object.is(record.item, item))\n this._addIdentityChange(record, item);\n this._reinsertAfter(record, previousRecord, index);\n }\n else {\n // Attempt to see if the item is at some posterior position of _itHead list.\n record = this._linkedRecords === null ? null : this._linkedRecords.get(itemTrackBy, index);\n if (record !== null) {\n // We have the item in _itHead at/after `index` position. We need to move it forward in the\n // collection.\n // But first we need to check if identity changed, so we can update in view if necessary.\n if (!Object.is(record.item, item))\n this._addIdentityChange(record, item);\n this._moveAfter(record, previousRecord, index);\n }\n else {\n // It is a new item: add it.\n record =\n this._addAfter(new IterableChangeRecord_(item, itemTrackBy), previousRecord, index);\n }\n }\n return record;\n };\n /**\n * This check is only needed if an array contains duplicates. (Short circuit of nothing dirty)\n *\n * Use case: `[a, a]` => `[b, a, a]`\n *\n * If we did not have this check then the insertion of `b` would:\n * 1) evict first `a`\n * 2) insert `b` at `0` index.\n * 3) leave `a` at index `1` as is. <-- this is wrong!\n * 3) reinsert `a` at index 2. <-- this is wrong!\n *\n * The correct behavior is:\n * 1) evict first `a`\n * 2) insert `b` at `0` index.\n * 3) reinsert `a` at index 1.\n * 3) move `a` at from `1` to `2`.\n *\n *\n * Double check that we have not evicted a duplicate item. We need to check if the item type may\n * have already been removed:\n * The insertion of b will evict the first 'a'. If we don't reinsert it now it will be reinserted\n * at the end. Which will show up as the two 'a's switching position. This is incorrect, since a\n * better way to think of it is as insert of 'b' rather then switch 'a' with 'b' and then add 'a'\n * at the end.\n *\n * @internal\n */\n DefaultIterableDiffer.prototype._verifyReinsertion = function (record, item, itemTrackBy, index) {\n var reinsertRecord = this._unlinkedRecords === null ? null : this._unlinkedRecords.get(itemTrackBy, null);\n if (reinsertRecord !== null) {\n record = this._reinsertAfter(reinsertRecord, record._prev, index);\n }\n else if (record.currentIndex != index) {\n record.currentIndex = index;\n this._addToMoves(record, index);\n }\n return record;\n };\n /**\n * Get rid of any excess {@link IterableChangeRecord_}s from the previous collection\n *\n * - `record` The first excess {@link IterableChangeRecord_}.\n *\n * @internal\n */\n DefaultIterableDiffer.prototype._truncate = function (record) {\n // Anything after that needs to be removed;\n while (record !== null) {\n var nextRecord = record._next;\n this._addToRemovals(this._unlink(record));\n record = nextRecord;\n }\n if (this._unlinkedRecords !== null) {\n this._unlinkedRecords.clear();\n }\n if (this._additionsTail !== null) {\n this._additionsTail._nextAdded = null;\n }\n if (this._movesTail !== null) {\n this._movesTail._nextMoved = null;\n }\n if (this._itTail !== null) {\n this._itTail._next = null;\n }\n if (this._removalsTail !== null) {\n this._removalsTail._nextRemoved = null;\n }\n if (this._identityChangesTail !== null) {\n this._identityChangesTail._nextIdentityChange = null;\n }\n };\n /** @internal */\n DefaultIterableDiffer.prototype._reinsertAfter = function (record, prevRecord, index) {\n if (this._unlinkedRecords !== null) {\n this._unlinkedRecords.remove(record);\n }\n var prev = record._prevRemoved;\n var next = record._nextRemoved;\n if (prev === null) {\n this._removalsHead = next;\n }\n else {\n prev._nextRemoved = next;\n }\n if (next === null) {\n this._removalsTail = prev;\n }\n else {\n next._prevRemoved = prev;\n }\n this._insertAfter(record, prevRecord, index);\n this._addToMoves(record, index);\n return record;\n };\n /** @internal */\n DefaultIterableDiffer.prototype._moveAfter = function (record, prevRecord, index) {\n this._unlink(record);\n this._insertAfter(record, prevRecord, index);\n this._addToMoves(record, index);\n return record;\n };\n /** @internal */\n DefaultIterableDiffer.prototype._addAfter = function (record, prevRecord, index) {\n this._insertAfter(record, prevRecord, index);\n if (this._additionsTail === null) {\n // TODO(vicb):\n // assert(this._additionsHead === null);\n this._additionsTail = this._additionsHead = record;\n }\n else {\n // TODO(vicb):\n // assert(_additionsTail._nextAdded === null);\n // assert(record._nextAdded === null);\n this._additionsTail = this._additionsTail._nextAdded = record;\n }\n return record;\n };\n /** @internal */\n DefaultIterableDiffer.prototype._insertAfter = function (record, prevRecord, index) {\n // TODO(vicb):\n // assert(record != prevRecord);\n // assert(record._next === null);\n // assert(record._prev === null);\n var next = prevRecord === null ? this._itHead : prevRecord._next;\n // TODO(vicb):\n // assert(next != record);\n // assert(prevRecord != record);\n record._next = next;\n record._prev = prevRecord;\n if (next === null) {\n this._itTail = record;\n }\n else {\n next._prev = record;\n }\n if (prevRecord === null) {\n this._itHead = record;\n }\n else {\n prevRecord._next = record;\n }\n if (this._linkedRecords === null) {\n this._linkedRecords = new _DuplicateMap();\n }\n this._linkedRecords.put(record);\n record.currentIndex = index;\n return record;\n };\n /** @internal */\n DefaultIterableDiffer.prototype._remove = function (record) {\n return this._addToRemovals(this._unlink(record));\n };\n /** @internal */\n DefaultIterableDiffer.prototype._unlink = function (record) {\n if (this._linkedRecords !== null) {\n this._linkedRecords.remove(record);\n }\n var prev = record._prev;\n var next = record._next;\n // TODO(vicb):\n // assert((record._prev = null) === null);\n // assert((record._next = null) === null);\n if (prev === null) {\n this._itHead = next;\n }\n else {\n prev._next = next;\n }\n if (next === null) {\n this._itTail = prev;\n }\n else {\n next._prev = prev;\n }\n return record;\n };\n /** @internal */\n DefaultIterableDiffer.prototype._addToMoves = function (record, toIndex) {\n // TODO(vicb):\n // assert(record._nextMoved === null);\n if (record.previousIndex === toIndex) {\n return record;\n }\n if (this._movesTail === null) {\n // TODO(vicb):\n // assert(_movesHead === null);\n this._movesTail = this._movesHead = record;\n }\n else {\n // TODO(vicb):\n // assert(_movesTail._nextMoved === null);\n this._movesTail = this._movesTail._nextMoved = record;\n }\n return record;\n };\n DefaultIterableDiffer.prototype._addToRemovals = function (record) {\n if (this._unlinkedRecords === null) {\n this._unlinkedRecords = new _DuplicateMap();\n }\n this._unlinkedRecords.put(record);\n record.currentIndex = null;\n record._nextRemoved = null;\n if (this._removalsTail === null) {\n // TODO(vicb):\n // assert(_removalsHead === null);\n this._removalsTail = this._removalsHead = record;\n record._prevRemoved = null;\n }\n else {\n // TODO(vicb):\n // assert(_removalsTail._nextRemoved === null);\n // assert(record._nextRemoved === null);\n record._prevRemoved = this._removalsTail;\n this._removalsTail = this._removalsTail._nextRemoved = record;\n }\n return record;\n };\n /** @internal */\n DefaultIterableDiffer.prototype._addIdentityChange = function (record, item) {\n record.item = item;\n if (this._identityChangesTail === null) {\n this._identityChangesTail = this._identityChangesHead = record;\n }\n else {\n this._identityChangesTail = this._identityChangesTail._nextIdentityChange = record;\n }\n return record;\n };\n return DefaultIterableDiffer;\n }());\n var IterableChangeRecord_ = /** @class */ (function () {\n function IterableChangeRecord_(item, trackById) {\n this.item = item;\n this.trackById = trackById;\n this.currentIndex = null;\n this.previousIndex = null;\n /** @internal */\n this._nextPrevious = null;\n /** @internal */\n this._prev = null;\n /** @internal */\n this._next = null;\n /** @internal */\n this._prevDup = null;\n /** @internal */\n this._nextDup = null;\n /** @internal */\n this._prevRemoved = null;\n /** @internal */\n this._nextRemoved = null;\n /** @internal */\n this._nextAdded = null;\n /** @internal */\n this._nextMoved = null;\n /** @internal */\n this._nextIdentityChange = null;\n }\n return IterableChangeRecord_;\n }());\n // A linked list of IterableChangeRecords with the same IterableChangeRecord_.item\n var _DuplicateItemRecordList = /** @class */ (function () {\n function _DuplicateItemRecordList() {\n /** @internal */\n this._head = null;\n /** @internal */\n this._tail = null;\n }\n /**\n * Append the record to the list of duplicates.\n *\n * Note: by design all records in the list of duplicates hold the same value in record.item.\n */\n _DuplicateItemRecordList.prototype.add = function (record) {\n if (this._head === null) {\n this._head = this._tail = record;\n record._nextDup = null;\n record._prevDup = null;\n }\n else {\n // TODO(vicb):\n // assert(record.item == _head.item ||\n // record.item is num && record.item.isNaN && _head.item is num && _head.item.isNaN);\n this._tail._nextDup = record;\n record._prevDup = this._tail;\n record._nextDup = null;\n this._tail = record;\n }\n };\n // Returns a IterableChangeRecord_ having IterableChangeRecord_.trackById == trackById and\n // IterableChangeRecord_.currentIndex >= atOrAfterIndex\n _DuplicateItemRecordList.prototype.get = function (trackById, atOrAfterIndex) {\n var record;\n for (record = this._head; record !== null; record = record._nextDup) {\n if ((atOrAfterIndex === null || atOrAfterIndex <= record.currentIndex) &&\n Object.is(record.trackById, trackById)) {\n return record;\n }\n }\n return null;\n };\n /**\n * Remove one {@link IterableChangeRecord_} from the list of duplicates.\n *\n * Returns whether the list of duplicates is empty.\n */\n _DuplicateItemRecordList.prototype.remove = function (record) {\n // TODO(vicb):\n // assert(() {\n // // verify that the record being removed is in the list.\n // for (IterableChangeRecord_ cursor = _head; cursor != null; cursor = cursor._nextDup) {\n // if (identical(cursor, record)) return true;\n // }\n // return false;\n //});\n var prev = record._prevDup;\n var next = record._nextDup;\n if (prev === null) {\n this._head = next;\n }\n else {\n prev._nextDup = next;\n }\n if (next === null) {\n this._tail = prev;\n }\n else {\n next._prevDup = prev;\n }\n return this._head === null;\n };\n return _DuplicateItemRecordList;\n }());\n var _DuplicateMap = /** @class */ (function () {\n function _DuplicateMap() {\n this.map = new Map();\n }\n _DuplicateMap.prototype.put = function (record) {\n var key = record.trackById;\n var duplicates = this.map.get(key);\n if (!duplicates) {\n duplicates = new _DuplicateItemRecordList();\n this.map.set(key, duplicates);\n }\n duplicates.add(record);\n };\n /**\n * Retrieve the `value` using key. Because the IterableChangeRecord_ value may be one which we\n * have already iterated over, we use the `atOrAfterIndex` to pretend it is not there.\n *\n * Use case: `[a, b, c, a, a]` if we are at index `3` which is the second `a` then asking if we\n * have any more `a`s needs to return the second `a`.\n */\n _DuplicateMap.prototype.get = function (trackById, atOrAfterIndex) {\n var key = trackById;\n var recordList = this.map.get(key);\n return recordList ? recordList.get(trackById, atOrAfterIndex) : null;\n };\n /**\n * Removes a {@link IterableChangeRecord_} from the list of duplicates.\n *\n * The list of duplicates also is removed from the map if it gets empty.\n */\n _DuplicateMap.prototype.remove = function (record) {\n var key = record.trackById;\n var recordList = this.map.get(key);\n // Remove the list of duplicates when it gets empty\n if (recordList.remove(record)) {\n this.map.delete(key);\n }\n return record;\n };\n Object.defineProperty(_DuplicateMap.prototype, \"isEmpty\", {\n get: function () {\n return this.map.size === 0;\n },\n enumerable: false,\n configurable: true\n });\n _DuplicateMap.prototype.clear = function () {\n this.map.clear();\n };\n return _DuplicateMap;\n }());\n function getPreviousIndex(item, addRemoveOffset, moveOffsets) {\n var previousIndex = item.previousIndex;\n if (previousIndex === null)\n return previousIndex;\n var moveOffset = 0;\n if (moveOffsets && previousIndex < moveOffsets.length) {\n moveOffset = moveOffsets[previousIndex];\n }\n return previousIndex + addRemoveOffset + moveOffset;\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 var DefaultKeyValueDifferFactory = /** @class */ (function () {\n function DefaultKeyValueDifferFactory() {\n }\n DefaultKeyValueDifferFactory.prototype.supports = function (obj) {\n return obj instanceof Map || isJsObject(obj);\n };\n DefaultKeyValueDifferFactory.prototype.create = function () {\n return new DefaultKeyValueDiffer();\n };\n return DefaultKeyValueDifferFactory;\n }());\n var DefaultKeyValueDiffer = /** @class */ (function () {\n function DefaultKeyValueDiffer() {\n this._records = new Map();\n this._mapHead = null;\n // _appendAfter is used in the check loop\n this._appendAfter = null;\n this._previousMapHead = null;\n this._changesHead = null;\n this._changesTail = null;\n this._additionsHead = null;\n this._additionsTail = null;\n this._removalsHead = null;\n this._removalsTail = null;\n }\n Object.defineProperty(DefaultKeyValueDiffer.prototype, \"isDirty\", {\n get: function () {\n return this._additionsHead !== null || this._changesHead !== null ||\n this._removalsHead !== null;\n },\n enumerable: false,\n configurable: true\n });\n DefaultKeyValueDiffer.prototype.forEachItem = function (fn) {\n var record;\n for (record = this._mapHead; record !== null; record = record._next) {\n fn(record);\n }\n };\n DefaultKeyValueDiffer.prototype.forEachPreviousItem = function (fn) {\n var record;\n for (record = this._previousMapHead; record !== null; record = record._nextPrevious) {\n fn(record);\n }\n };\n DefaultKeyValueDiffer.prototype.forEachChangedItem = function (fn) {\n var record;\n for (record = this._changesHead; record !== null; record = record._nextChanged) {\n fn(record);\n }\n };\n DefaultKeyValueDiffer.prototype.forEachAddedItem = function (fn) {\n var record;\n for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n fn(record);\n }\n };\n DefaultKeyValueDiffer.prototype.forEachRemovedItem = function (fn) {\n var record;\n for (record = this._removalsHead; record !== null; record = record._nextRemoved) {\n fn(record);\n }\n };\n DefaultKeyValueDiffer.prototype.diff = function (map) {\n if (!map) {\n map = new Map();\n }\n else if (!(map instanceof Map || isJsObject(map))) {\n throw new Error(\"Error trying to diff '\" + stringify(map) + \"'. Only maps and objects are allowed\");\n }\n return this.check(map) ? this : null;\n };\n DefaultKeyValueDiffer.prototype.onDestroy = function () { };\n /**\n * Check the current state of the map vs the previous.\n * The algorithm is optimised for when the keys do no change.\n */\n DefaultKeyValueDiffer.prototype.check = function (map) {\n var _this = this;\n this._reset();\n var insertBefore = this._mapHead;\n this._appendAfter = null;\n this._forEach(map, function (value, key) {\n if (insertBefore && insertBefore.key === key) {\n _this._maybeAddToChanges(insertBefore, value);\n _this._appendAfter = insertBefore;\n insertBefore = insertBefore._next;\n }\n else {\n var record = _this._getOrCreateRecordForKey(key, value);\n insertBefore = _this._insertBeforeOrAppend(insertBefore, record);\n }\n });\n // Items remaining at the end of the list have been deleted\n if (insertBefore) {\n if (insertBefore._prev) {\n insertBefore._prev._next = null;\n }\n this._removalsHead = insertBefore;\n for (var record = insertBefore; record !== null; record = record._nextRemoved) {\n if (record === this._mapHead) {\n this._mapHead = null;\n }\n this._records.delete(record.key);\n record._nextRemoved = record._next;\n record.previousValue = record.currentValue;\n record.currentValue = null;\n record._prev = null;\n record._next = null;\n }\n }\n // Make sure tails have no next records from previous runs\n if (this._changesTail)\n this._changesTail._nextChanged = null;\n if (this._additionsTail)\n this._additionsTail._nextAdded = null;\n return this.isDirty;\n };\n /**\n * Inserts a record before `before` or append at the end of the list when `before` is null.\n *\n * Notes:\n * - This method appends at `this._appendAfter`,\n * - This method updates `this._appendAfter`,\n * - The return value is the new value for the insertion pointer.\n */\n DefaultKeyValueDiffer.prototype._insertBeforeOrAppend = function (before, record) {\n if (before) {\n var prev = before._prev;\n record._next = before;\n record._prev = prev;\n before._prev = record;\n if (prev) {\n prev._next = record;\n }\n if (before === this._mapHead) {\n this._mapHead = record;\n }\n this._appendAfter = before;\n return before;\n }\n if (this._appendAfter) {\n this._appendAfter._next = record;\n record._prev = this._appendAfter;\n }\n else {\n this._mapHead = record;\n }\n this._appendAfter = record;\n return null;\n };\n DefaultKeyValueDiffer.prototype._getOrCreateRecordForKey = function (key, value) {\n if (this._records.has(key)) {\n var record_1 = this._records.get(key);\n this._maybeAddToChanges(record_1, value);\n var prev = record_1._prev;\n var next = record_1._next;\n if (prev) {\n prev._next = next;\n }\n if (next) {\n next._prev = prev;\n }\n record_1._next = null;\n record_1._prev = null;\n return record_1;\n }\n var record = new KeyValueChangeRecord_(key);\n this._records.set(key, record);\n record.currentValue = value;\n this._addToAdditions(record);\n return record;\n };\n /** @internal */\n DefaultKeyValueDiffer.prototype._reset = function () {\n if (this.isDirty) {\n var record = void 0;\n // let `_previousMapHead` contain the state of the map before the changes\n this._previousMapHead = this._mapHead;\n for (record = this._previousMapHead; record !== null; record = record._next) {\n record._nextPrevious = record._next;\n }\n // Update `record.previousValue` with the value of the item before the changes\n // We need to update all changed items (that's those which have been added and changed)\n for (record = this._changesHead; record !== null; record = record._nextChanged) {\n record.previousValue = record.currentValue;\n }\n for (record = this._additionsHead; record != null; record = record._nextAdded) {\n record.previousValue = record.currentValue;\n }\n this._changesHead = this._changesTail = null;\n this._additionsHead = this._additionsTail = null;\n this._removalsHead = null;\n }\n };\n // Add the record or a given key to the list of changes only when the value has actually changed\n DefaultKeyValueDiffer.prototype._maybeAddToChanges = function (record, newValue) {\n if (!Object.is(newValue, record.currentValue)) {\n record.previousValue = record.currentValue;\n record.currentValue = newValue;\n this._addToChanges(record);\n }\n };\n DefaultKeyValueDiffer.prototype._addToAdditions = function (record) {\n if (this._additionsHead === null) {\n this._additionsHead = this._additionsTail = record;\n }\n else {\n this._additionsTail._nextAdded = record;\n this._additionsTail = record;\n }\n };\n DefaultKeyValueDiffer.prototype._addToChanges = function (record) {\n if (this._changesHead === null) {\n this._changesHead = this._changesTail = record;\n }\n else {\n this._changesTail._nextChanged = record;\n this._changesTail = record;\n }\n };\n /** @internal */\n DefaultKeyValueDiffer.prototype._forEach = function (obj, fn) {\n if (obj instanceof Map) {\n obj.forEach(fn);\n }\n else {\n Object.keys(obj).forEach(function (k) { return fn(obj[k], k); });\n }\n };\n return DefaultKeyValueDiffer;\n }());\n var KeyValueChangeRecord_ = /** @class */ (function () {\n function KeyValueChangeRecord_(key) {\n this.key = key;\n this.previousValue = null;\n this.currentValue = null;\n /** @internal */\n this._nextPrevious = null;\n /** @internal */\n this._next = null;\n /** @internal */\n this._prev = null;\n /** @internal */\n this._nextAdded = null;\n /** @internal */\n this._nextRemoved = null;\n /** @internal */\n this._nextChanged = null;\n }\n return KeyValueChangeRecord_;\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 function defaultIterableDiffersFactory() {\n return new IterableDiffers([new DefaultIterableDifferFactory()]);\n }\n /**\n * A repository of different iterable diffing strategies used by NgFor, NgClass, and others.\n *\n * @publicApi\n */\n var IterableDiffers = /** @class */ (function () {\n function IterableDiffers(factories) {\n this.factories = factories;\n }\n IterableDiffers.create = function (factories, parent) {\n if (parent != null) {\n var copied = parent.factories.slice();\n factories = factories.concat(copied);\n }\n return new IterableDiffers(factories);\n };\n /**\n * Takes an array of {@link IterableDifferFactory} and returns a provider used to extend the\n * inherited {@link IterableDiffers} instance with the provided factories and return a new\n * {@link IterableDiffers} instance.\n *\n * @usageNotes\n * ### Example\n *\n * The following example shows how to extend an existing list of factories,\n * which will only be applied to the injector for this component and its children.\n * This step is all that's required to make a new {@link IterableDiffer} available.\n *\n * ```\n * @Component({\n * viewProviders: [\n * IterableDiffers.extend([new ImmutableListDiffer()])\n * ]\n * })\n * ```\n */\n IterableDiffers.extend = function (factories) {\n return {\n provide: IterableDiffers,\n useFactory: function (parent) {\n // if parent is null, it means that we are in the root injector and we have just overridden\n // the default injection mechanism for IterableDiffers, in such a case just assume\n // `defaultIterableDiffersFactory`.\n return IterableDiffers.create(factories, parent || defaultIterableDiffersFactory());\n },\n // Dependency technically isn't optional, but we can provide a better error message this way.\n deps: [[IterableDiffers, new SkipSelf(), new Optional()]]\n };\n };\n IterableDiffers.prototype.find = function (iterable) {\n var factory = this.factories.find(function (f) { return f.supports(iterable); });\n if (factory != null) {\n return factory;\n }\n else {\n throw new Error(\"Cannot find a differ supporting object '\" + iterable + \"' of type '\" + getTypeNameForDebugging(iterable) + \"'\");\n }\n };\n return IterableDiffers;\n }());\n /** @nocollapse */\n IterableDiffers.ɵprov = ɵɵdefineInjectable({ token: IterableDiffers, providedIn: 'root', factory: defaultIterableDiffersFactory });\n function getTypeNameForDebugging(type) {\n return type['name'] || typeof 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 function defaultKeyValueDiffersFactory() {\n return new KeyValueDiffers([new DefaultKeyValueDifferFactory()]);\n }\n /**\n * A repository of different Map diffing strategies used by NgClass, NgStyle, and others.\n *\n * @publicApi\n */\n var KeyValueDiffers = /** @class */ (function () {\n function KeyValueDiffers(factories) {\n this.factories = factories;\n }\n KeyValueDiffers.create = function (factories, parent) {\n if (parent) {\n var copied = parent.factories.slice();\n factories = factories.concat(copied);\n }\n return new KeyValueDiffers(factories);\n };\n /**\n * Takes an array of {@link KeyValueDifferFactory} and returns a provider used to extend the\n * inherited {@link KeyValueDiffers} instance with the provided factories and return a new\n * {@link KeyValueDiffers} instance.\n *\n * @usageNotes\n * ### Example\n *\n * The following example shows how to extend an existing list of factories,\n * which will only be applied to the injector for this component and its children.\n * This step is all that's required to make a new {@link KeyValueDiffer} available.\n *\n * ```\n * @Component({\n * viewProviders: [\n * KeyValueDiffers.extend([new ImmutableMapDiffer()])\n * ]\n * })\n * ```\n */\n KeyValueDiffers.extend = function (factories) {\n return {\n provide: KeyValueDiffers,\n useFactory: function (parent) {\n // if parent is null, it means that we are in the root injector and we have just overridden\n // the default injection mechanism for KeyValueDiffers, in such a case just assume\n // `defaultKeyValueDiffersFactory`.\n return KeyValueDiffers.create(factories, parent || defaultKeyValueDiffersFactory());\n },\n // Dependency technically isn't optional, but we can provide a better error message this way.\n deps: [[KeyValueDiffers, new SkipSelf(), new Optional()]]\n };\n };\n KeyValueDiffers.prototype.find = function (kv) {\n var factory = this.factories.find(function (f) { return f.supports(kv); });\n if (factory) {\n return factory;\n }\n throw new Error(\"Cannot find a differ supporting object '\" + kv + \"'\");\n };\n return KeyValueDiffers;\n }());\n /** @nocollapse */\n KeyValueDiffers.ɵprov = ɵɵdefineInjectable({ token: KeyValueDiffers, providedIn: 'root', factory: defaultKeyValueDiffersFactory });\n\n function collectNativeNodes(tView, lView, tNode, result, isProjection) {\n if (isProjection === void 0) { isProjection = false; }\n while (tNode !== null) {\n ngDevMode &&\n assertTNodeType(tNode, 3 /* AnyRNode */ | 12 /* AnyContainer */ | 16 /* Projection */ | 32 /* Icu */);\n var lNode = lView[tNode.index];\n if (lNode !== null) {\n result.push(unwrapRNode(lNode));\n }\n // A given lNode can represent either a native node or a LContainer (when it is a host of a\n // ViewContainerRef). When we find a LContainer we need to descend into it to collect root nodes\n // from the views in this container.\n if (isLContainer(lNode)) {\n for (var i = CONTAINER_HEADER_OFFSET; i < lNode.length; i++) {\n var lViewInAContainer = lNode[i];\n var lViewFirstChildTNode = lViewInAContainer[TVIEW].firstChild;\n if (lViewFirstChildTNode !== null) {\n collectNativeNodes(lViewInAContainer[TVIEW], lViewInAContainer, lViewFirstChildTNode, result);\n }\n }\n }\n var tNodeType = tNode.type;\n if (tNodeType & 8 /* ElementContainer */) {\n collectNativeNodes(tView, lView, tNode.child, result);\n }\n else if (tNodeType & 32 /* Icu */) {\n var nextRNode = icuContainerIterate(tNode, lView);\n var rNode = void 0;\n while (rNode = nextRNode()) {\n result.push(rNode);\n }\n }\n else if (tNodeType & 16 /* Projection */) {\n var nodesInSlot = getProjectionNodes(lView, tNode);\n if (Array.isArray(nodesInSlot)) {\n result.push.apply(result, __spread(nodesInSlot));\n }\n else {\n var parentView = getLViewParent(lView[DECLARATION_COMPONENT_VIEW]);\n ngDevMode && assertParentView(parentView);\n collectNativeNodes(parentView[TVIEW], parentView, nodesInSlot, result, true);\n }\n }\n tNode = isProjection ? tNode.projectionNext : tNode.next;\n }\n return result;\n }\n\n var ViewRef = /** @class */ (function () {\n function ViewRef(\n /**\n * This represents `LView` associated with the component when ViewRef is a ChangeDetectorRef.\n *\n * When ViewRef is created for a dynamic component, this also represents the `LView` for the\n * component.\n *\n * For a \"regular\" ViewRef created for an embedded view, this is the `LView` for the embedded\n * view.\n *\n * @internal\n */\n _lView, \n /**\n * This represents the `LView` associated with the point where `ChangeDetectorRef` was\n * requested.\n *\n * This may be different from `_lView` if the `_cdRefInjectingView` is an embedded view.\n */\n _cdRefInjectingView) {\n this._lView = _lView;\n this._cdRefInjectingView = _cdRefInjectingView;\n this._appRef = null;\n this._attachedToViewContainer = false;\n }\n Object.defineProperty(ViewRef.prototype, \"rootNodes\", {\n get: function () {\n var lView = this._lView;\n var tView = lView[TVIEW];\n return collectNativeNodes(tView, lView, tView.firstChild, []);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ViewRef.prototype, \"context\", {\n get: function () {\n return this._lView[CONTEXT];\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ViewRef.prototype, \"destroyed\", {\n get: function () {\n return (this._lView[FLAGS] & 256 /* Destroyed */) === 256 /* Destroyed */;\n },\n enumerable: false,\n configurable: true\n });\n ViewRef.prototype.destroy = function () {\n if (this._appRef) {\n this._appRef.detachView(this);\n }\n else if (this._attachedToViewContainer) {\n var parent = this._lView[PARENT];\n if (isLContainer(parent)) {\n var viewRefs = parent[VIEW_REFS];\n var index = viewRefs ? viewRefs.indexOf(this) : -1;\n if (index > -1) {\n ngDevMode &&\n assertEqual(index, parent.indexOf(this._lView) - CONTAINER_HEADER_OFFSET, 'An attached view should be in the same position within its container as its ViewRef in the VIEW_REFS array.');\n detachView(parent, index);\n removeFromArray(viewRefs, index);\n }\n }\n this._attachedToViewContainer = false;\n }\n destroyLView(this._lView[TVIEW], this._lView);\n };\n ViewRef.prototype.onDestroy = function (callback) {\n storeCleanupWithContext(this._lView[TVIEW], this._lView, null, callback);\n };\n /**\n * Marks a view and all of its ancestors dirty.\n *\n * This can be used to ensure an {@link ChangeDetectionStrategy#OnPush OnPush} component is\n * checked when it needs to be re-rendered but the two normal triggers haven't marked it\n * dirty (i.e. inputs haven't changed and events haven't fired in the view).\n *\n * <!-- TODO: Add a link to a chapter on OnPush components -->\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * @Component({\n * selector: 'my-app',\n * template: `Number of ticks: {{numberOfTicks}}`\n * changeDetection: ChangeDetectionStrategy.OnPush,\n * })\n * class AppComponent {\n * numberOfTicks = 0;\n *\n * constructor(private ref: ChangeDetectorRef) {\n * setInterval(() => {\n * this.numberOfTicks++;\n * // the following is required, otherwise the view will not be updated\n * this.ref.markForCheck();\n * }, 1000);\n * }\n * }\n * ```\n */\n ViewRef.prototype.markForCheck = function () {\n markViewDirty(this._cdRefInjectingView || this._lView);\n };\n /**\n * Detaches the view from the change detection tree.\n *\n * Detached views will not be checked during change detection runs until they are\n * re-attached, even if they are dirty. `detach` can be used in combination with\n * {@link ChangeDetectorRef#detectChanges detectChanges} to implement local change\n * detection checks.\n *\n * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->\n *\n * @usageNotes\n * ### Example\n *\n * The following example defines a component with a large list of readonly data.\n * Imagine the data changes constantly, many times per second. For performance reasons,\n * we want to check and update the list every five seconds. We can do that by detaching\n * the component's change detector and doing a local check every five seconds.\n *\n * ```typescript\n * class DataProvider {\n * // in a real application the returned data will be different every time\n * get data() {\n * return [1,2,3,4,5];\n * }\n * }\n *\n * @Component({\n * selector: 'giant-list',\n * template: `\n * <li *ngFor=\"let d of dataProvider.data\">Data {{d}}</li>\n * `,\n * })\n * class GiantList {\n * constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {\n * ref.detach();\n * setInterval(() => {\n * this.ref.detectChanges();\n * }, 5000);\n * }\n * }\n *\n * @Component({\n * selector: 'app',\n * providers: [DataProvider],\n * template: `\n * <giant-list><giant-list>\n * `,\n * })\n * class App {\n * }\n * ```\n */\n ViewRef.prototype.detach = function () {\n this._lView[FLAGS] &= ~128 /* Attached */;\n };\n /**\n * Re-attaches a view to the change detection tree.\n *\n * This can be used to re-attach views that were previously detached from the tree\n * using {@link ChangeDetectorRef#detach detach}. Views are attached to the tree by default.\n *\n * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n *\n * @usageNotes\n * ### Example\n *\n * The following example creates a component displaying `live` data. The component will detach\n * its change detector from the main change detector tree when the component's live property\n * is set to false.\n *\n * ```typescript\n * class DataProvider {\n * data = 1;\n *\n * constructor() {\n * setInterval(() => {\n * this.data = this.data * 2;\n * }, 500);\n * }\n * }\n *\n * @Component({\n * selector: 'live-data',\n * inputs: ['live'],\n * template: 'Data: {{dataProvider.data}}'\n * })\n * class LiveData {\n * constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {}\n *\n * set live(value) {\n * if (value) {\n * this.ref.reattach();\n * } else {\n * this.ref.detach();\n * }\n * }\n * }\n *\n * @Component({\n * selector: 'my-app',\n * providers: [DataProvider],\n * template: `\n * Live Update: <input type=\"checkbox\" [(ngModel)]=\"live\">\n * <live-data [live]=\"live\"><live-data>\n * `,\n * })\n * class AppComponent {\n * live = true;\n * }\n * ```\n */\n ViewRef.prototype.reattach = function () {\n this._lView[FLAGS] |= 128 /* Attached */;\n };\n /**\n * Checks the view and its children.\n *\n * This can also be used in combination with {@link ChangeDetectorRef#detach detach} to implement\n * local change detection checks.\n *\n * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->\n *\n * @usageNotes\n * ### Example\n *\n * The following example defines a component with a large list of readonly data.\n * Imagine, the data changes constantly, many times per second. For performance reasons,\n * we want to check and update the list every five seconds.\n *\n * We can do that by detaching the component's change detector and doing a local change detection\n * check every five seconds.\n *\n * See {@link ChangeDetectorRef#detach detach} for more information.\n */\n ViewRef.prototype.detectChanges = function () {\n detectChangesInternal(this._lView[TVIEW], this._lView, this.context);\n };\n /**\n * Checks the change detector and its children, and throws if any changes are detected.\n *\n * This is used in development mode to verify that running change detection doesn't\n * introduce other changes.\n */\n ViewRef.prototype.checkNoChanges = function () {\n checkNoChangesInternal(this._lView[TVIEW], this._lView, this.context);\n };\n ViewRef.prototype.attachToViewContainerRef = function () {\n if (this._appRef) {\n throw new Error('This view is already attached directly to the ApplicationRef!');\n }\n this._attachedToViewContainer = true;\n };\n ViewRef.prototype.detachFromAppRef = function () {\n this._appRef = null;\n renderDetachView(this._lView[TVIEW], this._lView);\n };\n ViewRef.prototype.attachToAppRef = function (appRef) {\n if (this._attachedToViewContainer) {\n throw new Error('This view is already attached to a ViewContainer!');\n }\n this._appRef = appRef;\n };\n return ViewRef;\n }());\n /** @internal */\n var RootViewRef = /** @class */ (function (_super) {\n __extends(RootViewRef, _super);\n function RootViewRef(_view) {\n var _this = _super.call(this, _view) || this;\n _this._view = _view;\n return _this;\n }\n RootViewRef.prototype.detectChanges = function () {\n detectChangesInRootView(this._view);\n };\n RootViewRef.prototype.checkNoChanges = function () {\n checkNoChangesInRootView(this._view);\n };\n Object.defineProperty(RootViewRef.prototype, \"context\", {\n get: function () {\n return null;\n },\n enumerable: false,\n configurable: true\n });\n return RootViewRef;\n }(ViewRef));\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 var SWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__ = injectChangeDetectorRef;\n var SWITCH_CHANGE_DETECTOR_REF_FACTORY__PRE_R3__ = noop;\n var SWITCH_CHANGE_DETECTOR_REF_FACTORY = SWITCH_CHANGE_DETECTOR_REF_FACTORY__PRE_R3__;\n /**\n * Base class that provides change detection functionality.\n * A change-detection tree collects all views that are to be checked for changes.\n * Use the methods to add and remove views from the tree, initiate change-detection,\n * and explicitly mark views as _dirty_, meaning that they have changed and need to be re-rendered.\n *\n * @see [Using change detection hooks](guide/lifecycle-hooks#using-change-detection-hooks)\n * @see [Defining custom change detection](guide/lifecycle-hooks#defining-custom-change-detection)\n *\n * @usageNotes\n *\n * The following examples demonstrate how to modify default change-detection behavior\n * to perform explicit detection when needed.\n *\n * ### Use `markForCheck()` with `CheckOnce` strategy\n *\n * The following example sets the `OnPush` change-detection strategy for a component\n * (`CheckOnce`, rather than the default `CheckAlways`), then forces a second check\n * after an interval. See [live demo](https://plnkr.co/edit/GC512b?p=preview).\n *\n * <code-example path=\"core/ts/change_detect/change-detection.ts\"\n * region=\"mark-for-check\"></code-example>\n *\n * ### Detach change detector to limit how often check occurs\n *\n * The following example defines a component with a large list of read-only data\n * that is expected to change constantly, many times per second.\n * To improve performance, we want to check and update the list\n * less often than the changes actually occur. To do that, we detach\n * the component's change detector and perform an explicit local check every five seconds.\n *\n * <code-example path=\"core/ts/change_detect/change-detection.ts\" region=\"detach\"></code-example>\n *\n *\n * ### Reattaching a detached component\n *\n * The following example creates a component displaying live data.\n * The component detaches its change detector from the main change detector tree\n * when the `live` property is set to false, and reattaches it when the property\n * becomes true.\n *\n * <code-example path=\"core/ts/change_detect/change-detection.ts\" region=\"reattach\"></code-example>\n *\n * @publicApi\n */\n var ChangeDetectorRef = /** @class */ (function () {\n function ChangeDetectorRef() {\n }\n return ChangeDetectorRef;\n }());\n /**\n * @internal\n * @nocollapse\n */\n ChangeDetectorRef.__NG_ELEMENT_ID__ = SWITCH_CHANGE_DETECTOR_REF_FACTORY;\n /**\n * This marker is need so that the JIT compiler can correctly identify this class as special.\n *\n * @internal\n * @nocollapse\n */\n ChangeDetectorRef.__ChangeDetectorRef__ = true;\n /** Returns a ChangeDetectorRef (a.k.a. a ViewRef) */\n function injectChangeDetectorRef(isPipe) {\n if (isPipe === void 0) { isPipe = false; }\n return createViewRef(getCurrentTNode(), getLView(), isPipe);\n }\n /**\n * Creates a ViewRef and stores it on the injector as ChangeDetectorRef (public alias).\n *\n * @param tNode The node that is requesting a ChangeDetectorRef\n * @param lView The view to which the node belongs\n * @param isPipe Whether the view is being injected into a pipe.\n * @returns The ChangeDetectorRef to use\n */\n function createViewRef(tNode, lView, isPipe) {\n // `isComponentView` will be true for Component and Directives (but not for Pipes).\n // See https://github.com/angular/angular/pull/33072 for proper fix\n var isComponentView = !isPipe && isComponentHost(tNode);\n if (isComponentView) {\n // The LView represents the location where the component is declared.\n // Instead we want the LView for the component View and so we need to look it up.\n var componentView = getComponentLViewByIndex(tNode.index, lView); // look down\n return new ViewRef(componentView, componentView);\n }\n else if (tNode.type & (3 /* AnyRNode */ | 12 /* AnyContainer */ | 32 /* Icu */)) {\n // The LView represents the location where the injection is requested from.\n // We need to locate the containing LView (in case where the `lView` is an embedded view)\n var hostComponentView = lView[DECLARATION_COMPONENT_VIEW]; // look up\n return new ViewRef(hostComponentView, lView);\n }\n return null;\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 * Structural diffing for `Object`s and `Map`s.\n */\n var keyValDiff = [new DefaultKeyValueDifferFactory()];\n /**\n * Structural diffing for `Iterable` types such as `Array`s.\n */\n var iterableDiff = [new DefaultIterableDifferFactory()];\n var defaultIterableDiffers = new IterableDiffers(iterableDiff);\n var defaultKeyValueDiffers = new KeyValueDiffers(keyValDiff);\n\n var SWITCH_TEMPLATE_REF_FACTORY__POST_R3__ = injectTemplateRef;\n var SWITCH_TEMPLATE_REF_FACTORY__PRE_R3__ = noop;\n var SWITCH_TEMPLATE_REF_FACTORY = SWITCH_TEMPLATE_REF_FACTORY__PRE_R3__;\n /**\n * Represents an embedded template that can be used to instantiate embedded views.\n * To instantiate embedded views based on a template, use the `ViewContainerRef`\n * method `createEmbeddedView()`.\n *\n * Access a `TemplateRef` instance by placing a directive on an `<ng-template>`\n * element (or directive prefixed with `*`). The `TemplateRef` for the embedded view\n * is injected into the constructor of the directive,\n * using the `TemplateRef` token.\n *\n * You can also use a `Query` to find a `TemplateRef` associated with\n * a component or a directive.\n *\n * @see `ViewContainerRef`\n * @see [Navigate the Component Tree with DI](guide/dependency-injection-navtree)\n *\n * @publicApi\n */\n var TemplateRef = /** @class */ (function () {\n function TemplateRef() {\n }\n return TemplateRef;\n }());\n /**\n * @internal\n * @nocollapse\n */\n TemplateRef.__NG_ELEMENT_ID__ = SWITCH_TEMPLATE_REF_FACTORY;\n var ViewEngineTemplateRef = TemplateRef;\n var R3TemplateRef = /** @class */ (function (_super) {\n __extends(TemplateRef, _super);\n function TemplateRef(_declarationLView, _declarationTContainer, elementRef) {\n var _this = _super.call(this) || this;\n _this._declarationLView = _declarationLView;\n _this._declarationTContainer = _declarationTContainer;\n _this.elementRef = elementRef;\n return _this;\n }\n TemplateRef.prototype.createEmbeddedView = function (context) {\n var embeddedTView = this._declarationTContainer.tViews;\n var embeddedLView = createLView(this._declarationLView, embeddedTView, context, 16 /* CheckAlways */, null, embeddedTView.declTNode, null, null, null, null);\n var declarationLContainer = this._declarationLView[this._declarationTContainer.index];\n ngDevMode && assertLContainer(declarationLContainer);\n embeddedLView[DECLARATION_LCONTAINER] = declarationLContainer;\n var declarationViewLQueries = this._declarationLView[QUERIES];\n if (declarationViewLQueries !== null) {\n embeddedLView[QUERIES] = declarationViewLQueries.createEmbeddedView(embeddedTView);\n }\n renderView(embeddedTView, embeddedLView, context);\n return new ViewRef(embeddedLView);\n };\n return TemplateRef;\n }(ViewEngineTemplateRef));\n /**\n * Creates a TemplateRef given a node.\n *\n * @returns The TemplateRef instance to use\n */\n function injectTemplateRef() {\n return createTemplateRef(getCurrentTNode(), getLView());\n }\n /**\n * Creates a TemplateRef and stores it on the injector.\n *\n * @param hostTNode The node on which a TemplateRef is requested\n * @param hostLView The `LView` to which the node belongs\n * @returns The TemplateRef instance or null if we can't create a TemplateRef on a given node type\n */\n function createTemplateRef(hostTNode, hostLView) {\n if (hostTNode.type & 4 /* Container */) {\n ngDevMode && assertDefined(hostTNode.tViews, 'TView must be allocated');\n return new R3TemplateRef(hostLView, hostTNode, createElementRef(hostTNode, hostLView));\n }\n return null;\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 an instance of an `NgModule` created by an `NgModuleFactory`.\n * Provides access to the `NgModule` instance and related objects.\n *\n * @publicApi\n */\n var NgModuleRef = /** @class */ (function () {\n function NgModuleRef() {\n }\n return NgModuleRef;\n }());\n /**\n * @publicApi\n */\n var NgModuleFactory = /** @class */ (function () {\n function NgModuleFactory() {\n }\n return NgModuleFactory;\n }());\n\n var SWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__ = injectViewContainerRef;\n var SWITCH_VIEW_CONTAINER_REF_FACTORY__PRE_R3__ = noop;\n var SWITCH_VIEW_CONTAINER_REF_FACTORY = SWITCH_VIEW_CONTAINER_REF_FACTORY__PRE_R3__;\n /**\n * Represents a container where one or more views can be attached to a component.\n *\n * Can contain *host views* (created by instantiating a\n * component with the `createComponent()` method), and *embedded views*\n * (created by instantiating a `TemplateRef` with the `createEmbeddedView()` method).\n *\n * A view container instance can contain other view containers,\n * creating a [view hierarchy](guide/glossary#view-tree).\n *\n * @see `ComponentRef`\n * @see `EmbeddedViewRef`\n *\n * @publicApi\n */\n var ViewContainerRef = /** @class */ (function () {\n function ViewContainerRef() {\n }\n return ViewContainerRef;\n }());\n /**\n * @internal\n * @nocollapse\n */\n ViewContainerRef.__NG_ELEMENT_ID__ = SWITCH_VIEW_CONTAINER_REF_FACTORY;\n /**\n * Creates a ViewContainerRef and stores it on the injector. Or, if the ViewContainerRef\n * already exists, retrieves the existing ViewContainerRef.\n *\n * @returns The ViewContainerRef instance to use\n */\n function injectViewContainerRef() {\n var previousTNode = getCurrentTNode();\n return createContainerRef(previousTNode, getLView());\n }\n var VE_ViewContainerRef = ViewContainerRef;\n var R3ViewContainerRef = /** @class */ (function (_super) {\n __extends(ViewContainerRef, _super);\n function ViewContainerRef(_lContainer, _hostTNode, _hostLView) {\n var _this = _super.call(this) || this;\n _this._lContainer = _lContainer;\n _this._hostTNode = _hostTNode;\n _this._hostLView = _hostLView;\n return _this;\n }\n Object.defineProperty(ViewContainerRef.prototype, \"element\", {\n get: function () {\n return createElementRef(this._hostTNode, this._hostLView);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ViewContainerRef.prototype, \"injector\", {\n get: function () {\n return new NodeInjector(this._hostTNode, this._hostLView);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ViewContainerRef.prototype, \"parentInjector\", {\n /** @deprecated No replacement */\n get: function () {\n var parentLocation = getParentInjectorLocation(this._hostTNode, this._hostLView);\n if (hasParentInjector(parentLocation)) {\n var parentView = getParentInjectorView(parentLocation, this._hostLView);\n var injectorIndex = getParentInjectorIndex(parentLocation);\n ngDevMode && assertNodeInjector(parentView, injectorIndex);\n var parentTNode = parentView[TVIEW].data[injectorIndex + 8 /* TNODE */];\n return new NodeInjector(parentTNode, parentView);\n }\n else {\n return new NodeInjector(null, this._hostLView);\n }\n },\n enumerable: false,\n configurable: true\n });\n ViewContainerRef.prototype.clear = function () {\n while (this.length > 0) {\n this.remove(this.length - 1);\n }\n };\n ViewContainerRef.prototype.get = function (index) {\n var viewRefs = getViewRefs(this._lContainer);\n return viewRefs !== null && viewRefs[index] || null;\n };\n Object.defineProperty(ViewContainerRef.prototype, \"length\", {\n get: function () {\n return this._lContainer.length - CONTAINER_HEADER_OFFSET;\n },\n enumerable: false,\n configurable: true\n });\n ViewContainerRef.prototype.createEmbeddedView = function (templateRef, context, index) {\n var viewRef = templateRef.createEmbeddedView(context || {});\n this.insert(viewRef, index);\n return viewRef;\n };\n ViewContainerRef.prototype.createComponent = function (componentFactory, index, injector, projectableNodes, ngModuleRef) {\n var contextInjector = injector || this.parentInjector;\n if (!ngModuleRef && componentFactory.ngModule == null && contextInjector) {\n // DO NOT REFACTOR. The code here used to have a `value || undefined` expression\n // which seems to cause internal google apps to fail. This is documented in the\n // following internal bug issue: go/b/142967802\n var result = contextInjector.get(NgModuleRef, null);\n if (result) {\n ngModuleRef = result;\n }\n }\n var componentRef = componentFactory.create(contextInjector, projectableNodes, undefined, ngModuleRef);\n this.insert(componentRef.hostView, index);\n return componentRef;\n };\n ViewContainerRef.prototype.insert = function (viewRef, index) {\n var lView = viewRef._lView;\n var tView = lView[TVIEW];\n if (ngDevMode && viewRef.destroyed) {\n throw new Error('Cannot insert a destroyed View in a ViewContainer!');\n }\n if (viewAttachedToContainer(lView)) {\n // If view is already attached, detach it first so we clean up references appropriately.\n var prevIdx = this.indexOf(viewRef);\n // A view might be attached either to this or a different container. The `prevIdx` for\n // those cases will be:\n // equal to -1 for views attached to this ViewContainerRef\n // >= 0 for views attached to a different ViewContainerRef\n if (prevIdx !== -1) {\n this.detach(prevIdx);\n }\n else {\n var prevLContainer = lView[PARENT];\n ngDevMode &&\n assertEqual(isLContainer(prevLContainer), true, 'An attached view should have its PARENT point to a container.');\n // We need to re-create a R3ViewContainerRef instance since those are not stored on\n // LView (nor anywhere else).\n var prevVCRef = new R3ViewContainerRef(prevLContainer, prevLContainer[T_HOST], prevLContainer[PARENT]);\n prevVCRef.detach(prevVCRef.indexOf(viewRef));\n }\n }\n // Logical operation of adding `LView` to `LContainer`\n var adjustedIdx = this._adjustIndex(index);\n var lContainer = this._lContainer;\n insertView(tView, lView, lContainer, adjustedIdx);\n // Physical operation of adding the DOM nodes.\n var beforeNode = getBeforeNodeForView(adjustedIdx, lContainer);\n var renderer = lView[RENDERER];\n var parentRNode = nativeParentNode(renderer, lContainer[NATIVE]);\n if (parentRNode !== null) {\n addViewToContainer(tView, lContainer[T_HOST], renderer, lView, parentRNode, beforeNode);\n }\n viewRef.attachToViewContainerRef();\n addToArray(getOrCreateViewRefs(lContainer), adjustedIdx, viewRef);\n return viewRef;\n };\n ViewContainerRef.prototype.move = function (viewRef, newIndex) {\n if (ngDevMode && viewRef.destroyed) {\n throw new Error('Cannot move a destroyed View in a ViewContainer!');\n }\n return this.insert(viewRef, newIndex);\n };\n ViewContainerRef.prototype.indexOf = function (viewRef) {\n var viewRefsArr = getViewRefs(this._lContainer);\n return viewRefsArr !== null ? viewRefsArr.indexOf(viewRef) : -1;\n };\n ViewContainerRef.prototype.remove = function (index) {\n var adjustedIdx = this._adjustIndex(index, -1);\n var detachedView = detachView(this._lContainer, adjustedIdx);\n if (detachedView) {\n // Before destroying the view, remove it from the container's array of `ViewRef`s.\n // This ensures the view container length is updated before calling\n // `destroyLView`, which could recursively call view container methods that\n // rely on an accurate container length.\n // (e.g. a method on this view container being called by a child directive's OnDestroy\n // lifecycle hook)\n removeFromArray(getOrCreateViewRefs(this._lContainer), adjustedIdx);\n destroyLView(detachedView[TVIEW], detachedView);\n }\n };\n ViewContainerRef.prototype.detach = function (index) {\n var adjustedIdx = this._adjustIndex(index, -1);\n var view = detachView(this._lContainer, adjustedIdx);\n var wasDetached = view && removeFromArray(getOrCreateViewRefs(this._lContainer), adjustedIdx) != null;\n return wasDetached ? new ViewRef(view) : null;\n };\n ViewContainerRef.prototype._adjustIndex = function (index, shift) {\n if (shift === void 0) { shift = 0; }\n if (index == null) {\n return this.length + shift;\n }\n if (ngDevMode) {\n assertGreaterThan(index, -1, \"ViewRef index must be positive, got \" + index);\n // +1 because it's legal to insert at the end.\n assertLessThan(index, this.length + 1 + shift, 'index');\n }\n return index;\n };\n return ViewContainerRef;\n }(VE_ViewContainerRef));\n function getViewRefs(lContainer) {\n return lContainer[VIEW_REFS];\n }\n function getOrCreateViewRefs(lContainer) {\n return (lContainer[VIEW_REFS] || (lContainer[VIEW_REFS] = []));\n }\n /**\n * Creates a ViewContainerRef and stores it on the injector.\n *\n * @param ViewContainerRefToken The ViewContainerRef type\n * @param ElementRefToken The ElementRef type\n * @param hostTNode The node that is requesting a ViewContainerRef\n * @param hostLView The view to which the node belongs\n * @returns The ViewContainerRef instance to use\n */\n function createContainerRef(hostTNode, hostLView) {\n ngDevMode && assertTNodeType(hostTNode, 12 /* AnyContainer */ | 3 /* AnyRNode */);\n var lContainer;\n var slotValue = hostLView[hostTNode.index];\n if (isLContainer(slotValue)) {\n // If the host is a container, we don't need to create a new LContainer\n lContainer = slotValue;\n }\n else {\n var commentNode = void 0;\n // If the host is an element container, the native host element is guaranteed to be a\n // comment and we can reuse that comment as anchor element for the new LContainer.\n // The comment node in question is already part of the DOM structure so we don't need to append\n // it again.\n if (hostTNode.type & 8 /* ElementContainer */) {\n commentNode = unwrapRNode(slotValue);\n }\n else {\n // If the host is a regular element, we have to insert a comment node manually which will\n // be used as an anchor when inserting elements. In this specific case we use low-level DOM\n // manipulation to insert it.\n var renderer = hostLView[RENDERER];\n ngDevMode && ngDevMode.rendererCreateComment++;\n commentNode = renderer.createComment(ngDevMode ? 'container' : '');\n var hostNative = getNativeByTNode(hostTNode, hostLView);\n var parentOfHostNative = nativeParentNode(renderer, hostNative);\n nativeInsertBefore(renderer, parentOfHostNative, commentNode, nativeNextSibling(renderer, hostNative), false);\n }\n hostLView[hostTNode.index] = lContainer =\n createLContainer(slotValue, hostLView, commentNode, hostTNode);\n addToViewTree(hostLView, lContainer);\n }\n return new R3ViewContainerRef(lContainer, hostTNode, hostLView);\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 function expressionChangedAfterItHasBeenCheckedError(context, oldValue, currValue, isFirstCheck) {\n var msg = \"ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: '\" + oldValue + \"'. Current value: '\" + currValue + \"'.\";\n if (isFirstCheck) {\n msg +=\n \" It seems like the view has been created after its parent and its children have been dirty checked.\" +\n \" Has it been created in a change detection hook ?\";\n }\n return viewDebugError(msg, context);\n }\n function viewWrappedDebugError(err, context) {\n if (!(err instanceof Error)) {\n // errors that are not Error instances don't have a stack,\n // so it is ok to wrap them into a new Error object...\n err = new Error(err.toString());\n }\n _addDebugContext(err, context);\n return err;\n }\n function viewDebugError(msg, context) {\n var err = new Error(msg);\n _addDebugContext(err, context);\n return err;\n }\n function _addDebugContext(err, context) {\n err[ERROR_DEBUG_CONTEXT] = context;\n err[ERROR_LOGGER] = context.logError.bind(context);\n }\n function isViewDebugError(err) {\n return !!getDebugContext(err);\n }\n function viewDestroyedError(action) {\n return new Error(\"ViewDestroyedError: Attempt to use a destroyed view: \" + action);\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 // Called before each cycle of a view's check to detect whether this is in the\n // initState for which we need to call ngOnInit, ngAfterContentInit or ngAfterViewInit\n // lifecycle methods. Returns true if this check cycle should call lifecycle\n // methods.\n function shiftInitState(view, priorInitState, newInitState) {\n // Only update the InitState if we are currently in the prior state.\n // For example, only move into CallingInit if we are in BeforeInit. Only\n // move into CallingContentInit if we are in CallingInit. Normally this will\n // always be true because of how checkCycle is called in checkAndUpdateView.\n // However, if checkAndUpdateView is called recursively or if an exception is\n // thrown while checkAndUpdateView is running, checkAndUpdateView starts over\n // from the beginning. This ensures the state is monotonically increasing,\n // terminating in the AfterInit state, which ensures the Init methods are called\n // at least once and only once.\n var state = view.state;\n var initState = state & 1792 /* InitState_Mask */;\n if (initState === priorInitState) {\n view.state = (state & ~1792 /* InitState_Mask */) | newInitState;\n view.initIndex = -1;\n return true;\n }\n return initState === newInitState;\n }\n // Returns true if the lifecycle init method should be called for the node with\n // the given init index.\n function shouldCallLifecycleInitHook(view, initState, index) {\n if ((view.state & 1792 /* InitState_Mask */) === initState && view.initIndex <= index) {\n view.initIndex = index + 1;\n return true;\n }\n return false;\n }\n /**\n * Node instance data.\n *\n * We have a separate type per NodeType to save memory\n * (TextData | ElementData | ProviderData | PureExpressionData | QueryList<any>)\n *\n * To keep our code monomorphic,\n * we prohibit using `NodeData` directly but enforce the use of accessors (`asElementData`, ...).\n * This way, no usage site can get a `NodeData` from view.nodes and then use it for different\n * purposes.\n */\n var NodeData = /** @class */ (function () {\n function NodeData() {\n }\n return NodeData;\n }());\n /**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\n function asTextData(view, index) {\n return view.nodes[index];\n }\n /**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\n function asElementData(view, index) {\n return view.nodes[index];\n }\n /**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\n function asProviderData(view, index) {\n return view.nodes[index];\n }\n /**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\n function asPureExpressionData(view, index) {\n return view.nodes[index];\n }\n /**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\n function asQueryList(view, index) {\n return view.nodes[index];\n }\n var DebugContext = /** @class */ (function () {\n function DebugContext() {\n }\n return DebugContext;\n }());\n /**\n * This object is used to prevent cycles in the source files and to have a place where\n * debug mode can hook it. It is lazily filled when `isDevMode` is known.\n */\n var Services = {\n setCurrentNode: undefined,\n createRootView: undefined,\n createEmbeddedView: undefined,\n createComponentView: undefined,\n createNgModuleRef: undefined,\n overrideProvider: undefined,\n overrideComponentView: undefined,\n clearOverrides: undefined,\n checkAndUpdateView: undefined,\n checkNoChangesView: undefined,\n destroyView: undefined,\n resolveDep: undefined,\n createDebugContext: undefined,\n handleEvent: undefined,\n updateDirectives: undefined,\n updateRenderer: undefined,\n dirtyParentQueries: undefined,\n };\n\n var NOOP = function () { };\n var _tokenKeyCache = new Map();\n function tokenKey(token) {\n var key = _tokenKeyCache.get(token);\n if (!key) {\n key = stringify(token) + '_' + _tokenKeyCache.size;\n _tokenKeyCache.set(token, key);\n }\n return key;\n }\n function unwrapValue(view, nodeIdx, bindingIdx, value) {\n if (WrappedValue.isWrapped(value)) {\n value = WrappedValue.unwrap(value);\n var globalBindingIdx = view.def.nodes[nodeIdx].bindingIndex + bindingIdx;\n var oldValue = WrappedValue.unwrap(view.oldValues[globalBindingIdx]);\n view.oldValues[globalBindingIdx] = new WrappedValue(oldValue);\n }\n return value;\n }\n var UNDEFINED_RENDERER_TYPE_ID = '$$undefined';\n var EMPTY_RENDERER_TYPE_ID = '$$empty';\n // Attention: this function is called as top level function.\n // Putting any logic in here will destroy closure tree shaking!\n function createRendererType2(values) {\n return {\n id: UNDEFINED_RENDERER_TYPE_ID,\n styles: values.styles,\n encapsulation: values.encapsulation,\n data: values.data\n };\n }\n var _renderCompCount$1 = 0;\n function resolveRendererType2(type) {\n if (type && type.id === UNDEFINED_RENDERER_TYPE_ID) {\n // first time we see this RendererType2. Initialize it...\n var isFilled = ((type.encapsulation != null && type.encapsulation !== exports.ViewEncapsulation.None) ||\n type.styles.length || Object.keys(type.data).length);\n if (isFilled) {\n type.id = \"c\" + _renderCompCount$1++;\n }\n else {\n type.id = EMPTY_RENDERER_TYPE_ID;\n }\n }\n if (type && type.id === EMPTY_RENDERER_TYPE_ID) {\n type = null;\n }\n return type || null;\n }\n function checkBinding(view, def, bindingIdx, value) {\n var oldValues = view.oldValues;\n if ((view.state & 2 /* FirstCheck */) ||\n !Object.is(oldValues[def.bindingIndex + bindingIdx], value)) {\n return true;\n }\n return false;\n }\n function checkAndUpdateBinding(view, def, bindingIdx, value) {\n if (checkBinding(view, def, bindingIdx, value)) {\n view.oldValues[def.bindingIndex + bindingIdx] = value;\n return true;\n }\n return false;\n }\n function checkBindingNoChanges(view, def, bindingIdx, value) {\n var oldValue = view.oldValues[def.bindingIndex + bindingIdx];\n if ((view.state & 1 /* BeforeFirstCheck */) || !devModeEqual(oldValue, value)) {\n var bindingName = def.bindings[bindingIdx].name;\n throw expressionChangedAfterItHasBeenCheckedError(Services.createDebugContext(view, def.nodeIndex), bindingName + \": \" + oldValue, bindingName + \": \" + value, (view.state & 1 /* BeforeFirstCheck */) !== 0);\n }\n }\n function markParentViewsForCheck(view) {\n var currView = view;\n while (currView) {\n if (currView.def.flags & 2 /* OnPush */) {\n currView.state |= 8 /* ChecksEnabled */;\n }\n currView = currView.viewContainerParent || currView.parent;\n }\n }\n function markParentViewsForCheckProjectedViews(view, endView) {\n var currView = view;\n while (currView && currView !== endView) {\n currView.state |= 64 /* CheckProjectedViews */;\n currView = currView.viewContainerParent || currView.parent;\n }\n }\n function dispatchEvent(view, nodeIndex, eventName, event) {\n try {\n var nodeDef = view.def.nodes[nodeIndex];\n var startView = nodeDef.flags & 33554432 /* ComponentView */ ?\n asElementData(view, nodeIndex).componentView :\n view;\n markParentViewsForCheck(startView);\n return Services.handleEvent(view, nodeIndex, eventName, event);\n }\n catch (e) {\n // Attention: Don't rethrow, as it would cancel Observable subscriptions!\n view.root.errorHandler.handleError(e);\n }\n }\n function declaredViewContainer(view) {\n if (view.parent) {\n var parentView = view.parent;\n return asElementData(parentView, view.parentNodeDef.nodeIndex);\n }\n return null;\n }\n /**\n * for component views, this is the host element.\n * for embedded views, this is the index of the parent node\n * that contains the view container.\n */\n function viewParentEl(view) {\n var parentView = view.parent;\n if (parentView) {\n return view.parentNodeDef.parent;\n }\n else {\n return null;\n }\n }\n function renderNode(view, def) {\n switch (def.flags & 201347067 /* Types */) {\n case 1 /* TypeElement */:\n return asElementData(view, def.nodeIndex).renderElement;\n case 2 /* TypeText */:\n return asTextData(view, def.nodeIndex).renderText;\n }\n }\n function elementEventFullName(target, name) {\n return target ? target + \":\" + name : name;\n }\n function isComponentView(view) {\n return !!view.parent && !!(view.parentNodeDef.flags & 32768 /* Component */);\n }\n function isEmbeddedView(view) {\n return !!view.parent && !(view.parentNodeDef.flags & 32768 /* Component */);\n }\n function filterQueryId(queryId) {\n return 1 << (queryId % 32);\n }\n function splitMatchedQueriesDsl(matchedQueriesDsl) {\n var matchedQueries = {};\n var matchedQueryIds = 0;\n var references = {};\n if (matchedQueriesDsl) {\n matchedQueriesDsl.forEach(function (_a) {\n var _b = __read(_a, 2), queryId = _b[0], valueType = _b[1];\n if (typeof queryId === 'number') {\n matchedQueries[queryId] = valueType;\n matchedQueryIds |= filterQueryId(queryId);\n }\n else {\n references[queryId] = valueType;\n }\n });\n }\n return { matchedQueries: matchedQueries, references: references, matchedQueryIds: matchedQueryIds };\n }\n function splitDepsDsl(deps, sourceName) {\n return deps.map(function (value) {\n var _a;\n var token;\n var flags;\n if (Array.isArray(value)) {\n _a = __read(value, 2), flags = _a[0], token = _a[1];\n }\n else {\n flags = 0 /* None */;\n token = value;\n }\n if (token && (typeof token === 'function' || typeof token === 'object') && sourceName) {\n Object.defineProperty(token, SOURCE, { value: sourceName, configurable: true });\n }\n return { flags: flags, token: token, tokenKey: tokenKey(token) };\n });\n }\n function getParentRenderElement(view, renderHost, def) {\n var renderParent = def.renderParent;\n if (renderParent) {\n if ((renderParent.flags & 1 /* TypeElement */) === 0 ||\n (renderParent.flags & 33554432 /* ComponentView */) === 0 ||\n (renderParent.element.componentRendererType &&\n (renderParent.element.componentRendererType.encapsulation ===\n exports.ViewEncapsulation.ShadowDom ||\n // TODO(FW-2290): remove the `encapsulation === 1` fallback logic in v12.\n renderParent.element.componentRendererType.encapsulation === 1))) {\n // only children of non components, or children of components with native encapsulation should\n // be attached.\n return asElementData(view, def.renderParent.nodeIndex).renderElement;\n }\n }\n else {\n return renderHost;\n }\n }\n var DEFINITION_CACHE = new WeakMap();\n function resolveDefinition(factory) {\n var value = DEFINITION_CACHE.get(factory);\n if (!value) {\n value = factory(function () { return NOOP; });\n value.factory = factory;\n DEFINITION_CACHE.set(factory, value);\n }\n return value;\n }\n function rootRenderNodes(view) {\n var renderNodes = [];\n visitRootRenderNodes(view, 0 /* Collect */, undefined, undefined, renderNodes);\n return renderNodes;\n }\n function visitRootRenderNodes(view, action, parentNode, nextSibling, target) {\n // We need to re-compute the parent node in case the nodes have been moved around manually\n if (action === 3 /* RemoveChild */) {\n parentNode = view.renderer.parentNode(renderNode(view, view.def.lastRenderRootNode));\n }\n visitSiblingRenderNodes(view, action, 0, view.def.nodes.length - 1, parentNode, nextSibling, target);\n }\n function visitSiblingRenderNodes(view, action, startIndex, endIndex, parentNode, nextSibling, target) {\n for (var i = startIndex; i <= endIndex; i++) {\n var nodeDef = view.def.nodes[i];\n if (nodeDef.flags & (1 /* TypeElement */ | 2 /* TypeText */ | 8 /* TypeNgContent */)) {\n visitRenderNode(view, nodeDef, action, parentNode, nextSibling, target);\n }\n // jump to next sibling\n i += nodeDef.childCount;\n }\n }\n function visitProjectedRenderNodes(view, ngContentIndex, action, parentNode, nextSibling, target) {\n var compView = view;\n while (compView && !isComponentView(compView)) {\n compView = compView.parent;\n }\n var hostView = compView.parent;\n var hostElDef = viewParentEl(compView);\n var startIndex = hostElDef.nodeIndex + 1;\n var endIndex = hostElDef.nodeIndex + hostElDef.childCount;\n for (var i = startIndex; i <= endIndex; i++) {\n var nodeDef = hostView.def.nodes[i];\n if (nodeDef.ngContentIndex === ngContentIndex) {\n visitRenderNode(hostView, nodeDef, action, parentNode, nextSibling, target);\n }\n // jump to next sibling\n i += nodeDef.childCount;\n }\n if (!hostView.parent) {\n // a root view\n var projectedNodes = view.root.projectableNodes[ngContentIndex];\n if (projectedNodes) {\n for (var i = 0; i < projectedNodes.length; i++) {\n execRenderNodeAction(view, projectedNodes[i], action, parentNode, nextSibling, target);\n }\n }\n }\n }\n function visitRenderNode(view, nodeDef, action, parentNode, nextSibling, target) {\n if (nodeDef.flags & 8 /* TypeNgContent */) {\n visitProjectedRenderNodes(view, nodeDef.ngContent.index, action, parentNode, nextSibling, target);\n }\n else {\n var rn = renderNode(view, nodeDef);\n if (action === 3 /* RemoveChild */ && (nodeDef.flags & 33554432 /* ComponentView */) &&\n (nodeDef.bindingFlags & 48 /* CatSyntheticProperty */)) {\n // Note: we might need to do both actions.\n if (nodeDef.bindingFlags & (16 /* SyntheticProperty */)) {\n execRenderNodeAction(view, rn, action, parentNode, nextSibling, target);\n }\n if (nodeDef.bindingFlags & (32 /* SyntheticHostProperty */)) {\n var compView = asElementData(view, nodeDef.nodeIndex).componentView;\n execRenderNodeAction(compView, rn, action, parentNode, nextSibling, target);\n }\n }\n else {\n execRenderNodeAction(view, rn, action, parentNode, nextSibling, target);\n }\n if (nodeDef.flags & 16777216 /* EmbeddedViews */) {\n var embeddedViews = asElementData(view, nodeDef.nodeIndex).viewContainer._embeddedViews;\n for (var k = 0; k < embeddedViews.length; k++) {\n visitRootRenderNodes(embeddedViews[k], action, parentNode, nextSibling, target);\n }\n }\n if (nodeDef.flags & 1 /* TypeElement */ && !nodeDef.element.name) {\n visitSiblingRenderNodes(view, action, nodeDef.nodeIndex + 1, nodeDef.nodeIndex + nodeDef.childCount, parentNode, nextSibling, target);\n }\n }\n }\n function execRenderNodeAction(view, renderNode, action, parentNode, nextSibling, target) {\n var renderer = view.renderer;\n switch (action) {\n case 1 /* AppendChild */:\n renderer.appendChild(parentNode, renderNode);\n break;\n case 2 /* InsertBefore */:\n renderer.insertBefore(parentNode, renderNode, nextSibling);\n break;\n case 3 /* RemoveChild */:\n renderer.removeChild(parentNode, renderNode);\n break;\n case 0 /* Collect */:\n target.push(renderNode);\n break;\n }\n }\n var NS_PREFIX_RE = /^:([^:]+):(.+)$/;\n function splitNamespace(name) {\n if (name[0] === ':') {\n var match = name.match(NS_PREFIX_RE);\n return [match[1], match[2]];\n }\n return ['', name];\n }\n function calcBindingFlags(bindings) {\n var flags = 0;\n for (var i = 0; i < bindings.length; i++) {\n flags |= bindings[i].flags;\n }\n return flags;\n }\n function interpolate(valueCount, constAndInterp) {\n var result = '';\n for (var i = 0; i < valueCount * 2; i = i + 2) {\n result = result + constAndInterp[i] + _toStringWithNull(constAndInterp[i + 1]);\n }\n return result + constAndInterp[valueCount * 2];\n }\n function inlineInterpolate(valueCount, c0, a1, c1, a2, c2, a3, c3, a4, c4, a5, c5, a6, c6, a7, c7, a8, c8, a9, c9) {\n switch (valueCount) {\n case 1:\n return c0 + _toStringWithNull(a1) + c1;\n case 2:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2;\n case 3:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n c3;\n case 4:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n c3 + _toStringWithNull(a4) + c4;\n case 5:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5;\n case 6:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) + c6;\n case 7:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) +\n c6 + _toStringWithNull(a7) + c7;\n case 8:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) +\n c6 + _toStringWithNull(a7) + c7 + _toStringWithNull(a8) + c8;\n case 9:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) +\n c6 + _toStringWithNull(a7) + c7 + _toStringWithNull(a8) + c8 + _toStringWithNull(a9) + c9;\n default:\n throw new Error(\"Does not support more than 9 expressions\");\n }\n }\n function _toStringWithNull(v) {\n return v != null ? v.toString() : '';\n }\n var EMPTY_ARRAY$4 = [];\n var EMPTY_MAP = {};\n\n var UNDEFINED_VALUE = {};\n var InjectorRefTokenKey = tokenKey(Injector);\n var INJECTORRefTokenKey = tokenKey(INJECTOR$1);\n var NgModuleRefTokenKey = tokenKey(NgModuleRef);\n function moduleProvideDef(flags, token, value, deps) {\n // Need to resolve forwardRefs as e.g. for `useValue` we\n // lowered the expression and then stopped evaluating it,\n // i.e. also didn't unwrap it.\n value = resolveForwardRef(value);\n var depDefs = splitDepsDsl(deps, stringify(token));\n return {\n // will bet set by the module definition\n index: -1,\n deps: depDefs,\n flags: flags,\n token: token,\n value: value\n };\n }\n function moduleDef(providers) {\n var providersByKey = {};\n var modules = [];\n var scope = null;\n for (var i = 0; i < providers.length; i++) {\n var provider = providers[i];\n if (provider.token === INJECTOR_SCOPE) {\n scope = provider.value;\n }\n if (provider.flags & 1073741824 /* TypeNgModule */) {\n modules.push(provider.token);\n }\n provider.index = i;\n providersByKey[tokenKey(provider.token)] = provider;\n }\n return {\n // Will be filled later...\n factory: null,\n providersByKey: providersByKey,\n providers: providers,\n modules: modules,\n scope: scope,\n };\n }\n function initNgModule(data) {\n var def = data._def;\n var providers = data._providers = newArray(def.providers.length);\n for (var i = 0; i < def.providers.length; i++) {\n var provDef = def.providers[i];\n if (!(provDef.flags & 4096 /* LazyProvider */)) {\n // Make sure the provider has not been already initialized outside this loop.\n if (providers[i] === undefined) {\n providers[i] = _createProviderInstance(data, provDef);\n }\n }\n }\n }\n function resolveNgModuleDep(data, depDef, notFoundValue) {\n if (notFoundValue === void 0) { notFoundValue = Injector.THROW_IF_NOT_FOUND; }\n var former = setCurrentInjector(data);\n try {\n if (depDef.flags & 8 /* Value */) {\n return depDef.token;\n }\n if (depDef.flags & 2 /* Optional */) {\n notFoundValue = null;\n }\n if (depDef.flags & 1 /* SkipSelf */) {\n return data._parent.get(depDef.token, notFoundValue);\n }\n var tokenKey_1 = depDef.tokenKey;\n switch (tokenKey_1) {\n case InjectorRefTokenKey:\n case INJECTORRefTokenKey:\n case NgModuleRefTokenKey:\n return data;\n }\n var providerDef = data._def.providersByKey[tokenKey_1];\n var injectableDef = void 0;\n if (providerDef) {\n var providerInstance = data._providers[providerDef.index];\n if (providerInstance === undefined) {\n providerInstance = data._providers[providerDef.index] =\n _createProviderInstance(data, providerDef);\n }\n return providerInstance === UNDEFINED_VALUE ? undefined : providerInstance;\n }\n else if ((injectableDef = getInjectableDef(depDef.token)) && targetsModule(data, injectableDef)) {\n var index = data._providers.length;\n data._def.providers[index] = data._def.providersByKey[depDef.tokenKey] = {\n flags: 1024 /* TypeFactoryProvider */ | 4096 /* LazyProvider */,\n value: injectableDef.factory,\n deps: [],\n index: index,\n token: depDef.token,\n };\n data._providers[index] = UNDEFINED_VALUE;\n return (data._providers[index] =\n _createProviderInstance(data, data._def.providersByKey[depDef.tokenKey]));\n }\n else if (depDef.flags & 4 /* Self */) {\n return notFoundValue;\n }\n return data._parent.get(depDef.token, notFoundValue);\n }\n finally {\n setCurrentInjector(former);\n }\n }\n function moduleTransitivelyPresent(ngModule, scope) {\n return ngModule._def.modules.indexOf(scope) > -1;\n }\n function targetsModule(ngModule, def) {\n var providedIn = def.providedIn;\n return providedIn != null &&\n (providedIn === 'any' || providedIn === ngModule._def.scope ||\n moduleTransitivelyPresent(ngModule, providedIn));\n }\n function _createProviderInstance(ngModule, providerDef) {\n var injectable;\n switch (providerDef.flags & 201347067 /* Types */) {\n case 512 /* TypeClassProvider */:\n injectable = _createClass(ngModule, providerDef.value, providerDef.deps);\n break;\n case 1024 /* TypeFactoryProvider */:\n injectable = _callFactory(ngModule, providerDef.value, providerDef.deps);\n break;\n case 2048 /* TypeUseExistingProvider */:\n injectable = resolveNgModuleDep(ngModule, providerDef.deps[0]);\n break;\n case 256 /* TypeValueProvider */:\n injectable = providerDef.value;\n break;\n }\n // The read of `ngOnDestroy` here is slightly expensive as it's megamorphic, so it should be\n // avoided if possible. The sequence of checks here determines whether ngOnDestroy needs to be\n // checked. It might not if the `injectable` isn't an object or if NodeFlags.OnDestroy is already\n // set (ngOnDestroy was detected statically).\n if (injectable !== UNDEFINED_VALUE && injectable !== null && typeof injectable === 'object' &&\n !(providerDef.flags & 131072 /* OnDestroy */) && typeof injectable.ngOnDestroy === 'function') {\n providerDef.flags |= 131072 /* OnDestroy */;\n }\n return injectable === undefined ? UNDEFINED_VALUE : injectable;\n }\n function _createClass(ngModule, ctor, deps) {\n var len = deps.length;\n switch (len) {\n case 0:\n return new ctor();\n case 1:\n return new ctor(resolveNgModuleDep(ngModule, deps[0]));\n case 2:\n return new ctor(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]));\n case 3:\n return new ctor(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]), resolveNgModuleDep(ngModule, deps[2]));\n default:\n var depValues = [];\n for (var i = 0; i < len; i++) {\n depValues[i] = resolveNgModuleDep(ngModule, deps[i]);\n }\n return new (ctor.bind.apply(ctor, __spread([void 0], depValues)))();\n }\n }\n function _callFactory(ngModule, factory, deps) {\n var len = deps.length;\n switch (len) {\n case 0:\n return factory();\n case 1:\n return factory(resolveNgModuleDep(ngModule, deps[0]));\n case 2:\n return factory(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]));\n case 3:\n return factory(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]), resolveNgModuleDep(ngModule, deps[2]));\n default:\n var depValues = [];\n for (var i = 0; i < len; i++) {\n depValues[i] = resolveNgModuleDep(ngModule, deps[i]);\n }\n return factory.apply(void 0, __spread(depValues));\n }\n }\n function callNgModuleLifecycle(ngModule, lifecycles) {\n var def = ngModule._def;\n var destroyed = new Set();\n for (var i = 0; i < def.providers.length; i++) {\n var provDef = def.providers[i];\n if (provDef.flags & 131072 /* OnDestroy */) {\n var instance = ngModule._providers[i];\n if (instance && instance !== UNDEFINED_VALUE) {\n var onDestroy = instance.ngOnDestroy;\n if (typeof onDestroy === 'function' && !destroyed.has(instance)) {\n onDestroy.apply(instance);\n destroyed.add(instance);\n }\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 */\n function attachEmbeddedView(parentView, elementData, viewIndex, view) {\n var embeddedViews = elementData.viewContainer._embeddedViews;\n if (viewIndex === null || viewIndex === undefined) {\n viewIndex = embeddedViews.length;\n }\n view.viewContainerParent = parentView;\n addToArray(embeddedViews, viewIndex, view);\n attachProjectedView(elementData, view);\n Services.dirtyParentQueries(view);\n var prevView = viewIndex > 0 ? embeddedViews[viewIndex - 1] : null;\n renderAttachEmbeddedView(elementData, prevView, view);\n }\n function attachProjectedView(vcElementData, view) {\n var dvcElementData = declaredViewContainer(view);\n if (!dvcElementData || dvcElementData === vcElementData ||\n view.state & 16 /* IsProjectedView */) {\n return;\n }\n // Note: For performance reasons, we\n // - add a view to template._projectedViews only 1x throughout its lifetime,\n // and remove it not until the view is destroyed.\n // (hard, as when a parent view is attached/detached we would need to attach/detach all\n // nested projected views as well, even across component boundaries).\n // - don't track the insertion order of views in the projected views array\n // (hard, as when the views of the same template are inserted different view containers)\n view.state |= 16 /* IsProjectedView */;\n var projectedViews = dvcElementData.template._projectedViews;\n if (!projectedViews) {\n projectedViews = dvcElementData.template._projectedViews = [];\n }\n projectedViews.push(view);\n // Note: we are changing the NodeDef here as we cannot calculate\n // the fact whether a template is used for projection during compilation.\n markNodeAsProjectedTemplate(view.parent.def, view.parentNodeDef);\n }\n function markNodeAsProjectedTemplate(viewDef, nodeDef) {\n if (nodeDef.flags & 4 /* ProjectedTemplate */) {\n return;\n }\n viewDef.nodeFlags |= 4 /* ProjectedTemplate */;\n nodeDef.flags |= 4 /* ProjectedTemplate */;\n var parentNodeDef = nodeDef.parent;\n while (parentNodeDef) {\n parentNodeDef.childFlags |= 4 /* ProjectedTemplate */;\n parentNodeDef = parentNodeDef.parent;\n }\n }\n function detachEmbeddedView(elementData, viewIndex) {\n var embeddedViews = elementData.viewContainer._embeddedViews;\n if (viewIndex == null || viewIndex >= embeddedViews.length) {\n viewIndex = embeddedViews.length - 1;\n }\n if (viewIndex < 0) {\n return null;\n }\n var view = embeddedViews[viewIndex];\n view.viewContainerParent = null;\n removeFromArray(embeddedViews, viewIndex);\n // See attachProjectedView for why we don't update projectedViews here.\n Services.dirtyParentQueries(view);\n renderDetachView$1(view);\n return view;\n }\n function detachProjectedView(view) {\n if (!(view.state & 16 /* IsProjectedView */)) {\n return;\n }\n var dvcElementData = declaredViewContainer(view);\n if (dvcElementData) {\n var projectedViews = dvcElementData.template._projectedViews;\n if (projectedViews) {\n removeFromArray(projectedViews, projectedViews.indexOf(view));\n Services.dirtyParentQueries(view);\n }\n }\n }\n function moveEmbeddedView(elementData, oldViewIndex, newViewIndex) {\n var embeddedViews = elementData.viewContainer._embeddedViews;\n var view = embeddedViews[oldViewIndex];\n removeFromArray(embeddedViews, oldViewIndex);\n if (newViewIndex == null) {\n newViewIndex = embeddedViews.length;\n }\n addToArray(embeddedViews, newViewIndex, view);\n // Note: Don't need to change projectedViews as the order in there\n // as always invalid...\n Services.dirtyParentQueries(view);\n renderDetachView$1(view);\n var prevView = newViewIndex > 0 ? embeddedViews[newViewIndex - 1] : null;\n renderAttachEmbeddedView(elementData, prevView, view);\n return view;\n }\n function renderAttachEmbeddedView(elementData, prevView, view) {\n var prevRenderNode = prevView ? renderNode(prevView, prevView.def.lastRenderRootNode) : elementData.renderElement;\n var parentNode = view.renderer.parentNode(prevRenderNode);\n var nextSibling = view.renderer.nextSibling(prevRenderNode);\n // Note: We can't check if `nextSibling` is present, as on WebWorkers it will always be!\n // However, browsers automatically do `appendChild` when there is no `nextSibling`.\n visitRootRenderNodes(view, 2 /* InsertBefore */, parentNode, nextSibling, undefined);\n }\n function renderDetachView$1(view) {\n visitRootRenderNodes(view, 3 /* RemoveChild */, null, null, undefined);\n }\n\n var EMPTY_CONTEXT = {};\n // Attention: this function is called as top level function.\n // Putting any logic in here will destroy closure tree shaking!\n function createComponentFactory(selector, componentType, viewDefFactory, inputs, outputs, ngContentSelectors) {\n return new ComponentFactory_(selector, componentType, viewDefFactory, inputs, outputs, ngContentSelectors);\n }\n function getComponentViewDefinitionFactory(componentFactory) {\n return componentFactory.viewDefFactory;\n }\n var ComponentFactory_ = /** @class */ (function (_super) {\n __extends(ComponentFactory_, _super);\n function ComponentFactory_(selector, componentType, viewDefFactory, _inputs, _outputs, ngContentSelectors) {\n var _this = \n // Attention: this ctor is called as top level function.\n // Putting any logic in here will destroy closure tree shaking!\n _super.call(this) || this;\n _this.selector = selector;\n _this.componentType = componentType;\n _this._inputs = _inputs;\n _this._outputs = _outputs;\n _this.ngContentSelectors = ngContentSelectors;\n _this.viewDefFactory = viewDefFactory;\n return _this;\n }\n Object.defineProperty(ComponentFactory_.prototype, \"inputs\", {\n get: function () {\n var inputsArr = [];\n var inputs = this._inputs;\n for (var propName in inputs) {\n var templateName = inputs[propName];\n inputsArr.push({ propName: propName, templateName: templateName });\n }\n return inputsArr;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ComponentFactory_.prototype, \"outputs\", {\n get: function () {\n var outputsArr = [];\n for (var propName in this._outputs) {\n var templateName = this._outputs[propName];\n outputsArr.push({ propName: propName, templateName: templateName });\n }\n return outputsArr;\n },\n enumerable: false,\n configurable: true\n });\n /**\n * Creates a new component.\n */\n ComponentFactory_.prototype.create = function (injector, projectableNodes, rootSelectorOrNode, ngModule) {\n if (!ngModule) {\n throw new Error('ngModule should be provided');\n }\n var viewDef = resolveDefinition(this.viewDefFactory);\n var componentNodeIndex = viewDef.nodes[0].element.componentProvider.nodeIndex;\n var view = Services.createRootView(injector, projectableNodes || [], rootSelectorOrNode, viewDef, ngModule, EMPTY_CONTEXT);\n var component = asProviderData(view, componentNodeIndex).instance;\n if (rootSelectorOrNode) {\n view.renderer.setAttribute(asElementData(view, 0).renderElement, 'ng-version', VERSION.full);\n }\n return new ComponentRef_(view, new ViewRef_(view), component);\n };\n return ComponentFactory_;\n }(ComponentFactory));\n var ComponentRef_ = /** @class */ (function (_super) {\n __extends(ComponentRef_, _super);\n function ComponentRef_(_view, _viewRef, _component) {\n var _this = _super.call(this) || this;\n _this._view = _view;\n _this._viewRef = _viewRef;\n _this._component = _component;\n _this._elDef = _this._view.def.nodes[0];\n _this.hostView = _viewRef;\n _this.changeDetectorRef = _viewRef;\n _this.instance = _component;\n return _this;\n }\n Object.defineProperty(ComponentRef_.prototype, \"location\", {\n get: function () {\n return new ElementRef(asElementData(this._view, this._elDef.nodeIndex).renderElement);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ComponentRef_.prototype, \"injector\", {\n get: function () {\n return new Injector_(this._view, this._elDef);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ComponentRef_.prototype, \"componentType\", {\n get: function () {\n return this._component.constructor;\n },\n enumerable: false,\n configurable: true\n });\n ComponentRef_.prototype.destroy = function () {\n this._viewRef.destroy();\n };\n ComponentRef_.prototype.onDestroy = function (callback) {\n this._viewRef.onDestroy(callback);\n };\n return ComponentRef_;\n }(ComponentRef));\n function createViewContainerData(view, elDef, elData) {\n return new ViewContainerRef_(view, elDef, elData);\n }\n var ViewContainerRef_ = /** @class */ (function () {\n function ViewContainerRef_(_view, _elDef, _data) {\n this._view = _view;\n this._elDef = _elDef;\n this._data = _data;\n /**\n * @internal\n */\n this._embeddedViews = [];\n }\n Object.defineProperty(ViewContainerRef_.prototype, \"element\", {\n get: function () {\n return new ElementRef(this._data.renderElement);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ViewContainerRef_.prototype, \"injector\", {\n get: function () {\n return new Injector_(this._view, this._elDef);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ViewContainerRef_.prototype, \"parentInjector\", {\n /** @deprecated No replacement */\n get: function () {\n var view = this._view;\n var elDef = this._elDef.parent;\n while (!elDef && view) {\n elDef = viewParentEl(view);\n view = view.parent;\n }\n return view ? new Injector_(view, elDef) : new Injector_(this._view, null);\n },\n enumerable: false,\n configurable: true\n });\n ViewContainerRef_.prototype.clear = function () {\n var len = this._embeddedViews.length;\n for (var i = len - 1; i >= 0; i--) {\n var view = detachEmbeddedView(this._data, i);\n Services.destroyView(view);\n }\n };\n ViewContainerRef_.prototype.get = function (index) {\n var view = this._embeddedViews[index];\n if (view) {\n var ref = new ViewRef_(view);\n ref.attachToViewContainerRef(this);\n return ref;\n }\n return null;\n };\n Object.defineProperty(ViewContainerRef_.prototype, \"length\", {\n get: function () {\n return this._embeddedViews.length;\n },\n enumerable: false,\n configurable: true\n });\n ViewContainerRef_.prototype.createEmbeddedView = function (templateRef, context, index) {\n var viewRef = templateRef.createEmbeddedView(context || {});\n this.insert(viewRef, index);\n return viewRef;\n };\n ViewContainerRef_.prototype.createComponent = function (componentFactory, index, injector, projectableNodes, ngModuleRef) {\n var contextInjector = injector || this.parentInjector;\n if (!ngModuleRef && !(componentFactory instanceof ComponentFactoryBoundToModule)) {\n ngModuleRef = contextInjector.get(NgModuleRef);\n }\n var componentRef = componentFactory.create(contextInjector, projectableNodes, undefined, ngModuleRef);\n this.insert(componentRef.hostView, index);\n return componentRef;\n };\n ViewContainerRef_.prototype.insert = function (viewRef, index) {\n if (viewRef.destroyed) {\n throw new Error('Cannot insert a destroyed View in a ViewContainer!');\n }\n var viewRef_ = viewRef;\n var viewData = viewRef_._view;\n attachEmbeddedView(this._view, this._data, index, viewData);\n viewRef_.attachToViewContainerRef(this);\n return viewRef;\n };\n ViewContainerRef_.prototype.move = function (viewRef, currentIndex) {\n if (viewRef.destroyed) {\n throw new Error('Cannot move a destroyed View in a ViewContainer!');\n }\n var previousIndex = this._embeddedViews.indexOf(viewRef._view);\n moveEmbeddedView(this._data, previousIndex, currentIndex);\n return viewRef;\n };\n ViewContainerRef_.prototype.indexOf = function (viewRef) {\n return this._embeddedViews.indexOf(viewRef._view);\n };\n ViewContainerRef_.prototype.remove = function (index) {\n var viewData = detachEmbeddedView(this._data, index);\n if (viewData) {\n Services.destroyView(viewData);\n }\n };\n ViewContainerRef_.prototype.detach = function (index) {\n var view = detachEmbeddedView(this._data, index);\n return view ? new ViewRef_(view) : null;\n };\n return ViewContainerRef_;\n }());\n function createChangeDetectorRef(view) {\n return new ViewRef_(view);\n }\n var ViewRef_ = /** @class */ (function () {\n function ViewRef_(_view) {\n this._view = _view;\n this._viewContainerRef = null;\n this._appRef = null;\n }\n Object.defineProperty(ViewRef_.prototype, \"rootNodes\", {\n get: function () {\n return rootRenderNodes(this._view);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ViewRef_.prototype, \"context\", {\n get: function () {\n return this._view.context;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ViewRef_.prototype, \"destroyed\", {\n get: function () {\n return (this._view.state & 128 /* Destroyed */) !== 0;\n },\n enumerable: false,\n configurable: true\n });\n ViewRef_.prototype.markForCheck = function () {\n markParentViewsForCheck(this._view);\n };\n ViewRef_.prototype.detach = function () {\n this._view.state &= ~4 /* Attached */;\n };\n ViewRef_.prototype.detectChanges = function () {\n var fs = this._view.root.rendererFactory;\n if (fs.begin) {\n fs.begin();\n }\n try {\n Services.checkAndUpdateView(this._view);\n }\n finally {\n if (fs.end) {\n fs.end();\n }\n }\n };\n ViewRef_.prototype.checkNoChanges = function () {\n Services.checkNoChangesView(this._view);\n };\n ViewRef_.prototype.reattach = function () {\n this._view.state |= 4 /* Attached */;\n };\n ViewRef_.prototype.onDestroy = function (callback) {\n if (!this._view.disposables) {\n this._view.disposables = [];\n }\n this._view.disposables.push(callback);\n };\n ViewRef_.prototype.destroy = function () {\n if (this._appRef) {\n this._appRef.detachView(this);\n }\n else if (this._viewContainerRef) {\n this._viewContainerRef.detach(this._viewContainerRef.indexOf(this));\n }\n Services.destroyView(this._view);\n };\n ViewRef_.prototype.detachFromAppRef = function () {\n this._appRef = null;\n renderDetachView$1(this._view);\n Services.dirtyParentQueries(this._view);\n };\n ViewRef_.prototype.attachToAppRef = function (appRef) {\n if (this._viewContainerRef) {\n throw new Error('This view is already attached to a ViewContainer!');\n }\n this._appRef = appRef;\n };\n ViewRef_.prototype.attachToViewContainerRef = function (vcRef) {\n if (this._appRef) {\n throw new Error('This view is already attached directly to the ApplicationRef!');\n }\n this._viewContainerRef = vcRef;\n };\n return ViewRef_;\n }());\n function createTemplateData(view, def) {\n return new TemplateRef_(view, def);\n }\n var TemplateRef_ = /** @class */ (function (_super) {\n __extends(TemplateRef_, _super);\n function TemplateRef_(_parentView, _def) {\n var _this = _super.call(this) || this;\n _this._parentView = _parentView;\n _this._def = _def;\n return _this;\n }\n TemplateRef_.prototype.createEmbeddedView = function (context) {\n return new ViewRef_(Services.createEmbeddedView(this._parentView, this._def, this._def.element.template, context));\n };\n Object.defineProperty(TemplateRef_.prototype, \"elementRef\", {\n get: function () {\n return new ElementRef(asElementData(this._parentView, this._def.nodeIndex).renderElement);\n },\n enumerable: false,\n configurable: true\n });\n return TemplateRef_;\n }(TemplateRef));\n function createInjector$1(view, elDef) {\n return new Injector_(view, elDef);\n }\n var Injector_ = /** @class */ (function () {\n function Injector_(view, elDef) {\n this.view = view;\n this.elDef = elDef;\n }\n Injector_.prototype.get = function (token, notFoundValue) {\n if (notFoundValue === void 0) { notFoundValue = Injector.THROW_IF_NOT_FOUND; }\n var allowPrivateServices = this.elDef ? (this.elDef.flags & 33554432 /* ComponentView */) !== 0 : false;\n return Services.resolveDep(this.view, this.elDef, allowPrivateServices, { flags: 0 /* None */, token: token, tokenKey: tokenKey(token) }, notFoundValue);\n };\n return Injector_;\n }());\n function nodeValue(view, index) {\n var def = view.def.nodes[index];\n if (def.flags & 1 /* TypeElement */) {\n var elData = asElementData(view, def.nodeIndex);\n return def.element.template ? elData.template : elData.renderElement;\n }\n else if (def.flags & 2 /* TypeText */) {\n return asTextData(view, def.nodeIndex).renderText;\n }\n else if (def.flags & (20224 /* CatProvider */ | 16 /* TypePipe */)) {\n return asProviderData(view, def.nodeIndex).instance;\n }\n throw new Error(\"Illegal state: read nodeValue for node index \" + index);\n }\n function createNgModuleRef(moduleType, parent, bootstrapComponents, def) {\n return new NgModuleRef_(moduleType, parent, bootstrapComponents, def);\n }\n var NgModuleRef_ = /** @class */ (function () {\n function NgModuleRef_(_moduleType, _parent, _bootstrapComponents, _def) {\n this._moduleType = _moduleType;\n this._parent = _parent;\n this._bootstrapComponents = _bootstrapComponents;\n this._def = _def;\n this._destroyListeners = [];\n this._destroyed = false;\n this.injector = this;\n initNgModule(this);\n }\n NgModuleRef_.prototype.get = function (token, notFoundValue, injectFlags) {\n if (notFoundValue === void 0) { notFoundValue = Injector.THROW_IF_NOT_FOUND; }\n if (injectFlags === void 0) { injectFlags = exports.InjectFlags.Default; }\n var flags = 0 /* None */;\n if (injectFlags & exports.InjectFlags.SkipSelf) {\n flags |= 1 /* SkipSelf */;\n }\n else if (injectFlags & exports.InjectFlags.Self) {\n flags |= 4 /* Self */;\n }\n return resolveNgModuleDep(this, { token: token, tokenKey: tokenKey(token), flags: flags }, notFoundValue);\n };\n Object.defineProperty(NgModuleRef_.prototype, \"instance\", {\n get: function () {\n return this.get(this._moduleType);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(NgModuleRef_.prototype, \"componentFactoryResolver\", {\n get: function () {\n return this.get(ComponentFactoryResolver);\n },\n enumerable: false,\n configurable: true\n });\n NgModuleRef_.prototype.destroy = function () {\n if (this._destroyed) {\n throw new Error(\"The ng module \" + stringify(this.instance.constructor) + \" has already been destroyed.\");\n }\n this._destroyed = true;\n callNgModuleLifecycle(this, 131072 /* OnDestroy */);\n this._destroyListeners.forEach(function (listener) { return listener(); });\n };\n NgModuleRef_.prototype.onDestroy = function (callback) {\n this._destroyListeners.push(callback);\n };\n return NgModuleRef_;\n }());\n\n var Renderer2TokenKey = tokenKey(Renderer2);\n var ElementRefTokenKey = tokenKey(ElementRef);\n var ViewContainerRefTokenKey = tokenKey(ViewContainerRef);\n var TemplateRefTokenKey = tokenKey(TemplateRef);\n var ChangeDetectorRefTokenKey = tokenKey(ChangeDetectorRef);\n var InjectorRefTokenKey$1 = tokenKey(Injector);\n var INJECTORRefTokenKey$1 = tokenKey(INJECTOR$1);\n function directiveDef(checkIndex, flags, matchedQueries, childCount, ctor, deps, props, outputs) {\n var bindings = [];\n if (props) {\n for (var prop in props) {\n var _a = __read(props[prop], 2), bindingIndex = _a[0], nonMinifiedName = _a[1];\n bindings[bindingIndex] = {\n flags: 8 /* TypeProperty */,\n name: prop,\n nonMinifiedName: nonMinifiedName,\n ns: null,\n securityContext: null,\n suffix: null\n };\n }\n }\n var outputDefs = [];\n if (outputs) {\n for (var propName in outputs) {\n outputDefs.push({ type: 1 /* DirectiveOutput */, propName: propName, target: null, eventName: outputs[propName] });\n }\n }\n flags |= 16384 /* TypeDirective */;\n return _def(checkIndex, flags, matchedQueries, childCount, ctor, ctor, deps, bindings, outputDefs);\n }\n function pipeDef(flags, ctor, deps) {\n flags |= 16 /* TypePipe */;\n return _def(-1, flags, null, 0, ctor, ctor, deps);\n }\n function providerDef(flags, matchedQueries, token, value, deps) {\n return _def(-1, flags, matchedQueries, 0, token, value, deps);\n }\n function _def(checkIndex, flags, matchedQueriesDsl, childCount, token, value, deps, bindings, outputs) {\n var _a = splitMatchedQueriesDsl(matchedQueriesDsl), matchedQueries = _a.matchedQueries, references = _a.references, matchedQueryIds = _a.matchedQueryIds;\n if (!outputs) {\n outputs = [];\n }\n if (!bindings) {\n bindings = [];\n }\n // Need to resolve forwardRefs as e.g. for `useValue` we\n // lowered the expression and then stopped evaluating it,\n // i.e. also didn't unwrap it.\n value = resolveForwardRef(value);\n var depDefs = splitDepsDsl(deps, stringify(token));\n return {\n // will bet set by the view definition\n nodeIndex: -1,\n parent: null,\n renderParent: null,\n bindingIndex: -1,\n outputIndex: -1,\n // regular values\n checkIndex: checkIndex,\n flags: flags,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0,\n matchedQueries: matchedQueries,\n matchedQueryIds: matchedQueryIds,\n references: references,\n ngContentIndex: -1,\n childCount: childCount,\n bindings: bindings,\n bindingFlags: calcBindingFlags(bindings),\n outputs: outputs,\n element: null,\n provider: { token: token, value: value, deps: depDefs },\n text: null,\n query: null,\n ngContent: null\n };\n }\n function createProviderInstance(view, def) {\n return _createProviderInstance$1(view, def);\n }\n function createPipeInstance(view, def) {\n // deps are looked up from component.\n var compView = view;\n while (compView.parent && !isComponentView(compView)) {\n compView = compView.parent;\n }\n // pipes can see the private services of the component\n var allowPrivateServices = true;\n // pipes are always eager and classes!\n return createClass(compView.parent, viewParentEl(compView), allowPrivateServices, def.provider.value, def.provider.deps);\n }\n function createDirectiveInstance(view, def) {\n // components can see other private services, other directives can't.\n var allowPrivateServices = (def.flags & 32768 /* Component */) > 0;\n // directives are always eager and classes!\n var instance = createClass(view, def.parent, allowPrivateServices, def.provider.value, def.provider.deps);\n if (def.outputs.length) {\n for (var i = 0; i < def.outputs.length; i++) {\n var output = def.outputs[i];\n var outputObservable = instance[output.propName];\n if (isObservable(outputObservable)) {\n var subscription = outputObservable.subscribe(eventHandlerClosure(view, def.parent.nodeIndex, output.eventName));\n view.disposables[def.outputIndex + i] = subscription.unsubscribe.bind(subscription);\n }\n else {\n throw new Error(\"@Output \" + output.propName + \" not initialized in '\" + instance.constructor.name + \"'.\");\n }\n }\n }\n return instance;\n }\n function eventHandlerClosure(view, index, eventName) {\n return function (event) { return dispatchEvent(view, index, eventName, event); };\n }\n function checkAndUpdateDirectiveInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n var providerData = asProviderData(view, def.nodeIndex);\n var directive = providerData.instance;\n var changed = false;\n var changes = undefined;\n var bindLen = def.bindings.length;\n if (bindLen > 0 && checkBinding(view, def, 0, v0)) {\n changed = true;\n changes = updateProp(view, providerData, def, 0, v0, changes);\n }\n if (bindLen > 1 && checkBinding(view, def, 1, v1)) {\n changed = true;\n changes = updateProp(view, providerData, def, 1, v1, changes);\n }\n if (bindLen > 2 && checkBinding(view, def, 2, v2)) {\n changed = true;\n changes = updateProp(view, providerData, def, 2, v2, changes);\n }\n if (bindLen > 3 && checkBinding(view, def, 3, v3)) {\n changed = true;\n changes = updateProp(view, providerData, def, 3, v3, changes);\n }\n if (bindLen > 4 && checkBinding(view, def, 4, v4)) {\n changed = true;\n changes = updateProp(view, providerData, def, 4, v4, changes);\n }\n if (bindLen > 5 && checkBinding(view, def, 5, v5)) {\n changed = true;\n changes = updateProp(view, providerData, def, 5, v5, changes);\n }\n if (bindLen > 6 && checkBinding(view, def, 6, v6)) {\n changed = true;\n changes = updateProp(view, providerData, def, 6, v6, changes);\n }\n if (bindLen > 7 && checkBinding(view, def, 7, v7)) {\n changed = true;\n changes = updateProp(view, providerData, def, 7, v7, changes);\n }\n if (bindLen > 8 && checkBinding(view, def, 8, v8)) {\n changed = true;\n changes = updateProp(view, providerData, def, 8, v8, changes);\n }\n if (bindLen > 9 && checkBinding(view, def, 9, v9)) {\n changed = true;\n changes = updateProp(view, providerData, def, 9, v9, changes);\n }\n if (changes) {\n directive.ngOnChanges(changes);\n }\n if ((def.flags & 65536 /* OnInit */) &&\n shouldCallLifecycleInitHook(view, 256 /* InitState_CallingOnInit */, def.nodeIndex)) {\n directive.ngOnInit();\n }\n if (def.flags & 262144 /* DoCheck */) {\n directive.ngDoCheck();\n }\n return changed;\n }\n function checkAndUpdateDirectiveDynamic(view, def, values) {\n var providerData = asProviderData(view, def.nodeIndex);\n var directive = providerData.instance;\n var changed = false;\n var changes = undefined;\n for (var i = 0; i < values.length; i++) {\n if (checkBinding(view, def, i, values[i])) {\n changed = true;\n changes = updateProp(view, providerData, def, i, values[i], changes);\n }\n }\n if (changes) {\n directive.ngOnChanges(changes);\n }\n if ((def.flags & 65536 /* OnInit */) &&\n shouldCallLifecycleInitHook(view, 256 /* InitState_CallingOnInit */, def.nodeIndex)) {\n directive.ngOnInit();\n }\n if (def.flags & 262144 /* DoCheck */) {\n directive.ngDoCheck();\n }\n return changed;\n }\n function _createProviderInstance$1(view, def) {\n // private services can see other private services\n var allowPrivateServices = (def.flags & 8192 /* PrivateProvider */) > 0;\n var providerDef = def.provider;\n switch (def.flags & 201347067 /* Types */) {\n case 512 /* TypeClassProvider */:\n return createClass(view, def.parent, allowPrivateServices, providerDef.value, providerDef.deps);\n case 1024 /* TypeFactoryProvider */:\n return callFactory(view, def.parent, allowPrivateServices, providerDef.value, providerDef.deps);\n case 2048 /* TypeUseExistingProvider */:\n return resolveDep(view, def.parent, allowPrivateServices, providerDef.deps[0]);\n case 256 /* TypeValueProvider */:\n return providerDef.value;\n }\n }\n function createClass(view, elDef, allowPrivateServices, ctor, deps) {\n var len = deps.length;\n switch (len) {\n case 0:\n return new ctor();\n case 1:\n return new ctor(resolveDep(view, elDef, allowPrivateServices, deps[0]));\n case 2:\n return new ctor(resolveDep(view, elDef, allowPrivateServices, deps[0]), resolveDep(view, elDef, allowPrivateServices, deps[1]));\n case 3:\n return new ctor(resolveDep(view, elDef, allowPrivateServices, deps[0]), resolveDep(view, elDef, allowPrivateServices, deps[1]), resolveDep(view, elDef, allowPrivateServices, deps[2]));\n default:\n var depValues = [];\n for (var i = 0; i < len; i++) {\n depValues.push(resolveDep(view, elDef, allowPrivateServices, deps[i]));\n }\n return new (ctor.bind.apply(ctor, __spread([void 0], depValues)))();\n }\n }\n function callFactory(view, elDef, allowPrivateServices, factory, deps) {\n var len = deps.length;\n switch (len) {\n case 0:\n return factory();\n case 1:\n return factory(resolveDep(view, elDef, allowPrivateServices, deps[0]));\n case 2:\n return factory(resolveDep(view, elDef, allowPrivateServices, deps[0]), resolveDep(view, elDef, allowPrivateServices, deps[1]));\n case 3:\n return factory(resolveDep(view, elDef, allowPrivateServices, deps[0]), resolveDep(view, elDef, allowPrivateServices, deps[1]), resolveDep(view, elDef, allowPrivateServices, deps[2]));\n default:\n var depValues = [];\n for (var i = 0; i < len; i++) {\n depValues.push(resolveDep(view, elDef, allowPrivateServices, deps[i]));\n }\n return factory.apply(void 0, __spread(depValues));\n }\n }\n // This default value is when checking the hierarchy for a token.\n //\n // It means both:\n // - the token is not provided by the current injector,\n // - only the element injectors should be checked (ie do not check module injectors\n //\n // mod1\n // /\n // el1 mod2\n // \\ /\n // el2\n //\n // When requesting el2.injector.get(token), we should check in the following order and return the\n // first found value:\n // - el2.injector.get(token, default)\n // - el1.injector.get(token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) -> do not check the module\n // - mod2.injector.get(token, default)\n var NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR = {};\n function resolveDep(view, elDef, allowPrivateServices, depDef, notFoundValue) {\n if (notFoundValue === void 0) { notFoundValue = Injector.THROW_IF_NOT_FOUND; }\n if (depDef.flags & 8 /* Value */) {\n return depDef.token;\n }\n var startView = view;\n if (depDef.flags & 2 /* Optional */) {\n notFoundValue = null;\n }\n var tokenKey = depDef.tokenKey;\n if (tokenKey === ChangeDetectorRefTokenKey) {\n // directives on the same element as a component should be able to control the change detector\n // of that component as well.\n allowPrivateServices = !!(elDef && elDef.element.componentView);\n }\n if (elDef && (depDef.flags & 1 /* SkipSelf */)) {\n allowPrivateServices = false;\n elDef = elDef.parent;\n }\n var searchView = view;\n while (searchView) {\n if (elDef) {\n switch (tokenKey) {\n case Renderer2TokenKey: {\n var compView = findCompView(searchView, elDef, allowPrivateServices);\n return compView.renderer;\n }\n case ElementRefTokenKey:\n return new ElementRef(asElementData(searchView, elDef.nodeIndex).renderElement);\n case ViewContainerRefTokenKey:\n return asElementData(searchView, elDef.nodeIndex).viewContainer;\n case TemplateRefTokenKey: {\n if (elDef.element.template) {\n return asElementData(searchView, elDef.nodeIndex).template;\n }\n break;\n }\n case ChangeDetectorRefTokenKey: {\n var cdView = findCompView(searchView, elDef, allowPrivateServices);\n return createChangeDetectorRef(cdView);\n }\n case InjectorRefTokenKey$1:\n case INJECTORRefTokenKey$1:\n return createInjector$1(searchView, elDef);\n default:\n var providerDef_1 = (allowPrivateServices ? elDef.element.allProviders :\n elDef.element.publicProviders)[tokenKey];\n if (providerDef_1) {\n var providerData = asProviderData(searchView, providerDef_1.nodeIndex);\n if (!providerData) {\n providerData = { instance: _createProviderInstance$1(searchView, providerDef_1) };\n searchView.nodes[providerDef_1.nodeIndex] = providerData;\n }\n return providerData.instance;\n }\n }\n }\n allowPrivateServices = isComponentView(searchView);\n elDef = viewParentEl(searchView);\n searchView = searchView.parent;\n if (depDef.flags & 4 /* Self */) {\n searchView = null;\n }\n }\n var value = startView.root.injector.get(depDef.token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR);\n if (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR ||\n notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) {\n // Return the value from the root element injector when\n // - it provides it\n // (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)\n // - the module injector should not be checked\n // (notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)\n return value;\n }\n return startView.root.ngModule.injector.get(depDef.token, notFoundValue);\n }\n function findCompView(view, elDef, allowPrivateServices) {\n var compView;\n if (allowPrivateServices) {\n compView = asElementData(view, elDef.nodeIndex).componentView;\n }\n else {\n compView = view;\n while (compView.parent && !isComponentView(compView)) {\n compView = compView.parent;\n }\n }\n return compView;\n }\n function updateProp(view, providerData, def, bindingIdx, value, changes) {\n if (def.flags & 32768 /* Component */) {\n var compView = asElementData(view, def.parent.nodeIndex).componentView;\n if (compView.def.flags & 2 /* OnPush */) {\n compView.state |= 8 /* ChecksEnabled */;\n }\n }\n var binding = def.bindings[bindingIdx];\n var propName = binding.name;\n // Note: This is still safe with Closure Compiler as\n // the user passed in the property name as an object has to `providerDef`,\n // so Closure Compiler will have renamed the property correctly already.\n providerData.instance[propName] = value;\n if (def.flags & 524288 /* OnChanges */) {\n changes = changes || {};\n var oldValue = WrappedValue.unwrap(view.oldValues[def.bindingIndex + bindingIdx]);\n var binding_1 = def.bindings[bindingIdx];\n changes[binding_1.nonMinifiedName] =\n new SimpleChange(oldValue, value, (view.state & 2 /* FirstCheck */) !== 0);\n }\n view.oldValues[def.bindingIndex + bindingIdx] = value;\n return changes;\n }\n // This function calls the ngAfterContentCheck, ngAfterContentInit,\n // ngAfterViewCheck, and ngAfterViewInit lifecycle hooks (depending on the node\n // flags in lifecycle). Unlike ngDoCheck, ngOnChanges and ngOnInit, which are\n // called during a pre-order traversal of the view tree (that is calling the\n // parent hooks before the child hooks) these events are sent in using a\n // post-order traversal of the tree (children before parents). This changes the\n // meaning of initIndex in the view state. For ngOnInit, initIndex tracks the\n // expected nodeIndex which a ngOnInit should be called. When sending\n // ngAfterContentInit and ngAfterViewInit it is the expected count of\n // ngAfterContentInit or ngAfterViewInit methods that have been called. This\n // ensure that despite being called recursively or after picking up after an\n // exception, the ngAfterContentInit or ngAfterViewInit will be called on the\n // correct nodes. Consider for example, the following (where E is an element\n // and D is a directive)\n // Tree: pre-order index post-order index\n // E1 0 6\n // E2 1 1\n // D3 2 0\n // E4 3 5\n // E5 4 4\n // E6 5 2\n // E7 6 3\n // As can be seen, the post-order index has an unclear relationship to the\n // pre-order index (postOrderIndex === preOrderIndex - parentCount +\n // childCount). Since number of calls to ngAfterContentInit and ngAfterViewInit\n // are stable (will be the same for the same view regardless of exceptions or\n // recursion) we just need to count them which will roughly correspond to the\n // post-order index (it skips elements and directives that do not have\n // lifecycle hooks).\n //\n // For example, if an exception is raised in the E6.onAfterViewInit() the\n // initIndex is left at 3 (by shouldCallLifecycleInitHook() which set it to\n // initIndex + 1). When checkAndUpdateView() is called again D3, E2 and E6 will\n // not have their ngAfterViewInit() called but, starting with E7, the rest of\n // the view will begin getting ngAfterViewInit() called until a check and\n // pass is complete.\n //\n // This algorthim also handles recursion. Consider if E4's ngAfterViewInit()\n // indirectly calls E1's ChangeDetectorRef.detectChanges(). The expected\n // initIndex is set to 6, the recusive checkAndUpdateView() starts walk again.\n // D3, E2, E6, E7, E5 and E4 are skipped, ngAfterViewInit() is called on E1.\n // When the recursion returns the initIndex will be 7 so E1 is skipped as it\n // has already been called in the recursively called checkAnUpdateView().\n function callLifecycleHooksChildrenFirst(view, lifecycles) {\n if (!(view.def.nodeFlags & lifecycles)) {\n return;\n }\n var nodes = view.def.nodes;\n var initIndex = 0;\n for (var i = 0; i < nodes.length; i++) {\n var nodeDef = nodes[i];\n var parent = nodeDef.parent;\n if (!parent && nodeDef.flags & lifecycles) {\n // matching root node (e.g. a pipe)\n callProviderLifecycles(view, i, nodeDef.flags & lifecycles, initIndex++);\n }\n if ((nodeDef.childFlags & lifecycles) === 0) {\n // no child matches one of the lifecycles\n i += nodeDef.childCount;\n }\n while (parent && (parent.flags & 1 /* TypeElement */) &&\n i === parent.nodeIndex + parent.childCount) {\n // last child of an element\n if (parent.directChildFlags & lifecycles) {\n initIndex = callElementProvidersLifecycles(view, parent, lifecycles, initIndex);\n }\n parent = parent.parent;\n }\n }\n }\n function callElementProvidersLifecycles(view, elDef, lifecycles, initIndex) {\n for (var i = elDef.nodeIndex + 1; i <= elDef.nodeIndex + elDef.childCount; i++) {\n var nodeDef = view.def.nodes[i];\n if (nodeDef.flags & lifecycles) {\n callProviderLifecycles(view, i, nodeDef.flags & lifecycles, initIndex++);\n }\n // only visit direct children\n i += nodeDef.childCount;\n }\n return initIndex;\n }\n function callProviderLifecycles(view, index, lifecycles, initIndex) {\n var providerData = asProviderData(view, index);\n if (!providerData) {\n return;\n }\n var provider = providerData.instance;\n if (!provider) {\n return;\n }\n Services.setCurrentNode(view, index);\n if (lifecycles & 1048576 /* AfterContentInit */ &&\n shouldCallLifecycleInitHook(view, 512 /* InitState_CallingAfterContentInit */, initIndex)) {\n provider.ngAfterContentInit();\n }\n if (lifecycles & 2097152 /* AfterContentChecked */) {\n provider.ngAfterContentChecked();\n }\n if (lifecycles & 4194304 /* AfterViewInit */ &&\n shouldCallLifecycleInitHook(view, 768 /* InitState_CallingAfterViewInit */, initIndex)) {\n provider.ngAfterViewInit();\n }\n if (lifecycles & 8388608 /* AfterViewChecked */) {\n provider.ngAfterViewChecked();\n }\n if (lifecycles & 131072 /* OnDestroy */) {\n provider.ngOnDestroy();\n }\n }\n\n var ComponentFactoryResolver$1 = /** @class */ (function (_super) {\n __extends(ComponentFactoryResolver, _super);\n /**\n * @param ngModule The NgModuleRef to which all resolved factories are bound.\n */\n function ComponentFactoryResolver(ngModule) {\n var _this = _super.call(this) || this;\n _this.ngModule = ngModule;\n return _this;\n }\n ComponentFactoryResolver.prototype.resolveComponentFactory = function (component) {\n ngDevMode && assertComponentType(component);\n var componentDef = getComponentDef(component);\n return new ComponentFactory$1(componentDef, this.ngModule);\n };\n return ComponentFactoryResolver;\n }(ComponentFactoryResolver));\n function toRefArray(map) {\n var array = [];\n for (var nonMinified in map) {\n if (map.hasOwnProperty(nonMinified)) {\n var minified = map[nonMinified];\n array.push({ propName: minified, templateName: nonMinified });\n }\n }\n return array;\n }\n function getNamespace$1(elementName) {\n var name = elementName.toLowerCase();\n return name === 'svg' ? SVG_NAMESPACE : (name === 'math' ? MATH_ML_NAMESPACE : null);\n }\n /**\n * A change detection scheduler token for {@link RootContext}. This token is the default value used\n * for the default `RootContext` found in the {@link ROOT_CONTEXT} token.\n */\n var SCHEDULER = new InjectionToken('SCHEDULER_TOKEN', {\n providedIn: 'root',\n factory: function () { return defaultScheduler; },\n });\n function createChainedInjector(rootViewInjector, moduleInjector) {\n return {\n get: function (token, notFoundValue, flags) {\n var value = rootViewInjector.get(token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, flags);\n if (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR ||\n notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) {\n // Return the value from the root element injector when\n // - it provides it\n // (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)\n // - the module injector should not be checked\n // (notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)\n return value;\n }\n return moduleInjector.get(token, notFoundValue, flags);\n }\n };\n }\n /**\n * Render3 implementation of {@link viewEngine_ComponentFactory}.\n */\n var ComponentFactory$1 = /** @class */ (function (_super) {\n __extends(ComponentFactory, _super);\n /**\n * @param componentDef The component definition.\n * @param ngModule The NgModuleRef to which the factory is bound.\n */\n function ComponentFactory(componentDef, ngModule) {\n var _this = _super.call(this) || this;\n _this.componentDef = componentDef;\n _this.ngModule = ngModule;\n _this.componentType = componentDef.type;\n _this.selector = stringifyCSSSelectorList(componentDef.selectors);\n _this.ngContentSelectors =\n componentDef.ngContentSelectors ? componentDef.ngContentSelectors : [];\n _this.isBoundToModule = !!ngModule;\n return _this;\n }\n Object.defineProperty(ComponentFactory.prototype, \"inputs\", {\n get: function () {\n return toRefArray(this.componentDef.inputs);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ComponentFactory.prototype, \"outputs\", {\n get: function () {\n return toRefArray(this.componentDef.outputs);\n },\n enumerable: false,\n configurable: true\n });\n ComponentFactory.prototype.create = function (injector, projectableNodes, rootSelectorOrNode, ngModule) {\n ngModule = ngModule || this.ngModule;\n var rootViewInjector = ngModule ? createChainedInjector(injector, ngModule.injector) : injector;\n var rendererFactory = rootViewInjector.get(RendererFactory2, domRendererFactory3);\n var sanitizer = rootViewInjector.get(Sanitizer, null);\n var hostRenderer = rendererFactory.createRenderer(null, this.componentDef);\n // Determine a tag name used for creating host elements when this component is created\n // dynamically. Default to 'div' if this component did not specify any tag name in its selector.\n var elementName = this.componentDef.selectors[0][0] || 'div';\n var hostRNode = rootSelectorOrNode ?\n locateHostElement(hostRenderer, rootSelectorOrNode, this.componentDef.encapsulation) :\n createElementNode(rendererFactory.createRenderer(null, this.componentDef), elementName, getNamespace$1(elementName));\n var rootFlags = this.componentDef.onPush ? 64 /* Dirty */ | 512 /* IsRoot */ :\n 16 /* CheckAlways */ | 512 /* IsRoot */;\n var rootContext = createRootContext();\n // Create the root view. Uses empty TView and ContentTemplate.\n var rootTView = createTView(0 /* Root */, null, null, 1, 0, null, null, null, null, null);\n var rootLView = createLView(null, rootTView, rootContext, rootFlags, null, null, rendererFactory, hostRenderer, sanitizer, rootViewInjector);\n // rootView is the parent when bootstrapping\n // TODO(misko): it looks like we are entering view here but we don't really need to as\n // `renderView` does that. However as the code is written it is needed because\n // `createRootComponentView` and `createRootComponent` both read global state. Fixing those\n // issues would allow us to drop this.\n enterView(rootLView);\n var component;\n var tElementNode;\n try {\n var componentView = createRootComponentView(hostRNode, this.componentDef, rootLView, rendererFactory, hostRenderer);\n if (hostRNode) {\n if (rootSelectorOrNode) {\n setUpAttributes(hostRenderer, hostRNode, ['ng-version', VERSION.full]);\n }\n else {\n // If host element is created as a part of this function call (i.e. `rootSelectorOrNode`\n // is not defined), also apply attributes and classes extracted from component selector.\n // Extract attributes and classes from the first selector only to match VE behavior.\n var _a = extractAttrsAndClassesFromSelector(this.componentDef.selectors[0]), attrs = _a.attrs, classes = _a.classes;\n if (attrs) {\n setUpAttributes(hostRenderer, hostRNode, attrs);\n }\n if (classes && classes.length > 0) {\n writeDirectClass(hostRenderer, hostRNode, classes.join(' '));\n }\n }\n }\n tElementNode = getTNode(rootTView, HEADER_OFFSET);\n if (projectableNodes !== undefined) {\n var projection = tElementNode.projection = [];\n for (var i = 0; i < this.ngContentSelectors.length; i++) {\n var nodesforSlot = projectableNodes[i];\n // Projectable nodes can be passed as array of arrays or an array of iterables (ngUpgrade\n // case). Here we do normalize passed data structure to be an array of arrays to avoid\n // complex checks down the line.\n // We also normalize the length of the passed in projectable nodes (to match the number of\n // <ng-container> slots defined by a component).\n projection.push(nodesforSlot != null ? Array.from(nodesforSlot) : null);\n }\n }\n // TODO: should LifecycleHooksFeature and other host features be generated by the compiler and\n // executed here?\n // Angular 5 reference: https://stackblitz.com/edit/lifecycle-hooks-vcref\n component = createRootComponent(componentView, this.componentDef, rootLView, rootContext, [LifecycleHooksFeature]);\n renderView(rootTView, rootLView, null);\n }\n finally {\n leaveView();\n }\n return new ComponentRef$1(this.componentType, component, createElementRef(tElementNode, rootLView), rootLView, tElementNode);\n };\n return ComponentFactory;\n }(ComponentFactory));\n var componentFactoryResolver = new ComponentFactoryResolver$1();\n /**\n * Creates a ComponentFactoryResolver and stores it on the injector. Or, if the\n * ComponentFactoryResolver\n * already exists, retrieves the existing ComponentFactoryResolver.\n *\n * @returns The ComponentFactoryResolver instance to use\n */\n function injectComponentFactoryResolver() {\n return componentFactoryResolver;\n }\n /**\n * Represents an instance of a Component created via a {@link ComponentFactory}.\n *\n * `ComponentRef` provides access to the Component Instance as well other objects related to this\n * Component Instance and allows you to destroy the Component Instance via the {@link #destroy}\n * method.\n *\n */\n var ComponentRef$1 = /** @class */ (function (_super) {\n __extends(ComponentRef, _super);\n function ComponentRef(componentType, instance, location, _rootLView, _tNode) {\n var _this = _super.call(this) || this;\n _this.location = location;\n _this._rootLView = _rootLView;\n _this._tNode = _tNode;\n _this.instance = instance;\n _this.hostView = _this.changeDetectorRef = new RootViewRef(_rootLView);\n _this.componentType = componentType;\n return _this;\n }\n Object.defineProperty(ComponentRef.prototype, \"injector\", {\n get: function () {\n return new NodeInjector(this._tNode, this._rootLView);\n },\n enumerable: false,\n configurable: true\n });\n ComponentRef.prototype.destroy = function () {\n this.hostView.destroy();\n };\n ComponentRef.prototype.onDestroy = function (callback) {\n this.hostView.onDestroy(callback);\n };\n return ComponentRef;\n }(ComponentRef));\n\n /**\n * Adds decorator, constructor, and property metadata to a given type via static metadata fields\n * on the type.\n *\n * These metadata fields can later be read with Angular's `ReflectionCapabilities` API.\n *\n * Calls to `setClassMetadata` can be guarded by ngDevMode, resulting in the metadata assignments\n * being tree-shaken away during production builds.\n */\n function setClassMetadata(type, decorators, ctorParameters, propDecorators) {\n return noSideEffects(function () {\n var _a;\n var clazz = type;\n if (decorators !== null) {\n if (clazz.hasOwnProperty('decorators') && clazz.decorators !== undefined) {\n (_a = clazz.decorators).push.apply(_a, __spread(decorators));\n }\n else {\n clazz.decorators = decorators;\n }\n }\n if (ctorParameters !== null) {\n // Rather than merging, clobber the existing parameters. If other projects exist which\n // use tsickle-style annotations and reflect over them in the same way, this could\n // cause issues, but that is vanishingly unlikely.\n clazz.ctorParameters = ctorParameters;\n }\n if (propDecorators !== null) {\n // The property decorator objects are merged as it is possible different fields have\n // different decorator types. Decorators on individual fields are not merged, as it's\n // also incredibly unlikely that a field will be decorated both with an Angular\n // decorator and a non-Angular decorator that's also been downleveled.\n if (clazz.hasOwnProperty('propDecorators') && clazz.propDecorators !== undefined) {\n clazz.propDecorators = Object.assign(Object.assign({}, clazz.propDecorators), propDecorators);\n }\n else {\n clazz.propDecorators = propDecorators;\n }\n }\n });\n }\n\n /**\n * Map of module-id to the corresponding NgModule.\n * - In pre Ivy we track NgModuleFactory,\n * - In post Ivy we track the NgModuleType\n */\n var modules = new Map();\n /**\n * Registers a loaded module. Should only be called from generated NgModuleFactory code.\n * @publicApi\n */\n function registerModuleFactory(id, factory) {\n var existing = modules.get(id);\n assertSameOrNotExisting(id, existing && existing.moduleType, factory.moduleType);\n modules.set(id, factory);\n }\n function assertSameOrNotExisting(id, type, incoming) {\n if (type && type !== incoming) {\n throw new Error(\"Duplicate module registered for \" + id + \" - \" + stringify(type) + \" vs \" + stringify(type.name));\n }\n }\n function registerNgModuleType(ngModuleType) {\n var visited = new Set();\n recurse(ngModuleType);\n function recurse(ngModuleType) {\n var e_1, _a;\n // The imports array of an NgModule must refer to other NgModules,\n // so an error is thrown if no module definition is available.\n var def = getNgModuleDef(ngModuleType, /* throwNotFound */ true);\n var id = def.id;\n if (id !== null) {\n var existing = modules.get(id);\n assertSameOrNotExisting(id, existing, ngModuleType);\n modules.set(id, ngModuleType);\n }\n var imports = maybeUnwrapFn(def.imports);\n try {\n for (var imports_1 = __values(imports), imports_1_1 = imports_1.next(); !imports_1_1.done; imports_1_1 = imports_1.next()) {\n var i = imports_1_1.value;\n if (!visited.has(i)) {\n visited.add(i);\n recurse(i);\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (imports_1_1 && !imports_1_1.done && (_a = imports_1.return)) _a.call(imports_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n }\n function clearModulesForTest() {\n modules.clear();\n }\n function getRegisteredNgModuleType(id) {\n return modules.get(id) || autoRegisterModuleById[id];\n }\n\n var NgModuleRef$1 = /** @class */ (function (_super) {\n __extends(NgModuleRef$1, _super);\n function NgModuleRef$1(ngModuleType, _parent) {\n var _this = _super.call(this) || this;\n _this._parent = _parent;\n // tslint:disable-next-line:require-internal-with-underscore\n _this._bootstrapComponents = [];\n _this.injector = _this;\n _this.destroyCbs = [];\n // When bootstrapping a module we have a dependency graph that looks like this:\n // ApplicationRef -> ComponentFactoryResolver -> NgModuleRef. The problem is that if the\n // module being resolved tries to inject the ComponentFactoryResolver, it'll create a\n // circular dependency which will result in a runtime error, because the injector doesn't\n // exist yet. We work around the issue by creating the ComponentFactoryResolver ourselves\n // and providing it, rather than letting the injector resolve it.\n _this.componentFactoryResolver = new ComponentFactoryResolver$1(_this);\n var ngModuleDef = getNgModuleDef(ngModuleType);\n ngDevMode &&\n assertDefined(ngModuleDef, \"NgModule '\" + stringify(ngModuleType) + \"' is not a subtype of 'NgModuleType'.\");\n var ngLocaleIdDef = getNgLocaleIdDef(ngModuleType);\n ngLocaleIdDef && setLocaleId(ngLocaleIdDef);\n _this._bootstrapComponents = maybeUnwrapFn(ngModuleDef.bootstrap);\n _this._r3Injector = createInjectorWithoutInjectorInstances(ngModuleType, _parent, [\n { provide: NgModuleRef, useValue: _this }, {\n provide: ComponentFactoryResolver,\n useValue: _this.componentFactoryResolver\n }\n ], stringify(ngModuleType));\n // We need to resolve the injector types separately from the injector creation, because\n // the module might be trying to use this ref in its contructor for DI which will cause a\n // circular error that will eventually error out, because the injector isn't created yet.\n _this._r3Injector._resolveInjectorDefTypes();\n _this.instance = _this.get(ngModuleType);\n return _this;\n }\n NgModuleRef$1.prototype.get = function (token, notFoundValue, injectFlags) {\n if (notFoundValue === void 0) { notFoundValue = Injector.THROW_IF_NOT_FOUND; }\n if (injectFlags === void 0) { injectFlags = exports.InjectFlags.Default; }\n if (token === Injector || token === NgModuleRef || token === INJECTOR$1) {\n return this;\n }\n return this._r3Injector.get(token, notFoundValue, injectFlags);\n };\n NgModuleRef$1.prototype.destroy = function () {\n ngDevMode && assertDefined(this.destroyCbs, 'NgModule already destroyed');\n var injector = this._r3Injector;\n !injector.destroyed && injector.destroy();\n this.destroyCbs.forEach(function (fn) { return fn(); });\n this.destroyCbs = null;\n };\n NgModuleRef$1.prototype.onDestroy = function (callback) {\n ngDevMode && assertDefined(this.destroyCbs, 'NgModule already destroyed');\n this.destroyCbs.push(callback);\n };\n return NgModuleRef$1;\n }(NgModuleRef));\n var NgModuleFactory$1 = /** @class */ (function (_super) {\n __extends(NgModuleFactory, _super);\n function NgModuleFactory(moduleType) {\n var _this = _super.call(this) || this;\n _this.moduleType = moduleType;\n var ngModuleDef = getNgModuleDef(moduleType);\n if (ngModuleDef !== null) {\n // Register the NgModule with Angular's module registry. The location (and hence timing) of\n // this call is critical to ensure this works correctly (modules get registered when expected)\n // without bloating bundles (modules are registered when otherwise not referenced).\n //\n // In View Engine, registration occurs in the .ngfactory.js file as a side effect. This has\n // several practical consequences:\n //\n // - If an .ngfactory file is not imported from, the module won't be registered (and can be\n // tree shaken).\n // - If an .ngfactory file is imported from, the module will be registered even if an instance\n // is not actually created (via `create` below).\n // - Since an .ngfactory file in View Engine references the .ngfactory files of the NgModule's\n // imports,\n //\n // In Ivy, things are a bit different. .ngfactory files still exist for compatibility, but are\n // not a required API to use - there are other ways to obtain an NgModuleFactory for a given\n // NgModule. Thus, relying on a side effect in the .ngfactory file is not sufficient. Instead,\n // the side effect of registration is added here, in the constructor of NgModuleFactory,\n // ensuring no matter how a factory is created, the module is registered correctly.\n //\n // An alternative would be to include the registration side effect inline following the actual\n // NgModule definition. This also has the correct timing, but breaks tree-shaking - modules\n // will be registered and retained even if they're otherwise never referenced.\n registerNgModuleType(moduleType);\n }\n return _this;\n }\n NgModuleFactory.prototype.create = function (parentInjector) {\n return new NgModuleRef$1(this.moduleType, parentInjector);\n };\n return NgModuleFactory;\n }(NgModuleFactory));\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 * Bindings for pure functions are stored after regular bindings.\n *\n * |-------decls------|---------vars---------| |----- hostVars (dir1) ------|\n * ------------------------------------------------------------------------------------------\n * | nodes/refs/pipes | bindings | fn slots | injector | dir1 | host bindings | host slots |\n * ------------------------------------------------------------------------------------------\n * ^ ^\n * TView.bindingStartIndex TView.expandoStartIndex\n *\n * Pure function instructions are given an offset from the binding root. Adding the offset to the\n * binding root gives the first index where the bindings are stored. In component views, the binding\n * root is the bindingStartIndex. In host bindings, the binding root is the expandoStartIndex +\n * any directive instances + any hostVars in directives evaluated before it.\n *\n * See VIEW_DATA.md for more information about host binding resolution.\n */\n /**\n * If the value hasn't been saved, calls the pure function to store and return the\n * value. If it has been saved, returns the saved value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn Function that returns a value\n * @param thisArg Optional calling context of pureFn\n * @returns value\n *\n * @codeGenApi\n */\n function ɵɵpureFunction0(slotOffset, pureFn, thisArg) {\n var bindingIndex = getBindingRoot() + slotOffset;\n var lView = getLView();\n return lView[bindingIndex] === NO_CHANGE ?\n updateBinding(lView, bindingIndex, thisArg ? pureFn.call(thisArg) : pureFn()) :\n getBinding(lView, bindingIndex);\n }\n /**\n * If the value of the provided exp has changed, calls the pure function to return\n * an updated value. Or if the value has not changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn Function that returns an updated value\n * @param exp Updated expression value\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\n function ɵɵpureFunction1(slotOffset, pureFn, exp, thisArg) {\n return pureFunction1Internal(getLView(), getBindingRoot(), slotOffset, pureFn, exp, thisArg);\n }\n /**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\n function ɵɵpureFunction2(slotOffset, pureFn, exp1, exp2, thisArg) {\n return pureFunction2Internal(getLView(), getBindingRoot(), slotOffset, pureFn, exp1, exp2, thisArg);\n }\n /**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\n function ɵɵpureFunction3(slotOffset, pureFn, exp1, exp2, exp3, thisArg) {\n return pureFunction3Internal(getLView(), getBindingRoot(), slotOffset, pureFn, exp1, exp2, exp3, thisArg);\n }\n /**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\n function ɵɵpureFunction4(slotOffset, pureFn, exp1, exp2, exp3, exp4, thisArg) {\n return pureFunction4Internal(getLView(), getBindingRoot(), slotOffset, pureFn, exp1, exp2, exp3, exp4, thisArg);\n }\n /**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\n function ɵɵpureFunction5(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, thisArg) {\n var bindingIndex = getBindingRoot() + slotOffset;\n var lView = getLView();\n var different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n return bindingUpdated(lView, bindingIndex + 4, exp5) || different ?\n updateBinding(lView, bindingIndex + 5, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5) :\n pureFn(exp1, exp2, exp3, exp4, exp5)) :\n getBinding(lView, bindingIndex + 5);\n }\n /**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param exp6\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\n function ɵɵpureFunction6(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, exp6, thisArg) {\n var bindingIndex = getBindingRoot() + slotOffset;\n var lView = getLView();\n var different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n return bindingUpdated2(lView, bindingIndex + 4, exp5, exp6) || different ?\n updateBinding(lView, bindingIndex + 6, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6) :\n pureFn(exp1, exp2, exp3, exp4, exp5, exp6)) :\n getBinding(lView, bindingIndex + 6);\n }\n /**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param exp6\n * @param exp7\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\n function ɵɵpureFunction7(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, exp6, exp7, thisArg) {\n var bindingIndex = getBindingRoot() + slotOffset;\n var lView = getLView();\n var different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n return bindingUpdated3(lView, bindingIndex + 4, exp5, exp6, exp7) || different ?\n updateBinding(lView, bindingIndex + 7, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6, exp7) :\n pureFn(exp1, exp2, exp3, exp4, exp5, exp6, exp7)) :\n getBinding(lView, bindingIndex + 7);\n }\n /**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param exp6\n * @param exp7\n * @param exp8\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\n function ɵɵpureFunction8(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8, thisArg) {\n var bindingIndex = getBindingRoot() + slotOffset;\n var lView = getLView();\n var different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n return bindingUpdated4(lView, bindingIndex + 4, exp5, exp6, exp7, exp8) || different ?\n updateBinding(lView, bindingIndex + 8, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8) :\n pureFn(exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8)) :\n getBinding(lView, bindingIndex + 8);\n }\n /**\n * pureFunction instruction that can support any number of bindings.\n *\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn A pure function that takes binding values and builds an object or array\n * containing those values.\n * @param exps An array of binding values\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\n function ɵɵpureFunctionV(slotOffset, pureFn, exps, thisArg) {\n return pureFunctionVInternal(getLView(), getBindingRoot(), slotOffset, pureFn, exps, thisArg);\n }\n /**\n * Results of a pure function invocation are stored in LView in a dedicated slot that is initialized\n * to NO_CHANGE. In rare situations a pure pipe might throw an exception on the very first\n * invocation and not produce any valid results. In this case LView would keep holding the NO_CHANGE\n * value. The NO_CHANGE is not something that we can use in expressions / bindings thus we convert\n * it to `undefined`.\n */\n function getPureFunctionReturnValue(lView, returnValueIndex) {\n ngDevMode && assertIndexInRange(lView, returnValueIndex);\n var lastReturnValue = lView[returnValueIndex];\n return lastReturnValue === NO_CHANGE ? undefined : lastReturnValue;\n }\n /**\n * If the value of the provided exp has changed, calls the pure function to return\n * an updated value. Or if the value has not changed, returns cached value.\n *\n * @param lView LView in which the function is being executed.\n * @param bindingRoot Binding root index.\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn Function that returns an updated value\n * @param exp Updated expression value\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n */\n function pureFunction1Internal(lView, bindingRoot, slotOffset, pureFn, exp, thisArg) {\n var bindingIndex = bindingRoot + slotOffset;\n return bindingUpdated(lView, bindingIndex, exp) ?\n updateBinding(lView, bindingIndex + 1, thisArg ? pureFn.call(thisArg, exp) : pureFn(exp)) :\n getPureFunctionReturnValue(lView, bindingIndex + 1);\n }\n /**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param lView LView in which the function is being executed.\n * @param bindingRoot Binding root index.\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n */\n function pureFunction2Internal(lView, bindingRoot, slotOffset, pureFn, exp1, exp2, thisArg) {\n var bindingIndex = bindingRoot + slotOffset;\n return bindingUpdated2(lView, bindingIndex, exp1, exp2) ?\n updateBinding(lView, bindingIndex + 2, thisArg ? pureFn.call(thisArg, exp1, exp2) : pureFn(exp1, exp2)) :\n getPureFunctionReturnValue(lView, bindingIndex + 2);\n }\n /**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param lView LView in which the function is being executed.\n * @param bindingRoot Binding root index.\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n */\n function pureFunction3Internal(lView, bindingRoot, slotOffset, pureFn, exp1, exp2, exp3, thisArg) {\n var bindingIndex = bindingRoot + slotOffset;\n return bindingUpdated3(lView, bindingIndex, exp1, exp2, exp3) ?\n updateBinding(lView, bindingIndex + 3, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3) : pureFn(exp1, exp2, exp3)) :\n getPureFunctionReturnValue(lView, bindingIndex + 3);\n }\n /**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param lView LView in which the function is being executed.\n * @param bindingRoot Binding root index.\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n */\n function pureFunction4Internal(lView, bindingRoot, slotOffset, pureFn, exp1, exp2, exp3, exp4, thisArg) {\n var bindingIndex = bindingRoot + slotOffset;\n return bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4) ?\n updateBinding(lView, bindingIndex + 4, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4) : pureFn(exp1, exp2, exp3, exp4)) :\n getPureFunctionReturnValue(lView, bindingIndex + 4);\n }\n /**\n * pureFunction instruction that can support any number of bindings.\n *\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param lView LView in which the function is being executed.\n * @param bindingRoot Binding root index.\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn A pure function that takes binding values and builds an object or array\n * containing those values.\n * @param exps An array of binding values\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n */\n function pureFunctionVInternal(lView, bindingRoot, slotOffset, pureFn, exps, thisArg) {\n var bindingIndex = bindingRoot + slotOffset;\n var different = false;\n for (var i = 0; i < exps.length; i++) {\n bindingUpdated(lView, bindingIndex++, exps[i]) && (different = true);\n }\n return different ? updateBinding(lView, bindingIndex, pureFn.apply(thisArg, exps)) :\n getPureFunctionReturnValue(lView, bindingIndex);\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 * Create a pipe.\n *\n * @param index Pipe index where the pipe will be stored.\n * @param pipeName The name of the pipe\n * @returns T the instance of the pipe.\n *\n * @codeGenApi\n */\n function ɵɵpipe(index, pipeName) {\n var tView = getTView();\n var pipeDef;\n var adjustedIndex = index + HEADER_OFFSET;\n if (tView.firstCreatePass) {\n pipeDef = getPipeDef$1(pipeName, tView.pipeRegistry);\n tView.data[adjustedIndex] = pipeDef;\n if (pipeDef.onDestroy) {\n (tView.destroyHooks || (tView.destroyHooks = [])).push(adjustedIndex, pipeDef.onDestroy);\n }\n }\n else {\n pipeDef = tView.data[adjustedIndex];\n }\n var pipeFactory = pipeDef.factory || (pipeDef.factory = getFactoryDef(pipeDef.type, true));\n var previousInjectImplementation = setInjectImplementation(ɵɵdirectiveInject);\n try {\n // DI for pipes is supposed to behave like directives when placed on a component\n // host node, which means that we have to disable access to `viewProviders`.\n var previousIncludeViewProviders = setIncludeViewProviders(false);\n var pipeInstance = pipeFactory();\n setIncludeViewProviders(previousIncludeViewProviders);\n store(tView, getLView(), adjustedIndex, pipeInstance);\n return pipeInstance;\n }\n finally {\n // we have to restore the injector implementation in finally, just in case the creation of the\n // pipe throws an error.\n setInjectImplementation(previousInjectImplementation);\n }\n }\n /**\n * Searches the pipe registry for a pipe with the given name. If one is found,\n * returns the pipe. Otherwise, an error is thrown because the pipe cannot be resolved.\n *\n * @param name Name of pipe to resolve\n * @param registry Full list of available pipes\n * @returns Matching PipeDef\n */\n function getPipeDef$1(name, registry) {\n if (registry) {\n for (var i = registry.length - 1; i >= 0; i--) {\n var pipeDef = registry[i];\n if (name === pipeDef.name) {\n return pipeDef;\n }\n }\n }\n throw new RuntimeError(\"302\" /* PIPE_NOT_FOUND */, \"The pipe '\" + name + \"' could not be found!\");\n }\n /**\n * Invokes a pipe with 1 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param v1 1st argument to {@link PipeTransform#transform}.\n *\n * @codeGenApi\n */\n function ɵɵpipeBind1(index, slotOffset, v1) {\n var adjustedIndex = index + HEADER_OFFSET;\n var lView = getLView();\n var pipeInstance = load(lView, adjustedIndex);\n return unwrapValue$1(lView, isPure(lView, adjustedIndex) ?\n pureFunction1Internal(lView, getBindingRoot(), slotOffset, pipeInstance.transform, v1, pipeInstance) :\n pipeInstance.transform(v1));\n }\n /**\n * Invokes a pipe with 2 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param v1 1st argument to {@link PipeTransform#transform}.\n * @param v2 2nd argument to {@link PipeTransform#transform}.\n *\n * @codeGenApi\n */\n function ɵɵpipeBind2(index, slotOffset, v1, v2) {\n var adjustedIndex = index + HEADER_OFFSET;\n var lView = getLView();\n var pipeInstance = load(lView, adjustedIndex);\n return unwrapValue$1(lView, isPure(lView, adjustedIndex) ?\n pureFunction2Internal(lView, getBindingRoot(), slotOffset, pipeInstance.transform, v1, v2, pipeInstance) :\n pipeInstance.transform(v1, v2));\n }\n /**\n * Invokes a pipe with 3 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param v1 1st argument to {@link PipeTransform#transform}.\n * @param v2 2nd argument to {@link PipeTransform#transform}.\n * @param v3 4rd argument to {@link PipeTransform#transform}.\n *\n * @codeGenApi\n */\n function ɵɵpipeBind3(index, slotOffset, v1, v2, v3) {\n var adjustedIndex = index + HEADER_OFFSET;\n var lView = getLView();\n var pipeInstance = load(lView, adjustedIndex);\n return unwrapValue$1(lView, isPure(lView, adjustedIndex) ? pureFunction3Internal(lView, getBindingRoot(), slotOffset, pipeInstance.transform, v1, v2, v3, pipeInstance) :\n pipeInstance.transform(v1, v2, v3));\n }\n /**\n * Invokes a pipe with 4 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param v1 1st argument to {@link PipeTransform#transform}.\n * @param v2 2nd argument to {@link PipeTransform#transform}.\n * @param v3 3rd argument to {@link PipeTransform#transform}.\n * @param v4 4th argument to {@link PipeTransform#transform}.\n *\n * @codeGenApi\n */\n function ɵɵpipeBind4(index, slotOffset, v1, v2, v3, v4) {\n var adjustedIndex = index + HEADER_OFFSET;\n var lView = getLView();\n var pipeInstance = load(lView, adjustedIndex);\n return unwrapValue$1(lView, isPure(lView, adjustedIndex) ? pureFunction4Internal(lView, getBindingRoot(), slotOffset, pipeInstance.transform, v1, v2, v3, v4, pipeInstance) :\n pipeInstance.transform(v1, v2, v3, v4));\n }\n /**\n * Invokes a pipe with variable number of arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param values Array of arguments to pass to {@link PipeTransform#transform} method.\n *\n * @codeGenApi\n */\n function ɵɵpipeBindV(index, slotOffset, values) {\n var adjustedIndex = index + HEADER_OFFSET;\n var lView = getLView();\n var pipeInstance = load(lView, adjustedIndex);\n return unwrapValue$1(lView, isPure(lView, adjustedIndex) ?\n pureFunctionVInternal(lView, getBindingRoot(), slotOffset, pipeInstance.transform, values, pipeInstance) :\n pipeInstance.transform.apply(pipeInstance, values));\n }\n function isPure(lView, index) {\n return lView[TVIEW].data[index].pure;\n }\n /**\n * Unwrap the output of a pipe transformation.\n * In order to trick change detection into considering that the new value is always different from\n * the old one, the old value is overwritten by NO_CHANGE.\n *\n * @param newValue the pipe transformation output.\n */\n function unwrapValue$1(lView, newValue) {\n if (WrappedValue.isWrapped(newValue)) {\n newValue = WrappedValue.unwrap(newValue);\n // The NO_CHANGE value needs to be written at the index where the impacted binding value is\n // stored\n var bindingToInvalidateIdx = getBindingIndex();\n lView[bindingToInvalidateIdx] = NO_CHANGE;\n }\n return newValue;\n }\n\n var EventEmitter_ = /** @class */ (function (_super) {\n __extends(EventEmitter_, _super);\n function EventEmitter_(isAsync) {\n if (isAsync === void 0) { isAsync = false; }\n var _this = _super.call(this) || this;\n _this.__isAsync = isAsync;\n return _this;\n }\n EventEmitter_.prototype.emit = function (value) {\n _super.prototype.next.call(this, value);\n };\n EventEmitter_.prototype.subscribe = function (observerOrNext, error, complete) {\n var _a, _b, _c;\n var nextFn = observerOrNext;\n var errorFn = error || (function () { return null; });\n var completeFn = complete;\n if (observerOrNext && typeof observerOrNext === 'object') {\n var observer = observerOrNext;\n nextFn = (_a = observer.next) === null || _a === void 0 ? void 0 : _a.bind(observer);\n errorFn = (_b = observer.error) === null || _b === void 0 ? void 0 : _b.bind(observer);\n completeFn = (_c = observer.complete) === null || _c === void 0 ? void 0 : _c.bind(observer);\n }\n if (this.__isAsync) {\n errorFn = _wrapInTimeout(errorFn);\n if (nextFn) {\n nextFn = _wrapInTimeout(nextFn);\n }\n if (completeFn) {\n completeFn = _wrapInTimeout(completeFn);\n }\n }\n var sink = _super.prototype.subscribe.call(this, { next: nextFn, error: errorFn, complete: completeFn });\n if (observerOrNext instanceof rxjs.Subscription) {\n observerOrNext.add(sink);\n }\n return sink;\n };\n return EventEmitter_;\n }(rxjs.Subject));\n function _wrapInTimeout(fn) {\n return function (value) {\n setTimeout(fn, undefined, value);\n };\n }\n /**\n * @publicApi\n */\n var EventEmitter = EventEmitter_;\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 symbolIterator() {\n return this._results[getSymbolIterator()]();\n }\n /**\n * An unmodifiable list of items that Angular keeps up to date when the state\n * of the application changes.\n *\n * The type of object that {@link ViewChildren}, {@link ContentChildren}, and {@link QueryList}\n * provide.\n *\n * Implements an iterable interface, therefore it can be used in both ES6\n * javascript `for (var i of items)` loops as well as in Angular templates with\n * `*ngFor=\"let i of myList\"`.\n *\n * Changes can be observed by subscribing to the changes `Observable`.\n *\n * NOTE: In the future this class will implement an `Observable` interface.\n *\n * @usageNotes\n * ### Example\n * ```typescript\n * @Component({...})\n * class Container {\n * @ViewChildren(Item) items:QueryList<Item>;\n * }\n * ```\n *\n * @publicApi\n */\n var QueryList = /** @class */ (function () {\n /**\n * @param emitDistinctChangesOnly Whether `QueryList.changes` should fire only when actual change\n * has occurred. Or if it should fire when query is recomputed. (recomputing could resolve in\n * the same result) This is set to `false` for backwards compatibility but will be changed to\n * true in v12.\n */\n function QueryList(_emitDistinctChangesOnly) {\n if (_emitDistinctChangesOnly === void 0) { _emitDistinctChangesOnly = false; }\n this._emitDistinctChangesOnly = _emitDistinctChangesOnly;\n this.dirty = true;\n this._results = [];\n this._changesDetected = false;\n this._changes = null;\n this.length = 0;\n this.first = undefined;\n this.last = undefined;\n // This function should be declared on the prototype, but doing so there will cause the class\n // declaration to have side-effects and become not tree-shakable. For this reason we do it in\n // the constructor.\n // [getSymbolIterator()](): Iterator<T> { ... }\n var symbol = getSymbolIterator();\n var proto = QueryList.prototype;\n if (!proto[symbol])\n proto[symbol] = symbolIterator;\n }\n Object.defineProperty(QueryList.prototype, \"changes\", {\n /**\n * Returns `Observable` of `QueryList` notifying the subscriber of changes.\n */\n get: function () {\n return this._changes || (this._changes = new EventEmitter());\n },\n enumerable: false,\n configurable: true\n });\n /**\n * Returns the QueryList entry at `index`.\n */\n QueryList.prototype.get = function (index) {\n return this._results[index];\n };\n /**\n * See\n * [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)\n */\n QueryList.prototype.map = function (fn) {\n return this._results.map(fn);\n };\n /**\n * See\n * [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)\n */\n QueryList.prototype.filter = function (fn) {\n return this._results.filter(fn);\n };\n /**\n * See\n * [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)\n */\n QueryList.prototype.find = function (fn) {\n return this._results.find(fn);\n };\n /**\n * See\n * [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)\n */\n QueryList.prototype.reduce = function (fn, init) {\n return this._results.reduce(fn, init);\n };\n /**\n * See\n * [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)\n */\n QueryList.prototype.forEach = function (fn) {\n this._results.forEach(fn);\n };\n /**\n * See\n * [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)\n */\n QueryList.prototype.some = function (fn) {\n return this._results.some(fn);\n };\n /**\n * Returns a copy of the internal results list as an Array.\n */\n QueryList.prototype.toArray = function () {\n return this._results.slice();\n };\n QueryList.prototype.toString = function () {\n return this._results.toString();\n };\n /**\n * Updates the stored data of the query list, and resets the `dirty` flag to `false`, so that\n * on change detection, it will not notify of changes to the queries, unless a new change\n * occurs.\n *\n * @param resultsTree The query results to store\n * @param identityAccessor Optional function for extracting stable object identity from a value\n * in the array. This function is executed for each element of the query result list while\n * comparing current query list with the new one (provided as a first argument of the `reset`\n * function) to detect if the lists are different. If the function is not provided, elements\n * are compared as is (without any pre-processing).\n */\n QueryList.prototype.reset = function (resultsTree, identityAccessor) {\n // Cast to `QueryListInternal` so that we can mutate fields which are readonly for the usage of\n // QueryList (but not for QueryList itself.)\n var self = this;\n self.dirty = false;\n var newResultFlat = flatten(resultsTree);\n if (this._changesDetected = !arrayEquals(self._results, newResultFlat, identityAccessor)) {\n self._results = newResultFlat;\n self.length = newResultFlat.length;\n self.last = newResultFlat[this.length - 1];\n self.first = newResultFlat[0];\n }\n };\n /**\n * Triggers a change event by emitting on the `changes` {@link EventEmitter}.\n */\n QueryList.prototype.notifyOnChanges = function () {\n if (this._changes && (this._changesDetected || !this._emitDistinctChangesOnly))\n this._changes.emit(this);\n };\n /** internal */\n QueryList.prototype.setDirty = function () {\n this.dirty = true;\n };\n /** internal */\n QueryList.prototype.destroy = function () {\n this.changes.complete();\n this.changes.unsubscribe();\n };\n return QueryList;\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 // Note: This hack is necessary so we don't erroneously get a circular dependency\n // failure based on types.\n var unusedValueExportToPlacateAjd$7 = 1;\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 // Note: This hack is necessary so we don't erroneously get a circular dependency\n // failure based on types.\n var unusedValueExportToPlacateAjd$8 = 1;\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 var unusedValueToPlacateAjd$2 = unusedValueExportToPlacateAjd$7 + unusedValueExportToPlacateAjd$3 + unusedValueExportToPlacateAjd$4 + unusedValueExportToPlacateAjd$8;\n var LQuery_ = /** @class */ (function () {\n function LQuery_(queryList) {\n this.queryList = queryList;\n this.matches = null;\n }\n LQuery_.prototype.clone = function () {\n return new LQuery_(this.queryList);\n };\n LQuery_.prototype.setDirty = function () {\n this.queryList.setDirty();\n };\n return LQuery_;\n }());\n var LQueries_ = /** @class */ (function () {\n function LQueries_(queries) {\n if (queries === void 0) { queries = []; }\n this.queries = queries;\n }\n LQueries_.prototype.createEmbeddedView = function (tView) {\n var tQueries = tView.queries;\n if (tQueries !== null) {\n var noOfInheritedQueries = tView.contentQueries !== null ? tView.contentQueries[0] : tQueries.length;\n var viewLQueries = [];\n // An embedded view has queries propagated from a declaration view at the beginning of the\n // TQueries collection and up until a first content query declared in the embedded view. Only\n // propagated LQueries are created at this point (LQuery corresponding to declared content\n // queries will be instantiated from the content query instructions for each directive).\n for (var i = 0; i < noOfInheritedQueries; i++) {\n var tQuery = tQueries.getByIndex(i);\n var parentLQuery = this.queries[tQuery.indexInDeclarationView];\n viewLQueries.push(parentLQuery.clone());\n }\n return new LQueries_(viewLQueries);\n }\n return null;\n };\n LQueries_.prototype.insertView = function (tView) {\n this.dirtyQueriesWithMatches(tView);\n };\n LQueries_.prototype.detachView = function (tView) {\n this.dirtyQueriesWithMatches(tView);\n };\n LQueries_.prototype.dirtyQueriesWithMatches = function (tView) {\n for (var i = 0; i < this.queries.length; i++) {\n if (getTQuery(tView, i).matches !== null) {\n this.queries[i].setDirty();\n }\n }\n };\n return LQueries_;\n }());\n var TQueryMetadata_ = /** @class */ (function () {\n function TQueryMetadata_(predicate, flags, read) {\n if (read === void 0) { read = null; }\n this.predicate = predicate;\n this.flags = flags;\n this.read = read;\n }\n return TQueryMetadata_;\n }());\n var TQueries_ = /** @class */ (function () {\n function TQueries_(queries) {\n if (queries === void 0) { queries = []; }\n this.queries = queries;\n }\n TQueries_.prototype.elementStart = function (tView, tNode) {\n ngDevMode &&\n assertFirstCreatePass(tView, 'Queries should collect results on the first template pass only');\n for (var i = 0; i < this.queries.length; i++) {\n this.queries[i].elementStart(tView, tNode);\n }\n };\n TQueries_.prototype.elementEnd = function (tNode) {\n for (var i = 0; i < this.queries.length; i++) {\n this.queries[i].elementEnd(tNode);\n }\n };\n TQueries_.prototype.embeddedTView = function (tNode) {\n var queriesForTemplateRef = null;\n for (var i = 0; i < this.length; i++) {\n var childQueryIndex = queriesForTemplateRef !== null ? queriesForTemplateRef.length : 0;\n var tqueryClone = this.getByIndex(i).embeddedTView(tNode, childQueryIndex);\n if (tqueryClone) {\n tqueryClone.indexInDeclarationView = i;\n if (queriesForTemplateRef !== null) {\n queriesForTemplateRef.push(tqueryClone);\n }\n else {\n queriesForTemplateRef = [tqueryClone];\n }\n }\n }\n return queriesForTemplateRef !== null ? new TQueries_(queriesForTemplateRef) : null;\n };\n TQueries_.prototype.template = function (tView, tNode) {\n ngDevMode &&\n assertFirstCreatePass(tView, 'Queries should collect results on the first template pass only');\n for (var i = 0; i < this.queries.length; i++) {\n this.queries[i].template(tView, tNode);\n }\n };\n TQueries_.prototype.getByIndex = function (index) {\n ngDevMode && assertIndexInRange(this.queries, index);\n return this.queries[index];\n };\n Object.defineProperty(TQueries_.prototype, \"length\", {\n get: function () {\n return this.queries.length;\n },\n enumerable: false,\n configurable: true\n });\n TQueries_.prototype.track = function (tquery) {\n this.queries.push(tquery);\n };\n return TQueries_;\n }());\n var TQuery_ = /** @class */ (function () {\n function TQuery_(metadata, nodeIndex) {\n if (nodeIndex === void 0) { nodeIndex = -1; }\n this.metadata = metadata;\n this.matches = null;\n this.indexInDeclarationView = -1;\n this.crossesNgTemplate = false;\n /**\n * A flag indicating if a given query still applies to nodes it is crossing. We use this flag\n * (alongside with _declarationNodeIndex) to know when to stop applying content queries to\n * elements in a template.\n */\n this._appliesToNextNode = true;\n this._declarationNodeIndex = nodeIndex;\n }\n TQuery_.prototype.elementStart = function (tView, tNode) {\n if (this.isApplyingToNode(tNode)) {\n this.matchTNode(tView, tNode);\n }\n };\n TQuery_.prototype.elementEnd = function (tNode) {\n if (this._declarationNodeIndex === tNode.index) {\n this._appliesToNextNode = false;\n }\n };\n TQuery_.prototype.template = function (tView, tNode) {\n this.elementStart(tView, tNode);\n };\n TQuery_.prototype.embeddedTView = function (tNode, childQueryIndex) {\n if (this.isApplyingToNode(tNode)) {\n this.crossesNgTemplate = true;\n // A marker indicating a `<ng-template>` element (a placeholder for query results from\n // embedded views created based on this `<ng-template>`).\n this.addMatch(-tNode.index, childQueryIndex);\n return new TQuery_(this.metadata);\n }\n return null;\n };\n TQuery_.prototype.isApplyingToNode = function (tNode) {\n if (this._appliesToNextNode &&\n (this.metadata.flags & 1 /* descendants */) !== 1 /* descendants */) {\n var declarationNodeIdx = this._declarationNodeIndex;\n var parent = tNode.parent;\n // Determine if a given TNode is a \"direct\" child of a node on which a content query was\n // declared (only direct children of query's host node can match with the descendants: false\n // option). There are 3 main use-case / conditions to consider here:\n // - <needs-target><i #target></i></needs-target>: here <i #target> parent node is a query\n // host node;\n // - <needs-target><ng-template [ngIf]=\"true\"><i #target></i></ng-template></needs-target>:\n // here <i #target> parent node is null;\n // - <needs-target><ng-container><i #target></i></ng-container></needs-target>: here we need\n // to go past `<ng-container>` to determine <i #target> parent node (but we shouldn't traverse\n // up past the query's host node!).\n while (parent !== null && (parent.type & 8 /* ElementContainer */) &&\n parent.index !== declarationNodeIdx) {\n parent = parent.parent;\n }\n return declarationNodeIdx === (parent !== null ? parent.index : -1);\n }\n return this._appliesToNextNode;\n };\n TQuery_.prototype.matchTNode = function (tView, tNode) {\n var predicate = this.metadata.predicate;\n if (Array.isArray(predicate)) {\n for (var i = 0; i < predicate.length; i++) {\n var name = predicate[i];\n this.matchTNodeWithReadOption(tView, tNode, getIdxOfMatchingSelector(tNode, name));\n // Also try matching the name to a provider since strings can be used as DI tokens too.\n this.matchTNodeWithReadOption(tView, tNode, locateDirectiveOrProvider(tNode, tView, name, false, false));\n }\n }\n else {\n if (predicate === TemplateRef) {\n if (tNode.type & 4 /* Container */) {\n this.matchTNodeWithReadOption(tView, tNode, -1);\n }\n }\n else {\n this.matchTNodeWithReadOption(tView, tNode, locateDirectiveOrProvider(tNode, tView, predicate, false, false));\n }\n }\n };\n TQuery_.prototype.matchTNodeWithReadOption = function (tView, tNode, nodeMatchIdx) {\n if (nodeMatchIdx !== null) {\n var read = this.metadata.read;\n if (read !== null) {\n if (read === ElementRef || read === ViewContainerRef ||\n read === TemplateRef && (tNode.type & 4 /* Container */)) {\n this.addMatch(tNode.index, -2);\n }\n else {\n var directiveOrProviderIdx = locateDirectiveOrProvider(tNode, tView, read, false, false);\n if (directiveOrProviderIdx !== null) {\n this.addMatch(tNode.index, directiveOrProviderIdx);\n }\n }\n }\n else {\n this.addMatch(tNode.index, nodeMatchIdx);\n }\n }\n };\n TQuery_.prototype.addMatch = function (tNodeIdx, matchIdx) {\n if (this.matches === null) {\n this.matches = [tNodeIdx, matchIdx];\n }\n else {\n this.matches.push(tNodeIdx, matchIdx);\n }\n };\n return TQuery_;\n }());\n /**\n * Iterates over local names for a given node and returns directive index\n * (or -1 if a local name points to an element).\n *\n * @param tNode static data of a node to check\n * @param selector selector to match\n * @returns directive index, -1 or null if a selector didn't match any of the local names\n */\n function getIdxOfMatchingSelector(tNode, selector) {\n var localNames = tNode.localNames;\n if (localNames !== null) {\n for (var i = 0; i < localNames.length; i += 2) {\n if (localNames[i] === selector) {\n return localNames[i + 1];\n }\n }\n }\n return null;\n }\n function createResultByTNodeType(tNode, currentView) {\n if (tNode.type & (3 /* AnyRNode */ | 8 /* ElementContainer */)) {\n return createElementRef(tNode, currentView);\n }\n else if (tNode.type & 4 /* Container */) {\n return createTemplateRef(tNode, currentView);\n }\n return null;\n }\n function createResultForNode(lView, tNode, matchingIdx, read) {\n if (matchingIdx === -1) {\n // if read token and / or strategy is not specified, detect it using appropriate tNode type\n return createResultByTNodeType(tNode, lView);\n }\n else if (matchingIdx === -2) {\n // read a special token from a node injector\n return createSpecialToken(lView, tNode, read);\n }\n else {\n // read a token\n return getNodeInjectable(lView, lView[TVIEW], matchingIdx, tNode);\n }\n }\n function createSpecialToken(lView, tNode, read) {\n if (read === ElementRef) {\n return createElementRef(tNode, lView);\n }\n else if (read === TemplateRef) {\n return createTemplateRef(tNode, lView);\n }\n else if (read === ViewContainerRef) {\n ngDevMode && assertTNodeType(tNode, 3 /* AnyRNode */ | 12 /* AnyContainer */);\n return createContainerRef(tNode, lView);\n }\n else {\n ngDevMode &&\n throwError(\"Special token to read should be one of ElementRef, TemplateRef or ViewContainerRef but got \" + stringify(read) + \".\");\n }\n }\n /**\n * A helper function that creates query results for a given view. This function is meant to do the\n * processing once and only once for a given view instance (a set of results for a given view\n * doesn't change).\n */\n function materializeViewResults(tView, lView, tQuery, queryIndex) {\n var lQuery = lView[QUERIES].queries[queryIndex];\n if (lQuery.matches === null) {\n var tViewData = tView.data;\n var tQueryMatches = tQuery.matches;\n var result = [];\n for (var i = 0; i < tQueryMatches.length; i += 2) {\n var matchedNodeIdx = tQueryMatches[i];\n if (matchedNodeIdx < 0) {\n // we at the <ng-template> marker which might have results in views created based on this\n // <ng-template> - those results will be in separate views though, so here we just leave\n // null as a placeholder\n result.push(null);\n }\n else {\n ngDevMode && assertIndexInRange(tViewData, matchedNodeIdx);\n var tNode = tViewData[matchedNodeIdx];\n result.push(createResultForNode(lView, tNode, tQueryMatches[i + 1], tQuery.metadata.read));\n }\n }\n lQuery.matches = result;\n }\n return lQuery.matches;\n }\n /**\n * A helper function that collects (already materialized) query results from a tree of views,\n * starting with a provided LView.\n */\n function collectQueryResults(tView, lView, queryIndex, result) {\n var tQuery = tView.queries.getByIndex(queryIndex);\n var tQueryMatches = tQuery.matches;\n if (tQueryMatches !== null) {\n var lViewResults = materializeViewResults(tView, lView, tQuery, queryIndex);\n for (var i = 0; i < tQueryMatches.length; i += 2) {\n var tNodeIdx = tQueryMatches[i];\n if (tNodeIdx > 0) {\n result.push(lViewResults[i / 2]);\n }\n else {\n var childQueryIndex = tQueryMatches[i + 1];\n var declarationLContainer = lView[-tNodeIdx];\n ngDevMode && assertLContainer(declarationLContainer);\n // collect matches for views inserted in this container\n for (var i_1 = CONTAINER_HEADER_OFFSET; i_1 < declarationLContainer.length; i_1++) {\n var embeddedLView = declarationLContainer[i_1];\n if (embeddedLView[DECLARATION_LCONTAINER] === embeddedLView[PARENT]) {\n collectQueryResults(embeddedLView[TVIEW], embeddedLView, childQueryIndex, result);\n }\n }\n // collect matches for views created from this declaration container and inserted into\n // different containers\n if (declarationLContainer[MOVED_VIEWS] !== null) {\n var embeddedLViews = declarationLContainer[MOVED_VIEWS];\n for (var i_2 = 0; i_2 < embeddedLViews.length; i_2++) {\n var embeddedLView = embeddedLViews[i_2];\n collectQueryResults(embeddedLView[TVIEW], embeddedLView, childQueryIndex, result);\n }\n }\n }\n }\n }\n return result;\n }\n /**\n * Refreshes a query by combining matches from all active views and removing matches from deleted\n * views.\n *\n * @returns `true` if a query got dirty during change detection or if this is a static query\n * resolving in creation mode, `false` otherwise.\n *\n * @codeGenApi\n */\n function ɵɵqueryRefresh(queryList) {\n var lView = getLView();\n var tView = getTView();\n var queryIndex = getCurrentQueryIndex();\n setCurrentQueryIndex(queryIndex + 1);\n var tQuery = getTQuery(tView, queryIndex);\n if (queryList.dirty &&\n (isCreationMode(lView) ===\n ((tQuery.metadata.flags & 2 /* isStatic */) === 2 /* isStatic */))) {\n if (tQuery.matches === null) {\n queryList.reset([]);\n }\n else {\n var result = tQuery.crossesNgTemplate ?\n collectQueryResults(tView, lView, queryIndex, []) :\n materializeViewResults(tView, lView, tQuery, queryIndex);\n queryList.reset(result, unwrapElementRef);\n queryList.notifyOnChanges();\n }\n return true;\n }\n return false;\n }\n /**\n * Creates new QueryList, stores the reference in LView and returns QueryList.\n *\n * @param predicate The type for which the query will search\n * @param flags Flags associated with the query\n * @param read What to save in the query\n *\n * @codeGenApi\n */\n function ɵɵviewQuery(predicate, flags, read) {\n ngDevMode && assertNumber(flags, 'Expecting flags');\n var tView = getTView();\n if (tView.firstCreatePass) {\n createTQuery(tView, new TQueryMetadata_(predicate, flags, read), -1);\n if ((flags & 2 /* isStatic */) === 2 /* isStatic */) {\n tView.staticViewQueries = true;\n }\n }\n createLQuery(tView, getLView(), flags);\n }\n /**\n * Registers a QueryList, associated with a content query, for later refresh (part of a view\n * refresh).\n *\n * @param directiveIndex Current directive index\n * @param predicate The type for which the query will search\n * @param flags Flags associated with the query\n * @param read What to save in the query\n * @returns QueryList<T>\n *\n * @codeGenApi\n */\n function ɵɵcontentQuery(directiveIndex, predicate, flags, read) {\n ngDevMode && assertNumber(flags, 'Expecting flags');\n var tView = getTView();\n if (tView.firstCreatePass) {\n var tNode = getCurrentTNode();\n createTQuery(tView, new TQueryMetadata_(predicate, flags, read), tNode.index);\n saveContentQueryAndDirectiveIndex(tView, directiveIndex);\n if ((flags & 2 /* isStatic */) === 2 /* isStatic */) {\n tView.staticContentQueries = true;\n }\n }\n createLQuery(tView, getLView(), flags);\n }\n /**\n * Loads a QueryList corresponding to the current view or content query.\n *\n * @codeGenApi\n */\n function ɵɵloadQuery() {\n return loadQueryInternal(getLView(), getCurrentQueryIndex());\n }\n function loadQueryInternal(lView, queryIndex) {\n ngDevMode &&\n assertDefined(lView[QUERIES], 'LQueries should be defined when trying to load a query');\n ngDevMode && assertIndexInRange(lView[QUERIES].queries, queryIndex);\n return lView[QUERIES].queries[queryIndex].queryList;\n }\n function createLQuery(tView, lView, flags) {\n var queryList = new QueryList((flags & 4 /* emitDistinctChangesOnly */) === 4 /* emitDistinctChangesOnly */);\n storeCleanupWithContext(tView, lView, queryList, queryList.destroy);\n if (lView[QUERIES] === null)\n lView[QUERIES] = new LQueries_();\n lView[QUERIES].queries.push(new LQuery_(queryList));\n }\n function createTQuery(tView, metadata, nodeIndex) {\n if (tView.queries === null)\n tView.queries = new TQueries_();\n tView.queries.track(new TQuery_(metadata, nodeIndex));\n }\n function saveContentQueryAndDirectiveIndex(tView, directiveIndex) {\n var tViewContentQueries = tView.contentQueries || (tView.contentQueries = []);\n var lastSavedDirectiveIndex = tViewContentQueries.length ? tViewContentQueries[tViewContentQueries.length - 1] : -1;\n if (directiveIndex !== lastSavedDirectiveIndex) {\n tViewContentQueries.push(tView.queries.length - 1, directiveIndex);\n }\n }\n function getTQuery(tView, index) {\n ngDevMode && assertDefined(tView.queries, 'TQueries must be defined to retrieve a TQuery');\n return tView.queries.getByIndex(index);\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 * Retrieves `TemplateRef` instance from `Injector` when a local reference is placed on the\n * `<ng-template>` element.\n *\n * @codeGenApi\n */\n function ɵɵtemplateRefExtractor(tNode, lView) {\n return createTemplateRef(tNode, lView);\n }\n /**\n * Returns the appropriate `ChangeDetectorRef` for a pipe.\n *\n * @codeGenApi\n */\n function ɵɵinjectPipeChangeDetectorRef(flags) {\n if (flags === void 0) { flags = exports.InjectFlags.Default; }\n var value = injectChangeDetectorRef(true);\n if (value == null && !(flags & exports.InjectFlags.Optional)) {\n throwProviderNotFoundError('ChangeDetectorRef');\n }\n else {\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 */\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 var ɵ0$c = function () { return ({\n 'ɵɵattribute': ɵɵattribute,\n 'ɵɵattributeInterpolate1': ɵɵattributeInterpolate1,\n 'ɵɵattributeInterpolate2': ɵɵattributeInterpolate2,\n 'ɵɵattributeInterpolate3': ɵɵattributeInterpolate3,\n 'ɵɵattributeInterpolate4': ɵɵattributeInterpolate4,\n 'ɵɵattributeInterpolate5': ɵɵattributeInterpolate5,\n 'ɵɵattributeInterpolate6': ɵɵattributeInterpolate6,\n 'ɵɵattributeInterpolate7': ɵɵattributeInterpolate7,\n 'ɵɵattributeInterpolate8': ɵɵattributeInterpolate8,\n 'ɵɵattributeInterpolateV': ɵɵattributeInterpolateV,\n 'ɵɵdefineComponent': ɵɵdefineComponent,\n 'ɵɵdefineDirective': ɵɵdefineDirective,\n 'ɵɵdefineInjectable': ɵɵdefineInjectable,\n 'ɵɵdefineInjector': ɵɵdefineInjector,\n 'ɵɵdefineNgModule': ɵɵdefineNgModule,\n 'ɵɵdefinePipe': ɵɵdefinePipe,\n 'ɵɵdirectiveInject': ɵɵdirectiveInject,\n 'ɵɵgetInheritedFactory': ɵɵgetInheritedFactory,\n 'ɵɵinject': ɵɵinject,\n 'ɵɵinjectAttribute': ɵɵinjectAttribute,\n 'ɵɵinvalidFactory': ɵɵinvalidFactory,\n 'ɵɵinvalidFactoryDep': ɵɵinvalidFactoryDep,\n 'ɵɵinjectPipeChangeDetectorRef': ɵɵinjectPipeChangeDetectorRef,\n 'ɵɵtemplateRefExtractor': ɵɵtemplateRefExtractor,\n 'ɵɵNgOnChangesFeature': ɵɵNgOnChangesFeature,\n 'ɵɵProvidersFeature': ɵɵProvidersFeature,\n 'ɵɵCopyDefinitionFeature': ɵɵCopyDefinitionFeature,\n 'ɵɵInheritDefinitionFeature': ɵɵInheritDefinitionFeature,\n 'ɵɵnextContext': ɵɵnextContext,\n 'ɵɵnamespaceHTML': ɵɵnamespaceHTML,\n 'ɵɵnamespaceMathML': ɵɵnamespaceMathML,\n 'ɵɵnamespaceSVG': ɵɵnamespaceSVG,\n 'ɵɵenableBindings': ɵɵenableBindings,\n 'ɵɵdisableBindings': ɵɵdisableBindings,\n 'ɵɵelementStart': ɵɵelementStart,\n 'ɵɵelementEnd': ɵɵelementEnd,\n 'ɵɵelement': ɵɵelement,\n 'ɵɵelementContainerStart': ɵɵelementContainerStart,\n 'ɵɵelementContainerEnd': ɵɵelementContainerEnd,\n 'ɵɵelementContainer': ɵɵelementContainer,\n 'ɵɵpureFunction0': ɵɵpureFunction0,\n 'ɵɵpureFunction1': ɵɵpureFunction1,\n 'ɵɵpureFunction2': ɵɵpureFunction2,\n 'ɵɵpureFunction3': ɵɵpureFunction3,\n 'ɵɵpureFunction4': ɵɵpureFunction4,\n 'ɵɵpureFunction5': ɵɵpureFunction5,\n 'ɵɵpureFunction6': ɵɵpureFunction6,\n 'ɵɵpureFunction7': ɵɵpureFunction7,\n 'ɵɵpureFunction8': ɵɵpureFunction8,\n 'ɵɵpureFunctionV': ɵɵpureFunctionV,\n 'ɵɵgetCurrentView': ɵɵgetCurrentView,\n 'ɵɵrestoreView': ɵɵrestoreView,\n 'ɵɵlistener': ɵɵlistener,\n 'ɵɵprojection': ɵɵprojection,\n 'ɵɵsyntheticHostProperty': ɵɵsyntheticHostProperty,\n 'ɵɵsyntheticHostListener': ɵɵsyntheticHostListener,\n 'ɵɵpipeBind1': ɵɵpipeBind1,\n 'ɵɵpipeBind2': ɵɵpipeBind2,\n 'ɵɵpipeBind3': ɵɵpipeBind3,\n 'ɵɵpipeBind4': ɵɵpipeBind4,\n 'ɵɵpipeBindV': ɵɵpipeBindV,\n 'ɵɵprojectionDef': ɵɵprojectionDef,\n 'ɵɵhostProperty': ɵɵhostProperty,\n 'ɵɵproperty': ɵɵproperty,\n 'ɵɵpropertyInterpolate': ɵɵpropertyInterpolate,\n 'ɵɵpropertyInterpolate1': ɵɵpropertyInterpolate1,\n 'ɵɵpropertyInterpolate2': ɵɵpropertyInterpolate2,\n 'ɵɵpropertyInterpolate3': ɵɵpropertyInterpolate3,\n 'ɵɵpropertyInterpolate4': ɵɵpropertyInterpolate4,\n 'ɵɵpropertyInterpolate5': ɵɵpropertyInterpolate5,\n 'ɵɵpropertyInterpolate6': ɵɵpropertyInterpolate6,\n 'ɵɵpropertyInterpolate7': ɵɵpropertyInterpolate7,\n 'ɵɵpropertyInterpolate8': ɵɵpropertyInterpolate8,\n 'ɵɵpropertyInterpolateV': ɵɵpropertyInterpolateV,\n 'ɵɵpipe': ɵɵpipe,\n 'ɵɵqueryRefresh': ɵɵqueryRefresh,\n 'ɵɵviewQuery': ɵɵviewQuery,\n 'ɵɵloadQuery': ɵɵloadQuery,\n 'ɵɵcontentQuery': ɵɵcontentQuery,\n 'ɵɵreference': ɵɵreference,\n 'ɵɵclassMap': ɵɵclassMap,\n 'ɵɵclassMapInterpolate1': ɵɵclassMapInterpolate1,\n 'ɵɵclassMapInterpolate2': ɵɵclassMapInterpolate2,\n 'ɵɵclassMapInterpolate3': ɵɵclassMapInterpolate3,\n 'ɵɵclassMapInterpolate4': ɵɵclassMapInterpolate4,\n 'ɵɵclassMapInterpolate5': ɵɵclassMapInterpolate5,\n 'ɵɵclassMapInterpolate6': ɵɵclassMapInterpolate6,\n 'ɵɵclassMapInterpolate7': ɵɵclassMapInterpolate7,\n 'ɵɵclassMapInterpolate8': ɵɵclassMapInterpolate8,\n 'ɵɵclassMapInterpolateV': ɵɵclassMapInterpolateV,\n 'ɵɵstyleMap': ɵɵstyleMap,\n 'ɵɵstyleMapInterpolate1': ɵɵstyleMapInterpolate1,\n 'ɵɵstyleMapInterpolate2': ɵɵstyleMapInterpolate2,\n 'ɵɵstyleMapInterpolate3': ɵɵstyleMapInterpolate3,\n 'ɵɵstyleMapInterpolate4': ɵɵstyleMapInterpolate4,\n 'ɵɵstyleMapInterpolate5': ɵɵstyleMapInterpolate5,\n 'ɵɵstyleMapInterpolate6': ɵɵstyleMapInterpolate6,\n 'ɵɵstyleMapInterpolate7': ɵɵstyleMapInterpolate7,\n 'ɵɵstyleMapInterpolate8': ɵɵstyleMapInterpolate8,\n 'ɵɵstyleMapInterpolateV': ɵɵstyleMapInterpolateV,\n 'ɵɵstyleProp': ɵɵstyleProp,\n 'ɵɵstylePropInterpolate1': ɵɵstylePropInterpolate1,\n 'ɵɵstylePropInterpolate2': ɵɵstylePropInterpolate2,\n 'ɵɵstylePropInterpolate3': ɵɵstylePropInterpolate3,\n 'ɵɵstylePropInterpolate4': ɵɵstylePropInterpolate4,\n 'ɵɵstylePropInterpolate5': ɵɵstylePropInterpolate5,\n 'ɵɵstylePropInterpolate6': ɵɵstylePropInterpolate6,\n 'ɵɵstylePropInterpolate7': ɵɵstylePropInterpolate7,\n 'ɵɵstylePropInterpolate8': ɵɵstylePropInterpolate8,\n 'ɵɵstylePropInterpolateV': ɵɵstylePropInterpolateV,\n 'ɵɵclassProp': ɵɵclassProp,\n 'ɵɵadvance': ɵɵadvance,\n 'ɵɵtemplate': ɵɵtemplate,\n 'ɵɵtext': ɵɵtext,\n 'ɵɵtextInterpolate': ɵɵtextInterpolate,\n 'ɵɵtextInterpolate1': ɵɵtextInterpolate1,\n 'ɵɵtextInterpolate2': ɵɵtextInterpolate2,\n 'ɵɵtextInterpolate3': ɵɵtextInterpolate3,\n 'ɵɵtextInterpolate4': ɵɵtextInterpolate4,\n 'ɵɵtextInterpolate5': ɵɵtextInterpolate5,\n 'ɵɵtextInterpolate6': ɵɵtextInterpolate6,\n 'ɵɵtextInterpolate7': ɵɵtextInterpolate7,\n 'ɵɵtextInterpolate8': ɵɵtextInterpolate8,\n 'ɵɵtextInterpolateV': ɵɵtextInterpolateV,\n 'ɵɵi18n': ɵɵi18n,\n 'ɵɵi18nAttributes': ɵɵi18nAttributes,\n 'ɵɵi18nExp': ɵɵi18nExp,\n 'ɵɵi18nStart': ɵɵi18nStart,\n 'ɵɵi18nEnd': ɵɵi18nEnd,\n 'ɵɵi18nApply': ɵɵi18nApply,\n 'ɵɵi18nPostprocess': ɵɵi18nPostprocess,\n 'ɵɵresolveWindow': ɵɵresolveWindow,\n 'ɵɵresolveDocument': ɵɵresolveDocument,\n 'ɵɵresolveBody': ɵɵresolveBody,\n 'ɵɵsetComponentScope': ɵɵsetComponentScope,\n 'ɵɵsetNgModuleScope': ɵɵsetNgModuleScope,\n 'ɵɵsanitizeHtml': ɵɵsanitizeHtml,\n 'ɵɵsanitizeStyle': ɵɵsanitizeStyle,\n 'ɵɵsanitizeResourceUrl': ɵɵsanitizeResourceUrl,\n 'ɵɵsanitizeScript': ɵɵsanitizeScript,\n 'ɵɵsanitizeUrl': ɵɵsanitizeUrl,\n 'ɵɵsanitizeUrlOrResourceUrl': ɵɵsanitizeUrlOrResourceUrl,\n 'ɵɵtrustConstantHtml': ɵɵtrustConstantHtml,\n 'ɵɵtrustConstantResourceUrl': ɵɵtrustConstantResourceUrl,\n 'forwardRef': forwardRef,\n 'resolveForwardRef': resolveForwardRef,\n }); };\n /**\n * A mapping of the @angular/core API surface used in generated expressions to the actual symbols.\n *\n * This should be kept up to date with the public exports of @angular/core.\n */\n var angularCoreEnv = (ɵ0$c)();\n\n var jitOptions = null;\n function setJitOptions(options) {\n if (jitOptions !== null) {\n if (options.defaultEncapsulation !== jitOptions.defaultEncapsulation) {\n ngDevMode &&\n console.error('Provided value for `defaultEncapsulation` can not be changed once it has been set.');\n return;\n }\n if (options.preserveWhitespaces !== jitOptions.preserveWhitespaces) {\n ngDevMode &&\n console.error('Provided value for `preserveWhitespaces` can not be changed once it has been set.');\n return;\n }\n }\n jitOptions = options;\n }\n function getJitOptions() {\n return jitOptions;\n }\n function resetJitOptions() {\n jitOptions = null;\n }\n\n var EMPTY_ARRAY$5 = [];\n var moduleQueue = [];\n /**\n * Enqueues moduleDef to be checked later to see if scope can be set on its\n * component declarations.\n */\n function enqueueModuleForDelayedScoping(moduleType, ngModule) {\n moduleQueue.push({ moduleType: moduleType, ngModule: ngModule });\n }\n var flushingModuleQueue = false;\n /**\n * Loops over queued module definitions, if a given module definition has all of its\n * declarations resolved, it dequeues that module definition and sets the scope on\n * its declarations.\n */\n function flushModuleScopingQueueAsMuchAsPossible() {\n if (!flushingModuleQueue) {\n flushingModuleQueue = true;\n try {\n for (var i = moduleQueue.length - 1; i >= 0; i--) {\n var _a = moduleQueue[i], moduleType = _a.moduleType, ngModule = _a.ngModule;\n if (ngModule.declarations && ngModule.declarations.every(isResolvedDeclaration)) {\n // dequeue\n moduleQueue.splice(i, 1);\n setScopeOnDeclaredComponents(moduleType, ngModule);\n }\n }\n }\n finally {\n flushingModuleQueue = false;\n }\n }\n }\n /**\n * Returns truthy if a declaration has resolved. If the declaration happens to be\n * an array of declarations, it will recurse to check each declaration in that array\n * (which may also be arrays).\n */\n function isResolvedDeclaration(declaration) {\n if (Array.isArray(declaration)) {\n return declaration.every(isResolvedDeclaration);\n }\n return !!resolveForwardRef(declaration);\n }\n /**\n * Compiles a module in JIT mode.\n *\n * This function automatically gets called when a class has a `@NgModule` decorator.\n */\n function compileNgModule(moduleType, ngModule) {\n if (ngModule === void 0) { ngModule = {}; }\n compileNgModuleDefs(moduleType, ngModule);\n // Because we don't know if all declarations have resolved yet at the moment the\n // NgModule decorator is executing, we're enqueueing the setting of module scope\n // on its declarations to be run at a later time when all declarations for the module,\n // including forward refs, have resolved.\n enqueueModuleForDelayedScoping(moduleType, ngModule);\n }\n /**\n * Compiles and adds the `ɵmod`, `ɵfac` and `ɵinj` properties to the module class.\n *\n * It's possible to compile a module via this API which will allow duplicate declarations in its\n * root.\n */\n function compileNgModuleDefs(moduleType, ngModule, allowDuplicateDeclarationsInRoot) {\n if (allowDuplicateDeclarationsInRoot === void 0) { allowDuplicateDeclarationsInRoot = false; }\n ngDevMode && assertDefined(moduleType, 'Required value moduleType');\n ngDevMode && assertDefined(ngModule, 'Required value ngModule');\n var declarations = flatten(ngModule.declarations || EMPTY_ARRAY$5);\n var ngModuleDef = null;\n Object.defineProperty(moduleType, NG_MOD_DEF, {\n configurable: true,\n get: function () {\n if (ngModuleDef === null) {\n if (ngDevMode && ngModule.imports && ngModule.imports.indexOf(moduleType) > -1) {\n // We need to assert this immediately, because allowing it to continue will cause it to\n // go into an infinite loop before we've reached the point where we throw all the errors.\n throw new Error(\"'\" + stringifyForError(moduleType) + \"' module can't import itself\");\n }\n ngModuleDef = getCompilerFacade().compileNgModule(angularCoreEnv, \"ng:///\" + moduleType.name + \"/\\u0275mod.js\", {\n type: moduleType,\n bootstrap: flatten(ngModule.bootstrap || EMPTY_ARRAY$5).map(resolveForwardRef),\n declarations: declarations.map(resolveForwardRef),\n imports: flatten(ngModule.imports || EMPTY_ARRAY$5)\n .map(resolveForwardRef)\n .map(expandModuleWithProviders),\n exports: flatten(ngModule.exports || EMPTY_ARRAY$5)\n .map(resolveForwardRef)\n .map(expandModuleWithProviders),\n schemas: ngModule.schemas ? flatten(ngModule.schemas) : null,\n id: ngModule.id || null,\n });\n // Set `schemas` on ngModuleDef to an empty array in JIT mode to indicate that runtime\n // should verify that there are no unknown elements in a template. In AOT mode, that check\n // happens at compile time and `schemas` information is not present on Component and Module\n // defs after compilation (so the check doesn't happen the second time at runtime).\n if (!ngModuleDef.schemas) {\n ngModuleDef.schemas = [];\n }\n }\n return ngModuleDef;\n }\n });\n var ngFactoryDef = null;\n Object.defineProperty(moduleType, NG_FACTORY_DEF, {\n get: function () {\n if (ngFactoryDef === null) {\n var compiler = getCompilerFacade();\n ngFactoryDef = compiler.compileFactory(angularCoreEnv, \"ng:///\" + moduleType.name + \"/\\u0275fac.js\", {\n name: moduleType.name,\n type: moduleType,\n deps: reflectDependencies(moduleType),\n injectFn: 'inject',\n target: compiler.R3FactoryTarget.NgModule,\n typeArgumentCount: 0,\n });\n }\n return ngFactoryDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n var ngInjectorDef = null;\n Object.defineProperty(moduleType, NG_INJ_DEF, {\n get: function () {\n if (ngInjectorDef === null) {\n ngDevMode &&\n verifySemanticsOfNgModuleDef(moduleType, allowDuplicateDeclarationsInRoot);\n var meta = {\n name: moduleType.name,\n type: moduleType,\n providers: ngModule.providers || EMPTY_ARRAY$5,\n imports: [\n (ngModule.imports || EMPTY_ARRAY$5).map(resolveForwardRef),\n (ngModule.exports || EMPTY_ARRAY$5).map(resolveForwardRef),\n ],\n };\n ngInjectorDef = getCompilerFacade().compileInjector(angularCoreEnv, \"ng:///\" + moduleType.name + \"/\\u0275inj.js\", meta);\n }\n return ngInjectorDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n }\n function verifySemanticsOfNgModuleDef(moduleType, allowDuplicateDeclarationsInRoot, importingModule) {\n if (verifiedNgModule.get(moduleType))\n return;\n verifiedNgModule.set(moduleType, true);\n moduleType = resolveForwardRef(moduleType);\n var ngModuleDef;\n if (importingModule) {\n ngModuleDef = getNgModuleDef(moduleType);\n if (!ngModuleDef) {\n throw new Error(\"Unexpected value '\" + moduleType.name + \"' imported by the module '\" + importingModule.name + \"'. Please add an @NgModule annotation.\");\n }\n }\n else {\n ngModuleDef = getNgModuleDef(moduleType, true);\n }\n var errors = [];\n var declarations = maybeUnwrapFn(ngModuleDef.declarations);\n var imports = maybeUnwrapFn(ngModuleDef.imports);\n flatten(imports).map(unwrapModuleWithProvidersImports).forEach(function (mod) {\n verifySemanticsOfNgModuleImport(mod, moduleType);\n verifySemanticsOfNgModuleDef(mod, false, moduleType);\n });\n var exports = maybeUnwrapFn(ngModuleDef.exports);\n declarations.forEach(verifyDeclarationsHaveDefinitions);\n declarations.forEach(verifyDirectivesHaveSelector);\n var combinedDeclarations = __spread(declarations.map(resolveForwardRef), flatten(imports.map(computeCombinedExports)).map(resolveForwardRef));\n exports.forEach(verifyExportsAreDeclaredOrReExported);\n declarations.forEach(function (decl) { return verifyDeclarationIsUnique(decl, allowDuplicateDeclarationsInRoot); });\n declarations.forEach(verifyComponentEntryComponentsIsPartOfNgModule);\n var ngModule = getAnnotation(moduleType, 'NgModule');\n if (ngModule) {\n ngModule.imports &&\n flatten(ngModule.imports).map(unwrapModuleWithProvidersImports).forEach(function (mod) {\n verifySemanticsOfNgModuleImport(mod, moduleType);\n verifySemanticsOfNgModuleDef(mod, false, moduleType);\n });\n ngModule.bootstrap && deepForEach(ngModule.bootstrap, verifyCorrectBootstrapType);\n ngModule.bootstrap && deepForEach(ngModule.bootstrap, verifyComponentIsPartOfNgModule);\n ngModule.entryComponents &&\n deepForEach(ngModule.entryComponents, verifyComponentIsPartOfNgModule);\n }\n // Throw Error if any errors were detected.\n if (errors.length) {\n throw new Error(errors.join('\\n'));\n }\n ////////////////////////////////////////////////////////////////////////////////////////////////\n function verifyDeclarationsHaveDefinitions(type) {\n type = resolveForwardRef(type);\n var def = getComponentDef(type) || getDirectiveDef(type) || getPipeDef(type);\n if (!def) {\n errors.push(\"Unexpected value '\" + stringifyForError(type) + \"' declared by the module '\" + stringifyForError(moduleType) + \"'. Please add a @Pipe/@Directive/@Component annotation.\");\n }\n }\n function verifyDirectivesHaveSelector(type) {\n type = resolveForwardRef(type);\n var def = getDirectiveDef(type);\n if (!getComponentDef(type) && def && def.selectors.length == 0) {\n errors.push(\"Directive \" + stringifyForError(type) + \" has no selector, please add it!\");\n }\n }\n function verifyExportsAreDeclaredOrReExported(type) {\n type = resolveForwardRef(type);\n var kind = getComponentDef(type) && 'component' || getDirectiveDef(type) && 'directive' ||\n getPipeDef(type) && 'pipe';\n if (kind) {\n // only checked if we are declared as Component, Directive, or Pipe\n // Modules don't need to be declared or imported.\n if (combinedDeclarations.lastIndexOf(type) === -1) {\n // We are exporting something which we don't explicitly declare or import.\n errors.push(\"Can't export \" + kind + \" \" + stringifyForError(type) + \" from \" + stringifyForError(moduleType) + \" as it was neither declared nor imported!\");\n }\n }\n }\n function verifyDeclarationIsUnique(type, suppressErrors) {\n type = resolveForwardRef(type);\n var existingModule = ownerNgModule.get(type);\n if (existingModule && existingModule !== moduleType) {\n if (!suppressErrors) {\n var modules = [existingModule, moduleType].map(stringifyForError).sort();\n errors.push(\"Type \" + stringifyForError(type) + \" is part of the declarations of 2 modules: \" + modules[0] + \" and \" + modules[1] + \"! \" +\n (\"Please consider moving \" + stringifyForError(type) + \" to a higher module that imports \" + modules[0] + \" and \" + modules[1] + \". \") +\n (\"You can also create a new NgModule that exports and includes \" + stringifyForError(type) + \" then import that NgModule in \" + modules[0] + \" and \" + modules[1] + \".\"));\n }\n }\n else {\n // Mark type as having owner.\n ownerNgModule.set(type, moduleType);\n }\n }\n function verifyComponentIsPartOfNgModule(type) {\n type = resolveForwardRef(type);\n var existingModule = ownerNgModule.get(type);\n if (!existingModule) {\n errors.push(\"Component \" + stringifyForError(type) + \" is not part of any NgModule or the module has not been imported into your module.\");\n }\n }\n function verifyCorrectBootstrapType(type) {\n type = resolveForwardRef(type);\n if (!getComponentDef(type)) {\n errors.push(stringifyForError(type) + \" cannot be used as an entry component.\");\n }\n }\n function verifyComponentEntryComponentsIsPartOfNgModule(type) {\n type = resolveForwardRef(type);\n if (getComponentDef(type)) {\n // We know we are component\n var component = getAnnotation(type, 'Component');\n if (component && component.entryComponents) {\n deepForEach(component.entryComponents, verifyComponentIsPartOfNgModule);\n }\n }\n }\n function verifySemanticsOfNgModuleImport(type, importingModule) {\n type = resolveForwardRef(type);\n if (getComponentDef(type) || getDirectiveDef(type)) {\n throw new Error(\"Unexpected directive '\" + type.name + \"' imported by the module '\" + importingModule.name + \"'. Please add an @NgModule annotation.\");\n }\n if (getPipeDef(type)) {\n throw new Error(\"Unexpected pipe '\" + type.name + \"' imported by the module '\" + importingModule.name + \"'. Please add an @NgModule annotation.\");\n }\n }\n }\n function unwrapModuleWithProvidersImports(typeOrWithProviders) {\n typeOrWithProviders = resolveForwardRef(typeOrWithProviders);\n return typeOrWithProviders.ngModule || typeOrWithProviders;\n }\n function getAnnotation(type, name) {\n var annotation = null;\n collect(type.__annotations__);\n collect(type.decorators);\n return annotation;\n function collect(annotations) {\n if (annotations) {\n annotations.forEach(readAnnotation);\n }\n }\n function readAnnotation(decorator) {\n if (!annotation) {\n var proto = Object.getPrototypeOf(decorator);\n if (proto.ngMetadataName == name) {\n annotation = decorator;\n }\n else if (decorator.type) {\n var proto_1 = Object.getPrototypeOf(decorator.type);\n if (proto_1.ngMetadataName == name) {\n annotation = decorator.args[0];\n }\n }\n }\n }\n }\n /**\n * Keep track of compiled components. This is needed because in tests we often want to compile the\n * same component with more than one NgModule. This would cause an error unless we reset which\n * NgModule the component belongs to. We keep the list of compiled components here so that the\n * TestBed can reset it later.\n */\n var ownerNgModule = new WeakMap();\n var verifiedNgModule = new WeakMap();\n function resetCompiledComponents() {\n ownerNgModule = new WeakMap();\n verifiedNgModule = new WeakMap();\n moduleQueue.length = 0;\n }\n /**\n * Computes the combined declarations of explicit declarations, as well as declarations inherited by\n * traversing the exports of imported modules.\n * @param type\n */\n function computeCombinedExports(type) {\n type = resolveForwardRef(type);\n var ngModuleDef = getNgModuleDef(type, true);\n return __spread(flatten(maybeUnwrapFn(ngModuleDef.exports).map(function (type) {\n var ngModuleDef = getNgModuleDef(type);\n if (ngModuleDef) {\n verifySemanticsOfNgModuleDef(type, false);\n return computeCombinedExports(type);\n }\n else {\n return type;\n }\n })));\n }\n /**\n * Some declared components may be compiled asynchronously, and thus may not have their\n * ɵcmp set yet. If this is the case, then a reference to the module is written into\n * the `ngSelectorScope` property of the declared type.\n */\n function setScopeOnDeclaredComponents(moduleType, ngModule) {\n var declarations = flatten(ngModule.declarations || EMPTY_ARRAY$5);\n var transitiveScopes = transitiveScopesFor(moduleType);\n declarations.forEach(function (declaration) {\n if (declaration.hasOwnProperty(NG_COMP_DEF)) {\n // A `ɵcmp` field exists - go ahead and patch the component directly.\n var component = declaration;\n var componentDef = getComponentDef(component);\n patchComponentDefWithScope(componentDef, transitiveScopes);\n }\n else if (!declaration.hasOwnProperty(NG_DIR_DEF) && !declaration.hasOwnProperty(NG_PIPE_DEF)) {\n // Set `ngSelectorScope` for future reference when the component compilation finishes.\n declaration.ngSelectorScope = moduleType;\n }\n });\n }\n /**\n * Patch the definition of a component with directives and pipes from the compilation scope of\n * a given module.\n */\n function patchComponentDefWithScope(componentDef, transitiveScopes) {\n componentDef.directiveDefs = function () { return Array.from(transitiveScopes.compilation.directives)\n .map(function (dir) { return dir.hasOwnProperty(NG_COMP_DEF) ? getComponentDef(dir) : getDirectiveDef(dir); })\n .filter(function (def) { return !!def; }); };\n componentDef.pipeDefs = function () { return Array.from(transitiveScopes.compilation.pipes).map(function (pipe) { return getPipeDef(pipe); }); };\n componentDef.schemas = transitiveScopes.schemas;\n // Since we avoid Components/Directives/Pipes recompiling in case there are no overrides, we\n // may face a problem where previously compiled defs available to a given Component/Directive\n // are cached in TView and may become stale (in case any of these defs gets recompiled). In\n // order to avoid this problem, we force fresh TView to be created.\n componentDef.tView = null;\n }\n /**\n * Compute the pair of transitive scopes (compilation scope and exported scope) for a given module.\n *\n * This operation is memoized and the result is cached on the module's definition. This function can\n * be called on modules with components that have not fully compiled yet, but the result should not\n * be used until they have.\n *\n * @param moduleType module that transitive scope should be calculated for.\n */\n function transitiveScopesFor(moduleType) {\n if (!isNgModule(moduleType)) {\n throw new Error(moduleType.name + \" does not have a module def (\\u0275mod property)\");\n }\n var def = getNgModuleDef(moduleType);\n if (def.transitiveCompileScopes !== null) {\n return def.transitiveCompileScopes;\n }\n var scopes = {\n schemas: def.schemas || null,\n compilation: {\n directives: new Set(),\n pipes: new Set(),\n },\n exported: {\n directives: new Set(),\n pipes: new Set(),\n },\n };\n maybeUnwrapFn(def.imports).forEach(function (imported) {\n var importedType = imported;\n if (!isNgModule(importedType)) {\n throw new Error(\"Importing \" + importedType.name + \" which does not have a \\u0275mod property\");\n }\n // When this module imports another, the imported module's exported directives and pipes are\n // added to the compilation scope of this module.\n var importedScope = transitiveScopesFor(importedType);\n importedScope.exported.directives.forEach(function (entry) { return scopes.compilation.directives.add(entry); });\n importedScope.exported.pipes.forEach(function (entry) { return scopes.compilation.pipes.add(entry); });\n });\n maybeUnwrapFn(def.declarations).forEach(function (declared) {\n var declaredWithDefs = declared;\n if (getPipeDef(declaredWithDefs)) {\n scopes.compilation.pipes.add(declared);\n }\n else {\n // Either declared has a ɵcmp or ɵdir, or it's a component which hasn't\n // had its template compiled yet. In either case, it gets added to the compilation's\n // directives.\n scopes.compilation.directives.add(declared);\n }\n });\n maybeUnwrapFn(def.exports).forEach(function (exported) {\n var exportedType = exported;\n // Either the type is a module, a pipe, or a component/directive (which may not have a\n // ɵcmp as it might be compiled asynchronously).\n if (isNgModule(exportedType)) {\n // When this module exports another, the exported module's exported directives and pipes are\n // added to both the compilation and exported scopes of this module.\n var exportedScope = transitiveScopesFor(exportedType);\n exportedScope.exported.directives.forEach(function (entry) {\n scopes.compilation.directives.add(entry);\n scopes.exported.directives.add(entry);\n });\n exportedScope.exported.pipes.forEach(function (entry) {\n scopes.compilation.pipes.add(entry);\n scopes.exported.pipes.add(entry);\n });\n }\n else if (getPipeDef(exportedType)) {\n scopes.exported.pipes.add(exportedType);\n }\n else {\n scopes.exported.directives.add(exportedType);\n }\n });\n def.transitiveCompileScopes = scopes;\n return scopes;\n }\n function expandModuleWithProviders(value) {\n if (isModuleWithProviders(value)) {\n return value.ngModule;\n }\n return value;\n }\n function isModuleWithProviders(value) {\n return value.ngModule !== undefined;\n }\n function isNgModule(value) {\n return !!getNgModuleDef(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 */\n /**\n * Keep track of the compilation depth to avoid reentrancy issues during JIT compilation. This\n * matters in the following scenario:\n *\n * Consider a component 'A' that extends component 'B', both declared in module 'M'. During\n * the compilation of 'A' the definition of 'B' is requested to capture the inheritance chain,\n * potentially triggering compilation of 'B'. If this nested compilation were to trigger\n * `flushModuleScopingQueueAsMuchAsPossible` it may happen that module 'M' is still pending in the\n * queue, resulting in 'A' and 'B' to be patched with the NgModule scope. As the compilation of\n * 'A' is still in progress, this would introduce a circular dependency on its compilation. To avoid\n * this issue, the module scope queue is only flushed for compilations at the depth 0, to ensure\n * all compilations have finished.\n */\n var compilationDepth = 0;\n /**\n * Compile an Angular component according to its decorator metadata, and patch the resulting\n * component def (ɵcmp) onto the component type.\n *\n * Compilation may be asynchronous (due to the need to resolve URLs for the component template or\n * other resources, for example). In the event that compilation is not immediate, `compileComponent`\n * will enqueue resource resolution into a global queue and will fail to return the `ɵcmp`\n * until the global queue has been resolved with a call to `resolveComponentResources`.\n */\n function compileComponent(type, metadata) {\n // Initialize ngDevMode. This must be the first statement in compileComponent.\n // See the `initNgDevMode` docstring for more information.\n (typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode();\n var ngComponentDef = null;\n // Metadata may have resources which need to be resolved.\n maybeQueueResolutionOfComponentResources(type, metadata);\n // Note that we're using the same function as `Directive`, because that's only subset of metadata\n // that we need to create the ngFactoryDef. We're avoiding using the component metadata\n // because we'd have to resolve the asynchronous templates.\n addDirectiveFactoryDef(type, metadata);\n Object.defineProperty(type, NG_COMP_DEF, {\n get: function () {\n if (ngComponentDef === null) {\n var compiler = getCompilerFacade();\n if (componentNeedsResolution(metadata)) {\n var error = [\"Component '\" + type.name + \"' is not resolved:\"];\n if (metadata.templateUrl) {\n error.push(\" - templateUrl: \" + metadata.templateUrl);\n }\n if (metadata.styleUrls && metadata.styleUrls.length) {\n error.push(\" - styleUrls: \" + JSON.stringify(metadata.styleUrls));\n }\n error.push(\"Did you run and wait for 'resolveComponentResources()'?\");\n throw new Error(error.join('\\n'));\n }\n // This const was called `jitOptions` previously but had to be renamed to `options` because\n // of a bug with Terser that caused optimized JIT builds to throw a `ReferenceError`.\n // This bug was investigated in https://github.com/angular/angular-cli/issues/17264.\n // We should not rename it back until https://github.com/terser/terser/issues/615 is fixed.\n var options = getJitOptions();\n var preserveWhitespaces = metadata.preserveWhitespaces;\n if (preserveWhitespaces === undefined) {\n if (options !== null && options.preserveWhitespaces !== undefined) {\n preserveWhitespaces = options.preserveWhitespaces;\n }\n else {\n preserveWhitespaces = false;\n }\n }\n var encapsulation = metadata.encapsulation;\n if (encapsulation === undefined) {\n if (options !== null && options.defaultEncapsulation !== undefined) {\n encapsulation = options.defaultEncapsulation;\n }\n else {\n encapsulation = exports.ViewEncapsulation.Emulated;\n }\n }\n var templateUrl = metadata.templateUrl || \"ng:///\" + type.name + \"/template.html\";\n var meta = Object.assign(Object.assign({}, directiveMetadata(type, metadata)), { typeSourceSpan: compiler.createParseSourceSpan('Component', type.name, templateUrl), template: metadata.template || '', preserveWhitespaces: preserveWhitespaces, styles: metadata.styles || EMPTY_ARRAY$1, animations: metadata.animations, directives: [], changeDetection: metadata.changeDetection, pipes: new Map(), encapsulation: encapsulation, interpolation: metadata.interpolation, viewProviders: metadata.viewProviders || null });\n compilationDepth++;\n try {\n if (meta.usesInheritance) {\n addDirectiveDefToUndecoratedParents(type);\n }\n ngComponentDef = compiler.compileComponent(angularCoreEnv, templateUrl, meta);\n }\n finally {\n // Ensure that the compilation depth is decremented even when the compilation failed.\n compilationDepth--;\n }\n if (compilationDepth === 0) {\n // When NgModule decorator executed, we enqueued the module definition such that\n // it would only dequeue and add itself as module scope to all of its declarations,\n // but only if if all of its declarations had resolved. This call runs the check\n // to see if any modules that are in the queue can be dequeued and add scope to\n // their declarations.\n flushModuleScopingQueueAsMuchAsPossible();\n }\n // If component compilation is async, then the @NgModule annotation which declares the\n // component may execute and set an ngSelectorScope property on the component type. This\n // allows the component to patch itself with directiveDefs from the module after it\n // finishes compiling.\n if (hasSelectorScope(type)) {\n var scopes = transitiveScopesFor(type.ngSelectorScope);\n patchComponentDefWithScope(ngComponentDef, scopes);\n }\n }\n return ngComponentDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n }\n function hasSelectorScope(component) {\n return component.ngSelectorScope !== undefined;\n }\n /**\n * Compile an Angular directive according to its decorator metadata, and patch the resulting\n * directive def onto the component type.\n *\n * In the event that compilation is not immediate, `compileDirective` will return a `Promise` which\n * will resolve when compilation completes and the directive becomes usable.\n */\n function compileDirective(type, directive) {\n var ngDirectiveDef = null;\n addDirectiveFactoryDef(type, directive || {});\n Object.defineProperty(type, NG_DIR_DEF, {\n get: function () {\n if (ngDirectiveDef === null) {\n // `directive` can be null in the case of abstract directives as a base class\n // that use `@Directive()` with no selector. In that case, pass empty object to the\n // `directiveMetadata` function instead of null.\n var meta = getDirectiveMetadata(type, directive || {});\n ngDirectiveDef =\n getCompilerFacade().compileDirective(angularCoreEnv, meta.sourceMapUrl, meta.metadata);\n }\n return ngDirectiveDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n }\n function getDirectiveMetadata(type, metadata) {\n var name = type && type.name;\n var sourceMapUrl = \"ng:///\" + name + \"/\\u0275dir.js\";\n var compiler = getCompilerFacade();\n var facade = directiveMetadata(type, metadata);\n facade.typeSourceSpan = compiler.createParseSourceSpan('Directive', name, sourceMapUrl);\n if (facade.usesInheritance) {\n addDirectiveDefToUndecoratedParents(type);\n }\n return { metadata: facade, sourceMapUrl: sourceMapUrl };\n }\n function addDirectiveFactoryDef(type, metadata) {\n var ngFactoryDef = null;\n Object.defineProperty(type, NG_FACTORY_DEF, {\n get: function () {\n if (ngFactoryDef === null) {\n var meta = getDirectiveMetadata(type, metadata);\n var compiler = getCompilerFacade();\n ngFactoryDef = compiler.compileFactory(angularCoreEnv, \"ng:///\" + type.name + \"/\\u0275fac.js\", Object.assign(Object.assign({}, meta.metadata), { injectFn: 'directiveInject', target: compiler.R3FactoryTarget.Directive }));\n }\n return ngFactoryDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n }\n function extendsDirectlyFromObject(type) {\n return Object.getPrototypeOf(type.prototype) === Object.prototype;\n }\n /**\n * Extract the `R3DirectiveMetadata` for a particular directive (either a `Directive` or a\n * `Component`).\n */\n function directiveMetadata(type, metadata) {\n // Reflect inputs and outputs.\n var reflect = getReflect();\n var propMetadata = reflect.ownPropMetadata(type);\n return {\n name: type.name,\n type: type,\n typeArgumentCount: 0,\n selector: metadata.selector !== undefined ? metadata.selector : null,\n deps: reflectDependencies(type),\n host: metadata.host || EMPTY_OBJ,\n propMetadata: propMetadata,\n inputs: metadata.inputs || EMPTY_ARRAY$1,\n outputs: metadata.outputs || EMPTY_ARRAY$1,\n queries: extractQueriesMetadata(type, propMetadata, isContentQuery),\n lifecycle: { usesOnChanges: reflect.hasLifecycleHook(type, 'ngOnChanges') },\n typeSourceSpan: null,\n usesInheritance: !extendsDirectlyFromObject(type),\n exportAs: extractExportAs(metadata.exportAs),\n providers: metadata.providers || null,\n viewQueries: extractQueriesMetadata(type, propMetadata, isViewQuery)\n };\n }\n /**\n * Adds a directive definition to all parent classes of a type that don't have an Angular decorator.\n */\n function addDirectiveDefToUndecoratedParents(type) {\n var objPrototype = Object.prototype;\n var parent = Object.getPrototypeOf(type.prototype).constructor;\n // Go up the prototype until we hit `Object`.\n while (parent && parent !== objPrototype) {\n // Since inheritance works if the class was annotated already, we only need to add\n // the def if there are no annotations and the def hasn't been created already.\n if (!getDirectiveDef(parent) && !getComponentDef(parent) &&\n shouldAddAbstractDirective(parent)) {\n compileDirective(parent, null);\n }\n parent = Object.getPrototypeOf(parent);\n }\n }\n function convertToR3QueryPredicate(selector) {\n return typeof selector === 'string' ? splitByComma(selector) : resolveForwardRef(selector);\n }\n function convertToR3QueryMetadata(propertyName, ann) {\n return {\n propertyName: propertyName,\n predicate: convertToR3QueryPredicate(ann.selector),\n descendants: ann.descendants,\n first: ann.first,\n read: ann.read ? ann.read : null,\n static: !!ann.static,\n emitDistinctChangesOnly: !!ann.emitDistinctChangesOnly,\n };\n }\n function extractQueriesMetadata(type, propMetadata, isQueryAnn) {\n var queriesMeta = [];\n var _loop_1 = function (field) {\n if (propMetadata.hasOwnProperty(field)) {\n var annotations_1 = propMetadata[field];\n annotations_1.forEach(function (ann) {\n if (isQueryAnn(ann)) {\n if (!ann.selector) {\n throw new Error(\"Can't construct a query for the property \\\"\" + field + \"\\\" of \" +\n (\"\\\"\" + stringifyForError(type) + \"\\\" since the query selector wasn't defined.\"));\n }\n if (annotations_1.some(isInputAnnotation)) {\n throw new Error(\"Cannot combine @Input decorators with query decorators\");\n }\n queriesMeta.push(convertToR3QueryMetadata(field, ann));\n }\n });\n }\n };\n for (var field in propMetadata) {\n _loop_1(field);\n }\n return queriesMeta;\n }\n function extractExportAs(exportAs) {\n return exportAs === undefined ? null : splitByComma(exportAs);\n }\n function isContentQuery(value) {\n var name = value.ngMetadataName;\n return name === 'ContentChild' || name === 'ContentChildren';\n }\n function isViewQuery(value) {\n var name = value.ngMetadataName;\n return name === 'ViewChild' || name === 'ViewChildren';\n }\n function isInputAnnotation(value) {\n return value.ngMetadataName === 'Input';\n }\n function splitByComma(value) {\n return value.split(',').map(function (piece) { return piece.trim(); });\n }\n var LIFECYCLE_HOOKS = [\n 'ngOnChanges', 'ngOnInit', 'ngOnDestroy', 'ngDoCheck', 'ngAfterViewInit', 'ngAfterViewChecked',\n 'ngAfterContentInit', 'ngAfterContentChecked'\n ];\n function shouldAddAbstractDirective(type) {\n var reflect = getReflect();\n if (LIFECYCLE_HOOKS.some(function (hookName) { return reflect.hasLifecycleHook(type, hookName); })) {\n return true;\n }\n var propMetadata = reflect.propMetadata(type);\n for (var field in propMetadata) {\n var annotations = propMetadata[field];\n for (var i = 0; i < annotations.length; i++) {\n var current = annotations[i];\n var metadataName = current.ngMetadataName;\n if (isInputAnnotation(current) || isContentQuery(current) || isViewQuery(current) ||\n metadataName === 'Output' || metadataName === 'HostBinding' ||\n metadataName === 'HostListener') {\n return true;\n }\n }\n }\n return false;\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 function compilePipe(type, meta) {\n var ngPipeDef = null;\n var ngFactoryDef = null;\n Object.defineProperty(type, NG_FACTORY_DEF, {\n get: function () {\n if (ngFactoryDef === null) {\n var metadata = getPipeMetadata(type, meta);\n var compiler = getCompilerFacade();\n ngFactoryDef = compiler.compileFactory(angularCoreEnv, \"ng:///\" + metadata.name + \"/\\u0275fac.js\", Object.assign(Object.assign({}, metadata), { injectFn: 'directiveInject', target: compiler.R3FactoryTarget.Pipe }));\n }\n return ngFactoryDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n Object.defineProperty(type, NG_PIPE_DEF, {\n get: function () {\n if (ngPipeDef === null) {\n var metadata = getPipeMetadata(type, meta);\n ngPipeDef = getCompilerFacade().compilePipe(angularCoreEnv, \"ng:///\" + metadata.name + \"/\\u0275pipe.js\", metadata);\n }\n return ngPipeDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n }\n function getPipeMetadata(type, meta) {\n return {\n type: type,\n typeArgumentCount: 0,\n name: type.name,\n deps: reflectDependencies(type),\n pipeName: meta.name,\n pure: meta.pure !== undefined ? meta.pure : true\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 var ɵ0$d = function (dir) {\n if (dir === void 0) { dir = {}; }\n return dir;\n }, ɵ1$2 = function (type, meta) { return SWITCH_COMPILE_DIRECTIVE(type, meta); };\n /**\n * Type of the Directive metadata.\n *\n * @publicApi\n */\n var Directive = makeDecorator('Directive', ɵ0$d, undefined, undefined, ɵ1$2);\n var ɵ2$1 = function (c) {\n if (c === void 0) { c = {}; }\n return (Object.assign({ changeDetection: exports.ChangeDetectionStrategy.Default }, c));\n }, ɵ3$1 = function (type, meta) { return SWITCH_COMPILE_COMPONENT(type, meta); };\n /**\n * Component decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\n var Component = makeDecorator('Component', ɵ2$1, Directive, undefined, ɵ3$1);\n var ɵ4 = function (p) { return (Object.assign({ pure: true }, p)); }, ɵ5 = function (type, meta) { return SWITCH_COMPILE_PIPE(type, meta); };\n /**\n * @Annotation\n * @publicApi\n */\n var Pipe = makeDecorator('Pipe', ɵ4, undefined, undefined, ɵ5);\n var ɵ6 = function (bindingPropertyName) { return ({ bindingPropertyName: bindingPropertyName }); };\n /**\n * @Annotation\n * @publicApi\n */\n var Input = makePropDecorator('Input', ɵ6);\n var ɵ7 = function (bindingPropertyName) { return ({ bindingPropertyName: bindingPropertyName }); };\n /**\n * @Annotation\n * @publicApi\n */\n var Output = makePropDecorator('Output', ɵ7);\n var ɵ8 = function (hostPropertyName) { return ({ hostPropertyName: hostPropertyName }); };\n /**\n * @Annotation\n * @publicApi\n */\n var HostBinding = makePropDecorator('HostBinding', ɵ8);\n var ɵ9 = function (eventName, args) { return ({ eventName: eventName, args: args }); };\n /**\n * Decorator that binds a DOM event to a host listener and supplies configuration metadata.\n * Angular invokes the supplied handler method when the host element emits the specified event,\n * and updates the bound element with the result.\n *\n * If the handler method returns false, applies `preventDefault` on the bound element.\n *\n * @usageNotes\n *\n * The following example declares a directive\n * that attaches a click listener to a button and counts clicks.\n *\n * ```ts\n * @Directive({selector: 'button[counting]'})\n * class CountClicks {\n * numberOfClicks = 0;\n *\n * @HostListener('click', ['$event.target'])\n * onClick(btn) {\n * console.log('button', btn, 'number of clicks:', this.numberOfClicks++);\n * }\n * }\n *\n * @Component({\n * selector: 'app',\n * template: '<button counting>Increment</button>',\n * })\n * class App {}\n *\n * ```\n *\n * The following example registers another DOM event handler that listens for key-press events.\n * ``` ts\n * import { HostListener, Component } from \"@angular/core\";\n *\n * @Component({\n * selector: 'app',\n * template: `<h1>Hello, you have pressed keys {{counter}} number of times!</h1> Press any key to\n * increment the counter.\n * <button (click)=\"resetCounter()\">Reset Counter</button>`\n * })\n * class AppComponent {\n * counter = 0;\n * @HostListener('window:keydown', ['$event'])\n * handleKeyDown(event: KeyboardEvent) {\n * this.counter++;\n * }\n * resetCounter() {\n * this.counter = 0;\n * }\n * }\n * ```\n *\n * @Annotation\n * @publicApi\n */\n var HostListener = makePropDecorator('HostListener', ɵ9);\n var SWITCH_COMPILE_COMPONENT__POST_R3__ = compileComponent;\n var SWITCH_COMPILE_DIRECTIVE__POST_R3__ = compileDirective;\n var SWITCH_COMPILE_PIPE__POST_R3__ = compilePipe;\n var SWITCH_COMPILE_COMPONENT__PRE_R3__ = noop;\n var SWITCH_COMPILE_DIRECTIVE__PRE_R3__ = noop;\n var SWITCH_COMPILE_PIPE__PRE_R3__ = noop;\n var SWITCH_COMPILE_COMPONENT = SWITCH_COMPILE_COMPONENT__PRE_R3__;\n var SWITCH_COMPILE_DIRECTIVE = SWITCH_COMPILE_DIRECTIVE__PRE_R3__;\n var SWITCH_COMPILE_PIPE = SWITCH_COMPILE_PIPE__PRE_R3__;\n\n var ɵ0$e = function (ngModule) { return ngModule; }, ɵ1$3 = \n /**\n * Decorator that marks the following class as an NgModule, and supplies\n * configuration metadata for it.\n *\n * * The `declarations` and `entryComponents` options configure the compiler\n * with information about what belongs to the NgModule.\n * * The `providers` options configures the NgModule's injector to provide\n * dependencies the NgModule members.\n * * The `imports` and `exports` options bring in members from other modules, and make\n * this module's members available to others.\n */\n function (type, meta) { return SWITCH_COMPILE_NGMODULE(type, meta); };\n /**\n * @Annotation\n * @publicApi\n */\n var NgModule = makeDecorator('NgModule', ɵ0$e, undefined, undefined, ɵ1$3);\n function preR3NgModuleCompile(moduleType, metadata) {\n var imports = (metadata && metadata.imports) || [];\n if (metadata && metadata.exports) {\n imports = __spread(imports, [metadata.exports]);\n }\n var moduleInjectorType = moduleType;\n moduleInjectorType.ɵfac = convertInjectableProviderToFactory(moduleType, { useClass: moduleType });\n moduleInjectorType.ɵinj =\n ɵɵdefineInjector({ providers: metadata && metadata.providers, imports: imports });\n }\n var SWITCH_COMPILE_NGMODULE__POST_R3__ = compileNgModule;\n var SWITCH_COMPILE_NGMODULE__PRE_R3__ = preR3NgModuleCompile;\n var SWITCH_COMPILE_NGMODULE = SWITCH_COMPILE_NGMODULE__PRE_R3__;\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 * A [DI token](guide/glossary#di-token \"DI token definition\") that you can use to provide\n * one or more initialization functions.\n *\n * The provided functions are injected at application startup and executed during\n * app initialization. If any of these functions returns a Promise, initialization\n * does not complete until the Promise is resolved.\n *\n * You can, for example, create a factory function that loads language data\n * or an external configuration, and provide that function to the `APP_INITIALIZER` token.\n * The function is executed during the application bootstrap process,\n * and the needed data is available on startup.\n *\n * @see `ApplicationInitStatus`\n *\n * @publicApi\n */\n var APP_INITIALIZER = new InjectionToken('Application Initializer');\n /**\n * A class that reflects the state of running {@link APP_INITIALIZER} functions.\n *\n * @publicApi\n */\n var ApplicationInitStatus = /** @class */ (function () {\n function ApplicationInitStatus(appInits) {\n var _this = this;\n this.appInits = appInits;\n this.resolve = noop;\n this.reject = noop;\n this.initialized = false;\n this.done = false;\n this.donePromise = new Promise(function (res, rej) {\n _this.resolve = res;\n _this.reject = rej;\n });\n }\n /** @internal */\n ApplicationInitStatus.prototype.runInitializers = function () {\n var _this = this;\n if (this.initialized) {\n return;\n }\n var asyncInitPromises = [];\n var complete = function () {\n _this.done = true;\n _this.resolve();\n };\n if (this.appInits) {\n for (var i = 0; i < this.appInits.length; i++) {\n var initResult = this.appInits[i]();\n if (isPromise(initResult)) {\n asyncInitPromises.push(initResult);\n }\n }\n }\n Promise.all(asyncInitPromises)\n .then(function () {\n complete();\n })\n .catch(function (e) {\n _this.reject(e);\n });\n if (asyncInitPromises.length === 0) {\n complete();\n }\n this.initialized = true;\n };\n return ApplicationInitStatus;\n }());\n ApplicationInitStatus.decorators = [\n { type: Injectable }\n ];\n ApplicationInitStatus.ctorParameters = function () { return [\n { type: Array, decorators: [{ type: Inject, args: [APP_INITIALIZER,] }, { type: Optional }] }\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 [DI token](guide/glossary#di-token \"DI token definition\") representing a unique string ID, used\n * primarily for prefixing application attributes and CSS styles when\n * {@link ViewEncapsulation#Emulated ViewEncapsulation.Emulated} is being used.\n *\n * BY default, the value is randomly generated and assigned to the application by Angular.\n * To provide a custom ID value, use a DI provider <!-- TODO: provider --> to configure\n * the root {@link Injector} that uses this token.\n *\n * @publicApi\n */\n var APP_ID = new InjectionToken('AppId');\n function _appIdRandomProviderFactory() {\n return \"\" + _randomChar() + _randomChar() + _randomChar();\n }\n /**\n * Providers that generate a random `APP_ID_TOKEN`.\n * @publicApi\n */\n var APP_ID_RANDOM_PROVIDER = {\n provide: APP_ID,\n useFactory: _appIdRandomProviderFactory,\n deps: [],\n };\n function _randomChar() {\n return String.fromCharCode(97 + Math.floor(Math.random() * 25));\n }\n /**\n * A function that is executed when a platform is initialized.\n * @publicApi\n */\n var PLATFORM_INITIALIZER = new InjectionToken('Platform Initializer');\n /**\n * A token that indicates an opaque platform ID.\n * @publicApi\n */\n var PLATFORM_ID = new InjectionToken('Platform ID');\n /**\n * A [DI token](guide/glossary#di-token \"DI token definition\") that provides a set of callbacks to\n * be called for every component that is bootstrapped.\n *\n * Each callback must take a `ComponentRef` instance and return nothing.\n *\n * `(componentRef: ComponentRef) => void`\n *\n * @publicApi\n */\n var APP_BOOTSTRAP_LISTENER = new InjectionToken('appBootstrapListener');\n /**\n * A [DI token](guide/glossary#di-token \"DI token definition\") that indicates the root directory of\n * the application\n * @publicApi\n */\n var PACKAGE_ROOT_URL = new InjectionToken('Application Packages Root URL');\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 var Console = /** @class */ (function () {\n function Console() {\n }\n Console.prototype.log = function (message) {\n // tslint:disable-next-line:no-console\n console.log(message);\n };\n // Note: for reporting errors use `DOM.logError()` as it is platform specific\n Console.prototype.warn = function (message) {\n // tslint:disable-next-line:no-console\n console.warn(message);\n };\n return Console;\n }());\n Console.decorators = [\n { type: Injectable }\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 * Provide this token to set the locale of your application.\n * It is used for i18n extraction, by i18n pipes (DatePipe, I18nPluralPipe, CurrencyPipe,\n * DecimalPipe and PercentPipe) and by ICU expressions.\n *\n * See the [i18n guide](guide/i18n#setting-up-locale) for more information.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * import { LOCALE_ID } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n * providers: [{provide: LOCALE_ID, useValue: 'en-US' }]\n * });\n * ```\n *\n * @publicApi\n */\n var LOCALE_ID$1 = new InjectionToken('LocaleId');\n /**\n * Provide this token to set the default currency code your application uses for\n * CurrencyPipe when there is no currency code passed into it. This is only used by\n * CurrencyPipe and has no relation to locale currency. Defaults to USD if not configured.\n *\n * See the [i18n guide](guide/i18n#setting-up-locale) for more information.\n *\n * <div class=\"alert is-helpful\">\n *\n * **Deprecation notice:**\n *\n * The default currency code is currently always `USD` but this is deprecated from v9.\n *\n * **In v10 the default currency code will be taken from the current locale.**\n *\n * If you need the previous behavior then set it by creating a `DEFAULT_CURRENCY_CODE` provider in\n * your application `NgModule`:\n *\n * ```ts\n * {provide: DEFAULT_CURRENCY_CODE, useValue: 'USD'}\n * ```\n *\n * </div>\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n * providers: [{provide: DEFAULT_CURRENCY_CODE, useValue: 'EUR' }]\n * });\n * ```\n *\n * @publicApi\n */\n var DEFAULT_CURRENCY_CODE = new InjectionToken('DefaultCurrencyCode');\n /**\n * Use this token at bootstrap to provide the content of your translation file (`xtb`,\n * `xlf` or `xlf2`) when you want to translate your application in another language.\n *\n * See the [i18n guide](guide/i18n#merge) for more information.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * import { TRANSLATIONS } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * // content of your translation file\n * const translations = '....';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n * providers: [{provide: TRANSLATIONS, useValue: translations }]\n * });\n * ```\n *\n * @publicApi\n */\n var TRANSLATIONS = new InjectionToken('Translations');\n /**\n * Provide this token at bootstrap to set the format of your {@link TRANSLATIONS}: `xtb`,\n * `xlf` or `xlf2`.\n *\n * See the [i18n guide](guide/i18n#merge) for more information.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * import { TRANSLATIONS_FORMAT } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n * providers: [{provide: TRANSLATIONS_FORMAT, useValue: 'xlf' }]\n * });\n * ```\n *\n * @publicApi\n */\n var TRANSLATIONS_FORMAT = new InjectionToken('TranslationsFormat');\n (function (MissingTranslationStrategy) {\n MissingTranslationStrategy[MissingTranslationStrategy[\"Error\"] = 0] = \"Error\";\n MissingTranslationStrategy[MissingTranslationStrategy[\"Warning\"] = 1] = \"Warning\";\n MissingTranslationStrategy[MissingTranslationStrategy[\"Ignore\"] = 2] = \"Ignore\";\n })(exports.MissingTranslationStrategy || (exports.MissingTranslationStrategy = {}));\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 var SWITCH_IVY_ENABLED__POST_R3__ = true;\n var SWITCH_IVY_ENABLED__PRE_R3__ = false;\n var ivyEnabled = SWITCH_IVY_ENABLED__PRE_R3__;\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 * Combination of NgModuleFactory and ComponentFactories.\n *\n * @publicApi\n */\n var ModuleWithComponentFactories = /** @class */ (function () {\n function ModuleWithComponentFactories(ngModuleFactory, componentFactories) {\n this.ngModuleFactory = ngModuleFactory;\n this.componentFactories = componentFactories;\n }\n return ModuleWithComponentFactories;\n }());\n function _throwError() {\n throw new Error(\"Runtime compiler is not loaded\");\n }\n var Compiler_compileModuleSync__PRE_R3__ = _throwError;\n var Compiler_compileModuleSync__POST_R3__ = function (moduleType) {\n return new NgModuleFactory$1(moduleType);\n };\n var Compiler_compileModuleSync = Compiler_compileModuleSync__PRE_R3__;\n var Compiler_compileModuleAsync__PRE_R3__ = _throwError;\n var Compiler_compileModuleAsync__POST_R3__ = function (moduleType) {\n return Promise.resolve(Compiler_compileModuleSync__POST_R3__(moduleType));\n };\n var Compiler_compileModuleAsync = Compiler_compileModuleAsync__PRE_R3__;\n var Compiler_compileModuleAndAllComponentsSync__PRE_R3__ = _throwError;\n var Compiler_compileModuleAndAllComponentsSync__POST_R3__ = function (moduleType) {\n var ngModuleFactory = Compiler_compileModuleSync__POST_R3__(moduleType);\n var moduleDef = getNgModuleDef(moduleType);\n var componentFactories = maybeUnwrapFn(moduleDef.declarations)\n .reduce(function (factories, declaration) {\n var componentDef = getComponentDef(declaration);\n componentDef && factories.push(new ComponentFactory$1(componentDef));\n return factories;\n }, []);\n return new ModuleWithComponentFactories(ngModuleFactory, componentFactories);\n };\n var Compiler_compileModuleAndAllComponentsSync = Compiler_compileModuleAndAllComponentsSync__PRE_R3__;\n var Compiler_compileModuleAndAllComponentsAsync__PRE_R3__ = _throwError;\n var Compiler_compileModuleAndAllComponentsAsync__POST_R3__ = function (moduleType) {\n return Promise.resolve(Compiler_compileModuleAndAllComponentsSync__POST_R3__(moduleType));\n };\n var Compiler_compileModuleAndAllComponentsAsync = Compiler_compileModuleAndAllComponentsAsync__PRE_R3__;\n /**\n * Low-level service for running the angular compiler during runtime\n * to create {@link ComponentFactory}s, which\n * can later be used to create and render a Component instance.\n *\n * Each `@NgModule` provides an own `Compiler` to its injector,\n * that will use the directives/pipes of the ng module for compilation\n * of components.\n *\n * @publicApi\n */\n var Compiler = /** @class */ (function () {\n function Compiler() {\n /**\n * Compiles the given NgModule and all of its components. All templates of the components listed\n * in `entryComponents` have to be inlined.\n */\n this.compileModuleSync = Compiler_compileModuleSync;\n /**\n * Compiles the given NgModule and all of its components\n */\n this.compileModuleAsync = Compiler_compileModuleAsync;\n /**\n * Same as {@link #compileModuleSync} but also creates ComponentFactories for all components.\n */\n this.compileModuleAndAllComponentsSync = Compiler_compileModuleAndAllComponentsSync;\n /**\n * Same as {@link #compileModuleAsync} but also creates ComponentFactories for all components.\n */\n this.compileModuleAndAllComponentsAsync = Compiler_compileModuleAndAllComponentsAsync;\n }\n /**\n * Clears all caches.\n */\n Compiler.prototype.clearCache = function () { };\n /**\n * Clears the cache for the given component/ngModule.\n */\n Compiler.prototype.clearCacheFor = function (type) { };\n /**\n * Returns the id for a given NgModule, if one is defined and known to the compiler.\n */\n Compiler.prototype.getModuleId = function (moduleType) {\n return undefined;\n };\n return Compiler;\n }());\n Compiler.decorators = [\n { type: Injectable }\n ];\n /**\n * Token to provide CompilerOptions in the platform injector.\n *\n * @publicApi\n */\n var COMPILER_OPTIONS = new InjectionToken('compilerOptions');\n /**\n * A factory for creating a Compiler\n *\n * @publicApi\n */\n var CompilerFactory = /** @class */ (function () {\n function CompilerFactory() {\n }\n return CompilerFactory;\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 var promise = (function () { return Promise.resolve(0); })();\n function scheduleMicroTask(fn) {\n if (typeof Zone === 'undefined') {\n // use promise to schedule microTask instead of use Zone\n promise.then(function () {\n fn && fn.apply(null, null);\n });\n }\n else {\n Zone.current.scheduleMicroTask('scheduleMicrotask', fn);\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 function getNativeRequestAnimationFrame() {\n var nativeRequestAnimationFrame = _global['requestAnimationFrame'];\n var nativeCancelAnimationFrame = _global['cancelAnimationFrame'];\n if (typeof Zone !== 'undefined' && nativeRequestAnimationFrame && nativeCancelAnimationFrame) {\n // use unpatched version of requestAnimationFrame(native delegate) if possible\n // to avoid another Change detection\n var unpatchedRequestAnimationFrame = nativeRequestAnimationFrame[Zone.__symbol__('OriginalDelegate')];\n if (unpatchedRequestAnimationFrame) {\n nativeRequestAnimationFrame = unpatchedRequestAnimationFrame;\n }\n var unpatchedCancelAnimationFrame = nativeCancelAnimationFrame[Zone.__symbol__('OriginalDelegate')];\n if (unpatchedCancelAnimationFrame) {\n nativeCancelAnimationFrame = unpatchedCancelAnimationFrame;\n }\n }\n return { nativeRequestAnimationFrame: nativeRequestAnimationFrame, nativeCancelAnimationFrame: nativeCancelAnimationFrame };\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 injectable service for executing work inside or outside of the Angular zone.\n *\n * The most common use of this service is to optimize performance when starting a work consisting of\n * one or more asynchronous tasks that don't require UI updates or error handling to be handled by\n * Angular. Such tasks can be kicked off via {@link #runOutsideAngular} and if needed, these tasks\n * can reenter the Angular zone via {@link #run}.\n *\n * <!-- TODO: add/fix links to:\n * - docs explaining zones and the use of zones in Angular and change-detection\n * - link to runOutsideAngular/run (throughout this file!)\n * -->\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * import {Component, NgZone} from '@angular/core';\n * import {NgIf} from '@angular/common';\n *\n * @Component({\n * selector: 'ng-zone-demo',\n * template: `\n * <h2>Demo: NgZone</h2>\n *\n * <p>Progress: {{progress}}%</p>\n * <p *ngIf=\"progress >= 100\">Done processing {{label}} of Angular zone!</p>\n *\n * <button (click)=\"processWithinAngularZone()\">Process within Angular zone</button>\n * <button (click)=\"processOutsideOfAngularZone()\">Process outside of Angular zone</button>\n * `,\n * })\n * export class NgZoneDemo {\n * progress: number = 0;\n * label: string;\n *\n * constructor(private _ngZone: NgZone) {}\n *\n * // Loop inside the Angular zone\n * // so the UI DOES refresh after each setTimeout cycle\n * processWithinAngularZone() {\n * this.label = 'inside';\n * this.progress = 0;\n * this._increaseProgress(() => console.log('Inside Done!'));\n * }\n *\n * // Loop outside of the Angular zone\n * // so the UI DOES NOT refresh after each setTimeout cycle\n * processOutsideOfAngularZone() {\n * this.label = 'outside';\n * this.progress = 0;\n * this._ngZone.runOutsideAngular(() => {\n * this._increaseProgress(() => {\n * // reenter the Angular zone and display done\n * this._ngZone.run(() => { console.log('Outside Done!'); });\n * });\n * });\n * }\n *\n * _increaseProgress(doneCallback: () => void) {\n * this.progress += 1;\n * console.log(`Current progress: ${this.progress}%`);\n *\n * if (this.progress < 100) {\n * window.setTimeout(() => this._increaseProgress(doneCallback), 10);\n * } else {\n * doneCallback();\n * }\n * }\n * }\n * ```\n *\n * @publicApi\n */\n var NgZone = /** @class */ (function () {\n function NgZone(_a) {\n var _b = _a.enableLongStackTrace, enableLongStackTrace = _b === void 0 ? false : _b, _c = _a.shouldCoalesceEventChangeDetection, shouldCoalesceEventChangeDetection = _c === void 0 ? false : _c, _d = _a.shouldCoalesceRunChangeDetection, shouldCoalesceRunChangeDetection = _d === void 0 ? false : _d;\n this.hasPendingMacrotasks = false;\n this.hasPendingMicrotasks = false;\n /**\n * Whether there are no outstanding microtasks or macrotasks.\n */\n this.isStable = true;\n /**\n * Notifies when code enters Angular Zone. This gets fired first on VM Turn.\n */\n this.onUnstable = new EventEmitter(false);\n /**\n * Notifies when there is no more microtasks enqueued in the current VM Turn.\n * This is a hint for Angular to do change detection, which may enqueue more microtasks.\n * For this reason this event can fire multiple times per VM Turn.\n */\n this.onMicrotaskEmpty = new EventEmitter(false);\n /**\n * Notifies when the last `onMicrotaskEmpty` has run and there are no more microtasks, which\n * implies we are about to relinquish VM turn.\n * This event gets called just once.\n */\n this.onStable = new EventEmitter(false);\n /**\n * Notifies that an error has been delivered.\n */\n this.onError = new EventEmitter(false);\n if (typeof Zone == 'undefined') {\n throw new Error(\"In this configuration Angular requires Zone.js\");\n }\n Zone.assertZonePatched();\n var self = this;\n self._nesting = 0;\n self._outer = self._inner = Zone.current;\n if (Zone['TaskTrackingZoneSpec']) {\n self._inner = self._inner.fork(new Zone['TaskTrackingZoneSpec']);\n }\n if (enableLongStackTrace && Zone['longStackTraceZoneSpec']) {\n self._inner = self._inner.fork(Zone['longStackTraceZoneSpec']);\n }\n // if shouldCoalesceRunChangeDetection is true, all tasks including event tasks will be\n // coalesced, so shouldCoalesceEventChangeDetection option is not necessary and can be skipped.\n self.shouldCoalesceEventChangeDetection =\n !shouldCoalesceRunChangeDetection && shouldCoalesceEventChangeDetection;\n self.shouldCoalesceRunChangeDetection = shouldCoalesceRunChangeDetection;\n self.lastRequestAnimationFrameId = -1;\n self.nativeRequestAnimationFrame = getNativeRequestAnimationFrame().nativeRequestAnimationFrame;\n forkInnerZoneWithAngularBehavior(self);\n }\n NgZone.isInAngularZone = function () {\n return Zone.current.get('isAngularZone') === true;\n };\n NgZone.assertInAngularZone = function () {\n if (!NgZone.isInAngularZone()) {\n throw new Error('Expected to be in Angular Zone, but it is not!');\n }\n };\n NgZone.assertNotInAngularZone = function () {\n if (NgZone.isInAngularZone()) {\n throw new Error('Expected to not be in Angular Zone, but it is!');\n }\n };\n /**\n * Executes the `fn` function synchronously within the Angular zone and returns value returned by\n * the function.\n *\n * Running functions via `run` allows you to reenter Angular zone from a task that was executed\n * outside of the Angular zone (typically started via {@link #runOutsideAngular}).\n *\n * Any future tasks or microtasks scheduled from within this function will continue executing from\n * within the Angular zone.\n *\n * If a synchronous error happens it will be rethrown and not reported via `onError`.\n */\n NgZone.prototype.run = function (fn, applyThis, applyArgs) {\n return this._inner.run(fn, applyThis, applyArgs);\n };\n /**\n * Executes the `fn` function synchronously within the Angular zone as a task and returns value\n * returned by the function.\n *\n * Running functions via `run` allows you to reenter Angular zone from a task that was executed\n * outside of the Angular zone (typically started via {@link #runOutsideAngular}).\n *\n * Any future tasks or microtasks scheduled from within this function will continue executing from\n * within the Angular zone.\n *\n * If a synchronous error happens it will be rethrown and not reported via `onError`.\n */\n NgZone.prototype.runTask = function (fn, applyThis, applyArgs, name) {\n var zone = this._inner;\n var task = zone.scheduleEventTask('NgZoneEvent: ' + name, fn, EMPTY_PAYLOAD, noop, noop);\n try {\n return zone.runTask(task, applyThis, applyArgs);\n }\n finally {\n zone.cancelTask(task);\n }\n };\n /**\n * Same as `run`, except that synchronous errors are caught and forwarded via `onError` and not\n * rethrown.\n */\n NgZone.prototype.runGuarded = function (fn, applyThis, applyArgs) {\n return this._inner.runGuarded(fn, applyThis, applyArgs);\n };\n /**\n * Executes the `fn` function synchronously in Angular's parent zone and returns value returned by\n * the function.\n *\n * Running functions via {@link #runOutsideAngular} allows you to escape Angular's zone and do\n * work that\n * doesn't trigger Angular change-detection or is subject to Angular's error handling.\n *\n * Any future tasks or microtasks scheduled from within this function will continue executing from\n * outside of the Angular zone.\n *\n * Use {@link #run} to reenter the Angular zone and do work that updates the application model.\n */\n NgZone.prototype.runOutsideAngular = function (fn) {\n return this._outer.run(fn);\n };\n return NgZone;\n }());\n var EMPTY_PAYLOAD = {};\n function checkStable(zone) {\n if (zone._nesting == 0 && !zone.hasPendingMicrotasks && !zone.isStable) {\n try {\n zone._nesting++;\n zone.onMicrotaskEmpty.emit(null);\n }\n finally {\n zone._nesting--;\n if (!zone.hasPendingMicrotasks) {\n try {\n zone.runOutsideAngular(function () { return zone.onStable.emit(null); });\n }\n finally {\n zone.isStable = true;\n }\n }\n }\n }\n }\n function delayChangeDetectionForEvents(zone) {\n if (zone.lastRequestAnimationFrameId !== -1) {\n return;\n }\n zone.lastRequestAnimationFrameId = zone.nativeRequestAnimationFrame.call(_global, function () {\n // This is a work around for https://github.com/angular/angular/issues/36839.\n // The core issue is that when event coalescing is enabled it is possible for microtasks\n // to get flushed too early (As is the case with `Promise.then`) between the\n // coalescing eventTasks.\n //\n // To workaround this we schedule a \"fake\" eventTask before we process the\n // coalescing eventTasks. The benefit of this is that the \"fake\" container eventTask\n // will prevent the microtasks queue from getting drained in between the coalescing\n // eventTask execution.\n if (!zone.fakeTopEventTask) {\n zone.fakeTopEventTask = Zone.root.scheduleEventTask('fakeTopEventTask', function () {\n zone.lastRequestAnimationFrameId = -1;\n updateMicroTaskStatus(zone);\n checkStable(zone);\n }, undefined, function () { }, function () { });\n }\n zone.fakeTopEventTask.invoke();\n });\n updateMicroTaskStatus(zone);\n }\n function forkInnerZoneWithAngularBehavior(zone) {\n var delayChangeDetectionForEventsDelegate = function () {\n delayChangeDetectionForEvents(zone);\n };\n zone._inner = zone._inner.fork({\n name: 'angular',\n properties: { 'isAngularZone': true },\n onInvokeTask: function (delegate, current, target, task, applyThis, applyArgs) {\n try {\n onEnter(zone);\n return delegate.invokeTask(target, task, applyThis, applyArgs);\n }\n finally {\n if ((zone.shouldCoalesceEventChangeDetection && task.type === 'eventTask') ||\n zone.shouldCoalesceRunChangeDetection) {\n delayChangeDetectionForEventsDelegate();\n }\n onLeave(zone);\n }\n },\n onInvoke: function (delegate, current, target, callback, applyThis, applyArgs, source) {\n try {\n onEnter(zone);\n return delegate.invoke(target, callback, applyThis, applyArgs, source);\n }\n finally {\n if (zone.shouldCoalesceRunChangeDetection) {\n delayChangeDetectionForEventsDelegate();\n }\n onLeave(zone);\n }\n },\n onHasTask: function (delegate, current, target, hasTaskState) {\n delegate.hasTask(target, hasTaskState);\n if (current === target) {\n // We are only interested in hasTask events which originate from our zone\n // (A child hasTask event is not interesting to us)\n if (hasTaskState.change == 'microTask') {\n zone._hasPendingMicrotasks = hasTaskState.microTask;\n updateMicroTaskStatus(zone);\n checkStable(zone);\n }\n else if (hasTaskState.change == 'macroTask') {\n zone.hasPendingMacrotasks = hasTaskState.macroTask;\n }\n }\n },\n onHandleError: function (delegate, current, target, error) {\n delegate.handleError(target, error);\n zone.runOutsideAngular(function () { return zone.onError.emit(error); });\n return false;\n }\n });\n }\n function updateMicroTaskStatus(zone) {\n if (zone._hasPendingMicrotasks ||\n ((zone.shouldCoalesceEventChangeDetection || zone.shouldCoalesceRunChangeDetection) &&\n zone.lastRequestAnimationFrameId !== -1)) {\n zone.hasPendingMicrotasks = true;\n }\n else {\n zone.hasPendingMicrotasks = false;\n }\n }\n function onEnter(zone) {\n zone._nesting++;\n if (zone.isStable) {\n zone.isStable = false;\n zone.onUnstable.emit(null);\n }\n }\n function onLeave(zone) {\n zone._nesting--;\n checkStable(zone);\n }\n /**\n * Provides a noop implementation of `NgZone` which does nothing. This zone requires explicit calls\n * to framework to perform rendering.\n */\n var NoopNgZone = /** @class */ (function () {\n function NoopNgZone() {\n this.hasPendingMicrotasks = false;\n this.hasPendingMacrotasks = false;\n this.isStable = true;\n this.onUnstable = new EventEmitter();\n this.onMicrotaskEmpty = new EventEmitter();\n this.onStable = new EventEmitter();\n this.onError = new EventEmitter();\n }\n NoopNgZone.prototype.run = function (fn, applyThis, applyArgs) {\n return fn.apply(applyThis, applyArgs);\n };\n NoopNgZone.prototype.runGuarded = function (fn, applyThis, applyArgs) {\n return fn.apply(applyThis, applyArgs);\n };\n NoopNgZone.prototype.runOutsideAngular = function (fn) {\n return fn();\n };\n NoopNgZone.prototype.runTask = function (fn, applyThis, applyArgs, name) {\n return fn.apply(applyThis, applyArgs);\n };\n return NoopNgZone;\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 Testability service provides testing hooks that can be accessed from\n * the browser and by services such as Protractor. Each bootstrapped Angular\n * application on the page will have an instance of Testability.\n * @publicApi\n */\n var Testability = /** @class */ (function () {\n function Testability(_ngZone) {\n var _this = this;\n this._ngZone = _ngZone;\n this._pendingCount = 0;\n this._isZoneStable = true;\n /**\n * Whether any work was done since the last 'whenStable' callback. This is\n * useful to detect if this could have potentially destabilized another\n * component while it is stabilizing.\n * @internal\n */\n this._didWork = false;\n this._callbacks = [];\n this.taskTrackingZone = null;\n this._watchAngularEvents();\n _ngZone.run(function () {\n _this.taskTrackingZone =\n typeof Zone == 'undefined' ? null : Zone.current.get('TaskTrackingZone');\n });\n }\n Testability.prototype._watchAngularEvents = function () {\n var _this = this;\n this._ngZone.onUnstable.subscribe({\n next: function () {\n _this._didWork = true;\n _this._isZoneStable = false;\n }\n });\n this._ngZone.runOutsideAngular(function () {\n _this._ngZone.onStable.subscribe({\n next: function () {\n NgZone.assertNotInAngularZone();\n scheduleMicroTask(function () {\n _this._isZoneStable = true;\n _this._runCallbacksIfReady();\n });\n }\n });\n });\n };\n /**\n * Increases the number of pending request\n * @deprecated pending requests are now tracked with zones.\n */\n Testability.prototype.increasePendingRequestCount = function () {\n this._pendingCount += 1;\n this._didWork = true;\n return this._pendingCount;\n };\n /**\n * Decreases the number of pending request\n * @deprecated pending requests are now tracked with zones\n */\n Testability.prototype.decreasePendingRequestCount = function () {\n this._pendingCount -= 1;\n if (this._pendingCount < 0) {\n throw new Error('pending async requests below zero');\n }\n this._runCallbacksIfReady();\n return this._pendingCount;\n };\n /**\n * Whether an associated application is stable\n */\n Testability.prototype.isStable = function () {\n return this._isZoneStable && this._pendingCount === 0 && !this._ngZone.hasPendingMacrotasks;\n };\n Testability.prototype._runCallbacksIfReady = function () {\n var _this = this;\n if (this.isStable()) {\n // Schedules the call backs in a new frame so that it is always async.\n scheduleMicroTask(function () {\n while (_this._callbacks.length !== 0) {\n var cb = _this._callbacks.pop();\n clearTimeout(cb.timeoutId);\n cb.doneCb(_this._didWork);\n }\n _this._didWork = false;\n });\n }\n else {\n // Still not stable, send updates.\n var pending_1 = this.getPendingTasks();\n this._callbacks = this._callbacks.filter(function (cb) {\n if (cb.updateCb && cb.updateCb(pending_1)) {\n clearTimeout(cb.timeoutId);\n return false;\n }\n return true;\n });\n this._didWork = true;\n }\n };\n Testability.prototype.getPendingTasks = function () {\n if (!this.taskTrackingZone) {\n return [];\n }\n // Copy the tasks data so that we don't leak tasks.\n return this.taskTrackingZone.macroTasks.map(function (t) {\n return {\n source: t.source,\n // From TaskTrackingZone:\n // https://github.com/angular/zone.js/blob/master/lib/zone-spec/task-tracking.ts#L40\n creationLocation: t.creationLocation,\n data: t.data\n };\n });\n };\n Testability.prototype.addCallback = function (cb, timeout, updateCb) {\n var _this = this;\n var timeoutId = -1;\n if (timeout && timeout > 0) {\n timeoutId = setTimeout(function () {\n _this._callbacks = _this._callbacks.filter(function (cb) { return cb.timeoutId !== timeoutId; });\n cb(_this._didWork, _this.getPendingTasks());\n }, timeout);\n }\n this._callbacks.push({ doneCb: cb, timeoutId: timeoutId, updateCb: updateCb });\n };\n /**\n * Wait for the application to be stable with a timeout. If the timeout is reached before that\n * happens, the callback receives a list of the macro tasks that were pending, otherwise null.\n *\n * @param doneCb The callback to invoke when Angular is stable or the timeout expires\n * whichever comes first.\n * @param timeout Optional. The maximum time to wait for Angular to become stable. If not\n * specified, whenStable() will wait forever.\n * @param updateCb Optional. If specified, this callback will be invoked whenever the set of\n * pending macrotasks changes. If this callback returns true doneCb will not be invoked\n * and no further updates will be issued.\n */\n Testability.prototype.whenStable = function (doneCb, timeout, updateCb) {\n if (updateCb && !this.taskTrackingZone) {\n throw new Error('Task tracking zone is required when passing an update callback to ' +\n 'whenStable(). Is \"zone.js/dist/task-tracking.js\" loaded?');\n }\n // These arguments are 'Function' above to keep the public API simple.\n this.addCallback(doneCb, timeout, updateCb);\n this._runCallbacksIfReady();\n };\n /**\n * Get the number of pending requests\n * @deprecated pending requests are now tracked with zones\n */\n Testability.prototype.getPendingRequestCount = function () {\n return this._pendingCount;\n };\n /**\n * Find providers by name\n * @param using The root element to search from\n * @param provider The name of binding variable\n * @param exactMatch Whether using exactMatch\n */\n Testability.prototype.findProviders = function (using, provider, exactMatch) {\n // TODO(juliemr): implement.\n return [];\n };\n return Testability;\n }());\n Testability.decorators = [\n { type: Injectable }\n ];\n Testability.ctorParameters = function () { return [\n { type: NgZone }\n ]; };\n /**\n * A global registry of {@link Testability} instances for specific elements.\n * @publicApi\n */\n var TestabilityRegistry = /** @class */ (function () {\n function TestabilityRegistry() {\n /** @internal */\n this._applications = new Map();\n _testabilityGetter.addToWindow(this);\n }\n /**\n * Registers an application with a testability hook so that it can be tracked\n * @param token token of application, root element\n * @param testability Testability hook\n */\n TestabilityRegistry.prototype.registerApplication = function (token, testability) {\n this._applications.set(token, testability);\n };\n /**\n * Unregisters an application.\n * @param token token of application, root element\n */\n TestabilityRegistry.prototype.unregisterApplication = function (token) {\n this._applications.delete(token);\n };\n /**\n * Unregisters all applications\n */\n TestabilityRegistry.prototype.unregisterAllApplications = function () {\n this._applications.clear();\n };\n /**\n * Get a testability hook associated with the application\n * @param elem root element\n */\n TestabilityRegistry.prototype.getTestability = function (elem) {\n return this._applications.get(elem) || null;\n };\n /**\n * Get all registered testabilities\n */\n TestabilityRegistry.prototype.getAllTestabilities = function () {\n return Array.from(this._applications.values());\n };\n /**\n * Get all registered applications(root elements)\n */\n TestabilityRegistry.prototype.getAllRootElements = function () {\n return Array.from(this._applications.keys());\n };\n /**\n * Find testability of a node in the Tree\n * @param elem node\n * @param findInAncestors whether finding testability in ancestors if testability was not found in\n * current node\n */\n TestabilityRegistry.prototype.findTestabilityInTree = function (elem, findInAncestors) {\n if (findInAncestors === void 0) { findInAncestors = true; }\n return _testabilityGetter.findTestabilityInTree(this, elem, findInAncestors);\n };\n return TestabilityRegistry;\n }());\n TestabilityRegistry.decorators = [\n { type: Injectable }\n ];\n TestabilityRegistry.ctorParameters = function () { return []; };\n var _NoopGetTestability = /** @class */ (function () {\n function _NoopGetTestability() {\n }\n _NoopGetTestability.prototype.addToWindow = function (registry) { };\n _NoopGetTestability.prototype.findTestabilityInTree = function (registry, elem, findInAncestors) {\n return null;\n };\n return _NoopGetTestability;\n }());\n /**\n * Set the {@link GetTestability} implementation used by the Angular testing framework.\n * @publicApi\n */\n function setTestabilityGetter(getter) {\n _testabilityGetter = getter;\n }\n var _testabilityGetter = new _NoopGetTestability();\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 used to control if the default rendering pipeline should be `ViewEngine` or `Ivy`.\n *\n * For more information on how to run and debug tests with either Ivy or View Engine (legacy),\n * please see [BAZEL.md](./docs/BAZEL.md).\n */\n var _devMode = true;\n var _runModeLocked = false;\n /**\n * Returns whether Angular is in development mode. After called once,\n * the value is locked and won't change any more.\n *\n * By default, this is true, unless a user calls `enableProdMode` before calling this.\n *\n * @publicApi\n */\n function isDevMode() {\n _runModeLocked = true;\n return _devMode;\n }\n /**\n * Disable Angular's development mode, which turns off assertions and other\n * checks within the framework.\n *\n * One important assertion this disables verifies that a change detection pass\n * does not result in additional changes to any bindings (also known as\n * unidirectional data flow).\n *\n * @publicApi\n */\n function enableProdMode() {\n if (_runModeLocked) {\n throw new Error('Cannot enable prod mode after platform setup.');\n }\n // The below check is there so when ngDevMode is set via terser\n // `global['ngDevMode'] = false;` is also dropped.\n if (typeof ngDevMode === undefined || !!ngDevMode) {\n _global['ngDevMode'] = false;\n }\n _devMode = false;\n }\n\n var _platform;\n var compileNgModuleFactory = compileNgModuleFactory__PRE_R3__;\n function compileNgModuleFactory__PRE_R3__(injector, options, moduleType) {\n var compilerFactory = injector.get(CompilerFactory);\n var compiler = compilerFactory.createCompiler([options]);\n return compiler.compileModuleAsync(moduleType);\n }\n function compileNgModuleFactory__POST_R3__(injector, options, moduleType) {\n ngDevMode && assertNgModuleType(moduleType);\n var moduleFactory = new NgModuleFactory$1(moduleType);\n // All of the logic below is irrelevant for AOT-compiled code.\n if (typeof ngJitMode !== 'undefined' && !ngJitMode) {\n return Promise.resolve(moduleFactory);\n }\n var compilerOptions = injector.get(COMPILER_OPTIONS, []).concat(options);\n // Configure the compiler to use the provided options. This call may fail when multiple modules\n // are bootstrapped with incompatible options, as a component can only be compiled according to\n // a single set of options.\n setJitOptions({\n defaultEncapsulation: _lastDefined(compilerOptions.map(function (opts) { return opts.defaultEncapsulation; })),\n preserveWhitespaces: _lastDefined(compilerOptions.map(function (opts) { return opts.preserveWhitespaces; })),\n });\n if (isComponentResourceResolutionQueueEmpty()) {\n return Promise.resolve(moduleFactory);\n }\n var compilerProviders = _mergeArrays(compilerOptions.map(function (o) { return o.providers; }));\n // In case there are no compiler providers, we just return the module factory as\n // there won't be any resource loader. This can happen with Ivy, because AOT compiled\n // modules can be still passed through \"bootstrapModule\". In that case we shouldn't\n // unnecessarily require the JIT compiler.\n if (compilerProviders.length === 0) {\n return Promise.resolve(moduleFactory);\n }\n var compiler = getCompilerFacade();\n var compilerInjector = Injector.create({ providers: compilerProviders });\n var resourceLoader = compilerInjector.get(compiler.ResourceLoader);\n // The resource loader can also return a string while the \"resolveComponentResources\"\n // always expects a promise. Therefore we need to wrap the returned value in a promise.\n return resolveComponentResources(function (url) { return Promise.resolve(resourceLoader.get(url)); })\n .then(function () { return moduleFactory; });\n }\n // the `window.ng` global utilities are only available in non-VE versions of\n // Angular. The function switch below will make sure that the code is not\n // included into Angular when PRE mode is active.\n function publishDefaultGlobalUtils__PRE_R3__() { }\n function publishDefaultGlobalUtils__POST_R3__() {\n ngDevMode && publishDefaultGlobalUtils();\n }\n var publishDefaultGlobalUtils$1 = publishDefaultGlobalUtils__PRE_R3__;\n var isBoundToModule = isBoundToModule__PRE_R3__;\n function isBoundToModule__PRE_R3__(cf) {\n return cf instanceof ComponentFactoryBoundToModule;\n }\n function isBoundToModule__POST_R3__(cf) {\n return cf.isBoundToModule;\n }\n var ALLOW_MULTIPLE_PLATFORMS = new InjectionToken('AllowMultipleToken');\n /**\n * A token for third-party components that can register themselves with NgProbe.\n *\n * @publicApi\n */\n var NgProbeToken = /** @class */ (function () {\n function NgProbeToken(name, token) {\n this.name = name;\n this.token = token;\n }\n return NgProbeToken;\n }());\n /**\n * Creates a platform.\n * Platforms must be created on launch using this function.\n *\n * @publicApi\n */\n function createPlatform(injector) {\n if (_platform && !_platform.destroyed &&\n !_platform.injector.get(ALLOW_MULTIPLE_PLATFORMS, false)) {\n throw new Error('There can be only one platform. Destroy the previous one to create a new one.');\n }\n publishDefaultGlobalUtils$1();\n _platform = injector.get(PlatformRef);\n var inits = injector.get(PLATFORM_INITIALIZER, null);\n if (inits)\n inits.forEach(function (init) { return init(); });\n return _platform;\n }\n /**\n * Creates a factory for a platform. Can be used to provide or override `Providers` specific to\n * your application's runtime needs, such as `PLATFORM_INITIALIZER` and `PLATFORM_ID`.\n * @param parentPlatformFactory Another platform factory to modify. Allows you to compose factories\n * to build up configurations that might be required by different libraries or parts of the\n * application.\n * @param name Identifies the new platform factory.\n * @param providers A set of dependency providers for platforms created with the new factory.\n *\n * @publicApi\n */\n function createPlatformFactory(parentPlatformFactory, name, providers) {\n if (providers === void 0) { providers = []; }\n var desc = \"Platform: \" + name;\n var marker = new InjectionToken(desc);\n return function (extraProviders) {\n if (extraProviders === void 0) { extraProviders = []; }\n var platform = getPlatform();\n if (!platform || platform.injector.get(ALLOW_MULTIPLE_PLATFORMS, false)) {\n if (parentPlatformFactory) {\n parentPlatformFactory(providers.concat(extraProviders).concat({ provide: marker, useValue: true }));\n }\n else {\n var injectedProviders = providers.concat(extraProviders).concat({ provide: marker, useValue: true }, {\n provide: INJECTOR_SCOPE,\n useValue: 'platform'\n });\n createPlatform(Injector.create({ providers: injectedProviders, name: desc }));\n }\n }\n return assertPlatform(marker);\n };\n }\n /**\n * Checks that there is currently a platform that contains the given token as a provider.\n *\n * @publicApi\n */\n function assertPlatform(requiredToken) {\n var platform = getPlatform();\n if (!platform) {\n throw new Error('No platform exists!');\n }\n if (!platform.injector.get(requiredToken, null)) {\n throw new Error('A platform with a different configuration has been created. Please destroy it first.');\n }\n return platform;\n }\n /**\n * Destroys the current Angular platform and all Angular applications on the page.\n * Destroys all modules and listeners registered with the platform.\n *\n * @publicApi\n */\n function destroyPlatform() {\n if (_platform && !_platform.destroyed) {\n _platform.destroy();\n }\n }\n /**\n * Returns the current platform.\n *\n * @publicApi\n */\n function getPlatform() {\n return _platform && !_platform.destroyed ? _platform : null;\n }\n /**\n * The Angular platform is the entry point for Angular on a web page.\n * Each page has exactly one platform. Services (such as reflection) which are common\n * to every Angular application running on the page are bound in its scope.\n * A page's platform is initialized implicitly when a platform is created using a platform\n * factory such as `PlatformBrowser`, or explicitly by calling the `createPlatform()` function.\n *\n * @publicApi\n */\n var PlatformRef = /** @class */ (function () {\n /** @internal */\n function PlatformRef(_injector) {\n this._injector = _injector;\n this._modules = [];\n this._destroyListeners = [];\n this._destroyed = false;\n }\n /**\n * Creates an instance of an `@NgModule` for the given platform for offline compilation.\n *\n * @usageNotes\n *\n * The following example creates the NgModule for a browser platform.\n *\n * ```typescript\n * my_module.ts:\n *\n * @NgModule({\n * imports: [BrowserModule]\n * })\n * class MyModule {}\n *\n * main.ts:\n * import {MyModuleNgFactory} from './my_module.ngfactory';\n * import {platformBrowser} from '@angular/platform-browser';\n *\n * let moduleRef = platformBrowser().bootstrapModuleFactory(MyModuleNgFactory);\n * ```\n */\n PlatformRef.prototype.bootstrapModuleFactory = function (moduleFactory, options) {\n var _this = this;\n // Note: We need to create the NgZone _before_ we instantiate the module,\n // as instantiating the module creates some providers eagerly.\n // So we create a mini parent injector that just contains the new NgZone and\n // pass that as parent to the NgModuleFactory.\n var ngZoneOption = options ? options.ngZone : undefined;\n var ngZoneEventCoalescing = (options && options.ngZoneEventCoalescing) || false;\n var ngZoneRunCoalescing = (options && options.ngZoneRunCoalescing) || false;\n var ngZone = getNgZone(ngZoneOption, { ngZoneEventCoalescing: ngZoneEventCoalescing, ngZoneRunCoalescing: ngZoneRunCoalescing });\n var providers = [{ provide: NgZone, useValue: ngZone }];\n // Note: Create ngZoneInjector within ngZone.run so that all of the instantiated services are\n // created within the Angular zone\n // Do not try to replace ngZone.run with ApplicationRef#run because ApplicationRef would then be\n // created outside of the Angular zone.\n return ngZone.run(function () {\n var ngZoneInjector = Injector.create({ providers: providers, parent: _this.injector, name: moduleFactory.moduleType.name });\n var moduleRef = moduleFactory.create(ngZoneInjector);\n var exceptionHandler = moduleRef.injector.get(ErrorHandler, null);\n if (!exceptionHandler) {\n throw new Error('No ErrorHandler. Is platform module (BrowserModule) included?');\n }\n ngZone.runOutsideAngular(function () {\n var subscription = ngZone.onError.subscribe({\n next: function (error) {\n exceptionHandler.handleError(error);\n }\n });\n moduleRef.onDestroy(function () {\n remove(_this._modules, moduleRef);\n subscription.unsubscribe();\n });\n });\n return _callAndReportToErrorHandler(exceptionHandler, ngZone, function () {\n var initStatus = moduleRef.injector.get(ApplicationInitStatus);\n initStatus.runInitializers();\n return initStatus.donePromise.then(function () {\n if (ivyEnabled) {\n // If the `LOCALE_ID` provider is defined at bootstrap then we set the value for ivy\n var localeId = moduleRef.injector.get(LOCALE_ID$1, DEFAULT_LOCALE_ID);\n setLocaleId(localeId || DEFAULT_LOCALE_ID);\n }\n _this._moduleDoBootstrap(moduleRef);\n return moduleRef;\n });\n });\n });\n };\n /**\n * Creates an instance of an `@NgModule` for a given platform using the given runtime compiler.\n *\n * @usageNotes\n * ### Simple Example\n *\n * ```typescript\n * @NgModule({\n * imports: [BrowserModule]\n * })\n * class MyModule {}\n *\n * let moduleRef = platformBrowser().bootstrapModule(MyModule);\n * ```\n *\n */\n PlatformRef.prototype.bootstrapModule = function (moduleType, compilerOptions) {\n var _this = this;\n if (compilerOptions === void 0) { compilerOptions = []; }\n var options = optionsReducer({}, compilerOptions);\n return compileNgModuleFactory(this.injector, options, moduleType)\n .then(function (moduleFactory) { return _this.bootstrapModuleFactory(moduleFactory, options); });\n };\n PlatformRef.prototype._moduleDoBootstrap = function (moduleRef) {\n var appRef = moduleRef.injector.get(ApplicationRef);\n if (moduleRef._bootstrapComponents.length > 0) {\n moduleRef._bootstrapComponents.forEach(function (f) { return appRef.bootstrap(f); });\n }\n else if (moduleRef.instance.ngDoBootstrap) {\n moduleRef.instance.ngDoBootstrap(appRef);\n }\n else {\n throw new Error(\"The module \" + stringify(moduleRef.instance\n .constructor) + \" was bootstrapped, but it does not declare \\\"@NgModule.bootstrap\\\" components nor a \\\"ngDoBootstrap\\\" method. \" +\n \"Please define one of these.\");\n }\n this._modules.push(moduleRef);\n };\n /**\n * Registers a listener to be called when the platform is destroyed.\n */\n PlatformRef.prototype.onDestroy = function (callback) {\n this._destroyListeners.push(callback);\n };\n Object.defineProperty(PlatformRef.prototype, \"injector\", {\n /**\n * Retrieves the platform {@link Injector}, which is the parent injector for\n * every Angular application on the page and provides singleton providers.\n */\n get: function () {\n return this._injector;\n },\n enumerable: false,\n configurable: true\n });\n /**\n * Destroys the current Angular platform and all Angular applications on the page.\n * Destroys all modules and listeners registered with the platform.\n */\n PlatformRef.prototype.destroy = function () {\n if (this._destroyed) {\n throw new Error('The platform has already been destroyed!');\n }\n this._modules.slice().forEach(function (module) { return module.destroy(); });\n this._destroyListeners.forEach(function (listener) { return listener(); });\n this._destroyed = true;\n };\n Object.defineProperty(PlatformRef.prototype, \"destroyed\", {\n get: function () {\n return this._destroyed;\n },\n enumerable: false,\n configurable: true\n });\n return PlatformRef;\n }());\n PlatformRef.decorators = [\n { type: Injectable }\n ];\n PlatformRef.ctorParameters = function () { return [\n { type: Injector }\n ]; };\n function getNgZone(ngZoneOption, extra) {\n var ngZone;\n if (ngZoneOption === 'noop') {\n ngZone = new NoopNgZone();\n }\n else {\n ngZone = (ngZoneOption === 'zone.js' ? undefined : ngZoneOption) || new NgZone({\n enableLongStackTrace: isDevMode(),\n shouldCoalesceEventChangeDetection: !!(extra === null || extra === void 0 ? void 0 : extra.ngZoneEventCoalescing),\n shouldCoalesceRunChangeDetection: !!(extra === null || extra === void 0 ? void 0 : extra.ngZoneRunCoalescing)\n });\n }\n return ngZone;\n }\n function _callAndReportToErrorHandler(errorHandler, ngZone, callback) {\n try {\n var result = callback();\n if (isPromise(result)) {\n return result.catch(function (e) {\n ngZone.runOutsideAngular(function () { return errorHandler.handleError(e); });\n // rethrow as the exception handler might not do it\n throw e;\n });\n }\n return result;\n }\n catch (e) {\n ngZone.runOutsideAngular(function () { return errorHandler.handleError(e); });\n // rethrow as the exception handler might not do it\n throw e;\n }\n }\n function optionsReducer(dst, objs) {\n if (Array.isArray(objs)) {\n dst = objs.reduce(optionsReducer, dst);\n }\n else {\n dst = Object.assign(Object.assign({}, dst), objs);\n }\n return dst;\n }\n /**\n * A reference to an Angular application running on a page.\n *\n * @usageNotes\n *\n * {@a is-stable-examples}\n * ### isStable examples and caveats\n *\n * Note two important points about `isStable`, demonstrated in the examples below:\n * - the application will never be stable if you start any kind\n * of recurrent asynchronous task when the application starts\n * (for example for a polling process, started with a `setInterval`, a `setTimeout`\n * or using RxJS operators like `interval`);\n * - the `isStable` Observable runs outside of the Angular zone.\n *\n * Let's imagine that you start a recurrent task\n * (here incrementing a counter, using RxJS `interval`),\n * and at the same time subscribe to `isStable`.\n *\n * ```\n * constructor(appRef: ApplicationRef) {\n * appRef.isStable.pipe(\n * filter(stable => stable)\n * ).subscribe(() => console.log('App is stable now');\n * interval(1000).subscribe(counter => console.log(counter));\n * }\n * ```\n * In this example, `isStable` will never emit `true`,\n * and the trace \"App is stable now\" will never get logged.\n *\n * If you want to execute something when the app is stable,\n * you have to wait for the application to be stable\n * before starting your polling process.\n *\n * ```\n * constructor(appRef: ApplicationRef) {\n * appRef.isStable.pipe(\n * first(stable => stable),\n * tap(stable => console.log('App is stable now')),\n * switchMap(() => interval(1000))\n * ).subscribe(counter => console.log(counter));\n * }\n * ```\n * In this example, the trace \"App is stable now\" will be logged\n * and then the counter starts incrementing every second.\n *\n * Note also that this Observable runs outside of the Angular zone,\n * which means that the code in the subscription\n * to this Observable will not trigger the change detection.\n *\n * Let's imagine that instead of logging the counter value,\n * you update a field of your component\n * and display it in its template.\n *\n * ```\n * constructor(appRef: ApplicationRef) {\n * appRef.isStable.pipe(\n * first(stable => stable),\n * switchMap(() => interval(1000))\n * ).subscribe(counter => this.value = counter);\n * }\n * ```\n * As the `isStable` Observable runs outside the zone,\n * the `value` field will be updated properly,\n * but the template will not be refreshed!\n *\n * You'll have to manually trigger the change detection to update the template.\n *\n * ```\n * constructor(appRef: ApplicationRef, cd: ChangeDetectorRef) {\n * appRef.isStable.pipe(\n * first(stable => stable),\n * switchMap(() => interval(1000))\n * ).subscribe(counter => {\n * this.value = counter;\n * cd.detectChanges();\n * });\n * }\n * ```\n *\n * Or make the subscription callback run inside the zone.\n *\n * ```\n * constructor(appRef: ApplicationRef, zone: NgZone) {\n * appRef.isStable.pipe(\n * first(stable => stable),\n * switchMap(() => interval(1000))\n * ).subscribe(counter => zone.run(() => this.value = counter));\n * }\n * ```\n *\n * @publicApi\n */\n var ApplicationRef = /** @class */ (function () {\n /** @internal */\n function ApplicationRef(_zone, _injector, _exceptionHandler, _componentFactoryResolver, _initStatus) {\n var _this = this;\n this._zone = _zone;\n this._injector = _injector;\n this._exceptionHandler = _exceptionHandler;\n this._componentFactoryResolver = _componentFactoryResolver;\n this._initStatus = _initStatus;\n /** @internal */\n this._bootstrapListeners = [];\n this._views = [];\n this._runningTick = false;\n this._stable = true;\n /**\n * Get a list of component types registered to this application.\n * This list is populated even before the component is created.\n */\n this.componentTypes = [];\n /**\n * Get a list of components registered to this application.\n */\n this.components = [];\n this._onMicrotaskEmptySubscription = this._zone.onMicrotaskEmpty.subscribe({\n next: function () {\n _this._zone.run(function () {\n _this.tick();\n });\n }\n });\n var isCurrentlyStable = new rxjs.Observable(function (observer) {\n _this._stable = _this._zone.isStable && !_this._zone.hasPendingMacrotasks &&\n !_this._zone.hasPendingMicrotasks;\n _this._zone.runOutsideAngular(function () {\n observer.next(_this._stable);\n observer.complete();\n });\n });\n var isStable = new rxjs.Observable(function (observer) {\n // Create the subscription to onStable outside the Angular Zone so that\n // the callback is run outside the Angular Zone.\n var stableSub;\n _this._zone.runOutsideAngular(function () {\n stableSub = _this._zone.onStable.subscribe(function () {\n NgZone.assertNotInAngularZone();\n // Check whether there are no pending macro/micro tasks in the next tick\n // to allow for NgZone to update the state.\n scheduleMicroTask(function () {\n if (!_this._stable && !_this._zone.hasPendingMacrotasks &&\n !_this._zone.hasPendingMicrotasks) {\n _this._stable = true;\n observer.next(true);\n }\n });\n });\n });\n var unstableSub = _this._zone.onUnstable.subscribe(function () {\n NgZone.assertInAngularZone();\n if (_this._stable) {\n _this._stable = false;\n _this._zone.runOutsideAngular(function () {\n observer.next(false);\n });\n }\n });\n return function () {\n stableSub.unsubscribe();\n unstableSub.unsubscribe();\n };\n });\n this.isStable =\n rxjs.merge(isCurrentlyStable, isStable.pipe(operators.share()));\n }\n /**\n * Bootstrap a new component at the root level of the application.\n *\n * @usageNotes\n * ### Bootstrap process\n *\n * When bootstrapping a new root component into an application, Angular mounts the\n * specified application component onto DOM elements identified by the componentType's\n * selector and kicks off automatic change detection to finish initializing the component.\n *\n * Optionally, a component can be mounted onto a DOM element that does not match the\n * componentType's selector.\n *\n * ### Example\n * {@example core/ts/platform/platform.ts region='longform'}\n */\n ApplicationRef.prototype.bootstrap = function (componentOrFactory, rootSelectorOrNode) {\n var _this = this;\n if (!this._initStatus.done) {\n throw new Error('Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.');\n }\n var componentFactory;\n if (componentOrFactory instanceof ComponentFactory) {\n componentFactory = componentOrFactory;\n }\n else {\n componentFactory =\n this._componentFactoryResolver.resolveComponentFactory(componentOrFactory);\n }\n this.componentTypes.push(componentFactory.componentType);\n // Create a factory associated with the current module if it's not bound to some other\n var ngModule = isBoundToModule(componentFactory) ? undefined : this._injector.get(NgModuleRef);\n var selectorOrNode = rootSelectorOrNode || componentFactory.selector;\n var compRef = componentFactory.create(Injector.NULL, [], selectorOrNode, ngModule);\n var nativeElement = compRef.location.nativeElement;\n var testability = compRef.injector.get(Testability, null);\n var testabilityRegistry = testability && compRef.injector.get(TestabilityRegistry);\n if (testability && testabilityRegistry) {\n testabilityRegistry.registerApplication(nativeElement, testability);\n }\n compRef.onDestroy(function () {\n _this.detachView(compRef.hostView);\n remove(_this.components, compRef);\n if (testabilityRegistry) {\n testabilityRegistry.unregisterApplication(nativeElement);\n }\n });\n this._loadComponent(compRef);\n // Note that we have still left the `isDevMode()` condition in order to avoid\n // creating a breaking change for projects that still use the View Engine.\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && isDevMode()) {\n var _console = this._injector.get(Console);\n _console.log(\"Angular is running in development mode. Call enableProdMode() to enable production mode.\");\n }\n return compRef;\n };\n /**\n * Invoke this method to explicitly process change detection and its side-effects.\n *\n * In development mode, `tick()` also performs a second change detection cycle to ensure that no\n * further changes are detected. If additional changes are picked up during this second cycle,\n * bindings in the app have side-effects that cannot be resolved in a single change detection\n * pass.\n * In this case, Angular throws an error, since an Angular application can only have one change\n * detection pass during which all change detection must complete.\n */\n ApplicationRef.prototype.tick = function () {\n var e_1, _a, e_2, _b;\n var _this = this;\n if (this._runningTick) {\n throw new Error('ApplicationRef.tick is called recursively');\n }\n try {\n this._runningTick = true;\n try {\n for (var _c = __values(this._views), _d = _c.next(); !_d.done; _d = _c.next()) {\n var view = _d.value;\n view.detectChanges();\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_d && !_d.done && (_a = _c.return)) _a.call(_c);\n }\n finally { if (e_1) throw e_1.error; }\n }\n // Note that we have still left the `isDevMode()` condition in order to avoid\n // creating a breaking change for projects that still use the View Engine.\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && isDevMode()) {\n try {\n for (var _e = __values(this._views), _f = _e.next(); !_f.done; _f = _e.next()) {\n var view = _f.value;\n view.checkNoChanges();\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_f && !_f.done && (_b = _e.return)) _b.call(_e);\n }\n finally { if (e_2) throw e_2.error; }\n }\n }\n }\n catch (e) {\n // Attention: Don't rethrow as it could cancel subscriptions to Observables!\n this._zone.runOutsideAngular(function () { return _this._exceptionHandler.handleError(e); });\n }\n finally {\n this._runningTick = false;\n }\n };\n /**\n * Attaches a view so that it will be dirty checked.\n * The view will be automatically detached when it is destroyed.\n * This will throw if the view is already attached to a ViewContainer.\n */\n ApplicationRef.prototype.attachView = function (viewRef) {\n var view = viewRef;\n this._views.push(view);\n view.attachToAppRef(this);\n };\n /**\n * Detaches a view from dirty checking again.\n */\n ApplicationRef.prototype.detachView = function (viewRef) {\n var view = viewRef;\n remove(this._views, view);\n view.detachFromAppRef();\n };\n ApplicationRef.prototype._loadComponent = function (componentRef) {\n this.attachView(componentRef.hostView);\n this.tick();\n this.components.push(componentRef);\n // Get the listeners lazily to prevent DI cycles.\n var listeners = this._injector.get(APP_BOOTSTRAP_LISTENER, []).concat(this._bootstrapListeners);\n listeners.forEach(function (listener) { return listener(componentRef); });\n };\n /** @internal */\n ApplicationRef.prototype.ngOnDestroy = function () {\n this._views.slice().forEach(function (view) { return view.destroy(); });\n this._onMicrotaskEmptySubscription.unsubscribe();\n };\n Object.defineProperty(ApplicationRef.prototype, \"viewCount\", {\n /**\n * Returns the number of attached views.\n */\n get: function () {\n return this._views.length;\n },\n enumerable: false,\n configurable: true\n });\n return ApplicationRef;\n }());\n ApplicationRef.decorators = [\n { type: Injectable }\n ];\n ApplicationRef.ctorParameters = function () { return [\n { type: NgZone },\n { type: Injector },\n { type: ErrorHandler },\n { type: ComponentFactoryResolver },\n { type: ApplicationInitStatus }\n ]; };\n function remove(list, el) {\n var index = list.indexOf(el);\n if (index > -1) {\n list.splice(index, 1);\n }\n }\n function _lastDefined(args) {\n for (var i = args.length - 1; i >= 0; i--) {\n if (args[i] !== undefined) {\n return args[i];\n }\n }\n return undefined;\n }\n function _mergeArrays(parts) {\n var result = [];\n parts.forEach(function (part) { return part && result.push.apply(result, __spread(part)); });\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 */\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 * Used to load ng module factories.\n *\n * @publicApi\n * @deprecated the `string` form of `loadChildren` is deprecated, and `NgModuleFactoryLoader` is\n * part of its implementation. See `LoadChildren` for more details.\n */\n var NgModuleFactoryLoader = /** @class */ (function () {\n function NgModuleFactoryLoader() {\n }\n return NgModuleFactoryLoader;\n }());\n function getModuleFactory__PRE_R3__(id) {\n var factory = getRegisteredNgModuleType(id);\n if (!factory)\n throw noModuleError(id);\n return factory;\n }\n function getModuleFactory__POST_R3__(id) {\n var type = getRegisteredNgModuleType(id);\n if (!type)\n throw noModuleError(id);\n return new NgModuleFactory$1(type);\n }\n /**\n * Returns the NgModuleFactory with the given id, if it exists and has been loaded.\n * Factories for modules that do not specify an `id` cannot be retrieved. Throws if the module\n * cannot be found.\n * @publicApi\n */\n var getModuleFactory = getModuleFactory__PRE_R3__;\n function noModuleError(id) {\n return new Error(\"No module with ID \" + id + \" loaded\");\n }\n\n var _SEPARATOR = '#';\n var FACTORY_CLASS_SUFFIX = 'NgFactory';\n /**\n * Configuration for SystemJsNgModuleLoader.\n * token.\n *\n * @publicApi\n * @deprecated the `string` form of `loadChildren` is deprecated, and `SystemJsNgModuleLoaderConfig`\n * is part of its implementation. See `LoadChildren` for more details.\n */\n var SystemJsNgModuleLoaderConfig = /** @class */ (function () {\n function SystemJsNgModuleLoaderConfig() {\n }\n return SystemJsNgModuleLoaderConfig;\n }());\n var DEFAULT_CONFIG = {\n factoryPathPrefix: '',\n factoryPathSuffix: '.ngfactory',\n };\n /**\n * NgModuleFactoryLoader that uses SystemJS to load NgModuleFactory\n * @publicApi\n * @deprecated the `string` form of `loadChildren` is deprecated, and `SystemJsNgModuleLoader` is\n * part of its implementation. See `LoadChildren` for more details.\n */\n var SystemJsNgModuleLoader = /** @class */ (function () {\n function SystemJsNgModuleLoader(_compiler, config) {\n this._compiler = _compiler;\n this._config = config || DEFAULT_CONFIG;\n }\n SystemJsNgModuleLoader.prototype.load = function (path) {\n var legacyOfflineMode = !ivyEnabled && this._compiler instanceof Compiler;\n return legacyOfflineMode ? this.loadFactory(path) : this.loadAndCompile(path);\n };\n SystemJsNgModuleLoader.prototype.loadAndCompile = function (path) {\n var _this = this;\n var _a = __read(path.split(_SEPARATOR), 2), module = _a[0], exportName = _a[1];\n if (exportName === undefined) {\n exportName = 'default';\n }\n return System.import(module)\n .then(function (module) { return module[exportName]; })\n .then(function (type) { return checkNotEmpty(type, module, exportName); })\n .then(function (type) { return _this._compiler.compileModuleAsync(type); });\n };\n SystemJsNgModuleLoader.prototype.loadFactory = function (path) {\n var _a = __read(path.split(_SEPARATOR), 2), module = _a[0], exportName = _a[1];\n var factoryClassSuffix = FACTORY_CLASS_SUFFIX;\n if (exportName === undefined) {\n exportName = 'default';\n factoryClassSuffix = '';\n }\n return System.import(this._config.factoryPathPrefix + module + this._config.factoryPathSuffix)\n .then(function (module) { return module[exportName + factoryClassSuffix]; })\n .then(function (factory) { return checkNotEmpty(factory, module, exportName); });\n };\n return SystemJsNgModuleLoader;\n }());\n SystemJsNgModuleLoader.decorators = [\n { type: Injectable }\n ];\n SystemJsNgModuleLoader.ctorParameters = function () { return [\n { type: Compiler },\n { type: SystemJsNgModuleLoaderConfig, decorators: [{ type: Optional }] }\n ]; };\n function checkNotEmpty(value, modulePath, exportName) {\n if (!value) {\n throw new Error(\"Cannot find '\" + exportName + \"' in '\" + modulePath + \"'\");\n }\n return value;\n }\n\n /**\n * Represents an Angular [view](guide/glossary#view \"Definition\").\n *\n * @see {@link ChangeDetectorRef#usage-notes Change detection usage}\n *\n * @publicApi\n */\n var ViewRef$1 = /** @class */ (function (_super) {\n __extends(ViewRef, _super);\n function ViewRef() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ViewRef;\n }(ChangeDetectorRef));\n /**\n * Represents an Angular [view](guide/glossary#view) in a view container.\n * An [embedded view](guide/glossary#view-tree) can be referenced from a component\n * other than the hosting component whose template defines it, or it can be defined\n * independently by a `TemplateRef`.\n *\n * Properties of elements in a view can change, but the structure (number and order) of elements in\n * a view cannot. Change the structure of elements by inserting, moving, or\n * removing nested views in a view container.\n *\n * @see `ViewContainerRef`\n *\n * @usageNotes\n *\n * The following template breaks down into two separate `TemplateRef` instances,\n * an outer one and an inner one.\n *\n * ```\n * Count: {{items.length}}\n * <ul>\n * <li *ngFor=\"let item of items\">{{item}}</li>\n * </ul>\n * ```\n *\n * This is the outer `TemplateRef`:\n *\n * ```\n * Count: {{items.length}}\n * <ul>\n * <ng-template ngFor let-item [ngForOf]=\"items\"></ng-template>\n * </ul>\n * ```\n *\n * This is the inner `TemplateRef`:\n *\n * ```\n * <li>{{item}}</li>\n * ```\n *\n * The outer and inner `TemplateRef` instances are assembled into views as follows:\n *\n * ```\n * <!-- ViewRef: outer-0 -->\n * Count: 2\n * <ul>\n * <ng-template view-container-ref></ng-template>\n * <!-- ViewRef: inner-1 --><li>first</li><!-- /ViewRef: inner-1 -->\n * <!-- ViewRef: inner-2 --><li>second</li><!-- /ViewRef: inner-2 -->\n * </ul>\n * <!-- /ViewRef: outer-0 -->\n * ```\n * @publicApi\n */\n var EmbeddedViewRef = /** @class */ (function (_super) {\n __extends(EmbeddedViewRef, _super);\n function EmbeddedViewRef() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return EmbeddedViewRef;\n }(ViewRef$1));\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 * @publicApi\n */\n var DebugEventListener = /** @class */ (function () {\n function DebugEventListener(name, callback) {\n this.name = name;\n this.callback = callback;\n }\n return DebugEventListener;\n }());\n var DebugNode__PRE_R3__ = /** @class */ (function () {\n function DebugNode__PRE_R3__(nativeNode, parent, _debugContext) {\n this.listeners = [];\n this.parent = null;\n this._debugContext = _debugContext;\n this.nativeNode = nativeNode;\n if (parent && parent instanceof DebugElement__PRE_R3__) {\n parent.addChild(this);\n }\n }\n Object.defineProperty(DebugNode__PRE_R3__.prototype, \"injector\", {\n get: function () {\n return this._debugContext.injector;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(DebugNode__PRE_R3__.prototype, \"componentInstance\", {\n get: function () {\n return this._debugContext.component;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(DebugNode__PRE_R3__.prototype, \"context\", {\n get: function () {\n return this._debugContext.context;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(DebugNode__PRE_R3__.prototype, \"references\", {\n get: function () {\n return this._debugContext.references;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(DebugNode__PRE_R3__.prototype, \"providerTokens\", {\n get: function () {\n return this._debugContext.providerTokens;\n },\n enumerable: false,\n configurable: true\n });\n return DebugNode__PRE_R3__;\n }());\n var DebugElement__PRE_R3__ = /** @class */ (function (_super) {\n __extends(DebugElement__PRE_R3__, _super);\n function DebugElement__PRE_R3__(nativeNode, parent, _debugContext) {\n var _this = _super.call(this, nativeNode, parent, _debugContext) || this;\n _this.properties = {};\n _this.attributes = {};\n _this.classes = {};\n _this.styles = {};\n _this.childNodes = [];\n _this.nativeElement = nativeNode;\n return _this;\n }\n DebugElement__PRE_R3__.prototype.addChild = function (child) {\n if (child) {\n this.childNodes.push(child);\n child.parent = this;\n }\n };\n DebugElement__PRE_R3__.prototype.removeChild = function (child) {\n var childIndex = this.childNodes.indexOf(child);\n if (childIndex !== -1) {\n child.parent = null;\n this.childNodes.splice(childIndex, 1);\n }\n };\n DebugElement__PRE_R3__.prototype.insertChildrenAfter = function (child, newChildren) {\n var _a;\n var _this = this;\n var siblingIndex = this.childNodes.indexOf(child);\n if (siblingIndex !== -1) {\n (_a = this.childNodes).splice.apply(_a, __spread([siblingIndex + 1, 0], newChildren));\n newChildren.forEach(function (c) {\n if (c.parent) {\n c.parent.removeChild(c);\n }\n child.parent = _this;\n });\n }\n };\n DebugElement__PRE_R3__.prototype.insertBefore = function (refChild, newChild) {\n var refIndex = this.childNodes.indexOf(refChild);\n if (refIndex === -1) {\n this.addChild(newChild);\n }\n else {\n if (newChild.parent) {\n newChild.parent.removeChild(newChild);\n }\n newChild.parent = this;\n this.childNodes.splice(refIndex, 0, newChild);\n }\n };\n DebugElement__PRE_R3__.prototype.query = function (predicate) {\n var results = this.queryAll(predicate);\n return results[0] || null;\n };\n DebugElement__PRE_R3__.prototype.queryAll = function (predicate) {\n var matches = [];\n _queryElementChildren(this, predicate, matches);\n return matches;\n };\n DebugElement__PRE_R3__.prototype.queryAllNodes = function (predicate) {\n var matches = [];\n _queryNodeChildren(this, predicate, matches);\n return matches;\n };\n Object.defineProperty(DebugElement__PRE_R3__.prototype, \"children\", {\n get: function () {\n return this.childNodes //\n .filter(function (node) { return node instanceof DebugElement__PRE_R3__; });\n },\n enumerable: false,\n configurable: true\n });\n DebugElement__PRE_R3__.prototype.triggerEventHandler = function (eventName, eventObj) {\n this.listeners.forEach(function (listener) {\n if (listener.name == eventName) {\n listener.callback(eventObj);\n }\n });\n };\n return DebugElement__PRE_R3__;\n }(DebugNode__PRE_R3__));\n /**\n * @publicApi\n */\n function asNativeElements(debugEls) {\n return debugEls.map(function (el) { return el.nativeElement; });\n }\n function _queryElementChildren(element, predicate, matches) {\n element.childNodes.forEach(function (node) {\n if (node instanceof DebugElement__PRE_R3__) {\n if (predicate(node)) {\n matches.push(node);\n }\n _queryElementChildren(node, predicate, matches);\n }\n });\n }\n function _queryNodeChildren(parentNode, predicate, matches) {\n if (parentNode instanceof DebugElement__PRE_R3__) {\n parentNode.childNodes.forEach(function (node) {\n if (predicate(node)) {\n matches.push(node);\n }\n if (node instanceof DebugElement__PRE_R3__) {\n _queryNodeChildren(node, predicate, matches);\n }\n });\n }\n }\n var DebugNode__POST_R3__ = /** @class */ (function () {\n function DebugNode__POST_R3__(nativeNode) {\n this.nativeNode = nativeNode;\n }\n Object.defineProperty(DebugNode__POST_R3__.prototype, \"parent\", {\n get: function () {\n var parent = this.nativeNode.parentNode;\n return parent ? new DebugElement__POST_R3__(parent) : null;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(DebugNode__POST_R3__.prototype, \"injector\", {\n get: function () {\n return getInjector(this.nativeNode);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(DebugNode__POST_R3__.prototype, \"componentInstance\", {\n get: function () {\n var nativeElement = this.nativeNode;\n return nativeElement &&\n (getComponent(nativeElement) || getOwningComponent(nativeElement));\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(DebugNode__POST_R3__.prototype, \"context\", {\n get: function () {\n return getComponent(this.nativeNode) || getContext(this.nativeNode);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(DebugNode__POST_R3__.prototype, \"listeners\", {\n get: function () {\n return getListeners(this.nativeNode).filter(function (listener) { return listener.type === 'dom'; });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(DebugNode__POST_R3__.prototype, \"references\", {\n get: function () {\n return getLocalRefs(this.nativeNode);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(DebugNode__POST_R3__.prototype, \"providerTokens\", {\n get: function () {\n return getInjectionTokens(this.nativeNode);\n },\n enumerable: false,\n configurable: true\n });\n return DebugNode__POST_R3__;\n }());\n var DebugElement__POST_R3__ = /** @class */ (function (_super) {\n __extends(DebugElement__POST_R3__, _super);\n function DebugElement__POST_R3__(nativeNode) {\n var _this = this;\n ngDevMode && assertDomNode(nativeNode);\n _this = _super.call(this, nativeNode) || this;\n return _this;\n }\n Object.defineProperty(DebugElement__POST_R3__.prototype, \"nativeElement\", {\n get: function () {\n return this.nativeNode.nodeType == Node.ELEMENT_NODE ? this.nativeNode : null;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(DebugElement__POST_R3__.prototype, \"name\", {\n get: function () {\n try {\n var context = loadLContext(this.nativeNode);\n var lView = context.lView;\n var tData = lView[TVIEW].data;\n var tNode = tData[context.nodeIndex];\n return tNode.value;\n }\n catch (e) {\n return this.nativeNode.nodeName;\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(DebugElement__POST_R3__.prototype, \"properties\", {\n /**\n * Gets a map of property names to property values for an element.\n *\n * This map includes:\n * - Regular property bindings (e.g. `[id]=\"id\"`)\n * - Host property bindings (e.g. `host: { '[id]': \"id\" }`)\n * - Interpolated property bindings (e.g. `id=\"{{ value }}\")\n *\n * It does not include:\n * - input property bindings (e.g. `[myCustomInput]=\"value\"`)\n * - attribute bindings (e.g. `[attr.role]=\"menu\"`)\n */\n get: function () {\n var context = loadLContext(this.nativeNode, false);\n if (context == null) {\n return {};\n }\n var lView = context.lView;\n var tData = lView[TVIEW].data;\n var tNode = tData[context.nodeIndex];\n var properties = {};\n // Collect properties from the DOM.\n copyDomProperties(this.nativeElement, properties);\n // Collect properties from the bindings. This is needed for animation renderer which has\n // synthetic properties which don't get reflected into the DOM.\n collectPropertyBindings(properties, tNode, lView, tData);\n return properties;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(DebugElement__POST_R3__.prototype, \"attributes\", {\n get: function () {\n var attributes = {};\n var element = this.nativeElement;\n if (!element) {\n return attributes;\n }\n var context = loadLContext(element, false);\n if (context == null) {\n return {};\n }\n var lView = context.lView;\n var tNodeAttrs = lView[TVIEW].data[context.nodeIndex].attrs;\n var lowercaseTNodeAttrs = [];\n // For debug nodes we take the element's attribute directly from the DOM since it allows us\n // to account for ones that weren't set via bindings (e.g. ViewEngine keeps track of the ones\n // that are set through `Renderer2`). The problem is that the browser will lowercase all names,\n // however since we have the attributes already on the TNode, we can preserve the case by going\n // through them once, adding them to the `attributes` map and putting their lower-cased name\n // into an array. Afterwards when we're going through the native DOM attributes, we can check\n // whether we haven't run into an attribute already through the TNode.\n if (tNodeAttrs) {\n var i = 0;\n while (i < tNodeAttrs.length) {\n var attrName = tNodeAttrs[i];\n // Stop as soon as we hit a marker. We only care about the regular attributes. Everything\n // else will be handled below when we read the final attributes off the DOM.\n if (typeof attrName !== 'string')\n break;\n var attrValue = tNodeAttrs[i + 1];\n attributes[attrName] = attrValue;\n lowercaseTNodeAttrs.push(attrName.toLowerCase());\n i += 2;\n }\n }\n var eAttrs = element.attributes;\n for (var i = 0; i < eAttrs.length; i++) {\n var attr = eAttrs[i];\n var lowercaseName = attr.name.toLowerCase();\n // Make sure that we don't assign the same attribute both in its\n // case-sensitive form and the lower-cased one from the browser.\n if (lowercaseTNodeAttrs.indexOf(lowercaseName) === -1) {\n // Save the lowercase name to align the behavior between browsers.\n // IE preserves the case, while all other browser convert it to lower case.\n attributes[lowercaseName] = attr.value;\n }\n }\n return attributes;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(DebugElement__POST_R3__.prototype, \"styles\", {\n get: function () {\n if (this.nativeElement && this.nativeElement.style) {\n return this.nativeElement.style;\n }\n return {};\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(DebugElement__POST_R3__.prototype, \"classes\", {\n get: function () {\n var result = {};\n var element = this.nativeElement;\n // SVG elements return an `SVGAnimatedString` instead of a plain string for the `className`.\n var className = element.className;\n var classes = className && typeof className !== 'string' ? className.baseVal.split(' ') :\n className.split(' ');\n classes.forEach(function (value) { return result[value] = true; });\n return result;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(DebugElement__POST_R3__.prototype, \"childNodes\", {\n get: function () {\n var childNodes = this.nativeNode.childNodes;\n var children = [];\n for (var i = 0; i < childNodes.length; i++) {\n var element = childNodes[i];\n children.push(getDebugNode__POST_R3__(element));\n }\n return children;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(DebugElement__POST_R3__.prototype, \"children\", {\n get: function () {\n var nativeElement = this.nativeElement;\n if (!nativeElement)\n return [];\n var childNodes = nativeElement.children;\n var children = [];\n for (var i = 0; i < childNodes.length; i++) {\n var element = childNodes[i];\n children.push(getDebugNode__POST_R3__(element));\n }\n return children;\n },\n enumerable: false,\n configurable: true\n });\n DebugElement__POST_R3__.prototype.query = function (predicate) {\n var results = this.queryAll(predicate);\n return results[0] || null;\n };\n DebugElement__POST_R3__.prototype.queryAll = function (predicate) {\n var matches = [];\n _queryAllR3(this, predicate, matches, true);\n return matches;\n };\n DebugElement__POST_R3__.prototype.queryAllNodes = function (predicate) {\n var matches = [];\n _queryAllR3(this, predicate, matches, false);\n return matches;\n };\n DebugElement__POST_R3__.prototype.triggerEventHandler = function (eventName, eventObj) {\n var node = this.nativeNode;\n var invokedListeners = [];\n this.listeners.forEach(function (listener) {\n if (listener.name === eventName) {\n var callback = listener.callback;\n callback.call(node, eventObj);\n invokedListeners.push(callback);\n }\n });\n // We need to check whether `eventListeners` exists, because it's something\n // that Zone.js only adds to `EventTarget` in browser environments.\n if (typeof node.eventListeners === 'function') {\n // Note that in Ivy we wrap event listeners with a call to `event.preventDefault` in some\n // cases. We use '__ngUnwrap__' as a special token that gives us access to the actual event\n // listener.\n node.eventListeners(eventName).forEach(function (listener) {\n // In order to ensure that we can detect the special __ngUnwrap__ token described above, we\n // use `toString` on the listener and see if it contains the token. We use this approach to\n // ensure that it still worked with compiled code since it cannot remove or rename string\n // literals. We also considered using a special function name (i.e. if(listener.name ===\n // special)) but that was more cumbersome and we were also concerned the compiled code could\n // strip the name, turning the condition in to (\"\" === \"\") and always returning true.\n if (listener.toString().indexOf('__ngUnwrap__') !== -1) {\n var unwrappedListener = listener('__ngUnwrap__');\n return invokedListeners.indexOf(unwrappedListener) === -1 &&\n unwrappedListener.call(node, eventObj);\n }\n });\n }\n };\n return DebugElement__POST_R3__;\n }(DebugNode__POST_R3__));\n function copyDomProperties(element, properties) {\n if (element) {\n // Skip own properties (as those are patched)\n var obj = Object.getPrototypeOf(element);\n var NodePrototype = Node.prototype;\n while (obj !== null && obj !== NodePrototype) {\n var descriptors = Object.getOwnPropertyDescriptors(obj);\n for (var key in descriptors) {\n if (!key.startsWith('__') && !key.startsWith('on')) {\n // don't include properties starting with `__` and `on`.\n // `__` are patched values which should not be included.\n // `on` are listeners which also should not be included.\n var value = element[key];\n if (isPrimitiveValue(value)) {\n properties[key] = value;\n }\n }\n }\n obj = Object.getPrototypeOf(obj);\n }\n }\n }\n function isPrimitiveValue(value) {\n return typeof value === 'string' || typeof value === 'boolean' || typeof value === 'number' ||\n value === null;\n }\n function _queryAllR3(parentElement, predicate, matches, elementsOnly) {\n var context = loadLContext(parentElement.nativeNode, false);\n if (context !== null) {\n var parentTNode = context.lView[TVIEW].data[context.nodeIndex];\n _queryNodeChildrenR3(parentTNode, context.lView, predicate, matches, elementsOnly, parentElement.nativeNode);\n }\n else {\n // If the context is null, then `parentElement` was either created with Renderer2 or native DOM\n // APIs.\n _queryNativeNodeDescendants(parentElement.nativeNode, predicate, matches, elementsOnly);\n }\n }\n /**\n * Recursively match the current TNode against the predicate, and goes on with the next ones.\n *\n * @param tNode the current TNode\n * @param lView the LView of this TNode\n * @param predicate the predicate to match\n * @param matches the list of positive matches\n * @param elementsOnly whether only elements should be searched\n * @param rootNativeNode the root native node on which predicate should not be matched\n */\n function _queryNodeChildrenR3(tNode, lView, predicate, matches, elementsOnly, rootNativeNode) {\n var e_1, _a;\n ngDevMode && assertTNodeForLView(tNode, lView);\n var nativeNode = getNativeByTNodeOrNull(tNode, lView);\n // For each type of TNode, specific logic is executed.\n if (tNode.type & (3 /* AnyRNode */ | 8 /* ElementContainer */)) {\n // Case 1: the TNode is an element\n // The native node has to be checked.\n _addQueryMatchR3(nativeNode, predicate, matches, elementsOnly, rootNativeNode);\n if (isComponentHost(tNode)) {\n // If the element is the host of a component, then all nodes in its view have to be processed.\n // Note: the component's content (tNode.child) will be processed from the insertion points.\n var componentView = getComponentLViewByIndex(tNode.index, lView);\n if (componentView && componentView[TVIEW].firstChild) {\n _queryNodeChildrenR3(componentView[TVIEW].firstChild, componentView, predicate, matches, elementsOnly, rootNativeNode);\n }\n }\n else {\n if (tNode.child) {\n // Otherwise, its children have to be processed.\n _queryNodeChildrenR3(tNode.child, lView, predicate, matches, elementsOnly, rootNativeNode);\n }\n // We also have to query the DOM directly in order to catch elements inserted through\n // Renderer2. Note that this is __not__ optimal, because we're walking similar trees multiple\n // times. ViewEngine could do it more efficiently, because all the insertions go through\n // Renderer2, however that's not the case in Ivy. This approach is being used because:\n // 1. Matching the ViewEngine behavior would mean potentially introducing a depedency\n // from `Renderer2` to Ivy which could bring Ivy code into ViewEngine.\n // 2. We would have to make `Renderer3` \"know\" about debug nodes.\n // 3. It allows us to capture nodes that were inserted directly via the DOM.\n nativeNode && _queryNativeNodeDescendants(nativeNode, predicate, matches, elementsOnly);\n }\n // In all cases, if a dynamic container exists for this node, each view inside it has to be\n // processed.\n var nodeOrContainer = lView[tNode.index];\n if (isLContainer(nodeOrContainer)) {\n _queryNodeChildrenInContainerR3(nodeOrContainer, predicate, matches, elementsOnly, rootNativeNode);\n }\n }\n else if (tNode.type & 4 /* Container */) {\n // Case 2: the TNode is a container\n // The native node has to be checked.\n var lContainer = lView[tNode.index];\n _addQueryMatchR3(lContainer[NATIVE], predicate, matches, elementsOnly, rootNativeNode);\n // Each view inside the container has to be processed.\n _queryNodeChildrenInContainerR3(lContainer, predicate, matches, elementsOnly, rootNativeNode);\n }\n else if (tNode.type & 16 /* Projection */) {\n // Case 3: the TNode is a projection insertion point (i.e. a <ng-content>).\n // The nodes projected at this location all need to be processed.\n var componentView = lView[DECLARATION_COMPONENT_VIEW];\n var componentHost = componentView[T_HOST];\n var head = componentHost.projection[tNode.projection];\n if (Array.isArray(head)) {\n try {\n for (var head_1 = __values(head), head_1_1 = head_1.next(); !head_1_1.done; head_1_1 = head_1.next()) {\n var nativeNode_1 = head_1_1.value;\n _addQueryMatchR3(nativeNode_1, predicate, matches, elementsOnly, rootNativeNode);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (head_1_1 && !head_1_1.done && (_a = head_1.return)) _a.call(head_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n else if (head) {\n var nextLView = componentView[PARENT];\n var nextTNode = nextLView[TVIEW].data[head.index];\n _queryNodeChildrenR3(nextTNode, nextLView, predicate, matches, elementsOnly, rootNativeNode);\n }\n }\n else if (tNode.child) {\n // Case 4: the TNode is a view.\n _queryNodeChildrenR3(tNode.child, lView, predicate, matches, elementsOnly, rootNativeNode);\n }\n // We don't want to go to the next sibling of the root node.\n if (rootNativeNode !== nativeNode) {\n // To determine the next node to be processed, we need to use the next or the projectionNext\n // link, depending on whether the current node has been projected.\n var nextTNode = (tNode.flags & 4 /* isProjected */) ? tNode.projectionNext : tNode.next;\n if (nextTNode) {\n _queryNodeChildrenR3(nextTNode, lView, predicate, matches, elementsOnly, rootNativeNode);\n }\n }\n }\n /**\n * Process all TNodes in a given container.\n *\n * @param lContainer the container to be processed\n * @param predicate the predicate to match\n * @param matches the list of positive matches\n * @param elementsOnly whether only elements should be searched\n * @param rootNativeNode the root native node on which predicate should not be matched\n */\n function _queryNodeChildrenInContainerR3(lContainer, predicate, matches, elementsOnly, rootNativeNode) {\n for (var i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n var childView = lContainer[i];\n var firstChild = childView[TVIEW].firstChild;\n if (firstChild) {\n _queryNodeChildrenR3(firstChild, childView, predicate, matches, elementsOnly, rootNativeNode);\n }\n }\n }\n /**\n * Match the current native node against the predicate.\n *\n * @param nativeNode the current native node\n * @param predicate the predicate to match\n * @param matches the list of positive matches\n * @param elementsOnly whether only elements should be searched\n * @param rootNativeNode the root native node on which predicate should not be matched\n */\n function _addQueryMatchR3(nativeNode, predicate, matches, elementsOnly, rootNativeNode) {\n if (rootNativeNode !== nativeNode) {\n var debugNode = getDebugNode$1(nativeNode);\n if (!debugNode) {\n return;\n }\n // Type of the \"predicate and \"matches\" array are set based on the value of\n // the \"elementsOnly\" parameter. TypeScript is not able to properly infer these\n // types with generics, so we manually cast the parameters accordingly.\n if (elementsOnly && debugNode instanceof DebugElement__POST_R3__ && predicate(debugNode) &&\n matches.indexOf(debugNode) === -1) {\n matches.push(debugNode);\n }\n else if (!elementsOnly && predicate(debugNode) &&\n matches.indexOf(debugNode) === -1) {\n matches.push(debugNode);\n }\n }\n }\n /**\n * Match all the descendants of a DOM node against a predicate.\n *\n * @param nativeNode the current native node\n * @param predicate the predicate to match\n * @param matches the list where matches are stored\n * @param elementsOnly whether only elements should be searched\n */\n function _queryNativeNodeDescendants(parentNode, predicate, matches, elementsOnly) {\n var nodes = parentNode.childNodes;\n var length = nodes.length;\n for (var i = 0; i < length; i++) {\n var node = nodes[i];\n var debugNode = getDebugNode$1(node);\n if (debugNode) {\n if (elementsOnly && debugNode instanceof DebugElement__POST_R3__ && predicate(debugNode) &&\n matches.indexOf(debugNode) === -1) {\n matches.push(debugNode);\n }\n else if (!elementsOnly && predicate(debugNode) &&\n matches.indexOf(debugNode) === -1) {\n matches.push(debugNode);\n }\n _queryNativeNodeDescendants(node, predicate, matches, elementsOnly);\n }\n }\n }\n /**\n * Iterates through the property bindings for a given node and generates\n * a map of property names to values. This map only contains property bindings\n * defined in templates, not in host bindings.\n */\n function collectPropertyBindings(properties, tNode, lView, tData) {\n var bindingIndexes = tNode.propertyBindings;\n if (bindingIndexes !== null) {\n for (var i = 0; i < bindingIndexes.length; i++) {\n var bindingIndex = bindingIndexes[i];\n var propMetadata = tData[bindingIndex];\n var metadataParts = propMetadata.split(INTERPOLATION_DELIMITER);\n var propertyName = metadataParts[0];\n if (metadataParts.length > 1) {\n var value = metadataParts[1];\n for (var j = 1; j < metadataParts.length - 1; j++) {\n value += renderStringify(lView[bindingIndex + j - 1]) + metadataParts[j + 1];\n }\n properties[propertyName] = value;\n }\n else {\n properties[propertyName] = lView[bindingIndex];\n }\n }\n }\n }\n // Need to keep the nodes in a global Map so that multiple angular apps are supported.\n var _nativeNodeToDebugNode = new Map();\n function getDebugNode__PRE_R3__(nativeNode) {\n return _nativeNodeToDebugNode.get(nativeNode) || null;\n }\n var NG_DEBUG_PROPERTY = '__ng_debug__';\n function getDebugNode__POST_R3__(nativeNode) {\n if (nativeNode instanceof Node) {\n if (!(nativeNode.hasOwnProperty(NG_DEBUG_PROPERTY))) {\n nativeNode[NG_DEBUG_PROPERTY] = nativeNode.nodeType == Node.ELEMENT_NODE ?\n new DebugElement__POST_R3__(nativeNode) :\n new DebugNode__POST_R3__(nativeNode);\n }\n return nativeNode[NG_DEBUG_PROPERTY];\n }\n return null;\n }\n /**\n * @publicApi\n */\n var getDebugNode$1 = getDebugNode__PRE_R3__;\n function getDebugNodeR2__PRE_R3__(nativeNode) {\n return getDebugNode__PRE_R3__(nativeNode);\n }\n function getDebugNodeR2__POST_R3__(_nativeNode) {\n return null;\n }\n var getDebugNodeR2 = getDebugNodeR2__PRE_R3__;\n function getAllDebugNodes() {\n return Array.from(_nativeNodeToDebugNode.values());\n }\n function indexDebugNode(node) {\n _nativeNodeToDebugNode.set(node.nativeNode, node);\n }\n function removeDebugNodeFromIndex(node) {\n _nativeNodeToDebugNode.delete(node.nativeNode);\n }\n /**\n * @publicApi\n */\n var DebugNode = DebugNode__PRE_R3__;\n /**\n * @publicApi\n */\n var DebugElement = DebugElement__PRE_R3__;\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 var _CORE_PLATFORM_PROVIDERS = [\n // Set a default platform name for platforms that don't set it explicitly.\n { provide: PLATFORM_ID, useValue: 'unknown' },\n { provide: PlatformRef, deps: [Injector] },\n { provide: TestabilityRegistry, deps: [] },\n { provide: Console, deps: [] },\n ];\n /**\n * This platform has to be included in any other platform\n *\n * @publicApi\n */\n var platformCore = createPlatformFactory(null, 'core', _CORE_PLATFORM_PROVIDERS);\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 _iterableDiffersFactory() {\n return defaultIterableDiffers;\n }\n function _keyValueDiffersFactory() {\n return defaultKeyValueDiffers;\n }\n function _localeFactory(locale) {\n locale = locale || getGlobalLocale();\n if (ivyEnabled) {\n setLocaleId(locale);\n }\n return locale;\n }\n /**\n * Work out the locale from the potential global properties.\n *\n * * Closure Compiler: use `goog.LOCALE`.\n * * Ivy enabled: use `$localize.locale`\n */\n function getGlobalLocale() {\n if (typeof ngI18nClosureMode !== 'undefined' && ngI18nClosureMode &&\n typeof goog !== 'undefined' && goog.LOCALE !== 'en') {\n // * The default `goog.LOCALE` value is `en`, while Angular used `en-US`.\n // * In order to preserve backwards compatibility, we use Angular default value over\n // Closure Compiler's one.\n return goog.LOCALE;\n }\n else {\n // KEEP `typeof $localize !== 'undefined' && $localize.locale` IN SYNC WITH THE LOCALIZE\n // COMPILE-TIME INLINER.\n //\n // * During compile time inlining of translations the expression will be replaced\n // with a string literal that is the current locale. Other forms of this expression are not\n // guaranteed to be replaced.\n //\n // * During runtime translation evaluation, the developer is required to set `$localize.locale`\n // if required, or just to provide their own `LOCALE_ID` provider.\n return (ivyEnabled && typeof $localize !== 'undefined' && $localize.locale) ||\n DEFAULT_LOCALE_ID;\n }\n }\n var ɵ0$f = USD_CURRENCY_CODE;\n /**\n * A built-in [dependency injection token](guide/glossary#di-token)\n * that is used to configure the root injector for bootstrapping.\n */\n var APPLICATION_MODULE_PROVIDERS = [\n {\n provide: ApplicationRef,\n useClass: ApplicationRef,\n deps: [NgZone, Injector, ErrorHandler, ComponentFactoryResolver, ApplicationInitStatus]\n },\n { provide: SCHEDULER, deps: [NgZone], useFactory: zoneSchedulerFactory },\n {\n provide: ApplicationInitStatus,\n useClass: ApplicationInitStatus,\n deps: [[new Optional(), APP_INITIALIZER]]\n },\n { provide: Compiler, useClass: Compiler, deps: [] },\n APP_ID_RANDOM_PROVIDER,\n { provide: IterableDiffers, useFactory: _iterableDiffersFactory, deps: [] },\n { provide: KeyValueDiffers, useFactory: _keyValueDiffersFactory, deps: [] },\n {\n provide: LOCALE_ID$1,\n useFactory: _localeFactory,\n deps: [[new Inject(LOCALE_ID$1), new Optional(), new SkipSelf()]]\n },\n { provide: DEFAULT_CURRENCY_CODE, useValue: ɵ0$f },\n ];\n /**\n * Schedule work at next available slot.\n *\n * In Ivy this is just `requestAnimationFrame`. For compatibility reasons when bootstrapped\n * using `platformRef.bootstrap` we need to use `NgZone.onStable` as the scheduling mechanism.\n * This overrides the scheduling mechanism in Ivy to `NgZone.onStable`.\n *\n * @param ngZone NgZone to use for scheduling.\n */\n function zoneSchedulerFactory(ngZone) {\n var queue = [];\n ngZone.onStable.subscribe(function () {\n while (queue.length) {\n queue.pop()();\n }\n });\n return function (fn) {\n queue.push(fn);\n };\n }\n /**\n * Configures the root injector for an app with\n * providers of `@angular/core` dependencies that `ApplicationRef` needs\n * to bootstrap components.\n *\n * Re-exported by `BrowserModule`, which is included automatically in the root\n * `AppModule` when you create a new app with the CLI `new` command.\n *\n * @publicApi\n */\n var ApplicationModule = /** @class */ (function () {\n // Inject ApplicationRef to make it eager...\n function ApplicationModule(appRef) {\n }\n return ApplicationModule;\n }());\n ApplicationModule.decorators = [\n { type: NgModule, args: [{ providers: APPLICATION_MODULE_PROVIDERS },] }\n ];\n ApplicationModule.ctorParameters = function () { return [\n { type: ApplicationRef }\n ]; };\n\n function anchorDef(flags, matchedQueriesDsl, ngContentIndex, childCount, handleEvent, templateFactory) {\n flags |= 1 /* TypeElement */;\n var _a = splitMatchedQueriesDsl(matchedQueriesDsl), matchedQueries = _a.matchedQueries, references = _a.references, matchedQueryIds = _a.matchedQueryIds;\n var template = templateFactory ? resolveDefinition(templateFactory) : null;\n return {\n // will bet set by the view definition\n nodeIndex: -1,\n parent: null,\n renderParent: null,\n bindingIndex: -1,\n outputIndex: -1,\n // regular values\n flags: flags,\n checkIndex: -1,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0,\n matchedQueries: matchedQueries,\n matchedQueryIds: matchedQueryIds,\n references: references,\n ngContentIndex: ngContentIndex,\n childCount: childCount,\n bindings: [],\n bindingFlags: 0,\n outputs: [],\n element: {\n ns: null,\n name: null,\n attrs: null,\n template: template,\n componentProvider: null,\n componentView: null,\n componentRendererType: null,\n publicProviders: null,\n allProviders: null,\n handleEvent: handleEvent || NOOP\n },\n provider: null,\n text: null,\n query: null,\n ngContent: null\n };\n }\n function elementDef(checkIndex, flags, matchedQueriesDsl, ngContentIndex, childCount, namespaceAndName, fixedAttrs, bindings, outputs, handleEvent, componentView, componentRendererType) {\n var _a;\n if (fixedAttrs === void 0) { fixedAttrs = []; }\n if (!handleEvent) {\n handleEvent = NOOP;\n }\n var _b = splitMatchedQueriesDsl(matchedQueriesDsl), matchedQueries = _b.matchedQueries, references = _b.references, matchedQueryIds = _b.matchedQueryIds;\n var ns = null;\n var name = null;\n if (namespaceAndName) {\n _a = __read(splitNamespace(namespaceAndName), 2), ns = _a[0], name = _a[1];\n }\n bindings = bindings || [];\n var bindingDefs = [];\n for (var i = 0; i < bindings.length; i++) {\n var _c = __read(bindings[i], 3), bindingFlags = _c[0], namespaceAndName_1 = _c[1], suffixOrSecurityContext = _c[2];\n var _d = __read(splitNamespace(namespaceAndName_1), 2), ns_1 = _d[0], name_1 = _d[1];\n var securityContext = undefined;\n var suffix = undefined;\n switch (bindingFlags & 15 /* Types */) {\n case 4 /* TypeElementStyle */:\n suffix = suffixOrSecurityContext;\n break;\n case 1 /* TypeElementAttribute */:\n case 8 /* TypeProperty */:\n securityContext = suffixOrSecurityContext;\n break;\n }\n bindingDefs[i] =\n { flags: bindingFlags, ns: ns_1, name: name_1, nonMinifiedName: name_1, securityContext: securityContext, suffix: suffix };\n }\n outputs = outputs || [];\n var outputDefs = [];\n for (var i = 0; i < outputs.length; i++) {\n var _e = __read(outputs[i], 2), target = _e[0], eventName = _e[1];\n outputDefs[i] =\n { type: 0 /* ElementOutput */, target: target, eventName: eventName, propName: null };\n }\n fixedAttrs = fixedAttrs || [];\n var attrs = fixedAttrs.map(function (_a) {\n var _b = __read(_a, 2), namespaceAndName = _b[0], value = _b[1];\n var _c = __read(splitNamespace(namespaceAndName), 2), ns = _c[0], name = _c[1];\n return [ns, name, value];\n });\n componentRendererType = resolveRendererType2(componentRendererType);\n if (componentView) {\n flags |= 33554432 /* ComponentView */;\n }\n flags |= 1 /* TypeElement */;\n return {\n // will bet set by the view definition\n nodeIndex: -1,\n parent: null,\n renderParent: null,\n bindingIndex: -1,\n outputIndex: -1,\n // regular values\n checkIndex: checkIndex,\n flags: flags,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0,\n matchedQueries: matchedQueries,\n matchedQueryIds: matchedQueryIds,\n references: references,\n ngContentIndex: ngContentIndex,\n childCount: childCount,\n bindings: bindingDefs,\n bindingFlags: calcBindingFlags(bindingDefs),\n outputs: outputDefs,\n element: {\n ns: ns,\n name: name,\n attrs: attrs,\n template: null,\n // will bet set by the view definition\n componentProvider: null,\n componentView: componentView || null,\n componentRendererType: componentRendererType,\n publicProviders: null,\n allProviders: null,\n handleEvent: handleEvent || NOOP,\n },\n provider: null,\n text: null,\n query: null,\n ngContent: null\n };\n }\n function createElement(view, renderHost, def) {\n var elDef = def.element;\n var rootSelectorOrNode = view.root.selectorOrNode;\n var renderer = view.renderer;\n var el;\n if (view.parent || !rootSelectorOrNode) {\n if (elDef.name) {\n el = renderer.createElement(elDef.name, elDef.ns);\n }\n else {\n el = renderer.createComment('');\n }\n var parentEl = getParentRenderElement(view, renderHost, def);\n if (parentEl) {\n renderer.appendChild(parentEl, el);\n }\n }\n else {\n // when using native Shadow DOM, do not clear the root element contents to allow slot projection\n var preserveContent = (!!elDef.componentRendererType &&\n elDef.componentRendererType.encapsulation === exports.ViewEncapsulation.ShadowDom);\n el = renderer.selectRootElement(rootSelectorOrNode, preserveContent);\n }\n if (elDef.attrs) {\n for (var i = 0; i < elDef.attrs.length; i++) {\n var _a = __read(elDef.attrs[i], 3), ns = _a[0], name = _a[1], value = _a[2];\n renderer.setAttribute(el, name, value, ns);\n }\n }\n return el;\n }\n function listenToElementOutputs(view, compView, def, el) {\n for (var i = 0; i < def.outputs.length; i++) {\n var output = def.outputs[i];\n var handleEventClosure = renderEventHandlerClosure(view, def.nodeIndex, elementEventFullName(output.target, output.eventName));\n var listenTarget = output.target;\n var listenerView = view;\n if (output.target === 'component') {\n listenTarget = null;\n listenerView = compView;\n }\n var disposable = listenerView.renderer.listen(listenTarget || el, output.eventName, handleEventClosure);\n view.disposables[def.outputIndex + i] = disposable;\n }\n }\n function renderEventHandlerClosure(view, index, eventName) {\n return function (event) { return dispatchEvent(view, index, eventName, event); };\n }\n function checkAndUpdateElementInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n var bindLen = def.bindings.length;\n var changed = false;\n if (bindLen > 0 && checkAndUpdateElementValue(view, def, 0, v0))\n changed = true;\n if (bindLen > 1 && checkAndUpdateElementValue(view, def, 1, v1))\n changed = true;\n if (bindLen > 2 && checkAndUpdateElementValue(view, def, 2, v2))\n changed = true;\n if (bindLen > 3 && checkAndUpdateElementValue(view, def, 3, v3))\n changed = true;\n if (bindLen > 4 && checkAndUpdateElementValue(view, def, 4, v4))\n changed = true;\n if (bindLen > 5 && checkAndUpdateElementValue(view, def, 5, v5))\n changed = true;\n if (bindLen > 6 && checkAndUpdateElementValue(view, def, 6, v6))\n changed = true;\n if (bindLen > 7 && checkAndUpdateElementValue(view, def, 7, v7))\n changed = true;\n if (bindLen > 8 && checkAndUpdateElementValue(view, def, 8, v8))\n changed = true;\n if (bindLen > 9 && checkAndUpdateElementValue(view, def, 9, v9))\n changed = true;\n return changed;\n }\n function checkAndUpdateElementDynamic(view, def, values) {\n var changed = false;\n for (var i = 0; i < values.length; i++) {\n if (checkAndUpdateElementValue(view, def, i, values[i]))\n changed = true;\n }\n return changed;\n }\n function checkAndUpdateElementValue(view, def, bindingIdx, value) {\n if (!checkAndUpdateBinding(view, def, bindingIdx, value)) {\n return false;\n }\n var binding = def.bindings[bindingIdx];\n var elData = asElementData(view, def.nodeIndex);\n var renderNode = elData.renderElement;\n var name = binding.name;\n switch (binding.flags & 15 /* Types */) {\n case 1 /* TypeElementAttribute */:\n setElementAttribute$1(view, binding, renderNode, binding.ns, name, value);\n break;\n case 2 /* TypeElementClass */:\n setElementClass(view, renderNode, name, value);\n break;\n case 4 /* TypeElementStyle */:\n setElementStyle(view, binding, renderNode, name, value);\n break;\n case 8 /* TypeProperty */:\n var bindView = (def.flags & 33554432 /* ComponentView */ &&\n binding.flags & 32 /* SyntheticHostProperty */) ?\n elData.componentView :\n view;\n setElementProperty(bindView, binding, renderNode, name, value);\n break;\n }\n return true;\n }\n function setElementAttribute$1(view, binding, renderNode, ns, name, value) {\n var securityContext = binding.securityContext;\n var renderValue = securityContext ? view.root.sanitizer.sanitize(securityContext, value) : value;\n renderValue = renderValue != null ? renderValue.toString() : null;\n var renderer = view.renderer;\n if (value != null) {\n renderer.setAttribute(renderNode, name, renderValue, ns);\n }\n else {\n renderer.removeAttribute(renderNode, name, ns);\n }\n }\n function setElementClass(view, renderNode, name, value) {\n var renderer = view.renderer;\n if (value) {\n renderer.addClass(renderNode, name);\n }\n else {\n renderer.removeClass(renderNode, name);\n }\n }\n function setElementStyle(view, binding, renderNode, name, value) {\n var renderValue = view.root.sanitizer.sanitize(exports.SecurityContext.STYLE, value);\n if (renderValue != null) {\n renderValue = renderValue.toString();\n var unit = binding.suffix;\n if (unit != null) {\n renderValue = renderValue + unit;\n }\n }\n else {\n renderValue = null;\n }\n var renderer = view.renderer;\n if (renderValue != null) {\n renderer.setStyle(renderNode, name, renderValue);\n }\n else {\n renderer.removeStyle(renderNode, name);\n }\n }\n function setElementProperty(view, binding, renderNode, name, value) {\n var securityContext = binding.securityContext;\n var renderValue = securityContext ? view.root.sanitizer.sanitize(securityContext, value) : value;\n view.renderer.setProperty(renderNode, name, renderValue);\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 function queryDef(flags, id, bindings) {\n var bindingDefs = [];\n for (var propName in bindings) {\n var bindingType = bindings[propName];\n bindingDefs.push({ propName: propName, bindingType: bindingType });\n }\n return {\n // will bet set by the view definition\n nodeIndex: -1,\n parent: null,\n renderParent: null,\n bindingIndex: -1,\n outputIndex: -1,\n // regular values\n // TODO(vicb): check\n checkIndex: -1,\n flags: flags,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0,\n ngContentIndex: -1,\n matchedQueries: {},\n matchedQueryIds: 0,\n references: {},\n childCount: 0,\n bindings: [],\n bindingFlags: 0,\n outputs: [],\n element: null,\n provider: null,\n text: null,\n query: { id: id, filterId: filterQueryId(id), bindings: bindingDefs },\n ngContent: null\n };\n }\n function createQuery(emitDistinctChangesOnly) {\n return new QueryList(emitDistinctChangesOnly);\n }\n function dirtyParentQueries(view) {\n var queryIds = view.def.nodeMatchedQueries;\n while (view.parent && isEmbeddedView(view)) {\n var tplDef = view.parentNodeDef;\n view = view.parent;\n // content queries\n var end = tplDef.nodeIndex + tplDef.childCount;\n for (var i = 0; i <= end; i++) {\n var nodeDef = view.def.nodes[i];\n if ((nodeDef.flags & 67108864 /* TypeContentQuery */) &&\n (nodeDef.flags & 536870912 /* DynamicQuery */) &&\n (nodeDef.query.filterId & queryIds) === nodeDef.query.filterId) {\n asQueryList(view, i).setDirty();\n }\n if ((nodeDef.flags & 1 /* TypeElement */ && i + nodeDef.childCount < tplDef.nodeIndex) ||\n !(nodeDef.childFlags & 67108864 /* TypeContentQuery */) ||\n !(nodeDef.childFlags & 536870912 /* DynamicQuery */)) {\n // skip elements that don't contain the template element or no query.\n i += nodeDef.childCount;\n }\n }\n }\n // view queries\n if (view.def.nodeFlags & 134217728 /* TypeViewQuery */) {\n for (var i = 0; i < view.def.nodes.length; i++) {\n var nodeDef = view.def.nodes[i];\n if ((nodeDef.flags & 134217728 /* TypeViewQuery */) && (nodeDef.flags & 536870912 /* DynamicQuery */)) {\n asQueryList(view, i).setDirty();\n }\n // only visit the root nodes\n i += nodeDef.childCount;\n }\n }\n }\n function checkAndUpdateQuery(view, nodeDef) {\n var queryList = asQueryList(view, nodeDef.nodeIndex);\n if (!queryList.dirty) {\n return;\n }\n var directiveInstance;\n var newValues = undefined;\n if (nodeDef.flags & 67108864 /* TypeContentQuery */) {\n var elementDef = nodeDef.parent.parent;\n newValues = calcQueryValues(view, elementDef.nodeIndex, elementDef.nodeIndex + elementDef.childCount, nodeDef.query, []);\n directiveInstance = asProviderData(view, nodeDef.parent.nodeIndex).instance;\n }\n else if (nodeDef.flags & 134217728 /* TypeViewQuery */) {\n newValues = calcQueryValues(view, 0, view.def.nodes.length - 1, nodeDef.query, []);\n directiveInstance = view.component;\n }\n queryList.reset(newValues, unwrapElementRef);\n var bindings = nodeDef.query.bindings;\n var notify = false;\n for (var i = 0; i < bindings.length; i++) {\n var binding = bindings[i];\n var boundValue = void 0;\n switch (binding.bindingType) {\n case 0 /* First */:\n boundValue = queryList.first;\n break;\n case 1 /* All */:\n boundValue = queryList;\n notify = true;\n break;\n }\n directiveInstance[binding.propName] = boundValue;\n }\n if (notify) {\n queryList.notifyOnChanges();\n }\n }\n function calcQueryValues(view, startIndex, endIndex, queryDef, values) {\n for (var i = startIndex; i <= endIndex; i++) {\n var nodeDef = view.def.nodes[i];\n var valueType = nodeDef.matchedQueries[queryDef.id];\n if (valueType != null) {\n values.push(getQueryValue(view, nodeDef, valueType));\n }\n if (nodeDef.flags & 1 /* TypeElement */ && nodeDef.element.template &&\n (nodeDef.element.template.nodeMatchedQueries & queryDef.filterId) ===\n queryDef.filterId) {\n var elementData = asElementData(view, i);\n // check embedded views that were attached at the place of their template,\n // but process child nodes first if some match the query (see issue #16568)\n if ((nodeDef.childMatchedQueries & queryDef.filterId) === queryDef.filterId) {\n calcQueryValues(view, i + 1, i + nodeDef.childCount, queryDef, values);\n i += nodeDef.childCount;\n }\n if (nodeDef.flags & 16777216 /* EmbeddedViews */) {\n var embeddedViews = elementData.viewContainer._embeddedViews;\n for (var k = 0; k < embeddedViews.length; k++) {\n var embeddedView = embeddedViews[k];\n var dvc = declaredViewContainer(embeddedView);\n if (dvc && dvc === elementData) {\n calcQueryValues(embeddedView, 0, embeddedView.def.nodes.length - 1, queryDef, values);\n }\n }\n }\n var projectedViews = elementData.template._projectedViews;\n if (projectedViews) {\n for (var k = 0; k < projectedViews.length; k++) {\n var projectedView = projectedViews[k];\n calcQueryValues(projectedView, 0, projectedView.def.nodes.length - 1, queryDef, values);\n }\n }\n }\n if ((nodeDef.childMatchedQueries & queryDef.filterId) !== queryDef.filterId) {\n // if no child matches the query, skip the children.\n i += nodeDef.childCount;\n }\n }\n return values;\n }\n function getQueryValue(view, nodeDef, queryValueType) {\n if (queryValueType != null) {\n // a match\n switch (queryValueType) {\n case 1 /* RenderElement */:\n return asElementData(view, nodeDef.nodeIndex).renderElement;\n case 0 /* ElementRef */:\n return new ElementRef(asElementData(view, nodeDef.nodeIndex).renderElement);\n case 2 /* TemplateRef */:\n return asElementData(view, nodeDef.nodeIndex).template;\n case 3 /* ViewContainerRef */:\n return asElementData(view, nodeDef.nodeIndex).viewContainer;\n case 4 /* Provider */:\n return asProviderData(view, nodeDef.nodeIndex).instance;\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 function ngContentDef(ngContentIndex, index) {\n return {\n // will bet set by the view definition\n nodeIndex: -1,\n parent: null,\n renderParent: null,\n bindingIndex: -1,\n outputIndex: -1,\n // regular values\n checkIndex: -1,\n flags: 8 /* TypeNgContent */,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0,\n matchedQueries: {},\n matchedQueryIds: 0,\n references: {},\n ngContentIndex: ngContentIndex,\n childCount: 0,\n bindings: [],\n bindingFlags: 0,\n outputs: [],\n element: null,\n provider: null,\n text: null,\n query: null,\n ngContent: { index: index }\n };\n }\n function appendNgContent(view, renderHost, def) {\n var parentEl = getParentRenderElement(view, renderHost, def);\n if (!parentEl) {\n // Nothing to do if there is no parent element.\n return;\n }\n var ngContentIndex = def.ngContent.index;\n visitProjectedRenderNodes(view, ngContentIndex, 1 /* AppendChild */, parentEl, null, undefined);\n }\n\n function purePipeDef(checkIndex, argCount) {\n // argCount + 1 to include the pipe as first arg\n return _pureExpressionDef(128 /* TypePurePipe */, checkIndex, newArray(argCount + 1));\n }\n function pureArrayDef(checkIndex, argCount) {\n return _pureExpressionDef(32 /* TypePureArray */, checkIndex, newArray(argCount));\n }\n function pureObjectDef(checkIndex, propToIndex) {\n var keys = Object.keys(propToIndex);\n var nbKeys = keys.length;\n var propertyNames = [];\n for (var i = 0; i < nbKeys; i++) {\n var key = keys[i];\n var index = propToIndex[key];\n propertyNames.push(key);\n }\n return _pureExpressionDef(64 /* TypePureObject */, checkIndex, propertyNames);\n }\n function _pureExpressionDef(flags, checkIndex, propertyNames) {\n var bindings = [];\n for (var i = 0; i < propertyNames.length; i++) {\n var prop = propertyNames[i];\n bindings.push({\n flags: 8 /* TypeProperty */,\n name: prop,\n ns: null,\n nonMinifiedName: prop,\n securityContext: null,\n suffix: null\n });\n }\n return {\n // will bet set by the view definition\n nodeIndex: -1,\n parent: null,\n renderParent: null,\n bindingIndex: -1,\n outputIndex: -1,\n // regular values\n checkIndex: checkIndex,\n flags: flags,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0,\n matchedQueries: {},\n matchedQueryIds: 0,\n references: {},\n ngContentIndex: -1,\n childCount: 0,\n bindings: bindings,\n bindingFlags: calcBindingFlags(bindings),\n outputs: [],\n element: null,\n provider: null,\n text: null,\n query: null,\n ngContent: null\n };\n }\n function createPureExpression(view, def) {\n return { value: undefined };\n }\n function checkAndUpdatePureExpressionInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n var bindings = def.bindings;\n var changed = false;\n var bindLen = bindings.length;\n if (bindLen > 0 && checkAndUpdateBinding(view, def, 0, v0))\n changed = true;\n if (bindLen > 1 && checkAndUpdateBinding(view, def, 1, v1))\n changed = true;\n if (bindLen > 2 && checkAndUpdateBinding(view, def, 2, v2))\n changed = true;\n if (bindLen > 3 && checkAndUpdateBinding(view, def, 3, v3))\n changed = true;\n if (bindLen > 4 && checkAndUpdateBinding(view, def, 4, v4))\n changed = true;\n if (bindLen > 5 && checkAndUpdateBinding(view, def, 5, v5))\n changed = true;\n if (bindLen > 6 && checkAndUpdateBinding(view, def, 6, v6))\n changed = true;\n if (bindLen > 7 && checkAndUpdateBinding(view, def, 7, v7))\n changed = true;\n if (bindLen > 8 && checkAndUpdateBinding(view, def, 8, v8))\n changed = true;\n if (bindLen > 9 && checkAndUpdateBinding(view, def, 9, v9))\n changed = true;\n if (changed) {\n var data = asPureExpressionData(view, def.nodeIndex);\n var value = void 0;\n switch (def.flags & 201347067 /* Types */) {\n case 32 /* TypePureArray */:\n value = [];\n if (bindLen > 0)\n value.push(v0);\n if (bindLen > 1)\n value.push(v1);\n if (bindLen > 2)\n value.push(v2);\n if (bindLen > 3)\n value.push(v3);\n if (bindLen > 4)\n value.push(v4);\n if (bindLen > 5)\n value.push(v5);\n if (bindLen > 6)\n value.push(v6);\n if (bindLen > 7)\n value.push(v7);\n if (bindLen > 8)\n value.push(v8);\n if (bindLen > 9)\n value.push(v9);\n break;\n case 64 /* TypePureObject */:\n value = {};\n if (bindLen > 0)\n value[bindings[0].name] = v0;\n if (bindLen > 1)\n value[bindings[1].name] = v1;\n if (bindLen > 2)\n value[bindings[2].name] = v2;\n if (bindLen > 3)\n value[bindings[3].name] = v3;\n if (bindLen > 4)\n value[bindings[4].name] = v4;\n if (bindLen > 5)\n value[bindings[5].name] = v5;\n if (bindLen > 6)\n value[bindings[6].name] = v6;\n if (bindLen > 7)\n value[bindings[7].name] = v7;\n if (bindLen > 8)\n value[bindings[8].name] = v8;\n if (bindLen > 9)\n value[bindings[9].name] = v9;\n break;\n case 128 /* TypePurePipe */:\n var pipe = v0;\n switch (bindLen) {\n case 1:\n value = pipe.transform(v0);\n break;\n case 2:\n value = pipe.transform(v1);\n break;\n case 3:\n value = pipe.transform(v1, v2);\n break;\n case 4:\n value = pipe.transform(v1, v2, v3);\n break;\n case 5:\n value = pipe.transform(v1, v2, v3, v4);\n break;\n case 6:\n value = pipe.transform(v1, v2, v3, v4, v5);\n break;\n case 7:\n value = pipe.transform(v1, v2, v3, v4, v5, v6);\n break;\n case 8:\n value = pipe.transform(v1, v2, v3, v4, v5, v6, v7);\n break;\n case 9:\n value = pipe.transform(v1, v2, v3, v4, v5, v6, v7, v8);\n break;\n case 10:\n value = pipe.transform(v1, v2, v3, v4, v5, v6, v7, v8, v9);\n break;\n }\n break;\n }\n data.value = value;\n }\n return changed;\n }\n function checkAndUpdatePureExpressionDynamic(view, def, values) {\n var bindings = def.bindings;\n var changed = false;\n for (var i = 0; i < values.length; i++) {\n // Note: We need to loop over all values, so that\n // the old values are updates as well!\n if (checkAndUpdateBinding(view, def, i, values[i])) {\n changed = true;\n }\n }\n if (changed) {\n var data = asPureExpressionData(view, def.nodeIndex);\n var value = void 0;\n switch (def.flags & 201347067 /* Types */) {\n case 32 /* TypePureArray */:\n value = values;\n break;\n case 64 /* TypePureObject */:\n value = {};\n for (var i = 0; i < values.length; i++) {\n value[bindings[i].name] = values[i];\n }\n break;\n case 128 /* TypePurePipe */:\n var pipe = values[0];\n var params = values.slice(1);\n value = pipe.transform.apply(pipe, __spread(params));\n break;\n }\n data.value = value;\n }\n return changed;\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 function textDef(checkIndex, ngContentIndex, staticText) {\n var bindings = [];\n for (var i = 1; i < staticText.length; i++) {\n bindings[i - 1] = {\n flags: 8 /* TypeProperty */,\n name: null,\n ns: null,\n nonMinifiedName: null,\n securityContext: null,\n suffix: staticText[i],\n };\n }\n return {\n // will bet set by the view definition\n nodeIndex: -1,\n parent: null,\n renderParent: null,\n bindingIndex: -1,\n outputIndex: -1,\n // regular values\n checkIndex: checkIndex,\n flags: 2 /* TypeText */,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0,\n matchedQueries: {},\n matchedQueryIds: 0,\n references: {},\n ngContentIndex: ngContentIndex,\n childCount: 0,\n bindings: bindings,\n bindingFlags: 8 /* TypeProperty */,\n outputs: [],\n element: null,\n provider: null,\n text: { prefix: staticText[0] },\n query: null,\n ngContent: null,\n };\n }\n function createText(view, renderHost, def) {\n var renderNode;\n var renderer = view.renderer;\n renderNode = renderer.createText(def.text.prefix);\n var parentEl = getParentRenderElement(view, renderHost, def);\n if (parentEl) {\n renderer.appendChild(parentEl, renderNode);\n }\n return { renderText: renderNode };\n }\n function checkAndUpdateTextInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n var changed = false;\n var bindings = def.bindings;\n var bindLen = bindings.length;\n if (bindLen > 0 && checkAndUpdateBinding(view, def, 0, v0))\n changed = true;\n if (bindLen > 1 && checkAndUpdateBinding(view, def, 1, v1))\n changed = true;\n if (bindLen > 2 && checkAndUpdateBinding(view, def, 2, v2))\n changed = true;\n if (bindLen > 3 && checkAndUpdateBinding(view, def, 3, v3))\n changed = true;\n if (bindLen > 4 && checkAndUpdateBinding(view, def, 4, v4))\n changed = true;\n if (bindLen > 5 && checkAndUpdateBinding(view, def, 5, v5))\n changed = true;\n if (bindLen > 6 && checkAndUpdateBinding(view, def, 6, v6))\n changed = true;\n if (bindLen > 7 && checkAndUpdateBinding(view, def, 7, v7))\n changed = true;\n if (bindLen > 8 && checkAndUpdateBinding(view, def, 8, v8))\n changed = true;\n if (bindLen > 9 && checkAndUpdateBinding(view, def, 9, v9))\n changed = true;\n if (changed) {\n var value = def.text.prefix;\n if (bindLen > 0)\n value += _addInterpolationPart(v0, bindings[0]);\n if (bindLen > 1)\n value += _addInterpolationPart(v1, bindings[1]);\n if (bindLen > 2)\n value += _addInterpolationPart(v2, bindings[2]);\n if (bindLen > 3)\n value += _addInterpolationPart(v3, bindings[3]);\n if (bindLen > 4)\n value += _addInterpolationPart(v4, bindings[4]);\n if (bindLen > 5)\n value += _addInterpolationPart(v5, bindings[5]);\n if (bindLen > 6)\n value += _addInterpolationPart(v6, bindings[6]);\n if (bindLen > 7)\n value += _addInterpolationPart(v7, bindings[7]);\n if (bindLen > 8)\n value += _addInterpolationPart(v8, bindings[8]);\n if (bindLen > 9)\n value += _addInterpolationPart(v9, bindings[9]);\n var renderNode = asTextData(view, def.nodeIndex).renderText;\n view.renderer.setValue(renderNode, value);\n }\n return changed;\n }\n function checkAndUpdateTextDynamic(view, def, values) {\n var bindings = def.bindings;\n var changed = false;\n for (var i = 0; i < values.length; i++) {\n // Note: We need to loop over all values, so that\n // the old values are updates as well!\n if (checkAndUpdateBinding(view, def, i, values[i])) {\n changed = true;\n }\n }\n if (changed) {\n var value = '';\n for (var i = 0; i < values.length; i++) {\n value = value + _addInterpolationPart(values[i], bindings[i]);\n }\n value = def.text.prefix + value;\n var renderNode = asTextData(view, def.nodeIndex).renderText;\n view.renderer.setValue(renderNode, value);\n }\n return changed;\n }\n function _addInterpolationPart(value, binding) {\n var valueStr = value != null ? value.toString() : '';\n return valueStr + binding.suffix;\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 function viewDef(flags, nodes, updateDirectives, updateRenderer) {\n // clone nodes and set auto calculated values\n var viewBindingCount = 0;\n var viewDisposableCount = 0;\n var viewNodeFlags = 0;\n var viewRootNodeFlags = 0;\n var viewMatchedQueries = 0;\n var currentParent = null;\n var currentRenderParent = null;\n var currentElementHasPublicProviders = false;\n var currentElementHasPrivateProviders = false;\n var lastRenderRootNode = null;\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n node.nodeIndex = i;\n node.parent = currentParent;\n node.bindingIndex = viewBindingCount;\n node.outputIndex = viewDisposableCount;\n node.renderParent = currentRenderParent;\n viewNodeFlags |= node.flags;\n viewMatchedQueries |= node.matchedQueryIds;\n if (node.element) {\n var elDef = node.element;\n elDef.publicProviders =\n currentParent ? currentParent.element.publicProviders : Object.create(null);\n elDef.allProviders = elDef.publicProviders;\n // Note: We assume that all providers of an element are before any child element!\n currentElementHasPublicProviders = false;\n currentElementHasPrivateProviders = false;\n if (node.element.template) {\n viewMatchedQueries |= node.element.template.nodeMatchedQueries;\n }\n }\n validateNode(currentParent, node, nodes.length);\n viewBindingCount += node.bindings.length;\n viewDisposableCount += node.outputs.length;\n if (!currentRenderParent && (node.flags & 3 /* CatRenderNode */)) {\n lastRenderRootNode = node;\n }\n if (node.flags & 20224 /* CatProvider */) {\n if (!currentElementHasPublicProviders) {\n currentElementHasPublicProviders = true;\n // Use prototypical inheritance to not get O(n^2) complexity...\n currentParent.element.publicProviders =\n Object.create(currentParent.element.publicProviders);\n currentParent.element.allProviders = currentParent.element.publicProviders;\n }\n var isPrivateService = (node.flags & 8192 /* PrivateProvider */) !== 0;\n var isComponent = (node.flags & 32768 /* Component */) !== 0;\n if (!isPrivateService || isComponent) {\n currentParent.element.publicProviders[tokenKey(node.provider.token)] = node;\n }\n else {\n if (!currentElementHasPrivateProviders) {\n currentElementHasPrivateProviders = true;\n // Use prototypical inheritance to not get O(n^2) complexity...\n currentParent.element.allProviders =\n Object.create(currentParent.element.publicProviders);\n }\n currentParent.element.allProviders[tokenKey(node.provider.token)] = node;\n }\n if (isComponent) {\n currentParent.element.componentProvider = node;\n }\n }\n if (currentParent) {\n currentParent.childFlags |= node.flags;\n currentParent.directChildFlags |= node.flags;\n currentParent.childMatchedQueries |= node.matchedQueryIds;\n if (node.element && node.element.template) {\n currentParent.childMatchedQueries |= node.element.template.nodeMatchedQueries;\n }\n }\n else {\n viewRootNodeFlags |= node.flags;\n }\n if (node.childCount > 0) {\n currentParent = node;\n if (!isNgContainer(node)) {\n currentRenderParent = node;\n }\n }\n else {\n // When the current node has no children, check if it is the last children of its parent.\n // When it is, propagate the flags up.\n // The loop is required because an element could be the last transitive children of several\n // elements. We loop to either the root or the highest opened element (= with remaining\n // children)\n while (currentParent && i === currentParent.nodeIndex + currentParent.childCount) {\n var newParent = currentParent.parent;\n if (newParent) {\n newParent.childFlags |= currentParent.childFlags;\n newParent.childMatchedQueries |= currentParent.childMatchedQueries;\n }\n currentParent = newParent;\n // We also need to update the render parent & account for ng-container\n if (currentParent && isNgContainer(currentParent)) {\n currentRenderParent = currentParent.renderParent;\n }\n else {\n currentRenderParent = currentParent;\n }\n }\n }\n }\n var handleEvent = function (view, nodeIndex, eventName, event) { return nodes[nodeIndex].element.handleEvent(view, eventName, event); };\n return {\n // Will be filled later...\n factory: null,\n nodeFlags: viewNodeFlags,\n rootNodeFlags: viewRootNodeFlags,\n nodeMatchedQueries: viewMatchedQueries,\n flags: flags,\n nodes: nodes,\n updateDirectives: updateDirectives || NOOP,\n updateRenderer: updateRenderer || NOOP,\n handleEvent: handleEvent,\n bindingCount: viewBindingCount,\n outputCount: viewDisposableCount,\n lastRenderRootNode: lastRenderRootNode\n };\n }\n function isNgContainer(node) {\n return (node.flags & 1 /* TypeElement */) !== 0 && node.element.name === null;\n }\n function validateNode(parent, node, nodeCount) {\n var template = node.element && node.element.template;\n if (template) {\n if (!template.lastRenderRootNode) {\n throw new Error(\"Illegal State: Embedded templates without nodes are not allowed!\");\n }\n if (template.lastRenderRootNode &&\n template.lastRenderRootNode.flags & 16777216 /* EmbeddedViews */) {\n throw new Error(\"Illegal State: Last root node of a template can't have embedded views, at index \" + node.nodeIndex + \"!\");\n }\n }\n if (node.flags & 20224 /* CatProvider */) {\n var parentFlags = parent ? parent.flags : 0;\n if ((parentFlags & 1 /* TypeElement */) === 0) {\n throw new Error(\"Illegal State: StaticProvider/Directive nodes need to be children of elements or anchors, at index \" + node.nodeIndex + \"!\");\n }\n }\n if (node.query) {\n if (node.flags & 67108864 /* TypeContentQuery */ &&\n (!parent || (parent.flags & 16384 /* TypeDirective */) === 0)) {\n throw new Error(\"Illegal State: Content Query nodes need to be children of directives, at index \" + node.nodeIndex + \"!\");\n }\n if (node.flags & 134217728 /* TypeViewQuery */ && parent) {\n throw new Error(\"Illegal State: View Query nodes have to be top level nodes, at index \" + node.nodeIndex + \"!\");\n }\n }\n if (node.childCount) {\n var parentEnd = parent ? parent.nodeIndex + parent.childCount : nodeCount - 1;\n if (node.nodeIndex <= parentEnd && node.nodeIndex + node.childCount > parentEnd) {\n throw new Error(\"Illegal State: childCount of node leads outside of parent, at index \" + node.nodeIndex + \"!\");\n }\n }\n }\n function createEmbeddedView(parent, anchorDef, viewDef, context) {\n // embedded views are seen as siblings to the anchor, so we need\n // to get the parent of the anchor and use it as parentIndex.\n var view = createView(parent.root, parent.renderer, parent, anchorDef, viewDef);\n initView(view, parent.component, context);\n createViewNodes(view);\n return view;\n }\n function createRootView(root, def, context) {\n var view = createView(root, root.renderer, null, null, def);\n initView(view, context, context);\n createViewNodes(view);\n return view;\n }\n function createComponentView(parentView, nodeDef, viewDef, hostElement) {\n var rendererType = nodeDef.element.componentRendererType;\n var compRenderer;\n if (!rendererType) {\n compRenderer = parentView.root.renderer;\n }\n else {\n compRenderer = parentView.root.rendererFactory.createRenderer(hostElement, rendererType);\n }\n return createView(parentView.root, compRenderer, parentView, nodeDef.element.componentProvider, viewDef);\n }\n function createView(root, renderer, parent, parentNodeDef, def) {\n var nodes = new Array(def.nodes.length);\n var disposables = def.outputCount ? new Array(def.outputCount) : null;\n var view = {\n def: def,\n parent: parent,\n viewContainerParent: null,\n parentNodeDef: parentNodeDef,\n context: null,\n component: null,\n nodes: nodes,\n state: 13 /* CatInit */,\n root: root,\n renderer: renderer,\n oldValues: new Array(def.bindingCount),\n disposables: disposables,\n initIndex: -1\n };\n return view;\n }\n function initView(view, component, context) {\n view.component = component;\n view.context = context;\n }\n function createViewNodes(view) {\n var renderHost;\n if (isComponentView(view)) {\n var hostDef = view.parentNodeDef;\n renderHost = asElementData(view.parent, hostDef.parent.nodeIndex).renderElement;\n }\n var def = view.def;\n var nodes = view.nodes;\n for (var i = 0; i < def.nodes.length; i++) {\n var nodeDef = def.nodes[i];\n Services.setCurrentNode(view, i);\n var nodeData = void 0;\n switch (nodeDef.flags & 201347067 /* Types */) {\n case 1 /* TypeElement */:\n var el = createElement(view, renderHost, nodeDef);\n var componentView = undefined;\n if (nodeDef.flags & 33554432 /* ComponentView */) {\n var compViewDef = resolveDefinition(nodeDef.element.componentView);\n componentView = Services.createComponentView(view, nodeDef, compViewDef, el);\n }\n listenToElementOutputs(view, componentView, nodeDef, el);\n nodeData = {\n renderElement: el,\n componentView: componentView,\n viewContainer: null,\n template: nodeDef.element.template ? createTemplateData(view, nodeDef) : undefined\n };\n if (nodeDef.flags & 16777216 /* EmbeddedViews */) {\n nodeData.viewContainer = createViewContainerData(view, nodeDef, nodeData);\n }\n break;\n case 2 /* TypeText */:\n nodeData = createText(view, renderHost, nodeDef);\n break;\n case 512 /* TypeClassProvider */:\n case 1024 /* TypeFactoryProvider */:\n case 2048 /* TypeUseExistingProvider */:\n case 256 /* TypeValueProvider */: {\n nodeData = nodes[i];\n if (!nodeData && !(nodeDef.flags & 4096 /* LazyProvider */)) {\n var instance = createProviderInstance(view, nodeDef);\n nodeData = { instance: instance };\n }\n break;\n }\n case 16 /* TypePipe */: {\n var instance = createPipeInstance(view, nodeDef);\n nodeData = { instance: instance };\n break;\n }\n case 16384 /* TypeDirective */: {\n nodeData = nodes[i];\n if (!nodeData) {\n var instance = createDirectiveInstance(view, nodeDef);\n nodeData = { instance: instance };\n }\n if (nodeDef.flags & 32768 /* Component */) {\n var compView = asElementData(view, nodeDef.parent.nodeIndex).componentView;\n initView(compView, nodeData.instance, nodeData.instance);\n }\n break;\n }\n case 32 /* TypePureArray */:\n case 64 /* TypePureObject */:\n case 128 /* TypePurePipe */:\n nodeData = createPureExpression(view, nodeDef);\n break;\n case 67108864 /* TypeContentQuery */:\n case 134217728 /* TypeViewQuery */:\n nodeData = createQuery((nodeDef.flags & -2147483648 /* EmitDistinctChangesOnly */) ===\n -2147483648 /* EmitDistinctChangesOnly */);\n break;\n case 8 /* TypeNgContent */:\n appendNgContent(view, renderHost, nodeDef);\n // no runtime data needed for NgContent...\n nodeData = undefined;\n break;\n }\n nodes[i] = nodeData;\n }\n // Create the ViewData.nodes of component views after we created everything else,\n // so that e.g. ng-content works\n execComponentViewsAction(view, ViewAction.CreateViewNodes);\n // fill static content and view queries\n execQueriesAction(view, 67108864 /* TypeContentQuery */ | 134217728 /* TypeViewQuery */, 268435456 /* StaticQuery */, 0 /* CheckAndUpdate */);\n }\n function checkNoChangesView(view) {\n markProjectedViewsForCheck(view);\n Services.updateDirectives(view, 1 /* CheckNoChanges */);\n execEmbeddedViewsAction(view, ViewAction.CheckNoChanges);\n Services.updateRenderer(view, 1 /* CheckNoChanges */);\n execComponentViewsAction(view, ViewAction.CheckNoChanges);\n // Note: We don't check queries for changes as we didn't do this in v2.x.\n // TODO(tbosch): investigate if we can enable the check again in v5.x with a nicer error message.\n view.state &= ~(64 /* CheckProjectedViews */ | 32 /* CheckProjectedView */);\n }\n function checkAndUpdateView(view) {\n if (view.state & 1 /* BeforeFirstCheck */) {\n view.state &= ~1 /* BeforeFirstCheck */;\n view.state |= 2 /* FirstCheck */;\n }\n else {\n view.state &= ~2 /* FirstCheck */;\n }\n shiftInitState(view, 0 /* InitState_BeforeInit */, 256 /* InitState_CallingOnInit */);\n markProjectedViewsForCheck(view);\n Services.updateDirectives(view, 0 /* CheckAndUpdate */);\n execEmbeddedViewsAction(view, ViewAction.CheckAndUpdate);\n execQueriesAction(view, 67108864 /* TypeContentQuery */, 536870912 /* DynamicQuery */, 0 /* CheckAndUpdate */);\n var callInit = shiftInitState(view, 256 /* InitState_CallingOnInit */, 512 /* InitState_CallingAfterContentInit */);\n callLifecycleHooksChildrenFirst(view, 2097152 /* AfterContentChecked */ | (callInit ? 1048576 /* AfterContentInit */ : 0));\n Services.updateRenderer(view, 0 /* CheckAndUpdate */);\n execComponentViewsAction(view, ViewAction.CheckAndUpdate);\n execQueriesAction(view, 134217728 /* TypeViewQuery */, 536870912 /* DynamicQuery */, 0 /* CheckAndUpdate */);\n callInit = shiftInitState(view, 512 /* InitState_CallingAfterContentInit */, 768 /* InitState_CallingAfterViewInit */);\n callLifecycleHooksChildrenFirst(view, 8388608 /* AfterViewChecked */ | (callInit ? 4194304 /* AfterViewInit */ : 0));\n if (view.def.flags & 2 /* OnPush */) {\n view.state &= ~8 /* ChecksEnabled */;\n }\n view.state &= ~(64 /* CheckProjectedViews */ | 32 /* CheckProjectedView */);\n shiftInitState(view, 768 /* InitState_CallingAfterViewInit */, 1024 /* InitState_AfterInit */);\n }\n function checkAndUpdateNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n if (argStyle === 0 /* Inline */) {\n return checkAndUpdateNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n }\n else {\n return checkAndUpdateNodeDynamic(view, nodeDef, v0);\n }\n }\n function markProjectedViewsForCheck(view) {\n var def = view.def;\n if (!(def.nodeFlags & 4 /* ProjectedTemplate */)) {\n return;\n }\n for (var i = 0; i < def.nodes.length; i++) {\n var nodeDef = def.nodes[i];\n if (nodeDef.flags & 4 /* ProjectedTemplate */) {\n var projectedViews = asElementData(view, i).template._projectedViews;\n if (projectedViews) {\n for (var i_1 = 0; i_1 < projectedViews.length; i_1++) {\n var projectedView = projectedViews[i_1];\n projectedView.state |= 32 /* CheckProjectedView */;\n markParentViewsForCheckProjectedViews(projectedView, view);\n }\n }\n }\n else if ((nodeDef.childFlags & 4 /* ProjectedTemplate */) === 0) {\n // a parent with leafs\n // no child is a component,\n // then skip the children\n i += nodeDef.childCount;\n }\n }\n }\n function checkAndUpdateNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n switch (nodeDef.flags & 201347067 /* Types */) {\n case 1 /* TypeElement */:\n return checkAndUpdateElementInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n case 2 /* TypeText */:\n return checkAndUpdateTextInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n case 16384 /* TypeDirective */:\n return checkAndUpdateDirectiveInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n case 32 /* TypePureArray */:\n case 64 /* TypePureObject */:\n case 128 /* TypePurePipe */:\n return checkAndUpdatePureExpressionInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n default:\n throw 'unreachable';\n }\n }\n function checkAndUpdateNodeDynamic(view, nodeDef, values) {\n switch (nodeDef.flags & 201347067 /* Types */) {\n case 1 /* TypeElement */:\n return checkAndUpdateElementDynamic(view, nodeDef, values);\n case 2 /* TypeText */:\n return checkAndUpdateTextDynamic(view, nodeDef, values);\n case 16384 /* TypeDirective */:\n return checkAndUpdateDirectiveDynamic(view, nodeDef, values);\n case 32 /* TypePureArray */:\n case 64 /* TypePureObject */:\n case 128 /* TypePurePipe */:\n return checkAndUpdatePureExpressionDynamic(view, nodeDef, values);\n default:\n throw 'unreachable';\n }\n }\n function checkNoChangesNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n if (argStyle === 0 /* Inline */) {\n checkNoChangesNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n }\n else {\n checkNoChangesNodeDynamic(view, nodeDef, v0);\n }\n // Returning false is ok here as we would have thrown in case of a change.\n return false;\n }\n function checkNoChangesNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n var bindLen = nodeDef.bindings.length;\n if (bindLen > 0)\n checkBindingNoChanges(view, nodeDef, 0, v0);\n if (bindLen > 1)\n checkBindingNoChanges(view, nodeDef, 1, v1);\n if (bindLen > 2)\n checkBindingNoChanges(view, nodeDef, 2, v2);\n if (bindLen > 3)\n checkBindingNoChanges(view, nodeDef, 3, v3);\n if (bindLen > 4)\n checkBindingNoChanges(view, nodeDef, 4, v4);\n if (bindLen > 5)\n checkBindingNoChanges(view, nodeDef, 5, v5);\n if (bindLen > 6)\n checkBindingNoChanges(view, nodeDef, 6, v6);\n if (bindLen > 7)\n checkBindingNoChanges(view, nodeDef, 7, v7);\n if (bindLen > 8)\n checkBindingNoChanges(view, nodeDef, 8, v8);\n if (bindLen > 9)\n checkBindingNoChanges(view, nodeDef, 9, v9);\n }\n function checkNoChangesNodeDynamic(view, nodeDef, values) {\n for (var i = 0; i < values.length; i++) {\n checkBindingNoChanges(view, nodeDef, i, values[i]);\n }\n }\n /**\n * Workaround https://github.com/angular/tsickle/issues/497\n * @suppress {misplacedTypeAnnotation}\n */\n function checkNoChangesQuery(view, nodeDef) {\n var queryList = asQueryList(view, nodeDef.nodeIndex);\n if (queryList.dirty) {\n throw expressionChangedAfterItHasBeenCheckedError(Services.createDebugContext(view, nodeDef.nodeIndex), \"Query \" + nodeDef.query.id + \" not dirty\", \"Query \" + nodeDef.query.id + \" dirty\", (view.state & 1 /* BeforeFirstCheck */) !== 0);\n }\n }\n function destroyView(view) {\n if (view.state & 128 /* Destroyed */) {\n return;\n }\n execEmbeddedViewsAction(view, ViewAction.Destroy);\n execComponentViewsAction(view, ViewAction.Destroy);\n callLifecycleHooksChildrenFirst(view, 131072 /* OnDestroy */);\n if (view.disposables) {\n for (var i = 0; i < view.disposables.length; i++) {\n view.disposables[i]();\n }\n }\n detachProjectedView(view);\n if (view.renderer.destroyNode) {\n destroyViewNodes(view);\n }\n if (isComponentView(view)) {\n view.renderer.destroy();\n }\n view.state |= 128 /* Destroyed */;\n }\n function destroyViewNodes(view) {\n var len = view.def.nodes.length;\n for (var i = 0; i < len; i++) {\n var def = view.def.nodes[i];\n if (def.flags & 1 /* TypeElement */) {\n view.renderer.destroyNode(asElementData(view, i).renderElement);\n }\n else if (def.flags & 2 /* TypeText */) {\n view.renderer.destroyNode(asTextData(view, i).renderText);\n }\n else if (def.flags & 67108864 /* TypeContentQuery */ || def.flags & 134217728 /* TypeViewQuery */) {\n asQueryList(view, i).destroy();\n }\n }\n }\n var ViewAction;\n (function (ViewAction) {\n ViewAction[ViewAction[\"CreateViewNodes\"] = 0] = \"CreateViewNodes\";\n ViewAction[ViewAction[\"CheckNoChanges\"] = 1] = \"CheckNoChanges\";\n ViewAction[ViewAction[\"CheckNoChangesProjectedViews\"] = 2] = \"CheckNoChangesProjectedViews\";\n ViewAction[ViewAction[\"CheckAndUpdate\"] = 3] = \"CheckAndUpdate\";\n ViewAction[ViewAction[\"CheckAndUpdateProjectedViews\"] = 4] = \"CheckAndUpdateProjectedViews\";\n ViewAction[ViewAction[\"Destroy\"] = 5] = \"Destroy\";\n })(ViewAction || (ViewAction = {}));\n function execComponentViewsAction(view, action) {\n var def = view.def;\n if (!(def.nodeFlags & 33554432 /* ComponentView */)) {\n return;\n }\n for (var i = 0; i < def.nodes.length; i++) {\n var nodeDef = def.nodes[i];\n if (nodeDef.flags & 33554432 /* ComponentView */) {\n // a leaf\n callViewAction(asElementData(view, i).componentView, action);\n }\n else if ((nodeDef.childFlags & 33554432 /* ComponentView */) === 0) {\n // a parent with leafs\n // no child is a component,\n // then skip the children\n i += nodeDef.childCount;\n }\n }\n }\n function execEmbeddedViewsAction(view, action) {\n var def = view.def;\n if (!(def.nodeFlags & 16777216 /* EmbeddedViews */)) {\n return;\n }\n for (var i = 0; i < def.nodes.length; i++) {\n var nodeDef = def.nodes[i];\n if (nodeDef.flags & 16777216 /* EmbeddedViews */) {\n // a leaf\n var embeddedViews = asElementData(view, i).viewContainer._embeddedViews;\n for (var k = 0; k < embeddedViews.length; k++) {\n callViewAction(embeddedViews[k], action);\n }\n }\n else if ((nodeDef.childFlags & 16777216 /* EmbeddedViews */) === 0) {\n // a parent with leafs\n // no child is a component,\n // then skip the children\n i += nodeDef.childCount;\n }\n }\n }\n function callViewAction(view, action) {\n var viewState = view.state;\n switch (action) {\n case ViewAction.CheckNoChanges:\n if ((viewState & 128 /* Destroyed */) === 0) {\n if ((viewState & 12 /* CatDetectChanges */) === 12 /* CatDetectChanges */) {\n checkNoChangesView(view);\n }\n else if (viewState & 64 /* CheckProjectedViews */) {\n execProjectedViewsAction(view, ViewAction.CheckNoChangesProjectedViews);\n }\n }\n break;\n case ViewAction.CheckNoChangesProjectedViews:\n if ((viewState & 128 /* Destroyed */) === 0) {\n if (viewState & 32 /* CheckProjectedView */) {\n checkNoChangesView(view);\n }\n else if (viewState & 64 /* CheckProjectedViews */) {\n execProjectedViewsAction(view, action);\n }\n }\n break;\n case ViewAction.CheckAndUpdate:\n if ((viewState & 128 /* Destroyed */) === 0) {\n if ((viewState & 12 /* CatDetectChanges */) === 12 /* CatDetectChanges */) {\n checkAndUpdateView(view);\n }\n else if (viewState & 64 /* CheckProjectedViews */) {\n execProjectedViewsAction(view, ViewAction.CheckAndUpdateProjectedViews);\n }\n }\n break;\n case ViewAction.CheckAndUpdateProjectedViews:\n if ((viewState & 128 /* Destroyed */) === 0) {\n if (viewState & 32 /* CheckProjectedView */) {\n checkAndUpdateView(view);\n }\n else if (viewState & 64 /* CheckProjectedViews */) {\n execProjectedViewsAction(view, action);\n }\n }\n break;\n case ViewAction.Destroy:\n // Note: destroyView recurses over all views,\n // so we don't need to special case projected views here.\n destroyView(view);\n break;\n case ViewAction.CreateViewNodes:\n createViewNodes(view);\n break;\n }\n }\n function execProjectedViewsAction(view, action) {\n execEmbeddedViewsAction(view, action);\n execComponentViewsAction(view, action);\n }\n function execQueriesAction(view, queryFlags, staticDynamicQueryFlag, checkType) {\n if (!(view.def.nodeFlags & queryFlags) || !(view.def.nodeFlags & staticDynamicQueryFlag)) {\n return;\n }\n var nodeCount = view.def.nodes.length;\n for (var i = 0; i < nodeCount; i++) {\n var nodeDef = view.def.nodes[i];\n if ((nodeDef.flags & queryFlags) && (nodeDef.flags & staticDynamicQueryFlag)) {\n Services.setCurrentNode(view, nodeDef.nodeIndex);\n switch (checkType) {\n case 0 /* CheckAndUpdate */:\n checkAndUpdateQuery(view, nodeDef);\n break;\n case 1 /* CheckNoChanges */:\n checkNoChangesQuery(view, nodeDef);\n break;\n }\n }\n if (!(nodeDef.childFlags & queryFlags) || !(nodeDef.childFlags & staticDynamicQueryFlag)) {\n // no child has a matching query\n // then skip the children\n i += nodeDef.childCount;\n }\n }\n }\n\n var initialized = false;\n function initServicesIfNeeded() {\n if (initialized) {\n return;\n }\n initialized = true;\n var services = isDevMode() ? createDebugServices() : createProdServices();\n Services.setCurrentNode = services.setCurrentNode;\n Services.createRootView = services.createRootView;\n Services.createEmbeddedView = services.createEmbeddedView;\n Services.createComponentView = services.createComponentView;\n Services.createNgModuleRef = services.createNgModuleRef;\n Services.overrideProvider = services.overrideProvider;\n Services.overrideComponentView = services.overrideComponentView;\n Services.clearOverrides = services.clearOverrides;\n Services.checkAndUpdateView = services.checkAndUpdateView;\n Services.checkNoChangesView = services.checkNoChangesView;\n Services.destroyView = services.destroyView;\n Services.resolveDep = resolveDep;\n Services.createDebugContext = services.createDebugContext;\n Services.handleEvent = services.handleEvent;\n Services.updateDirectives = services.updateDirectives;\n Services.updateRenderer = services.updateRenderer;\n Services.dirtyParentQueries = dirtyParentQueries;\n }\n function createProdServices() {\n return {\n setCurrentNode: function () { },\n createRootView: createProdRootView,\n createEmbeddedView: createEmbeddedView,\n createComponentView: createComponentView,\n createNgModuleRef: createNgModuleRef,\n overrideProvider: NOOP,\n overrideComponentView: NOOP,\n clearOverrides: NOOP,\n checkAndUpdateView: checkAndUpdateView,\n checkNoChangesView: checkNoChangesView,\n destroyView: destroyView,\n createDebugContext: function (view, nodeIndex) { return new DebugContext_(view, nodeIndex); },\n handleEvent: function (view, nodeIndex, eventName, event) { return view.def.handleEvent(view, nodeIndex, eventName, event); },\n updateDirectives: function (view, checkType) { return view.def.updateDirectives(checkType === 0 /* CheckAndUpdate */ ? prodCheckAndUpdateNode : prodCheckNoChangesNode, view); },\n updateRenderer: function (view, checkType) { return view.def.updateRenderer(checkType === 0 /* CheckAndUpdate */ ? prodCheckAndUpdateNode : prodCheckNoChangesNode, view); },\n };\n }\n function createDebugServices() {\n return {\n setCurrentNode: debugSetCurrentNode,\n createRootView: debugCreateRootView,\n createEmbeddedView: debugCreateEmbeddedView,\n createComponentView: debugCreateComponentView,\n createNgModuleRef: debugCreateNgModuleRef,\n overrideProvider: debugOverrideProvider,\n overrideComponentView: debugOverrideComponentView,\n clearOverrides: debugClearOverrides,\n checkAndUpdateView: debugCheckAndUpdateView,\n checkNoChangesView: debugCheckNoChangesView,\n destroyView: debugDestroyView,\n createDebugContext: function (view, nodeIndex) { return new DebugContext_(view, nodeIndex); },\n handleEvent: debugHandleEvent,\n updateDirectives: debugUpdateDirectives,\n updateRenderer: debugUpdateRenderer,\n };\n }\n function createProdRootView(elInjector, projectableNodes, rootSelectorOrNode, def, ngModule, context) {\n var rendererFactory = ngModule.injector.get(RendererFactory2);\n return createRootView(createRootData(elInjector, ngModule, rendererFactory, projectableNodes, rootSelectorOrNode), def, context);\n }\n function debugCreateRootView(elInjector, projectableNodes, rootSelectorOrNode, def, ngModule, context) {\n var rendererFactory = ngModule.injector.get(RendererFactory2);\n var root = createRootData(elInjector, ngModule, new DebugRendererFactory2(rendererFactory), projectableNodes, rootSelectorOrNode);\n var defWithOverride = applyProviderOverridesToView(def);\n return callWithDebugContext(DebugAction.create, createRootView, null, [root, defWithOverride, context]);\n }\n function createRootData(elInjector, ngModule, rendererFactory, projectableNodes, rootSelectorOrNode) {\n var sanitizer = ngModule.injector.get(Sanitizer);\n var errorHandler = ngModule.injector.get(ErrorHandler);\n var renderer = rendererFactory.createRenderer(null, null);\n return {\n ngModule: ngModule,\n injector: elInjector,\n projectableNodes: projectableNodes,\n selectorOrNode: rootSelectorOrNode,\n sanitizer: sanitizer,\n rendererFactory: rendererFactory,\n renderer: renderer,\n errorHandler: errorHandler\n };\n }\n function debugCreateEmbeddedView(parentView, anchorDef, viewDef, context) {\n var defWithOverride = applyProviderOverridesToView(viewDef);\n return callWithDebugContext(DebugAction.create, createEmbeddedView, null, [parentView, anchorDef, defWithOverride, context]);\n }\n function debugCreateComponentView(parentView, nodeDef, viewDef, hostElement) {\n var overrideComponentView = viewDefOverrides.get(nodeDef.element.componentProvider.provider.token);\n if (overrideComponentView) {\n viewDef = overrideComponentView;\n }\n else {\n viewDef = applyProviderOverridesToView(viewDef);\n }\n return callWithDebugContext(DebugAction.create, createComponentView, null, [parentView, nodeDef, viewDef, hostElement]);\n }\n function debugCreateNgModuleRef(moduleType, parentInjector, bootstrapComponents, def) {\n var defWithOverride = applyProviderOverridesToNgModule(def);\n return createNgModuleRef(moduleType, parentInjector, bootstrapComponents, defWithOverride);\n }\n var providerOverrides = new Map();\n var providerOverridesWithScope = new Map();\n var viewDefOverrides = new Map();\n function debugOverrideProvider(override) {\n providerOverrides.set(override.token, override);\n var injectableDef;\n if (typeof override.token === 'function' && (injectableDef = getInjectableDef(override.token)) &&\n typeof injectableDef.providedIn === 'function') {\n providerOverridesWithScope.set(override.token, override);\n }\n }\n function debugOverrideComponentView(comp, compFactory) {\n var hostViewDef = resolveDefinition(getComponentViewDefinitionFactory(compFactory));\n var compViewDef = resolveDefinition(hostViewDef.nodes[0].element.componentView);\n viewDefOverrides.set(comp, compViewDef);\n }\n function debugClearOverrides() {\n providerOverrides.clear();\n providerOverridesWithScope.clear();\n viewDefOverrides.clear();\n }\n // Notes about the algorithm:\n // 1) Locate the providers of an element and check if one of them was overwritten\n // 2) Change the providers of that element\n //\n // We only create new datastructures if we need to, to keep perf impact\n // reasonable.\n function applyProviderOverridesToView(def) {\n if (providerOverrides.size === 0) {\n return def;\n }\n var elementIndicesWithOverwrittenProviders = findElementIndicesWithOverwrittenProviders(def);\n if (elementIndicesWithOverwrittenProviders.length === 0) {\n return def;\n }\n // clone the whole view definition,\n // as it maintains references between the nodes that are hard to update.\n def = def.factory(function () { return NOOP; });\n for (var i = 0; i < elementIndicesWithOverwrittenProviders.length; i++) {\n applyProviderOverridesToElement(def, elementIndicesWithOverwrittenProviders[i]);\n }\n return def;\n function findElementIndicesWithOverwrittenProviders(def) {\n var elIndicesWithOverwrittenProviders = [];\n var lastElementDef = null;\n for (var i = 0; i < def.nodes.length; i++) {\n var nodeDef = def.nodes[i];\n if (nodeDef.flags & 1 /* TypeElement */) {\n lastElementDef = nodeDef;\n }\n if (lastElementDef && nodeDef.flags & 3840 /* CatProviderNoDirective */ &&\n providerOverrides.has(nodeDef.provider.token)) {\n elIndicesWithOverwrittenProviders.push(lastElementDef.nodeIndex);\n lastElementDef = null;\n }\n }\n return elIndicesWithOverwrittenProviders;\n }\n function applyProviderOverridesToElement(viewDef, elIndex) {\n for (var i = elIndex + 1; i < viewDef.nodes.length; i++) {\n var nodeDef = viewDef.nodes[i];\n if (nodeDef.flags & 1 /* TypeElement */) {\n // stop at the next element\n return;\n }\n if (nodeDef.flags & 3840 /* CatProviderNoDirective */) {\n var provider = nodeDef.provider;\n var override = providerOverrides.get(provider.token);\n if (override) {\n nodeDef.flags = (nodeDef.flags & ~3840 /* CatProviderNoDirective */) | override.flags;\n provider.deps = splitDepsDsl(override.deps);\n provider.value = override.value;\n }\n }\n }\n }\n }\n // Notes about the algorithm:\n // We only create new datastructures if we need to, to keep perf impact\n // reasonable.\n function applyProviderOverridesToNgModule(def) {\n var _a = calcHasOverrides(def), hasOverrides = _a.hasOverrides, hasDeprecatedOverrides = _a.hasDeprecatedOverrides;\n if (!hasOverrides) {\n return def;\n }\n // clone the whole view definition,\n // as it maintains references between the nodes that are hard to update.\n def = def.factory(function () { return NOOP; });\n applyProviderOverrides(def);\n return def;\n function calcHasOverrides(def) {\n var hasOverrides = false;\n var hasDeprecatedOverrides = false;\n if (providerOverrides.size === 0) {\n return { hasOverrides: hasOverrides, hasDeprecatedOverrides: hasDeprecatedOverrides };\n }\n def.providers.forEach(function (node) {\n var override = providerOverrides.get(node.token);\n if ((node.flags & 3840 /* CatProviderNoDirective */) && override) {\n hasOverrides = true;\n hasDeprecatedOverrides = hasDeprecatedOverrides || override.deprecatedBehavior;\n }\n });\n def.modules.forEach(function (module) {\n providerOverridesWithScope.forEach(function (override, token) {\n if (getInjectableDef(token).providedIn === module) {\n hasOverrides = true;\n hasDeprecatedOverrides = hasDeprecatedOverrides || override.deprecatedBehavior;\n }\n });\n });\n return { hasOverrides: hasOverrides, hasDeprecatedOverrides: hasDeprecatedOverrides };\n }\n function applyProviderOverrides(def) {\n for (var i = 0; i < def.providers.length; i++) {\n var provider = def.providers[i];\n if (hasDeprecatedOverrides) {\n // We had a bug where me made\n // all providers lazy. Keep this logic behind a flag\n // for migrating existing users.\n provider.flags |= 4096 /* LazyProvider */;\n }\n var override = providerOverrides.get(provider.token);\n if (override) {\n provider.flags = (provider.flags & ~3840 /* CatProviderNoDirective */) | override.flags;\n provider.deps = splitDepsDsl(override.deps);\n provider.value = override.value;\n }\n }\n if (providerOverridesWithScope.size > 0) {\n var moduleSet_1 = new Set(def.modules);\n providerOverridesWithScope.forEach(function (override, token) {\n if (moduleSet_1.has(getInjectableDef(token).providedIn)) {\n var provider = {\n token: token,\n flags: override.flags | (hasDeprecatedOverrides ? 4096 /* LazyProvider */ : 0 /* None */),\n deps: splitDepsDsl(override.deps),\n value: override.value,\n index: def.providers.length,\n };\n def.providers.push(provider);\n def.providersByKey[tokenKey(token)] = provider;\n }\n });\n }\n }\n }\n function prodCheckAndUpdateNode(view, checkIndex, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n var nodeDef = view.def.nodes[checkIndex];\n checkAndUpdateNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n return (nodeDef.flags & 224 /* CatPureExpression */) ?\n asPureExpressionData(view, checkIndex).value :\n undefined;\n }\n function prodCheckNoChangesNode(view, checkIndex, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n var nodeDef = view.def.nodes[checkIndex];\n checkNoChangesNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n return (nodeDef.flags & 224 /* CatPureExpression */) ?\n asPureExpressionData(view, checkIndex).value :\n undefined;\n }\n function debugCheckAndUpdateView(view) {\n return callWithDebugContext(DebugAction.detectChanges, checkAndUpdateView, null, [view]);\n }\n function debugCheckNoChangesView(view) {\n return callWithDebugContext(DebugAction.checkNoChanges, checkNoChangesView, null, [view]);\n }\n function debugDestroyView(view) {\n return callWithDebugContext(DebugAction.destroy, destroyView, null, [view]);\n }\n var DebugAction;\n (function (DebugAction) {\n DebugAction[DebugAction[\"create\"] = 0] = \"create\";\n DebugAction[DebugAction[\"detectChanges\"] = 1] = \"detectChanges\";\n DebugAction[DebugAction[\"checkNoChanges\"] = 2] = \"checkNoChanges\";\n DebugAction[DebugAction[\"destroy\"] = 3] = \"destroy\";\n DebugAction[DebugAction[\"handleEvent\"] = 4] = \"handleEvent\";\n })(DebugAction || (DebugAction = {}));\n var _currentAction;\n var _currentView;\n var _currentNodeIndex;\n function debugSetCurrentNode(view, nodeIndex) {\n _currentView = view;\n _currentNodeIndex = nodeIndex;\n }\n function debugHandleEvent(view, nodeIndex, eventName, event) {\n debugSetCurrentNode(view, nodeIndex);\n return callWithDebugContext(DebugAction.handleEvent, view.def.handleEvent, null, [view, nodeIndex, eventName, event]);\n }\n function debugUpdateDirectives(view, checkType) {\n if (view.state & 128 /* Destroyed */) {\n throw viewDestroyedError(DebugAction[_currentAction]);\n }\n debugSetCurrentNode(view, nextDirectiveWithBinding(view, 0));\n return view.def.updateDirectives(debugCheckDirectivesFn, view);\n function debugCheckDirectivesFn(view, nodeIndex, argStyle) {\n var values = [];\n for (var _i = 3; _i < arguments.length; _i++) {\n values[_i - 3] = arguments[_i];\n }\n var nodeDef = view.def.nodes[nodeIndex];\n if (checkType === 0 /* CheckAndUpdate */) {\n debugCheckAndUpdateNode(view, nodeDef, argStyle, values);\n }\n else {\n debugCheckNoChangesNode(view, nodeDef, argStyle, values);\n }\n if (nodeDef.flags & 16384 /* TypeDirective */) {\n debugSetCurrentNode(view, nextDirectiveWithBinding(view, nodeIndex));\n }\n return (nodeDef.flags & 224 /* CatPureExpression */) ?\n asPureExpressionData(view, nodeDef.nodeIndex).value :\n undefined;\n }\n }\n function debugUpdateRenderer(view, checkType) {\n if (view.state & 128 /* Destroyed */) {\n throw viewDestroyedError(DebugAction[_currentAction]);\n }\n debugSetCurrentNode(view, nextRenderNodeWithBinding(view, 0));\n return view.def.updateRenderer(debugCheckRenderNodeFn, view);\n function debugCheckRenderNodeFn(view, nodeIndex, argStyle) {\n var values = [];\n for (var _i = 3; _i < arguments.length; _i++) {\n values[_i - 3] = arguments[_i];\n }\n var nodeDef = view.def.nodes[nodeIndex];\n if (checkType === 0 /* CheckAndUpdate */) {\n debugCheckAndUpdateNode(view, nodeDef, argStyle, values);\n }\n else {\n debugCheckNoChangesNode(view, nodeDef, argStyle, values);\n }\n if (nodeDef.flags & 3 /* CatRenderNode */) {\n debugSetCurrentNode(view, nextRenderNodeWithBinding(view, nodeIndex));\n }\n return (nodeDef.flags & 224 /* CatPureExpression */) ?\n asPureExpressionData(view, nodeDef.nodeIndex).value :\n undefined;\n }\n }\n function debugCheckAndUpdateNode(view, nodeDef, argStyle, givenValues) {\n var changed = checkAndUpdateNode.apply(void 0, __spread([view, nodeDef, argStyle], givenValues));\n if (changed) {\n var values = argStyle === 1 /* Dynamic */ ? givenValues[0] : givenValues;\n if (nodeDef.flags & 16384 /* TypeDirective */) {\n var bindingValues = {};\n for (var i = 0; i < nodeDef.bindings.length; i++) {\n var binding = nodeDef.bindings[i];\n var value = values[i];\n if (binding.flags & 8 /* TypeProperty */) {\n bindingValues[normalizeDebugBindingName(binding.nonMinifiedName)] =\n normalizeDebugBindingValue(value);\n }\n }\n var elDef = nodeDef.parent;\n var el = asElementData(view, elDef.nodeIndex).renderElement;\n if (!elDef.element.name) {\n // a comment.\n view.renderer.setValue(el, escapeCommentText(\"bindings=\" + JSON.stringify(bindingValues, null, 2)));\n }\n else {\n // a regular element.\n for (var attr in bindingValues) {\n var value = bindingValues[attr];\n if (value != null) {\n view.renderer.setAttribute(el, attr, value);\n }\n else {\n view.renderer.removeAttribute(el, attr);\n }\n }\n }\n }\n }\n }\n function debugCheckNoChangesNode(view, nodeDef, argStyle, values) {\n checkNoChangesNode.apply(void 0, __spread([view, nodeDef, argStyle], values));\n }\n function nextDirectiveWithBinding(view, nodeIndex) {\n for (var i = nodeIndex; i < view.def.nodes.length; i++) {\n var nodeDef = view.def.nodes[i];\n if (nodeDef.flags & 16384 /* TypeDirective */ && nodeDef.bindings && nodeDef.bindings.length) {\n return i;\n }\n }\n return null;\n }\n function nextRenderNodeWithBinding(view, nodeIndex) {\n for (var i = nodeIndex; i < view.def.nodes.length; i++) {\n var nodeDef = view.def.nodes[i];\n if ((nodeDef.flags & 3 /* CatRenderNode */) && nodeDef.bindings && nodeDef.bindings.length) {\n return i;\n }\n }\n return null;\n }\n var DebugContext_ = /** @class */ (function () {\n function DebugContext_(view, nodeIndex) {\n this.view = view;\n this.nodeIndex = nodeIndex;\n if (nodeIndex == null) {\n this.nodeIndex = nodeIndex = 0;\n }\n this.nodeDef = view.def.nodes[nodeIndex];\n var elDef = this.nodeDef;\n var elView = view;\n while (elDef && (elDef.flags & 1 /* TypeElement */) === 0) {\n elDef = elDef.parent;\n }\n if (!elDef) {\n while (!elDef && elView) {\n elDef = viewParentEl(elView);\n elView = elView.parent;\n }\n }\n this.elDef = elDef;\n this.elView = elView;\n }\n Object.defineProperty(DebugContext_.prototype, \"elOrCompView\", {\n get: function () {\n // Has to be done lazily as we use the DebugContext also during creation of elements...\n return asElementData(this.elView, this.elDef.nodeIndex).componentView || this.view;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(DebugContext_.prototype, \"injector\", {\n get: function () {\n return createInjector$1(this.elView, this.elDef);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(DebugContext_.prototype, \"component\", {\n get: function () {\n return this.elOrCompView.component;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(DebugContext_.prototype, \"context\", {\n get: function () {\n return this.elOrCompView.context;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(DebugContext_.prototype, \"providerTokens\", {\n get: function () {\n var tokens = [];\n if (this.elDef) {\n for (var i = this.elDef.nodeIndex + 1; i <= this.elDef.nodeIndex + this.elDef.childCount; i++) {\n var childDef = this.elView.def.nodes[i];\n if (childDef.flags & 20224 /* CatProvider */) {\n tokens.push(childDef.provider.token);\n }\n i += childDef.childCount;\n }\n }\n return tokens;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(DebugContext_.prototype, \"references\", {\n get: function () {\n var references = {};\n if (this.elDef) {\n collectReferences(this.elView, this.elDef, references);\n for (var i = this.elDef.nodeIndex + 1; i <= this.elDef.nodeIndex + this.elDef.childCount; i++) {\n var childDef = this.elView.def.nodes[i];\n if (childDef.flags & 20224 /* CatProvider */) {\n collectReferences(this.elView, childDef, references);\n }\n i += childDef.childCount;\n }\n }\n return references;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(DebugContext_.prototype, \"componentRenderElement\", {\n get: function () {\n var elData = findHostElement(this.elOrCompView);\n return elData ? elData.renderElement : undefined;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(DebugContext_.prototype, \"renderNode\", {\n get: function () {\n return this.nodeDef.flags & 2 /* TypeText */ ? renderNode(this.view, this.nodeDef) :\n renderNode(this.elView, this.elDef);\n },\n enumerable: false,\n configurable: true\n });\n DebugContext_.prototype.logError = function (console) {\n var values = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n values[_i - 1] = arguments[_i];\n }\n var logViewDef;\n var logNodeIndex;\n if (this.nodeDef.flags & 2 /* TypeText */) {\n logViewDef = this.view.def;\n logNodeIndex = this.nodeDef.nodeIndex;\n }\n else {\n logViewDef = this.elView.def;\n logNodeIndex = this.elDef.nodeIndex;\n }\n // Note: we only generate a log function for text and element nodes\n // to make the generated code as small as possible.\n var renderNodeIndex = getRenderNodeIndex(logViewDef, logNodeIndex);\n var currRenderNodeIndex = -1;\n var nodeLogger = function () {\n var _a;\n currRenderNodeIndex++;\n if (currRenderNodeIndex === renderNodeIndex) {\n return (_a = console.error).bind.apply(_a, __spread([console], values));\n }\n else {\n return NOOP;\n }\n };\n logViewDef.factory(nodeLogger);\n if (currRenderNodeIndex < renderNodeIndex) {\n console.error('Illegal state: the ViewDefinitionFactory did not call the logger!');\n console.error.apply(console, __spread(values));\n }\n };\n return DebugContext_;\n }());\n function getRenderNodeIndex(viewDef, nodeIndex) {\n var renderNodeIndex = -1;\n for (var i = 0; i <= nodeIndex; i++) {\n var nodeDef = viewDef.nodes[i];\n if (nodeDef.flags & 3 /* CatRenderNode */) {\n renderNodeIndex++;\n }\n }\n return renderNodeIndex;\n }\n function findHostElement(view) {\n while (view && !isComponentView(view)) {\n view = view.parent;\n }\n if (view.parent) {\n return asElementData(view.parent, viewParentEl(view).nodeIndex);\n }\n return null;\n }\n function collectReferences(view, nodeDef, references) {\n for (var refName in nodeDef.references) {\n references[refName] = getQueryValue(view, nodeDef, nodeDef.references[refName]);\n }\n }\n function callWithDebugContext(action, fn, self, args) {\n var oldAction = _currentAction;\n var oldView = _currentView;\n var oldNodeIndex = _currentNodeIndex;\n try {\n _currentAction = action;\n var result = fn.apply(self, args);\n _currentView = oldView;\n _currentNodeIndex = oldNodeIndex;\n _currentAction = oldAction;\n return result;\n }\n catch (e) {\n if (isViewDebugError(e) || !_currentView) {\n throw e;\n }\n throw viewWrappedDebugError(e, getCurrentDebugContext());\n }\n }\n function getCurrentDebugContext() {\n return _currentView ? new DebugContext_(_currentView, _currentNodeIndex) : null;\n }\n var DebugRendererFactory2 = /** @class */ (function () {\n function DebugRendererFactory2(delegate) {\n this.delegate = delegate;\n }\n DebugRendererFactory2.prototype.createRenderer = function (element, renderData) {\n return new DebugRenderer2(this.delegate.createRenderer(element, renderData));\n };\n DebugRendererFactory2.prototype.begin = function () {\n if (this.delegate.begin) {\n this.delegate.begin();\n }\n };\n DebugRendererFactory2.prototype.end = function () {\n if (this.delegate.end) {\n this.delegate.end();\n }\n };\n DebugRendererFactory2.prototype.whenRenderingDone = function () {\n if (this.delegate.whenRenderingDone) {\n return this.delegate.whenRenderingDone();\n }\n return Promise.resolve(null);\n };\n return DebugRendererFactory2;\n }());\n var DebugRenderer2 = /** @class */ (function () {\n function DebugRenderer2(delegate) {\n this.delegate = delegate;\n /**\n * Factory function used to create a `DebugContext` when a node is created.\n *\n * The `DebugContext` allows to retrieve information about the nodes that are useful in tests.\n *\n * The factory is configurable so that the `DebugRenderer2` could instantiate either a View Engine\n * or a Render context.\n */\n this.debugContextFactory = getCurrentDebugContext;\n this.data = this.delegate.data;\n }\n DebugRenderer2.prototype.createDebugContext = function (nativeElement) {\n return this.debugContextFactory(nativeElement);\n };\n DebugRenderer2.prototype.destroyNode = function (node) {\n var debugNode = getDebugNode$1(node);\n if (debugNode) {\n removeDebugNodeFromIndex(debugNode);\n if (debugNode instanceof DebugNode__PRE_R3__) {\n debugNode.listeners.length = 0;\n }\n }\n if (this.delegate.destroyNode) {\n this.delegate.destroyNode(node);\n }\n };\n DebugRenderer2.prototype.destroy = function () {\n this.delegate.destroy();\n };\n DebugRenderer2.prototype.createElement = function (name, namespace) {\n var el = this.delegate.createElement(name, namespace);\n var debugCtx = this.createDebugContext(el);\n if (debugCtx) {\n var debugEl = new DebugElement__PRE_R3__(el, null, debugCtx);\n debugEl.name = name;\n indexDebugNode(debugEl);\n }\n return el;\n };\n DebugRenderer2.prototype.createComment = function (value) {\n var comment = this.delegate.createComment(escapeCommentText(value));\n var debugCtx = this.createDebugContext(comment);\n if (debugCtx) {\n indexDebugNode(new DebugNode__PRE_R3__(comment, null, debugCtx));\n }\n return comment;\n };\n DebugRenderer2.prototype.createText = function (value) {\n var text = this.delegate.createText(value);\n var debugCtx = this.createDebugContext(text);\n if (debugCtx) {\n indexDebugNode(new DebugNode__PRE_R3__(text, null, debugCtx));\n }\n return text;\n };\n DebugRenderer2.prototype.appendChild = function (parent, newChild) {\n var debugEl = getDebugNode$1(parent);\n var debugChildEl = getDebugNode$1(newChild);\n if (debugEl && debugChildEl && debugEl instanceof DebugElement__PRE_R3__) {\n debugEl.addChild(debugChildEl);\n }\n this.delegate.appendChild(parent, newChild);\n };\n DebugRenderer2.prototype.insertBefore = function (parent, newChild, refChild, isMove) {\n var debugEl = getDebugNode$1(parent);\n var debugChildEl = getDebugNode$1(newChild);\n var debugRefEl = getDebugNode$1(refChild);\n if (debugEl && debugChildEl && debugEl instanceof DebugElement__PRE_R3__) {\n debugEl.insertBefore(debugRefEl, debugChildEl);\n }\n this.delegate.insertBefore(parent, newChild, refChild, isMove);\n };\n DebugRenderer2.prototype.removeChild = function (parent, oldChild) {\n var debugEl = getDebugNode$1(parent);\n var debugChildEl = getDebugNode$1(oldChild);\n if (debugEl && debugChildEl && debugEl instanceof DebugElement__PRE_R3__) {\n debugEl.removeChild(debugChildEl);\n }\n this.delegate.removeChild(parent, oldChild);\n };\n DebugRenderer2.prototype.selectRootElement = function (selectorOrNode, preserveContent) {\n var el = this.delegate.selectRootElement(selectorOrNode, preserveContent);\n var debugCtx = getCurrentDebugContext();\n if (debugCtx) {\n indexDebugNode(new DebugElement__PRE_R3__(el, null, debugCtx));\n }\n return el;\n };\n DebugRenderer2.prototype.setAttribute = function (el, name, value, namespace) {\n var debugEl = getDebugNode$1(el);\n if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n var fullName = namespace ? namespace + ':' + name : name;\n debugEl.attributes[fullName] = value;\n }\n this.delegate.setAttribute(el, name, value, namespace);\n };\n DebugRenderer2.prototype.removeAttribute = function (el, name, namespace) {\n var debugEl = getDebugNode$1(el);\n if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n var fullName = namespace ? namespace + ':' + name : name;\n debugEl.attributes[fullName] = null;\n }\n this.delegate.removeAttribute(el, name, namespace);\n };\n DebugRenderer2.prototype.addClass = function (el, name) {\n var debugEl = getDebugNode$1(el);\n if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n debugEl.classes[name] = true;\n }\n this.delegate.addClass(el, name);\n };\n DebugRenderer2.prototype.removeClass = function (el, name) {\n var debugEl = getDebugNode$1(el);\n if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n debugEl.classes[name] = false;\n }\n this.delegate.removeClass(el, name);\n };\n DebugRenderer2.prototype.setStyle = function (el, style, value, flags) {\n var debugEl = getDebugNode$1(el);\n if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n debugEl.styles[style] = value;\n }\n this.delegate.setStyle(el, style, value, flags);\n };\n DebugRenderer2.prototype.removeStyle = function (el, style, flags) {\n var debugEl = getDebugNode$1(el);\n if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n debugEl.styles[style] = null;\n }\n this.delegate.removeStyle(el, style, flags);\n };\n DebugRenderer2.prototype.setProperty = function (el, name, value) {\n var debugEl = getDebugNode$1(el);\n if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n debugEl.properties[name] = value;\n }\n this.delegate.setProperty(el, name, value);\n };\n DebugRenderer2.prototype.listen = function (target, eventName, callback) {\n if (typeof target !== 'string') {\n var debugEl = getDebugNode$1(target);\n if (debugEl) {\n debugEl.listeners.push(new DebugEventListener(eventName, callback));\n }\n }\n return this.delegate.listen(target, eventName, callback);\n };\n DebugRenderer2.prototype.parentNode = function (node) {\n return this.delegate.parentNode(node);\n };\n DebugRenderer2.prototype.nextSibling = function (node) {\n return this.delegate.nextSibling(node);\n };\n DebugRenderer2.prototype.setValue = function (node, value) {\n return this.delegate.setValue(node, value);\n };\n return DebugRenderer2;\n }());\n\n function overrideProvider(override) {\n initServicesIfNeeded();\n return Services.overrideProvider(override);\n }\n function overrideComponentView(comp, componentFactory) {\n initServicesIfNeeded();\n return Services.overrideComponentView(comp, componentFactory);\n }\n function clearOverrides() {\n initServicesIfNeeded();\n return Services.clearOverrides();\n }\n // Attention: this function is called as top level function.\n // Putting any logic in here will destroy closure tree shaking!\n function createNgModuleFactory(ngModuleType, bootstrapComponents, defFactory) {\n return new NgModuleFactory_(ngModuleType, bootstrapComponents, defFactory);\n }\n function cloneNgModuleDefinition(def) {\n var providers = Array.from(def.providers);\n var modules = Array.from(def.modules);\n var providersByKey = {};\n for (var key in def.providersByKey) {\n providersByKey[key] = def.providersByKey[key];\n }\n return {\n factory: def.factory,\n scope: def.scope,\n providers: providers,\n modules: modules,\n providersByKey: providersByKey,\n };\n }\n var NgModuleFactory_ = /** @class */ (function (_super) {\n __extends(NgModuleFactory_, _super);\n function NgModuleFactory_(moduleType, _bootstrapComponents, _ngModuleDefFactory) {\n var _this = \n // Attention: this ctor is called as top level function.\n // Putting any logic in here will destroy closure tree shaking!\n _super.call(this) || this;\n _this.moduleType = moduleType;\n _this._bootstrapComponents = _bootstrapComponents;\n _this._ngModuleDefFactory = _ngModuleDefFactory;\n return _this;\n }\n NgModuleFactory_.prototype.create = function (parentInjector) {\n initServicesIfNeeded();\n // Clone the NgModuleDefinition so that any tree shakeable provider definition\n // added to this instance of the NgModuleRef doesn't affect the cached copy.\n // See https://github.com/angular/angular/issues/25018.\n var def = cloneNgModuleDefinition(resolveDefinition(this._ngModuleDefFactory));\n return Services.createNgModuleRef(this.moduleType, parentInjector || Injector.NULL, this._bootstrapComponents, def);\n };\n return NgModuleFactory_;\n }(NgModuleFactory));\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 * Compiles a partial directive declaration object into a full directive definition object.\n *\n * @codeGenApi\n */\n function ɵɵngDeclareDirective(decl) {\n var compiler = getCompilerFacade();\n return compiler.compileDirectiveDeclaration(angularCoreEnv, \"ng:///\" + decl.type.name + \"/\\u0275fac.js\", decl);\n }\n /**\n * Compiles a partial component declaration object into a full component definition object.\n *\n * @codeGenApi\n */\n function ɵɵngDeclareComponent(decl) {\n var compiler = getCompilerFacade();\n return compiler.compileComponentDeclaration(angularCoreEnv, \"ng:///\" + decl.type.name + \"/\\u0275cmp.js\", decl);\n }\n /**\n * Compiles a partial pipe declaration object into a full pipe definition object.\n *\n * @codeGenApi\n */\n function ɵɵngDeclarePipe(decl) {\n var compiler = getCompilerFacade();\n return compiler.compilePipeDeclaration(angularCoreEnv, \"ng:///\" + decl.type.name + \"/\\u0275pipe.js\", decl);\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 // clang-format on\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 if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n // This helper is to give a reasonable error message to people upgrading to v9 that have not yet\n // installed `@angular/localize` in their app.\n // tslint:disable-next-line: no-toplevel-property-access\n _global.$localize = _global.$localize || function () {\n throw new Error('It looks like your application or one of its dependencies is using i18n.\\n' +\n 'Angular 9 introduced a global `$localize()` function that needs to be loaded.\\n' +\n 'Please run `ng add @angular/localize` from the Angular CLI.\\n' +\n '(For non-CLI projects, add `import \\'@angular/localize/init\\';` to your `polyfills.ts` file.\\n' +\n 'For server-side rendering applications add the import to your `main.server.ts` file.)');\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 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 * Generated bundle index. Do not edit.\n */\n\n exports.ANALYZE_FOR_ENTRY_COMPONENTS = ANALYZE_FOR_ENTRY_COMPONENTS;\n exports.APP_BOOTSTRAP_LISTENER = APP_BOOTSTRAP_LISTENER;\n exports.APP_ID = APP_ID;\n exports.APP_INITIALIZER = APP_INITIALIZER;\n exports.ApplicationInitStatus = ApplicationInitStatus;\n exports.ApplicationModule = ApplicationModule;\n exports.ApplicationRef = ApplicationRef;\n exports.Attribute = Attribute;\n exports.COMPILER_OPTIONS = COMPILER_OPTIONS;\n exports.CUSTOM_ELEMENTS_SCHEMA = CUSTOM_ELEMENTS_SCHEMA;\n exports.ChangeDetectorRef = ChangeDetectorRef;\n exports.Compiler = Compiler;\n exports.CompilerFactory = CompilerFactory;\n exports.Component = Component;\n exports.ComponentFactory = ComponentFactory;\n exports.ComponentFactoryResolver = ComponentFactoryResolver;\n exports.ComponentRef = ComponentRef;\n exports.ContentChild = ContentChild;\n exports.ContentChildren = ContentChildren;\n exports.DEFAULT_CURRENCY_CODE = DEFAULT_CURRENCY_CODE;\n exports.DebugElement = DebugElement;\n exports.DebugEventListener = DebugEventListener;\n exports.DebugNode = DebugNode;\n exports.DefaultIterableDiffer = DefaultIterableDiffer;\n exports.Directive = Directive;\n exports.ElementRef = ElementRef;\n exports.EmbeddedViewRef = EmbeddedViewRef;\n exports.ErrorHandler = ErrorHandler;\n exports.EventEmitter = EventEmitter;\n exports.Host = Host;\n exports.HostBinding = HostBinding;\n exports.HostListener = HostListener;\n exports.INJECTOR = INJECTOR$1;\n exports.Inject = Inject;\n exports.Injectable = Injectable;\n exports.InjectionToken = InjectionToken;\n exports.Injector = Injector;\n exports.Input = Input;\n exports.IterableDiffers = IterableDiffers;\n exports.KeyValueDiffers = KeyValueDiffers;\n exports.LOCALE_ID = LOCALE_ID$1;\n exports.ModuleWithComponentFactories = ModuleWithComponentFactories;\n exports.NO_ERRORS_SCHEMA = NO_ERRORS_SCHEMA;\n exports.NgModule = NgModule;\n exports.NgModuleFactory = NgModuleFactory;\n exports.NgModuleFactoryLoader = NgModuleFactoryLoader;\n exports.NgModuleRef = NgModuleRef;\n exports.NgProbeToken = NgProbeToken;\n exports.NgZone = NgZone;\n exports.Optional = Optional;\n exports.Output = Output;\n exports.PACKAGE_ROOT_URL = PACKAGE_ROOT_URL;\n exports.PLATFORM_ID = PLATFORM_ID;\n exports.PLATFORM_INITIALIZER = PLATFORM_INITIALIZER;\n exports.Pipe = Pipe;\n exports.PlatformRef = PlatformRef;\n exports.Query = Query;\n exports.QueryList = QueryList;\n exports.ReflectiveInjector = ReflectiveInjector;\n exports.ReflectiveKey = ReflectiveKey;\n exports.Renderer2 = Renderer2;\n exports.RendererFactory2 = RendererFactory2;\n exports.ResolvedReflectiveFactory = ResolvedReflectiveFactory;\n exports.Sanitizer = Sanitizer;\n exports.Self = Self;\n exports.SimpleChange = SimpleChange;\n exports.SkipSelf = SkipSelf;\n exports.SystemJsNgModuleLoader = SystemJsNgModuleLoader;\n exports.SystemJsNgModuleLoaderConfig = SystemJsNgModuleLoaderConfig;\n exports.TRANSLATIONS = TRANSLATIONS;\n exports.TRANSLATIONS_FORMAT = TRANSLATIONS_FORMAT;\n exports.TemplateRef = TemplateRef;\n exports.Testability = Testability;\n exports.TestabilityRegistry = TestabilityRegistry;\n exports.Type = Type;\n exports.VERSION = VERSION;\n exports.Version = Version;\n exports.ViewChild = ViewChild;\n exports.ViewChildren = ViewChildren;\n exports.ViewContainerRef = ViewContainerRef;\n exports.ViewRef = ViewRef$1;\n exports.WrappedValue = WrappedValue;\n exports.asNativeElements = asNativeElements;\n exports.assertPlatform = assertPlatform;\n exports.createPlatform = createPlatform;\n exports.createPlatformFactory = createPlatformFactory;\n exports.defineInjectable = defineInjectable;\n exports.destroyPlatform = destroyPlatform;\n exports.enableProdMode = enableProdMode;\n exports.forwardRef = forwardRef;\n exports.getDebugNode = getDebugNode$1;\n exports.getModuleFactory = getModuleFactory;\n exports.getPlatform = getPlatform;\n exports.inject = inject;\n exports.isDevMode = isDevMode;\n exports.platformCore = platformCore;\n exports.resolveForwardRef = resolveForwardRef;\n exports.setTestabilityGetter = setTestabilityGetter;\n exports.ɵ0 = ɵ0$3;\n exports.ɵALLOW_MULTIPLE_PLATFORMS = ALLOW_MULTIPLE_PLATFORMS;\n exports.ɵAPP_ID_RANDOM_PROVIDER = APP_ID_RANDOM_PROVIDER;\n exports.ɵCREATE_ATTRIBUTE_DECORATOR__POST_R3__ = CREATE_ATTRIBUTE_DECORATOR__POST_R3__;\n exports.ɵCodegenComponentFactoryResolver = CodegenComponentFactoryResolver;\n exports.ɵCompiler_compileModuleAndAllComponentsAsync__POST_R3__ = Compiler_compileModuleAndAllComponentsAsync__POST_R3__;\n exports.ɵCompiler_compileModuleAndAllComponentsSync__POST_R3__ = Compiler_compileModuleAndAllComponentsSync__POST_R3__;\n exports.ɵCompiler_compileModuleAsync__POST_R3__ = Compiler_compileModuleAsync__POST_R3__;\n exports.ɵCompiler_compileModuleSync__POST_R3__ = Compiler_compileModuleSync__POST_R3__;\n exports.ɵComponentFactory = ComponentFactory;\n exports.ɵConsole = Console;\n exports.ɵDEFAULT_LOCALE_ID = DEFAULT_LOCALE_ID;\n exports.ɵEMPTY_ARRAY = EMPTY_ARRAY$4;\n exports.ɵEMPTY_MAP = EMPTY_MAP;\n exports.ɵINJECTOR_IMPL__POST_R3__ = INJECTOR_IMPL__POST_R3__;\n exports.ɵINJECTOR_SCOPE = INJECTOR_SCOPE;\n exports.ɵLifecycleHooksFeature = LifecycleHooksFeature;\n exports.ɵNG_COMP_DEF = NG_COMP_DEF;\n exports.ɵNG_DIR_DEF = NG_DIR_DEF;\n exports.ɵNG_ELEMENT_ID = NG_ELEMENT_ID;\n exports.ɵNG_INJ_DEF = NG_INJ_DEF;\n exports.ɵNG_MOD_DEF = NG_MOD_DEF;\n exports.ɵNG_PIPE_DEF = NG_PIPE_DEF;\n exports.ɵNG_PROV_DEF = NG_PROV_DEF;\n exports.ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR = NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR;\n exports.ɵNO_CHANGE = NO_CHANGE;\n exports.ɵNgModuleFactory = NgModuleFactory$1;\n exports.ɵNoopNgZone = NoopNgZone;\n exports.ɵReflectionCapabilities = ReflectionCapabilities;\n exports.ɵRender3ComponentFactory = ComponentFactory$1;\n exports.ɵRender3ComponentRef = ComponentRef$1;\n exports.ɵRender3NgModuleRef = NgModuleRef$1;\n exports.ɵRuntimeError = RuntimeError;\n exports.ɵSWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__ = SWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__;\n exports.ɵSWITCH_COMPILE_COMPONENT__POST_R3__ = SWITCH_COMPILE_COMPONENT__POST_R3__;\n exports.ɵSWITCH_COMPILE_DIRECTIVE__POST_R3__ = SWITCH_COMPILE_DIRECTIVE__POST_R3__;\n exports.ɵSWITCH_COMPILE_INJECTABLE__POST_R3__ = SWITCH_COMPILE_INJECTABLE__POST_R3__;\n exports.ɵSWITCH_COMPILE_NGMODULE__POST_R3__ = SWITCH_COMPILE_NGMODULE__POST_R3__;\n exports.ɵSWITCH_COMPILE_PIPE__POST_R3__ = SWITCH_COMPILE_PIPE__POST_R3__;\n exports.ɵSWITCH_ELEMENT_REF_FACTORY__POST_R3__ = SWITCH_ELEMENT_REF_FACTORY__POST_R3__;\n exports.ɵSWITCH_IVY_ENABLED__POST_R3__ = SWITCH_IVY_ENABLED__POST_R3__;\n exports.ɵSWITCH_RENDERER2_FACTORY__POST_R3__ = SWITCH_RENDERER2_FACTORY__POST_R3__;\n exports.ɵSWITCH_TEMPLATE_REF_FACTORY__POST_R3__ = SWITCH_TEMPLATE_REF_FACTORY__POST_R3__;\n exports.ɵSWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__ = SWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__;\n exports.ɵ_sanitizeHtml = _sanitizeHtml;\n exports.ɵ_sanitizeUrl = _sanitizeUrl;\n exports.ɵallowSanitizationBypassAndThrow = allowSanitizationBypassAndThrow;\n exports.ɵand = anchorDef;\n exports.ɵangular_packages_core_core_a = isForwardRef;\n exports.ɵangular_packages_core_core_b = injectInjectorOnly;\n exports.ɵangular_packages_core_core_ba = zoneSchedulerFactory;\n exports.ɵangular_packages_core_core_bb = USD_CURRENCY_CODE;\n exports.ɵangular_packages_core_core_bc = _def;\n exports.ɵangular_packages_core_core_bd = DebugContext;\n exports.ɵangular_packages_core_core_be = NgOnChangesFeatureImpl;\n exports.ɵangular_packages_core_core_bf = SCHEDULER;\n exports.ɵangular_packages_core_core_bg = injectAttributeImpl;\n exports.ɵangular_packages_core_core_bh = getLView;\n exports.ɵangular_packages_core_core_bi = getBindingRoot;\n exports.ɵangular_packages_core_core_bj = nextContextImpl;\n exports.ɵangular_packages_core_core_bl = pureFunction1Internal;\n exports.ɵangular_packages_core_core_bm = pureFunction2Internal;\n exports.ɵangular_packages_core_core_bn = pureFunction3Internal;\n exports.ɵangular_packages_core_core_bo = pureFunction4Internal;\n exports.ɵangular_packages_core_core_bp = pureFunctionVInternal;\n exports.ɵangular_packages_core_core_bq = getUrlSanitizer;\n exports.ɵangular_packages_core_core_br = makePropDecorator;\n exports.ɵangular_packages_core_core_bs = makeParamDecorator;\n exports.ɵangular_packages_core_core_bv = getClosureSafeProperty;\n exports.ɵangular_packages_core_core_bw = NullInjector;\n exports.ɵangular_packages_core_core_bx = getInjectImplementation;\n exports.ɵangular_packages_core_core_bz = getNativeByTNode;\n exports.ɵangular_packages_core_core_c = attachInjectFlag;\n exports.ɵangular_packages_core_core_cb = getRootContext;\n exports.ɵangular_packages_core_core_cc = i18nPostprocess;\n exports.ɵangular_packages_core_core_d = ReflectiveInjector_;\n exports.ɵangular_packages_core_core_e = ReflectiveDependency;\n exports.ɵangular_packages_core_core_f = resolveReflectiveProviders;\n exports.ɵangular_packages_core_core_g = _appIdRandomProviderFactory;\n exports.ɵangular_packages_core_core_h = injectRenderer2;\n exports.ɵangular_packages_core_core_i = injectElementRef;\n exports.ɵangular_packages_core_core_j = createElementRef;\n exports.ɵangular_packages_core_core_k = getModuleFactory__PRE_R3__;\n exports.ɵangular_packages_core_core_l = injectTemplateRef;\n exports.ɵangular_packages_core_core_m = createTemplateRef;\n exports.ɵangular_packages_core_core_n = injectViewContainerRef;\n exports.ɵangular_packages_core_core_o = DebugNode__PRE_R3__;\n exports.ɵangular_packages_core_core_p = DebugElement__PRE_R3__;\n exports.ɵangular_packages_core_core_q = getDebugNodeR2__PRE_R3__;\n exports.ɵangular_packages_core_core_r = injectChangeDetectorRef;\n exports.ɵangular_packages_core_core_s = DefaultIterableDifferFactory;\n exports.ɵangular_packages_core_core_t = DefaultKeyValueDifferFactory;\n exports.ɵangular_packages_core_core_u = defaultIterableDiffersFactory;\n exports.ɵangular_packages_core_core_v = defaultKeyValueDiffersFactory;\n exports.ɵangular_packages_core_core_w = _iterableDiffersFactory;\n exports.ɵangular_packages_core_core_x = _keyValueDiffersFactory;\n exports.ɵangular_packages_core_core_y = _localeFactory;\n exports.ɵangular_packages_core_core_z = APPLICATION_MODULE_PROVIDERS;\n exports.ɵbypassSanitizationTrustHtml = bypassSanitizationTrustHtml;\n exports.ɵbypassSanitizationTrustResourceUrl = bypassSanitizationTrustResourceUrl;\n exports.ɵbypassSanitizationTrustScript = bypassSanitizationTrustScript;\n exports.ɵbypassSanitizationTrustStyle = bypassSanitizationTrustStyle;\n exports.ɵbypassSanitizationTrustUrl = bypassSanitizationTrustUrl;\n exports.ɵccf = createComponentFactory;\n exports.ɵclearOverrides = clearOverrides;\n exports.ɵclearResolutionOfComponentResourcesQueue = clearResolutionOfComponentResourcesQueue;\n exports.ɵcmf = createNgModuleFactory;\n exports.ɵcompileComponent = compileComponent;\n exports.ɵcompileDirective = compileDirective;\n exports.ɵcompileNgModule = compileNgModule;\n exports.ɵcompileNgModuleDefs = compileNgModuleDefs;\n exports.ɵcompileNgModuleFactory__POST_R3__ = compileNgModuleFactory__POST_R3__;\n exports.ɵcompilePipe = compilePipe;\n exports.ɵcreateInjector = createInjector;\n exports.ɵcrt = createRendererType2;\n exports.ɵdefaultIterableDiffers = defaultIterableDiffers;\n exports.ɵdefaultKeyValueDiffers = defaultKeyValueDiffers;\n exports.ɵdetectChanges = detectChanges;\n exports.ɵdevModeEqual = devModeEqual;\n exports.ɵdid = directiveDef;\n exports.ɵeld = elementDef;\n exports.ɵfindLocaleData = findLocaleData;\n exports.ɵflushModuleScopingQueueAsMuchAsPossible = flushModuleScopingQueueAsMuchAsPossible;\n exports.ɵgetComponentViewDefinitionFactory = getComponentViewDefinitionFactory;\n exports.ɵgetDebugNodeR2 = getDebugNodeR2;\n exports.ɵgetDebugNode__POST_R3__ = getDebugNode__POST_R3__;\n exports.ɵgetDirectives = getDirectives;\n exports.ɵgetHostElement = getHostElement;\n exports.ɵgetInjectableDef = getInjectableDef;\n exports.ɵgetLContext = getLContext;\n exports.ɵgetLocaleCurrencyCode = getLocaleCurrencyCode;\n exports.ɵgetLocalePluralCase = getLocalePluralCase;\n exports.ɵgetModuleFactory__POST_R3__ = getModuleFactory__POST_R3__;\n exports.ɵgetSanitizationBypassType = getSanitizationBypassType;\n exports.ɵglobal = _global;\n exports.ɵinitServicesIfNeeded = initServicesIfNeeded;\n exports.ɵinlineInterpolate = inlineInterpolate;\n exports.ɵinterpolate = interpolate;\n exports.ɵisBoundToModule__POST_R3__ = isBoundToModule__POST_R3__;\n exports.ɵisDefaultChangeDetectionStrategy = isDefaultChangeDetectionStrategy;\n exports.ɵisListLikeIterable = isListLikeIterable;\n exports.ɵisObservable = isObservable;\n exports.ɵisPromise = isPromise;\n exports.ɵisSubscribable = isSubscribable;\n exports.ɵivyEnabled = ivyEnabled;\n exports.ɵmakeDecorator = makeDecorator;\n exports.ɵmarkDirty = markDirty;\n exports.ɵmod = moduleDef;\n exports.ɵmpd = moduleProvideDef;\n exports.ɵncd = ngContentDef;\n exports.ɵnoSideEffects = noSideEffects;\n exports.ɵnov = nodeValue;\n exports.ɵoverrideComponentView = overrideComponentView;\n exports.ɵoverrideProvider = overrideProvider;\n exports.ɵpad = pureArrayDef;\n exports.ɵpatchComponentDefWithScope = patchComponentDefWithScope;\n exports.ɵpid = pipeDef;\n exports.ɵpod = pureObjectDef;\n exports.ɵppd = purePipeDef;\n exports.ɵprd = providerDef;\n exports.ɵpublishDefaultGlobalUtils = publishDefaultGlobalUtils;\n exports.ɵpublishGlobalUtil = publishGlobalUtil;\n exports.ɵqud = queryDef;\n exports.ɵregisterLocaleData = registerLocaleData;\n exports.ɵregisterModuleFactory = registerModuleFactory;\n exports.ɵregisterNgModuleType = registerNgModuleType;\n exports.ɵrenderComponent = renderComponent$1;\n exports.ɵresetCompiledComponents = resetCompiledComponents;\n exports.ɵresetJitOptions = resetJitOptions;\n exports.ɵresolveComponentResources = resolveComponentResources;\n exports.ɵsetClassMetadata = setClassMetadata;\n exports.ɵsetCurrentInjector = setCurrentInjector;\n exports.ɵsetDocument = setDocument;\n exports.ɵsetLocaleId = setLocaleId;\n exports.ɵstore = store;\n exports.ɵstringify = stringify;\n exports.ɵted = textDef;\n exports.ɵtransitiveScopesFor = transitiveScopesFor;\n exports.ɵunregisterLocaleData = unregisterAllLocaleData;\n exports.ɵunv = unwrapValue;\n exports.ɵunwrapSafeValue = unwrapSafeValue;\n exports.ɵvid = viewDef;\n exports.ɵwhenRendered = whenRendered;\n exports.ɵɵCopyDefinitionFeature = ɵɵCopyDefinitionFeature;\n exports.ɵɵInheritDefinitionFeature = ɵɵInheritDefinitionFeature;\n exports.ɵɵNgOnChangesFeature = ɵɵNgOnChangesFeature;\n exports.ɵɵProvidersFeature = ɵɵProvidersFeature;\n exports.ɵɵadvance = ɵɵadvance;\n exports.ɵɵattribute = ɵɵattribute;\n exports.ɵɵattributeInterpolate1 = ɵɵattributeInterpolate1;\n exports.ɵɵattributeInterpolate2 = ɵɵattributeInterpolate2;\n exports.ɵɵattributeInterpolate3 = ɵɵattributeInterpolate3;\n exports.ɵɵattributeInterpolate4 = ɵɵattributeInterpolate4;\n exports.ɵɵattributeInterpolate5 = ɵɵattributeInterpolate5;\n exports.ɵɵattributeInterpolate6 = ɵɵattributeInterpolate6;\n exports.ɵɵattributeInterpolate7 = ɵɵattributeInterpolate7;\n exports.ɵɵattributeInterpolate8 = ɵɵattributeInterpolate8;\n exports.ɵɵattributeInterpolateV = ɵɵattributeInterpolateV;\n exports.ɵɵclassMap = ɵɵclassMap;\n exports.ɵɵclassMapInterpolate1 = ɵɵclassMapInterpolate1;\n exports.ɵɵclassMapInterpolate2 = ɵɵclassMapInterpolate2;\n exports.ɵɵclassMapInterpolate3 = ɵɵclassMapInterpolate3;\n exports.ɵɵclassMapInterpolate4 = ɵɵclassMapInterpolate4;\n exports.ɵɵclassMapInterpolate5 = ɵɵclassMapInterpolate5;\n exports.ɵɵclassMapInterpolate6 = ɵɵclassMapInterpolate6;\n exports.ɵɵclassMapInterpolate7 = ɵɵclassMapInterpolate7;\n exports.ɵɵclassMapInterpolate8 = ɵɵclassMapInterpolate8;\n exports.ɵɵclassMapInterpolateV = ɵɵclassMapInterpolateV;\n exports.ɵɵclassProp = ɵɵclassProp;\n exports.ɵɵcontentQuery = ɵɵcontentQuery;\n exports.ɵɵdefineComponent = ɵɵdefineComponent;\n exports.ɵɵdefineDirective = ɵɵdefineDirective;\n exports.ɵɵdefineInjectable = ɵɵdefineInjectable;\n exports.ɵɵdefineInjector = ɵɵdefineInjector;\n exports.ɵɵdefineNgModule = ɵɵdefineNgModule;\n exports.ɵɵdefinePipe = ɵɵdefinePipe;\n exports.ɵɵdirectiveInject = ɵɵdirectiveInject;\n exports.ɵɵdisableBindings = ɵɵdisableBindings;\n exports.ɵɵelement = ɵɵelement;\n exports.ɵɵelementContainer = ɵɵelementContainer;\n exports.ɵɵelementContainerEnd = ɵɵelementContainerEnd;\n exports.ɵɵelementContainerStart = ɵɵelementContainerStart;\n exports.ɵɵelementEnd = ɵɵelementEnd;\n exports.ɵɵelementStart = ɵɵelementStart;\n exports.ɵɵenableBindings = ɵɵenableBindings;\n exports.ɵɵgetCurrentView = ɵɵgetCurrentView;\n exports.ɵɵgetInheritedFactory = ɵɵgetInheritedFactory;\n exports.ɵɵhostProperty = ɵɵhostProperty;\n exports.ɵɵi18n = ɵɵi18n;\n exports.ɵɵi18nApply = ɵɵi18nApply;\n exports.ɵɵi18nAttributes = ɵɵi18nAttributes;\n exports.ɵɵi18nEnd = ɵɵi18nEnd;\n exports.ɵɵi18nExp = ɵɵi18nExp;\n exports.ɵɵi18nPostprocess = ɵɵi18nPostprocess;\n exports.ɵɵi18nStart = ɵɵi18nStart;\n exports.ɵɵinject = ɵɵinject;\n exports.ɵɵinjectAttribute = ɵɵinjectAttribute;\n exports.ɵɵinjectPipeChangeDetectorRef = ɵɵinjectPipeChangeDetectorRef;\n exports.ɵɵinvalidFactory = ɵɵinvalidFactory;\n exports.ɵɵinvalidFactoryDep = ɵɵinvalidFactoryDep;\n exports.ɵɵlistener = ɵɵlistener;\n exports.ɵɵloadQuery = ɵɵloadQuery;\n exports.ɵɵnamespaceHTML = ɵɵnamespaceHTML;\n exports.ɵɵnamespaceMathML = ɵɵnamespaceMathML;\n exports.ɵɵnamespaceSVG = ɵɵnamespaceSVG;\n exports.ɵɵnextContext = ɵɵnextContext;\n exports.ɵɵngDeclareComponent = ɵɵngDeclareComponent;\n exports.ɵɵngDeclareDirective = ɵɵngDeclareDirective;\n exports.ɵɵngDeclarePipe = ɵɵngDeclarePipe;\n exports.ɵɵpipe = ɵɵpipe;\n exports.ɵɵpipeBind1 = ɵɵpipeBind1;\n exports.ɵɵpipeBind2 = ɵɵpipeBind2;\n exports.ɵɵpipeBind3 = ɵɵpipeBind3;\n exports.ɵɵpipeBind4 = ɵɵpipeBind4;\n exports.ɵɵpipeBindV = ɵɵpipeBindV;\n exports.ɵɵprojection = ɵɵprojection;\n exports.ɵɵprojectionDef = ɵɵprojectionDef;\n exports.ɵɵproperty = ɵɵproperty;\n exports.ɵɵpropertyInterpolate = ɵɵpropertyInterpolate;\n exports.ɵɵpropertyInterpolate1 = ɵɵpropertyInterpolate1;\n exports.ɵɵpropertyInterpolate2 = ɵɵpropertyInterpolate2;\n exports.ɵɵpropertyInterpolate3 = ɵɵpropertyInterpolate3;\n exports.ɵɵpropertyInterpolate4 = ɵɵpropertyInterpolate4;\n exports.ɵɵpropertyInterpolate5 = ɵɵpropertyInterpolate5;\n exports.ɵɵpropertyInterpolate6 = ɵɵpropertyInterpolate6;\n exports.ɵɵpropertyInterpolate7 = ɵɵpropertyInterpolate7;\n exports.ɵɵpropertyInterpolate8 = ɵɵpropertyInterpolate8;\n exports.ɵɵpropertyInterpolateV = ɵɵpropertyInterpolateV;\n exports.ɵɵpureFunction0 = ɵɵpureFunction0;\n exports.ɵɵpureFunction1 = ɵɵpureFunction1;\n exports.ɵɵpureFunction2 = ɵɵpureFunction2;\n exports.ɵɵpureFunction3 = ɵɵpureFunction3;\n exports.ɵɵpureFunction4 = ɵɵpureFunction4;\n exports.ɵɵpureFunction5 = ɵɵpureFunction5;\n exports.ɵɵpureFunction6 = ɵɵpureFunction6;\n exports.ɵɵpureFunction7 = ɵɵpureFunction7;\n exports.ɵɵpureFunction8 = ɵɵpureFunction8;\n exports.ɵɵpureFunctionV = ɵɵpureFunctionV;\n exports.ɵɵqueryRefresh = ɵɵqueryRefresh;\n exports.ɵɵreference = ɵɵreference;\n exports.ɵɵresolveBody = ɵɵresolveBody;\n exports.ɵɵresolveDocument = ɵɵresolveDocument;\n exports.ɵɵresolveWindow = ɵɵresolveWindow;\n exports.ɵɵrestoreView = ɵɵrestoreView;\n exports.ɵɵsanitizeHtml = ɵɵsanitizeHtml;\n exports.ɵɵsanitizeResourceUrl = ɵɵsanitizeResourceUrl;\n exports.ɵɵsanitizeScript = ɵɵsanitizeScript;\n exports.ɵɵsanitizeStyle = ɵɵsanitizeStyle;\n exports.ɵɵsanitizeUrl = ɵɵsanitizeUrl;\n exports.ɵɵsanitizeUrlOrResourceUrl = ɵɵsanitizeUrlOrResourceUrl;\n exports.ɵɵsetComponentScope = ɵɵsetComponentScope;\n exports.ɵɵsetNgModuleScope = ɵɵsetNgModuleScope;\n exports.ɵɵstyleMap = ɵɵstyleMap;\n exports.ɵɵstyleMapInterpolate1 = ɵɵstyleMapInterpolate1;\n exports.ɵɵstyleMapInterpolate2 = ɵɵstyleMapInterpolate2;\n exports.ɵɵstyleMapInterpolate3 = ɵɵstyleMapInterpolate3;\n exports.ɵɵstyleMapInterpolate4 = ɵɵstyleMapInterpolate4;\n exports.ɵɵstyleMapInterpolate5 = ɵɵstyleMapInterpolate5;\n exports.ɵɵstyleMapInterpolate6 = ɵɵstyleMapInterpolate6;\n exports.ɵɵstyleMapInterpolate7 = ɵɵstyleMapInterpolate7;\n exports.ɵɵstyleMapInterpolate8 = ɵɵstyleMapInterpolate8;\n exports.ɵɵstyleMapInterpolateV = ɵɵstyleMapInterpolateV;\n exports.ɵɵstyleProp = ɵɵstyleProp;\n exports.ɵɵstylePropInterpolate1 = ɵɵstylePropInterpolate1;\n exports.ɵɵstylePropInterpolate2 = ɵɵstylePropInterpolate2;\n exports.ɵɵstylePropInterpolate3 = ɵɵstylePropInterpolate3;\n exports.ɵɵstylePropInterpolate4 = ɵɵstylePropInterpolate4;\n exports.ɵɵstylePropInterpolate5 = ɵɵstylePropInterpolate5;\n exports.ɵɵstylePropInterpolate6 = ɵɵstylePropInterpolate6;\n exports.ɵɵstylePropInterpolate7 = ɵɵstylePropInterpolate7;\n exports.ɵɵstylePropInterpolate8 = ɵɵstylePropInterpolate8;\n exports.ɵɵstylePropInterpolateV = ɵɵstylePropInterpolateV;\n exports.ɵɵsyntheticHostListener = ɵɵsyntheticHostListener;\n exports.ɵɵsyntheticHostProperty = ɵɵsyntheticHostProperty;\n exports.ɵɵtemplate = ɵɵtemplate;\n exports.ɵɵtemplateRefExtractor = ɵɵtemplateRefExtractor;\n exports.ɵɵtext = ɵɵtext;\n exports.ɵɵtextInterpolate = ɵɵtextInterpolate;\n exports.ɵɵtextInterpolate1 = ɵɵtextInterpolate1;\n exports.ɵɵtextInterpolate2 = ɵɵtextInterpolate2;\n exports.ɵɵtextInterpolate3 = ɵɵtextInterpolate3;\n exports.ɵɵtextInterpolate4 = ɵɵtextInterpolate4;\n exports.ɵɵtextInterpolate5 = ɵɵtextInterpolate5;\n exports.ɵɵtextInterpolate6 = ɵɵtextInterpolate6;\n exports.ɵɵtextInterpolate7 = ɵɵtextInterpolate7;\n exports.ɵɵtextInterpolate8 = ɵɵtextInterpolate8;\n exports.ɵɵtextInterpolateV = ɵɵtextInterpolateV;\n exports.ɵɵtrustConstantHtml = ɵɵtrustConstantHtml;\n exports.ɵɵtrustConstantResourceUrl = ɵɵtrustConstantResourceUrl;\n exports.ɵɵviewQuery = ɵɵviewQuery;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n})));\n//# sourceMappingURL=core.umd.js.map\n"]}