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,EAAaV,UACxB,EACA,YAAI80C,GACA,OAAOp0C,EAAaR,OACxB,EAER,qBC9jnCA,SAAAmqE,GAAAC,GAAAl7G,GAAAC,GAAAmI,GAAA+yG,GAAA54G,GAAAuY,IACA,IACA,IAAAja,GAAAq6G,GAAA34G,IAAAuY,IACAxf,EAAAuF,GAAAvF,KACA,OAAI6C,GAEJ,YADA8B,GAAA9B,EAEA,CACA0C,GAAA2V,KACAxW,GAAA1E,GAEAyE,QAAAC,QAAA1E,GAAAgoB,KAAAlb,GAAA+yG,GAEA,CACe,SAAAz7G,GAAAkJ,IACf,kBACA,IAAA+Q,GAAA1e,KACAyQ,GAAAjM,UACA,WAAAM,QAAA,SAAAC,GAAAC,IACA,IAAAi7G,GAAAtyG,GAAApJ,MAAAma,GAAAjO,IACA,SAAAtD,GAAA9M,GACA2/G,GAAAC,GAAAl7G,GAAAC,GAAAmI,GAAA+yG,GAAA,OAAA7/G,EACA,CACA,SAAA6/G,GAAAr1G,GACAm1G,GAAAC,GAAAl7G,GAAAC,GAAAmI,GAAA+yG,GAAA,QAAAr1G,EACA,CACAsC,QAAA,EACA,EACA,CACA","names":["BLOCK_MARKER$1","MEANING_SEPARATOR","ID_SEPARATOR","LEGACY_ID_INDICATOR","textEncoder","fingerprint","str","TextEncoder","utf8","encode","view","DataView","buffer","byteOffset","byteLength","hi","hash32","length","lo","BigInt","asUintN","c","a","b","index","end","getUint32","res","mix","remainder","getUint8","parseMessage","messageParts","expressions","location","messagePartLocations","expressionLocations","substitutions","substitutionLocations","associatedMessageIds","metadata","parseMetadata","cooked","raw","text","messageString","block","splitBlock","undefined","meaningDescAndId","legacyIds","split","meaningAndDesc","customId","meaning","description","cleanedMessageParts","placeholderNames","i","messagePart","placeholderName","computePlaceholderName","associatedMessageId","parsePlaceholder","push","messageId","computeMsgId","msg","msgFingerprint","toString","filter","id","charAt","endOfBlock","findEndOfBlock","substring","cookedIndex","rawIndex","Error","MissingTranslationError","constructor","parsedMessage","super","describeMessage","this","type","makeTemplateObject","Object","defineProperty","value","message","meaningString","legacy","map","l","join","translate","translate$1","translations","translation","placeholder","hasOwnProperty","$localize","TRANSLATIONS","e","console","warn","$localize$1","stripBlock","BLOCK_MARKER","rawMessagePart","globalThis","ɵ$localize","getXMLParser","parseXml","win","window","DOMParser","xmlStr","parseFromString","ActiveXObject","xmlDoc","async","loadXML","mergeXlf","source","target","parser","sourceTree","targetTree","translationUnits","documentElement","getElementsByTagName","parseErrors","error","Array","from","selector","getAttribute","querySelector","replaceChild","cloneNode","appendChild","serializer","XMLSerializer","serialized","serializeToString","getWindow","rootPath","SERVER_CONFIG","APP_ROOT_PATH","getTranslationFile","_x","_x2","_getTranslationFile","apply","arguments","_asyncToGenerator","path","errorMessage","getFile","file","Promise","resolve","reject","xhr","XMLHttpRequest","open","Math","random","onerror","onreadystatechange","readyState","status","responseText","send","info","_xlfTranslationProvider","clearTranslations","local","systemLang","theme","CURRENT_THEME","systemTheme","defaultThemeTranslationFile","themeTranslationFile","translationRequests","pop","translationResults","all","current","parsedTranslations","__TRANSLATIONS","loadExternalTranslations","translationsJson","convertTranslationsToJSON","JS_TRANSLATIONS","normalTranslations","keyValueFormat","keys","forEach","loadTranslations","key","parseTranslation","parts","rawMessageParts","part","getTranslationProvider","provide","useValue","TRANSLATIONS_FORMAT","LOCALE_ID","useId","output","firstChild","nodeValue","createJSONValue","childNodes","trimValues","nodeType","lastIndexOf","trim","nodeName","toLowerCase","name","replace","xlfTranslationProvider","BehaviorSubject","Subject","_value","getValue","_subscribe","subscriber","subscription","closed","next","hasError","thrownError","_throwIfClosed","Observable","subscribe","lift","operator","observable","observerOrNext","complete","isSubscriber","Subscriber","isObserver","isFunction","isSubscription","SafeSubscriber","errorContext","add","call","_trySubscribe","sink","err","promiseCtor","getPromiseCtor","unsubscribe","_a","Symbol_observable","pipe","operations","pipeFromArray","toPromise","x","create","config","ObjectUnsubscribedError","createErrorClass","_super","currentObservers","observers","isStopped","subject","AnonymousSubject","observer","shift","observed","_checkFinalizedStatuses","_innerSubscribe","EMPTY_SUBSCRIPTION","Subscription","arrRemove","asObservable","destination","_b","COMPLETE_NOTIFICATION","createNotification","kind","EMPTY_OBSERVER","handleStoppedNotification","nextNotification","_next","errorNotification","_error","_complete","_bind","Function","prototype","bind","fn","thisArg","ConsumerObserver","partialObserver","handleUnhandledError","context","useDeprecatedNextContext","useDeprecatedSynchronousErrorHandling","captureError","reportUnhandledError","notification","onStoppedNotification","timeoutProvider","setTimeout","noop","defaultErrorHandler","UnsubscriptionError","errors","initialTeardown","_parentage","_finalizers","isArray","parent","remove","initialFinalizer","finalizer","execFinalizer","teardown","_hasParent","_addParent","includes","_removeParent","EMPTY","empty","onUnhandledError","createOperatorSubscriber","onNext","onComplete","onError","onFinalize","OperatorSubscriber","shouldUnsubscribe","project","operate","handler","timeout","args","delegate","clearTimeout","handle","Symbol","arr","item","indexOf","splice","createImpl","ctorFunc","instance","stack","cb","isRoot","errorThrown","identity","hasLift","init","liftedSource","TypeError","fns","input","reduce","prev","NEWLINE","IGNORE_FRAMES","creationTrace","ERROR_TAG","SEP_TAG","sepTemplate","LongStackTrace","getStacktrace","timestamp","Date","getStacktraceWithUncaughtError","getStacktraceWithCaughtError","caughtError","getFrames","addErrorStack","lines","trace","renderLongStackTrace","frames","longTrace","getTime","traceFrames","lastTime","separator","stackTracesEnabled","stackTraceLimit","captureStackTraces","stackTraces","count","Zone","longStackTraceZoneSpec","longStackTraceLimit","getLongStackTrace","__symbol__","onScheduleTask","parentZoneDelegate","currentZone","targetZone","task","currentTask","data","concat","scheduleTask","onHandleError","parentTask","longStack","handleError","computeIgnoreFrames","frames1","frames2","frame1","match","ProxyZoneSpec","get","isLoaded","assertPresent","defaultSpecDelegate","_delegateSpec","properties","propertyKeys","lastTaskState","isNeedToTriggerHasTask","tasks","setDelegate","delegateSpec","isNewDelegate","k","macroTask","microTask","getDelegate","resetDelegate","tryTriggerHasTask","onHasTask","removeFromTasks","getAndClearPendingTasksInfo","pendingTasksInfo","dataInfo","onFork","zoneSpec","fork","onIntercept","intercept","onInvoke","applyThis","applyArgs","invoke","onInvokeTask","invokeTask","onCancelTask","cancelTask","hasTaskState","hasTask","SyncTestZoneSpec","namePrefix","runZone","__load_patch","global","api","jest","jasmine","__zone_patch__","ambientZone","symbol","disablePatchingJasmineClock","enableAutoFakeAsyncWhenClockPatched","globalErrors","GlobalErrors","originalInstall","install","isNode","process","on","originalHandlers","listeners","eventListeners","result","removeAllListeners","addEventListener","jasmineEnv","getEnv","methodName","originalJasmineFn","specDefinitions","wrapDescribeInZone","describeBody","run","wrapTestInZone","originalClockFn","clock","originalTick","tick","fakeAsyncZoneSpec","originalMockDate","mockDate","dateTime","setFakeBaseSystemTime","FakeAsyncTestZoneSpec","originalCreateSpyObj","createSpyObj","slice","spyObj","obj","p","attributes","configurable","enumerable","runInTestZone","testBody","queueRunner","done","isClockInstalled","testProxyZone","fakeAsyncModule","fakeAsync","QueueRunner","ZoneQueueRunner","attrs","testProxyZoneSpec","scheduleMicroTask","nativeSetTimeout","nativeClearTimeout","UserContext","userContext","onException","proxyZoneSpec","d","__","__extends","execute","zone","isChildOfAmbientZone","rootZone","syncZone","proxyZone","isTestFunc","wrappedFunc","isFakeAsync","writable","originalJestFn","each","wrapDescribeFactoryInZone","tableArgs","originalDescribeFn","describe","only","fdescribe","skip","xdescribe","wrapTestFactoryInZone","todo","it","fit","xit","test","patchJestObject","Timer","isModern","isPatchingFakeTimer","isInTestFunc","patchMethod","self","getRealSystemTime","flushMicrotasks","flush","flushOnlyPendingTimers","tickToNext","removeAllTimers","getTimerCount","Mocha","testZone","suiteZone","mochaOriginal","after","afterEach","before","beforeEach","modifyArguments","syncTest","asyncTest","arg","wrapSuiteInZone","originalRunTest","originalRun","suite","specify","xspecify","suiteTeardown","suiteSetup","setup","Runner","runTest","_global","AsyncTestZoneSpec","static","symbolParentUnresolved","finishCallback","failCallback","_pendingMicroTasks","_pendingMacroTasks","_alreadyErrored","_isSync","_existingFinishTimer","entryFunction","unresolvedChainedPromiseCount","supportWaitUnresolvedChainedPromise","isUnresolvedChainedPromisePending","_finishCallbackIfDone","patchPromiseForTest","unPatchPromiseForTest","change","getZoneWith","previousDelegate","testZoneSpec","runGuarded","fail","OriginalDate","FakeDate","setTime","now","fakeAsyncTestZoneSpec","getFakeSystemTime","UTC","parse","timers","setInterval","clearInterval","Scheduler","nextId","_schedulerQueue","_currentTickTime","_currentFakeBaseSystemTime","_currentTickRequeuePeriodicEntries","getCurrentTickTime","fakeBaseSystemTime","scheduleFunction","delay","options","currentId","isPeriodic","isRequestAnimationFrame","isRequeuePeriodic","newEntry","endTime","func","removeScheduledFunctionWithId","removeAll","step","doTick","tickOptions","millis","finalTime","lastCurrentTime","schedulerQueue","assign","processNewMacroTasksSynchronously","idx","startTime","limit","flushPeriodic","flushNonPeriodic","assertInZone","trackPendingRequestAnimationFrame","macroTaskOptions","_scheduler","_microtasks","_lastError","_uncaughtPromiseErrors","pendingPeriodicTimers","pendingTimers","patchDateLocked","_fnAndFlush","completers","onSuccess","_removeTimer","_dequeueTimer","_requeuePeriodicTimer","interval","_dequeuePeriodicTimer","_setTimeout","isTimer","removeTimerFn","_clearTimeout","_setInterval","_clearInterval","_resetLastErrorAndThrow","realTime","patchDate","checkTimerPatch","resetDate","lockDatePatch","unlockDatePatch","steps","microtask","flushErrors","elapsed","additionalArgs","callbackIndex","cbIdx","handleId","url","macroTaskOption","findMacroTaskOption","callbackArgs","callback","getProxyZoneSpec","_fakeAsyncTestZoneSpec","resetFakeAsyncZone","_getFakeAsyncZoneSpec","discardPeriodicTasks","ignoreNestedTimeout","maxTurns","fakeAsyncFn","lastProxyZoneSpec","symbolState","oriThen","then","chained","asyncTestZoneSpec","performance","mark","performanceMeasure","label","measure","symbolPrefix","__Zone_symbol_prefix","checkDuplicate","assertZonePatched","patches","ZoneAwarePromise","root","_currentZoneFrame","_currentTask","ignoreDuplicate","perfName","_api","_parent","_name","_properties","_zoneDelegate","_ZoneDelegate","wrap","_callback","runTask","NO_ZONE","state","notScheduled","eventTask","reEntryGuard","running","_transitionTo","scheduled","runCount","previousTask","cancelFn","unknown","_updateTaskCount","newZone","scheduling","zoneDelegates","_zoneDelegates","_zone","customSchedule","ZoneTask","scheduleMacroTask","customCancel","scheduleEventTask","canceling","DELEGATE_ZS","_","parentDelegate","_taskCounts","_parentDelegate","_forkZS","_forkDlgt","_forkCurrZone","_interceptZS","_interceptDlgt","_interceptCurrZone","_invokeZS","_invokeDlgt","_invokeCurrZone","_handleErrorZS","_handleErrorDlgt","_handleErrorCurrZone","_scheduleTaskZS","_scheduleTaskDlgt","_scheduleTaskCurrZone","_invokeTaskZS","_invokeTaskDlgt","_invokeTaskCurrZone","_cancelTaskZS","_cancelTaskDlgt","_cancelTaskCurrZone","_hasTaskZS","_hasTaskDlgt","_hasTaskDlgtOwner","_hasTaskCurrZone","zoneSpecHasTask","returnTask","scheduleFn","isEmpty","counts","_state","useG","_numberOfNestedTaskFrames","drainMicroTaskQueue","cancelScheduleRequest","toState","fromState1","fromState2","toJSON","symbolSetTimeout","symbolPromise","symbolThen","nativeMicroTaskQueuePromise","_microTaskQueue","_isDrainingMicrotaskQueue","nativeScheduleMicroTask","nativeThen","queue","microtaskDrainDone","currentZoneFrame","showUncaughtError","patchEventTarget","patchOnProperties","bindArguments","patchThen","patchMacroTask","patchEventPrototype","isIEOrEdge","getGlobalObjects","ObjectDefineProperty","ObjectGetOwnPropertyDescriptor","ObjectCreate","ArraySlice","patchClass","wrapWithCurrentZone","filterProperties","attachOriginToPatched","_redefineProperty","patchCallbacks","getOwnPropertyDescriptor","ObjectGetPrototypeOf","getPrototypeOf","ADD_EVENT_LISTENER_STR","REMOVE_EVENT_LISTENER_STR","ZONE_SYMBOL_ADD_EVENT_LISTENER","ZONE_SYMBOL_REMOVE_EVENT_LISTENER","TRUE_STR","FALSE_STR","ZONE_SYMBOL_PREFIX","scheduleMacroTaskWithCurrentZone","zoneSymbol","isWindowExists","internalWindow","REMOVE_ATTRIBUTE","isPropertyWritable","propertyDesc","set","isWebWorker","WorkerGlobalScope","isBrowser","HTMLElement","isMix","zoneSymbolEventNames$1","wrapFn","event","eventNameSymbol","listener","filename","lineno","colno","preventDefault","patchProperty","prop","desc","onPropPatchedSymbol","originalDescGet","originalDescSet","eventName","newValue","removeEventListener","removeAttribute","onProperties","j","originalInstanceKey","className","OriginalClass","patchFn","proto","delegateName","patchDelegate","funcName","metaCreator","setNative","meta","patched","original","isDetectedIEOrEdge","ieOrEdge","ua","navigator","userAgent","isDisableWrappingUncaughtPromiseRejection","rejection","uncaughtPromiseError","throwOriginal","handleUnhandledRejection","UNHANDLED_PROMISE_REJECTION_HANDLER_SYMBOL","isThenable","forwardResolution","forwardRejection","symbolValue","symbolFinally","symbolParentPromiseValue","symbolParentPromiseState","UNRESOLVED","RESOLVED","REJECTED","REJECTED_NO_CATCH","makeResolver","promise","v","resolvePromise","once","wasCalled","wrappedFunction","TYPE_ERROR","CURRENT_TASK_TRACE_SYMBOL","onceWrapper","clearRejectedNoCatch","scheduleResolveOrReject","readableObjectToString","JSON","stringify","REJECTION_HANDLED_HANDLER","chainPromise","onFulfilled","onRejected","promiseState","parentPromiseValue","isFinallyPromise","AggregateError","withResolvers","rej","any","values","iterator","promises","finished","race","onResolve","onReject","allWithCallback","allSettled","thenCallback","errorCallback","reason","unresolvedCount","valueIndex","resolvedValues","curValueIndex","thenErr","executor","toStringTag","species","C","catch","finally","onFinally","NativePromise","symbolThenPatched","Ctor","originalThen","zoneify","resultPromise","ctor","originalFunctionToString","ORIGINAL_DELEGATE_SYMBOL","PROMISE_SYMBOL","ERROR_SYMBOL","newFunctionToString","originalDelegate","nativePromise","nativeError","originalObjectToString","passiveSupported","OPTIMIZED_ZONE_EVENT_TASK_DATA","zoneSymbolEventNames","globalSources","EVENT_NAME_SYMBOL_REGX","RegExp","IMMEDIATE_PROPAGATION_SYMBOL","prepareEventNames","eventNameToString","falseEventName","trueEventName","symbolCapture","apis","patchOptions","ADD_EVENT_LISTENER","REMOVE_EVENT_LISTENER","rm","LISTENERS_EVENT_LISTENER","REMOVE_ALL_LISTENERS_EVENT_LISTENER","rmAll","zoneSymbolAddEventListener","ADD_EVENT_LISTENER_SOURCE","PREPEND_EVENT_LISTENER","PREPEND_EVENT_LISTENER_SOURCE","isRemoved","handleEvent","globalCallback","isCapture","copyTasks","globalZoneAwareCallback","globalZoneAwareCaptureCallback","patchEventTargetMethods","useGlobalCallback","validateHandler","vh","chkDup","returnTarget","rt","taskData","nativeAddEventListener","nativeRemoveEventListener","nativeListeners","nativeRemoveAllListeners","nativePrependEventListener","prepend","isExisting","capture","symbolEventNames","symbolEventName","existingTasks","allRemoved","compare","diff","typeOfDelegate","unpatchedEvents","passiveEvents","makeAddListener","nativeListener","addSource","customScheduleFn","customCancelFn","transferEventName","isHandleEvent","passive","buildEventListenerOptions","signal","aborted","constructorName","targetSource","unshift","existingTask","findEventTasks","captureTasks","removeTasks","exec","evtName","results","foundTasks","captureFalseTasks","captureTrueTasks","Event","targetName","method","callbacks","nativeDelegate","opts","descriptor","ignoreProperties","tip","ip","targetIgnoreProperties","op","patchFilteredProperties","getOnEventNames","getOwnPropertyNames","startsWith","eventNames","SYMBOL_BLACK_LISTED_EVENTS","SYMBOL_UNPATCHED_EVENTS","taskSymbol","patchTimer","setName","cancelName","nameSuffix","clearNative","tasksByHandleId","clearTask","ref","unref","legacyPatch","clear","blockingMethods","s","patchEvent","eventTargetPatch","EVENT_TARGET","EventTarget","XMLHttpRequestEventTarget","propertyDescriptorPatch","__Zone_ignore_on_properties","patchTargets","ignoreErrorProperties","isIE","patchCustomElements","customElements","patchXHR","XMLHttpRequestPrototype","oriAddListener","oriRemoveListener","XMLHttpRequestEventTargetPrototype","READY_STATE_CHANGE","SCHEDULED","XHR_SCHEDULED","XHR_ERROR_BEFORE_SCHEDULED","XHR_LISTENER","newListener","DONE","loadTasks","oriInvoke","XHR_TASK","sendNative","placeholderCallback","abortNative","openNative","XHR_SYNC","XHR_URL","fetchTaskAborting","fetchTaskScheduling","findPendingTask","geolocation","patchPrototype","fnNames","findPromiseRejectionHandler","PromiseRejectionEvent","evt","patchQueueMicrotask","activeConsumer","inNotificationPhase","epoch","SIGNAL","setActiveConsumer","consumer","REACTIVE_NODE","version","lastCleanEpoch","dirty","producerNode","producerLastReadVersion","producerIndexOfThis","nextProducerIndex","liveConsumerNode","liveConsumerIndexOfThis","consumerAllowSignalWrites","consumerIsAlwaysLive","producerMustRecompute","producerRecomputeValue","consumerMarkedDirty","consumerOnSignalRead","producerAccessed","node","assertConsumerNode","consumerIsLive","producerRemoveLiveConsumerAtIndex","producerAddLiveConsumer","producerUpdateValueVersion","consumerPollProducersForChange","producerNotifyConsumers","consumerMarkDirty","producerUpdatesAllowed","consumerBeforeComputation","consumerAfterComputation","prevConsumer","producer","seenVersion","consumerDestroy","indexOfThis","assertProducerNode","lastIdx","idxProducer","throwInvalidWriteToSignalErrorFn","defaultThrowError","throwInvalidWriteToSignalError","postSignalSetFn","signalSetFn","equal","signalValueChanged","producerIncrementEpoch","SIGNAL_NODE","defaultEquals","is","NOOP_CLEANUP_FN","WATCH_NODE","schedule","hasRun","cleanupFn","XSS_SECURITY_URL","RuntimeError","code","formatRuntimeError","abs","noSideEffects","ANNOTATIONS","PARAMETERS","PROP_METADATA","makeDecorator","props","parentClass","additionalProcessing","typeFn","metaCtor","makeMetadataCtor","DecoratorFactory","annotationInstance","cls","ngMetadataName","annotationCls","propName","makeParamDecorator","ParamDecoratorFactory","ParamDecorator","annotation","unusedKey","parameters","getClosureSafeProperty","objWithPropertyToExtract","fillProperties","token","overriddenName","newLineIndex","concatStringsWithSpace","__forward_ref__","forwardRef","forwardRefFn","resolveForwardRef","isForwardRef","assertEqual","actual","expected","throwError","comparison","ɵɵdefineInjectable","providedIn","factory","ɵɵdefineInjector","providers","imports","getInjectableDef","getOwnDefinition","NG_PROV_DEF","NG_INJECTABLE_DEF","isInjectable","field","getInjectorDef","NG_INJ_DEF","NG_INJECTOR_DEF","ɵprov","ɵinj","ngInjectableDef","ngInjectorDef","InjectionToken","_desc","__NG_ELEMENT_ID__","multi","isEnvironmentProviders","ɵproviders","NG_COMP_DEF","ɵcmp","NG_DIR_DEF","ɵdir","NG_PIPE_DEF","ɵpipe","NG_MOD_DEF","ɵmod","NG_FACTORY_DEF","ɵfac","NG_ELEMENT_ID","NG_ENV_ID","__NG_ENV_ID__","renderStringify","String","stringifyForError","throwProviderNotFoundError","injectorName","InjectFlags","Default","Host","Self","SkipSelf","Optional","_injectImplementation","getInjectImplementation","setInjectImplementation","impl","previous","injectRootLimpMode","notFoundValue","flags","injectableDef","THROW_IF_NOT_FOUND","DI_DECORATOR_FLAG","NG_TEMP_TOKEN_PATH","NEW_LINE","SOURCE","_currentInjector","setCurrentInjector","injector","former","injectInjectorOnly","ngDevMode","ɵɵinject","inject","convertToBitFlags","optional","host","skipSelf","injectArgs","types","flag","getInjectFlag","attachInjectFlag","decorator","Inject","getFactoryDef","throwNotFound","flatten","list","flat","Number","POSITIVE_INFINITY","deepForEach","addToArray","removeFromArray","newArray","size","keyValueArraySet","keyValueArray","keyValueArrayIndexOf","arrayInsert2","array","value1","value2","keyValueArrayGet","_arrayIndexOfSorted","start","middle","EMPTY_OBJ","EMPTY_ARRAY","ENVIRONMENT_INITIALIZER","INJECTOR$1","INJECTOR_DEF_TYPES","NullInjector","ChangeDetectionStrategy","OnPush","ViewEncapsulation$1","ViewEncapsulation","Emulated","None","ShadowDom","InputFlags","SignalBased","HasDecoratorInputTransform","classIndexOf","classToSearch","startingIndex","foundIndex","charCodeAt","setUpAttributes","renderer","native","namespaceURI","attrName","attrVal","setAttribute","isAnimationProp","setProperty","isNameOnlyAttributeMarker","marker","mergeHostAttrs","dst","src","srcMarker","mergeHostAttribute","key1","key2","markerInsertPosition","dstValue","NG_TEMPLATE_SELECTOR","isCssClassMatching","tNode","cssClassToMatch","isProjectionMode","isInlineTemplate","hasTagAndTypeMatch","currentSelector","isNodeMatchingSelector","mode","nodeAttrs","nameOnlyMarkerIdx","getNameOnlyMarkerIndex","skipToNextSelector","isPositive","selectorAttrValue","attrIndexInNode","findAttrIndexInNode","nodeAttrValue","bindingsMode","maybeAttrName","matchTemplateAttribute","attr","isNodeMatchingSelectorList","isSelectorInSelectorList","selectorListLoop","currentSelectorInList","maybeWrapInNotSelector","isNegativeMode","chunk","stringifyCSSSelector","currentChunk","valueOrMarker","attrValue","ɵɵdefineComponent","componentDefinition","baseDef","getNgDirectiveDef","def","decls","vars","template","consts","ngContentSelectors","onPush","changeDetection","directiveDefs","pipeDefs","dependencies","standalone","getStandaloneInjector","signals","encapsulation","styles","schemas","tView","initFeatures","extractDefListOrFactory","getComponentId","componentDef","hash","hashSelectors","selectors","hostVars","hostAttrs","exportAs","inputs","outputs","contentQueries","viewQuery","char","imul","extractDirectiveDef","getComponentDef","getDirectiveDef","nonNull","ɵɵdefineNgModule","bootstrap","declarations","exports","transitiveCompileScopes","parseAndConvertBindingsForDefinition","declaredInputs","newLookup","minifiedKey","publicName","declaredName","inputFlags","ɵɵdefineDirective","directiveDefinition","ɵɵdefinePipe","pipeDef","pure","onDestroy","ngOnDestroy","getPipeDef$1","isStandalone","getNgModuleDef","ngModuleDef","providersResolver","hostBindings","inputTransforms","inputConfig","features","setInput","findHostDirectiveDefs","hostDirectives","debugInfo","definition","defExtractor","dep","makeEnvironmentProviders","importProvidersFrom","sources","internalImportProvidersFrom","ɵfromNgModule","checkForStandaloneCmp","providersOut","dedup","Set","injectorTypesWithProviders","collectProviders","provider","internalSource","walkProviderTree","processInjectorTypesWithProviders","typesWithProviders","visitor","ngModule","deepForEachProvider","container","parents","defType","injDef","cmpDef","isDuplicate","has","deps","importTypesWithProviders","imported","useFactory","defProviders","injectorType","USE_VALUE$1","isValueProvider","isTypeProvider","INJECTOR_SCOPE","NOT_YET","CIRCULAR","NULL_INJECTOR","getNullInjector","EnvironmentInjector","R3Injector","destroyed","_destroyed","scopes","records","Map","_ngOnDestroyHooks","_onDestroyHooks","forEachSingleProvider","processProvider","makeRecord","record","injectorDefTypes","destroy","assertNotDestroyed","setActiveConsumer$1","service","onDestroyHooks","hook","removeOnDestroy","runInContext","previousInjector","previousInjectImplementation","couldBeInjectableType","injectableDefInScope","injectableDefOrInjectorDefFactory","hydrate","catchInjectorError","injectorErrorName","tokenPath","formatError","resolveInjectorInitializers","initializers","initializer","tokens","providerToRecord","providerToFactory","multiRecord","hasOnDestroy","destroyCBIdx","getUndecoratedInjectableFactory","inheritedInjectableDef","getInheritedInjectableDef","ngModuleType","unwrappedProvider","isFactoryProvider","isExistingProvider","useExisting","classRef","useClass","hasDeps","runInInjectionContext","prevInjector","isInInjectionContext","getCurrentInjector","assertInInjectionContext","debugFn","getCompilerFacade","request","globalNg","ng","ɵcompilerFacade","angularCoreDiEnv","ɵɵinvalidFactoryDep","Type","isType","ES5_DELEGATE_CTOR","ES2015_INHERITED_CLASS","ES2015_INHERITED_CLASS_WITH_CTOR","ES2015_INHERITED_CLASS_WITH_DELEGATE_CTOR","ReflectionCapabilities","reflect","_reflect","Reflect","t","_zipTypesAndAnnotations","paramTypes","paramAnnotations","_ownParameters","parentCtor","isDelegateCtor","typeStr","tsickleCtorParams","ctorParameters","ctorParam","convertTsickleDecoratorIntoMetadata","decorators","getOwnMetadata","getParentCtor","_ownAnnotations","typeOrFunc","annotations","ownAnnotations","_ownPropMetadata","propMetadata","propDecorators","parentPropMetadata","ownPropMetadata","hasLifecycleHook","lcProperty","decoratorInvocations","decoratorInvocation","parentProto","HOST","TVIEW","FLAGS","PARENT","NEXT","T_HOST","HYDRATION","CLEANUP","CONTEXT","INJECTOR","ENVIRONMENT","RENDERER","CHILD_HEAD","CHILD_TAIL","DECLARATION_VIEW","DECLARATION_COMPONENT_VIEW","DECLARATION_LCONTAINER","PREORDER_HOOK_FLAGS","QUERIES","ID","EMBEDDED_VIEW_INJECTOR","ON_DESTROY_HOOKS","EFFECTS_TO_SCHEDULE","REACTIVE_TEMPLATE_CONSUMER","HEADER_OFFSET","TYPE","NATIVE","MOVED_VIEWS","CONTAINER_HEADER_OFFSET","LContainerFlags","HasTransplantedViews","isLView","isLContainer","isContentQueryHost","isComponentHost","componentOffset","isDirectiveHost","isComponentDef","isRootView","SimpleChange","previousValue","currentValue","firstChange","isFirstChange","applyValueToInputField","inputSignalNode","privateName","applyValueToInputSignal","ɵɵNgOnChangesFeature","NgOnChangesFeatureImpl","ngOnChanges","ngOnChangesSetInput","rememberChangeHistoryAndInvokeOnChangesHook","simpleChangesStore","getSimpleChangesStore","setSimpleChangesStore","store","SIMPLE_CHANGES_STORE","previousChange","ngInherit","profiler","hookOrListener","SVG_NAMESPACE","_ensureDirtyViewsAreAlwaysReachable","unwrapRNode","getNativeByIndex","lView","getNativeByTNode","getTNode","load","getComponentLViewByIndex","nodeIndex","hostView","slotValue","viewAttachedToChangeDetector","getConstant","resetPreOrderHookFlags","markViewForRefresh","markAncestorsForTraversal","requiresRefreshOrTraversal","updateAncestorTraversalFlagsOnAttach","changeDetectionScheduler","notify","getEnsureDirtyViewsAreAlwaysReachable","getLViewParent","storeLViewOnDestroy","onDestroyCallback","instructionState","lFrame","createLFrame","bindingsEnabled","skipHydrationRootTNode","getBindingsEnabled","isInSkipHydrationBlock$1","getLView","getTView","ɵɵrestoreView","viewToRestore","contextLView","ɵɵresetView","getCurrentTNode","currentTNode","getCurrentTNodePlaceholderOk","getCurrentParentTNode","isParent","setCurrentTNode","isCurrentTNodeParent","setCurrentTNodeAsNotParent","getBindingRoot","bindingRootIndex","bindingStartIndex","getBindingIndex","bindingIndex","nextBindingIndex","incrementBindingIndex","setInI18nBlock","isInI18nBlock","inI18n","setBindingRootForHostBindings","currentDirectiveIndex","setCurrentDirectiveIndex","getCurrentDirectiveDef","tData","getCurrentQueryIndex","currentQueryIndex","setCurrentQueryIndex","getDeclarationTNode","declTNode","enterDI","parentTNode","parentLView","allocLFrame","enterView","newView","newLFrame","currentLFrame","childLFrame","child","selectedIndex","elementDepthCount","currentNamespace","leaveViewLight","oldLFrame","leaveDI","leaveView","getSelectedIndex","setSelectedIndex","getSelectedTNode","ɵɵnamespaceSVG","_wasLastNodeCreated","wasLastNodeCreated","lastNodeWasCreated","registerPostOrderHooks","directiveStart","directiveEnd","lifecycleHooks","ngAfterContentInit","ngAfterContentChecked","ngAfterViewInit","ngAfterViewChecked","contentHooks","contentCheckHooks","viewHooks","viewCheckHooks","destroyHooks","executeCheckHooks","hooks","callHooks","executeInitAndCheckHooks","initPhase","incrementInitPhaseFlags","currentView","currentNodeIndex","nodeIndexLimit","max","lastNodeIndexFound","callHook","callHookInternal","directive","isInitHook","NO_PARENT_INJECTOR","NodeInjectorFactory","isViewProvider","injectImplementation","resolving","canSeeViewProviders","injectImpl","hasParentInjector","parentLocation","getParentInjectorIndex","getParentInjectorView","startView","viewOffset","getParentInjectorViewOffset","parentView","includeViewProviders","setIncludeViewProviders","oldValue","BLOOM_MASK","BLOOM_BUCKET_BITS","nextNgElementId","NOT_FOUND","getOrCreateNodeInjectorForNode","existingInjectorIndex","getInjectorIndex","firstCreatePass","injectorIndex","insertBloom","blueprint","parentLoc","getParentInjectorLocation","parentIndex","parentData","footer","declarationViewOffset","lViewCursor","getTNodeFromLView","diPublicInInjector","bloomAdd","bloomHash","notFoundValueOrThrow","lookupTokenUsingModuleInjector","moduleInjector","getOrCreateInjectable","embeddedInjectorValue","lookupTokenUsingEmbeddedInjector","currentLView","nodeInjectorValue","lookupTokenUsingNodeInjector","embeddedViewInjector","embeddedViewInjectorValue","bloomHashBitOrFactory","tokenId","createNodeInjector","previousTView","hostTElementNode","shouldSearchParent","bloomHasToken","searchTokensOnInjector","currentTView","injectableIdx","locateDirectiveOrProvider","getNodeInjectable","canAccessViewProviders","isHostSpecialCase","nodeProviderIndexes","providerIndexes","tInjectables","injectablesStart","directivesStart","cptViewProvidersCount","endIndex","providerTokenOrDef","dirDef","isFactory","throwCyclicDependencyError","previousIncludeViewProviders","registerPreOrderHooks","directiveIndex","directiveDef","ngOnInit","ngDoCheck","wrappedOnChanges","preOrderHooks","preOrderCheckHooks","injectorView","isFirstHostTNode","NodeInjector","_tNode","_lView","ɵɵgetInheritedFactory","ownConstructor","ownFactory","getFactoryOf","objectPrototype","tViewType","ɵɵinjectAttribute","attrNameToInject","injectAttributeImpl","classes","attrsLength","Attribute","attributeName","reflectDependencies","convertDependencies","getReflect","reflectDependency","attribute","param","USE_VALUE","isUseClassProvider","isUseFactoryProvider","Injectable","compileInjectable","ngFactoryDef","getInjectableMetadata","srcMeta","compilerMeta","typeArgumentCount","isUseValueProvider","isUseExistingProvider","compiler","compileFactory","FactoryTarget","createInjector","additionalProviders","createInjectorWithoutInjectorInstances","Injector","NULL","getOriginalError","ErrorHandler","_console","originalError","_findOriginalError","INTERNAL_APPLICATION_ERROR_HANDLER","DestroyRef","injectDestroyRef","NodeInjectorDestroyRef","removeLViewOnDestroy","injectElementRef","createElementRef","ElementRef","nativeElement","unwrapElementRef","_wrapInTimeout","EventEmitter","EventEmitter_","isAsync","destroyRef","__isAsync","emit","nextFn","errorFn","completeFn","symbolIterator","_results","QueryList","changes","_changes","_emitDistinctChangesOnly","_onDirty","_changesDetected","first","last","find","some","toArray","reset","resultsTree","identityAccessor","newResultFlat","arrayEquals","valueA","valueB","notifyOnChanges","onDirty","setDirty","hasInSkipHydrationBlockFlag","TRACKED_LVIEWS","uniqueIdCounter","MONKEY_PATCH_KEY_NAME","attachPatchData","registerLView","getFirstLContainer","getNearestLContainer","getNextLContainer","viewOrContainer","DOCUMENT","setDocument","document","getDocument","APP_ID","DEFAULT_APP_ID","PLATFORM_INITIALIZER","PLATFORM_ID","ANIMATION_MODULE_TYPE","CSP_NONCE","body","makeStateKey","initTransferState","transferState","TransferState","retrieveTransferredState","doc","appId","script","getElementById","textContent","onSerializeCallbacks","defaultValue","hasKey","onSerialize","toJson","_retrieveHydrationInfoImpl","retrieveHydrationInfo","rNode","PRESERVE_HOST_CONTENT","policy$1","policy","trustedHTMLFromString","html","getPolicy$1","trustedTypes","createPolicy","createHTML","createScript","createScriptURL","getPolicy","trustedHTMLFromStringBypass","trustedScriptURLFromStringBypass","SafeValueImpl","changingThisBreaksApplicationSecurity","SafeHtmlImpl","getTypeName","SafeStyleImpl","SafeScriptImpl","SafeUrlImpl","SafeResourceUrlImpl","unwrapSafeValue","allowSanitizationBypassAndThrow","actualType","getSanitizationBypassType","bypassSanitizationTrustHtml","trustedHtml","bypassSanitizationTrustStyle","trustedStyle","bypassSanitizationTrustScript","trustedScript","bypassSanitizationTrustUrl","trustedUrl","bypassSanitizationTrustResourceUrl","trustedResourceUrl","getInertBodyHelper","defaultDoc","inertDocumentHelper","InertDocumentHelper","isDOMParserAvailable","DOMParserHelper","getInertBodyElement","removeChild","inertDocument","implementation","createHTMLDocument","templateEl","createElement","innerHTML","SAFE_URL_PATTERN","_sanitizeUrl","tagSet","tags","merge","sets","VOID_ELEMENTS","OPTIONAL_END_TAG_BLOCK_ELEMENTS","OPTIONAL_END_TAG_INLINE_ELEMENTS","VALID_ELEMENTS","URI_ATTRS","VALID_ATTRS","SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS","SanitizingHtmlSerializer","sanitizedSomething","buf","sanitizeChildren","el","traverseContent","parentNodes","Node","ELEMENT_NODE","startElement","TEXT_NODE","chars","getFirstChild","endElement","getNextSibling","element","tagName","getNodeName","elAttrs","elAttr","lower","encodeEntities","nextSibling","previousSibling","clobberedElementError","isClobberedElement","parentNode","childNode","compareDocumentPosition","DOCUMENT_POSITION_CONTAINED_BY","outerHTML","SURROGATE_PAIR_REGEXP","NON_ALPHANUMERIC_REGEXP","inertBodyHelper","_sanitizeHtml","unsafeHtmlInput","inertBodyElement","unsafeHtml","mXSSAttempts","parsedHtml","getTemplateContent","isTemplateElement","content","SecurityContext","NONE","HTML","STYLE","SCRIPT","URL","RESOURCE_URL","ɵɵsanitizeHtml","sanitizer","getSanitizer","sanitize","ɵɵsanitizeUrl","unsafeUrl","ɵɵsanitizeResourceUrl","unsafeResourceUrl","ɵɵsanitizeUrlOrResourceUrl","tag","getUrlSanitizer","COMMENT_DISALLOWED","COMMENT_DELIMITER","COMMENT_DELIMITER_ESCAPED","ɵɵresolveWindow","ownerDocument","defaultView","ɵɵresolveDocument","maybeUnwrapFn","RendererStyleFlags2","Important","DashCase","_icuContainerIterate","icuContainerIterate","tIcuContainerNode","applyToElementOrContainer","action","lNodeToHandle","beforeNode","lContainer","isComponent","nativeAppendChild","nativeInsertBefore","nativeRemoveNode","destroyNode","applyContainer","parentRElement","anchor","applyView","createTextNode","createText","updateTextNode","setValue","createCommentNode","createComment","escapeCommentText","createElementNode","namespace","detachViewFromDOM","detachMovedView","declarationContainer","movedViews","declarationViewIndex","detachView","removeIndex","indexInContainer","viewToDetach","declarationLContainer","removedLView","removeViewFromDOM","lQueries","destroyLView","destroyViewTree","rootView","lViewOrLContainer","cleanUpView","firstView","consumerDestroy$1","executeOnDestroys","toCall","callContext","processCleanups","tCleanup","cleanup","lCleanup","targetIdx","destroyHooksFn","unregisterLView","delete","getParentRElement","getClosestRElement","isMove","insertBefore","nativeAppendOrInsertBefore","nativeParentNode","getInsertInFrontOfRNode","_getInsertInFrontOfRNodeWithI18n","getInsertInFrontOfRNodeWithNoI18n","_processI18nInsertBefore","setI18nHandling","getInsertInFrontOfRNodeWithI18n","processI18nInsertBefore","childRNode","childTNode","parentRNode","anchorNode","getFirstNativeNode","tNodeType","getBeforeNodeForView","elIcuContainerChild","rNodeOrLContainer","projectionNodes","getProjectionNodes","projection","viewIndexInContainer","nextViewIndex","firstTNodeOfView","isHostElement","nativeParent","nativeRemoveChild","applyNodes","isProjection","rawSlotValue","nextRNode","applyProjectionRecursive","projectionNext","tProjectionNode","componentLView","nodeToProjectOrRNodes","nodeToProject","projectedComponentLView","writeDirectClass","setupStaticAttributes","mergedAttrs","writeDirectStyle","NO_CHANGE","ɵɵadvance","delta","selectIndexInternal","checkNoChangesMode","ɵɵdirectiveInject","ɵɵinvalidFactory","writeToDirectiveInput","SIGNAL$1","transformFn","createLView","tHostNode","environment","hydrationInfo","getUniqueLViewId","getOrCreateTNode","createTNodeAtIndex","createTNode","tParent","insertBeforeIndex","directiveStylingLast","propertyBindings","localNames","initialInputs","stylesWithoutHost","residualStyles","classesWithoutHost","residualClasses","classBindings","styleBindings","allocExpando","numSlotsToAlloc","initialValue","allocIdx","executeTemplate","templateFn","rf","prevSelectedIndex","isUpdatePhase","executeContentQueries","createDirectivesInstances","instantiateAllDirectives","addComponentLogic","hostTNode","getOrCreateComponentTView","lViewFlags","componentView","addToViewTree","rendererFactory","createRenderer","setInputsFromAttrs","invokeDirectivesHostBindings","saveResolvedLocalsInData","viewData","localRefExtractor","localIndex","incompleteFirstPass","createTView","directives","pipes","constsOrFactory","ssrId","initialViewLength","createViewBlueprint","queries","fill","expandoStartIndex","hostBindingOpCodes","firstUpdatePass","staticViewQueries","staticContentQueries","components","directiveRegistry","pipeRegistry","_applyRootElementTransformImpl","captureNodeBindings","aliasMap","bindingsResult","hostDirectiveAliasMap","internalName","finalPublicName","addPropertyBinding","bindings","elementPropertyInternal","nativeOnly","dataValue","inputData","setInputsForProperty","markDirtyIfOnPush","viewIndex","childComponentLView","mapPropName","resolveDirectives","localRefs","exportsMap","matchResult","findDirectiveDefMatches","registry","matches","hostDirectiveDefs","hostDirectiveMatches","markAsComponentHost","initializeDirectives","cacheMatchingLocalNames","initTNodeFlags","numberOfDirectives","preOrderHooksFound","preOrderCheckHooksFound","directiveIdx","configureViewWithDirective","saveNameToExportMap","lifeCycleHooks","initializeInputAndOutputAliases","hostDirectiveDefinitionMap","tViewData","tNodeAttrs","inputsFromAttrs","inputsStore","outputsStore","aliasData","aliasedOutputs","generateInitialInputs","elementIndex","getCurrentDirectiveIndex","dirIndex","invokeHostBindingsInCreationMode","directiveFactory","nodeInjectorFactory","registerHostBindingOpCodes","directiveVarsIdx","elementIndx","lastSelectedElementIdx","setElementAttribute","strValue","initialInputData","inputsToStore","createLContainer","hostNative","refreshContentQueries","directiveDefIdx","executeViewQueryFn","viewQueryFn","component","getOrCreateLViewCleanup","getOrCreateTViewCleanup","loadComponentRenderer","currentDef","unwrapLView","errorHandler","textBindingInternal","renderComponent","hostLView","componentHostIdx","componentTView","syncViewWithBlueprint","hostRNode","renderView","finishViewCreation","renderChildComponents","shouldAddViewToDom","dehydratedView","addLViewToLContainer","addToDOM","insertView","containerLength","trackMovedView","addViewToDOM","parentNativeNode","collectNativeNodes","lNode","collectNativeNodesInLContainer","nodesInSlot","lViewInAContainer","lViewFirstChildTNode","freeConsumers","REACTIVE_LVIEW_CONSUMER_NODE","REACTIVE_NODE$1","MAXIMUM_REFRESH_RERUNS","detectChangesInternal","notifyErrorHandler","begin","detectChangesInViewWhileDirty","detectChangesInView$1","retries","inlineEffectRunner","refreshView","currentConsumer","viewShouldHaveReactiveConsumer","getOrBorrowReactiveLViewConsumer","borrowReactiveLViewConsumer","consumerBeforeComputation$1","setBindingIndex","hooksInitPhaseCompleted","markTransplantedViewsForRefresh","detectChangesInEmbeddedViews","processHostBindingOpCodes","opCode","bindingRootIndx","hostBindingFn","detectChangesInChildComponents","notifyEffect","consumerAfterComputation$1","maybeReturnReactiveLViewConsumer","detectChangesInViewIfAttached","detectChangesInComponent","shouldRefreshView","consumerPollProducersForChange$1","markViewDirty","ViewRef$1","rootNodes","_cdRefInjectingView","_appRef","_attachedToViewContainer","viewRefs","markForCheck","detach","reattach","detectChanges","checkNoChanges","attachToViewContainerRef","detachFromAppRef","attachToAppRef","appRef","TemplateRef","injectTemplateRef","ViewEngineTemplateRef","R3TemplateRef","_declarationLView","_declarationTContainer","elementRef","createEmbeddedView","createEmbeddedViewImpl","embeddedLView","createAndRenderEmbeddedLView","declarationLView","templateTNode","embeddedTView","declarationViewLQueries","createTemplateRef","ChangeDetectionScheduler","ComponentRef$1","ComponentFactory$1","_NullComponentFactoryResolver","resolveComponentFactory","noComponentFactoryError","ComponentFactoryResolver$1","RendererFactory2","Renderer2","injectRenderer2","nodeAtIndex","Sanitizer","NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR","markedFeatures","performanceMarkFeature","feature","detail","NgZone","enableLongStackTrace","shouldCoalesceEventChangeDetection","shouldCoalesceRunChangeDetection","hasPendingMacrotasks","hasPendingMicrotasks","isStable","onUnstable","onMicrotaskEmpty","onStable","_nesting","_outer","_inner","TaskTrackingZoneSpec","lastRequestAnimationFrameId","nativeRequestAnimationFrame","getNativeRequestAnimationFrame","requestAnimationFrame","nativeCancelAnimationFrame","unpatchedRequestAnimationFrame","unpatchedCancelAnimationFrame","forkInnerZoneWithAngularBehavior","delayChangeDetectionForEventsDelegate","delayChangeDetectionForEvents","isCheckStableRunning","fakeTopEventTask","updateMicroTaskStatus","checkStable","isAngularZone","shouldBeIgnoredByZone","__ignore_ng_zone__","onEnter","onLeave","_hasPendingMicrotasks","runOutsideAngular","isInAngularZone","assertInAngularZone","assertNotInAngularZone","EMPTY_PAYLOAD","NoopNgZone","AfterRenderPhase","EarlyRead","Write","MixedReadWrite","Read","NOOP_AFTER_RENDER_REF","afterNextRender","isPlatformBrowser","afterRenderEventManager","AfterRenderEventManager","callbackHandler","AfterRenderCallbackHandlerImpl","phase","unregister","unregisterFn","AfterRenderCallback","register","callbackFn","executingCallbacks","buckets","deferredCallbacks","bucket","internalCallbacks","executeInternalCallbacks","isModuleWithProviders","isNgModule","isPipe","isDirective","verifyStandaloneImport","depType","importingType","getDependencyTypeForError","DepsTracker","ownerNgModule","ngModulesWithSomeUnresolvedDecls","ngModulesScopeCache","standaloneComponentsScopeCache","resolveNgModulesDecls","moduleType","decl","getComponentDependencies","rawImports","scope","getStandaloneComponentScope","compilation","isPoisoned","ngModules","getNgModuleScope","registerNgModule","scopeInfo","clearScopeCacheFor","computeNgModuleScope","exported","importedScope","addSet","exportedScope","ans","computeStandaloneComponentScope","rawImport","isOrphanComponent","cmp","sourceSet","targetSet","m","depsTracker","computeStaticStyling","writeToHost","ComponentFactoryResolver","ComponentFactory","toRefArray","templateName","ChainedInjector","parentInjector","refArray","transform","componentType","stringifyCSSSelectorList","selectorList","isBoundToModule","projectableNodes","rootSelectorOrNode","environmentInjector","realEnvironmentInjector","rootViewInjector","hostRenderer","elementName","locateHostElement","elementOrSelector","preserveContent","rootElement","selectRootElement","applyRootElementTransform","getNamespace","rootFlags","rootTView","rootLView","tElementNode","rootComponentDef","rootDirectives","createRootComponentTNode","createRootComponentView","applyRootComponentStyling","viewRenderer","setRootNodeAttributes","extractAttrsAndClassesFromSelector","projectNodes","nodesforSlot","createRootComponent","hostFeatures","rootTNode","LifecycleHooksFeature","ComponentRef","_rootLView","previousInputValues","changeDetectorRef","ViewContainerRef","injectViewContainerRef","createContainerRef","VE_ViewContainerRef","R3ViewContainerRef","_lContainer","_hostTNode","_hostLView","getViewRefs","templateRef","indexOrOptions","viewRef","insertImpl","createComponent","componentFactoryOrType","isComponentFactory","ngModuleRef","componentFactory","contextInjector","componentRef","insert","viewAttachedToContainer","prevIdx","prevLContainer","prevVCRef","adjustedIdx","_adjustIndex","getOrCreateViewRefs","move","newIndex","viewRefsArr","detachedView","_locateOrCreateAnchorNode","createAnchorNode","commentNode","insertAnchorNode","nativeNextSibling","_populateDehydratedViewsInLContainer","LQuery_","queryList","clone","LQueries_","tQueries","noOfInheritedQueries","viewLQueries","tQuery","getByIndex","indexInDeclarationView","dirtyQueriesWithMatches","getTQuery","TQueryMetadata_","predicate","read","splitQueryMultiSelectors","locator","TQueries_","elementStart","elementEnd","queriesForTemplateRef","childQueryIndex","tqueryClone","track","tquery","TQuery_","crossesNgTemplate","_appliesToNextNode","_declarationNodeIndex","isApplyingToNode","matchTNode","addMatch","declarationNodeIdx","matchTNodeWithReadOption","getIdxOfMatchingSelector","nodeMatchIdx","directiveOrProviderIdx","tNodeIdx","matchIdx","createResultForNode","matchingIdx","createResultByTNodeType","createSpecialToken","materializeViewResults","queryIndex","lQuery","tQueryMatches","matchedNodeIdx","collectQueryResults","lViewResults","embeddedLViews","createLQuery","storeCleanupWithContext","createTQuery","getQueryResults","signalFn","createSignal","getter","createSignal$1","signalSetFn$1","update","updateFn","signalUpdateFn","updater","signalUpdateFn$1","asReadonly","signalAsReadonlyFn","readonlyFn","isWritableSignal","isSignal","ɵɵInheritDefinitionFeature","superType","getSuperType","shouldInheritFields","inheritanceChain","superDef","writeableDef","maybeUnwrapEmpty","superHostBindings","inheritHostBindings","superViewQuery","superContentQueries","inheritViewQuery","inheritContentQueries","mergeInputsWithTransforms","animation","defData","mergeHostAttrsAcrossInheritance","minifiedName","prevViewQuery","ctx","prevContentQueries","prevHostBindings","ɵɵInputTransformsFeature","NgModuleRef$1","NgModuleFactory$1","createNgModule","NgModuleRef","_bootstrapComponents","destroyCbs","componentFactoryResolver","_r3Injector","NgModuleFactory","EnvironmentNgModuleRefAdapter","debugName","runEnvironmentInitializers","createEnvironmentInjector","PendingTasks","taskId","pendingTasks","hasPendingTasks","_hasPendingTasks","isListLikeIterable","isJsObject","o","updateBinding","bindingUpdated","bindingUpdated2","exp1","exp2","different","bindingUpdated3","exp3","ɵɵtemplate","attrsIndex","localRefsIndex","adjustedIndex","templateFirstCreatePass","tViewConsts","comment","_locateOrCreateContainerAnchor","populateDehydratedViewsInLContainer","createContainerAnchorImpl","ɵɵattribute","elementAttributeInternal","interpolation1","prefix","v0","suffix","interpolation2","i0","v1","toTStylingRange","getTStylingRangePrev","tStylingRange","setTStylingRangePrevDuplicate","getTStylingRangeNext","setTStylingRangeNext","setTStylingRangeNextDuplicate","markDuplicates","tStylingKey","isPrevDir","tStylingAtIndex","isMap","cursor","foundDuplicate","tStyleRangeAtCursor","isStylingMatch","tStylingKeyCursor","parserState","textEnd","keyEnd","valueEnd","getLastParsedKey","parseClassNameNext","consumeClassToken","startIndex","consumeWhitespace","ɵɵproperty","setDirectiveInputsWhichShadowsStyling","isClassBased","property","ɵɵstyleProp","checkStylingProperty","ɵɵclassProp","ɵɵclassMap","checkStylingMap","classKeyValueArraySet","classStringParser","parseClassName","resetParserState","stylingFirstUpdatePass","updateStyling","normalizeSuffix","stringParser","hasStylingInputShadow","isInHostBindings","staticPrefix","updateStylingMap","oldKeyValueArray","newKeyValueArray","oldIndex","oldKey","newKey","setKey","toStylingKeyValueArray","styleKeyValueArray","unwrappedValue","isHostBindings","wrapInStaticStylingKey","stylingKey","hostDirectiveDef","residual","collectStylingFromTAttrs","collectStylingFromDirectives","templateStylingKey","getTemplateHeadTStylingKey","setTemplateHeadTStylingKey","collectResidual","insertTStylingBinding","tStylingKeyWithStatic","isHostBinding","isClassBinding","tBindings","tmplHead","tmplTail","isKeyDuplicateOfStatic","previousNode","setTStylingRangePrev","markDuplicateOfResidualStyling","currentDirective","desiredMarker","currentMarker","stringKey","tRange","higherPriorityValue","getTStylingRangeNextDuplicate","findStylingValue","isStylingValuePresent","getTStylingRangePrevDuplicate","applyStyling","addClass","removeClass","removeStyle","endsWith","setStyle","isPrevDirection","rawKey","containsStatics","isStylingMap","valueAtLViewIndex","ɵɵclassMapInterpolate1","ɵɵelementStart","elementStartFirstCreatePass","_locateOrCreateElementNode","hasDirectives","isDetachedByI18n","getElementDepthCount","increaseElementDepthCount","ɵɵelementEnd","isSkipHydrationRootTNode","leaveSkipHydrationBlock","decreaseElementDepthCount","hasClassInput","hasStyleInput","ɵɵelement","getNamespace$1","ɵɵelementContainerStart","elementContainerStartFirstCreatePass","_locateOrCreateElementContainerNode","ɵɵelementContainerEnd","ɵɵelementContainer","ɵɵgetCurrentView","ɵɵhostProperty","ɵɵsyntheticHostProperty","u","localeEn","plural","val","floor","LOCALE_DATA","findLocaleData","locale","normalizedLocale","normalizeLocale","getLocaleData","parentLocale","getLocalePluralCase","LocaleDataIndex","PluralCase","common","locales","LocaleId","DayPeriodsFormat","DayPeriodsStandalone","DaysFormat","DaysStandalone","MonthsFormat","MonthsStandalone","Eras","FirstDayOfWeek","WeekendRange","DateFormat","TimeFormat","DateTimeFormat","NumberSymbols","NumberFormats","CurrencyCode","CurrencySymbol","CurrencyName","Currencies","Directionality","ExtraData","pluralMapping","DEFAULT_LOCALE_ID","ELEMENT_MARKER","ICU_MARKER","I18nCreateOpCode","SHIFT","APPEND_EAGERLY","COMMENT","LOCALE_ID$1","tNodeInsertBeforeIndex","i18nParent","anchorRNode","addTNodeAndUpdateInsertBeforeIndex","previousTNodes","newTNode","existingTNode","isI18nText","isNewTNodeCreatedBefore","getInsertBeforeIndex","setInsertBeforeIndex","getTIcu","createTNodePlaceholder","getCurrentICUCaseIndex","tIcu","currentCase","currentCaseLViewIndex","getParentFromIcuCreateOpCode","mergedCode","getRefFromIcuCreateOpCode","changeMask","changeMaskCounter","_locateOrCreateNode","textOrName","createNodeWithoutHydration","COMMENT_NODE","applyMutableOpCodes","mutableOpCodes","rootRNode","rootIdx","textNodeIndex","parentIdx","insertInFrontOf","refIdx","caseIndex","anchorIdx","commentValue","commentNodeIndex","elementNodeIndex","applyUpdateOpCodes","updateOpCodes","bindingsStartIndex","checkBit","skipCodes","sanitizeFn","tNodeOrTagName","rText","applyIcuSwitchCase","applyIcuUpdateCase","activeCaseIndex","mask","getCaseIndex","icuExpression","bindingValue","cases","resolvedCase","getPluralCase","parseInt","getLocaleId","applyIcuSwitchCaseRemove","removeCodes","nodeOrIcuIndex","loadIcuContainerVisitor","_stack","_removes","_index","enterIcu","icuContainerIteratorNext","removeOpCode","icuContainerIteratorStart","BINDING_REGEXP","NESTED_ICU","ICU_BLOCK_REGEXP","MARKER","SUBTEMPLATE_REGEXP","PH_REGEXP","NGSP_UNICODE_REGEXP","createTNodeAndAddOpCode","existingTNodes","createOpCodes","isICU","i18nNodeIdx","ensureIcuContainerVisitorLoaded","loader","setTNodeInsertBeforeIndex","i18nStartFirstCreatePassProcessTextNode","ast","hasBinding","generateBindingUpdateOpCodes","destinationNode","bindingStart","maskIndex","sizeIndex","textParts","textValue","toMaskBit","min","removeInnerTemplateTranslation","tagMatched","inTemplate","icuStart","bindingMask","addUpdateIcuSwitch","mainBinding","setTIcu","valueArr","nestedIcus","icuIndex","caseAst","parseIcuCase","addUpdateIcuUpdate","parseICUBlock","pattern","icuType","i18nParseTextIntoPartsAndICU","binding","pos","blocks","prevPos","braceStack","braces","lastIndex","caseName","unsafeCaseHtml","inertRootNode","walkIcuTree","sharedUpdateOpCodes","depth","currentNode","addCreateNodeAndAppend","lowerAttrName","addCreateAttribute","elementNode","children","addRemoveNode","isNestedIcu","addRemoveNestedIcu","appendToParentIdx","createAtIdx","icuCreateOpCode","ɵɵi18nStart","messageIndex","subTemplateIndex","i18nStartFirstCreatePass","parentTNodeIndex","existingTNodeStack","astStack","getTranslationForTemplate","isRootTemplateMessage","search","msgParts","replaceNgsp","isClosing","placeholderNode","icuNodeIndex","tI18n","applyCreateOpCodes","appendNow","ɵɵi18nEnd","ɵɵi18n","ɵɵi18nExp","setMaskBit","hasChange","ɵɵi18nApply","applyI18n","ɵɵlistener","listenerFn","useCapture","eventTargetResolver","listenerInternal","isTNodeDirectiveHost","processOutputs","lCleanupIndex","idxOrTargetGetter","existingListener","findExistingListener","cleanupEventName","listenerIdxInLCleanup","__ngLastListenerFn__","__ngNextListenerFn__","wrapListener","listen","propsLength","executeListenerWithErrorHandling","wrapWithPreventDefault","wrapListenerIn_markDirtyAndPreventDefault","nextListenerFn","ɵɵnextContext","level","nextContextImpl","walkUpViews","nestingLevel","matchingProjectionSlotIndex","projectionSlots","wildcardNgContentIndex","ngProjectAsAttrVal","getProjectAsAttrValue","ngProjectAsAttrIdx","ɵɵprojectionDef","componentNode","projectionHeads","tails","componentChild","slotIndex","ɵɵprojection","selectorIndex","applyProjection","ɵɵpropertyInterpolate","ɵɵpropertyInterpolate1","interpolatedValue","ɵɵpropertyInterpolate2","ɵɵcontentQuery","createContentQuery","saveContentQueryAndDirectiveIndex","tViewContentQueries","ɵɵviewQuery","createViewQuery","ɵɵqueryRefresh","isCreationMode","ɵɵloadQuery","loadQueryInternal","ɵɵreference","getContextLView","ɵɵtext","textNative","_locateOrCreateTextNode","ɵɵtextInterpolate","ɵɵtextInterpolate1","interpolated","ɵɵtextInterpolate2","ɵɵtextInterpolate3","i1","v2","interpolation3","ɵɵtwoWayProperty","ɵɵtwoWayBindingSet","canWrite","ɵɵtwoWayListener","resolveProvider","lInjectablesBlueprint","providerFactory","beginIndex","existingFactoryIndex","registerDestroyHooksIfSupported","existingProvidersFactoryIndex","existingViewProvidersFactoryIndex","doesViewProvidersFactoryExist","multiFactory","factoryFn","f","componentProviders","multiFactoryAdd","multiViewProvidersFactoryResolver","multiProvidersFactoryResolver","contextIndex","indexInFactory","providerIsTypeProvider","providerIsClassProvider","isClassProvider","existingCallbacksIndex","isComponentProvider","lData","multiResolve","factories","componentCount","multiProviders","ɵɵProvidersFeature","viewProviders","processProvidersFn","StandaloneService","_injector","cachedInjectors","getOrCreateStandaloneInjector","standaloneInjector","ɵɵStandaloneFeature","ɵɵsetComponentScope","ɵɵsetNgModuleScope","convertToTypeArray","flattenValues","maybeUnwrapModuleWithProviders","ɵɵpureFunction0","slotOffset","pureFn","getBinding","ɵɵpureFunction1","exp","pureFunction1Internal","ɵɵpureFunction2","pureFunction2Internal","ɵɵpureFunction3","pureFunction3Internal","ɵɵpureFunction4","exp4","pureFunction4Internal","getPureFunctionReturnValue","returnValueIndex","lastReturnValue","bindingRoot","bindingUpdated4","ɵɵpipe","pipeName","getPipeDef","pipeFactory","pipeInstance","ɵɵpipeBind1","offset","isPure","ɵɵpipeBind2","ɵɵpipeBind3","v3","ɵɵpipeBind4","v4","ɵɵtemplateRefExtractor","Version","full","major","minor","patch","VERSION","Console","log","TESTABILITY","TESTABILITY_GETTER","_testabilityGetter","Testability","_ngZone","testabilityGetter","_pendingCount","_isZoneStable","_callbacks","taskTrackingZone","setTestabilityGetter","addToWindow","_watchAngularEvents","queueMicrotask","_runCallbacksIfReady","increasePendingRequestCount","decreasePendingRequestCount","timeoutId","doneCb","pending","getPendingTasks","updateCb","macroTasks","creationLocation","addCallback","whenStable","getPendingRequestCount","registerApplication","unregisterApplication","findProviders","using","exactMatch","TestabilityRegistry","_applications","testability","unregisterAllApplications","getTestability","elem","getAllTestabilities","getAllRootElements","findTestabilityInTree","findInAncestors","isPromise","isSubscribable","APP_INITIALIZER","ApplicationInitStatus","initialized","donePromise","appInits","runInitializers","asyncInitPromises","initResult","observableAsPromise","APP_BOOTSTRAP_LISTENER","optionsReducer","objs","ApplicationRef","_bootstrapListeners","_runningTick","_destroyListeners","_views","internalErrorHandler","afterRenderEffectManager","externalTestViews","beforeRender","afterTick","componentTypes","componentOrFactory","cf","compRef","_loadComponent","_tick","refreshViews","detectChangesInAttachedViews","runs","isFirstPass","detectChangesInViewIfRequired","shouldRecheckView","attachView","viewCount","warnIfDestroyed","detectChangesInView","ModuleWithComponentFactories","ngModuleFactory","componentFactories","Compiler","compileModuleSync","compileModuleAsync","compileModuleAndAllComponentsSync","declaration","compileModuleAndAllComponentsAsync","clearCache","clearCacheFor","getModuleId","NgZoneChangeDetectionScheduler","applicationRef","initialize","_onMicrotaskEmptySubscription","ngZoneApplicationErrorHandlerFactory","userErrorHandler","ZoneStablePendingTask","getGlobalLocale","DEFAULT_CURRENCY_CODE","PLATFORM_DESTROY_LISTENERS","PlatformRef","_modules","bootstrapModuleFactory","moduleFactory","ngZone","getNgZone","ngZoneToUse","getNgZoneOptions","eventCoalescing","runCoalescing","ngZoneEventCoalescing","ngZoneRunCoalescing","moduleRef","createNgModuleRefWithProviders","internalProvideZoneChangeDetection","ngZoneFactory","ngZoneChangeDetectionScheduler","exceptionHandler","_callAndReportToErrorHandler","initStatus","setLocaleId","localeId","_moduleDoBootstrap","bootstrapModule","compilerOptions","compileNgModuleFactory","ngDoBootstrap","module","destroyListeners","_platformInjector","ALLOW_MULTIPLE_PLATFORMS","createPlatformFactory","parentPlatformFactory","extraProviders","platform","getPlatform","platformProviders","createPlatform","publishSignalConfiguration","setThrowInvalidWriteToSignalError","setThrowInvalidWriteToSignalError$1","runPlatformInitializers","createPlatformInjector","assertPlatform","requiredToken","enableProdMode","ChangeDetectorRef","injectChangeDetectorRef","createViewRef","DefaultIterableDifferFactory","supports","trackByFn","DefaultIterableDiffer","trackByIdentity","_linkedRecords","_unlinkedRecords","_previousItHead","_itHead","_itTail","_additionsHead","_additionsTail","_movesHead","_movesTail","_removalsHead","_removalsTail","_identityChangesHead","_identityChangesTail","_trackByFn","forEachItem","forEachOperation","nextIt","nextRemove","addRemoveOffset","moveOffsets","currentIndex","getPreviousIndex","adjPreviousIndex","_nextRemoved","previousIndex","localMovePreviousIndex","localCurrentIndex","forEachPreviousItem","_nextPrevious","forEachAddedItem","_nextAdded","forEachMovedItem","_nextMoved","forEachRemovedItem","forEachIdentityChange","_nextIdentityChange","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","_records","_mapHead","_appendAfter","_previousMapHead","_changesHead","_changesTail","forEachChangedItem","_nextChanged","_forEach","_maybeAddToChanges","_getOrCreateRecordForKey","_insertBeforeOrAppend","KeyValueChangeRecord_","_addToAdditions","_addToChanges","defaultIterableDiffersFactory","IterableDiffers","copied","extend","iterable","defaultKeyValueDiffersFactory","KeyValueDiffers","kv","platformCore","ApplicationModule","booleanAttribute","untracked","nonReactiveReadsFn","APP_EFFECT_SCHEDULER","EffectScheduler","ZoneAwareEffectScheduler","queuedEffectCount","queues","scheduleEffect","enqueue","creationZone","flushQueue","EffectHandle","scheduler","effectFn","allowSignalWrites","watcher","createWatch","registerOnCleanup","isInNotificationPhase","destroyWatchNode","isWatchNodeDestroyed","Pe","createWatch$1","onCleanup","runEffect","unregisterOnDestroy","effect","manualCleanup","cdr","reflectComponentType","asyncGeneratorStep","gen","_throw"],"ignoreList":[],"sourceRoot":"webpack:///","sources":["./node_modules/@angular/localize/fesm2022/localize.mjs","./node_modules/@angular/localize/fesm2022/init.mjs","./src/provider/xlf.merger.ts","./src/provider/18n.provider.ts","./src/provider/provider.helper.ts","./src/polyfills.ts","./node_modules/rxjs/dist/esm/internal/BehaviorSubject.js","./node_modules/rxjs/dist/esm/internal/Observable.js","./node_modules/rxjs/dist/esm/internal/util/ObjectUnsubscribedError.js","./node_modules/rxjs/dist/esm/internal/Subject.js","./node_modules/rxjs/dist/esm/internal/NotificationFactories.js","./node_modules/rxjs/dist/esm/internal/Subscriber.js","./node_modules/rxjs/dist/esm/internal/util/UnsubscriptionError.js","./node_modules/rxjs/dist/esm/internal/Subscription.js","./node_modules/rxjs/dist/esm/internal/config.js","./node_modules/rxjs/dist/esm/internal/operators/OperatorSubscriber.js","./node_modules/rxjs/dist/esm/internal/operators/map.js","./node_modules/rxjs/dist/esm/internal/scheduler/timeoutProvider.js","./node_modules/rxjs/dist/esm/internal/symbol/observable.js","./node_modules/rxjs/dist/esm/internal/util/arrRemove.js","./node_modules/rxjs/dist/esm/internal/util/createErrorClass.js","./node_modules/rxjs/dist/esm/internal/util/errorContext.js","./node_modules/rxjs/dist/esm/internal/util/identity.js","./node_modules/rxjs/dist/esm/internal/util/isFunction.js","./node_modules/rxjs/dist/esm/internal/util/lift.js","./node_modules/rxjs/dist/esm/internal/util/noop.js","./node_modules/rxjs/dist/esm/internal/util/pipe.js","./node_modules/rxjs/dist/esm/internal/util/reportUnhandledError.js","./node_modules/zone.js/fesm2015/zone-testing.js","./node_modules/zone.js/fesm2015/zone.js","./node_modules/@angular/core/fesm2022/primitives/signals.mjs","./node_modules/@angular/core/fesm2022/core.mjs","./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"],"sourcesContent":["/**\n * @license Angular v17.3.5\n * (c) 2010-2024 Google LLC. https://angular.io/\n * License: MIT\n */\n\n/**\n * The character used to mark the start and end of a \"block\" in a `$localize` tagged string.\n * A block can indicate metadata about the message or specify a name of a placeholder for a\n * substitution expressions.\n *\n * For example:\n *\n * ```ts\n * $localize`Hello, ${title}:title:!`;\n * $localize`:meaning|description@@id:source message text`;\n * ```\n */\nconst BLOCK_MARKER$1 = ':';\n/**\n * The marker used to separate a message's \"meaning\" from its \"description\" in a metadata block.\n *\n * For example:\n *\n * ```ts\n * $localize `:correct|Indicates that the user got the answer correct: Right!`;\n * $localize `:movement|Button label for moving to the right: Right!`;\n * ```\n */\nconst MEANING_SEPARATOR = '|';\n/**\n * The marker used to separate a message's custom \"id\" from its \"description\" in a metadata block.\n *\n * For example:\n *\n * ```ts\n * $localize `:A welcome message on the home page@@myApp-homepage-welcome: Welcome!`;\n * ```\n */\nconst ID_SEPARATOR = '@@';\n/**\n * The marker used to separate legacy message ids from the rest of a metadata block.\n *\n * For example:\n *\n * ```ts\n * $localize `:@@custom-id␟2df64767cd895a8fabe3e18b94b5b6b6f9e2e3f0: Welcome!`;\n * ```\n *\n * Note that this character is the \"symbol for the unit separator\" (␟) not the \"unit separator\n * character\" itself, since that has no visual representation. See https://graphemica.com/%E2%90%9F.\n *\n * Here is some background for the original \"unit separator character\":\n * https://stackoverflow.com/questions/8695118/whats-the-file-group-record-unit-separator-control-characters-and-its-usage\n */\nconst LEGACY_ID_INDICATOR = '\\u241F';\n\n/**\n * A lazily created TextEncoder instance for converting strings into UTF-8 bytes\n */\nlet textEncoder;\n/**\n * Return the message id or compute it using the XLIFF1 digest.\n */\nfunction digest(message) {\n return message.id || computeDigest(message);\n}\n/**\n * Compute the message id using the XLIFF1 digest.\n */\nfunction computeDigest(message) {\n return sha1(serializeNodes(message.nodes).join('') + `[${message.meaning}]`);\n}\n/**\n * Return the message id or compute it using the XLIFF2/XMB/$localize digest.\n */\nfunction decimalDigest(message) {\n return message.id || computeDecimalDigest(message);\n}\n/**\n * Compute the message id using the XLIFF2/XMB/$localize digest.\n */\nfunction computeDecimalDigest(message) {\n const visitor = new _SerializerIgnoreIcuExpVisitor();\n const parts = message.nodes.map(a => a.visit(visitor, null));\n return computeMsgId(parts.join(''), message.meaning);\n}\n/**\n * Serialize the i18n ast to something xml-like in order to generate an UID.\n *\n * The visitor is also used in the i18n parser tests\n *\n * @internal\n */\nclass _SerializerVisitor {\n visitText(text, context) {\n return text.value;\n }\n visitContainer(container, context) {\n return `[${container.children.map(child => child.visit(this)).join(', ')}]`;\n }\n visitIcu(icu, context) {\n const strCases = Object.keys(icu.cases).map((k) => `${k} {${icu.cases[k].visit(this)}}`);\n return `{${icu.expression}, ${icu.type}, ${strCases.join(', ')}}`;\n }\n visitTagPlaceholder(ph, context) {\n return ph.isVoid ?\n `` :\n `${ph.children.map(child => child.visit(this)).join(', ')}`;\n }\n visitPlaceholder(ph, context) {\n return ph.value ? `${ph.value}` : ``;\n }\n visitIcuPlaceholder(ph, context) {\n return `${ph.value.visit(this)}`;\n }\n visitBlockPlaceholder(ph, context) {\n return `${ph.children.map(child => child.visit(this)).join(', ')}`;\n }\n}\nconst serializerVisitor = new _SerializerVisitor();\nfunction serializeNodes(nodes) {\n return nodes.map(a => a.visit(serializerVisitor, null));\n}\n/**\n * Serialize the i18n ast to something xml-like in order to generate an UID.\n *\n * Ignore the ICU expressions so that message IDs stays identical if only the expression changes.\n *\n * @internal\n */\nclass _SerializerIgnoreIcuExpVisitor extends _SerializerVisitor {\n visitIcu(icu, context) {\n let strCases = Object.keys(icu.cases).map((k) => `${k} {${icu.cases[k].visit(this)}}`);\n // Do not take the expression into account\n return `{${icu.type}, ${strCases.join(', ')}}`;\n }\n}\n/**\n * Compute the SHA1 of the given string\n *\n * see https://csrc.nist.gov/publications/fips/fips180-4/fips-180-4.pdf\n *\n * WARNING: this function has not been designed not tested with security in mind.\n * DO NOT USE IT IN A SECURITY SENSITIVE CONTEXT.\n */\nfunction sha1(str) {\n textEncoder ??= new TextEncoder();\n const utf8 = [...textEncoder.encode(str)];\n const words32 = bytesToWords32(utf8, Endian.Big);\n const len = utf8.length * 8;\n const w = new Uint32Array(80);\n let a = 0x67452301, b = 0xefcdab89, c = 0x98badcfe, d = 0x10325476, e = 0xc3d2e1f0;\n words32[len >> 5] |= 0x80 << (24 - len % 32);\n words32[((len + 64 >> 9) << 4) + 15] = len;\n for (let i = 0; i < words32.length; i += 16) {\n const h0 = a, h1 = b, h2 = c, h3 = d, h4 = e;\n for (let j = 0; j < 80; j++) {\n if (j < 16) {\n w[j] = words32[i + j];\n }\n else {\n w[j] = rol32(w[j - 3] ^ w[j - 8] ^ w[j - 14] ^ w[j - 16], 1);\n }\n const fkVal = fk(j, b, c, d);\n const f = fkVal[0];\n const k = fkVal[1];\n const temp = [rol32(a, 5), f, e, k, w[j]].reduce(add32);\n e = d;\n d = c;\n c = rol32(b, 30);\n b = a;\n a = temp;\n }\n a = add32(a, h0);\n b = add32(b, h1);\n c = add32(c, h2);\n d = add32(d, h3);\n e = add32(e, h4);\n }\n // Convert the output parts to a 160-bit hexadecimal string\n return toHexU32(a) + toHexU32(b) + toHexU32(c) + toHexU32(d) + toHexU32(e);\n}\n/**\n * Convert and format a number as a string representing a 32-bit unsigned hexadecimal number.\n * @param value The value to format as a string.\n * @returns A hexadecimal string representing the value.\n */\nfunction toHexU32(value) {\n // unsigned right shift of zero ensures an unsigned 32-bit number\n return (value >>> 0).toString(16).padStart(8, '0');\n}\nfunction fk(index, b, c, d) {\n if (index < 20) {\n return [(b & c) | (~b & d), 0x5a827999];\n }\n if (index < 40) {\n return [b ^ c ^ d, 0x6ed9eba1];\n }\n if (index < 60) {\n return [(b & c) | (b & d) | (c & d), 0x8f1bbcdc];\n }\n return [b ^ c ^ d, 0xca62c1d6];\n}\n/**\n * Compute the fingerprint of the given string\n *\n * The output is 64 bit number encoded as a decimal string\n *\n * based on:\n * https://github.com/google/closure-compiler/blob/master/src/com/google/javascript/jscomp/GoogleJsMessageIdGenerator.java\n */\nfunction fingerprint(str) {\n textEncoder ??= new TextEncoder();\n const utf8 = textEncoder.encode(str);\n const view = new DataView(utf8.buffer, utf8.byteOffset, utf8.byteLength);\n let hi = hash32(view, utf8.length, 0);\n let lo = hash32(view, utf8.length, 102072);\n if (hi == 0 && (lo == 0 || lo == 1)) {\n hi = hi ^ 0x130f9bef;\n lo = lo ^ -0x6b5f56d8;\n }\n return (BigInt.asUintN(32, BigInt(hi)) << BigInt(32)) | BigInt.asUintN(32, BigInt(lo));\n}\nfunction computeMsgId(msg, meaning = '') {\n let msgFingerprint = fingerprint(msg);\n if (meaning) {\n // Rotate the 64-bit message fingerprint one bit to the left and then add the meaning\n // fingerprint.\n msgFingerprint = BigInt.asUintN(64, msgFingerprint << BigInt(1)) |\n ((msgFingerprint >> BigInt(63)) & BigInt(1));\n msgFingerprint += fingerprint(meaning);\n }\n return BigInt.asUintN(63, msgFingerprint).toString();\n}\nfunction hash32(view, length, c) {\n let a = 0x9e3779b9, b = 0x9e3779b9;\n let index = 0;\n const end = length - 12;\n for (; index <= end; index += 12) {\n a += view.getUint32(index, true);\n b += view.getUint32(index + 4, true);\n c += view.getUint32(index + 8, true);\n const res = mix(a, b, c);\n a = res[0], b = res[1], c = res[2];\n }\n const remainder = length - index;\n // the first byte of c is reserved for the length\n c += length;\n if (remainder >= 4) {\n a += view.getUint32(index, true);\n index += 4;\n if (remainder >= 8) {\n b += view.getUint32(index, true);\n index += 4;\n // Partial 32-bit word for c\n if (remainder >= 9) {\n c += view.getUint8(index++) << 8;\n }\n if (remainder >= 10) {\n c += view.getUint8(index++) << 16;\n }\n if (remainder === 11) {\n c += view.getUint8(index++) << 24;\n }\n }\n else {\n // Partial 32-bit word for b\n if (remainder >= 5) {\n b += view.getUint8(index++);\n }\n if (remainder >= 6) {\n b += view.getUint8(index++) << 8;\n }\n if (remainder === 7) {\n b += view.getUint8(index++) << 16;\n }\n }\n }\n else {\n // Partial 32-bit word for a\n if (remainder >= 1) {\n a += view.getUint8(index++);\n }\n if (remainder >= 2) {\n a += view.getUint8(index++) << 8;\n }\n if (remainder === 3) {\n a += view.getUint8(index++) << 16;\n }\n }\n return mix(a, b, c)[2];\n}\n// clang-format off\nfunction mix(a, b, c) {\n a -= b;\n a -= c;\n a ^= c >>> 13;\n b -= c;\n b -= a;\n b ^= a << 8;\n c -= a;\n c -= b;\n c ^= b >>> 13;\n a -= b;\n a -= c;\n a ^= c >>> 12;\n b -= c;\n b -= a;\n b ^= a << 16;\n c -= a;\n c -= b;\n c ^= b >>> 5;\n a -= b;\n a -= c;\n a ^= c >>> 3;\n b -= c;\n b -= a;\n b ^= a << 10;\n c -= a;\n c -= b;\n c ^= b >>> 15;\n return [a, b, c];\n}\n// clang-format on\n// Utils\nvar Endian;\n(function (Endian) {\n Endian[Endian[\"Little\"] = 0] = \"Little\";\n Endian[Endian[\"Big\"] = 1] = \"Big\";\n})(Endian || (Endian = {}));\nfunction add32(a, b) {\n return add32to64(a, b)[1];\n}\nfunction add32to64(a, b) {\n const low = (a & 0xffff) + (b & 0xffff);\n const high = (a >>> 16) + (b >>> 16) + (low >>> 16);\n return [high >>> 16, (high << 16) | (low & 0xffff)];\n}\n// Rotate a 32b number left `count` position\nfunction rol32(a, count) {\n return (a << count) | (a >>> (32 - count));\n}\nfunction bytesToWords32(bytes, endian) {\n const size = (bytes.length + 3) >>> 2;\n const words32 = [];\n for (let i = 0; i < size; i++) {\n words32[i] = wordAt(bytes, i * 4, endian);\n }\n return words32;\n}\nfunction byteAt(bytes, index) {\n return index >= bytes.length ? 0 : bytes[index];\n}\nfunction wordAt(bytes, index, endian) {\n let word = 0;\n if (endian === Endian.Big) {\n for (let i = 0; i < 4; i++) {\n word += byteAt(bytes, index + i) << (24 - 8 * i);\n }\n }\n else {\n for (let i = 0; i < 4; i++) {\n word += byteAt(bytes, index + i) << 8 * i;\n }\n }\n return word;\n}\n\n// This module specifier is intentionally a relative path to allow bundling the code directly\n/**\n * Parse a `$localize` tagged string into a structure that can be used for translation or\n * extraction.\n *\n * See `ParsedMessage` for an example.\n */\nfunction parseMessage(messageParts, expressions, location, messagePartLocations, expressionLocations = []) {\n const substitutions = {};\n const substitutionLocations = {};\n const associatedMessageIds = {};\n const metadata = parseMetadata(messageParts[0], messageParts.raw[0]);\n const cleanedMessageParts = [metadata.text];\n const placeholderNames = [];\n let messageString = metadata.text;\n for (let i = 1; i < messageParts.length; i++) {\n const { messagePart, placeholderName = computePlaceholderName(i), associatedMessageId } = parsePlaceholder(messageParts[i], messageParts.raw[i]);\n messageString += `{$${placeholderName}}${messagePart}`;\n if (expressions !== undefined) {\n substitutions[placeholderName] = expressions[i - 1];\n substitutionLocations[placeholderName] = expressionLocations[i - 1];\n }\n placeholderNames.push(placeholderName);\n if (associatedMessageId !== undefined) {\n associatedMessageIds[placeholderName] = associatedMessageId;\n }\n cleanedMessageParts.push(messagePart);\n }\n const messageId = metadata.customId || computeMsgId(messageString, metadata.meaning || '');\n const legacyIds = metadata.legacyIds ? metadata.legacyIds.filter(id => id !== messageId) : [];\n return {\n id: messageId,\n legacyIds,\n substitutions,\n substitutionLocations,\n text: messageString,\n customId: metadata.customId,\n meaning: metadata.meaning || '',\n description: metadata.description || '',\n messageParts: cleanedMessageParts,\n messagePartLocations,\n placeholderNames,\n associatedMessageIds,\n location,\n };\n}\n/**\n * Parse the given message part (`cooked` + `raw`) to extract the message metadata from the text.\n *\n * If the message part has a metadata block this function will extract the `meaning`,\n * `description`, `customId` and `legacyId` (if provided) from the block. These metadata properties\n * are serialized in the string delimited by `|`, `@@` and `␟` respectively.\n *\n * (Note that `␟` is the `LEGACY_ID_INDICATOR` - see `constants.ts`.)\n *\n * For example:\n *\n * ```ts\n * `:meaning|description@@custom-id:`\n * `:meaning|@@custom-id:`\n * `:meaning|description:`\n * `:description@@custom-id:`\n * `:meaning|:`\n * `:description:`\n * `:@@custom-id:`\n * `:meaning|description@@custom-id␟legacy-id-1␟legacy-id-2:`\n * ```\n *\n * @param cooked The cooked version of the message part to parse.\n * @param raw The raw version of the message part to parse.\n * @returns A object containing any metadata that was parsed from the message part.\n */\nfunction parseMetadata(cooked, raw) {\n const { text: messageString, block } = splitBlock(cooked, raw);\n if (block === undefined) {\n return { text: messageString };\n }\n else {\n const [meaningDescAndId, ...legacyIds] = block.split(LEGACY_ID_INDICATOR);\n const [meaningAndDesc, customId] = meaningDescAndId.split(ID_SEPARATOR, 2);\n let [meaning, description] = meaningAndDesc.split(MEANING_SEPARATOR, 2);\n if (description === undefined) {\n description = meaning;\n meaning = undefined;\n }\n if (description === '') {\n description = undefined;\n }\n return { text: messageString, meaning, description, customId, legacyIds };\n }\n}\n/**\n * Parse the given message part (`cooked` + `raw`) to extract any placeholder metadata from the\n * text.\n *\n * If the message part has a metadata block this function will extract the `placeholderName` and\n * `associatedMessageId` (if provided) from the block.\n *\n * These metadata properties are serialized in the string delimited by `@@`.\n *\n * For example:\n *\n * ```ts\n * `:placeholder-name@@associated-id:`\n * ```\n *\n * @param cooked The cooked version of the message part to parse.\n * @param raw The raw version of the message part to parse.\n * @returns A object containing the metadata (`placeholderName` and `associatedMessageId`) of the\n * preceding placeholder, along with the static text that follows.\n */\nfunction parsePlaceholder(cooked, raw) {\n const { text: messagePart, block } = splitBlock(cooked, raw);\n if (block === undefined) {\n return { messagePart };\n }\n else {\n const [placeholderName, associatedMessageId] = block.split(ID_SEPARATOR);\n return { messagePart, placeholderName, associatedMessageId };\n }\n}\n/**\n * Split a message part (`cooked` + `raw`) into an optional delimited \"block\" off the front and the\n * rest of the text of the message part.\n *\n * Blocks appear at the start of message parts. They are delimited by a colon `:` character at the\n * start and end of the block.\n *\n * If the block is in the first message part then it will be metadata about the whole message:\n * meaning, description, id. Otherwise it will be metadata about the immediately preceding\n * substitution: placeholder name.\n *\n * Since blocks are optional, it is possible that the content of a message block actually starts\n * with a block marker. In this case the marker must be escaped `\\:`.\n *\n * @param cooked The cooked version of the message part to parse.\n * @param raw The raw version of the message part to parse.\n * @returns An object containing the `text` of the message part and the text of the `block`, if it\n * exists.\n * @throws an error if the `block` is unterminated\n */\nfunction splitBlock(cooked, raw) {\n if (raw.charAt(0) !== BLOCK_MARKER$1) {\n return { text: cooked };\n }\n else {\n const endOfBlock = findEndOfBlock(cooked, raw);\n return {\n block: cooked.substring(1, endOfBlock),\n text: cooked.substring(endOfBlock + 1),\n };\n }\n}\nfunction computePlaceholderName(index) {\n return index === 1 ? 'PH' : `PH_${index - 1}`;\n}\n/**\n * Find the end of a \"marked block\" indicated by the first non-escaped colon.\n *\n * @param cooked The cooked string (where escaped chars have been processed)\n * @param raw The raw string (where escape sequences are still in place)\n *\n * @returns the index of the end of block marker\n * @throws an error if the block is unterminated\n */\nfunction findEndOfBlock(cooked, raw) {\n for (let cookedIndex = 1, rawIndex = 1; cookedIndex < cooked.length; cookedIndex++, rawIndex++) {\n if (raw[rawIndex] === '\\\\') {\n rawIndex++;\n }\n else if (cooked[cookedIndex] === BLOCK_MARKER$1) {\n return cookedIndex;\n }\n }\n throw new Error(`Unterminated $localize metadata block in \"${raw}\".`);\n}\n\nclass MissingTranslationError extends Error {\n constructor(parsedMessage) {\n super(`No translation found for ${describeMessage(parsedMessage)}.`);\n this.parsedMessage = parsedMessage;\n this.type = 'MissingTranslationError';\n }\n}\nfunction isMissingTranslationError(e) {\n return e.type === 'MissingTranslationError';\n}\n/**\n * Translate the text of the `$localize` tagged-string (i.e. `messageParts` and\n * `substitutions`) using the given `translations`.\n *\n * The tagged-string is parsed to extract its `messageId` which is used to find an appropriate\n * `ParsedTranslation`. If this doesn't match and there are legacy ids then try matching a\n * translation using those.\n *\n * If one is found then it is used to translate the message into a new set of `messageParts` and\n * `substitutions`.\n * The translation may reorder (or remove) substitutions as appropriate.\n *\n * If there is no translation with a matching message id then an error is thrown.\n * If a translation contains a placeholder that is not found in the message being translated then an\n * error is thrown.\n */\nfunction translate$1(translations, messageParts, substitutions) {\n const message = parseMessage(messageParts, substitutions);\n // Look up the translation using the messageId, and then the legacyId if available.\n let translation = translations[message.id];\n // If the messageId did not match a translation, try matching the legacy ids instead\n if (message.legacyIds !== undefined) {\n for (let i = 0; i < message.legacyIds.length && translation === undefined; i++) {\n translation = translations[message.legacyIds[i]];\n }\n }\n if (translation === undefined) {\n throw new MissingTranslationError(message);\n }\n return [\n translation.messageParts, translation.placeholderNames.map(placeholder => {\n if (message.substitutions.hasOwnProperty(placeholder)) {\n return message.substitutions[placeholder];\n }\n else {\n throw new Error(`There is a placeholder name mismatch with the translation provided for the message ${describeMessage(message)}.\\n` +\n `The translation contains a placeholder with name ${placeholder}, which does not exist in the message.`);\n }\n })\n ];\n}\n/**\n * Parse the `messageParts` and `placeholderNames` out of a target `message`.\n *\n * Used by `loadTranslations()` to convert target message strings into a structure that is more\n * appropriate for doing translation.\n *\n * @param message the message to be parsed.\n */\nfunction parseTranslation(messageString) {\n const parts = messageString.split(/{\\$([^}]*)}/);\n const messageParts = [parts[0]];\n const placeholderNames = [];\n for (let i = 1; i < parts.length - 1; i += 2) {\n placeholderNames.push(parts[i]);\n messageParts.push(`${parts[i + 1]}`);\n }\n const rawMessageParts = messageParts.map(part => part.charAt(0) === BLOCK_MARKER$1 ? '\\\\' + part : part);\n return {\n text: messageString,\n messageParts: makeTemplateObject(messageParts, rawMessageParts),\n placeholderNames,\n };\n}\n/**\n * Create a `ParsedTranslation` from a set of `messageParts` and `placeholderNames`.\n *\n * @param messageParts The message parts to appear in the ParsedTranslation.\n * @param placeholderNames The names of the placeholders to intersperse between the `messageParts`.\n */\nfunction makeParsedTranslation(messageParts, placeholderNames = []) {\n let messageString = messageParts[0];\n for (let i = 0; i < placeholderNames.length; i++) {\n messageString += `{$${placeholderNames[i]}}${messageParts[i + 1]}`;\n }\n return {\n text: messageString,\n messageParts: makeTemplateObject(messageParts, messageParts),\n placeholderNames\n };\n}\n/**\n * Create the specialized array that is passed to tagged-string tag functions.\n *\n * @param cooked The message parts with their escape codes processed.\n * @param raw The message parts with their escaped codes as-is.\n */\nfunction makeTemplateObject(cooked, raw) {\n Object.defineProperty(cooked, 'raw', { value: raw });\n return cooked;\n}\nfunction describeMessage(message) {\n const meaningString = message.meaning && ` - \"${message.meaning}\"`;\n const legacy = message.legacyIds && message.legacyIds.length > 0 ?\n ` [${message.legacyIds.map(l => `\"${l}\"`).join(', ')}]` :\n '';\n return `\"${message.id}\"${legacy} (\"${message.text}\"${meaningString})`;\n}\n\n/**\n * Load translations for use by `$localize`, if doing runtime translation.\n *\n * If the `$localize` tagged strings are not going to be replaced at compiled time, it is possible\n * to load a set of translations that will be applied to the `$localize` tagged strings at runtime,\n * in the browser.\n *\n * Loading a new translation will overwrite a previous translation if it has the same `MessageId`.\n *\n * Note that `$localize` messages are only processed once, when the tagged string is first\n * encountered, and does not provide dynamic language changing without refreshing the browser.\n * Loading new translations later in the application life-cycle will not change the translated text\n * of messages that have already been translated.\n *\n * The message IDs and translations are in the same format as that rendered to \"simple JSON\"\n * translation files when extracting messages. In particular, placeholders in messages are rendered\n * using the `{$PLACEHOLDER_NAME}` syntax. For example the message from the following template:\n *\n * ```html\n *
preinner-preboldinner-postpost
\n * ```\n *\n * would have the following form in the `translations` map:\n *\n * ```ts\n * {\n * \"2932901491976224757\":\n * \"pre{$START_TAG_SPAN}inner-pre{$START_BOLD_TEXT}bold{$CLOSE_BOLD_TEXT}inner-post{$CLOSE_TAG_SPAN}post\"\n * }\n * ```\n *\n * @param translations A map from message ID to translated message.\n *\n * These messages are processed and added to a lookup based on their `MessageId`.\n *\n * @see {@link clearTranslations} for removing translations loaded using this function.\n * @see {@link $localize} for tagging messages as needing to be translated.\n * @publicApi\n */\nfunction loadTranslations(translations) {\n // Ensure the translate function exists\n if (!$localize.translate) {\n $localize.translate = translate;\n }\n if (!$localize.TRANSLATIONS) {\n $localize.TRANSLATIONS = {};\n }\n Object.keys(translations).forEach(key => {\n $localize.TRANSLATIONS[key] = parseTranslation(translations[key]);\n });\n}\n/**\n * Remove all translations for `$localize`, if doing runtime translation.\n *\n * All translations that had been loading into memory using `loadTranslations()` will be removed.\n *\n * @see {@link loadTranslations} for loading translations at runtime.\n * @see {@link $localize} for tagging messages as needing to be translated.\n *\n * @publicApi\n */\nfunction clearTranslations() {\n $localize.translate = undefined;\n $localize.TRANSLATIONS = {};\n}\n/**\n * Translate the text of the given message, using the loaded translations.\n *\n * This function may reorder (or remove) substitutions as indicated in the matching translation.\n */\nfunction translate(messageParts, substitutions) {\n try {\n return translate$1($localize.TRANSLATIONS, messageParts, substitutions);\n }\n catch (e) {\n console.warn(e.message);\n return [messageParts, substitutions];\n }\n}\n\n/**\n * Tag a template literal string for localization.\n *\n * For example:\n *\n * ```ts\n * $localize `some string to localize`\n * ```\n *\n * **Providing meaning, description and id**\n *\n * You can optionally specify one or more of `meaning`, `description` and `id` for a localized\n * string by pre-pending it with a colon delimited block of the form:\n *\n * ```ts\n * $localize`:meaning|description@@id:source message text`;\n *\n * $localize`:meaning|:source message text`;\n * $localize`:description:source message text`;\n * $localize`:@@id:source message text`;\n * ```\n *\n * This format is the same as that used for `i18n` markers in Angular templates. See the\n * [Angular i18n guide](guide/i18n-common-prepare#mark-text-in-component-template).\n *\n * **Naming placeholders**\n *\n * If the template literal string contains expressions, then the expressions will be automatically\n * associated with placeholder names for you.\n *\n * For example:\n *\n * ```ts\n * $localize `Hi ${name}! There are ${items.length} items.`;\n * ```\n *\n * will generate a message-source of `Hi {$PH}! There are {$PH_1} items`.\n *\n * The recommended practice is to name the placeholder associated with each expression though.\n *\n * Do this by providing the placeholder name wrapped in `:` characters directly after the\n * expression. These placeholder names are stripped out of the rendered localized string.\n *\n * For example, to name the `items.length` expression placeholder `itemCount` you write:\n *\n * ```ts\n * $localize `There are ${items.length}:itemCount: items`;\n * ```\n *\n * **Escaping colon markers**\n *\n * If you need to use a `:` character directly at the start of a tagged string that has no\n * metadata block, or directly after a substitution expression that has no name you must escape\n * the `:` by preceding it with a backslash:\n *\n * For example:\n *\n * ```ts\n * // message has a metadata block so no need to escape colon\n * $localize `:some description::this message starts with a colon (:)`;\n * // no metadata block so the colon must be escaped\n * $localize `\\:this message starts with a colon (:)`;\n * ```\n *\n * ```ts\n * // named substitution so no need to escape colon\n * $localize `${label}:label:: ${}`\n * // anonymous substitution so colon must be escaped\n * $localize `${label}\\: ${}`\n * ```\n *\n * **Processing localized strings:**\n *\n * There are three scenarios:\n *\n * * **compile-time inlining**: the `$localize` tag is transformed at compile time by a\n * transpiler, removing the tag and replacing the template literal string with a translated\n * literal string from a collection of translations provided to the transpilation tool.\n *\n * * **run-time evaluation**: the `$localize` tag is a run-time function that replaces and\n * reorders the parts (static strings and expressions) of the template literal string with strings\n * from a collection of translations loaded at run-time.\n *\n * * **pass-through evaluation**: the `$localize` tag is a run-time function that simply evaluates\n * the original template literal string without applying any translations to the parts. This\n * version is used during development or where there is no need to translate the localized\n * template literals.\n *\n * @param messageParts a collection of the static parts of the template string.\n * @param expressions a collection of the values of each placeholder in the template string.\n * @returns the translated string, with the `messageParts` and `expressions` interleaved together.\n *\n * @globalApi\n * @publicApi\n */\nconst $localize$1 = function (messageParts, ...expressions) {\n if ($localize$1.translate) {\n // Don't use array expansion here to avoid the compiler adding `__read()` helper unnecessarily.\n const translation = $localize$1.translate(messageParts, expressions);\n messageParts = translation[0];\n expressions = translation[1];\n }\n let message = stripBlock(messageParts[0], messageParts.raw[0]);\n for (let i = 1; i < messageParts.length; i++) {\n message += expressions[i - 1] + stripBlock(messageParts[i], messageParts.raw[i]);\n }\n return message;\n};\nconst BLOCK_MARKER = ':';\n/**\n * Strip a delimited \"block\" from the start of the `messagePart`, if it is found.\n *\n * If a marker character (:) actually appears in the content at the start of a tagged string or\n * after a substitution expression, where a block has not been provided the character must be\n * escaped with a backslash, `\\:`. This function checks for this by looking at the `raw`\n * messagePart, which should still contain the backslash.\n *\n * @param messagePart The cooked message part to process.\n * @param rawMessagePart The raw message part to check.\n * @returns the message part with the placeholder name stripped, if found.\n * @throws an error if the block is unterminated\n */\nfunction stripBlock(messagePart, rawMessagePart) {\n return rawMessagePart.charAt(0) === BLOCK_MARKER ?\n messagePart.substring(findEndOfBlock(messagePart, rawMessagePart) + 1) :\n messagePart;\n}\n\n// This file exports all the `utils` as private exports so that other parts of `@angular/localize`\n\n// This file contains the public API of the `@angular/localize` entry-point\n\n// DO NOT ADD public exports to this file.\n\nexport { clearTranslations, loadTranslations, $localize$1 as ɵ$localize, MissingTranslationError as ɵMissingTranslationError, computeMsgId as ɵcomputeMsgId, findEndOfBlock as ɵfindEndOfBlock, isMissingTranslationError as ɵisMissingTranslationError, makeParsedTranslation as ɵmakeParsedTranslation, makeTemplateObject as ɵmakeTemplateObject, parseMessage as ɵparseMessage, parseMetadata as ɵparseMetadata, parseTranslation as ɵparseTranslation, splitBlock as ɵsplitBlock, translate$1 as ɵtranslate };\n","/**\n * @license Angular v17.3.5\n * (c) 2010-2024 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport { ɵ$localize } from '@angular/localize';\nexport { ɵ$localize as $localize } from '@angular/localize';\n\n// Attach $localize to the global context, as a side-effect of this module.\nglobalThis.$localize = ɵ$localize;\n","export function getXMLParser() {\r\n let parseXml;\r\n const win = window as any;\r\n if (typeof win.DOMParser !== 'undefined') {\r\n parseXml = (xmlStr: string) => {\r\n return new win.DOMParser().parseFromString(xmlStr, 'text/xml');\r\n };\r\n } else if (typeof win.ActiveXObject !== 'undefined' && new win.ActiveXObject('Microsoft.XMLDOM')) {\r\n parseXml = (xmlStr: string) => {\r\n const xmlDoc = new win.ActiveXObject('Microsoft.XMLDOM');\r\n xmlDoc.async = 'false';\r\n xmlDoc.loadXML(xmlStr);\r\n return xmlDoc;\r\n };\r\n } else {\r\n throw new Error('No XML parser found');\r\n }\r\n\r\n return {\r\n parseXml\r\n };\r\n}\r\n\r\n\r\nexport function mergeXlf(source: any, target: any) {\r\n if(!source){\r\n return target;\r\n }\r\n const parser = getXMLParser();\r\n const sourceTree = parser.parseXml(source);\r\n const targetTree = parser.parseXml(target);\r\n const translationUnits = targetTree.documentElement.getElementsByTagName('trans-unit');\r\n const parseErrors = targetTree.documentElement.getElementsByTagName('parsererror');\r\n\r\n if (parseErrors && parseErrors.length) {\r\n console.error(\r\n 'Error while parsing target XLF files! [mergeXlf]',\r\n Array.from(parseErrors).join(','),\r\n targetTree.documentElement\r\n );\r\n }\r\n for (let i = 0; i < translationUnits.length; i++) {\r\n const id = translationUnits[i].getAttribute('id');\r\n const selector = 'trans-unit[id=\"' + id + '\"]';\r\n const sourceElement = sourceTree.documentElement.querySelector(selector);\r\n if (sourceElement) {\r\n sourceTree.documentElement\r\n .getElementsByTagName('body')[0]\r\n .replaceChild(translationUnits[i].cloneNode(true), sourceTree.documentElement.querySelector(selector));\r\n } else {\r\n sourceTree.documentElement.getElementsByTagName('body')[0].appendChild(translationUnits[i].cloneNode(true));\r\n }\r\n }\r\n const serializer = new XMLSerializer();\r\n let serialized;\r\n try {\r\n serialized = serializer.serializeToString(sourceTree);\r\n } catch (e) {\r\n console.error('Error while serialising XLF file! [mergeXlf]', e, sourceTree);\r\n }\r\n return serialized;\r\n}\r\n","import { TRANSLATIONS, TRANSLATIONS_FORMAT, LOCALE_ID, InjectionToken } from '@angular/core';\r\nimport { getFile } from './provider.helper';\r\nimport { mergeXlf, getXMLParser } from './xlf.merger';\r\nimport { loadTranslations, clearTranslations } from '@angular/localize';\r\n\r\nfunction getWindow(): any {\r\n return window;\r\n}\r\n\r\nexport declare const TRANSLATIONS_JSON: InjectionToken;\r\nconst rootPath = getWindow().SERVER_CONFIG ? getWindow().SERVER_CONFIG.APP_ROOT_PATH : '';\r\n\r\nfunction getTranslationProvider(translations: any, local: string) {\r\n return [\r\n { provide: TRANSLATIONS, useValue: translations },\r\n { provide: TRANSLATIONS_FORMAT, useValue: 'xlf' },\r\n { provide: LOCALE_ID, useValue: local }\r\n ];\r\n}\r\n\r\nasync function getTranslationFile(path: string, errorMessage: string){\r\n try {\r\n const result = await getFile(path);\r\n return result;\r\n }catch(e){\r\n console.info(errorMessage);\r\n return null;\r\n }\r\n}\r\n\r\nexport async function xlfTranslationProvider(): Promise {\r\n clearTranslations();\r\n const local = getWindow().systemLang || 'en';\r\n const theme = (getWindow().SERVER_CONFIG && getWindow().SERVER_CONFIG.CURRENT_THEME)\r\n ? getWindow().SERVER_CONFIG.CURRENT_THEME\r\n : getWindow().systemTheme || 'ClimatixIC';\r\n\r\n const translationFile = rootPath + `local/xlf/messages.${local}.xlf`;\r\n const defaultThemeTranslationFile = rootPath + `themes/${theme}/translations/translation.xlf`;\r\n const themeTranslationFile = rootPath + `themes/${theme}/translations/translation.${local}.xlf`;\r\n\r\n let translations;\r\n\r\n const translationRequests: any[] = [\r\n getTranslationFile(translationFile, 'Translation file not found'),\r\n getTranslationFile(defaultThemeTranslationFile, 'Default theme transation file not found!'),\r\n getTranslationFile(themeTranslationFile, 'Theme translation file not found!'),\r\n ];\r\n\r\n if (theme === 'default') {\r\n translationRequests.pop();\r\n translationRequests.pop();\r\n }\r\n\r\n const translationResults = await Promise.all(translationRequests);\r\n\r\n for(const current of translationResults){\r\n if(current){\r\n translations = mergeXlf(translations, current);\r\n }\r\n }\r\n\r\n const parser = getXMLParser();\r\n const parsedTranslations = parser.parseXml(translations as string);\r\n getWindow().__TRANSLATIONS = parsedTranslations;\r\n loadExternalTranslations(parsedTranslations);\r\n return getTranslationProvider(translations, local);\r\n}\r\n\r\nfunction convertTranslationsToJSON(translations, useId) {\r\n const xmlTranslation = translations;\r\n if (!xmlTranslation) {\r\n return;\r\n }\r\n\r\n const translationUnits = xmlTranslation.documentElement.getElementsByTagName('trans-unit');\r\n const output = {};\r\n for (let i = 0; i < translationUnits.length; i++) {\r\n const id = translationUnits[i].getAttribute('id');\r\n let source = translationUnits[i].getElementsByTagName('source')[0];\r\n let target = translationUnits[i].getElementsByTagName('target')[0];\r\n source = source.firstChild ? source.firstChild.nodeValue : source.nodeValue;\r\n target = (target) ? createJSONValue(target, useId) : null;\r\n output[id] = {\r\n source,\r\n target\r\n };\r\n }\r\n return output;\r\n}\r\n\r\nfunction trimValues(target){\r\n if(target.childNodes){\r\n target.childNodes.forEach((current, index) => {\r\n // remove linebreaks before child elements\r\n if(target.childNodes[index + 1] && target.childNodes[index + 1].nodeType === 1 && current && current.nodeValue){\r\n if(~current.nodeValue.lastIndexOf('\\r\\n') && !current.nodeValue.substring(current.nodeValue.lastIndexOf('\\r\\n'), current.nodeValue.length).trim()){\r\n current.nodeValue = current.nodeValue.substring(0, current.nodeValue.lastIndexOf('\\r\\n'));\r\n }else if(~current.nodeValue.lastIndexOf('\\n') && !current.nodeValue.substring(current.nodeValue.lastIndexOf('\\n'), current.nodeValue.length).trim()){\r\n current.nodeValue = current.nodeValue.substring(0, current.nodeValue.lastIndexOf('\\n'));\r\n }\r\n }\r\n })\r\n }\r\n}\r\n\r\nfunction createJSONValue(target, useId = false){\r\n if(target && target.firstChild){\r\n let output = '';\r\n if(target.childNodes.length === 1){\r\n return target.firstChild.nodeValue;\r\n }\r\n trimValues(target);\r\n target.childNodes.forEach((current) => {\r\n if(current.nodeType === 1 && current.nodeName.toLowerCase() === 'x'){\r\n if(useId){\r\n let name = current.getAttribute('id').replace(/[\\{|\\}]/gm, '');\r\n name = name.replace(/\\-/gm, '_');\r\n output += '{$' + name + '}';\r\n }else{\r\n output += '{$' + current.getAttribute('equiv-text').replace(/[\\{|\\}]/gm, '') + '}'\r\n }\r\n }else{\r\n output += current.nodeValue.replace(/(\\r\\n|\\n|\\r)/gm, '');\r\n }\r\n })\r\n output = output.replace(/\\n/gm, '');\r\n return output;\r\n }\r\n return target.nodeValue;\r\n}\r\n\r\n\r\nexport function loadExternalTranslations(translations) {\r\n const win = window as any;\r\n const translationsJson = convertTranslationsToJSON(translations, false);\r\n win.JS_TRANSLATIONS = translationsJson;\r\n const normalTranslations = convertTranslationsToJSON(translations, true);\r\n const keyValueFormat = {};\r\n Object.keys(normalTranslations).forEach((current) => {\r\n if(normalTranslations[current].target){\r\n keyValueFormat[current] = normalTranslations[current].target;\r\n }\r\n });\r\n loadTranslations(keyValueFormat);\r\n}\r\n\r\n\r\n\r\nexport function getTranslationProviders() {\r\n return new Promise((resolve, reject) => {\r\n console.time('load languages');\r\n Promise.all([xlfTranslationProvider()]).then((result) => {\r\n let output: Array = [];\r\n output = result.map((current) => output.concat(current));\r\n console.timeEnd('load languages');\r\n resolve(output);\r\n });\r\n });\r\n}\r\n","export function getFile(file: string) {\r\n return new Promise((resolve, reject) => {\r\n const xhr = new XMLHttpRequest();\r\n xhr.open('GET', file + '?rand=' + Math.random(), false);\r\n xhr.onerror = reject;\r\n xhr.onreadystatechange = () => {\r\n if (xhr.readyState === 4) {\r\n if (xhr.status === 200 || xhr.status === 0) {\r\n resolve(xhr.responseText);\r\n }else if(xhr.status > 400){\r\n reject('Something went wrong! Status: ' + xhr.status);\r\n }\r\n }\r\n };\r\n xhr.send();\r\n });\r\n}\r\n","/***************************************************************************************************\n * Load `$localize` onto the global scope - used if i18n tags appear in Angular templates.\n */\nimport '@angular/localize/init';\n/**\n * This file includes polyfills needed by Angular and is loaded before the app.\n * You can add your own extra polyfills to this file.\n *\n * This file is divided into 2 sections:\n * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.\n * 2. Application imports. Files imported after ZoneJS that should be loaded before your main\n * file.\n *\n * The current setup is for so-called \"evergreen\" browsers; the last versions of browsers that\n * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),\n * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.\n *\n * Learn more in https://angular.io/guide/browser-support\n */\n\n/***************************************************************************************************\n * BROWSER POLYFILLS\n */\n\n/**\n * By default, zone.js will patch all possible macroTask and DomEvents\n * user can disable parts of macroTask/DomEvents patch by setting following flags\n * because those flags need to be set before `zone.js` being loaded, and webpack\n * will put import in the top of bundle, so user need to create a separate file\n * in this directory (for example: zone-flags.ts), and put the following flags\n * into that file, and then add the following code before importing zone.js.\n * import './zone-flags.ts';\n *\n * The flags allowed in zone-flags.ts are listed here.\n *\n * The following flags will work for all browsers.\n *\n * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame\n * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick\n * (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames\n *\n * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js\n * with the following flag, it will bypass `zone.js` patch for IE/Edge\n *\n * (window as any).__Zone_enable_cross_context_check = true;\n *\n */\n\n/***************************************************************************************************\n * Zone JS is required by default for Angular itself.\n */\nimport 'zone.js';\nimport 'zone.js/testing'; // Included with Angular CLI. */\n\n\n/***************************************************************************************************\n * APPLICATION IMPORTS\n */\n\n\nimport { xlfTranslationProvider } from './provider/18n.provider';\n\nxlfTranslationProvider()\n","import { Subject } from './Subject';\nexport class BehaviorSubject extends Subject {\n constructor(_value) {\n super();\n this._value = _value;\n }\n get value() {\n return this.getValue();\n }\n _subscribe(subscriber) {\n const subscription = super._subscribe(subscriber);\n !subscription.closed && subscriber.next(this._value);\n return subscription;\n }\n getValue() {\n const { hasError, thrownError, _value } = this;\n if (hasError) {\n throw thrownError;\n }\n this._throwIfClosed();\n return _value;\n }\n next(value) {\n super.next((this._value = value));\n }\n}\n","import { SafeSubscriber, Subscriber } from './Subscriber';\nimport { isSubscription } from './Subscription';\nimport { observable as Symbol_observable } from './symbol/observable';\nimport { pipeFromArray } from './util/pipe';\nimport { config } from './config';\nimport { isFunction } from './util/isFunction';\nimport { errorContext } from './util/errorContext';\nexport class Observable {\n constructor(subscribe) {\n if (subscribe) {\n this._subscribe = subscribe;\n }\n }\n lift(operator) {\n const observable = new Observable();\n observable.source = this;\n observable.operator = operator;\n return observable;\n }\n subscribe(observerOrNext, error, complete) {\n const subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete);\n errorContext(() => {\n const { operator, source } = this;\n subscriber.add(operator\n ?\n operator.call(subscriber, source)\n : source\n ?\n this._subscribe(subscriber)\n :\n this._trySubscribe(subscriber));\n });\n return subscriber;\n }\n _trySubscribe(sink) {\n try {\n return this._subscribe(sink);\n }\n catch (err) {\n sink.error(err);\n }\n }\n forEach(next, promiseCtor) {\n promiseCtor = getPromiseCtor(promiseCtor);\n return new promiseCtor((resolve, reject) => {\n const subscriber = new SafeSubscriber({\n next: (value) => {\n try {\n next(value);\n }\n catch (err) {\n reject(err);\n subscriber.unsubscribe();\n }\n },\n error: reject,\n complete: resolve,\n });\n this.subscribe(subscriber);\n });\n }\n _subscribe(subscriber) {\n var _a;\n return (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber);\n }\n [Symbol_observable]() {\n return this;\n }\n pipe(...operations) {\n return pipeFromArray(operations)(this);\n }\n toPromise(promiseCtor) {\n promiseCtor = getPromiseCtor(promiseCtor);\n return new promiseCtor((resolve, reject) => {\n let value;\n this.subscribe((x) => (value = x), (err) => reject(err), () => resolve(value));\n });\n }\n}\nObservable.create = (subscribe) => {\n return new Observable(subscribe);\n};\nfunction getPromiseCtor(promiseCtor) {\n var _a;\n return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config.Promise) !== null && _a !== void 0 ? _a : Promise;\n}\nfunction isObserver(value) {\n return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete);\n}\nfunction isSubscriber(value) {\n return (value && value instanceof Subscriber) || (isObserver(value) && isSubscription(value));\n}\n","import { createErrorClass } from './createErrorClass';\nexport const ObjectUnsubscribedError = createErrorClass((_super) => function ObjectUnsubscribedErrorImpl() {\n _super(this);\n this.name = 'ObjectUnsubscribedError';\n this.message = 'object unsubscribed';\n});\n","import { Observable } from './Observable';\nimport { Subscription, EMPTY_SUBSCRIPTION } from './Subscription';\nimport { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';\nimport { arrRemove } from './util/arrRemove';\nimport { errorContext } from './util/errorContext';\nexport class Subject extends Observable {\n constructor() {\n super();\n this.closed = false;\n this.currentObservers = null;\n this.observers = [];\n this.isStopped = false;\n this.hasError = false;\n this.thrownError = null;\n }\n lift(operator) {\n const subject = new AnonymousSubject(this, this);\n subject.operator = operator;\n return subject;\n }\n _throwIfClosed() {\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n }\n next(value) {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n if (!this.currentObservers) {\n this.currentObservers = Array.from(this.observers);\n }\n for (const observer of this.currentObservers) {\n observer.next(value);\n }\n }\n });\n }\n error(err) {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n this.hasError = this.isStopped = true;\n this.thrownError = err;\n const { observers } = this;\n while (observers.length) {\n observers.shift().error(err);\n }\n }\n });\n }\n complete() {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n this.isStopped = true;\n const { observers } = this;\n while (observers.length) {\n observers.shift().complete();\n }\n }\n });\n }\n unsubscribe() {\n this.isStopped = this.closed = true;\n this.observers = this.currentObservers = null;\n }\n get observed() {\n var _a;\n return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0;\n }\n _trySubscribe(subscriber) {\n this._throwIfClosed();\n return super._trySubscribe(subscriber);\n }\n _subscribe(subscriber) {\n this._throwIfClosed();\n this._checkFinalizedStatuses(subscriber);\n return this._innerSubscribe(subscriber);\n }\n _innerSubscribe(subscriber) {\n const { hasError, isStopped, observers } = this;\n if (hasError || isStopped) {\n return EMPTY_SUBSCRIPTION;\n }\n this.currentObservers = null;\n observers.push(subscriber);\n return new Subscription(() => {\n this.currentObservers = null;\n arrRemove(observers, subscriber);\n });\n }\n _checkFinalizedStatuses(subscriber) {\n const { hasError, thrownError, isStopped } = this;\n if (hasError) {\n subscriber.error(thrownError);\n }\n else if (isStopped) {\n subscriber.complete();\n }\n }\n asObservable() {\n const observable = new Observable();\n observable.source = this;\n return observable;\n }\n}\nSubject.create = (destination, source) => {\n return new AnonymousSubject(destination, source);\n};\nexport class AnonymousSubject extends Subject {\n constructor(destination, source) {\n super();\n this.destination = destination;\n this.source = source;\n }\n next(value) {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.next) === null || _b === void 0 ? void 0 : _b.call(_a, value);\n }\n error(err) {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.call(_a, err);\n }\n complete() {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.complete) === null || _b === void 0 ? void 0 : _b.call(_a);\n }\n _subscribe(subscriber) {\n var _a, _b;\n return (_b = (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : EMPTY_SUBSCRIPTION;\n }\n}\n","export const COMPLETE_NOTIFICATION = (() => createNotification('C', undefined, undefined))();\nexport function errorNotification(error) {\n return createNotification('E', undefined, error);\n}\nexport function nextNotification(value) {\n return createNotification('N', value, undefined);\n}\nexport function createNotification(kind, value, error) {\n return {\n kind,\n value,\n error,\n };\n}\n","import { isFunction } from './util/isFunction';\nimport { isSubscription, Subscription } from './Subscription';\nimport { config } from './config';\nimport { reportUnhandledError } from './util/reportUnhandledError';\nimport { noop } from './util/noop';\nimport { nextNotification, errorNotification, COMPLETE_NOTIFICATION } from './NotificationFactories';\nimport { timeoutProvider } from './scheduler/timeoutProvider';\nimport { captureError } from './util/errorContext';\nexport class Subscriber extends Subscription {\n constructor(destination) {\n super();\n this.isStopped = false;\n if (destination) {\n this.destination = destination;\n if (isSubscription(destination)) {\n destination.add(this);\n }\n }\n else {\n this.destination = EMPTY_OBSERVER;\n }\n }\n static create(next, error, complete) {\n return new SafeSubscriber(next, error, complete);\n }\n next(value) {\n if (this.isStopped) {\n handleStoppedNotification(nextNotification(value), this);\n }\n else {\n this._next(value);\n }\n }\n error(err) {\n if (this.isStopped) {\n handleStoppedNotification(errorNotification(err), this);\n }\n else {\n this.isStopped = true;\n this._error(err);\n }\n }\n complete() {\n if (this.isStopped) {\n handleStoppedNotification(COMPLETE_NOTIFICATION, this);\n }\n else {\n this.isStopped = true;\n this._complete();\n }\n }\n unsubscribe() {\n if (!this.closed) {\n this.isStopped = true;\n super.unsubscribe();\n this.destination = null;\n }\n }\n _next(value) {\n this.destination.next(value);\n }\n _error(err) {\n try {\n this.destination.error(err);\n }\n finally {\n this.unsubscribe();\n }\n }\n _complete() {\n try {\n this.destination.complete();\n }\n finally {\n this.unsubscribe();\n }\n }\n}\nconst _bind = Function.prototype.bind;\nfunction bind(fn, thisArg) {\n return _bind.call(fn, thisArg);\n}\nclass ConsumerObserver {\n constructor(partialObserver) {\n this.partialObserver = partialObserver;\n }\n next(value) {\n const { partialObserver } = this;\n if (partialObserver.next) {\n try {\n partialObserver.next(value);\n }\n catch (error) {\n handleUnhandledError(error);\n }\n }\n }\n error(err) {\n const { partialObserver } = this;\n if (partialObserver.error) {\n try {\n partialObserver.error(err);\n }\n catch (error) {\n handleUnhandledError(error);\n }\n }\n else {\n handleUnhandledError(err);\n }\n }\n complete() {\n const { partialObserver } = this;\n if (partialObserver.complete) {\n try {\n partialObserver.complete();\n }\n catch (error) {\n handleUnhandledError(error);\n }\n }\n }\n}\nexport class SafeSubscriber extends Subscriber {\n constructor(observerOrNext, error, complete) {\n super();\n let partialObserver;\n if (isFunction(observerOrNext) || !observerOrNext) {\n partialObserver = {\n next: (observerOrNext !== null && observerOrNext !== void 0 ? observerOrNext : undefined),\n error: error !== null && error !== void 0 ? error : undefined,\n complete: complete !== null && complete !== void 0 ? complete : undefined,\n };\n }\n else {\n let context;\n if (this && config.useDeprecatedNextContext) {\n context = Object.create(observerOrNext);\n context.unsubscribe = () => this.unsubscribe();\n partialObserver = {\n next: observerOrNext.next && bind(observerOrNext.next, context),\n error: observerOrNext.error && bind(observerOrNext.error, context),\n complete: observerOrNext.complete && bind(observerOrNext.complete, context),\n };\n }\n else {\n partialObserver = observerOrNext;\n }\n }\n this.destination = new ConsumerObserver(partialObserver);\n }\n}\nfunction handleUnhandledError(error) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n captureError(error);\n }\n else {\n reportUnhandledError(error);\n }\n}\nfunction defaultErrorHandler(err) {\n throw err;\n}\nfunction handleStoppedNotification(notification, subscriber) {\n const { onStoppedNotification } = config;\n onStoppedNotification && timeoutProvider.setTimeout(() => onStoppedNotification(notification, subscriber));\n}\nexport const EMPTY_OBSERVER = {\n closed: true,\n next: noop,\n error: defaultErrorHandler,\n complete: noop,\n};\n","import { createErrorClass } from './createErrorClass';\nexport const UnsubscriptionError = createErrorClass((_super) => function UnsubscriptionErrorImpl(errors) {\n _super(this);\n this.message = errors\n ? `${errors.length} errors occurred during unsubscription:\n${errors.map((err, i) => `${i + 1}) ${err.toString()}`).join('\\n ')}`\n : '';\n this.name = 'UnsubscriptionError';\n this.errors = errors;\n});\n","import { isFunction } from './util/isFunction';\nimport { UnsubscriptionError } from './util/UnsubscriptionError';\nimport { arrRemove } from './util/arrRemove';\nexport class Subscription {\n constructor(initialTeardown) {\n this.initialTeardown = initialTeardown;\n this.closed = false;\n this._parentage = null;\n this._finalizers = null;\n }\n unsubscribe() {\n let errors;\n if (!this.closed) {\n this.closed = true;\n const { _parentage } = this;\n if (_parentage) {\n this._parentage = null;\n if (Array.isArray(_parentage)) {\n for (const parent of _parentage) {\n parent.remove(this);\n }\n }\n else {\n _parentage.remove(this);\n }\n }\n const { initialTeardown: initialFinalizer } = this;\n if (isFunction(initialFinalizer)) {\n try {\n initialFinalizer();\n }\n catch (e) {\n errors = e instanceof UnsubscriptionError ? e.errors : [e];\n }\n }\n const { _finalizers } = this;\n if (_finalizers) {\n this._finalizers = null;\n for (const finalizer of _finalizers) {\n try {\n execFinalizer(finalizer);\n }\n catch (err) {\n errors = errors !== null && errors !== void 0 ? errors : [];\n if (err instanceof UnsubscriptionError) {\n errors = [...errors, ...err.errors];\n }\n else {\n errors.push(err);\n }\n }\n }\n }\n if (errors) {\n throw new UnsubscriptionError(errors);\n }\n }\n }\n add(teardown) {\n var _a;\n if (teardown && teardown !== this) {\n if (this.closed) {\n execFinalizer(teardown);\n }\n else {\n if (teardown instanceof Subscription) {\n if (teardown.closed || teardown._hasParent(this)) {\n return;\n }\n teardown._addParent(this);\n }\n (this._finalizers = (_a = this._finalizers) !== null && _a !== void 0 ? _a : []).push(teardown);\n }\n }\n }\n _hasParent(parent) {\n const { _parentage } = this;\n return _parentage === parent || (Array.isArray(_parentage) && _parentage.includes(parent));\n }\n _addParent(parent) {\n const { _parentage } = this;\n this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent;\n }\n _removeParent(parent) {\n const { _parentage } = this;\n if (_parentage === parent) {\n this._parentage = null;\n }\n else if (Array.isArray(_parentage)) {\n arrRemove(_parentage, parent);\n }\n }\n remove(teardown) {\n const { _finalizers } = this;\n _finalizers && arrRemove(_finalizers, teardown);\n if (teardown instanceof Subscription) {\n teardown._removeParent(this);\n }\n }\n}\nSubscription.EMPTY = (() => {\n const empty = new Subscription();\n empty.closed = true;\n return empty;\n})();\nexport const EMPTY_SUBSCRIPTION = Subscription.EMPTY;\nexport function isSubscription(value) {\n return (value instanceof Subscription ||\n (value && 'closed' in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe)));\n}\nfunction execFinalizer(finalizer) {\n if (isFunction(finalizer)) {\n finalizer();\n }\n else {\n finalizer.unsubscribe();\n }\n}\n","export const config = {\n onUnhandledError: null,\n onStoppedNotification: null,\n Promise: undefined,\n useDeprecatedSynchronousErrorHandling: false,\n useDeprecatedNextContext: false,\n};\n","import { Subscriber } from '../Subscriber';\nexport function createOperatorSubscriber(destination, onNext, onComplete, onError, onFinalize) {\n return new OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize);\n}\nexport class OperatorSubscriber extends Subscriber {\n constructor(destination, onNext, onComplete, onError, onFinalize, shouldUnsubscribe) {\n super(destination);\n this.onFinalize = onFinalize;\n this.shouldUnsubscribe = shouldUnsubscribe;\n this._next = onNext\n ? function (value) {\n try {\n onNext(value);\n }\n catch (err) {\n destination.error(err);\n }\n }\n : super._next;\n this._error = onError\n ? function (err) {\n try {\n onError(err);\n }\n catch (err) {\n destination.error(err);\n }\n finally {\n this.unsubscribe();\n }\n }\n : super._error;\n this._complete = onComplete\n ? function () {\n try {\n onComplete();\n }\n catch (err) {\n destination.error(err);\n }\n finally {\n this.unsubscribe();\n }\n }\n : super._complete;\n }\n unsubscribe() {\n var _a;\n if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {\n const { closed } = this;\n super.unsubscribe();\n !closed && ((_a = this.onFinalize) === null || _a === void 0 ? void 0 : _a.call(this));\n }\n }\n}\n","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function map(project, thisArg) {\n return operate((source, subscriber) => {\n let index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n subscriber.next(project.call(thisArg, value, index++));\n }));\n });\n}\n","export const timeoutProvider = {\n setTimeout(handler, timeout, ...args) {\n const { delegate } = timeoutProvider;\n if (delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) {\n return delegate.setTimeout(handler, timeout, ...args);\n }\n return setTimeout(handler, timeout, ...args);\n },\n clearTimeout(handle) {\n const { delegate } = timeoutProvider;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle);\n },\n delegate: undefined,\n};\n","export const observable = (() => (typeof Symbol === 'function' && Symbol.observable) || '@@observable')();\n","export function arrRemove(arr, item) {\n if (arr) {\n const index = arr.indexOf(item);\n 0 <= index && arr.splice(index, 1);\n }\n}\n","export function createErrorClass(createImpl) {\n const _super = (instance) => {\n Error.call(instance);\n instance.stack = new Error().stack;\n };\n const ctorFunc = createImpl(_super);\n ctorFunc.prototype = Object.create(Error.prototype);\n ctorFunc.prototype.constructor = ctorFunc;\n return ctorFunc;\n}\n","import { config } from '../config';\nlet context = null;\nexport function errorContext(cb) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n const isRoot = !context;\n if (isRoot) {\n context = { errorThrown: false, error: null };\n }\n cb();\n if (isRoot) {\n const { errorThrown, error } = context;\n context = null;\n if (errorThrown) {\n throw error;\n }\n }\n }\n else {\n cb();\n }\n}\nexport function captureError(err) {\n if (config.useDeprecatedSynchronousErrorHandling && context) {\n context.errorThrown = true;\n context.error = err;\n }\n}\n","export function identity(x) {\n return x;\n}\n","export function isFunction(value) {\n return typeof value === 'function';\n}\n","import { isFunction } from './isFunction';\nexport function hasLift(source) {\n return isFunction(source === null || source === void 0 ? void 0 : source.lift);\n}\nexport function operate(init) {\n return (source) => {\n if (hasLift(source)) {\n return source.lift(function (liftedSource) {\n try {\n return init(liftedSource, this);\n }\n catch (err) {\n this.error(err);\n }\n });\n }\n throw new TypeError('Unable to lift unknown Observable type');\n };\n}\n","export function noop() { }\n","import { identity } from './identity';\nexport function pipe(...fns) {\n return pipeFromArray(fns);\n}\nexport function pipeFromArray(fns) {\n if (fns.length === 0) {\n return identity;\n }\n if (fns.length === 1) {\n return fns[0];\n }\n return function piped(input) {\n return fns.reduce((prev, fn) => fn(prev), input);\n };\n}\n","import { config } from '../config';\nimport { timeoutProvider } from '../scheduler/timeoutProvider';\nexport function reportUnhandledError(err) {\n timeoutProvider.setTimeout(() => {\n const { onUnhandledError } = config;\n if (onUnhandledError) {\n onUnhandledError(err);\n }\n else {\n throw err;\n }\n });\n}\n","'use strict';\n/**\n * @license Angular v\n * (c) 2010-2022 Google LLC. https://angular.io/\n * License: MIT\n */\n/**\n * @fileoverview\n * @suppress {globalThis}\n */\nconst NEWLINE = '\\n';\nconst IGNORE_FRAMES = {};\nconst creationTrace = '__creationTrace__';\nconst ERROR_TAG = 'STACKTRACE TRACKING';\nconst SEP_TAG = '__SEP_TAG__';\nlet sepTemplate = SEP_TAG + '@[native]';\nclass LongStackTrace {\n constructor() {\n this.error = getStacktrace();\n this.timestamp = new Date();\n }\n}\nfunction getStacktraceWithUncaughtError() {\n return new Error(ERROR_TAG);\n}\nfunction getStacktraceWithCaughtError() {\n try {\n throw getStacktraceWithUncaughtError();\n }\n catch (err) {\n return err;\n }\n}\n// Some implementations of exception handling don't create a stack trace if the exception\n// isn't thrown, however it's faster not to actually throw the exception.\nconst error = getStacktraceWithUncaughtError();\nconst caughtError = getStacktraceWithCaughtError();\nconst getStacktrace = error.stack ?\n getStacktraceWithUncaughtError :\n (caughtError.stack ? getStacktraceWithCaughtError : getStacktraceWithUncaughtError);\nfunction getFrames(error) {\n return error.stack ? error.stack.split(NEWLINE) : [];\n}\nfunction addErrorStack(lines, error) {\n let trace = getFrames(error);\n for (let i = 0; i < trace.length; i++) {\n const frame = trace[i];\n // Filter out the Frames which are part of stack capturing.\n if (!IGNORE_FRAMES.hasOwnProperty(frame)) {\n lines.push(trace[i]);\n }\n }\n}\nfunction renderLongStackTrace(frames, stack) {\n const longTrace = [stack ? stack.trim() : ''];\n if (frames) {\n let timestamp = new Date().getTime();\n for (let i = 0; i < frames.length; i++) {\n const traceFrames = frames[i];\n const lastTime = traceFrames.timestamp;\n let separator = `____________________Elapsed ${timestamp - lastTime.getTime()} ms; At: ${lastTime}`;\n separator = separator.replace(/[^\\w\\d]/g, '_');\n longTrace.push(sepTemplate.replace(SEP_TAG, separator));\n addErrorStack(longTrace, traceFrames.error);\n timestamp = lastTime.getTime();\n }\n }\n return longTrace.join(NEWLINE);\n}\n// if Error.stackTraceLimit is 0, means stack trace\n// is disabled, so we don't need to generate long stack trace\n// this will improve performance in some test(some test will\n// set stackTraceLimit to 0, https://github.com/angular/zone.js/issues/698\nfunction stackTracesEnabled() {\n // Cast through any since this property only exists on Error in the nodejs\n // typings.\n return Error.stackTraceLimit > 0;\n}\nZone['longStackTraceZoneSpec'] = {\n name: 'long-stack-trace',\n longStackTraceLimit: 10, // Max number of task to keep the stack trace for.\n // add a getLongStackTrace method in spec to\n // handle handled reject promise error.\n getLongStackTrace: function (error) {\n if (!error) {\n return undefined;\n }\n const trace = error[Zone.__symbol__('currentTaskTrace')];\n if (!trace) {\n return error.stack;\n }\n return renderLongStackTrace(trace, error.stack);\n },\n onScheduleTask: function (parentZoneDelegate, currentZone, targetZone, task) {\n if (stackTracesEnabled()) {\n const currentTask = Zone.currentTask;\n let trace = currentTask && currentTask.data && currentTask.data[creationTrace] || [];\n trace = [new LongStackTrace()].concat(trace);\n if (trace.length > this.longStackTraceLimit) {\n trace.length = this.longStackTraceLimit;\n }\n if (!task.data)\n task.data = {};\n if (task.type === 'eventTask') {\n // Fix issue https://github.com/angular/zone.js/issues/1195,\n // For event task of browser, by default, all task will share a\n // singleton instance of data object, we should create a new one here\n // The cast to `any` is required to workaround a closure bug which wrongly applies\n // URL sanitization rules to .data access.\n task.data = { ...task.data };\n }\n task.data[creationTrace] = trace;\n }\n return parentZoneDelegate.scheduleTask(targetZone, task);\n },\n onHandleError: function (parentZoneDelegate, currentZone, targetZone, error) {\n if (stackTracesEnabled()) {\n const parentTask = Zone.currentTask || error.task;\n if (error instanceof Error && parentTask) {\n const longStack = renderLongStackTrace(parentTask.data && parentTask.data[creationTrace], error.stack);\n try {\n error.stack = error.longStack = longStack;\n }\n catch (err) {\n }\n }\n }\n return parentZoneDelegate.handleError(targetZone, error);\n }\n};\nfunction captureStackTraces(stackTraces, count) {\n if (count > 0) {\n stackTraces.push(getFrames((new LongStackTrace()).error));\n captureStackTraces(stackTraces, count - 1);\n }\n}\nfunction computeIgnoreFrames() {\n if (!stackTracesEnabled()) {\n return;\n }\n const frames = [];\n captureStackTraces(frames, 2);\n const frames1 = frames[0];\n const frames2 = frames[1];\n for (let i = 0; i < frames1.length; i++) {\n const frame1 = frames1[i];\n if (frame1.indexOf(ERROR_TAG) == -1) {\n let match = frame1.match(/^\\s*at\\s+/);\n if (match) {\n sepTemplate = match[0] + SEP_TAG + ' (http://localhost)';\n break;\n }\n }\n }\n for (let i = 0; i < frames1.length; i++) {\n const frame1 = frames1[i];\n const frame2 = frames2[i];\n if (frame1 === frame2) {\n IGNORE_FRAMES[frame1] = true;\n }\n else {\n break;\n }\n }\n}\ncomputeIgnoreFrames();\n\nclass ProxyZoneSpec {\n static get() {\n return Zone.current.get('ProxyZoneSpec');\n }\n static isLoaded() {\n return ProxyZoneSpec.get() instanceof ProxyZoneSpec;\n }\n static assertPresent() {\n if (!ProxyZoneSpec.isLoaded()) {\n throw new Error(`Expected to be running in 'ProxyZone', but it was not found.`);\n }\n return ProxyZoneSpec.get();\n }\n constructor(defaultSpecDelegate = null) {\n this.defaultSpecDelegate = defaultSpecDelegate;\n this.name = 'ProxyZone';\n this._delegateSpec = null;\n this.properties = { 'ProxyZoneSpec': this };\n this.propertyKeys = null;\n this.lastTaskState = null;\n this.isNeedToTriggerHasTask = false;\n this.tasks = [];\n this.setDelegate(defaultSpecDelegate);\n }\n setDelegate(delegateSpec) {\n const isNewDelegate = this._delegateSpec !== delegateSpec;\n this._delegateSpec = delegateSpec;\n this.propertyKeys && this.propertyKeys.forEach((key) => delete this.properties[key]);\n this.propertyKeys = null;\n if (delegateSpec && delegateSpec.properties) {\n this.propertyKeys = Object.keys(delegateSpec.properties);\n this.propertyKeys.forEach((k) => this.properties[k] = delegateSpec.properties[k]);\n }\n // if a new delegateSpec was set, check if we need to trigger hasTask\n if (isNewDelegate && this.lastTaskState &&\n (this.lastTaskState.macroTask || this.lastTaskState.microTask)) {\n this.isNeedToTriggerHasTask = true;\n }\n }\n getDelegate() {\n return this._delegateSpec;\n }\n resetDelegate() {\n this.getDelegate();\n this.setDelegate(this.defaultSpecDelegate);\n }\n tryTriggerHasTask(parentZoneDelegate, currentZone, targetZone) {\n if (this.isNeedToTriggerHasTask && this.lastTaskState) {\n // last delegateSpec has microTask or macroTask\n // should call onHasTask in current delegateSpec\n this.isNeedToTriggerHasTask = false;\n this.onHasTask(parentZoneDelegate, currentZone, targetZone, this.lastTaskState);\n }\n }\n removeFromTasks(task) {\n if (!this.tasks) {\n return;\n }\n for (let i = 0; i < this.tasks.length; i++) {\n if (this.tasks[i] === task) {\n this.tasks.splice(i, 1);\n return;\n }\n }\n }\n getAndClearPendingTasksInfo() {\n if (this.tasks.length === 0) {\n return '';\n }\n const taskInfo = this.tasks.map((task) => {\n const dataInfo = task.data &&\n Object.keys(task.data)\n .map((key) => {\n return key + ':' + task.data[key];\n })\n .join(',');\n return `type: ${task.type}, source: ${task.source}, args: {${dataInfo}}`;\n });\n const pendingTasksInfo = '--Pending async tasks are: [' + taskInfo + ']';\n // clear tasks\n this.tasks = [];\n return pendingTasksInfo;\n }\n onFork(parentZoneDelegate, currentZone, targetZone, zoneSpec) {\n if (this._delegateSpec && this._delegateSpec.onFork) {\n return this._delegateSpec.onFork(parentZoneDelegate, currentZone, targetZone, zoneSpec);\n }\n else {\n return parentZoneDelegate.fork(targetZone, zoneSpec);\n }\n }\n onIntercept(parentZoneDelegate, currentZone, targetZone, delegate, source) {\n if (this._delegateSpec && this._delegateSpec.onIntercept) {\n return this._delegateSpec.onIntercept(parentZoneDelegate, currentZone, targetZone, delegate, source);\n }\n else {\n return parentZoneDelegate.intercept(targetZone, delegate, source);\n }\n }\n onInvoke(parentZoneDelegate, currentZone, targetZone, delegate, applyThis, applyArgs, source) {\n this.tryTriggerHasTask(parentZoneDelegate, currentZone, targetZone);\n if (this._delegateSpec && this._delegateSpec.onInvoke) {\n return this._delegateSpec.onInvoke(parentZoneDelegate, currentZone, targetZone, delegate, applyThis, applyArgs, source);\n }\n else {\n return parentZoneDelegate.invoke(targetZone, delegate, applyThis, applyArgs, source);\n }\n }\n onHandleError(parentZoneDelegate, currentZone, targetZone, error) {\n if (this._delegateSpec && this._delegateSpec.onHandleError) {\n return this._delegateSpec.onHandleError(parentZoneDelegate, currentZone, targetZone, error);\n }\n else {\n return parentZoneDelegate.handleError(targetZone, error);\n }\n }\n onScheduleTask(parentZoneDelegate, currentZone, targetZone, task) {\n if (task.type !== 'eventTask') {\n this.tasks.push(task);\n }\n if (this._delegateSpec && this._delegateSpec.onScheduleTask) {\n return this._delegateSpec.onScheduleTask(parentZoneDelegate, currentZone, targetZone, task);\n }\n else {\n return parentZoneDelegate.scheduleTask(targetZone, task);\n }\n }\n onInvokeTask(parentZoneDelegate, currentZone, targetZone, task, applyThis, applyArgs) {\n if (task.type !== 'eventTask') {\n this.removeFromTasks(task);\n }\n this.tryTriggerHasTask(parentZoneDelegate, currentZone, targetZone);\n if (this._delegateSpec && this._delegateSpec.onInvokeTask) {\n return this._delegateSpec.onInvokeTask(parentZoneDelegate, currentZone, targetZone, task, applyThis, applyArgs);\n }\n else {\n return parentZoneDelegate.invokeTask(targetZone, task, applyThis, applyArgs);\n }\n }\n onCancelTask(parentZoneDelegate, currentZone, targetZone, task) {\n if (task.type !== 'eventTask') {\n this.removeFromTasks(task);\n }\n this.tryTriggerHasTask(parentZoneDelegate, currentZone, targetZone);\n if (this._delegateSpec && this._delegateSpec.onCancelTask) {\n return this._delegateSpec.onCancelTask(parentZoneDelegate, currentZone, targetZone, task);\n }\n else {\n return parentZoneDelegate.cancelTask(targetZone, task);\n }\n }\n onHasTask(delegate, current, target, hasTaskState) {\n this.lastTaskState = hasTaskState;\n if (this._delegateSpec && this._delegateSpec.onHasTask) {\n this._delegateSpec.onHasTask(delegate, current, target, hasTaskState);\n }\n else {\n delegate.hasTask(target, hasTaskState);\n }\n }\n}\n// Export the class so that new instances can be created with proper\n// constructor params.\nZone['ProxyZoneSpec'] = ProxyZoneSpec;\n\nclass SyncTestZoneSpec {\n constructor(namePrefix) {\n this.runZone = Zone.current;\n this.name = 'syncTestZone for ' + namePrefix;\n }\n onScheduleTask(delegate, current, target, task) {\n switch (task.type) {\n case 'microTask':\n case 'macroTask':\n throw new Error(`Cannot call ${task.source} from within a sync test (${this.name}).`);\n case 'eventTask':\n task = delegate.scheduleTask(target, task);\n break;\n }\n return task;\n }\n}\n// Export the class so that new instances can be created with proper\n// constructor params.\nZone['SyncTestZoneSpec'] = SyncTestZoneSpec;\n\n/// \nZone.__load_patch('jasmine', (global, Zone, api) => {\n const __extends = function (d, b) {\n for (const p in b)\n if (b.hasOwnProperty(p))\n d[p] = b[p];\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : ((__.prototype = b.prototype), new __());\n };\n // Patch jasmine's describe/it/beforeEach/afterEach functions so test code always runs\n // in a testZone (ProxyZone). (See: angular/zone.js#91 & angular/angular#10503)\n if (!Zone)\n throw new Error('Missing: zone.js');\n if (typeof jest !== 'undefined') {\n // return if jasmine is a light implementation inside jest\n // in this case, we are running inside jest not jasmine\n return;\n }\n if (typeof jasmine == 'undefined' || jasmine['__zone_patch__']) {\n return;\n }\n jasmine['__zone_patch__'] = true;\n const SyncTestZoneSpec = Zone['SyncTestZoneSpec'];\n const ProxyZoneSpec = Zone['ProxyZoneSpec'];\n if (!SyncTestZoneSpec)\n throw new Error('Missing: SyncTestZoneSpec');\n if (!ProxyZoneSpec)\n throw new Error('Missing: ProxyZoneSpec');\n const ambientZone = Zone.current;\n const symbol = Zone.__symbol__;\n // whether patch jasmine clock when in fakeAsync\n const disablePatchingJasmineClock = global[symbol('fakeAsyncDisablePatchingClock')] === true;\n // the original variable name fakeAsyncPatchLock is not accurate, so the name will be\n // fakeAsyncAutoFakeAsyncWhenClockPatched and if this enablePatchingJasmineClock is false, we also\n // automatically disable the auto jump into fakeAsync feature\n const enableAutoFakeAsyncWhenClockPatched = !disablePatchingJasmineClock &&\n ((global[symbol('fakeAsyncPatchLock')] === true) ||\n (global[symbol('fakeAsyncAutoFakeAsyncWhenClockPatched')] === true));\n const ignoreUnhandledRejection = global[symbol('ignoreUnhandledRejection')] === true;\n if (!ignoreUnhandledRejection) {\n const globalErrors = jasmine.GlobalErrors;\n if (globalErrors && !jasmine[symbol('GlobalErrors')]) {\n jasmine[symbol('GlobalErrors')] = globalErrors;\n jasmine.GlobalErrors = function () {\n const instance = new globalErrors();\n const originalInstall = instance.install;\n if (originalInstall && !instance[symbol('install')]) {\n instance[symbol('install')] = originalInstall;\n instance.install = function () {\n const isNode = typeof process !== 'undefined' && !!process.on;\n // Note: Jasmine checks internally if `process` and `process.on` is defined. Otherwise,\n // it installs the browser rejection handler through the `global.addEventListener`.\n // This code may be run in the browser environment where `process` is not defined, and\n // this will lead to a runtime exception since Webpack 5 removed automatic Node.js\n // polyfills. Note, that events are named differently, it's `unhandledRejection` in\n // Node.js and `unhandledrejection` in the browser.\n const originalHandlers = isNode ? process.listeners('unhandledRejection') :\n global.eventListeners('unhandledrejection');\n const result = originalInstall.apply(this, arguments);\n isNode ? process.removeAllListeners('unhandledRejection') :\n global.removeAllListeners('unhandledrejection');\n if (originalHandlers) {\n originalHandlers.forEach(handler => {\n if (isNode) {\n process.on('unhandledRejection', handler);\n }\n else {\n global.addEventListener('unhandledrejection', handler);\n }\n });\n }\n return result;\n };\n }\n return instance;\n };\n }\n }\n // Monkey patch all of the jasmine DSL so that each function runs in appropriate zone.\n const jasmineEnv = jasmine.getEnv();\n ['describe', 'xdescribe', 'fdescribe'].forEach(methodName => {\n let originalJasmineFn = jasmineEnv[methodName];\n jasmineEnv[methodName] = function (description, specDefinitions) {\n return originalJasmineFn.call(this, description, wrapDescribeInZone(description, specDefinitions));\n };\n });\n ['it', 'xit', 'fit'].forEach(methodName => {\n let originalJasmineFn = jasmineEnv[methodName];\n jasmineEnv[symbol(methodName)] = originalJasmineFn;\n jasmineEnv[methodName] = function (description, specDefinitions, timeout) {\n arguments[1] = wrapTestInZone(specDefinitions);\n return originalJasmineFn.apply(this, arguments);\n };\n });\n ['beforeEach', 'afterEach', 'beforeAll', 'afterAll'].forEach(methodName => {\n let originalJasmineFn = jasmineEnv[methodName];\n jasmineEnv[symbol(methodName)] = originalJasmineFn;\n jasmineEnv[methodName] = function (specDefinitions, timeout) {\n arguments[0] = wrapTestInZone(specDefinitions);\n return originalJasmineFn.apply(this, arguments);\n };\n });\n if (!disablePatchingJasmineClock) {\n // need to patch jasmine.clock().mockDate and jasmine.clock().tick() so\n // they can work properly in FakeAsyncTest\n const originalClockFn = (jasmine[symbol('clock')] = jasmine['clock']);\n jasmine['clock'] = function () {\n const clock = originalClockFn.apply(this, arguments);\n if (!clock[symbol('patched')]) {\n clock[symbol('patched')] = symbol('patched');\n const originalTick = (clock[symbol('tick')] = clock.tick);\n clock.tick = function () {\n const fakeAsyncZoneSpec = Zone.current.get('FakeAsyncTestZoneSpec');\n if (fakeAsyncZoneSpec) {\n return fakeAsyncZoneSpec.tick.apply(fakeAsyncZoneSpec, arguments);\n }\n return originalTick.apply(this, arguments);\n };\n const originalMockDate = (clock[symbol('mockDate')] = clock.mockDate);\n clock.mockDate = function () {\n const fakeAsyncZoneSpec = Zone.current.get('FakeAsyncTestZoneSpec');\n if (fakeAsyncZoneSpec) {\n const dateTime = arguments.length > 0 ? arguments[0] : new Date();\n return fakeAsyncZoneSpec.setFakeBaseSystemTime.apply(fakeAsyncZoneSpec, dateTime && typeof dateTime.getTime === 'function' ? [dateTime.getTime()] :\n arguments);\n }\n return originalMockDate.apply(this, arguments);\n };\n // for auto go into fakeAsync feature, we need the flag to enable it\n if (enableAutoFakeAsyncWhenClockPatched) {\n ['install', 'uninstall'].forEach(methodName => {\n const originalClockFn = (clock[symbol(methodName)] = clock[methodName]);\n clock[methodName] = function () {\n const FakeAsyncTestZoneSpec = Zone['FakeAsyncTestZoneSpec'];\n if (FakeAsyncTestZoneSpec) {\n jasmine[symbol('clockInstalled')] = 'install' === methodName;\n return;\n }\n return originalClockFn.apply(this, arguments);\n };\n });\n }\n }\n return clock;\n };\n }\n // monkey patch createSpyObj to make properties enumerable to true\n if (!jasmine[Zone.__symbol__('createSpyObj')]) {\n const originalCreateSpyObj = jasmine.createSpyObj;\n jasmine[Zone.__symbol__('createSpyObj')] = originalCreateSpyObj;\n jasmine.createSpyObj = function () {\n const args = Array.prototype.slice.call(arguments);\n const propertyNames = args.length >= 3 ? args[2] : null;\n let spyObj;\n if (propertyNames) {\n const defineProperty = Object.defineProperty;\n Object.defineProperty = function (obj, p, attributes) {\n return defineProperty.call(this, obj, p, { ...attributes, configurable: true, enumerable: true });\n };\n try {\n spyObj = originalCreateSpyObj.apply(this, args);\n }\n finally {\n Object.defineProperty = defineProperty;\n }\n }\n else {\n spyObj = originalCreateSpyObj.apply(this, args);\n }\n return spyObj;\n };\n }\n /**\n * Gets a function wrapping the body of a Jasmine `describe` block to execute in a\n * synchronous-only zone.\n */\n function wrapDescribeInZone(description, describeBody) {\n return function () {\n // Create a synchronous-only zone in which to run `describe` blocks in order to raise an\n // error if any asynchronous operations are attempted inside of a `describe`.\n const syncZone = ambientZone.fork(new SyncTestZoneSpec(`jasmine.describe#${description}`));\n return syncZone.run(describeBody, this, arguments);\n };\n }\n function runInTestZone(testBody, applyThis, queueRunner, done) {\n const isClockInstalled = !!jasmine[symbol('clockInstalled')];\n queueRunner.testProxyZoneSpec;\n const testProxyZone = queueRunner.testProxyZone;\n if (isClockInstalled && enableAutoFakeAsyncWhenClockPatched) {\n // auto run a fakeAsync\n const fakeAsyncModule = Zone[Zone.__symbol__('fakeAsyncTest')];\n if (fakeAsyncModule && typeof fakeAsyncModule.fakeAsync === 'function') {\n testBody = fakeAsyncModule.fakeAsync(testBody);\n }\n }\n if (done) {\n return testProxyZone.run(testBody, applyThis, [done]);\n }\n else {\n return testProxyZone.run(testBody, applyThis);\n }\n }\n /**\n * Gets a function wrapping the body of a Jasmine `it/beforeEach/afterEach` block to\n * execute in a ProxyZone zone.\n * This will run in `testProxyZone`. The `testProxyZone` will be reset by the `ZoneQueueRunner`\n */\n function wrapTestInZone(testBody) {\n // The `done` callback is only passed through if the function expects at least one argument.\n // Note we have to make a function with correct number of arguments, otherwise jasmine will\n // think that all functions are sync or async.\n return (testBody && (testBody.length ? function (done) {\n return runInTestZone(testBody, this, this.queueRunner, done);\n } : function () {\n return runInTestZone(testBody, this, this.queueRunner);\n }));\n }\n const QueueRunner = jasmine.QueueRunner;\n jasmine.QueueRunner = (function (_super) {\n __extends(ZoneQueueRunner, _super);\n function ZoneQueueRunner(attrs) {\n if (attrs.onComplete) {\n attrs.onComplete = (fn => () => {\n // All functions are done, clear the test zone.\n this.testProxyZone = null;\n this.testProxyZoneSpec = null;\n ambientZone.scheduleMicroTask('jasmine.onComplete', fn);\n })(attrs.onComplete);\n }\n const nativeSetTimeout = global[Zone.__symbol__('setTimeout')];\n const nativeClearTimeout = global[Zone.__symbol__('clearTimeout')];\n if (nativeSetTimeout) {\n // should run setTimeout inside jasmine outside of zone\n attrs.timeout = {\n setTimeout: nativeSetTimeout ? nativeSetTimeout : global.setTimeout,\n clearTimeout: nativeClearTimeout ? nativeClearTimeout : global.clearTimeout\n };\n }\n // create a userContext to hold the queueRunner itself\n // so we can access the testProxy in it/xit/beforeEach ...\n if (jasmine.UserContext) {\n if (!attrs.userContext) {\n attrs.userContext = new jasmine.UserContext();\n }\n attrs.userContext.queueRunner = this;\n }\n else {\n if (!attrs.userContext) {\n attrs.userContext = {};\n }\n attrs.userContext.queueRunner = this;\n }\n // patch attrs.onException\n const onException = attrs.onException;\n attrs.onException = function (error) {\n if (error &&\n error.message ===\n 'Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.') {\n // jasmine timeout, we can make the error message more\n // reasonable to tell what tasks are pending\n const proxyZoneSpec = this && this.testProxyZoneSpec;\n if (proxyZoneSpec) {\n const pendingTasksInfo = proxyZoneSpec.getAndClearPendingTasksInfo();\n try {\n // try catch here in case error.message is not writable\n error.message += pendingTasksInfo;\n }\n catch (err) {\n }\n }\n }\n if (onException) {\n onException.call(this, error);\n }\n };\n _super.call(this, attrs);\n }\n ZoneQueueRunner.prototype.execute = function () {\n let zone = Zone.current;\n let isChildOfAmbientZone = false;\n while (zone) {\n if (zone === ambientZone) {\n isChildOfAmbientZone = true;\n break;\n }\n zone = zone.parent;\n }\n if (!isChildOfAmbientZone)\n throw new Error('Unexpected Zone: ' + Zone.current.name);\n // This is the zone which will be used for running individual tests.\n // It will be a proxy zone, so that the tests function can retroactively install\n // different zones.\n // Example:\n // - In beforeEach() do childZone = Zone.current.fork(...);\n // - In it() try to do fakeAsync(). The issue is that because the beforeEach forked the\n // zone outside of fakeAsync it will be able to escape the fakeAsync rules.\n // - Because ProxyZone is parent fo `childZone` fakeAsync can retroactively add\n // fakeAsync behavior to the childZone.\n this.testProxyZoneSpec = new ProxyZoneSpec();\n this.testProxyZone = ambientZone.fork(this.testProxyZoneSpec);\n if (!Zone.currentTask) {\n // if we are not running in a task then if someone would register a\n // element.addEventListener and then calling element.click() the\n // addEventListener callback would think that it is the top most task and would\n // drain the microtask queue on element.click() which would be incorrect.\n // For this reason we always force a task when running jasmine tests.\n Zone.current.scheduleMicroTask('jasmine.execute().forceTask', () => QueueRunner.prototype.execute.call(this));\n }\n else {\n _super.prototype.execute.call(this);\n }\n };\n return ZoneQueueRunner;\n })(QueueRunner);\n});\n\nZone.__load_patch('jest', (context, Zone, api) => {\n if (typeof jest === 'undefined' || jest['__zone_patch__']) {\n return;\n }\n // From jest 29 and jest-preset-angular v13, the module transform logic\n // changed, and now jest-preset-angular use the use the tsconfig target\n // other than the hardcoded one, https://github.com/thymikee/jest-preset-angular/issues/2010\n // But jest-angular-preset doesn't introduce the @babel/plugin-transform-async-to-generator\n // which is needed by angular since `async/await` still need to be transformed\n // to promise for ES2017+ target.\n // So for now, we disable to output the uncaught error console log for a temp solution,\n // until jest-preset-angular find a proper solution.\n Zone[api.symbol('ignoreConsoleErrorUncaughtError')] = true;\n jest['__zone_patch__'] = true;\n const ProxyZoneSpec = Zone['ProxyZoneSpec'];\n const SyncTestZoneSpec = Zone['SyncTestZoneSpec'];\n if (!ProxyZoneSpec) {\n throw new Error('Missing ProxyZoneSpec');\n }\n const rootZone = Zone.current;\n const syncZone = rootZone.fork(new SyncTestZoneSpec('jest.describe'));\n const proxyZoneSpec = new ProxyZoneSpec();\n const proxyZone = rootZone.fork(proxyZoneSpec);\n function wrapDescribeFactoryInZone(originalJestFn) {\n return function (...tableArgs) {\n const originalDescribeFn = originalJestFn.apply(this, tableArgs);\n return function (...args) {\n args[1] = wrapDescribeInZone(args[1]);\n return originalDescribeFn.apply(this, args);\n };\n };\n }\n function wrapTestFactoryInZone(originalJestFn) {\n return function (...tableArgs) {\n return function (...args) {\n args[1] = wrapTestInZone(args[1]);\n return originalJestFn.apply(this, tableArgs).apply(this, args);\n };\n };\n }\n /**\n * Gets a function wrapping the body of a jest `describe` block to execute in a\n * synchronous-only zone.\n */\n function wrapDescribeInZone(describeBody) {\n return function (...args) {\n return syncZone.run(describeBody, this, args);\n };\n }\n /**\n * Gets a function wrapping the body of a jest `it/beforeEach/afterEach` block to\n * execute in a ProxyZone zone.\n * This will run in the `proxyZone`.\n */\n function wrapTestInZone(testBody, isTestFunc = false) {\n if (typeof testBody !== 'function') {\n return testBody;\n }\n const wrappedFunc = function () {\n if (Zone[api.symbol('useFakeTimersCalled')] === true && testBody &&\n !testBody.isFakeAsync) {\n // jest.useFakeTimers is called, run into fakeAsyncTest automatically.\n const fakeAsyncModule = Zone[Zone.__symbol__('fakeAsyncTest')];\n if (fakeAsyncModule && typeof fakeAsyncModule.fakeAsync === 'function') {\n testBody = fakeAsyncModule.fakeAsync(testBody);\n }\n }\n proxyZoneSpec.isTestFunc = isTestFunc;\n return proxyZone.run(testBody, null, arguments);\n };\n // Update the length of wrappedFunc to be the same as the length of the testBody\n // So jest core can handle whether the test function has `done()` or not correctly\n Object.defineProperty(wrappedFunc, 'length', { configurable: true, writable: true, enumerable: false });\n wrappedFunc.length = testBody.length;\n return wrappedFunc;\n }\n ['describe', 'xdescribe', 'fdescribe'].forEach(methodName => {\n let originalJestFn = context[methodName];\n if (context[Zone.__symbol__(methodName)]) {\n return;\n }\n context[Zone.__symbol__(methodName)] = originalJestFn;\n context[methodName] = function (...args) {\n args[1] = wrapDescribeInZone(args[1]);\n return originalJestFn.apply(this, args);\n };\n context[methodName].each = wrapDescribeFactoryInZone(originalJestFn.each);\n });\n context.describe.only = context.fdescribe;\n context.describe.skip = context.xdescribe;\n ['it', 'xit', 'fit', 'test', 'xtest'].forEach(methodName => {\n let originalJestFn = context[methodName];\n if (context[Zone.__symbol__(methodName)]) {\n return;\n }\n context[Zone.__symbol__(methodName)] = originalJestFn;\n context[methodName] = function (...args) {\n args[1] = wrapTestInZone(args[1], true);\n return originalJestFn.apply(this, args);\n };\n context[methodName].each = wrapTestFactoryInZone(originalJestFn.each);\n context[methodName].todo = originalJestFn.todo;\n });\n context.it.only = context.fit;\n context.it.skip = context.xit;\n context.test.only = context.fit;\n context.test.skip = context.xit;\n ['beforeEach', 'afterEach', 'beforeAll', 'afterAll'].forEach(methodName => {\n let originalJestFn = context[methodName];\n if (context[Zone.__symbol__(methodName)]) {\n return;\n }\n context[Zone.__symbol__(methodName)] = originalJestFn;\n context[methodName] = function (...args) {\n args[0] = wrapTestInZone(args[0]);\n return originalJestFn.apply(this, args);\n };\n });\n Zone.patchJestObject = function patchJestObject(Timer, isModern = false) {\n // check whether currently the test is inside fakeAsync()\n function isPatchingFakeTimer() {\n const fakeAsyncZoneSpec = Zone.current.get('FakeAsyncTestZoneSpec');\n return !!fakeAsyncZoneSpec;\n }\n // check whether the current function is inside `test/it` or other methods\n // such as `describe/beforeEach`\n function isInTestFunc() {\n const proxyZoneSpec = Zone.current.get('ProxyZoneSpec');\n return proxyZoneSpec && proxyZoneSpec.isTestFunc;\n }\n if (Timer[api.symbol('fakeTimers')]) {\n return;\n }\n Timer[api.symbol('fakeTimers')] = true;\n // patch jest fakeTimer internal method to make sure no console.warn print out\n api.patchMethod(Timer, '_checkFakeTimers', delegate => {\n return function (self, args) {\n if (isPatchingFakeTimer()) {\n return true;\n }\n else {\n return delegate.apply(self, args);\n }\n };\n });\n // patch useFakeTimers(), set useFakeTimersCalled flag, and make test auto run into fakeAsync\n api.patchMethod(Timer, 'useFakeTimers', delegate => {\n return function (self, args) {\n Zone[api.symbol('useFakeTimersCalled')] = true;\n if (isModern || isInTestFunc()) {\n return delegate.apply(self, args);\n }\n return self;\n };\n });\n // patch useRealTimers(), unset useFakeTimers flag\n api.patchMethod(Timer, 'useRealTimers', delegate => {\n return function (self, args) {\n Zone[api.symbol('useFakeTimersCalled')] = false;\n if (isModern || isInTestFunc()) {\n return delegate.apply(self, args);\n }\n return self;\n };\n });\n // patch setSystemTime(), call setCurrentRealTime() in the fakeAsyncTest\n api.patchMethod(Timer, 'setSystemTime', delegate => {\n return function (self, args) {\n const fakeAsyncZoneSpec = Zone.current.get('FakeAsyncTestZoneSpec');\n if (fakeAsyncZoneSpec && isPatchingFakeTimer()) {\n fakeAsyncZoneSpec.setFakeBaseSystemTime(args[0]);\n }\n else {\n return delegate.apply(self, args);\n }\n };\n });\n // patch getSystemTime(), call getCurrentRealTime() in the fakeAsyncTest\n api.patchMethod(Timer, 'getRealSystemTime', delegate => {\n return function (self, args) {\n const fakeAsyncZoneSpec = Zone.current.get('FakeAsyncTestZoneSpec');\n if (fakeAsyncZoneSpec && isPatchingFakeTimer()) {\n return fakeAsyncZoneSpec.getRealSystemTime();\n }\n else {\n return delegate.apply(self, args);\n }\n };\n });\n // patch runAllTicks(), run all microTasks inside fakeAsync\n api.patchMethod(Timer, 'runAllTicks', delegate => {\n return function (self, args) {\n const fakeAsyncZoneSpec = Zone.current.get('FakeAsyncTestZoneSpec');\n if (fakeAsyncZoneSpec) {\n fakeAsyncZoneSpec.flushMicrotasks();\n }\n else {\n return delegate.apply(self, args);\n }\n };\n });\n // patch runAllTimers(), run all macroTasks inside fakeAsync\n api.patchMethod(Timer, 'runAllTimers', delegate => {\n return function (self, args) {\n const fakeAsyncZoneSpec = Zone.current.get('FakeAsyncTestZoneSpec');\n if (fakeAsyncZoneSpec) {\n fakeAsyncZoneSpec.flush(100, true);\n }\n else {\n return delegate.apply(self, args);\n }\n };\n });\n // patch advanceTimersByTime(), call tick() in the fakeAsyncTest\n api.patchMethod(Timer, 'advanceTimersByTime', delegate => {\n return function (self, args) {\n const fakeAsyncZoneSpec = Zone.current.get('FakeAsyncTestZoneSpec');\n if (fakeAsyncZoneSpec) {\n fakeAsyncZoneSpec.tick(args[0]);\n }\n else {\n return delegate.apply(self, args);\n }\n };\n });\n // patch runOnlyPendingTimers(), call flushOnlyPendingTimers() in the fakeAsyncTest\n api.patchMethod(Timer, 'runOnlyPendingTimers', delegate => {\n return function (self, args) {\n const fakeAsyncZoneSpec = Zone.current.get('FakeAsyncTestZoneSpec');\n if (fakeAsyncZoneSpec) {\n fakeAsyncZoneSpec.flushOnlyPendingTimers();\n }\n else {\n return delegate.apply(self, args);\n }\n };\n });\n // patch advanceTimersToNextTimer(), call tickToNext() in the fakeAsyncTest\n api.patchMethod(Timer, 'advanceTimersToNextTimer', delegate => {\n return function (self, args) {\n const fakeAsyncZoneSpec = Zone.current.get('FakeAsyncTestZoneSpec');\n if (fakeAsyncZoneSpec) {\n fakeAsyncZoneSpec.tickToNext(args[0]);\n }\n else {\n return delegate.apply(self, args);\n }\n };\n });\n // patch clearAllTimers(), call removeAllTimers() in the fakeAsyncTest\n api.patchMethod(Timer, 'clearAllTimers', delegate => {\n return function (self, args) {\n const fakeAsyncZoneSpec = Zone.current.get('FakeAsyncTestZoneSpec');\n if (fakeAsyncZoneSpec) {\n fakeAsyncZoneSpec.removeAllTimers();\n }\n else {\n return delegate.apply(self, args);\n }\n };\n });\n // patch getTimerCount(), call getTimerCount() in the fakeAsyncTest\n api.patchMethod(Timer, 'getTimerCount', delegate => {\n return function (self, args) {\n const fakeAsyncZoneSpec = Zone.current.get('FakeAsyncTestZoneSpec');\n if (fakeAsyncZoneSpec) {\n return fakeAsyncZoneSpec.getTimerCount();\n }\n else {\n return delegate.apply(self, args);\n }\n };\n });\n };\n});\n\nZone.__load_patch('mocha', (global, Zone) => {\n const Mocha = global.Mocha;\n if (typeof Mocha === 'undefined') {\n // return if Mocha is not available, because now zone-testing\n // will load mocha patch with jasmine/jest patch\n return;\n }\n if (typeof Zone === 'undefined') {\n throw new Error('Missing Zone.js');\n }\n const ProxyZoneSpec = Zone['ProxyZoneSpec'];\n const SyncTestZoneSpec = Zone['SyncTestZoneSpec'];\n if (!ProxyZoneSpec) {\n throw new Error('Missing ProxyZoneSpec');\n }\n if (Mocha['__zone_patch__']) {\n throw new Error('\"Mocha\" has already been patched with \"Zone\".');\n }\n Mocha['__zone_patch__'] = true;\n const rootZone = Zone.current;\n const syncZone = rootZone.fork(new SyncTestZoneSpec('Mocha.describe'));\n let testZone = null;\n const suiteZone = rootZone.fork(new ProxyZoneSpec());\n const mochaOriginal = {\n after: global.after,\n afterEach: global.afterEach,\n before: global.before,\n beforeEach: global.beforeEach,\n describe: global.describe,\n it: global.it\n };\n function modifyArguments(args, syncTest, asyncTest) {\n for (let i = 0; i < args.length; i++) {\n let arg = args[i];\n if (typeof arg === 'function') {\n // The `done` callback is only passed through if the function expects at\n // least one argument.\n // Note we have to make a function with correct number of arguments,\n // otherwise mocha will\n // think that all functions are sync or async.\n args[i] = (arg.length === 0) ? syncTest(arg) : asyncTest(arg);\n // Mocha uses toString to view the test body in the result list, make sure we return the\n // correct function body\n args[i].toString = function () {\n return arg.toString();\n };\n }\n }\n return args;\n }\n function wrapDescribeInZone(args) {\n const syncTest = function (fn) {\n return function () {\n return syncZone.run(fn, this, arguments);\n };\n };\n return modifyArguments(args, syncTest);\n }\n function wrapTestInZone(args) {\n const asyncTest = function (fn) {\n return function (done) {\n return testZone.run(fn, this, [done]);\n };\n };\n const syncTest = function (fn) {\n return function () {\n return testZone.run(fn, this);\n };\n };\n return modifyArguments(args, syncTest, asyncTest);\n }\n function wrapSuiteInZone(args) {\n const asyncTest = function (fn) {\n return function (done) {\n return suiteZone.run(fn, this, [done]);\n };\n };\n const syncTest = function (fn) {\n return function () {\n return suiteZone.run(fn, this);\n };\n };\n return modifyArguments(args, syncTest, asyncTest);\n }\n global.describe = global.suite = function () {\n return mochaOriginal.describe.apply(this, wrapDescribeInZone(arguments));\n };\n global.xdescribe = global.suite.skip = global.describe.skip = function () {\n return mochaOriginal.describe.skip.apply(this, wrapDescribeInZone(arguments));\n };\n global.describe.only = global.suite.only = function () {\n return mochaOriginal.describe.only.apply(this, wrapDescribeInZone(arguments));\n };\n global.it = global.specify = global.test = function () {\n return mochaOriginal.it.apply(this, wrapTestInZone(arguments));\n };\n global.xit = global.xspecify = global.it.skip = function () {\n return mochaOriginal.it.skip.apply(this, wrapTestInZone(arguments));\n };\n global.it.only = global.test.only = function () {\n return mochaOriginal.it.only.apply(this, wrapTestInZone(arguments));\n };\n global.after = global.suiteTeardown = function () {\n return mochaOriginal.after.apply(this, wrapSuiteInZone(arguments));\n };\n global.afterEach = global.teardown = function () {\n return mochaOriginal.afterEach.apply(this, wrapTestInZone(arguments));\n };\n global.before = global.suiteSetup = function () {\n return mochaOriginal.before.apply(this, wrapSuiteInZone(arguments));\n };\n global.beforeEach = global.setup = function () {\n return mochaOriginal.beforeEach.apply(this, wrapTestInZone(arguments));\n };\n ((originalRunTest, originalRun) => {\n Mocha.Runner.prototype.runTest = function (fn) {\n Zone.current.scheduleMicroTask('mocha.forceTask', () => {\n originalRunTest.call(this, fn);\n });\n };\n Mocha.Runner.prototype.run = function (fn) {\n this.on('test', (e) => {\n testZone = rootZone.fork(new ProxyZoneSpec());\n });\n this.on('fail', (test, err) => {\n const proxyZoneSpec = testZone && testZone.get('ProxyZoneSpec');\n if (proxyZoneSpec && err) {\n try {\n // try catch here in case err.message is not writable\n err.message += proxyZoneSpec.getAndClearPendingTasksInfo();\n }\n catch (error) {\n }\n }\n });\n return originalRun.call(this, fn);\n };\n })(Mocha.Runner.prototype.runTest, Mocha.Runner.prototype.run);\n});\n\n(function (_global) {\n class AsyncTestZoneSpec {\n static { this.symbolParentUnresolved = Zone.__symbol__('parentUnresolved'); }\n constructor(finishCallback, failCallback, namePrefix) {\n this.finishCallback = finishCallback;\n this.failCallback = failCallback;\n this._pendingMicroTasks = false;\n this._pendingMacroTasks = false;\n this._alreadyErrored = false;\n this._isSync = false;\n this._existingFinishTimer = null;\n this.entryFunction = null;\n this.runZone = Zone.current;\n this.unresolvedChainedPromiseCount = 0;\n this.supportWaitUnresolvedChainedPromise = false;\n this.name = 'asyncTestZone for ' + namePrefix;\n this.properties = { 'AsyncTestZoneSpec': this };\n this.supportWaitUnresolvedChainedPromise =\n _global[Zone.__symbol__('supportWaitUnResolvedChainedPromise')] === true;\n }\n isUnresolvedChainedPromisePending() {\n return this.unresolvedChainedPromiseCount > 0;\n }\n _finishCallbackIfDone() {\n // NOTE: Technically the `onHasTask` could fire together with the initial synchronous\n // completion in `onInvoke`. `onHasTask` might call this method when it captured e.g.\n // microtasks in the proxy zone that now complete as part of this async zone run.\n // Consider the following scenario:\n // 1. A test `beforeEach` schedules a microtask in the ProxyZone.\n // 2. An actual empty `it` spec executes in the AsyncTestZone` (using e.g. `waitForAsync`).\n // 3. The `onInvoke` invokes `_finishCallbackIfDone` because the spec runs synchronously.\n // 4. We wait the scheduled timeout (see below) to account for unhandled promises.\n // 5. The microtask from (1) finishes and `onHasTask` is invoked.\n // --> We register a second `_finishCallbackIfDone` even though we have scheduled a timeout.\n // If the finish timeout from below is already scheduled, terminate the existing scheduled\n // finish invocation, avoiding calling `jasmine` `done` multiple times. *Note* that we would\n // want to schedule a new finish callback in case the task state changes again.\n if (this._existingFinishTimer !== null) {\n clearTimeout(this._existingFinishTimer);\n this._existingFinishTimer = null;\n }\n if (!(this._pendingMicroTasks || this._pendingMacroTasks ||\n (this.supportWaitUnresolvedChainedPromise && this.isUnresolvedChainedPromisePending()))) {\n // We wait until the next tick because we would like to catch unhandled promises which could\n // cause test logic to be executed. In such cases we cannot finish with tasks pending then.\n this.runZone.run(() => {\n this._existingFinishTimer = setTimeout(() => {\n if (!this._alreadyErrored && !(this._pendingMicroTasks || this._pendingMacroTasks)) {\n this.finishCallback();\n }\n }, 0);\n });\n }\n }\n patchPromiseForTest() {\n if (!this.supportWaitUnresolvedChainedPromise) {\n return;\n }\n const patchPromiseForTest = Promise[Zone.__symbol__('patchPromiseForTest')];\n if (patchPromiseForTest) {\n patchPromiseForTest();\n }\n }\n unPatchPromiseForTest() {\n if (!this.supportWaitUnresolvedChainedPromise) {\n return;\n }\n const unPatchPromiseForTest = Promise[Zone.__symbol__('unPatchPromiseForTest')];\n if (unPatchPromiseForTest) {\n unPatchPromiseForTest();\n }\n }\n onScheduleTask(delegate, current, target, task) {\n if (task.type !== 'eventTask') {\n this._isSync = false;\n }\n if (task.type === 'microTask' && task.data && task.data instanceof Promise) {\n // check whether the promise is a chained promise\n if (task.data[AsyncTestZoneSpec.symbolParentUnresolved] === true) {\n // chained promise is being scheduled\n this.unresolvedChainedPromiseCount--;\n }\n }\n return delegate.scheduleTask(target, task);\n }\n onInvokeTask(delegate, current, target, task, applyThis, applyArgs) {\n if (task.type !== 'eventTask') {\n this._isSync = false;\n }\n return delegate.invokeTask(target, task, applyThis, applyArgs);\n }\n onCancelTask(delegate, current, target, task) {\n if (task.type !== 'eventTask') {\n this._isSync = false;\n }\n return delegate.cancelTask(target, task);\n }\n // Note - we need to use onInvoke at the moment to call finish when a test is\n // fully synchronous. TODO(juliemr): remove this when the logic for\n // onHasTask changes and it calls whenever the task queues are dirty.\n // updated by(JiaLiPassion), only call finish callback when no task\n // was scheduled/invoked/canceled.\n onInvoke(parentZoneDelegate, currentZone, targetZone, delegate, applyThis, applyArgs, source) {\n if (!this.entryFunction) {\n this.entryFunction = delegate;\n }\n try {\n this._isSync = true;\n return parentZoneDelegate.invoke(targetZone, delegate, applyThis, applyArgs, source);\n }\n finally {\n // We need to check the delegate is the same as entryFunction or not.\n // Consider the following case.\n //\n // asyncTestZone.run(() => { // Here the delegate will be the entryFunction\n // Zone.current.run(() => { // Here the delegate will not be the entryFunction\n // });\n // });\n //\n // We only want to check whether there are async tasks scheduled\n // for the entry function.\n if (this._isSync && this.entryFunction === delegate) {\n this._finishCallbackIfDone();\n }\n }\n }\n onHandleError(parentZoneDelegate, currentZone, targetZone, error) {\n // Let the parent try to handle the error.\n const result = parentZoneDelegate.handleError(targetZone, error);\n if (result) {\n this.failCallback(error);\n this._alreadyErrored = true;\n }\n return false;\n }\n onHasTask(delegate, current, target, hasTaskState) {\n delegate.hasTask(target, hasTaskState);\n // We should only trigger finishCallback when the target zone is the AsyncTestZone\n // Consider the following cases.\n //\n // const childZone = asyncTestZone.fork({\n // name: 'child',\n // onHasTask: ...\n // });\n //\n // So we have nested zones declared the onHasTask hook, in this case,\n // the onHasTask will be triggered twice, and cause the finishCallbackIfDone()\n // is also be invoked twice. So we need to only trigger the finishCallbackIfDone()\n // when the current zone is the same as the target zone.\n if (current !== target) {\n return;\n }\n if (hasTaskState.change == 'microTask') {\n this._pendingMicroTasks = hasTaskState.microTask;\n this._finishCallbackIfDone();\n }\n else if (hasTaskState.change == 'macroTask') {\n this._pendingMacroTasks = hasTaskState.macroTask;\n this._finishCallbackIfDone();\n }\n }\n }\n // Export the class so that new instances can be created with proper\n // constructor params.\n Zone['AsyncTestZoneSpec'] = AsyncTestZoneSpec;\n})(typeof window !== 'undefined' && window || typeof self !== 'undefined' && self || global);\nZone.__load_patch('asynctest', (global, Zone, api) => {\n /**\n * Wraps a test function in an asynchronous test zone. The test will automatically\n * complete when all asynchronous calls within this zone are done.\n */\n Zone[api.symbol('asyncTest')] = function asyncTest(fn) {\n // If we're running using the Jasmine test framework, adapt to call the 'done'\n // function when asynchronous activity is finished.\n if (global.jasmine) {\n // Not using an arrow function to preserve context passed from call site\n return function (done) {\n if (!done) {\n // if we run beforeEach in @angular/core/testing/testing_internal then we get no done\n // fake it here and assume sync.\n done = function () { };\n done.fail = function (e) {\n throw e;\n };\n }\n runInTestZone(fn, this, done, (err) => {\n if (typeof err === 'string') {\n return done.fail(new Error(err));\n }\n else {\n done.fail(err);\n }\n });\n };\n }\n // Otherwise, return a promise which will resolve when asynchronous activity\n // is finished. This will be correctly consumed by the Mocha framework with\n // it('...', async(myFn)); or can be used in a custom framework.\n // Not using an arrow function to preserve context passed from call site\n return function () {\n return new Promise((finishCallback, failCallback) => {\n runInTestZone(fn, this, finishCallback, failCallback);\n });\n };\n };\n function runInTestZone(fn, context, finishCallback, failCallback) {\n const currentZone = Zone.current;\n const AsyncTestZoneSpec = Zone['AsyncTestZoneSpec'];\n if (AsyncTestZoneSpec === undefined) {\n throw new Error('AsyncTestZoneSpec is needed for the async() test helper but could not be found. ' +\n 'Please make sure that your environment includes zone.js/plugins/async-test');\n }\n const ProxyZoneSpec = Zone['ProxyZoneSpec'];\n if (!ProxyZoneSpec) {\n throw new Error('ProxyZoneSpec is needed for the async() test helper but could not be found. ' +\n 'Please make sure that your environment includes zone.js/plugins/proxy');\n }\n const proxyZoneSpec = ProxyZoneSpec.get();\n ProxyZoneSpec.assertPresent();\n // We need to create the AsyncTestZoneSpec outside the ProxyZone.\n // If we do it in ProxyZone then we will get to infinite recursion.\n const proxyZone = Zone.current.getZoneWith('ProxyZoneSpec');\n const previousDelegate = proxyZoneSpec.getDelegate();\n proxyZone.parent.run(() => {\n const testZoneSpec = new AsyncTestZoneSpec(() => {\n // Need to restore the original zone.\n if (proxyZoneSpec.getDelegate() == testZoneSpec) {\n // Only reset the zone spec if it's\n // still this one. Otherwise, assume\n // it's OK.\n proxyZoneSpec.setDelegate(previousDelegate);\n }\n testZoneSpec.unPatchPromiseForTest();\n currentZone.run(() => {\n finishCallback();\n });\n }, (error) => {\n // Need to restore the original zone.\n if (proxyZoneSpec.getDelegate() == testZoneSpec) {\n // Only reset the zone spec if it's sill this one. Otherwise, assume it's OK.\n proxyZoneSpec.setDelegate(previousDelegate);\n }\n testZoneSpec.unPatchPromiseForTest();\n currentZone.run(() => {\n failCallback(error);\n });\n }, 'test');\n proxyZoneSpec.setDelegate(testZoneSpec);\n testZoneSpec.patchPromiseForTest();\n });\n return Zone.current.runGuarded(fn, context);\n }\n});\n\n(function (global) {\n const OriginalDate = global.Date;\n // Since when we compile this file to `es2015`, and if we define\n // this `FakeDate` as `class FakeDate`, and then set `FakeDate.prototype`\n // there will be an error which is `Cannot assign to read only property 'prototype'`\n // so we need to use function implementation here.\n function FakeDate() {\n if (arguments.length === 0) {\n const d = new OriginalDate();\n d.setTime(FakeDate.now());\n return d;\n }\n else {\n const args = Array.prototype.slice.call(arguments);\n return new OriginalDate(...args);\n }\n }\n FakeDate.now = function () {\n const fakeAsyncTestZoneSpec = Zone.current.get('FakeAsyncTestZoneSpec');\n if (fakeAsyncTestZoneSpec) {\n return fakeAsyncTestZoneSpec.getFakeSystemTime();\n }\n return OriginalDate.now.apply(this, arguments);\n };\n FakeDate.UTC = OriginalDate.UTC;\n FakeDate.parse = OriginalDate.parse;\n // keep a reference for zone patched timer function\n const timers = {\n setTimeout: global.setTimeout,\n setInterval: global.setInterval,\n clearTimeout: global.clearTimeout,\n clearInterval: global.clearInterval\n };\n class Scheduler {\n // Next scheduler id.\n static { this.nextId = 1; }\n constructor() {\n // Scheduler queue with the tuple of end time and callback function - sorted by end time.\n this._schedulerQueue = [];\n // Current simulated time in millis.\n this._currentTickTime = 0;\n // Current fake system base time in millis.\n this._currentFakeBaseSystemTime = OriginalDate.now();\n // track requeuePeriodicTimer\n this._currentTickRequeuePeriodicEntries = [];\n }\n getCurrentTickTime() {\n return this._currentTickTime;\n }\n getFakeSystemTime() {\n return this._currentFakeBaseSystemTime + this._currentTickTime;\n }\n setFakeBaseSystemTime(fakeBaseSystemTime) {\n this._currentFakeBaseSystemTime = fakeBaseSystemTime;\n }\n getRealSystemTime() {\n return OriginalDate.now();\n }\n scheduleFunction(cb, delay, options) {\n options = {\n ...{\n args: [],\n isPeriodic: false,\n isRequestAnimationFrame: false,\n id: -1,\n isRequeuePeriodic: false\n },\n ...options\n };\n let currentId = options.id < 0 ? Scheduler.nextId++ : options.id;\n let endTime = this._currentTickTime + delay;\n // Insert so that scheduler queue remains sorted by end time.\n let newEntry = {\n endTime: endTime,\n id: currentId,\n func: cb,\n args: options.args,\n delay: delay,\n isPeriodic: options.isPeriodic,\n isRequestAnimationFrame: options.isRequestAnimationFrame\n };\n if (options.isRequeuePeriodic) {\n this._currentTickRequeuePeriodicEntries.push(newEntry);\n }\n let i = 0;\n for (; i < this._schedulerQueue.length; i++) {\n let currentEntry = this._schedulerQueue[i];\n if (newEntry.endTime < currentEntry.endTime) {\n break;\n }\n }\n this._schedulerQueue.splice(i, 0, newEntry);\n return currentId;\n }\n removeScheduledFunctionWithId(id) {\n for (let i = 0; i < this._schedulerQueue.length; i++) {\n if (this._schedulerQueue[i].id == id) {\n this._schedulerQueue.splice(i, 1);\n break;\n }\n }\n }\n removeAll() {\n this._schedulerQueue = [];\n }\n getTimerCount() {\n return this._schedulerQueue.length;\n }\n tickToNext(step = 1, doTick, tickOptions) {\n if (this._schedulerQueue.length < step) {\n return;\n }\n // Find the last task currently queued in the scheduler queue and tick\n // till that time.\n const startTime = this._currentTickTime;\n const targetTask = this._schedulerQueue[step - 1];\n this.tick(targetTask.endTime - startTime, doTick, tickOptions);\n }\n tick(millis = 0, doTick, tickOptions) {\n let finalTime = this._currentTickTime + millis;\n let lastCurrentTime = 0;\n tickOptions = Object.assign({ processNewMacroTasksSynchronously: true }, tickOptions);\n // we need to copy the schedulerQueue so nested timeout\n // will not be wrongly called in the current tick\n // https://github.com/angular/angular/issues/33799\n const schedulerQueue = tickOptions.processNewMacroTasksSynchronously ?\n this._schedulerQueue :\n this._schedulerQueue.slice();\n if (schedulerQueue.length === 0 && doTick) {\n doTick(millis);\n return;\n }\n while (schedulerQueue.length > 0) {\n // clear requeueEntries before each loop\n this._currentTickRequeuePeriodicEntries = [];\n let current = schedulerQueue[0];\n if (finalTime < current.endTime) {\n // Done processing the queue since it's sorted by endTime.\n break;\n }\n else {\n // Time to run scheduled function. Remove it from the head of queue.\n let current = schedulerQueue.shift();\n if (!tickOptions.processNewMacroTasksSynchronously) {\n const idx = this._schedulerQueue.indexOf(current);\n if (idx >= 0) {\n this._schedulerQueue.splice(idx, 1);\n }\n }\n lastCurrentTime = this._currentTickTime;\n this._currentTickTime = current.endTime;\n if (doTick) {\n doTick(this._currentTickTime - lastCurrentTime);\n }\n let retval = current.func.apply(global, current.isRequestAnimationFrame ? [this._currentTickTime] : current.args);\n if (!retval) {\n // Uncaught exception in the current scheduled function. Stop processing the queue.\n break;\n }\n // check is there any requeue periodic entry is added in\n // current loop, if there is, we need to add to current loop\n if (!tickOptions.processNewMacroTasksSynchronously) {\n this._currentTickRequeuePeriodicEntries.forEach(newEntry => {\n let i = 0;\n for (; i < schedulerQueue.length; i++) {\n const currentEntry = schedulerQueue[i];\n if (newEntry.endTime < currentEntry.endTime) {\n break;\n }\n }\n schedulerQueue.splice(i, 0, newEntry);\n });\n }\n }\n }\n lastCurrentTime = this._currentTickTime;\n this._currentTickTime = finalTime;\n if (doTick) {\n doTick(this._currentTickTime - lastCurrentTime);\n }\n }\n flushOnlyPendingTimers(doTick) {\n if (this._schedulerQueue.length === 0) {\n return 0;\n }\n // Find the last task currently queued in the scheduler queue and tick\n // till that time.\n const startTime = this._currentTickTime;\n const lastTask = this._schedulerQueue[this._schedulerQueue.length - 1];\n this.tick(lastTask.endTime - startTime, doTick, { processNewMacroTasksSynchronously: false });\n return this._currentTickTime - startTime;\n }\n flush(limit = 20, flushPeriodic = false, doTick) {\n if (flushPeriodic) {\n return this.flushPeriodic(doTick);\n }\n else {\n return this.flushNonPeriodic(limit, doTick);\n }\n }\n flushPeriodic(doTick) {\n if (this._schedulerQueue.length === 0) {\n return 0;\n }\n // Find the last task currently queued in the scheduler queue and tick\n // till that time.\n const startTime = this._currentTickTime;\n const lastTask = this._schedulerQueue[this._schedulerQueue.length - 1];\n this.tick(lastTask.endTime - startTime, doTick);\n return this._currentTickTime - startTime;\n }\n flushNonPeriodic(limit, doTick) {\n const startTime = this._currentTickTime;\n let lastCurrentTime = 0;\n let count = 0;\n while (this._schedulerQueue.length > 0) {\n count++;\n if (count > limit) {\n throw new Error('flush failed after reaching the limit of ' + limit +\n ' tasks. Does your code use a polling timeout?');\n }\n // flush only non-periodic timers.\n // If the only remaining tasks are periodic(or requestAnimationFrame), finish flushing.\n if (this._schedulerQueue.filter(task => !task.isPeriodic && !task.isRequestAnimationFrame)\n .length === 0) {\n break;\n }\n const current = this._schedulerQueue.shift();\n lastCurrentTime = this._currentTickTime;\n this._currentTickTime = current.endTime;\n if (doTick) {\n // Update any secondary schedulers like Jasmine mock Date.\n doTick(this._currentTickTime - lastCurrentTime);\n }\n const retval = current.func.apply(global, current.args);\n if (!retval) {\n // Uncaught exception in the current scheduled function. Stop processing the queue.\n break;\n }\n }\n return this._currentTickTime - startTime;\n }\n }\n class FakeAsyncTestZoneSpec {\n static assertInZone() {\n if (Zone.current.get('FakeAsyncTestZoneSpec') == null) {\n throw new Error('The code should be running in the fakeAsync zone to call this function');\n }\n }\n constructor(namePrefix, trackPendingRequestAnimationFrame = false, macroTaskOptions) {\n this.trackPendingRequestAnimationFrame = trackPendingRequestAnimationFrame;\n this.macroTaskOptions = macroTaskOptions;\n this._scheduler = new Scheduler();\n this._microtasks = [];\n this._lastError = null;\n this._uncaughtPromiseErrors = Promise[Zone.__symbol__('uncaughtPromiseErrors')];\n this.pendingPeriodicTimers = [];\n this.pendingTimers = [];\n this.patchDateLocked = false;\n this.properties = { 'FakeAsyncTestZoneSpec': this };\n this.name = 'fakeAsyncTestZone for ' + namePrefix;\n // in case user can't access the construction of FakeAsyncTestSpec\n // user can also define macroTaskOptions by define a global variable.\n if (!this.macroTaskOptions) {\n this.macroTaskOptions = global[Zone.__symbol__('FakeAsyncTestMacroTask')];\n }\n }\n _fnAndFlush(fn, completers) {\n return (...args) => {\n fn.apply(global, args);\n if (this._lastError === null) { // Success\n if (completers.onSuccess != null) {\n completers.onSuccess.apply(global);\n }\n // Flush microtasks only on success.\n this.flushMicrotasks();\n }\n else { // Failure\n if (completers.onError != null) {\n completers.onError.apply(global);\n }\n }\n // Return true if there were no errors, false otherwise.\n return this._lastError === null;\n };\n }\n static _removeTimer(timers, id) {\n let index = timers.indexOf(id);\n if (index > -1) {\n timers.splice(index, 1);\n }\n }\n _dequeueTimer(id) {\n return () => {\n FakeAsyncTestZoneSpec._removeTimer(this.pendingTimers, id);\n };\n }\n _requeuePeriodicTimer(fn, interval, args, id) {\n return () => {\n // Requeue the timer callback if it's not been canceled.\n if (this.pendingPeriodicTimers.indexOf(id) !== -1) {\n this._scheduler.scheduleFunction(fn, interval, { args, isPeriodic: true, id, isRequeuePeriodic: true });\n }\n };\n }\n _dequeuePeriodicTimer(id) {\n return () => {\n FakeAsyncTestZoneSpec._removeTimer(this.pendingPeriodicTimers, id);\n };\n }\n _setTimeout(fn, delay, args, isTimer = true) {\n let removeTimerFn = this._dequeueTimer(Scheduler.nextId);\n // Queue the callback and dequeue the timer on success and error.\n let cb = this._fnAndFlush(fn, { onSuccess: removeTimerFn, onError: removeTimerFn });\n let id = this._scheduler.scheduleFunction(cb, delay, { args, isRequestAnimationFrame: !isTimer });\n if (isTimer) {\n this.pendingTimers.push(id);\n }\n return id;\n }\n _clearTimeout(id) {\n FakeAsyncTestZoneSpec._removeTimer(this.pendingTimers, id);\n this._scheduler.removeScheduledFunctionWithId(id);\n }\n _setInterval(fn, interval, args) {\n let id = Scheduler.nextId;\n let completers = { onSuccess: null, onError: this._dequeuePeriodicTimer(id) };\n let cb = this._fnAndFlush(fn, completers);\n // Use the callback created above to requeue on success.\n completers.onSuccess = this._requeuePeriodicTimer(cb, interval, args, id);\n // Queue the callback and dequeue the periodic timer only on error.\n this._scheduler.scheduleFunction(cb, interval, { args, isPeriodic: true });\n this.pendingPeriodicTimers.push(id);\n return id;\n }\n _clearInterval(id) {\n FakeAsyncTestZoneSpec._removeTimer(this.pendingPeriodicTimers, id);\n this._scheduler.removeScheduledFunctionWithId(id);\n }\n _resetLastErrorAndThrow() {\n let error = this._lastError || this._uncaughtPromiseErrors[0];\n this._uncaughtPromiseErrors.length = 0;\n this._lastError = null;\n throw error;\n }\n getCurrentTickTime() {\n return this._scheduler.getCurrentTickTime();\n }\n getFakeSystemTime() {\n return this._scheduler.getFakeSystemTime();\n }\n setFakeBaseSystemTime(realTime) {\n this._scheduler.setFakeBaseSystemTime(realTime);\n }\n getRealSystemTime() {\n return this._scheduler.getRealSystemTime();\n }\n static patchDate() {\n if (!!global[Zone.__symbol__('disableDatePatching')]) {\n // we don't want to patch global Date\n // because in some case, global Date\n // is already being patched, we need to provide\n // an option to let user still use their\n // own version of Date.\n return;\n }\n if (global['Date'] === FakeDate) {\n // already patched\n return;\n }\n global['Date'] = FakeDate;\n FakeDate.prototype = OriginalDate.prototype;\n // try check and reset timers\n // because jasmine.clock().install() may\n // have replaced the global timer\n FakeAsyncTestZoneSpec.checkTimerPatch();\n }\n static resetDate() {\n if (global['Date'] === FakeDate) {\n global['Date'] = OriginalDate;\n }\n }\n static checkTimerPatch() {\n if (global.setTimeout !== timers.setTimeout) {\n global.setTimeout = timers.setTimeout;\n global.clearTimeout = timers.clearTimeout;\n }\n if (global.setInterval !== timers.setInterval) {\n global.setInterval = timers.setInterval;\n global.clearInterval = timers.clearInterval;\n }\n }\n lockDatePatch() {\n this.patchDateLocked = true;\n FakeAsyncTestZoneSpec.patchDate();\n }\n unlockDatePatch() {\n this.patchDateLocked = false;\n FakeAsyncTestZoneSpec.resetDate();\n }\n tickToNext(steps = 1, doTick, tickOptions = { processNewMacroTasksSynchronously: true }) {\n if (steps <= 0) {\n return;\n }\n FakeAsyncTestZoneSpec.assertInZone();\n this.flushMicrotasks();\n this._scheduler.tickToNext(steps, doTick, tickOptions);\n if (this._lastError !== null) {\n this._resetLastErrorAndThrow();\n }\n }\n tick(millis = 0, doTick, tickOptions = { processNewMacroTasksSynchronously: true }) {\n FakeAsyncTestZoneSpec.assertInZone();\n this.flushMicrotasks();\n this._scheduler.tick(millis, doTick, tickOptions);\n if (this._lastError !== null) {\n this._resetLastErrorAndThrow();\n }\n }\n flushMicrotasks() {\n FakeAsyncTestZoneSpec.assertInZone();\n const flushErrors = () => {\n if (this._lastError !== null || this._uncaughtPromiseErrors.length) {\n // If there is an error stop processing the microtask queue and rethrow the error.\n this._resetLastErrorAndThrow();\n }\n };\n while (this._microtasks.length > 0) {\n let microtask = this._microtasks.shift();\n microtask.func.apply(microtask.target, microtask.args);\n }\n flushErrors();\n }\n flush(limit, flushPeriodic, doTick) {\n FakeAsyncTestZoneSpec.assertInZone();\n this.flushMicrotasks();\n const elapsed = this._scheduler.flush(limit, flushPeriodic, doTick);\n if (this._lastError !== null) {\n this._resetLastErrorAndThrow();\n }\n return elapsed;\n }\n flushOnlyPendingTimers(doTick) {\n FakeAsyncTestZoneSpec.assertInZone();\n this.flushMicrotasks();\n const elapsed = this._scheduler.flushOnlyPendingTimers(doTick);\n if (this._lastError !== null) {\n this._resetLastErrorAndThrow();\n }\n return elapsed;\n }\n removeAllTimers() {\n FakeAsyncTestZoneSpec.assertInZone();\n this._scheduler.removeAll();\n this.pendingPeriodicTimers = [];\n this.pendingTimers = [];\n }\n getTimerCount() {\n return this._scheduler.getTimerCount() + this._microtasks.length;\n }\n onScheduleTask(delegate, current, target, task) {\n switch (task.type) {\n case 'microTask':\n let args = task.data && task.data.args;\n // should pass additional arguments to callback if have any\n // currently we know process.nextTick will have such additional\n // arguments\n let additionalArgs;\n if (args) {\n let callbackIndex = task.data.cbIdx;\n if (typeof args.length === 'number' && args.length > callbackIndex + 1) {\n additionalArgs = Array.prototype.slice.call(args, callbackIndex + 1);\n }\n }\n this._microtasks.push({\n func: task.invoke,\n args: additionalArgs,\n target: task.data && task.data.target\n });\n break;\n case 'macroTask':\n switch (task.source) {\n case 'setTimeout':\n task.data['handleId'] = this._setTimeout(task.invoke, task.data['delay'], Array.prototype.slice.call(task.data['args'], 2));\n break;\n case 'setImmediate':\n task.data['handleId'] = this._setTimeout(task.invoke, 0, Array.prototype.slice.call(task.data['args'], 1));\n break;\n case 'setInterval':\n task.data['handleId'] = this._setInterval(task.invoke, task.data['delay'], Array.prototype.slice.call(task.data['args'], 2));\n break;\n case 'XMLHttpRequest.send':\n throw new Error('Cannot make XHRs from within a fake async test. Request URL: ' +\n task.data['url']);\n case 'requestAnimationFrame':\n case 'webkitRequestAnimationFrame':\n case 'mozRequestAnimationFrame':\n // Simulate a requestAnimationFrame by using a setTimeout with 16 ms.\n // (60 frames per second)\n task.data['handleId'] = this._setTimeout(task.invoke, 16, task.data['args'], this.trackPendingRequestAnimationFrame);\n break;\n default:\n // user can define which macroTask they want to support by passing\n // macroTaskOptions\n const macroTaskOption = this.findMacroTaskOption(task);\n if (macroTaskOption) {\n const args = task.data && task.data['args'];\n const delay = args && args.length > 1 ? args[1] : 0;\n let callbackArgs = macroTaskOption.callbackArgs ? macroTaskOption.callbackArgs : args;\n if (!!macroTaskOption.isPeriodic) {\n // periodic macroTask, use setInterval to simulate\n task.data['handleId'] = this._setInterval(task.invoke, delay, callbackArgs);\n task.data.isPeriodic = true;\n }\n else {\n // not periodic, use setTimeout to simulate\n task.data['handleId'] = this._setTimeout(task.invoke, delay, callbackArgs);\n }\n break;\n }\n throw new Error('Unknown macroTask scheduled in fake async test: ' + task.source);\n }\n break;\n case 'eventTask':\n task = delegate.scheduleTask(target, task);\n break;\n }\n return task;\n }\n onCancelTask(delegate, current, target, task) {\n switch (task.source) {\n case 'setTimeout':\n case 'requestAnimationFrame':\n case 'webkitRequestAnimationFrame':\n case 'mozRequestAnimationFrame':\n return this._clearTimeout(task.data['handleId']);\n case 'setInterval':\n return this._clearInterval(task.data['handleId']);\n default:\n // user can define which macroTask they want to support by passing\n // macroTaskOptions\n const macroTaskOption = this.findMacroTaskOption(task);\n if (macroTaskOption) {\n const handleId = task.data['handleId'];\n return macroTaskOption.isPeriodic ? this._clearInterval(handleId) :\n this._clearTimeout(handleId);\n }\n return delegate.cancelTask(target, task);\n }\n }\n onInvoke(delegate, current, target, callback, applyThis, applyArgs, source) {\n try {\n FakeAsyncTestZoneSpec.patchDate();\n return delegate.invoke(target, callback, applyThis, applyArgs, source);\n }\n finally {\n if (!this.patchDateLocked) {\n FakeAsyncTestZoneSpec.resetDate();\n }\n }\n }\n findMacroTaskOption(task) {\n if (!this.macroTaskOptions) {\n return null;\n }\n for (let i = 0; i < this.macroTaskOptions.length; i++) {\n const macroTaskOption = this.macroTaskOptions[i];\n if (macroTaskOption.source === task.source) {\n return macroTaskOption;\n }\n }\n return null;\n }\n onHandleError(parentZoneDelegate, currentZone, targetZone, error) {\n this._lastError = error;\n return false; // Don't propagate error to parent zone.\n }\n }\n // Export the class so that new instances can be created with proper\n // constructor params.\n Zone['FakeAsyncTestZoneSpec'] = FakeAsyncTestZoneSpec;\n})(typeof window === 'object' && window || typeof self === 'object' && self || global);\nZone.__load_patch('fakeasync', (global, Zone, api) => {\n const FakeAsyncTestZoneSpec = Zone && Zone['FakeAsyncTestZoneSpec'];\n function getProxyZoneSpec() {\n return Zone && Zone['ProxyZoneSpec'];\n }\n let _fakeAsyncTestZoneSpec = null;\n /**\n * Clears out the shared fake async zone for a test.\n * To be called in a global `beforeEach`.\n *\n * @experimental\n */\n function resetFakeAsyncZone() {\n if (_fakeAsyncTestZoneSpec) {\n _fakeAsyncTestZoneSpec.unlockDatePatch();\n }\n _fakeAsyncTestZoneSpec = null;\n // in node.js testing we may not have ProxyZoneSpec in which case there is nothing to reset.\n getProxyZoneSpec() && getProxyZoneSpec().assertPresent().resetDelegate();\n }\n /**\n * Wraps a function to be executed in the fakeAsync zone:\n * - microtasks are manually executed by calling `flushMicrotasks()`,\n * - timers are synchronous, `tick()` simulates the asynchronous passage of time.\n *\n * If there are any pending timers at the end of the function, an exception will be thrown.\n *\n * Can be used to wrap inject() calls.\n *\n * ## Example\n *\n * {@example core/testing/ts/fake_async.ts region='basic'}\n *\n * @param fn\n * @returns The function wrapped to be executed in the fakeAsync zone\n *\n * @experimental\n */\n function fakeAsync(fn) {\n // Not using an arrow function to preserve context passed from call site\n const fakeAsyncFn = function (...args) {\n const ProxyZoneSpec = getProxyZoneSpec();\n if (!ProxyZoneSpec) {\n throw new Error('ProxyZoneSpec is needed for the async() test helper but could not be found. ' +\n 'Please make sure that your environment includes zone.js/plugins/proxy');\n }\n const proxyZoneSpec = ProxyZoneSpec.assertPresent();\n if (Zone.current.get('FakeAsyncTestZoneSpec')) {\n throw new Error('fakeAsync() calls can not be nested');\n }\n try {\n // in case jasmine.clock init a fakeAsyncTestZoneSpec\n if (!_fakeAsyncTestZoneSpec) {\n if (proxyZoneSpec.getDelegate() instanceof FakeAsyncTestZoneSpec) {\n throw new Error('fakeAsync() calls can not be nested');\n }\n _fakeAsyncTestZoneSpec = new FakeAsyncTestZoneSpec();\n }\n let res;\n const lastProxyZoneSpec = proxyZoneSpec.getDelegate();\n proxyZoneSpec.setDelegate(_fakeAsyncTestZoneSpec);\n _fakeAsyncTestZoneSpec.lockDatePatch();\n try {\n res = fn.apply(this, args);\n flushMicrotasks();\n }\n finally {\n proxyZoneSpec.setDelegate(lastProxyZoneSpec);\n }\n if (_fakeAsyncTestZoneSpec.pendingPeriodicTimers.length > 0) {\n throw new Error(`${_fakeAsyncTestZoneSpec.pendingPeriodicTimers.length} ` +\n `periodic timer(s) still in the queue.`);\n }\n if (_fakeAsyncTestZoneSpec.pendingTimers.length > 0) {\n throw new Error(`${_fakeAsyncTestZoneSpec.pendingTimers.length} timer(s) still in the queue.`);\n }\n return res;\n }\n finally {\n resetFakeAsyncZone();\n }\n };\n fakeAsyncFn.isFakeAsync = true;\n return fakeAsyncFn;\n }\n function _getFakeAsyncZoneSpec() {\n if (_fakeAsyncTestZoneSpec == null) {\n _fakeAsyncTestZoneSpec = Zone.current.get('FakeAsyncTestZoneSpec');\n if (_fakeAsyncTestZoneSpec == null) {\n throw new Error('The code should be running in the fakeAsync zone to call this function');\n }\n }\n return _fakeAsyncTestZoneSpec;\n }\n /**\n * Simulates the asynchronous passage of time for the timers in the fakeAsync zone.\n *\n * The microtasks queue is drained at the very start of this function and after any timer callback\n * has been executed.\n *\n * ## Example\n *\n * {@example core/testing/ts/fake_async.ts region='basic'}\n *\n * @experimental\n */\n function tick(millis = 0, ignoreNestedTimeout = false) {\n _getFakeAsyncZoneSpec().tick(millis, null, ignoreNestedTimeout);\n }\n /**\n * Simulates the asynchronous passage of time for the timers in the fakeAsync zone by\n * draining the macrotask queue until it is empty. The returned value is the milliseconds\n * of time that would have been elapsed.\n *\n * @param maxTurns\n * @returns The simulated time elapsed, in millis.\n *\n * @experimental\n */\n function flush(maxTurns) {\n return _getFakeAsyncZoneSpec().flush(maxTurns);\n }\n /**\n * Discard all remaining periodic tasks.\n *\n * @experimental\n */\n function discardPeriodicTasks() {\n const zoneSpec = _getFakeAsyncZoneSpec();\n zoneSpec.pendingPeriodicTimers;\n zoneSpec.pendingPeriodicTimers.length = 0;\n }\n /**\n * Flush any pending microtasks.\n *\n * @experimental\n */\n function flushMicrotasks() {\n _getFakeAsyncZoneSpec().flushMicrotasks();\n }\n Zone[api.symbol('fakeAsyncTest')] =\n { resetFakeAsyncZone, flushMicrotasks, discardPeriodicTasks, tick, flush, fakeAsync };\n}, true);\n\n/**\n * Promise for async/fakeAsync zoneSpec test\n * can support async operation which not supported by zone.js\n * such as\n * it ('test jsonp in AsyncZone', async() => {\n * new Promise(res => {\n * jsonp(url, (data) => {\n * // success callback\n * res(data);\n * });\n * }).then((jsonpResult) => {\n * // get jsonp result.\n *\n * // user will expect AsyncZoneSpec wait for\n * // then, but because jsonp is not zone aware\n * // AsyncZone will finish before then is called.\n * });\n * });\n */\nZone.__load_patch('promisefortest', (global, Zone, api) => {\n const symbolState = api.symbol('state');\n const UNRESOLVED = null;\n const symbolParentUnresolved = api.symbol('parentUnresolved');\n // patch Promise.prototype.then to keep an internal\n // number for tracking unresolved chained promise\n // we will decrease this number when the parent promise\n // being resolved/rejected and chained promise was\n // scheduled as a microTask.\n // so we can know such kind of chained promise still\n // not resolved in AsyncTestZone\n Promise[api.symbol('patchPromiseForTest')] = function patchPromiseForTest() {\n let oriThen = Promise[Zone.__symbol__('ZonePromiseThen')];\n if (oriThen) {\n return;\n }\n oriThen = Promise[Zone.__symbol__('ZonePromiseThen')] = Promise.prototype.then;\n Promise.prototype.then = function () {\n const chained = oriThen.apply(this, arguments);\n if (this[symbolState] === UNRESOLVED) {\n // parent promise is unresolved.\n const asyncTestZoneSpec = Zone.current.get('AsyncTestZoneSpec');\n if (asyncTestZoneSpec) {\n asyncTestZoneSpec.unresolvedChainedPromiseCount++;\n chained[symbolParentUnresolved] = true;\n }\n }\n return chained;\n };\n };\n Promise[api.symbol('unPatchPromiseForTest')] = function unpatchPromiseForTest() {\n // restore origin then\n const oriThen = Promise[Zone.__symbol__('ZonePromiseThen')];\n if (oriThen) {\n Promise.prototype.then = oriThen;\n Promise[Zone.__symbol__('ZonePromiseThen')] = undefined;\n }\n };\n});\n","'use strict';\n/**\n * @license Angular v\n * (c) 2010-2022 Google LLC. https://angular.io/\n * License: MIT\n */\n// Initialize global `Zone` constant.\n(function (global) {\n const performance = global['performance'];\n function mark(name) {\n performance && performance['mark'] && performance['mark'](name);\n }\n function performanceMeasure(name, label) {\n performance && performance['measure'] && performance['measure'](name, label);\n }\n mark('Zone');\n // Initialize before it's accessed below.\n // __Zone_symbol_prefix global can be used to override the default zone\n // symbol prefix with a custom one if needed.\n const symbolPrefix = global['__Zone_symbol_prefix'] || '__zone_symbol__';\n function __symbol__(name) {\n return symbolPrefix + name;\n }\n const checkDuplicate = global[__symbol__('forceDuplicateZoneCheck')] === true;\n if (global['Zone']) {\n // if global['Zone'] already exists (maybe zone.js was already loaded or\n // some other lib also registered a global object named Zone), we may need\n // to throw an error, but sometimes user may not want this error.\n // For example,\n // we have two web pages, page1 includes zone.js, page2 doesn't.\n // and the 1st time user load page1 and page2, everything work fine,\n // but when user load page2 again, error occurs because global['Zone'] already exists.\n // so we add a flag to let user choose whether to throw this error or not.\n // By default, if existing Zone is from zone.js, we will not throw the error.\n if (checkDuplicate || typeof global['Zone'].__symbol__ !== 'function') {\n throw new Error('Zone already loaded.');\n }\n else {\n return global['Zone'];\n }\n }\n class Zone {\n // tslint:disable-next-line:require-internal-with-underscore\n static { this.__symbol__ = __symbol__; }\n static assertZonePatched() {\n if (global['Promise'] !== patches['ZoneAwarePromise']) {\n throw new Error('Zone.js has detected that ZoneAwarePromise `(window|global).Promise` ' +\n 'has been overwritten.\\n' +\n 'Most likely cause is that a Promise polyfill has been loaded ' +\n 'after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. ' +\n 'If you must load one, do so before loading zone.js.)');\n }\n }\n static get root() {\n let zone = Zone.current;\n while (zone.parent) {\n zone = zone.parent;\n }\n return zone;\n }\n static get current() {\n return _currentZoneFrame.zone;\n }\n static get currentTask() {\n return _currentTask;\n }\n // tslint:disable-next-line:require-internal-with-underscore\n static __load_patch(name, fn, ignoreDuplicate = false) {\n if (patches.hasOwnProperty(name)) {\n // `checkDuplicate` option is defined from global variable\n // so it works for all modules.\n // `ignoreDuplicate` can work for the specified module\n if (!ignoreDuplicate && checkDuplicate) {\n throw Error('Already loaded patch: ' + name);\n }\n }\n else if (!global['__Zone_disable_' + name]) {\n const perfName = 'Zone:' + name;\n mark(perfName);\n patches[name] = fn(global, Zone, _api);\n performanceMeasure(perfName, perfName);\n }\n }\n get parent() {\n return this._parent;\n }\n get name() {\n return this._name;\n }\n constructor(parent, zoneSpec) {\n this._parent = parent;\n this._name = zoneSpec ? zoneSpec.name || 'unnamed' : '';\n this._properties = zoneSpec && zoneSpec.properties || {};\n this._zoneDelegate =\n new _ZoneDelegate(this, this._parent && this._parent._zoneDelegate, zoneSpec);\n }\n get(key) {\n const zone = this.getZoneWith(key);\n if (zone)\n return zone._properties[key];\n }\n getZoneWith(key) {\n let current = this;\n while (current) {\n if (current._properties.hasOwnProperty(key)) {\n return current;\n }\n current = current._parent;\n }\n return null;\n }\n fork(zoneSpec) {\n if (!zoneSpec)\n throw new Error('ZoneSpec required!');\n return this._zoneDelegate.fork(this, zoneSpec);\n }\n wrap(callback, source) {\n if (typeof callback !== 'function') {\n throw new Error('Expecting function got: ' + callback);\n }\n const _callback = this._zoneDelegate.intercept(this, callback, source);\n const zone = this;\n return function () {\n return zone.runGuarded(_callback, this, arguments, source);\n };\n }\n run(callback, applyThis, applyArgs, source) {\n _currentZoneFrame = { parent: _currentZoneFrame, zone: this };\n try {\n return this._zoneDelegate.invoke(this, callback, applyThis, applyArgs, source);\n }\n finally {\n _currentZoneFrame = _currentZoneFrame.parent;\n }\n }\n runGuarded(callback, applyThis = null, applyArgs, source) {\n _currentZoneFrame = { parent: _currentZoneFrame, zone: this };\n try {\n try {\n return this._zoneDelegate.invoke(this, callback, applyThis, applyArgs, source);\n }\n catch (error) {\n if (this._zoneDelegate.handleError(this, error)) {\n throw error;\n }\n }\n }\n finally {\n _currentZoneFrame = _currentZoneFrame.parent;\n }\n }\n runTask(task, applyThis, applyArgs) {\n if (task.zone != this) {\n throw new Error('A task can only be run in the zone of creation! (Creation: ' +\n (task.zone || NO_ZONE).name + '; Execution: ' + this.name + ')');\n }\n // https://github.com/angular/zone.js/issues/778, sometimes eventTask\n // will run in notScheduled(canceled) state, we should not try to\n // run such kind of task but just return\n if (task.state === notScheduled && (task.type === eventTask || task.type === macroTask)) {\n return;\n }\n const reEntryGuard = task.state != running;\n reEntryGuard && task._transitionTo(running, scheduled);\n task.runCount++;\n const previousTask = _currentTask;\n _currentTask = task;\n _currentZoneFrame = { parent: _currentZoneFrame, zone: this };\n try {\n if (task.type == macroTask && task.data && !task.data.isPeriodic) {\n task.cancelFn = undefined;\n }\n try {\n return this._zoneDelegate.invokeTask(this, task, applyThis, applyArgs);\n }\n catch (error) {\n if (this._zoneDelegate.handleError(this, error)) {\n throw error;\n }\n }\n }\n finally {\n // if the task's state is notScheduled or unknown, then it has already been cancelled\n // we should not reset the state to scheduled\n if (task.state !== notScheduled && task.state !== unknown) {\n if (task.type == eventTask || (task.data && task.data.isPeriodic)) {\n reEntryGuard && task._transitionTo(scheduled, running);\n }\n else {\n task.runCount = 0;\n this._updateTaskCount(task, -1);\n reEntryGuard &&\n task._transitionTo(notScheduled, running, notScheduled);\n }\n }\n _currentZoneFrame = _currentZoneFrame.parent;\n _currentTask = previousTask;\n }\n }\n scheduleTask(task) {\n if (task.zone && task.zone !== this) {\n // check if the task was rescheduled, the newZone\n // should not be the children of the original zone\n let newZone = this;\n while (newZone) {\n if (newZone === task.zone) {\n throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${task.zone.name}`);\n }\n newZone = newZone.parent;\n }\n }\n task._transitionTo(scheduling, notScheduled);\n const zoneDelegates = [];\n task._zoneDelegates = zoneDelegates;\n task._zone = this;\n try {\n task = this._zoneDelegate.scheduleTask(this, task);\n }\n catch (err) {\n // should set task's state to unknown when scheduleTask throw error\n // because the err may from reschedule, so the fromState maybe notScheduled\n task._transitionTo(unknown, scheduling, notScheduled);\n // TODO: @JiaLiPassion, should we check the result from handleError?\n this._zoneDelegate.handleError(this, err);\n throw err;\n }\n if (task._zoneDelegates === zoneDelegates) {\n // we have to check because internally the delegate can reschedule the task.\n this._updateTaskCount(task, 1);\n }\n if (task.state == scheduling) {\n task._transitionTo(scheduled, scheduling);\n }\n return task;\n }\n scheduleMicroTask(source, callback, data, customSchedule) {\n return this.scheduleTask(new ZoneTask(microTask, source, callback, data, customSchedule, undefined));\n }\n scheduleMacroTask(source, callback, data, customSchedule, customCancel) {\n return this.scheduleTask(new ZoneTask(macroTask, source, callback, data, customSchedule, customCancel));\n }\n scheduleEventTask(source, callback, data, customSchedule, customCancel) {\n return this.scheduleTask(new ZoneTask(eventTask, source, callback, data, customSchedule, customCancel));\n }\n cancelTask(task) {\n if (task.zone != this)\n throw new Error('A task can only be cancelled in the zone of creation! (Creation: ' +\n (task.zone || NO_ZONE).name + '; Execution: ' + this.name + ')');\n if (task.state !== scheduled && task.state !== running) {\n return;\n }\n task._transitionTo(canceling, scheduled, running);\n try {\n this._zoneDelegate.cancelTask(this, task);\n }\n catch (err) {\n // if error occurs when cancelTask, transit the state to unknown\n task._transitionTo(unknown, canceling);\n this._zoneDelegate.handleError(this, err);\n throw err;\n }\n this._updateTaskCount(task, -1);\n task._transitionTo(notScheduled, canceling);\n task.runCount = 0;\n return task;\n }\n _updateTaskCount(task, count) {\n const zoneDelegates = task._zoneDelegates;\n if (count == -1) {\n task._zoneDelegates = null;\n }\n for (let i = 0; i < zoneDelegates.length; i++) {\n zoneDelegates[i]._updateTaskCount(task.type, count);\n }\n }\n }\n const DELEGATE_ZS = {\n name: '',\n onHasTask: (delegate, _, target, hasTaskState) => delegate.hasTask(target, hasTaskState),\n onScheduleTask: (delegate, _, target, task) => delegate.scheduleTask(target, task),\n onInvokeTask: (delegate, _, target, task, applyThis, applyArgs) => delegate.invokeTask(target, task, applyThis, applyArgs),\n onCancelTask: (delegate, _, target, task) => delegate.cancelTask(target, task)\n };\n class _ZoneDelegate {\n constructor(zone, parentDelegate, zoneSpec) {\n this._taskCounts = { 'microTask': 0, 'macroTask': 0, 'eventTask': 0 };\n this.zone = zone;\n this._parentDelegate = parentDelegate;\n this._forkZS = zoneSpec && (zoneSpec && zoneSpec.onFork ? zoneSpec : parentDelegate._forkZS);\n this._forkDlgt = zoneSpec && (zoneSpec.onFork ? parentDelegate : parentDelegate._forkDlgt);\n this._forkCurrZone = zoneSpec && (zoneSpec.onFork ? this.zone : parentDelegate._forkCurrZone);\n this._interceptZS =\n zoneSpec && (zoneSpec.onIntercept ? zoneSpec : parentDelegate._interceptZS);\n this._interceptDlgt =\n zoneSpec && (zoneSpec.onIntercept ? parentDelegate : parentDelegate._interceptDlgt);\n this._interceptCurrZone =\n zoneSpec && (zoneSpec.onIntercept ? this.zone : parentDelegate._interceptCurrZone);\n this._invokeZS = zoneSpec && (zoneSpec.onInvoke ? zoneSpec : parentDelegate._invokeZS);\n this._invokeDlgt =\n zoneSpec && (zoneSpec.onInvoke ? parentDelegate : parentDelegate._invokeDlgt);\n this._invokeCurrZone =\n zoneSpec && (zoneSpec.onInvoke ? this.zone : parentDelegate._invokeCurrZone);\n this._handleErrorZS =\n zoneSpec && (zoneSpec.onHandleError ? zoneSpec : parentDelegate._handleErrorZS);\n this._handleErrorDlgt =\n zoneSpec && (zoneSpec.onHandleError ? parentDelegate : parentDelegate._handleErrorDlgt);\n this._handleErrorCurrZone =\n zoneSpec && (zoneSpec.onHandleError ? this.zone : parentDelegate._handleErrorCurrZone);\n this._scheduleTaskZS =\n zoneSpec && (zoneSpec.onScheduleTask ? zoneSpec : parentDelegate._scheduleTaskZS);\n this._scheduleTaskDlgt =\n zoneSpec && (zoneSpec.onScheduleTask ? parentDelegate : parentDelegate._scheduleTaskDlgt);\n this._scheduleTaskCurrZone =\n zoneSpec && (zoneSpec.onScheduleTask ? this.zone : parentDelegate._scheduleTaskCurrZone);\n this._invokeTaskZS =\n zoneSpec && (zoneSpec.onInvokeTask ? zoneSpec : parentDelegate._invokeTaskZS);\n this._invokeTaskDlgt =\n zoneSpec && (zoneSpec.onInvokeTask ? parentDelegate : parentDelegate._invokeTaskDlgt);\n this._invokeTaskCurrZone =\n zoneSpec && (zoneSpec.onInvokeTask ? this.zone : parentDelegate._invokeTaskCurrZone);\n this._cancelTaskZS =\n zoneSpec && (zoneSpec.onCancelTask ? zoneSpec : parentDelegate._cancelTaskZS);\n this._cancelTaskDlgt =\n zoneSpec && (zoneSpec.onCancelTask ? parentDelegate : parentDelegate._cancelTaskDlgt);\n this._cancelTaskCurrZone =\n zoneSpec && (zoneSpec.onCancelTask ? this.zone : parentDelegate._cancelTaskCurrZone);\n this._hasTaskZS = null;\n this._hasTaskDlgt = null;\n this._hasTaskDlgtOwner = null;\n this._hasTaskCurrZone = null;\n const zoneSpecHasTask = zoneSpec && zoneSpec.onHasTask;\n const parentHasTask = parentDelegate && parentDelegate._hasTaskZS;\n if (zoneSpecHasTask || parentHasTask) {\n // If we need to report hasTask, than this ZS needs to do ref counting on tasks. In such\n // a case all task related interceptors must go through this ZD. We can't short circuit it.\n this._hasTaskZS = zoneSpecHasTask ? zoneSpec : DELEGATE_ZS;\n this._hasTaskDlgt = parentDelegate;\n this._hasTaskDlgtOwner = this;\n this._hasTaskCurrZone = zone;\n if (!zoneSpec.onScheduleTask) {\n this._scheduleTaskZS = DELEGATE_ZS;\n this._scheduleTaskDlgt = parentDelegate;\n this._scheduleTaskCurrZone = this.zone;\n }\n if (!zoneSpec.onInvokeTask) {\n this._invokeTaskZS = DELEGATE_ZS;\n this._invokeTaskDlgt = parentDelegate;\n this._invokeTaskCurrZone = this.zone;\n }\n if (!zoneSpec.onCancelTask) {\n this._cancelTaskZS = DELEGATE_ZS;\n this._cancelTaskDlgt = parentDelegate;\n this._cancelTaskCurrZone = this.zone;\n }\n }\n }\n fork(targetZone, zoneSpec) {\n return this._forkZS ? this._forkZS.onFork(this._forkDlgt, this.zone, targetZone, zoneSpec) :\n new Zone(targetZone, zoneSpec);\n }\n intercept(targetZone, callback, source) {\n return this._interceptZS ?\n this._interceptZS.onIntercept(this._interceptDlgt, this._interceptCurrZone, targetZone, callback, source) :\n callback;\n }\n invoke(targetZone, callback, applyThis, applyArgs, source) {\n return this._invokeZS ? this._invokeZS.onInvoke(this._invokeDlgt, this._invokeCurrZone, targetZone, callback, applyThis, applyArgs, source) :\n callback.apply(applyThis, applyArgs);\n }\n handleError(targetZone, error) {\n return this._handleErrorZS ?\n this._handleErrorZS.onHandleError(this._handleErrorDlgt, this._handleErrorCurrZone, targetZone, error) :\n true;\n }\n scheduleTask(targetZone, task) {\n let returnTask = task;\n if (this._scheduleTaskZS) {\n if (this._hasTaskZS) {\n returnTask._zoneDelegates.push(this._hasTaskDlgtOwner);\n }\n // clang-format off\n returnTask = this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt, this._scheduleTaskCurrZone, targetZone, task);\n // clang-format on\n if (!returnTask)\n returnTask = task;\n }\n else {\n if (task.scheduleFn) {\n task.scheduleFn(task);\n }\n else if (task.type == microTask) {\n scheduleMicroTask(task);\n }\n else {\n throw new Error('Task is missing scheduleFn.');\n }\n }\n return returnTask;\n }\n invokeTask(targetZone, task, applyThis, applyArgs) {\n return this._invokeTaskZS ?\n this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt, this._invokeTaskCurrZone, targetZone, task, applyThis, applyArgs) :\n task.callback.apply(applyThis, applyArgs);\n }\n cancelTask(targetZone, task) {\n let value;\n if (this._cancelTaskZS) {\n value = this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt, this._cancelTaskCurrZone, targetZone, task);\n }\n else {\n if (!task.cancelFn) {\n throw Error('Task is not cancelable');\n }\n value = task.cancelFn(task);\n }\n return value;\n }\n hasTask(targetZone, isEmpty) {\n // hasTask should not throw error so other ZoneDelegate\n // can still trigger hasTask callback\n try {\n this._hasTaskZS &&\n this._hasTaskZS.onHasTask(this._hasTaskDlgt, this._hasTaskCurrZone, targetZone, isEmpty);\n }\n catch (err) {\n this.handleError(targetZone, err);\n }\n }\n // tslint:disable-next-line:require-internal-with-underscore\n _updateTaskCount(type, count) {\n const counts = this._taskCounts;\n const prev = counts[type];\n const next = counts[type] = prev + count;\n if (next < 0) {\n throw new Error('More tasks executed then were scheduled.');\n }\n if (prev == 0 || next == 0) {\n const isEmpty = {\n microTask: counts['microTask'] > 0,\n macroTask: counts['macroTask'] > 0,\n eventTask: counts['eventTask'] > 0,\n change: type\n };\n this.hasTask(this.zone, isEmpty);\n }\n }\n }\n class ZoneTask {\n constructor(type, source, callback, options, scheduleFn, cancelFn) {\n // tslint:disable-next-line:require-internal-with-underscore\n this._zone = null;\n this.runCount = 0;\n // tslint:disable-next-line:require-internal-with-underscore\n this._zoneDelegates = null;\n // tslint:disable-next-line:require-internal-with-underscore\n this._state = 'notScheduled';\n this.type = type;\n this.source = source;\n this.data = options;\n this.scheduleFn = scheduleFn;\n this.cancelFn = cancelFn;\n if (!callback) {\n throw new Error('callback is not defined');\n }\n this.callback = callback;\n const self = this;\n // TODO: @JiaLiPassion options should have interface\n if (type === eventTask && options && options.useG) {\n this.invoke = ZoneTask.invokeTask;\n }\n else {\n this.invoke = function () {\n return ZoneTask.invokeTask.call(global, self, this, arguments);\n };\n }\n }\n static invokeTask(task, target, args) {\n if (!task) {\n task = this;\n }\n _numberOfNestedTaskFrames++;\n try {\n task.runCount++;\n return task.zone.runTask(task, target, args);\n }\n finally {\n if (_numberOfNestedTaskFrames == 1) {\n drainMicroTaskQueue();\n }\n _numberOfNestedTaskFrames--;\n }\n }\n get zone() {\n return this._zone;\n }\n get state() {\n return this._state;\n }\n cancelScheduleRequest() {\n this._transitionTo(notScheduled, scheduling);\n }\n // tslint:disable-next-line:require-internal-with-underscore\n _transitionTo(toState, fromState1, fromState2) {\n if (this._state === fromState1 || this._state === fromState2) {\n this._state = toState;\n if (toState == notScheduled) {\n this._zoneDelegates = null;\n }\n }\n else {\n throw new Error(`${this.type} '${this.source}': can not transition to '${toState}', expecting state '${fromState1}'${fromState2 ? ' or \\'' + fromState2 + '\\'' : ''}, was '${this._state}'.`);\n }\n }\n toString() {\n if (this.data && typeof this.data.handleId !== 'undefined') {\n return this.data.handleId.toString();\n }\n else {\n return Object.prototype.toString.call(this);\n }\n }\n // add toJSON method to prevent cyclic error when\n // call JSON.stringify(zoneTask)\n toJSON() {\n return {\n type: this.type,\n state: this.state,\n source: this.source,\n zone: this.zone.name,\n runCount: this.runCount\n };\n }\n }\n //////////////////////////////////////////////////////\n //////////////////////////////////////////////////////\n /// MICROTASK QUEUE\n //////////////////////////////////////////////////////\n //////////////////////////////////////////////////////\n const symbolSetTimeout = __symbol__('setTimeout');\n const symbolPromise = __symbol__('Promise');\n const symbolThen = __symbol__('then');\n let _microTaskQueue = [];\n let _isDrainingMicrotaskQueue = false;\n let nativeMicroTaskQueuePromise;\n function nativeScheduleMicroTask(func) {\n if (!nativeMicroTaskQueuePromise) {\n if (global[symbolPromise]) {\n nativeMicroTaskQueuePromise = global[symbolPromise].resolve(0);\n }\n }\n if (nativeMicroTaskQueuePromise) {\n let nativeThen = nativeMicroTaskQueuePromise[symbolThen];\n if (!nativeThen) {\n // native Promise is not patchable, we need to use `then` directly\n // issue 1078\n nativeThen = nativeMicroTaskQueuePromise['then'];\n }\n nativeThen.call(nativeMicroTaskQueuePromise, func);\n }\n else {\n global[symbolSetTimeout](func, 0);\n }\n }\n function scheduleMicroTask(task) {\n // if we are not running in any task, and there has not been anything scheduled\n // we must bootstrap the initial task creation by manually scheduling the drain\n if (_numberOfNestedTaskFrames === 0 && _microTaskQueue.length === 0) {\n // We are not running in Task, so we need to kickstart the microtask queue.\n nativeScheduleMicroTask(drainMicroTaskQueue);\n }\n task && _microTaskQueue.push(task);\n }\n function drainMicroTaskQueue() {\n if (!_isDrainingMicrotaskQueue) {\n _isDrainingMicrotaskQueue = true;\n while (_microTaskQueue.length) {\n const queue = _microTaskQueue;\n _microTaskQueue = [];\n for (let i = 0; i < queue.length; i++) {\n const task = queue[i];\n try {\n task.zone.runTask(task, null, null);\n }\n catch (error) {\n _api.onUnhandledError(error);\n }\n }\n }\n _api.microtaskDrainDone();\n _isDrainingMicrotaskQueue = false;\n }\n }\n //////////////////////////////////////////////////////\n //////////////////////////////////////////////////////\n /// BOOTSTRAP\n //////////////////////////////////////////////////////\n //////////////////////////////////////////////////////\n const NO_ZONE = {\n name: 'NO ZONE'\n };\n const notScheduled = 'notScheduled', scheduling = 'scheduling', scheduled = 'scheduled', running = 'running', canceling = 'canceling', unknown = 'unknown';\n const microTask = 'microTask', macroTask = 'macroTask', eventTask = 'eventTask';\n const patches = {};\n const _api = {\n symbol: __symbol__,\n currentZoneFrame: () => _currentZoneFrame,\n onUnhandledError: noop,\n microtaskDrainDone: noop,\n scheduleMicroTask: scheduleMicroTask,\n showUncaughtError: () => !Zone[__symbol__('ignoreConsoleErrorUncaughtError')],\n patchEventTarget: () => [],\n patchOnProperties: noop,\n patchMethod: () => noop,\n bindArguments: () => [],\n patchThen: () => noop,\n patchMacroTask: () => noop,\n patchEventPrototype: () => noop,\n isIEOrEdge: () => false,\n getGlobalObjects: () => undefined,\n ObjectDefineProperty: () => noop,\n ObjectGetOwnPropertyDescriptor: () => undefined,\n ObjectCreate: () => undefined,\n ArraySlice: () => [],\n patchClass: () => noop,\n wrapWithCurrentZone: () => noop,\n filterProperties: () => [],\n attachOriginToPatched: () => noop,\n _redefineProperty: () => noop,\n patchCallbacks: () => noop,\n nativeScheduleMicroTask: nativeScheduleMicroTask\n };\n let _currentZoneFrame = { parent: null, zone: new Zone(null, null) };\n let _currentTask = null;\n let _numberOfNestedTaskFrames = 0;\n function noop() { }\n performanceMeasure('Zone', 'Zone');\n return global['Zone'] = Zone;\n})(globalThis);\n\n/**\n * Suppress closure compiler errors about unknown 'Zone' variable\n * @fileoverview\n * @suppress {undefinedVars,globalThis,missingRequire}\n */\n/// \n// issue #989, to reduce bundle size, use short name\n/** Object.getOwnPropertyDescriptor */\nconst ObjectGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n/** Object.defineProperty */\nconst ObjectDefineProperty = Object.defineProperty;\n/** Object.getPrototypeOf */\nconst ObjectGetPrototypeOf = Object.getPrototypeOf;\n/** Object.create */\nconst ObjectCreate = Object.create;\n/** Array.prototype.slice */\nconst ArraySlice = Array.prototype.slice;\n/** addEventListener string const */\nconst ADD_EVENT_LISTENER_STR = 'addEventListener';\n/** removeEventListener string const */\nconst REMOVE_EVENT_LISTENER_STR = 'removeEventListener';\n/** zoneSymbol addEventListener */\nconst ZONE_SYMBOL_ADD_EVENT_LISTENER = Zone.__symbol__(ADD_EVENT_LISTENER_STR);\n/** zoneSymbol removeEventListener */\nconst ZONE_SYMBOL_REMOVE_EVENT_LISTENER = Zone.__symbol__(REMOVE_EVENT_LISTENER_STR);\n/** true string const */\nconst TRUE_STR = 'true';\n/** false string const */\nconst FALSE_STR = 'false';\n/** Zone symbol prefix string const. */\nconst ZONE_SYMBOL_PREFIX = Zone.__symbol__('');\nfunction wrapWithCurrentZone(callback, source) {\n return Zone.current.wrap(callback, source);\n}\nfunction scheduleMacroTaskWithCurrentZone(source, callback, data, customSchedule, customCancel) {\n return Zone.current.scheduleMacroTask(source, callback, data, customSchedule, customCancel);\n}\nconst zoneSymbol = Zone.__symbol__;\nconst isWindowExists = typeof window !== 'undefined';\nconst internalWindow = isWindowExists ? window : undefined;\nconst _global = isWindowExists && internalWindow || globalThis;\nconst REMOVE_ATTRIBUTE = 'removeAttribute';\nfunction bindArguments(args, source) {\n for (let i = args.length - 1; i >= 0; i--) {\n if (typeof args[i] === 'function') {\n args[i] = wrapWithCurrentZone(args[i], source + '_' + i);\n }\n }\n return args;\n}\nfunction patchPrototype(prototype, fnNames) {\n const source = prototype.constructor['name'];\n for (let i = 0; i < fnNames.length; i++) {\n const name = fnNames[i];\n const delegate = prototype[name];\n if (delegate) {\n const prototypeDesc = ObjectGetOwnPropertyDescriptor(prototype, name);\n if (!isPropertyWritable(prototypeDesc)) {\n continue;\n }\n prototype[name] = ((delegate) => {\n const patched = function () {\n return delegate.apply(this, bindArguments(arguments, source + '.' + name));\n };\n attachOriginToPatched(patched, delegate);\n return patched;\n })(delegate);\n }\n }\n}\nfunction isPropertyWritable(propertyDesc) {\n if (!propertyDesc) {\n return true;\n }\n if (propertyDesc.writable === false) {\n return false;\n }\n return !(typeof propertyDesc.get === 'function' && typeof propertyDesc.set === 'undefined');\n}\nconst isWebWorker = (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope);\n// Make sure to access `process` through `_global` so that WebPack does not accidentally browserify\n// this code.\nconst isNode = (!('nw' in _global) && typeof _global.process !== 'undefined' &&\n {}.toString.call(_global.process) === '[object process]');\nconst isBrowser = !isNode && !isWebWorker && !!(isWindowExists && internalWindow['HTMLElement']);\n// we are in electron of nw, so we are both browser and nodejs\n// Make sure to access `process` through `_global` so that WebPack does not accidentally browserify\n// this code.\nconst isMix = typeof _global.process !== 'undefined' &&\n {}.toString.call(_global.process) === '[object process]' && !isWebWorker &&\n !!(isWindowExists && internalWindow['HTMLElement']);\nconst zoneSymbolEventNames$1 = {};\nconst wrapFn = function (event) {\n // https://github.com/angular/zone.js/issues/911, in IE, sometimes\n // event will be undefined, so we need to use window.event\n event = event || _global.event;\n if (!event) {\n return;\n }\n let eventNameSymbol = zoneSymbolEventNames$1[event.type];\n if (!eventNameSymbol) {\n eventNameSymbol = zoneSymbolEventNames$1[event.type] = zoneSymbol('ON_PROPERTY' + event.type);\n }\n const target = this || event.target || _global;\n const listener = target[eventNameSymbol];\n let result;\n if (isBrowser && target === internalWindow && event.type === 'error') {\n // window.onerror have different signature\n // https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onerror#window.onerror\n // and onerror callback will prevent default when callback return true\n const errorEvent = event;\n result = listener &&\n listener.call(this, errorEvent.message, errorEvent.filename, errorEvent.lineno, errorEvent.colno, errorEvent.error);\n if (result === true) {\n event.preventDefault();\n }\n }\n else {\n result = listener && listener.apply(this, arguments);\n if (result != undefined && !result) {\n event.preventDefault();\n }\n }\n return result;\n};\nfunction patchProperty(obj, prop, prototype) {\n let desc = ObjectGetOwnPropertyDescriptor(obj, prop);\n if (!desc && prototype) {\n // when patch window object, use prototype to check prop exist or not\n const prototypeDesc = ObjectGetOwnPropertyDescriptor(prototype, prop);\n if (prototypeDesc) {\n desc = { enumerable: true, configurable: true };\n }\n }\n // if the descriptor not exists or is not configurable\n // just return\n if (!desc || !desc.configurable) {\n return;\n }\n const onPropPatchedSymbol = zoneSymbol('on' + prop + 'patched');\n if (obj.hasOwnProperty(onPropPatchedSymbol) && obj[onPropPatchedSymbol]) {\n return;\n }\n // A property descriptor cannot have getter/setter and be writable\n // deleting the writable and value properties avoids this error:\n //\n // TypeError: property descriptors must not specify a value or be writable when a\n // getter or setter has been specified\n delete desc.writable;\n delete desc.value;\n const originalDescGet = desc.get;\n const originalDescSet = desc.set;\n // slice(2) cuz 'onclick' -> 'click', etc\n const eventName = prop.slice(2);\n let eventNameSymbol = zoneSymbolEventNames$1[eventName];\n if (!eventNameSymbol) {\n eventNameSymbol = zoneSymbolEventNames$1[eventName] = zoneSymbol('ON_PROPERTY' + eventName);\n }\n desc.set = function (newValue) {\n // in some of windows's onproperty callback, this is undefined\n // so we need to check it\n let target = this;\n if (!target && obj === _global) {\n target = _global;\n }\n if (!target) {\n return;\n }\n const previousValue = target[eventNameSymbol];\n if (typeof previousValue === 'function') {\n target.removeEventListener(eventName, wrapFn);\n }\n // issue #978, when onload handler was added before loading zone.js\n // we should remove it with originalDescSet\n originalDescSet && originalDescSet.call(target, null);\n target[eventNameSymbol] = newValue;\n if (typeof newValue === 'function') {\n target.addEventListener(eventName, wrapFn, false);\n }\n };\n // The getter would return undefined for unassigned properties but the default value of an\n // unassigned property is null\n desc.get = function () {\n // in some of windows's onproperty callback, this is undefined\n // so we need to check it\n let target = this;\n if (!target && obj === _global) {\n target = _global;\n }\n if (!target) {\n return null;\n }\n const listener = target[eventNameSymbol];\n if (listener) {\n return listener;\n }\n else if (originalDescGet) {\n // result will be null when use inline event attribute,\n // such as \n // because the onclick function is internal raw uncompiled handler\n // the onclick will be evaluated when first time event was triggered or\n // the property is accessed, https://github.com/angular/zone.js/issues/525\n // so we should use original native get to retrieve the handler\n let value = originalDescGet.call(this);\n if (value) {\n desc.set.call(this, value);\n if (typeof target[REMOVE_ATTRIBUTE] === 'function') {\n target.removeAttribute(prop);\n }\n return value;\n }\n }\n return null;\n };\n ObjectDefineProperty(obj, prop, desc);\n obj[onPropPatchedSymbol] = true;\n}\nfunction patchOnProperties(obj, properties, prototype) {\n if (properties) {\n for (let i = 0; i < properties.length; i++) {\n patchProperty(obj, 'on' + properties[i], prototype);\n }\n }\n else {\n const onProperties = [];\n for (const prop in obj) {\n if (prop.slice(0, 2) == 'on') {\n onProperties.push(prop);\n }\n }\n for (let j = 0; j < onProperties.length; j++) {\n patchProperty(obj, onProperties[j], prototype);\n }\n }\n}\nconst originalInstanceKey = zoneSymbol('originalInstance');\n// wrap some native API on `window`\nfunction patchClass(className) {\n const OriginalClass = _global[className];\n if (!OriginalClass)\n return;\n // keep original class in global\n _global[zoneSymbol(className)] = OriginalClass;\n _global[className] = function () {\n const a = bindArguments(arguments, className);\n switch (a.length) {\n case 0:\n this[originalInstanceKey] = new OriginalClass();\n break;\n case 1:\n this[originalInstanceKey] = new OriginalClass(a[0]);\n break;\n case 2:\n this[originalInstanceKey] = new OriginalClass(a[0], a[1]);\n break;\n case 3:\n this[originalInstanceKey] = new OriginalClass(a[0], a[1], a[2]);\n break;\n case 4:\n this[originalInstanceKey] = new OriginalClass(a[0], a[1], a[2], a[3]);\n break;\n default:\n throw new Error('Arg list too long.');\n }\n };\n // attach original delegate to patched function\n attachOriginToPatched(_global[className], OriginalClass);\n const instance = new OriginalClass(function () { });\n let prop;\n for (prop in instance) {\n // https://bugs.webkit.org/show_bug.cgi?id=44721\n if (className === 'XMLHttpRequest' && prop === 'responseBlob')\n continue;\n (function (prop) {\n if (typeof instance[prop] === 'function') {\n _global[className].prototype[prop] = function () {\n return this[originalInstanceKey][prop].apply(this[originalInstanceKey], arguments);\n };\n }\n else {\n ObjectDefineProperty(_global[className].prototype, prop, {\n set: function (fn) {\n if (typeof fn === 'function') {\n this[originalInstanceKey][prop] = wrapWithCurrentZone(fn, className + '.' + prop);\n // keep callback in wrapped function so we can\n // use it in Function.prototype.toString to return\n // the native one.\n attachOriginToPatched(this[originalInstanceKey][prop], fn);\n }\n else {\n this[originalInstanceKey][prop] = fn;\n }\n },\n get: function () {\n return this[originalInstanceKey][prop];\n }\n });\n }\n }(prop));\n }\n for (prop in OriginalClass) {\n if (prop !== 'prototype' && OriginalClass.hasOwnProperty(prop)) {\n _global[className][prop] = OriginalClass[prop];\n }\n }\n}\nfunction patchMethod(target, name, patchFn) {\n let proto = target;\n while (proto && !proto.hasOwnProperty(name)) {\n proto = ObjectGetPrototypeOf(proto);\n }\n if (!proto && target[name]) {\n // somehow we did not find it, but we can see it. This happens on IE for Window properties.\n proto = target;\n }\n const delegateName = zoneSymbol(name);\n let delegate = null;\n if (proto && (!(delegate = proto[delegateName]) || !proto.hasOwnProperty(delegateName))) {\n delegate = proto[delegateName] = proto[name];\n // check whether proto[name] is writable\n // some property is readonly in safari, such as HtmlCanvasElement.prototype.toBlob\n const desc = proto && ObjectGetOwnPropertyDescriptor(proto, name);\n if (isPropertyWritable(desc)) {\n const patchDelegate = patchFn(delegate, delegateName, name);\n proto[name] = function () {\n return patchDelegate(this, arguments);\n };\n attachOriginToPatched(proto[name], delegate);\n }\n }\n return delegate;\n}\n// TODO: @JiaLiPassion, support cancel task later if necessary\nfunction patchMacroTask(obj, funcName, metaCreator) {\n let setNative = null;\n function scheduleTask(task) {\n const data = task.data;\n data.args[data.cbIdx] = function () {\n task.invoke.apply(this, arguments);\n };\n setNative.apply(data.target, data.args);\n return task;\n }\n setNative = patchMethod(obj, funcName, (delegate) => function (self, args) {\n const meta = metaCreator(self, args);\n if (meta.cbIdx >= 0 && typeof args[meta.cbIdx] === 'function') {\n return scheduleMacroTaskWithCurrentZone(meta.name, args[meta.cbIdx], meta, scheduleTask);\n }\n else {\n // cause an error by calling it directly.\n return delegate.apply(self, args);\n }\n });\n}\nfunction attachOriginToPatched(patched, original) {\n patched[zoneSymbol('OriginalDelegate')] = original;\n}\nlet isDetectedIEOrEdge = false;\nlet ieOrEdge = false;\nfunction isIE() {\n try {\n const ua = internalWindow.navigator.userAgent;\n if (ua.indexOf('MSIE ') !== -1 || ua.indexOf('Trident/') !== -1) {\n return true;\n }\n }\n catch (error) {\n }\n return false;\n}\nfunction isIEOrEdge() {\n if (isDetectedIEOrEdge) {\n return ieOrEdge;\n }\n isDetectedIEOrEdge = true;\n try {\n const ua = internalWindow.navigator.userAgent;\n if (ua.indexOf('MSIE ') !== -1 || ua.indexOf('Trident/') !== -1 || ua.indexOf('Edge/') !== -1) {\n ieOrEdge = true;\n }\n }\n catch (error) {\n }\n return ieOrEdge;\n}\n\nZone.__load_patch('ZoneAwarePromise', (global, Zone, api) => {\n const ObjectGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n const ObjectDefineProperty = Object.defineProperty;\n function readableObjectToString(obj) {\n if (obj && obj.toString === Object.prototype.toString) {\n const className = obj.constructor && obj.constructor.name;\n return (className ? className : '') + ': ' + JSON.stringify(obj);\n }\n return obj ? obj.toString() : Object.prototype.toString.call(obj);\n }\n const __symbol__ = api.symbol;\n const _uncaughtPromiseErrors = [];\n const isDisableWrappingUncaughtPromiseRejection = global[__symbol__('DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION')] !== false;\n const symbolPromise = __symbol__('Promise');\n const symbolThen = __symbol__('then');\n const creationTrace = '__creationTrace__';\n api.onUnhandledError = (e) => {\n if (api.showUncaughtError()) {\n const rejection = e && e.rejection;\n if (rejection) {\n console.error('Unhandled Promise rejection:', rejection instanceof Error ? rejection.message : rejection, '; Zone:', e.zone.name, '; Task:', e.task && e.task.source, '; Value:', rejection, rejection instanceof Error ? rejection.stack : undefined);\n }\n else {\n console.error(e);\n }\n }\n };\n api.microtaskDrainDone = () => {\n while (_uncaughtPromiseErrors.length) {\n const uncaughtPromiseError = _uncaughtPromiseErrors.shift();\n try {\n uncaughtPromiseError.zone.runGuarded(() => {\n if (uncaughtPromiseError.throwOriginal) {\n throw uncaughtPromiseError.rejection;\n }\n throw uncaughtPromiseError;\n });\n }\n catch (error) {\n handleUnhandledRejection(error);\n }\n }\n };\n const UNHANDLED_PROMISE_REJECTION_HANDLER_SYMBOL = __symbol__('unhandledPromiseRejectionHandler');\n function handleUnhandledRejection(e) {\n api.onUnhandledError(e);\n try {\n const handler = Zone[UNHANDLED_PROMISE_REJECTION_HANDLER_SYMBOL];\n if (typeof handler === 'function') {\n handler.call(this, e);\n }\n }\n catch (err) {\n }\n }\n function isThenable(value) {\n return value && value.then;\n }\n function forwardResolution(value) {\n return value;\n }\n function forwardRejection(rejection) {\n return ZoneAwarePromise.reject(rejection);\n }\n const symbolState = __symbol__('state');\n const symbolValue = __symbol__('value');\n const symbolFinally = __symbol__('finally');\n const symbolParentPromiseValue = __symbol__('parentPromiseValue');\n const symbolParentPromiseState = __symbol__('parentPromiseState');\n const source = 'Promise.then';\n const UNRESOLVED = null;\n const RESOLVED = true;\n const REJECTED = false;\n const REJECTED_NO_CATCH = 0;\n function makeResolver(promise, state) {\n return (v) => {\n try {\n resolvePromise(promise, state, v);\n }\n catch (err) {\n resolvePromise(promise, false, err);\n }\n // Do not return value or you will break the Promise spec.\n };\n }\n const once = function () {\n let wasCalled = false;\n return function wrapper(wrappedFunction) {\n return function () {\n if (wasCalled) {\n return;\n }\n wasCalled = true;\n wrappedFunction.apply(null, arguments);\n };\n };\n };\n const TYPE_ERROR = 'Promise resolved with itself';\n const CURRENT_TASK_TRACE_SYMBOL = __symbol__('currentTaskTrace');\n // Promise Resolution\n function resolvePromise(promise, state, value) {\n const onceWrapper = once();\n if (promise === value) {\n throw new TypeError(TYPE_ERROR);\n }\n if (promise[symbolState] === UNRESOLVED) {\n // should only get value.then once based on promise spec.\n let then = null;\n try {\n if (typeof value === 'object' || typeof value === 'function') {\n then = value && value.then;\n }\n }\n catch (err) {\n onceWrapper(() => {\n resolvePromise(promise, false, err);\n })();\n return promise;\n }\n // if (value instanceof ZoneAwarePromise) {\n if (state !== REJECTED && value instanceof ZoneAwarePromise &&\n value.hasOwnProperty(symbolState) && value.hasOwnProperty(symbolValue) &&\n value[symbolState] !== UNRESOLVED) {\n clearRejectedNoCatch(value);\n resolvePromise(promise, value[symbolState], value[symbolValue]);\n }\n else if (state !== REJECTED && typeof then === 'function') {\n try {\n then.call(value, onceWrapper(makeResolver(promise, state)), onceWrapper(makeResolver(promise, false)));\n }\n catch (err) {\n onceWrapper(() => {\n resolvePromise(promise, false, err);\n })();\n }\n }\n else {\n promise[symbolState] = state;\n const queue = promise[symbolValue];\n promise[symbolValue] = value;\n if (promise[symbolFinally] === symbolFinally) {\n // the promise is generated by Promise.prototype.finally\n if (state === RESOLVED) {\n // the state is resolved, should ignore the value\n // and use parent promise value\n promise[symbolState] = promise[symbolParentPromiseState];\n promise[symbolValue] = promise[symbolParentPromiseValue];\n }\n }\n // record task information in value when error occurs, so we can\n // do some additional work such as render longStackTrace\n if (state === REJECTED && value instanceof Error) {\n // check if longStackTraceZone is here\n const trace = Zone.currentTask && Zone.currentTask.data &&\n Zone.currentTask.data[creationTrace];\n if (trace) {\n // only keep the long stack trace into error when in longStackTraceZone\n ObjectDefineProperty(value, CURRENT_TASK_TRACE_SYMBOL, { configurable: true, enumerable: false, writable: true, value: trace });\n }\n }\n for (let i = 0; i < queue.length;) {\n scheduleResolveOrReject(promise, queue[i++], queue[i++], queue[i++], queue[i++]);\n }\n if (queue.length == 0 && state == REJECTED) {\n promise[symbolState] = REJECTED_NO_CATCH;\n let uncaughtPromiseError = value;\n try {\n // Here we throws a new Error to print more readable error log\n // and if the value is not an error, zone.js builds an `Error`\n // Object here to attach the stack information.\n throw new Error('Uncaught (in promise): ' + readableObjectToString(value) +\n (value && value.stack ? '\\n' + value.stack : ''));\n }\n catch (err) {\n uncaughtPromiseError = err;\n }\n if (isDisableWrappingUncaughtPromiseRejection) {\n // If disable wrapping uncaught promise reject\n // use the value instead of wrapping it.\n uncaughtPromiseError.throwOriginal = true;\n }\n uncaughtPromiseError.rejection = value;\n uncaughtPromiseError.promise = promise;\n uncaughtPromiseError.zone = Zone.current;\n uncaughtPromiseError.task = Zone.currentTask;\n _uncaughtPromiseErrors.push(uncaughtPromiseError);\n api.scheduleMicroTask(); // to make sure that it is running\n }\n }\n }\n // Resolving an already resolved promise is a noop.\n return promise;\n }\n const REJECTION_HANDLED_HANDLER = __symbol__('rejectionHandledHandler');\n function clearRejectedNoCatch(promise) {\n if (promise[symbolState] === REJECTED_NO_CATCH) {\n // if the promise is rejected no catch status\n // and queue.length > 0, means there is a error handler\n // here to handle the rejected promise, we should trigger\n // windows.rejectionhandled eventHandler or nodejs rejectionHandled\n // eventHandler\n try {\n const handler = Zone[REJECTION_HANDLED_HANDLER];\n if (handler && typeof handler === 'function') {\n handler.call(this, { rejection: promise[symbolValue], promise: promise });\n }\n }\n catch (err) {\n }\n promise[symbolState] = REJECTED;\n for (let i = 0; i < _uncaughtPromiseErrors.length; i++) {\n if (promise === _uncaughtPromiseErrors[i].promise) {\n _uncaughtPromiseErrors.splice(i, 1);\n }\n }\n }\n }\n function scheduleResolveOrReject(promise, zone, chainPromise, onFulfilled, onRejected) {\n clearRejectedNoCatch(promise);\n const promiseState = promise[symbolState];\n const delegate = promiseState ?\n (typeof onFulfilled === 'function') ? onFulfilled : forwardResolution :\n (typeof onRejected === 'function') ? onRejected :\n forwardRejection;\n zone.scheduleMicroTask(source, () => {\n try {\n const parentPromiseValue = promise[symbolValue];\n const isFinallyPromise = !!chainPromise && symbolFinally === chainPromise[symbolFinally];\n if (isFinallyPromise) {\n // if the promise is generated from finally call, keep parent promise's state and value\n chainPromise[symbolParentPromiseValue] = parentPromiseValue;\n chainPromise[symbolParentPromiseState] = promiseState;\n }\n // should not pass value to finally callback\n const value = zone.run(delegate, undefined, isFinallyPromise && delegate !== forwardRejection && delegate !== forwardResolution ?\n [] :\n [parentPromiseValue]);\n resolvePromise(chainPromise, true, value);\n }\n catch (error) {\n // if error occurs, should always return this error\n resolvePromise(chainPromise, false, error);\n }\n }, chainPromise);\n }\n const ZONE_AWARE_PROMISE_TO_STRING = 'function ZoneAwarePromise() { [native code] }';\n const noop = function () { };\n const AggregateError = global.AggregateError;\n class ZoneAwarePromise {\n static toString() {\n return ZONE_AWARE_PROMISE_TO_STRING;\n }\n static resolve(value) {\n if (value instanceof ZoneAwarePromise) {\n return value;\n }\n return resolvePromise(new this(null), RESOLVED, value);\n }\n static reject(error) {\n return resolvePromise(new this(null), REJECTED, error);\n }\n static withResolvers() {\n const result = {};\n result.promise = new ZoneAwarePromise((res, rej) => {\n result.resolve = res;\n result.reject = rej;\n });\n return result;\n }\n static any(values) {\n if (!values || typeof values[Symbol.iterator] !== 'function') {\n return Promise.reject(new AggregateError([], 'All promises were rejected'));\n }\n const promises = [];\n let count = 0;\n try {\n for (let v of values) {\n count++;\n promises.push(ZoneAwarePromise.resolve(v));\n }\n }\n catch (err) {\n return Promise.reject(new AggregateError([], 'All promises were rejected'));\n }\n if (count === 0) {\n return Promise.reject(new AggregateError([], 'All promises were rejected'));\n }\n let finished = false;\n const errors = [];\n return new ZoneAwarePromise((resolve, reject) => {\n for (let i = 0; i < promises.length; i++) {\n promises[i].then(v => {\n if (finished) {\n return;\n }\n finished = true;\n resolve(v);\n }, err => {\n errors.push(err);\n count--;\n if (count === 0) {\n finished = true;\n reject(new AggregateError(errors, 'All promises were rejected'));\n }\n });\n }\n });\n }\n ;\n static race(values) {\n let resolve;\n let reject;\n let promise = new this((res, rej) => {\n resolve = res;\n reject = rej;\n });\n function onResolve(value) {\n resolve(value);\n }\n function onReject(error) {\n reject(error);\n }\n for (let value of values) {\n if (!isThenable(value)) {\n value = this.resolve(value);\n }\n value.then(onResolve, onReject);\n }\n return promise;\n }\n static all(values) {\n return ZoneAwarePromise.allWithCallback(values);\n }\n static allSettled(values) {\n const P = this && this.prototype instanceof ZoneAwarePromise ? this : ZoneAwarePromise;\n return P.allWithCallback(values, {\n thenCallback: (value) => ({ status: 'fulfilled', value }),\n errorCallback: (err) => ({ status: 'rejected', reason: err })\n });\n }\n static allWithCallback(values, callback) {\n let resolve;\n let reject;\n let promise = new this((res, rej) => {\n resolve = res;\n reject = rej;\n });\n // Start at 2 to prevent prematurely resolving if .then is called immediately.\n let unresolvedCount = 2;\n let valueIndex = 0;\n const resolvedValues = [];\n for (let value of values) {\n if (!isThenable(value)) {\n value = this.resolve(value);\n }\n const curValueIndex = valueIndex;\n try {\n value.then((value) => {\n resolvedValues[curValueIndex] = callback ? callback.thenCallback(value) : value;\n unresolvedCount--;\n if (unresolvedCount === 0) {\n resolve(resolvedValues);\n }\n }, (err) => {\n if (!callback) {\n reject(err);\n }\n else {\n resolvedValues[curValueIndex] = callback.errorCallback(err);\n unresolvedCount--;\n if (unresolvedCount === 0) {\n resolve(resolvedValues);\n }\n }\n });\n }\n catch (thenErr) {\n reject(thenErr);\n }\n unresolvedCount++;\n valueIndex++;\n }\n // Make the unresolvedCount zero-based again.\n unresolvedCount -= 2;\n if (unresolvedCount === 0) {\n resolve(resolvedValues);\n }\n return promise;\n }\n constructor(executor) {\n const promise = this;\n if (!(promise instanceof ZoneAwarePromise)) {\n throw new Error('Must be an instanceof Promise.');\n }\n promise[symbolState] = UNRESOLVED;\n promise[symbolValue] = []; // queue;\n try {\n const onceWrapper = once();\n executor &&\n executor(onceWrapper(makeResolver(promise, RESOLVED)), onceWrapper(makeResolver(promise, REJECTED)));\n }\n catch (error) {\n resolvePromise(promise, false, error);\n }\n }\n get [Symbol.toStringTag]() {\n return 'Promise';\n }\n get [Symbol.species]() {\n return ZoneAwarePromise;\n }\n then(onFulfilled, onRejected) {\n // We must read `Symbol.species` safely because `this` may be anything. For instance, `this`\n // may be an object without a prototype (created through `Object.create(null)`); thus\n // `this.constructor` will be undefined. One of the use cases is SystemJS creating\n // prototype-less objects (modules) via `Object.create(null)`. The SystemJS creates an empty\n // object and copies promise properties into that object (within the `getOrCreateLoad`\n // function). The zone.js then checks if the resolved value has the `then` method and invokes\n // it with the `value` context. Otherwise, this will throw an error: `TypeError: Cannot read\n // properties of undefined (reading 'Symbol(Symbol.species)')`.\n let C = this.constructor?.[Symbol.species];\n if (!C || typeof C !== 'function') {\n C = this.constructor || ZoneAwarePromise;\n }\n const chainPromise = new C(noop);\n const zone = Zone.current;\n if (this[symbolState] == UNRESOLVED) {\n this[symbolValue].push(zone, chainPromise, onFulfilled, onRejected);\n }\n else {\n scheduleResolveOrReject(this, zone, chainPromise, onFulfilled, onRejected);\n }\n return chainPromise;\n }\n catch(onRejected) {\n return this.then(null, onRejected);\n }\n finally(onFinally) {\n // See comment on the call to `then` about why thee `Symbol.species` is safely accessed.\n let C = this.constructor?.[Symbol.species];\n if (!C || typeof C !== 'function') {\n C = ZoneAwarePromise;\n }\n const chainPromise = new C(noop);\n chainPromise[symbolFinally] = symbolFinally;\n const zone = Zone.current;\n if (this[symbolState] == UNRESOLVED) {\n this[symbolValue].push(zone, chainPromise, onFinally, onFinally);\n }\n else {\n scheduleResolveOrReject(this, zone, chainPromise, onFinally, onFinally);\n }\n return chainPromise;\n }\n }\n // Protect against aggressive optimizers dropping seemingly unused properties.\n // E.g. Closure Compiler in advanced mode.\n ZoneAwarePromise['resolve'] = ZoneAwarePromise.resolve;\n ZoneAwarePromise['reject'] = ZoneAwarePromise.reject;\n ZoneAwarePromise['race'] = ZoneAwarePromise.race;\n ZoneAwarePromise['all'] = ZoneAwarePromise.all;\n const NativePromise = global[symbolPromise] = global['Promise'];\n global['Promise'] = ZoneAwarePromise;\n const symbolThenPatched = __symbol__('thenPatched');\n function patchThen(Ctor) {\n const proto = Ctor.prototype;\n const prop = ObjectGetOwnPropertyDescriptor(proto, 'then');\n if (prop && (prop.writable === false || !prop.configurable)) {\n // check Ctor.prototype.then propertyDescriptor is writable or not\n // in meteor env, writable is false, we should ignore such case\n return;\n }\n const originalThen = proto.then;\n // Keep a reference to the original method.\n proto[symbolThen] = originalThen;\n Ctor.prototype.then = function (onResolve, onReject) {\n const wrapped = new ZoneAwarePromise((resolve, reject) => {\n originalThen.call(this, resolve, reject);\n });\n return wrapped.then(onResolve, onReject);\n };\n Ctor[symbolThenPatched] = true;\n }\n api.patchThen = patchThen;\n function zoneify(fn) {\n return function (self, args) {\n let resultPromise = fn.apply(self, args);\n if (resultPromise instanceof ZoneAwarePromise) {\n return resultPromise;\n }\n let ctor = resultPromise.constructor;\n if (!ctor[symbolThenPatched]) {\n patchThen(ctor);\n }\n return resultPromise;\n };\n }\n if (NativePromise) {\n patchThen(NativePromise);\n patchMethod(global, 'fetch', delegate => zoneify(delegate));\n }\n // This is not part of public API, but it is useful for tests, so we expose it.\n Promise[Zone.__symbol__('uncaughtPromiseErrors')] = _uncaughtPromiseErrors;\n return ZoneAwarePromise;\n});\n\n// override Function.prototype.toString to make zone.js patched function\n// look like native function\nZone.__load_patch('toString', (global) => {\n // patch Func.prototype.toString to let them look like native\n const originalFunctionToString = Function.prototype.toString;\n const ORIGINAL_DELEGATE_SYMBOL = zoneSymbol('OriginalDelegate');\n const PROMISE_SYMBOL = zoneSymbol('Promise');\n const ERROR_SYMBOL = zoneSymbol('Error');\n const newFunctionToString = function toString() {\n if (typeof this === 'function') {\n const originalDelegate = this[ORIGINAL_DELEGATE_SYMBOL];\n if (originalDelegate) {\n if (typeof originalDelegate === 'function') {\n return originalFunctionToString.call(originalDelegate);\n }\n else {\n return Object.prototype.toString.call(originalDelegate);\n }\n }\n if (this === Promise) {\n const nativePromise = global[PROMISE_SYMBOL];\n if (nativePromise) {\n return originalFunctionToString.call(nativePromise);\n }\n }\n if (this === Error) {\n const nativeError = global[ERROR_SYMBOL];\n if (nativeError) {\n return originalFunctionToString.call(nativeError);\n }\n }\n }\n return originalFunctionToString.call(this);\n };\n newFunctionToString[ORIGINAL_DELEGATE_SYMBOL] = originalFunctionToString;\n Function.prototype.toString = newFunctionToString;\n // patch Object.prototype.toString to let them look like native\n const originalObjectToString = Object.prototype.toString;\n const PROMISE_OBJECT_TO_STRING = '[object Promise]';\n Object.prototype.toString = function () {\n if (typeof Promise === 'function' && this instanceof Promise) {\n return PROMISE_OBJECT_TO_STRING;\n }\n return originalObjectToString.call(this);\n };\n});\n\n/**\n * @fileoverview\n * @suppress {missingRequire}\n */\nlet passiveSupported = false;\nif (typeof window !== 'undefined') {\n try {\n const options = Object.defineProperty({}, 'passive', {\n get: function () {\n passiveSupported = true;\n }\n });\n // Note: We pass the `options` object as the event handler too. This is not compatible with the\n // signature of `addEventListener` or `removeEventListener` but enables us to remove the handler\n // without an actual handler.\n window.addEventListener('test', options, options);\n window.removeEventListener('test', options, options);\n }\n catch (err) {\n passiveSupported = false;\n }\n}\n// an identifier to tell ZoneTask do not create a new invoke closure\nconst OPTIMIZED_ZONE_EVENT_TASK_DATA = {\n useG: true\n};\nconst zoneSymbolEventNames = {};\nconst globalSources = {};\nconst EVENT_NAME_SYMBOL_REGX = new RegExp('^' + ZONE_SYMBOL_PREFIX + '(\\\\w+)(true|false)$');\nconst IMMEDIATE_PROPAGATION_SYMBOL = zoneSymbol('propagationStopped');\nfunction prepareEventNames(eventName, eventNameToString) {\n const falseEventName = (eventNameToString ? eventNameToString(eventName) : eventName) + FALSE_STR;\n const trueEventName = (eventNameToString ? eventNameToString(eventName) : eventName) + TRUE_STR;\n const symbol = ZONE_SYMBOL_PREFIX + falseEventName;\n const symbolCapture = ZONE_SYMBOL_PREFIX + trueEventName;\n zoneSymbolEventNames[eventName] = {};\n zoneSymbolEventNames[eventName][FALSE_STR] = symbol;\n zoneSymbolEventNames[eventName][TRUE_STR] = symbolCapture;\n}\nfunction patchEventTarget(_global, api, apis, patchOptions) {\n const ADD_EVENT_LISTENER = (patchOptions && patchOptions.add) || ADD_EVENT_LISTENER_STR;\n const REMOVE_EVENT_LISTENER = (patchOptions && patchOptions.rm) || REMOVE_EVENT_LISTENER_STR;\n const LISTENERS_EVENT_LISTENER = (patchOptions && patchOptions.listeners) || 'eventListeners';\n const REMOVE_ALL_LISTENERS_EVENT_LISTENER = (patchOptions && patchOptions.rmAll) || 'removeAllListeners';\n const zoneSymbolAddEventListener = zoneSymbol(ADD_EVENT_LISTENER);\n const ADD_EVENT_LISTENER_SOURCE = '.' + ADD_EVENT_LISTENER + ':';\n const PREPEND_EVENT_LISTENER = 'prependListener';\n const PREPEND_EVENT_LISTENER_SOURCE = '.' + PREPEND_EVENT_LISTENER + ':';\n const invokeTask = function (task, target, event) {\n // for better performance, check isRemoved which is set\n // by removeEventListener\n if (task.isRemoved) {\n return;\n }\n const delegate = task.callback;\n if (typeof delegate === 'object' && delegate.handleEvent) {\n // create the bind version of handleEvent when invoke\n task.callback = (event) => delegate.handleEvent(event);\n task.originalDelegate = delegate;\n }\n // invoke static task.invoke\n // need to try/catch error here, otherwise, the error in one event listener\n // will break the executions of the other event listeners. Also error will\n // not remove the event listener when `once` options is true.\n let error;\n try {\n task.invoke(task, target, [event]);\n }\n catch (err) {\n error = err;\n }\n const options = task.options;\n if (options && typeof options === 'object' && options.once) {\n // if options.once is true, after invoke once remove listener here\n // only browser need to do this, nodejs eventEmitter will cal removeListener\n // inside EventEmitter.once\n const delegate = task.originalDelegate ? task.originalDelegate : task.callback;\n target[REMOVE_EVENT_LISTENER].call(target, event.type, delegate, options);\n }\n return error;\n };\n function globalCallback(context, event, isCapture) {\n // https://github.com/angular/zone.js/issues/911, in IE, sometimes\n // event will be undefined, so we need to use window.event\n event = event || _global.event;\n if (!event) {\n return;\n }\n // event.target is needed for Samsung TV and SourceBuffer\n // || global is needed https://github.com/angular/zone.js/issues/190\n const target = context || event.target || _global;\n const tasks = target[zoneSymbolEventNames[event.type][isCapture ? TRUE_STR : FALSE_STR]];\n if (tasks) {\n const errors = [];\n // invoke all tasks which attached to current target with given event.type and capture = false\n // for performance concern, if task.length === 1, just invoke\n if (tasks.length === 1) {\n const err = invokeTask(tasks[0], target, event);\n err && errors.push(err);\n }\n else {\n // https://github.com/angular/zone.js/issues/836\n // copy the tasks array before invoke, to avoid\n // the callback will remove itself or other listener\n const copyTasks = tasks.slice();\n for (let i = 0; i < copyTasks.length; i++) {\n if (event && event[IMMEDIATE_PROPAGATION_SYMBOL] === true) {\n break;\n }\n const err = invokeTask(copyTasks[i], target, event);\n err && errors.push(err);\n }\n }\n // Since there is only one error, we don't need to schedule microTask\n // to throw the error.\n if (errors.length === 1) {\n throw errors[0];\n }\n else {\n for (let i = 0; i < errors.length; i++) {\n const err = errors[i];\n api.nativeScheduleMicroTask(() => {\n throw err;\n });\n }\n }\n }\n }\n // global shared zoneAwareCallback to handle all event callback with capture = false\n const globalZoneAwareCallback = function (event) {\n return globalCallback(this, event, false);\n };\n // global shared zoneAwareCallback to handle all event callback with capture = true\n const globalZoneAwareCaptureCallback = function (event) {\n return globalCallback(this, event, true);\n };\n function patchEventTargetMethods(obj, patchOptions) {\n if (!obj) {\n return false;\n }\n let useGlobalCallback = true;\n if (patchOptions && patchOptions.useG !== undefined) {\n useGlobalCallback = patchOptions.useG;\n }\n const validateHandler = patchOptions && patchOptions.vh;\n let checkDuplicate = true;\n if (patchOptions && patchOptions.chkDup !== undefined) {\n checkDuplicate = patchOptions.chkDup;\n }\n let returnTarget = false;\n if (patchOptions && patchOptions.rt !== undefined) {\n returnTarget = patchOptions.rt;\n }\n let proto = obj;\n while (proto && !proto.hasOwnProperty(ADD_EVENT_LISTENER)) {\n proto = ObjectGetPrototypeOf(proto);\n }\n if (!proto && obj[ADD_EVENT_LISTENER]) {\n // somehow we did not find it, but we can see it. This happens on IE for Window properties.\n proto = obj;\n }\n if (!proto) {\n return false;\n }\n if (proto[zoneSymbolAddEventListener]) {\n return false;\n }\n const eventNameToString = patchOptions && patchOptions.eventNameToString;\n // a shared global taskData to pass data for scheduleEventTask\n // so we do not need to create a new object just for pass some data\n const taskData = {};\n const nativeAddEventListener = proto[zoneSymbolAddEventListener] = proto[ADD_EVENT_LISTENER];\n const nativeRemoveEventListener = proto[zoneSymbol(REMOVE_EVENT_LISTENER)] =\n proto[REMOVE_EVENT_LISTENER];\n const nativeListeners = proto[zoneSymbol(LISTENERS_EVENT_LISTENER)] =\n proto[LISTENERS_EVENT_LISTENER];\n const nativeRemoveAllListeners = proto[zoneSymbol(REMOVE_ALL_LISTENERS_EVENT_LISTENER)] =\n proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER];\n let nativePrependEventListener;\n if (patchOptions && patchOptions.prepend) {\n nativePrependEventListener = proto[zoneSymbol(patchOptions.prepend)] =\n proto[patchOptions.prepend];\n }\n /**\n * This util function will build an option object with passive option\n * to handle all possible input from the user.\n */\n function buildEventListenerOptions(options, passive) {\n if (!passiveSupported && typeof options === 'object' && options) {\n // doesn't support passive but user want to pass an object as options.\n // this will not work on some old browser, so we just pass a boolean\n // as useCapture parameter\n return !!options.capture;\n }\n if (!passiveSupported || !passive) {\n return options;\n }\n if (typeof options === 'boolean') {\n return { capture: options, passive: true };\n }\n if (!options) {\n return { passive: true };\n }\n if (typeof options === 'object' && options.passive !== false) {\n return { ...options, passive: true };\n }\n return options;\n }\n const customScheduleGlobal = function (task) {\n // if there is already a task for the eventName + capture,\n // just return, because we use the shared globalZoneAwareCallback here.\n if (taskData.isExisting) {\n return;\n }\n return nativeAddEventListener.call(taskData.target, taskData.eventName, taskData.capture ? globalZoneAwareCaptureCallback : globalZoneAwareCallback, taskData.options);\n };\n const customCancelGlobal = function (task) {\n // if task is not marked as isRemoved, this call is directly\n // from Zone.prototype.cancelTask, we should remove the task\n // from tasksList of target first\n if (!task.isRemoved) {\n const symbolEventNames = zoneSymbolEventNames[task.eventName];\n let symbolEventName;\n if (symbolEventNames) {\n symbolEventName = symbolEventNames[task.capture ? TRUE_STR : FALSE_STR];\n }\n const existingTasks = symbolEventName && task.target[symbolEventName];\n if (existingTasks) {\n for (let i = 0; i < existingTasks.length; i++) {\n const existingTask = existingTasks[i];\n if (existingTask === task) {\n existingTasks.splice(i, 1);\n // set isRemoved to data for faster invokeTask check\n task.isRemoved = true;\n if (existingTasks.length === 0) {\n // all tasks for the eventName + capture have gone,\n // remove globalZoneAwareCallback and remove the task cache from target\n task.allRemoved = true;\n task.target[symbolEventName] = null;\n }\n break;\n }\n }\n }\n }\n // if all tasks for the eventName + capture have gone,\n // we will really remove the global event callback,\n // if not, return\n if (!task.allRemoved) {\n return;\n }\n return nativeRemoveEventListener.call(task.target, task.eventName, task.capture ? globalZoneAwareCaptureCallback : globalZoneAwareCallback, task.options);\n };\n const customScheduleNonGlobal = function (task) {\n return nativeAddEventListener.call(taskData.target, taskData.eventName, task.invoke, taskData.options);\n };\n const customSchedulePrepend = function (task) {\n return nativePrependEventListener.call(taskData.target, taskData.eventName, task.invoke, taskData.options);\n };\n const customCancelNonGlobal = function (task) {\n return nativeRemoveEventListener.call(task.target, task.eventName, task.invoke, task.options);\n };\n const customSchedule = useGlobalCallback ? customScheduleGlobal : customScheduleNonGlobal;\n const customCancel = useGlobalCallback ? customCancelGlobal : customCancelNonGlobal;\n const compareTaskCallbackVsDelegate = function (task, delegate) {\n const typeOfDelegate = typeof delegate;\n return (typeOfDelegate === 'function' && task.callback === delegate) ||\n (typeOfDelegate === 'object' && task.originalDelegate === delegate);\n };\n const compare = (patchOptions && patchOptions.diff) ? patchOptions.diff : compareTaskCallbackVsDelegate;\n const unpatchedEvents = Zone[zoneSymbol('UNPATCHED_EVENTS')];\n const passiveEvents = _global[zoneSymbol('PASSIVE_EVENTS')];\n const makeAddListener = function (nativeListener, addSource, customScheduleFn, customCancelFn, returnTarget = false, prepend = false) {\n return function () {\n const target = this || _global;\n let eventName = arguments[0];\n if (patchOptions && patchOptions.transferEventName) {\n eventName = patchOptions.transferEventName(eventName);\n }\n let delegate = arguments[1];\n if (!delegate) {\n return nativeListener.apply(this, arguments);\n }\n if (isNode && eventName === 'uncaughtException') {\n // don't patch uncaughtException of nodejs to prevent endless loop\n return nativeListener.apply(this, arguments);\n }\n // don't create the bind delegate function for handleEvent\n // case here to improve addEventListener performance\n // we will create the bind delegate when invoke\n let isHandleEvent = false;\n if (typeof delegate !== 'function') {\n if (!delegate.handleEvent) {\n return nativeListener.apply(this, arguments);\n }\n isHandleEvent = true;\n }\n if (validateHandler && !validateHandler(nativeListener, delegate, target, arguments)) {\n return;\n }\n const passive = passiveSupported && !!passiveEvents && passiveEvents.indexOf(eventName) !== -1;\n const options = buildEventListenerOptions(arguments[2], passive);\n const signal = options && typeof options === 'object' && options.signal &&\n typeof options.signal === 'object' ?\n options.signal :\n undefined;\n if (signal?.aborted) {\n // the signal is an aborted one, just return without attaching the event listener.\n return;\n }\n if (unpatchedEvents) {\n // check unpatched list\n for (let i = 0; i < unpatchedEvents.length; i++) {\n if (eventName === unpatchedEvents[i]) {\n if (passive) {\n return nativeListener.call(target, eventName, delegate, options);\n }\n else {\n return nativeListener.apply(this, arguments);\n }\n }\n }\n }\n const capture = !options ? false : typeof options === 'boolean' ? true : options.capture;\n const once = options && typeof options === 'object' ? options.once : false;\n const zone = Zone.current;\n let symbolEventNames = zoneSymbolEventNames[eventName];\n if (!symbolEventNames) {\n prepareEventNames(eventName, eventNameToString);\n symbolEventNames = zoneSymbolEventNames[eventName];\n }\n const symbolEventName = symbolEventNames[capture ? TRUE_STR : FALSE_STR];\n let existingTasks = target[symbolEventName];\n let isExisting = false;\n if (existingTasks) {\n // already have task registered\n isExisting = true;\n if (checkDuplicate) {\n for (let i = 0; i < existingTasks.length; i++) {\n if (compare(existingTasks[i], delegate)) {\n // same callback, same capture, same event name, just return\n return;\n }\n }\n }\n }\n else {\n existingTasks = target[symbolEventName] = [];\n }\n let source;\n const constructorName = target.constructor['name'];\n const targetSource = globalSources[constructorName];\n if (targetSource) {\n source = targetSource[eventName];\n }\n if (!source) {\n source = constructorName + addSource +\n (eventNameToString ? eventNameToString(eventName) : eventName);\n }\n // do not create a new object as task.data to pass those things\n // just use the global shared one\n taskData.options = options;\n if (once) {\n // if addEventListener with once options, we don't pass it to\n // native addEventListener, instead we keep the once setting\n // and handle ourselves.\n taskData.options.once = false;\n }\n taskData.target = target;\n taskData.capture = capture;\n taskData.eventName = eventName;\n taskData.isExisting = isExisting;\n const data = useGlobalCallback ? OPTIMIZED_ZONE_EVENT_TASK_DATA : undefined;\n // keep taskData into data to allow onScheduleEventTask to access the task information\n if (data) {\n data.taskData = taskData;\n }\n if (signal) {\n // if addEventListener with signal options, we don't pass it to\n // native addEventListener, instead we keep the signal setting\n // and handle ourselves.\n taskData.options.signal = undefined;\n }\n const task = zone.scheduleEventTask(source, delegate, data, customScheduleFn, customCancelFn);\n if (signal) {\n // after task is scheduled, we need to store the signal back to task.options\n taskData.options.signal = signal;\n nativeListener.call(signal, 'abort', () => {\n task.zone.cancelTask(task);\n }, { once: true });\n }\n // should clear taskData.target to avoid memory leak\n // issue, https://github.com/angular/angular/issues/20442\n taskData.target = null;\n // need to clear up taskData because it is a global object\n if (data) {\n data.taskData = null;\n }\n // have to save those information to task in case\n // application may call task.zone.cancelTask() directly\n if (once) {\n options.once = true;\n }\n if (!(!passiveSupported && typeof task.options === 'boolean')) {\n // if not support passive, and we pass an option object\n // to addEventListener, we should save the options to task\n task.options = options;\n }\n task.target = target;\n task.capture = capture;\n task.eventName = eventName;\n if (isHandleEvent) {\n // save original delegate for compare to check duplicate\n task.originalDelegate = delegate;\n }\n if (!prepend) {\n existingTasks.push(task);\n }\n else {\n existingTasks.unshift(task);\n }\n if (returnTarget) {\n return target;\n }\n };\n };\n proto[ADD_EVENT_LISTENER] = makeAddListener(nativeAddEventListener, ADD_EVENT_LISTENER_SOURCE, customSchedule, customCancel, returnTarget);\n if (nativePrependEventListener) {\n proto[PREPEND_EVENT_LISTENER] = makeAddListener(nativePrependEventListener, PREPEND_EVENT_LISTENER_SOURCE, customSchedulePrepend, customCancel, returnTarget, true);\n }\n proto[REMOVE_EVENT_LISTENER] = function () {\n const target = this || _global;\n let eventName = arguments[0];\n if (patchOptions && patchOptions.transferEventName) {\n eventName = patchOptions.transferEventName(eventName);\n }\n const options = arguments[2];\n const capture = !options ? false : typeof options === 'boolean' ? true : options.capture;\n const delegate = arguments[1];\n if (!delegate) {\n return nativeRemoveEventListener.apply(this, arguments);\n }\n if (validateHandler &&\n !validateHandler(nativeRemoveEventListener, delegate, target, arguments)) {\n return;\n }\n const symbolEventNames = zoneSymbolEventNames[eventName];\n let symbolEventName;\n if (symbolEventNames) {\n symbolEventName = symbolEventNames[capture ? TRUE_STR : FALSE_STR];\n }\n const existingTasks = symbolEventName && target[symbolEventName];\n if (existingTasks) {\n for (let i = 0; i < existingTasks.length; i++) {\n const existingTask = existingTasks[i];\n if (compare(existingTask, delegate)) {\n existingTasks.splice(i, 1);\n // set isRemoved to data for faster invokeTask check\n existingTask.isRemoved = true;\n if (existingTasks.length === 0) {\n // all tasks for the eventName + capture have gone,\n // remove globalZoneAwareCallback and remove the task cache from target\n existingTask.allRemoved = true;\n target[symbolEventName] = null;\n // in the target, we have an event listener which is added by on_property\n // such as target.onclick = function() {}, so we need to clear this internal\n // property too if all delegates all removed\n if (typeof eventName === 'string') {\n const onPropertySymbol = ZONE_SYMBOL_PREFIX + 'ON_PROPERTY' + eventName;\n target[onPropertySymbol] = null;\n }\n }\n existingTask.zone.cancelTask(existingTask);\n if (returnTarget) {\n return target;\n }\n return;\n }\n }\n }\n // issue 930, didn't find the event name or callback\n // from zone kept existingTasks, the callback maybe\n // added outside of zone, we need to call native removeEventListener\n // to try to remove it.\n return nativeRemoveEventListener.apply(this, arguments);\n };\n proto[LISTENERS_EVENT_LISTENER] = function () {\n const target = this || _global;\n let eventName = arguments[0];\n if (patchOptions && patchOptions.transferEventName) {\n eventName = patchOptions.transferEventName(eventName);\n }\n const listeners = [];\n const tasks = findEventTasks(target, eventNameToString ? eventNameToString(eventName) : eventName);\n for (let i = 0; i < tasks.length; i++) {\n const task = tasks[i];\n let delegate = task.originalDelegate ? task.originalDelegate : task.callback;\n listeners.push(delegate);\n }\n return listeners;\n };\n proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER] = function () {\n const target = this || _global;\n let eventName = arguments[0];\n if (!eventName) {\n const keys = Object.keys(target);\n for (let i = 0; i < keys.length; i++) {\n const prop = keys[i];\n const match = EVENT_NAME_SYMBOL_REGX.exec(prop);\n let evtName = match && match[1];\n // in nodejs EventEmitter, removeListener event is\n // used for monitoring the removeListener call,\n // so just keep removeListener eventListener until\n // all other eventListeners are removed\n if (evtName && evtName !== 'removeListener') {\n this[REMOVE_ALL_LISTENERS_EVENT_LISTENER].call(this, evtName);\n }\n }\n // remove removeListener listener finally\n this[REMOVE_ALL_LISTENERS_EVENT_LISTENER].call(this, 'removeListener');\n }\n else {\n if (patchOptions && patchOptions.transferEventName) {\n eventName = patchOptions.transferEventName(eventName);\n }\n const symbolEventNames = zoneSymbolEventNames[eventName];\n if (symbolEventNames) {\n const symbolEventName = symbolEventNames[FALSE_STR];\n const symbolCaptureEventName = symbolEventNames[TRUE_STR];\n const tasks = target[symbolEventName];\n const captureTasks = target[symbolCaptureEventName];\n if (tasks) {\n const removeTasks = tasks.slice();\n for (let i = 0; i < removeTasks.length; i++) {\n const task = removeTasks[i];\n let delegate = task.originalDelegate ? task.originalDelegate : task.callback;\n this[REMOVE_EVENT_LISTENER].call(this, eventName, delegate, task.options);\n }\n }\n if (captureTasks) {\n const removeTasks = captureTasks.slice();\n for (let i = 0; i < removeTasks.length; i++) {\n const task = removeTasks[i];\n let delegate = task.originalDelegate ? task.originalDelegate : task.callback;\n this[REMOVE_EVENT_LISTENER].call(this, eventName, delegate, task.options);\n }\n }\n }\n }\n if (returnTarget) {\n return this;\n }\n };\n // for native toString patch\n attachOriginToPatched(proto[ADD_EVENT_LISTENER], nativeAddEventListener);\n attachOriginToPatched(proto[REMOVE_EVENT_LISTENER], nativeRemoveEventListener);\n if (nativeRemoveAllListeners) {\n attachOriginToPatched(proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER], nativeRemoveAllListeners);\n }\n if (nativeListeners) {\n attachOriginToPatched(proto[LISTENERS_EVENT_LISTENER], nativeListeners);\n }\n return true;\n }\n let results = [];\n for (let i = 0; i < apis.length; i++) {\n results[i] = patchEventTargetMethods(apis[i], patchOptions);\n }\n return results;\n}\nfunction findEventTasks(target, eventName) {\n if (!eventName) {\n const foundTasks = [];\n for (let prop in target) {\n const match = EVENT_NAME_SYMBOL_REGX.exec(prop);\n let evtName = match && match[1];\n if (evtName && (!eventName || evtName === eventName)) {\n const tasks = target[prop];\n if (tasks) {\n for (let i = 0; i < tasks.length; i++) {\n foundTasks.push(tasks[i]);\n }\n }\n }\n }\n return foundTasks;\n }\n let symbolEventName = zoneSymbolEventNames[eventName];\n if (!symbolEventName) {\n prepareEventNames(eventName);\n symbolEventName = zoneSymbolEventNames[eventName];\n }\n const captureFalseTasks = target[symbolEventName[FALSE_STR]];\n const captureTrueTasks = target[symbolEventName[TRUE_STR]];\n if (!captureFalseTasks) {\n return captureTrueTasks ? captureTrueTasks.slice() : [];\n }\n else {\n return captureTrueTasks ? captureFalseTasks.concat(captureTrueTasks) :\n captureFalseTasks.slice();\n }\n}\nfunction patchEventPrototype(global, api) {\n const Event = global['Event'];\n if (Event && Event.prototype) {\n api.patchMethod(Event.prototype, 'stopImmediatePropagation', (delegate) => function (self, args) {\n self[IMMEDIATE_PROPAGATION_SYMBOL] = true;\n // we need to call the native stopImmediatePropagation\n // in case in some hybrid application, some part of\n // application will be controlled by zone, some are not\n delegate && delegate.apply(self, args);\n });\n }\n}\n\nfunction patchCallbacks(api, target, targetName, method, callbacks) {\n const symbol = Zone.__symbol__(method);\n if (target[symbol]) {\n return;\n }\n const nativeDelegate = target[symbol] = target[method];\n target[method] = function (name, opts, options) {\n if (opts && opts.prototype) {\n callbacks.forEach(function (callback) {\n const source = `${targetName}.${method}::` + callback;\n const prototype = opts.prototype;\n // Note: the `patchCallbacks` is used for patching the `document.registerElement` and\n // `customElements.define`. We explicitly wrap the patching code into try-catch since\n // callbacks may be already patched by other web components frameworks (e.g. LWC), and they\n // make those properties non-writable. This means that patching callback will throw an error\n // `cannot assign to read-only property`. See this code as an example:\n // https://github.com/salesforce/lwc/blob/master/packages/@lwc/engine-core/src/framework/base-bridge-element.ts#L180-L186\n // We don't want to stop the application rendering if we couldn't patch some\n // callback, e.g. `attributeChangedCallback`.\n try {\n if (prototype.hasOwnProperty(callback)) {\n const descriptor = api.ObjectGetOwnPropertyDescriptor(prototype, callback);\n if (descriptor && descriptor.value) {\n descriptor.value = api.wrapWithCurrentZone(descriptor.value, source);\n api._redefineProperty(opts.prototype, callback, descriptor);\n }\n else if (prototype[callback]) {\n prototype[callback] = api.wrapWithCurrentZone(prototype[callback], source);\n }\n }\n else if (prototype[callback]) {\n prototype[callback] = api.wrapWithCurrentZone(prototype[callback], source);\n }\n }\n catch {\n // Note: we leave the catch block empty since there's no way to handle the error related\n // to non-writable property.\n }\n });\n }\n return nativeDelegate.call(target, name, opts, options);\n };\n api.attachOriginToPatched(target[method], nativeDelegate);\n}\n\n/**\n * @fileoverview\n * @suppress {globalThis}\n */\nfunction filterProperties(target, onProperties, ignoreProperties) {\n if (!ignoreProperties || ignoreProperties.length === 0) {\n return onProperties;\n }\n const tip = ignoreProperties.filter(ip => ip.target === target);\n if (!tip || tip.length === 0) {\n return onProperties;\n }\n const targetIgnoreProperties = tip[0].ignoreProperties;\n return onProperties.filter(op => targetIgnoreProperties.indexOf(op) === -1);\n}\nfunction patchFilteredProperties(target, onProperties, ignoreProperties, prototype) {\n // check whether target is available, sometimes target will be undefined\n // because different browser or some 3rd party plugin.\n if (!target) {\n return;\n }\n const filteredProperties = filterProperties(target, onProperties, ignoreProperties);\n patchOnProperties(target, filteredProperties, prototype);\n}\n/**\n * Get all event name properties which the event name startsWith `on`\n * from the target object itself, inherited properties are not considered.\n */\nfunction getOnEventNames(target) {\n return Object.getOwnPropertyNames(target)\n .filter(name => name.startsWith('on') && name.length > 2)\n .map(name => name.substring(2));\n}\nfunction propertyDescriptorPatch(api, _global) {\n if (isNode && !isMix) {\n return;\n }\n if (Zone[api.symbol('patchEvents')]) {\n // events are already been patched by legacy patch.\n return;\n }\n const ignoreProperties = _global['__Zone_ignore_on_properties'];\n // for browsers that we can patch the descriptor: Chrome & Firefox\n let patchTargets = [];\n if (isBrowser) {\n const internalWindow = window;\n patchTargets = patchTargets.concat([\n 'Document', 'SVGElement', 'Element', 'HTMLElement', 'HTMLBodyElement', 'HTMLMediaElement',\n 'HTMLFrameSetElement', 'HTMLFrameElement', 'HTMLIFrameElement', 'HTMLMarqueeElement', 'Worker'\n ]);\n const ignoreErrorProperties = isIE() ? [{ target: internalWindow, ignoreProperties: ['error'] }] : [];\n // in IE/Edge, onProp not exist in window object, but in WindowPrototype\n // so we need to pass WindowPrototype to check onProp exist or not\n patchFilteredProperties(internalWindow, getOnEventNames(internalWindow), ignoreProperties ? ignoreProperties.concat(ignoreErrorProperties) : ignoreProperties, ObjectGetPrototypeOf(internalWindow));\n }\n patchTargets = patchTargets.concat([\n 'XMLHttpRequest', 'XMLHttpRequestEventTarget', 'IDBIndex', 'IDBRequest', 'IDBOpenDBRequest',\n 'IDBDatabase', 'IDBTransaction', 'IDBCursor', 'WebSocket'\n ]);\n for (let i = 0; i < patchTargets.length; i++) {\n const target = _global[patchTargets[i]];\n target && target.prototype &&\n patchFilteredProperties(target.prototype, getOnEventNames(target.prototype), ignoreProperties);\n }\n}\n\nZone.__load_patch('util', (global, Zone, api) => {\n // Collect native event names by looking at properties\n // on the global namespace, e.g. 'onclick'.\n const eventNames = getOnEventNames(global);\n api.patchOnProperties = patchOnProperties;\n api.patchMethod = patchMethod;\n api.bindArguments = bindArguments;\n api.patchMacroTask = patchMacroTask;\n // In earlier version of zone.js (<0.9.0), we use env name `__zone_symbol__BLACK_LISTED_EVENTS` to\n // define which events will not be patched by `Zone.js`.\n // In newer version (>=0.9.0), we change the env name to `__zone_symbol__UNPATCHED_EVENTS` to keep\n // the name consistent with angular repo.\n // The `__zone_symbol__BLACK_LISTED_EVENTS` is deprecated, but it is still be supported for\n // backwards compatibility.\n const SYMBOL_BLACK_LISTED_EVENTS = Zone.__symbol__('BLACK_LISTED_EVENTS');\n const SYMBOL_UNPATCHED_EVENTS = Zone.__symbol__('UNPATCHED_EVENTS');\n if (global[SYMBOL_UNPATCHED_EVENTS]) {\n global[SYMBOL_BLACK_LISTED_EVENTS] = global[SYMBOL_UNPATCHED_EVENTS];\n }\n if (global[SYMBOL_BLACK_LISTED_EVENTS]) {\n Zone[SYMBOL_BLACK_LISTED_EVENTS] = Zone[SYMBOL_UNPATCHED_EVENTS] =\n global[SYMBOL_BLACK_LISTED_EVENTS];\n }\n api.patchEventPrototype = patchEventPrototype;\n api.patchEventTarget = patchEventTarget;\n api.isIEOrEdge = isIEOrEdge;\n api.ObjectDefineProperty = ObjectDefineProperty;\n api.ObjectGetOwnPropertyDescriptor = ObjectGetOwnPropertyDescriptor;\n api.ObjectCreate = ObjectCreate;\n api.ArraySlice = ArraySlice;\n api.patchClass = patchClass;\n api.wrapWithCurrentZone = wrapWithCurrentZone;\n api.filterProperties = filterProperties;\n api.attachOriginToPatched = attachOriginToPatched;\n api._redefineProperty = Object.defineProperty;\n api.patchCallbacks = patchCallbacks;\n api.getGlobalObjects = () => ({\n globalSources,\n zoneSymbolEventNames,\n eventNames,\n isBrowser,\n isMix,\n isNode,\n TRUE_STR,\n FALSE_STR,\n ZONE_SYMBOL_PREFIX,\n ADD_EVENT_LISTENER_STR,\n REMOVE_EVENT_LISTENER_STR\n });\n});\n\n/**\n * @fileoverview\n * @suppress {missingRequire}\n */\nfunction patchQueueMicrotask(global, api) {\n api.patchMethod(global, 'queueMicrotask', (delegate) => {\n return function (self, args) {\n Zone.current.scheduleMicroTask('queueMicrotask', args[0]);\n };\n });\n}\n\n/**\n * @fileoverview\n * @suppress {missingRequire}\n */\nconst taskSymbol = zoneSymbol('zoneTask');\nfunction patchTimer(window, setName, cancelName, nameSuffix) {\n let setNative = null;\n let clearNative = null;\n setName += nameSuffix;\n cancelName += nameSuffix;\n const tasksByHandleId = {};\n function scheduleTask(task) {\n const data = task.data;\n data.args[0] = function () {\n return task.invoke.apply(this, arguments);\n };\n data.handleId = setNative.apply(window, data.args);\n return task;\n }\n function clearTask(task) {\n return clearNative.call(window, task.data.handleId);\n }\n setNative =\n patchMethod(window, setName, (delegate) => function (self, args) {\n if (typeof args[0] === 'function') {\n const options = {\n isPeriodic: nameSuffix === 'Interval',\n delay: (nameSuffix === 'Timeout' || nameSuffix === 'Interval') ? args[1] || 0 :\n undefined,\n args: args\n };\n const callback = args[0];\n args[0] = function timer() {\n try {\n return callback.apply(this, arguments);\n }\n finally {\n // issue-934, task will be cancelled\n // even it is a periodic task such as\n // setInterval\n // https://github.com/angular/angular/issues/40387\n // Cleanup tasksByHandleId should be handled before scheduleTask\n // Since some zoneSpec may intercept and doesn't trigger\n // scheduleFn(scheduleTask) provided here.\n if (!(options.isPeriodic)) {\n if (typeof options.handleId === 'number') {\n // in non-nodejs env, we remove timerId\n // from local cache\n delete tasksByHandleId[options.handleId];\n }\n else if (options.handleId) {\n // Node returns complex objects as handleIds\n // we remove task reference from timer object\n options.handleId[taskSymbol] = null;\n }\n }\n }\n };\n const task = scheduleMacroTaskWithCurrentZone(setName, args[0], options, scheduleTask, clearTask);\n if (!task) {\n return task;\n }\n // Node.js must additionally support the ref and unref functions.\n const handle = task.data.handleId;\n if (typeof handle === 'number') {\n // for non nodejs env, we save handleId: task\n // mapping in local cache for clearTimeout\n tasksByHandleId[handle] = task;\n }\n else if (handle) {\n // for nodejs env, we save task\n // reference in timerId Object for clearTimeout\n handle[taskSymbol] = task;\n }\n // check whether handle is null, because some polyfill or browser\n // may return undefined from setTimeout/setInterval/setImmediate/requestAnimationFrame\n if (handle && handle.ref && handle.unref && typeof handle.ref === 'function' &&\n typeof handle.unref === 'function') {\n task.ref = handle.ref.bind(handle);\n task.unref = handle.unref.bind(handle);\n }\n if (typeof handle === 'number' || handle) {\n return handle;\n }\n return task;\n }\n else {\n // cause an error by calling it directly.\n return delegate.apply(window, args);\n }\n });\n clearNative =\n patchMethod(window, cancelName, (delegate) => function (self, args) {\n const id = args[0];\n let task;\n if (typeof id === 'number') {\n // non nodejs env.\n task = tasksByHandleId[id];\n }\n else {\n // nodejs env.\n task = id && id[taskSymbol];\n // other environments.\n if (!task) {\n task = id;\n }\n }\n if (task && typeof task.type === 'string') {\n if (task.state !== 'notScheduled' &&\n (task.cancelFn && task.data.isPeriodic || task.runCount === 0)) {\n if (typeof id === 'number') {\n delete tasksByHandleId[id];\n }\n else if (id) {\n id[taskSymbol] = null;\n }\n // Do not cancel already canceled functions\n task.zone.cancelTask(task);\n }\n }\n else {\n // cause an error by calling it directly.\n delegate.apply(window, args);\n }\n });\n}\n\nfunction patchCustomElements(_global, api) {\n const { isBrowser, isMix } = api.getGlobalObjects();\n if ((!isBrowser && !isMix) || !_global['customElements'] || !('customElements' in _global)) {\n return;\n }\n // https://html.spec.whatwg.org/multipage/custom-elements.html#concept-custom-element-definition-lifecycle-callbacks\n const callbacks = [\n 'connectedCallback', 'disconnectedCallback', 'adoptedCallback', 'attributeChangedCallback',\n 'formAssociatedCallback', 'formDisabledCallback', 'formResetCallback',\n 'formStateRestoreCallback'\n ];\n api.patchCallbacks(api, _global.customElements, 'customElements', 'define', callbacks);\n}\n\nfunction eventTargetPatch(_global, api) {\n if (Zone[api.symbol('patchEventTarget')]) {\n // EventTarget is already patched.\n return;\n }\n const { eventNames, zoneSymbolEventNames, TRUE_STR, FALSE_STR, ZONE_SYMBOL_PREFIX } = api.getGlobalObjects();\n // predefine all __zone_symbol__ + eventName + true/false string\n for (let i = 0; i < eventNames.length; i++) {\n const eventName = eventNames[i];\n const falseEventName = eventName + FALSE_STR;\n const trueEventName = eventName + TRUE_STR;\n const symbol = ZONE_SYMBOL_PREFIX + falseEventName;\n const symbolCapture = ZONE_SYMBOL_PREFIX + trueEventName;\n zoneSymbolEventNames[eventName] = {};\n zoneSymbolEventNames[eventName][FALSE_STR] = symbol;\n zoneSymbolEventNames[eventName][TRUE_STR] = symbolCapture;\n }\n const EVENT_TARGET = _global['EventTarget'];\n if (!EVENT_TARGET || !EVENT_TARGET.prototype) {\n return;\n }\n api.patchEventTarget(_global, api, [EVENT_TARGET && EVENT_TARGET.prototype]);\n return true;\n}\nfunction patchEvent(global, api) {\n api.patchEventPrototype(global, api);\n}\n\n/**\n * @fileoverview\n * @suppress {missingRequire}\n */\nZone.__load_patch('legacy', (global) => {\n const legacyPatch = global[Zone.__symbol__('legacyPatch')];\n if (legacyPatch) {\n legacyPatch();\n }\n});\nZone.__load_patch('timers', (global) => {\n const set = 'set';\n const clear = 'clear';\n patchTimer(global, set, clear, 'Timeout');\n patchTimer(global, set, clear, 'Interval');\n patchTimer(global, set, clear, 'Immediate');\n});\nZone.__load_patch('requestAnimationFrame', (global) => {\n patchTimer(global, 'request', 'cancel', 'AnimationFrame');\n patchTimer(global, 'mozRequest', 'mozCancel', 'AnimationFrame');\n patchTimer(global, 'webkitRequest', 'webkitCancel', 'AnimationFrame');\n});\nZone.__load_patch('blocking', (global, Zone) => {\n const blockingMethods = ['alert', 'prompt', 'confirm'];\n for (let i = 0; i < blockingMethods.length; i++) {\n const name = blockingMethods[i];\n patchMethod(global, name, (delegate, symbol, name) => {\n return function (s, args) {\n return Zone.current.run(delegate, global, args, name);\n };\n });\n }\n});\nZone.__load_patch('EventTarget', (global, Zone, api) => {\n patchEvent(global, api);\n eventTargetPatch(global, api);\n // patch XMLHttpRequestEventTarget's addEventListener/removeEventListener\n const XMLHttpRequestEventTarget = global['XMLHttpRequestEventTarget'];\n if (XMLHttpRequestEventTarget && XMLHttpRequestEventTarget.prototype) {\n api.patchEventTarget(global, api, [XMLHttpRequestEventTarget.prototype]);\n }\n});\nZone.__load_patch('MutationObserver', (global, Zone, api) => {\n patchClass('MutationObserver');\n patchClass('WebKitMutationObserver');\n});\nZone.__load_patch('IntersectionObserver', (global, Zone, api) => {\n patchClass('IntersectionObserver');\n});\nZone.__load_patch('FileReader', (global, Zone, api) => {\n patchClass('FileReader');\n});\nZone.__load_patch('on_property', (global, Zone, api) => {\n propertyDescriptorPatch(api, global);\n});\nZone.__load_patch('customElements', (global, Zone, api) => {\n patchCustomElements(global, api);\n});\nZone.__load_patch('XHR', (global, Zone) => {\n // Treat XMLHttpRequest as a macrotask.\n patchXHR(global);\n const XHR_TASK = zoneSymbol('xhrTask');\n const XHR_SYNC = zoneSymbol('xhrSync');\n const XHR_LISTENER = zoneSymbol('xhrListener');\n const XHR_SCHEDULED = zoneSymbol('xhrScheduled');\n const XHR_URL = zoneSymbol('xhrURL');\n const XHR_ERROR_BEFORE_SCHEDULED = zoneSymbol('xhrErrorBeforeScheduled');\n function patchXHR(window) {\n const XMLHttpRequest = window['XMLHttpRequest'];\n if (!XMLHttpRequest) {\n // XMLHttpRequest is not available in service worker\n return;\n }\n const XMLHttpRequestPrototype = XMLHttpRequest.prototype;\n function findPendingTask(target) {\n return target[XHR_TASK];\n }\n let oriAddListener = XMLHttpRequestPrototype[ZONE_SYMBOL_ADD_EVENT_LISTENER];\n let oriRemoveListener = XMLHttpRequestPrototype[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];\n if (!oriAddListener) {\n const XMLHttpRequestEventTarget = window['XMLHttpRequestEventTarget'];\n if (XMLHttpRequestEventTarget) {\n const XMLHttpRequestEventTargetPrototype = XMLHttpRequestEventTarget.prototype;\n oriAddListener = XMLHttpRequestEventTargetPrototype[ZONE_SYMBOL_ADD_EVENT_LISTENER];\n oriRemoveListener = XMLHttpRequestEventTargetPrototype[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];\n }\n }\n const READY_STATE_CHANGE = 'readystatechange';\n const SCHEDULED = 'scheduled';\n function scheduleTask(task) {\n const data = task.data;\n const target = data.target;\n target[XHR_SCHEDULED] = false;\n target[XHR_ERROR_BEFORE_SCHEDULED] = false;\n // remove existing event listener\n const listener = target[XHR_LISTENER];\n if (!oriAddListener) {\n oriAddListener = target[ZONE_SYMBOL_ADD_EVENT_LISTENER];\n oriRemoveListener = target[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];\n }\n if (listener) {\n oriRemoveListener.call(target, READY_STATE_CHANGE, listener);\n }\n const newListener = target[XHR_LISTENER] = () => {\n if (target.readyState === target.DONE) {\n // sometimes on some browsers XMLHttpRequest will fire onreadystatechange with\n // readyState=4 multiple times, so we need to check task state here\n if (!data.aborted && target[XHR_SCHEDULED] && task.state === SCHEDULED) {\n // check whether the xhr has registered onload listener\n // if that is the case, the task should invoke after all\n // onload listeners finish.\n // Also if the request failed without response (status = 0), the load event handler\n // will not be triggered, in that case, we should also invoke the placeholder callback\n // to close the XMLHttpRequest::send macroTask.\n // https://github.com/angular/angular/issues/38795\n const loadTasks = target[Zone.__symbol__('loadfalse')];\n if (target.status !== 0 && loadTasks && loadTasks.length > 0) {\n const oriInvoke = task.invoke;\n task.invoke = function () {\n // need to load the tasks again, because in other\n // load listener, they may remove themselves\n const loadTasks = target[Zone.__symbol__('loadfalse')];\n for (let i = 0; i < loadTasks.length; i++) {\n if (loadTasks[i] === task) {\n loadTasks.splice(i, 1);\n }\n }\n if (!data.aborted && task.state === SCHEDULED) {\n oriInvoke.call(task);\n }\n };\n loadTasks.push(task);\n }\n else {\n task.invoke();\n }\n }\n else if (!data.aborted && target[XHR_SCHEDULED] === false) {\n // error occurs when xhr.send()\n target[XHR_ERROR_BEFORE_SCHEDULED] = true;\n }\n }\n };\n oriAddListener.call(target, READY_STATE_CHANGE, newListener);\n const storedTask = target[XHR_TASK];\n if (!storedTask) {\n target[XHR_TASK] = task;\n }\n sendNative.apply(target, data.args);\n target[XHR_SCHEDULED] = true;\n return task;\n }\n function placeholderCallback() { }\n function clearTask(task) {\n const data = task.data;\n // Note - ideally, we would call data.target.removeEventListener here, but it's too late\n // to prevent it from firing. So instead, we store info for the event listener.\n data.aborted = true;\n return abortNative.apply(data.target, data.args);\n }\n const openNative = patchMethod(XMLHttpRequestPrototype, 'open', () => function (self, args) {\n self[XHR_SYNC] = args[2] == false;\n self[XHR_URL] = args[1];\n return openNative.apply(self, args);\n });\n const XMLHTTPREQUEST_SOURCE = 'XMLHttpRequest.send';\n const fetchTaskAborting = zoneSymbol('fetchTaskAborting');\n const fetchTaskScheduling = zoneSymbol('fetchTaskScheduling');\n const sendNative = patchMethod(XMLHttpRequestPrototype, 'send', () => function (self, args) {\n if (Zone.current[fetchTaskScheduling] === true) {\n // a fetch is scheduling, so we are using xhr to polyfill fetch\n // and because we already schedule macroTask for fetch, we should\n // not schedule a macroTask for xhr again\n return sendNative.apply(self, args);\n }\n if (self[XHR_SYNC]) {\n // if the XHR is sync there is no task to schedule, just execute the code.\n return sendNative.apply(self, args);\n }\n else {\n const options = { target: self, url: self[XHR_URL], isPeriodic: false, args: args, aborted: false };\n const task = scheduleMacroTaskWithCurrentZone(XMLHTTPREQUEST_SOURCE, placeholderCallback, options, scheduleTask, clearTask);\n if (self && self[XHR_ERROR_BEFORE_SCHEDULED] === true && !options.aborted &&\n task.state === SCHEDULED) {\n // xhr request throw error when send\n // we should invoke task instead of leaving a scheduled\n // pending macroTask\n task.invoke();\n }\n }\n });\n const abortNative = patchMethod(XMLHttpRequestPrototype, 'abort', () => function (self, args) {\n const task = findPendingTask(self);\n if (task && typeof task.type == 'string') {\n // If the XHR has already completed, do nothing.\n // If the XHR has already been aborted, do nothing.\n // Fix #569, call abort multiple times before done will cause\n // macroTask task count be negative number\n if (task.cancelFn == null || (task.data && task.data.aborted)) {\n return;\n }\n task.zone.cancelTask(task);\n }\n else if (Zone.current[fetchTaskAborting] === true) {\n // the abort is called from fetch polyfill, we need to call native abort of XHR.\n return abortNative.apply(self, args);\n }\n // Otherwise, we are trying to abort an XHR which has not yet been sent, so there is no\n // task\n // to cancel. Do nothing.\n });\n }\n});\nZone.__load_patch('geolocation', (global) => {\n /// GEO_LOCATION\n if (global['navigator'] && global['navigator'].geolocation) {\n patchPrototype(global['navigator'].geolocation, ['getCurrentPosition', 'watchPosition']);\n }\n});\nZone.__load_patch('PromiseRejectionEvent', (global, Zone) => {\n // handle unhandled promise rejection\n function findPromiseRejectionHandler(evtName) {\n return function (e) {\n const eventTasks = findEventTasks(global, evtName);\n eventTasks.forEach(eventTask => {\n // windows has added unhandledrejection event listener\n // trigger the event listener\n const PromiseRejectionEvent = global['PromiseRejectionEvent'];\n if (PromiseRejectionEvent) {\n const evt = new PromiseRejectionEvent(evtName, { promise: e.promise, reason: e.rejection });\n eventTask.invoke(evt);\n }\n });\n };\n }\n if (global['PromiseRejectionEvent']) {\n Zone[zoneSymbol('unhandledPromiseRejectionHandler')] =\n findPromiseRejectionHandler('unhandledrejection');\n Zone[zoneSymbol('rejectionHandledHandler')] =\n findPromiseRejectionHandler('rejectionhandled');\n }\n});\nZone.__load_patch('queueMicrotask', (global, Zone, api) => {\n patchQueueMicrotask(global, api);\n});\n","/**\n * @license Angular v17.3.5\n * (c) 2010-2024 Google LLC. https://angular.io/\n * License: MIT\n */\n\n/**\n * The default equality function used for `signal` and `computed`, which uses referential equality.\n */\nfunction defaultEquals(a, b) {\n return Object.is(a, b);\n}\n\n/**\n * The currently active consumer `ReactiveNode`, if running code in a reactive context.\n *\n * Change this via `setActiveConsumer`.\n */\nlet activeConsumer = null;\nlet inNotificationPhase = false;\n/**\n * Global epoch counter. Incremented whenever a source signal is set.\n */\nlet epoch = 1;\n/**\n * Symbol used to tell `Signal`s apart from other functions.\n *\n * This can be used to auto-unwrap signals in various cases, or to auto-wrap non-signal values.\n */\nconst SIGNAL = /* @__PURE__ */ Symbol('SIGNAL');\nfunction setActiveConsumer(consumer) {\n const prev = activeConsumer;\n activeConsumer = consumer;\n return prev;\n}\nfunction getActiveConsumer() {\n return activeConsumer;\n}\nfunction isInNotificationPhase() {\n return inNotificationPhase;\n}\nfunction isReactive(value) {\n return value[SIGNAL] !== undefined;\n}\nconst REACTIVE_NODE = {\n version: 0,\n lastCleanEpoch: 0,\n dirty: false,\n producerNode: undefined,\n producerLastReadVersion: undefined,\n producerIndexOfThis: undefined,\n nextProducerIndex: 0,\n liveConsumerNode: undefined,\n liveConsumerIndexOfThis: undefined,\n consumerAllowSignalWrites: false,\n consumerIsAlwaysLive: false,\n producerMustRecompute: () => false,\n producerRecomputeValue: () => { },\n consumerMarkedDirty: () => { },\n consumerOnSignalRead: () => { },\n};\n/**\n * Called by implementations when a producer's signal is read.\n */\nfunction producerAccessed(node) {\n if (inNotificationPhase) {\n throw new Error(typeof ngDevMode !== 'undefined' && ngDevMode ?\n `Assertion error: signal read during notification phase` :\n '');\n }\n if (activeConsumer === null) {\n // Accessed outside of a reactive context, so nothing to record.\n return;\n }\n activeConsumer.consumerOnSignalRead(node);\n // This producer is the `idx`th dependency of `activeConsumer`.\n const idx = activeConsumer.nextProducerIndex++;\n assertConsumerNode(activeConsumer);\n if (idx < activeConsumer.producerNode.length && activeConsumer.producerNode[idx] !== node) {\n // There's been a change in producers since the last execution of `activeConsumer`.\n // `activeConsumer.producerNode[idx]` holds a stale dependency which will be be removed and\n // replaced with `this`.\n //\n // If `activeConsumer` isn't live, then this is a no-op, since we can replace the producer in\n // `activeConsumer.producerNode` directly. However, if `activeConsumer` is live, then we need\n // to remove it from the stale producer's `liveConsumer`s.\n if (consumerIsLive(activeConsumer)) {\n const staleProducer = activeConsumer.producerNode[idx];\n producerRemoveLiveConsumerAtIndex(staleProducer, activeConsumer.producerIndexOfThis[idx]);\n // At this point, the only record of `staleProducer` is the reference at\n // `activeConsumer.producerNode[idx]` which will be overwritten below.\n }\n }\n if (activeConsumer.producerNode[idx] !== node) {\n // We're a new dependency of the consumer (at `idx`).\n activeConsumer.producerNode[idx] = node;\n // If the active consumer is live, then add it as a live consumer. If not, then use 0 as a\n // placeholder value.\n activeConsumer.producerIndexOfThis[idx] =\n consumerIsLive(activeConsumer) ? producerAddLiveConsumer(node, activeConsumer, idx) : 0;\n }\n activeConsumer.producerLastReadVersion[idx] = node.version;\n}\n/**\n * Increment the global epoch counter.\n *\n * Called by source producers (that is, not computeds) whenever their values change.\n */\nfunction producerIncrementEpoch() {\n epoch++;\n}\n/**\n * Ensure this producer's `version` is up-to-date.\n */\nfunction producerUpdateValueVersion(node) {\n if (consumerIsLive(node) && !node.dirty) {\n // A live consumer will be marked dirty by producers, so a clean state means that its version\n // is guaranteed to be up-to-date.\n return;\n }\n if (!node.dirty && node.lastCleanEpoch === epoch) {\n // Even non-live consumers can skip polling if they previously found themselves to be clean at\n // the current epoch, since their dependencies could not possibly have changed (such a change\n // would've increased the epoch).\n return;\n }\n if (!node.producerMustRecompute(node) && !consumerPollProducersForChange(node)) {\n // None of our producers report a change since the last time they were read, so no\n // recomputation of our value is necessary, and we can consider ourselves clean.\n node.dirty = false;\n node.lastCleanEpoch = epoch;\n return;\n }\n node.producerRecomputeValue(node);\n // After recomputing the value, we're no longer dirty.\n node.dirty = false;\n node.lastCleanEpoch = epoch;\n}\n/**\n * Propagate a dirty notification to live consumers of this producer.\n */\nfunction producerNotifyConsumers(node) {\n if (node.liveConsumerNode === undefined) {\n return;\n }\n // Prevent signal reads when we're updating the graph\n const prev = inNotificationPhase;\n inNotificationPhase = true;\n try {\n for (const consumer of node.liveConsumerNode) {\n if (!consumer.dirty) {\n consumerMarkDirty(consumer);\n }\n }\n }\n finally {\n inNotificationPhase = prev;\n }\n}\n/**\n * Whether this `ReactiveNode` in its producer capacity is currently allowed to initiate updates,\n * based on the current consumer context.\n */\nfunction producerUpdatesAllowed() {\n return activeConsumer?.consumerAllowSignalWrites !== false;\n}\nfunction consumerMarkDirty(node) {\n node.dirty = true;\n producerNotifyConsumers(node);\n node.consumerMarkedDirty?.(node);\n}\n/**\n * Prepare this consumer to run a computation in its reactive context.\n *\n * Must be called by subclasses which represent reactive computations, before those computations\n * begin.\n */\nfunction consumerBeforeComputation(node) {\n node && (node.nextProducerIndex = 0);\n return setActiveConsumer(node);\n}\n/**\n * Finalize this consumer's state after a reactive computation has run.\n *\n * Must be called by subclasses which represent reactive computations, after those computations\n * have finished.\n */\nfunction consumerAfterComputation(node, prevConsumer) {\n setActiveConsumer(prevConsumer);\n if (!node || node.producerNode === undefined || node.producerIndexOfThis === undefined ||\n node.producerLastReadVersion === undefined) {\n return;\n }\n if (consumerIsLive(node)) {\n // For live consumers, we need to remove the producer -> consumer edge for any stale producers\n // which weren't dependencies after the recomputation.\n for (let i = node.nextProducerIndex; i < node.producerNode.length; i++) {\n producerRemoveLiveConsumerAtIndex(node.producerNode[i], node.producerIndexOfThis[i]);\n }\n }\n // Truncate the producer tracking arrays.\n // Perf note: this is essentially truncating the length to `node.nextProducerIndex`, but\n // benchmarking has shown that individual pop operations are faster.\n while (node.producerNode.length > node.nextProducerIndex) {\n node.producerNode.pop();\n node.producerLastReadVersion.pop();\n node.producerIndexOfThis.pop();\n }\n}\n/**\n * Determine whether this consumer has any dependencies which have changed since the last time\n * they were read.\n */\nfunction consumerPollProducersForChange(node) {\n assertConsumerNode(node);\n // Poll producers for change.\n for (let i = 0; i < node.producerNode.length; i++) {\n const producer = node.producerNode[i];\n const seenVersion = node.producerLastReadVersion[i];\n // First check the versions. A mismatch means that the producer's value is known to have\n // changed since the last time we read it.\n if (seenVersion !== producer.version) {\n return true;\n }\n // The producer's version is the same as the last time we read it, but it might itself be\n // stale. Force the producer to recompute its version (calculating a new value if necessary).\n producerUpdateValueVersion(producer);\n // Now when we do this check, `producer.version` is guaranteed to be up to date, so if the\n // versions still match then it has not changed since the last time we read it.\n if (seenVersion !== producer.version) {\n return true;\n }\n }\n return false;\n}\n/**\n * Disconnect this consumer from the graph.\n */\nfunction consumerDestroy(node) {\n assertConsumerNode(node);\n if (consumerIsLive(node)) {\n // Drop all connections from the graph to this node.\n for (let i = 0; i < node.producerNode.length; i++) {\n producerRemoveLiveConsumerAtIndex(node.producerNode[i], node.producerIndexOfThis[i]);\n }\n }\n // Truncate all the arrays to drop all connection from this node to the graph.\n node.producerNode.length = node.producerLastReadVersion.length = node.producerIndexOfThis.length =\n 0;\n if (node.liveConsumerNode) {\n node.liveConsumerNode.length = node.liveConsumerIndexOfThis.length = 0;\n }\n}\n/**\n * Add `consumer` as a live consumer of this node.\n *\n * Note that this operation is potentially transitive. If this node becomes live, then it becomes\n * a live consumer of all of its current producers.\n */\nfunction producerAddLiveConsumer(node, consumer, indexOfThis) {\n assertProducerNode(node);\n assertConsumerNode(node);\n if (node.liveConsumerNode.length === 0) {\n // When going from 0 to 1 live consumers, we become a live consumer to our producers.\n for (let i = 0; i < node.producerNode.length; i++) {\n node.producerIndexOfThis[i] = producerAddLiveConsumer(node.producerNode[i], node, i);\n }\n }\n node.liveConsumerIndexOfThis.push(indexOfThis);\n return node.liveConsumerNode.push(consumer) - 1;\n}\n/**\n * Remove the live consumer at `idx`.\n */\nfunction producerRemoveLiveConsumerAtIndex(node, idx) {\n assertProducerNode(node);\n assertConsumerNode(node);\n if (typeof ngDevMode !== 'undefined' && ngDevMode && idx >= node.liveConsumerNode.length) {\n throw new Error(`Assertion error: active consumer index ${idx} is out of bounds of ${node.liveConsumerNode.length} consumers)`);\n }\n if (node.liveConsumerNode.length === 1) {\n // When removing the last live consumer, we will no longer be live. We need to remove\n // ourselves from our producers' tracking (which may cause consumer-producers to lose\n // liveness as well).\n for (let i = 0; i < node.producerNode.length; i++) {\n producerRemoveLiveConsumerAtIndex(node.producerNode[i], node.producerIndexOfThis[i]);\n }\n }\n // Move the last value of `liveConsumers` into `idx`. Note that if there's only a single\n // live consumer, this is a no-op.\n const lastIdx = node.liveConsumerNode.length - 1;\n node.liveConsumerNode[idx] = node.liveConsumerNode[lastIdx];\n node.liveConsumerIndexOfThis[idx] = node.liveConsumerIndexOfThis[lastIdx];\n // Truncate the array.\n node.liveConsumerNode.length--;\n node.liveConsumerIndexOfThis.length--;\n // If the index is still valid, then we need to fix the index pointer from the producer to this\n // consumer, and update it from `lastIdx` to `idx` (accounting for the move above).\n if (idx < node.liveConsumerNode.length) {\n const idxProducer = node.liveConsumerIndexOfThis[idx];\n const consumer = node.liveConsumerNode[idx];\n assertConsumerNode(consumer);\n consumer.producerIndexOfThis[idxProducer] = idx;\n }\n}\nfunction consumerIsLive(node) {\n return node.consumerIsAlwaysLive || (node?.liveConsumerNode?.length ?? 0) > 0;\n}\nfunction assertConsumerNode(node) {\n node.producerNode ??= [];\n node.producerIndexOfThis ??= [];\n node.producerLastReadVersion ??= [];\n}\nfunction assertProducerNode(node) {\n node.liveConsumerNode ??= [];\n node.liveConsumerIndexOfThis ??= [];\n}\n\n/**\n * Create a computed signal which derives a reactive value from an expression.\n */\nfunction createComputed(computation) {\n const node = Object.create(COMPUTED_NODE);\n node.computation = computation;\n const computed = () => {\n // Check if the value needs updating before returning it.\n producerUpdateValueVersion(node);\n // Record that someone looked at this signal.\n producerAccessed(node);\n if (node.value === ERRORED) {\n throw node.error;\n }\n return node.value;\n };\n computed[SIGNAL] = node;\n return computed;\n}\n/**\n * A dedicated symbol used before a computed value has been calculated for the first time.\n * Explicitly typed as `any` so we can use it as signal's value.\n */\nconst UNSET = /* @__PURE__ */ Symbol('UNSET');\n/**\n * A dedicated symbol used in place of a computed signal value to indicate that a given computation\n * is in progress. Used to detect cycles in computation chains.\n * Explicitly typed as `any` so we can use it as signal's value.\n */\nconst COMPUTING = /* @__PURE__ */ Symbol('COMPUTING');\n/**\n * A dedicated symbol used in place of a computed signal value to indicate that a given computation\n * failed. The thrown error is cached until the computation gets dirty again.\n * Explicitly typed as `any` so we can use it as signal's value.\n */\nconst ERRORED = /* @__PURE__ */ Symbol('ERRORED');\n// Note: Using an IIFE here to ensure that the spread assignment is not considered\n// a side-effect, ending up preserving `COMPUTED_NODE` and `REACTIVE_NODE`.\n// TODO: remove when https://github.com/evanw/esbuild/issues/3392 is resolved.\nconst COMPUTED_NODE = /* @__PURE__ */ (() => {\n return {\n ...REACTIVE_NODE,\n value: UNSET,\n dirty: true,\n error: null,\n equal: defaultEquals,\n producerMustRecompute(node) {\n // Force a recomputation if there's no current value, or if the current value is in the\n // process of being calculated (which should throw an error).\n return node.value === UNSET || node.value === COMPUTING;\n },\n producerRecomputeValue(node) {\n if (node.value === COMPUTING) {\n // Our computation somehow led to a cyclic read of itself.\n throw new Error('Detected cycle in computations.');\n }\n const oldValue = node.value;\n node.value = COMPUTING;\n const prevConsumer = consumerBeforeComputation(node);\n let newValue;\n try {\n newValue = node.computation();\n }\n catch (err) {\n newValue = ERRORED;\n node.error = err;\n }\n finally {\n consumerAfterComputation(node, prevConsumer);\n }\n if (oldValue !== UNSET && oldValue !== ERRORED && newValue !== ERRORED &&\n node.equal(oldValue, newValue)) {\n // No change to `valueVersion` - old and new values are\n // semantically equivalent.\n node.value = oldValue;\n return;\n }\n node.value = newValue;\n node.version++;\n },\n };\n})();\n\nfunction defaultThrowError() {\n throw new Error();\n}\nlet throwInvalidWriteToSignalErrorFn = defaultThrowError;\nfunction throwInvalidWriteToSignalError() {\n throwInvalidWriteToSignalErrorFn();\n}\nfunction setThrowInvalidWriteToSignalError(fn) {\n throwInvalidWriteToSignalErrorFn = fn;\n}\n\n/**\n * If set, called after `WritableSignal`s are updated.\n *\n * This hook can be used to achieve various effects, such as running effects synchronously as part\n * of setting a signal.\n */\nlet postSignalSetFn = null;\n/**\n * Create a `Signal` that can be set or updated directly.\n */\nfunction createSignal(initialValue) {\n const node = Object.create(SIGNAL_NODE);\n node.value = initialValue;\n const getter = (() => {\n producerAccessed(node);\n return node.value;\n });\n getter[SIGNAL] = node;\n return getter;\n}\nfunction setPostSignalSetFn(fn) {\n const prev = postSignalSetFn;\n postSignalSetFn = fn;\n return prev;\n}\nfunction signalGetFn() {\n producerAccessed(this);\n return this.value;\n}\nfunction signalSetFn(node, newValue) {\n if (!producerUpdatesAllowed()) {\n throwInvalidWriteToSignalError();\n }\n if (!node.equal(node.value, newValue)) {\n node.value = newValue;\n signalValueChanged(node);\n }\n}\nfunction signalUpdateFn(node, updater) {\n if (!producerUpdatesAllowed()) {\n throwInvalidWriteToSignalError();\n }\n signalSetFn(node, updater(node.value));\n}\n// Note: Using an IIFE here to ensure that the spread assignment is not considered\n// a side-effect, ending up preserving `COMPUTED_NODE` and `REACTIVE_NODE`.\n// TODO: remove when https://github.com/evanw/esbuild/issues/3392 is resolved.\nconst SIGNAL_NODE = /* @__PURE__ */ (() => {\n return {\n ...REACTIVE_NODE,\n equal: defaultEquals,\n value: undefined,\n };\n})();\nfunction signalValueChanged(node) {\n node.version++;\n producerIncrementEpoch();\n producerNotifyConsumers(node);\n postSignalSetFn?.();\n}\n\nfunction createWatch(fn, schedule, allowSignalWrites) {\n const node = Object.create(WATCH_NODE);\n if (allowSignalWrites) {\n node.consumerAllowSignalWrites = true;\n }\n node.fn = fn;\n node.schedule = schedule;\n const registerOnCleanup = (cleanupFn) => {\n node.cleanupFn = cleanupFn;\n };\n function isWatchNodeDestroyed(node) {\n return node.fn === null && node.schedule === null;\n }\n function destroyWatchNode(node) {\n if (!isWatchNodeDestroyed(node)) {\n consumerDestroy(node); // disconnect watcher from the reactive graph\n node.cleanupFn();\n // nullify references to the integration functions to mark node as destroyed\n node.fn = null;\n node.schedule = null;\n node.cleanupFn = NOOP_CLEANUP_FN;\n }\n }\n const run = () => {\n if (node.fn === null) {\n // trying to run a destroyed watch is noop\n return;\n }\n if (isInNotificationPhase()) {\n throw new Error(`Schedulers cannot synchronously execute watches while scheduling.`);\n }\n node.dirty = false;\n if (node.hasRun && !consumerPollProducersForChange(node)) {\n return;\n }\n node.hasRun = true;\n const prevConsumer = consumerBeforeComputation(node);\n try {\n node.cleanupFn();\n node.cleanupFn = NOOP_CLEANUP_FN;\n node.fn(registerOnCleanup);\n }\n finally {\n consumerAfterComputation(node, prevConsumer);\n }\n };\n node.ref = {\n notify: () => consumerMarkDirty(node),\n run,\n cleanup: () => node.cleanupFn(),\n destroy: () => destroyWatchNode(node),\n [SIGNAL]: node,\n };\n return node.ref;\n}\nconst NOOP_CLEANUP_FN = () => { };\n// Note: Using an IIFE here to ensure that the spread assignment is not considered\n// a side-effect, ending up preserving `COMPUTED_NODE` and `REACTIVE_NODE`.\n// TODO: remove when https://github.com/evanw/esbuild/issues/3392 is resolved.\nconst WATCH_NODE = /* @__PURE__ */ (() => {\n return {\n ...REACTIVE_NODE,\n consumerIsAlwaysLive: true,\n consumerAllowSignalWrites: false,\n consumerMarkedDirty: (node) => {\n if (node.schedule !== null) {\n node.schedule(node.ref);\n }\n },\n hasRun: false,\n cleanupFn: NOOP_CLEANUP_FN,\n };\n})();\n\nfunction setAlternateWeakRefImpl(impl) {\n // TODO: remove this function\n}\n\nexport { REACTIVE_NODE, SIGNAL, SIGNAL_NODE, consumerAfterComputation, consumerBeforeComputation, consumerDestroy, consumerMarkDirty, consumerPollProducersForChange, createComputed, createSignal, createWatch, defaultEquals, getActiveConsumer, isInNotificationPhase, isReactive, producerAccessed, producerNotifyConsumers, producerUpdateValueVersion, producerUpdatesAllowed, setActiveConsumer, setAlternateWeakRefImpl, setPostSignalSetFn, setThrowInvalidWriteToSignalError, signalSetFn, signalUpdateFn };\n","/**\n * @license Angular v17.3.5\n * (c) 2010-2024 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport { SIGNAL_NODE as SIGNAL_NODE$1, signalSetFn as signalSetFn$1, producerAccessed as producerAccessed$1, SIGNAL as SIGNAL$1, getActiveConsumer as getActiveConsumer$1, setActiveConsumer as setActiveConsumer$1, consumerDestroy as consumerDestroy$1, REACTIVE_NODE as REACTIVE_NODE$1, consumerBeforeComputation as consumerBeforeComputation$1, consumerAfterComputation as consumerAfterComputation$1, consumerPollProducersForChange as consumerPollProducersForChange$1, createSignal as createSignal$1, signalUpdateFn as signalUpdateFn$1, createComputed as createComputed$1, setThrowInvalidWriteToSignalError as setThrowInvalidWriteToSignalError$1, createWatch as createWatch$1 } from '@angular/core/primitives/signals';\nimport { Subject, Subscription, BehaviorSubject } from 'rxjs';\nimport { map, first } from 'rxjs/operators';\n\n/**\n * Base URL for the error details page.\n *\n * Keep this constant in sync across:\n * - packages/compiler-cli/src/ngtsc/diagnostics/src/error_details_base_url.ts\n * - packages/core/src/error_details_base_url.ts\n */\nconst ERROR_DETAILS_PAGE_BASE_URL = 'https://angular.io/errors';\n/**\n * URL for the XSS security documentation.\n */\nconst XSS_SECURITY_URL = 'https://g.co/ng/security#xss';\n\n/**\n * Class that represents a runtime error.\n * Formats and outputs the error message in a consistent way.\n *\n * Example:\n * ```\n * throw new RuntimeError(\n * RuntimeErrorCode.INJECTOR_ALREADY_DESTROYED,\n * ngDevMode && 'Injector has already been destroyed.');\n * ```\n *\n * Note: the `message` argument contains a descriptive error message as a string in development\n * mode (when the `ngDevMode` is defined). In production mode (after tree-shaking pass), the\n * `message` argument becomes `false`, thus we account for it in the typings and the runtime\n * logic.\n */\nclass RuntimeError extends Error {\n constructor(code, message) {\n super(formatRuntimeError(code, message));\n this.code = code;\n }\n}\n/**\n * Called to format a runtime error.\n * See additional info on the `message` argument type in the `RuntimeError` class description.\n */\nfunction formatRuntimeError(code, message) {\n // Error code might be a negative number, which is a special marker that instructs the logic to\n // generate a link to the error details page on angular.io.\n // We also prepend `0` to non-compile-time errors.\n const fullCode = `NG0${Math.abs(code)}`;\n let errorMessage = `${fullCode}${message ? ': ' + message : ''}`;\n if (ngDevMode && code < 0) {\n const addPeriodSeparator = !errorMessage.match(/[.,;!?\\n]$/);\n const separator = addPeriodSeparator ? '.' : '';\n errorMessage =\n `${errorMessage}${separator} Find more at ${ERROR_DETAILS_PAGE_BASE_URL}/${fullCode}`;\n }\n return errorMessage;\n}\n\nconst REQUIRED_UNSET_VALUE = /* @__PURE__ */ Symbol('InputSignalNode#UNSET');\n// Note: Using an IIFE here to ensure that the spread assignment is not considered\n// a side-effect, ending up preserving `COMPUTED_NODE` and `REACTIVE_NODE`.\n// TODO: remove when https://github.com/evanw/esbuild/issues/3392 is resolved.\nconst INPUT_SIGNAL_NODE = /* @__PURE__ */ (() => {\n return {\n ...SIGNAL_NODE$1,\n transformFn: undefined,\n applyValueToInputSignal(node, value) {\n signalSetFn$1(node, value);\n }\n };\n})();\n\nconst ɵINPUT_SIGNAL_BRAND_READ_TYPE = /* @__PURE__ */ Symbol();\nconst ɵINPUT_SIGNAL_BRAND_WRITE_TYPE = /* @__PURE__ */ Symbol();\n/**\n * Creates an input signal.\n *\n * @param initialValue The initial value.\n * Can be set to {@link REQUIRED_UNSET_VALUE} for required inputs.\n * @param options Additional options for the input. e.g. a transform, or an alias.\n */\nfunction createInputSignal(initialValue, options) {\n const node = Object.create(INPUT_SIGNAL_NODE);\n node.value = initialValue;\n // Perf note: Always set `transformFn` here to ensure that `node` always\n // has the same v8 class shape, allowing monomorphic reads on input signals.\n node.transformFn = options?.transform;\n function inputValueFn() {\n // Record that someone looked at this signal.\n producerAccessed$1(node);\n if (node.value === REQUIRED_UNSET_VALUE) {\n throw new RuntimeError(-950 /* RuntimeErrorCode.REQUIRED_INPUT_NO_VALUE */, ngDevMode && 'Input is required but no value is available yet.');\n }\n return node.value;\n }\n inputValueFn[SIGNAL$1] = node;\n if (ngDevMode) {\n inputValueFn.toString = () => `[Input Signal: ${inputValueFn()}]`;\n }\n return inputValueFn;\n}\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 */\nfunction noSideEffects(fn) {\n return { toString: fn }.toString();\n}\n\nconst ANNOTATIONS = '__annotations__';\nconst PARAMETERS = '__parameters__';\nconst PROP_METADATA = '__prop__metadata__';\n/**\n * @suppress {globalThis}\n */\nfunction makeDecorator(name, props, parentClass, additionalProcessing, typeFn) {\n return noSideEffects(() => {\n const metaCtor = makeMetadataCtor(props);\n function DecoratorFactory(...args) {\n if (this instanceof DecoratorFactory) {\n metaCtor.call(this, ...args);\n return this;\n }\n const annotationInstance = new DecoratorFactory(...args);\n return function TypeDecorator(cls) {\n if (typeFn)\n typeFn(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 const 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}\nfunction makeMetadataCtor(props) {\n return function ctor(...args) {\n if (props) {\n const values = props(...args);\n for (const propName in values) {\n this[propName] = values[propName];\n }\n }\n };\n}\nfunction makeParamDecorator(name, props, parentClass) {\n return noSideEffects(() => {\n const metaCtor = makeMetadataCtor(props);\n function ParamDecoratorFactory(...args) {\n if (this instanceof ParamDecoratorFactory) {\n metaCtor.apply(this, args);\n return this;\n }\n const annotationInstance = new ParamDecoratorFactory(...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 const 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}\nfunction makePropDecorator(name, props, parentClass, additionalProcessing) {\n return noSideEffects(() => {\n const metaCtor = makeMetadataCtor(props);\n function PropDecoratorFactory(...args) {\n if (this instanceof PropDecoratorFactory) {\n metaCtor.apply(this, args);\n return this;\n }\n const decoratorInstance = new PropDecoratorFactory(...args);\n function PropDecorator(target, name) {\n // target is undefined with standard decorators. This case is not supported and will throw\n // if this decorator is used in JIT mode with standard decorators.\n if (target === undefined) {\n throw new Error('Standard Angular field decorators are not supported in JIT mode.');\n }\n const 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 const 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(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\nconst _global = globalThis;\n\nfunction ngDevModeResetPerfCounters() {\n const locationString = typeof location !== 'undefined' ? location.toString() : '';\n const 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 hydratedNodes: 0,\n hydratedComponents: 0,\n dehydratedViewsRemoved: 0,\n dehydratedViewsCleanupRuns: 0,\n componentsSkippedHydration: 0,\n };\n // Make sure to refer to ngDevMode as ['ngDevMode'] for closure.\n const allowNgDevModeTrue = locationString.indexOf('ngDevMode=false') === -1;\n if (!allowNgDevModeTrue) {\n _global['ngDevMode'] = false;\n }\n else {\n if (typeof _global['ngDevMode'] !== 'object') {\n _global['ngDevMode'] = {};\n }\n Object.assign(_global['ngDevMode'], newCounters);\n }\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 */\nfunction 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' || Object.keys(ngDevMode).length === 0) {\n ngDevModeResetPerfCounters();\n }\n return typeof ngDevMode !== 'undefined' && !!ngDevMode;\n }\n return false;\n}\n\nfunction getClosureSafeProperty(objWithPropertyToExtract) {\n for (let 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 */\nfunction fillProperties(target, source) {\n for (const key in source) {\n if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n target[key] = source[key];\n }\n }\n}\n\nfunction stringify(token) {\n if (typeof token === 'string') {\n return token;\n }\n if (Array.isArray(token)) {\n return '[' + token.map(stringify).join(', ') + ']';\n }\n if (token == null) {\n return '' + token;\n }\n if (token.overriddenName) {\n return `${token.overriddenName}`;\n }\n if (token.name) {\n return `${token.name}`;\n }\n const res = token.toString();\n if (res == null) {\n return '' + res;\n }\n const newLineIndex = res.indexOf('\\n');\n return newLineIndex === -1 ? res : res.substring(0, newLineIndex);\n}\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 */\nfunction concatStringsWithSpace(before, after) {\n return (before == null || before === '') ?\n (after === null ? '' : after) :\n ((after == null || after === '') ? before : before + ' ' + after);\n}\n/**\n * Ellipses the string in the middle when longer than the max length\n *\n * @param string\n * @param maxLength of the output string\n * @returns ellipsed string with ... in the middle\n */\nfunction truncateMiddle(str, maxLength = 100) {\n if (!str || maxLength < 1 || str.length <= maxLength)\n return str;\n if (maxLength == 1)\n return str.substring(0, 1) + '...';\n const halfLimit = Math.round(maxLength / 2);\n return str.substring(0, halfLimit) + '...' + str.substring(str.length - halfLimit);\n}\n\nconst __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 * `forwardRef` is also used to break circularities in standalone components imports.\n *\n * @usageNotes\n * ### Circular dependency example\n * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref'}\n *\n * ### Circular standalone reference import example\n * ```ts\n * @Component({\n * standalone: true,\n * imports: [ChildComponent],\n * selector: 'app-parent',\n * template: ``,\n * })\n * export class ParentComponent {\n * @Input() hideParent: boolean;\n * }\n *\n *\n * @Component({\n * standalone: true,\n * imports: [CommonModule, forwardRef(() => ParentComponent)],\n * selector: 'app-child',\n * template: ``,\n * })\n * export class ChildComponent {\n * @Input() hideParent: boolean;\n * }\n * ```\n *\n * @publicApi\n */\nfunction 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 {@link forwardRef}\n * @publicApi\n */\nfunction resolveForwardRef(type) {\n return isForwardRef(type) ? type() : type;\n}\n/** Checks whether a function is wrapped by a `forwardRef`. */\nfunction isForwardRef(fn) {\n return typeof fn === 'function' && fn.hasOwnProperty(__forward_ref__) &&\n fn.__forward_ref__ === forwardRef;\n}\n\n// The functions in this file verify that the assumptions we are making\nfunction assertNumber(actual, msg) {\n if (!(typeof actual === 'number')) {\n throwError(msg, typeof actual, 'number', '===');\n }\n}\nfunction 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}\nfunction assertString(actual, msg) {\n if (!(typeof actual === 'string')) {\n throwError(msg, actual === null ? 'null' : typeof actual, 'string', '===');\n }\n}\nfunction assertFunction(actual, msg) {\n if (!(typeof actual === 'function')) {\n throwError(msg, actual === null ? 'null' : typeof actual, 'function', '===');\n }\n}\nfunction assertEqual(actual, expected, msg) {\n if (!(actual == expected)) {\n throwError(msg, actual, expected, '==');\n }\n}\nfunction assertNotEqual(actual, expected, msg) {\n if (!(actual != expected)) {\n throwError(msg, actual, expected, '!=');\n }\n}\nfunction assertSame(actual, expected, msg) {\n if (!(actual === expected)) {\n throwError(msg, actual, expected, '===');\n }\n}\nfunction assertNotSame(actual, expected, msg) {\n if (!(actual !== expected)) {\n throwError(msg, actual, expected, '!==');\n }\n}\nfunction assertLessThan(actual, expected, msg) {\n if (!(actual < expected)) {\n throwError(msg, actual, expected, '<');\n }\n}\nfunction assertLessThanOrEqual(actual, expected, msg) {\n if (!(actual <= expected)) {\n throwError(msg, actual, expected, '<=');\n }\n}\nfunction assertGreaterThan(actual, expected, msg) {\n if (!(actual > expected)) {\n throwError(msg, actual, expected, '>');\n }\n}\nfunction assertGreaterThanOrEqual(actual, expected, msg) {\n if (!(actual >= expected)) {\n throwError(msg, actual, expected, '>=');\n }\n}\nfunction assertNotDefined(actual, msg) {\n if (actual != null) {\n throwError(msg, actual, null, '==');\n }\n}\nfunction assertDefined(actual, msg) {\n if (actual == null) {\n throwError(msg, actual, null, '!=');\n }\n}\nfunction throwError(msg, actual, expected, comparison) {\n throw new Error(`ASSERTION ERROR: ${msg}` +\n (comparison == null ? '' : ` [Expected=> ${expected} ${comparison} ${actual} <=Actual]`));\n}\nfunction assertDomNode(node) {\n if (!(node instanceof Node)) {\n throwError(`The provided value must be an instance of a DOM Node but got ${stringify(node)}`);\n }\n}\nfunction assertElement(node) {\n if (!(node instanceof Element)) {\n throwError(`The provided value must be an element but got ${stringify(node)}`);\n }\n}\nfunction assertIndexInRange(arr, index) {\n assertDefined(arr, 'Array must be defined.');\n const maxLen = arr.length;\n if (index < 0 || index >= maxLen) {\n throwError(`Index expected to be less than ${maxLen} but got ${index}`);\n }\n}\nfunction assertOneOf(value, ...validValues) {\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}\nfunction assertNotReactive(fn) {\n if (getActiveConsumer$1() !== null) {\n throwError(`${fn}() should never be called in a reactive context.`);\n }\n}\n\n/**\n * Construct an injectable definition which defines how a token will be constructed by the DI\n * system, and 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`](api/core/inject) to access the `Injector` and request injection\n * of dependencies.\n *\n * @codeGenApi\n * @publicApi This instruction has been emitted by ViewEngine for some time and is deployed to npm.\n */\nfunction ɵɵ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 */\nconst 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 */\nfunction ɵɵ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 */\nfunction getInjectableDef(type) {\n return getOwnDefinition(type, NG_PROV_DEF) || getOwnDefinition(type, NG_INJECTABLE_DEF);\n}\nfunction isInjectable(type) {\n return getInjectableDef(type) !== null;\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 */\nfunction 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 */\nfunction getInheritedInjectableDef(type) {\n const def = type && (type[NG_PROV_DEF] || type[NG_INJECTABLE_DEF]);\n if (def) {\n ngDevMode &&\n console.warn(`DEPRECATED: DI is instantiating a token \"${type.name}\" 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 \"${type.name}\" class.`);\n return def;\n }\n else {\n return null;\n }\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 */\nfunction getInjectorDef(type) {\n return type && (type.hasOwnProperty(NG_INJ_DEF) || type.hasOwnProperty(NG_INJECTOR_DEF)) ?\n type[NG_INJ_DEF] :\n null;\n}\nconst NG_PROV_DEF = getClosureSafeProperty({ ɵprov: getClosureSafeProperty });\nconst 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\nconst NG_INJECTABLE_DEF = getClosureSafeProperty({ ngInjectableDef: getClosureSafeProperty });\nconst NG_INJECTOR_DEF = getClosureSafeProperty({ ngInjectorDef: getClosureSafeProperty });\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 an additional level of type safety.\n *\n *
\n *\n * **Important Note**: Ensure that you use the same instance of the `InjectionToken` in both the\n * provider and the injection call. Creating a new instance of `InjectionToken` in different places,\n * even with the same description, will be treated as different tokens by Angular's DI system,\n * leading to a `NullInjectorError`.\n *\n *
\n *\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`](api/core/inject) function.\n * As you can see in the Tree-shakable InjectionToken example below.\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` (note:\n * this option is now deprecated). As mentioned above, `'root'` is the default value for\n * `providedIn`.\n *\n * The `providedIn: NgModule` and `providedIn: 'any'` options are deprecated.\n *\n * @usageNotes\n * ### Basic Examples\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 * @publicApi\n */\nclass InjectionToken {\n /**\n * @param _desc Description for the token,\n * used only for debugging purposes,\n * it should but does not need to be unique\n * @param options Options for the token's usage, as described above\n */\n constructor(_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 /**\n * @internal\n */\n get multi() {\n return this;\n }\n toString() {\n return `InjectionToken ${this._desc}`;\n }\n}\n\nlet _injectorProfilerContext;\nfunction getInjectorProfilerContext() {\n !ngDevMode && throwError('getInjectorProfilerContext should never be called in production mode');\n return _injectorProfilerContext;\n}\nfunction setInjectorProfilerContext(context) {\n !ngDevMode && throwError('setInjectorProfilerContext should never be called in production mode');\n const previous = _injectorProfilerContext;\n _injectorProfilerContext = context;\n return previous;\n}\nlet injectorProfilerCallback = null;\n/**\n * Sets the callback function which will be invoked during certain DI events within the\n * runtime (for example: injecting services, creating injectable instances, configuring providers)\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 */\nconst setInjectorProfiler = (injectorProfiler) => {\n !ngDevMode && throwError('setInjectorProfiler should never be called in production mode');\n injectorProfilerCallback = injectorProfiler;\n};\n/**\n * Injector profiler function which emits on DI events executed by the runtime.\n *\n * @param event InjectorProfilerEvent corresponding to the DI event being emitted\n */\nfunction injectorProfiler(event) {\n !ngDevMode && throwError('Injector profiler should never be called in production mode');\n if (injectorProfilerCallback != null /* both `null` and `undefined` */) {\n injectorProfilerCallback(event);\n }\n}\n/**\n * Emits an InjectorProfilerEventType.ProviderConfigured to the injector profiler. The data in the\n * emitted event includes the raw provider, as well as the token that provider is providing.\n *\n * @param eventProvider A provider object\n */\nfunction emitProviderConfiguredEvent(eventProvider, isViewProvider = false) {\n !ngDevMode && throwError('Injector profiler should never be called in production mode');\n let token;\n // if the provider is a TypeProvider (typeof provider is function) then the token is the\n // provider itself\n if (typeof eventProvider === 'function') {\n token = eventProvider;\n }\n // if the provider is an injection token, then the token is the injection token.\n else if (eventProvider instanceof InjectionToken) {\n token = eventProvider;\n }\n // in all other cases we can access the token via the `provide` property of the provider\n else {\n token = resolveForwardRef(eventProvider.provide);\n }\n let provider = eventProvider;\n // Injection tokens may define their own default provider which gets attached to the token itself\n // as `ɵprov`. In this case, we want to emit the provider that is attached to the token, not the\n // token itself.\n if (eventProvider instanceof InjectionToken) {\n provider = eventProvider.ɵprov || eventProvider;\n }\n injectorProfiler({\n type: 2 /* InjectorProfilerEventType.ProviderConfigured */,\n context: getInjectorProfilerContext(),\n providerRecord: { token, provider, isViewProvider }\n });\n}\n/**\n * Emits an event to the injector profiler with the instance that was created. Note that\n * the injector associated with this emission can be accessed by using getDebugInjectContext()\n *\n * @param instance an object created by an injector\n */\nfunction emitInstanceCreatedByInjectorEvent(instance) {\n !ngDevMode && throwError('Injector profiler should never be called in production mode');\n injectorProfiler({\n type: 1 /* InjectorProfilerEventType.InstanceCreatedByInjector */,\n context: getInjectorProfilerContext(),\n instance: { value: instance }\n });\n}\n/**\n * @param token DI token associated with injected service\n * @param value the instance of the injected service (i.e the result of `inject(token)`)\n * @param flags the flags that the token was injected with\n */\nfunction emitInjectEvent(token, value, flags) {\n !ngDevMode && throwError('Injector profiler should never be called in production mode');\n injectorProfiler({\n type: 0 /* InjectorProfilerEventType.Inject */,\n context: getInjectorProfilerContext(),\n service: { token, value, flags }\n });\n}\nfunction runInInjectorProfilerContext(injector, token, callback) {\n !ngDevMode &&\n throwError('runInInjectorProfilerContext should never be called in production mode');\n const prevInjectContext = setInjectorProfilerContext({ injector, token });\n try {\n callback();\n }\n finally {\n setInjectorProfilerContext(prevInjectContext);\n }\n}\n\nfunction isEnvironmentProviders(value) {\n return value && !!value.ɵproviders;\n}\n\nconst NG_COMP_DEF = getClosureSafeProperty({ ɵcmp: getClosureSafeProperty });\nconst NG_DIR_DEF = getClosureSafeProperty({ ɵdir: getClosureSafeProperty });\nconst NG_PIPE_DEF = getClosureSafeProperty({ ɵpipe: getClosureSafeProperty });\nconst NG_MOD_DEF = getClosureSafeProperty({ ɵmod: getClosureSafeProperty });\nconst 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.\nconst NG_ELEMENT_ID = getClosureSafeProperty({ __NG_ELEMENT_ID__: getClosureSafeProperty });\n/**\n * The `NG_ENV_ID` field on a DI token indicates special processing in the `EnvironmentInjector`:\n * getting such tokens from the `EnvironmentInjector` will bypass the standard DI resolution\n * strategy and instead will return implementation produced by the `NG_ENV_ID` factory function.\n *\n * This particular retrieval of DI tokens is mostly done to eliminate circular dependencies and\n * improve tree-shaking.\n */\nconst NG_ENV_ID = getClosureSafeProperty({ __NG_ENV_ID__: getClosureSafeProperty });\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 */\nfunction 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 *\n * Important! This function contains a megamorphic read and should only be\n * used for error messages.\n */\nfunction 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 * Used to stringify a `Type` and including the file path and line number in which it is defined, if\n * possible, for better debugging experience.\n *\n * Important! This function contains a megamorphic read and should only be used for error messages.\n */\nfunction debugStringifyTypeForError(type) {\n // TODO(pmvald): Do some refactoring so that we can use getComponentDef here without creating\n // circular deps.\n let componentDef = type[NG_COMP_DEF] || null;\n if (componentDef !== null && componentDef.debugInfo) {\n return stringifyTypeFromDebugInfo(componentDef.debugInfo);\n }\n return stringifyForError(type);\n}\n// TODO(pmvald): Do some refactoring so that we can use the type ClassDebugInfo for the param\n// debugInfo here without creating circular deps.\nfunction stringifyTypeFromDebugInfo(debugInfo) {\n if (!debugInfo.filePath || !debugInfo.lineNumber) {\n return debugInfo.className;\n }\n else {\n return `${debugInfo.className} (at ${debugInfo.filePath}:${debugInfo.lineNumber})`;\n }\n}\n\n/** Called when directives inject each other (creating a circular dependency) */\nfunction throwCyclicDependencyError(token, path) {\n const depPath = path ? `. Dependency path: ${path.join(' > ')} > ${token}` : '';\n throw new RuntimeError(-200 /* RuntimeErrorCode.CYCLIC_DI_DEPENDENCY */, ngDevMode ? `Circular dependency in DI detected for ${token}${depPath}` : token);\n}\nfunction throwMixedMultiProviderError() {\n throw new Error(`Cannot mix multi providers and regular providers`);\n}\nfunction throwInvalidProviderError(ngModuleType, providers, provider) {\n if (ngModuleType && providers) {\n const providerDetail = providers.map(v => v == provider ? '?' + provider + '?' : '...');\n throw new Error(`Invalid provider for the NgModule '${stringify(ngModuleType)}' - only instances of Provider and Type are allowed, got: [${providerDetail.join(', ')}]`);\n }\n else if (isEnvironmentProviders(provider)) {\n if (provider.ɵfromNgModule) {\n throw new RuntimeError(207 /* RuntimeErrorCode.PROVIDER_IN_WRONG_CONTEXT */, `Invalid providers from 'importProvidersFrom' present in a non-environment injector. 'importProvidersFrom' can't be used for component providers.`);\n }\n else {\n throw new RuntimeError(207 /* RuntimeErrorCode.PROVIDER_IN_WRONG_CONTEXT */, `Invalid providers present in a non-environment injector. 'EnvironmentProviders' can't be used for component providers.`);\n }\n }\n else {\n throw new Error('Invalid provider');\n }\n}\n/** Throws an error when a token is not found in DI. */\nfunction throwProviderNotFoundError(token, injectorName) {\n const errorMessage = ngDevMode &&\n `No provider for ${stringifyForError(token)} found${injectorName ? ` in ${injectorName}` : ''}`;\n throw new RuntimeError(-201 /* RuntimeErrorCode.PROVIDER_NOT_FOUND */, errorMessage);\n}\n\n/**\n * Injection flags for DI.\n *\n * @publicApi\n * @deprecated use an options object for [`inject`](api/core/inject) instead.\n */\nvar InjectFlags;\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})(InjectFlags || (InjectFlags = {}));\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 */\nlet _injectImplementation;\nfunction getInjectImplementation() {\n return _injectImplementation;\n}\n/**\n * Sets the current inject implementation.\n */\nfunction setInjectImplementation(impl) {\n const 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 * injectable definition.\n */\nfunction injectRootLimpMode(token, notFoundValue, flags) {\n const 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 & InjectFlags.Optional)\n return null;\n if (notFoundValue !== undefined)\n return notFoundValue;\n throwProviderNotFoundError(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 */\nfunction assertInjectImplementationNotEqual(fn) {\n ngDevMode &&\n assertNotEqual(_injectImplementation, fn, 'Calling ɵɵinject would cause infinite recursion');\n}\n\nconst _THROW_IF_NOT_FOUND = {};\nconst 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 */\nconst DI_DECORATOR_FLAG = '__NG_DI_FLAG__';\nconst NG_TEMP_TOKEN_PATH = 'ngTempTokenPath';\nconst NG_TOKEN_PATH = 'ngTokenPath';\nconst NEW_LINE = /\\n/gm;\nconst NO_NEW_LINE = 'ɵ';\nconst SOURCE = '__source';\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 */\nlet _currentInjector = undefined;\nfunction getCurrentInjector() {\n return _currentInjector;\n}\nfunction setCurrentInjector(injector) {\n const former = _currentInjector;\n _currentInjector = injector;\n return former;\n}\nfunction injectInjectorOnly(token, flags = InjectFlags.Default) {\n if (_currentInjector === undefined) {\n throw new RuntimeError(-203 /* RuntimeErrorCode.MISSING_INJECTION_CONTEXT */, ngDevMode &&\n `inject() must be called from an injection context such as a constructor, a factory function, a field initializer, or a function used with \\`runInInjectionContext\\`.`);\n }\n else if (_currentInjector === null) {\n return injectRootLimpMode(token, undefined, flags);\n }\n else {\n const value = _currentInjector.get(token, flags & InjectFlags.Optional ? null : undefined, flags);\n ngDevMode && emitInjectEvent(token, value, flags);\n return value;\n }\n}\nfunction ɵɵinject(token, flags = 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 * 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 */\nfunction ɵɵinvalidFactoryDep(index) {\n throw new RuntimeError(202 /* RuntimeErrorCode.INVALID_FACTORY_DEPENDENCY */, 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}\n/**\n * Injects a token from the currently active injector.\n * `inject` is only supported in an [injection context](/guide/dependency-injection-context). It can\n * be used during:\n * - Construction (via the `constructor`) of a class being instantiated by the DI system, such\n * as an `@Injectable` or `@Component`.\n * - In the initializer for fields of such classes.\n * - In the factory function specified for `useFactory` of a `Provider` or an `@Injectable`.\n * - In the `factory` function specified for an `InjectionToken`.\n * - In a stackframe of a function call in a DI context\n *\n * @param token A token that represents a dependency that should 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`, `@SkipSelf`, and `@Optional`.\n * @returns the injected value if operation is successful, `null` otherwise.\n * @throws if called outside of a supported context.\n *\n * @usageNotes\n * In practice the `inject()` calls are allowed in a constructor, a constructor parameter and a\n * field initializer:\n *\n * ```typescript\n * @Injectable({providedIn: 'root'})\n * export class Car {\n * radio: Radio|undefined;\n * // OK: field initializer\n * spareTyre = inject(Tyre);\n *\n * constructor() {\n * // OK: constructor body\n * this.radio = inject(Radio);\n * }\n * }\n * ```\n *\n * It is also legal to call `inject` from a provider's factory:\n *\n * ```typescript\n * providers: [\n * {provide: Car, useFactory: () => {\n * // OK: a class factory\n * const engine = inject(Engine);\n * return new Car(engine);\n * }}\n * ]\n * ```\n *\n * Calls to the `inject()` function outside of the class creation context will result in error. Most\n * notably, calls to `inject()` are disallowed after a class instance was created, in methods\n * (including lifecycle hooks):\n *\n * ```typescript\n * @Component({ ... })\n * export class CarComponent {\n * ngOnInit() {\n * // ERROR: too late, the component instance was already created\n * const engine = inject(Engine);\n * engine.start();\n * }\n * }\n * ```\n *\n * @publicApi\n */\nfunction inject(token, flags = InjectFlags.Default) {\n // The `as any` here _shouldn't_ be necessary, but without it JSCompiler\n // throws a disambiguation error due to the multiple signatures.\n return ɵɵinject(token, convertToBitFlags(flags));\n}\n// Converts object-based DI flags (`InjectOptions`) to bit flags (`InjectFlags`).\nfunction convertToBitFlags(flags) {\n if (typeof flags === 'undefined' || typeof flags === 'number') {\n return flags;\n }\n // While TypeScript doesn't accept it without a cast, bitwise OR with false-y values in\n // JavaScript is a no-op. We can use that for a very codesize-efficient conversion from\n // `InjectOptions` to `InjectFlags`.\n return (0 /* InternalInjectFlags.Default */ | // comment to force a line break in the formatter\n (flags.optional && 8 /* InternalInjectFlags.Optional */) |\n (flags.host && 1 /* InternalInjectFlags.Host */) |\n (flags.self && 2 /* InternalInjectFlags.Self */) |\n (flags.skipSelf && 4 /* InternalInjectFlags.SkipSelf */));\n}\nfunction injectArgs(types) {\n const args = [];\n for (let i = 0; i < types.length; i++) {\n const arg = resolveForwardRef(types[i]);\n if (Array.isArray(arg)) {\n if (arg.length === 0) {\n throw new RuntimeError(900 /* RuntimeErrorCode.INVALID_DIFFER_INPUT */, ngDevMode && 'Arguments array must have arguments.');\n }\n let type = undefined;\n let flags = InjectFlags.Default;\n for (let j = 0; j < arg.length; j++) {\n const meta = arg[j];\n const flag = getInjectFlag(meta);\n if (typeof flag === 'number') {\n // Special case when we handle @Inject decorator.\n if (flag === -1 /* DecoratorFlags.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 */\nfunction 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 */\nfunction getInjectFlag(token) {\n return token[DI_DECORATOR_FLAG];\n}\nfunction catchInjectorError(e, token, injectorErrorName, source) {\n const 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}\nfunction formatError(text, obj, injectorErrorName, source = null) {\n text = text && text.charAt(0) === '\\n' && text.charAt(1) == NO_NEW_LINE ? text.slice(2) : text;\n let context = stringify(obj);\n if (Array.isArray(obj)) {\n context = obj.map(stringify).join(' -> ');\n }\n else if (typeof obj === 'object') {\n let parts = [];\n for (let key in obj) {\n if (obj.hasOwnProperty(key)) {\n let 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 * Inject decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Inject = attachInjectFlag(\n// Disable tslint because `DecoratorFlags` is a const enum which gets inlined.\n// tslint:disable-next-line: no-toplevel-property-access\nmakeParamDecorator('Inject', (token) => ({ token })), -1 /* DecoratorFlags.Inject */);\n/**\n * Optional decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Optional = \n// Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n// tslint:disable-next-line: no-toplevel-property-access\nattachInjectFlag(makeParamDecorator('Optional'), 8 /* InternalInjectFlags.Optional */);\n/**\n * Self decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Self = \n// Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n// tslint:disable-next-line: no-toplevel-property-access\nattachInjectFlag(makeParamDecorator('Self'), 2 /* InternalInjectFlags.Self */);\n/**\n * `SkipSelf` decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst SkipSelf = \n// Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n// tslint:disable-next-line: no-toplevel-property-access\nattachInjectFlag(makeParamDecorator('SkipSelf'), 4 /* InternalInjectFlags.SkipSelf */);\n/**\n * Host decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Host = \n// Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n// tslint:disable-next-line: no-toplevel-property-access\nattachInjectFlag(makeParamDecorator('Host'), 1 /* InternalInjectFlags.Host */);\n\nfunction getFactoryDef(type, throwNotFound) {\n const hasFactoryDef = type.hasOwnProperty(NG_FACTORY_DEF);\n if (!hasFactoryDef && throwNotFound === true && ngDevMode) {\n throw new Error(`Type ${stringify(type)} does not have 'ɵfac' property.`);\n }\n return hasFactoryDef ? type[NG_FACTORY_DEF] : null;\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 */\nfunction arrayEquals(a, b, identityAccessor) {\n if (a.length !== b.length)\n return false;\n for (let i = 0; i < a.length; i++) {\n let valueA = a[i];\n let 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 */\nfunction flatten(list) {\n return list.flat(Number.POSITIVE_INFINITY);\n}\nfunction deepForEach(input, fn) {\n input.forEach(value => Array.isArray(value) ? deepForEach(value, fn) : fn(value));\n}\nfunction 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}\nfunction 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}\nfunction newArray(size, value) {\n const list = [];\n for (let i = 0; i < size; i++) {\n list.push(value);\n }\n return list;\n}\n/**\n * 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 */\nfunction arraySplice(array, index, count) {\n const 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 */\nfunction arrayInsert(array, index, value) {\n ngDevMode && assertLessThanOrEqual(index, array.length, 'Can\\'t insert past array end.');\n let end = array.length;\n while (end > index) {\n const 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 */\nfunction arrayInsert2(array, index, value1, value2) {\n ngDevMode && assertLessThanOrEqual(index, array.length, 'Can\\'t insert past array end.');\n let 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 const previousEnd = end - 2;\n array[end] = array[previousEnd];\n end--;\n }\n array[index] = value1;\n array[index + 1] = value2;\n }\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 */\nfunction 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 */\nfunction keyValueArraySet(keyValueArray, key, value) {\n let 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 */\nfunction keyValueArrayGet(keyValueArray, key) {\n const 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 */\nfunction 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 */\nfunction keyValueArrayDelete(keyValueArray, key) {\n const 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 */\nfunction _arrayIndexOfSorted(array, value, shift) {\n ngDevMode && assertEqual(Array.isArray(array), true, 'Expecting an array');\n let start = 0;\n let end = array.length >> shift;\n while (end !== start) {\n const middle = start + ((end - start) >> 1); // find the middle.\n const 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 * 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 */\nconst EMPTY_OBJ = {};\nconst EMPTY_ARRAY = [];\n// freezing the values prevents any code from accidentally inserting new values in\nif ((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 * A multi-provider token for initialization functions that will run upon construction of an\n * environment injector.\n *\n * @publicApi\n */\nconst ENVIRONMENT_INITIALIZER = new InjectionToken(ngDevMode ? 'ENVIRONMENT_INITIALIZER' : '');\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 */\nconst INJECTOR$1 = new InjectionToken(ngDevMode ? 'INJECTOR' : '', \n// Disable 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 /* InjectorMarkers.Injector */);\n\nconst INJECTOR_DEF_TYPES = new InjectionToken(ngDevMode ? 'INJECTOR_DEF_TYPES' : '');\n\nclass NullInjector {\n get(token, notFoundValue = THROW_IF_NOT_FOUND) {\n if (notFoundValue === THROW_IF_NOT_FOUND) {\n const error = new Error(`NullInjectorError: No provider for ${stringify(token)}!`);\n error.name = 'NullInjectorError';\n throw error;\n }\n return notFoundValue;\n }\n}\n\n/**\n * The strategy that the default change detector uses to detect changes.\n * When set, takes effect the next time change detection is triggered.\n *\n * @see {@link ChangeDetectorRef#usage-notes Change detection usage}\n *\n * @publicApi\n */\nvar ChangeDetectionStrategy;\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})(ChangeDetectionStrategy || (ChangeDetectionStrategy = {}));\n\n/**\n * Defines the CSS styles encapsulation policies for the {@link Component} decorator's\n * `encapsulation` option.\n *\n * See {@link Component#encapsulation encapsulation}.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/ts/metadata/encapsulation.ts region='longform'}\n *\n * @publicApi\n */\nvar ViewEncapsulation$1;\n(function (ViewEncapsulation) {\n // TODO: consider making `ViewEncapsulation` a `const enum` instead. See\n // https://github.com/angular/angular/issues/44119 for additional information.\n /**\n * Emulates a native Shadow DOM encapsulation behavior by adding a specific attribute to the\n * component's host element and applying the same attribute to all the CSS selectors provided\n * via {@link Component#styles styles} or {@link Component#styleUrls styleUrls}.\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 * Doesn't provide any sort of CSS style encapsulation, meaning that all the styles provided\n * via {@link Component#styles styles} or {@link Component#styleUrls styleUrls} are applicable\n * to any HTML element of the application regardless of their host Component.\n */\n ViewEncapsulation[ViewEncapsulation[\"None\"] = 2] = \"None\";\n /**\n * Uses the browser's native Shadow DOM API to encapsulate CSS styles, meaning that it creates\n * a ShadowRoot for the component's host element which is then used to encapsulate\n * all the Component's styling.\n */\n ViewEncapsulation[ViewEncapsulation[\"ShadowDom\"] = 3] = \"ShadowDom\";\n})(ViewEncapsulation$1 || (ViewEncapsulation$1 = {}));\n\n/** Flags describing an input for a directive. */\nvar InputFlags;\n(function (InputFlags) {\n InputFlags[InputFlags[\"None\"] = 0] = \"None\";\n InputFlags[InputFlags[\"SignalBased\"] = 1] = \"SignalBased\";\n InputFlags[InputFlags[\"HasDecoratorInputTransform\"] = 2] = \"HasDecoratorInputTransform\";\n})(InputFlags || (InputFlags = {}));\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 */\nfunction classIndexOf(className, classToSearch, startingIndex) {\n ngDevMode && assertNotEqual(classToSearch, '', 'can not look for \"\" string.');\n let end = className.length;\n while (true) {\n const foundIndex = className.indexOf(classToSearch, startingIndex);\n if (foundIndex === -1)\n return foundIndex;\n if (foundIndex === 0 || className.charCodeAt(foundIndex - 1) <= 32 /* CharCode.SPACE */) {\n // Ensure that it has leading whitespace\n const length = classToSearch.length;\n if (foundIndex + length === end ||\n className.charCodeAt(foundIndex + length) <= 32 /* CharCode.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 * 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 */\nfunction setUpAttributes(renderer, native, attrs) {\n let i = 0;\n while (i < attrs.length) {\n const 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 /* AttributeMarker.NamespaceURI */) {\n break;\n }\n // we just landed on the marker value ... therefore\n // we should skip to the next entry\n i++;\n const namespaceURI = attrs[i++];\n const attrName = attrs[i++];\n const attrVal = attrs[i++];\n ngDevMode && ngDevMode.rendererSetAttribute++;\n renderer.setAttribute(native, attrName, attrVal, namespaceURI);\n }\n else {\n // attrName is string;\n const attrName = value;\n const attrVal = attrs[++i];\n // Standard attributes\n ngDevMode && ngDevMode.rendererSetAttribute++;\n if (isAnimationProp(attrName)) {\n renderer.setProperty(native, attrName, attrVal);\n }\n else {\n renderer.setAttribute(native, 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 */\nfunction isNameOnlyAttributeMarker(marker) {\n return marker === 3 /* AttributeMarker.Bindings */ || marker === 4 /* AttributeMarker.Template */ ||\n marker === 6 /* AttributeMarker.I18n */;\n}\nfunction 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 /* CharCode.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 */\nfunction 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 let srcMarker = -1 /* AttributeMarker.ImplicitAttributes */;\n for (let i = 0; i < src.length; i++) {\n const item = src[i];\n if (typeof item === 'number') {\n srcMarker = item;\n }\n else {\n if (srcMarker === 0 /* AttributeMarker.NamespaceURI */) {\n // Case where we need to consume `key1`, `key2`, `value` items.\n }\n else if (srcMarker === -1 /* AttributeMarker.ImplicitAttributes */ ||\n srcMarker === 2 /* AttributeMarker.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 */\nfunction mergeHostAttribute(dst, marker, key1, key2, value) {\n let i = 0;\n // Assume that new markers will be inserted at the end.\n let markerInsertPosition = dst.length;\n // scan until correct type.\n if (marker === -1 /* AttributeMarker.ImplicitAttributes */) {\n markerInsertPosition = -1;\n }\n else {\n while (i < dst.length) {\n const 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 const 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\nconst NG_TEMPLATE_SELECTOR = 'ng-template';\n/**\n * Search the `TAttributes` to see if it contains `cssClassToMatch` (case insensitive)\n *\n * @param tNode static data of the node to match\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 */\nfunction isCssClassMatching(tNode, attrs, cssClassToMatch, isProjectionMode) {\n ngDevMode &&\n assertEqual(cssClassToMatch, cssClassToMatch.toLowerCase(), 'Class name expected to be lowercase.');\n let i = 0;\n if (isProjectionMode) {\n for (; i < attrs.length && typeof attrs[i] === 'string'; i += 2) {\n // Search for an implicit `class` attribute and check if its value matches `cssClassToMatch`.\n if (attrs[i] === 'class' &&\n classIndexOf(attrs[i + 1].toLowerCase(), cssClassToMatch, 0) !== -1) {\n return true;\n }\n }\n }\n else if (isInlineTemplate(tNode)) {\n // Matching directives (i.e. when not matching for projection mode) should not consider the\n // class bindings that are present on inline templates, as those class bindings only target\n // the root node of the template, not the template itself.\n return false;\n }\n // Resume the search for classes after the `Classes` marker.\n i = attrs.indexOf(1 /* AttributeMarker.Classes */, i);\n if (i > -1) {\n // We found the classes section. Start searching for the class.\n let item;\n while (++i < attrs.length && typeof (item = attrs[i]) === 'string') {\n if (item.toLowerCase() === cssClassToMatch) {\n return true;\n }\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 */\nfunction isInlineTemplate(tNode) {\n return tNode.type === 4 /* TNodeType.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 */\nfunction hasTagAndTypeMatch(tNode, currentSelector, isProjectionMode) {\n const tagNameToCompare = tNode.type === 4 /* TNodeType.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 tNode 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 */\nfunction isNodeMatchingSelector(tNode, selector, isProjectionMode) {\n ngDevMode && assertDefined(selector[0], 'Selector should have a tag name');\n let mode = 4 /* SelectorFlags.ELEMENT */;\n const nodeAttrs = tNode.attrs;\n // Find the index of first attribute that has no value, only a name.\n const nameOnlyMarkerIdx = nodeAttrs !== null ? getNameOnlyMarkerIndex(nodeAttrs) : 0;\n // When processing \":not\" selectors, we skip to the next \":not\" if the\n // current one doesn't match\n let skipToNextSelector = false;\n for (let i = 0; i < selector.length; i++) {\n const 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 /* SelectorFlags.NOT */);\n continue;\n }\n if (skipToNextSelector)\n continue;\n if (mode & 4 /* SelectorFlags.ELEMENT */) {\n mode = 2 /* SelectorFlags.ATTRIBUTE */ | mode & 1 /* SelectorFlags.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 if (mode & 8 /* SelectorFlags.CLASS */) {\n if (nodeAttrs === null || !isCssClassMatching(tNode, nodeAttrs, current, isProjectionMode)) {\n if (isPositive(mode))\n return false;\n skipToNextSelector = true;\n }\n }\n else {\n const selectorAttrValue = selector[++i];\n const attrIndexInNode = findAttrIndexInNode(current, 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 let nodeAttrValue;\n if (attrIndexInNode > nameOnlyMarkerIdx) {\n nodeAttrValue = '';\n }\n else {\n ngDevMode &&\n assertNotEqual(nodeAttrs[attrIndexInNode], 0 /* AttributeMarker.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 if (mode & 2 /* SelectorFlags.ATTRIBUTE */ && selectorAttrValue !== nodeAttrValue) {\n if (isPositive(mode))\n return false;\n skipToNextSelector = true;\n }\n }\n }\n }\n return isPositive(mode) || skipToNextSelector;\n}\nfunction isPositive(mode) {\n return (mode & 1 /* SelectorFlags.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 ``).\n * @param isProjectionMode true if we are matching against content projection otherwise we are\n * matching against directives.\n */\nfunction findAttrIndexInNode(name, attrs, isInlineTemplate, isProjectionMode) {\n if (attrs === null)\n return -1;\n let i = 0;\n if (isProjectionMode || !isInlineTemplate) {\n let bindingsMode = false;\n while (i < attrs.length) {\n const maybeAttrName = attrs[i];\n if (maybeAttrName === name) {\n return i;\n }\n else if (maybeAttrName === 3 /* AttributeMarker.Bindings */ || maybeAttrName === 6 /* AttributeMarker.I18n */) {\n bindingsMode = true;\n }\n else if (maybeAttrName === 1 /* AttributeMarker.Classes */ || maybeAttrName === 2 /* AttributeMarker.Styles */) {\n let 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 /* AttributeMarker.Template */) {\n // We do not care about Template attributes in this scenario.\n break;\n }\n else if (maybeAttrName === 0 /* AttributeMarker.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}\nfunction isNodeMatchingSelectorList(tNode, selector, isProjectionMode = false) {\n for (let i = 0; i < selector.length; i++) {\n if (isNodeMatchingSelector(tNode, selector[i], isProjectionMode)) {\n return true;\n }\n }\n return false;\n}\nfunction getProjectAsAttrValue(tNode) {\n const nodeAttrs = tNode.attrs;\n if (nodeAttrs != null) {\n const ngProjectAsAttrIdx = nodeAttrs.indexOf(5 /* AttributeMarker.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}\nfunction getNameOnlyMarkerIndex(nodeAttrs) {\n for (let i = 0; i < nodeAttrs.length; i++) {\n const nodeAttr = nodeAttrs[i];\n if (isNameOnlyAttributeMarker(nodeAttr)) {\n return i;\n }\n }\n return nodeAttrs.length;\n}\nfunction matchTemplateAttribute(attrs, name) {\n let i = attrs.indexOf(4 /* AttributeMarker.Template */);\n if (i > -1) {\n i++;\n while (i < attrs.length) {\n const 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 */\nfunction isSelectorInSelectorList(selector, list) {\n selectorListLoop: for (let i = 0; i < list.length; i++) {\n const currentSelectorInList = list[i];\n if (selector.length !== currentSelectorInList.length) {\n continue;\n }\n for (let 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}\nfunction maybeWrapInNotSelector(isNegativeMode, chunk) {\n return isNegativeMode ? ':not(' + chunk.trim() + ')' : chunk;\n}\nfunction stringifyCSSSelector(selector) {\n let result = selector[0];\n let i = 1;\n let mode = 2 /* SelectorFlags.ATTRIBUTE */;\n let currentChunk = '';\n let isNegativeMode = false;\n while (i < selector.length) {\n let valueOrMarker = selector[i];\n if (typeof valueOrMarker === 'string') {\n if (mode & 2 /* SelectorFlags.ATTRIBUTE */) {\n const attrValue = selector[++i];\n currentChunk +=\n '[' + valueOrMarker + (attrValue.length > 0 ? '=\"' + attrValue + '\"' : '') + ']';\n }\n else if (mode & 8 /* SelectorFlags.CLASS */) {\n currentChunk += '.' + valueOrMarker;\n }\n else if (mode & 4 /* SelectorFlags.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 */\nfunction 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 */\nfunction extractAttrsAndClassesFromSelector(selector) {\n const attrs = [];\n const classes = [];\n let i = 1;\n let mode = 2 /* SelectorFlags.ATTRIBUTE */;\n while (i < selector.length) {\n let valueOrMarker = selector[i];\n if (typeof valueOrMarker === 'string') {\n if (mode === 2 /* SelectorFlags.ATTRIBUTE */) {\n if (valueOrMarker !== '') {\n attrs.push(valueOrMarker, selector[++i]);\n }\n }\n else if (mode === 8 /* SelectorFlags.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, classes };\n}\n\n/**\n * Create a component definition object.\n *\n *\n * # Example\n * ```\n * class MyComponent {\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 */\nfunction ɵɵdefineComponent(componentDefinition) {\n return noSideEffects(() => {\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 const baseDef = getNgDirectiveDef(componentDefinition);\n const def = {\n ...baseDef,\n decls: componentDefinition.decls,\n vars: componentDefinition.vars,\n template: componentDefinition.template,\n consts: componentDefinition.consts || null,\n ngContentSelectors: componentDefinition.ngContentSelectors,\n onPush: componentDefinition.changeDetection === ChangeDetectionStrategy.OnPush,\n directiveDefs: null, // assigned in noSideEffects\n pipeDefs: null, // assigned in noSideEffects\n dependencies: baseDef.standalone && componentDefinition.dependencies || null,\n getStandaloneInjector: null,\n signals: componentDefinition.signals ?? false,\n data: componentDefinition.data || {},\n encapsulation: componentDefinition.encapsulation || ViewEncapsulation$1.Emulated,\n styles: componentDefinition.styles || EMPTY_ARRAY,\n _: null,\n schemas: componentDefinition.schemas || null,\n tView: null,\n id: '',\n };\n initFeatures(def);\n const dependencies = componentDefinition.dependencies;\n def.directiveDefs = extractDefListOrFactory(dependencies, /* pipeDef */ false);\n def.pipeDefs = extractDefListOrFactory(dependencies, /* pipeDef */ true);\n def.id = getComponentId(def);\n return def;\n });\n}\nfunction extractDirectiveDef(type) {\n return getComponentDef(type) || getDirectiveDef(type);\n}\nfunction nonNull(value) {\n return value !== null;\n}\n/**\n * @codeGenApi\n */\nfunction ɵɵdefineNgModule(def) {\n return noSideEffects(() => {\n const res = {\n type: def.type,\n bootstrap: def.bootstrap || EMPTY_ARRAY,\n declarations: def.declarations || EMPTY_ARRAY,\n imports: def.imports || EMPTY_ARRAY,\n exports: def.exports || EMPTY_ARRAY,\n transitiveCompileScopes: null,\n schemas: def.schemas || null,\n id: def.id || null,\n };\n return res;\n });\n}\nfunction parseAndConvertBindingsForDefinition(obj, declaredInputs) {\n if (obj == null)\n return EMPTY_OBJ;\n const newLookup = {};\n for (const minifiedKey in obj) {\n if (obj.hasOwnProperty(minifiedKey)) {\n const value = obj[minifiedKey];\n let publicName;\n let declaredName;\n let inputFlags = InputFlags.None;\n if (Array.isArray(value)) {\n inputFlags = value[0];\n publicName = value[1];\n declaredName = value[2] ?? publicName; // declared name might not be set to save bytes.\n }\n else {\n publicName = value;\n declaredName = value;\n }\n // For inputs, capture the declared name, or if some flags are set.\n if (declaredInputs) {\n // Perf note: An array is only allocated for the input if there are flags.\n newLookup[publicName] =\n inputFlags !== InputFlags.None ? [minifiedKey, inputFlags] : minifiedKey;\n declaredInputs[publicName] = declaredName;\n }\n else {\n newLookup[publicName] = minifiedKey;\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 */\nfunction ɵɵdefineDirective(directiveDefinition) {\n return noSideEffects(() => {\n const def = getNgDirectiveDef(directiveDefinition);\n initFeatures(def);\n return def;\n });\n}\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 */\nfunction ɵɵdefinePipe(pipeDef) {\n return {\n type: pipeDef.type,\n name: pipeDef.name,\n factory: null,\n pure: pipeDef.pure !== false,\n standalone: pipeDef.standalone === true,\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 */\nfunction getComponentDef(type) {\n return type[NG_COMP_DEF] || null;\n}\nfunction getDirectiveDef(type) {\n return type[NG_DIR_DEF] || null;\n}\nfunction getPipeDef$1(type) {\n return type[NG_PIPE_DEF] || null;\n}\n/**\n * Checks whether a given Component, Directive or Pipe is marked as standalone.\n * This will return false if passed anything other than a Component, Directive, or Pipe class\n * See [this guide](/guide/standalone-components) for additional information:\n *\n * @param type A reference to a Component, Directive or Pipe.\n * @publicApi\n */\nfunction isStandalone(type) {\n const def = getComponentDef(type) || getDirectiveDef(type) || getPipeDef$1(type);\n return def !== null ? def.standalone : false;\n}\nfunction getNgModuleDef(type, throwNotFound) {\n const ngModuleDef = type[NG_MOD_DEF] || null;\n if (!ngModuleDef && throwNotFound === true) {\n throw new Error(`Type ${stringify(type)} does not have 'ɵmod' property.`);\n }\n return ngModuleDef;\n}\nfunction getNgDirectiveDef(directiveDefinition) {\n const declaredInputs = {};\n return {\n type: directiveDefinition.type,\n providersResolver: null,\n factory: null,\n hostBindings: directiveDefinition.hostBindings || null,\n hostVars: directiveDefinition.hostVars || 0,\n hostAttrs: directiveDefinition.hostAttrs || null,\n contentQueries: directiveDefinition.contentQueries || null,\n declaredInputs: declaredInputs,\n inputTransforms: null,\n inputConfig: directiveDefinition.inputs || EMPTY_OBJ,\n exportAs: directiveDefinition.exportAs || null,\n standalone: directiveDefinition.standalone === true,\n signals: directiveDefinition.signals === true,\n selectors: directiveDefinition.selectors || EMPTY_ARRAY,\n viewQuery: directiveDefinition.viewQuery || null,\n features: directiveDefinition.features || null,\n setInput: null,\n findHostDirectiveDefs: null,\n hostDirectives: null,\n inputs: parseAndConvertBindingsForDefinition(directiveDefinition.inputs, declaredInputs),\n outputs: parseAndConvertBindingsForDefinition(directiveDefinition.outputs),\n debugInfo: null,\n };\n}\nfunction initFeatures(definition) {\n definition.features?.forEach((fn) => fn(definition));\n}\nfunction extractDefListOrFactory(dependencies, pipeDef) {\n if (!dependencies) {\n return null;\n }\n const defExtractor = pipeDef ? getPipeDef$1 : extractDirectiveDef;\n return () => (typeof dependencies === 'function' ? dependencies() : dependencies)\n .map(dep => defExtractor(dep))\n .filter(nonNull);\n}\n/**\n * A map that contains the generated component IDs and type.\n */\nconst GENERATED_COMP_IDS = new Map();\n/**\n * A method can returns a component ID from the component definition using a variant of DJB2 hash\n * algorithm.\n */\nfunction getComponentId(componentDef) {\n let hash = 0;\n // We cannot rely solely on the component selector as the same selector can be used in different\n // modules.\n //\n // `componentDef.style` is not used, due to it causing inconsistencies. Ex: when server\n // component styles has no sourcemaps and browsers do.\n //\n // Example:\n // https://github.com/angular/components/blob/d9f82c8f95309e77a6d82fd574c65871e91354c2/src/material/core/option/option.ts#L248\n // https://github.com/angular/components/blob/285f46dc2b4c5b127d356cb7c4714b221f03ce50/src/material/legacy-core/option/option.ts#L32\n const hashSelectors = [\n componentDef.selectors,\n componentDef.ngContentSelectors,\n componentDef.hostVars,\n componentDef.hostAttrs,\n componentDef.consts,\n componentDef.vars,\n componentDef.decls,\n componentDef.encapsulation,\n componentDef.standalone,\n componentDef.signals,\n componentDef.exportAs,\n JSON.stringify(componentDef.inputs),\n JSON.stringify(componentDef.outputs),\n // We cannot use 'componentDef.type.name' as the name of the symbol will change and will not\n // match in the server and browser bundles.\n Object.getOwnPropertyNames(componentDef.type.prototype),\n !!componentDef.contentQueries,\n !!componentDef.viewQuery,\n ].join('|');\n for (const char of hashSelectors) {\n hash = Math.imul(31, hash) + char.charCodeAt(0) << 0;\n }\n // Force positive number hash.\n // 2147483647 = equivalent of Integer.MAX_VALUE.\n hash += 2147483647 + 1;\n const compId = 'c' + hash;\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (GENERATED_COMP_IDS.has(compId)) {\n const previousCompDefType = GENERATED_COMP_IDS.get(compId);\n if (previousCompDefType !== componentDef.type) {\n console.warn(formatRuntimeError(-912 /* RuntimeErrorCode.COMPONENT_ID_COLLISION */, `Component ID generation collision detected. Components '${previousCompDefType.name}' and '${componentDef.type.name}' with selector '${stringifyCSSSelectorList(componentDef\n .selectors)}' generated the same component ID. To fix this, you can change the selector of one of those components or add an extra host attribute to force a different ID.`));\n }\n }\n else {\n GENERATED_COMP_IDS.set(compId, componentDef.type);\n }\n }\n return compId;\n}\n\n/**\n * Wrap an array of `Provider`s into `EnvironmentProviders`, preventing them from being accidentally\n * referenced in `@Component` in a component injector.\n */\nfunction makeEnvironmentProviders(providers) {\n return {\n ɵproviders: providers,\n };\n}\n/**\n * Collects providers from all NgModules and standalone components, including transitively imported\n * ones.\n *\n * Providers extracted via `importProvidersFrom` are only usable in an application injector or\n * another environment injector (such as a route injector). They should not be used in component\n * providers.\n *\n * More information about standalone components can be found in [this\n * guide](guide/standalone-components).\n *\n * @usageNotes\n * The results of the `importProvidersFrom` call can be used in the `bootstrapApplication` call:\n *\n * ```typescript\n * await bootstrapApplication(RootComponent, {\n * providers: [\n * importProvidersFrom(NgModuleOne, NgModuleTwo)\n * ]\n * });\n * ```\n *\n * You can also use the `importProvidersFrom` results in the `providers` field of a route, when a\n * standalone component is used:\n *\n * ```typescript\n * export const ROUTES: Route[] = [\n * {\n * path: 'foo',\n * providers: [\n * importProvidersFrom(NgModuleOne, NgModuleTwo)\n * ],\n * component: YourStandaloneComponent\n * }\n * ];\n * ```\n *\n * @returns Collected providers from the specified list of types.\n * @publicApi\n */\nfunction importProvidersFrom(...sources) {\n return {\n ɵproviders: internalImportProvidersFrom(true, sources),\n ɵfromNgModule: true,\n };\n}\nfunction internalImportProvidersFrom(checkForStandaloneCmp, ...sources) {\n const providersOut = [];\n const dedup = new Set(); // already seen types\n let injectorTypesWithProviders;\n const collectProviders = (provider) => {\n providersOut.push(provider);\n };\n deepForEach(sources, source => {\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && checkForStandaloneCmp) {\n const cmpDef = getComponentDef(source);\n if (cmpDef?.standalone) {\n throw new RuntimeError(800 /* RuntimeErrorCode.IMPORT_PROVIDERS_FROM_STANDALONE */, `Importing providers supports NgModule or ModuleWithProviders but got a standalone component \"${stringifyForError(source)}\"`);\n }\n }\n // Narrow `source` to access the internal type analogue for `ModuleWithProviders`.\n const internalSource = source;\n if (walkProviderTree(internalSource, collectProviders, [], dedup)) {\n injectorTypesWithProviders ||= [];\n injectorTypesWithProviders.push(internalSource);\n }\n });\n // Collect all providers from `ModuleWithProviders` types.\n if (injectorTypesWithProviders !== undefined) {\n processInjectorTypesWithProviders(injectorTypesWithProviders, collectProviders);\n }\n return providersOut;\n}\n/**\n * Collects all providers from the list of `ModuleWithProviders` and appends them to the provided\n * array.\n */\nfunction processInjectorTypesWithProviders(typesWithProviders, visitor) {\n for (let i = 0; i < typesWithProviders.length; i++) {\n const { ngModule, providers } = typesWithProviders[i];\n deepForEachProvider(providers, provider => {\n ngDevMode && validateProvider(provider, providers || EMPTY_ARRAY, ngModule);\n visitor(provider, ngModule);\n });\n }\n}\n/**\n * The logic visits an `InjectorType`, an `InjectorTypeWithProviders`, or a standalone\n * `ComponentType`, and all of its transitive providers and collects providers.\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 */\nfunction walkProviderTree(container, visitor, parents, dedup) {\n container = resolveForwardRef(container);\n if (!container)\n return false;\n // The actual type which had the definition. Usually `container`, but may be an unwrapped type\n // from `InjectorTypeWithProviders`.\n let defType = null;\n let injDef = getInjectorDef(container);\n const cmpDef = !injDef && getComponentDef(container);\n if (!injDef && !cmpDef) {\n // `container` is not an injector type or a component type. It might be:\n // * An `InjectorTypeWithProviders` that wraps an injector type.\n // * A standalone directive or pipe that got pulled in from a standalone component's\n // dependencies.\n // Try to unwrap it as an `InjectorTypeWithProviders` first.\n const ngModule = container.ngModule;\n injDef = getInjectorDef(ngModule);\n if (injDef) {\n defType = ngModule;\n }\n else {\n // Not a component or injector type, so ignore it.\n return false;\n }\n }\n else if (cmpDef && !cmpDef.standalone) {\n return false;\n }\n else {\n defType = container;\n }\n // Check for circular dependencies.\n if (ngDevMode && parents.indexOf(defType) !== -1) {\n const defName = stringify(defType);\n const path = parents.map(stringify);\n throwCyclicDependencyError(defName, path);\n }\n // Check for multiple imports of the same module\n const isDuplicate = dedup.has(defType);\n if (cmpDef) {\n if (isDuplicate) {\n // This component definition has already been processed.\n return false;\n }\n dedup.add(defType);\n if (cmpDef.dependencies) {\n const deps = typeof cmpDef.dependencies === 'function' ? cmpDef.dependencies() : cmpDef.dependencies;\n for (const dep of deps) {\n walkProviderTree(dep, visitor, parents, dedup);\n }\n }\n }\n else if (injDef) {\n // First, include providers from any imports.\n if (injDef.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 dedup.add(defType);\n let importTypesWithProviders;\n try {\n deepForEach(injDef.imports, imported => {\n if (walkProviderTree(imported, visitor, parents, dedup)) {\n importTypesWithProviders ||= [];\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.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 !== undefined) {\n processInjectorTypesWithProviders(importTypesWithProviders, visitor);\n }\n }\n if (!isDuplicate) {\n // Track the InjectorType and add a provider for it.\n // It's important that this is done after the def's imports.\n const factory = getFactoryDef(defType) || (() => new defType());\n // Append extra providers to make more info available for consumers (to retrieve an injector\n // type), as well as internally (to calculate an injection scope correctly and eagerly\n // instantiate a `defType` when an injector is created).\n // Provider to create `defType` using its factory.\n visitor({ provide: defType, useFactory: factory, deps: EMPTY_ARRAY }, defType);\n // Make this `defType` available to an internal logic that calculates injector scope.\n visitor({ provide: INJECTOR_DEF_TYPES, useValue: defType, multi: true }, defType);\n // Provider to eagerly instantiate `defType` via `INJECTOR_INITIALIZER`.\n visitor({ provide: ENVIRONMENT_INITIALIZER, useValue: () => ɵɵinject(defType), multi: true }, defType);\n }\n // Next, include providers listed on the definition itself.\n const defProviders = injDef.providers;\n if (defProviders != null && !isDuplicate) {\n const injectorType = container;\n deepForEachProvider(defProviders, provider => {\n ngDevMode && validateProvider(provider, defProviders, injectorType);\n visitor(provider, injectorType);\n });\n }\n }\n else {\n // Should not happen, but just in case.\n return false;\n }\n return (defType !== container &&\n container.providers !== undefined);\n}\nfunction validateProvider(provider, providers, containerType) {\n if (isTypeProvider(provider) || isValueProvider(provider) || isFactoryProvider(provider) ||\n isExistingProvider(provider)) {\n return;\n }\n // Here we expect the provider to be a `useClass` provider (by elimination).\n const classRef = resolveForwardRef(provider && (provider.useClass || provider.provide));\n if (!classRef) {\n throwInvalidProviderError(containerType, providers, provider);\n }\n}\nfunction deepForEachProvider(providers, fn) {\n for (let provider of providers) {\n if (isEnvironmentProviders(provider)) {\n provider = provider.ɵproviders;\n }\n if (Array.isArray(provider)) {\n deepForEachProvider(provider, fn);\n }\n else {\n fn(provider);\n }\n }\n}\nconst USE_VALUE$1 = getClosureSafeProperty({ provide: String, useValue: getClosureSafeProperty });\nfunction isValueProvider(value) {\n return value !== null && typeof value == 'object' && USE_VALUE$1 in value;\n}\nfunction isExistingProvider(value) {\n return !!(value && value.useExisting);\n}\nfunction isFactoryProvider(value) {\n return !!(value && value.useFactory);\n}\nfunction isTypeProvider(value) {\n return typeof value === 'function';\n}\nfunction isClassProvider(value) {\n return !!value.useClass;\n}\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 */\nconst INJECTOR_SCOPE = new InjectionToken(ngDevMode ? 'Set Injector scope.' : '');\n\n/**\n * Marker which indicates that a value has not yet been created from the factory function.\n */\nconst 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 */\nconst CIRCULAR = {};\n/**\n * A lazily initialized NullInjector.\n */\nlet NULL_INJECTOR = undefined;\nfunction getNullInjector() {\n if (NULL_INJECTOR === undefined) {\n NULL_INJECTOR = new NullInjector();\n }\n return NULL_INJECTOR;\n}\n/**\n * An `Injector` that's part of the environment injector hierarchy, which exists outside of the\n * component tree.\n */\nclass EnvironmentInjector {\n}\nclass R3Injector extends EnvironmentInjector {\n /**\n * Flag indicating that this injector was previously destroyed.\n */\n get destroyed() {\n return this._destroyed;\n }\n constructor(providers, parent, source, scopes) {\n super();\n this.parent = parent;\n this.source = source;\n this.scopes = scopes;\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 * Set of values instantiated by this injector which contain `ngOnDestroy` lifecycle hooks.\n */\n this._ngOnDestroyHooks = new Set();\n this._onDestroyHooks = [];\n this._destroyed = false;\n // Start off by creating Records for every provider.\n forEachSingleProvider(providers, provider => this.processProvider(provider));\n // Make sure the INJECTOR token provides this injector.\n this.records.set(INJECTOR$1, makeRecord(undefined, this));\n // And `EnvironmentInjector` if the current injector is supposed to be env-scoped.\n if (scopes.has('environment')) {\n this.records.set(EnvironmentInjector, makeRecord(undefined, this));\n }\n // Detect whether this injector has the APP_ROOT_SCOPE token and thus should provide\n // any injectable scoped to APP_ROOT_SCOPE.\n const record = this.records.get(INJECTOR_SCOPE);\n if (record != null && typeof record.value === 'string') {\n this.scopes.add(record.value);\n }\n this.injectorDefTypes = new Set(this.get(INJECTOR_DEF_TYPES, EMPTY_ARRAY, InjectFlags.Self));\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 destroy() {\n this.assertNotDestroyed();\n // Set destroyed = true first, in case lifecycle hooks re-enter destroy().\n this._destroyed = true;\n const prevConsumer = setActiveConsumer$1(null);\n try {\n // Call all the lifecycle hooks.\n for (const service of this._ngOnDestroyHooks) {\n service.ngOnDestroy();\n }\n const onDestroyHooks = this._onDestroyHooks;\n // Reset the _onDestroyHooks array before iterating over it to prevent hooks that unregister\n // themselves from mutating the array during iteration.\n this._onDestroyHooks = [];\n for (const hook of onDestroyHooks) {\n hook();\n }\n }\n finally {\n // Release all references.\n this.records.clear();\n this._ngOnDestroyHooks.clear();\n this.injectorDefTypes.clear();\n setActiveConsumer$1(prevConsumer);\n }\n }\n onDestroy(callback) {\n this.assertNotDestroyed();\n this._onDestroyHooks.push(callback);\n return () => this.removeOnDestroy(callback);\n }\n runInContext(fn) {\n this.assertNotDestroyed();\n const previousInjector = setCurrentInjector(this);\n const previousInjectImplementation = setInjectImplementation(undefined);\n let prevInjectContext;\n if (ngDevMode) {\n prevInjectContext = setInjectorProfilerContext({ injector: this, token: null });\n }\n try {\n return fn();\n }\n finally {\n setCurrentInjector(previousInjector);\n setInjectImplementation(previousInjectImplementation);\n ngDevMode && setInjectorProfilerContext(prevInjectContext);\n }\n }\n get(token, notFoundValue = THROW_IF_NOT_FOUND, flags = InjectFlags.Default) {\n this.assertNotDestroyed();\n if (token.hasOwnProperty(NG_ENV_ID)) {\n return token[NG_ENV_ID](this);\n }\n flags = convertToBitFlags(flags);\n // Set the injection context.\n let prevInjectContext;\n if (ngDevMode) {\n prevInjectContext = setInjectorProfilerContext({ injector: this, token: token });\n }\n const previousInjector = setCurrentInjector(this);\n const previousInjectImplementation = setInjectImplementation(undefined);\n try {\n // Check for the SkipSelf flag.\n if (!(flags & InjectFlags.SkipSelf)) {\n // SkipSelf isn't set, check if the record belongs to this injector.\n let 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 const 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 if (ngDevMode) {\n runInInjectorProfilerContext(this, token, () => {\n emitProviderConfiguredEvent(token);\n });\n }\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 const nextInjector = !(flags & 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 & 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 const 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, restore the previous injection context.\n setInjectImplementation(previousInjectImplementation);\n setCurrentInjector(previousInjector);\n ngDevMode && setInjectorProfilerContext(prevInjectContext);\n }\n }\n /** @internal */\n resolveInjectorInitializers() {\n const prevConsumer = setActiveConsumer$1(null);\n const previousInjector = setCurrentInjector(this);\n const previousInjectImplementation = setInjectImplementation(undefined);\n let prevInjectContext;\n if (ngDevMode) {\n prevInjectContext = setInjectorProfilerContext({ injector: this, token: null });\n }\n try {\n const initializers = this.get(ENVIRONMENT_INITIALIZER, EMPTY_ARRAY, InjectFlags.Self);\n if (ngDevMode && !Array.isArray(initializers)) {\n throw new RuntimeError(-209 /* RuntimeErrorCode.INVALID_MULTI_PROVIDER */, 'Unexpected type of the `ENVIRONMENT_INITIALIZER` token value ' +\n `(expected an array, but got ${typeof initializers}). ` +\n 'Please check that the `ENVIRONMENT_INITIALIZER` token is configured as a ' +\n '`multi: true` provider.');\n }\n for (const initializer of initializers) {\n initializer();\n }\n }\n finally {\n setCurrentInjector(previousInjector);\n setInjectImplementation(previousInjectImplementation);\n ngDevMode && setInjectorProfilerContext(prevInjectContext);\n setActiveConsumer$1(prevConsumer);\n }\n }\n toString() {\n const tokens = [];\n const records = this.records;\n for (const token of records.keys()) {\n tokens.push(stringify(token));\n }\n return `R3Injector[${tokens.join(', ')}]`;\n }\n assertNotDestroyed() {\n if (this._destroyed) {\n throw new RuntimeError(205 /* RuntimeErrorCode.INJECTOR_ALREADY_DESTROYED */, ngDevMode && 'Injector has already been destroyed.');\n }\n }\n /**\n * Process a `SingleProvider` and add it.\n */\n processProvider(provider) {\n // Determine the token from the provider. Either it's its own token, or has a {provide: ...}\n // property.\n provider = resolveForwardRef(provider);\n let token = isTypeProvider(provider) ? provider : resolveForwardRef(provider && provider.provide);\n // Construct a `Record` for the provider.\n const record = providerToRecord(provider);\n if (ngDevMode) {\n runInInjectorProfilerContext(this, token, () => {\n // Emit InjectorProfilerEventType.Create if provider is a value provider because\n // these are the only providers that do not go through the value hydration logic\n // where this event would normally be emitted from.\n if (isValueProvider(provider)) {\n emitInstanceCreatedByInjectorEvent(provider.useValue);\n }\n emitProviderConfiguredEvent(provider);\n });\n }\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 let multiRecord = this.records.get(token);\n if (multiRecord) {\n // It has. Throw a nice error if\n if (ngDevMode && multiRecord.multi === undefined) {\n throwMixedMultiProviderError();\n }\n }\n else {\n multiRecord = makeRecord(undefined, NOT_YET, true);\n multiRecord.factory = () => injectArgs(multiRecord.multi);\n this.records.set(token, multiRecord);\n }\n token = provider;\n multiRecord.multi.push(provider);\n }\n else {\n if (ngDevMode) {\n const existing = this.records.get(token);\n if (existing && existing.multi !== undefined) {\n throwMixedMultiProviderError();\n }\n }\n }\n this.records.set(token, record);\n }\n hydrate(token, record) {\n const prevConsumer = setActiveConsumer$1(null);\n try {\n if (ngDevMode && record.value === CIRCULAR) {\n throwCyclicDependencyError(stringify(token));\n }\n else if (record.value === NOT_YET) {\n record.value = CIRCULAR;\n if (ngDevMode) {\n runInInjectorProfilerContext(this, token, () => {\n record.value = record.factory();\n emitInstanceCreatedByInjectorEvent(record.value);\n });\n }\n else {\n record.value = record.factory();\n }\n }\n if (typeof record.value === 'object' && record.value && hasOnDestroy(record.value)) {\n this._ngOnDestroyHooks.add(record.value);\n }\n return record.value;\n }\n finally {\n setActiveConsumer$1(prevConsumer);\n }\n }\n injectableDefInScope(def) {\n if (!def.providedIn) {\n return false;\n }\n const providedIn = resolveForwardRef(def.providedIn);\n if (typeof providedIn === 'string') {\n return providedIn === 'any' || (this.scopes.has(providedIn));\n }\n else {\n return this.injectorDefTypes.has(providedIn);\n }\n }\n removeOnDestroy(callback) {\n const destroyCBIdx = this._onDestroyHooks.indexOf(callback);\n if (destroyCBIdx !== -1) {\n this._onDestroyHooks.splice(destroyCBIdx, 1);\n }\n }\n}\nfunction injectableDefOrInjectorDefFactory(token) {\n // Most tokens will have an injectable def directly on them, which specifies a factory directly.\n const injectableDef = getInjectableDef(token);\n const 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 RuntimeError(204 /* RuntimeErrorCode.INVALID_INJECTION_TOKEN */, ngDevMode && `Token ${stringify(token)} is missing a ɵprov 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 RuntimeError(204 /* RuntimeErrorCode.INVALID_INJECTION_TOKEN */, ngDevMode && 'unreachable');\n}\nfunction getUndecoratedInjectableFactory(token) {\n // If the token has parameters then it has dependencies that we cannot resolve implicitly.\n const paramLength = token.length;\n if (paramLength > 0) {\n throw new RuntimeError(204 /* RuntimeErrorCode.INVALID_INJECTION_TOKEN */, ngDevMode &&\n `Can't resolve all parameters for ${stringify(token)}: (${newArray(paramLength, '?').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 const inheritedInjectableDef = getInheritedInjectableDef(token);\n if (inheritedInjectableDef !== null) {\n return () => inheritedInjectableDef.factory(token);\n }\n else {\n return () => new token();\n }\n}\nfunction providerToRecord(provider) {\n if (isValueProvider(provider)) {\n return makeRecord(undefined, provider.useValue);\n }\n else {\n const factory = providerToFactory(provider);\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 */\nfunction providerToFactory(provider, ngModuleType, providers) {\n let factory = undefined;\n if (ngDevMode && isEnvironmentProviders(provider)) {\n throwInvalidProviderError(undefined, providers, provider);\n }\n if (isTypeProvider(provider)) {\n const unwrappedProvider = resolveForwardRef(provider);\n return getFactoryDef(unwrappedProvider) || injectableDefOrInjectorDefFactory(unwrappedProvider);\n }\n else {\n if (isValueProvider(provider)) {\n factory = () => resolveForwardRef(provider.useValue);\n }\n else if (isFactoryProvider(provider)) {\n factory = () => provider.useFactory(...injectArgs(provider.deps || []));\n }\n else if (isExistingProvider(provider)) {\n factory = () => ɵɵinject(resolveForwardRef(provider.useExisting));\n }\n else {\n const classRef = resolveForwardRef(provider &&\n (provider.useClass || provider.provide));\n if (ngDevMode && !classRef) {\n throwInvalidProviderError(ngModuleType, providers, provider);\n }\n if (hasDeps(provider)) {\n factory = () => new (classRef)(...injectArgs(provider.deps));\n }\n else {\n return getFactoryDef(classRef) || injectableDefOrInjectorDefFactory(classRef);\n }\n }\n }\n return factory;\n}\nfunction makeRecord(factory, value, multi = false) {\n return {\n factory: factory,\n value: value,\n multi: multi ? [] : undefined,\n };\n}\nfunction hasDeps(value) {\n return !!value.deps;\n}\nfunction hasOnDestroy(value) {\n return value !== null && typeof value === 'object' &&\n typeof value.ngOnDestroy === 'function';\n}\nfunction couldBeInjectableType(value) {\n return (typeof value === 'function') ||\n (typeof value === 'object' && value instanceof InjectionToken);\n}\nfunction forEachSingleProvider(providers, fn) {\n for (const provider of providers) {\n if (Array.isArray(provider)) {\n forEachSingleProvider(provider, fn);\n }\n else if (provider && isEnvironmentProviders(provider)) {\n forEachSingleProvider(provider.ɵproviders, fn);\n }\n else {\n fn(provider);\n }\n }\n}\n\n/**\n * Runs the given function in the [context](guide/dependency-injection-context) of the given\n * `Injector`.\n *\n * Within the function's stack frame, [`inject`](api/core/inject) can be used to inject dependencies\n * from the given `Injector`. Note that `inject` is only usable synchronously, and cannot be used in\n * any asynchronous callbacks or after any `await` points.\n *\n * @param injector the injector which will satisfy calls to [`inject`](api/core/inject) while `fn`\n * is executing\n * @param fn the closure to be run in the context of `injector`\n * @returns the return value of the function, if any\n * @publicApi\n */\nfunction runInInjectionContext(injector, fn) {\n if (injector instanceof R3Injector) {\n injector.assertNotDestroyed();\n }\n let prevInjectorProfilerContext;\n if (ngDevMode) {\n prevInjectorProfilerContext = setInjectorProfilerContext({ injector, token: null });\n }\n const prevInjector = setCurrentInjector(injector);\n const previousInjectImplementation = setInjectImplementation(undefined);\n try {\n return fn();\n }\n finally {\n setCurrentInjector(prevInjector);\n ngDevMode && setInjectorProfilerContext(prevInjectorProfilerContext);\n setInjectImplementation(previousInjectImplementation);\n }\n}\n/**\n * Whether the current stack frame is inside an injection context.\n */\nfunction isInInjectionContext() {\n return getInjectImplementation() !== undefined || getCurrentInjector() != null;\n}\n/**\n * Asserts that the current stack frame is within an [injection\n * context](guide/dependency-injection-context) and has access to `inject`.\n *\n * @param debugFn a reference to the function making the assertion (used for the error message).\n *\n * @publicApi\n */\nfunction assertInInjectionContext(debugFn) {\n // Taking a `Function` instead of a string name here prevents the unminified name of the function\n // from being retained in the bundle regardless of minification.\n if (!isInInjectionContext()) {\n throw new RuntimeError(-203 /* RuntimeErrorCode.MISSING_INJECTION_CONTEXT */, ngDevMode &&\n (debugFn.name +\n '() can only be used within an injection context such as a constructor, a factory function, a field initializer, or a function used with `runInInjectionContext`'));\n }\n}\n\nvar FactoryTarget;\n(function (FactoryTarget) {\n FactoryTarget[FactoryTarget[\"Directive\"] = 0] = \"Directive\";\n FactoryTarget[FactoryTarget[\"Component\"] = 1] = \"Component\";\n FactoryTarget[FactoryTarget[\"Injectable\"] = 2] = \"Injectable\";\n FactoryTarget[FactoryTarget[\"Pipe\"] = 3] = \"Pipe\";\n FactoryTarget[FactoryTarget[\"NgModule\"] = 4] = \"NgModule\";\n})(FactoryTarget || (FactoryTarget = {}));\nvar R3TemplateDependencyKind;\n(function (R3TemplateDependencyKind) {\n R3TemplateDependencyKind[R3TemplateDependencyKind[\"Directive\"] = 0] = \"Directive\";\n R3TemplateDependencyKind[R3TemplateDependencyKind[\"Pipe\"] = 1] = \"Pipe\";\n R3TemplateDependencyKind[R3TemplateDependencyKind[\"NgModule\"] = 2] = \"NgModule\";\n})(R3TemplateDependencyKind || (R3TemplateDependencyKind = {}));\nvar ViewEncapsulation;\n(function (ViewEncapsulation) {\n ViewEncapsulation[ViewEncapsulation[\"Emulated\"] = 0] = \"Emulated\";\n // Historically the 1 value was for `Native` encapsulation which has been removed as of v11.\n ViewEncapsulation[ViewEncapsulation[\"None\"] = 2] = \"None\";\n ViewEncapsulation[ViewEncapsulation[\"ShadowDom\"] = 3] = \"ShadowDom\";\n})(ViewEncapsulation || (ViewEncapsulation = {}));\n\nfunction getCompilerFacade(request) {\n const globalNg = _global['ng'];\n if (globalNg && globalNg.ɵcompilerFacade) {\n return globalNg.ɵcompilerFacade;\n }\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n // Log the type as an error so that a developer can easily navigate to the type from the\n // console.\n console.error(`JIT compilation failed for ${request.kind}`, request.type);\n let message = `The ${request.kind} '${request\n .type.name}' needs to be compiled using the JIT compiler, but '@angular/compiler' is not available.\\n\\n`;\n if (request.usage === 1 /* JitCompilerUsage.PartialDeclaration */) {\n message += `The ${request.kind} is part of a library that has been partially compiled.\\n`;\n message +=\n `However, the Angular Linker has not processed the library such that JIT compilation is used as fallback.\\n`;\n message += '\\n';\n message +=\n `Ideally, the library is processed using the Angular Linker to become fully AOT compiled.\\n`;\n }\n else {\n message +=\n `JIT compilation is discouraged for production use-cases! Consider using AOT mode instead.\\n`;\n }\n message +=\n `Alternatively, the JIT compiler should be loaded by bootstrapping using '@angular/platform-browser-dynamic' or '@angular/platform-server',\\n`;\n message +=\n `or manually provide the compiler with 'import \"@angular/compiler\";' before bootstrapping.`;\n throw new Error(message);\n }\n else {\n throw new Error('JIT compiler unavailable');\n }\n}\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 */\nconst angularCoreDiEnv = {\n 'ɵɵdefineInjectable': ɵɵdefineInjectable,\n 'ɵɵdefineInjector': ɵɵdefineInjector,\n 'ɵɵinject': ɵɵinject,\n 'ɵɵinvalidFactoryDep': ɵɵinvalidFactoryDep,\n 'resolveForwardRef': resolveForwardRef,\n};\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 */\nconst Type = Function;\nfunction isType(v) {\n return typeof v === 'function';\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 * downleveled to ES5 with `downlevelIteration` for TypeScript < 4.2:\n * ```\n * function MyClass() {\n * var _this = _super.apply(this, __spread(arguments)) || this;\n * ```\n *\n * or downleveled to ES5 with `downlevelIteration` for TypeScript >= 4.2:\n * ```\n * function MyClass() {\n * var _this = _super.apply(this, __spreadArray([], __read(arguments), false)) || this;\n * ```\n *\n * More details can be found in: https://github.com/angular/angular/issues/38453.\n */\nconst 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. */\nconst 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 */\nconst 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 */\nconst ES2015_INHERITED_CLASS_WITH_DELEGATE_CTOR = /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[^{]+{[\\s\\S]*constructor\\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 */\nfunction 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}\nclass ReflectionCapabilities {\n constructor(reflect) {\n this._reflect = reflect || _global['Reflect'];\n }\n factory(t) {\n return (...args) => new t(...args);\n }\n /** @internal */\n _zipTypesAndAnnotations(paramTypes, paramAnnotations) {\n let result;\n if (typeof paramTypes === 'undefined') {\n result = newArray(paramAnnotations.length);\n }\n else {\n result = newArray(paramTypes.length);\n }\n for (let 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 _ownParameters(type, parentCtor) {\n const 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 const 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 const ctorParameters = typeof tsickleCtorParams === 'function' ? tsickleCtorParams() : tsickleCtorParams;\n const paramTypes = ctorParameters.map((ctorParam) => ctorParam && ctorParam.type);\n const paramAnnotations = ctorParameters.map((ctorParam) => ctorParam && convertTsickleDecoratorIntoMetadata(ctorParam.decorators));\n return this._zipTypesAndAnnotations(paramTypes, paramAnnotations);\n }\n // API for metadata created by invoking the decorators.\n const paramAnnotations = type.hasOwnProperty(PARAMETERS) && type[PARAMETERS];\n const 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 parameters(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 const parentCtor = getParentCtor(type);\n let parameters = this._ownParameters(type, parentCtor);\n if (!parameters && parentCtor !== Object) {\n parameters = this.parameters(parentCtor);\n }\n return parameters || [];\n }\n _ownAnnotations(typeOrFunc, parentCtor) {\n // Prefer the direct API.\n if (typeOrFunc.annotations && typeOrFunc.annotations !== parentCtor.annotations) {\n let 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 annotations(typeOrFunc) {\n if (!isType(typeOrFunc)) {\n return [];\n }\n const parentCtor = getParentCtor(typeOrFunc);\n const ownAnnotations = this._ownAnnotations(typeOrFunc, parentCtor) || [];\n const parentAnnotations = parentCtor !== Object ? this.annotations(parentCtor) : [];\n return parentAnnotations.concat(ownAnnotations);\n }\n _ownPropMetadata(typeOrFunc, parentCtor) {\n // Prefer the direct API.\n if (typeOrFunc.propMetadata &&\n typeOrFunc.propMetadata !== parentCtor.propMetadata) {\n let 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 const propDecorators = typeOrFunc.propDecorators;\n const propMetadata = {};\n Object.keys(propDecorators).forEach(prop => {\n propMetadata[prop] = convertTsickleDecoratorIntoMetadata(propDecorators[prop]);\n });\n return propMetadata;\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 propMetadata(typeOrFunc) {\n if (!isType(typeOrFunc)) {\n return {};\n }\n const parentCtor = getParentCtor(typeOrFunc);\n const propMetadata = {};\n if (parentCtor !== Object) {\n const parentPropMetadata = this.propMetadata(parentCtor);\n Object.keys(parentPropMetadata).forEach((propName) => {\n propMetadata[propName] = parentPropMetadata[propName];\n });\n }\n const ownPropMetadata = this._ownPropMetadata(typeOrFunc, parentCtor);\n if (ownPropMetadata) {\n Object.keys(ownPropMetadata).forEach((propName) => {\n const decorators = [];\n if (propMetadata.hasOwnProperty(propName)) {\n decorators.push(...propMetadata[propName]);\n }\n decorators.push(...ownPropMetadata[propName]);\n propMetadata[propName] = decorators;\n });\n }\n return propMetadata;\n }\n ownPropMetadata(typeOrFunc) {\n if (!isType(typeOrFunc)) {\n return {};\n }\n return this._ownPropMetadata(typeOrFunc, getParentCtor(typeOrFunc)) || {};\n }\n hasLifecycleHook(type, lcProperty) {\n return type instanceof Type && lcProperty in type.prototype;\n }\n}\nfunction convertTsickleDecoratorIntoMetadata(decoratorInvocations) {\n if (!decoratorInvocations) {\n return [];\n }\n return decoratorInvocations.map(decoratorInvocation => {\n const decoratorType = decoratorInvocation.type;\n const annotationCls = decoratorType.annotationCls;\n const annotationArgs = decoratorInvocation.args ? decoratorInvocation.args : [];\n return new annotationCls(...annotationArgs);\n });\n}\nfunction getParentCtor(ctor) {\n const parentProto = ctor.prototype ? Object.getPrototypeOf(ctor.prototype) : null;\n const 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// 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.\nconst HOST = 0;\nconst TVIEW = 1;\n// Shared with LContainer\nconst FLAGS = 2;\nconst PARENT = 3;\nconst NEXT = 4;\nconst T_HOST = 5;\n// End shared with LContainer\nconst HYDRATION = 6;\nconst CLEANUP = 7;\nconst CONTEXT = 8;\nconst INJECTOR = 9;\nconst ENVIRONMENT = 10;\nconst RENDERER = 11;\nconst CHILD_HEAD = 12;\nconst CHILD_TAIL = 13;\n// FIXME(misko): Investigate if the three declarations aren't all same thing.\nconst DECLARATION_VIEW = 14;\nconst DECLARATION_COMPONENT_VIEW = 15;\nconst DECLARATION_LCONTAINER = 16;\nconst PREORDER_HOOK_FLAGS = 17;\nconst QUERIES = 18;\nconst ID = 19;\nconst EMBEDDED_VIEW_INJECTOR = 20;\nconst ON_DESTROY_HOOKS = 21;\nconst EFFECTS_TO_SCHEDULE = 22;\nconst REACTIVE_TEMPLATE_CONSUMER = 23;\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 */\nconst HEADER_OFFSET = 25;\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 */\nconst 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// FLAGS, PARENT, NEXT, and T_HOST are indices 2, 3, 4, and 5\n// As we already have these constants in LView, we don't need to re-create them.\nconst DEHYDRATED_VIEWS = 6;\nconst NATIVE = 7;\nconst VIEW_REFS = 8;\nconst 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 */\nconst CONTAINER_HEADER_OFFSET = 10;\n/** Flags associated with an LContainer (saved in LContainer[FLAGS]) */\nvar LContainerFlags;\n(function (LContainerFlags) {\n LContainerFlags[LContainerFlags[\"None\"] = 0] = \"None\";\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`.\n */\n LContainerFlags[LContainerFlags[\"HasTransplantedViews\"] = 2] = \"HasTransplantedViews\";\n})(LContainerFlags || (LContainerFlags = {}));\n\n/**\n * True if `value` is `LView`.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\nfunction 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 */\nfunction isLContainer(value) {\n return Array.isArray(value) && value[TYPE] === true;\n}\nfunction isContentQueryHost(tNode) {\n return (tNode.flags & 4 /* TNodeFlags.hasContentQuery */) !== 0;\n}\nfunction isComponentHost(tNode) {\n return tNode.componentOffset > -1;\n}\nfunction isDirectiveHost(tNode) {\n return (tNode.flags & 1 /* TNodeFlags.isDirectiveHost */) === 1 /* TNodeFlags.isDirectiveHost */;\n}\nfunction isComponentDef(def) {\n return !!def.template;\n}\nfunction isRootView(target) {\n return (target[FLAGS] & 512 /* LViewFlags.IsRoot */) !== 0;\n}\nfunction isProjectionTNode(tNode) {\n return (tNode.type & 16 /* TNodeType.Projection */) === 16 /* TNodeType.Projection */;\n}\nfunction hasI18n(lView) {\n return (lView[FLAGS] & 32 /* LViewFlags.HasI18n */) === 32 /* LViewFlags.HasI18n */;\n}\nfunction isDestroyed(lView) {\n return (lView[FLAGS] & 256 /* LViewFlags.Destroyed */) === 256 /* LViewFlags.Destroyed */;\n}\n\n// [Assert functions do not constraint type when they are guarded by a truthy\n// expression.](https://github.com/microsoft/TypeScript/issues/37295)\nfunction assertTNodeForLView(tNode, lView) {\n assertTNodeForTView(tNode, lView[TVIEW]);\n}\nfunction assertTNodeForTView(tNode, tView) {\n assertTNode(tNode);\n const tData = tView.data;\n for (let i = HEADER_OFFSET; i < tData.length; i++) {\n if (tData[i] === tNode) {\n return;\n }\n }\n throwError('This TNode does not belong to this TView.');\n}\nfunction 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}\nfunction 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}\nfunction assertComponentType(actual, msg = 'Type passed in is not ComponentType, it does not have \\'ɵcmp\\' property.') {\n if (!getComponentDef(actual)) {\n throwError(msg);\n }\n}\nfunction assertNgModuleType(actual, msg = 'Type passed in is not NgModuleType, it does not have \\'ɵmod\\' property.') {\n if (!getNgModuleDef(actual)) {\n throwError(msg);\n }\n}\nfunction assertCurrentTNodeIsParent(isParent) {\n assertEqual(isParent, true, 'currentTNode should be a parent');\n}\nfunction assertHasParent(tNode) {\n assertDefined(tNode, 'currentTNode should exist!');\n assertDefined(tNode.parent, 'currentTNode should have a parent');\n}\nfunction assertLContainer(value) {\n assertDefined(value, 'LContainer must be defined');\n assertEqual(isLContainer(value), true, 'Expecting LContainer');\n}\nfunction assertLViewOrUndefined(value) {\n value && assertEqual(isLView(value), true, 'Expecting LView or undefined or null');\n}\nfunction assertLView(value) {\n assertDefined(value, 'LView must be defined');\n assertEqual(isLView(value), true, 'Expecting LView');\n}\nfunction assertFirstCreatePass(tView, errMessage) {\n assertEqual(tView.firstCreatePass, true, errMessage || 'Should only be called in first create pass.');\n}\nfunction 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 */\nfunction 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}\nfunction assertIndexInDeclRange(tView, index) {\n assertBetween(HEADER_OFFSET, tView.bindingStartIndex, index);\n}\nfunction assertIndexInExpandoRange(lView, index) {\n const tView = lView[1];\n assertBetween(tView.expandoStartIndex, lView.length, index);\n}\nfunction assertBetween(lower, upper, index) {\n if (!(lower <= index && index < upper)) {\n throwError(`Index out of range (expecting ${lower} <= ${index} < ${upper})`);\n }\n}\nfunction 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 () must have projection slots defined.');\n}\nfunction assertParentView(lView, errMessage) {\n assertDefined(lView, errMessage || 'Component views should always have a parent view (component\\'s host view)');\n}\nfunction assertNoDuplicateDirectives(directives) {\n // The array needs at least two elements in order to have duplicates.\n if (directives.length < 2) {\n return;\n }\n const seenDirectives = new Set();\n for (const current of directives) {\n if (seenDirectives.has(current)) {\n throw new RuntimeError(309 /* RuntimeErrorCode.DUPLICATE_DIRECTIVE */, `Directive ${current.type.name} matches multiple times on the same element. ` +\n `Directives can only match an element once.`);\n }\n seenDirectives.add(current);\n }\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 */\nfunction assertNodeInjector(lView, injectorIndex) {\n assertIndexInExpandoRange(lView, injectorIndex);\n assertIndexInExpandoRange(lView, injectorIndex + 8 /* NodeInjectorOffset.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 /* NodeInjectorOffset.PARENT */], 'injectorIndex should point to parent injector');\n}\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 {@link OnChanges}\n *\n * @publicApi\n */\nclass SimpleChange {\n constructor(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 isFirstChange() {\n return this.firstChange;\n }\n}\n\nfunction applyValueToInputField(instance, inputSignalNode, privateName, value) {\n if (inputSignalNode !== null) {\n inputSignalNode.applyValueToInputSignal(inputSignalNode, value);\n }\n else {\n instance[privateName] = value;\n }\n}\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 */\nfunction ɵɵNgOnChangesFeature() {\n return NgOnChangesFeatureImpl;\n}\nfunction 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 */\nfunction rememberChangeHistoryAndInvokeOnChangesHook() {\n const simpleChangesStore = getSimpleChangesStore(this);\n const current = simpleChangesStore?.current;\n if (current) {\n const 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 (let key in current) {\n previous[key] = current[key];\n }\n }\n simpleChangesStore.current = null;\n this.ngOnChanges(current);\n }\n}\nfunction ngOnChangesSetInput(instance, inputSignalNode, value, publicName, privateName) {\n const declaredName = this.declaredInputs[publicName];\n ngDevMode && assertString(declaredName, 'Name of input in ngOnChanges has to be a string');\n const simpleChangesStore = getSimpleChangesStore(instance) ||\n setSimpleChangesStore(instance, { previous: EMPTY_OBJ, current: null });\n const current = simpleChangesStore.current || (simpleChangesStore.current = {});\n const previous = simpleChangesStore.previous;\n const previousChange = previous[declaredName];\n current[declaredName] = new SimpleChange(previousChange && previousChange.currentValue, value, previous === EMPTY_OBJ);\n applyValueToInputField(instance, inputSignalNode, privateName, value);\n}\nconst SIMPLE_CHANGES_STORE = '__ngSimpleChanges__';\nfunction getSimpleChangesStore(instance) {\n return instance[SIMPLE_CHANGES_STORE] || null;\n}\nfunction setSimpleChangesStore(instance, store) {\n return instance[SIMPLE_CHANGES_STORE] = store;\n}\n\nlet 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 */\nconst setProfiler = (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 */\nconst profiler = function (event, instance, hookOrListener) {\n if (profilerCallback != null /* both `null` and `undefined` */) {\n profilerCallback(event, instance, hookOrListener);\n }\n};\n\nconst SVG_NAMESPACE = 'svg';\nconst MATH_ML_NAMESPACE = 'math';\n\n// TODO(atscott): flip default internally ASAP and externally for v18 (#52928)\nlet _ensureDirtyViewsAreAlwaysReachable = false;\nfunction getEnsureDirtyViewsAreAlwaysReachable() {\n return _ensureDirtyViewsAreAlwaysReachable;\n}\nfunction setEnsureDirtyViewsAreAlwaysReachable(v) {\n _ensureDirtyViewsAreAlwaysReachable = v;\n}\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 */\nfunction 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 */\nfunction 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 * Retrieves an element value from the provided `viewData`, by unwrapping\n * from any containers, component views, or style contexts.\n */\nfunction 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 */\nfunction getNativeByTNode(tNode, lView) {\n ngDevMode && assertTNodeForLView(tNode, lView);\n ngDevMode && assertIndexInRange(lView, tNode.index);\n const node = unwrapRNode(lView[tNode.index]);\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 */\nfunction getNativeByTNodeOrNull(tNode, lView) {\n const index = tNode === null ? -1 : tNode.index;\n if (index !== -1) {\n ngDevMode && assertTNodeForLView(tNode, lView);\n const node = unwrapRNode(lView[index]);\n return node;\n }\n return null;\n}\n// fixme(misko): The return Type should be `TNode|null`\nfunction getTNode(tView, index) {\n ngDevMode && assertGreaterThan(index, -1, 'wrong index for TNode');\n ngDevMode && assertLessThan(index, tView.data.length, 'wrong index for TNode');\n const tNode = tView.data[index];\n ngDevMode && tNode !== null && assertTNode(tNode);\n return tNode;\n}\n/** Retrieves a value from any `LView` or `TData`. */\nfunction load(view, index) {\n ngDevMode && assertIndexInRange(view, index);\n return view[index];\n}\nfunction getComponentLViewByIndex(nodeIndex, hostView) {\n // Could be an LView or an LContainer. If LContainer, unwrap to find LView.\n ngDevMode && assertIndexInRange(hostView, nodeIndex);\n const slotValue = hostView[nodeIndex];\n const lView = isLView(slotValue) ? slotValue : slotValue[HOST];\n return lView;\n}\n/** Checks whether a given view is in creation mode */\nfunction isCreationMode(view) {\n return (view[FLAGS] & 4 /* LViewFlags.CreationMode */) === 4 /* LViewFlags.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 */\nfunction viewAttachedToChangeDetector(view) {\n return (view[FLAGS] & 128 /* LViewFlags.Attached */) === 128 /* LViewFlags.Attached */;\n}\n/** Returns a boolean for whether the view is attached to a container. */\nfunction viewAttachedToContainer(view) {\n return isLContainer(view[PARENT]);\n}\nfunction 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 */\nfunction resetPreOrderHookFlags(lView) {\n lView[PREORDER_HOOK_FLAGS] = 0;\n}\n/**\n * Adds the `RefreshView` flag from the lView and updates HAS_CHILD_VIEWS_TO_REFRESH flag of\n * parents.\n */\nfunction markViewForRefresh(lView) {\n if (lView[FLAGS] & 1024 /* LViewFlags.RefreshView */) {\n return;\n }\n lView[FLAGS] |= 1024 /* LViewFlags.RefreshView */;\n if (viewAttachedToChangeDetector(lView)) {\n markAncestorsForTraversal(lView);\n }\n}\n/**\n * Walks up the LView hierarchy.\n * @param nestingLevel Number of times to walk up in hierarchy.\n * @param currentView View from which to start the lookup.\n */\nfunction 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}\nfunction requiresRefreshOrTraversal(lView) {\n return !!(lView[FLAGS] & (1024 /* LViewFlags.RefreshView */ | 8192 /* LViewFlags.HasChildViewsToRefresh */) ||\n lView[REACTIVE_TEMPLATE_CONSUMER]?.dirty);\n}\n/**\n * Updates the `HasChildViewsToRefresh` flag on the parents of the `LView` as well as the\n * parents above.\n */\nfunction updateAncestorTraversalFlagsOnAttach(lView) {\n lView[ENVIRONMENT].changeDetectionScheduler?.notify(1 /* NotificationType.AfterRenderHooks */);\n // TODO(atscott): Simplify if...else cases once getEnsureDirtyViewsAreAlwaysReachable is always\n // `true`. When we attach a view that's marked `Dirty`, we should ensure that it is reached during\n // the next CD traversal so we add the `RefreshView` flag and mark ancestors accordingly.\n if (requiresRefreshOrTraversal(lView)) {\n markAncestorsForTraversal(lView);\n }\n else if (lView[FLAGS] & 64 /* LViewFlags.Dirty */) {\n if (getEnsureDirtyViewsAreAlwaysReachable()) {\n lView[FLAGS] |= 1024 /* LViewFlags.RefreshView */;\n markAncestorsForTraversal(lView);\n }\n else {\n lView[ENVIRONMENT].changeDetectionScheduler?.notify();\n }\n }\n}\n/**\n * Ensures views above the given `lView` are traversed during change detection even when they are\n * not dirty.\n *\n * This is done by setting the `HAS_CHILD_VIEWS_TO_REFRESH` flag up to the root, stopping when the\n * flag is already `true` or the `lView` is detached.\n */\nfunction markAncestorsForTraversal(lView) {\n lView[ENVIRONMENT].changeDetectionScheduler?.notify();\n let parent = getLViewParent(lView);\n while (parent !== null) {\n // We stop adding markers to the ancestors once we reach one that already has the marker. This\n // is to avoid needlessly traversing all the way to the root when the marker already exists.\n if (parent[FLAGS] & 8192 /* LViewFlags.HasChildViewsToRefresh */) {\n break;\n }\n parent[FLAGS] |= 8192 /* LViewFlags.HasChildViewsToRefresh */;\n if (!viewAttachedToChangeDetector(parent)) {\n break;\n }\n parent = getLViewParent(parent);\n }\n}\n/**\n * Stores a LView-specific destroy callback.\n */\nfunction storeLViewOnDestroy(lView, onDestroyCallback) {\n if ((lView[FLAGS] & 256 /* LViewFlags.Destroyed */) === 256 /* LViewFlags.Destroyed */) {\n throw new RuntimeError(911 /* RuntimeErrorCode.VIEW_ALREADY_DESTROYED */, ngDevMode && 'View has already been destroyed.');\n }\n if (lView[ON_DESTROY_HOOKS] === null) {\n lView[ON_DESTROY_HOOKS] = [];\n }\n lView[ON_DESTROY_HOOKS].push(onDestroyCallback);\n}\n/**\n * Removes previously registered LView-specific destroy callback.\n */\nfunction removeLViewOnDestroy(lView, onDestroyCallback) {\n if (lView[ON_DESTROY_HOOKS] === null)\n return;\n const destroyCBIdx = lView[ON_DESTROY_HOOKS].indexOf(onDestroyCallback);\n if (destroyCBIdx !== -1) {\n lView[ON_DESTROY_HOOKS].splice(destroyCBIdx, 1);\n }\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 */\nfunction getLViewParent(lView) {\n ngDevMode && assertLView(lView);\n const parent = lView[PARENT];\n return isLContainer(parent) ? parent[PARENT] : parent;\n}\n\nconst instructionState = {\n lFrame: createLFrame(null),\n bindingsEnabled: true,\n skipHydrationRootTNode: null,\n};\n/**\n * In this mode, any changes in bindings will throw an ExpressionChangedAfterChecked error.\n *\n * Necessary to support ChangeDetectorRef.checkNoChanges().\n *\n * The `checkNoChanges` function is invoked only in ngDevMode=true and verifies that no unintended\n * changes exist in the change detector or its children.\n */\nlet _isInCheckNoChangesMode = false;\n/**\n * Returns true if the instruction state stack is empty.\n *\n * Intended to be called from tests only (tree shaken otherwise).\n */\nfunction specOnlyIsInstructionStateEmpty() {\n return instructionState.lFrame.parent === null;\n}\nfunction getElementDepthCount() {\n return instructionState.lFrame.elementDepthCount;\n}\nfunction increaseElementDepthCount() {\n instructionState.lFrame.elementDepthCount++;\n}\nfunction decreaseElementDepthCount() {\n instructionState.lFrame.elementDepthCount--;\n}\nfunction getBindingsEnabled() {\n return instructionState.bindingsEnabled;\n}\n/**\n * Returns true if currently inside a skip hydration block.\n * @returns boolean\n */\nfunction isInSkipHydrationBlock$1() {\n return instructionState.skipHydrationRootTNode !== null;\n}\n/**\n * Returns true if this is the root TNode of the skip hydration block.\n * @param tNode the current TNode\n * @returns boolean\n */\nfunction isSkipHydrationRootTNode(tNode) {\n return instructionState.skipHydrationRootTNode === tNode;\n}\n/**\n * Enables directive matching on elements.\n *\n * * Example:\n * ```\n * \n * Should match component / directive.\n * \n *
\n * \n * \n * Should not match component / directive because we are in ngNonBindable.\n * \n * \n *
\n * ```\n *\n * @codeGenApi\n */\nfunction ɵɵenableBindings() {\n instructionState.bindingsEnabled = true;\n}\n/**\n * Sets a flag to specify that the TNode is in a skip hydration block.\n * @param tNode the current TNode\n */\nfunction enterSkipHydrationBlock(tNode) {\n instructionState.skipHydrationRootTNode = tNode;\n}\n/**\n * Disables directive matching on element.\n *\n * * Example:\n * ```\n * \n * Should match component / directive.\n * \n *
\n * \n * \n * Should not match component / directive because we are in ngNonBindable.\n * \n * \n *
\n * ```\n *\n * @codeGenApi\n */\nfunction ɵɵdisableBindings() {\n instructionState.bindingsEnabled = false;\n}\n/**\n * Clears the root skip hydration node when leaving a skip hydration block.\n */\nfunction leaveSkipHydrationBlock() {\n instructionState.skipHydrationRootTNode = null;\n}\n/**\n * Return the current `LView`.\n */\nfunction getLView() {\n return instructionState.lFrame.lView;\n}\n/**\n * Return the current `TView`.\n */\nfunction 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 * @returns Context of the restored OpaqueViewState instance.\n *\n * @codeGenApi\n */\nfunction ɵɵrestoreView(viewToRestore) {\n instructionState.lFrame.contextLView = viewToRestore;\n return viewToRestore[CONTEXT];\n}\n/**\n * Clears the view set in `ɵɵrestoreView` from memory. Returns the passed in\n * value so that it can be used as a return value of an instruction.\n *\n * @codeGenApi\n */\nfunction ɵɵresetView(value) {\n instructionState.lFrame.contextLView = null;\n return value;\n}\nfunction getCurrentTNode() {\n let currentTNode = getCurrentTNodePlaceholderOk();\n while (currentTNode !== null && currentTNode.type === 64 /* TNodeType.Placeholder */) {\n currentTNode = currentTNode.parent;\n }\n return currentTNode;\n}\nfunction getCurrentTNodePlaceholderOk() {\n return instructionState.lFrame.currentTNode;\n}\nfunction getCurrentParentTNode() {\n const lFrame = instructionState.lFrame;\n const currentTNode = lFrame.currentTNode;\n return lFrame.isParent ? currentTNode : currentTNode.parent;\n}\nfunction setCurrentTNode(tNode, isParent) {\n ngDevMode && tNode && assertTNodeForTView(tNode, instructionState.lFrame.tView);\n const lFrame = instructionState.lFrame;\n lFrame.currentTNode = tNode;\n lFrame.isParent = isParent;\n}\nfunction isCurrentTNodeParent() {\n return instructionState.lFrame.isParent;\n}\nfunction setCurrentTNodeAsNotParent() {\n instructionState.lFrame.isParent = false;\n}\nfunction getContextLView() {\n const contextLView = instructionState.lFrame.contextLView;\n ngDevMode && assertDefined(contextLView, 'contextLView must be defined.');\n return contextLView;\n}\nfunction isInCheckNoChangesMode() {\n !ngDevMode && throwError('Must never be called in production mode');\n return _isInCheckNoChangesMode;\n}\nfunction setIsInCheckNoChangesMode(mode) {\n !ngDevMode && throwError('Must never be called in production mode');\n _isInCheckNoChangesMode = mode;\n}\n// top level variables should not be exported for performance reasons (PERF_NOTES.md)\nfunction getBindingRoot() {\n const lFrame = instructionState.lFrame;\n let index = lFrame.bindingRootIndex;\n if (index === -1) {\n index = lFrame.bindingRootIndex = lFrame.tView.bindingStartIndex;\n }\n return index;\n}\nfunction getBindingIndex() {\n return instructionState.lFrame.bindingIndex;\n}\nfunction setBindingIndex(value) {\n return instructionState.lFrame.bindingIndex = value;\n}\nfunction nextBindingIndex() {\n return instructionState.lFrame.bindingIndex++;\n}\nfunction incrementBindingIndex(count) {\n const lFrame = instructionState.lFrame;\n const index = lFrame.bindingIndex;\n lFrame.bindingIndex = lFrame.bindingIndex + count;\n return index;\n}\nfunction isInI18nBlock() {\n return instructionState.lFrame.inI18n;\n}\nfunction 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 */\nfunction setBindingRootForHostBindings(bindingRootIndex, currentDirectiveIndex) {\n const 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 */\nfunction 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 */\nfunction 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 */\nfunction getCurrentDirectiveDef(tData) {\n const currentDirectiveIndex = instructionState.lFrame.currentDirectiveIndex;\n return currentDirectiveIndex === -1 ? null : tData[currentDirectiveIndex];\n}\nfunction getCurrentQueryIndex() {\n return instructionState.lFrame.currentQueryIndex;\n}\nfunction 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 */\nfunction getDeclarationTNode(lView) {\n const tView = lView[TVIEW];\n // Return the declaration parent for embedded views\n if (tView.type === 2 /* TViewType.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 /* TViewType.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 */\nfunction enterDI(lView, tNode, flags) {\n ngDevMode && assertLViewOrUndefined(lView);\n if (flags & InjectFlags.SkipSelf) {\n ngDevMode && assertTNodeForTView(tNode, lView[TVIEW]);\n let parentTNode = tNode;\n let parentLView = lView;\n while (true) {\n ngDevMode && assertDefined(parentTNode, 'Parent TNode should be defined');\n parentTNode = parentTNode.parent;\n if (parentTNode === null && !(flags & 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 /* TNodeType.Element */ | 8 /* TNodeType.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 const 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 */\nfunction enterView(newView) {\n ngDevMode && assertNotEqual(newView[0], newView[1], '????');\n ngDevMode && assertLViewOrUndefined(newView);\n const 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 const 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 */\nfunction allocLFrame() {\n const currentLFrame = instructionState.lFrame;\n const childLFrame = currentLFrame === null ? null : currentLFrame.child;\n const newLFrame = childLFrame === null ? createLFrame(currentLFrame) : childLFrame;\n return newLFrame;\n}\nfunction createLFrame(parent) {\n const 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 */\nfunction leaveViewLight() {\n const 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 */\nconst 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 */\nfunction leaveView() {\n const 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}\nfunction nextContextImpl(level) {\n const contextLView = instructionState.lFrame.contextLView =\n walkUpViews(level, instructionState.lFrame.contextLView);\n return contextLView[CONTEXT];\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 */\nfunction 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 */\nfunction 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 */\nfunction getSelectedTNode() {\n const 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 */\nfunction ɵɵ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 */\nfunction ɵɵ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 */\nfunction ɵɵ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 */\nfunction namespaceHTMLInternal() {\n instructionState.lFrame.currentNamespace = null;\n}\nfunction getNamespace$1() {\n return instructionState.lFrame.currentNamespace;\n}\nlet _wasLastNodeCreated = true;\n/**\n * Retrieves a global flag that indicates whether the most recent DOM node\n * was created or hydrated.\n */\nfunction wasLastNodeCreated() {\n return _wasLastNodeCreated;\n}\n/**\n * Sets a global flag to indicate whether the most recent DOM node\n * was created or hydrated.\n */\nfunction lastNodeWasCreated(flag) {\n _wasLastNodeCreated = flag;\n}\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 */\nfunction registerPreOrderHooks(directiveIndex, directiveDef, tView) {\n ngDevMode && assertFirstCreatePass(tView);\n const { ngOnChanges, ngOnInit, ngDoCheck } = directiveDef.type.prototype;\n if (ngOnChanges) {\n const wrappedOnChanges = NgOnChangesFeatureImpl(directiveDef);\n (tView.preOrderHooks ??= []).push(directiveIndex, wrappedOnChanges);\n (tView.preOrderCheckHooks ??= []).push(directiveIndex, wrappedOnChanges);\n }\n if (ngOnInit) {\n (tView.preOrderHooks ??= []).push(0 - directiveIndex, ngOnInit);\n }\n if (ngDoCheck) {\n (tView.preOrderHooks ??= []).push(directiveIndex, ngDoCheck);\n (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 */\nfunction 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 (let i = tNode.directiveStart, end = tNode.directiveEnd; i < end; i++) {\n const directiveDef = tView.data[i];\n ngDevMode && assertDefined(directiveDef, 'Expecting DirectiveDef');\n const lifecycleHooks = directiveDef.type.prototype;\n const { ngAfterContentInit, ngAfterContentChecked, ngAfterViewInit, ngAfterViewChecked, ngOnDestroy } = lifecycleHooks;\n if (ngAfterContentInit) {\n (tView.contentHooks ??= []).push(-i, ngAfterContentInit);\n }\n if (ngAfterContentChecked) {\n (tView.contentHooks ??= []).push(i, ngAfterContentChecked);\n (tView.contentCheckHooks ??= []).push(i, ngAfterContentChecked);\n }\n if (ngAfterViewInit) {\n (tView.viewHooks ??= []).push(-i, ngAfterViewInit);\n }\n if (ngAfterViewChecked) {\n (tView.viewHooks ??= []).push(i, ngAfterViewChecked);\n (tView.viewCheckHooks ??= []).push(i, ngAfterViewChecked);\n }\n if (ngOnDestroy != null) {\n (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 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 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 */\nfunction executeCheckHooks(lView, hooks, nodeIndex) {\n callHooks(lView, hooks, 3 /* InitPhaseState.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 */\nfunction executeInitAndCheckHooks(lView, hooks, initPhase, nodeIndex) {\n ngDevMode &&\n assertNotEqual(initPhase, 3 /* InitPhaseState.InitPhaseCompleted */, 'Init pre-order hooks should not be called more than once');\n if ((lView[FLAGS] & 3 /* LViewFlags.InitPhaseStateMask */) === initPhase) {\n callHooks(lView, hooks, initPhase, nodeIndex);\n }\n}\nfunction incrementInitPhaseFlags(lView, initPhase) {\n ngDevMode &&\n assertNotEqual(initPhase, 3 /* InitPhaseState.InitPhaseCompleted */, 'Init hooks phase should not be incremented after all init hooks have been run.');\n let flags = lView[FLAGS];\n if ((flags & 3 /* LViewFlags.InitPhaseStateMask */) === initPhase) {\n flags &= 16383 /* LViewFlags.IndexWithinInitPhaseReset */;\n flags += 1 /* LViewFlags.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 */\nfunction callHooks(currentView, arr, initPhase, currentNodeIndex) {\n ngDevMode &&\n assertEqual(isInCheckNoChangesMode(), false, 'Hooks should never be run when in check no changes mode.');\n const startIndex = currentNodeIndex !== undefined ?\n (currentView[PREORDER_HOOK_FLAGS] & 65535 /* PreOrderHookFlags.IndexOfTheNextPreOrderHookMaskMask */) :\n 0;\n const nodeIndexLimit = currentNodeIndex != null ? currentNodeIndex : -1;\n const max = arr.length - 1; // Stop the loop at length - 1, because we look for the hook at i + 1\n let lastNodeIndexFound = 0;\n for (let i = startIndex; i < max; i++) {\n const 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 const isInitHook = arr[i] < 0;\n if (isInitHook) {\n currentView[PREORDER_HOOK_FLAGS] += 65536 /* PreOrderHookFlags.NumberOfInitHooksCalledIncrementer */;\n }\n if (lastNodeIndexFound < nodeIndexLimit || nodeIndexLimit == -1) {\n callHook(currentView, initPhase, arr, i);\n currentView[PREORDER_HOOK_FLAGS] =\n (currentView[PREORDER_HOOK_FLAGS] & 4294901760 /* PreOrderHookFlags.NumberOfInitHooksCalledMask */) + i +\n 2;\n }\n i++;\n }\n }\n}\n/**\n * Executes a single lifecycle hook, making sure that:\n * - it is called in the non-reactive context;\n * - profiling data are registered.\n */\nfunction callHookInternal(directive, hook) {\n profiler(4 /* ProfilerEvent.LifecycleHookStart */, directive, hook);\n const prevConsumer = setActiveConsumer$1(null);\n try {\n hook.call(directive);\n }\n finally {\n setActiveConsumer$1(prevConsumer);\n profiler(5 /* ProfilerEvent.LifecycleHookEnd */, directive, hook);\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 */\nfunction callHook(currentView, initPhase, arr, i) {\n const isInitHook = arr[i] < 0;\n const hook = arr[i + 1];\n const directiveIndex = isInitHook ? -arr[i] : arr[i];\n const directive = currentView[directiveIndex];\n if (isInitHook) {\n const indexWithintInitPhase = currentView[FLAGS] >> 14 /* LViewFlags.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 /* PreOrderHookFlags.NumberOfInitHooksCalledShift */) &&\n (currentView[FLAGS] & 3 /* LViewFlags.InitPhaseStateMask */) === initPhase) {\n currentView[FLAGS] += 16384 /* LViewFlags.IndexWithinInitPhaseIncrementer */;\n callHookInternal(directive, hook);\n }\n }\n else {\n callHookInternal(directive, hook);\n }\n}\n\nconst 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 {\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 {\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 */\nclass NodeInjectorFactory {\n constructor(\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}\nfunction isFactory(obj) {\n return obj instanceof NodeInjectorFactory;\n}\n\n/**\n * Converts `TNodeType` into human readable text.\n * Make sure this matches with `TNodeType`\n */\nfunction toTNodeTypeAsString(tNodeType) {\n let text = '';\n (tNodeType & 1 /* TNodeType.Text */) && (text += '|Text');\n (tNodeType & 2 /* TNodeType.Element */) && (text += '|Element');\n (tNodeType & 4 /* TNodeType.Container */) && (text += '|Container');\n (tNodeType & 8 /* TNodeType.ElementContainer */) && (text += '|ElementContainer');\n (tNodeType & 16 /* TNodeType.Projection */) && (text += '|Projection');\n (tNodeType & 32 /* TNodeType.Icu */) && (text += '|IcuContainer');\n (tNodeType & 64 /* TNodeType.Placeholder */) && (text += '|Placeholder');\n return text.length > 0 ? text.substring(1) : text;\n}\n/**\n * Helper function to detect if a given value matches a `TNode` shape.\n *\n * The logic uses the `insertBeforeIndex` and its possible values as\n * a way to differentiate a TNode shape from other types of objects\n * within the `TView.data`. This is not a perfect check, but it can\n * be a reasonable differentiator, since we control the shapes of objects\n * within `TView.data`.\n */\nfunction isTNodeShape(value) {\n return value != null && typeof value === 'object' &&\n (value.insertBeforeIndex === null ||\n typeof value.insertBeforeIndex === 'number' ||\n Array.isArray(value.insertBeforeIndex));\n}\n/**\n * Returns `true` if the `TNode` has a directive which has `@Input()` for `class` binding.\n *\n * ```\n *
\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 */\nfunction hasClassInput(tNode) {\n return (tNode.flags & 8 /* TNodeFlags.hasClassInput */) !== 0;\n}\n/**\n * Returns `true` if the `TNode` has a directive which has `@Input()` for `style` binding.\n *\n * ```\n *
\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 */\nfunction hasStyleInput(tNode) {\n return (tNode.flags & 16 /* TNodeFlags.hasStyleInput */) !== 0;\n}\n\nfunction 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}\nfunction assertPureTNodeType(type) {\n if (!(type === 2 /* TNodeType.Element */ || //\n type === 1 /* TNodeType.Text */ || //\n type === 4 /* TNodeType.Container */ || //\n type === 8 /* TNodeType.ElementContainer */ || //\n type === 32 /* TNodeType.Icu */ || //\n type === 16 /* TNodeType.Projection */ || //\n type === 64 /* TNodeType.Placeholder */)) {\n throwError(`Expected TNodeType to have only a single type selected, but got ${toTNodeTypeAsString(type)}.`);\n }\n}\n\n/// Parent Injector Utils ///////////////////////////////////////////////////////////////\nfunction hasParentInjector(parentLocation) {\n return parentLocation !== NO_PARENT_INJECTOR;\n}\nfunction getParentInjectorIndex(parentLocation) {\n if (ngDevMode) {\n assertNumber(parentLocation, 'Number expected');\n assertNotEqual(parentLocation, -1, 'Not a valid state.');\n const parentInjectorIndex = parentLocation & 32767 /* RelativeInjectorLocationFlags.InjectorIndexMask */;\n assertGreaterThan(parentInjectorIndex, HEADER_OFFSET, 'Parent injector must be pointing past HEADER_OFFSET.');\n }\n return parentLocation & 32767 /* RelativeInjectorLocationFlags.InjectorIndexMask */;\n}\nfunction getParentInjectorViewOffset(parentLocation) {\n return parentLocation >> 16 /* RelativeInjectorLocationFlags.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 */\nfunction getParentInjectorView(location, startView) {\n let viewOffset = getParentInjectorViewOffset(location);\n let 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 // 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 * 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 */\nlet includeViewProviders = true;\nfunction setIncludeViewProviders(v) {\n const 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 */\nconst BLOOM_SIZE = 256;\nconst 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 */\nconst BLOOM_BUCKET_BITS = 5;\n/** Counter used to generate unique IDs for directives. */\nlet nextNgElementId = 0;\n/** Value used when something wasn't found by an injector. */\nconst NOT_FOUND = {};\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 */\nfunction bloomAdd(injectorIndex, tView, type) {\n ngDevMode && assertEqual(tView.firstCreatePass, true, 'expected firstCreatePass to be true');\n let 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 const 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 const 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 */\nfunction getOrCreateNodeInjectorForNode(tNode, lView) {\n const existingInjectorIndex = getInjectorIndex(tNode, lView);\n if (existingInjectorIndex !== -1) {\n return existingInjectorIndex;\n }\n const 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 const parentLoc = getParentInjectorLocation(tNode, lView);\n const 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 const parentIndex = getParentInjectorIndex(parentLoc);\n const parentLView = getParentInjectorView(parentLoc, lView);\n const 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 (let i = 0; i < 8 /* NodeInjectorOffset.BLOOM_SIZE */; i++) {\n lView[injectorIndex + i] = parentLView[parentIndex + i] | parentData[parentIndex + i];\n }\n }\n lView[injectorIndex + 8 /* NodeInjectorOffset.PARENT */] = parentLoc;\n return injectorIndex;\n}\nfunction insertBloom(arr, footer) {\n arr.push(0, 0, 0, 0, 0, 0, 0, 0, footer);\n}\nfunction 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 /* NodeInjectorOffset.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 */\nfunction 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 let declarationViewOffset = 0;\n let parentTNode = null;\n let 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 parentTNode = getTNodeFromLView(lViewCursor);\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 /* RelativeInjectorLocationFlags.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 */\nfunction 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 * \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 */\nfunction injectAttributeImpl(tNode, attrNameToInject) {\n ngDevMode && assertTNodeType(tNode, 12 /* TNodeType.AnyContainer */ | 3 /* TNodeType.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 const attrs = tNode.attrs;\n if (attrs) {\n const attrsLength = attrs.length;\n let i = 0;\n while (i < attrsLength) {\n const 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 /* AttributeMarker.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}\nfunction notFoundValueOrThrow(notFoundValue, token, flags) {\n if ((flags & InjectFlags.Optional) || notFoundValue !== undefined) {\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 */\nfunction lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue) {\n if ((flags & InjectFlags.Optional) && notFoundValue === undefined) {\n // This must be set or the NullInjector will throw for optional deps\n notFoundValue = null;\n }\n if ((flags & (InjectFlags.Self | InjectFlags.Host)) === 0) {\n const 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 const previousInjectImplementation = setInjectImplementation(undefined);\n try {\n if (moduleInjector) {\n return moduleInjector.get(token, notFoundValue, flags & InjectFlags.Optional);\n }\n else {\n return injectRootLimpMode(token, notFoundValue, flags & 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 */\nfunction getOrCreateInjectable(tNode, lView, token, flags = InjectFlags.Default, notFoundValue) {\n if (tNode !== null) {\n // If the view or any of its ancestors have an embedded\n // view injector, we have to look it up there first.\n if (lView[FLAGS] & 2048 /* LViewFlags.HasEmbeddedViewInjector */ &&\n // The token must be present on the current node injector when the `Self`\n // flag is set, so the lookup on embedded view injector(s) can be skipped.\n !(flags & InjectFlags.Self)) {\n const embeddedInjectorValue = lookupTokenUsingEmbeddedInjector(tNode, lView, token, flags, NOT_FOUND);\n if (embeddedInjectorValue !== NOT_FOUND) {\n return embeddedInjectorValue;\n }\n }\n // Otherwise try the node injector.\n const value = lookupTokenUsingNodeInjector(tNode, lView, token, flags, NOT_FOUND);\n if (value !== NOT_FOUND) {\n return value;\n }\n }\n // Finally, fall back to the module injector.\n return lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue);\n}\n/**\n * Returns the value associated to the given token from the node injector.\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 */\nfunction lookupTokenUsingNodeInjector(tNode, lView, token, flags, notFoundValue) {\n const 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 & InjectFlags.Host) ?\n notFoundValueOrThrow(notFoundValue, token, flags) :\n lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue);\n }\n try {\n let value;\n if (ngDevMode) {\n runInInjectorProfilerContext(new NodeInjector(getCurrentTNode(), getLView()), token, () => {\n value = bloomHash(flags);\n if (value != null) {\n emitInstanceCreatedByInjectorEvent(value);\n }\n });\n }\n else {\n value = bloomHash(flags);\n }\n if (value == null && !(flags & 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 let previousTView = null;\n let injectorIndex = getInjectorIndex(tNode, lView);\n let parentLocation = NO_PARENT_INJECTOR;\n let hostTElementNode = flags & 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 & InjectFlags.SkipSelf) {\n parentLocation = injectorIndex === -1 ? getParentInjectorLocation(tNode, lView) :\n lView[injectorIndex + 8 /* NodeInjectorOffset.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 const tView = lView[TVIEW];\n ngDevMode &&\n assertTNodeForLView(tView.data[injectorIndex + 8 /* NodeInjectorOffset.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 const instance = searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode);\n if (instance !== NOT_FOUND) {\n return instance;\n }\n }\n parentLocation = lView[injectorIndex + 8 /* NodeInjectorOffset.PARENT */];\n if (parentLocation !== NO_PARENT_INJECTOR &&\n shouldSearchParent(flags, lView[TVIEW].data[injectorIndex + 8 /* NodeInjectorOffset.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 return notFoundValue;\n}\nfunction searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode) {\n const currentTView = lView[TVIEW];\n const tNode = currentTView.data[injectorIndex + 8 /* NodeInjectorOffset.TNODE */];\n // First, we need to determine if view providers can be accessed by the starting element.\n // There are two possibilities\n const 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 /* TNodeType.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 const isHostSpecialCase = (flags & InjectFlags.Host) && hostTElementNode === tNode;\n const 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 */\nfunction locateDirectiveOrProvider(tNode, tView, token, canAccessViewProviders, isHostSpecialCase) {\n const nodeProviderIndexes = tNode.providerIndexes;\n const tInjectables = tView.data;\n const injectablesStart = nodeProviderIndexes & 1048575 /* TNodeProviderIndexes.ProvidersStartIndexMask */;\n const directivesStart = tNode.directiveStart;\n const directiveEnd = tNode.directiveEnd;\n const cptViewProvidersCount = nodeProviderIndexes >> 20 /* TNodeProviderIndexes.CptViewProvidersCountShift */;\n const startingIndex = canAccessViewProviders ? injectablesStart : injectablesStart + cptViewProvidersCount;\n // When the host special case applies, only the viewProviders and the component are visible\n const endIndex = isHostSpecialCase ? injectablesStart + cptViewProvidersCount : directiveEnd;\n for (let i = startingIndex; i < endIndex; i++) {\n const providerTokenOrDef = tInjectables[i];\n if (i < directivesStart && token === providerTokenOrDef ||\n i >= directivesStart && providerTokenOrDef.type === token) {\n return i;\n }\n }\n if (isHostSpecialCase) {\n const 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 */\nfunction getNodeInjectable(lView, tView, index, tNode) {\n let value = lView[index];\n const tData = tView.data;\n if (isFactory(value)) {\n const factory = value;\n if (factory.resolving) {\n throwCyclicDependencyError(stringifyForError(tData[index]));\n }\n const previousIncludeViewProviders = setIncludeViewProviders(factory.canSeeViewProviders);\n factory.resolving = true;\n let prevInjectContext;\n if (ngDevMode) {\n // tData indexes mirror the concrete instances in its corresponding LView.\n // lView[index] here is either the injectable instace itself or a factory,\n // therefore tData[index] is the constructor of that injectable or a\n // definition object that contains the constructor in a `.type` field.\n const token = tData[index].type || tData[index];\n const injector = new NodeInjector(tNode, lView);\n prevInjectContext = setInjectorProfilerContext({ injector, token });\n }\n const previousInjectImplementation = factory.injectImpl ? setInjectImplementation(factory.injectImpl) : null;\n const success = enterDI(lView, tNode, 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 ngDevMode && emitInstanceCreatedByInjectorEvent(value);\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 ngDevMode && setInjectorProfilerContext(prevInjectContext);\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 */\nfunction bloomHashBitOrFactory(token) {\n ngDevMode && assertDefined(token, 'token must be defined');\n if (typeof token === 'string') {\n return token.charCodeAt(0) || 0;\n }\n const 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 /* InjectorMarkers.Injector */, 'Expecting to get Special Injector Id');\n return createNodeInjector;\n }\n }\n else {\n return tokenId;\n }\n}\nfunction 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 const 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 const 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 */\nfunction shouldSearchParent(flags, isFirstHostTNode) {\n return !(flags & InjectFlags.Self) && !(flags & InjectFlags.Host && isFirstHostTNode);\n}\nfunction getNodeInjectorLView(nodeInjector) {\n return nodeInjector._lView;\n}\nfunction getNodeInjectorTNode(nodeInjector) {\n return nodeInjector._tNode;\n}\nclass NodeInjector {\n constructor(_tNode, _lView) {\n this._tNode = _tNode;\n this._lView = _lView;\n }\n get(token, notFoundValue, flags) {\n return getOrCreateInjectable(this._tNode, this._lView, token, convertToBitFlags(flags), notFoundValue);\n }\n}\n/** Creates a `NodeInjector` for the current node. */\nfunction createNodeInjector() {\n return new NodeInjector(getCurrentTNode(), getLView());\n}\n/**\n * @codeGenApi\n */\nfunction ɵɵgetInheritedFactory(type) {\n return noSideEffects(() => {\n const ownConstructor = type.prototype.constructor;\n const ownFactory = ownConstructor[NG_FACTORY_DEF] || getFactoryOf(ownConstructor);\n const objectPrototype = Object.prototype;\n let parent = Object.getPrototypeOf(type.prototype).constructor;\n // Go up the prototype until we hit `Object`.\n while (parent && parent !== objectPrototype) {\n const 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 (t) => new t();\n });\n}\nfunction getFactoryOf(type) {\n if (isForwardRef(type)) {\n return () => {\n const factory = getFactoryOf(resolveForwardRef(type));\n return factory && factory();\n };\n }\n return getFactoryDef(type);\n}\n/**\n * Returns a value from the closest embedded or node injector.\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 */\nfunction lookupTokenUsingEmbeddedInjector(tNode, lView, token, flags, notFoundValue) {\n let currentTNode = tNode;\n let currentLView = lView;\n // When an LView with an embedded view injector is inserted, it'll likely be interlaced with\n // nodes who may have injectors (e.g. node injector -> embedded view injector -> node injector).\n // Since the bloom filters for the node injectors have already been constructed and we don't\n // have a way of extracting the records from an injector, the only way to maintain the correct\n // hierarchy when resolving the value is to walk it node-by-node while attempting to resolve\n // the token at each level.\n while (currentTNode !== null && currentLView !== null &&\n (currentLView[FLAGS] & 2048 /* LViewFlags.HasEmbeddedViewInjector */) &&\n !(currentLView[FLAGS] & 512 /* LViewFlags.IsRoot */)) {\n ngDevMode && assertTNodeForLView(currentTNode, currentLView);\n // Note that this lookup on the node injector is using the `Self` flag, because\n // we don't want the node injector to look at any parent injectors since we\n // may hit the embedded view injector first.\n const nodeInjectorValue = lookupTokenUsingNodeInjector(currentTNode, currentLView, token, flags | InjectFlags.Self, NOT_FOUND);\n if (nodeInjectorValue !== NOT_FOUND) {\n return nodeInjectorValue;\n }\n // Has an explicit type due to a TS bug: https://github.com/microsoft/TypeScript/issues/33191\n let parentTNode = currentTNode.parent;\n // `TNode.parent` includes the parent within the current view only. If it doesn't exist,\n // it means that we've hit the view boundary and we need to go up to the next view.\n if (!parentTNode) {\n // Before we go to the next LView, check if the token exists on the current embedded injector.\n const embeddedViewInjector = currentLView[EMBEDDED_VIEW_INJECTOR];\n if (embeddedViewInjector) {\n const embeddedViewInjectorValue = embeddedViewInjector.get(token, NOT_FOUND, flags);\n if (embeddedViewInjectorValue !== NOT_FOUND) {\n return embeddedViewInjectorValue;\n }\n }\n // Otherwise keep going up the tree.\n parentTNode = getTNodeFromLView(currentLView);\n currentLView = currentLView[DECLARATION_VIEW];\n }\n currentTNode = parentTNode;\n }\n return notFoundValue;\n}\n/** Gets the TNode associated with an LView inside of the declaration view. */\nfunction getTNodeFromLView(lView) {\n const tView = lView[TVIEW];\n const tViewType = tView.type;\n // The parent pointer differs based on `TView.type`.\n if (tViewType === 2 /* TViewType.Embedded */) {\n ngDevMode && assertDefined(tView.declTNode, 'Embedded TNodes should have declaration parents.');\n return tView.declTNode;\n }\n else if (tViewType === 1 /* TViewType.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 return lView[T_HOST];\n }\n return null;\n}\n\n/**\n * Facade for the attribute injection from DI.\n *\n * @codeGenApi\n */\nfunction ɵɵinjectAttribute(attrNameToInject) {\n return injectAttributeImpl(getCurrentTNode(), attrNameToInject);\n}\n\n/**\n * Attribute decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Attribute = makeParamDecorator('Attribute', (attributeName) => ({ attributeName, __NG_ELEMENT_ID__: () => ɵɵinjectAttribute(attributeName) }));\n\nlet _reflect = null;\nfunction getReflect() {\n return (_reflect = _reflect || new ReflectionCapabilities());\n}\nfunction reflectDependencies(type) {\n return convertDependencies(getReflect().parameters(type));\n}\nfunction convertDependencies(deps) {\n return deps.map(dep => reflectDependency(dep));\n}\nfunction reflectDependency(dep) {\n const meta = {\n token: null,\n attribute: null,\n host: false,\n optional: false,\n self: false,\n skipSelf: false,\n };\n if (Array.isArray(dep) && dep.length > 0) {\n for (let j = 0; j < dep.length; j++) {\n const 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 const 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 RuntimeError(204 /* RuntimeErrorCode.INVALID_INJECTION_TOKEN */, ngDevMode && `Attribute name must be defined.`);\n }\n meta.attribute = param.attributeName;\n }\n else {\n meta.token = param;\n }\n }\n }\n else if (dep === undefined || (Array.isArray(dep) && dep.length === 0)) {\n meta.token = null;\n }\n else {\n meta.token = dep;\n }\n return meta;\n}\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 */\nfunction compileInjectable(type, meta) {\n let ngInjectableDef = null;\n let 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: () => {\n if (ngInjectableDef === null) {\n const compiler = getCompilerFacade({ usage: 0 /* JitCompilerUsage.Decorator */, kind: 'injectable', type });\n ngInjectableDef = compiler.compileInjectable(angularCoreDiEnv, `ng:///${type.name}/ɵprov.js`, getInjectableMetadata(type, meta));\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: () => {\n if (ngFactoryDef === null) {\n const compiler = getCompilerFacade({ usage: 0 /* JitCompilerUsage.Decorator */, kind: 'injectable', type });\n ngFactoryDef = compiler.compileFactory(angularCoreDiEnv, `ng:///${type.name}/ɵfac.js`, {\n name: type.name,\n type,\n typeArgumentCount: 0, // In JIT mode types are not available nor used.\n deps: reflectDependencies(type),\n target: compiler.FactoryTarget.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}\nconst USE_VALUE = getClosureSafeProperty({ provide: String, useValue: getClosureSafeProperty });\nfunction isUseClassProvider(meta) {\n return meta.useClass !== undefined;\n}\nfunction isUseValueProvider(meta) {\n return USE_VALUE in meta;\n}\nfunction isUseFactoryProvider(meta) {\n return meta.useFactory !== undefined;\n}\nfunction isUseExistingProvider(meta) {\n return meta.useExisting !== undefined;\n}\nfunction getInjectableMetadata(type, srcMeta) {\n // Allow the compilation of a class with a `@Injectable()` decorator without parameters\n const meta = srcMeta || { providedIn: null };\n const compilerMeta = {\n name: type.name,\n type: type,\n typeArgumentCount: 0,\n providedIn: meta.providedIn,\n };\n if ((isUseClassProvider(meta) || isUseFactoryProvider(meta)) && meta.deps !== undefined) {\n compilerMeta.deps = convertDependencies(meta.deps);\n }\n // Check to see if the user explicitly provided a `useXxxx` property.\n if (isUseClassProvider(meta)) {\n compilerMeta.useClass = meta.useClass;\n }\n else if (isUseValueProvider(meta)) {\n compilerMeta.useValue = meta.useValue;\n }\n else if (isUseFactoryProvider(meta)) {\n compilerMeta.useFactory = meta.useFactory;\n }\n else if (isUseExistingProvider(meta)) {\n compilerMeta.useExisting = meta.useExisting;\n }\n return compilerMeta;\n}\n\n/**\n * Injectable decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Injectable = makeDecorator('Injectable', undefined, undefined, undefined, (type, meta) => compileInjectable(type, meta));\n\n/**\n * Create a new `Injector` which is configured using a `defType` of `InjectorType`s.\n */\nfunction createInjector(defType, parent = null, additionalProviders = null, name) {\n const injector = createInjectorWithoutInjectorInstances(defType, parent, additionalProviders, name);\n injector.resolveInjectorInitializers();\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 */\nfunction createInjectorWithoutInjectorInstances(defType, parent = null, additionalProviders = null, name, scopes = new Set()) {\n const providers = [\n additionalProviders || EMPTY_ARRAY,\n importProvidersFrom(defType),\n ];\n name = name || (typeof defType === 'object' ? undefined : stringify(defType));\n return new R3Injector(providers, parent || getNullInjector(), name || null, scopes);\n}\n\n/**\n * Concrete injectors implement this interface. Injectors are configured\n * with [providers](guide/dependency-injection-providers) that associate\n * dependencies of various types with [injection tokens](guide/dependency-injection-providers).\n *\n * @see [DI Providers](guide/dependency-injection-providers).\n * @see {@link 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 */\nclass Injector {\n static { this.THROW_IF_NOT_FOUND = THROW_IF_NOT_FOUND; }\n static { this.NULL = ( /* @__PURE__ */new NullInjector()); }\n static create(options, parent) {\n if (Array.isArray(options)) {\n return createInjector({ name: '' }, parent, options, '');\n }\n else {\n const name = options.name ?? '';\n return createInjector({ name }, options.parent, options.providers, name);\n }\n }\n /** @nocollapse */\n static { this.ɵprov = ɵɵdefineInjectable({\n token: Injector,\n providedIn: 'any',\n factory: () => ɵɵinject(INJECTOR$1),\n }); }\n /**\n * @internal\n * @nocollapse\n */\n static { this.__NG_ELEMENT_ID__ = -1 /* InjectorMarkers.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/**\n * Creates a token that can be used to inject static attributes of the host node.\n *\n * @usageNotes\n * ### Injecting an attribute that is known to exist\n * ```typescript\n * @Directive()\n * class MyDir {\n * attr: string = inject(new HostAttributeToken('some-attr'));\n * }\n * ```\n *\n * ### Optionally injecting an attribute\n * ```typescript\n * @Directive()\n * class MyDir {\n * attr: string | null = inject(new HostAttributeToken('some-attr'), {optional: true});\n * }\n * ```\n * @publicApi\n */\nclass HostAttributeToken {\n constructor(attributeName) {\n this.attributeName = attributeName;\n /** @internal */\n this.__NG_ELEMENT_ID__ = () => ɵɵinjectAttribute(this.attributeName);\n }\n toString() {\n return `HostAttributeToken ${this.attributeName}`;\n }\n}\n\n/**\n * @module\n * @description\n * The `di` module provides dependency injection container services.\n */\n\n/**\n * This file should not be necessary because node resolution should just default to `./di/index`!\n *\n * However it does not seem to work and it breaks:\n * - //packages/animations/browser/test:test_web_chromium-local\n * - //packages/compiler-cli/test:extract_i18n\n * - //packages/compiler-cli/test:ngc\n * - //packages/compiler-cli/test:perform_watch\n * - //packages/compiler-cli/test/diagnostics:check_types\n * - //packages/compiler-cli/test/transformers:test\n * - //packages/compiler/test:test\n * - //tools/public_api_guard:core_api\n *\n * Remove this file once the above is solved or wait until `ngc` is deleted and then it should be\n * safe to delete this file.\n */\n\nconst ERROR_ORIGINAL_ERROR = 'ngOriginalError';\nfunction wrappedError(message, originalError) {\n const msg = `${message} caused by: ${originalError instanceof Error ? originalError.message : originalError}`;\n const error = Error(msg);\n error[ERROR_ORIGINAL_ERROR] = originalError;\n return error;\n}\nfunction getOriginalError(error) {\n return error[ERROR_ORIGINAL_ERROR];\n}\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 */\nclass ErrorHandler {\n constructor() {\n /**\n * @internal\n */\n this._console = console;\n }\n handleError(error) {\n const originalError = this._findOriginalError(error);\n this._console.error('ERROR', error);\n if (originalError) {\n this._console.error('ORIGINAL ERROR', originalError);\n }\n }\n /** @internal */\n _findOriginalError(error) {\n let e = error && getOriginalError(error);\n while (e && getOriginalError(e)) {\n e = getOriginalError(e);\n }\n return e || null;\n }\n}\n/**\n * `InjectionToken` used to configure how to call the `ErrorHandler`.\n *\n * `NgZone` is provided by default today so the default (and only) implementation for this\n * is calling `ErrorHandler.handleError` outside of the Angular zone.\n */\nconst INTERNAL_APPLICATION_ERROR_HANDLER = new InjectionToken((typeof ngDevMode === 'undefined' || ngDevMode) ? 'internal error handler' : '', {\n providedIn: 'root',\n factory: () => {\n const userErrorHandler = inject(ErrorHandler);\n return userErrorHandler.handleError.bind(undefined);\n }\n});\n\n/**\n * `DestroyRef` lets you set callbacks to run for any cleanup or destruction behavior.\n * The scope of this destruction depends on where `DestroyRef` is injected. If `DestroyRef`\n * is injected in a component or directive, the callbacks run when that component or\n * directive is destroyed. Otherwise the callbacks run when a corresponding injector is destroyed.\n *\n * @publicApi\n */\nclass DestroyRef {\n /**\n * @internal\n * @nocollapse\n */\n static { this.__NG_ELEMENT_ID__ = injectDestroyRef; }\n /**\n * @internal\n * @nocollapse\n */\n static { this.__NG_ENV_ID__ = (injector) => injector; }\n}\nclass NodeInjectorDestroyRef extends DestroyRef {\n constructor(_lView) {\n super();\n this._lView = _lView;\n }\n onDestroy(callback) {\n storeLViewOnDestroy(this._lView, callback);\n return () => removeLViewOnDestroy(this._lView, callback);\n }\n}\nfunction injectDestroyRef() {\n return new NodeInjectorDestroyRef(getLView());\n}\n\n/**\n * An `OutputEmitterRef` is created by the `output()` function and can be\n * used to emit values to consumers of your directive or component.\n *\n * Consumers of your directive/component can bind to the output and\n * subscribe to changes via the bound event syntax. For example:\n *\n * ```html\n * \n * ```\n *\n * @developerPreview\n */\nclass OutputEmitterRef {\n constructor() {\n this.destroyed = false;\n this.listeners = null;\n this.errorHandler = inject(ErrorHandler, { optional: true });\n /** @internal */\n this.destroyRef = inject(DestroyRef);\n // Clean-up all listeners and mark as destroyed upon destroy.\n this.destroyRef.onDestroy(() => {\n this.destroyed = true;\n this.listeners = null;\n });\n }\n subscribe(callback) {\n if (this.destroyed) {\n throw new RuntimeError(953 /* RuntimeErrorCode.OUTPUT_REF_DESTROYED */, ngDevMode &&\n 'Unexpected subscription to destroyed `OutputRef`. ' +\n 'The owning directive/component is destroyed.');\n }\n (this.listeners ??= []).push(callback);\n return {\n unsubscribe: () => {\n const idx = this.listeners?.indexOf(callback);\n if (idx !== undefined && idx !== -1) {\n this.listeners?.splice(idx, 1);\n }\n }\n };\n }\n /** Emits a new value to the output. */\n emit(value) {\n if (this.destroyed) {\n throw new RuntimeError(953 /* RuntimeErrorCode.OUTPUT_REF_DESTROYED */, ngDevMode &&\n 'Unexpected emit for destroyed `OutputRef`. ' +\n 'The owning directive/component is destroyed.');\n }\n if (this.listeners === null) {\n return;\n }\n const previousConsumer = setActiveConsumer$1(null);\n try {\n for (const listenerFn of this.listeners) {\n try {\n listenerFn(value);\n }\n catch (err) {\n this.errorHandler?.handleError(err);\n }\n }\n }\n finally {\n setActiveConsumer$1(previousConsumer);\n }\n }\n}\n/** Gets the owning `DestroyRef` for the given output. */\nfunction getOutputDestroyRef(ref) {\n return ref.destroyRef;\n}\n\n/**\n * The `output` function allows declaration of Angular outputs in\n * directives and components.\n *\n * You can use outputs to emit values to parent directives and component.\n * Parents can subscribe to changes via:\n *\n * - template event bindings. For example, `(myOutput)=\"doSomething($event)\"`\n * - programmatic subscription by using `OutputRef#subscribe`.\n *\n * @usageNotes\n *\n * To use `output()`, import the function from `@angular/core`.\n *\n * ```\n * import {output} from '@angular/core`;\n * ```\n *\n * Inside your component, introduce a new class member and initialize\n * it with a call to `output`.\n *\n * ```ts\n * @Directive({\n * ...\n * })\n * export class MyDir {\n * nameChange = output(); // OutputEmitterRef\n * onClick = output(); // OutputEmitterRef\n * }\n * ```\n *\n * You can emit values to consumers of your directive, by using\n * the `emit` method from `OutputEmitterRef`.\n *\n * ```ts\n * updateName(newName: string): void {\n * this.nameChange.emit(newName);\n * }\n * ```\n *\n * @developerPreview\n * @initializerApiFunction {\"showTypesInSignaturePreview\": true}\n */\nfunction output(opts) {\n ngDevMode && assertInInjectionContext(output);\n return new OutputEmitterRef();\n}\n\nfunction inputFunction(initialValue, opts) {\n ngDevMode && assertInInjectionContext(input);\n return createInputSignal(initialValue, opts);\n}\nfunction inputRequiredFunction(opts) {\n ngDevMode && assertInInjectionContext(input);\n return createInputSignal(REQUIRED_UNSET_VALUE, opts);\n}\n/**\n * The `input` function allows declaration of Angular inputs in directives\n * and components.\n *\n * There are two variants of inputs that can be declared:\n *\n * 1. **Optional inputs** with an initial value.\n * 2. **Required inputs** that consumers need to set.\n *\n * By default, the `input` function will declare optional inputs that\n * always have an initial value. Required inputs can be declared\n * using the `input.required()` function.\n *\n * Inputs are signals. The values of an input are exposed as a `Signal`.\n * The signal always holds the latest value of the input that is bound\n * from the parent.\n *\n * @usageNotes\n * To use signal-based inputs, import `input` from `@angular/core`.\n *\n * ```\n * import {input} from '@angular/core`;\n * ```\n *\n * Inside your component, introduce a new class member and initialize\n * it with a call to `input` or `input.required`.\n *\n * ```ts\n * @Component({\n * ...\n * })\n * export class UserProfileComponent {\n * firstName = input(); // Signal\n * lastName = input.required(); // Signal\n * age = input(0) // Signal\n * }\n * ```\n *\n * Inside your component template, you can display values of the inputs\n * by calling the signal.\n *\n * ```html\n * {{firstName()}}\n * ```\n *\n * @developerPreview\n * @initializerApiFunction\n */\nconst input = (() => {\n // Note: This may be considered a side-effect, but nothing will depend on\n // this assignment, unless this `input` constant export is accessed. It's a\n // self-contained side effect that is local to the user facing`input` export.\n inputFunction.required = inputRequiredFunction;\n return inputFunction;\n})();\n\n/**\n * Creates an ElementRef from the most recent node.\n *\n * @returns The ElementRef instance to use\n */\nfunction 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 */\nfunction createElementRef(tNode, lView) {\n return new ElementRef(getNativeByTNode(tNode, lView));\n}\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.\nclass ElementRef {\n constructor(nativeElement) {\n this.nativeElement = nativeElement;\n }\n /**\n * @internal\n * @nocollapse\n */\n static { this.__NG_ELEMENT_ID__ = injectElementRef; }\n}\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 */\nfunction unwrapElementRef(value) {\n return value instanceof ElementRef ? value.nativeElement : value;\n}\n\nclass EventEmitter_ extends Subject {\n constructor(isAsync = false) {\n super();\n this.destroyRef = undefined;\n this.__isAsync = isAsync;\n // Attempt to retrieve a `DestroyRef` optionally.\n // For backwards compatibility reasons, this cannot be required\n if (isInInjectionContext()) {\n this.destroyRef = inject(DestroyRef, { optional: true }) ?? undefined;\n }\n }\n emit(value) {\n const prevConsumer = setActiveConsumer$1(null);\n try {\n super.next(value);\n }\n finally {\n setActiveConsumer$1(prevConsumer);\n }\n }\n subscribe(observerOrNext, error, complete) {\n let nextFn = observerOrNext;\n let errorFn = error || (() => null);\n let completeFn = complete;\n if (observerOrNext && typeof observerOrNext === 'object') {\n const observer = observerOrNext;\n nextFn = observer.next?.bind(observer);\n errorFn = observer.error?.bind(observer);\n completeFn = observer.complete?.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 const sink = super.subscribe({ next: nextFn, error: errorFn, complete: completeFn });\n if (observerOrNext instanceof Subscription) {\n observerOrNext.add(sink);\n }\n return sink;\n }\n}\nfunction _wrapInTimeout(fn) {\n return (value) => {\n setTimeout(fn, undefined, value);\n };\n}\n/**\n * @publicApi\n */\nconst EventEmitter = EventEmitter_;\n\nfunction symbolIterator() {\n // @ts-expect-error accessing a private member\n return this._results[Symbol.iterator]();\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;\n * }\n * ```\n *\n * @publicApi\n */\nclass QueryList {\n static { Symbol.iterator; }\n /**\n * Returns `Observable` of `QueryList` notifying the subscriber of changes.\n */\n get changes() {\n return this._changes ??= new EventEmitter();\n }\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)\n */\n constructor(_emitDistinctChangesOnly = false) {\n this._emitDistinctChangesOnly = _emitDistinctChangesOnly;\n this.dirty = true;\n this._onDirty = undefined;\n this._results = [];\n this._changesDetected = false;\n this._changes = undefined;\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 // [Symbol.iterator](): Iterator { ... }\n const proto = QueryList.prototype;\n if (!proto[Symbol.iterator])\n proto[Symbol.iterator] = symbolIterator;\n }\n /**\n * Returns the QueryList entry at `index`.\n */\n get(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 map(fn) {\n return this._results.map(fn);\n }\n filter(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 find(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 reduce(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 forEach(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 some(fn) {\n return this._results.some(fn);\n }\n /**\n * Returns a copy of the internal results list as an Array.\n */\n toArray() {\n return this._results.slice();\n }\n toString() {\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 reset(resultsTree, identityAccessor) {\n this.dirty = false;\n const newResultFlat = flatten(resultsTree);\n if (this._changesDetected = !arrayEquals(this._results, newResultFlat, identityAccessor)) {\n this._results = newResultFlat;\n this.length = newResultFlat.length;\n this.last = newResultFlat[this.length - 1];\n this.first = newResultFlat[0];\n }\n }\n /**\n * Triggers a change event by emitting on the `changes` {@link EventEmitter}.\n */\n notifyOnChanges() {\n if (this._changes !== undefined && (this._changesDetected || !this._emitDistinctChangesOnly))\n this._changes.emit(this);\n }\n /** @internal */\n onDirty(cb) {\n this._onDirty = cb;\n }\n /** internal */\n setDirty() {\n this.dirty = true;\n this._onDirty?.();\n }\n /** internal */\n destroy() {\n if (this._changes !== undefined) {\n this._changes.complete();\n this._changes.unsubscribe();\n }\n }\n}\n\n/**\n * The name of an attribute that can be added to the hydration boundary node\n * (component host node) to disable hydration for the content within that boundary.\n */\nconst SKIP_HYDRATION_ATTR_NAME = 'ngSkipHydration';\n/** Lowercase name of the `ngSkipHydration` attribute used for case-insensitive comparisons. */\nconst SKIP_HYDRATION_ATTR_NAME_LOWER_CASE = 'ngskiphydration';\n/**\n * Helper function to check if a given TNode has the 'ngSkipHydration' attribute.\n */\nfunction hasSkipHydrationAttrOnTNode(tNode) {\n const attrs = tNode.mergedAttrs;\n if (attrs === null)\n return false;\n // only ever look at the attribute name and skip the values\n for (let i = 0; i < attrs.length; i += 2) {\n const value = attrs[i];\n // This is a marker, which means that the static attributes section is over,\n // so we can exit early.\n if (typeof value === 'number')\n return false;\n if (typeof value === 'string' && value.toLowerCase() === SKIP_HYDRATION_ATTR_NAME_LOWER_CASE) {\n return true;\n }\n }\n return false;\n}\n/**\n * Helper function to check if a given RElement has the 'ngSkipHydration' attribute.\n */\nfunction hasSkipHydrationAttrOnRElement(rNode) {\n return rNode.hasAttribute(SKIP_HYDRATION_ATTR_NAME);\n}\n/**\n * Checks whether a TNode has a flag to indicate that it's a part of\n * a skip hydration block.\n */\nfunction hasInSkipHydrationBlockFlag(tNode) {\n return (tNode.flags & 128 /* TNodeFlags.inSkipHydrationBlock */) === 128 /* TNodeFlags.inSkipHydrationBlock */;\n}\n/**\n * Helper function that determines if a given node is within a skip hydration block\n * by navigating up the TNode tree to see if any parent nodes have skip hydration\n * attribute.\n */\nfunction isInSkipHydrationBlock(tNode) {\n if (hasInSkipHydrationBlockFlag(tNode)) {\n return true;\n }\n let currentTNode = tNode.parent;\n while (currentTNode) {\n if (hasInSkipHydrationBlockFlag(tNode) || hasSkipHydrationAttrOnTNode(currentTNode)) {\n return true;\n }\n currentTNode = currentTNode.parent;\n }\n return false;\n}\n\n// Keeps track of the currently-active LViews.\nconst TRACKED_LVIEWS = new Map();\n// Used for generating unique IDs for LViews.\nlet uniqueIdCounter = 0;\n/** Gets a unique ID that can be assigned to an LView. */\nfunction getUniqueLViewId() {\n return uniqueIdCounter++;\n}\n/** Starts tracking an LView. */\nfunction registerLView(lView) {\n ngDevMode && assertNumber(lView[ID], 'LView must have an ID in order to be registered');\n TRACKED_LVIEWS.set(lView[ID], lView);\n}\n/** Gets an LView by its unique ID. */\nfunction getLViewById(id) {\n ngDevMode && assertNumber(id, 'ID used for LView lookup must be a number');\n return TRACKED_LVIEWS.get(id) || null;\n}\n/** Stops tracking an LView. */\nfunction unregisterLView(lView) {\n ngDevMode && assertNumber(lView[ID], 'Cannot stop tracking an LView that does not have an ID');\n TRACKED_LVIEWS.delete(lView[ID]);\n}\n\n/**\n * The internal view context which is specific to a given DOM element, directive or\n * component instance. Each value in here (besides the LView and element node details)\n * can be present, null or undefined. If undefined then it implies the value has not been\n * looked up yet, otherwise, if null, then a lookup was executed and nothing was found.\n *\n * Each value will get filled when the respective value is examined within the getContext\n * function. The component, element and each directive instance will share the same instance\n * of the context.\n */\nclass LContext {\n /** Component's parent view data. */\n get lView() {\n return getLViewById(this.lViewId);\n }\n constructor(\n /**\n * ID of the component's parent view data.\n */\n lViewId, \n /**\n * The index instance of the node.\n */\n nodeIndex, \n /**\n * The instance of the DOM node that is attached to the lNode.\n */\n native) {\n this.lViewId = lViewId;\n this.nodeIndex = nodeIndex;\n this.native = native;\n }\n}\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 */\nfunction getLContext(target) {\n let 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 (isLView(mpValue)) {\n const lView = mpValue;\n let nodeIndex;\n let component = undefined;\n let 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);\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 const native = unwrapRNode(lView[nodeIndex]);\n const existingCtx = readPatchedData(native);\n const 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 (let 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 const 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 let parent = rElement;\n while (parent = parent.parentNode) {\n const parentContext = readPatchedData(parent);\n if (parentContext) {\n const lView = Array.isArray(parentContext) ? parentContext : parentContext.lView;\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 const index = findViaNativeElement(lView, rElement);\n if (index >= 0) {\n const native = unwrapRNode(lView[index]);\n const 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 */\nfunction createLContext(lView, nodeIndex, native) {\n return new LContext(lView[ID], nodeIndex, native);\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 */\nfunction getComponentViewByInstance(componentInstance) {\n let patchedData = readPatchedData(componentInstance);\n let lView;\n if (isLView(patchedData)) {\n const contextLView = patchedData;\n const nodeIndex = findViaComponent(contextLView, componentInstance);\n lView = getComponentLViewByIndex(nodeIndex, contextLView);\n const context = createLContext(contextLView, nodeIndex, lView[HOST]);\n context.component = componentInstance;\n attachPatchData(componentInstance, context);\n attachPatchData(context.native, context);\n }\n else {\n const context = patchedData;\n const contextLView = context.lView;\n ngDevMode && assertLView(contextLView);\n lView = getComponentLViewByIndex(context.nodeIndex, contextLView);\n }\n return lView;\n}\n/**\n * This property will be monkey-patched on elements, components and directives.\n */\nconst MONKEY_PATCH_KEY_NAME = '__ngContext__';\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 */\nfunction attachPatchData(target, data) {\n ngDevMode && assertDefined(target, 'Target expected');\n // Only attach the ID of the view in order to avoid memory leaks (see #41047). We only do this\n // for `LView`, because we have control over when an `LView` is created and destroyed, whereas\n // we can't know when to remove an `LContext`.\n if (isLView(data)) {\n target[MONKEY_PATCH_KEY_NAME] = data[ID];\n registerLView(data);\n }\n else {\n target[MONKEY_PATCH_KEY_NAME] = data;\n }\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 */\nfunction readPatchedData(target) {\n ngDevMode && assertDefined(target, 'Target expected');\n const data = target[MONKEY_PATCH_KEY_NAME];\n return (typeof data === 'number') ? getLViewById(data) : data || null;\n}\nfunction readPatchedLView(target) {\n const value = readPatchedData(target);\n if (value) {\n return (isLView(value) ? value : value.lView);\n }\n return null;\n}\nfunction isComponentInstance(instance) {\n return instance && instance.constructor && instance.constructor.ɵcmp;\n}\nfunction 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 */\nfunction findViaNativeElement(lView, target) {\n const tView = lView[TVIEW];\n for (let 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 */\nfunction 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:
text
\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 */\nfunction findViaComponent(lView, componentInstance) {\n const componentIndices = lView[TVIEW].components;\n if (componentIndices) {\n for (let i = 0; i < componentIndices.length; i++) {\n const elementComponentIndex = componentIndices[i];\n const componentView = getComponentLViewByIndex(elementComponentIndex, lView);\n if (componentView[CONTEXT] === componentInstance) {\n return elementComponentIndex;\n }\n }\n }\n else {\n const rootComponentView = getComponentLViewByIndex(HEADER_OFFSET, lView);\n const 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 */\nfunction 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 let tNode = lView[TVIEW].firstChild;\n while (tNode) {\n const directiveIndexStart = tNode.directiveStart;\n const directiveIndexEnd = tNode.directiveEnd;\n for (let 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 applied to a node at a specific index. The list includes\n * directives matched by selector and any host directives, but it excludes components.\n * Use `getComponentAtNodeIndex` to find the component applied to a node.\n *\n * @param nodeIndex The node index\n * @param lView The target view data\n */\nfunction getDirectivesAtNodeIndex(nodeIndex, lView) {\n const tNode = lView[TVIEW].data[nodeIndex];\n if (tNode.directiveStart === 0)\n return EMPTY_ARRAY;\n const results = [];\n for (let i = tNode.directiveStart; i < tNode.directiveEnd; i++) {\n const directiveInstance = lView[i];\n if (!isComponentInstance(directiveInstance)) {\n results.push(directiveInstance);\n }\n }\n return results;\n}\nfunction getComponentAtNodeIndex(nodeIndex, lView) {\n const tNode = lView[TVIEW].data[nodeIndex];\n const { directiveStart, componentOffset } = tNode;\n return componentOffset > -1 ? lView[directiveStart + componentOffset] : 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 */\nfunction discoverLocalRefs(lView, nodeIndex) {\n const tNode = lView[TVIEW].data[nodeIndex];\n if (tNode && tNode.localNames) {\n const result = {};\n let localIndex = tNode.index + 1;\n for (let 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 * 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 */\nfunction getRootView(componentOrLView) {\n ngDevMode && assertDefined(componentOrLView, 'component');\n let lView = isLView(componentOrLView) ? componentOrLView : readPatchedLView(componentOrLView);\n while (lView && !(lView[FLAGS] & 512 /* LViewFlags.IsRoot */)) {\n lView = getLViewParent(lView);\n }\n ngDevMode && assertLView(lView);\n return lView;\n}\n/**\n * Returns the context information associated with the application where the target is situated. It\n * does this by walking the parent views until it gets to the root view, then getting the context\n * off of that.\n *\n * @param viewOrComponent the `LView` or component to get the root context for.\n */\nfunction getRootContext(viewOrComponent) {\n const rootView = getRootView(viewOrComponent);\n ngDevMode &&\n assertDefined(rootView[CONTEXT], 'Root view 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 */\nfunction getFirstLContainer(lView) {\n return getNearestLContainer(lView[CHILD_HEAD]);\n}\n/**\n * Gets the next `LContainer` that is a sibling of the given container.\n */\nfunction getNextLContainer(container) {\n return getNearestLContainer(container[NEXT]);\n}\nfunction getNearestLContainer(viewOrContainer) {\n while (viewOrContainer !== null && !isLContainer(viewOrContainer)) {\n viewOrContainer = viewOrContainer[NEXT];\n }\n return viewOrContainer;\n}\n\n/**\n * Retrieves the component instance associated with a given DOM element.\n *\n * @usageNotes\n * Given the following DOM structure:\n *\n * ```html\n * \n *
\n * \n *
\n *
\n * ```\n *\n * Calling `getComponent` on `` will return the instance of `ChildComponent`\n * associated with this DOM element.\n *\n * Calling the function on `` 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 */\nfunction getComponent$1(element) {\n ngDevMode && assertDomElement(element);\n const context = getLContext(element);\n if (context === null)\n return null;\n if (context.component === undefined) {\n const lView = context.lView;\n if (lView === null) {\n return null;\n }\n context.component = getComponentAtNodeIndex(context.nodeIndex, 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 */\nfunction getContext(element) {\n assertDomElement(element);\n const context = getLContext(element);\n const lView = context ? context.lView : null;\n return lView === null ? null : lView[CONTEXT];\n}\n/**\n * Retrieves the component instance whose view contains the DOM element.\n *\n * For example, if `` is used in the template of ``\n * (i.e. a `ViewChild` of ``), calling `getOwningComponent` on ``\n * would return ``.\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 */\nfunction getOwningComponent(elementOrDir) {\n const context = getLContext(elementOrDir);\n let lView = context ? context.lView : null;\n if (lView === null)\n return null;\n let parent;\n while (lView[TVIEW].type === 2 /* TViewType.Embedded */ && (parent = getLViewParent(lView))) {\n lView = parent;\n }\n return lView[FLAGS] & 512 /* LViewFlags.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 */\nfunction getRootComponents(elementOrDir) {\n const lView = readPatchedLView(elementOrDir);\n return lView !== null ? [getRootContext(lView)] : [];\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 */\nfunction getInjector(elementOrDir) {\n const context = getLContext(elementOrDir);\n const lView = context ? context.lView : null;\n if (lView === null)\n return Injector.NULL;\n const tNode = lView[TVIEW].data[context.nodeIndex];\n return new NodeInjector(tNode, 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 */\nfunction getInjectionTokens(element) {\n const context = getLContext(element);\n const lView = context ? context.lView : null;\n if (lView === null)\n return [];\n const tView = lView[TVIEW];\n const tNode = tView.data[context.nodeIndex];\n const providerTokens = [];\n const startIndex = tNode.providerIndexes & 1048575 /* TNodeProviderIndexes.ProvidersStartIndexMask */;\n const endIndex = tNode.directiveEnd;\n for (let i = startIndex; i < endIndex; i++) {\n let 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 node. Does not include\n * component instances.\n *\n * @usageNotes\n * Given the following DOM structure:\n *\n * ```html\n * \n * \n * \n * \n * ```\n *\n * Calling `getDirectives` on `