@angular/core 6.0.3 → 6.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (233) hide show
  1. package/bundles/core-testing.umd.js +61 -237
  2. package/bundles/core-testing.umd.js.map +1 -1
  3. package/bundles/core-testing.umd.min.js +11 -4
  4. package/bundles/core-testing.umd.min.js.map +1 -1
  5. package/bundles/core.umd.js +591 -2007
  6. package/bundles/core.umd.js.map +1 -1
  7. package/bundles/core.umd.min.js +4 -32
  8. package/bundles/core.umd.min.js.map +1 -1
  9. package/core.metadata.json +1 -1
  10. package/esm2015/core.externs.js +3 -3
  11. package/esm2015/src/application_init.js +2 -9
  12. package/esm2015/src/application_module.js +1 -10
  13. package/esm2015/src/application_ref.js +15 -30
  14. package/esm2015/src/change_detection/change_detector_ref.js +7 -5
  15. package/esm2015/src/change_detection/differs/iterable_differs.js +4 -3
  16. package/esm2015/src/change_detection/differs/keyvalue_differs.js +4 -3
  17. package/esm2015/src/change_detection/pipe_transform.js +3 -6
  18. package/esm2015/src/console.js +0 -11
  19. package/esm2015/src/di/forward_ref.js +8 -6
  20. package/esm2015/src/di/injectable.js +1 -4
  21. package/esm2015/src/di/injection_token.js +6 -8
  22. package/esm2015/src/di/injector.js +5 -10
  23. package/esm2015/src/di/metadata.js +1 -16
  24. package/esm2015/src/di/provider.js +47 -138
  25. package/esm2015/src/di/reflective_errors.js +14 -7
  26. package/esm2015/src/di/reflective_injector.js +22 -24
  27. package/esm2015/src/di/reflective_provider.js +11 -12
  28. package/esm2015/src/error_handler.js +2 -5
  29. package/esm2015/src/event_emitter.js +6 -3
  30. package/esm2015/src/i18n/tokens.js +7 -4
  31. package/esm2015/src/linker/compiler.js +1 -12
  32. package/esm2015/src/linker/query_list.js +4 -4
  33. package/esm2015/src/linker/system_js_ng_module_factory_loader.js +3 -10
  34. package/esm2015/src/linker/view_ref.js +10 -7
  35. package/esm2015/src/metadata/di.js +10 -16
  36. package/esm2015/src/metadata/directives.js +111 -33
  37. package/esm2015/src/metadata/lifecycle_hooks.js +9 -9
  38. package/esm2015/src/metadata/ng_module.js +19 -11
  39. package/esm2015/src/render3/node_manipulation.js +2 -3
  40. package/esm2015/src/render3/view_ref.js +7 -3
  41. package/esm2015/src/testability/testability.js +2 -16
  42. package/esm2015/src/version.js +1 -1
  43. package/esm2015/src/view/ng_module.js +4 -1
  44. package/esm2015/src/zone/ng_zone.js +2 -1
  45. package/esm2015/testing/src/fake_async.js +5 -3
  46. package/esm2015/testing/src/fake_async_fallback.js +5 -3
  47. package/esm2015/testing/src/logger.js +0 -7
  48. package/esm2015/testing/src/metadata_override.js +1 -1
  49. package/esm2015/testing/src/ng_zone_mock.js +0 -7
  50. package/esm2015/testing/src/test_bed.js +1 -34
  51. package/esm2015/testing/src/test_compiler.js +1 -12
  52. package/esm5/index.js +5 -1
  53. package/esm5/public_api.js +6 -1
  54. package/esm5/src/application_init.js +3 -5
  55. package/esm5/src/application_module.js +2 -2
  56. package/esm5/src/application_ref.js +35 -211
  57. package/esm5/src/application_tokens.js +1 -1
  58. package/esm5/src/change_detection/change_detection.js +1 -1
  59. package/esm5/src/change_detection/change_detection_util.js +7 -72
  60. package/esm5/src/change_detection/change_detector_ref.js +1 -1
  61. package/esm5/src/change_detection/constants.js +1 -24
  62. package/esm5/src/change_detection/differs/default_iterable_differ.js +26 -209
  63. package/esm5/src/change_detection/differs/default_keyvalue_differ.js +7 -38
  64. package/esm5/src/change_detection/differs/iterable_differs.js +5 -42
  65. package/esm5/src/change_detection/differs/keyvalue_differs.js +6 -51
  66. package/esm5/src/change_detection/pipe_transform.js +1 -1
  67. package/esm5/src/change_detection.js +6 -1
  68. package/esm5/src/codegen_private_exports.js +1 -1
  69. package/esm5/src/console.js +2 -7
  70. package/esm5/src/core.js +6 -1
  71. package/esm5/src/core_private_export.js +1 -1
  72. package/esm5/src/core_render3_private_export.js +2 -1
  73. package/esm5/src/debug/debug_node.js +3 -15
  74. package/esm5/src/di/defs.js +1 -1
  75. package/esm5/src/di/forward_ref.js +7 -6
  76. package/esm5/src/di/injectable.js +2 -3
  77. package/esm5/src/di/injection_token.js +5 -83
  78. package/esm5/src/di/injector.js +13 -27
  79. package/esm5/src/di/metadata.js +1 -6
  80. package/esm5/src/di/provider.js +1 -1
  81. package/esm5/src/di/r3_injector.js +13 -39
  82. package/esm5/src/di/reflective_errors.js +14 -7
  83. package/esm5/src/di/reflective_injector.js +19 -265
  84. package/esm5/src/di/reflective_key.js +4 -45
  85. package/esm5/src/di/reflective_provider.js +17 -35
  86. package/esm5/src/di/scope.js +1 -1
  87. package/esm5/src/di.js +6 -1
  88. package/esm5/src/error_handler.js +7 -66
  89. package/esm5/src/errors.js +1 -1
  90. package/esm5/src/event_emitter.js +4 -95
  91. package/esm5/src/i18n/tokens.js +9 -49
  92. package/esm5/src/linker/compiler.js +9 -69
  93. package/esm5/src/linker/component_factory.js +2 -18
  94. package/esm5/src/linker/component_factory_resolver.js +1 -1
  95. package/esm5/src/linker/element_ref.js +2 -32
  96. package/esm5/src/linker/ng_module_factory.js +3 -25
  97. package/esm5/src/linker/ng_module_factory_loader.js +2 -10
  98. package/esm5/src/linker/query_list.js +12 -112
  99. package/esm5/src/linker/system_js_ng_module_factory_loader.js +4 -16
  100. package/esm5/src/linker/template_ref.js +2 -26
  101. package/esm5/src/linker/view_container_ref.js +2 -38
  102. package/esm5/src/linker/view_ref.js +10 -115
  103. package/esm5/src/linker.js +2 -1
  104. package/esm5/src/metadata/di.js +7 -25
  105. package/esm5/src/metadata/directives.js +111 -20
  106. package/esm5/src/metadata/lifecycle_hooks.js +1 -1
  107. package/esm5/src/metadata/ng_module.js +14 -9
  108. package/esm5/src/metadata/view.js +1 -20
  109. package/esm5/src/metadata.js +1 -1
  110. package/esm5/src/platform_core_providers.js +1 -1
  111. package/esm5/src/profile/profile.js +1 -1
  112. package/esm5/src/profile/wtf_impl.js +1 -1
  113. package/esm5/src/reflection/platform_reflection_capabilities.js +1 -1
  114. package/esm5/src/reflection/reflection.js +1 -1
  115. package/esm5/src/reflection/reflection_capabilities.js +3 -8
  116. package/esm5/src/reflection/reflector.js +2 -10
  117. package/esm5/src/reflection/types.js +1 -1
  118. package/esm5/src/render/api.js +7 -71
  119. package/esm5/src/render.js +2 -1
  120. package/esm5/src/render3/assert.js +1 -1
  121. package/esm5/src/render3/component.js +6 -5
  122. package/esm5/src/render3/definition.js +6 -8
  123. package/esm5/src/render3/di.js +9 -14
  124. package/esm5/src/render3/errors.js +1 -1
  125. package/esm5/src/render3/hooks.js +2 -2
  126. package/esm5/src/render3/index.js +11 -1
  127. package/esm5/src/render3/instructions.js +52 -38
  128. package/esm5/src/render3/interfaces/container.js +1 -1
  129. package/esm5/src/render3/interfaces/definition.js +1 -1
  130. package/esm5/src/render3/interfaces/injector.js +1 -1
  131. package/esm5/src/render3/interfaces/node.js +1 -1
  132. package/esm5/src/render3/interfaces/projection.js +1 -1
  133. package/esm5/src/render3/interfaces/query.js +1 -1
  134. package/esm5/src/render3/interfaces/renderer.js +1 -3
  135. package/esm5/src/render3/interfaces/view.js +1 -1
  136. package/esm5/src/render3/ng_dev_mode.js +1 -1
  137. package/esm5/src/render3/node_assert.js +1 -1
  138. package/esm5/src/render3/node_manipulation.js +12 -15
  139. package/esm5/src/render3/node_selector_matcher.js +2 -2
  140. package/esm5/src/render3/pipe.js +1 -1
  141. package/esm5/src/render3/pure_function.js +1 -1
  142. package/esm5/src/render3/query.js +11 -59
  143. package/esm5/src/render3/util.js +1 -1
  144. package/esm5/src/render3/view_ref.js +15 -345
  145. package/esm5/src/sanitization/html_sanitizer.js +8 -12
  146. package/esm5/src/sanitization/inert_body.js +8 -72
  147. package/esm5/src/sanitization/sanitization.js +1 -1
  148. package/esm5/src/sanitization/security.js +2 -37
  149. package/esm5/src/sanitization/style_sanitizer.js +1 -1
  150. package/esm5/src/sanitization/url_sanitizer.js +1 -1
  151. package/esm5/src/testability/testability.js +21 -143
  152. package/esm5/src/type.js +1 -1
  153. package/esm5/src/util/decorators.js +1 -1
  154. package/esm5/src/util/lang.js +1 -1
  155. package/esm5/src/util/property.js +1 -1
  156. package/esm5/src/util.js +6 -1
  157. package/esm5/src/version.js +3 -13
  158. package/esm5/src/view/element.js +7 -7
  159. package/esm5/src/view/entrypoint.js +1 -1
  160. package/esm5/src/view/errors.js +1 -1
  161. package/esm5/src/view/index.js +1 -1
  162. package/esm5/src/view/ng_content.js +1 -1
  163. package/esm5/src/view/ng_module.js +4 -1
  164. package/esm5/src/view/provider.js +12 -12
  165. package/esm5/src/view/pure_expression.js +1 -1
  166. package/esm5/src/view/query.js +6 -6
  167. package/esm5/src/view/refs.js +8 -14
  168. package/esm5/src/view/services.js +16 -20
  169. package/esm5/src/view/text.js +1 -1
  170. package/esm5/src/view/types.js +19 -41
  171. package/esm5/src/view/util.js +5 -5
  172. package/esm5/src/view/view.js +4 -6
  173. package/esm5/src/view/view_attach.js +5 -5
  174. package/esm5/src/zone/ng_zone.js +22 -257
  175. package/esm5/src/zone.js +2 -1
  176. package/esm5/testing/index.js +5 -1
  177. package/esm5/testing/public_api.js +6 -1
  178. package/esm5/testing/src/async.js +1 -1
  179. package/esm5/testing/src/async_fallback.js +1 -1
  180. package/esm5/testing/src/async_test_completer.js +2 -8
  181. package/esm5/testing/src/before_each.js +6 -1
  182. package/esm5/testing/src/component_fixture.js +9 -75
  183. package/esm5/testing/src/fake_async.js +12 -3
  184. package/esm5/testing/src/fake_async_fallback.js +5 -3
  185. package/esm5/testing/src/lang_utils.js +1 -1
  186. package/esm5/testing/src/logger.js +1 -1
  187. package/esm5/testing/src/metadata_override.js +1 -1
  188. package/esm5/testing/src/ng_zone_mock.js +1 -1
  189. package/esm5/testing/src/private_export_testing.js +1 -1
  190. package/esm5/testing/src/render3.js +1 -5
  191. package/esm5/testing/src/test_bed.js +20 -172
  192. package/esm5/testing/src/test_compiler.js +5 -43
  193. package/esm5/testing/src/testing.js +6 -1
  194. package/esm5/testing/src/testing_internal.js +3 -9
  195. package/fesm2015/core.js +248 -177
  196. package/fesm2015/core.js.map +1 -1
  197. package/fesm2015/testing.js +9 -13
  198. package/fesm2015/testing.js.map +1 -1
  199. package/fesm5/core.js +591 -2007
  200. package/fesm5/core.js.map +1 -1
  201. package/fesm5/testing.js +61 -237
  202. package/fesm5/testing.js.map +1 -1
  203. package/package.json +1 -1
  204. package/src/application_ref.d.ts +7 -8
  205. package/src/change_detection/change_detector_ref.d.ts +6 -4
  206. package/src/change_detection/differs/iterable_differs.d.ts +3 -2
  207. package/src/change_detection/differs/keyvalue_differs.d.ts +3 -2
  208. package/src/change_detection/pipe_transform.d.ts +2 -5
  209. package/src/di/forward_ref.d.ts +7 -5
  210. package/src/di/injectable.d.ts +4 -14
  211. package/src/di/injection_token.d.ts +5 -7
  212. package/src/di/injector.d.ts +7 -10
  213. package/src/di/metadata.d.ts +13 -86
  214. package/src/di/provider.d.ts +55 -150
  215. package/src/di/reflective_errors.d.ts +13 -6
  216. package/src/di/reflective_injector.d.ts +21 -23
  217. package/src/di/reflective_provider.d.ts +7 -8
  218. package/src/error_handler.d.ts +1 -4
  219. package/src/event_emitter.d.ts +3 -0
  220. package/src/i18n/tokens.d.ts +8 -4
  221. package/src/linker/query_list.d.ts +2 -2
  222. package/src/linker/view_ref.d.ts +9 -6
  223. package/src/metadata/di.d.ts +41 -59
  224. package/src/metadata/directives.d.ts +410 -460
  225. package/src/metadata/lifecycle_hooks.d.ts +8 -8
  226. package/src/metadata/ng_module.d.ts +49 -38
  227. package/src/render3/view_ref.d.ts +6 -2
  228. package/src/zone/ng_zone.d.ts +1 -0
  229. package/testing/src/fake_async.d.ts +4 -2
  230. package/testing/src/fake_async_fallback.d.ts +4 -2
  231. package/testing/src/metadata_override.d.ts +3 -3
  232. package/testing.d.ts +0 -5
  233. package/testing.metadata.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/core/core.umd.js"],"names":["global","factory","exports","module","require","define","amd","ng","core","rxjs","operators","this","extendStatics","Object","setPrototypeOf","__proto__","Array","d","b","p","hasOwnProperty","__extends","__","constructor","prototype","create","__assign","assign","t","s","i","n","arguments","length","call","__values","o","m","Symbol","iterator","next","value","done","__read","r","e","ar","push","error","__spread","concat","defineInjectable","opts","providedIn","undefined","defineInjector","options","providers","imports","InjectionToken","_desc","ngMetadataName","ngInjectableDef","toString","ANNOTATIONS","PARAMETERS","PROP_METADATA","makeDecorator","name","props","parentClass","chainFn","typeFn","metaCtor","makeMetadataCtor","DecoratorFactory","args","_i","apply","_a","annotationInstance","bind","TypeDecorator","cls","defineProperty","annotationCls","ctor","values","propName","makeParamDecorator","ParamDecoratorFactory","ParamDecorator","annotation","unusedKey","index","parameters","makePropDecorator","PropDecoratorFactory","decoratorInstance","PropDecorator","target","meta","unshift","ChangeDetectionStrategy","ChangeDetectorStatus","Query","ANALYZE_FOR_ENTRY_COMPONENTS","Attribute","attributeName","ContentChildren","selector","data","first","isViewQuery","descendants","ContentChild","ViewChildren","ViewChild","ɵChangeDetectorStatus","Directive","dir","Component","c","changeDetection","Default","Pipe","pure","Input","bindingPropertyName","Output","HostBinding","hostPropertyName","HostListener","eventName","Type","Function","isType","v","__window","window","__self","self","WorkerGlobalScope","__global","_global","promise","Promise","resolve","_symbolIterator","getSymbolIterator","Symbol_1","keys","getOwnPropertyNames","Map","key","scheduleMicroTask","fn","Zone","then","current","looseIdentical","a","isNaN","stringify","token","map","join","overriddenName","res","newLineIndex","indexOf","substring","DELEGATE_CTOR","INHERITED_CLASS","INHERITED_CLASS_WITH_CTOR","ReflectionCapabilities","reflect","_reflect","isReflectionEnabled","_zipTypesAndAnnotations","paramTypes","paramAnnotations","result","_ownParameters","type","parentCtor","typeStr","exec","tsickleCtorParams","ctorParameters","paramTypes_1","ctorParam","paramAnnotations_1","convertTsickleDecoratorIntoMetadata","decorators","getOwnMetadata","fill","getParentCtor","_ownAnnotations","typeOrFunc","annotations","ownAnnotations","_ownPropMetadata","propMetadata","propDecorators","propDecorators_1","propMetadata_1","forEach","prop","parentPropMetadata_1","ownPropMetadata","hasLifecycleHook","lcProperty","guards","getter","setter","method","importUri","resourceUri","resolveIdentifier","moduleUrl","members","runtime","resolveEnum","enumIdentifier","decoratorInvocations","decoratorInvocation","parentProto","getPrototypeOf","forwardRef","forwardRefFn","__forward_ref__","resolveForwardRef","Inject","Optional","Self","SkipSelf","Host","SOURCE","_THROW_IF_NOT_FOUND","THROW_IF_NOT_FOUND","INJECTOR","NullInjector","get","notFoundValue","Error","Injector","parent","isArray","StaticInjector","NULL","inject","IDENT","EMPTY","CIRCULAR","MULTI_PROVIDER_FN","slice","GET_PROPERTY_NAME$1","USE_VALUE$1","getClosureSafeProperty$1","objWithPropertyToExtract","provide","String","useValue","NULL_INJECTOR","NEW_LINE","NO_NEW_LINE","source","records","_records","set","deps","useNew","recursivelyProcessProviders","provider","staticError","resolvedProvider","resolveProvider","computeDeps","providerDeps","j","useExisting","useFactory","useClass","multi","multiProvider","multiProviderMixError","record","flags","tryResolveToken","resolveToken","depRecords","depRecord","childRecord","tokenPath","message","formatError","tokens","text","obj","charAt","substr","context","parts","JSON","replace","_currentInjector","setCurrentInjector","injector","former","injectableDef","injectArgs","types","arg","GET_PROPERTY_NAME","USE_VALUE","getClosureSafeProperty","EMPTY_ARRAY","convertInjectableProviderToFactory","deps_1","reflectionCapabilities","valueProvider_1","existingProvider_1","factoryProvider_1","classProvider_1","deps_2","deps_3","ViewEncapsulation","Injectable","injectableType","NgModule","ngModule","moduleType","metadata","ngInjectorDef","Version","VERSION","full","major","split","minor","patch","ERROR_DEBUG_CONTEXT","ERROR_ORIGINAL_ERROR","ERROR_LOGGER","getDebugContext","getOriginalError","defaultErrorLogger","console","ErrorHandler","_console","handleError","originalError","_findOriginalError","_findContext","errorLogger","getErrorLogger","constructResolvingPath","findFirstClosedCycle","reverse","k","injectionError","constructResolvingMessage","errMsg","wrappedError","msg","addKey","injectors","noAnnotationError","params","signature","ii","parameter","ReflectiveKey","id","displayName","_globalKeyRegistry","numberOfKeys","enumerable","configurable","KeyRegistry","_allKeys","has","newKey","size","reflector","Reflector","updateCapabilities","caps","identifier","ReflectiveDependency","optional","visibility","fromKey","_EMPTY_LIST","ResolvedReflectiveProvider_","resolvedFactories","resolvedFactory","ResolvedReflectiveFactory","dependencies","resolveReflectiveProvider","resolveReflectiveFactory","factoryFn","resolvedDeps","_dependenciesFor","aliasInstance","constructDependencies","params_1","_extractToken","resolveReflectiveProviders","resolvedProviderMap","mergeResolvedReflectiveProviders","normalizedProvidersMap","existing","_normalizeProviders","invalidProviderError","from","some","_createDependency","paramMetadata","UNDEFINED","ReflectiveInjector","resolveAndCreate","ResolvedReflectiveProviders","fromResolvedProviders","ReflectiveInjector_","_providers","_parent","_constructionCounter","len","keyIds","objs","_getByKey","resolveAndCreateChild","createChildFromResolved","inj","resolveAndInstantiate","instantiateResolved","_instantiateProvider","getProviderAtIndex","outOfBoundsError","_new","_getMaxNumberOfObjects","cyclicDependencyError","_instantiate","ResolvedReflectiveFactory$$1","_this","dep","_getByReflectiveDependency","instantiationError","originalException","originalStack","INJECTOR_KEY","_getByKeySelf","_getByKeyDefault","_getObjByKeyId","keyId","_throwOrNull","noProviderError","inj_","_mapProviders","APP_ROOT","NOT_YET","CIRCULAR$1","EMPTY_ARRAY$1","NULL_INJECTOR$1","getNullInjector","R3Injector","def","injectorDefTypes","Set","onDestroy","destroyed","deepForEach","injectorDef","processInjectorType","makeRecord","isRootInjector","defType","destroy","assertNotDestroyed","service","ngOnDestroy","clear","previousInjector","couldBeInjectableType","injectableDefInScope","injectableDefRecord","hydrate","defOrWrappedDef","parents","add","imported","delete","processProvider","isTypeProvider","providerToRecord","isValueProvider","isExistingProvider","isFactoryProvider","classRef_1","hasDeps","multiRecord_1","hasOnDestroy","input","isPromise","APP_INITIALIZER","ApplicationInitStatus","appInits","initialized","donePromise","rej","reject","runInitializers","asyncInitPromises","complete","initResult","all","catch","APP_ID","_appIdRandomProviderFactory","_randomChar","APP_ID_RANDOM_PROVIDER","fromCharCode","Math","floor","random","PLATFORM_INITIALIZER","PLATFORM_ID","APP_BOOTSTRAP_LISTENER","PACKAGE_ROOT_URL","Console","log","warn","ModuleWithComponentFactories","ngModuleFactory","componentFactories","_throwError","Compiler","compileModuleSync","compileModuleAsync","compileModuleAndAllComponentsSync","compileModuleAndAllComponentsAsync","clearCache","clearCacheFor","COMPILER_OPTIONS","CompilerFactory","ComponentRef","ComponentFactory","noComponentFactoryError","component","ERROR_COMPONENT","trace","events","_NullComponentFactoryResolver","resolveComponentFactory","ComponentFactoryResolver","CodegenComponentFactoryResolver","factories","_ngModule","_factories","componentType","ComponentFactoryBoundToModule","_super","ngContentSelectors","inputs","outputs","projectableNodes","rootSelectorOrNode","NgModuleRef","NgModuleFactory","detectWTF","wtf","createScope","leave","scope","returnValue","leaveScope","startTimeRange","rangeType","action","beginTimeRange","endTimeRange","range","wtfEnabled","noopScope","arg0","arg1","wtfCreateScope","wtfLeave","wtfStartTimeRange","wtfEndTimeRange","EventEmitter","isAsync","__isAsync","emit","subscribe","generatorOrNext","schedulerFn","errorFn","err","completeFn","setTimeout","sink","Subscription","Subject","NgZone","_b","enableLongStackTrace","hasPendingMicrotasks","hasPendingMacrotasks","isStable","onUnstable","onMicrotaskEmpty","onStable","onError","assertZonePatched","_nesting","_outer","_inner","fork","forkInnerZoneWithAngularBehavior","zone","properties","isAngularZone","onInvokeTask","delegate","task","applyThis","applyArgs","onEnter","invokeTask","onLeave","onInvoke","callback","invoke","onHasTask","hasTaskState","hasTask","change","microTask","checkStable","macroTask","onHandleError","runOutsideAngular","isInAngularZone","assertInAngularZone","assertNotInAngularZone","run","runTask","scheduleEventTask","EMPTY_PAYLOAD","noop","cancelTask","runGuarded","_platform","NoopNgZone","Testability","_ngZone","_pendingCount","_isZoneStable","_didWork","_callbacks","_watchAngularEvents","taskTrackingZone","_runCallbacksIfReady","increasePendingRequestCount","decreasePendingRequestCount","cb","pop","clearTimeout","timeoutId","doneCb","pending_1","getPendingTasks","filter","updateCb","macroTasks","isPeriodic","delay","creationLocation","xhr","addCallback","timeout","whenStable","getPendingRequestCount","findProviders","using","exactMatch","TestabilityRegistry","_applications","_testabilityGetter","addToWindow","registerApplication","testability","unregisterApplication","unregisterAllApplications","getTestability","elem","getAllTestabilities","getAllRootElements","findTestabilityInTree","findInAncestors","_NoopGetTestability","registry","_devMode","_runModeLocked","ALLOW_MULTIPLE_PLATFORMS","isDevMode","NgProbeToken","createPlatform","PlatformRef","inits","init","createPlatformFactory","parentPlatformFactory","desc","marker","extraProviders","platform","getPlatform","injectedProviders","assertPlatform","requiredToken","_injector","_modules","_destroyListeners","_destroyed","bootstrapModuleFactory","moduleFactory","ngZone","getNgZone","ngZoneOption","ngZoneInjector","moduleRef","exceptionHandler","remove","_callAndReportToErrorHandler","errorHandler","initStatus","_moduleDoBootstrap","bootstrapModule","compilerOptions","compilerFactory","optionsReducer","createCompiler","appRef","ApplicationRef","_bootstrapComponents","f","bootstrap","instance","ngDoBootstrap","listener","dst","reduce","_zone","_exceptionHandler","_componentFactoryResolver","_initStatus","_bootstrapListeners","_views","_runningTick","_enforceNoNewChanges","_stable","componentTypes","components","tick","isCurrentlyStable","Observable","observer","stableSub","unstableSub","unsubscribe","merge","pipe","share","componentOrFactory","componentFactory","compRef","_unloadComponent","location","nativeElement","_loadComponent","_tickScope","view","detectChanges","checkNoChanges","attachView","viewRef","attachToAppRef","detachView","detachFromAppRef","componentRef","hostView","list","el","splice","RendererStyleFlags2","RenderComponentType","templateUrl","slotCount","encapsulation","styles","animations","RenderDebugInfo","Renderer","RootRenderer","RendererFactory2","Renderer2","ElementRef","NgModuleFactoryLoader","moduleFactories","QueryList","dirty","_results","changes","find","toArray","reset","flatten","flat","item","flatItem","last","notifyOnChanges","setDirty","SystemJsNgModuleLoaderConfig","DEFAULT_CONFIG","factoryPathPrefix","factoryPathSuffix","SystemJsNgModuleLoader","_compiler","config","_config","load","path","loadFactory","loadAndCompile","exportName","System","import","checkNotEmpty","factoryClassSuffix","modulePath","ChangeDetectorRef","TemplateRef","ViewContainerRef","ViewRef","EmbeddedViewRef","EventListener","DebugNode","nativeNode","_debugContext","DebugElement","addChild","listeners","references","providerTokens","attributes","classes","childNodes","child","removeChild","childIndex","insertChildrenAfter","newChildren","siblingIndex","insertBefore","refChild","newChild","refIndex","query","predicate","queryAll","matches","_queryElementChildren","queryAllNodes","_queryNodeChildren","node","triggerEventHandler","eventObj","element","parentNode","_nativeNodeToDebugNode","getDebugNode","indexDebugNode","devModeEqual","isListLikeIterableA","isListLikeIterable","isListLikeIterableB","areIterablesEqual","comparator","iterator1","iterator2","item1","item2","WrappedValue","wrapped","wrap","unwrap","isWrapped","SimpleChange","previousValue","currentValue","firstChange","isFirstChange","isJsObject","DefaultIterableDifferFactory","supports","trackByFn","DefaultIterableDiffer","trackByIdentity","_linkedRecords","_unlinkedRecords","_previousItHead","_itHead","_itTail","_additionsHead","_additionsTail","_movesHead","_movesTail","_removalsHead","_removalsTail","_identityChangesHead","_identityChangesTail","_trackByFn","forEachItem","_next","forEachOperation","nextIt","nextRemove","addRemoveOffset","moveOffsets","getPreviousIndex","adjPreviousIndex","currentIndex","_nextRemoved","previousIndex","localMovePreviousIndex","localCurrentIndex","offset","forEachPreviousItem","_nextPrevious","forEachAddedItem","_nextAdded","forEachMovedItem","_nextMoved","forEachRemovedItem","forEachIdentityChange","_nextIdentityChange","diff","collection","check","_reset","itemTrackBy","mayBeDirty","index_1","trackById","_verifyReinsertion","_addIdentityChange","_mismatch","iterateListLike","_truncate","isDirty","nextRecord","previousRecord","_prev","_remove","_moveAfter","_reinsertAfter","_addAfter","IterableChangeRecord_","reinsertRecord","_addToMoves","_addToRemovals","_unlink","prevRecord","prev","_prevRemoved","_insertAfter","_DuplicateMap","put","toIndex","_prevDup","_nextDup","_DuplicateItemRecordList","_head","_tail","atOrAfterIndex","duplicates","recordList","moveOffset","MissingTranslationStrategy","DefaultKeyValueDifferFactory","DefaultKeyValueDiffer","_mapHead","_appendAfter","_previousMapHead","_changesHead","_changesTail","forEachChangedItem","_nextChanged","_forEach","_maybeAddToChanges","_getOrCreateRecordForKey","_insertBeforeOrAppend","before","record_1","KeyValueChangeRecord_","_addToAdditions","newValue","_addToChanges","IterableDiffers","copied","extend","iterable","getTypeNameForDebugging","KeyValueDiffers","kv","keyValDiff","iterableDiff","defaultIterableDiffers","defaultKeyValueDiffers","platformCore","LOCALE_ID","TRANSLATIONS","TRANSLATIONS_FORMAT","_iterableDiffersFactory","_keyValueDiffersFactory","_localeFactory","locale","ApplicationModule","InertBodyHelper","defaultDoc","inertDocument","implementation","createHTMLDocument","inertBodyElement","body","inertHtml","createElement","appendChild","innerHTML","querySelector","getInertBodyElement","isDOMParserAvailable","DOMParser","getInertBodyElement_DOMParser","getInertBodyElement_InertDocument","getInertBodyElement_XHR","html","encodeURI","XMLHttpRequest","responseType","open","send","response","parseFromString","templateEl","documentMode","stripCustomNsAttrs","elAttrs","attrName","removeAttribute","childNode","firstChild","nodeType","Node","ELEMENT_NODE","nextSibling","SAFE_URL_PATTERN","DATA_URL_PATTERN","_sanitizeUrl","url","match","tagSet","tags","e_1","_c","e_1_1","return","merge$1","sets","e_2","sets_1","sets_1_1","e_2_1","inertBodyHelper","VOID_ELEMENTS","OPTIONAL_END_TAG_BLOCK_ELEMENTS","OPTIONAL_END_TAG_INLINE_ELEMENTS","OPTIONAL_END_TAG_ELEMENTS","BLOCK_ELEMENTS","INLINE_ELEMENTS","VALID_ELEMENTS","URI_ATTRS","SRCSET_ATTRS","HTML_ATTRS","VALID_ATTRS","SanitizingHtmlSerializer","sanitizedSomething","buf","sanitizeChildren","startElement","TEXT_NODE","chars","endElement","checkClobberedElement","tagName","nodeName","toLowerCase","srcset","elAttr","lower","trim","encodeEntities","nextNode","compareDocumentPosition","DOCUMENT_POSITION_CONTAINED_BY","outerHTML","SURROGATE_PAIR_REGEXP","NON_ALPHANUMERIC_REGEXP","charCodeAt","_sanitizeHtml","unsafeHtmlInput","unsafeHtml","mXSSAttempts","parsedHtml","sanitizer","safeHtml","getTemplateContent","parent_1","isTemplateElement","content","SecurityContext","SAFE_STYLE_VALUE","RegExp","URL_RE","_sanitizeStyle","urlMatch","hasBalancedQuotes","outsideSingle","outsideDouble","Sanitizer","shiftInitState","priorInitState","newInitState","state","initState","initIndex","shouldCallLifecycleInitHook","asTextData","nodes","asElementData","asProviderData","asPureExpressionData","asQueryList","DebugContext","Services","setCurrentNode","createRootView","createEmbeddedView","createComponentView","createNgModuleRef","overrideProvider","overrideComponentView","clearOverrides","checkAndUpdateView","checkNoChangesView","destroyView","resolveDep","createDebugContext","handleEvent","updateDirectives","updateRenderer","dirtyParentQueries","expressionChangedAfterItHasBeenCheckedError","oldValue","currValue","isFirstCheck","viewDebugError","_addDebugContext","logError","viewDestroyedError","NOOP","_tokenKeyCache","tokenKey","UNDEFINED_RENDERER_TYPE_ID","EMPTY_RENDERER_TYPE_ID","_renderCompCount","resolveRendererType2","isFilled","None","checkBinding","bindingIdx","oldValues","bindingIndex","checkAndUpdateBinding","checkBindingNoChanges","bindingName","bindings","nodeIndex","markParentViewsForCheck","currView","viewContainerParent","markParentViewsForCheckProjectedViews","endView","dispatchEvent","event","componentView","root","declaredViewContainer","parentNodeDef","viewParentEl","renderNode","renderElement","renderText","elementEventFullName","isComponentView","isEmbeddedView","filterQueryId","queryId","splitMatchedQueriesDsl","matchedQueriesDsl","matchedQueries","matchedQueryIds","valueType","splitDepsDsl","sourceName","getParentRenderElement","renderHost","renderParent","componentRendererType","Native","DEFINITION_CACHE","WeakMap","resolveDefinition","visitRootRenderNodes","renderer","visitSiblingRenderNodes","startIndex","endIndex","nodeDef","visitRenderNode","childCount","visitProjectedRenderNodes","ngContentIndex","compView","hostElDef","projectedNodes","execRenderNodeAction","ngContent","rn","bindingFlags","embeddedViews","viewContainer","_embeddedViews","NS_PREFIX_RE","splitNamespace","calcBindingFlags","_toStringWithNull","elDef","selectorOrNode","ns","createComment","parentEl","selectRootElement","attrs","setAttribute","listenToElementOutputs","output","handleEventClosure","renderEventHandlerClosure","listenTarget","listenerView","disposable","listen","disposables","outputIndex","checkAndUpdateElementValue","binding","elData","renderNode$$1","setElementAttribute","securityContext","renderValue","sanitize","setElementClass","addClass","removeClass","setElementStyle","STYLE","unit","suffix","setStyle","removeStyle","setElementProperty","setProperty","UNDEFINED_VALUE","InjectorRefTokenKey$1","INJECTORRefTokenKey$1","NgModuleRefTokenKey","resolveNgModuleDep","depDef","tokenKey_1","providerDef","_def","providersByKey","providerInstance","_createProviderInstance$1","targetsModule","moduleTransitivelyPresent","modules","isRoot","injectable","_createClass","depValues","_callFactory","detachEmbeddedView","elementData","viewIndex","removeFromArray","renderDetachView","renderAttachEmbeddedView","prevView","prevRenderNode","addToArray","arr","EMPTY_CONTEXT","getComponentViewDefinitionFactory","viewDefFactory","ComponentFactory_","_inputs","_outputs","inputsArr","templateName","outputsArr","viewDef","componentNodeIndex","componentProvider","ComponentRef_","ViewRef_","_view","_viewRef","_component","_elDef","changeDetectorRef","Injector_","createViewContainerData","ViewContainerRef_","_data","ref","attachToViewContainerRef","templateRef","insert","createComponent","ngModuleRef","contextInjector","parentInjector","viewRef_","attachEmbeddedView","parentView","attachProjectedView","vcElementData","dvcElementData","projectedViews","template","_projectedViews","markNodeAsProjectedTemplate","nodeFlags","childFlags","move","moveEmbeddedView","oldViewIndex","newViewIndex","viewData","detach","createChangeDetectorRef","_viewContainerRef","_appRef","rootRenderNodes","renderNodes","markForCheck","fs","rendererFactory","begin","end","reattach","vcRef","createTemplateData","TemplateRef_","_parentView","createInjector$1","createRendererV1","RendererAdapter","namespaceAndName","createViewRoot","hostElement","createTemplateAnchor","parentElement","comment","createText","projectNodes","attachViewAfter","viewRootNodes","viewAllNodes","destroyNode","listenGlobal","propertyName","propertyValue","attributeValue","setBindingDebugInfo","className","isAdd","styleName","styleValue","invokeElementMethod","methodName","setText","setValue","animate","bootstrapComponents","NgModuleRef_","_moduleType","initNgModule","provDef","injectFlags","callNgModuleLifecycle","lifecycles","RendererV1TokenKey","Renderer2TokenKey","ElementRefTokenKey","ViewContainerRefTokenKey","TemplateRefTokenKey","ChangeDetectorRefTokenKey","InjectorRefTokenKey","INJECTORRefTokenKey","checkIndex","depDefs","directChildFlags","childMatchedQueries","createProviderInstance","_createProviderInstance","createPipeInstance","createClass","createDirectiveInstance","subscription","eventHandlerClosure","allowPrivateServices","callFactory","ViewAction","NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR","startView","tokenKey$$1","searchView","findCompView","providerDef_1","allProviders","publicProviders","providerData","updateProp","nonMinifiedName","callLifecycleHooksChildrenFirst","callProviderLifecycles","callElementProvidersLifecycles","ngAfterContentInit","ngAfterContentChecked","ngAfterViewInit","ngAfterViewChecked","queryIds","nodeMatchedQueries","tplDef","filterId","checkAndUpdateQuery","queryList","directiveInstance","newValues","elementDef","calcQueryValues","notify","boundValue","bindingType","queryDef","getQueryValue","embeddedView","dvc","projectedView","queryValueType","appendNgContent","_pureExpressionDef","propertyNames","prefix","_addInterpolationPart","isNgContainer","validateNode","nodeCount","lastRenderRootNode","parentEnd","anchorDef$$1","createView","initView","createViewNodes","compRenderer","rendererType","createRenderer","outputCount","bindingCount","nodeData","compViewDef","execComponentViewsAction","CreateViewNodes","execQueriesAction","markProjectedViewsForCheck","execEmbeddedViewsAction","CheckNoChanges","CheckAndUpdate","callInit","checkAndUpdateNode","argStyle","v0","v1","v2","v3","v4","v5","v6","v7","v8","v9","checkAndUpdateNodeInline","checkAndUpdateElementInline","bindLen","changed","checkAndUpdateTextInline","checkAndUpdateDirectiveInline","directive","ngOnChanges","ngOnInit","ngDoCheck","checkAndUpdatePureExpressionInline","transform","checkAndUpdateNodeDynamic","checkAndUpdateElementDynamic","checkAndUpdateTextDynamic","checkAndUpdateDirectiveDynamic","checkAndUpdatePureExpressionDynamic","i_1","checkNoChangesNode","checkNoChangesNodeInline","checkNoChangesNodeDynamic","checkNoChangesQuery","Destroy","detachProjectedView","destroyViewNodes","callViewAction","viewState","execProjectedViewsAction","CheckNoChangesProjectedViews","CheckAndUpdateProjectedViews","queryFlags","staticDynamicQueryFlag","checkType","initServicesIfNeeded","services","createDebugServices","debugSetCurrentNode","debugCreateRootView","debugCreateEmbeddedView","debugCreateComponentView","debugCreateNgModuleRef","debugOverrideProvider","debugOverrideComponentView","debugClearOverrides","debugCheckAndUpdateView","debugCheckNoChangesView","debugDestroyView","DebugContext_","debugHandleEvent","debugUpdateDirectives","debugUpdateRenderer","createProdServices","createProdRootView","prodCheckAndUpdateNode","prodCheckNoChangesNode","elInjector","createRootData","DebugRendererFactory2","defWithOverride","applyProviderOverridesToView","callWithDebugContext","DebugAction","anchorDef","viewDef$$1","viewDefOverrides","applyProviderOverridesToNgModule","calcHasOverrides","hasOverrides","hasDeprecatedOverrides","providerOverrides","override","deprecatedBehavior","providerOverridesWithScope","applyProviderOverrides","moduleSet_1","_currentAction","_currentView","_currentNodeIndex","comp","compFactory","elementIndicesWithOverwrittenProviders","findElementIndicesWithOverwrittenProviders","elIndicesWithOverwrittenProviders","lastElementDef","applyProviderOverridesToElement","elIndex","nextDirectiveWithBinding","debugCheckDirectivesFn","debugCheckAndUpdateNode","debugCheckNoChangesNode","nextRenderNodeWithBinding","debugCheckRenderNodeFn","givenValues","bindingValues","camelCaseToDashCase","CAMEL_CASE_REGEXP","normalizeDebugBindingValue","attr","elView","elOrCompView","childDef","collectReferences","findHostElement","logViewDef","logNodeIndex","renderNodeIndex","getRenderNodeIndex","currRenderNodeIndex","refName","oldAction","oldView","oldNodeIndex","isViewDebugError","viewWrappedDebugError","getCurrentDebugContext","renderData","DebugRenderer2","whenRenderingDone","removeDebugNodeFromIndex","namespace","debugCtx","debugEl","debugChildEl","debugRefEl","oldChild","style","NgModuleFactory_","_ngModuleDefFactory","queueContentHooks","tView","afterContentInit","contentHooks","afterContentChecked","contentCheckHooks","queueViewHooks","afterViewInit","viewHooks","afterViewChecked","viewCheckHooks","queueDestroyHooks","destroyHooks","executeInitHooks","currentView","creationMode","lifecycleStage","executeHooks","initHooks","checkHooks","allHooks","hooksToCall","callHooks","RendererStyleFlags3","NG_PROJECT_AS_ATTR_NAME","isProceduralRenderer","domRendererFactory3","document","isDifferent","stringify$1","findNextRNodeSibling","stopNode","currentNode","pNextOrParent","findFirstRNode","currentSibling","parentType","getNextLNodeWithProjection","getNextOrParentSiblingNode","initialNode","rootNode","native","childContainerData","dynamicLContainerNode","views","head","createTextNode","addRemoveViewFromContainer","container","insertMode","beforeNode","insertView","newView","setViewNext","containerNextNativeNode","removeView","removeIndex","viewNode","destroyViewTree","rootView","viewOrContainer","cleanUpView","getParentState","queries","removeListeners","cleanup","removeEventListener","executeOnDestroys","executePipeOnDestroys","pipeDestroyHooks","canInsertNativeNode","appendProjectedNode","currentParent","lContainer","isNodeMatchingSelector","tNode","nodeClassAttrVal","cssClassToMatch","nodeClassesLen","matchIndex","matchEndIdx","mode","nodeAttrs","skipToNextSelector","isPositive","attrIndexInNode","findAttrIndexInNode","selectorAttrValue","nodeAttrValue","isNodeMatchingSelectorList","matchingSelectorIndex","selectors","textSelectors","ngProjectAsAttrVal","getProjectAsAttrValue","ngProjectAsAttrIdx","throwMultipleComponentError","throwErrorIfNoChangesMode","checkNoChangesMode","previousOrParentNode","isParent","tData","NG_HOST_SYMBOL","_CLEAN_PROMISE","_ROOT_DIRECTIVE_INDICES","CIRCULAR$2","getPreviousOrParentNode","currentQueries","directives","getCreationMode","firstTemplatePass","enterView","host","bindingStartIndex","leaveView","refreshDirectives","executeInitAndContentHooks","setHostBindings","hostBindings","refreshChildComponents","componentRefresh","defs","dirIndex","createLView","viewId","tail","dynamicViewCount","createLNodeObject","nodeInjector","createLNode","isState","renderEmbeddedTemplate","pipes","_isParent","_previousOrParentNode","rf","getOrCreateTView","refreshDynamicChildren","getRenderFlags","createDirectivesAndLocals","localRefs","containerData","createTNode","cacheMatchingDirectivesForNode","exportsMap","","currentMatches","findDirectiveMatches","directiveRegistry","diPublic","valueIndex","resolveDirective","saveNameToExportMap","cacheMatchingLocalNames","localNames","instantiateDirectivesDirectly","count","start","tDirectives","directiveCreate","saveResolvedLocalsInData","throwCyclicDependencyError","initChangeDetectorIfExisting","_setComponentContext","exportAs","ngPrivateData","createTView","pipeRegistry","setUpAttributes","isProc","attrVal","locateHostElement","elementOrSelector","defaultRenderer","initialInputs","generatePropertyAliases","tNodeFlags","direction","propStore","isInput","directiveDef","propertyAliasMap","publicName","internalName","baseDirectiveCreate","addComponentLogic","directiveDefs","pipeDefs","addToViewTree","onPush","queueComponentIndexForCheck","queueInitHooks","onInit","doCheck","queueHostBindingForCheck","setInputsFromAttrs","directiveIndex","initialInputData","generateInitialInputs","minifiedInputName","createLContainer","parentLNode","nextIndex","container_1","elementIndex","viewAttached","detectChangesInternal","getDirectiveInstance","appendToProjectionNode","projectionNode","appendedFirst","appendedLast","projectionNodeData","findComponentHost","lView","viewRootLNode","markViewDirty","scheduleTick","rootContext","res_1","clean","scheduler","getRootView","rootComponent","renderComponentOrTemplate","componentOrContext","_getComponentHostLElementNode","hostNode","NO_CHANGE","initBindings","store","consumeBinding","bindingUpdated","checkAndUpdateBinding$1","bindingUpdated2","exp1","exp2","different","bindingUpdated4","exp3","exp4","getTView","instanceOrArray","CLEAN_PROMISE","ROOT_DIRECTIVE_INDICES","ViewRef$1","EmbeddedViewRef$1","_lViewNode","createViewRef","addDestroyable","destroyFn","NG_ELEMENT_ID","BLOOM_SIZE","nextNgElementId","getOrCreateNodeInjector","getOrCreateNodeInjectorForNode","bf0","bf1","bf2","bf3","bf4","bf5","bf6","bf7","cbf0","cbf1","cbf2","cbf3","cbf4","cbf5","cbf6","cbf7","viewContainerRef","elementRef","diPublicInInjector","di","bloomAdd","bloomBit","mask","getOrCreateChangeDetectorRef","isComponent","getOrCreateHostChangeDetector","getClosestComponentAncestor","hostInjector","getOrCreateInjectable","bloomHash","bloomHashBit","formerInjector","bloomFindPossibleInjector","flags_1","searchMatchesQueuedForCreation","startInjector","ReadFromInjectorFn","read","ElementRef$1","getOrCreateContainerRef","vcRefHost","lContainerNode","ViewContainerRef$1","_lContainerNode","_viewRefs","notImplemented","lViewNode","adjustedIdx","_adjustIndex","newIndex","shift","getOrCreateTemplateRef","TemplateRef$1","getOrCreateElementRef","getRenderer","_renderer","_directives","_pipes","_template","defineComponent","componentDefinition","pipeTypes","directiveTypes","invertObject","OnPush","extractDirectiveDef","extractPipeDef","feature","features","ngComponentDef","ngDirectiveDef","ngPipeDef","PRIVATE_PREFIX","EMPTY$1","newObj","minifiedKey","defineDirective","pureFunction1","pureFn","exp","thisArg","pureFunction2","pureFunction3","pureFunction4","pureFunctionV","exps","isPure","LQueries_","deep","shallow","track","descend","createQuery$1","containerValues","clonedQuery","viewValues","addNode","getIdxOfMatchingSelector","getIdxOfMatchingDirective","readFromNodeInjector","directiveIdx","matchingIdx","addMatch","matchingValue","previous","createPredicate","_valuesTree","QueryList$1","QueryList_","_values","flatten$1","BRAND","bypassSanitizationTrustString","trustedString","trusted","ɵangular_packages_core_core_j","ɵangular_packages_core_core_k","ɵangular_packages_core_core_l","ɵangular_packages_core_core_f","ɵangular_packages_core_core_g","ɵangular_packages_core_core_h","ɵangular_packages_core_core_i","ɵangular_packages_core_core_c","ɵangular_packages_core_core_d","ɵangular_packages_core_core_e","ɵangular_packages_core_core_m","ɵangular_packages_core_core_o","ɵangular_packages_core_core_n","ɵangular_packages_core_core_r","ɵangular_packages_core_core_p","ɵangular_packages_core_core_q","ɵangular_packages_core_core_v","ɵangular_packages_core_core_x","ɵangular_packages_core_core_w","ɵangular_packages_core_core_u","ɵangular_packages_core_core_y","ɵangular_packages_core_core_bb","ɵangular_packages_core_core_bd","ɵangular_packages_core_core_be","ɵangular_packages_core_core_bc","ɵangular_packages_core_core_ba","ɵangular_packages_core_core_z","ɵangular_packages_core_core_a","ɵangular_packages_core_core_b","ɵangular_packages_core_core_s","ɵangular_packages_core_core_t","destroyPlatform","enableProdMode","asNativeElements","debugEls","setTestabilityGetter","CUSTOM_ELEMENTS_SCHEMA","NO_ERRORS_SCHEMA","createInjector","getModuleFactory","ɵALLOW_MULTIPLE_PLATFORMS","ɵAPP_ID_RANDOM_PROVIDER","ɵdefaultIterableDiffers","ɵdevModeEqual","ɵisListLikeIterable","ɵisDefaultChangeDetectionStrategy","isDefaultChangeDetectionStrategy","changeDetectionStrategy","ɵConsole","ɵinject","ɵsetCurrentInjector","ɵAPP_ROOT","ɵComponentFactory","ɵCodegenComponentFactoryResolver","ɵReflectionCapabilities","ɵRenderDebugInfo","ɵ_sanitizeHtml","ɵ_sanitizeStyle","ɵ_sanitizeUrl","ɵglobal","ɵlooseIdentical","ɵstringify","ɵmakeDecorator","ɵisObservable","isObservable","ɵisPromise","ɵclearOverrides","ɵoverrideComponentView","ɵoverrideProvider","ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR","ɵdefineComponent","ɵdefineDirective","ɵdefinePipe","definePipe","pipeDef","ɵdetectChanges","ɵrenderComponent","renderComponent","componentDef","componentTag","requestAnimationFrame","elementNode","tag","rNode","resetApplicationState","hostFeatures","ɵdirectiveInject","directiveInject","ɵinjectTemplateRef","injectTemplateRef","ɵinjectViewContainerRef","injectViewContainerRef","ɵinjectChangeDetectorRef","injectChangeDetectorRef","ɵinjectAttribute","injectAttribute","ɵPublicFeature","PublicFeature","definition","ɵNgOnChangesFeature","NgOnChangesFeature","inputPropertyNames","proto","writable","_loop_1","pubKey","minKey","privateMinKey","existingDesc","getOwnPropertyDescriptor","simpleChanges","onChangesWrapper","delegateHook","ɵmarkDirty","markDirty","ɵNC","ɵC","ɵE","elementStart","ɵL","listenerFn","useCapture","cleanupFns","wrappedListener","wrapListenerWithDirtyLogic","cleanupFn","wrapListenerWithDirtyAndDefault","wrapListenerIn_markViewDirty","preventDefault","addEventListener","outputData","createOutput","ɵT","textNode","ɵV","embeddedViewStart","viewBlockId","scanForView","containerNode","startIdx","viewAtPositionId","getOrCreateEmbeddedTView","tContainer","ɵQ","memoryIndex","getCurrentQueries","QueryType","ɵd","loadDirective","ɵP","projection","localIndex","selectorIndex","nodesForSelector","nodeToProject","previouslyProjected","lastNodeToProject","ɵb","ɵi1","interpolation1","ɵi2","interpolation2","i0","ɵi3","interpolation3","i1","ɵi4","interpolation4","i2","ɵi5","interpolation5","i3","ɵi6","interpolation6","i4","ɵi7","interpolation7","i5","ɵi8","interpolation8","i6","ɵiV","interpolationV","ɵpb1","pipeBind1","pipeInstance","ɵpb2","pipeBind2","ɵpb3","pipeBind3","ɵpb4","pipeBind4","ɵpbV","pipeBindV","ɵf0","pureFunction0","ɵf1","ɵf2","ɵf3","ɵf4","ɵf5","pureFunction5","exp5","ɵf6","pureFunction6","exp6","ɵf7","pureFunction7","exp7","ɵf8","pureFunction8","exp8","ɵfV","ɵcR","containerRefreshStart","ɵcr","containerRefreshEnd","ɵqR","queryRefresh","ɵe","elementEnd","queueLifecycleHooks","ɵp","elementProperty","dataValue","inputData","setInputsForProperty","markDirtyIfOnPush","ɵpD","projectionDef","noOfNodeBuckets","distributedNodes","componentChild","ɵa","elementAttribute","strValue","ɵs","elementStyle","lElement","removeProperty","ɵsn","elementStyleNamed","suffixOrSanitizer","DashCase","ɵk","elementClass","ɵkn","elementClassNamed","classList","ɵt","textBinding","existingNode","textContent","insertChild","nativeSibling","ɵv","embeddedViewEnd","setRenderParentInProjectedNodes","ɵst","ɵld","ɵPp","pipeName","getPipeDef","ɵwhenRendered","whenRendered","getRootContext","ɵbypassSanitizationTrustHtml","bypassSanitizationTrustHtml","trustedHtml","ɵbypassSanitizationTrustStyle","bypassSanitizationTrustStyle","trustedStyle","ɵbypassSanitizationTrustScript","bypassSanitizationTrustScript","trustedScript","ɵbypassSanitizationTrustUrl","bypassSanitizationTrustUrl","trustedUrl","ɵbypassSanitizationTrustResourceUrl","bypassSanitizationTrustResourceUrl","trustedResourceUrl","ɵsanitizeHtml","sanitizeHtml","ɵsanitizeStyle","sanitizeStyle","unsafeStyle","ɵsanitizeUrl","sanitizeUrl","unsafeUrl","ɵsanitizeResourceUrl","sanitizeResourceUrl","unsafeResourceUrl","ɵregisterModuleFactory","registerModuleFactory","ɵEMPTY_ARRAY","ɵEMPTY_MAP","ɵand","templateFactory","ɵccf","createComponentFactory","ɵcmf","createNgModuleFactory","ngModuleType","defFactory","ɵcrt","createRendererType2","ɵdid","outputDefs","ɵeld","fixedAttrs","bindingDefs","suffixOrSecurityContext","_d","ns_1","name_1","_e","ɵelementEventFullName","ɵgetComponentViewDefinitionFactory","ɵinlineInterpolate","inlineInterpolate","valueCount","c0","a1","c1","a2","c2","a3","c3","a4","c4","a5","c5","a6","c6","a7","c7","a8","c8","a9","c9","ɵinterpolate","interpolate","constAndInterp","ɵmod","moduleDef","ɵmpd","moduleProvideDef","ɵncd","ngContentDef","ɵnov","nodeValue","ɵpid","ɵprd","ɵpad","pureArrayDef","argCount","ɵpod","pureObjectDef","propToIndex","nbKeys","ɵppd","purePipeDef","ɵqud","ɵted","textDef","staticText","ɵunv","unwrapValue","nodeIdx","globalBindingIdx","ɵvid","viewBindingCount","viewDisposableCount","viewNodeFlags","viewRootNodeFlags","viewMatchedQueries","currentRenderParent","currentElementHasPublicProviders","currentElementHasPrivateProviders","newParent","rootNodeFlags"],"mappings":";;;;;CAMC,SAAUA,EAAQC,GACC,iBAAZC,SAA0C,oBAAXC,OAAyBF,EAAQC,QAASE,QAAQ,QAASA,QAAQ,mBACvF,mBAAXC,QAAyBA,OAAOC,IAAMD,OAAO,iBAAkB,UAAW,OAAQ,kBAAmBJ,GAC3GA,GAASD,EAAOO,GAAKP,EAAOO,OAAUP,EAAOO,GAAGC,SAAWR,EAAOS,KAAKT,EAAOS,KAAKC,WAHrF,CAIEC,KAAM,SAAWT,EAAQO,EAAKC,GAAa,aAkB7C,IAAIE,EAAgBC,OAAOC,iBACpBC,wBAA2BC,OAAS,SAAUC,EAAGC,GAAKD,EAAEF,UAAYG,IACvE,SAAUD,EAAGC,GAAK,IAAK,IAAIC,KAAKD,EAAOA,EAAEE,eAAeD,KAAIF,EAAEE,GAAKD,EAAEC,KAEzE,SAASE,EAAUJ,EAA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B,GAAc4O,GACTA,EAAclf,aAGdkf,GAQtC,OAEIjsD,QAAS,KACTy1C,UAAWwgC,EACXO,cAAeN,EACfp6B,mBAAoBq6B,EAAoBpkE,MAAOA,EAC/Ci2B,MAAOA,EACPqB,iBAAkBA,GAAoBW,GACtCV,eAAgBA,GAAkBU,GAAMZ,YAX1B,SAAUpY,EAAMia,EAAW7iC,EAAWojC,GACpD,OAAOxD,EAAMiD,GAAWhU,QAAQmS,YAAYpY,EAAM5oB,EAAWojC,IAW7D0S,aAAc63B,EACd93B,YAAa+3B,EAAqBx4B,mBAAoBA,IA4oN9D58C,OAAOuE,eAAelF,EAAS,cAAgBuC,OAAO","sourcesContent":["/**\n * @license Angular v6.0.3\n * (c) 2010-2018 Google, Inc. https://angular.io/\n * License: MIT\n */\n\n(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('rxjs'), require('rxjs/operators')) :\n\ttypeof define === 'function' && define.amd ? define('@angular/core', ['exports', 'rxjs', 'rxjs/operators'], factory) :\n\t(factory((global.ng = global.ng || {}, global.ng.core = {}),global.rxjs,global.rxjs.operators));\n}(this, (function (exports,rxjs,operators) { 'use strict';\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n\r\nfunction __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nvar __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nfunction __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nfunction __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nfunction __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Construct an `InjectableDef` which defines how a token will be constructed by the DI system, and\n * in which injectors (if any) it will be available.\n *\n * This should be assigned to a static `ngInjectableDef` field on a type, which will then be an\n * `InjectableType`.\n *\n * Options:\n * * `providedIn` determines which injectors will include the injectable, by either associating it\n * with an `@NgModule` or other `InjectorType`, or by specifying that this injectable should be\n * provided in the `'root'` injector, which will be the application-level injector in most apps.\n * * `factory` gives the zero argument function which will create an instance of the injectable.\n * The factory can call `inject` to access the `Injector` and request injection of dependencies.\n *\n * @experimental\n */\nfunction defineInjectable(opts) {\n return {\n providedIn: opts.providedIn || null, factory: opts.factory, value: undefined,\n };\n}\n/**\n * Construct an `InjectorDef` which configures an injector.\n *\n * This should be assigned to a static `ngInjectorDef` field on a type, which will then be an\n * `InjectorType`.\n *\n * Options:\n *\n * * `factory`: an `InjectorType` is an instantiable type, so a zero argument `factory` function to\n * create the type must be provided. If that factory function needs to inject arguments, it can\n * use the `inject` function.\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 an `ngInjectableDef` 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 * @experimental\n */\nfunction defineInjector(options) {\n return {\n factory: options.factory, providers: options.providers || [], imports: options.imports || [],\n };\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Creates a token that can be used in a DI Provider.\n *\n * Use an `InjectionToken` whenever the type you are injecting is not reified (does not have a\n * runtime representation) such as when injecting an interface, callable type, array or\n * parametrized type.\n *\n * `InjectionToken` is parameterized on `T` which is the type of object which will be returned by\n * the `Injector`. This provides additional level of type safety.\n *\n * ```\n * interface MyInterface {...}\n * var myInterface = injector.get(new InjectionToken<MyInterface>('SomeToken'));\n * // myInterface is inferred to be MyInterface.\n * ```\n *\n * When creating an `InjectionToken`, you can optionally specify a factory function which returns\n * (possibly by creating) a default value of the parameterized type `T`. This sets up the\n * `InjectionToken` using this factory as a provider as if it was defined explicitly in the\n * application's root injector. If the factory function, which takes zero arguments, needs to inject\n * dependencies, it can do so using the `inject` function. See below for an example.\n *\n * Additionally, if a `factory` is specified you can also specify the `providedIn` option, which\n * overrides the above behavior and marks the token as belonging to a particular `@NgModule`. As\n * mentioned above, `'root'` is the default value for `providedIn`.\n *\n * ### Example\n *\n * #### Tree-shakeable InjectionToken\n *\n * {@example core/di/ts/injector_spec.ts region='ShakeableInjectionToken'}\n *\n * #### Plain InjectionToken\n *\n * {@example core/di/ts/injector_spec.ts region='InjectionToken'}\n *\n *\n */\nvar InjectionToken = /** @class */ (function () {\n function InjectionToken(_desc, options) {\n this._desc = _desc;\n /** @internal */\n this.ngMetadataName = 'InjectionToken';\n if (options !== undefined) {\n this.ngInjectableDef = defineInjectable({\n providedIn: options.providedIn || 'root',\n factory: options.factory,\n });\n }\n else {\n this.ngInjectableDef = undefined;\n }\n }\n InjectionToken.prototype.toString = function () { return \"InjectionToken \" + this._desc; };\n return InjectionToken;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar ANNOTATIONS = '__annotations__';\nvar PARAMETERS = '__parameters__';\nvar PROP_METADATA = '__prop__metadata__';\n/**\n * @suppress {globalThis}\n */\nfunction makeDecorator(name, props, parentClass, chainFn, typeFn) {\n var metaCtor = makeMetadataCtor(props);\n function DecoratorFactory() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (this instanceof DecoratorFactory) {\n metaCtor.call.apply(metaCtor, __spread([this], args));\n return this;\n }\n var annotationInstance = new ((_a = DecoratorFactory).bind.apply(_a, __spread([void 0], args)))();\n var TypeDecorator = function TypeDecorator(cls) {\n typeFn && typeFn.apply(void 0, __spread([cls], args));\n // Use of Object.defineProperty is important since it creates non-enumerable property which\n // prevents the property is copied during subclassing.\n var annotations = cls.hasOwnProperty(ANNOTATIONS) ?\n cls[ANNOTATIONS] :\n Object.defineProperty(cls, ANNOTATIONS, { value: [] })[ANNOTATIONS];\n annotations.push(annotationInstance);\n return cls;\n };\n if (chainFn)\n chainFn(TypeDecorator);\n return TypeDecorator;\n var _a;\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}\nfunction makeMetadataCtor(props) {\n return function ctor() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (props) {\n var values = props.apply(void 0, __spread(args));\n for (var propName in values) {\n this[propName] = values[propName];\n }\n }\n };\n}\nfunction makeParamDecorator(name, props, parentClass) {\n var metaCtor = makeMetadataCtor(props);\n function ParamDecoratorFactory() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (this instanceof ParamDecoratorFactory) {\n metaCtor.apply(this, args);\n return this;\n }\n var annotationInstance = new ((_a = ParamDecoratorFactory).bind.apply(_a, __spread([void 0], args)))();\n ParamDecorator.annotation = annotationInstance;\n return ParamDecorator;\n function ParamDecorator(cls, unusedKey, index) {\n // Use of Object.defineProperty is important since it creates non-enumerable property which\n // prevents the property is copied during subclassing.\n var parameters = cls.hasOwnProperty(PARAMETERS) ?\n cls[PARAMETERS] :\n Object.defineProperty(cls, PARAMETERS, { value: [] })[PARAMETERS];\n // there might be gaps if some in between parameters do not have annotations.\n // we pad with nulls.\n while (parameters.length <= index) {\n parameters.push(null);\n }\n (parameters[index] = parameters[index] || []).push(annotationInstance);\n return cls;\n }\n var _a;\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}\nfunction makePropDecorator(name, props, parentClass) {\n var metaCtor = makeMetadataCtor(props);\n function PropDecoratorFactory() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (this instanceof PropDecoratorFactory) {\n metaCtor.apply(this, args);\n return this;\n }\n var decoratorInstance = new ((_a = PropDecoratorFactory).bind.apply(_a, __spread([void 0], args)))();\n return function PropDecorator(target, name) {\n var constructor = target.constructor;\n // Use of Object.defineProperty is important since it creates non-enumerable property which\n // prevents the property is copied during subclassing.\n var meta = constructor.hasOwnProperty(PROP_METADATA) ?\n constructor[PROP_METADATA] :\n Object.defineProperty(constructor, PROP_METADATA, { value: {} })[PROP_METADATA];\n meta[name] = meta.hasOwnProperty(name) && meta[name] || [];\n meta[name].unshift(decoratorInstance);\n };\n var _a;\n }\n if (parentClass) {\n PropDecoratorFactory.prototype = Object.create(parentClass.prototype);\n }\n PropDecoratorFactory.prototype.ngMetadataName = name;\n PropDecoratorFactory.annotationCls = PropDecoratorFactory;\n return PropDecoratorFactory;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * This token can be used to create a virtual provider that will populate the\n * `entryComponents` fields of components and ng modules based on its `useValue`.\n * All components that are referenced in the `useValue` value (either directly\n * or in a nested array or map) will be added to the `entryComponents` property.\n *\n * ### Example\n * The following example shows how the router can populate the `entryComponents`\n * field of an NgModule based on the router configuration which refers\n * to components.\n *\n * ```typescript\n * // helper function inside the router\n * function provideRoutes(routes) {\n * return [\n * {provide: ROUTES, useValue: routes},\n * {provide: ANALYZE_FOR_ENTRY_COMPONENTS, useValue: routes, multi: true}\n * ];\n * }\n *\n * // user code\n * let routes = [\n * {path: '/root', component: RootComp},\n * {path: '/teams', component: TeamsComp}\n * ];\n *\n * @NgModule({\n * providers: [provideRoutes(routes)]\n * })\n * class ModuleWithRoutes {}\n * ```\n *\n * @experimental\n */\nvar ANALYZE_FOR_ENTRY_COMPONENTS = new InjectionToken('AnalyzeForEntryComponents');\n/**\n * Attribute decorator and metadata.\n *\n *\n * @Annotation\n */\nvar Attribute = makeParamDecorator('Attribute', function (attributeName) { return ({ attributeName: attributeName }); });\n/**\n * Base class for query metadata.\n *\n * See {@link ContentChildren}, {@link ContentChild}, {@link ViewChildren}, {@link ViewChild} for\n * more information.\n *\n *\n */\nvar Query = /** @class */ (function () {\n function Query() {\n }\n return Query;\n}());\n/**\n * ContentChildren decorator and metadata.\n *\n *\n * @Annotation\n */\nvar ContentChildren = makePropDecorator('ContentChildren', function (selector, data) {\n if (data === void 0) { data = {}; }\n return (__assign({ selector: selector, first: false, isViewQuery: false, descendants: false }, data));\n}, Query);\n/**\n * ContentChild decorator and metadata.\n *\n *\n * @Annotation\n */\nvar ContentChild = makePropDecorator('ContentChild', function (selector, data) {\n if (data === void 0) { data = {}; }\n return (__assign({ selector: selector, first: true, isViewQuery: false, descendants: true }, data));\n}, Query);\n/**\n * ViewChildren decorator and metadata.\n *\n *\n * @Annotation\n */\nvar ViewChildren = makePropDecorator('ViewChildren', function (selector, data) {\n if (data === void 0) { data = {}; }\n return (__assign({ selector: selector, first: false, isViewQuery: true, descendants: true }, data));\n}, Query);\n/**\n * ViewChild decorator and metadata.\n *\n *\n * @Annotation\n */\nvar ViewChild = makePropDecorator('ViewChild', function (selector, data) {\n return (__assign({ selector: selector, first: true, isViewQuery: true, descendants: true }, data));\n}, Query);\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * Describes within the change detector which strategy will be used the next time change\n * detection is triggered.\n *\n */\n/**\n * Describes within the change detector which strategy will be used the next time change\n * detection is triggered.\n *\n */\n\n/**\n * Describes within the change detector which strategy will be used the next time change\n * detection is triggered.\n *\n */\n(function (ChangeDetectionStrategy) {\n /**\n * `OnPush` means that the change detector's mode will be initially set to `CheckOnce`.\n */\n ChangeDetectionStrategy[ChangeDetectionStrategy[\"OnPush\"] = 0] = \"OnPush\";\n /**\n * `Default` means that the change detector's mode will be initially set to `CheckAlways`.\n */\n ChangeDetectionStrategy[ChangeDetectionStrategy[\"Default\"] = 1] = \"Default\";\n})(exports.ChangeDetectionStrategy || (exports.ChangeDetectionStrategy = {}));\n/**\n * Describes the status of the detector.\n */\n/**\n * Describes the status of the detector.\n */\n\n/**\n * Describes the status of the detector.\n */\n(function (ChangeDetectorStatus) {\n /**\n * `CheckOnce` means that after calling detectChanges the mode of the change detector\n * will become `Checked`.\n */\n ChangeDetectorStatus[ChangeDetectorStatus[\"CheckOnce\"] = 0] = \"CheckOnce\";\n /**\n * `Checked` means that the change detector should be skipped until its mode changes to\n * `CheckOnce`.\n */\n ChangeDetectorStatus[ChangeDetectorStatus[\"Checked\"] = 1] = \"Checked\";\n /**\n * `CheckAlways` means that after calling detectChanges the mode of the change detector\n * will remain `CheckAlways`.\n */\n ChangeDetectorStatus[ChangeDetectorStatus[\"CheckAlways\"] = 2] = \"CheckAlways\";\n /**\n * `Detached` means that the change detector sub tree is not a part of the main tree and\n * should be skipped.\n */\n ChangeDetectorStatus[ChangeDetectorStatus[\"Detached\"] = 3] = \"Detached\";\n /**\n * `Errored` means that the change detector encountered an error checking a binding\n * or calling a directive lifecycle method and is now in an inconsistent state. Change\n * detectors in this state will no longer detect changes.\n */\n ChangeDetectorStatus[ChangeDetectorStatus[\"Errored\"] = 4] = \"Errored\";\n /**\n * `Destroyed` means that the change detector is destroyed.\n */\n ChangeDetectorStatus[ChangeDetectorStatus[\"Destroyed\"] = 5] = \"Destroyed\";\n})(exports.ɵChangeDetectorStatus || (exports.ɵChangeDetectorStatus = {}));\nfunction isDefaultChangeDetectionStrategy(changeDetectionStrategy) {\n return changeDetectionStrategy == null ||\n changeDetectionStrategy === exports.ChangeDetectionStrategy.Default;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * Directive decorator and metadata.\n *\n *\n * @Annotation\n */\nvar Directive = makeDecorator('Directive', function (dir) {\n if (dir === void 0) { dir = {}; }\n return dir;\n});\n/**\n * Component decorator and metadata.\n *\n *\n * @Annotation\n */\nvar Component = makeDecorator('Component', function (c) {\n if (c === void 0) { c = {}; }\n return (__assign({ changeDetection: exports.ChangeDetectionStrategy.Default }, c));\n}, Directive);\n/**\n * Pipe decorator and metadata.\n *\n * Use the `@Pipe` annotation to declare that a given class is a pipe. A pipe\n * class must also implement {@link PipeTransform} interface.\n *\n * To use the pipe include a reference to the pipe class in\n * {@link NgModule#declarations}.\n *\n *\n * @Annotation\n */\nvar Pipe = makeDecorator('Pipe', function (p) { return (__assign({ pure: true }, p)); });\n/**\n * Input decorator and metadata.\n *\n *\n * @Annotation\n */\nvar Input = makePropDecorator('Input', function (bindingPropertyName) { return ({ bindingPropertyName: bindingPropertyName }); });\n/**\n * Output decorator and metadata.\n *\n *\n * @Annotation\n */\nvar Output = makePropDecorator('Output', function (bindingPropertyName) { return ({ bindingPropertyName: bindingPropertyName }); });\n/**\n * HostBinding decorator and metadata.\n *\n *\n * @Annotation\n */\nvar HostBinding = makePropDecorator('HostBinding', function (hostPropertyName) { return ({ hostPropertyName: hostPropertyName }); });\n/**\n * HostListener decorator and metadata.\n *\n *\n * @Annotation\n */\nvar HostListener = makePropDecorator('HostListener', function (eventName, args) { return ({ eventName: eventName, args: args }); });\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @description\n *\n * Represents a type that a Component or other object is instances of.\n *\n * An example of a `Type` is `MyCustomComponent` class, which in JavaScript is be represented by\n * the `MyCustomComponent` constructor function.\n *\n *\n */\nvar Type = Function;\nfunction isType(v) {\n return typeof v === 'function';\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar __window = typeof window !== 'undefined' && window;\nvar __self = typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' &&\n self instanceof WorkerGlobalScope && self;\nvar __global = typeof global !== 'undefined' && global;\nvar _global = __window || __global || __self;\nvar promise = Promise.resolve(0);\nvar _symbolIterator = null;\nfunction getSymbolIterator() {\n if (!_symbolIterator) {\n var Symbol_1 = _global['Symbol'];\n if (Symbol_1 && Symbol_1.iterator) {\n _symbolIterator = Symbol_1.iterator;\n }\n else {\n // es6-shim specific logic\n var keys = Object.getOwnPropertyNames(Map.prototype);\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n if (key !== 'entries' && key !== 'size' &&\n Map.prototype[key] === Map.prototype['entries']) {\n _symbolIterator = key;\n }\n }\n }\n }\n return _symbolIterator;\n}\nfunction scheduleMicroTask(fn) {\n if (typeof Zone === 'undefined') {\n // use promise to schedule microTask instead of use Zone\n promise.then(function () { fn && fn.apply(null, null); });\n }\n else {\n Zone.current.scheduleMicroTask('scheduleMicrotask', fn);\n }\n}\n// JS has NaN !== NaN\nfunction looseIdentical(a, b) {\n return a === b || typeof a === 'number' && typeof b === 'number' && isNaN(a) && isNaN(b);\n}\nfunction stringify(token) {\n if (typeof token === 'string') {\n return token;\n }\n if (token instanceof Array) {\n return '[' + token.map(stringify).join(', ') + ']';\n }\n if (token == null) {\n return '' + token;\n }\n if (token.overriddenName) {\n return \"\" + token.overriddenName;\n }\n if (token.name) {\n return \"\" + token.name;\n }\n var res = token.toString();\n if (res == null) {\n return '' + res;\n }\n var newLineIndex = res.indexOf('\\n');\n return newLineIndex === -1 ? res : res.substring(0, newLineIndex);\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * Attention: These regex has to hold even if the code is minified!\n */\nvar DELEGATE_CTOR = /^function\\s+\\S+\\(\\)\\s*{[\\s\\S]+\\.apply\\(this,\\s*arguments\\)/;\nvar INHERITED_CLASS = /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[A-Za-z\\d$_]+\\s*{/;\nvar INHERITED_CLASS_WITH_CTOR = /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[A-Za-z\\d$_]+\\s*{[\\s\\S]*constructor\\s*\\(/;\nvar ReflectionCapabilities = /** @class */ (function () {\n function ReflectionCapabilities(reflect) {\n this._reflect = reflect || _global['Reflect'];\n }\n ReflectionCapabilities.prototype.isReflectionEnabled = function () { return true; };\n ReflectionCapabilities.prototype.factory = function (t) { return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return new (t.bind.apply(t, __spread([void 0], args)))();\n }; };\n /** @internal */\n /** @internal */\n ReflectionCapabilities.prototype._zipTypesAndAnnotations = /** @internal */\n function (paramTypes, paramAnnotations) {\n var result;\n if (typeof paramTypes === 'undefined') {\n result = new Array(paramAnnotations.length);\n }\n else {\n result = new Array(paramTypes.length);\n }\n for (var i = 0; i < result.length; i++) {\n // TS outputs Object for parameters without types, while Traceur omits\n // the annotations. For now we preserve the Traceur behavior to aid\n // migration, but this can be revisited.\n if (typeof paramTypes === 'undefined') {\n result[i] = [];\n }\n else if (paramTypes[i] != Object) {\n result[i] = [paramTypes[i]];\n }\n else {\n result[i] = [];\n }\n if (paramAnnotations && paramAnnotations[i] != null) {\n result[i] = result[i].concat(paramAnnotations[i]);\n }\n }\n return result;\n };\n ReflectionCapabilities.prototype._ownParameters = function (type, parentCtor) {\n var typeStr = type.toString();\n // If we have no decorators, we only have function.length as metadata.\n // In that case, to detect whether a child class declared an own constructor or not,\n // we need to look inside of that constructor to check whether it is\n // just calling the parent.\n // This also helps to work around for https://github.com/Microsoft/TypeScript/issues/12439\n // that sets 'design:paramtypes' to []\n // if a class inherits from another class but has no ctor declared itself.\n if (DELEGATE_CTOR.exec(typeStr) ||\n (INHERITED_CLASS.exec(typeStr) && !INHERITED_CLASS_WITH_CTOR.exec(typeStr))) {\n return null;\n }\n // Prefer the direct API.\n if (type.parameters && type.parameters !== parentCtor.parameters) {\n return type.parameters;\n }\n // API of tsickle for lowering decorators to properties on the class.\n var tsickleCtorParams = type.ctorParameters;\n if (tsickleCtorParams && tsickleCtorParams !== parentCtor.ctorParameters) {\n // Newer tsickle uses a function closure\n // Retain the non-function case for compatibility with older tsickle\n var ctorParameters = typeof tsickleCtorParams === 'function' ? tsickleCtorParams() : tsickleCtorParams;\n var paramTypes_1 = ctorParameters.map(function (ctorParam) { return ctorParam && ctorParam.type; });\n var paramAnnotations_1 = ctorParameters.map(function (ctorParam) {\n return ctorParam && convertTsickleDecoratorIntoMetadata(ctorParam.decorators);\n });\n return this._zipTypesAndAnnotations(paramTypes_1, paramAnnotations_1);\n }\n // API for metadata created by invoking the decorators.\n var paramAnnotations = type.hasOwnProperty(PARAMETERS) && type[PARAMETERS];\n var paramTypes = this._reflect && this._reflect.getOwnMetadata &&\n this._reflect.getOwnMetadata('design:paramtypes', type);\n if (paramTypes || paramAnnotations) {\n return this._zipTypesAndAnnotations(paramTypes, paramAnnotations);\n }\n // If a class has no decorators, at least create metadata\n // based on function.length.\n // Note: We know that this is a real constructor as we checked\n // the content of the constructor above.\n return new Array(type.length).fill(undefined);\n };\n ReflectionCapabilities.prototype.parameters = function (type) {\n // Note: only report metadata if we have at least one class decorator\n // to stay in sync with the static reflector.\n if (!isType(type)) {\n return [];\n }\n var parentCtor = getParentCtor(type);\n var parameters = this._ownParameters(type, parentCtor);\n if (!parameters && parentCtor !== Object) {\n parameters = this.parameters(parentCtor);\n }\n return parameters || [];\n };\n ReflectionCapabilities.prototype._ownAnnotations = function (typeOrFunc, parentCtor) {\n // Prefer the direct API.\n if (typeOrFunc.annotations && typeOrFunc.annotations !== parentCtor.annotations) {\n var annotations = typeOrFunc.annotations;\n if (typeof annotations === 'function' && annotations.annotations) {\n annotations = annotations.annotations;\n }\n return annotations;\n }\n // API of tsickle for lowering decorators to properties on the class.\n if (typeOrFunc.decorators && typeOrFunc.decorators !== parentCtor.decorators) {\n return convertTsickleDecoratorIntoMetadata(typeOrFunc.decorators);\n }\n // API for metadata created by invoking the decorators.\n if (typeOrFunc.hasOwnProperty(ANNOTATIONS)) {\n return typeOrFunc[ANNOTATIONS];\n }\n return null;\n };\n ReflectionCapabilities.prototype.annotations = function (typeOrFunc) {\n if (!isType(typeOrFunc)) {\n return [];\n }\n var parentCtor = getParentCtor(typeOrFunc);\n var ownAnnotations = this._ownAnnotations(typeOrFunc, parentCtor) || [];\n var parentAnnotations = parentCtor !== Object ? this.annotations(parentCtor) : [];\n return parentAnnotations.concat(ownAnnotations);\n };\n ReflectionCapabilities.prototype._ownPropMetadata = function (typeOrFunc, parentCtor) {\n // Prefer the direct API.\n if (typeOrFunc.propMetadata &&\n typeOrFunc.propMetadata !== parentCtor.propMetadata) {\n var propMetadata = typeOrFunc.propMetadata;\n if (typeof propMetadata === 'function' && propMetadata.propMetadata) {\n propMetadata = propMetadata.propMetadata;\n }\n return propMetadata;\n }\n // API of tsickle for lowering decorators to properties on the class.\n if (typeOrFunc.propDecorators &&\n typeOrFunc.propDecorators !== parentCtor.propDecorators) {\n var propDecorators_1 = typeOrFunc.propDecorators;\n var propMetadata_1 = {};\n Object.keys(propDecorators_1).forEach(function (prop) {\n propMetadata_1[prop] = convertTsickleDecoratorIntoMetadata(propDecorators_1[prop]);\n });\n return propMetadata_1;\n }\n // API for metadata created by invoking the decorators.\n if (typeOrFunc.hasOwnProperty(PROP_METADATA)) {\n return typeOrFunc[PROP_METADATA];\n }\n return null;\n };\n ReflectionCapabilities.prototype.propMetadata = function (typeOrFunc) {\n if (!isType(typeOrFunc)) {\n return {};\n }\n var parentCtor = getParentCtor(typeOrFunc);\n var propMetadata = {};\n if (parentCtor !== Object) {\n var parentPropMetadata_1 = this.propMetadata(parentCtor);\n Object.keys(parentPropMetadata_1).forEach(function (propName) {\n propMetadata[propName] = parentPropMetadata_1[propName];\n });\n }\n var ownPropMetadata = this._ownPropMetadata(typeOrFunc, parentCtor);\n if (ownPropMetadata) {\n Object.keys(ownPropMetadata).forEach(function (propName) {\n var decorators = [];\n if (propMetadata.hasOwnProperty(propName)) {\n decorators.push.apply(decorators, __spread(propMetadata[propName]));\n }\n decorators.push.apply(decorators, __spread(ownPropMetadata[propName]));\n propMetadata[propName] = decorators;\n });\n }\n return propMetadata;\n };\n ReflectionCapabilities.prototype.hasLifecycleHook = function (type, lcProperty) {\n return type instanceof Type && lcProperty in type.prototype;\n };\n ReflectionCapabilities.prototype.guards = function (type) { return {}; };\n ReflectionCapabilities.prototype.getter = function (name) { return new Function('o', 'return o.' + name + ';'); };\n ReflectionCapabilities.prototype.setter = function (name) {\n return new Function('o', 'v', 'return o.' + name + ' = v;');\n };\n ReflectionCapabilities.prototype.method = function (name) {\n var functionBody = \"if (!o.\" + name + \") throw new Error('\\\"\" + name + \"\\\" is undefined');\\n return o.\" + name + \".apply(o, args);\";\n return new Function('o', 'args', functionBody);\n };\n // There is not a concept of import uri in Js, but this is useful in developing Dart applications.\n // There is not a concept of import uri in Js, but this is useful in developing Dart applications.\n ReflectionCapabilities.prototype.importUri = \n // There is not a concept of import uri in Js, but this is useful in developing Dart applications.\n function (type) {\n // StaticSymbol\n if (typeof type === 'object' && type['filePath']) {\n return type['filePath'];\n }\n // Runtime type\n return \"./\" + stringify(type);\n };\n ReflectionCapabilities.prototype.resourceUri = function (type) { return \"./\" + stringify(type); };\n ReflectionCapabilities.prototype.resolveIdentifier = function (name, moduleUrl, members, runtime) {\n return runtime;\n };\n ReflectionCapabilities.prototype.resolveEnum = function (enumIdentifier, name) { return enumIdentifier[name]; };\n return ReflectionCapabilities;\n}());\nfunction convertTsickleDecoratorIntoMetadata(decoratorInvocations) {\n if (!decoratorInvocations) {\n return [];\n }\n return decoratorInvocations.map(function (decoratorInvocation) {\n var decoratorType = decoratorInvocation.type;\n var annotationCls = decoratorType.annotationCls;\n var annotationArgs = decoratorInvocation.args ? decoratorInvocation.args : [];\n return new (annotationCls.bind.apply(annotationCls, __spread([void 0], annotationArgs)))();\n });\n}\nfunction getParentCtor(ctor) {\n var parentProto = ctor.prototype ? Object.getPrototypeOf(ctor.prototype) : null;\n var parentCtor = parentProto ? parentProto.constructor : null;\n // Note: We always use `Object` as the null value\n // to simplify checking later on.\n return parentCtor || Object;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction getClosureSafeProperty(objWithPropertyToExtract, target) {\n for (var key in objWithPropertyToExtract) {\n if (objWithPropertyToExtract[key] === target) {\n return key;\n }\n }\n throw Error('Could not find renamed property on target object.');\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * 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,\n * but not yet defined. It is also used when the `token` which we use when creating a query is not\n * yet defined.\n *\n * ### Example\n * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref'}\n * @experimental\n */\nfunction forwardRef(forwardRefFn) {\n forwardRefFn.__forward_ref__ = forwardRef;\n forwardRefFn.toString = function () { return stringify(this()); };\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 * ### Example ([live demo](http://plnkr.co/edit/GU72mJrk1fiodChcmiDR?p=preview))\n *\n * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='resolve_forward_ref'}\n *\n * See: {@link forwardRef}\n * @experimental\n */\nfunction resolveForwardRef(type) {\n if (typeof type === 'function' && type.hasOwnProperty('__forward_ref__') &&\n type.__forward_ref__ === forwardRef) {\n return type();\n }\n else {\n return type;\n }\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * Inject decorator and metadata.\n *\n *\n * @Annotation\n */\nvar Inject = makeParamDecorator('Inject', function (token) { return ({ token: token }); });\n/**\n * Optional decorator and metadata.\n *\n *\n * @Annotation\n */\nvar Optional = makeParamDecorator('Optional');\n/**\n * Self decorator and metadata.\n *\n *\n * @Annotation\n */\nvar Self = makeParamDecorator('Self');\n/**\n * SkipSelf decorator and metadata.\n *\n *\n * @Annotation\n */\nvar SkipSelf = makeParamDecorator('SkipSelf');\n/**\n * Host decorator and metadata.\n *\n *\n * @Annotation\n */\nvar Host = makeParamDecorator('Host');\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar SOURCE = '__source';\nvar _THROW_IF_NOT_FOUND = new Object();\nvar THROW_IF_NOT_FOUND = _THROW_IF_NOT_FOUND;\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 * @experimental\n */\nvar INJECTOR = new InjectionToken('INJECTOR');\nvar NullInjector = /** @class */ (function () {\n function NullInjector() {\n }\n NullInjector.prototype.get = function (token, notFoundValue) {\n if (notFoundValue === void 0) { notFoundValue = _THROW_IF_NOT_FOUND; }\n if (notFoundValue === _THROW_IF_NOT_FOUND) {\n throw new Error(\"NullInjectorError: No provider for \" + stringify(token) + \"!\");\n }\n return notFoundValue;\n };\n return NullInjector;\n}());\n/**\n * @usageNotes\n * ```\n * const injector: Injector = ...;\n * injector.get(...);\n * ```\n *\n * @description\n *\n * Concrete injectors implement this interface.\n *\n * For more details, see the {@linkDocs guide/dependency-injection \"Dependency Injection Guide\"}.\n *\n * ### Example\n *\n * {@example core/di/ts/injector_spec.ts region='Injector'}\n *\n * `Injector` returns itself when given `Injector` as a token:\n * {@example core/di/ts/injector_spec.ts region='injectInjector'}\n *\n *\n */\nvar Injector = /** @class */ (function () {\n function Injector() {\n }\n /**\n * Create a new Injector which is configure using `StaticProvider`s.\n *\n * ### Example\n *\n * {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}\n */\n /**\n * Create a new Injector which is configure using `StaticProvider`s.\n *\n * ### Example\n *\n * {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}\n */\n Injector.create = /**\n * Create a new Injector which is configure using `StaticProvider`s.\n *\n * ### Example\n *\n * {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}\n */\n function (options, parent) {\n if (Array.isArray(options)) {\n return new StaticInjector(options, parent);\n }\n else {\n return new StaticInjector(options.providers, options.parent, options.name || null);\n }\n };\n Injector.THROW_IF_NOT_FOUND = _THROW_IF_NOT_FOUND;\n Injector.NULL = new NullInjector();\n Injector.ngInjectableDef = defineInjectable({\n providedIn: 'any',\n factory: function () { return inject(INJECTOR); },\n });\n return Injector;\n}());\nvar IDENT = function (value) {\n return value;\n};\nvar EMPTY = [];\nvar CIRCULAR = IDENT;\nvar MULTI_PROVIDER_FN = function () {\n return Array.prototype.slice.call(arguments);\n};\nvar GET_PROPERTY_NAME$1 = {};\nvar USE_VALUE$1 = getClosureSafeProperty$1({ provide: String, useValue: GET_PROPERTY_NAME$1 });\nvar NG_TOKEN_PATH = 'ngTokenPath';\nvar NG_TEMP_TOKEN_PATH = 'ngTempTokenPath';\nvar NULL_INJECTOR = Injector.NULL;\nvar NEW_LINE = /\\n/gm;\nvar NO_NEW_LINE = 'ɵ';\nvar StaticInjector = /** @class */ (function () {\n function StaticInjector(providers, parent, source) {\n if (parent === void 0) { parent = NULL_INJECTOR; }\n if (source === void 0) { source = null; }\n this.parent = parent;\n this.source = source;\n var records = this._records = new Map();\n records.set(Injector, { token: Injector, fn: IDENT, deps: EMPTY, value: this, useNew: false });\n records.set(INJECTOR, { token: INJECTOR, fn: IDENT, deps: EMPTY, value: this, useNew: false });\n recursivelyProcessProviders(records, providers);\n }\n StaticInjector.prototype.get = function (token, notFoundValue, flags) {\n if (flags === void 0) { flags = 0 /* Default */; }\n var record = this._records.get(token);\n try {\n return tryResolveToken(token, record, this._records, this.parent, notFoundValue, flags);\n }\n catch (e) {\n var tokenPath = e[NG_TEMP_TOKEN_PATH];\n if (token[SOURCE]) {\n tokenPath.unshift(token[SOURCE]);\n }\n e.message = formatError('\\n' + e.message, tokenPath, this.source);\n e[NG_TOKEN_PATH] = tokenPath;\n e[NG_TEMP_TOKEN_PATH] = null;\n throw e;\n }\n };\n StaticInjector.prototype.toString = function () {\n var tokens = [], records = this._records;\n records.forEach(function (v, token) { return tokens.push(stringify(token)); });\n return \"StaticInjector[\" + tokens.join(', ') + \"]\";\n };\n return StaticInjector;\n}());\nfunction resolveProvider(provider) {\n var deps = computeDeps(provider);\n var fn = IDENT;\n var value = EMPTY;\n var useNew = false;\n var provide = resolveForwardRef(provider.provide);\n if (USE_VALUE$1 in provider) {\n // We need to use USE_VALUE in provider since provider.useValue could be defined as undefined.\n value = provider.useValue;\n }\n else if (provider.useFactory) {\n fn = provider.useFactory;\n }\n else if (provider.useExisting) {\n // Just use IDENT\n }\n else if (provider.useClass) {\n useNew = true;\n fn = resolveForwardRef(provider.useClass);\n }\n else if (typeof provide == 'function') {\n useNew = true;\n fn = provide;\n }\n else {\n throw staticError('StaticProvider does not have [useValue|useFactory|useExisting|useClass] or [provide] is not newable', provider);\n }\n return { deps: deps, fn: fn, useNew: useNew, value: value };\n}\nfunction multiProviderMixError(token) {\n return staticError('Cannot mix multi providers and regular providers', token);\n}\nfunction recursivelyProcessProviders(records, provider) {\n if (provider) {\n provider = resolveForwardRef(provider);\n if (provider instanceof Array) {\n // if we have an array recurse into the array\n for (var i = 0; i < provider.length; i++) {\n recursivelyProcessProviders(records, provider[i]);\n }\n }\n else if (typeof provider === 'function') {\n // Functions were supported in ReflectiveInjector, but are not here. For safety give useful\n // error messages\n throw staticError('Function/Class not supported', provider);\n }\n else if (provider && typeof provider === 'object' && provider.provide) {\n // At this point we have what looks like a provider: {provide: ?, ....}\n var token = resolveForwardRef(provider.provide);\n var resolvedProvider = resolveProvider(provider);\n if (provider.multi === true) {\n // This is a multi provider.\n var multiProvider = records.get(token);\n if (multiProvider) {\n if (multiProvider.fn !== MULTI_PROVIDER_FN) {\n throw multiProviderMixError(token);\n }\n }\n else {\n // Create a placeholder factory which will look up the constituents of the multi provider.\n records.set(token, multiProvider = {\n token: provider.provide,\n deps: [],\n useNew: false,\n fn: MULTI_PROVIDER_FN,\n value: EMPTY\n });\n }\n // Treat the provider as the token.\n token = provider;\n multiProvider.deps.push({ token: token, options: 6 /* Default */ });\n }\n var record = records.get(token);\n if (record && record.fn == MULTI_PROVIDER_FN) {\n throw multiProviderMixError(token);\n }\n records.set(token, resolvedProvider);\n }\n else {\n throw staticError('Unexpected provider', provider);\n }\n }\n}\nfunction tryResolveToken(token, record, records, parent, notFoundValue, flags) {\n try {\n return resolveToken(token, record, records, parent, notFoundValue, flags);\n }\n catch (e) {\n // ensure that 'e' is of type Error.\n if (!(e instanceof Error)) {\n e = new Error(e);\n }\n var path = e[NG_TEMP_TOKEN_PATH] = e[NG_TEMP_TOKEN_PATH] || [];\n path.unshift(token);\n if (record && record.value == CIRCULAR) {\n // Reset the Circular flag.\n record.value = EMPTY;\n }\n throw e;\n }\n}\nfunction resolveToken(token, record, records, parent, notFoundValue, flags) {\n var value;\n if (record && !(flags & 4 /* SkipSelf */)) {\n // If we don't have a record, this implies that we don't own the provider hence don't know how\n // to resolve it.\n value = record.value;\n if (value == CIRCULAR) {\n throw Error(NO_NEW_LINE + 'Circular dependency');\n }\n else if (value === EMPTY) {\n record.value = CIRCULAR;\n var obj = undefined;\n var useNew = record.useNew;\n var fn = record.fn;\n var depRecords = record.deps;\n var deps = EMPTY;\n if (depRecords.length) {\n deps = [];\n for (var i = 0; i < depRecords.length; i++) {\n var depRecord = depRecords[i];\n var options = depRecord.options;\n var childRecord = options & 2 /* CheckSelf */ ? records.get(depRecord.token) : undefined;\n deps.push(tryResolveToken(\n // Current Token to resolve\n depRecord.token, childRecord, records, \n // If we don't know how to resolve dependency and we should not check parent for it,\n // than pass in Null injector.\n !childRecord && !(options & 4 /* CheckParent */) ? NULL_INJECTOR : parent, options & 1 /* Optional */ ? null : Injector.THROW_IF_NOT_FOUND, 0 /* Default */));\n }\n }\n record.value = value = useNew ? new ((_a = fn).bind.apply(_a, __spread([void 0], deps)))() : fn.apply(obj, deps);\n }\n }\n else if (!(flags & 2 /* Self */)) {\n value = parent.get(token, notFoundValue, 0 /* Default */);\n }\n return value;\n var _a;\n}\nfunction computeDeps(provider) {\n var deps = EMPTY;\n var providerDeps = provider.deps;\n if (providerDeps && providerDeps.length) {\n deps = [];\n for (var i = 0; i < providerDeps.length; i++) {\n var options = 6;\n var token = resolveForwardRef(providerDeps[i]);\n if (token instanceof Array) {\n for (var j = 0, annotations = token; j < annotations.length; j++) {\n var annotation = annotations[j];\n if (annotation instanceof Optional || annotation == Optional) {\n options = options | 1 /* Optional */;\n }\n else if (annotation instanceof SkipSelf || annotation == SkipSelf) {\n options = options & ~2 /* CheckSelf */;\n }\n else if (annotation instanceof Self || annotation == Self) {\n options = options & ~4 /* CheckParent */;\n }\n else if (annotation instanceof Inject) {\n token = annotation.token;\n }\n else {\n token = resolveForwardRef(annotation);\n }\n }\n }\n deps.push({ token: token, options: options });\n }\n }\n else if (provider.useExisting) {\n var token = resolveForwardRef(provider.useExisting);\n deps = [{ token: token, options: 6 /* Default */ }];\n }\n else if (!providerDeps && !(USE_VALUE$1 in provider)) {\n // useValue & useExisting are the only ones which are exempt from deps all others need it.\n throw staticError('\\'deps\\' required', provider);\n }\n return deps;\n}\nfunction formatError(text, obj, source) {\n if (source === void 0) { source = null; }\n text = text && text.charAt(0) === '\\n' && text.charAt(1) == NO_NEW_LINE ? text.substr(2) : text;\n var context = stringify(obj);\n if (obj instanceof Array) {\n context = obj.map(stringify).join(' -> ');\n }\n else if (typeof obj === 'object') {\n var parts = [];\n for (var key in obj) {\n if (obj.hasOwnProperty(key)) {\n var value = obj[key];\n parts.push(key + ':' + (typeof value === 'string' ? JSON.stringify(value) : stringify(value)));\n }\n }\n context = \"{\" + parts.join(', ') + \"}\";\n }\n return \"StaticInjectorError\" + (source ? '(' + source + ')' : '') + \"[\" + context + \"]: \" + text.replace(NEW_LINE, '\\n ');\n}\nfunction staticError(text, obj) {\n return new Error(formatError(text, obj));\n}\nfunction getClosureSafeProperty$1(objWithPropertyToExtract) {\n for (var key in objWithPropertyToExtract) {\n if (objWithPropertyToExtract[key] === GET_PROPERTY_NAME$1) {\n return key;\n }\n }\n throw Error('!prop');\n}\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 */\nvar _currentInjector = undefined;\nfunction setCurrentInjector(injector) {\n var former = _currentInjector;\n _currentInjector = injector;\n return former;\n}\nfunction inject(token, flags) {\n if (flags === void 0) { flags = 0 /* Default */; }\n if (_currentInjector === undefined) {\n throw new Error(\"inject() must be called from an injection context\");\n }\n else if (_currentInjector === null) {\n var injectableDef = token.ngInjectableDef;\n if (injectableDef && injectableDef.providedIn == 'root') {\n return injectableDef.value === undefined ? injectableDef.value = injectableDef.factory() :\n injectableDef.value;\n }\n throw new Error(\"Injector: NOT_FOUND [\" + stringify(token) + \"]\");\n }\n else {\n return _currentInjector.get(token, flags & 8 /* Optional */ ? null : undefined, flags);\n }\n}\nfunction injectArgs(types) {\n var args = [];\n for (var i = 0; i < types.length; i++) {\n var arg = types[i];\n if (Array.isArray(arg)) {\n if (arg.length === 0) {\n throw new Error('Arguments array must have arguments.');\n }\n var type = undefined;\n var flags = 0;\n for (var j = 0; j < arg.length; j++) {\n var meta = arg[j];\n if (meta instanceof Optional || meta.__proto__.ngMetadataName === 'Optional') {\n flags |= 8 /* Optional */;\n }\n else if (meta instanceof SkipSelf || meta.__proto__.ngMetadataName === 'SkipSelf') {\n flags |= 4 /* SkipSelf */;\n }\n else if (meta instanceof Self || meta.__proto__.ngMetadataName === 'Self') {\n flags |= 2 /* Self */;\n }\n else if (meta instanceof Inject) {\n type = meta.token;\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/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar GET_PROPERTY_NAME = {};\nvar ɵ0 = GET_PROPERTY_NAME;\nvar USE_VALUE = getClosureSafeProperty({ provide: String, useValue: ɵ0 }, GET_PROPERTY_NAME);\nvar EMPTY_ARRAY = [];\nfunction convertInjectableProviderToFactory(type, provider) {\n if (!provider) {\n var reflectionCapabilities = new ReflectionCapabilities();\n var deps_1 = reflectionCapabilities.parameters(type);\n // TODO - convert to flags.\n return function () { return new (type.bind.apply(type, __spread([void 0], injectArgs(deps_1))))(); };\n }\n if (USE_VALUE in provider) {\n var valueProvider_1 = provider;\n return function () { return valueProvider_1.useValue; };\n }\n else if (provider.useExisting) {\n var existingProvider_1 = provider;\n return function () { return inject(existingProvider_1.useExisting); };\n }\n else if (provider.useFactory) {\n var factoryProvider_1 = provider;\n return function () { return factoryProvider_1.useFactory.apply(factoryProvider_1, __spread(injectArgs(factoryProvider_1.deps || EMPTY_ARRAY))); };\n }\n else if (provider.useClass) {\n var classProvider_1 = provider;\n var deps_2 = provider.deps;\n if (!deps_2) {\n var reflectionCapabilities = new ReflectionCapabilities();\n deps_2 = reflectionCapabilities.parameters(type);\n }\n return function () {\n return new ((_a = classProvider_1.useClass).bind.apply(_a, __spread([void 0], injectArgs(deps_2))))();\n var _a;\n };\n }\n else {\n var deps_3 = provider.deps;\n if (!deps_3) {\n var reflectionCapabilities = new ReflectionCapabilities();\n deps_3 = reflectionCapabilities.parameters(type);\n }\n return function () { return new (type.bind.apply(type, __spread([void 0], injectArgs((deps_3)))))(); };\n }\n}\n/**\n* Injectable decorator and metadata.\n*\n*\n* @Annotation\n*/\nvar Injectable = makeDecorator('Injectable', undefined, undefined, undefined, function (injectableType, options) {\n if (options && options.providedIn !== undefined &&\n injectableType.ngInjectableDef === undefined) {\n injectableType.ngInjectableDef = defineInjectable({\n providedIn: options.providedIn,\n factory: convertInjectableProviderToFactory(injectableType, options)\n });\n }\n});\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Defines a schema that will allow:\n * - any non-Angular elements with a `-` in their name,\n * - any properties on elements with a `-` in their name which is the common rule for custom\n * elements.\n *\n *\n */\nvar CUSTOM_ELEMENTS_SCHEMA = {\n name: 'custom-elements'\n};\n/**\n * Defines a schema that will allow any property on any element.\n *\n * @experimental\n */\nvar NO_ERRORS_SCHEMA = {\n name: 'no-errors-schema'\n};\n/**\n * NgModule decorator and metadata.\n *\n *\n * @Annotation\n */\nvar NgModule = makeDecorator('NgModule', function (ngModule) { return ngModule; }, undefined, undefined, function (moduleType, metadata) {\n var imports = (metadata && metadata.imports) || [];\n if (metadata && metadata.exports) {\n imports = __spread(imports, [metadata.exports]);\n }\n moduleType.ngInjectorDef = defineInjector({\n factory: convertInjectableProviderToFactory(moduleType, { useClass: moduleType }),\n providers: metadata && metadata.providers,\n imports: imports,\n });\n});\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Defines template and style encapsulation options available for Component's {@link Component}.\n *\n * See {@link Component#encapsulation encapsulation}.\n *\n */\n/**\n * Defines template and style encapsulation options available for Component's {@link Component}.\n *\n * See {@link Component#encapsulation encapsulation}.\n *\n */\n\n/**\n * Defines template and style encapsulation options available for Component's {@link Component}.\n *\n * See {@link Component#encapsulation encapsulation}.\n *\n */\n(function (ViewEncapsulation) {\n /**\n * Emulate `Native` scoping of styles by adding an attribute containing surrogate id to the Host\n * Element and pre-processing the style rules provided via {@link Component#styles styles} or\n * {@link Component#styleUrls styleUrls}, and adding the new Host Element attribute to all\n * selectors.\n *\n * This is the default option.\n */\n ViewEncapsulation[ViewEncapsulation[\"Emulated\"] = 0] = \"Emulated\";\n /**\n * Use the native encapsulation mechanism of the renderer.\n *\n * For the DOM this means using [Shadow DOM](https://w3c.github.io/webcomponents/spec/shadow/) and\n * creating a ShadowRoot for Component's Host Element.\n */\n ViewEncapsulation[ViewEncapsulation[\"Native\"] = 1] = \"Native\";\n /**\n * Don't provide any template or style encapsulation.\n */\n ViewEncapsulation[ViewEncapsulation[\"None\"] = 2] = \"None\";\n})(exports.ViewEncapsulation || (exports.ViewEncapsulation = {}));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @description Represents the version of Angular\n *\n *\n */\nvar Version = /** @class */ (function () {\n function Version(full) {\n this.full = full;\n this.major = full.split('.')[0];\n this.minor = full.split('.')[1];\n this.patch = full.split('.').slice(2).join('.');\n }\n return Version;\n}());\nvar VERSION = new Version('6.0.3');\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nvar ERROR_DEBUG_CONTEXT = 'ngDebugContext';\nvar ERROR_ORIGINAL_ERROR = 'ngOriginalError';\nvar ERROR_LOGGER = 'ngErrorLogger';\n\nfunction getDebugContext(error) {\n return error[ERROR_DEBUG_CONTEXT];\n}\nfunction getOriginalError(error) {\n return error[ERROR_ORIGINAL_ERROR];\n}\nfunction getErrorLogger(error) {\n return error[ERROR_LOGGER] || defaultErrorLogger;\n}\nfunction defaultErrorLogger(console) {\n var values = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n values[_i - 1] = arguments[_i];\n }\n console.error.apply(console, __spread(values));\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n *\n * @description\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 * ### 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 *\n */\nvar ErrorHandler = /** @class */ (function () {\n function ErrorHandler() {\n /**\n * @internal\n */\n this._console = console;\n }\n ErrorHandler.prototype.handleError = function (error) {\n var originalError = this._findOriginalError(error);\n var context = this._findContext(error);\n // Note: Browser consoles show the place from where console.error was called.\n // We can use this to give users additional information about the error.\n var errorLogger = getErrorLogger(error);\n errorLogger(this._console, \"ERROR\", error);\n if (originalError) {\n errorLogger(this._console, \"ORIGINAL ERROR\", originalError);\n }\n if (context) {\n errorLogger(this._console, 'ERROR CONTEXT', context);\n }\n };\n /** @internal */\n /** @internal */\n ErrorHandler.prototype._findContext = /** @internal */\n function (error) {\n if (error) {\n return getDebugContext(error) ? getDebugContext(error) :\n this._findContext(getOriginalError(error));\n }\n return null;\n };\n /** @internal */\n /** @internal */\n ErrorHandler.prototype._findOriginalError = /** @internal */\n function (error) {\n var e = getOriginalError(error);\n while (e && getOriginalError(e)) {\n e = getOriginalError(e);\n }\n return e;\n };\n return ErrorHandler;\n}());\nfunction wrappedError(message, originalError) {\n var msg = message + \" caused by: \" + (originalError instanceof Error ? originalError.message : originalError);\n var error = Error(msg);\n error[ERROR_ORIGINAL_ERROR] = originalError;\n return error;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction findFirstClosedCycle(keys) {\n var res = [];\n for (var i = 0; i < keys.length; ++i) {\n if (res.indexOf(keys[i]) > -1) {\n res.push(keys[i]);\n return res;\n }\n res.push(keys[i]);\n }\n return res;\n}\nfunction constructResolvingPath(keys) {\n if (keys.length > 1) {\n var reversed = findFirstClosedCycle(keys.slice().reverse());\n var tokenStrs = reversed.map(function (k) { return stringify(k.token); });\n return ' (' + tokenStrs.join(' -> ') + ')';\n }\n return '';\n}\nfunction injectionError(injector, key, constructResolvingMessage, originalError) {\n var keys = [key];\n var errMsg = constructResolvingMessage(keys);\n var error = (originalError ? wrappedError(errMsg, originalError) : Error(errMsg));\n error.addKey = addKey;\n error.keys = keys;\n error.injectors = [injector];\n error.constructResolvingMessage = constructResolvingMessage;\n error[ERROR_ORIGINAL_ERROR] = originalError;\n return error;\n}\nfunction addKey(injector, key) {\n this.injectors.push(injector);\n this.keys.push(key);\n // Note: This updated message won't be reflected in the `.stack` property\n this.message = this.constructResolvingMessage(this.keys);\n}\n/**\n * Thrown when trying to retrieve a dependency by key from {@link Injector}, but the\n * {@link Injector} does not have a {@link Provider} for the given key.\n *\n * ### Example ([live demo](http://plnkr.co/edit/vq8D3FRB9aGbnWJqtEPE?p=preview))\n *\n * ```typescript\n * class A {\n * constructor(b:B) {}\n * }\n *\n * expect(() => Injector.resolveAndCreate([A])).toThrowError();\n * ```\n */\nfunction noProviderError(injector, key) {\n return injectionError(injector, key, function (keys) {\n var first = stringify(keys[0].token);\n return \"No provider for \" + first + \"!\" + constructResolvingPath(keys);\n });\n}\n/**\n * Thrown when dependencies form a cycle.\n *\n * ### Example ([live demo](http://plnkr.co/edit/wYQdNos0Tzql3ei1EV9j?p=info))\n *\n * ```typescript\n * var injector = Injector.resolveAndCreate([\n * {provide: \"one\", useFactory: (two) => \"two\", deps: [[new Inject(\"two\")]]},\n * {provide: \"two\", useFactory: (one) => \"one\", deps: [[new Inject(\"one\")]]}\n * ]);\n *\n * expect(() => injector.get(\"one\")).toThrowError();\n * ```\n *\n * Retrieving `A` or `B` throws a `CyclicDependencyError` as the graph above cannot be constructed.\n */\nfunction cyclicDependencyError(injector, key) {\n return injectionError(injector, key, function (keys) {\n return \"Cannot instantiate cyclic dependency!\" + constructResolvingPath(keys);\n });\n}\n/**\n * Thrown when a constructing type returns with an Error.\n *\n * The `InstantiationError` class contains the original error plus the dependency graph which caused\n * this object to be instantiated.\n *\n * ### Example ([live demo](http://plnkr.co/edit/7aWYdcqTQsP0eNqEdUAf?p=preview))\n *\n * ```typescript\n * class A {\n * constructor() {\n * throw new Error('message');\n * }\n * }\n *\n * var injector = Injector.resolveAndCreate([A]);\n\n * try {\n * injector.get(A);\n * } catch (e) {\n * expect(e instanceof InstantiationError).toBe(true);\n * expect(e.originalException.message).toEqual(\"message\");\n * expect(e.originalStack).toBeDefined();\n * }\n * ```\n */\nfunction instantiationError(injector, originalException, originalStack, key) {\n return injectionError(injector, key, function (keys) {\n var first = stringify(keys[0].token);\n return originalException.message + \": Error during instantiation of \" + first + \"!\" + constructResolvingPath(keys) + \".\";\n }, originalException);\n}\n/**\n * Thrown when an object other then {@link Provider} (or `Type`) is passed to {@link Injector}\n * creation.\n *\n * ### Example ([live demo](http://plnkr.co/edit/YatCFbPAMCL0JSSQ4mvH?p=preview))\n *\n * ```typescript\n * expect(() => Injector.resolveAndCreate([\"not a type\"])).toThrowError();\n * ```\n */\nfunction invalidProviderError(provider) {\n return Error(\"Invalid provider - only instances of Provider and Type are allowed, got: \" + provider);\n}\n/**\n * Thrown when the class has no annotation information.\n *\n * Lack of annotation information prevents the {@link Injector} from determining which dependencies\n * need to be injected into the constructor.\n *\n * ### Example ([live demo](http://plnkr.co/edit/rHnZtlNS7vJOPQ6pcVkm?p=preview))\n *\n * ```typescript\n * class A {\n * constructor(b) {}\n * }\n *\n * expect(() => Injector.resolveAndCreate([A])).toThrowError();\n * ```\n *\n * This error is also thrown when the class not marked with {@link Injectable} has parameter types.\n *\n * ```typescript\n * class B {}\n *\n * class A {\n * constructor(b:B) {} // no information about the parameter types of A is available at runtime.\n * }\n *\n * expect(() => Injector.resolveAndCreate([A,B])).toThrowError();\n * ```\n *\n */\nfunction noAnnotationError(typeOrFunc, params) {\n var signature = [];\n for (var i = 0, ii = params.length; i < ii; i++) {\n var parameter = params[i];\n if (!parameter || parameter.length == 0) {\n signature.push('?');\n }\n else {\n signature.push(parameter.map(stringify).join(' '));\n }\n }\n return Error('Cannot resolve all parameters for \\'' + stringify(typeOrFunc) + '\\'(' +\n signature.join(', ') + '). ' +\n 'Make sure that all the parameters are decorated with Inject or have valid type annotations and that \\'' +\n stringify(typeOrFunc) + '\\' is decorated with Injectable.');\n}\n/**\n * Thrown when getting an object by index.\n *\n * ### Example ([live demo](http://plnkr.co/edit/bRs0SX2OTQiJzqvjgl8P?p=preview))\n *\n * ```typescript\n * class A {}\n *\n * var injector = Injector.resolveAndCreate([A]);\n *\n * expect(() => injector.getAt(100)).toThrowError();\n * ```\n *\n */\nfunction outOfBoundsError(index) {\n return Error(\"Index \" + index + \" is out-of-bounds.\");\n}\n// TODO: add a working example after alpha38 is released\n/**\n * Thrown when a multi provider and a regular provider are bound to the same token.\n *\n * ### Example\n *\n * ```typescript\n * expect(() => Injector.resolveAndCreate([\n * { provide: \"Strings\", useValue: \"string1\", multi: true},\n * { provide: \"Strings\", useValue: \"string2\", multi: false}\n * ])).toThrowError();\n * ```\n */\nfunction mixingMultiProvidersWithRegularProvidersError(provider1, provider2) {\n return Error(\"Cannot mix multi providers and regular providers, got: \" + provider1 + \" \" + provider2);\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A unique object used for retrieving items from the {@link ReflectiveInjector}.\n *\n * Keys have:\n * - a system-wide unique `id`.\n * - a `token`.\n *\n * `Key` is used internally by {@link ReflectiveInjector} because its system-wide unique `id` allows\n * the\n * injector to store created objects in a more efficient way.\n *\n * `Key` should not be created directly. {@link ReflectiveInjector} creates keys automatically when\n * resolving\n * providers.\n * @deprecated No replacement\n */\nvar ReflectiveKey = /** @class */ (function () {\n /**\n * Private\n */\n function ReflectiveKey(token, id) {\n this.token = token;\n this.id = id;\n if (!token) {\n throw new Error('Token must be defined!');\n }\n this.displayName = stringify(this.token);\n }\n /**\n * Retrieves a `Key` for a token.\n */\n /**\n * Retrieves a `Key` for a token.\n */\n ReflectiveKey.get = /**\n * Retrieves a `Key` for a token.\n */\n function (token) {\n return _globalKeyRegistry.get(resolveForwardRef(token));\n };\n Object.defineProperty(ReflectiveKey, \"numberOfKeys\", {\n /**\n * @returns the number of keys registered in the system.\n */\n get: /**\n * @returns the number of keys registered in the system.\n */\n function () { return _globalKeyRegistry.numberOfKeys; },\n enumerable: true,\n configurable: true\n });\n return ReflectiveKey;\n}());\nvar KeyRegistry = /** @class */ (function () {\n function KeyRegistry() {\n this._allKeys = new Map();\n }\n KeyRegistry.prototype.get = function (token) {\n if (token instanceof ReflectiveKey)\n return token;\n if (this._allKeys.has(token)) {\n return this._allKeys.get(token);\n }\n var newKey = new ReflectiveKey(token, ReflectiveKey.numberOfKeys);\n this._allKeys.set(token, newKey);\n return newKey;\n };\n Object.defineProperty(KeyRegistry.prototype, \"numberOfKeys\", {\n get: function () { return this._allKeys.size; },\n enumerable: true,\n configurable: true\n });\n return KeyRegistry;\n}());\nvar _globalKeyRegistry = new KeyRegistry();\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Provides access to reflection data about symbols. Used internally by Angular\n * to power dependency injection and compilation.\n */\nvar Reflector = /** @class */ (function () {\n function Reflector(reflectionCapabilities) {\n this.reflectionCapabilities = reflectionCapabilities;\n }\n Reflector.prototype.updateCapabilities = function (caps) { this.reflectionCapabilities = caps; };\n Reflector.prototype.factory = function (type) { return this.reflectionCapabilities.factory(type); };\n Reflector.prototype.parameters = function (typeOrFunc) {\n return this.reflectionCapabilities.parameters(typeOrFunc);\n };\n Reflector.prototype.annotations = function (typeOrFunc) {\n return this.reflectionCapabilities.annotations(typeOrFunc);\n };\n Reflector.prototype.propMetadata = function (typeOrFunc) {\n return this.reflectionCapabilities.propMetadata(typeOrFunc);\n };\n Reflector.prototype.hasLifecycleHook = function (type, lcProperty) {\n return this.reflectionCapabilities.hasLifecycleHook(type, lcProperty);\n };\n Reflector.prototype.getter = function (name) { return this.reflectionCapabilities.getter(name); };\n Reflector.prototype.setter = function (name) { return this.reflectionCapabilities.setter(name); };\n Reflector.prototype.method = function (name) { return this.reflectionCapabilities.method(name); };\n Reflector.prototype.importUri = function (type) { return this.reflectionCapabilities.importUri(type); };\n Reflector.prototype.resourceUri = function (type) { return this.reflectionCapabilities.resourceUri(type); };\n Reflector.prototype.resolveIdentifier = function (name, moduleUrl, members, runtime) {\n return this.reflectionCapabilities.resolveIdentifier(name, moduleUrl, members, runtime);\n };\n Reflector.prototype.resolveEnum = function (identifier, name) {\n return this.reflectionCapabilities.resolveEnum(identifier, name);\n };\n return Reflector;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * The {@link Reflector} used internally in Angular to access metadata\n * about symbols.\n */\nvar reflector = new Reflector(new ReflectionCapabilities());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * `Dependency` is used by the framework to extend DI.\n * This is internal to Angular and should not be used directly.\n */\nvar ReflectiveDependency = /** @class */ (function () {\n function ReflectiveDependency(key, optional, visibility) {\n this.key = key;\n this.optional = optional;\n this.visibility = visibility;\n }\n ReflectiveDependency.fromKey = function (key) {\n return new ReflectiveDependency(key, false, null);\n };\n return ReflectiveDependency;\n}());\nvar _EMPTY_LIST = [];\nvar ResolvedReflectiveProvider_ = /** @class */ (function () {\n function ResolvedReflectiveProvider_(key, resolvedFactories, multiProvider) {\n this.key = key;\n this.resolvedFactories = resolvedFactories;\n this.multiProvider = multiProvider;\n this.resolvedFactory = this.resolvedFactories[0];\n }\n return ResolvedReflectiveProvider_;\n}());\n/**\n * An internal resolved representation of a factory function created by resolving {@link\n * Provider}.\n * @experimental\n */\nvar ResolvedReflectiveFactory = /** @class */ (function () {\n function ResolvedReflectiveFactory(/**\n * Factory function which can return an instance of an object represented by a key.\n */\n factory, /**\n * Arguments (dependencies) to the `factory` function.\n */\n dependencies) {\n this.factory = factory;\n this.dependencies = dependencies;\n }\n return ResolvedReflectiveFactory;\n}());\n/**\n * Resolve a single provider.\n */\nfunction resolveReflectiveFactory(provider) {\n var factoryFn;\n var resolvedDeps;\n if (provider.useClass) {\n var useClass = resolveForwardRef(provider.useClass);\n factoryFn = reflector.factory(useClass);\n resolvedDeps = _dependenciesFor(useClass);\n }\n else if (provider.useExisting) {\n factoryFn = function (aliasInstance) { return aliasInstance; };\n resolvedDeps = [ReflectiveDependency.fromKey(ReflectiveKey.get(provider.useExisting))];\n }\n else if (provider.useFactory) {\n factoryFn = provider.useFactory;\n resolvedDeps = constructDependencies(provider.useFactory, provider.deps);\n }\n else {\n factoryFn = function () { return provider.useValue; };\n resolvedDeps = _EMPTY_LIST;\n }\n return new ResolvedReflectiveFactory(factoryFn, resolvedDeps);\n}\n/**\n * Converts the {@link Provider} into {@link ResolvedProvider}.\n *\n * {@link Injector} internally only uses {@link ResolvedProvider}, {@link Provider} contains\n * convenience provider syntax.\n */\nfunction resolveReflectiveProvider(provider) {\n return new ResolvedReflectiveProvider_(ReflectiveKey.get(provider.provide), [resolveReflectiveFactory(provider)], provider.multi || false);\n}\n/**\n * Resolve a list of Providers.\n */\nfunction resolveReflectiveProviders(providers) {\n var normalized = _normalizeProviders(providers, []);\n var resolved = normalized.map(resolveReflectiveProvider);\n var resolvedProviderMap = mergeResolvedReflectiveProviders(resolved, new Map());\n return Array.from(resolvedProviderMap.values());\n}\n/**\n * Merges a list of ResolvedProviders into a list where\n * each key is contained exactly once and multi providers\n * have been merged.\n */\nfunction mergeResolvedReflectiveProviders(providers, normalizedProvidersMap) {\n for (var i = 0; i < providers.length; i++) {\n var provider = providers[i];\n var existing = normalizedProvidersMap.get(provider.key.id);\n if (existing) {\n if (provider.multiProvider !== existing.multiProvider) {\n throw mixingMultiProvidersWithRegularProvidersError(existing, provider);\n }\n if (provider.multiProvider) {\n for (var j = 0; j < provider.resolvedFactories.length; j++) {\n existing.resolvedFactories.push(provider.resolvedFactories[j]);\n }\n }\n else {\n normalizedProvidersMap.set(provider.key.id, provider);\n }\n }\n else {\n var resolvedProvider = void 0;\n if (provider.multiProvider) {\n resolvedProvider = new ResolvedReflectiveProvider_(provider.key, provider.resolvedFactories.slice(), provider.multiProvider);\n }\n else {\n resolvedProvider = provider;\n }\n normalizedProvidersMap.set(provider.key.id, resolvedProvider);\n }\n }\n return normalizedProvidersMap;\n}\nfunction _normalizeProviders(providers, res) {\n providers.forEach(function (b) {\n if (b instanceof Type) {\n res.push({ provide: b, useClass: b });\n }\n else if (b && typeof b == 'object' && b.provide !== undefined) {\n res.push(b);\n }\n else if (b instanceof Array) {\n _normalizeProviders(b, res);\n }\n else {\n throw invalidProviderError(b);\n }\n });\n return res;\n}\nfunction constructDependencies(typeOrFunc, dependencies) {\n if (!dependencies) {\n return _dependenciesFor(typeOrFunc);\n }\n else {\n var params_1 = dependencies.map(function (t) { return [t]; });\n return dependencies.map(function (t) { return _extractToken(typeOrFunc, t, params_1); });\n }\n}\nfunction _dependenciesFor(typeOrFunc) {\n var params = reflector.parameters(typeOrFunc);\n if (!params)\n return [];\n if (params.some(function (p) { return p == null; })) {\n throw noAnnotationError(typeOrFunc, params);\n }\n return params.map(function (p) { return _extractToken(typeOrFunc, p, params); });\n}\nfunction _extractToken(typeOrFunc, metadata, params) {\n var token = null;\n var optional = false;\n if (!Array.isArray(metadata)) {\n if (metadata instanceof Inject) {\n return _createDependency(metadata.token, optional, null);\n }\n else {\n return _createDependency(metadata, optional, null);\n }\n }\n var visibility = null;\n for (var i = 0; i < metadata.length; ++i) {\n var paramMetadata = metadata[i];\n if (paramMetadata instanceof Type) {\n token = paramMetadata;\n }\n else if (paramMetadata instanceof Inject) {\n token = paramMetadata.token;\n }\n else if (paramMetadata instanceof Optional) {\n optional = true;\n }\n else if (paramMetadata instanceof Self || paramMetadata instanceof SkipSelf) {\n visibility = paramMetadata;\n }\n else if (paramMetadata instanceof InjectionToken) {\n token = paramMetadata;\n }\n }\n token = resolveForwardRef(token);\n if (token != null) {\n return _createDependency(token, optional, visibility);\n }\n else {\n throw noAnnotationError(typeOrFunc, params);\n }\n}\nfunction _createDependency(token, optional, visibility) {\n return new ReflectiveDependency(ReflectiveKey.get(token), optional, visibility);\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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// Threshold for the dynamic version\nvar UNDEFINED = new Object();\n/**\n * A ReflectiveDependency injection container used for instantiating objects and resolving\n * dependencies.\n *\n * An `Injector` is a replacement for a `new` operator, which can automatically resolve the\n * constructor dependencies.\n *\n * In typical use, application code asks for the dependencies in the constructor and they are\n * resolved by the `Injector`.\n *\n * ### Example ([live demo](http://plnkr.co/edit/jzjec0?p=preview))\n *\n * The following example creates an `Injector` configured to create `Engine` and `Car`.\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n * constructor(public engine:Engine) {}\n * }\n *\n * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);\n * var car = injector.get(Car);\n * expect(car instanceof Car).toBe(true);\n * expect(car.engine instanceof Engine).toBe(true);\n * ```\n *\n * Notice, we don't use the `new` operator because we explicitly want to have the `Injector`\n * resolve all of the object's dependencies automatically.\n *\n * @deprecated from v5 - slow and brings in a lot of code, Use `Injector.create` instead.\n */\nvar ReflectiveInjector = /** @class */ (function () {\n function ReflectiveInjector() {\n }\n /**\n * Turns an array of provider definitions into an array of resolved providers.\n *\n * A resolution is a process of flattening multiple nested arrays and converting individual\n * providers into an array of {@link ResolvedReflectiveProvider}s.\n *\n * ### Example ([live demo](http://plnkr.co/edit/AiXTHi?p=preview))\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n * constructor(public engine:Engine) {}\n * }\n *\n * var providers = ReflectiveInjector.resolve([Car, [[Engine]]]);\n *\n * expect(providers.length).toEqual(2);\n *\n * expect(providers[0] instanceof ResolvedReflectiveProvider).toBe(true);\n * expect(providers[0].key.displayName).toBe(\"Car\");\n * expect(providers[0].dependencies.length).toEqual(1);\n * expect(providers[0].factory).toBeDefined();\n *\n * expect(providers[1].key.displayName).toBe(\"Engine\");\n * });\n * ```\n *\n * See {@link ReflectiveInjector#fromResolvedProviders fromResolvedProviders} for more info.\n */\n /**\n * Turns an array of provider definitions into an array of resolved providers.\n *\n * A resolution is a process of flattening multiple nested arrays and converting individual\n * providers into an array of {@link ResolvedReflectiveProvider}s.\n *\n * ### Example ([live demo](http://plnkr.co/edit/AiXTHi?p=preview))\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n * constructor(public engine:Engine) {}\n * }\n *\n * var providers = ReflectiveInjector.resolve([Car, [[Engine]]]);\n *\n * expect(providers.length).toEqual(2);\n *\n * expect(providers[0] instanceof ResolvedReflectiveProvider).toBe(true);\n * expect(providers[0].key.displayName).toBe(\"Car\");\n * expect(providers[0].dependencies.length).toEqual(1);\n * expect(providers[0].factory).toBeDefined();\n *\n * expect(providers[1].key.displayName).toBe(\"Engine\");\n * });\n * ```\n *\n * See {@link ReflectiveInjector#fromResolvedProviders fromResolvedProviders} for more info.\n */\n ReflectiveInjector.resolve = /**\n * Turns an array of provider definitions into an array of resolved providers.\n *\n * A resolution is a process of flattening multiple nested arrays and converting individual\n * providers into an array of {@link ResolvedReflectiveProvider}s.\n *\n * ### Example ([live demo](http://plnkr.co/edit/AiXTHi?p=preview))\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n * constructor(public engine:Engine) {}\n * }\n *\n * var providers = ReflectiveInjector.resolve([Car, [[Engine]]]);\n *\n * expect(providers.length).toEqual(2);\n *\n * expect(providers[0] instanceof ResolvedReflectiveProvider).toBe(true);\n * expect(providers[0].key.displayName).toBe(\"Car\");\n * expect(providers[0].dependencies.length).toEqual(1);\n * expect(providers[0].factory).toBeDefined();\n *\n * expect(providers[1].key.displayName).toBe(\"Engine\");\n * });\n * ```\n *\n * See {@link ReflectiveInjector#fromResolvedProviders fromResolvedProviders} for more info.\n */\n function (providers) {\n return resolveReflectiveProviders(providers);\n };\n /**\n * Resolves an array of providers and creates an injector from those providers.\n *\n * The passed-in providers can be an array of `Type`, {@link Provider},\n * or a recursive array of more providers.\n *\n * ### Example ([live demo](http://plnkr.co/edit/ePOccA?p=preview))\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n * constructor(public engine:Engine) {}\n * }\n *\n * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);\n * expect(injector.get(Car) instanceof Car).toBe(true);\n * ```\n *\n * This function is slower than the corresponding `fromResolvedProviders`\n * because it needs to resolve the passed-in providers first.\n * See {@link ReflectiveInjector#resolve resolve} and\n * {@link ReflectiveInjector#fromResolvedProviders fromResolvedProviders}.\n */\n /**\n * Resolves an array of providers and creates an injector from those providers.\n *\n * The passed-in providers can be an array of `Type`, {@link Provider},\n * or a recursive array of more providers.\n *\n * ### Example ([live demo](http://plnkr.co/edit/ePOccA?p=preview))\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n * constructor(public engine:Engine) {}\n * }\n *\n * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);\n * expect(injector.get(Car) instanceof Car).toBe(true);\n * ```\n *\n * This function is slower than the corresponding `fromResolvedProviders`\n * because it needs to resolve the passed-in providers first.\n * See {@link ReflectiveInjector#resolve resolve} and\n * {@link ReflectiveInjector#fromResolvedProviders fromResolvedProviders}.\n */\n ReflectiveInjector.resolveAndCreate = /**\n * Resolves an array of providers and creates an injector from those providers.\n *\n * The passed-in providers can be an array of `Type`, {@link Provider},\n * or a recursive array of more providers.\n *\n * ### Example ([live demo](http://plnkr.co/edit/ePOccA?p=preview))\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n * constructor(public engine:Engine) {}\n * }\n *\n * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);\n * expect(injector.get(Car) instanceof Car).toBe(true);\n * ```\n *\n * This function is slower than the corresponding `fromResolvedProviders`\n * because it needs to resolve the passed-in providers first.\n * See {@link ReflectiveInjector#resolve resolve} and\n * {@link ReflectiveInjector#fromResolvedProviders fromResolvedProviders}.\n */\n function (providers, parent) {\n var ResolvedReflectiveProviders = ReflectiveInjector.resolve(providers);\n return ReflectiveInjector.fromResolvedProviders(ResolvedReflectiveProviders, parent);\n };\n /**\n * Creates an injector from previously resolved providers.\n *\n * This API is the recommended way to construct injectors in performance-sensitive parts.\n *\n * ### Example ([live demo](http://plnkr.co/edit/KrSMci?p=preview))\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n * constructor(public engine:Engine) {}\n * }\n *\n * var providers = ReflectiveInjector.resolve([Car, Engine]);\n * var injector = ReflectiveInjector.fromResolvedProviders(providers);\n * expect(injector.get(Car) instanceof Car).toBe(true);\n * ```\n * @experimental\n */\n /**\n * Creates an injector from previously resolved providers.\n *\n * This API is the recommended way to construct injectors in performance-sensitive parts.\n *\n * ### Example ([live demo](http://plnkr.co/edit/KrSMci?p=preview))\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n * constructor(public engine:Engine) {}\n * }\n *\n * var providers = ReflectiveInjector.resolve([Car, Engine]);\n * var injector = ReflectiveInjector.fromResolvedProviders(providers);\n * expect(injector.get(Car) instanceof Car).toBe(true);\n * ```\n * @experimental\n */\n ReflectiveInjector.fromResolvedProviders = /**\n * Creates an injector from previously resolved providers.\n *\n * This API is the recommended way to construct injectors in performance-sensitive parts.\n *\n * ### Example ([live demo](http://plnkr.co/edit/KrSMci?p=preview))\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n * constructor(public engine:Engine) {}\n * }\n *\n * var providers = ReflectiveInjector.resolve([Car, Engine]);\n * var injector = ReflectiveInjector.fromResolvedProviders(providers);\n * expect(injector.get(Car) instanceof Car).toBe(true);\n * ```\n * @experimental\n */\n function (providers, parent) {\n return new ReflectiveInjector_(providers, parent);\n };\n return ReflectiveInjector;\n}());\nvar ReflectiveInjector_ = /** @class */ (function () {\n /**\n * Private\n */\n function ReflectiveInjector_(_providers, _parent) {\n /** @internal */\n this._constructionCounter = 0;\n this._providers = _providers;\n this.parent = _parent || null;\n var len = _providers.length;\n this.keyIds = new Array(len);\n this.objs = new Array(len);\n for (var i = 0; i < len; i++) {\n this.keyIds[i] = _providers[i].key.id;\n this.objs[i] = UNDEFINED;\n }\n }\n ReflectiveInjector_.prototype.get = function (token, notFoundValue) {\n if (notFoundValue === void 0) { notFoundValue = THROW_IF_NOT_FOUND; }\n return this._getByKey(ReflectiveKey.get(token), null, notFoundValue);\n };\n ReflectiveInjector_.prototype.resolveAndCreateChild = function (providers) {\n var ResolvedReflectiveProviders = ReflectiveInjector.resolve(providers);\n return this.createChildFromResolved(ResolvedReflectiveProviders);\n };\n ReflectiveInjector_.prototype.createChildFromResolved = function (providers) {\n var inj = new ReflectiveInjector_(providers);\n inj.parent = this;\n return inj;\n };\n ReflectiveInjector_.prototype.resolveAndInstantiate = function (provider) {\n return this.instantiateResolved(ReflectiveInjector.resolve([provider])[0]);\n };\n ReflectiveInjector_.prototype.instantiateResolved = function (provider) {\n return this._instantiateProvider(provider);\n };\n ReflectiveInjector_.prototype.getProviderAtIndex = function (index) {\n if (index < 0 || index >= this._providers.length) {\n throw outOfBoundsError(index);\n }\n return this._providers[index];\n };\n /** @internal */\n /** @internal */\n ReflectiveInjector_.prototype._new = /** @internal */\n function (provider) {\n if (this._constructionCounter++ > this._getMaxNumberOfObjects()) {\n throw cyclicDependencyError(this, provider.key);\n }\n return this._instantiateProvider(provider);\n };\n ReflectiveInjector_.prototype._getMaxNumberOfObjects = function () { return this.objs.length; };\n ReflectiveInjector_.prototype._instantiateProvider = function (provider) {\n if (provider.multiProvider) {\n var res = new Array(provider.resolvedFactories.length);\n for (var i = 0; i < provider.resolvedFactories.length; ++i) {\n res[i] = this._instantiate(provider, provider.resolvedFactories[i]);\n }\n return res;\n }\n else {\n return this._instantiate(provider, provider.resolvedFactories[0]);\n }\n };\n ReflectiveInjector_.prototype._instantiate = function (provider, ResolvedReflectiveFactory$$1) {\n var _this = this;\n var factory = ResolvedReflectiveFactory$$1.factory;\n var deps;\n try {\n deps =\n ResolvedReflectiveFactory$$1.dependencies.map(function (dep) { return _this._getByReflectiveDependency(dep); });\n }\n catch (e) {\n if (e.addKey) {\n e.addKey(this, provider.key);\n }\n throw e;\n }\n var obj;\n try {\n obj = factory.apply(void 0, __spread(deps));\n }\n catch (e) {\n throw instantiationError(this, e, e.stack, provider.key);\n }\n return obj;\n };\n ReflectiveInjector_.prototype._getByReflectiveDependency = function (dep) {\n return this._getByKey(dep.key, dep.visibility, dep.optional ? null : THROW_IF_NOT_FOUND);\n };\n ReflectiveInjector_.prototype._getByKey = function (key, visibility, notFoundValue) {\n if (key === ReflectiveInjector_.INJECTOR_KEY) {\n return this;\n }\n if (visibility instanceof Self) {\n return this._getByKeySelf(key, notFoundValue);\n }\n else {\n return this._getByKeyDefault(key, notFoundValue, visibility);\n }\n };\n ReflectiveInjector_.prototype._getObjByKeyId = function (keyId) {\n for (var i = 0; i < this.keyIds.length; i++) {\n if (this.keyIds[i] === keyId) {\n if (this.objs[i] === UNDEFINED) {\n this.objs[i] = this._new(this._providers[i]);\n }\n return this.objs[i];\n }\n }\n return UNDEFINED;\n };\n /** @internal */\n /** @internal */\n ReflectiveInjector_.prototype._throwOrNull = /** @internal */\n function (key, notFoundValue) {\n if (notFoundValue !== THROW_IF_NOT_FOUND) {\n return notFoundValue;\n }\n else {\n throw noProviderError(this, key);\n }\n };\n /** @internal */\n /** @internal */\n ReflectiveInjector_.prototype._getByKeySelf = /** @internal */\n function (key, notFoundValue) {\n var obj = this._getObjByKeyId(key.id);\n return (obj !== UNDEFINED) ? obj : this._throwOrNull(key, notFoundValue);\n };\n /** @internal */\n /** @internal */\n ReflectiveInjector_.prototype._getByKeyDefault = /** @internal */\n function (key, notFoundValue, visibility) {\n var inj;\n if (visibility instanceof SkipSelf) {\n inj = this.parent;\n }\n else {\n inj = this;\n }\n while (inj instanceof ReflectiveInjector_) {\n var inj_ = inj;\n var obj = inj_._getObjByKeyId(key.id);\n if (obj !== UNDEFINED)\n return obj;\n inj = inj_.parent;\n }\n if (inj !== null) {\n return inj.get(key.token, notFoundValue);\n }\n else {\n return this._throwOrNull(key, notFoundValue);\n }\n };\n Object.defineProperty(ReflectiveInjector_.prototype, \"displayName\", {\n get: function () {\n var providers = _mapProviders(this, function (b) { return ' \"' + b.key.displayName + '\" '; })\n .join(', ');\n return \"ReflectiveInjector(providers: [\" + providers + \"])\";\n },\n enumerable: true,\n configurable: true\n });\n ReflectiveInjector_.prototype.toString = function () { return this.displayName; };\n ReflectiveInjector_.INJECTOR_KEY = ReflectiveKey.get(Injector);\n return ReflectiveInjector_;\n}());\nfunction _mapProviders(injector, fn) {\n var res = new Array(injector._providers.length);\n for (var i = 0; i < injector._providers.length; ++i) {\n res[i] = fn(injector.getProviderAtIndex(i));\n }\n return res;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * An internal token whose presence in an injector indicates that the injector should treat itself\n * as a root scoped injector when processing requests for unknown tokens which may indicate\n * they are provided in the root scope.\n */\nvar APP_ROOT = new InjectionToken('The presence of this token marks an injector as being the root injector.');\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * Marker which indicates that a value has not yet been created from the factory function.\n */\nvar 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 */\nvar CIRCULAR$1 = {};\nvar EMPTY_ARRAY$1 = [];\n/**\n * A lazily initialized NullInjector.\n */\nvar NULL_INJECTOR$1 = undefined;\nfunction getNullInjector() {\n if (NULL_INJECTOR$1 === undefined) {\n NULL_INJECTOR$1 = new NullInjector();\n }\n return NULL_INJECTOR$1;\n}\n/**\n * Create a new `Injector` which is configured using `InjectorType`s.\n *\n * @experimental\n */\nfunction createInjector(defType, parent) {\n if (parent === void 0) { parent = null; }\n parent = parent || getNullInjector();\n return new R3Injector(defType, parent);\n}\nvar R3Injector = /** @class */ (function () {\n function R3Injector(def, parent) {\n var _this = this;\n this.parent = parent;\n /**\n * Map of tokens to records which contain the instances of those tokens.\n */\n this.records = new Map();\n /**\n * The transitive set of `InjectorType`s which define this injector.\n */\n this.injectorDefTypes = new Set();\n /**\n * Set of values instantiated by this injector which contain `ngOnDestroy` lifecycle hooks.\n */\n this.onDestroy = new Set();\n /**\n * Flag indicating that this injector was previously destroyed.\n */\n this.destroyed = false;\n // Start off by creating Records for every provider declared in every InjectorType\n // included transitively in `def`.\n deepForEach([def], function (injectorDef) { return _this.processInjectorType(injectorDef, new Set()); });\n // Make sure the INJECTOR token provides this injector.\n this.records.set(INJECTOR, makeRecord(undefined, this));\n // Detect whether this injector has the APP_ROOT_SCOPE token and thus should provide\n // any injectable scoped to APP_ROOT_SCOPE.\n this.isRootInjector = this.records.has(APP_ROOT);\n // Eagerly instantiate the InjectorType classes themselves.\n this.injectorDefTypes.forEach(function (defType) { return _this.get(defType); });\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 /**\n * Destroy the injector and release references to every instance or provider associated with it.\n *\n * Also calls the `OnDestroy` lifecycle hooks of every instance that was created for which a\n * hook was found.\n */\n R3Injector.prototype.destroy = /**\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 function () {\n this.assertNotDestroyed();\n // Set destroyed = true first, in case lifecycle hooks re-enter destroy().\n this.destroyed = true;\n try {\n // Call all the lifecycle hooks.\n this.onDestroy.forEach(function (service) { return service.ngOnDestroy(); });\n }\n finally {\n // Release all references.\n this.records.clear();\n this.onDestroy.clear();\n this.injectorDefTypes.clear();\n }\n };\n R3Injector.prototype.get = function (token, notFoundValue, flags) {\n if (notFoundValue === void 0) { notFoundValue = THROW_IF_NOT_FOUND; }\n if (flags === void 0) { flags = 0 /* Default */; }\n this.assertNotDestroyed();\n // Set the injection context.\n var previousInjector = setCurrentInjector(this);\n try {\n // Check for the SkipSelf flag.\n if (!(flags & 4 /* SkipSelf */)) {\n // SkipSelf isn't set, check if the record belongs to this injector.\n var record = this.records.get(token);\n if (record === undefined) {\n // No record, but maybe the token is scoped to this injector. Look for an ngInjectableDef\n // with a scope matching this injector.\n var def = couldBeInjectableType(token) &&\n token.ngInjectableDef ||\n undefined;\n if (def !== undefined && this.injectableDefInScope(def)) {\n // Found an ngInjectableDef and it's scoped to this injector. Pretend as if it was here\n // all along.\n record = injectableDefRecord(token);\n this.records.set(token, record);\n }\n }\n // If a record was found, get the instance for it and return it.\n if (record !== undefined) {\n return this.hydrate(token, record);\n }\n }\n // Select the next injector based on the Self flag - if self is set, the next injector is\n // the NullInjector, otherwise it's the parent.\n var next = !(flags & 2 /* Self */) ? this.parent : getNullInjector();\n return this.parent.get(token, notFoundValue);\n }\n finally {\n // Lastly, clean up the state by restoring the previous injector.\n setCurrentInjector(previousInjector);\n }\n };\n R3Injector.prototype.assertNotDestroyed = function () {\n if (this.destroyed) {\n throw new Error('Injector has already been destroyed.');\n }\n };\n /**\n * Add an `InjectorType` or `InjectorDefTypeWithProviders` and all of its transitive providers\n * to this injector.\n */\n /**\n * Add an `InjectorType` or `InjectorDefTypeWithProviders` and all of its transitive providers\n * to this injector.\n */\n R3Injector.prototype.processInjectorType = /**\n * Add an `InjectorType` or `InjectorDefTypeWithProviders` and all of its transitive providers\n * to this injector.\n */\n function (defOrWrappedDef, parents) {\n var _this = this;\n defOrWrappedDef = resolveForwardRef(defOrWrappedDef);\n // Either the defOrWrappedDef is an InjectorType (with ngInjectorDef) or an\n // InjectorDefTypeWithProviders (aka ModuleWithProviders). Detecting either is a megamorphic\n // read, so care is taken to only do the read once.\n // First attempt to read the ngInjectorDef.\n var def = defOrWrappedDef.ngInjectorDef;\n // If that's not present, then attempt to read ngModule from the InjectorDefTypeWithProviders.\n var ngModule = (def == null) && defOrWrappedDef.ngModule || undefined;\n // Determine the InjectorType. In the case where `defOrWrappedDef` is an `InjectorType`,\n // then this is easy. In the case of an InjectorDefTypeWithProviders, then the definition type\n // is the `ngModule`.\n var defType = (ngModule === undefined) ? defOrWrappedDef : ngModule;\n // If defOrWrappedType was an InjectorDefTypeWithProviders, then .providers may hold some\n // extra providers.\n var providers = (ngModule !== undefined) && defOrWrappedDef.providers ||\n EMPTY_ARRAY$1;\n // Finally, if defOrWrappedType was an `InjectorDefTypeWithProviders`, then the actual\n // `InjectorDef` is on its `ngModule`.\n if (ngModule !== undefined) {\n def = ngModule.ngInjectorDef;\n }\n // If no definition was found, throw.\n if (def == null) {\n throw new Error(\"Type \" + stringify(defType) + \" is missing an ngInjectorDef definition.\");\n }\n // Check for circular dependencies.\n if (parents.has(defType)) {\n throw new Error(\"Circular dependency: type \" + stringify(defType) + \" ends up importing itself.\");\n }\n // Track the InjectorType and add a provider for it.\n this.injectorDefTypes.add(defType);\n this.records.set(defType, makeRecord(def.factory));\n // Add providers in the same way that @NgModule resolution did:\n // First, include providers from any imports.\n if (def.imports != null) {\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 parents.add(defType);\n try {\n deepForEach(def.imports, function (imported) { return _this.processInjectorType(imported, parents); });\n }\n finally {\n // Remove it from the parents set when finished.\n parents.delete(defType);\n }\n }\n // Next, include providers listed on the definition itself.\n if (def.providers != null) {\n deepForEach(def.providers, function (provider) { return _this.processProvider(provider); });\n }\n // Finally, include providers from an InjectorDefTypeWithProviders if there was one.\n deepForEach(providers, function (provider) { return _this.processProvider(provider); });\n };\n /**\n * Process a `SingleProvider` and add it.\n */\n /**\n * Process a `SingleProvider` and add it.\n */\n R3Injector.prototype.processProvider = /**\n * Process a `SingleProvider` and add it.\n */\n function (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 var token = isTypeProvider(provider) ? provider : resolveForwardRef(provider.provide);\n // Construct a `Record` for the provider.\n var record = providerToRecord(provider);\n if (!isTypeProvider(provider) && provider.multi === true) {\n // If the provider indicates that it's a multi-provider, process it specially.\n // First check whether it's been defined already.\n var multiRecord_1 = this.records.get(token);\n if (multiRecord_1) {\n // It has. Throw a nice error if\n if (multiRecord_1.multi === undefined) {\n throw new Error(\"Mixed multi-provider for \" + token + \".\");\n }\n }\n else {\n token = provider;\n multiRecord_1 = makeRecord(undefined, NOT_YET, true);\n multiRecord_1.factory = function () { return injectArgs((multiRecord_1.multi)); };\n this.records.set(token, multiRecord_1);\n }\n token = provider;\n multiRecord_1.multi.push(provider);\n }\n var existing = this.records.get(token);\n if (existing && existing.multi !== undefined) {\n throw new Error(\"Mixed multi-provider for \" + token);\n }\n this.records.set(token, record);\n };\n R3Injector.prototype.hydrate = function (token, record) {\n if (record.value === CIRCULAR$1) {\n throw new Error(\"Circular dep for \" + stringify(token));\n }\n else if (record.value === NOT_YET) {\n record.value = CIRCULAR$1;\n record.value = record.factory();\n }\n if (typeof record.value === 'object' && record.value && hasOnDestroy(record.value)) {\n this.onDestroy.add(record.value);\n }\n return record.value;\n };\n R3Injector.prototype.injectableDefInScope = function (def) {\n if (!def.providedIn) {\n return false;\n }\n else if (typeof def.providedIn === 'string') {\n return def.providedIn === 'any' || (def.providedIn === 'root' && this.isRootInjector);\n }\n else {\n return this.injectorDefTypes.has(def.providedIn);\n }\n };\n return R3Injector;\n}());\nfunction injectableDefRecord(token) {\n var def = token.ngInjectableDef;\n if (def === undefined) {\n throw new Error(\"Type \" + stringify(token) + \" is missing an ngInjectableDef definition.\");\n }\n return makeRecord(def.factory);\n}\nfunction providerToRecord(provider) {\n var token = resolveForwardRef(provider);\n var value = NOT_YET;\n var factory = undefined;\n if (isTypeProvider(provider)) {\n return injectableDefRecord(provider);\n }\n else {\n token = resolveForwardRef(provider.provide);\n if (isValueProvider(provider)) {\n value = provider.useValue;\n }\n else if (isExistingProvider(provider)) {\n factory = function () { return inject(provider.useExisting); };\n }\n else if (isFactoryProvider(provider)) {\n factory = function () { return provider.useFactory.apply(provider, __spread(injectArgs(provider.deps || []))); };\n }\n else {\n var classRef_1 = provider.useClass || token;\n if (hasDeps(provider)) {\n factory = function () { return new ((classRef_1).bind.apply((classRef_1), __spread([void 0], injectArgs(provider.deps))))(); };\n }\n else {\n return injectableDefRecord(classRef_1);\n }\n }\n }\n return makeRecord(factory, value);\n}\nfunction makeRecord(factory, value, multi) {\n if (value === void 0) { value = NOT_YET; }\n if (multi === void 0) { multi = false; }\n return {\n factory: factory,\n value: value,\n multi: multi ? [] : undefined,\n };\n}\nfunction deepForEach(input, fn) {\n input.forEach(function (value) { return Array.isArray(value) ? deepForEach(value, fn) : fn(value); });\n}\nfunction isValueProvider(value) {\n return USE_VALUE$1 in value;\n}\nfunction isExistingProvider(value) {\n return !!value.useExisting;\n}\nfunction isFactoryProvider(value) {\n return !!value.useFactory;\n}\nfunction isTypeProvider(value) {\n return typeof value === 'function';\n}\nfunction hasDeps(value) {\n return !!value.deps;\n}\nfunction hasOnDestroy(value) {\n return typeof value === 'object' && value != null && value.ngOnDestroy &&\n typeof value.ngOnDestroy === 'function';\n}\nfunction couldBeInjectableType(value) {\n return (typeof value === 'function') ||\n (typeof value === 'object' && value instanceof InjectionToken);\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Determine if the argument is shaped like a Promise\n */\nfunction isPromise(obj) {\n // allow any Promise/A+ compliant thenable.\n // It's up to the caller to ensure that obj.then conforms to the spec\n return !!obj && typeof obj.then === 'function';\n}\n/**\n * Determine if the argument is an Observable\n */\nfunction isObservable(obj) {\n // TODO: use Symbol.observable when https://github.com/ReactiveX/rxjs/issues/2415 will be resolved\n return !!obj && typeof obj.subscribe === 'function';\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A function that will be executed when an application is initialized.\n * @experimental\n */\nvar APP_INITIALIZER = new InjectionToken('Application Initializer');\n/**\n * A class that reflects the state of running {@link APP_INITIALIZER}s.\n *\n * @experimental\n */\nvar ApplicationInitStatus = /** @class */ (function () {\n function ApplicationInitStatus(appInits) {\n var _this = this;\n this.appInits = appInits;\n this.initialized = false;\n this.done = false;\n this.donePromise = new Promise(function (res, rej) {\n _this.resolve = res;\n _this.reject = rej;\n });\n }\n /** @internal */\n /** @internal */\n ApplicationInitStatus.prototype.runInitializers = /** @internal */\n function () {\n var _this = this;\n if (this.initialized) {\n return;\n }\n var asyncInitPromises = [];\n var complete = function () {\n _this.done = true;\n _this.resolve();\n };\n if (this.appInits) {\n for (var i = 0; i < this.appInits.length; i++) {\n var initResult = this.appInits[i]();\n if (isPromise(initResult)) {\n asyncInitPromises.push(initResult);\n }\n }\n }\n Promise.all(asyncInitPromises).then(function () { complete(); }).catch(function (e) { _this.reject(e); });\n if (asyncInitPromises.length === 0) {\n complete();\n }\n this.initialized = true;\n };\n ApplicationInitStatus.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n ApplicationInitStatus.ctorParameters = function () { return [\n { type: Array, decorators: [{ type: Inject, args: [APP_INITIALIZER,] }, { type: Optional },] },\n ]; };\n return ApplicationInitStatus;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A DI Token representing a unique string id assigned to the application by Angular and used\n * primarily for prefixing application attributes and CSS styles when\n * {@link ViewEncapsulation#Emulated ViewEncapsulation.Emulated} is being used.\n *\n * If you need to avoid randomly generated value to be used as an application id, you can provide\n * a custom value via a DI provider <!-- TODO: provider --> configuring the root {@link Injector}\n * using this token.\n * @experimental\n */\nvar APP_ID = new InjectionToken('AppId');\nfunction _appIdRandomProviderFactory() {\n return \"\" + _randomChar() + _randomChar() + _randomChar();\n}\n/**\n * Providers that will generate a random APP_ID_TOKEN.\n * @experimental\n */\nvar APP_ID_RANDOM_PROVIDER = {\n provide: APP_ID,\n useFactory: _appIdRandomProviderFactory,\n deps: [],\n};\nfunction _randomChar() {\n return String.fromCharCode(97 + Math.floor(Math.random() * 25));\n}\n/**\n * A function that will be executed when a platform is initialized.\n * @experimental\n */\nvar PLATFORM_INITIALIZER = new InjectionToken('Platform Initializer');\n/**\n * A token that indicates an opaque platform id.\n * @experimental\n */\nvar PLATFORM_ID = new InjectionToken('Platform ID');\n/**\n * All callbacks provided via this token will be called for every component that is bootstrapped.\n * Signature of the callback:\n *\n * `(componentRef: ComponentRef) => void`.\n *\n * @experimental\n */\nvar APP_BOOTSTRAP_LISTENER = new InjectionToken('appBootstrapListener');\n/**\n * A token which indicates the root directory of the application\n * @experimental\n */\nvar PACKAGE_ROOT_URL = new InjectionToken('Application Packages Root URL');\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar Console = /** @class */ (function () {\n function Console() {\n }\n Console.prototype.log = function (message) {\n // tslint:disable-next-line:no-console\n console.log(message);\n };\n // Note: for reporting errors use `DOM.logError()` as it is platform specific\n // Note: for reporting errors use `DOM.logError()` as it is platform specific\n Console.prototype.warn = \n // Note: for reporting errors use `DOM.logError()` as it is platform specific\n function (message) {\n // tslint:disable-next-line:no-console\n console.warn(message);\n };\n Console.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n Console.ctorParameters = function () { return []; };\n return Console;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Combination of NgModuleFactory and ComponentFactorys.\n *\n * @experimental\n */\nvar ModuleWithComponentFactories = /** @class */ (function () {\n function ModuleWithComponentFactories(ngModuleFactory, componentFactories) {\n this.ngModuleFactory = ngModuleFactory;\n this.componentFactories = componentFactories;\n }\n return ModuleWithComponentFactories;\n}());\nfunction _throwError() {\n throw new Error(\"Runtime compiler is not loaded\");\n}\n/**\n * Low-level service for running the angular compiler during runtime\n * to create {@link ComponentFactory}s, which\n * can later be used to create and render a Component instance.\n *\n * Each `@NgModule` provides an own `Compiler` to its injector,\n * that will use the directives/pipes of the ng module for compilation\n * of components.\n *\n */\nvar Compiler = /** @class */ (function () {\n function Compiler() {\n }\n /**\n * Compiles the given NgModule and all of its components. All templates of the components listed\n * in `entryComponents` have to be inlined.\n */\n /**\n * Compiles the given NgModule and all of its components. All templates of the components listed\n * in `entryComponents` have to be inlined.\n */\n Compiler.prototype.compileModuleSync = /**\n * Compiles the given NgModule and all of its components. All templates of the components listed\n * in `entryComponents` have to be inlined.\n */\n function (moduleType) { throw _throwError(); };\n /**\n * Compiles the given NgModule and all of its components\n */\n /**\n * Compiles the given NgModule and all of its components\n */\n Compiler.prototype.compileModuleAsync = /**\n * Compiles the given NgModule and all of its components\n */\n function (moduleType) { throw _throwError(); };\n /**\n * Same as {@link #compileModuleSync} but also creates ComponentFactories for all components.\n */\n /**\n * Same as {@link #compileModuleSync} but also creates ComponentFactories for all components.\n */\n Compiler.prototype.compileModuleAndAllComponentsSync = /**\n * Same as {@link #compileModuleSync} but also creates ComponentFactories for all components.\n */\n function (moduleType) {\n throw _throwError();\n };\n /**\n * Same as {@link #compileModuleAsync} but also creates ComponentFactories for all components.\n */\n /**\n * Same as {@link #compileModuleAsync} but also creates ComponentFactories for all components.\n */\n Compiler.prototype.compileModuleAndAllComponentsAsync = /**\n * Same as {@link #compileModuleAsync} but also creates ComponentFactories for all components.\n */\n function (moduleType) {\n throw _throwError();\n };\n /**\n * Clears all caches.\n */\n /**\n * Clears all caches.\n */\n Compiler.prototype.clearCache = /**\n * Clears all caches.\n */\n function () { };\n /**\n * Clears the cache for the given component/ngModule.\n */\n /**\n * Clears the cache for the given component/ngModule.\n */\n Compiler.prototype.clearCacheFor = /**\n * Clears the cache for the given component/ngModule.\n */\n function (type) { };\n Compiler.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n Compiler.ctorParameters = function () { return []; };\n return Compiler;\n}());\n/**\n * Token to provide CompilerOptions in the platform injector.\n *\n * @experimental\n */\nvar COMPILER_OPTIONS = new InjectionToken('compilerOptions');\n/**\n * A factory for creating a Compiler\n *\n * @experimental\n */\nvar CompilerFactory = /** @class */ (function () {\n function CompilerFactory() {\n }\n return CompilerFactory;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Represents an instance of a Component created via a {@link ComponentFactory}.\n *\n * `ComponentRef` provides access to the Component Instance as well other objects related to this\n * Component Instance and allows you to destroy the Component Instance via the {@link #destroy}\n * method.\n *\n */\nvar ComponentRef = /** @class */ (function () {\n function ComponentRef() {\n }\n return ComponentRef;\n}());\nvar ComponentFactory = /** @class */ (function () {\n function ComponentFactory() {\n }\n return ComponentFactory;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction noComponentFactoryError(component) {\n var error = Error(\"No component factory found for \" + stringify(component) + \". Did you add it to @NgModule.entryComponents?\");\n error[ERROR_COMPONENT] = component;\n return error;\n}\nvar ERROR_COMPONENT = 'ngComponent';\n\nvar _NullComponentFactoryResolver = /** @class */ (function () {\n function _NullComponentFactoryResolver() {\n }\n _NullComponentFactoryResolver.prototype.resolveComponentFactory = function (component) {\n throw noComponentFactoryError(component);\n };\n return _NullComponentFactoryResolver;\n}());\nvar ComponentFactoryResolver = /** @class */ (function () {\n function ComponentFactoryResolver() {\n }\n ComponentFactoryResolver.NULL = new _NullComponentFactoryResolver();\n return ComponentFactoryResolver;\n}());\nvar CodegenComponentFactoryResolver = /** @class */ (function () {\n function CodegenComponentFactoryResolver(factories, _parent, _ngModule) {\n this._parent = _parent;\n this._ngModule = _ngModule;\n this._factories = new Map();\n for (var i = 0; i < factories.length; i++) {\n var factory = factories[i];\n this._factories.set(factory.componentType, factory);\n }\n }\n CodegenComponentFactoryResolver.prototype.resolveComponentFactory = function (component) {\n var factory = this._factories.get(component);\n if (!factory && this._parent) {\n factory = this._parent.resolveComponentFactory(component);\n }\n if (!factory) {\n throw noComponentFactoryError(component);\n }\n return new ComponentFactoryBoundToModule(factory, this._ngModule);\n };\n return CodegenComponentFactoryResolver;\n}());\nvar ComponentFactoryBoundToModule = /** @class */ (function (_super) {\n __extends(ComponentFactoryBoundToModule, _super);\n function ComponentFactoryBoundToModule(factory, ngModule) {\n var _this = _super.call(this) || this;\n _this.factory = factory;\n _this.ngModule = ngModule;\n _this.selector = factory.selector;\n _this.componentType = factory.componentType;\n _this.ngContentSelectors = factory.ngContentSelectors;\n _this.inputs = factory.inputs;\n _this.outputs = factory.outputs;\n return _this;\n }\n ComponentFactoryBoundToModule.prototype.create = function (injector, projectableNodes, rootSelectorOrNode, ngModule) {\n return this.factory.create(injector, projectableNodes, rootSelectorOrNode, ngModule || this.ngModule);\n };\n return ComponentFactoryBoundToModule;\n}(ComponentFactory));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Represents an instance of an NgModule created via a {@link NgModuleFactory}.\n *\n * `NgModuleRef` provides access to the NgModule Instance as well other objects related to this\n * NgModule Instance.\n *\n *\n */\nvar NgModuleRef = /** @class */ (function () {\n function NgModuleRef() {\n }\n return NgModuleRef;\n}());\n/**\n * @experimental\n */\nvar NgModuleFactory = /** @class */ (function () {\n function NgModuleFactory() {\n }\n return NgModuleFactory;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar trace;\nvar events;\nfunction detectWTF() {\n var wtf = _global /** TODO #9100 */['wtf'];\n if (wtf) {\n trace = wtf['trace'];\n if (trace) {\n events = trace['events'];\n return true;\n }\n }\n return false;\n}\nfunction createScope(signature, flags) {\n if (flags === void 0) { flags = null; }\n return events.createScope(signature, flags);\n}\nfunction leave(scope, returnValue) {\n trace.leaveScope(scope, returnValue);\n return returnValue;\n}\nfunction startTimeRange(rangeType, action) {\n return trace.beginTimeRange(rangeType, action);\n}\nfunction endTimeRange(range) {\n trace.endTimeRange(range);\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * True if WTF is enabled.\n */\nvar wtfEnabled = detectWTF();\nfunction noopScope(arg0, arg1) {\n return null;\n}\n/**\n * Create trace scope.\n *\n * Scopes must be strictly nested and are analogous to stack frames, but\n * do not have to follow the stack frames. Instead it is recommended that they follow logical\n * nesting. You may want to use\n * [Event\n * Signatures](http://google.github.io/tracing-framework/instrumenting-code.html#custom-events)\n * as they are defined in WTF.\n *\n * Used to mark scope entry. The return value is used to leave the scope.\n *\n * var myScope = wtfCreateScope('MyClass#myMethod(ascii someVal)');\n *\n * someMethod() {\n * var s = myScope('Foo'); // 'Foo' gets stored in tracing UI\n * // DO SOME WORK HERE\n * return wtfLeave(s, 123); // Return value 123\n * }\n *\n * Note, adding try-finally block around the work to ensure that `wtfLeave` gets called can\n * negatively impact the performance of your application. For this reason we recommend that\n * you don't add them to ensure that `wtfLeave` gets called. In production `wtfLeave` is a noop and\n * so try-finally block has no value. When debugging perf issues, skipping `wtfLeave`, do to\n * exception, will produce incorrect trace, but presence of exception signifies logic error which\n * needs to be fixed before the app should be profiled. Add try-finally only when you expect that\n * an exception is expected during normal execution while profiling.\n *\n * @experimental\n */\nvar wtfCreateScope = wtfEnabled ? createScope : function (signature, flags) { return noopScope; };\n/**\n * Used to mark end of Scope.\n *\n * - `scope` to end.\n * - `returnValue` (optional) to be passed to the WTF.\n *\n * Returns the `returnValue for easy chaining.\n * @experimental\n */\nvar wtfLeave = wtfEnabled ? leave : function (s, r) { return r; };\n/**\n * Used to mark Async start. Async are similar to scope but they don't have to be strictly nested.\n * The return value is used in the call to [endAsync]. Async ranges only work if WTF has been\n * enabled.\n *\n * someMethod() {\n * var s = wtfStartTimeRange('HTTP:GET', 'some.url');\n * var future = new Future.delay(5).then((_) {\n * wtfEndTimeRange(s);\n * });\n * }\n * @experimental\n */\nvar wtfStartTimeRange = wtfEnabled ? startTimeRange : function (rangeType, action) { return null; };\n/**\n * Ends a async time range operation.\n * [range] is the return value from [wtfStartTimeRange] Async ranges only work if WTF has been\n * enabled.\n * @experimental\n */\nvar wtfEndTimeRange = wtfEnabled ? endTimeRange : function (r) { return null; };\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * Use by directives and components to emit custom Events.\n *\n * ### Examples\n *\n * In the following example, `Zippy` alternatively emits `open` and `close` events when its\n * title gets clicked:\n *\n * ```\n * @Component({\n * selector: 'zippy',\n * template: `\n * <div class=\"zippy\">\n * <div (click)=\"toggle()\">Toggle</div>\n * <div [hidden]=\"!visible\">\n * <ng-content></ng-content>\n * </div>\n * </div>`})\n * export class Zippy {\n * visible: boolean = true;\n * @Output() open: EventEmitter<any> = new EventEmitter();\n * @Output() close: EventEmitter<any> = new EventEmitter();\n *\n * toggle() {\n * this.visible = !this.visible;\n * if (this.visible) {\n * this.open.emit(null);\n * } else {\n * this.close.emit(null);\n * }\n * }\n * }\n * ```\n *\n * The events payload can be accessed by the parameter `$event` on the components output event\n * handler:\n *\n * ```\n * <zippy (open)=\"onOpen($event)\" (close)=\"onClose($event)\"></zippy>\n * ```\n *\n * Uses Rx.Observable but provides an adapter to make it work as specified here:\n * https://github.com/jhusain/observable-spec\n *\n * Once a reference implementation of the spec is available, switch to it.\n *\n */\nvar EventEmitter = /** @class */ (function (_super) {\n __extends(EventEmitter, _super);\n /**\n * Creates an instance of {@link EventEmitter}, which depending on `isAsync`,\n * delivers events synchronously or asynchronously.\n *\n * @param isAsync By default, events are delivered synchronously (default value: `false`).\n * Set to `true` for asynchronous event delivery.\n */\n function EventEmitter(isAsync) {\n if (isAsync === void 0) { isAsync = false; }\n var _this = _super.call(this) || this;\n _this.__isAsync = isAsync;\n return _this;\n }\n EventEmitter.prototype.emit = function (value) { _super.prototype.next.call(this, value); };\n EventEmitter.prototype.subscribe = function (generatorOrNext, error, complete) {\n var schedulerFn;\n var errorFn = function (err) { return null; };\n var completeFn = function () { return null; };\n if (generatorOrNext && typeof generatorOrNext === 'object') {\n schedulerFn = this.__isAsync ? function (value) {\n setTimeout(function () { return generatorOrNext.next(value); });\n } : function (value) { generatorOrNext.next(value); };\n if (generatorOrNext.error) {\n errorFn = this.__isAsync ? function (err) { setTimeout(function () { return generatorOrNext.error(err); }); } :\n function (err) { generatorOrNext.error(err); };\n }\n if (generatorOrNext.complete) {\n completeFn = this.__isAsync ? function () { setTimeout(function () { return generatorOrNext.complete(); }); } :\n function () { generatorOrNext.complete(); };\n }\n }\n else {\n schedulerFn = this.__isAsync ? function (value) { setTimeout(function () { return generatorOrNext(value); }); } :\n function (value) { generatorOrNext(value); };\n if (error) {\n errorFn =\n this.__isAsync ? function (err) { setTimeout(function () { return error(err); }); } : function (err) { error(err); };\n }\n if (complete) {\n completeFn =\n this.__isAsync ? function () { setTimeout(function () { return complete(); }); } : function () { complete(); };\n }\n }\n var sink = _super.prototype.subscribe.call(this, schedulerFn, errorFn, completeFn);\n if (generatorOrNext instanceof rxjs.Subscription) {\n generatorOrNext.add(sink);\n }\n return sink;\n };\n return EventEmitter;\n}(rxjs.Subject));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * An injectable service for executing work inside or outside of the Angular zone.\n *\n * The most common use of this service is to optimize performance when starting a work consisting of\n * one or more asynchronous tasks that don't require UI updates or error handling to be handled by\n * Angular. Such tasks can be kicked off via {@link #runOutsideAngular} and if needed, these tasks\n * can reenter the Angular zone via {@link #run}.\n *\n * <!-- TODO: add/fix links to:\n * - docs explaining zones and the use of zones in Angular and change-detection\n * - link to runOutsideAngular/run (throughout this file!)\n * -->\n *\n * ### Example\n *\n * ```\n * import {Component, NgZone} from '@angular/core';\n * import {NgIf} from '@angular/common';\n *\n * @Component({\n * selector: 'ng-zone-demo',\n * template: `\n * <h2>Demo: NgZone</h2>\n *\n * <p>Progress: {{progress}}%</p>\n * <p *ngIf=\"progress >= 100\">Done processing {{label}} of Angular zone!</p>\n *\n * <button (click)=\"processWithinAngularZone()\">Process within Angular zone</button>\n * <button (click)=\"processOutsideOfAngularZone()\">Process outside of Angular zone</button>\n * `,\n * })\n * export class NgZoneDemo {\n * progress: number = 0;\n * label: string;\n *\n * constructor(private _ngZone: NgZone) {}\n *\n * // Loop inside the Angular zone\n * // so the UI DOES refresh after each setTimeout cycle\n * processWithinAngularZone() {\n * this.label = 'inside';\n * this.progress = 0;\n * this._increaseProgress(() => console.log('Inside Done!'));\n * }\n *\n * // Loop outside of the Angular zone\n * // so the UI DOES NOT refresh after each setTimeout cycle\n * processOutsideOfAngularZone() {\n * this.label = 'outside';\n * this.progress = 0;\n * this._ngZone.runOutsideAngular(() => {\n * this._increaseProgress(() => {\n * // reenter the Angular zone and display done\n * this._ngZone.run(() => { console.log('Outside Done!'); });\n * });\n * });\n * }\n *\n * _increaseProgress(doneCallback: () => void) {\n * this.progress += 1;\n * console.log(`Current progress: ${this.progress}%`);\n *\n * if (this.progress < 100) {\n * window.setTimeout(() => this._increaseProgress(doneCallback), 10);\n * } else {\n * doneCallback();\n * }\n * }\n * }\n * ```\n *\n * @experimental\n */\nvar NgZone = /** @class */ (function () {\n function NgZone(_a) {\n var _b = _a.enableLongStackTrace, enableLongStackTrace = _b === void 0 ? false : _b;\n this.hasPendingMicrotasks = false;\n this.hasPendingMacrotasks = false;\n /**\n * Whether there are no outstanding microtasks or macrotasks.\n */\n this.isStable = true;\n /**\n * Notifies when code enters Angular Zone. This gets fired first on VM Turn.\n */\n this.onUnstable = new EventEmitter(false);\n /**\n * Notifies when there is no more microtasks enqueued in the current VM Turn.\n * This is a hint for Angular to do change detection, which may enqueue more microtasks.\n * For this reason this event can fire multiple times per VM Turn.\n */\n this.onMicrotaskEmpty = new EventEmitter(false);\n /**\n * Notifies when the last `onMicrotaskEmpty` has run and there are no more microtasks, which\n * implies we are about to relinquish VM turn.\n * This event gets called just once.\n */\n this.onStable = new EventEmitter(false);\n /**\n * Notifies that an error has been delivered.\n */\n this.onError = new EventEmitter(false);\n if (typeof Zone == 'undefined') {\n throw new Error(\"In this configuration Angular requires Zone.js\");\n }\n Zone.assertZonePatched();\n var self = this;\n self._nesting = 0;\n self._outer = self._inner = Zone.current;\n if (Zone['wtfZoneSpec']) {\n self._inner = self._inner.fork(Zone['wtfZoneSpec']);\n }\n if (Zone['TaskTrackingZoneSpec']) {\n self._inner = self._inner.fork(new Zone['TaskTrackingZoneSpec']);\n }\n if (enableLongStackTrace && Zone['longStackTraceZoneSpec']) {\n self._inner = self._inner.fork(Zone['longStackTraceZoneSpec']);\n }\n forkInnerZoneWithAngularBehavior(self);\n }\n NgZone.isInAngularZone = function () { return Zone.current.get('isAngularZone') === true; };\n NgZone.assertInAngularZone = function () {\n if (!NgZone.isInAngularZone()) {\n throw new Error('Expected to be in Angular Zone, but it is not!');\n }\n };\n NgZone.assertNotInAngularZone = function () {\n if (NgZone.isInAngularZone()) {\n throw new Error('Expected to not be in Angular Zone, but it is!');\n }\n };\n /**\n * Executes the `fn` function synchronously within the Angular zone and returns value returned by\n * the function.\n *\n * Running functions via `run` allows you to reenter Angular zone from a task that was executed\n * outside of the Angular zone (typically started via {@link #runOutsideAngular}).\n *\n * Any future tasks or microtasks scheduled from within this function will continue executing from\n * within the Angular zone.\n *\n * If a synchronous error happens it will be rethrown and not reported via `onError`.\n */\n /**\n * Executes the `fn` function synchronously within the Angular zone and returns value returned by\n * the function.\n *\n * Running functions via `run` allows you to reenter Angular zone from a task that was executed\n * outside of the Angular zone (typically started via {@link #runOutsideAngular}).\n *\n * Any future tasks or microtasks scheduled from within this function will continue executing from\n * within the Angular zone.\n *\n * If a synchronous error happens it will be rethrown and not reported via `onError`.\n */\n NgZone.prototype.run = /**\n * Executes the `fn` function synchronously within the Angular zone and returns value returned by\n * the function.\n *\n * Running functions via `run` allows you to reenter Angular zone from a task that was executed\n * outside of the Angular zone (typically started via {@link #runOutsideAngular}).\n *\n * Any future tasks or microtasks scheduled from within this function will continue executing from\n * within the Angular zone.\n *\n * If a synchronous error happens it will be rethrown and not reported via `onError`.\n */\n function (fn, applyThis, applyArgs) {\n return this._inner.run(fn, applyThis, applyArgs);\n };\n /**\n * Executes the `fn` function synchronously within the Angular zone as a task and returns value\n * returned by the function.\n *\n * Running functions via `run` allows you to reenter Angular zone from a task that was executed\n * outside of the Angular zone (typically started via {@link #runOutsideAngular}).\n *\n * Any future tasks or microtasks scheduled from within this function will continue executing from\n * within the Angular zone.\n *\n * If a synchronous error happens it will be rethrown and not reported via `onError`.\n */\n /**\n * Executes the `fn` function synchronously within the Angular zone as a task and returns value\n * returned by the function.\n *\n * Running functions via `run` allows you to reenter Angular zone from a task that was executed\n * outside of the Angular zone (typically started via {@link #runOutsideAngular}).\n *\n * Any future tasks or microtasks scheduled from within this function will continue executing from\n * within the Angular zone.\n *\n * If a synchronous error happens it will be rethrown and not reported via `onError`.\n */\n NgZone.prototype.runTask = /**\n * Executes the `fn` function synchronously within the Angular zone as a task and returns value\n * returned by the function.\n *\n * Running functions via `run` allows you to reenter Angular zone from a task that was executed\n * outside of the Angular zone (typically started via {@link #runOutsideAngular}).\n *\n * Any future tasks or microtasks scheduled from within this function will continue executing from\n * within the Angular zone.\n *\n * If a synchronous error happens it will be rethrown and not reported via `onError`.\n */\n function (fn, applyThis, applyArgs, name) {\n var zone = this._inner;\n var task = zone.scheduleEventTask('NgZoneEvent: ' + name, fn, EMPTY_PAYLOAD, noop, noop);\n try {\n return zone.runTask(task, applyThis, applyArgs);\n }\n finally {\n zone.cancelTask(task);\n }\n };\n /**\n * Same as `run`, except that synchronous errors are caught and forwarded via `onError` and not\n * rethrown.\n */\n /**\n * Same as `run`, except that synchronous errors are caught and forwarded via `onError` and not\n * rethrown.\n */\n NgZone.prototype.runGuarded = /**\n * Same as `run`, except that synchronous errors are caught and forwarded via `onError` and not\n * rethrown.\n */\n function (fn, applyThis, applyArgs) {\n return this._inner.runGuarded(fn, applyThis, applyArgs);\n };\n /**\n * Executes the `fn` function synchronously in Angular's parent zone and returns value returned by\n * the function.\n *\n * Running functions via {@link #runOutsideAngular} allows you to escape Angular's zone and do\n * work that\n * doesn't trigger Angular change-detection or is subject to Angular's error handling.\n *\n * Any future tasks or microtasks scheduled from within this function will continue executing from\n * outside of the Angular zone.\n *\n * Use {@link #run} to reenter the Angular zone and do work that updates the application model.\n */\n /**\n * Executes the `fn` function synchronously in Angular's parent zone and returns value returned by\n * the function.\n *\n * Running functions via {@link #runOutsideAngular} allows you to escape Angular's zone and do\n * work that\n * doesn't trigger Angular change-detection or is subject to Angular's error handling.\n *\n * Any future tasks or microtasks scheduled from within this function will continue executing from\n * outside of the Angular zone.\n *\n * Use {@link #run} to reenter the Angular zone and do work that updates the application model.\n */\n NgZone.prototype.runOutsideAngular = /**\n * Executes the `fn` function synchronously in Angular's parent zone and returns value returned by\n * the function.\n *\n * Running functions via {@link #runOutsideAngular} allows you to escape Angular's zone and do\n * work that\n * doesn't trigger Angular change-detection or is subject to Angular's error handling.\n *\n * Any future tasks or microtasks scheduled from within this function will continue executing from\n * outside of the Angular zone.\n *\n * Use {@link #run} to reenter the Angular zone and do work that updates the application model.\n */\n function (fn) {\n return this._outer.run(fn);\n };\n return NgZone;\n}());\nfunction noop() { }\nvar EMPTY_PAYLOAD = {};\nfunction checkStable(zone) {\n if (zone._nesting == 0 && !zone.hasPendingMicrotasks && !zone.isStable) {\n try {\n zone._nesting++;\n zone.onMicrotaskEmpty.emit(null);\n }\n finally {\n zone._nesting--;\n if (!zone.hasPendingMicrotasks) {\n try {\n zone.runOutsideAngular(function () { return zone.onStable.emit(null); });\n }\n finally {\n zone.isStable = true;\n }\n }\n }\n }\n}\nfunction forkInnerZoneWithAngularBehavior(zone) {\n zone._inner = zone._inner.fork({\n name: 'angular',\n properties: { 'isAngularZone': true },\n onInvokeTask: function (delegate, current, target, task, applyThis, applyArgs) {\n try {\n onEnter(zone);\n return delegate.invokeTask(target, task, applyThis, applyArgs);\n }\n finally {\n onLeave(zone);\n }\n },\n onInvoke: function (delegate, current, target, callback, applyThis, applyArgs, source) {\n try {\n onEnter(zone);\n return delegate.invoke(target, callback, applyThis, applyArgs, source);\n }\n finally {\n onLeave(zone);\n }\n },\n onHasTask: function (delegate, current, target, hasTaskState) {\n delegate.hasTask(target, hasTaskState);\n if (current === target) {\n // We are only interested in hasTask events which originate from our zone\n // (A child hasTask event is not interesting to us)\n if (hasTaskState.change == 'microTask') {\n zone.hasPendingMicrotasks = hasTaskState.microTask;\n checkStable(zone);\n }\n else if (hasTaskState.change == 'macroTask') {\n zone.hasPendingMacrotasks = hasTaskState.macroTask;\n }\n }\n },\n onHandleError: function (delegate, current, target, error) {\n delegate.handleError(target, error);\n zone.runOutsideAngular(function () { return zone.onError.emit(error); });\n return false;\n }\n });\n}\nfunction onEnter(zone) {\n zone._nesting++;\n if (zone.isStable) {\n zone.isStable = false;\n zone.onUnstable.emit(null);\n }\n}\nfunction onLeave(zone) {\n zone._nesting--;\n checkStable(zone);\n}\n/**\n * Provides a noop implementation of `NgZone` which does nothing. This zone requires explicit calls\n * to framework to perform rendering.\n */\nvar NoopNgZone = /** @class */ (function () {\n function NoopNgZone() {\n this.hasPendingMicrotasks = false;\n this.hasPendingMacrotasks = false;\n this.isStable = true;\n this.onUnstable = new EventEmitter();\n this.onMicrotaskEmpty = new EventEmitter();\n this.onStable = new EventEmitter();\n this.onError = new EventEmitter();\n }\n NoopNgZone.prototype.run = function (fn) { return fn(); };\n NoopNgZone.prototype.runGuarded = function (fn) { return fn(); };\n NoopNgZone.prototype.runOutsideAngular = function (fn) { return fn(); };\n NoopNgZone.prototype.runTask = function (fn) { return fn(); };\n return NoopNgZone;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * The Testability service provides testing hooks that can be accessed from\n * the browser and by services such as Protractor. Each bootstrapped Angular\n * application on the page will have an instance of Testability.\n * @experimental\n */\nvar Testability = /** @class */ (function () {\n function Testability(_ngZone) {\n var _this = this;\n this._ngZone = _ngZone;\n this._pendingCount = 0;\n this._isZoneStable = true;\n /**\n * Whether any work was done since the last 'whenStable' callback. This is\n * useful to detect if this could have potentially destabilized another\n * component while it is stabilizing.\n * @internal\n */\n this._didWork = false;\n this._callbacks = [];\n this._watchAngularEvents();\n _ngZone.run(function () { _this.taskTrackingZone = Zone.current.get('TaskTrackingZone'); });\n }\n Testability.prototype._watchAngularEvents = function () {\n var _this = this;\n this._ngZone.onUnstable.subscribe({\n next: function () {\n _this._didWork = true;\n _this._isZoneStable = false;\n }\n });\n this._ngZone.runOutsideAngular(function () {\n _this._ngZone.onStable.subscribe({\n next: function () {\n NgZone.assertNotInAngularZone();\n scheduleMicroTask(function () {\n _this._isZoneStable = true;\n _this._runCallbacksIfReady();\n });\n }\n });\n });\n };\n /**\n * Increases the number of pending request\n * @deprecated pending requests are now tracked with zones.\n */\n /**\n * Increases the number of pending request\n * @deprecated pending requests are now tracked with zones.\n */\n Testability.prototype.increasePendingRequestCount = /**\n * Increases the number of pending request\n * @deprecated pending requests are now tracked with zones.\n */\n function () {\n this._pendingCount += 1;\n this._didWork = true;\n return this._pendingCount;\n };\n /**\n * Decreases the number of pending request\n * @deprecated pending requests are now tracked with zones\n */\n /**\n * Decreases the number of pending request\n * @deprecated pending requests are now tracked with zones\n */\n Testability.prototype.decreasePendingRequestCount = /**\n * Decreases the number of pending request\n * @deprecated pending requests are now tracked with zones\n */\n function () {\n this._pendingCount -= 1;\n if (this._pendingCount < 0) {\n throw new Error('pending async requests below zero');\n }\n this._runCallbacksIfReady();\n return this._pendingCount;\n };\n /**\n * Whether an associated application is stable\n */\n /**\n * Whether an associated application is stable\n */\n Testability.prototype.isStable = /**\n * Whether an associated application is stable\n */\n function () {\n return this._isZoneStable && this._pendingCount === 0 && !this._ngZone.hasPendingMacrotasks;\n };\n Testability.prototype._runCallbacksIfReady = function () {\n var _this = this;\n if (this.isStable()) {\n // Schedules the call backs in a new frame so that it is always async.\n scheduleMicroTask(function () {\n while (_this._callbacks.length !== 0) {\n var cb = (_this._callbacks.pop());\n clearTimeout(cb.timeoutId);\n cb.doneCb(_this._didWork);\n }\n _this._didWork = false;\n });\n }\n else {\n // Still not stable, send updates.\n var pending_1 = this.getPendingTasks();\n this._callbacks = this._callbacks.filter(function (cb) {\n if (cb.updateCb && cb.updateCb(pending_1)) {\n clearTimeout(cb.timeoutId);\n return false;\n }\n return true;\n });\n this._didWork = true;\n }\n };\n Testability.prototype.getPendingTasks = function () {\n if (!this.taskTrackingZone) {\n return [];\n }\n return this.taskTrackingZone.macroTasks.map(function (t) {\n return {\n source: t.source,\n isPeriodic: t.data.isPeriodic,\n delay: t.data.delay,\n // From TaskTrackingZone:\n // https://github.com/angular/zone.js/blob/master/lib/zone-spec/task-tracking.ts#L40\n creationLocation: t.creationLocation,\n // Added by Zones for XHRs\n // https://github.com/angular/zone.js/blob/master/lib/browser/browser.ts#L133\n xhr: t.data.target\n };\n });\n };\n Testability.prototype.addCallback = function (cb, timeout, updateCb) {\n var _this = this;\n var timeoutId = -1;\n if (timeout && timeout > 0) {\n timeoutId = setTimeout(function () {\n _this._callbacks = _this._callbacks.filter(function (cb) { return cb.timeoutId !== timeoutId; });\n cb(_this._didWork, _this.getPendingTasks());\n }, timeout);\n }\n this._callbacks.push({ doneCb: cb, timeoutId: timeoutId, updateCb: updateCb });\n };\n /**\n * Wait for the application to be stable with a timeout. If the timeout is reached before that\n * happens, the callback receives a list of the macro tasks that were pending, otherwise null.\n *\n * @param doneCb The callback to invoke when Angular is stable or the timeout expires\n * whichever comes first.\n * @param timeout Optional. The maximum time to wait for Angular to become stable. If not\n * specified, whenStable() will wait forever.\n * @param updateCb Optional. If specified, this callback will be invoked whenever the set of\n * pending macrotasks changes. If this callback returns true doneCb will not be invoked\n * and no further updates will be issued.\n */\n /**\n * Wait for the application to be stable with a timeout. If the timeout is reached before that\n * happens, the callback receives a list of the macro tasks that were pending, otherwise null.\n *\n * @param doneCb The callback to invoke when Angular is stable or the timeout expires\n * whichever comes first.\n * @param timeout Optional. The maximum time to wait for Angular to become stable. If not\n * specified, whenStable() will wait forever.\n * @param updateCb Optional. If specified, this callback will be invoked whenever the set of\n * pending macrotasks changes. If this callback returns true doneCb will not be invoked\n * and no further updates will be issued.\n */\n Testability.prototype.whenStable = /**\n * Wait for the application to be stable with a timeout. If the timeout is reached before that\n * happens, the callback receives a list of the macro tasks that were pending, otherwise null.\n *\n * @param doneCb The callback to invoke when Angular is stable or the timeout expires\n * whichever comes first.\n * @param timeout Optional. The maximum time to wait for Angular to become stable. If not\n * specified, whenStable() will wait forever.\n * @param updateCb Optional. If specified, this callback will be invoked whenever the set of\n * pending macrotasks changes. If this callback returns true doneCb will not be invoked\n * and no further updates will be issued.\n */\n function (doneCb, timeout, updateCb) {\n if (updateCb && !this.taskTrackingZone) {\n throw new Error('Task tracking zone is required when passing an update callback to ' +\n 'whenStable(). Is \"zone.js/dist/task-tracking.js\" loaded?');\n }\n // These arguments are 'Function' above to keep the public API simple.\n this.addCallback(doneCb, timeout, updateCb);\n this._runCallbacksIfReady();\n };\n /**\n * Get the number of pending requests\n * @deprecated pending requests are now tracked with zones\n */\n /**\n * Get the number of pending requests\n * @deprecated pending requests are now tracked with zones\n */\n Testability.prototype.getPendingRequestCount = /**\n * Get the number of pending requests\n * @deprecated pending requests are now tracked with zones\n */\n function () { return this._pendingCount; };\n /**\n * Find providers by name\n * @param using The root element to search from\n * @param provider The name of binding variable\n * @param exactMatch Whether using exactMatch\n */\n /**\n * Find providers by name\n * @param using The root element to search from\n * @param provider The name of binding variable\n * @param exactMatch Whether using exactMatch\n */\n Testability.prototype.findProviders = /**\n * Find providers by name\n * @param using The root element to search from\n * @param provider The name of binding variable\n * @param exactMatch Whether using exactMatch\n */\n function (using, provider, exactMatch) {\n // TODO(juliemr): implement.\n return [];\n };\n Testability.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n Testability.ctorParameters = function () { return [\n { type: NgZone, },\n ]; };\n return Testability;\n}());\n/**\n * A global registry of {@link Testability} instances for specific elements.\n * @experimental\n */\nvar TestabilityRegistry = /** @class */ (function () {\n function TestabilityRegistry() {\n /** @internal */\n this._applications = new Map();\n _testabilityGetter.addToWindow(this);\n }\n /**\n * Registers an application with a testability hook so that it can be tracked\n * @param token token of application, root element\n * @param testability Testability hook\n */\n /**\n * Registers an application with a testability hook so that it can be tracked\n * @param token token of application, root element\n * @param testability Testability hook\n */\n TestabilityRegistry.prototype.registerApplication = /**\n * Registers an application with a testability hook so that it can be tracked\n * @param token token of application, root element\n * @param testability Testability hook\n */\n function (token, testability) {\n this._applications.set(token, testability);\n };\n /**\n * Unregisters an application.\n * @param token token of application, root element\n */\n /**\n * Unregisters an application.\n * @param token token of application, root element\n */\n TestabilityRegistry.prototype.unregisterApplication = /**\n * Unregisters an application.\n * @param token token of application, root element\n */\n function (token) { this._applications.delete(token); };\n /**\n * Unregisters all applications\n */\n /**\n * Unregisters all applications\n */\n TestabilityRegistry.prototype.unregisterAllApplications = /**\n * Unregisters all applications\n */\n function () { this._applications.clear(); };\n /**\n * Get a testability hook associated with the application\n * @param elem root element\n */\n /**\n * Get a testability hook associated with the application\n * @param elem root element\n */\n TestabilityRegistry.prototype.getTestability = /**\n * Get a testability hook associated with the application\n * @param elem root element\n */\n function (elem) { return this._applications.get(elem) || null; };\n /**\n * Get all registered testabilities\n */\n /**\n * Get all registered testabilities\n */\n TestabilityRegistry.prototype.getAllTestabilities = /**\n * Get all registered testabilities\n */\n function () { return Array.from(this._applications.values()); };\n /**\n * Get all registered applications(root elements)\n */\n /**\n * Get all registered applications(root elements)\n */\n TestabilityRegistry.prototype.getAllRootElements = /**\n * Get all registered applications(root elements)\n */\n function () { return Array.from(this._applications.keys()); };\n /**\n * Find testability of a node in the Tree\n * @param elem node\n * @param findInAncestors whether finding testability in ancestors if testability was not found in\n * current node\n */\n /**\n * Find testability of a node in the Tree\n * @param elem node\n * @param findInAncestors whether finding testability in ancestors if testability was not found in\n * current node\n */\n TestabilityRegistry.prototype.findTestabilityInTree = /**\n * Find testability of a node in the Tree\n * @param elem node\n * @param findInAncestors whether finding testability in ancestors if testability was not found in\n * current node\n */\n function (elem, findInAncestors) {\n if (findInAncestors === void 0) { findInAncestors = true; }\n return _testabilityGetter.findTestabilityInTree(this, elem, findInAncestors);\n };\n TestabilityRegistry.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n TestabilityRegistry.ctorParameters = function () { return []; };\n return TestabilityRegistry;\n}());\nvar _NoopGetTestability = /** @class */ (function () {\n function _NoopGetTestability() {\n }\n _NoopGetTestability.prototype.addToWindow = function (registry) { };\n _NoopGetTestability.prototype.findTestabilityInTree = function (registry, elem, findInAncestors) {\n return null;\n };\n return _NoopGetTestability;\n}());\n/**\n * Set the {@link GetTestability} implementation used by the Angular testing framework.\n * @experimental\n */\nfunction setTestabilityGetter(getter) {\n _testabilityGetter = getter;\n}\nvar _testabilityGetter = new _NoopGetTestability();\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar _devMode = true;\nvar _runModeLocked = false;\nvar _platform;\nvar ALLOW_MULTIPLE_PLATFORMS = new InjectionToken('AllowMultipleToken');\n/**\n * Disable Angular's development mode, which turns off assertions and other\n * checks within the framework.\n *\n * One important assertion this disables verifies that a change detection pass\n * does not result in additional changes to any bindings (also known as\n * unidirectional data flow).\n *\n *\n */\nfunction enableProdMode() {\n if (_runModeLocked) {\n throw new Error('Cannot enable prod mode after platform setup.');\n }\n _devMode = false;\n}\n/**\n * Returns whether Angular is in development mode. After called once,\n * the value is locked and won't change any more.\n *\n * By default, this is true, unless a user calls `enableProdMode` before calling this.\n *\n * @experimental APIs related to application bootstrap are currently under review.\n */\nfunction isDevMode() {\n _runModeLocked = true;\n return _devMode;\n}\n/**\n * A token for third-party components that can register themselves with NgProbe.\n *\n * @experimental\n */\nvar NgProbeToken = /** @class */ (function () {\n function NgProbeToken(name, token) {\n this.name = name;\n this.token = token;\n }\n return NgProbeToken;\n}());\n/**\n * Creates a platform.\n * Platforms have to be eagerly created via this function.\n *\n * @experimental APIs related to application bootstrap are currently under review.\n */\nfunction createPlatform(injector) {\n if (_platform && !_platform.destroyed &&\n !_platform.injector.get(ALLOW_MULTIPLE_PLATFORMS, false)) {\n throw new Error('There can be only one platform. Destroy the previous one to create a new one.');\n }\n _platform = injector.get(PlatformRef);\n var inits = injector.get(PLATFORM_INITIALIZER, null);\n if (inits)\n inits.forEach(function (init) { return init(); });\n return _platform;\n}\n/**\n * Creates a factory for a platform\n *\n * @experimental APIs related to application bootstrap are currently under review.\n */\nfunction createPlatformFactory(parentPlatformFactory, name, providers) {\n if (providers === void 0) { providers = []; }\n var desc = \"Platform: \" + name;\n var marker = new InjectionToken(desc);\n return function (extraProviders) {\n if (extraProviders === void 0) { extraProviders = []; }\n var platform = getPlatform();\n if (!platform || platform.injector.get(ALLOW_MULTIPLE_PLATFORMS, false)) {\n if (parentPlatformFactory) {\n parentPlatformFactory(providers.concat(extraProviders).concat({ provide: marker, useValue: true }));\n }\n else {\n var injectedProviders = providers.concat(extraProviders).concat({ provide: marker, useValue: true });\n createPlatform(Injector.create({ providers: injectedProviders, name: desc }));\n }\n }\n return assertPlatform(marker);\n };\n}\n/**\n * Checks that there currently is a platform which contains the given token as a provider.\n *\n * @experimental APIs related to application bootstrap are currently under review.\n */\nfunction assertPlatform(requiredToken) {\n var platform = getPlatform();\n if (!platform) {\n throw new Error('No platform exists!');\n }\n if (!platform.injector.get(requiredToken, null)) {\n throw new Error('A platform with a different configuration has been created. Please destroy it first.');\n }\n return platform;\n}\n/**\n * Destroy the existing platform.\n *\n * @experimental APIs related to application bootstrap are currently under review.\n */\nfunction destroyPlatform() {\n if (_platform && !_platform.destroyed) {\n _platform.destroy();\n }\n}\n/**\n * Returns the current platform.\n *\n * @experimental APIs related to application bootstrap are currently under review.\n */\nfunction getPlatform() {\n return _platform && !_platform.destroyed ? _platform : null;\n}\n/**\n * The Angular platform is the entry point for Angular on a web page. Each page\n * has exactly one platform, and services (such as reflection) which are common\n * to every Angular application running on the page are bound in its scope.\n *\n * A page's platform is initialized implicitly when a platform is created via a platform factory\n * (e.g. {@link platformBrowser}), or explicitly by calling the {@link createPlatform} function.\n *\n *\n */\nvar PlatformRef = /** @class */ (function () {\n /** @internal */\n function PlatformRef(_injector) {\n this._injector = _injector;\n this._modules = [];\n this._destroyListeners = [];\n this._destroyed = false;\n }\n /**\n * Creates an instance of an `@NgModule` for the given platform\n * for offline compilation.\n *\n * ## Simple Example\n *\n * ```typescript\n * my_module.ts:\n *\n * @NgModule({\n * imports: [BrowserModule]\n * })\n * class MyModule {}\n *\n * main.ts:\n * import {MyModuleNgFactory} from './my_module.ngfactory';\n * import {platformBrowser} from '@angular/platform-browser';\n *\n * let moduleRef = platformBrowser().bootstrapModuleFactory(MyModuleNgFactory);\n * ```\n *\n * @experimental APIs related to application bootstrap are currently under review.\n */\n /**\n * Creates an instance of an `@NgModule` for the given platform\n * for offline compilation.\n *\n * ## Simple Example\n *\n * ```typescript\n * my_module.ts:\n *\n * @NgModule({\n * imports: [BrowserModule]\n * })\n * class MyModule {}\n *\n * main.ts:\n * import {MyModuleNgFactory} from './my_module.ngfactory';\n * import {platformBrowser} from '@angular/platform-browser';\n *\n * let moduleRef = platformBrowser().bootstrapModuleFactory(MyModuleNgFactory);\n * ```\n *\n * @experimental APIs related to application bootstrap are currently under review.\n */\n PlatformRef.prototype.bootstrapModuleFactory = /**\n * Creates an instance of an `@NgModule` for the given platform\n * for offline compilation.\n *\n * ## Simple Example\n *\n * ```typescript\n * my_module.ts:\n *\n * @NgModule({\n * imports: [BrowserModule]\n * })\n * class MyModule {}\n *\n * main.ts:\n * import {MyModuleNgFactory} from './my_module.ngfactory';\n * import {platformBrowser} from '@angular/platform-browser';\n *\n * let moduleRef = platformBrowser().bootstrapModuleFactory(MyModuleNgFactory);\n * ```\n *\n * @experimental APIs related to application bootstrap are currently under review.\n */\n function (moduleFactory, options) {\n var _this = this;\n // Note: We need to create the NgZone _before_ we instantiate the module,\n // as instantiating the module creates some providers eagerly.\n // So we create a mini parent injector that just contains the new NgZone and\n // pass that as parent to the NgModuleFactory.\n var ngZoneOption = options ? options.ngZone : undefined;\n var ngZone = getNgZone(ngZoneOption);\n var providers = [{ provide: NgZone, useValue: ngZone }];\n // Attention: Don't use ApplicationRef.run here,\n // as we want to be sure that all possible constructor calls are inside `ngZone.run`!\n return ngZone.run(function () {\n var ngZoneInjector = Injector.create({ providers: providers, parent: _this.injector, name: moduleFactory.moduleType.name });\n var moduleRef = moduleFactory.create(ngZoneInjector);\n var exceptionHandler = moduleRef.injector.get(ErrorHandler, null);\n if (!exceptionHandler) {\n throw new Error('No ErrorHandler. Is platform module (BrowserModule) included?');\n }\n moduleRef.onDestroy(function () { return remove(_this._modules, moduleRef); });\n ngZone.runOutsideAngular(function () {\n return ngZone.onError.subscribe({ next: function (error) { exceptionHandler.handleError(error); } });\n });\n return _callAndReportToErrorHandler(exceptionHandler, (ngZone), function () {\n var initStatus = moduleRef.injector.get(ApplicationInitStatus);\n initStatus.runInitializers();\n return initStatus.donePromise.then(function () {\n _this._moduleDoBootstrap(moduleRef);\n return moduleRef;\n });\n });\n });\n };\n /**\n * Creates an instance of an `@NgModule` for a given platform using the given runtime compiler.\n *\n * ## Simple Example\n *\n * ```typescript\n * @NgModule({\n * imports: [BrowserModule]\n * })\n * class MyModule {}\n *\n * let moduleRef = platformBrowser().bootstrapModule(MyModule);\n * ```\n *\n */\n /**\n * Creates an instance of an `@NgModule` for a given platform using the given runtime compiler.\n *\n * ## Simple Example\n *\n * ```typescript\n * @NgModule({\n * imports: [BrowserModule]\n * })\n * class MyModule {}\n *\n * let moduleRef = platformBrowser().bootstrapModule(MyModule);\n * ```\n *\n */\n PlatformRef.prototype.bootstrapModule = /**\n * Creates an instance of an `@NgModule` for a given platform using the given runtime compiler.\n *\n * ## Simple Example\n *\n * ```typescript\n * @NgModule({\n * imports: [BrowserModule]\n * })\n * class MyModule {}\n *\n * let moduleRef = platformBrowser().bootstrapModule(MyModule);\n * ```\n *\n */\n function (moduleType, compilerOptions) {\n var _this = this;\n if (compilerOptions === void 0) { compilerOptions = []; }\n var compilerFactory = this.injector.get(CompilerFactory);\n var options = optionsReducer({}, compilerOptions);\n var compiler = compilerFactory.createCompiler([options]);\n return compiler.compileModuleAsync(moduleType)\n .then(function (moduleFactory) { return _this.bootstrapModuleFactory(moduleFactory, options); });\n };\n PlatformRef.prototype._moduleDoBootstrap = function (moduleRef) {\n var appRef = moduleRef.injector.get(ApplicationRef);\n if (moduleRef._bootstrapComponents.length > 0) {\n moduleRef._bootstrapComponents.forEach(function (f) { return appRef.bootstrap(f); });\n }\n else if (moduleRef.instance.ngDoBootstrap) {\n moduleRef.instance.ngDoBootstrap(appRef);\n }\n else {\n throw new Error(\"The module \" + stringify(moduleRef.instance.constructor) + \" was bootstrapped, but it does not declare \\\"@NgModule.bootstrap\\\" components nor a \\\"ngDoBootstrap\\\" method. \" +\n \"Please define one of these.\");\n }\n this._modules.push(moduleRef);\n };\n /**\n * Register a listener to be called when the platform is disposed.\n */\n /**\n * Register a listener to be called when the platform is disposed.\n */\n PlatformRef.prototype.onDestroy = /**\n * Register a listener to be called when the platform is disposed.\n */\n function (callback) { this._destroyListeners.push(callback); };\n Object.defineProperty(PlatformRef.prototype, \"injector\", {\n /**\n * Retrieve the platform {@link Injector}, which is the parent injector for\n * every Angular application on the page and provides singleton providers.\n */\n get: /**\n * Retrieve the platform {@link Injector}, which is the parent injector for\n * every Angular application on the page and provides singleton providers.\n */\n function () { return this._injector; },\n enumerable: true,\n configurable: true\n });\n /**\n * Destroy the Angular platform and all Angular applications on the page.\n */\n /**\n * Destroy the Angular platform and all Angular applications on the page.\n */\n PlatformRef.prototype.destroy = /**\n * Destroy the Angular platform and all Angular applications on the page.\n */\n function () {\n if (this._destroyed) {\n throw new Error('The platform has already been destroyed!');\n }\n this._modules.slice().forEach(function (module) { return module.destroy(); });\n this._destroyListeners.forEach(function (listener) { return listener(); });\n this._destroyed = true;\n };\n Object.defineProperty(PlatformRef.prototype, \"destroyed\", {\n get: function () { return this._destroyed; },\n enumerable: true,\n configurable: true\n });\n PlatformRef.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n PlatformRef.ctorParameters = function () { return [\n { type: Injector, },\n ]; };\n return PlatformRef;\n}());\nfunction getNgZone(ngZoneOption) {\n var ngZone;\n if (ngZoneOption === 'noop') {\n ngZone = new NoopNgZone();\n }\n else {\n ngZone = (ngZoneOption === 'zone.js' ? undefined : ngZoneOption) ||\n new NgZone({ enableLongStackTrace: isDevMode() });\n }\n return ngZone;\n}\nfunction _callAndReportToErrorHandler(errorHandler, ngZone, callback) {\n try {\n var result = callback();\n if (isPromise(result)) {\n return result.catch(function (e) {\n ngZone.runOutsideAngular(function () { return errorHandler.handleError(e); });\n // rethrow as the exception handler might not do it\n throw e;\n });\n }\n return result;\n }\n catch (e) {\n ngZone.runOutsideAngular(function () { return errorHandler.handleError(e); });\n // rethrow as the exception handler might not do it\n throw e;\n }\n}\nfunction optionsReducer(dst, objs) {\n if (Array.isArray(objs)) {\n dst = objs.reduce(optionsReducer, dst);\n }\n else {\n dst = __assign({}, dst, objs);\n }\n return dst;\n}\n/**\n * A reference to an Angular application running on a page.\n *\n *\n */\nvar ApplicationRef = /** @class */ (function () {\n /** @internal */\n function ApplicationRef(_zone, _console, _injector, _exceptionHandler, _componentFactoryResolver, _initStatus) {\n var _this = this;\n this._zone = _zone;\n this._console = _console;\n this._injector = _injector;\n this._exceptionHandler = _exceptionHandler;\n this._componentFactoryResolver = _componentFactoryResolver;\n this._initStatus = _initStatus;\n this._bootstrapListeners = [];\n this._views = [];\n this._runningTick = false;\n this._enforceNoNewChanges = false;\n this._stable = true;\n /**\n * Get a list of component types registered to this application.\n * This list is populated even before the component is created.\n */\n this.componentTypes = [];\n /**\n * Get a list of components registered to this application.\n */\n this.components = [];\n this._enforceNoNewChanges = isDevMode();\n this._zone.onMicrotaskEmpty.subscribe({ next: function () { _this._zone.run(function () { _this.tick(); }); } });\n var isCurrentlyStable = new rxjs.Observable(function (observer) {\n _this._stable = _this._zone.isStable && !_this._zone.hasPendingMacrotasks &&\n !_this._zone.hasPendingMicrotasks;\n _this._zone.runOutsideAngular(function () {\n observer.next(_this._stable);\n observer.complete();\n });\n });\n var isStable = new rxjs.Observable(function (observer) {\n // Create the subscription to onStable outside the Angular Zone so that\n // the callback is run outside the Angular Zone.\n var stableSub;\n _this._zone.runOutsideAngular(function () {\n stableSub = _this._zone.onStable.subscribe(function () {\n NgZone.assertNotInAngularZone();\n // Check whether there are no pending macro/micro tasks in the next tick\n // to allow for NgZone to update the state.\n scheduleMicroTask(function () {\n if (!_this._stable && !_this._zone.hasPendingMacrotasks &&\n !_this._zone.hasPendingMicrotasks) {\n _this._stable = true;\n observer.next(true);\n }\n });\n });\n });\n var unstableSub = _this._zone.onUnstable.subscribe(function () {\n NgZone.assertInAngularZone();\n if (_this._stable) {\n _this._stable = false;\n _this._zone.runOutsideAngular(function () { observer.next(false); });\n }\n });\n return function () {\n stableSub.unsubscribe();\n unstableSub.unsubscribe();\n };\n });\n this.isStable =\n rxjs.merge(isCurrentlyStable, isStable.pipe(operators.share()));\n }\n /**\n * Bootstrap a new component at the root level of the application.\n *\n * ### Bootstrap process\n *\n * When bootstrapping a new root component into an application, Angular mounts the\n * specified application component onto DOM elements identified by the [componentType]'s\n * selector and kicks off automatic change detection to finish initializing the component.\n *\n * Optionally, a component can be mounted onto a DOM element that does not match the\n * [componentType]'s selector.\n *\n * ### Example\n * {@example core/ts/platform/platform.ts region='longform'}\n */\n /**\n * Bootstrap a new component at the root level of the application.\n *\n * ### Bootstrap process\n *\n * When bootstrapping a new root component into an application, Angular mounts the\n * specified application component onto DOM elements identified by the [componentType]'s\n * selector and kicks off automatic change detection to finish initializing the component.\n *\n * Optionally, a component can be mounted onto a DOM element that does not match the\n * [componentType]'s selector.\n *\n * ### Example\n * {@example core/ts/platform/platform.ts region='longform'}\n */\n ApplicationRef.prototype.bootstrap = /**\n * Bootstrap a new component at the root level of the application.\n *\n * ### Bootstrap process\n *\n * When bootstrapping a new root component into an application, Angular mounts the\n * specified application component onto DOM elements identified by the [componentType]'s\n * selector and kicks off automatic change detection to finish initializing the component.\n *\n * Optionally, a component can be mounted onto a DOM element that does not match the\n * [componentType]'s selector.\n *\n * ### Example\n * {@example core/ts/platform/platform.ts region='longform'}\n */\n function (componentOrFactory, rootSelectorOrNode) {\n var _this = this;\n if (!this._initStatus.done) {\n throw new Error('Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.');\n }\n var componentFactory;\n if (componentOrFactory instanceof ComponentFactory) {\n componentFactory = componentOrFactory;\n }\n else {\n componentFactory =\n (this._componentFactoryResolver.resolveComponentFactory(componentOrFactory));\n }\n this.componentTypes.push(componentFactory.componentType);\n // Create a factory associated with the current module if it's not bound to some other\n var ngModule = componentFactory instanceof ComponentFactoryBoundToModule ?\n null :\n this._injector.get(NgModuleRef);\n var selectorOrNode = rootSelectorOrNode || componentFactory.selector;\n var compRef = componentFactory.create(Injector.NULL, [], selectorOrNode, ngModule);\n compRef.onDestroy(function () { _this._unloadComponent(compRef); });\n var testability = compRef.injector.get(Testability, null);\n if (testability) {\n compRef.injector.get(TestabilityRegistry)\n .registerApplication(compRef.location.nativeElement, testability);\n }\n this._loadComponent(compRef);\n if (isDevMode()) {\n this._console.log(\"Angular is running in the development mode. Call enableProdMode() to enable the production mode.\");\n }\n return compRef;\n };\n /**\n * Invoke this method to explicitly process change detection and its side-effects.\n *\n * In development mode, `tick()` also performs a second change detection cycle to ensure that no\n * further changes are detected. If additional changes are picked up during this second cycle,\n * bindings in the app have side-effects that cannot be resolved in a single change detection\n * pass.\n * In this case, Angular throws an error, since an Angular application can only have one change\n * detection pass during which all change detection must complete.\n */\n /**\n * Invoke this method to explicitly process change detection and its side-effects.\n *\n * In development mode, `tick()` also performs a second change detection cycle to ensure that no\n * further changes are detected. If additional changes are picked up during this second cycle,\n * bindings in the app have side-effects that cannot be resolved in a single change detection\n * pass.\n * In this case, Angular throws an error, since an Angular application can only have one change\n * detection pass during which all change detection must complete.\n */\n ApplicationRef.prototype.tick = /**\n * Invoke this method to explicitly process change detection and its side-effects.\n *\n * In development mode, `tick()` also performs a second change detection cycle to ensure that no\n * further changes are detected. If additional changes are picked up during this second cycle,\n * bindings in the app have side-effects that cannot be resolved in a single change detection\n * pass.\n * In this case, Angular throws an error, since an Angular application can only have one change\n * detection pass during which all change detection must complete.\n */\n function () {\n var _this = this;\n if (this._runningTick) {\n throw new Error('ApplicationRef.tick is called recursively');\n }\n var scope = ApplicationRef._tickScope();\n try {\n this._runningTick = true;\n this._views.forEach(function (view) { return view.detectChanges(); });\n if (this._enforceNoNewChanges) {\n this._views.forEach(function (view) { return view.checkNoChanges(); });\n }\n }\n catch (e) {\n // Attention: Don't rethrow as it could cancel subscriptions to Observables!\n this._zone.runOutsideAngular(function () { return _this._exceptionHandler.handleError(e); });\n }\n finally {\n this._runningTick = false;\n wtfLeave(scope);\n }\n };\n /**\n * Attaches a view so that it will be dirty checked.\n * The view will be automatically detached when it is destroyed.\n * This will throw if the view is already attached to a ViewContainer.\n */\n /**\n * Attaches a view so that it will be dirty checked.\n * The view will be automatically detached when it is destroyed.\n * This will throw if the view is already attached to a ViewContainer.\n */\n ApplicationRef.prototype.attachView = /**\n * Attaches a view so that it will be dirty checked.\n * The view will be automatically detached when it is destroyed.\n * This will throw if the view is already attached to a ViewContainer.\n */\n function (viewRef) {\n var view = viewRef;\n this._views.push(view);\n view.attachToAppRef(this);\n };\n /**\n * Detaches a view from dirty checking again.\n */\n /**\n * Detaches a view from dirty checking again.\n */\n ApplicationRef.prototype.detachView = /**\n * Detaches a view from dirty checking again.\n */\n function (viewRef) {\n var view = viewRef;\n remove(this._views, view);\n view.detachFromAppRef();\n };\n ApplicationRef.prototype._loadComponent = function (componentRef) {\n this.attachView(componentRef.hostView);\n this.tick();\n this.components.push(componentRef);\n // Get the listeners lazily to prevent DI cycles.\n var listeners = this._injector.get(APP_BOOTSTRAP_LISTENER, []).concat(this._bootstrapListeners);\n listeners.forEach(function (listener) { return listener(componentRef); });\n };\n ApplicationRef.prototype._unloadComponent = function (componentRef) {\n this.detachView(componentRef.hostView);\n remove(this.components, componentRef);\n };\n /** @internal */\n /** @internal */\n ApplicationRef.prototype.ngOnDestroy = /** @internal */\n function () {\n // TODO(alxhub): Dispose of the NgZone.\n this._views.slice().forEach(function (view) { return view.destroy(); });\n };\n Object.defineProperty(ApplicationRef.prototype, \"viewCount\", {\n /**\n * Returns the number of attached views.\n */\n get: /**\n * Returns the number of attached views.\n */\n function () { return this._views.length; },\n enumerable: true,\n configurable: true\n });\n /** @internal */\n ApplicationRef._tickScope = wtfCreateScope('ApplicationRef#tick()');\n ApplicationRef.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n ApplicationRef.ctorParameters = function () { return [\n { type: NgZone, },\n { type: Console, },\n { type: Injector, },\n { type: ErrorHandler, },\n { type: ComponentFactoryResolver, },\n { type: ApplicationInitStatus, },\n ]; };\n return ApplicationRef;\n}());\nfunction remove(list, el) {\n var index = list.indexOf(el);\n if (index > -1) {\n list.splice(index, 1);\n }\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * @deprecated Use `RendererType2` (and `Renderer2`) instead.\n */\nvar RenderComponentType = /** @class */ (function () {\n function RenderComponentType(id, templateUrl, slotCount, encapsulation, styles, animations) {\n this.id = id;\n this.templateUrl = templateUrl;\n this.slotCount = slotCount;\n this.encapsulation = encapsulation;\n this.styles = styles;\n this.animations = animations;\n }\n return RenderComponentType;\n}());\n/**\n * @deprecated Debug info is handeled internally in the view engine now.\n */\nvar RenderDebugInfo = /** @class */ (function () {\n function RenderDebugInfo() {\n }\n return RenderDebugInfo;\n}());\n/**\n * @deprecated Use the `Renderer2` instead.\n */\nvar Renderer = /** @class */ (function () {\n function Renderer() {\n }\n return Renderer;\n}());\nvar Renderer2Interceptor = new InjectionToken('Renderer2Interceptor');\n/**\n * Injectable service that provides a low-level interface for modifying the UI.\n *\n * Use this service to bypass Angular's templating and make custom UI changes that can't be\n * expressed declaratively. For example if you need to set a property or an attribute whose name is\n * not statically known, use {@link Renderer#setElementProperty setElementProperty} or\n * {@link Renderer#setElementAttribute setElementAttribute} respectively.\n *\n * If you are implementing a custom renderer, you must implement this interface.\n *\n * The default Renderer implementation is `DomRenderer`. Also available is `WebWorkerRenderer`.\n *\n * @deprecated Use `RendererFactory2` instead.\n */\nvar RootRenderer = /** @class */ (function () {\n function RootRenderer() {\n }\n return RootRenderer;\n}());\n/**\n * @experimental\n */\nvar RendererFactory2 = /** @class */ (function () {\n function RendererFactory2() {\n }\n return RendererFactory2;\n}());\n/**\n * @experimental\n */\n/**\n * @experimental\n */\n\n/**\n * @experimental\n */\n(function (RendererStyleFlags2) {\n RendererStyleFlags2[RendererStyleFlags2[\"Important\"] = 1] = \"Important\";\n RendererStyleFlags2[RendererStyleFlags2[\"DashCase\"] = 2] = \"DashCase\";\n})(exports.RendererStyleFlags2 || (exports.RendererStyleFlags2 = {}));\n/**\n * @experimental\n */\nvar Renderer2 = /** @class */ (function () {\n function Renderer2() {\n }\n return Renderer2;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A 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](http://g.co/ng/security).\n *\n *\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.\nvar ElementRef = /** @class */ (function () {\n function ElementRef(nativeElement) {\n this.nativeElement = nativeElement;\n }\n return ElementRef;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Used to load ng module factories.\n *\n */\nvar NgModuleFactoryLoader = /** @class */ (function () {\n function NgModuleFactoryLoader() {\n }\n return NgModuleFactoryLoader;\n}());\nvar moduleFactories = new Map();\n/**\n * Registers a loaded module. Should only be called from generated NgModuleFactory code.\n * @experimental\n */\nfunction registerModuleFactory(id, factory) {\n var existing = moduleFactories.get(id);\n if (existing) {\n throw new Error(\"Duplicate module registered for \" + id + \" - \" + existing.moduleType.name + \" vs \" + factory.moduleType.name);\n }\n moduleFactories.set(id, factory);\n}\n\n/**\n * Returns the NgModuleFactory with the given id, if it exists and has been loaded.\n * Factories for modules that do not specify an `id` cannot be retrieved. Throws if the module\n * cannot be found.\n * @experimental\n */\nfunction getModuleFactory(id) {\n var factory = moduleFactories.get(id);\n if (!factory)\n throw new Error(\"No module with ID \" + id + \" loaded\");\n return factory;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * An 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 * ### Example ([live demo](http://plnkr.co/edit/RX8sJnQYl9FWuSCWme5z?p=preview))\n * ```typescript\n * @Component({...})\n * class Container {\n * @ViewChildren(Item) items:QueryList<Item>;\n * }\n * ```\n *\n */\nvar QueryList = /** @class */ (function () {\n function QueryList() {\n this.dirty = true;\n this._results = [];\n this.changes = new EventEmitter();\n this.length = 0;\n }\n /**\n * See\n * [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)\n */\n /**\n * See\n * [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)\n */\n QueryList.prototype.map = /**\n * See\n * [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)\n */\n function (fn) { return this._results.map(fn); };\n /**\n * See\n * [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)\n */\n /**\n * See\n * [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)\n */\n QueryList.prototype.filter = /**\n * See\n * [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)\n */\n function (fn) {\n return this._results.filter(fn);\n };\n /**\n * See\n * [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)\n */\n /**\n * See\n * [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)\n */\n QueryList.prototype.find = /**\n * See\n * [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)\n */\n function (fn) {\n return this._results.find(fn);\n };\n /**\n * See\n * [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)\n */\n /**\n * See\n * [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)\n */\n QueryList.prototype.reduce = /**\n * See\n * [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)\n */\n function (fn, init) {\n return this._results.reduce(fn, init);\n };\n /**\n * See\n * [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)\n */\n /**\n * See\n * [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)\n */\n QueryList.prototype.forEach = /**\n * See\n * [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)\n */\n function (fn) { this._results.forEach(fn); };\n /**\n * See\n * [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)\n */\n /**\n * See\n * [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)\n */\n QueryList.prototype.some = /**\n * See\n * [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)\n */\n function (fn) {\n return this._results.some(fn);\n };\n QueryList.prototype.toArray = function () { return this._results.slice(); };\n QueryList.prototype[getSymbolIterator()] = function () { return this._results[getSymbolIterator()](); };\n QueryList.prototype.toString = function () { return this._results.toString(); };\n QueryList.prototype.reset = function (res) {\n this._results = flatten(res);\n this.dirty = false;\n this.length = this._results.length;\n this.last = this._results[this.length - 1];\n this.first = this._results[0];\n };\n QueryList.prototype.notifyOnChanges = function () { this.changes.emit(this); };\n /** internal */\n /** internal */\n QueryList.prototype.setDirty = /** internal */\n function () { this.dirty = true; };\n /** internal */\n /** internal */\n QueryList.prototype.destroy = /** internal */\n function () {\n this.changes.complete();\n this.changes.unsubscribe();\n };\n return QueryList;\n}());\nfunction flatten(list) {\n return list.reduce(function (flat, item) {\n var flatItem = Array.isArray(item) ? flatten(item) : item;\n return flat.concat(flatItem);\n }, []);\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar _SEPARATOR = '#';\nvar FACTORY_CLASS_SUFFIX = 'NgFactory';\n/**\n * Configuration for SystemJsNgModuleLoader.\n * token.\n *\n * @experimental\n */\nvar SystemJsNgModuleLoaderConfig = /** @class */ (function () {\n function SystemJsNgModuleLoaderConfig() {\n }\n return SystemJsNgModuleLoaderConfig;\n}());\nvar DEFAULT_CONFIG = {\n factoryPathPrefix: '',\n factoryPathSuffix: '.ngfactory',\n};\n/**\n * NgModuleFactoryLoader that uses SystemJS to load NgModuleFactory\n * @experimental\n */\nvar SystemJsNgModuleLoader = /** @class */ (function () {\n function SystemJsNgModuleLoader(_compiler, config) {\n this._compiler = _compiler;\n this._config = config || DEFAULT_CONFIG;\n }\n SystemJsNgModuleLoader.prototype.load = function (path) {\n var offlineMode = this._compiler instanceof Compiler;\n return offlineMode ? this.loadFactory(path) : this.loadAndCompile(path);\n };\n SystemJsNgModuleLoader.prototype.loadAndCompile = function (path) {\n var _this = this;\n var _a = __read(path.split(_SEPARATOR), 2), module = _a[0], exportName = _a[1];\n if (exportName === undefined) {\n exportName = 'default';\n }\n return System.import(module)\n .then(function (module) { return module[exportName]; })\n .then(function (type) { return checkNotEmpty(type, module, exportName); })\n .then(function (type) { return _this._compiler.compileModuleAsync(type); });\n };\n SystemJsNgModuleLoader.prototype.loadFactory = function (path) {\n var _a = __read(path.split(_SEPARATOR), 2), module = _a[0], exportName = _a[1];\n var factoryClassSuffix = FACTORY_CLASS_SUFFIX;\n if (exportName === undefined) {\n exportName = 'default';\n factoryClassSuffix = '';\n }\n return System.import(this._config.factoryPathPrefix + module + this._config.factoryPathSuffix)\n .then(function (module) { return module[exportName + factoryClassSuffix]; })\n .then(function (factory) { return checkNotEmpty(factory, module, exportName); });\n };\n SystemJsNgModuleLoader.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n SystemJsNgModuleLoader.ctorParameters = function () { return [\n { type: Compiler, },\n { type: SystemJsNgModuleLoaderConfig, decorators: [{ type: Optional },] },\n ]; };\n return SystemJsNgModuleLoader;\n}());\nfunction checkNotEmpty(value, modulePath, exportName) {\n if (!value) {\n throw new Error(\"Cannot find '\" + exportName + \"' in '\" + modulePath + \"'\");\n }\n return value;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Represents an Embedded Template that can be used to instantiate Embedded Views.\n *\n * You can access a `TemplateRef`, in two ways. Via a directive placed on a `<ng-template>` element\n * (or directive prefixed with `*`) and have the `TemplateRef` for this Embedded View injected into\n * the constructor of the directive using the `TemplateRef` Token. Alternatively you can query for\n * the `TemplateRef` from a Component or a Directive via {@link Query}.\n *\n * To instantiate Embedded Views based on a Template, use {@link ViewContainerRef#\n * createEmbeddedView}, which will create the View and attach it to the View Container.\n *\n */\nvar TemplateRef = /** @class */ (function () {\n function TemplateRef() {\n }\n return TemplateRef;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Represents a container where one or more Views can be attached.\n *\n * The container can contain two kinds of Views. Host Views, created by instantiating a\n * {@link Component} via {@link #createComponent}, and Embedded Views, created by instantiating an\n * {@link TemplateRef Embedded Template} via {@link #createEmbeddedView}.\n *\n * The location of the View Container within the containing View is specified by the Anchor\n * `element`. Each View Container can have only one Anchor Element and each Anchor Element can only\n * have a single View Container.\n *\n * Root elements of Views attached to this container become siblings of the Anchor Element in\n * the Rendered View.\n *\n * To access a `ViewContainerRef` of an Element, you can either place a {@link Directive} injected\n * with `ViewContainerRef` on the Element, or you obtain it via a {@link ViewChild} query.\n *\n */\nvar ViewContainerRef = /** @class */ (function () {\n function ViewContainerRef() {\n }\n return ViewContainerRef;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar ChangeDetectorRef = /** @class */ (function () {\n function ChangeDetectorRef() {\n }\n return ChangeDetectorRef;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar ViewRef = /** @class */ (function (_super) {\n __extends(ViewRef, _super);\n function ViewRef() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ViewRef;\n}(ChangeDetectorRef));\n/**\n * Represents an Angular View.\n *\n * <!-- TODO: move the next two paragraphs to the dev guide -->\n * A View is a fundamental building block of the application UI. It is the smallest grouping of\n * Elements which are created and destroyed together.\n *\n * Properties of elements in a View can change, but the structure (number and order) of elements in\n * a View cannot. Changing the structure of Elements can only be done by inserting, moving or\n * removing nested Views via a {@link ViewContainerRef}. Each View can contain many View Containers.\n * <!-- /TODO -->\n *\n * ### Example\n *\n * Given this template...\n *\n * ```\n * Count: {{items.length}}\n * <ul>\n * <li *ngFor=\"let item of items\">{{item}}</li>\n * </ul>\n * ```\n *\n * We have two {@link TemplateRef}s:\n *\n * Outer {@link TemplateRef}:\n * ```\n * Count: {{items.length}}\n * <ul>\n * <ng-template ngFor let-item [ngForOf]=\"items\"></ng-template>\n * </ul>\n * ```\n *\n * Inner {@link TemplateRef}:\n * ```\n * <li>{{item}}</li>\n * ```\n *\n * Notice that the original template is broken down into two separate {@link TemplateRef}s.\n *\n * The outer/inner {@link TemplateRef}s are then assembled into views like so:\n *\n * ```\n * <!-- ViewRef: outer-0 -->\n * Count: 2\n * <ul>\n * <ng-template view-container-ref></ng-template>\n * <!-- ViewRef: inner-1 --><li>first</li><!-- /ViewRef: inner-1 -->\n * <!-- ViewRef: inner-2 --><li>second</li><!-- /ViewRef: inner-2 -->\n * </ul>\n * <!-- /ViewRef: outer-0 -->\n * ```\n * @experimental\n */\nvar EmbeddedViewRef = /** @class */ (function (_super) {\n __extends(EmbeddedViewRef, _super);\n function EmbeddedViewRef() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return EmbeddedViewRef;\n}(ViewRef));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar EventListener = /** @class */ (function () {\n function EventListener(name, callback) {\n this.name = name;\n this.callback = callback;\n }\n return EventListener;\n}());\n/**\n * @experimental All debugging apis are currently experimental.\n */\nvar DebugNode = /** @class */ (function () {\n function DebugNode(nativeNode, parent, _debugContext) {\n this._debugContext = _debugContext;\n this.nativeNode = nativeNode;\n if (parent && parent instanceof DebugElement) {\n parent.addChild(this);\n }\n else {\n this.parent = null;\n }\n this.listeners = [];\n }\n Object.defineProperty(DebugNode.prototype, \"injector\", {\n get: function () { return this._debugContext.injector; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugNode.prototype, \"componentInstance\", {\n get: function () { return this._debugContext.component; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugNode.prototype, \"context\", {\n get: function () { return this._debugContext.context; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugNode.prototype, \"references\", {\n get: function () { return this._debugContext.references; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugNode.prototype, \"providerTokens\", {\n get: function () { return this._debugContext.providerTokens; },\n enumerable: true,\n configurable: true\n });\n return DebugNode;\n}());\n/**\n * @experimental All debugging apis are currently experimental.\n */\nvar DebugElement = /** @class */ (function (_super) {\n __extends(DebugElement, _super);\n function DebugElement(nativeNode, parent, _debugContext) {\n var _this = _super.call(this, nativeNode, parent, _debugContext) || this;\n _this.properties = {};\n _this.attributes = {};\n _this.classes = {};\n _this.styles = {};\n _this.childNodes = [];\n _this.nativeElement = nativeNode;\n return _this;\n }\n DebugElement.prototype.addChild = function (child) {\n if (child) {\n this.childNodes.push(child);\n child.parent = this;\n }\n };\n DebugElement.prototype.removeChild = function (child) {\n var childIndex = this.childNodes.indexOf(child);\n if (childIndex !== -1) {\n child.parent = null;\n this.childNodes.splice(childIndex, 1);\n }\n };\n DebugElement.prototype.insertChildrenAfter = function (child, newChildren) {\n var _this = this;\n var siblingIndex = this.childNodes.indexOf(child);\n if (siblingIndex !== -1) {\n (_a = this.childNodes).splice.apply(_a, __spread([siblingIndex + 1, 0], newChildren));\n newChildren.forEach(function (c) {\n if (c.parent) {\n c.parent.removeChild(c);\n }\n c.parent = _this;\n });\n }\n var _a;\n };\n DebugElement.prototype.insertBefore = function (refChild, newChild) {\n var refIndex = this.childNodes.indexOf(refChild);\n if (refIndex === -1) {\n this.addChild(newChild);\n }\n else {\n if (newChild.parent) {\n newChild.parent.removeChild(newChild);\n }\n newChild.parent = this;\n this.childNodes.splice(refIndex, 0, newChild);\n }\n };\n DebugElement.prototype.query = function (predicate) {\n var results = this.queryAll(predicate);\n return results[0] || null;\n };\n DebugElement.prototype.queryAll = function (predicate) {\n var matches = [];\n _queryElementChildren(this, predicate, matches);\n return matches;\n };\n DebugElement.prototype.queryAllNodes = function (predicate) {\n var matches = [];\n _queryNodeChildren(this, predicate, matches);\n return matches;\n };\n Object.defineProperty(DebugElement.prototype, \"children\", {\n get: function () {\n return this.childNodes.filter(function (node) { return node instanceof DebugElement; });\n },\n enumerable: true,\n configurable: true\n });\n DebugElement.prototype.triggerEventHandler = function (eventName, eventObj) {\n this.listeners.forEach(function (listener) {\n if (listener.name == eventName) {\n listener.callback(eventObj);\n }\n });\n };\n return DebugElement;\n}(DebugNode));\n/**\n * @experimental\n */\nfunction asNativeElements(debugEls) {\n return debugEls.map(function (el) { return el.nativeElement; });\n}\nfunction _queryElementChildren(element, predicate, matches) {\n element.childNodes.forEach(function (node) {\n if (node instanceof DebugElement) {\n if (predicate(node)) {\n matches.push(node);\n }\n _queryElementChildren(node, predicate, matches);\n }\n });\n}\nfunction _queryNodeChildren(parentNode, predicate, matches) {\n if (parentNode instanceof DebugElement) {\n parentNode.childNodes.forEach(function (node) {\n if (predicate(node)) {\n matches.push(node);\n }\n if (node instanceof DebugElement) {\n _queryNodeChildren(node, predicate, matches);\n }\n });\n }\n}\n// Need to keep the nodes in a global Map so that multiple angular apps are supported.\nvar _nativeNodeToDebugNode = new Map();\n/**\n * @experimental\n */\nfunction getDebugNode(nativeNode) {\n return _nativeNodeToDebugNode.get(nativeNode) || null;\n}\n\nfunction indexDebugNode(node) {\n _nativeNodeToDebugNode.set(node.nativeNode, node);\n}\nfunction removeDebugNodeFromIndex(node) {\n _nativeNodeToDebugNode.delete(node.nativeNode);\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction devModeEqual(a, b) {\n var isListLikeIterableA = isListLikeIterable(a);\n var isListLikeIterableB = isListLikeIterable(b);\n if (isListLikeIterableA && isListLikeIterableB) {\n return areIterablesEqual(a, b, devModeEqual);\n }\n else {\n var isAObject = a && (typeof a === 'object' || typeof a === 'function');\n var isBObject = b && (typeof b === 'object' || typeof b === 'function');\n if (!isListLikeIterableA && isAObject && !isListLikeIterableB && isBObject) {\n return true;\n }\n else {\n return looseIdentical(a, b);\n }\n }\n}\n/**\n * Indicates that the result of a {@link Pipe} transformation has changed even though the\n * reference has not changed.\n *\n * Wrapped values are unwrapped automatically during the change detection, and the unwrapped value\n * is stored.\n *\n * Example:\n *\n * ```\n * if (this._latestValue === this._latestReturnedValue) {\n * return this._latestReturnedValue;\n * } else {\n * this._latestReturnedValue = this._latestValue;\n * return WrappedValue.wrap(this._latestValue); // this will force update\n * }\n * ```\n *\n */\nvar WrappedValue = /** @class */ (function () {\n function WrappedValue(value) {\n this.wrapped = value;\n }\n /** Creates a wrapped value. */\n /** Creates a wrapped value. */\n WrappedValue.wrap = /** Creates a wrapped value. */\n function (value) { return new WrappedValue(value); };\n /**\n * Returns the underlying value of a wrapped value.\n * Returns the given `value` when it is not wrapped.\n **/\n /**\n * Returns the underlying value of a wrapped value.\n * Returns the given `value` when it is not wrapped.\n **/\n WrappedValue.unwrap = /**\n * Returns the underlying value of a wrapped value.\n * Returns the given `value` when it is not wrapped.\n **/\n function (value) { return WrappedValue.isWrapped(value) ? value.wrapped : value; };\n /** Returns true if `value` is a wrapped value. */\n /** Returns true if `value` is a wrapped value. */\n WrappedValue.isWrapped = /** Returns true if `value` is a wrapped value. */\n function (value) { return value instanceof WrappedValue; };\n return WrappedValue;\n}());\n/**\n * Represents a basic change from a previous to a new value.\n *\n */\nvar SimpleChange = /** @class */ (function () {\n function SimpleChange(previousValue, currentValue, firstChange) {\n this.previousValue = previousValue;\n this.currentValue = currentValue;\n this.firstChange = firstChange;\n }\n /**\n * Check whether the new value is the first value assigned.\n */\n /**\n * Check whether the new value is the first value assigned.\n */\n SimpleChange.prototype.isFirstChange = /**\n * Check whether the new value is the first value assigned.\n */\n function () { return this.firstChange; };\n return SimpleChange;\n}());\nfunction isListLikeIterable(obj) {\n if (!isJsObject(obj))\n return false;\n return Array.isArray(obj) ||\n (!(obj instanceof Map) && // JS Map are iterables but return entries as [k, v]\n // JS Map are iterables but return entries as [k, v]\n getSymbolIterator() in obj); // JS Iterable have a Symbol.iterator prop\n}\nfunction areIterablesEqual(a, b, comparator) {\n var iterator1 = a[getSymbolIterator()]();\n var iterator2 = b[getSymbolIterator()]();\n while (true) {\n var item1 = iterator1.next();\n var item2 = iterator2.next();\n if (item1.done && item2.done)\n return true;\n if (item1.done || item2.done)\n return false;\n if (!comparator(item1.value, item2.value))\n return false;\n }\n}\nfunction iterateListLike(obj, fn) {\n if (Array.isArray(obj)) {\n for (var i = 0; i < obj.length; i++) {\n fn(obj[i]);\n }\n }\n else {\n var iterator = obj[getSymbolIterator()]();\n var item = void 0;\n while (!((item = iterator.next()).done)) {\n fn(item.value);\n }\n }\n}\nfunction isJsObject(o) {\n return o !== null && (typeof o === 'function' || typeof o === 'object');\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar DefaultIterableDifferFactory = /** @class */ (function () {\n function DefaultIterableDifferFactory() {\n }\n DefaultIterableDifferFactory.prototype.supports = function (obj) { return isListLikeIterable(obj); };\n DefaultIterableDifferFactory.prototype.create = function (trackByFn) {\n return new DefaultIterableDiffer(trackByFn);\n };\n return DefaultIterableDifferFactory;\n}());\nvar trackByIdentity = function (index, item) { return item; };\n/**\n * @deprecated v4.0.0 - Should not be part of public API.\n */\nvar DefaultIterableDiffer = /** @class */ (function () {\n function DefaultIterableDiffer(trackByFn) {\n this.length = 0;\n // Keeps track of the used records at any point in time (during & across `_check()` calls)\n this._linkedRecords = null;\n // Keeps track of the removed records at any point in time during `_check()` calls.\n this._unlinkedRecords = null;\n this._previousItHead = null;\n this._itHead = null;\n this._itTail = null;\n this._additionsHead = null;\n this._additionsTail = null;\n this._movesHead = null;\n this._movesTail = null;\n this._removalsHead = null;\n this._removalsTail = null;\n // Keeps track of records where custom track by is the same, but item identity has changed\n this._identityChangesHead = null;\n this._identityChangesTail = null;\n this._trackByFn = trackByFn || trackByIdentity;\n }\n DefaultIterableDiffer.prototype.forEachItem = function (fn) {\n var record;\n for (record = this._itHead; record !== null; record = record._next) {\n fn(record);\n }\n };\n DefaultIterableDiffer.prototype.forEachOperation = function (fn) {\n var nextIt = this._itHead;\n var nextRemove = this._removalsHead;\n var addRemoveOffset = 0;\n var moveOffsets = null;\n while (nextIt || nextRemove) {\n // Figure out which is the next record to process\n // Order: remove, add, move\n var record = !nextRemove ||\n nextIt &&\n (nextIt.currentIndex) <\n getPreviousIndex(nextRemove, addRemoveOffset, moveOffsets) ?\n nextIt :\n nextRemove;\n var adjPreviousIndex = getPreviousIndex(record, addRemoveOffset, moveOffsets);\n var currentIndex = record.currentIndex;\n // consume the item, and adjust the addRemoveOffset and update moveDistance if necessary\n if (record === nextRemove) {\n addRemoveOffset--;\n nextRemove = nextRemove._nextRemoved;\n }\n else {\n nextIt = nextIt._next;\n if (record.previousIndex == null) {\n addRemoveOffset++;\n }\n else {\n // INVARIANT: currentIndex < previousIndex\n if (!moveOffsets)\n moveOffsets = [];\n var localMovePreviousIndex = adjPreviousIndex - addRemoveOffset;\n var localCurrentIndex = (currentIndex) - addRemoveOffset;\n if (localMovePreviousIndex != localCurrentIndex) {\n for (var i = 0; i < localMovePreviousIndex; i++) {\n var offset = i < moveOffsets.length ? moveOffsets[i] : (moveOffsets[i] = 0);\n var index = offset + i;\n if (localCurrentIndex <= index && index < localMovePreviousIndex) {\n moveOffsets[i] = offset + 1;\n }\n }\n var previousIndex = record.previousIndex;\n moveOffsets[previousIndex] = localCurrentIndex - localMovePreviousIndex;\n }\n }\n }\n if (adjPreviousIndex !== currentIndex) {\n fn(record, adjPreviousIndex, currentIndex);\n }\n }\n };\n DefaultIterableDiffer.prototype.forEachPreviousItem = function (fn) {\n var record;\n for (record = this._previousItHead; record !== null; record = record._nextPrevious) {\n fn(record);\n }\n };\n DefaultIterableDiffer.prototype.forEachAddedItem = function (fn) {\n var record;\n for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n fn(record);\n }\n };\n DefaultIterableDiffer.prototype.forEachMovedItem = function (fn) {\n var record;\n for (record = this._movesHead; record !== null; record = record._nextMoved) {\n fn(record);\n }\n };\n DefaultIterableDiffer.prototype.forEachRemovedItem = function (fn) {\n var record;\n for (record = this._removalsHead; record !== null; record = record._nextRemoved) {\n fn(record);\n }\n };\n DefaultIterableDiffer.prototype.forEachIdentityChange = function (fn) {\n var record;\n for (record = this._identityChangesHead; record !== null; record = record._nextIdentityChange) {\n fn(record);\n }\n };\n DefaultIterableDiffer.prototype.diff = function (collection) {\n if (collection == null)\n collection = [];\n if (!isListLikeIterable(collection)) {\n throw new Error(\"Error trying to diff '\" + stringify(collection) + \"'. Only arrays and iterables are allowed\");\n }\n if (this.check(collection)) {\n return this;\n }\n else {\n return null;\n }\n };\n DefaultIterableDiffer.prototype.onDestroy = function () { };\n DefaultIterableDiffer.prototype.check = function (collection) {\n var _this = this;\n this._reset();\n var record = this._itHead;\n var mayBeDirty = false;\n var index;\n var item;\n var itemTrackBy;\n if (Array.isArray(collection)) {\n this.length = collection.length;\n for (var index_1 = 0; index_1 < this.length; index_1++) {\n item = collection[index_1];\n itemTrackBy = this._trackByFn(index_1, item);\n if (record === null || !looseIdentical(record.trackById, itemTrackBy)) {\n record = this._mismatch(record, item, itemTrackBy, index_1);\n mayBeDirty = true;\n }\n else {\n if (mayBeDirty) {\n // TODO(misko): can we limit this to duplicates only?\n record = this._verifyReinsertion(record, item, itemTrackBy, index_1);\n }\n if (!looseIdentical(record.item, item))\n this._addIdentityChange(record, item);\n }\n record = record._next;\n }\n }\n else {\n index = 0;\n iterateListLike(collection, function (item) {\n itemTrackBy = _this._trackByFn(index, item);\n if (record === null || !looseIdentical(record.trackById, itemTrackBy)) {\n record = _this._mismatch(record, item, itemTrackBy, index);\n mayBeDirty = true;\n }\n else {\n if (mayBeDirty) {\n // TODO(misko): can we limit this to duplicates only?\n record = _this._verifyReinsertion(record, item, itemTrackBy, index);\n }\n if (!looseIdentical(record.item, item))\n _this._addIdentityChange(record, item);\n }\n record = record._next;\n index++;\n });\n this.length = index;\n }\n this._truncate(record);\n this.collection = collection;\n return this.isDirty;\n };\n Object.defineProperty(DefaultIterableDiffer.prototype, \"isDirty\", {\n /* CollectionChanges is considered dirty if it has any additions, moves, removals, or identity\n * changes.\n */\n get: /* CollectionChanges is considered dirty if it has any additions, moves, removals, or identity\n * changes.\n */\n function () {\n return this._additionsHead !== null || this._movesHead !== null ||\n this._removalsHead !== null || this._identityChangesHead !== null;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Reset the state of the change objects to show no changes. This means set previousKey to\n * currentKey, and clear all of the queues (additions, moves, removals).\n * Set the previousIndexes of moved and added items to their currentIndexes\n * Reset the list of additions, moves and removals\n *\n * @internal\n */\n /**\n * Reset the state of the change objects to show no changes. This means set previousKey to\n * currentKey, and clear all of the queues (additions, moves, removals).\n * Set the previousIndexes of moved and added items to their currentIndexes\n * Reset the list of additions, moves and removals\n *\n * @internal\n */\n DefaultIterableDiffer.prototype._reset = /**\n * Reset the state of the change objects to show no changes. This means set previousKey to\n * currentKey, and clear all of the queues (additions, moves, removals).\n * Set the previousIndexes of moved and added items to their currentIndexes\n * Reset the list of additions, moves and removals\n *\n * @internal\n */\n function () {\n if (this.isDirty) {\n var record = void 0;\n var nextRecord = void 0;\n for (record = this._previousItHead = this._itHead; record !== null; record = record._next) {\n record._nextPrevious = record._next;\n }\n for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n record.previousIndex = record.currentIndex;\n }\n this._additionsHead = this._additionsTail = null;\n for (record = this._movesHead; record !== null; record = nextRecord) {\n record.previousIndex = record.currentIndex;\n nextRecord = record._nextMoved;\n }\n this._movesHead = this._movesTail = null;\n this._removalsHead = this._removalsTail = null;\n this._identityChangesHead = this._identityChangesTail = null;\n // TODO(vicb): when assert gets supported\n // assert(!this.isDirty);\n }\n };\n /**\n * This is the core function which handles differences between collections.\n *\n * - `record` is the record which we saw at this position last time. If null then it is a new\n * item.\n * - `item` is the current item in the collection\n * - `index` is the position of the item in the collection\n *\n * @internal\n */\n /**\n * This is the core function which handles differences between collections.\n *\n * - `record` is the record which we saw at this position last time. If null then it is a new\n * item.\n * - `item` is the current item in the collection\n * - `index` is the position of the item in the collection\n *\n * @internal\n */\n DefaultIterableDiffer.prototype._mismatch = /**\n * This is the core function which handles differences between collections.\n *\n * - `record` is the record which we saw at this position last time. If null then it is a new\n * item.\n * - `item` is the current item in the collection\n * - `index` is the position of the item in the collection\n *\n * @internal\n */\n function (record, item, itemTrackBy, index) {\n // The previous record after which we will append the current one.\n var previousRecord;\n if (record === null) {\n previousRecord = this._itTail;\n }\n else {\n previousRecord = record._prev;\n // Remove the record from the collection since we know it does not match the item.\n this._remove(record);\n }\n // Attempt to see if we have seen the item before.\n record = this._linkedRecords === null ? null : this._linkedRecords.get(itemTrackBy, index);\n if (record !== null) {\n // We have seen this before, we need to move it forward in the collection.\n // But first we need to check if identity changed, so we can update in view if necessary\n if (!looseIdentical(record.item, item))\n this._addIdentityChange(record, item);\n this._moveAfter(record, previousRecord, index);\n }\n else {\n // Never seen it, check evicted list.\n record = this._unlinkedRecords === null ? null : this._unlinkedRecords.get(itemTrackBy, null);\n if (record !== null) {\n // It is an item which we have evicted earlier: reinsert it back into the list.\n // But first we need to check if identity changed, so we can update in view if necessary\n if (!looseIdentical(record.item, item))\n this._addIdentityChange(record, item);\n this._reinsertAfter(record, previousRecord, index);\n }\n else {\n // It is a new item: add it.\n record =\n this._addAfter(new IterableChangeRecord_(item, itemTrackBy), previousRecord, index);\n }\n }\n return record;\n };\n /**\n * This check is only needed if an array contains duplicates. (Short circuit of nothing dirty)\n *\n * Use case: `[a, a]` => `[b, a, a]`\n *\n * If we did not have this check then the insertion of `b` would:\n * 1) evict first `a`\n * 2) insert `b` at `0` index.\n * 3) leave `a` at index `1` as is. <-- this is wrong!\n * 3) reinsert `a` at index 2. <-- this is wrong!\n *\n * The correct behavior is:\n * 1) evict first `a`\n * 2) insert `b` at `0` index.\n * 3) reinsert `a` at index 1.\n * 3) move `a` at from `1` to `2`.\n *\n *\n * Double check that we have not evicted a duplicate item. We need to check if the item type may\n * have already been removed:\n * The insertion of b will evict the first 'a'. If we don't reinsert it now it will be reinserted\n * at the end. Which will show up as the two 'a's switching position. This is incorrect, since a\n * better way to think of it is as insert of 'b' rather then switch 'a' with 'b' and then add 'a'\n * at the end.\n *\n * @internal\n */\n /**\n * This check is only needed if an array contains duplicates. (Short circuit of nothing dirty)\n *\n * Use case: `[a, a]` => `[b, a, a]`\n *\n * If we did not have this check then the insertion of `b` would:\n * 1) evict first `a`\n * 2) insert `b` at `0` index.\n * 3) leave `a` at index `1` as is. <-- this is wrong!\n * 3) reinsert `a` at index 2. <-- this is wrong!\n *\n * The correct behavior is:\n * 1) evict first `a`\n * 2) insert `b` at `0` index.\n * 3) reinsert `a` at index 1.\n * 3) move `a` at from `1` to `2`.\n *\n *\n * Double check that we have not evicted a duplicate item. We need to check if the item type may\n * have already been removed:\n * The insertion of b will evict the first 'a'. If we don't reinsert it now it will be reinserted\n * at the end. Which will show up as the two 'a's switching position. This is incorrect, since a\n * better way to think of it is as insert of 'b' rather then switch 'a' with 'b' and then add 'a'\n * at the end.\n *\n * @internal\n */\n DefaultIterableDiffer.prototype._verifyReinsertion = /**\n * This check is only needed if an array contains duplicates. (Short circuit of nothing dirty)\n *\n * Use case: `[a, a]` => `[b, a, a]`\n *\n * If we did not have this check then the insertion of `b` would:\n * 1) evict first `a`\n * 2) insert `b` at `0` index.\n * 3) leave `a` at index `1` as is. <-- this is wrong!\n * 3) reinsert `a` at index 2. <-- this is wrong!\n *\n * The correct behavior is:\n * 1) evict first `a`\n * 2) insert `b` at `0` index.\n * 3) reinsert `a` at index 1.\n * 3) move `a` at from `1` to `2`.\n *\n *\n * Double check that we have not evicted a duplicate item. We need to check if the item type may\n * have already been removed:\n * The insertion of b will evict the first 'a'. If we don't reinsert it now it will be reinserted\n * at the end. Which will show up as the two 'a's switching position. This is incorrect, since a\n * better way to think of it is as insert of 'b' rather then switch 'a' with 'b' and then add 'a'\n * at the end.\n *\n * @internal\n */\n function (record, item, itemTrackBy, index) {\n var reinsertRecord = this._unlinkedRecords === null ? null : this._unlinkedRecords.get(itemTrackBy, null);\n if (reinsertRecord !== null) {\n record = this._reinsertAfter(reinsertRecord, (record._prev), index);\n }\n else if (record.currentIndex != index) {\n record.currentIndex = index;\n this._addToMoves(record, index);\n }\n return record;\n };\n /**\n * Get rid of any excess {@link IterableChangeRecord_}s from the previous collection\n *\n * - `record` The first excess {@link IterableChangeRecord_}.\n *\n * @internal\n */\n /**\n * Get rid of any excess {@link IterableChangeRecord_}s from the previous collection\n *\n * - `record` The first excess {@link IterableChangeRecord_}.\n *\n * @internal\n */\n DefaultIterableDiffer.prototype._truncate = /**\n * Get rid of any excess {@link IterableChangeRecord_}s from the previous collection\n *\n * - `record` The first excess {@link IterableChangeRecord_}.\n *\n * @internal\n */\n function (record) {\n // Anything after that needs to be removed;\n while (record !== null) {\n var nextRecord = record._next;\n this._addToRemovals(this._unlink(record));\n record = nextRecord;\n }\n if (this._unlinkedRecords !== null) {\n this._unlinkedRecords.clear();\n }\n if (this._additionsTail !== null) {\n this._additionsTail._nextAdded = null;\n }\n if (this._movesTail !== null) {\n this._movesTail._nextMoved = null;\n }\n if (this._itTail !== null) {\n this._itTail._next = null;\n }\n if (this._removalsTail !== null) {\n this._removalsTail._nextRemoved = null;\n }\n if (this._identityChangesTail !== null) {\n this._identityChangesTail._nextIdentityChange = null;\n }\n };\n /** @internal */\n /** @internal */\n DefaultIterableDiffer.prototype._reinsertAfter = /** @internal */\n function (record, prevRecord, index) {\n if (this._unlinkedRecords !== null) {\n this._unlinkedRecords.remove(record);\n }\n var prev = record._prevRemoved;\n var next = record._nextRemoved;\n if (prev === null) {\n this._removalsHead = next;\n }\n else {\n prev._nextRemoved = next;\n }\n if (next === null) {\n this._removalsTail = prev;\n }\n else {\n next._prevRemoved = prev;\n }\n this._insertAfter(record, prevRecord, index);\n this._addToMoves(record, index);\n return record;\n };\n /** @internal */\n /** @internal */\n DefaultIterableDiffer.prototype._moveAfter = /** @internal */\n function (record, prevRecord, index) {\n this._unlink(record);\n this._insertAfter(record, prevRecord, index);\n this._addToMoves(record, index);\n return record;\n };\n /** @internal */\n /** @internal */\n DefaultIterableDiffer.prototype._addAfter = /** @internal */\n function (record, prevRecord, index) {\n this._insertAfter(record, prevRecord, index);\n if (this._additionsTail === null) {\n // TODO(vicb):\n // assert(this._additionsHead === null);\n this._additionsTail = this._additionsHead = record;\n }\n else {\n // TODO(vicb):\n // assert(_additionsTail._nextAdded === null);\n // assert(record._nextAdded === null);\n this._additionsTail = this._additionsTail._nextAdded = record;\n }\n return record;\n };\n /** @internal */\n /** @internal */\n DefaultIterableDiffer.prototype._insertAfter = /** @internal */\n function (record, prevRecord, index) {\n // TODO(vicb):\n // assert(record != prevRecord);\n // assert(record._next === null);\n // assert(record._prev === null);\n var next = prevRecord === null ? this._itHead : prevRecord._next;\n // TODO(vicb):\n // assert(next != record);\n // assert(prevRecord != record);\n record._next = next;\n record._prev = prevRecord;\n if (next === null) {\n this._itTail = record;\n }\n else {\n next._prev = record;\n }\n if (prevRecord === null) {\n this._itHead = record;\n }\n else {\n prevRecord._next = record;\n }\n if (this._linkedRecords === null) {\n this._linkedRecords = new _DuplicateMap();\n }\n this._linkedRecords.put(record);\n record.currentIndex = index;\n return record;\n };\n /** @internal */\n /** @internal */\n DefaultIterableDiffer.prototype._remove = /** @internal */\n function (record) {\n return this._addToRemovals(this._unlink(record));\n };\n /** @internal */\n /** @internal */\n DefaultIterableDiffer.prototype._unlink = /** @internal */\n function (record) {\n if (this._linkedRecords !== null) {\n this._linkedRecords.remove(record);\n }\n var prev = record._prev;\n var next = record._next;\n // TODO(vicb):\n // assert((record._prev = null) === null);\n // assert((record._next = null) === null);\n if (prev === null) {\n this._itHead = next;\n }\n else {\n prev._next = next;\n }\n if (next === null) {\n this._itTail = prev;\n }\n else {\n next._prev = prev;\n }\n return record;\n };\n /** @internal */\n /** @internal */\n DefaultIterableDiffer.prototype._addToMoves = /** @internal */\n function (record, toIndex) {\n // TODO(vicb):\n // assert(record._nextMoved === null);\n if (record.previousIndex === toIndex) {\n return record;\n }\n if (this._movesTail === null) {\n // TODO(vicb):\n // assert(_movesHead === null);\n this._movesTail = this._movesHead = record;\n }\n else {\n // TODO(vicb):\n // assert(_movesTail._nextMoved === null);\n this._movesTail = this._movesTail._nextMoved = record;\n }\n return record;\n };\n DefaultIterableDiffer.prototype._addToRemovals = function (record) {\n if (this._unlinkedRecords === null) {\n this._unlinkedRecords = new _DuplicateMap();\n }\n this._unlinkedRecords.put(record);\n record.currentIndex = null;\n record._nextRemoved = null;\n if (this._removalsTail === null) {\n // TODO(vicb):\n // assert(_removalsHead === null);\n this._removalsTail = this._removalsHead = record;\n record._prevRemoved = null;\n }\n else {\n // TODO(vicb):\n // assert(_removalsTail._nextRemoved === null);\n // assert(record._nextRemoved === null);\n record._prevRemoved = this._removalsTail;\n this._removalsTail = this._removalsTail._nextRemoved = record;\n }\n return record;\n };\n /** @internal */\n /** @internal */\n DefaultIterableDiffer.prototype._addIdentityChange = /** @internal */\n function (record, item) {\n record.item = item;\n if (this._identityChangesTail === null) {\n this._identityChangesTail = this._identityChangesHead = record;\n }\n else {\n this._identityChangesTail = this._identityChangesTail._nextIdentityChange = record;\n }\n return record;\n };\n return DefaultIterableDiffer;\n}());\nvar IterableChangeRecord_ = /** @class */ (function () {\n function IterableChangeRecord_(item, trackById) {\n this.item = item;\n this.trackById = trackById;\n this.currentIndex = null;\n this.previousIndex = null;\n /** @internal */\n this._nextPrevious = null;\n /** @internal */\n this._prev = null;\n /** @internal */\n this._next = null;\n /** @internal */\n this._prevDup = null;\n /** @internal */\n this._nextDup = null;\n /** @internal */\n this._prevRemoved = null;\n /** @internal */\n this._nextRemoved = null;\n /** @internal */\n this._nextAdded = null;\n /** @internal */\n this._nextMoved = null;\n /** @internal */\n this._nextIdentityChange = null;\n }\n return IterableChangeRecord_;\n}());\n// A linked list of CollectionChangeRecords with the same IterableChangeRecord_.item\nvar _DuplicateItemRecordList = /** @class */ (function () {\n function _DuplicateItemRecordList() {\n /** @internal */\n this._head = null;\n /** @internal */\n this._tail = null;\n }\n /**\n * Append the record to the list of duplicates.\n *\n * Note: by design all records in the list of duplicates hold the same value in record.item.\n */\n /**\n * Append the record to the list of duplicates.\n *\n * Note: by design all records in the list of duplicates hold the same value in record.item.\n */\n _DuplicateItemRecordList.prototype.add = /**\n * Append the record to the list of duplicates.\n *\n * Note: by design all records in the list of duplicates hold the same value in record.item.\n */\n function (record) {\n if (this._head === null) {\n this._head = this._tail = record;\n record._nextDup = null;\n record._prevDup = null;\n }\n else {\n // TODO(vicb):\n // assert(record.item == _head.item ||\n // record.item is num && record.item.isNaN && _head.item is num && _head.item.isNaN);\n // TODO(vicb):\n // assert(record.item == _head.item ||\n // record.item is num && record.item.isNaN && _head.item is num && _head.item.isNaN);\n this._tail._nextDup = record;\n record._prevDup = this._tail;\n record._nextDup = null;\n this._tail = record;\n }\n };\n // Returns a IterableChangeRecord_ having IterableChangeRecord_.trackById == trackById and\n // IterableChangeRecord_.currentIndex >= atOrAfterIndex\n // Returns a IterableChangeRecord_ having IterableChangeRecord_.trackById == trackById and\n // IterableChangeRecord_.currentIndex >= atOrAfterIndex\n _DuplicateItemRecordList.prototype.get = \n // Returns a IterableChangeRecord_ having IterableChangeRecord_.trackById == trackById and\n // IterableChangeRecord_.currentIndex >= atOrAfterIndex\n function (trackById, atOrAfterIndex) {\n var record;\n for (record = this._head; record !== null; record = record._nextDup) {\n if ((atOrAfterIndex === null || atOrAfterIndex <= (record.currentIndex)) &&\n looseIdentical(record.trackById, trackById)) {\n return record;\n }\n }\n return null;\n };\n /**\n * Remove one {@link IterableChangeRecord_} from the list of duplicates.\n *\n * Returns whether the list of duplicates is empty.\n */\n /**\n * Remove one {@link IterableChangeRecord_} from the list of duplicates.\n *\n * Returns whether the list of duplicates is empty.\n */\n _DuplicateItemRecordList.prototype.remove = /**\n * Remove one {@link IterableChangeRecord_} from the list of duplicates.\n *\n * Returns whether the list of duplicates is empty.\n */\n function (record) {\n // TODO(vicb):\n // assert(() {\n // // verify that the record being removed is in the list.\n // for (IterableChangeRecord_ cursor = _head; cursor != null; cursor = cursor._nextDup) {\n // if (identical(cursor, record)) return true;\n // }\n // return false;\n //});\n var prev = record._prevDup;\n var next = record._nextDup;\n if (prev === null) {\n this._head = next;\n }\n else {\n prev._nextDup = next;\n }\n if (next === null) {\n this._tail = prev;\n }\n else {\n next._prevDup = prev;\n }\n return this._head === null;\n };\n return _DuplicateItemRecordList;\n}());\nvar _DuplicateMap = /** @class */ (function () {\n function _DuplicateMap() {\n this.map = new Map();\n }\n _DuplicateMap.prototype.put = function (record) {\n var key = record.trackById;\n var duplicates = this.map.get(key);\n if (!duplicates) {\n duplicates = new _DuplicateItemRecordList();\n this.map.set(key, duplicates);\n }\n duplicates.add(record);\n };\n /**\n * Retrieve the `value` using key. Because the IterableChangeRecord_ value may be one which we\n * have already iterated over, we use the `atOrAfterIndex` to pretend it is not there.\n *\n * Use case: `[a, b, c, a, a]` if we are at index `3` which is the second `a` then asking if we\n * have any more `a`s needs to return the second `a`.\n */\n /**\n * Retrieve the `value` using key. Because the IterableChangeRecord_ value may be one which we\n * have already iterated over, we use the `atOrAfterIndex` to pretend it is not there.\n *\n * Use case: `[a, b, c, a, a]` if we are at index `3` which is the second `a` then asking if we\n * have any more `a`s needs to return the second `a`.\n */\n _DuplicateMap.prototype.get = /**\n * Retrieve the `value` using key. Because the IterableChangeRecord_ value may be one which we\n * have already iterated over, we use the `atOrAfterIndex` to pretend it is not there.\n *\n * Use case: `[a, b, c, a, a]` if we are at index `3` which is the second `a` then asking if we\n * have any more `a`s needs to return the second `a`.\n */\n function (trackById, atOrAfterIndex) {\n var key = trackById;\n var recordList = this.map.get(key);\n return recordList ? recordList.get(trackById, atOrAfterIndex) : null;\n };\n /**\n * Removes a {@link IterableChangeRecord_} from the list of duplicates.\n *\n * The list of duplicates also is removed from the map if it gets empty.\n */\n /**\n * Removes a {@link IterableChangeRecord_} from the list of duplicates.\n *\n * The list of duplicates also is removed from the map if it gets empty.\n */\n _DuplicateMap.prototype.remove = /**\n * Removes a {@link IterableChangeRecord_} from the list of duplicates.\n *\n * The list of duplicates also is removed from the map if it gets empty.\n */\n function (record) {\n var key = record.trackById;\n var recordList = (this.map.get(key));\n // Remove the list of duplicates when it gets empty\n if (recordList.remove(record)) {\n this.map.delete(key);\n }\n return record;\n };\n Object.defineProperty(_DuplicateMap.prototype, \"isEmpty\", {\n get: function () { return this.map.size === 0; },\n enumerable: true,\n configurable: true\n });\n _DuplicateMap.prototype.clear = function () { this.map.clear(); };\n return _DuplicateMap;\n}());\nfunction getPreviousIndex(item, addRemoveOffset, moveOffsets) {\n var previousIndex = item.previousIndex;\n if (previousIndex === null)\n return previousIndex;\n var moveOffset = 0;\n if (moveOffsets && previousIndex < moveOffsets.length) {\n moveOffset = moveOffsets[previousIndex];\n }\n return previousIndex + addRemoveOffset + moveOffset;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar DefaultKeyValueDifferFactory = /** @class */ (function () {\n function DefaultKeyValueDifferFactory() {\n }\n DefaultKeyValueDifferFactory.prototype.supports = function (obj) { return obj instanceof Map || isJsObject(obj); };\n DefaultKeyValueDifferFactory.prototype.create = function () { return new DefaultKeyValueDiffer(); };\n return DefaultKeyValueDifferFactory;\n}());\nvar DefaultKeyValueDiffer = /** @class */ (function () {\n function DefaultKeyValueDiffer() {\n this._records = new Map();\n this._mapHead = null;\n // _appendAfter is used in the check loop\n this._appendAfter = null;\n this._previousMapHead = null;\n this._changesHead = null;\n this._changesTail = null;\n this._additionsHead = null;\n this._additionsTail = null;\n this._removalsHead = null;\n this._removalsTail = null;\n }\n Object.defineProperty(DefaultKeyValueDiffer.prototype, \"isDirty\", {\n get: function () {\n return this._additionsHead !== null || this._changesHead !== null ||\n this._removalsHead !== null;\n },\n enumerable: true,\n configurable: true\n });\n DefaultKeyValueDiffer.prototype.forEachItem = function (fn) {\n var record;\n for (record = this._mapHead; record !== null; record = record._next) {\n fn(record);\n }\n };\n DefaultKeyValueDiffer.prototype.forEachPreviousItem = function (fn) {\n var record;\n for (record = this._previousMapHead; record !== null; record = record._nextPrevious) {\n fn(record);\n }\n };\n DefaultKeyValueDiffer.prototype.forEachChangedItem = function (fn) {\n var record;\n for (record = this._changesHead; record !== null; record = record._nextChanged) {\n fn(record);\n }\n };\n DefaultKeyValueDiffer.prototype.forEachAddedItem = function (fn) {\n var record;\n for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n fn(record);\n }\n };\n DefaultKeyValueDiffer.prototype.forEachRemovedItem = function (fn) {\n var record;\n for (record = this._removalsHead; record !== null; record = record._nextRemoved) {\n fn(record);\n }\n };\n DefaultKeyValueDiffer.prototype.diff = function (map) {\n if (!map) {\n map = new Map();\n }\n else if (!(map instanceof Map || isJsObject(map))) {\n throw new Error(\"Error trying to diff '\" + stringify(map) + \"'. Only maps and objects are allowed\");\n }\n return this.check(map) ? this : null;\n };\n DefaultKeyValueDiffer.prototype.onDestroy = function () { };\n /**\n * Check the current state of the map vs the previous.\n * The algorithm is optimised for when the keys do no change.\n */\n /**\n * Check the current state of the map vs the previous.\n * The algorithm is optimised for when the keys do no change.\n */\n DefaultKeyValueDiffer.prototype.check = /**\n * Check the current state of the map vs the previous.\n * The algorithm is optimised for when the keys do no change.\n */\n function (map) {\n var _this = this;\n this._reset();\n var insertBefore = this._mapHead;\n this._appendAfter = null;\n this._forEach(map, function (value, key) {\n if (insertBefore && insertBefore.key === key) {\n _this._maybeAddToChanges(insertBefore, value);\n _this._appendAfter = insertBefore;\n insertBefore = insertBefore._next;\n }\n else {\n var record = _this._getOrCreateRecordForKey(key, value);\n insertBefore = _this._insertBeforeOrAppend(insertBefore, record);\n }\n });\n // Items remaining at the end of the list have been deleted\n if (insertBefore) {\n if (insertBefore._prev) {\n insertBefore._prev._next = null;\n }\n this._removalsHead = insertBefore;\n for (var record = insertBefore; record !== null; record = record._nextRemoved) {\n if (record === this._mapHead) {\n this._mapHead = null;\n }\n this._records.delete(record.key);\n record._nextRemoved = record._next;\n record.previousValue = record.currentValue;\n record.currentValue = null;\n record._prev = null;\n record._next = null;\n }\n }\n // Make sure tails have no next records from previous runs\n if (this._changesTail)\n this._changesTail._nextChanged = null;\n if (this._additionsTail)\n this._additionsTail._nextAdded = null;\n return this.isDirty;\n };\n /**\n * Inserts a record before `before` or append at the end of the list when `before` is null.\n *\n * Notes:\n * - This method appends at `this._appendAfter`,\n * - This method updates `this._appendAfter`,\n * - The return value is the new value for the insertion pointer.\n */\n /**\n * Inserts a record before `before` or append at the end of the list when `before` is null.\n *\n * Notes:\n * - This method appends at `this._appendAfter`,\n * - This method updates `this._appendAfter`,\n * - The return value is the new value for the insertion pointer.\n */\n DefaultKeyValueDiffer.prototype._insertBeforeOrAppend = /**\n * Inserts a record before `before` or append at the end of the list when `before` is null.\n *\n * Notes:\n * - This method appends at `this._appendAfter`,\n * - This method updates `this._appendAfter`,\n * - The return value is the new value for the insertion pointer.\n */\n function (before, record) {\n if (before) {\n var prev = before._prev;\n record._next = before;\n record._prev = prev;\n before._prev = record;\n if (prev) {\n prev._next = record;\n }\n if (before === this._mapHead) {\n this._mapHead = record;\n }\n this._appendAfter = before;\n return before;\n }\n if (this._appendAfter) {\n this._appendAfter._next = record;\n record._prev = this._appendAfter;\n }\n else {\n this._mapHead = record;\n }\n this._appendAfter = record;\n return null;\n };\n DefaultKeyValueDiffer.prototype._getOrCreateRecordForKey = function (key, value) {\n if (this._records.has(key)) {\n var record_1 = (this._records.get(key));\n this._maybeAddToChanges(record_1, value);\n var prev = record_1._prev;\n var next = record_1._next;\n if (prev) {\n prev._next = next;\n }\n if (next) {\n next._prev = prev;\n }\n record_1._next = null;\n record_1._prev = null;\n return record_1;\n }\n var record = new KeyValueChangeRecord_(key);\n this._records.set(key, record);\n record.currentValue = value;\n this._addToAdditions(record);\n return record;\n };\n /** @internal */\n /** @internal */\n DefaultKeyValueDiffer.prototype._reset = /** @internal */\n function () {\n if (this.isDirty) {\n var record = void 0;\n // let `_previousMapHead` contain the state of the map before the changes\n this._previousMapHead = this._mapHead;\n for (record = this._previousMapHead; record !== null; record = record._next) {\n record._nextPrevious = record._next;\n }\n // Update `record.previousValue` with the value of the item before the changes\n // We need to update all changed items (that's those which have been added and changed)\n for (record = this._changesHead; record !== null; record = record._nextChanged) {\n record.previousValue = record.currentValue;\n }\n for (record = this._additionsHead; record != null; record = record._nextAdded) {\n record.previousValue = record.currentValue;\n }\n this._changesHead = this._changesTail = null;\n this._additionsHead = this._additionsTail = null;\n this._removalsHead = null;\n }\n };\n // Add the record or a given key to the list of changes only when the value has actually changed\n // Add the record or a given key to the list of changes only when the value has actually changed\n DefaultKeyValueDiffer.prototype._maybeAddToChanges = \n // Add the record or a given key to the list of changes only when the value has actually changed\n function (record, newValue) {\n if (!looseIdentical(newValue, record.currentValue)) {\n record.previousValue = record.currentValue;\n record.currentValue = newValue;\n this._addToChanges(record);\n }\n };\n DefaultKeyValueDiffer.prototype._addToAdditions = function (record) {\n if (this._additionsHead === null) {\n this._additionsHead = this._additionsTail = record;\n }\n else {\n this._additionsTail._nextAdded = record;\n this._additionsTail = record;\n }\n };\n DefaultKeyValueDiffer.prototype._addToChanges = function (record) {\n if (this._changesHead === null) {\n this._changesHead = this._changesTail = record;\n }\n else {\n this._changesTail._nextChanged = record;\n this._changesTail = record;\n }\n };\n /** @internal */\n /** @internal */\n DefaultKeyValueDiffer.prototype._forEach = /** @internal */\n function (obj, fn) {\n if (obj instanceof Map) {\n obj.forEach(fn);\n }\n else {\n Object.keys(obj).forEach(function (k) { return fn(obj[k], k); });\n }\n };\n return DefaultKeyValueDiffer;\n}());\nvar KeyValueChangeRecord_ = /** @class */ (function () {\n function KeyValueChangeRecord_(key) {\n this.key = key;\n this.previousValue = null;\n this.currentValue = null;\n /** @internal */\n this._nextPrevious = null;\n /** @internal */\n this._next = null;\n /** @internal */\n this._prev = null;\n /** @internal */\n this._nextAdded = null;\n /** @internal */\n this._nextRemoved = null;\n /** @internal */\n this._nextChanged = null;\n }\n return KeyValueChangeRecord_;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A repository of different iterable diffing strategies used by NgFor, NgClass, and others.\n *\n */\nvar IterableDiffers = /** @class */ (function () {\n function IterableDiffers(factories) {\n this.factories = factories;\n }\n IterableDiffers.create = function (factories, parent) {\n if (parent != null) {\n var copied = parent.factories.slice();\n factories = factories.concat(copied);\n }\n return new IterableDiffers(factories);\n };\n /**\n * Takes an array of {@link IterableDifferFactory} and returns a provider used to extend the\n * inherited {@link IterableDiffers} instance with the provided factories and return a new\n * {@link IterableDiffers} instance.\n *\n * The following example shows how to extend an existing list of factories,\n * which will only be applied to the injector for this component and its children.\n * This step is all that's required to make a new {@link IterableDiffer} available.\n *\n * ### Example\n *\n * ```\n * @Component({\n * viewProviders: [\n * IterableDiffers.extend([new ImmutableListDiffer()])\n * ]\n * })\n * ```\n */\n /**\n * Takes an array of {@link IterableDifferFactory} and returns a provider used to extend the\n * inherited {@link IterableDiffers} instance with the provided factories and return a new\n * {@link IterableDiffers} instance.\n *\n * The following example shows how to extend an existing list of factories,\n * which will only be applied to the injector for this component and its children.\n * This step is all that's required to make a new {@link IterableDiffer} available.\n *\n * ### Example\n *\n * ```\n * @Component({\n * viewProviders: [\n * IterableDiffers.extend([new ImmutableListDiffer()])\n * ]\n * })\n * ```\n */\n IterableDiffers.extend = /**\n * Takes an array of {@link IterableDifferFactory} and returns a provider used to extend the\n * inherited {@link IterableDiffers} instance with the provided factories and return a new\n * {@link IterableDiffers} instance.\n *\n * The following example shows how to extend an existing list of factories,\n * which will only be applied to the injector for this component and its children.\n * This step is all that's required to make a new {@link IterableDiffer} available.\n *\n * ### Example\n *\n * ```\n * @Component({\n * viewProviders: [\n * IterableDiffers.extend([new ImmutableListDiffer()])\n * ]\n * })\n * ```\n */\n function (factories) {\n return {\n provide: IterableDiffers,\n useFactory: function (parent) {\n if (!parent) {\n // Typically would occur when calling IterableDiffers.extend inside of dependencies passed\n // to\n // bootstrap(), which would override default pipes instead of extending them.\n throw new Error('Cannot extend IterableDiffers without a parent injector');\n }\n return IterableDiffers.create(factories, parent);\n },\n // Dependency technically isn't optional, but we can provide a better error message this way.\n deps: [[IterableDiffers, new SkipSelf(), new Optional()]]\n };\n };\n IterableDiffers.prototype.find = function (iterable) {\n var factory = this.factories.find(function (f) { return f.supports(iterable); });\n if (factory != null) {\n return factory;\n }\n else {\n throw new Error(\"Cannot find a differ supporting object '\" + iterable + \"' of type '\" + getTypeNameForDebugging(iterable) + \"'\");\n }\n };\n IterableDiffers.ngInjectableDef = defineInjectable({\n providedIn: 'root',\n factory: function () { return new IterableDiffers([new DefaultIterableDifferFactory()]); }\n });\n return IterableDiffers;\n}());\nfunction getTypeNameForDebugging(type) {\n return type['name'] || typeof type;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A repository of different Map diffing strategies used by NgClass, NgStyle, and others.\n *\n */\nvar KeyValueDiffers = /** @class */ (function () {\n function KeyValueDiffers(factories) {\n this.factories = factories;\n }\n KeyValueDiffers.create = function (factories, parent) {\n if (parent) {\n var copied = parent.factories.slice();\n factories = factories.concat(copied);\n }\n return new KeyValueDiffers(factories);\n };\n /**\n * Takes an array of {@link KeyValueDifferFactory} and returns a provider used to extend the\n * inherited {@link KeyValueDiffers} instance with the provided factories and return a new\n * {@link KeyValueDiffers} instance.\n *\n * The following example shows how to extend an existing list of factories,\n * which will only be applied to the injector for this component and its children.\n * This step is all that's required to make a new {@link KeyValueDiffer} available.\n *\n * ### Example\n *\n * ```\n * @Component({\n * viewProviders: [\n * KeyValueDiffers.extend([new ImmutableMapDiffer()])\n * ]\n * })\n * ```\n */\n /**\n * Takes an array of {@link KeyValueDifferFactory} and returns a provider used to extend the\n * inherited {@link KeyValueDiffers} instance with the provided factories and return a new\n * {@link KeyValueDiffers} instance.\n *\n * The following example shows how to extend an existing list of factories,\n * which will only be applied to the injector for this component and its children.\n * This step is all that's required to make a new {@link KeyValueDiffer} available.\n *\n * ### Example\n *\n * ```\n * @Component({\n * viewProviders: [\n * KeyValueDiffers.extend([new ImmutableMapDiffer()])\n * ]\n * })\n * ```\n */\n KeyValueDiffers.extend = /**\n * Takes an array of {@link KeyValueDifferFactory} and returns a provider used to extend the\n * inherited {@link KeyValueDiffers} instance with the provided factories and return a new\n * {@link KeyValueDiffers} instance.\n *\n * The following example shows how to extend an existing list of factories,\n * which will only be applied to the injector for this component and its children.\n * This step is all that's required to make a new {@link KeyValueDiffer} available.\n *\n * ### Example\n *\n * ```\n * @Component({\n * viewProviders: [\n * KeyValueDiffers.extend([new ImmutableMapDiffer()])\n * ]\n * })\n * ```\n */\n function (factories) {\n return {\n provide: KeyValueDiffers,\n useFactory: function (parent) {\n if (!parent) {\n // Typically would occur when calling KeyValueDiffers.extend inside of dependencies passed\n // to bootstrap(), which would override default pipes instead of extending them.\n throw new Error('Cannot extend KeyValueDiffers without a parent injector');\n }\n return KeyValueDiffers.create(factories, parent);\n },\n // Dependency technically isn't optional, but we can provide a better error message this way.\n deps: [[KeyValueDiffers, new SkipSelf(), new Optional()]]\n };\n };\n KeyValueDiffers.prototype.find = function (kv) {\n var factory = this.factories.find(function (f) { return f.supports(kv); });\n if (factory) {\n return factory;\n }\n throw new Error(\"Cannot find a differ supporting object '\" + kv + \"'\");\n };\n return KeyValueDiffers;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Structural diffing for `Object`s and `Map`s.\n */\nvar keyValDiff = [new DefaultKeyValueDifferFactory()];\n/**\n * Structural diffing for `Iterable` types such as `Array`s.\n */\nvar iterableDiff = [new DefaultIterableDifferFactory()];\nvar defaultIterableDiffers = new IterableDiffers(iterableDiff);\nvar defaultKeyValueDiffers = new KeyValueDiffers(keyValDiff);\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar _CORE_PLATFORM_PROVIDERS = [\n // Set a default platform name for platforms that don't set it explicitly.\n { provide: PLATFORM_ID, useValue: 'unknown' },\n { provide: PlatformRef, deps: [Injector] },\n { provide: TestabilityRegistry, deps: [] },\n { provide: Console, deps: [] },\n];\n/**\n * This platform has to be included in any other platform\n *\n * @experimental\n */\nvar platformCore = createPlatformFactory(null, 'core', _CORE_PLATFORM_PROVIDERS);\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Provide this token to set the locale of your application.\n * It is used for i18n extraction, by i18n pipes (DatePipe, I18nPluralPipe, CurrencyPipe,\n * DecimalPipe and PercentPipe) and by ICU expressions.\n *\n * See the {@linkDocs guide/i18n#setting-up-locale i18n guide} for more information.\n *\n * ### Example\n *\n * ```typescript\n * import { LOCALE_ID } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n * providers: [{provide: LOCALE_ID, useValue: 'en-US' }]\n * });\n * ```\n *\n * @experimental i18n support is experimental.\n */\nvar LOCALE_ID = new InjectionToken('LocaleId');\n/**\n * Use this token at bootstrap to provide the content of your translation file (`xtb`,\n * `xlf` or `xlf2`) when you want to translate your application in another language.\n *\n * See the {@linkDocs guide/i18n#merge i18n guide} for more information.\n *\n * ### Example\n *\n * ```typescript\n * import { TRANSLATIONS } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * // content of your translation file\n * const translations = '....';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n * providers: [{provide: TRANSLATIONS, useValue: translations }]\n * });\n * ```\n *\n * @experimental i18n support is experimental.\n */\nvar TRANSLATIONS = new InjectionToken('Translations');\n/**\n * Provide this token at bootstrap to set the format of your {@link TRANSLATIONS}: `xtb`,\n * `xlf` or `xlf2`.\n *\n * See the {@linkDocs guide/i18n#merge i18n guide} for more information.\n *\n * ### Example\n *\n * ```typescript\n * import { TRANSLATIONS_FORMAT } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n * providers: [{provide: TRANSLATIONS_FORMAT, useValue: 'xlf' }]\n * });\n * ```\n *\n * @experimental i18n support is experimental.\n */\nvar TRANSLATIONS_FORMAT = new InjectionToken('TranslationsFormat');\n/**\n * Use this enum at bootstrap as an option of `bootstrapModule` to define the strategy\n * that the compiler should use in case of missing translations:\n * - Error: throw if you have missing translations.\n * - Warning (default): show a warning in the console and/or shell.\n * - Ignore: do nothing.\n *\n * See the {@linkDocs guide/i18n#missing-translation i18n guide} for more information.\n *\n * ### Example\n * ```typescript\n * import { MissingTranslationStrategy } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n * missingTranslation: MissingTranslationStrategy.Error\n * });\n * ```\n *\n * @experimental i18n support is experimental.\n */\n/**\n * Use this enum at bootstrap as an option of `bootstrapModule` to define the strategy\n * that the compiler should use in case of missing translations:\n * - Error: throw if you have missing translations.\n * - Warning (default): show a warning in the console and/or shell.\n * - Ignore: do nothing.\n *\n * See the {@linkDocs guide/i18n#missing-translation i18n guide} for more information.\n *\n * ### Example\n * ```typescript\n * import { MissingTranslationStrategy } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n * missingTranslation: MissingTranslationStrategy.Error\n * });\n * ```\n *\n * @experimental i18n support is experimental.\n */\n\n/**\n * Use this enum at bootstrap as an option of `bootstrapModule` to define the strategy\n * that the compiler should use in case of missing translations:\n * - Error: throw if you have missing translations.\n * - Warning (default): show a warning in the console and/or shell.\n * - Ignore: do nothing.\n *\n * See the {@linkDocs guide/i18n#missing-translation i18n guide} for more information.\n *\n * ### Example\n * ```typescript\n * import { MissingTranslationStrategy } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n * missingTranslation: MissingTranslationStrategy.Error\n * });\n * ```\n *\n * @experimental i18n support is experimental.\n */\n(function (MissingTranslationStrategy) {\n MissingTranslationStrategy[MissingTranslationStrategy[\"Error\"] = 0] = \"Error\";\n MissingTranslationStrategy[MissingTranslationStrategy[\"Warning\"] = 1] = \"Warning\";\n MissingTranslationStrategy[MissingTranslationStrategy[\"Ignore\"] = 2] = \"Ignore\";\n})(exports.MissingTranslationStrategy || (exports.MissingTranslationStrategy = {}));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction _iterableDiffersFactory() {\n return defaultIterableDiffers;\n}\nfunction _keyValueDiffersFactory() {\n return defaultKeyValueDiffers;\n}\nfunction _localeFactory(locale) {\n return locale || 'en-US';\n}\n/**\n * This module includes the providers of @angular/core that are needed\n * to bootstrap components via `ApplicationRef`.\n *\n * @experimental\n */\nvar ApplicationModule = /** @class */ (function () {\n // Inject ApplicationRef to make it eager...\n function ApplicationModule(appRef) {\n }\n ApplicationModule.decorators = [\n { type: NgModule, args: [{\n providers: [\n ApplicationRef,\n ApplicationInitStatus,\n Compiler,\n APP_ID_RANDOM_PROVIDER,\n { provide: IterableDiffers, useFactory: _iterableDiffersFactory },\n { provide: KeyValueDiffers, useFactory: _keyValueDiffersFactory },\n {\n provide: LOCALE_ID,\n useFactory: _localeFactory,\n deps: [[new Inject(LOCALE_ID), new Optional(), new SkipSelf()]]\n },\n ]\n },] }\n ];\n /** @nocollapse */\n ApplicationModule.ctorParameters = function () { return [\n { type: ApplicationRef, },\n ]; };\n return ApplicationModule;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * This helper class is used to get hold of an inert tree of DOM elements containing dirty HTML\n * that needs sanitizing.\n * Depending upon browser support we must use one of three strategies for doing this.\n * Support: Safari 10.x -> XHR strategy\n * Support: Firefox -> DomParser strategy\n * Default: InertDocument strategy\n */\nvar InertBodyHelper = /** @class */ (function () {\n function InertBodyHelper(defaultDoc) {\n this.defaultDoc = defaultDoc;\n this.inertDocument = this.defaultDoc.implementation.createHTMLDocument('sanitization-inert');\n this.inertBodyElement = this.inertDocument.body;\n if (this.inertBodyElement == null) {\n // usually there should be only one body element in the document, but IE doesn't have any, so\n // we need to create one.\n var inertHtml = this.inertDocument.createElement('html');\n this.inertDocument.appendChild(inertHtml);\n this.inertBodyElement = this.inertDocument.createElement('body');\n inertHtml.appendChild(this.inertBodyElement);\n }\n this.inertBodyElement.innerHTML = '<svg><g onload=\"this.parentNode.remove()\"></g></svg>';\n if (this.inertBodyElement.querySelector && !this.inertBodyElement.querySelector('svg')) {\n // We just hit the Safari 10.1 bug - which allows JS to run inside the SVG G element\n // so use the XHR strategy.\n this.getInertBodyElement = this.getInertBodyElement_XHR;\n return;\n }\n this.inertBodyElement.innerHTML =\n '<svg><p><style><img src=\"</style><img src=x onerror=alert(1)//\">';\n if (this.inertBodyElement.querySelector && this.inertBodyElement.querySelector('svg img')) {\n // We just hit the Firefox bug - which prevents the inner img JS from being sanitized\n // so use the DOMParser strategy, if it is available.\n // If the DOMParser is not available then we are not in Firefox (Server/WebWorker?) so we\n // fall through to the default strategy below.\n if (isDOMParserAvailable()) {\n this.getInertBodyElement = this.getInertBodyElement_DOMParser;\n return;\n }\n }\n // None of the bugs were hit so it is safe for us to use the default InertDocument strategy\n this.getInertBodyElement = this.getInertBodyElement_InertDocument;\n }\n /**\n * Use XHR to create and fill an inert body element (on Safari 10.1)\n * See\n * https://github.com/cure53/DOMPurify/blob/a992d3a75031cb8bb032e5ea8399ba972bdf9a65/src/purify.js#L439-L449\n */\n /**\n * Use XHR to create and fill an inert body element (on Safari 10.1)\n * See\n * https://github.com/cure53/DOMPurify/blob/a992d3a75031cb8bb032e5ea8399ba972bdf9a65/src/purify.js#L439-L449\n */\n InertBodyHelper.prototype.getInertBodyElement_XHR = /**\n * Use XHR to create and fill an inert body element (on Safari 10.1)\n * See\n * https://github.com/cure53/DOMPurify/blob/a992d3a75031cb8bb032e5ea8399ba972bdf9a65/src/purify.js#L439-L449\n */\n function (html) {\n // We add these extra elements to ensure that the rest of the content is parsed as expected\n // e.g. leading whitespace is maintained and tags like `<meta>` do not get hoisted to the\n // `<head>` tag.\n html = '<body><remove></remove>' + html + '</body>';\n try {\n html = encodeURI(html);\n }\n catch (e) {\n return null;\n }\n var xhr = new XMLHttpRequest();\n xhr.responseType = 'document';\n xhr.open('GET', 'data:text/html;charset=utf-8,' + html, false);\n xhr.send(null);\n var body = xhr.response.body;\n body.removeChild((body.firstChild));\n return body;\n };\n /**\n * Use DOMParser to create and fill an inert body element (on Firefox)\n * See https://github.com/cure53/DOMPurify/releases/tag/0.6.7\n *\n */\n /**\n * Use DOMParser to create and fill an inert body element (on Firefox)\n * See https://github.com/cure53/DOMPurify/releases/tag/0.6.7\n *\n */\n InertBodyHelper.prototype.getInertBodyElement_DOMParser = /**\n * Use DOMParser to create and fill an inert body element (on Firefox)\n * See https://github.com/cure53/DOMPurify/releases/tag/0.6.7\n *\n */\n function (html) {\n // We add these extra elements to ensure that the rest of the content is parsed as expected\n // e.g. leading whitespace is maintained and tags like `<meta>` do not get hoisted to the\n // `<head>` tag.\n html = '<body><remove></remove>' + html + '</body>';\n try {\n var body = new window\n .DOMParser()\n .parseFromString(html, 'text/html')\n .body;\n body.removeChild((body.firstChild));\n return body;\n }\n catch (e) {\n return null;\n }\n };\n /**\n * Use an HTML5 `template` element, if supported, or an inert body element created via\n * `createHtmlDocument` to create and fill an inert DOM element.\n * This is the default sane strategy to use if the browser does not require one of the specialised\n * strategies above.\n */\n /**\n * Use an HTML5 `template` element, if supported, or an inert body element created via\n * `createHtmlDocument` to create and fill an inert DOM element.\n * This is the default sane strategy to use if the browser does not require one of the specialised\n * strategies above.\n */\n InertBodyHelper.prototype.getInertBodyElement_InertDocument = /**\n * Use an HTML5 `template` element, if supported, or an inert body element created via\n * `createHtmlDocument` to create and fill an inert DOM element.\n * This is the default sane strategy to use if the browser does not require one of the specialised\n * strategies above.\n */\n function (html) {\n // Prefer using <template> element if supported.\n var templateEl = this.inertDocument.createElement('template');\n if ('content' in templateEl) {\n templateEl.innerHTML = html;\n return templateEl;\n }\n this.inertBodyElement.innerHTML = html;\n // Support: IE 9-11 only\n // strip custom-namespaced attributes on IE<=11\n if (this.defaultDoc.documentMode) {\n this.stripCustomNsAttrs(this.inertBodyElement);\n }\n return this.inertBodyElement;\n };\n /**\n * When IE9-11 comes across an unknown namespaced attribute e.g. 'xlink:foo' it adds 'xmlns:ns1'\n * attribute to declare ns1 namespace and prefixes the attribute with 'ns1' (e.g.\n * 'ns1:xlink:foo').\n *\n * This is undesirable since we don't want to allow any of these custom attributes. This method\n * strips them all.\n */\n /**\n * When IE9-11 comes across an unknown namespaced attribute e.g. 'xlink:foo' it adds 'xmlns:ns1'\n * attribute to declare ns1 namespace and prefixes the attribute with 'ns1' (e.g.\n * 'ns1:xlink:foo').\n *\n * This is undesirable since we don't want to allow any of these custom attributes. This method\n * strips them all.\n */\n InertBodyHelper.prototype.stripCustomNsAttrs = /**\n * When IE9-11 comes across an unknown namespaced attribute e.g. 'xlink:foo' it adds 'xmlns:ns1'\n * attribute to declare ns1 namespace and prefixes the attribute with 'ns1' (e.g.\n * 'ns1:xlink:foo').\n *\n * This is undesirable since we don't want to allow any of these custom attributes. This method\n * strips them all.\n */\n function (el) {\n var elAttrs = el.attributes;\n // loop backwards so that we can support removals.\n for (var i = elAttrs.length - 1; 0 < i; i--) {\n var attrib = elAttrs.item(i);\n var attrName = attrib.name;\n if (attrName === 'xmlns:ns1' || attrName.indexOf('ns1:') === 0) {\n el.removeAttribute(attrName);\n }\n }\n var childNode = el.firstChild;\n while (childNode) {\n if (childNode.nodeType === Node.ELEMENT_NODE)\n this.stripCustomNsAttrs(childNode);\n childNode = childNode.nextSibling;\n }\n };\n return InertBodyHelper;\n}());\n/**\n * We need to determine whether the DOMParser exists in the global context.\n * The try-catch is because, on some browsers, trying to access this property\n * on window can actually throw an error.\n *\n * @suppress {uselessCode}\n */\nfunction isDOMParserAvailable() {\n try {\n return !!window.DOMParser;\n }\n catch (e) {\n return false;\n }\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A pattern that recognizes a commonly useful subset of URLs that are safe.\n *\n * This regular expression matches a subset of URLs that will not cause script\n * execution if used in URL context within a HTML document. Specifically, this\n * regular expression matches if (comment from here on and regex copied from\n * Soy's EscapingConventions):\n * (1) Either a protocol in a whitelist (http, https, mailto or ftp).\n * (2) or no protocol. A protocol must be followed by a colon. The below\n * allows that by allowing colons only after one of the characters [/?#].\n * A colon after a hash (#) must be in the fragment.\n * Otherwise, a colon after a (?) must be in a query.\n * Otherwise, a colon after a single solidus (/) must be in a path.\n * Otherwise, a colon after a double solidus (//) must be in the authority\n * (before port).\n *\n * The pattern disallows &, used in HTML entity declarations before\n * one of the characters in [/?#]. This disallows HTML entities used in the\n * protocol name, which should never happen, e.g. \"h&#116;tp\" for \"http\".\n * It also disallows HTML entities in the first path part of a relative path,\n * e.g. \"foo&lt;bar/baz\". Our existing escaping functions should not produce\n * that. More importantly, it disallows masking of a colon,\n * e.g. \"javascript&#58;...\".\n *\n * This regular expression was taken from the Closure sanitization library.\n */\nvar SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi;\n/** A pattern that matches safe data URLs. Only matches image, video and audio types. */\nvar DATA_URL_PATTERN = /^data:(?:image\\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\\/(?:mpeg|mp4|ogg|webm)|audio\\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\\/]+=*$/i;\nfunction _sanitizeUrl(url) {\n url = String(url);\n if (url.match(SAFE_URL_PATTERN) || url.match(DATA_URL_PATTERN))\n return url;\n if (isDevMode()) {\n console.warn(\"WARNING: sanitizing unsafe URL value \" + url + \" (see http://g.co/ng/security#xss)\");\n }\n return 'unsafe:' + url;\n}\nfunction sanitizeSrcset(srcset) {\n srcset = String(srcset);\n return srcset.split(',').map(function (srcset) { return _sanitizeUrl(srcset.trim()); }).join(', ');\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction tagSet(tags) {\n var res = {};\n try {\n for (var _a = __values(tags.split(',')), _b = _a.next(); !_b.done; _b = _a.next()) {\n var t = _b.value;\n res[t] = true;\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_b && !_b.done && (_c = _a.return)) _c.call(_a);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return res;\n var e_1, _c;\n}\nfunction merge$1() {\n var sets = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n sets[_i] = arguments[_i];\n }\n var res = {};\n try {\n for (var sets_1 = __values(sets), sets_1_1 = sets_1.next(); !sets_1_1.done; sets_1_1 = sets_1.next()) {\n var s = sets_1_1.value;\n for (var v in s) {\n if (s.hasOwnProperty(v))\n res[v] = true;\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (sets_1_1 && !sets_1_1.done && (_a = sets_1.return)) _a.call(sets_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n return res;\n var e_2, _a;\n}\n// Good source of info about elements and attributes\n// http://dev.w3.org/html5/spec/Overview.html#semantics\n// http://simon.html5.org/html-elements\n// Safe Void Elements - HTML5\n// http://dev.w3.org/html5/spec/Overview.html#void-elements\nvar VOID_ELEMENTS = tagSet('area,br,col,hr,img,wbr');\n// Elements that you can, intentionally, leave open (and which close themselves)\n// http://dev.w3.org/html5/spec/Overview.html#optional-tags\nvar OPTIONAL_END_TAG_BLOCK_ELEMENTS = tagSet('colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr');\nvar OPTIONAL_END_TAG_INLINE_ELEMENTS = tagSet('rp,rt');\nvar OPTIONAL_END_TAG_ELEMENTS = merge$1(OPTIONAL_END_TAG_INLINE_ELEMENTS, OPTIONAL_END_TAG_BLOCK_ELEMENTS);\n// Safe Block Elements - HTML5\nvar BLOCK_ELEMENTS = merge$1(OPTIONAL_END_TAG_BLOCK_ELEMENTS, tagSet('address,article,' +\n 'aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,' +\n 'h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul'));\n// Inline Elements - HTML5\nvar INLINE_ELEMENTS = merge$1(OPTIONAL_END_TAG_INLINE_ELEMENTS, tagSet('a,abbr,acronym,audio,b,' +\n 'bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,' +\n 'samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video'));\nvar VALID_ELEMENTS = merge$1(VOID_ELEMENTS, BLOCK_ELEMENTS, INLINE_ELEMENTS, OPTIONAL_END_TAG_ELEMENTS);\n// Attributes that have href and hence need to be sanitized\nvar URI_ATTRS = tagSet('background,cite,href,itemtype,longdesc,poster,src,xlink:href');\n// Attributes that have special href set hence need to be sanitized\nvar SRCSET_ATTRS = tagSet('srcset');\nvar HTML_ATTRS = tagSet('abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,' +\n 'compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,' +\n 'ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,' +\n 'scope,scrolling,shape,size,sizes,span,srclang,start,summary,tabindex,target,title,translate,type,usemap,' +\n 'valign,value,vspace,width');\n// NB: This currently consciously doesn't support SVG. SVG sanitization has had several security\n// issues in the past, so it seems safer to leave it out if possible. If support for binding SVG via\n// innerHTML is required, SVG attributes should be added here.\n// NB: Sanitization does not allow <form> elements or other active elements (<button> etc). Those\n// can be sanitized, but they increase security surface area without a legitimate use case, so they\n// are left out here.\nvar VALID_ATTRS = merge$1(URI_ATTRS, SRCSET_ATTRS, HTML_ATTRS);\n/**\n * SanitizingHtmlSerializer serializes a DOM fragment, stripping out any unsafe elements and unsafe\n * attributes.\n */\nvar SanitizingHtmlSerializer = /** @class */ (function () {\n function SanitizingHtmlSerializer() {\n // Explicitly track if something was stripped, to avoid accidentally warning of sanitization just\n // because characters were re-encoded.\n this.sanitizedSomething = false;\n this.buf = [];\n }\n SanitizingHtmlSerializer.prototype.sanitizeChildren = function (el) {\n // This cannot use a TreeWalker, as it has to run on Angular's various DOM adapters.\n // However this code never accesses properties off of `document` before deleting its contents\n // again, so it shouldn't be vulnerable to DOM clobbering.\n var current = (el.firstChild);\n while (current) {\n if (current.nodeType === Node.ELEMENT_NODE) {\n this.startElement(current);\n }\n else if (current.nodeType === Node.TEXT_NODE) {\n this.chars((current.nodeValue));\n }\n else {\n // Strip non-element, non-text nodes.\n this.sanitizedSomething = true;\n }\n if (current.firstChild) {\n current = (current.firstChild);\n continue;\n }\n while (current) {\n // Leaving the element. Walk up and to the right, closing tags as we go.\n if (current.nodeType === Node.ELEMENT_NODE) {\n this.endElement(current);\n }\n var next = this.checkClobberedElement(current, (current.nextSibling));\n if (next) {\n current = next;\n break;\n }\n current = this.checkClobberedElement(current, (current.parentNode));\n }\n }\n return this.buf.join('');\n };\n SanitizingHtmlSerializer.prototype.startElement = function (element) {\n var tagName = element.nodeName.toLowerCase();\n if (!VALID_ELEMENTS.hasOwnProperty(tagName)) {\n this.sanitizedSomething = true;\n return;\n }\n this.buf.push('<');\n this.buf.push(tagName);\n var elAttrs = element.attributes;\n for (var i = 0; i < elAttrs.length; i++) {\n var elAttr = elAttrs.item(i);\n var attrName = elAttr.name;\n var lower = attrName.toLowerCase();\n if (!VALID_ATTRS.hasOwnProperty(lower)) {\n this.sanitizedSomething = true;\n continue;\n }\n var value = elAttr.value;\n // TODO(martinprobst): Special case image URIs for data:image/...\n if (URI_ATTRS[lower])\n value = _sanitizeUrl(value);\n if (SRCSET_ATTRS[lower])\n value = sanitizeSrcset(value);\n this.buf.push(' ', attrName, '=\"', encodeEntities(value), '\"');\n }\n this.buf.push('>');\n };\n SanitizingHtmlSerializer.prototype.endElement = function (current) {\n var tagName = current.nodeName.toLowerCase();\n if (VALID_ELEMENTS.hasOwnProperty(tagName) && !VOID_ELEMENTS.hasOwnProperty(tagName)) {\n this.buf.push('</');\n this.buf.push(tagName);\n this.buf.push('>');\n }\n };\n SanitizingHtmlSerializer.prototype.chars = function (chars) { this.buf.push(encodeEntities(chars)); };\n SanitizingHtmlSerializer.prototype.checkClobberedElement = function (node, nextNode) {\n if (nextNode &&\n (node.compareDocumentPosition(nextNode) &\n Node.DOCUMENT_POSITION_CONTAINED_BY) === Node.DOCUMENT_POSITION_CONTAINED_BY) {\n throw new Error(\"Failed to sanitize html because the element is clobbered: \" + node.outerHTML);\n }\n return nextNode;\n };\n return SanitizingHtmlSerializer;\n}());\n// Regular Expressions for parsing tags and attributes\nvar SURROGATE_PAIR_REGEXP = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g;\n// ! to ~ is the ASCII range.\nvar NON_ALPHANUMERIC_REGEXP = /([^\\#-~ |!])/g;\n/**\n * Escapes all potentially dangerous characters, so that the\n * resulting string can be safely inserted into attribute or\n * element text.\n * @param value\n */\nfunction encodeEntities(value) {\n return value.replace(/&/g, '&amp;')\n .replace(SURROGATE_PAIR_REGEXP, function (match) {\n var hi = match.charCodeAt(0);\n var low = match.charCodeAt(1);\n return '&#' + (((hi - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000) + ';';\n })\n .replace(NON_ALPHANUMERIC_REGEXP, function (match) { return '&#' + match.charCodeAt(0) + ';'; })\n .replace(/</g, '&lt;')\n .replace(/>/g, '&gt;');\n}\nvar inertBodyHelper;\n/**\n * Sanitizes the given unsafe, untrusted HTML fragment, and returns HTML text that is safe to add to\n * the DOM in a browser environment.\n */\nfunction _sanitizeHtml(defaultDoc, unsafeHtmlInput) {\n var inertBodyElement = null;\n try {\n inertBodyHelper = inertBodyHelper || new InertBodyHelper(defaultDoc);\n // Make sure unsafeHtml is actually a string (TypeScript types are not enforced at runtime).\n var unsafeHtml = unsafeHtmlInput ? String(unsafeHtmlInput) : '';\n inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeHtml);\n // mXSS protection. Repeatedly parse the document to make sure it stabilizes, so that a browser\n // trying to auto-correct incorrect HTML cannot cause formerly inert HTML to become dangerous.\n var mXSSAttempts = 5;\n var parsedHtml = unsafeHtml;\n do {\n if (mXSSAttempts === 0) {\n throw new Error('Failed to sanitize html because the input is unstable');\n }\n mXSSAttempts--;\n unsafeHtml = parsedHtml;\n parsedHtml = inertBodyElement.innerHTML;\n inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeHtml);\n } while (unsafeHtml !== parsedHtml);\n var sanitizer = new SanitizingHtmlSerializer();\n var safeHtml = sanitizer.sanitizeChildren(getTemplateContent((inertBodyElement)) || inertBodyElement);\n if (isDevMode() && sanitizer.sanitizedSomething) {\n console.warn('WARNING: sanitizing HTML stripped some content (see http://g.co/ng/security#xss).');\n }\n return safeHtml;\n }\n finally {\n // In case anything goes wrong, clear out inertElement to reset the entire DOM structure.\n if (inertBodyElement) {\n var parent_1 = getTemplateContent(inertBodyElement) || inertBodyElement;\n while (parent_1.firstChild) {\n parent_1.removeChild(parent_1.firstChild);\n }\n }\n }\n}\nfunction getTemplateContent(el) {\n return 'content' in el /** Microsoft/TypeScript#21517 */ && isTemplateElement(el) ?\n el.content :\n null;\n}\nfunction isTemplateElement(el) {\n return el.nodeType === Node.ELEMENT_NODE && el.nodeName === 'TEMPLATE';\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * Regular expression for safe style values.\n *\n * Quotes (\" and ') are allowed, but a check must be done elsewhere to ensure they're balanced.\n *\n * ',' allows multiple values to be assigned to the same property (e.g. background-attachment or\n * font-family) and hence could allow multiple values to get injected, but that should pose no risk\n * of XSS.\n *\n * The function expression checks only for XSS safety, not for CSS validity.\n *\n * This regular expression was taken from the Closure sanitization library, and augmented for\n * transformation values.\n */\nvar VALUES = '[-,.\"\\'%_!# a-zA-Z0-9]+';\nvar TRANSFORMATION_FNS = '(?:matrix|translate|scale|rotate|skew|perspective)(?:X|Y|3d)?';\nvar COLOR_FNS = '(?:rgb|hsl)a?';\nvar GRADIENTS = '(?:repeating-)?(?:linear|radial)-gradient';\nvar CSS3_FNS = '(?:calc|attr)';\nvar FN_ARGS = '\\\\([-0-9.%, #a-zA-Z]+\\\\)';\nvar SAFE_STYLE_VALUE = new RegExp(\"^(\" + VALUES + \"|\" +\n (\"(?:\" + TRANSFORMATION_FNS + \"|\" + COLOR_FNS + \"|\" + GRADIENTS + \"|\" + CSS3_FNS + \")\") +\n (FN_ARGS + \")$\"), 'g');\n/**\n * Matches a `url(...)` value with an arbitrary argument as long as it does\n * not contain parentheses.\n *\n * The URL value still needs to be sanitized separately.\n *\n * `url(...)` values are a very common use case, e.g. for `background-image`. With carefully crafted\n * CSS style rules, it is possible to construct an information leak with `url` values in CSS, e.g.\n * by observing whether scroll bars are displayed, or character ranges used by a font face\n * definition.\n *\n * Angular only allows binding CSS values (as opposed to entire CSS rules), so it is unlikely that\n * binding a URL value without further cooperation from the page will cause an information leak, and\n * if so, it is just a leak, not a full blown XSS vulnerability.\n *\n * Given the common use case, low likelihood of attack vector, and low impact of an attack, this\n * code is permissive and allows URLs that sanitize otherwise.\n */\nvar URL_RE = /^url\\(([^)]+)\\)$/;\n/**\n * Checks that quotes (\" and ') are properly balanced inside a string. Assumes\n * that neither escape (\\) nor any other character that could result in\n * breaking out of a string parsing context are allowed;\n * see http://www.w3.org/TR/css3-syntax/#string-token-diagram.\n *\n * This code was taken from the Closure sanitization library.\n */\nfunction hasBalancedQuotes(value) {\n var outsideSingle = true;\n var outsideDouble = true;\n for (var i = 0; i < value.length; i++) {\n var c = value.charAt(i);\n if (c === '\\'' && outsideDouble) {\n outsideSingle = !outsideSingle;\n }\n else if (c === '\"' && outsideSingle) {\n outsideDouble = !outsideDouble;\n }\n }\n return outsideSingle && outsideDouble;\n}\n/**\n * Sanitizes the given untrusted CSS style property value (i.e. not an entire object, just a single\n * value) and returns a value that is safe to use in a browser environment.\n */\nfunction _sanitizeStyle(value) {\n value = String(value).trim(); // Make sure it's actually a string.\n if (!value)\n return '';\n // Single url(...) values are supported, but only for URLs that sanitize cleanly. See above for\n // reasoning behind this.\n var urlMatch = value.match(URL_RE);\n if ((urlMatch && _sanitizeUrl(urlMatch[1]) === urlMatch[1]) ||\n value.match(SAFE_STYLE_VALUE) && hasBalancedQuotes(value)) {\n return value; // Safe style values.\n }\n if (isDevMode()) {\n console.warn(\"WARNING: sanitizing unsafe style value \" + value + \" (see http://g.co/ng/security#xss).\");\n }\n return 'unsafe';\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A SecurityContext marks a location that has dangerous security implications, e.g. a DOM property\n * like `innerHTML` that could cause Cross Site Scripting (XSS) security bugs when improperly\n * handled.\n *\n * See DomSanitizer for more details on security in Angular applications.\n *\n *\n */\n/**\n * A SecurityContext marks a location that has dangerous security implications, e.g. a DOM property\n * like `innerHTML` that could cause Cross Site Scripting (XSS) security bugs when improperly\n * handled.\n *\n * See DomSanitizer for more details on security in Angular applications.\n *\n *\n */\n\n/**\n * A SecurityContext marks a location that has dangerous security implications, e.g. a DOM property\n * like `innerHTML` that could cause Cross Site Scripting (XSS) security bugs when improperly\n * handled.\n *\n * See DomSanitizer for more details on security in Angular applications.\n *\n *\n */\n(function (SecurityContext) {\n SecurityContext[SecurityContext[\"NONE\"] = 0] = \"NONE\";\n SecurityContext[SecurityContext[\"HTML\"] = 1] = \"HTML\";\n SecurityContext[SecurityContext[\"STYLE\"] = 2] = \"STYLE\";\n SecurityContext[SecurityContext[\"SCRIPT\"] = 3] = \"SCRIPT\";\n SecurityContext[SecurityContext[\"URL\"] = 4] = \"URL\";\n SecurityContext[SecurityContext[\"RESOURCE_URL\"] = 5] = \"RESOURCE_URL\";\n})(exports.SecurityContext || (exports.SecurityContext = {}));\n/**\n * Sanitizer is used by the views to sanitize potentially dangerous values.\n *\n *\n */\nvar Sanitizer = /** @class */ (function () {\n function Sanitizer() {\n }\n return Sanitizer;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Called before each cycle of a view's check to detect whether this is in the\n// initState for which we need to call ngOnInit, ngAfterContentInit or ngAfterViewInit\n// lifecycle methods. Returns true if this check cycle should call lifecycle\n// methods.\nfunction shiftInitState(view, priorInitState, newInitState) {\n // Only update the InitState if we are currently in the prior state.\n // For example, only move into CallingInit if we are in BeforeInit. Only\n // move into CallingContentInit if we are in CallingInit. Normally this will\n // always be true because of how checkCycle is called in checkAndUpdateView.\n // However, if checkAndUpdateView is called recursively or if an exception is\n // thrown while checkAndUpdateView is running, checkAndUpdateView starts over\n // from the beginning. This ensures the state is monotonically increasing,\n // terminating in the AfterInit state, which ensures the Init methods are called\n // at least once and only once.\n var state = view.state;\n var initState = state & 1792;\n if (initState === priorInitState) {\n view.state = (state & ~1792 /* InitState_Mask */) | newInitState;\n view.initIndex = -1;\n return true;\n }\n return initState === newInitState;\n}\n// Returns true if the lifecycle init method should be called for the node with\n// the given init index.\nfunction shouldCallLifecycleInitHook(view, initState, index) {\n if ((view.state & 1792 /* InitState_Mask */) === initState && view.initIndex <= index) {\n view.initIndex = index + 1;\n return true;\n }\n return false;\n}\n/**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\nfunction asTextData(view, index) {\n return view.nodes[index];\n}\n/**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\nfunction asElementData(view, index) {\n return view.nodes[index];\n}\n/**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\nfunction asProviderData(view, index) {\n return view.nodes[index];\n}\n/**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\nfunction asPureExpressionData(view, index) {\n return view.nodes[index];\n}\n/**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\nfunction asQueryList(view, index) {\n return view.nodes[index];\n}\nvar DebugContext = /** @class */ (function () {\n function DebugContext() {\n }\n return DebugContext;\n}());\n/**\n * This object is used to prevent cycles in the source files and to have a place where\n * debug mode can hook it. It is lazily filled when `isDevMode` is known.\n */\nvar Services = {\n setCurrentNode: (undefined),\n createRootView: (undefined),\n createEmbeddedView: (undefined),\n createComponentView: (undefined),\n createNgModuleRef: (undefined),\n overrideProvider: (undefined),\n overrideComponentView: (undefined),\n clearOverrides: (undefined),\n checkAndUpdateView: (undefined),\n checkNoChangesView: (undefined),\n destroyView: (undefined),\n resolveDep: (undefined),\n createDebugContext: (undefined),\n handleEvent: (undefined),\n updateDirectives: (undefined),\n updateRenderer: (undefined),\n dirtyParentQueries: (undefined),\n};\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction expressionChangedAfterItHasBeenCheckedError(context, oldValue, currValue, isFirstCheck) {\n var msg = \"ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: '\" + oldValue + \"'. Current value: '\" + currValue + \"'.\";\n if (isFirstCheck) {\n msg +=\n \" It seems like the view has been created after its parent and its children have been dirty checked.\" +\n \" Has it been created in a change detection hook ?\";\n }\n return viewDebugError(msg, context);\n}\nfunction viewWrappedDebugError(err, context) {\n if (!(err instanceof Error)) {\n // errors that are not Error instances don't have a stack,\n // so it is ok to wrap them into a new Error object...\n err = new Error(err.toString());\n }\n _addDebugContext(err, context);\n return err;\n}\nfunction viewDebugError(msg, context) {\n var err = new Error(msg);\n _addDebugContext(err, context);\n return err;\n}\nfunction _addDebugContext(err, context) {\n err[ERROR_DEBUG_CONTEXT] = context;\n err[ERROR_LOGGER] = context.logError.bind(context);\n}\nfunction isViewDebugError(err) {\n return !!getDebugContext(err);\n}\nfunction viewDestroyedError(action) {\n return new Error(\"ViewDestroyedError: Attempt to use a destroyed view: \" + action);\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar NOOP = function () { };\nvar _tokenKeyCache = new Map();\nfunction tokenKey(token) {\n var key = _tokenKeyCache.get(token);\n if (!key) {\n key = stringify(token) + '_' + _tokenKeyCache.size;\n _tokenKeyCache.set(token, key);\n }\n return key;\n}\nfunction unwrapValue(view, nodeIdx, bindingIdx, value) {\n if (WrappedValue.isWrapped(value)) {\n value = WrappedValue.unwrap(value);\n var globalBindingIdx = view.def.nodes[nodeIdx].bindingIndex + bindingIdx;\n var oldValue = WrappedValue.unwrap(view.oldValues[globalBindingIdx]);\n view.oldValues[globalBindingIdx] = new WrappedValue(oldValue);\n }\n return value;\n}\nvar UNDEFINED_RENDERER_TYPE_ID = '$$undefined';\nvar EMPTY_RENDERER_TYPE_ID = '$$empty';\n// Attention: this function is called as top level function.\n// Putting any logic in here will destroy closure tree shaking!\nfunction createRendererType2(values) {\n return {\n id: UNDEFINED_RENDERER_TYPE_ID,\n styles: values.styles,\n encapsulation: values.encapsulation,\n data: values.data\n };\n}\nvar _renderCompCount = 0;\nfunction resolveRendererType2(type) {\n if (type && type.id === UNDEFINED_RENDERER_TYPE_ID) {\n // first time we see this RendererType2. Initialize it...\n var isFilled = ((type.encapsulation != null && type.encapsulation !== exports.ViewEncapsulation.None) ||\n type.styles.length || Object.keys(type.data).length);\n if (isFilled) {\n type.id = \"c\" + _renderCompCount++;\n }\n else {\n type.id = EMPTY_RENDERER_TYPE_ID;\n }\n }\n if (type && type.id === EMPTY_RENDERER_TYPE_ID) {\n type = null;\n }\n return type || null;\n}\nfunction checkBinding(view, def, bindingIdx, value) {\n var oldValues = view.oldValues;\n if ((view.state & 2 /* FirstCheck */) ||\n !looseIdentical(oldValues[def.bindingIndex + bindingIdx], value)) {\n return true;\n }\n return false;\n}\nfunction checkAndUpdateBinding(view, def, bindingIdx, value) {\n if (checkBinding(view, def, bindingIdx, value)) {\n view.oldValues[def.bindingIndex + bindingIdx] = value;\n return true;\n }\n return false;\n}\nfunction checkBindingNoChanges(view, def, bindingIdx, value) {\n var oldValue = view.oldValues[def.bindingIndex + bindingIdx];\n if ((view.state & 1 /* BeforeFirstCheck */) || !devModeEqual(oldValue, value)) {\n var bindingName = def.bindings[bindingIdx].name;\n throw expressionChangedAfterItHasBeenCheckedError(Services.createDebugContext(view, def.nodeIndex), bindingName + \": \" + oldValue, bindingName + \": \" + value, (view.state & 1 /* BeforeFirstCheck */) !== 0);\n }\n}\nfunction markParentViewsForCheck(view) {\n var currView = view;\n while (currView) {\n if (currView.def.flags & 2 /* OnPush */) {\n currView.state |= 8 /* ChecksEnabled */;\n }\n currView = currView.viewContainerParent || currView.parent;\n }\n}\nfunction markParentViewsForCheckProjectedViews(view, endView) {\n var currView = view;\n while (currView && currView !== endView) {\n currView.state |= 64 /* CheckProjectedViews */;\n currView = currView.viewContainerParent || currView.parent;\n }\n}\nfunction dispatchEvent(view, nodeIndex, eventName, event) {\n try {\n var nodeDef = view.def.nodes[nodeIndex];\n var startView = nodeDef.flags & 33554432 /* ComponentView */ ?\n asElementData(view, nodeIndex).componentView :\n view;\n markParentViewsForCheck(startView);\n return Services.handleEvent(view, nodeIndex, eventName, event);\n }\n catch (e) {\n // Attention: Don't rethrow, as it would cancel Observable subscriptions!\n view.root.errorHandler.handleError(e);\n }\n}\nfunction declaredViewContainer(view) {\n if (view.parent) {\n var parentView = view.parent;\n return asElementData(parentView, view.parentNodeDef.nodeIndex);\n }\n return null;\n}\n/**\n * for component views, this is the host element.\n * for embedded views, this is the index of the parent node\n * that contains the view container.\n */\nfunction viewParentEl(view) {\n var parentView = view.parent;\n if (parentView) {\n return view.parentNodeDef.parent;\n }\n else {\n return null;\n }\n}\nfunction renderNode(view, def) {\n switch (def.flags & 201347067 /* Types */) {\n case 1 /* TypeElement */:\n return asElementData(view, def.nodeIndex).renderElement;\n case 2 /* TypeText */:\n return asTextData(view, def.nodeIndex).renderText;\n }\n}\nfunction elementEventFullName(target, name) {\n return target ? target + \":\" + name : name;\n}\nfunction isComponentView(view) {\n return !!view.parent && !!(view.parentNodeDef.flags & 32768 /* Component */);\n}\nfunction isEmbeddedView(view) {\n return !!view.parent && !(view.parentNodeDef.flags & 32768 /* Component */);\n}\nfunction filterQueryId(queryId) {\n return 1 << (queryId % 32);\n}\nfunction splitMatchedQueriesDsl(matchedQueriesDsl) {\n var matchedQueries = {};\n var matchedQueryIds = 0;\n var references = {};\n if (matchedQueriesDsl) {\n matchedQueriesDsl.forEach(function (_a) {\n var _b = __read(_a, 2), queryId = _b[0], valueType = _b[1];\n if (typeof queryId === 'number') {\n matchedQueries[queryId] = valueType;\n matchedQueryIds |= filterQueryId(queryId);\n }\n else {\n references[queryId] = valueType;\n }\n });\n }\n return { matchedQueries: matchedQueries, references: references, matchedQueryIds: matchedQueryIds };\n}\nfunction splitDepsDsl(deps, sourceName) {\n return deps.map(function (value) {\n var token;\n var flags;\n if (Array.isArray(value)) {\n _a = __read(value, 2), flags = _a[0], token = _a[1];\n }\n else {\n flags = 0 /* None */;\n token = value;\n }\n if (token && (typeof token === 'function' || typeof token === 'object') && sourceName) {\n Object.defineProperty(token, SOURCE, { value: sourceName, configurable: true });\n }\n return { flags: flags, token: token, tokenKey: tokenKey(token) };\n var _a;\n });\n}\nfunction getParentRenderElement(view, renderHost, def) {\n var renderParent = def.renderParent;\n if (renderParent) {\n if ((renderParent.flags & 1 /* TypeElement */) === 0 ||\n (renderParent.flags & 33554432 /* ComponentView */) === 0 ||\n (renderParent.element.componentRendererType &&\n renderParent.element.componentRendererType.encapsulation ===\n exports.ViewEncapsulation.Native)) {\n // only children of non components, or children of components with native encapsulation should\n // be attached.\n return asElementData(view, def.renderParent.nodeIndex).renderElement;\n }\n }\n else {\n return renderHost;\n }\n}\nvar DEFINITION_CACHE = new WeakMap();\nfunction resolveDefinition(factory) {\n var value = DEFINITION_CACHE.get(factory);\n if (!value) {\n value = factory(function () { return NOOP; });\n value.factory = factory;\n DEFINITION_CACHE.set(factory, value);\n }\n return value;\n}\nfunction rootRenderNodes(view) {\n var renderNodes = [];\n visitRootRenderNodes(view, 0 /* Collect */, undefined, undefined, renderNodes);\n return renderNodes;\n}\nfunction visitRootRenderNodes(view, action, parentNode, nextSibling, target) {\n // We need to re-compute the parent node in case the nodes have been moved around manually\n if (action === 3 /* RemoveChild */) {\n parentNode = view.renderer.parentNode(renderNode(view, (view.def.lastRenderRootNode)));\n }\n visitSiblingRenderNodes(view, action, 0, view.def.nodes.length - 1, parentNode, nextSibling, target);\n}\nfunction visitSiblingRenderNodes(view, action, startIndex, endIndex, parentNode, nextSibling, target) {\n for (var i = startIndex; i <= endIndex; i++) {\n var nodeDef = view.def.nodes[i];\n if (nodeDef.flags & (1 /* TypeElement */ | 2 /* TypeText */ | 8 /* TypeNgContent */)) {\n visitRenderNode(view, nodeDef, action, parentNode, nextSibling, target);\n }\n // jump to next sibling\n i += nodeDef.childCount;\n }\n}\nfunction visitProjectedRenderNodes(view, ngContentIndex, action, parentNode, nextSibling, target) {\n var compView = view;\n while (compView && !isComponentView(compView)) {\n compView = compView.parent;\n }\n var hostView = compView.parent;\n var hostElDef = viewParentEl((compView));\n var startIndex = hostElDef.nodeIndex + 1;\n var endIndex = hostElDef.nodeIndex + hostElDef.childCount;\n for (var i = startIndex; i <= endIndex; i++) {\n var nodeDef = hostView.def.nodes[i];\n if (nodeDef.ngContentIndex === ngContentIndex) {\n visitRenderNode((hostView), nodeDef, action, parentNode, nextSibling, target);\n }\n // jump to next sibling\n i += nodeDef.childCount;\n }\n if (!hostView.parent) {\n // a root view\n var projectedNodes = view.root.projectableNodes[ngContentIndex];\n if (projectedNodes) {\n for (var i = 0; i < projectedNodes.length; i++) {\n execRenderNodeAction(view, projectedNodes[i], action, parentNode, nextSibling, target);\n }\n }\n }\n}\nfunction visitRenderNode(view, nodeDef, action, parentNode, nextSibling, target) {\n if (nodeDef.flags & 8 /* TypeNgContent */) {\n visitProjectedRenderNodes(view, nodeDef.ngContent.index, action, parentNode, nextSibling, target);\n }\n else {\n var rn = renderNode(view, nodeDef);\n if (action === 3 /* RemoveChild */ && (nodeDef.flags & 33554432 /* ComponentView */) &&\n (nodeDef.bindingFlags & 48 /* CatSyntheticProperty */)) {\n // Note: we might need to do both actions.\n if (nodeDef.bindingFlags & (16 /* SyntheticProperty */)) {\n execRenderNodeAction(view, rn, action, parentNode, nextSibling, target);\n }\n if (nodeDef.bindingFlags & (32 /* SyntheticHostProperty */)) {\n var compView = asElementData(view, nodeDef.nodeIndex).componentView;\n execRenderNodeAction(compView, rn, action, parentNode, nextSibling, target);\n }\n }\n else {\n execRenderNodeAction(view, rn, action, parentNode, nextSibling, target);\n }\n if (nodeDef.flags & 16777216 /* EmbeddedViews */) {\n var embeddedViews = asElementData(view, nodeDef.nodeIndex).viewContainer._embeddedViews;\n for (var k = 0; k < embeddedViews.length; k++) {\n visitRootRenderNodes(embeddedViews[k], action, parentNode, nextSibling, target);\n }\n }\n if (nodeDef.flags & 1 /* TypeElement */ && !nodeDef.element.name) {\n visitSiblingRenderNodes(view, action, nodeDef.nodeIndex + 1, nodeDef.nodeIndex + nodeDef.childCount, parentNode, nextSibling, target);\n }\n }\n}\nfunction execRenderNodeAction(view, renderNode, action, parentNode, nextSibling, target) {\n var renderer = view.renderer;\n switch (action) {\n case 1 /* AppendChild */:\n renderer.appendChild(parentNode, renderNode);\n break;\n case 2 /* InsertBefore */:\n renderer.insertBefore(parentNode, renderNode, nextSibling);\n break;\n case 3 /* RemoveChild */:\n renderer.removeChild(parentNode, renderNode);\n break;\n case 0 /* Collect */:\n target.push(renderNode);\n break;\n }\n}\nvar NS_PREFIX_RE = /^:([^:]+):(.+)$/;\nfunction splitNamespace(name) {\n if (name[0] === ':') {\n var match = (name.match(NS_PREFIX_RE));\n return [match[1], match[2]];\n }\n return ['', name];\n}\nfunction calcBindingFlags(bindings) {\n var flags = 0;\n for (var i = 0; i < bindings.length; i++) {\n flags |= bindings[i].flags;\n }\n return flags;\n}\nfunction interpolate(valueCount, constAndInterp) {\n var result = '';\n for (var i = 0; i < valueCount * 2; i = i + 2) {\n result = result + constAndInterp[i] + _toStringWithNull(constAndInterp[i + 1]);\n }\n return result + constAndInterp[valueCount * 2];\n}\nfunction inlineInterpolate(valueCount, c0, a1, c1, a2, c2, a3, c3, a4, c4, a5, c5, a6, c6, a7, c7, a8, c8, a9, c9) {\n switch (valueCount) {\n case 1:\n return c0 + _toStringWithNull(a1) + c1;\n case 2:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2;\n case 3:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n c3;\n case 4:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n c3 + _toStringWithNull(a4) + c4;\n case 5:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5;\n case 6:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) + c6;\n case 7:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) +\n c6 + _toStringWithNull(a7) + c7;\n case 8:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) +\n c6 + _toStringWithNull(a7) + c7 + _toStringWithNull(a8) + c8;\n case 9:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) +\n c6 + _toStringWithNull(a7) + c7 + _toStringWithNull(a8) + c8 + _toStringWithNull(a9) + c9;\n default:\n throw new Error(\"Does not support more than 9 expressions\");\n }\n}\nfunction _toStringWithNull(v) {\n return v != null ? v.toString() : '';\n}\nvar EMPTY_ARRAY$2 = [];\nvar EMPTY_MAP = {};\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction anchorDef(flags, matchedQueriesDsl, ngContentIndex, childCount, handleEvent, templateFactory) {\n flags |= 1 /* TypeElement */;\n var _a = splitMatchedQueriesDsl(matchedQueriesDsl), matchedQueries = _a.matchedQueries, references = _a.references, matchedQueryIds = _a.matchedQueryIds;\n var template = templateFactory ? resolveDefinition(templateFactory) : null;\n return {\n // will bet set by the view definition\n nodeIndex: -1,\n parent: null,\n renderParent: null,\n bindingIndex: -1,\n outputIndex: -1,\n // regular values\n flags: flags,\n checkIndex: -1,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0, matchedQueries: matchedQueries, matchedQueryIds: matchedQueryIds, references: references, ngContentIndex: ngContentIndex, childCount: childCount,\n bindings: [],\n bindingFlags: 0,\n outputs: [],\n element: {\n ns: null,\n name: null,\n attrs: null, template: template,\n componentProvider: null,\n componentView: null,\n componentRendererType: null,\n publicProviders: null,\n allProviders: null,\n handleEvent: handleEvent || NOOP\n },\n provider: null,\n text: null,\n query: null,\n ngContent: null\n };\n}\nfunction elementDef(checkIndex, flags, matchedQueriesDsl, ngContentIndex, childCount, namespaceAndName, fixedAttrs, bindings, outputs, handleEvent, componentView, componentRendererType) {\n if (fixedAttrs === void 0) { fixedAttrs = []; }\n if (!handleEvent) {\n handleEvent = NOOP;\n }\n var _a = splitMatchedQueriesDsl(matchedQueriesDsl), matchedQueries = _a.matchedQueries, references = _a.references, matchedQueryIds = _a.matchedQueryIds;\n var ns = (null);\n var name = (null);\n if (namespaceAndName) {\n _b = __read(splitNamespace(namespaceAndName), 2), ns = _b[0], name = _b[1];\n }\n bindings = bindings || [];\n var bindingDefs = new Array(bindings.length);\n for (var i = 0; i < bindings.length; i++) {\n var _c = __read(bindings[i], 3), bindingFlags = _c[0], namespaceAndName_1 = _c[1], suffixOrSecurityContext = _c[2];\n var _d = __read(splitNamespace(namespaceAndName_1), 2), ns_1 = _d[0], name_1 = _d[1];\n var securityContext = (undefined);\n var suffix = (undefined);\n switch (bindingFlags & 15 /* Types */) {\n case 4 /* TypeElementStyle */:\n suffix = suffixOrSecurityContext;\n break;\n case 1 /* TypeElementAttribute */:\n case 8 /* TypeProperty */:\n securityContext = suffixOrSecurityContext;\n break;\n }\n bindingDefs[i] =\n { flags: bindingFlags, ns: ns_1, name: name_1, nonMinifiedName: name_1, securityContext: securityContext, suffix: suffix };\n }\n outputs = outputs || [];\n var outputDefs = new Array(outputs.length);\n for (var i = 0; i < outputs.length; i++) {\n var _e = __read(outputs[i], 2), target = _e[0], eventName = _e[1];\n outputDefs[i] = {\n type: 0 /* ElementOutput */,\n target: target, eventName: eventName,\n propName: null\n };\n }\n fixedAttrs = fixedAttrs || [];\n var attrs = fixedAttrs.map(function (_a) {\n var _b = __read(_a, 2), namespaceAndName = _b[0], value = _b[1];\n var _c = __read(splitNamespace(namespaceAndName), 2), ns = _c[0], name = _c[1];\n return [ns, name, value];\n });\n componentRendererType = resolveRendererType2(componentRendererType);\n if (componentView) {\n flags |= 33554432 /* ComponentView */;\n }\n flags |= 1 /* TypeElement */;\n return {\n // will bet set by the view definition\n nodeIndex: -1,\n parent: null,\n renderParent: null,\n bindingIndex: -1,\n outputIndex: -1,\n // regular values\n checkIndex: checkIndex,\n flags: flags,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0, matchedQueries: matchedQueries, matchedQueryIds: matchedQueryIds, references: references, ngContentIndex: ngContentIndex, childCount: childCount,\n bindings: bindingDefs,\n bindingFlags: calcBindingFlags(bindingDefs),\n outputs: outputDefs,\n element: {\n ns: ns,\n name: name,\n attrs: attrs,\n template: null,\n // will bet set by the view definition\n componentProvider: null,\n componentView: componentView || null,\n componentRendererType: componentRendererType,\n publicProviders: null,\n allProviders: null,\n handleEvent: handleEvent || NOOP,\n },\n provider: null,\n text: null,\n query: null,\n ngContent: null\n };\n var _b;\n}\nfunction createElement(view, renderHost, def) {\n var elDef = (def.element);\n var rootSelectorOrNode = view.root.selectorOrNode;\n var renderer = view.renderer;\n var el;\n if (view.parent || !rootSelectorOrNode) {\n if (elDef.name) {\n el = renderer.createElement(elDef.name, elDef.ns);\n }\n else {\n el = renderer.createComment('');\n }\n var parentEl = getParentRenderElement(view, renderHost, def);\n if (parentEl) {\n renderer.appendChild(parentEl, el);\n }\n }\n else {\n el = renderer.selectRootElement(rootSelectorOrNode);\n }\n if (elDef.attrs) {\n for (var i = 0; i < elDef.attrs.length; i++) {\n var _a = __read(elDef.attrs[i], 3), ns = _a[0], name_2 = _a[1], value = _a[2];\n renderer.setAttribute(el, name_2, value, ns);\n }\n }\n return el;\n}\nfunction listenToElementOutputs(view, compView, def, el) {\n for (var i = 0; i < def.outputs.length; i++) {\n var output = def.outputs[i];\n var handleEventClosure = renderEventHandlerClosure(view, def.nodeIndex, elementEventFullName(output.target, output.eventName));\n var listenTarget = output.target;\n var listenerView = view;\n if (output.target === 'component') {\n listenTarget = null;\n listenerView = compView;\n }\n var disposable = listenerView.renderer.listen(listenTarget || el, output.eventName, handleEventClosure);\n view.disposables[def.outputIndex + i] = disposable;\n }\n}\nfunction renderEventHandlerClosure(view, index, eventName) {\n return function (event) { return dispatchEvent(view, index, eventName, event); };\n}\nfunction checkAndUpdateElementInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n var bindLen = def.bindings.length;\n var changed = false;\n if (bindLen > 0 && checkAndUpdateElementValue(view, def, 0, v0))\n changed = true;\n if (bindLen > 1 && checkAndUpdateElementValue(view, def, 1, v1))\n changed = true;\n if (bindLen > 2 && checkAndUpdateElementValue(view, def, 2, v2))\n changed = true;\n if (bindLen > 3 && checkAndUpdateElementValue(view, def, 3, v3))\n changed = true;\n if (bindLen > 4 && checkAndUpdateElementValue(view, def, 4, v4))\n changed = true;\n if (bindLen > 5 && checkAndUpdateElementValue(view, def, 5, v5))\n changed = true;\n if (bindLen > 6 && checkAndUpdateElementValue(view, def, 6, v6))\n changed = true;\n if (bindLen > 7 && checkAndUpdateElementValue(view, def, 7, v7))\n changed = true;\n if (bindLen > 8 && checkAndUpdateElementValue(view, def, 8, v8))\n changed = true;\n if (bindLen > 9 && checkAndUpdateElementValue(view, def, 9, v9))\n changed = true;\n return changed;\n}\nfunction checkAndUpdateElementDynamic(view, def, values) {\n var changed = false;\n for (var i = 0; i < values.length; i++) {\n if (checkAndUpdateElementValue(view, def, i, values[i]))\n changed = true;\n }\n return changed;\n}\nfunction checkAndUpdateElementValue(view, def, bindingIdx, value) {\n if (!checkAndUpdateBinding(view, def, bindingIdx, value)) {\n return false;\n }\n var binding = def.bindings[bindingIdx];\n var elData = asElementData(view, def.nodeIndex);\n var renderNode$$1 = elData.renderElement;\n var name = (binding.name);\n switch (binding.flags & 15 /* Types */) {\n case 1 /* TypeElementAttribute */:\n setElementAttribute(view, binding, renderNode$$1, binding.ns, name, value);\n break;\n case 2 /* TypeElementClass */:\n setElementClass(view, renderNode$$1, name, value);\n break;\n case 4 /* TypeElementStyle */:\n setElementStyle(view, binding, renderNode$$1, name, value);\n break;\n case 8 /* TypeProperty */:\n var bindView = (def.flags & 33554432 /* ComponentView */ &&\n binding.flags & 32 /* SyntheticHostProperty */) ?\n elData.componentView :\n view;\n setElementProperty(bindView, binding, renderNode$$1, name, value);\n break;\n }\n return true;\n}\nfunction setElementAttribute(view, binding, renderNode$$1, ns, name, value) {\n var securityContext = binding.securityContext;\n var renderValue = securityContext ? view.root.sanitizer.sanitize(securityContext, value) : value;\n renderValue = renderValue != null ? renderValue.toString() : null;\n var renderer = view.renderer;\n if (value != null) {\n renderer.setAttribute(renderNode$$1, name, renderValue, ns);\n }\n else {\n renderer.removeAttribute(renderNode$$1, name, ns);\n }\n}\nfunction setElementClass(view, renderNode$$1, name, value) {\n var renderer = view.renderer;\n if (value) {\n renderer.addClass(renderNode$$1, name);\n }\n else {\n renderer.removeClass(renderNode$$1, name);\n }\n}\nfunction setElementStyle(view, binding, renderNode$$1, name, value) {\n var renderValue = view.root.sanitizer.sanitize(exports.SecurityContext.STYLE, value);\n if (renderValue != null) {\n renderValue = renderValue.toString();\n var unit = binding.suffix;\n if (unit != null) {\n renderValue = renderValue + unit;\n }\n }\n else {\n renderValue = null;\n }\n var renderer = view.renderer;\n if (renderValue != null) {\n renderer.setStyle(renderNode$$1, name, renderValue);\n }\n else {\n renderer.removeStyle(renderNode$$1, name);\n }\n}\nfunction setElementProperty(view, binding, renderNode$$1, name, value) {\n var securityContext = binding.securityContext;\n var renderValue = securityContext ? view.root.sanitizer.sanitize(securityContext, value) : value;\n view.renderer.setProperty(renderNode$$1, name, renderValue);\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar UNDEFINED_VALUE = new Object();\nvar InjectorRefTokenKey$1 = tokenKey(Injector);\nvar INJECTORRefTokenKey$1 = tokenKey(INJECTOR);\nvar NgModuleRefTokenKey = tokenKey(NgModuleRef);\nfunction moduleProvideDef(flags, token, value, deps) {\n // Need to resolve forwardRefs as e.g. for `useValue` we\n // lowered the expression and then stopped evaluating it,\n // i.e. also didn't unwrap it.\n value = resolveForwardRef(value);\n var depDefs = splitDepsDsl(deps, stringify(token));\n return {\n // will bet set by the module definition\n index: -1,\n deps: depDefs, flags: flags, token: token, value: value\n };\n}\nfunction moduleDef(providers) {\n var providersByKey = {};\n var modules = [];\n var isRoot = false;\n for (var i = 0; i < providers.length; i++) {\n var provider = providers[i];\n if (provider.token === APP_ROOT) {\n isRoot = true;\n }\n if (provider.flags & 1073741824 /* TypeNgModule */) {\n modules.push(provider.token);\n }\n provider.index = i;\n providersByKey[tokenKey(provider.token)] = provider;\n }\n return {\n // Will be filled later...\n factory: null,\n providersByKey: providersByKey,\n providers: providers,\n modules: modules,\n isRoot: isRoot,\n };\n}\nfunction initNgModule(data) {\n var def = data._def;\n var providers = data._providers = new Array(def.providers.length);\n for (var i = 0; i < def.providers.length; i++) {\n var provDef = def.providers[i];\n if (!(provDef.flags & 4096 /* LazyProvider */)) {\n // Make sure the provider has not been already initialized outside this loop.\n if (providers[i] === undefined) {\n providers[i] = _createProviderInstance$1(data, provDef);\n }\n }\n }\n}\nfunction resolveNgModuleDep(data, depDef, notFoundValue) {\n if (notFoundValue === void 0) { notFoundValue = Injector.THROW_IF_NOT_FOUND; }\n var former = setCurrentInjector(data);\n try {\n if (depDef.flags & 8 /* Value */) {\n return depDef.token;\n }\n if (depDef.flags & 2 /* Optional */) {\n notFoundValue = null;\n }\n if (depDef.flags & 1 /* SkipSelf */) {\n return data._parent.get(depDef.token, notFoundValue);\n }\n var tokenKey_1 = depDef.tokenKey;\n switch (tokenKey_1) {\n case InjectorRefTokenKey$1:\n case INJECTORRefTokenKey$1:\n case NgModuleRefTokenKey:\n return data;\n }\n var providerDef = data._def.providersByKey[tokenKey_1];\n if (providerDef) {\n var providerInstance = data._providers[providerDef.index];\n if (providerInstance === undefined) {\n providerInstance = data._providers[providerDef.index] =\n _createProviderInstance$1(data, providerDef);\n }\n return providerInstance === UNDEFINED_VALUE ? undefined : providerInstance;\n }\n else if (depDef.token.ngInjectableDef && targetsModule(data, depDef.token.ngInjectableDef)) {\n var injectableDef = depDef.token.ngInjectableDef;\n var index = data._providers.length;\n data._def.providersByKey[depDef.tokenKey] = {\n flags: 1024 /* TypeFactoryProvider */ | 4096 /* LazyProvider */,\n value: injectableDef.factory,\n deps: [], index: index,\n token: depDef.token,\n };\n data._providers[index] = UNDEFINED_VALUE;\n return (data._providers[index] =\n _createProviderInstance$1(data, data._def.providersByKey[depDef.tokenKey]));\n }\n return data._parent.get(depDef.token, notFoundValue);\n }\n finally {\n setCurrentInjector(former);\n }\n}\nfunction moduleTransitivelyPresent(ngModule, scope) {\n return ngModule._def.modules.indexOf(scope) > -1;\n}\nfunction targetsModule(ngModule, def) {\n return def.providedIn != null && (moduleTransitivelyPresent(ngModule, def.providedIn) ||\n def.providedIn === 'root' && ngModule._def.isRoot);\n}\nfunction _createProviderInstance$1(ngModule, providerDef) {\n var injectable;\n switch (providerDef.flags & 201347067 /* Types */) {\n case 512 /* TypeClassProvider */:\n injectable = _createClass(ngModule, providerDef.value, providerDef.deps);\n break;\n case 1024 /* TypeFactoryProvider */:\n injectable = _callFactory(ngModule, providerDef.value, providerDef.deps);\n break;\n case 2048 /* TypeUseExistingProvider */:\n injectable = resolveNgModuleDep(ngModule, providerDef.deps[0]);\n break;\n case 256 /* TypeValueProvider */:\n injectable = providerDef.value;\n break;\n }\n // The read of `ngOnDestroy` here is slightly expensive as it's megamorphic, so it should be\n // avoided if possible. The sequence of checks here determines whether ngOnDestroy needs to be\n // checked. It might not if the `injectable` isn't an object or if NodeFlags.OnDestroy is already\n // set (ngOnDestroy was detected statically).\n if (injectable !== UNDEFINED_VALUE && injectable != null && typeof injectable === 'object' &&\n !(providerDef.flags & 131072 /* OnDestroy */) && typeof injectable.ngOnDestroy === 'function') {\n providerDef.flags |= 131072 /* OnDestroy */;\n }\n return injectable === undefined ? UNDEFINED_VALUE : injectable;\n}\nfunction _createClass(ngModule, ctor, deps) {\n var len = deps.length;\n switch (len) {\n case 0:\n return new ctor();\n case 1:\n return new ctor(resolveNgModuleDep(ngModule, deps[0]));\n case 2:\n return new ctor(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]));\n case 3:\n return new ctor(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]), resolveNgModuleDep(ngModule, deps[2]));\n default:\n var depValues = new Array(len);\n for (var i = 0; i < len; i++) {\n depValues[i] = resolveNgModuleDep(ngModule, deps[i]);\n }\n return new (ctor.bind.apply(ctor, __spread([void 0], depValues)))();\n }\n}\nfunction _callFactory(ngModule, factory, deps) {\n var len = deps.length;\n switch (len) {\n case 0:\n return factory();\n case 1:\n return factory(resolveNgModuleDep(ngModule, deps[0]));\n case 2:\n return factory(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]));\n case 3:\n return factory(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]), resolveNgModuleDep(ngModule, deps[2]));\n default:\n var depValues = Array(len);\n for (var i = 0; i < len; i++) {\n depValues[i] = resolveNgModuleDep(ngModule, deps[i]);\n }\n return factory.apply(void 0, __spread(depValues));\n }\n}\nfunction callNgModuleLifecycle(ngModule, lifecycles) {\n var def = ngModule._def;\n var destroyed = new Set();\n for (var i = 0; i < def.providers.length; i++) {\n var provDef = def.providers[i];\n if (provDef.flags & 131072 /* OnDestroy */) {\n var instance = ngModule._providers[i];\n if (instance && instance !== UNDEFINED_VALUE) {\n var onDestroy = instance.ngOnDestroy;\n if (typeof onDestroy === 'function' && !destroyed.has(instance)) {\n onDestroy.apply(instance);\n destroyed.add(instance);\n }\n }\n }\n }\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction attachEmbeddedView(parentView, elementData, viewIndex, view) {\n var embeddedViews = elementData.viewContainer._embeddedViews;\n if (viewIndex === null || viewIndex === undefined) {\n viewIndex = embeddedViews.length;\n }\n view.viewContainerParent = parentView;\n addToArray(embeddedViews, (viewIndex), view);\n attachProjectedView(elementData, view);\n Services.dirtyParentQueries(view);\n var prevView = (viewIndex) > 0 ? embeddedViews[(viewIndex) - 1] : null;\n renderAttachEmbeddedView(elementData, prevView, view);\n}\nfunction attachProjectedView(vcElementData, view) {\n var dvcElementData = declaredViewContainer(view);\n if (!dvcElementData || dvcElementData === vcElementData ||\n view.state & 16 /* IsProjectedView */) {\n return;\n }\n // Note: For performance reasons, we\n // - add a view to template._projectedViews only 1x throughout its lifetime,\n // and remove it not until the view is destroyed.\n // (hard, as when a parent view is attached/detached we would need to attach/detach all\n // nested projected views as well, even across component boundaries).\n // - don't track the insertion order of views in the projected views array\n // (hard, as when the views of the same template are inserted different view containers)\n view.state |= 16 /* IsProjectedView */;\n var projectedViews = dvcElementData.template._projectedViews;\n if (!projectedViews) {\n projectedViews = dvcElementData.template._projectedViews = [];\n }\n projectedViews.push(view);\n // Note: we are changing the NodeDef here as we cannot calculate\n // the fact whether a template is used for projection during compilation.\n markNodeAsProjectedTemplate(view.parent.def, (view.parentNodeDef));\n}\nfunction markNodeAsProjectedTemplate(viewDef, nodeDef) {\n if (nodeDef.flags & 4 /* ProjectedTemplate */) {\n return;\n }\n viewDef.nodeFlags |= 4 /* ProjectedTemplate */;\n nodeDef.flags |= 4 /* ProjectedTemplate */;\n var parentNodeDef = nodeDef.parent;\n while (parentNodeDef) {\n parentNodeDef.childFlags |= 4 /* ProjectedTemplate */;\n parentNodeDef = parentNodeDef.parent;\n }\n}\nfunction detachEmbeddedView(elementData, viewIndex) {\n var embeddedViews = elementData.viewContainer._embeddedViews;\n if (viewIndex == null || viewIndex >= embeddedViews.length) {\n viewIndex = embeddedViews.length - 1;\n }\n if (viewIndex < 0) {\n return null;\n }\n var view = embeddedViews[viewIndex];\n view.viewContainerParent = null;\n removeFromArray(embeddedViews, viewIndex);\n // See attachProjectedView for why we don't update projectedViews here.\n Services.dirtyParentQueries(view);\n renderDetachView(view);\n return view;\n}\nfunction detachProjectedView(view) {\n if (!(view.state & 16 /* IsProjectedView */)) {\n return;\n }\n var dvcElementData = declaredViewContainer(view);\n if (dvcElementData) {\n var projectedViews = dvcElementData.template._projectedViews;\n if (projectedViews) {\n removeFromArray(projectedViews, projectedViews.indexOf(view));\n Services.dirtyParentQueries(view);\n }\n }\n}\nfunction moveEmbeddedView(elementData, oldViewIndex, newViewIndex) {\n var embeddedViews = elementData.viewContainer._embeddedViews;\n var view = embeddedViews[oldViewIndex];\n removeFromArray(embeddedViews, oldViewIndex);\n if (newViewIndex == null) {\n newViewIndex = embeddedViews.length;\n }\n addToArray(embeddedViews, newViewIndex, view);\n // Note: Don't need to change projectedViews as the order in there\n // as always invalid...\n Services.dirtyParentQueries(view);\n renderDetachView(view);\n var prevView = newViewIndex > 0 ? embeddedViews[newViewIndex - 1] : null;\n renderAttachEmbeddedView(elementData, prevView, view);\n return view;\n}\nfunction renderAttachEmbeddedView(elementData, prevView, view) {\n var prevRenderNode = prevView ? renderNode(prevView, (prevView.def.lastRenderRootNode)) :\n elementData.renderElement;\n var parentNode = view.renderer.parentNode(prevRenderNode);\n var nextSibling = view.renderer.nextSibling(prevRenderNode);\n // Note: We can't check if `nextSibling` is present, as on WebWorkers it will always be!\n // However, browsers automatically do `appendChild` when there is no `nextSibling`.\n visitRootRenderNodes(view, 2 /* InsertBefore */, parentNode, nextSibling, undefined);\n}\nfunction renderDetachView(view) {\n visitRootRenderNodes(view, 3 /* RemoveChild */, null, null, undefined);\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 arr.pop();\n }\n else {\n arr.splice(index, 1);\n }\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar EMPTY_CONTEXT = new Object();\n// Attention: this function is called as top level function.\n// Putting any logic in here will destroy closure tree shaking!\nfunction createComponentFactory(selector, componentType, viewDefFactory, inputs, outputs, ngContentSelectors) {\n return new ComponentFactory_(selector, componentType, viewDefFactory, inputs, outputs, ngContentSelectors);\n}\nfunction getComponentViewDefinitionFactory(componentFactory) {\n return componentFactory.viewDefFactory;\n}\nvar ComponentFactory_ = /** @class */ (function (_super) {\n __extends(ComponentFactory_, _super);\n function ComponentFactory_(selector, componentType, viewDefFactory, _inputs, _outputs, ngContentSelectors) {\n var _this = \n // Attention: this ctor is called as top level function.\n // Putting any logic in here will destroy closure tree shaking!\n _super.call(this) || this;\n _this.selector = selector;\n _this.componentType = componentType;\n _this._inputs = _inputs;\n _this._outputs = _outputs;\n _this.ngContentSelectors = ngContentSelectors;\n _this.viewDefFactory = viewDefFactory;\n return _this;\n }\n Object.defineProperty(ComponentFactory_.prototype, \"inputs\", {\n get: function () {\n var inputsArr = [];\n var inputs = (this._inputs);\n for (var propName in inputs) {\n var templateName = inputs[propName];\n inputsArr.push({ propName: propName, templateName: templateName });\n }\n return inputsArr;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ComponentFactory_.prototype, \"outputs\", {\n get: function () {\n var outputsArr = [];\n for (var propName in this._outputs) {\n var templateName = this._outputs[propName];\n outputsArr.push({ propName: propName, templateName: templateName });\n }\n return outputsArr;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Creates a new component.\n */\n /**\n * Creates a new component.\n */\n ComponentFactory_.prototype.create = /**\n * Creates a new component.\n */\n function (injector, projectableNodes, rootSelectorOrNode, ngModule) {\n if (!ngModule) {\n throw new Error('ngModule should be provided');\n }\n var viewDef = resolveDefinition(this.viewDefFactory);\n var componentNodeIndex = viewDef.nodes[0].element.componentProvider.nodeIndex;\n var view = Services.createRootView(injector, projectableNodes || [], rootSelectorOrNode, viewDef, ngModule, EMPTY_CONTEXT);\n var component = asProviderData(view, componentNodeIndex).instance;\n if (rootSelectorOrNode) {\n view.renderer.setAttribute(asElementData(view, 0).renderElement, 'ng-version', VERSION.full);\n }\n return new ComponentRef_(view, new ViewRef_(view), component);\n };\n return ComponentFactory_;\n}(ComponentFactory));\nvar ComponentRef_ = /** @class */ (function (_super) {\n __extends(ComponentRef_, _super);\n function ComponentRef_(_view, _viewRef, _component) {\n var _this = _super.call(this) || this;\n _this._view = _view;\n _this._viewRef = _viewRef;\n _this._component = _component;\n _this._elDef = _this._view.def.nodes[0];\n _this.hostView = _viewRef;\n _this.changeDetectorRef = _viewRef;\n _this.instance = _component;\n return _this;\n }\n Object.defineProperty(ComponentRef_.prototype, \"location\", {\n get: function () {\n return new ElementRef(asElementData(this._view, this._elDef.nodeIndex).renderElement);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ComponentRef_.prototype, \"injector\", {\n get: function () { return new Injector_(this._view, this._elDef); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ComponentRef_.prototype, \"componentType\", {\n get: function () { return this._component.constructor; },\n enumerable: true,\n configurable: true\n });\n ComponentRef_.prototype.destroy = function () { this._viewRef.destroy(); };\n ComponentRef_.prototype.onDestroy = function (callback) { this._viewRef.onDestroy(callback); };\n return ComponentRef_;\n}(ComponentRef));\nfunction createViewContainerData(view, elDef, elData) {\n return new ViewContainerRef_(view, elDef, elData);\n}\nvar ViewContainerRef_ = /** @class */ (function () {\n function ViewContainerRef_(_view, _elDef, _data) {\n this._view = _view;\n this._elDef = _elDef;\n this._data = _data;\n /**\n * @internal\n */\n this._embeddedViews = [];\n }\n Object.defineProperty(ViewContainerRef_.prototype, \"element\", {\n get: function () { return new ElementRef(this._data.renderElement); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ViewContainerRef_.prototype, \"injector\", {\n get: function () { return new Injector_(this._view, this._elDef); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ViewContainerRef_.prototype, \"parentInjector\", {\n get: function () {\n var view = this._view;\n var elDef = this._elDef.parent;\n while (!elDef && view) {\n elDef = viewParentEl(view);\n view = (view.parent);\n }\n return view ? new Injector_(view, elDef) : new Injector_(this._view, null);\n },\n enumerable: true,\n configurable: true\n });\n ViewContainerRef_.prototype.clear = function () {\n var len = this._embeddedViews.length;\n for (var i = len - 1; i >= 0; i--) {\n var view = (detachEmbeddedView(this._data, i));\n Services.destroyView(view);\n }\n };\n ViewContainerRef_.prototype.get = function (index) {\n var view = this._embeddedViews[index];\n if (view) {\n var ref = new ViewRef_(view);\n ref.attachToViewContainerRef(this);\n return ref;\n }\n return null;\n };\n Object.defineProperty(ViewContainerRef_.prototype, \"length\", {\n get: function () { return this._embeddedViews.length; },\n enumerable: true,\n configurable: true\n });\n ViewContainerRef_.prototype.createEmbeddedView = function (templateRef, context, index) {\n var viewRef = templateRef.createEmbeddedView(context || {});\n this.insert(viewRef, index);\n return viewRef;\n };\n ViewContainerRef_.prototype.createComponent = function (componentFactory, index, injector, projectableNodes, ngModuleRef) {\n var contextInjector = injector || this.parentInjector;\n if (!ngModuleRef && !(componentFactory instanceof ComponentFactoryBoundToModule)) {\n ngModuleRef = contextInjector.get(NgModuleRef);\n }\n var componentRef = componentFactory.create(contextInjector, projectableNodes, undefined, ngModuleRef);\n this.insert(componentRef.hostView, index);\n return componentRef;\n };\n ViewContainerRef_.prototype.insert = function (viewRef, index) {\n if (viewRef.destroyed) {\n throw new Error('Cannot insert a destroyed View in a ViewContainer!');\n }\n var viewRef_ = viewRef;\n var viewData = viewRef_._view;\n attachEmbeddedView(this._view, this._data, index, viewData);\n viewRef_.attachToViewContainerRef(this);\n return viewRef;\n };\n ViewContainerRef_.prototype.move = function (viewRef, currentIndex) {\n if (viewRef.destroyed) {\n throw new Error('Cannot move a destroyed View in a ViewContainer!');\n }\n var previousIndex = this._embeddedViews.indexOf(viewRef._view);\n moveEmbeddedView(this._data, previousIndex, currentIndex);\n return viewRef;\n };\n ViewContainerRef_.prototype.indexOf = function (viewRef) {\n return this._embeddedViews.indexOf(viewRef._view);\n };\n ViewContainerRef_.prototype.remove = function (index) {\n var viewData = detachEmbeddedView(this._data, index);\n if (viewData) {\n Services.destroyView(viewData);\n }\n };\n ViewContainerRef_.prototype.detach = function (index) {\n var view = detachEmbeddedView(this._data, index);\n return view ? new ViewRef_(view) : null;\n };\n return ViewContainerRef_;\n}());\nfunction createChangeDetectorRef(view) {\n return new ViewRef_(view);\n}\nvar ViewRef_ = /** @class */ (function () {\n function ViewRef_(_view) {\n this._view = _view;\n this._viewContainerRef = null;\n this._appRef = null;\n }\n Object.defineProperty(ViewRef_.prototype, \"rootNodes\", {\n get: function () { return rootRenderNodes(this._view); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ViewRef_.prototype, \"context\", {\n get: function () { return this._view.context; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ViewRef_.prototype, \"destroyed\", {\n get: function () { return (this._view.state & 128 /* Destroyed */) !== 0; },\n enumerable: true,\n configurable: true\n });\n ViewRef_.prototype.markForCheck = function () { markParentViewsForCheck(this._view); };\n ViewRef_.prototype.detach = function () { this._view.state &= ~4 /* Attached */; };\n ViewRef_.prototype.detectChanges = function () {\n var fs = this._view.root.rendererFactory;\n if (fs.begin) {\n fs.begin();\n }\n try {\n Services.checkAndUpdateView(this._view);\n }\n finally {\n if (fs.end) {\n fs.end();\n }\n }\n };\n ViewRef_.prototype.checkNoChanges = function () { Services.checkNoChangesView(this._view); };\n ViewRef_.prototype.reattach = function () { this._view.state |= 4 /* Attached */; };\n ViewRef_.prototype.onDestroy = function (callback) {\n if (!this._view.disposables) {\n this._view.disposables = [];\n }\n this._view.disposables.push(callback);\n };\n ViewRef_.prototype.destroy = function () {\n if (this._appRef) {\n this._appRef.detachView(this);\n }\n else if (this._viewContainerRef) {\n this._viewContainerRef.detach(this._viewContainerRef.indexOf(this));\n }\n Services.destroyView(this._view);\n };\n ViewRef_.prototype.detachFromAppRef = function () {\n this._appRef = null;\n renderDetachView(this._view);\n Services.dirtyParentQueries(this._view);\n };\n ViewRef_.prototype.attachToAppRef = function (appRef) {\n if (this._viewContainerRef) {\n throw new Error('This view is already attached to a ViewContainer!');\n }\n this._appRef = appRef;\n };\n ViewRef_.prototype.attachToViewContainerRef = function (vcRef) {\n if (this._appRef) {\n throw new Error('This view is already attached directly to the ApplicationRef!');\n }\n this._viewContainerRef = vcRef;\n };\n return ViewRef_;\n}());\nfunction createTemplateData(view, def) {\n return new TemplateRef_(view, def);\n}\nvar TemplateRef_ = /** @class */ (function (_super) {\n __extends(TemplateRef_, _super);\n function TemplateRef_(_parentView, _def) {\n var _this = _super.call(this) || this;\n _this._parentView = _parentView;\n _this._def = _def;\n return _this;\n }\n TemplateRef_.prototype.createEmbeddedView = function (context) {\n return new ViewRef_(Services.createEmbeddedView(this._parentView, this._def, (this._def.element.template), context));\n };\n Object.defineProperty(TemplateRef_.prototype, \"elementRef\", {\n get: function () {\n return new ElementRef(asElementData(this._parentView, this._def.nodeIndex).renderElement);\n },\n enumerable: true,\n configurable: true\n });\n return TemplateRef_;\n}(TemplateRef));\nfunction createInjector$1(view, elDef) {\n return new Injector_(view, elDef);\n}\nvar Injector_ = /** @class */ (function () {\n function Injector_(view, elDef) {\n this.view = view;\n this.elDef = elDef;\n }\n Injector_.prototype.get = function (token, notFoundValue) {\n if (notFoundValue === void 0) { notFoundValue = Injector.THROW_IF_NOT_FOUND; }\n var allowPrivateServices = this.elDef ? (this.elDef.flags & 33554432 /* ComponentView */) !== 0 : false;\n return Services.resolveDep(this.view, this.elDef, allowPrivateServices, { flags: 0 /* None */, token: token, tokenKey: tokenKey(token) }, notFoundValue);\n };\n return Injector_;\n}());\nfunction nodeValue(view, index) {\n var def = view.def.nodes[index];\n if (def.flags & 1 /* TypeElement */) {\n var elData = asElementData(view, def.nodeIndex);\n return def.element.template ? elData.template : elData.renderElement;\n }\n else if (def.flags & 2 /* TypeText */) {\n return asTextData(view, def.nodeIndex).renderText;\n }\n else if (def.flags & (20224 /* CatProvider */ | 16 /* TypePipe */)) {\n return asProviderData(view, def.nodeIndex).instance;\n }\n throw new Error(\"Illegal state: read nodeValue for node index \" + index);\n}\nfunction createRendererV1(view) {\n return new RendererAdapter(view.renderer);\n}\nvar RendererAdapter = /** @class */ (function () {\n function RendererAdapter(delegate) {\n this.delegate = delegate;\n }\n RendererAdapter.prototype.selectRootElement = function (selectorOrNode) {\n return this.delegate.selectRootElement(selectorOrNode);\n };\n RendererAdapter.prototype.createElement = function (parent, namespaceAndName) {\n var _a = __read(splitNamespace(namespaceAndName), 2), ns = _a[0], name = _a[1];\n var el = this.delegate.createElement(name, ns);\n if (parent) {\n this.delegate.appendChild(parent, el);\n }\n return el;\n };\n RendererAdapter.prototype.createViewRoot = function (hostElement) { return hostElement; };\n RendererAdapter.prototype.createTemplateAnchor = function (parentElement) {\n var comment = this.delegate.createComment('');\n if (parentElement) {\n this.delegate.appendChild(parentElement, comment);\n }\n return comment;\n };\n RendererAdapter.prototype.createText = function (parentElement, value) {\n var node = this.delegate.createText(value);\n if (parentElement) {\n this.delegate.appendChild(parentElement, node);\n }\n return node;\n };\n RendererAdapter.prototype.projectNodes = function (parentElement, nodes) {\n for (var i = 0; i < nodes.length; i++) {\n this.delegate.appendChild(parentElement, nodes[i]);\n }\n };\n RendererAdapter.prototype.attachViewAfter = function (node, viewRootNodes) {\n var parentElement = this.delegate.parentNode(node);\n var nextSibling = this.delegate.nextSibling(node);\n for (var i = 0; i < viewRootNodes.length; i++) {\n this.delegate.insertBefore(parentElement, viewRootNodes[i], nextSibling);\n }\n };\n RendererAdapter.prototype.detachView = function (viewRootNodes) {\n for (var i = 0; i < viewRootNodes.length; i++) {\n var node = viewRootNodes[i];\n var parentElement = this.delegate.parentNode(node);\n this.delegate.removeChild(parentElement, node);\n }\n };\n RendererAdapter.prototype.destroyView = function (hostElement, viewAllNodes) {\n for (var i = 0; i < viewAllNodes.length; i++) {\n this.delegate.destroyNode(viewAllNodes[i]);\n }\n };\n RendererAdapter.prototype.listen = function (renderElement, name, callback) {\n return this.delegate.listen(renderElement, name, callback);\n };\n RendererAdapter.prototype.listenGlobal = function (target, name, callback) {\n return this.delegate.listen(target, name, callback);\n };\n RendererAdapter.prototype.setElementProperty = function (renderElement, propertyName, propertyValue) {\n this.delegate.setProperty(renderElement, propertyName, propertyValue);\n };\n RendererAdapter.prototype.setElementAttribute = function (renderElement, namespaceAndName, attributeValue) {\n var _a = __read(splitNamespace(namespaceAndName), 2), ns = _a[0], name = _a[1];\n if (attributeValue != null) {\n this.delegate.setAttribute(renderElement, name, attributeValue, ns);\n }\n else {\n this.delegate.removeAttribute(renderElement, name, ns);\n }\n };\n RendererAdapter.prototype.setBindingDebugInfo = function (renderElement, propertyName, propertyValue) { };\n RendererAdapter.prototype.setElementClass = function (renderElement, className, isAdd) {\n if (isAdd) {\n this.delegate.addClass(renderElement, className);\n }\n else {\n this.delegate.removeClass(renderElement, className);\n }\n };\n RendererAdapter.prototype.setElementStyle = function (renderElement, styleName, styleValue) {\n if (styleValue != null) {\n this.delegate.setStyle(renderElement, styleName, styleValue);\n }\n else {\n this.delegate.removeStyle(renderElement, styleName);\n }\n };\n RendererAdapter.prototype.invokeElementMethod = function (renderElement, methodName, args) {\n renderElement[methodName].apply(renderElement, args);\n };\n RendererAdapter.prototype.setText = function (renderNode$$1, text) { this.delegate.setValue(renderNode$$1, text); };\n RendererAdapter.prototype.animate = function () { throw new Error('Renderer.animate is no longer supported!'); };\n return RendererAdapter;\n}());\nfunction createNgModuleRef(moduleType, parent, bootstrapComponents, def) {\n return new NgModuleRef_(moduleType, parent, bootstrapComponents, def);\n}\nvar NgModuleRef_ = /** @class */ (function () {\n function NgModuleRef_(_moduleType, _parent, _bootstrapComponents, _def) {\n this._moduleType = _moduleType;\n this._parent = _parent;\n this._bootstrapComponents = _bootstrapComponents;\n this._def = _def;\n this._destroyListeners = [];\n this._destroyed = false;\n this.injector = this;\n initNgModule(this);\n }\n NgModuleRef_.prototype.get = function (token, notFoundValue, injectFlags) {\n if (notFoundValue === void 0) { notFoundValue = Injector.THROW_IF_NOT_FOUND; }\n if (injectFlags === void 0) { injectFlags = 0 /* Default */; }\n var flags = 0;\n if (injectFlags & 4 /* SkipSelf */) {\n flags |= 1 /* SkipSelf */;\n }\n else if (injectFlags & 2 /* Self */) {\n flags |= 4 /* Self */;\n }\n return resolveNgModuleDep(this, { token: token, tokenKey: tokenKey(token), flags: flags }, notFoundValue);\n };\n Object.defineProperty(NgModuleRef_.prototype, \"instance\", {\n get: function () { return this.get(this._moduleType); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NgModuleRef_.prototype, \"componentFactoryResolver\", {\n get: function () { return this.get(ComponentFactoryResolver); },\n enumerable: true,\n configurable: true\n });\n NgModuleRef_.prototype.destroy = function () {\n if (this._destroyed) {\n throw new Error(\"The ng module \" + stringify(this.instance.constructor) + \" has already been destroyed.\");\n }\n this._destroyed = true;\n callNgModuleLifecycle(this, 131072 /* OnDestroy */);\n this._destroyListeners.forEach(function (listener) { return listener(); });\n };\n NgModuleRef_.prototype.onDestroy = function (callback) { this._destroyListeners.push(callback); };\n return NgModuleRef_;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar RendererV1TokenKey = tokenKey(Renderer);\nvar Renderer2TokenKey = tokenKey(Renderer2);\nvar ElementRefTokenKey = tokenKey(ElementRef);\nvar ViewContainerRefTokenKey = tokenKey(ViewContainerRef);\nvar TemplateRefTokenKey = tokenKey(TemplateRef);\nvar ChangeDetectorRefTokenKey = tokenKey(ChangeDetectorRef);\nvar InjectorRefTokenKey = tokenKey(Injector);\nvar INJECTORRefTokenKey = tokenKey(INJECTOR);\nfunction directiveDef(checkIndex, flags, matchedQueries, childCount, ctor, deps, props, outputs) {\n var bindings = [];\n if (props) {\n for (var prop in props) {\n var _a = __read(props[prop], 2), bindingIndex = _a[0], nonMinifiedName = _a[1];\n bindings[bindingIndex] = {\n flags: 8 /* TypeProperty */,\n name: prop, nonMinifiedName: nonMinifiedName,\n ns: null,\n securityContext: null,\n suffix: null\n };\n }\n }\n var outputDefs = [];\n if (outputs) {\n for (var propName in outputs) {\n outputDefs.push({ type: 1 /* DirectiveOutput */, propName: propName, target: null, eventName: outputs[propName] });\n }\n }\n flags |= 16384 /* TypeDirective */;\n return _def(checkIndex, flags, matchedQueries, childCount, ctor, ctor, deps, bindings, outputDefs);\n}\nfunction pipeDef(flags, ctor, deps) {\n flags |= 16 /* TypePipe */;\n return _def(-1, flags, null, 0, ctor, ctor, deps);\n}\nfunction providerDef(flags, matchedQueries, token, value, deps) {\n return _def(-1, flags, matchedQueries, 0, token, value, deps);\n}\nfunction _def(checkIndex, flags, matchedQueriesDsl, childCount, token, value, deps, bindings, outputs) {\n var _a = splitMatchedQueriesDsl(matchedQueriesDsl), matchedQueries = _a.matchedQueries, references = _a.references, matchedQueryIds = _a.matchedQueryIds;\n if (!outputs) {\n outputs = [];\n }\n if (!bindings) {\n bindings = [];\n }\n // Need to resolve forwardRefs as e.g. for `useValue` we\n // lowered the expression and then stopped evaluating it,\n // i.e. also didn't unwrap it.\n value = resolveForwardRef(value);\n var depDefs = splitDepsDsl(deps, stringify(token));\n return {\n // will bet set by the view definition\n nodeIndex: -1,\n parent: null,\n renderParent: null,\n bindingIndex: -1,\n outputIndex: -1,\n // regular values\n checkIndex: checkIndex,\n flags: flags,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0, matchedQueries: matchedQueries, matchedQueryIds: matchedQueryIds, references: references,\n ngContentIndex: -1, childCount: childCount, bindings: bindings,\n bindingFlags: calcBindingFlags(bindings), outputs: outputs,\n element: null,\n provider: { token: token, value: value, deps: depDefs },\n text: null,\n query: null,\n ngContent: null\n };\n}\nfunction createProviderInstance(view, def) {\n return _createProviderInstance(view, def);\n}\nfunction createPipeInstance(view, def) {\n // deps are looked up from component.\n var compView = view;\n while (compView.parent && !isComponentView(compView)) {\n compView = compView.parent;\n }\n // pipes can see the private services of the component\n var allowPrivateServices = true;\n // pipes are always eager and classes!\n return createClass((compView.parent), (viewParentEl(compView)), allowPrivateServices, def.provider.value, def.provider.deps);\n}\nfunction createDirectiveInstance(view, def) {\n // components can see other private services, other directives can't.\n var allowPrivateServices = (def.flags & 32768 /* Component */) > 0;\n // directives are always eager and classes!\n var instance = createClass(view, (def.parent), allowPrivateServices, def.provider.value, def.provider.deps);\n if (def.outputs.length) {\n for (var i = 0; i < def.outputs.length; i++) {\n var output = def.outputs[i];\n var subscription = instance[output.propName].subscribe(eventHandlerClosure(view, def.parent.nodeIndex, output.eventName));\n view.disposables[def.outputIndex + i] = subscription.unsubscribe.bind(subscription);\n }\n }\n return instance;\n}\nfunction eventHandlerClosure(view, index, eventName) {\n return function (event) { return dispatchEvent(view, index, eventName, event); };\n}\nfunction checkAndUpdateDirectiveInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n var providerData = asProviderData(view, def.nodeIndex);\n var directive = providerData.instance;\n var changed = false;\n var changes = (undefined);\n var bindLen = def.bindings.length;\n if (bindLen > 0 && checkBinding(view, def, 0, v0)) {\n changed = true;\n changes = updateProp(view, providerData, def, 0, v0, changes);\n }\n if (bindLen > 1 && checkBinding(view, def, 1, v1)) {\n changed = true;\n changes = updateProp(view, providerData, def, 1, v1, changes);\n }\n if (bindLen > 2 && checkBinding(view, def, 2, v2)) {\n changed = true;\n changes = updateProp(view, providerData, def, 2, v2, changes);\n }\n if (bindLen > 3 && checkBinding(view, def, 3, v3)) {\n changed = true;\n changes = updateProp(view, providerData, def, 3, v3, changes);\n }\n if (bindLen > 4 && checkBinding(view, def, 4, v4)) {\n changed = true;\n changes = updateProp(view, providerData, def, 4, v4, changes);\n }\n if (bindLen > 5 && checkBinding(view, def, 5, v5)) {\n changed = true;\n changes = updateProp(view, providerData, def, 5, v5, changes);\n }\n if (bindLen > 6 && checkBinding(view, def, 6, v6)) {\n changed = true;\n changes = updateProp(view, providerData, def, 6, v6, changes);\n }\n if (bindLen > 7 && checkBinding(view, def, 7, v7)) {\n changed = true;\n changes = updateProp(view, providerData, def, 7, v7, changes);\n }\n if (bindLen > 8 && checkBinding(view, def, 8, v8)) {\n changed = true;\n changes = updateProp(view, providerData, def, 8, v8, changes);\n }\n if (bindLen > 9 && checkBinding(view, def, 9, v9)) {\n changed = true;\n changes = updateProp(view, providerData, def, 9, v9, changes);\n }\n if (changes) {\n directive.ngOnChanges(changes);\n }\n if ((def.flags & 65536 /* OnInit */) &&\n shouldCallLifecycleInitHook(view, 256 /* InitState_CallingOnInit */, def.nodeIndex)) {\n directive.ngOnInit();\n }\n if (def.flags & 262144 /* DoCheck */) {\n directive.ngDoCheck();\n }\n return changed;\n}\nfunction checkAndUpdateDirectiveDynamic(view, def, values) {\n var providerData = asProviderData(view, def.nodeIndex);\n var directive = providerData.instance;\n var changed = false;\n var changes = (undefined);\n for (var i = 0; i < values.length; i++) {\n if (checkBinding(view, def, i, values[i])) {\n changed = true;\n changes = updateProp(view, providerData, def, i, values[i], changes);\n }\n }\n if (changes) {\n directive.ngOnChanges(changes);\n }\n if ((def.flags & 65536 /* OnInit */) &&\n shouldCallLifecycleInitHook(view, 256 /* InitState_CallingOnInit */, def.nodeIndex)) {\n directive.ngOnInit();\n }\n if (def.flags & 262144 /* DoCheck */) {\n directive.ngDoCheck();\n }\n return changed;\n}\nfunction _createProviderInstance(view, def) {\n // private services can see other private services\n var allowPrivateServices = (def.flags & 8192 /* PrivateProvider */) > 0;\n var providerDef = def.provider;\n switch (def.flags & 201347067 /* Types */) {\n case 512 /* TypeClassProvider */:\n return createClass(view, (def.parent), allowPrivateServices, providerDef.value, providerDef.deps);\n case 1024 /* TypeFactoryProvider */:\n return callFactory(view, (def.parent), allowPrivateServices, providerDef.value, providerDef.deps);\n case 2048 /* TypeUseExistingProvider */:\n return resolveDep(view, (def.parent), allowPrivateServices, providerDef.deps[0]);\n case 256 /* TypeValueProvider */:\n return providerDef.value;\n }\n}\nfunction createClass(view, elDef, allowPrivateServices, ctor, deps) {\n var len = deps.length;\n switch (len) {\n case 0:\n return new ctor();\n case 1:\n return new ctor(resolveDep(view, elDef, allowPrivateServices, deps[0]));\n case 2:\n return new ctor(resolveDep(view, elDef, allowPrivateServices, deps[0]), resolveDep(view, elDef, allowPrivateServices, deps[1]));\n case 3:\n return new ctor(resolveDep(view, elDef, allowPrivateServices, deps[0]), resolveDep(view, elDef, allowPrivateServices, deps[1]), resolveDep(view, elDef, allowPrivateServices, deps[2]));\n default:\n var depValues = new Array(len);\n for (var i = 0; i < len; i++) {\n depValues[i] = resolveDep(view, elDef, allowPrivateServices, deps[i]);\n }\n return new (ctor.bind.apply(ctor, __spread([void 0], depValues)))();\n }\n}\nfunction callFactory(view, elDef, allowPrivateServices, factory, deps) {\n var len = deps.length;\n switch (len) {\n case 0:\n return factory();\n case 1:\n return factory(resolveDep(view, elDef, allowPrivateServices, deps[0]));\n case 2:\n return factory(resolveDep(view, elDef, allowPrivateServices, deps[0]), resolveDep(view, elDef, allowPrivateServices, deps[1]));\n case 3:\n return factory(resolveDep(view, elDef, allowPrivateServices, deps[0]), resolveDep(view, elDef, allowPrivateServices, deps[1]), resolveDep(view, elDef, allowPrivateServices, deps[2]));\n default:\n var depValues = Array(len);\n for (var i = 0; i < len; i++) {\n depValues[i] = resolveDep(view, elDef, allowPrivateServices, deps[i]);\n }\n return factory.apply(void 0, __spread(depValues));\n }\n}\n// This default value is when checking the hierarchy for a token.\n//\n// It means both:\n// - the token is not provided by the current injector,\n// - only the element injectors should be checked (ie do not check module injectors\n//\n// mod1\n// /\n// el1 mod2\n// \\ /\n// el2\n//\n// When requesting el2.injector.get(token), we should check in the following order and return the\n// first found value:\n// - el2.injector.get(token, default)\n// - el1.injector.get(token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) -> do not check the module\n// - mod2.injector.get(token, default)\nvar NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR = {};\nfunction resolveDep(view, elDef, allowPrivateServices, depDef, notFoundValue) {\n if (notFoundValue === void 0) { notFoundValue = Injector.THROW_IF_NOT_FOUND; }\n if (depDef.flags & 8 /* Value */) {\n return depDef.token;\n }\n var startView = view;\n if (depDef.flags & 2 /* Optional */) {\n notFoundValue = null;\n }\n var tokenKey$$1 = depDef.tokenKey;\n if (tokenKey$$1 === ChangeDetectorRefTokenKey) {\n // directives on the same element as a component should be able to control the change detector\n // of that component as well.\n allowPrivateServices = !!(elDef && elDef.element.componentView);\n }\n if (elDef && (depDef.flags & 1 /* SkipSelf */)) {\n allowPrivateServices = false;\n elDef = (elDef.parent);\n }\n var searchView = view;\n while (searchView) {\n if (elDef) {\n switch (tokenKey$$1) {\n case RendererV1TokenKey: {\n var compView = findCompView(searchView, elDef, allowPrivateServices);\n return createRendererV1(compView);\n }\n case Renderer2TokenKey: {\n var compView = findCompView(searchView, elDef, allowPrivateServices);\n return compView.renderer;\n }\n case ElementRefTokenKey:\n return new ElementRef(asElementData(searchView, elDef.nodeIndex).renderElement);\n case ViewContainerRefTokenKey:\n return asElementData(searchView, elDef.nodeIndex).viewContainer;\n case TemplateRefTokenKey: {\n if (elDef.element.template) {\n return asElementData(searchView, elDef.nodeIndex).template;\n }\n break;\n }\n case ChangeDetectorRefTokenKey: {\n var cdView = findCompView(searchView, elDef, allowPrivateServices);\n return createChangeDetectorRef(cdView);\n }\n case InjectorRefTokenKey:\n case INJECTORRefTokenKey:\n return createInjector$1(searchView, elDef);\n default:\n var providerDef_1 = (allowPrivateServices ? elDef.element.allProviders :\n elDef.element.publicProviders)[tokenKey$$1];\n if (providerDef_1) {\n var providerData = asProviderData(searchView, providerDef_1.nodeIndex);\n if (!providerData) {\n providerData = { instance: _createProviderInstance(searchView, providerDef_1) };\n searchView.nodes[providerDef_1.nodeIndex] = providerData;\n }\n return providerData.instance;\n }\n }\n }\n allowPrivateServices = isComponentView(searchView);\n elDef = (viewParentEl(searchView));\n searchView = (searchView.parent);\n if (depDef.flags & 4 /* Self */) {\n searchView = null;\n }\n }\n var value = startView.root.injector.get(depDef.token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR);\n if (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR ||\n notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) {\n // Return the value from the root element injector when\n // - it provides it\n // (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)\n // - the module injector should not be checked\n // (notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)\n return value;\n }\n return startView.root.ngModule.injector.get(depDef.token, notFoundValue);\n}\nfunction findCompView(view, elDef, allowPrivateServices) {\n var compView;\n if (allowPrivateServices) {\n compView = asElementData(view, elDef.nodeIndex).componentView;\n }\n else {\n compView = view;\n while (compView.parent && !isComponentView(compView)) {\n compView = compView.parent;\n }\n }\n return compView;\n}\nfunction updateProp(view, providerData, def, bindingIdx, value, changes) {\n if (def.flags & 32768 /* Component */) {\n var compView = asElementData(view, def.parent.nodeIndex).componentView;\n if (compView.def.flags & 2 /* OnPush */) {\n compView.state |= 8 /* ChecksEnabled */;\n }\n }\n var binding = def.bindings[bindingIdx];\n var propName = (binding.name);\n // Note: This is still safe with Closure Compiler as\n // the user passed in the property name as an object has to `providerDef`,\n // so Closure Compiler will have renamed the property correctly already.\n providerData.instance[propName] = value;\n if (def.flags & 524288 /* OnChanges */) {\n changes = changes || {};\n var oldValue = WrappedValue.unwrap(view.oldValues[def.bindingIndex + bindingIdx]);\n var binding_1 = def.bindings[bindingIdx];\n changes[binding_1.nonMinifiedName] =\n new SimpleChange(oldValue, value, (view.state & 2 /* FirstCheck */) !== 0);\n }\n view.oldValues[def.bindingIndex + bindingIdx] = value;\n return changes;\n}\n// This function calls the ngAfterContentCheck, ngAfterContentInit,\n// ngAfterViewCheck, and ngAfterViewInit lifecycle hooks (depending on the node\n// flags in lifecycle). Unlike ngDoCheck, ngOnChanges and ngOnInit, which are\n// called during a pre-order traversal of the view tree (that is calling the\n// parent hooks before the child hooks) these events are sent in using a\n// post-order traversal of the tree (children before parents). This changes the\n// meaning of initIndex in the view state. For ngOnInit, initIndex tracks the\n// expected nodeIndex which a ngOnInit should be called. When sending\n// ngAfterContentInit and ngAfterViewInit it is the expected count of\n// ngAfterContentInit or ngAfterViewInit methods that have been called. This\n// ensure that despite being called recursively or after picking up after an\n// exception, the ngAfterContentInit or ngAfterViewInit will be called on the\n// correct nodes. Consider for example, the following (where E is an element\n// and D is a directive)\n// Tree: pre-order index post-order index\n// E1 0 6\n// E2 1 1\n// D3 2 0\n// E4 3 5\n// E5 4 4\n// E6 5 2\n// E7 6 3\n// As can be seen, the post-order index has an unclear relationship to the\n// pre-order index (postOrderIndex === preOrderIndex - parentCount +\n// childCount). Since number of calls to ngAfterContentInit and ngAfterViewInit\n// are stable (will be the same for the same view regardless of exceptions or\n// recursion) we just need to count them which will roughly correspond to the\n// post-order index (it skips elements and directives that do not have\n// lifecycle hooks).\n//\n// For example, if an exception is raised in the E6.onAfterViewInit() the\n// initIndex is left at 3 (by shouldCallLifecycleInitHook() which set it to\n// initIndex + 1). When checkAndUpdateView() is called again D3, E2 and E6 will\n// not have their ngAfterViewInit() called but, starting with E7, the rest of\n// the view will begin getting ngAfterViewInit() called until a check and\n// pass is complete.\n//\n// This algorthim also handles recursion. Consider if E4's ngAfterViewInit()\n// indirectly calls E1's ChangeDetectorRef.detectChanges(). The expected\n// initIndex is set to 6, the recusive checkAndUpdateView() starts walk again.\n// D3, E2, E6, E7, E5 and E4 are skipped, ngAfterViewInit() is called on E1.\n// When the recursion returns the initIndex will be 7 so E1 is skipped as it\n// has already been called in the recursively called checkAnUpdateView().\nfunction callLifecycleHooksChildrenFirst(view, lifecycles) {\n if (!(view.def.nodeFlags & lifecycles)) {\n return;\n }\n var nodes = view.def.nodes;\n var initIndex = 0;\n for (var i = 0; i < nodes.length; i++) {\n var nodeDef = nodes[i];\n var parent_1 = nodeDef.parent;\n if (!parent_1 && nodeDef.flags & lifecycles) {\n // matching root node (e.g. a pipe)\n callProviderLifecycles(view, i, nodeDef.flags & lifecycles, initIndex++);\n }\n if ((nodeDef.childFlags & lifecycles) === 0) {\n // no child matches one of the lifecycles\n i += nodeDef.childCount;\n }\n while (parent_1 && (parent_1.flags & 1 /* TypeElement */) &&\n i === parent_1.nodeIndex + parent_1.childCount) {\n // last child of an element\n if (parent_1.directChildFlags & lifecycles) {\n initIndex = callElementProvidersLifecycles(view, parent_1, lifecycles, initIndex);\n }\n parent_1 = parent_1.parent;\n }\n }\n}\nfunction callElementProvidersLifecycles(view, elDef, lifecycles, initIndex) {\n for (var i = elDef.nodeIndex + 1; i <= elDef.nodeIndex + elDef.childCount; i++) {\n var nodeDef = view.def.nodes[i];\n if (nodeDef.flags & lifecycles) {\n callProviderLifecycles(view, i, nodeDef.flags & lifecycles, initIndex++);\n }\n // only visit direct children\n i += nodeDef.childCount;\n }\n return initIndex;\n}\nfunction callProviderLifecycles(view, index, lifecycles, initIndex) {\n var providerData = asProviderData(view, index);\n if (!providerData) {\n return;\n }\n var provider = providerData.instance;\n if (!provider) {\n return;\n }\n Services.setCurrentNode(view, index);\n if (lifecycles & 1048576 /* AfterContentInit */ &&\n shouldCallLifecycleInitHook(view, 512 /* InitState_CallingAfterContentInit */, initIndex)) {\n provider.ngAfterContentInit();\n }\n if (lifecycles & 2097152 /* AfterContentChecked */) {\n provider.ngAfterContentChecked();\n }\n if (lifecycles & 4194304 /* AfterViewInit */ &&\n shouldCallLifecycleInitHook(view, 768 /* InitState_CallingAfterViewInit */, initIndex)) {\n provider.ngAfterViewInit();\n }\n if (lifecycles & 8388608 /* AfterViewChecked */) {\n provider.ngAfterViewChecked();\n }\n if (lifecycles & 131072 /* OnDestroy */) {\n provider.ngOnDestroy();\n }\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction queryDef(flags, id, bindings) {\n var bindingDefs = [];\n for (var propName in bindings) {\n var bindingType = bindings[propName];\n bindingDefs.push({ propName: propName, bindingType: bindingType });\n }\n return {\n // will bet set by the view definition\n nodeIndex: -1,\n parent: null,\n renderParent: null,\n bindingIndex: -1,\n outputIndex: -1,\n // regular values\n // TODO(vicb): check\n checkIndex: -1, flags: flags,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0,\n ngContentIndex: -1,\n matchedQueries: {},\n matchedQueryIds: 0,\n references: {},\n childCount: 0,\n bindings: [],\n bindingFlags: 0,\n outputs: [],\n element: null,\n provider: null,\n text: null,\n query: { id: id, filterId: filterQueryId(id), bindings: bindingDefs },\n ngContent: null\n };\n}\nfunction createQuery() {\n return new QueryList();\n}\nfunction dirtyParentQueries(view) {\n var queryIds = view.def.nodeMatchedQueries;\n while (view.parent && isEmbeddedView(view)) {\n var tplDef = (view.parentNodeDef);\n view = view.parent;\n // content queries\n var end = tplDef.nodeIndex + tplDef.childCount;\n for (var i = 0; i <= end; i++) {\n var nodeDef = view.def.nodes[i];\n if ((nodeDef.flags & 67108864 /* TypeContentQuery */) &&\n (nodeDef.flags & 536870912 /* DynamicQuery */) &&\n (nodeDef.query.filterId & queryIds) === nodeDef.query.filterId) {\n asQueryList(view, i).setDirty();\n }\n if ((nodeDef.flags & 1 /* TypeElement */ && i + nodeDef.childCount < tplDef.nodeIndex) ||\n !(nodeDef.childFlags & 67108864 /* TypeContentQuery */) ||\n !(nodeDef.childFlags & 536870912 /* DynamicQuery */)) {\n // skip elements that don't contain the template element or no query.\n i += nodeDef.childCount;\n }\n }\n }\n // view queries\n if (view.def.nodeFlags & 134217728 /* TypeViewQuery */) {\n for (var i = 0; i < view.def.nodes.length; i++) {\n var nodeDef = view.def.nodes[i];\n if ((nodeDef.flags & 134217728 /* TypeViewQuery */) && (nodeDef.flags & 536870912 /* DynamicQuery */)) {\n asQueryList(view, i).setDirty();\n }\n // only visit the root nodes\n i += nodeDef.childCount;\n }\n }\n}\nfunction checkAndUpdateQuery(view, nodeDef) {\n var queryList = asQueryList(view, nodeDef.nodeIndex);\n if (!queryList.dirty) {\n return;\n }\n var directiveInstance;\n var newValues = (undefined);\n if (nodeDef.flags & 67108864 /* TypeContentQuery */) {\n var elementDef = (nodeDef.parent.parent);\n newValues = calcQueryValues(view, elementDef.nodeIndex, elementDef.nodeIndex + elementDef.childCount, (nodeDef.query), []);\n directiveInstance = asProviderData(view, nodeDef.parent.nodeIndex).instance;\n }\n else if (nodeDef.flags & 134217728 /* TypeViewQuery */) {\n newValues = calcQueryValues(view, 0, view.def.nodes.length - 1, (nodeDef.query), []);\n directiveInstance = view.component;\n }\n queryList.reset(newValues);\n var bindings = nodeDef.query.bindings;\n var notify = false;\n for (var i = 0; i < bindings.length; i++) {\n var binding = bindings[i];\n var boundValue = void 0;\n switch (binding.bindingType) {\n case 0 /* First */:\n boundValue = queryList.first;\n break;\n case 1 /* All */:\n boundValue = queryList;\n notify = true;\n break;\n }\n directiveInstance[binding.propName] = boundValue;\n }\n if (notify) {\n queryList.notifyOnChanges();\n }\n}\nfunction calcQueryValues(view, startIndex, endIndex, queryDef, values) {\n for (var i = startIndex; i <= endIndex; i++) {\n var nodeDef = view.def.nodes[i];\n var valueType = nodeDef.matchedQueries[queryDef.id];\n if (valueType != null) {\n values.push(getQueryValue(view, nodeDef, valueType));\n }\n if (nodeDef.flags & 1 /* TypeElement */ && nodeDef.element.template &&\n (nodeDef.element.template.nodeMatchedQueries & queryDef.filterId) ===\n queryDef.filterId) {\n var elementData = asElementData(view, i);\n // check embedded views that were attached at the place of their template,\n // but process child nodes first if some match the query (see issue #16568)\n if ((nodeDef.childMatchedQueries & queryDef.filterId) === queryDef.filterId) {\n calcQueryValues(view, i + 1, i + nodeDef.childCount, queryDef, values);\n i += nodeDef.childCount;\n }\n if (nodeDef.flags & 16777216 /* EmbeddedViews */) {\n var embeddedViews = elementData.viewContainer._embeddedViews;\n for (var k = 0; k < embeddedViews.length; k++) {\n var embeddedView = embeddedViews[k];\n var dvc = declaredViewContainer(embeddedView);\n if (dvc && dvc === elementData) {\n calcQueryValues(embeddedView, 0, embeddedView.def.nodes.length - 1, queryDef, values);\n }\n }\n }\n var projectedViews = elementData.template._projectedViews;\n if (projectedViews) {\n for (var k = 0; k < projectedViews.length; k++) {\n var projectedView = projectedViews[k];\n calcQueryValues(projectedView, 0, projectedView.def.nodes.length - 1, queryDef, values);\n }\n }\n }\n if ((nodeDef.childMatchedQueries & queryDef.filterId) !== queryDef.filterId) {\n // if no child matches the query, skip the children.\n i += nodeDef.childCount;\n }\n }\n return values;\n}\nfunction getQueryValue(view, nodeDef, queryValueType) {\n if (queryValueType != null) {\n // a match\n switch (queryValueType) {\n case 1 /* RenderElement */:\n return asElementData(view, nodeDef.nodeIndex).renderElement;\n case 0 /* ElementRef */:\n return new ElementRef(asElementData(view, nodeDef.nodeIndex).renderElement);\n case 2 /* TemplateRef */:\n return asElementData(view, nodeDef.nodeIndex).template;\n case 3 /* ViewContainerRef */:\n return asElementData(view, nodeDef.nodeIndex).viewContainer;\n case 4 /* Provider */:\n return asProviderData(view, nodeDef.nodeIndex).instance;\n }\n }\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction ngContentDef(ngContentIndex, index) {\n return {\n // will bet set by the view definition\n nodeIndex: -1,\n parent: null,\n renderParent: null,\n bindingIndex: -1,\n outputIndex: -1,\n // regular values\n checkIndex: -1,\n flags: 8 /* TypeNgContent */,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0,\n matchedQueries: {},\n matchedQueryIds: 0,\n references: {}, ngContentIndex: ngContentIndex,\n childCount: 0,\n bindings: [],\n bindingFlags: 0,\n outputs: [],\n element: null,\n provider: null,\n text: null,\n query: null,\n ngContent: { index: index }\n };\n}\nfunction appendNgContent(view, renderHost, def) {\n var parentEl = getParentRenderElement(view, renderHost, def);\n if (!parentEl) {\n // Nothing to do if there is no parent element.\n return;\n }\n var ngContentIndex = def.ngContent.index;\n visitProjectedRenderNodes(view, ngContentIndex, 1 /* AppendChild */, parentEl, null, undefined);\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction purePipeDef(checkIndex, argCount) {\n // argCount + 1 to include the pipe as first arg\n return _pureExpressionDef(128 /* TypePurePipe */, checkIndex, new Array(argCount + 1));\n}\nfunction pureArrayDef(checkIndex, argCount) {\n return _pureExpressionDef(32 /* TypePureArray */, checkIndex, new Array(argCount));\n}\nfunction pureObjectDef(checkIndex, propToIndex) {\n var keys = Object.keys(propToIndex);\n var nbKeys = keys.length;\n var propertyNames = new Array(nbKeys);\n for (var i = 0; i < nbKeys; i++) {\n var key = keys[i];\n var index = propToIndex[key];\n propertyNames[index] = key;\n }\n return _pureExpressionDef(64 /* TypePureObject */, checkIndex, propertyNames);\n}\nfunction _pureExpressionDef(flags, checkIndex, propertyNames) {\n var bindings = new Array(propertyNames.length);\n for (var i = 0; i < propertyNames.length; i++) {\n var prop = propertyNames[i];\n bindings[i] = {\n flags: 8 /* TypeProperty */,\n name: prop,\n ns: null,\n nonMinifiedName: prop,\n securityContext: null,\n suffix: null\n };\n }\n return {\n // will bet set by the view definition\n nodeIndex: -1,\n parent: null,\n renderParent: null,\n bindingIndex: -1,\n outputIndex: -1,\n // regular values\n checkIndex: checkIndex,\n flags: flags,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0,\n matchedQueries: {},\n matchedQueryIds: 0,\n references: {},\n ngContentIndex: -1,\n childCount: 0, bindings: bindings,\n bindingFlags: calcBindingFlags(bindings),\n outputs: [],\n element: null,\n provider: null,\n text: null,\n query: null,\n ngContent: null\n };\n}\nfunction createPureExpression(view, def) {\n return { value: undefined };\n}\nfunction checkAndUpdatePureExpressionInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n var bindings = def.bindings;\n var changed = false;\n var bindLen = bindings.length;\n if (bindLen > 0 && checkAndUpdateBinding(view, def, 0, v0))\n changed = true;\n if (bindLen > 1 && checkAndUpdateBinding(view, def, 1, v1))\n changed = true;\n if (bindLen > 2 && checkAndUpdateBinding(view, def, 2, v2))\n changed = true;\n if (bindLen > 3 && checkAndUpdateBinding(view, def, 3, v3))\n changed = true;\n if (bindLen > 4 && checkAndUpdateBinding(view, def, 4, v4))\n changed = true;\n if (bindLen > 5 && checkAndUpdateBinding(view, def, 5, v5))\n changed = true;\n if (bindLen > 6 && checkAndUpdateBinding(view, def, 6, v6))\n changed = true;\n if (bindLen > 7 && checkAndUpdateBinding(view, def, 7, v7))\n changed = true;\n if (bindLen > 8 && checkAndUpdateBinding(view, def, 8, v8))\n changed = true;\n if (bindLen > 9 && checkAndUpdateBinding(view, def, 9, v9))\n changed = true;\n if (changed) {\n var data = asPureExpressionData(view, def.nodeIndex);\n var value = void 0;\n switch (def.flags & 201347067 /* Types */) {\n case 32 /* TypePureArray */:\n value = new Array(bindings.length);\n if (bindLen > 0)\n value[0] = v0;\n if (bindLen > 1)\n value[1] = v1;\n if (bindLen > 2)\n value[2] = v2;\n if (bindLen > 3)\n value[3] = v3;\n if (bindLen > 4)\n value[4] = v4;\n if (bindLen > 5)\n value[5] = v5;\n if (bindLen > 6)\n value[6] = v6;\n if (bindLen > 7)\n value[7] = v7;\n if (bindLen > 8)\n value[8] = v8;\n if (bindLen > 9)\n value[9] = v9;\n break;\n case 64 /* TypePureObject */:\n value = {};\n if (bindLen > 0)\n value[bindings[0].name] = v0;\n if (bindLen > 1)\n value[bindings[1].name] = v1;\n if (bindLen > 2)\n value[bindings[2].name] = v2;\n if (bindLen > 3)\n value[bindings[3].name] = v3;\n if (bindLen > 4)\n value[bindings[4].name] = v4;\n if (bindLen > 5)\n value[bindings[5].name] = v5;\n if (bindLen > 6)\n value[bindings[6].name] = v6;\n if (bindLen > 7)\n value[bindings[7].name] = v7;\n if (bindLen > 8)\n value[bindings[8].name] = v8;\n if (bindLen > 9)\n value[bindings[9].name] = v9;\n break;\n case 128 /* TypePurePipe */:\n var pipe = v0;\n switch (bindLen) {\n case 1:\n value = pipe.transform(v0);\n break;\n case 2:\n value = pipe.transform(v1);\n break;\n case 3:\n value = pipe.transform(v1, v2);\n break;\n case 4:\n value = pipe.transform(v1, v2, v3);\n break;\n case 5:\n value = pipe.transform(v1, v2, v3, v4);\n break;\n case 6:\n value = pipe.transform(v1, v2, v3, v4, v5);\n break;\n case 7:\n value = pipe.transform(v1, v2, v3, v4, v5, v6);\n break;\n case 8:\n value = pipe.transform(v1, v2, v3, v4, v5, v6, v7);\n break;\n case 9:\n value = pipe.transform(v1, v2, v3, v4, v5, v6, v7, v8);\n break;\n case 10:\n value = pipe.transform(v1, v2, v3, v4, v5, v6, v7, v8, v9);\n break;\n }\n break;\n }\n data.value = value;\n }\n return changed;\n}\nfunction checkAndUpdatePureExpressionDynamic(view, def, values) {\n var bindings = def.bindings;\n var changed = false;\n for (var i = 0; i < values.length; i++) {\n // Note: We need to loop over all values, so that\n // the old values are updates as well!\n if (checkAndUpdateBinding(view, def, i, values[i])) {\n changed = true;\n }\n }\n if (changed) {\n var data = asPureExpressionData(view, def.nodeIndex);\n var value = void 0;\n switch (def.flags & 201347067 /* Types */) {\n case 32 /* TypePureArray */:\n value = values;\n break;\n case 64 /* TypePureObject */:\n value = {};\n for (var i = 0; i < values.length; i++) {\n value[bindings[i].name] = values[i];\n }\n break;\n case 128 /* TypePurePipe */:\n var pipe = values[0];\n var params = values.slice(1);\n value = pipe.transform.apply(pipe, __spread(params));\n break;\n }\n data.value = value;\n }\n return changed;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction textDef(checkIndex, ngContentIndex, staticText) {\n var bindings = new Array(staticText.length - 1);\n for (var i = 1; i < staticText.length; i++) {\n bindings[i - 1] = {\n flags: 8 /* TypeProperty */,\n name: null,\n ns: null,\n nonMinifiedName: null,\n securityContext: null,\n suffix: staticText[i],\n };\n }\n return {\n // will bet set by the view definition\n nodeIndex: -1,\n parent: null,\n renderParent: null,\n bindingIndex: -1,\n outputIndex: -1,\n // regular values\n checkIndex: checkIndex,\n flags: 2 /* TypeText */,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0,\n matchedQueries: {},\n matchedQueryIds: 0,\n references: {}, ngContentIndex: ngContentIndex,\n childCount: 0, bindings: bindings,\n bindingFlags: 8 /* TypeProperty */,\n outputs: [],\n element: null,\n provider: null,\n text: { prefix: staticText[0] },\n query: null,\n ngContent: null,\n };\n}\nfunction createText(view, renderHost, def) {\n var renderNode$$1;\n var renderer = view.renderer;\n renderNode$$1 = renderer.createText(def.text.prefix);\n var parentEl = getParentRenderElement(view, renderHost, def);\n if (parentEl) {\n renderer.appendChild(parentEl, renderNode$$1);\n }\n return { renderText: renderNode$$1 };\n}\nfunction checkAndUpdateTextInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n var changed = false;\n var bindings = def.bindings;\n var bindLen = bindings.length;\n if (bindLen > 0 && checkAndUpdateBinding(view, def, 0, v0))\n changed = true;\n if (bindLen > 1 && checkAndUpdateBinding(view, def, 1, v1))\n changed = true;\n if (bindLen > 2 && checkAndUpdateBinding(view, def, 2, v2))\n changed = true;\n if (bindLen > 3 && checkAndUpdateBinding(view, def, 3, v3))\n changed = true;\n if (bindLen > 4 && checkAndUpdateBinding(view, def, 4, v4))\n changed = true;\n if (bindLen > 5 && checkAndUpdateBinding(view, def, 5, v5))\n changed = true;\n if (bindLen > 6 && checkAndUpdateBinding(view, def, 6, v6))\n changed = true;\n if (bindLen > 7 && checkAndUpdateBinding(view, def, 7, v7))\n changed = true;\n if (bindLen > 8 && checkAndUpdateBinding(view, def, 8, v8))\n changed = true;\n if (bindLen > 9 && checkAndUpdateBinding(view, def, 9, v9))\n changed = true;\n if (changed) {\n var value = def.text.prefix;\n if (bindLen > 0)\n value += _addInterpolationPart(v0, bindings[0]);\n if (bindLen > 1)\n value += _addInterpolationPart(v1, bindings[1]);\n if (bindLen > 2)\n value += _addInterpolationPart(v2, bindings[2]);\n if (bindLen > 3)\n value += _addInterpolationPart(v3, bindings[3]);\n if (bindLen > 4)\n value += _addInterpolationPart(v4, bindings[4]);\n if (bindLen > 5)\n value += _addInterpolationPart(v5, bindings[5]);\n if (bindLen > 6)\n value += _addInterpolationPart(v6, bindings[6]);\n if (bindLen > 7)\n value += _addInterpolationPart(v7, bindings[7]);\n if (bindLen > 8)\n value += _addInterpolationPart(v8, bindings[8]);\n if (bindLen > 9)\n value += _addInterpolationPart(v9, bindings[9]);\n var renderNode$$1 = asTextData(view, def.nodeIndex).renderText;\n view.renderer.setValue(renderNode$$1, value);\n }\n return changed;\n}\nfunction checkAndUpdateTextDynamic(view, def, values) {\n var bindings = def.bindings;\n var changed = false;\n for (var i = 0; i < values.length; i++) {\n // Note: We need to loop over all values, so that\n // the old values are updates as well!\n if (checkAndUpdateBinding(view, def, i, values[i])) {\n changed = true;\n }\n }\n if (changed) {\n var value = '';\n for (var i = 0; i < values.length; i++) {\n value = value + _addInterpolationPart(values[i], bindings[i]);\n }\n value = def.text.prefix + value;\n var renderNode$$1 = asTextData(view, def.nodeIndex).renderText;\n view.renderer.setValue(renderNode$$1, value);\n }\n return changed;\n}\nfunction _addInterpolationPart(value, binding) {\n var valueStr = value != null ? value.toString() : '';\n return valueStr + binding.suffix;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction viewDef(flags, nodes, updateDirectives, updateRenderer) {\n // clone nodes and set auto calculated values\n var viewBindingCount = 0;\n var viewDisposableCount = 0;\n var viewNodeFlags = 0;\n var viewRootNodeFlags = 0;\n var viewMatchedQueries = 0;\n var currentParent = null;\n var currentRenderParent = null;\n var currentElementHasPublicProviders = false;\n var currentElementHasPrivateProviders = false;\n var lastRenderRootNode = null;\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n node.nodeIndex = i;\n node.parent = currentParent;\n node.bindingIndex = viewBindingCount;\n node.outputIndex = viewDisposableCount;\n node.renderParent = currentRenderParent;\n viewNodeFlags |= node.flags;\n viewMatchedQueries |= node.matchedQueryIds;\n if (node.element) {\n var elDef = node.element;\n elDef.publicProviders =\n currentParent ? currentParent.element.publicProviders : Object.create(null);\n elDef.allProviders = elDef.publicProviders;\n // Note: We assume that all providers of an element are before any child element!\n currentElementHasPublicProviders = false;\n currentElementHasPrivateProviders = false;\n if (node.element.template) {\n viewMatchedQueries |= node.element.template.nodeMatchedQueries;\n }\n }\n validateNode(currentParent, node, nodes.length);\n viewBindingCount += node.bindings.length;\n viewDisposableCount += node.outputs.length;\n if (!currentRenderParent && (node.flags & 3 /* CatRenderNode */)) {\n lastRenderRootNode = node;\n }\n if (node.flags & 20224 /* CatProvider */) {\n if (!currentElementHasPublicProviders) {\n currentElementHasPublicProviders = true;\n // Use prototypical inheritance to not get O(n^2) complexity...\n // Use prototypical inheritance to not get O(n^2) complexity...\n currentParent.element.publicProviders =\n Object.create(currentParent.element.publicProviders);\n currentParent.element.allProviders = currentParent.element.publicProviders;\n }\n var isPrivateService = (node.flags & 8192 /* PrivateProvider */) !== 0;\n var isComponent = (node.flags & 32768 /* Component */) !== 0;\n if (!isPrivateService || isComponent) {\n currentParent.element.publicProviders[tokenKey(node.provider.token)] = node;\n }\n else {\n if (!currentElementHasPrivateProviders) {\n currentElementHasPrivateProviders = true;\n // Use prototypical inheritance to not get O(n^2) complexity...\n // Use prototypical inheritance to not get O(n^2) complexity...\n currentParent.element.allProviders =\n Object.create(currentParent.element.publicProviders);\n }\n currentParent.element.allProviders[tokenKey(node.provider.token)] = node;\n }\n if (isComponent) {\n currentParent.element.componentProvider = node;\n }\n }\n if (currentParent) {\n currentParent.childFlags |= node.flags;\n currentParent.directChildFlags |= node.flags;\n currentParent.childMatchedQueries |= node.matchedQueryIds;\n if (node.element && node.element.template) {\n currentParent.childMatchedQueries |= node.element.template.nodeMatchedQueries;\n }\n }\n else {\n viewRootNodeFlags |= node.flags;\n }\n if (node.childCount > 0) {\n currentParent = node;\n if (!isNgContainer(node)) {\n currentRenderParent = node;\n }\n }\n else {\n // When the current node has no children, check if it is the last children of its parent.\n // When it is, propagate the flags up.\n // The loop is required because an element could be the last transitive children of several\n // elements. We loop to either the root or the highest opened element (= with remaining\n // children)\n while (currentParent && i === currentParent.nodeIndex + currentParent.childCount) {\n var newParent = currentParent.parent;\n if (newParent) {\n newParent.childFlags |= currentParent.childFlags;\n newParent.childMatchedQueries |= currentParent.childMatchedQueries;\n }\n currentParent = newParent;\n // We also need to update the render parent & account for ng-container\n if (currentParent && isNgContainer(currentParent)) {\n currentRenderParent = currentParent.renderParent;\n }\n else {\n currentRenderParent = currentParent;\n }\n }\n }\n }\n var handleEvent = function (view, nodeIndex, eventName, event) {\n return nodes[nodeIndex].element.handleEvent(view, eventName, event);\n };\n return {\n // Will be filled later...\n factory: null,\n nodeFlags: viewNodeFlags,\n rootNodeFlags: viewRootNodeFlags,\n nodeMatchedQueries: viewMatchedQueries, flags: flags,\n nodes: nodes,\n updateDirectives: updateDirectives || NOOP,\n updateRenderer: updateRenderer || NOOP, handleEvent: handleEvent,\n bindingCount: viewBindingCount,\n outputCount: viewDisposableCount, lastRenderRootNode: lastRenderRootNode\n };\n}\nfunction isNgContainer(node) {\n return (node.flags & 1 /* TypeElement */) !== 0 && node.element.name === null;\n}\nfunction validateNode(parent, node, nodeCount) {\n var template = node.element && node.element.template;\n if (template) {\n if (!template.lastRenderRootNode) {\n throw new Error(\"Illegal State: Embedded templates without nodes are not allowed!\");\n }\n if (template.lastRenderRootNode &&\n template.lastRenderRootNode.flags & 16777216 /* EmbeddedViews */) {\n throw new Error(\"Illegal State: Last root node of a template can't have embedded views, at index \" + node.nodeIndex + \"!\");\n }\n }\n if (node.flags & 20224 /* CatProvider */) {\n var parentFlags = parent ? parent.flags : 0;\n if ((parentFlags & 1 /* TypeElement */) === 0) {\n throw new Error(\"Illegal State: StaticProvider/Directive nodes need to be children of elements or anchors, at index \" + node.nodeIndex + \"!\");\n }\n }\n if (node.query) {\n if (node.flags & 67108864 /* TypeContentQuery */ &&\n (!parent || (parent.flags & 16384 /* TypeDirective */) === 0)) {\n throw new Error(\"Illegal State: Content Query nodes need to be children of directives, at index \" + node.nodeIndex + \"!\");\n }\n if (node.flags & 134217728 /* TypeViewQuery */ && parent) {\n throw new Error(\"Illegal State: View Query nodes have to be top level nodes, at index \" + node.nodeIndex + \"!\");\n }\n }\n if (node.childCount) {\n var parentEnd = parent ? parent.nodeIndex + parent.childCount : nodeCount - 1;\n if (node.nodeIndex <= parentEnd && node.nodeIndex + node.childCount > parentEnd) {\n throw new Error(\"Illegal State: childCount of node leads outside of parent, at index \" + node.nodeIndex + \"!\");\n }\n }\n}\nfunction createEmbeddedView(parent, anchorDef$$1, viewDef, context) {\n // embedded views are seen as siblings to the anchor, so we need\n // to get the parent of the anchor and use it as parentIndex.\n var view = createView(parent.root, parent.renderer, parent, anchorDef$$1, viewDef);\n initView(view, parent.component, context);\n createViewNodes(view);\n return view;\n}\nfunction createRootView(root, def, context) {\n var view = createView(root, root.renderer, null, null, def);\n initView(view, context, context);\n createViewNodes(view);\n return view;\n}\nfunction createComponentView(parentView, nodeDef, viewDef, hostElement) {\n var rendererType = nodeDef.element.componentRendererType;\n var compRenderer;\n if (!rendererType) {\n compRenderer = parentView.root.renderer;\n }\n else {\n compRenderer = parentView.root.rendererFactory.createRenderer(hostElement, rendererType);\n }\n return createView(parentView.root, compRenderer, parentView, nodeDef.element.componentProvider, viewDef);\n}\nfunction createView(root, renderer, parent, parentNodeDef, def) {\n var nodes = new Array(def.nodes.length);\n var disposables = def.outputCount ? new Array(def.outputCount) : null;\n var view = {\n def: def,\n parent: parent,\n viewContainerParent: null, parentNodeDef: parentNodeDef,\n context: null,\n component: null, nodes: nodes,\n state: 13 /* CatInit */, root: root, renderer: renderer,\n oldValues: new Array(def.bindingCount), disposables: disposables,\n initIndex: -1\n };\n return view;\n}\nfunction initView(view, component, context) {\n view.component = component;\n view.context = context;\n}\nfunction createViewNodes(view) {\n var renderHost;\n if (isComponentView(view)) {\n var hostDef = view.parentNodeDef;\n renderHost = asElementData((view.parent), hostDef.parent.nodeIndex).renderElement;\n }\n var def = view.def;\n var nodes = view.nodes;\n for (var i = 0; i < def.nodes.length; i++) {\n var nodeDef = def.nodes[i];\n Services.setCurrentNode(view, i);\n var nodeData = void 0;\n switch (nodeDef.flags & 201347067 /* Types */) {\n case 1 /* TypeElement */:\n var el = createElement(view, renderHost, nodeDef);\n var componentView = (undefined);\n if (nodeDef.flags & 33554432 /* ComponentView */) {\n var compViewDef = resolveDefinition((nodeDef.element.componentView));\n componentView = Services.createComponentView(view, nodeDef, compViewDef, el);\n }\n listenToElementOutputs(view, componentView, nodeDef, el);\n nodeData = {\n renderElement: el,\n componentView: componentView,\n viewContainer: null,\n template: nodeDef.element.template ? createTemplateData(view, nodeDef) : undefined\n };\n if (nodeDef.flags & 16777216 /* EmbeddedViews */) {\n nodeData.viewContainer = createViewContainerData(view, nodeDef, nodeData);\n }\n break;\n case 2 /* TypeText */:\n nodeData = createText(view, renderHost, nodeDef);\n break;\n case 512 /* TypeClassProvider */:\n case 1024 /* TypeFactoryProvider */:\n case 2048 /* TypeUseExistingProvider */:\n case 256 /* TypeValueProvider */: {\n nodeData = nodes[i];\n if (!nodeData && !(nodeDef.flags & 4096 /* LazyProvider */)) {\n var instance = createProviderInstance(view, nodeDef);\n nodeData = { instance: instance };\n }\n break;\n }\n case 16 /* TypePipe */: {\n var instance = createPipeInstance(view, nodeDef);\n nodeData = { instance: instance };\n break;\n }\n case 16384 /* TypeDirective */: {\n nodeData = nodes[i];\n if (!nodeData) {\n var instance = createDirectiveInstance(view, nodeDef);\n nodeData = { instance: instance };\n }\n if (nodeDef.flags & 32768 /* Component */) {\n var compView = asElementData(view, nodeDef.parent.nodeIndex).componentView;\n initView(compView, nodeData.instance, nodeData.instance);\n }\n break;\n }\n case 32 /* TypePureArray */:\n case 64 /* TypePureObject */:\n case 128 /* TypePurePipe */:\n nodeData = createPureExpression(view, nodeDef);\n break;\n case 67108864 /* TypeContentQuery */:\n case 134217728 /* TypeViewQuery */:\n nodeData = createQuery();\n break;\n case 8 /* TypeNgContent */:\n appendNgContent(view, renderHost, nodeDef);\n // no runtime data needed for NgContent...\n nodeData = undefined;\n break;\n }\n nodes[i] = nodeData;\n }\n // Create the ViewData.nodes of component views after we created everything else,\n // so that e.g. ng-content works\n execComponentViewsAction(view, ViewAction.CreateViewNodes);\n // fill static content and view queries\n execQueriesAction(view, 67108864 /* TypeContentQuery */ | 134217728 /* TypeViewQuery */, 268435456 /* StaticQuery */, 0 /* CheckAndUpdate */);\n}\nfunction checkNoChangesView(view) {\n markProjectedViewsForCheck(view);\n Services.updateDirectives(view, 1 /* CheckNoChanges */);\n execEmbeddedViewsAction(view, ViewAction.CheckNoChanges);\n Services.updateRenderer(view, 1 /* CheckNoChanges */);\n execComponentViewsAction(view, ViewAction.CheckNoChanges);\n // Note: We don't check queries for changes as we didn't do this in v2.x.\n // TODO(tbosch): investigate if we can enable the check again in v5.x with a nicer error message.\n view.state &= ~(64 /* CheckProjectedViews */ | 32 /* CheckProjectedView */);\n}\nfunction checkAndUpdateView(view) {\n if (view.state & 1 /* BeforeFirstCheck */) {\n view.state &= ~1 /* BeforeFirstCheck */;\n view.state |= 2 /* FirstCheck */;\n }\n else {\n view.state &= ~2 /* FirstCheck */;\n }\n shiftInitState(view, 0 /* InitState_BeforeInit */, 256 /* InitState_CallingOnInit */);\n markProjectedViewsForCheck(view);\n Services.updateDirectives(view, 0 /* CheckAndUpdate */);\n execEmbeddedViewsAction(view, ViewAction.CheckAndUpdate);\n execQueriesAction(view, 67108864 /* TypeContentQuery */, 536870912 /* DynamicQuery */, 0 /* CheckAndUpdate */);\n var callInit = shiftInitState(view, 256 /* InitState_CallingOnInit */, 512 /* InitState_CallingAfterContentInit */);\n callLifecycleHooksChildrenFirst(view, 2097152 /* AfterContentChecked */ | (callInit ? 1048576 /* AfterContentInit */ : 0));\n Services.updateRenderer(view, 0 /* CheckAndUpdate */);\n execComponentViewsAction(view, ViewAction.CheckAndUpdate);\n execQueriesAction(view, 134217728 /* TypeViewQuery */, 536870912 /* DynamicQuery */, 0 /* CheckAndUpdate */);\n callInit = shiftInitState(view, 512 /* InitState_CallingAfterContentInit */, 768 /* InitState_CallingAfterViewInit */);\n callLifecycleHooksChildrenFirst(view, 8388608 /* AfterViewChecked */ | (callInit ? 4194304 /* AfterViewInit */ : 0));\n if (view.def.flags & 2 /* OnPush */) {\n view.state &= ~8 /* ChecksEnabled */;\n }\n view.state &= ~(64 /* CheckProjectedViews */ | 32 /* CheckProjectedView */);\n shiftInitState(view, 768 /* InitState_CallingAfterViewInit */, 1024 /* InitState_AfterInit */);\n}\nfunction checkAndUpdateNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n if (argStyle === 0 /* Inline */) {\n return checkAndUpdateNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n }\n else {\n return checkAndUpdateNodeDynamic(view, nodeDef, v0);\n }\n}\nfunction markProjectedViewsForCheck(view) {\n var def = view.def;\n if (!(def.nodeFlags & 4 /* ProjectedTemplate */)) {\n return;\n }\n for (var i = 0; i < def.nodes.length; i++) {\n var nodeDef = def.nodes[i];\n if (nodeDef.flags & 4 /* ProjectedTemplate */) {\n var projectedViews = asElementData(view, i).template._projectedViews;\n if (projectedViews) {\n for (var i_1 = 0; i_1 < projectedViews.length; i_1++) {\n var projectedView = projectedViews[i_1];\n projectedView.state |= 32 /* CheckProjectedView */;\n markParentViewsForCheckProjectedViews(projectedView, view);\n }\n }\n }\n else if ((nodeDef.childFlags & 4 /* ProjectedTemplate */) === 0) {\n // a parent with leafs\n // no child is a component,\n // then skip the children\n i += nodeDef.childCount;\n }\n }\n}\nfunction checkAndUpdateNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n switch (nodeDef.flags & 201347067 /* Types */) {\n case 1 /* TypeElement */:\n return checkAndUpdateElementInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n case 2 /* TypeText */:\n return checkAndUpdateTextInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n case 16384 /* TypeDirective */:\n return checkAndUpdateDirectiveInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n case 32 /* TypePureArray */:\n case 64 /* TypePureObject */:\n case 128 /* TypePurePipe */:\n return checkAndUpdatePureExpressionInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n default:\n throw 'unreachable';\n }\n}\nfunction checkAndUpdateNodeDynamic(view, nodeDef, values) {\n switch (nodeDef.flags & 201347067 /* Types */) {\n case 1 /* TypeElement */:\n return checkAndUpdateElementDynamic(view, nodeDef, values);\n case 2 /* TypeText */:\n return checkAndUpdateTextDynamic(view, nodeDef, values);\n case 16384 /* TypeDirective */:\n return checkAndUpdateDirectiveDynamic(view, nodeDef, values);\n case 32 /* TypePureArray */:\n case 64 /* TypePureObject */:\n case 128 /* TypePurePipe */:\n return checkAndUpdatePureExpressionDynamic(view, nodeDef, values);\n default:\n throw 'unreachable';\n }\n}\nfunction checkNoChangesNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n if (argStyle === 0 /* Inline */) {\n checkNoChangesNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n }\n else {\n checkNoChangesNodeDynamic(view, nodeDef, v0);\n }\n // Returning false is ok here as we would have thrown in case of a change.\n return false;\n}\nfunction checkNoChangesNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n var bindLen = nodeDef.bindings.length;\n if (bindLen > 0)\n checkBindingNoChanges(view, nodeDef, 0, v0);\n if (bindLen > 1)\n checkBindingNoChanges(view, nodeDef, 1, v1);\n if (bindLen > 2)\n checkBindingNoChanges(view, nodeDef, 2, v2);\n if (bindLen > 3)\n checkBindingNoChanges(view, nodeDef, 3, v3);\n if (bindLen > 4)\n checkBindingNoChanges(view, nodeDef, 4, v4);\n if (bindLen > 5)\n checkBindingNoChanges(view, nodeDef, 5, v5);\n if (bindLen > 6)\n checkBindingNoChanges(view, nodeDef, 6, v6);\n if (bindLen > 7)\n checkBindingNoChanges(view, nodeDef, 7, v7);\n if (bindLen > 8)\n checkBindingNoChanges(view, nodeDef, 8, v8);\n if (bindLen > 9)\n checkBindingNoChanges(view, nodeDef, 9, v9);\n}\nfunction checkNoChangesNodeDynamic(view, nodeDef, values) {\n for (var i = 0; i < values.length; i++) {\n checkBindingNoChanges(view, nodeDef, i, values[i]);\n }\n}\n/**\n * Workaround https://github.com/angular/tsickle/issues/497\n * @suppress {misplacedTypeAnnotation}\n */\nfunction checkNoChangesQuery(view, nodeDef) {\n var queryList = asQueryList(view, nodeDef.nodeIndex);\n if (queryList.dirty) {\n throw expressionChangedAfterItHasBeenCheckedError(Services.createDebugContext(view, nodeDef.nodeIndex), \"Query \" + nodeDef.query.id + \" not dirty\", \"Query \" + nodeDef.query.id + \" dirty\", (view.state & 1 /* BeforeFirstCheck */) !== 0);\n }\n}\nfunction destroyView(view) {\n if (view.state & 128 /* Destroyed */) {\n return;\n }\n execEmbeddedViewsAction(view, ViewAction.Destroy);\n execComponentViewsAction(view, ViewAction.Destroy);\n callLifecycleHooksChildrenFirst(view, 131072 /* OnDestroy */);\n if (view.disposables) {\n for (var i = 0; i < view.disposables.length; i++) {\n view.disposables[i]();\n }\n }\n detachProjectedView(view);\n if (view.renderer.destroyNode) {\n destroyViewNodes(view);\n }\n if (isComponentView(view)) {\n view.renderer.destroy();\n }\n view.state |= 128 /* Destroyed */;\n}\nfunction destroyViewNodes(view) {\n var len = view.def.nodes.length;\n for (var i = 0; i < len; i++) {\n var def = view.def.nodes[i];\n if (def.flags & 1 /* TypeElement */) {\n view.renderer.destroyNode(asElementData(view, i).renderElement);\n }\n else if (def.flags & 2 /* TypeText */) {\n view.renderer.destroyNode(asTextData(view, i).renderText);\n }\n else if (def.flags & 67108864 /* TypeContentQuery */ || def.flags & 134217728 /* TypeViewQuery */) {\n asQueryList(view, i).destroy();\n }\n }\n}\nvar ViewAction;\n(function (ViewAction) {\n ViewAction[ViewAction[\"CreateViewNodes\"] = 0] = \"CreateViewNodes\";\n ViewAction[ViewAction[\"CheckNoChanges\"] = 1] = \"CheckNoChanges\";\n ViewAction[ViewAction[\"CheckNoChangesProjectedViews\"] = 2] = \"CheckNoChangesProjectedViews\";\n ViewAction[ViewAction[\"CheckAndUpdate\"] = 3] = \"CheckAndUpdate\";\n ViewAction[ViewAction[\"CheckAndUpdateProjectedViews\"] = 4] = \"CheckAndUpdateProjectedViews\";\n ViewAction[ViewAction[\"Destroy\"] = 5] = \"Destroy\";\n})(ViewAction || (ViewAction = {}));\nfunction execComponentViewsAction(view, action) {\n var def = view.def;\n if (!(def.nodeFlags & 33554432 /* ComponentView */)) {\n return;\n }\n for (var i = 0; i < def.nodes.length; i++) {\n var nodeDef = def.nodes[i];\n if (nodeDef.flags & 33554432 /* ComponentView */) {\n // a leaf\n callViewAction(asElementData(view, i).componentView, action);\n }\n else if ((nodeDef.childFlags & 33554432 /* ComponentView */) === 0) {\n // a parent with leafs\n // no child is a component,\n // then skip the children\n i += nodeDef.childCount;\n }\n }\n}\nfunction execEmbeddedViewsAction(view, action) {\n var def = view.def;\n if (!(def.nodeFlags & 16777216 /* EmbeddedViews */)) {\n return;\n }\n for (var i = 0; i < def.nodes.length; i++) {\n var nodeDef = def.nodes[i];\n if (nodeDef.flags & 16777216 /* EmbeddedViews */) {\n // a leaf\n var embeddedViews = asElementData(view, i).viewContainer._embeddedViews;\n for (var k = 0; k < embeddedViews.length; k++) {\n callViewAction(embeddedViews[k], action);\n }\n }\n else if ((nodeDef.childFlags & 16777216 /* EmbeddedViews */) === 0) {\n // a parent with leafs\n // no child is a component,\n // then skip the children\n i += nodeDef.childCount;\n }\n }\n}\nfunction callViewAction(view, action) {\n var viewState = view.state;\n switch (action) {\n case ViewAction.CheckNoChanges:\n if ((viewState & 128 /* Destroyed */) === 0) {\n if ((viewState & 12 /* CatDetectChanges */) === 12 /* CatDetectChanges */) {\n checkNoChangesView(view);\n }\n else if (viewState & 64 /* CheckProjectedViews */) {\n execProjectedViewsAction(view, ViewAction.CheckNoChangesProjectedViews);\n }\n }\n break;\n case ViewAction.CheckNoChangesProjectedViews:\n if ((viewState & 128 /* Destroyed */) === 0) {\n if (viewState & 32 /* CheckProjectedView */) {\n checkNoChangesView(view);\n }\n else if (viewState & 64 /* CheckProjectedViews */) {\n execProjectedViewsAction(view, action);\n }\n }\n break;\n case ViewAction.CheckAndUpdate:\n if ((viewState & 128 /* Destroyed */) === 0) {\n if ((viewState & 12 /* CatDetectChanges */) === 12 /* CatDetectChanges */) {\n checkAndUpdateView(view);\n }\n else if (viewState & 64 /* CheckProjectedViews */) {\n execProjectedViewsAction(view, ViewAction.CheckAndUpdateProjectedViews);\n }\n }\n break;\n case ViewAction.CheckAndUpdateProjectedViews:\n if ((viewState & 128 /* Destroyed */) === 0) {\n if (viewState & 32 /* CheckProjectedView */) {\n checkAndUpdateView(view);\n }\n else if (viewState & 64 /* CheckProjectedViews */) {\n execProjectedViewsAction(view, action);\n }\n }\n break;\n case ViewAction.Destroy:\n // Note: destroyView recurses over all views,\n // so we don't need to special case projected views here.\n destroyView(view);\n break;\n case ViewAction.CreateViewNodes:\n createViewNodes(view);\n break;\n }\n}\nfunction execProjectedViewsAction(view, action) {\n execEmbeddedViewsAction(view, action);\n execComponentViewsAction(view, action);\n}\nfunction execQueriesAction(view, queryFlags, staticDynamicQueryFlag, checkType) {\n if (!(view.def.nodeFlags & queryFlags) || !(view.def.nodeFlags & staticDynamicQueryFlag)) {\n return;\n }\n var nodeCount = view.def.nodes.length;\n for (var i = 0; i < nodeCount; i++) {\n var nodeDef = view.def.nodes[i];\n if ((nodeDef.flags & queryFlags) && (nodeDef.flags & staticDynamicQueryFlag)) {\n Services.setCurrentNode(view, nodeDef.nodeIndex);\n switch (checkType) {\n case 0 /* CheckAndUpdate */:\n checkAndUpdateQuery(view, nodeDef);\n break;\n case 1 /* CheckNoChanges */:\n checkNoChangesQuery(view, nodeDef);\n break;\n }\n }\n if (!(nodeDef.childFlags & queryFlags) || !(nodeDef.childFlags & staticDynamicQueryFlag)) {\n // no child has a matching query\n // then skip the children\n i += nodeDef.childCount;\n }\n }\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar initialized = false;\nfunction initServicesIfNeeded() {\n if (initialized) {\n return;\n }\n initialized = true;\n var services = isDevMode() ? createDebugServices() : createProdServices();\n Services.setCurrentNode = services.setCurrentNode;\n Services.createRootView = services.createRootView;\n Services.createEmbeddedView = services.createEmbeddedView;\n Services.createComponentView = services.createComponentView;\n Services.createNgModuleRef = services.createNgModuleRef;\n Services.overrideProvider = services.overrideProvider;\n Services.overrideComponentView = services.overrideComponentView;\n Services.clearOverrides = services.clearOverrides;\n Services.checkAndUpdateView = services.checkAndUpdateView;\n Services.checkNoChangesView = services.checkNoChangesView;\n Services.destroyView = services.destroyView;\n Services.resolveDep = resolveDep;\n Services.createDebugContext = services.createDebugContext;\n Services.handleEvent = services.handleEvent;\n Services.updateDirectives = services.updateDirectives;\n Services.updateRenderer = services.updateRenderer;\n Services.dirtyParentQueries = dirtyParentQueries;\n}\nfunction createProdServices() {\n return {\n setCurrentNode: function () { },\n createRootView: createProdRootView,\n createEmbeddedView: createEmbeddedView,\n createComponentView: createComponentView,\n createNgModuleRef: createNgModuleRef,\n overrideProvider: NOOP,\n overrideComponentView: NOOP,\n clearOverrides: NOOP,\n checkAndUpdateView: checkAndUpdateView,\n checkNoChangesView: checkNoChangesView,\n destroyView: destroyView,\n createDebugContext: function (view, nodeIndex) { return new DebugContext_(view, nodeIndex); },\n handleEvent: function (view, nodeIndex, eventName, event) {\n return view.def.handleEvent(view, nodeIndex, eventName, event);\n },\n updateDirectives: function (view, checkType) {\n return view.def.updateDirectives(checkType === 0 /* CheckAndUpdate */ ? prodCheckAndUpdateNode :\n prodCheckNoChangesNode, view);\n },\n updateRenderer: function (view, checkType) {\n return view.def.updateRenderer(checkType === 0 /* CheckAndUpdate */ ? prodCheckAndUpdateNode :\n prodCheckNoChangesNode, view);\n },\n };\n}\nfunction createDebugServices() {\n return {\n setCurrentNode: debugSetCurrentNode,\n createRootView: debugCreateRootView,\n createEmbeddedView: debugCreateEmbeddedView,\n createComponentView: debugCreateComponentView,\n createNgModuleRef: debugCreateNgModuleRef,\n overrideProvider: debugOverrideProvider,\n overrideComponentView: debugOverrideComponentView,\n clearOverrides: debugClearOverrides,\n checkAndUpdateView: debugCheckAndUpdateView,\n checkNoChangesView: debugCheckNoChangesView,\n destroyView: debugDestroyView,\n createDebugContext: function (view, nodeIndex) { return new DebugContext_(view, nodeIndex); },\n handleEvent: debugHandleEvent,\n updateDirectives: debugUpdateDirectives,\n updateRenderer: debugUpdateRenderer,\n };\n}\nfunction createProdRootView(elInjector, projectableNodes, rootSelectorOrNode, def, ngModule, context) {\n var rendererFactory = ngModule.injector.get(RendererFactory2);\n return createRootView(createRootData(elInjector, ngModule, rendererFactory, projectableNodes, rootSelectorOrNode), def, context);\n}\nfunction debugCreateRootView(elInjector, projectableNodes, rootSelectorOrNode, def, ngModule, context) {\n var rendererFactory = ngModule.injector.get(RendererFactory2);\n var root = createRootData(elInjector, ngModule, new DebugRendererFactory2(rendererFactory), projectableNodes, rootSelectorOrNode);\n var defWithOverride = applyProviderOverridesToView(def);\n return callWithDebugContext(DebugAction.create, createRootView, null, [root, defWithOverride, context]);\n}\nfunction createRootData(elInjector, ngModule, rendererFactory, projectableNodes, rootSelectorOrNode) {\n var sanitizer = ngModule.injector.get(Sanitizer);\n var errorHandler = ngModule.injector.get(ErrorHandler);\n var renderer = rendererFactory.createRenderer(null, null);\n return {\n ngModule: ngModule,\n injector: elInjector, projectableNodes: projectableNodes,\n selectorOrNode: rootSelectorOrNode, sanitizer: sanitizer, rendererFactory: rendererFactory, renderer: renderer, errorHandler: errorHandler\n };\n}\nfunction debugCreateEmbeddedView(parentView, anchorDef, viewDef$$1, context) {\n var defWithOverride = applyProviderOverridesToView(viewDef$$1);\n return callWithDebugContext(DebugAction.create, createEmbeddedView, null, [parentView, anchorDef, defWithOverride, context]);\n}\nfunction debugCreateComponentView(parentView, nodeDef, viewDef$$1, hostElement) {\n var overrideComponentView = viewDefOverrides.get(nodeDef.element.componentProvider.provider.token);\n if (overrideComponentView) {\n viewDef$$1 = overrideComponentView;\n }\n else {\n viewDef$$1 = applyProviderOverridesToView(viewDef$$1);\n }\n return callWithDebugContext(DebugAction.create, createComponentView, null, [parentView, nodeDef, viewDef$$1, hostElement]);\n}\nfunction debugCreateNgModuleRef(moduleType, parentInjector, bootstrapComponents, def) {\n var defWithOverride = applyProviderOverridesToNgModule(def);\n return createNgModuleRef(moduleType, parentInjector, bootstrapComponents, defWithOverride);\n}\nvar providerOverrides = new Map();\nvar providerOverridesWithScope = new Map();\nvar viewDefOverrides = new Map();\nfunction debugOverrideProvider(override) {\n providerOverrides.set(override.token, override);\n if (typeof override.token === 'function' && override.token.ngInjectableDef &&\n typeof override.token.ngInjectableDef.providedIn === 'function') {\n providerOverridesWithScope.set(override.token, override);\n }\n}\nfunction debugOverrideComponentView(comp, compFactory) {\n var hostViewDef = resolveDefinition(getComponentViewDefinitionFactory(compFactory));\n var compViewDef = resolveDefinition((hostViewDef.nodes[0].element.componentView));\n viewDefOverrides.set(comp, compViewDef);\n}\nfunction debugClearOverrides() {\n providerOverrides.clear();\n providerOverridesWithScope.clear();\n viewDefOverrides.clear();\n}\n// Notes about the algorithm:\n// 1) Locate the providers of an element and check if one of them was overwritten\n// 2) Change the providers of that element\n//\n// We only create new datastructures if we need to, to keep perf impact\n// reasonable.\nfunction applyProviderOverridesToView(def) {\n if (providerOverrides.size === 0) {\n return def;\n }\n var elementIndicesWithOverwrittenProviders = findElementIndicesWithOverwrittenProviders(def);\n if (elementIndicesWithOverwrittenProviders.length === 0) {\n return def;\n }\n // clone the whole view definition,\n // as it maintains references between the nodes that are hard to update.\n def = def.factory(function () { return NOOP; });\n for (var i = 0; i < elementIndicesWithOverwrittenProviders.length; i++) {\n applyProviderOverridesToElement(def, elementIndicesWithOverwrittenProviders[i]);\n }\n return def;\n function findElementIndicesWithOverwrittenProviders(def) {\n var elIndicesWithOverwrittenProviders = [];\n var lastElementDef = null;\n for (var i = 0; i < def.nodes.length; i++) {\n var nodeDef = def.nodes[i];\n if (nodeDef.flags & 1 /* TypeElement */) {\n lastElementDef = nodeDef;\n }\n if (lastElementDef && nodeDef.flags & 3840 /* CatProviderNoDirective */ &&\n providerOverrides.has(nodeDef.provider.token)) {\n elIndicesWithOverwrittenProviders.push(lastElementDef.nodeIndex);\n lastElementDef = null;\n }\n }\n return elIndicesWithOverwrittenProviders;\n }\n function applyProviderOverridesToElement(viewDef$$1, elIndex) {\n for (var i = elIndex + 1; i < viewDef$$1.nodes.length; i++) {\n var nodeDef = viewDef$$1.nodes[i];\n if (nodeDef.flags & 1 /* TypeElement */) {\n // stop at the next element\n return;\n }\n if (nodeDef.flags & 3840 /* CatProviderNoDirective */) {\n var provider = (nodeDef.provider);\n var override = providerOverrides.get(provider.token);\n if (override) {\n nodeDef.flags = (nodeDef.flags & ~3840 /* CatProviderNoDirective */) | override.flags;\n provider.deps = splitDepsDsl(override.deps);\n provider.value = override.value;\n }\n }\n }\n }\n}\n// Notes about the algorithm:\n// We only create new datastructures if we need to, to keep perf impact\n// reasonable.\nfunction applyProviderOverridesToNgModule(def) {\n var _a = calcHasOverrides(def), hasOverrides = _a.hasOverrides, hasDeprecatedOverrides = _a.hasDeprecatedOverrides;\n if (!hasOverrides) {\n return def;\n }\n // clone the whole view definition,\n // as it maintains references between the nodes that are hard to update.\n def = def.factory(function () { return NOOP; });\n applyProviderOverrides(def);\n return def;\n function calcHasOverrides(def) {\n var hasOverrides = false;\n var hasDeprecatedOverrides = false;\n if (providerOverrides.size === 0) {\n return { hasOverrides: hasOverrides, hasDeprecatedOverrides: hasDeprecatedOverrides };\n }\n def.providers.forEach(function (node) {\n var override = providerOverrides.get(node.token);\n if ((node.flags & 3840 /* CatProviderNoDirective */) && override) {\n hasOverrides = true;\n hasDeprecatedOverrides = hasDeprecatedOverrides || override.deprecatedBehavior;\n }\n });\n def.modules.forEach(function (module) {\n providerOverridesWithScope.forEach(function (override, token) {\n if (token.ngInjectableDef.providedIn === module) {\n hasOverrides = true;\n hasDeprecatedOverrides = hasDeprecatedOverrides || override.deprecatedBehavior;\n }\n });\n });\n return { hasOverrides: hasOverrides, hasDeprecatedOverrides: hasDeprecatedOverrides };\n }\n function applyProviderOverrides(def) {\n for (var i = 0; i < def.providers.length; i++) {\n var provider = def.providers[i];\n if (hasDeprecatedOverrides) {\n // We had a bug where me made\n // all providers lazy. Keep this logic behind a flag\n // for migrating existing users.\n provider.flags |= 4096 /* LazyProvider */;\n }\n var override = providerOverrides.get(provider.token);\n if (override) {\n provider.flags = (provider.flags & ~3840 /* CatProviderNoDirective */) | override.flags;\n provider.deps = splitDepsDsl(override.deps);\n provider.value = override.value;\n }\n }\n if (providerOverridesWithScope.size > 0) {\n var moduleSet_1 = new Set(def.modules);\n providerOverridesWithScope.forEach(function (override, token) {\n if (moduleSet_1.has(token.ngInjectableDef.providedIn)) {\n var provider = {\n token: token,\n flags: override.flags | (hasDeprecatedOverrides ? 4096 /* LazyProvider */ : 0 /* None */),\n deps: splitDepsDsl(override.deps),\n value: override.value,\n index: def.providers.length,\n };\n def.providers.push(provider);\n def.providersByKey[tokenKey(token)] = provider;\n }\n });\n }\n }\n}\nfunction prodCheckAndUpdateNode(view, checkIndex, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n var nodeDef = view.def.nodes[checkIndex];\n checkAndUpdateNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n return (nodeDef.flags & 224 /* CatPureExpression */) ?\n asPureExpressionData(view, checkIndex).value :\n undefined;\n}\nfunction prodCheckNoChangesNode(view, checkIndex, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n var nodeDef = view.def.nodes[checkIndex];\n checkNoChangesNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n return (nodeDef.flags & 224 /* CatPureExpression */) ?\n asPureExpressionData(view, checkIndex).value :\n undefined;\n}\nfunction debugCheckAndUpdateView(view) {\n return callWithDebugContext(DebugAction.detectChanges, checkAndUpdateView, null, [view]);\n}\nfunction debugCheckNoChangesView(view) {\n return callWithDebugContext(DebugAction.checkNoChanges, checkNoChangesView, null, [view]);\n}\nfunction debugDestroyView(view) {\n return callWithDebugContext(DebugAction.destroy, destroyView, null, [view]);\n}\nvar DebugAction;\n(function (DebugAction) {\n DebugAction[DebugAction[\"create\"] = 0] = \"create\";\n DebugAction[DebugAction[\"detectChanges\"] = 1] = \"detectChanges\";\n DebugAction[DebugAction[\"checkNoChanges\"] = 2] = \"checkNoChanges\";\n DebugAction[DebugAction[\"destroy\"] = 3] = \"destroy\";\n DebugAction[DebugAction[\"handleEvent\"] = 4] = \"handleEvent\";\n})(DebugAction || (DebugAction = {}));\nvar _currentAction;\nvar _currentView;\nvar _currentNodeIndex;\nfunction debugSetCurrentNode(view, nodeIndex) {\n _currentView = view;\n _currentNodeIndex = nodeIndex;\n}\nfunction debugHandleEvent(view, nodeIndex, eventName, event) {\n debugSetCurrentNode(view, nodeIndex);\n return callWithDebugContext(DebugAction.handleEvent, view.def.handleEvent, null, [view, nodeIndex, eventName, event]);\n}\nfunction debugUpdateDirectives(view, checkType) {\n if (view.state & 128 /* Destroyed */) {\n throw viewDestroyedError(DebugAction[_currentAction]);\n }\n debugSetCurrentNode(view, nextDirectiveWithBinding(view, 0));\n return view.def.updateDirectives(debugCheckDirectivesFn, view);\n function debugCheckDirectivesFn(view, nodeIndex, argStyle) {\n var values = [];\n for (var _i = 3; _i < arguments.length; _i++) {\n values[_i - 3] = arguments[_i];\n }\n var nodeDef = view.def.nodes[nodeIndex];\n if (checkType === 0 /* CheckAndUpdate */) {\n debugCheckAndUpdateNode(view, nodeDef, argStyle, values);\n }\n else {\n debugCheckNoChangesNode(view, nodeDef, argStyle, values);\n }\n if (nodeDef.flags & 16384 /* TypeDirective */) {\n debugSetCurrentNode(view, nextDirectiveWithBinding(view, nodeIndex));\n }\n return (nodeDef.flags & 224 /* CatPureExpression */) ?\n asPureExpressionData(view, nodeDef.nodeIndex).value :\n undefined;\n }\n}\nfunction debugUpdateRenderer(view, checkType) {\n if (view.state & 128 /* Destroyed */) {\n throw viewDestroyedError(DebugAction[_currentAction]);\n }\n debugSetCurrentNode(view, nextRenderNodeWithBinding(view, 0));\n return view.def.updateRenderer(debugCheckRenderNodeFn, view);\n function debugCheckRenderNodeFn(view, nodeIndex, argStyle) {\n var values = [];\n for (var _i = 3; _i < arguments.length; _i++) {\n values[_i - 3] = arguments[_i];\n }\n var nodeDef = view.def.nodes[nodeIndex];\n if (checkType === 0 /* CheckAndUpdate */) {\n debugCheckAndUpdateNode(view, nodeDef, argStyle, values);\n }\n else {\n debugCheckNoChangesNode(view, nodeDef, argStyle, values);\n }\n if (nodeDef.flags & 3 /* CatRenderNode */) {\n debugSetCurrentNode(view, nextRenderNodeWithBinding(view, nodeIndex));\n }\n return (nodeDef.flags & 224 /* CatPureExpression */) ?\n asPureExpressionData(view, nodeDef.nodeIndex).value :\n undefined;\n }\n}\nfunction debugCheckAndUpdateNode(view, nodeDef, argStyle, givenValues) {\n var changed = checkAndUpdateNode.apply(void 0, __spread([view, nodeDef, argStyle], givenValues));\n if (changed) {\n var values = argStyle === 1 /* Dynamic */ ? givenValues[0] : givenValues;\n if (nodeDef.flags & 16384 /* TypeDirective */) {\n var bindingValues = {};\n for (var i = 0; i < nodeDef.bindings.length; i++) {\n var binding = nodeDef.bindings[i];\n var value = values[i];\n if (binding.flags & 8 /* TypeProperty */) {\n bindingValues[normalizeDebugBindingName((binding.nonMinifiedName))] =\n normalizeDebugBindingValue(value);\n }\n }\n var elDef = (nodeDef.parent);\n var el = asElementData(view, elDef.nodeIndex).renderElement;\n if (!elDef.element.name) {\n // a comment.\n view.renderer.setValue(el, \"bindings=\" + JSON.stringify(bindingValues, null, 2));\n }\n else {\n // a regular element.\n for (var attr in bindingValues) {\n var value = bindingValues[attr];\n if (value != null) {\n view.renderer.setAttribute(el, attr, value);\n }\n else {\n view.renderer.removeAttribute(el, attr);\n }\n }\n }\n }\n }\n}\nfunction debugCheckNoChangesNode(view, nodeDef, argStyle, values) {\n checkNoChangesNode.apply(void 0, __spread([view, nodeDef, argStyle], values));\n}\nfunction normalizeDebugBindingName(name) {\n // Attribute names with `$` (eg `x-y$`) are valid per spec, but unsupported by some browsers\n name = camelCaseToDashCase(name.replace(/[$@]/g, '_'));\n return \"ng-reflect-\" + name;\n}\nvar CAMEL_CASE_REGEXP = /([A-Z])/g;\nfunction camelCaseToDashCase(input) {\n return input.replace(CAMEL_CASE_REGEXP, function () {\n var m = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n m[_i] = arguments[_i];\n }\n return '-' + m[1].toLowerCase();\n });\n}\nfunction normalizeDebugBindingValue(value) {\n try {\n // Limit the size of the value as otherwise the DOM just gets polluted.\n return value != null ? value.toString().slice(0, 30) : value;\n }\n catch (e) {\n return '[ERROR] Exception while trying to serialize the value';\n }\n}\nfunction nextDirectiveWithBinding(view, nodeIndex) {\n for (var i = nodeIndex; i < view.def.nodes.length; i++) {\n var nodeDef = view.def.nodes[i];\n if (nodeDef.flags & 16384 /* TypeDirective */ && nodeDef.bindings && nodeDef.bindings.length) {\n return i;\n }\n }\n return null;\n}\nfunction nextRenderNodeWithBinding(view, nodeIndex) {\n for (var i = nodeIndex; i < view.def.nodes.length; i++) {\n var nodeDef = view.def.nodes[i];\n if ((nodeDef.flags & 3 /* CatRenderNode */) && nodeDef.bindings && nodeDef.bindings.length) {\n return i;\n }\n }\n return null;\n}\nvar DebugContext_ = /** @class */ (function () {\n function DebugContext_(view, nodeIndex) {\n this.view = view;\n this.nodeIndex = nodeIndex;\n if (nodeIndex == null) {\n this.nodeIndex = nodeIndex = 0;\n }\n this.nodeDef = view.def.nodes[nodeIndex];\n var elDef = this.nodeDef;\n var elView = view;\n while (elDef && (elDef.flags & 1 /* TypeElement */) === 0) {\n elDef = (elDef.parent);\n }\n if (!elDef) {\n while (!elDef && elView) {\n elDef = (viewParentEl(elView));\n elView = (elView.parent);\n }\n }\n this.elDef = elDef;\n this.elView = elView;\n }\n Object.defineProperty(DebugContext_.prototype, \"elOrCompView\", {\n get: function () {\n // Has to be done lazily as we use the DebugContext also during creation of elements...\n return asElementData(this.elView, this.elDef.nodeIndex).componentView || this.view;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugContext_.prototype, \"injector\", {\n get: function () { return createInjector$1(this.elView, this.elDef); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugContext_.prototype, \"component\", {\n get: function () { return this.elOrCompView.component; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugContext_.prototype, \"context\", {\n get: function () { return this.elOrCompView.context; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugContext_.prototype, \"providerTokens\", {\n get: function () {\n var tokens = [];\n if (this.elDef) {\n for (var i = this.elDef.nodeIndex + 1; i <= this.elDef.nodeIndex + this.elDef.childCount; i++) {\n var childDef = this.elView.def.nodes[i];\n if (childDef.flags & 20224 /* CatProvider */) {\n tokens.push(childDef.provider.token);\n }\n i += childDef.childCount;\n }\n }\n return tokens;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugContext_.prototype, \"references\", {\n get: function () {\n var references = {};\n if (this.elDef) {\n collectReferences(this.elView, this.elDef, references);\n for (var i = this.elDef.nodeIndex + 1; i <= this.elDef.nodeIndex + this.elDef.childCount; i++) {\n var childDef = this.elView.def.nodes[i];\n if (childDef.flags & 20224 /* CatProvider */) {\n collectReferences(this.elView, childDef, references);\n }\n i += childDef.childCount;\n }\n }\n return references;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugContext_.prototype, \"componentRenderElement\", {\n get: function () {\n var elData = findHostElement(this.elOrCompView);\n return elData ? elData.renderElement : undefined;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugContext_.prototype, \"renderNode\", {\n get: function () {\n return this.nodeDef.flags & 2 /* TypeText */ ? renderNode(this.view, this.nodeDef) :\n renderNode(this.elView, this.elDef);\n },\n enumerable: true,\n configurable: true\n });\n DebugContext_.prototype.logError = function (console) {\n var values = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n values[_i - 1] = arguments[_i];\n }\n var logViewDef;\n var logNodeIndex;\n if (this.nodeDef.flags & 2 /* TypeText */) {\n logViewDef = this.view.def;\n logNodeIndex = this.nodeDef.nodeIndex;\n }\n else {\n logViewDef = this.elView.def;\n logNodeIndex = this.elDef.nodeIndex;\n }\n // Note: we only generate a log function for text and element nodes\n // to make the generated code as small as possible.\n var renderNodeIndex = getRenderNodeIndex(logViewDef, logNodeIndex);\n var currRenderNodeIndex = -1;\n var nodeLogger = function () {\n currRenderNodeIndex++;\n if (currRenderNodeIndex === renderNodeIndex) {\n return (_a = console.error).bind.apply(_a, __spread([console], values));\n }\n else {\n return NOOP;\n }\n var _a;\n };\n logViewDef.factory(nodeLogger);\n if (currRenderNodeIndex < renderNodeIndex) {\n console.error('Illegal state: the ViewDefinitionFactory did not call the logger!');\n console.error.apply(console, __spread(values));\n }\n };\n return DebugContext_;\n}());\nfunction getRenderNodeIndex(viewDef$$1, nodeIndex) {\n var renderNodeIndex = -1;\n for (var i = 0; i <= nodeIndex; i++) {\n var nodeDef = viewDef$$1.nodes[i];\n if (nodeDef.flags & 3 /* CatRenderNode */) {\n renderNodeIndex++;\n }\n }\n return renderNodeIndex;\n}\nfunction findHostElement(view) {\n while (view && !isComponentView(view)) {\n view = (view.parent);\n }\n if (view.parent) {\n return asElementData(view.parent, viewParentEl(view).nodeIndex);\n }\n return null;\n}\nfunction collectReferences(view, nodeDef, references) {\n for (var refName in nodeDef.references) {\n references[refName] = getQueryValue(view, nodeDef, nodeDef.references[refName]);\n }\n}\nfunction callWithDebugContext(action, fn, self, args) {\n var oldAction = _currentAction;\n var oldView = _currentView;\n var oldNodeIndex = _currentNodeIndex;\n try {\n _currentAction = action;\n var result = fn.apply(self, args);\n _currentView = oldView;\n _currentNodeIndex = oldNodeIndex;\n _currentAction = oldAction;\n return result;\n }\n catch (e) {\n if (isViewDebugError(e) || !_currentView) {\n throw e;\n }\n throw viewWrappedDebugError(e, (getCurrentDebugContext()));\n }\n}\nfunction getCurrentDebugContext() {\n return _currentView ? new DebugContext_(_currentView, _currentNodeIndex) : null;\n}\nvar DebugRendererFactory2 = /** @class */ (function () {\n function DebugRendererFactory2(delegate) {\n this.delegate = delegate;\n }\n DebugRendererFactory2.prototype.createRenderer = function (element, renderData) {\n return new DebugRenderer2(this.delegate.createRenderer(element, renderData));\n };\n DebugRendererFactory2.prototype.begin = function () {\n if (this.delegate.begin) {\n this.delegate.begin();\n }\n };\n DebugRendererFactory2.prototype.end = function () {\n if (this.delegate.end) {\n this.delegate.end();\n }\n };\n DebugRendererFactory2.prototype.whenRenderingDone = function () {\n if (this.delegate.whenRenderingDone) {\n return this.delegate.whenRenderingDone();\n }\n return Promise.resolve(null);\n };\n return DebugRendererFactory2;\n}());\nvar DebugRenderer2 = /** @class */ (function () {\n function DebugRenderer2(delegate) {\n this.delegate = delegate;\n this.data = this.delegate.data;\n }\n DebugRenderer2.prototype.destroyNode = function (node) {\n removeDebugNodeFromIndex((getDebugNode(node)));\n if (this.delegate.destroyNode) {\n this.delegate.destroyNode(node);\n }\n };\n DebugRenderer2.prototype.destroy = function () { this.delegate.destroy(); };\n DebugRenderer2.prototype.createElement = function (name, namespace) {\n var el = this.delegate.createElement(name, namespace);\n var debugCtx = getCurrentDebugContext();\n if (debugCtx) {\n var debugEl = new DebugElement(el, null, debugCtx);\n debugEl.name = name;\n indexDebugNode(debugEl);\n }\n return el;\n };\n DebugRenderer2.prototype.createComment = function (value) {\n var comment = this.delegate.createComment(value);\n var debugCtx = getCurrentDebugContext();\n if (debugCtx) {\n indexDebugNode(new DebugNode(comment, null, debugCtx));\n }\n return comment;\n };\n DebugRenderer2.prototype.createText = function (value) {\n var text = this.delegate.createText(value);\n var debugCtx = getCurrentDebugContext();\n if (debugCtx) {\n indexDebugNode(new DebugNode(text, null, debugCtx));\n }\n return text;\n };\n DebugRenderer2.prototype.appendChild = function (parent, newChild) {\n var debugEl = getDebugNode(parent);\n var debugChildEl = getDebugNode(newChild);\n if (debugEl && debugChildEl && debugEl instanceof DebugElement) {\n debugEl.addChild(debugChildEl);\n }\n this.delegate.appendChild(parent, newChild);\n };\n DebugRenderer2.prototype.insertBefore = function (parent, newChild, refChild) {\n var debugEl = getDebugNode(parent);\n var debugChildEl = getDebugNode(newChild);\n var debugRefEl = (getDebugNode(refChild));\n if (debugEl && debugChildEl && debugEl instanceof DebugElement) {\n debugEl.insertBefore(debugRefEl, debugChildEl);\n }\n this.delegate.insertBefore(parent, newChild, refChild);\n };\n DebugRenderer2.prototype.removeChild = function (parent, oldChild) {\n var debugEl = getDebugNode(parent);\n var debugChildEl = getDebugNode(oldChild);\n if (debugEl && debugChildEl && debugEl instanceof DebugElement) {\n debugEl.removeChild(debugChildEl);\n }\n this.delegate.removeChild(parent, oldChild);\n };\n DebugRenderer2.prototype.selectRootElement = function (selectorOrNode) {\n var el = this.delegate.selectRootElement(selectorOrNode);\n var debugCtx = getCurrentDebugContext();\n if (debugCtx) {\n indexDebugNode(new DebugElement(el, null, debugCtx));\n }\n return el;\n };\n DebugRenderer2.prototype.setAttribute = function (el, name, value, namespace) {\n var debugEl = getDebugNode(el);\n if (debugEl && debugEl instanceof DebugElement) {\n var fullName = namespace ? namespace + ':' + name : name;\n debugEl.attributes[fullName] = value;\n }\n this.delegate.setAttribute(el, name, value, namespace);\n };\n DebugRenderer2.prototype.removeAttribute = function (el, name, namespace) {\n var debugEl = getDebugNode(el);\n if (debugEl && debugEl instanceof DebugElement) {\n var fullName = namespace ? namespace + ':' + name : name;\n debugEl.attributes[fullName] = null;\n }\n this.delegate.removeAttribute(el, name, namespace);\n };\n DebugRenderer2.prototype.addClass = function (el, name) {\n var debugEl = getDebugNode(el);\n if (debugEl && debugEl instanceof DebugElement) {\n debugEl.classes[name] = true;\n }\n this.delegate.addClass(el, name);\n };\n DebugRenderer2.prototype.removeClass = function (el, name) {\n var debugEl = getDebugNode(el);\n if (debugEl && debugEl instanceof DebugElement) {\n debugEl.classes[name] = false;\n }\n this.delegate.removeClass(el, name);\n };\n DebugRenderer2.prototype.setStyle = function (el, style, value, flags) {\n var debugEl = getDebugNode(el);\n if (debugEl && debugEl instanceof DebugElement) {\n debugEl.styles[style] = value;\n }\n this.delegate.setStyle(el, style, value, flags);\n };\n DebugRenderer2.prototype.removeStyle = function (el, style, flags) {\n var debugEl = getDebugNode(el);\n if (debugEl && debugEl instanceof DebugElement) {\n debugEl.styles[style] = null;\n }\n this.delegate.removeStyle(el, style, flags);\n };\n DebugRenderer2.prototype.setProperty = function (el, name, value) {\n var debugEl = getDebugNode(el);\n if (debugEl && debugEl instanceof DebugElement) {\n debugEl.properties[name] = value;\n }\n this.delegate.setProperty(el, name, value);\n };\n DebugRenderer2.prototype.listen = function (target, eventName, callback) {\n if (typeof target !== 'string') {\n var debugEl = getDebugNode(target);\n if (debugEl) {\n debugEl.listeners.push(new EventListener(eventName, callback));\n }\n }\n return this.delegate.listen(target, eventName, callback);\n };\n DebugRenderer2.prototype.parentNode = function (node) { return this.delegate.parentNode(node); };\n DebugRenderer2.prototype.nextSibling = function (node) { return this.delegate.nextSibling(node); };\n DebugRenderer2.prototype.setValue = function (node, value) { return this.delegate.setValue(node, value); };\n return DebugRenderer2;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction overrideProvider(override) {\n initServicesIfNeeded();\n return Services.overrideProvider(override);\n}\nfunction overrideComponentView(comp, componentFactory) {\n initServicesIfNeeded();\n return Services.overrideComponentView(comp, componentFactory);\n}\nfunction clearOverrides() {\n initServicesIfNeeded();\n return Services.clearOverrides();\n}\n// Attention: this function is called as top level function.\n// Putting any logic in here will destroy closure tree shaking!\nfunction createNgModuleFactory(ngModuleType, bootstrapComponents, defFactory) {\n return new NgModuleFactory_(ngModuleType, bootstrapComponents, defFactory);\n}\nvar NgModuleFactory_ = /** @class */ (function (_super) {\n __extends(NgModuleFactory_, _super);\n function NgModuleFactory_(moduleType, _bootstrapComponents, _ngModuleDefFactory) {\n var _this = \n // Attention: this ctor is called as top level function.\n // Putting any logic in here will destroy closure tree shaking!\n _super.call(this) || this;\n _this.moduleType = moduleType;\n _this._bootstrapComponents = _bootstrapComponents;\n _this._ngModuleDefFactory = _ngModuleDefFactory;\n return _this;\n }\n NgModuleFactory_.prototype.create = function (parentInjector) {\n initServicesIfNeeded();\n var def = resolveDefinition(this._ngModuleDefFactory);\n return Services.createNgModuleRef(this.moduleType, parentInjector || Injector.NULL, this._bootstrapComponents, def);\n };\n return NgModuleFactory_;\n}(NgModuleFactory));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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// The functions in this file verify that the assumptions we are making\n// about state in an instruction are correct before implementing any logic.\n// They are meant only to be called in dev mode as sanity checks.\n\nfunction assertEqual(actual, expected, msg) {\n if (actual != expected) {\n throwError(msg);\n }\n}\nfunction assertNotEqual(actual, expected, msg) {\n if (actual == expected) {\n throwError(msg);\n }\n}\nfunction assertSame(actual, expected, msg) {\n if (actual !== expected) {\n throwError(msg);\n }\n}\nfunction assertLessThan(actual, expected, msg) {\n if (actual >= expected) {\n throwError(msg);\n }\n}\nfunction assertGreaterThan(actual, expected, msg) {\n if (actual <= expected) {\n throwError(msg);\n }\n}\nfunction assertNull(actual, msg) {\n if (actual != null) {\n throwError(msg);\n }\n}\nfunction assertNotNull(actual, msg) {\n if (actual == null) {\n throwError(msg);\n }\n}\nfunction assertComponentType(actual, msg) {\n if (msg === void 0) { msg = 'Type passed in is not ComponentType, it does not have \\'ngComponentDef\\' property.'; }\n if (!actual.ngComponentDef) {\n throwError(msg);\n }\n}\nfunction throwError(msg) {\n debugger; // Left intentionally for better debugger experience.\n throw new Error(\"ASSERTION ERROR: \" + msg);\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * If this is the first template pass, any ngOnInit or ngDoCheck hooks will be queued into\n * TView.initHooks during directiveCreate.\n *\n * The directive index and hook type are encoded into one number (1st bit: type, remaining bits:\n * directive index), then saved in the even indices of the initHooks array. The odd indices\n * hold the hook functions themselves.\n *\n * @param index The index of the directive in LView.data\n * @param hooks The static hooks map on the directive def\n * @param tView The current TView\n */\nfunction queueInitHooks(index, onInit, doCheck, tView) {\n ngDevMode &&\n assertEqual(tView.firstTemplatePass, true, 'Should only be called on first template pass');\n if (onInit) {\n (tView.initHooks || (tView.initHooks = [])).push(index, onInit);\n }\n if (doCheck) {\n (tView.initHooks || (tView.initHooks = [])).push(index, doCheck);\n (tView.checkHooks || (tView.checkHooks = [])).push(index, doCheck);\n }\n}\n/**\n * Loops through the directives on a node and queues all their hooks except ngOnInit\n * and ngDoCheck, which are queued separately in directiveCreate.\n */\nfunction queueLifecycleHooks(flags, currentView) {\n var tView = currentView.tView;\n if (tView.firstTemplatePass === true) {\n var start = flags >> 13;\n var count = flags & 4095;\n var end = start + count;\n // It's necessary to loop through the directives at elementEnd() (rather than processing in\n // directiveCreate) so we can preserve the current hook order. Content, view, and destroy\n // hooks for projected components and directives must be called *before* their hosts.\n for (var i = start; i < end; i++) {\n var def = tView.directives[i];\n queueContentHooks(def, tView, i);\n queueViewHooks(def, tView, i);\n queueDestroyHooks(def, tView, i);\n }\n }\n}\n/** Queues afterContentInit and afterContentChecked hooks on TView */\nfunction queueContentHooks(def, tView, i) {\n if (def.afterContentInit) {\n (tView.contentHooks || (tView.contentHooks = [])).push(i, def.afterContentInit);\n }\n if (def.afterContentChecked) {\n (tView.contentHooks || (tView.contentHooks = [])).push(i, def.afterContentChecked);\n (tView.contentCheckHooks || (tView.contentCheckHooks = [])).push(i, def.afterContentChecked);\n }\n}\n/** Queues afterViewInit and afterViewChecked hooks on TView */\nfunction queueViewHooks(def, tView, i) {\n if (def.afterViewInit) {\n (tView.viewHooks || (tView.viewHooks = [])).push(i, def.afterViewInit);\n }\n if (def.afterViewChecked) {\n (tView.viewHooks || (tView.viewHooks = [])).push(i, def.afterViewChecked);\n (tView.viewCheckHooks || (tView.viewCheckHooks = [])).push(i, def.afterViewChecked);\n }\n}\n/** Queues onDestroy hooks on TView */\nfunction queueDestroyHooks(def, tView, i) {\n if (def.onDestroy != null) {\n (tView.destroyHooks || (tView.destroyHooks = [])).push(i, def.onDestroy);\n }\n}\n/**\n * Calls onInit and doCheck calls if they haven't already been called.\n *\n * @param currentView The current view\n */\nfunction executeInitHooks(currentView, tView, creationMode) {\n if (currentView.lifecycleStage === 1 /* Init */) {\n executeHooks((currentView.directives), tView.initHooks, tView.checkHooks, creationMode);\n currentView.lifecycleStage = 2 /* AfterInit */;\n }\n}\n/**\n * Iterates over afterViewInit and afterViewChecked functions and calls them.\n *\n * @param currentView The current view\n */\nfunction executeHooks(data, allHooks, checkHooks, creationMode) {\n var hooksToCall = creationMode ? allHooks : checkHooks;\n if (hooksToCall) {\n callHooks(data, hooksToCall);\n }\n}\n/**\n * Calls lifecycle hooks with their contexts, skipping init hooks if it's not\n * creation mode.\n *\n * @param currentView The current view\n * @param arr The array in which the hooks are found\n */\nfunction callHooks(data, arr) {\n for (var i = 0; i < arr.length; i += 2) {\n arr[i + 1].call(data[arr[i]]);\n }\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nif (typeof ngDevMode == 'undefined') {\n if (typeof window != 'undefined')\n window.ngDevMode = true;\n if (typeof self != 'undefined')\n self.ngDevMode = true;\n if (typeof global != 'undefined')\n global.ngDevMode = true;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar NG_PROJECT_AS_ATTR_NAME = 'ngProjectAs';\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction assertNodeType(node, type) {\n assertNotNull(node, 'should be called with a node');\n assertEqual(node.type, type, \"should be a \" + typeName(type));\n}\nfunction assertNodeOfPossibleTypes(node) {\n var types = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n types[_i - 1] = arguments[_i];\n }\n assertNotNull(node, 'should be called with a node');\n var found = types.some(function (type) { return node.type === type; });\n assertEqual(found, true, \"Should be one of \" + types.map(typeName).join(', '));\n}\nfunction typeName(type) {\n if (type == 1 /* Projection */)\n return 'Projection';\n if (type == 0 /* Container */)\n return 'Container';\n if (type == 2 /* View */)\n return 'View';\n if (type == 3 /* Element */)\n return 'Element';\n return '<unknown>';\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// TODO: cleanup once the code is merged in angular/angular\n// TODO: cleanup once the code is merged in angular/angular\nvar RendererStyleFlags3;\n// TODO: cleanup once the code is merged in angular/angular\n(function (RendererStyleFlags3) {\n RendererStyleFlags3[RendererStyleFlags3[\"Important\"] = 1] = \"Important\";\n RendererStyleFlags3[RendererStyleFlags3[\"DashCase\"] = 2] = \"DashCase\";\n})(RendererStyleFlags3 || (RendererStyleFlags3 = {}));\n/** Returns whether the `renderer` is a `ProceduralRenderer3` */\nfunction isProceduralRenderer(renderer) {\n return !!(renderer.listen);\n}\nvar domRendererFactory3 = {\n createRenderer: function (hostElement, rendererType) { return document; }\n};\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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* Must use this method for CD (instead of === ) since NaN !== NaN\n*/\nfunction isDifferent(a, b) {\n // NaN is the only value that is not equal to itself so the first\n // test checks if both a and b are not NaN\n return !(a !== a && b !== b) && a !== b;\n}\nfunction stringify$1(value) {\n if (typeof value == 'function')\n return value.name || value;\n if (typeof value == 'string')\n return value;\n if (value == null)\n return '';\n return '' + value;\n}\n/**\n * Function that throws a \"not implemented\" error so it's clear certain\n * behaviors/methods aren't yet ready.\n *\n * @returns Not implemented error\n */\nfunction notImplemented() {\n return new Error('NotImplemented');\n}\n/**\n * Flattens an array in non-recursive way. Input arrays are not modified.\n */\nfunction flatten$1(list) {\n var result = [];\n var i = 0;\n while (i < list.length) {\n var item = list[i];\n if (Array.isArray(item)) {\n if (item.length > 0) {\n list = item.concat(list.slice(i + 1));\n i = 0;\n }\n else {\n i++;\n }\n }\n else {\n result.push(item);\n i++;\n }\n }\n return result;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Returns the first RNode following the given LNode in the same parent DOM element.\n *\n * This is needed in order to insert the given node with insertBefore.\n *\n * @param node The node whose following DOM node must be found.\n * @param stopNode A parent node at which the lookup in the tree should be stopped, or null if the\n * lookup should not be stopped until the result is found.\n * @returns RNode before which the provided node should be inserted or null if the lookup was\n * stopped\n * or if there is no native node after the given logical node in the same native parent.\n */\nfunction findNextRNodeSibling(node, stopNode) {\n var currentNode = node;\n while (currentNode && currentNode !== stopNode) {\n var pNextOrParent = currentNode.pNextOrParent;\n if (pNextOrParent) {\n while (pNextOrParent.type !== 1 /* Projection */) {\n var nativeNode = findFirstRNode(pNextOrParent);\n if (nativeNode) {\n return nativeNode;\n }\n pNextOrParent = (pNextOrParent.pNextOrParent);\n }\n currentNode = pNextOrParent;\n }\n else {\n var currentSibling = currentNode.next;\n while (currentSibling) {\n var nativeNode = findFirstRNode(currentSibling);\n if (nativeNode) {\n return nativeNode;\n }\n currentSibling = currentSibling.next;\n }\n var parentNode = currentNode.parent;\n currentNode = null;\n if (parentNode) {\n var parentType = parentNode.type;\n if (parentType === 0 /* Container */ || parentType === 2 /* View */) {\n currentNode = parentNode;\n }\n }\n }\n }\n return null;\n}\n/**\n * Get the next node in the LNode tree, taking into account the place where a node is\n * projected (in the shadow DOM) rather than where it comes from (in the light DOM).\n *\n * @param node The node whose next node in the LNode tree must be found.\n * @return LNode|null The next sibling in the LNode tree.\n */\nfunction getNextLNodeWithProjection(node) {\n var pNextOrParent = node.pNextOrParent;\n if (pNextOrParent) {\n // The node is projected\n var isLastProjectedNode = pNextOrParent.type === 1;\n // returns pNextOrParent if we are not at the end of the list, null otherwise\n return isLastProjectedNode ? null : pNextOrParent;\n }\n // returns node.next because the the node is not projected\n return node.next;\n}\n/**\n * Find the next node in the LNode tree, taking into account the place where a node is\n * projected (in the shadow DOM) rather than where it comes from (in the light DOM).\n *\n * If there is no sibling node, this function goes to the next sibling of the parent node...\n * until it reaches rootNode (at which point null is returned).\n *\n * @param initialNode The node whose following node in the LNode tree must be found.\n * @param rootNode The root node at which the lookup should stop.\n * @return LNode|null The following node in the LNode tree.\n */\nfunction getNextOrParentSiblingNode(initialNode, rootNode) {\n var node = initialNode;\n var nextNode = getNextLNodeWithProjection(node);\n while (node && !nextNode) {\n // if node.pNextOrParent is not null here, it is not the next node\n // (because, at this point, nextNode is null, so it is the parent)\n node = node.pNextOrParent || node.parent;\n if (node === rootNode) {\n return null;\n }\n nextNode = node && getNextLNodeWithProjection(node);\n }\n return nextNode;\n}\n/**\n * Returns the first RNode inside the given LNode.\n *\n * @param node The node whose first DOM node must be found\n * @returns RNode The first RNode of the given LNode or null if there is none.\n */\nfunction findFirstRNode(rootNode) {\n var node = rootNode;\n while (node) {\n var nextNode = null;\n if (node.type === 3 /* Element */) {\n // A LElementNode has a matching RNode in LElementNode.native\n return node.native;\n }\n else if (node.type === 0 /* Container */) {\n var lContainerNode = node;\n var childContainerData = lContainerNode.dynamicLContainerNode ?\n lContainerNode.dynamicLContainerNode.data :\n lContainerNode.data;\n nextNode = childContainerData.views.length ? childContainerData.views[0].child : null;\n }\n else if (node.type === 1 /* Projection */) {\n // For Projection look at the first projected node\n nextNode = node.data.head;\n }\n else {\n // Otherwise look at the first child\n nextNode = node.child;\n }\n node = nextNode === null ? getNextOrParentSiblingNode(node, rootNode) : nextNode;\n }\n return null;\n}\nfunction createTextNode(value, renderer) {\n return isProceduralRenderer(renderer) ? renderer.createText(stringify$1(value)) :\n renderer.createTextNode(stringify$1(value));\n}\nfunction addRemoveViewFromContainer(container, rootNode, insertMode, beforeNode) {\n ngDevMode && assertNodeType(container, 0 /* Container */);\n ngDevMode && assertNodeType(rootNode, 2 /* View */);\n var parentNode = container.data.renderParent;\n var parent = parentNode ? parentNode.native : null;\n var node = rootNode.child;\n if (parent) {\n while (node) {\n var nextNode = null;\n var renderer = container.view.renderer;\n if (node.type === 3 /* Element */) {\n if (insertMode) {\n if (!node.native) {\n // If the native element doesn't exist, this is a bound text node that hasn't yet been\n // created because update mode has not run (occurs when a bound text node is a root\n // node of a dynamically created view). See textBinding() in instructions for ctx.\n // If the native element doesn't exist, this is a bound text node that hasn't yet been\n // created because update mode has not run (occurs when a bound text node is a root\n // node of a dynamically created view). See textBinding() in instructions for ctx.\n node.native = createTextNode('', renderer);\n }\n isProceduralRenderer(renderer) ?\n renderer.insertBefore(parent, (node.native), beforeNode) :\n parent.insertBefore((node.native), beforeNode, true);\n }\n else {\n isProceduralRenderer(renderer) ? renderer.removeChild(parent, (node.native)) :\n parent.removeChild((node.native));\n }\n nextNode = node.next;\n }\n else if (node.type === 0 /* Container */) {\n // if we get to a container, it must be a root node of a view because we are only\n // propagating down into child views / containers and not child elements\n var childContainerData = node.data;\n childContainerData.renderParent = parentNode;\n nextNode = childContainerData.views.length ? childContainerData.views[0].child : null;\n }\n else if (node.type === 1 /* Projection */) {\n nextNode = node.data.head;\n }\n else {\n nextNode = node.child;\n }\n if (nextNode === null) {\n node = getNextOrParentSiblingNode(node, rootNode);\n }\n else {\n node = nextNode;\n }\n }\n }\n}\n/**\n * Traverses the tree of component views and containers to remove listeners and\n * call onDestroy callbacks.\n *\n * Notes:\n * - Because it's used for onDestroy calls, it needs to be bottom-up.\n * - Must process containers instead of their views to avoid splicing\n * when views are destroyed and re-added.\n * - Using a while loop because it's faster than recursion\n * - Destroy only called on movement to sibling or movement to parent (laterally or up)\n *\n * @param rootView The view to destroy\n */\nfunction destroyViewTree(rootView) {\n var viewOrContainer = rootView;\n while (viewOrContainer) {\n var next = null;\n if (viewOrContainer.views && viewOrContainer.views.length) {\n next = viewOrContainer.views[0].data;\n }\n else if (viewOrContainer.child) {\n next = viewOrContainer.child;\n }\n else if (viewOrContainer.next) {\n cleanUpView(viewOrContainer);\n next = viewOrContainer.next;\n }\n if (next == null) {\n // If the viewOrContainer is the rootView, then the cleanup is done twice.\n // Without this check, ngOnDestroy would be called twice for a directive on an element.\n while (viewOrContainer && !viewOrContainer.next && viewOrContainer !== rootView) {\n cleanUpView(viewOrContainer);\n viewOrContainer = getParentState(viewOrContainer, rootView);\n }\n cleanUpView(viewOrContainer || rootView);\n next = viewOrContainer && viewOrContainer.next;\n }\n viewOrContainer = next;\n }\n}\n/**\n * Inserts a view into a container.\n *\n * This adds the view to the container's array of active views in the correct\n * position. It also adds the view's elements to the DOM if the container isn't a\n * root node of another view (in that case, the view's elements will be added when\n * the container's parent view is added later).\n *\n * @param container The container into which the view should be inserted\n * @param newView The view to insert\n * @param index The index at which to insert the view\n * @returns The inserted view\n */\nfunction insertView(container, newView, index) {\n var state = container.data;\n var views = state.views;\n if (index > 0) {\n // This is a new view, we need to add it to the children.\n setViewNext(views[index - 1], newView);\n }\n if (index < views.length) {\n setViewNext(newView, views[index]);\n views.splice(index, 0, newView);\n }\n else {\n views.push(newView);\n }\n // If the container's renderParent is null, we know that it is a root node of its own parent view\n // and we should wait until that parent processes its nodes (otherwise, we will insert this view's\n // nodes twice - once now and once when its parent inserts its views).\n if (container.data.renderParent !== null) {\n var beforeNode = findNextRNodeSibling(newView, container);\n if (!beforeNode) {\n var containerNextNativeNode = container.native;\n if (containerNextNativeNode === undefined) {\n containerNextNativeNode = container.native = findNextRNodeSibling(container, null);\n }\n beforeNode = containerNextNativeNode;\n }\n addRemoveViewFromContainer(container, newView, true, beforeNode);\n }\n return newView;\n}\n/**\n * Removes a view from a container.\n *\n * This method splices the view from the container's array of active views. It also\n * removes the view's elements from the DOM and conducts cleanup (e.g. removing\n * listeners, calling onDestroys).\n *\n * @param container The container from which to remove a view\n * @param removeIndex The index of the view to remove\n * @returns The removed view\n */\nfunction removeView(container, removeIndex) {\n var views = container.data.views;\n var viewNode = views[removeIndex];\n if (removeIndex > 0) {\n setViewNext(views[removeIndex - 1], viewNode.next);\n }\n views.splice(removeIndex, 1);\n viewNode.next = null;\n destroyViewTree(viewNode.data);\n addRemoveViewFromContainer(container, viewNode, false);\n // Notify query that view has been removed\n container.data.queries && container.data.queries.removeView(removeIndex);\n return viewNode;\n}\n/**\n * Sets a next on the view node, so views in for loops can easily jump from\n * one view to the next to add/remove elements. Also adds the LView (view.data)\n * to the view tree for easy traversal when cleaning up the view.\n *\n * @param view The view to set up\n * @param next The view's new next\n */\nfunction setViewNext(view, next) {\n view.next = next;\n view.data.next = next ? next.data : null;\n}\n/**\n * Determines which LViewOrLContainer to jump to when traversing back up the\n * tree in destroyViewTree.\n *\n * Normally, the view's parent LView should be checked, but in the case of\n * embedded views, the container (which is the view node's parent, but not the\n * LView's parent) needs to be checked for a possible next property.\n *\n * @param state The LViewOrLContainer for which we need a parent state\n * @param rootView The rootView, so we don't propagate too far up the view tree\n * @returns The correct parent LViewOrLContainer\n */\nfunction getParentState(state, rootView) {\n var node;\n if ((node = state.node) && node.type === 2 /* View */) {\n // if it's an embedded view, the state needs to go up to the container, in case the\n // container has a next\n return node.parent.data;\n }\n else {\n // otherwise, use parent view for containers or component views\n return state.parent === rootView ? null : state.parent;\n }\n}\n/**\n * Removes all listeners and call all onDestroys in a given view.\n *\n * @param view The LView to clean up\n */\nfunction cleanUpView(view) {\n removeListeners(view);\n executeOnDestroys(view);\n executePipeOnDestroys(view);\n}\n/** Removes listeners and unsubscribes from output subscriptions */\nfunction removeListeners(view) {\n var cleanup = (view.cleanup);\n if (cleanup != null) {\n for (var i = 0; i < cleanup.length - 1; i += 2) {\n if (typeof cleanup[i] === 'string') {\n cleanup[i + 1].removeEventListener(cleanup[i], cleanup[i + 2], cleanup[i + 3]);\n i += 2;\n }\n else {\n cleanup[i].call(cleanup[i + 1]);\n }\n }\n view.cleanup = null;\n }\n}\n/** Calls onDestroy hooks for this view */\nfunction executeOnDestroys(view) {\n var tView = view.tView;\n var destroyHooks;\n if (tView != null && (destroyHooks = tView.destroyHooks) != null) {\n callHooks((view.directives), destroyHooks);\n }\n}\n/** Calls pipe destroy hooks for this view */\nfunction executePipeOnDestroys(view) {\n var pipeDestroyHooks = view.tView && view.tView.pipeDestroyHooks;\n if (pipeDestroyHooks) {\n callHooks((view.data), pipeDestroyHooks);\n }\n}\n/**\n * Returns whether a native element should be inserted in the given parent.\n *\n * The native node can be inserted when its parent is:\n * - A regular element => Yes\n * - A component host element =>\n * - if the `currentView` === the parent `view`: The element is in the content (vs the\n * template)\n * => don't add as the parent component will project if needed.\n * - `currentView` !== the parent `view` => The element is in the template (vs the content),\n * add it\n * - View element => delay insertion, will be done on `viewEnd()`\n *\n * @param parent The parent in which to insert the child\n * @param currentView The LView being processed\n * @return boolean Whether the child element should be inserted.\n */\nfunction canInsertNativeNode(parent, currentView) {\n var parentIsElement = parent.type === 3;\n return parentIsElement &&\n (parent.view !== currentView || parent.data === null /* Regular Element. */);\n}\n/**\n * Appends the `child` element to the `parent`.\n *\n * The element insertion might be delayed {@link canInsertNativeNode}\n *\n * @param parent The parent to which to append the child\n * @param child The child that should be appended\n * @param currentView The current LView\n * @returns Whether or not the child was appended\n */\nfunction appendChild(parent, child, currentView) {\n if (child !== null && canInsertNativeNode(parent, currentView)) {\n // We only add element if not in View or not projected.\n var renderer = currentView.renderer;\n isProceduralRenderer(renderer) ? renderer.appendChild(parent.native, child) :\n parent.native.appendChild(child);\n return true;\n }\n return false;\n}\n/**\n * Inserts the provided node before the correct element in the DOM.\n *\n * The element insertion might be delayed {@link canInsertNativeNode}\n *\n * @param node Node to insert\n * @param currentView Current LView\n */\nfunction insertChild(node, currentView) {\n var parent = (node.parent);\n if (canInsertNativeNode(parent, currentView)) {\n var nativeSibling = findNextRNodeSibling(node, null);\n var renderer = currentView.renderer;\n isProceduralRenderer(renderer) ?\n renderer.insertBefore((parent.native), (node.native), nativeSibling) :\n parent.native.insertBefore((node.native), nativeSibling, false);\n }\n}\n/**\n * Appends a projected node to the DOM, or in the case of a projected container,\n * appends the nodes from all of the container's active views to the DOM.\n *\n * @param node The node to process\n * @param currentParent The last parent element to be processed\n * @param currentView Current LView\n */\nfunction appendProjectedNode(node, currentParent, currentView) {\n if (node.type !== 0 /* Container */) {\n appendChild(currentParent, node.native, currentView);\n }\n else {\n // The node we are adding is a Container and we are adding it to Element which\n // is not a component (no more re-projection).\n // Alternatively a container is projected at the root of a component's template\n // and can't be re-projected (as not content of any component).\n // Assignee the final projection location in those cases.\n var lContainer = node.data;\n lContainer.renderParent = currentParent;\n var views = lContainer.views;\n for (var i = 0; i < views.length; i++) {\n addRemoveViewFromContainer(node, views[i], true, null);\n }\n }\n if (node.dynamicLContainerNode) {\n node.dynamicLContainerNode.data.renderParent = currentParent;\n }\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction isCssClassMatching(nodeClassAttrVal, cssClassToMatch) {\n var nodeClassesLen = nodeClassAttrVal.length;\n var matchIndex = nodeClassAttrVal.indexOf(cssClassToMatch);\n var matchEndIdx = matchIndex + cssClassToMatch.length;\n if (matchIndex === -1 // no match\n || (matchIndex > 0 && nodeClassAttrVal[matchIndex - 1] !== ' ') // no space before\n ||\n (matchEndIdx < nodeClassesLen && nodeClassAttrVal[matchEndIdx] !== ' ')) {\n return false;\n }\n return true;\n}\n/**\n * A utility function to match an Ivy node static data against a simple CSS selector\n *\n * @param node static data to match\n * @param selector\n * @returns true if node matches the selector.\n */\nfunction isNodeMatchingSelector(tNode, selector) {\n ngDevMode && assertNotNull(selector[0], 'Selector should have a tag name');\n var mode = 4;\n var nodeAttrs = (tNode.attrs);\n // When processing \":not\" selectors, we skip to the next \":not\" if the\n // current one doesn't match\n var skipToNextSelector = false;\n for (var i = 0; i < selector.length; i++) {\n var current = selector[i];\n if (typeof current === 'number') {\n // If we finish processing a :not selector and it hasn't failed, return false\n if (!skipToNextSelector && !isPositive(mode) && !isPositive(current)) {\n return false;\n }\n // If we are skipping to the next :not() and this mode flag is positive,\n // it's a part of the current :not() selector, and we should keep skipping\n if (skipToNextSelector && isPositive(current))\n continue;\n skipToNextSelector = false;\n mode = current | (mode & 1 /* NOT */);\n continue;\n }\n if (skipToNextSelector)\n continue;\n if (mode & 4 /* ELEMENT */) {\n mode = 2 /* ATTRIBUTE */ | mode & 1 /* NOT */;\n if (current !== '' && current !== tNode.tagName) {\n if (isPositive(mode))\n return false;\n skipToNextSelector = true;\n }\n }\n else {\n var attrName = mode & 8 /* CLASS */ ? 'class' : current;\n var attrIndexInNode = findAttrIndexInNode(attrName, nodeAttrs);\n if (attrIndexInNode === -1) {\n if (isPositive(mode))\n return false;\n skipToNextSelector = true;\n continue;\n }\n var selectorAttrValue = mode & 8 /* CLASS */ ? current : selector[++i];\n if (selectorAttrValue !== '') {\n var nodeAttrValue = nodeAttrs[attrIndexInNode + 1];\n if (mode & 8 /* CLASS */ &&\n !isCssClassMatching(nodeAttrValue, selectorAttrValue) ||\n mode & 2 /* ATTRIBUTE */ && selectorAttrValue !== nodeAttrValue) {\n if (isPositive(mode))\n return false;\n skipToNextSelector = true;\n }\n }\n }\n }\n return isPositive(mode) || skipToNextSelector;\n}\nfunction isPositive(mode) {\n return (mode & 1 /* NOT */) === 0;\n}\nfunction findAttrIndexInNode(name, attrs) {\n if (attrs === null)\n return -1;\n for (var i = 0; i < attrs.length; i += 2) {\n if (attrs[i] === name)\n return i;\n }\n return -1;\n}\nfunction isNodeMatchingSelectorList(tNode, selector) {\n for (var i = 0; i < selector.length; i++) {\n if (isNodeMatchingSelector(tNode, selector[i])) {\n return true;\n }\n }\n return false;\n}\nfunction getProjectAsAttrValue(tNode) {\n var nodeAttrs = tNode.attrs;\n if (nodeAttrs != null) {\n var ngProjectAsAttrIdx = nodeAttrs.indexOf(NG_PROJECT_AS_ATTR_NAME);\n // only check for ngProjectAs in attribute names, don't accidentally match attribute's value\n // (attribute names are stored at even indexes)\n if ((ngProjectAsAttrIdx & 1) === 0) {\n return nodeAttrs[ngProjectAsAttrIdx + 1];\n }\n }\n return null;\n}\n/**\n * Checks a given node against matching selectors and returns\n * selector index (or 0 if none matched).\n *\n * This function takes into account the ngProjectAs attribute: if present its value will be compared\n * to the raw (un-parsed) CSS selector instead of using standard selector matching logic.\n */\nfunction matchingSelectorIndex(tNode, selectors, textSelectors) {\n var ngProjectAsAttrVal = getProjectAsAttrValue(tNode);\n for (var i = 0; i < selectors.length; i++) {\n // if a node has the ngProjectAs attribute match it against unparsed selector\n // match a node against a parsed selector only if ngProjectAs attribute is not present\n if (ngProjectAsAttrVal === textSelectors[i] ||\n ngProjectAsAttrVal === null && isNodeMatchingSelectorList(tNode, selectors[i])) {\n return i + 1; // first matching selector \"captures\" a given node\n }\n }\n return 0;\n}\n\n/** Called when directives inject each other (creating a circular dependency) */\nfunction throwCyclicDependencyError(token) {\n throw new Error(\"Cannot instantiate cyclic dependency! \" + token);\n}\n/** Called when there are multiple component selectors that match a given node */\nfunction throwMultipleComponentError(tNode) {\n throw new Error(\"Multiple components match node with tagname \" + tNode.tagName);\n}\n/** Throws an ExpressionChangedAfterChecked error if checkNoChanges mode is on. */\nfunction throwErrorIfNoChangesMode(creationMode, checkNoChangesMode, oldValue, currValue) {\n if (checkNoChangesMode) {\n var msg = \"ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: '\" + oldValue + \"'. Current value: '\" + currValue + \"'.\";\n if (creationMode) {\n msg +=\n \" It seems like the view has been created after its parent and its children have been dirty checked.\" +\n \" Has it been created in a change detection hook ?\";\n }\n // TODO: include debug context\n throw new Error(msg);\n }\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * Directive (D) sets a property on all component instances using this constant as a key and the\n * component's host node (LElement) as the value. This is used in methods like detectChanges to\n * facilitate jumping from an instance to the host node.\n */\nvar NG_HOST_SYMBOL = '__ngHostLNode__';\n/**\n * A permanent marker promise which signifies that the current CD tree is\n * clean.\n */\nvar _CLEAN_PROMISE = Promise.resolve(null);\n/**\n * Directive and element indices for top-level directive.\n *\n * Saved here to avoid re-instantiating an array on every change detection run.\n */\nvar _ROOT_DIRECTIVE_INDICES = [0, 0];\n/**\n * Token set in currentMatches while dependencies are being resolved.\n *\n * If we visit a directive that has a value set to CIRCULAR, we know we've\n * already seen it, and thus have a circular dependency.\n */\nvar CIRCULAR$2 = '__CIRCULAR__';\n/**\n * This property gets set before entering a template.\n *\n * This renderer can be one of two varieties of Renderer3:\n *\n * - ObjectedOrientedRenderer3\n *\n * This is the native browser API style, e.g. operations are methods on individual objects\n * like HTMLElement. With this style, no additional code is needed as a facade (reducing payload\n * size).\n *\n * - ProceduralRenderer3\n *\n * In non-native browser environments (e.g. platforms such as web-workers), this is the facade\n * that enables element manipulation. This also facilitates backwards compatibility with\n * Renderer2.\n */\nvar renderer;\nvar rendererFactory;\nfunction getRenderer() {\n // top level variables should not be exported for performance reason (PERF_NOTES.md)\n return renderer;\n}\n/** Used to set the parent property when nodes are created. */\nvar previousOrParentNode;\nfunction getPreviousOrParentNode() {\n // top level variables should not be exported for performance reason (PERF_NOTES.md)\n return previousOrParentNode;\n}\n/**\n * If `isParent` is:\n * - `true`: then `previousOrParentNode` points to a parent node.\n * - `false`: then `previousOrParentNode` points to previous node (sibling).\n */\nvar isParent;\n/**\n * Static data that corresponds to the instance-specific data array on an LView.\n *\n * Each node's static data is stored in tData at the same index that it's stored\n * in the data array. Any nodes that do not have static data store a null value in\n * tData to avoid a sparse array.\n */\nvar tData;\n/**\n * State of the current view being processed.\n *\n * NOTE: we cheat here and initialize it to `null` even thought the type does not\n * contain `null`. This is because we expect this value to be not `null` as soon\n * as we enter the view. Declaring the type as `null` would require us to place `!`\n * in most instructions since they all assume that `currentView` is defined.\n */\nvar currentView = (null);\nvar currentQueries;\nfunction getCurrentQueries(QueryType) {\n // top level variables should not be exported for performance reason (PERF_NOTES.md)\n return currentQueries || (currentQueries = new QueryType());\n}\n/**\n * This property gets set before entering a template.\n */\nvar creationMode;\nfunction getCreationMode() {\n // top level variables should not be exported for performance reason (PERF_NOTES.md)\n return creationMode;\n}\n/**\n * An array of nodes (text, element, container, etc), pipes, their bindings, and\n * any local variables that need to be stored between invocations.\n */\nvar data;\n/**\n * An array of directive instances in the current view.\n *\n * These must be stored separately from LNodes because their presence is\n * unknown at compile-time and thus space cannot be reserved in data[].\n */\nvar directives;\n/**\n * When a view is destroyed, listeners need to be released and outputs need to be\n * unsubscribed. This cleanup array stores both listener data (in chunks of 4)\n * and output data (in chunks of 2) for a particular view. Combining the arrays\n * saves on memory (70 bytes per array) and on a few bytes of code size (for two\n * separate for loops).\n *\n * If it's a listener being stored:\n * 1st index is: event name to remove\n * 2nd index is: native element\n * 3rd index is: listener function\n * 4th index is: useCapture boolean\n *\n * If it's an output subscription:\n * 1st index is: unsubscribe function\n * 2nd index is: context for function\n */\nvar cleanup;\n/**\n * In this mode, any changes in bindings will throw an ExpressionChangedAfterChecked error.\n *\n * Necessary to support ChangeDetectorRef.checkNoChanges().\n */\nvar checkNoChangesMode = false;\n/** Whether or not this is the first time the current view has been processed. */\nvar firstTemplatePass = true;\n/**\n * Swap the current state with a new state.\n *\n * For performance reasons we store the state 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 state for later, and when the view is\n * exited the state has to be restored\n *\n * @param newView New state to become active\n * @param host Element to which the View is a child of\n * @returns the previous state;\n */\nfunction enterView(newView, host) {\n var oldView = currentView;\n data = newView && newView.data;\n directives = newView && newView.directives;\n tData = newView && newView.tView.data;\n creationMode = newView && (newView.flags & 1 /* CreationMode */) === 1 /* CreationMode */;\n firstTemplatePass = newView && newView.tView.firstTemplatePass;\n cleanup = newView && newView.cleanup;\n renderer = newView && newView.renderer;\n if (newView && newView.bindingIndex < 0) {\n newView.bindingIndex = newView.bindingStartIndex;\n }\n if (host != null) {\n previousOrParentNode = host;\n isParent = true;\n }\n currentView = newView;\n currentQueries = newView && newView.queries;\n return oldView;\n}\n/**\n * Used in lieu of enterView to make it clear when we are exiting a child view. This makes\n * the direction of traversal (up or down the view tree) a bit clearer.\n */\nfunction leaveView(newView) {\n if (!checkNoChangesMode) {\n executeHooks((directives), currentView.tView.viewHooks, currentView.tView.viewCheckHooks, creationMode);\n }\n // Views should be clean and in update mode after being checked, so these bits are cleared\n currentView.flags &= ~(1 /* CreationMode */ | 4 /* Dirty */);\n currentView.lifecycleStage = 1 /* Init */;\n currentView.bindingIndex = -1;\n enterView(newView, null);\n}\n/** Refreshes directives in this view and triggers any init/content hooks. */\nfunction refreshDirectives() {\n executeInitAndContentHooks();\n var tView = currentView.tView;\n // This needs to be set before children are processed to support recursive components\n tView.firstTemplatePass = firstTemplatePass = false;\n setHostBindings(tView.hostBindings);\n refreshChildComponents(tView.components);\n}\n/** Sets the host bindings for the current view. */\nfunction setHostBindings(bindings) {\n if (bindings != null) {\n var defs = (currentView.tView.directives);\n for (var i = 0; i < bindings.length; i += 2) {\n var dirIndex = bindings[i];\n var def = defs[dirIndex];\n def.hostBindings && def.hostBindings(dirIndex, bindings[i + 1]);\n }\n }\n}\n/** Refreshes child components in the current view. */\nfunction refreshChildComponents(components) {\n if (components != null) {\n for (var i = 0; i < components.length; i += 2) {\n componentRefresh(components[i], components[i + 1]);\n }\n }\n}\nfunction executeInitAndContentHooks() {\n if (!checkNoChangesMode) {\n var tView = currentView.tView;\n executeInitHooks(currentView, tView, creationMode);\n executeHooks((directives), tView.contentHooks, tView.contentCheckHooks, creationMode);\n }\n}\nfunction createLView(viewId, renderer, tView, template, context, flags) {\n var newView = {\n parent: currentView,\n id: viewId,\n // -1 for component views\n flags: flags | 1 /* CreationMode */ | 8 /* Attached */,\n node: (null),\n // until we initialize it in createNode.\n data: [],\n directives: null,\n tView: tView,\n cleanup: null,\n renderer: renderer,\n child: null,\n tail: null,\n next: null,\n bindingStartIndex: -1,\n bindingIndex: -1,\n template: template,\n context: context,\n dynamicViewCount: 0,\n lifecycleStage: 1 /* Init */,\n queries: null,\n injector: currentView && currentView.injector,\n };\n return newView;\n}\n/**\n * Creation of LNode object is extracted to a separate function so we always create LNode object\n * with the same shape\n * (same properties assigned in the same order).\n */\nfunction createLNodeObject(type, currentView, parent, native, state, queries) {\n return {\n type: type,\n native: native,\n view: currentView,\n parent: parent,\n child: null,\n next: null,\n nodeInjector: parent ? parent.nodeInjector : null,\n data: state,\n queries: queries,\n tNode: null,\n pNextOrParent: null,\n dynamicLContainerNode: null\n };\n}\nfunction createLNode(index, type, native, state) {\n var parent = isParent ? previousOrParentNode :\n previousOrParentNode && previousOrParentNode.parent;\n var queries = (isParent ? currentQueries : previousOrParentNode && previousOrParentNode.queries) ||\n parent && parent.queries && parent.queries.child();\n var isState = state != null;\n var node = createLNodeObject(type, currentView, parent, native, isState ? state : null, queries);\n if ((type & 2 /* ViewOrElement */) === 2 /* ViewOrElement */ && isState) {\n // Bit of a hack to bust through the readonly because there is a circular dep between\n // LView and LNode.\n ngDevMode && assertNull(state.node, 'LView.node should not have been initialized');\n state.node = node;\n }\n if (index != null) {\n // We are Element or Container\n ngDevMode && assertDataNext(index);\n data[index] = node;\n // Every node adds a value to the static data array to avoid a sparse array\n if (index >= tData.length) {\n tData[index] = null;\n }\n else {\n node.tNode = tData[index];\n }\n // Now link ourselves into the tree.\n if (isParent) {\n currentQueries = null;\n if (previousOrParentNode.view === currentView ||\n previousOrParentNode.type === 2 /* View */) {\n // We are in the same view, which means we are adding content node to the parent View.\n ngDevMode && assertNull(previousOrParentNode.child, \"previousOrParentNode's child should not have been set.\");\n previousOrParentNode.child = node;\n }\n else {\n // We are adding component view, so we don't link parent node child to this node.\n }\n }\n else if (previousOrParentNode) {\n ngDevMode && assertNull(previousOrParentNode.next, \"previousOrParentNode's next property should not have been set \" + index + \".\");\n previousOrParentNode.next = node;\n if (previousOrParentNode.dynamicLContainerNode) {\n previousOrParentNode.dynamicLContainerNode.next = node;\n }\n }\n }\n previousOrParentNode = node;\n isParent = true;\n return node;\n}\n/**\n * Resets the application state.\n */\nfunction resetApplicationState() {\n isParent = false;\n previousOrParentNode = (null);\n}\n/**\n *\n * @param hostNode Existing node to render into.\n * @param template Template function with the instructions.\n * @param context to pass into the template.\n * @param providedRendererFactory renderer factory to use\n * @param host The host element node to use\n * @param directives Directive defs that should be used for matching\n * @param pipes Pipe defs that should be used for matching\n */\n\nfunction renderEmbeddedTemplate(viewNode, template, context, renderer, directives, pipes) {\n var _isParent = isParent;\n var _previousOrParentNode = previousOrParentNode;\n var oldView;\n try {\n isParent = true;\n previousOrParentNode = (null);\n var rf = 2;\n if (viewNode == null) {\n var tView = getOrCreateTView(template, directives || null, pipes || null);\n var lView = createLView(-1, renderer, tView, template, context, 2 /* CheckAlways */);\n viewNode = createLNode(null, 2 /* View */, null, lView);\n rf = 1 /* Create */;\n }\n oldView = enterView(viewNode.data, viewNode);\n template(rf, context);\n refreshDirectives();\n refreshDynamicChildren();\n }\n finally {\n leaveView((oldView));\n isParent = _isParent;\n previousOrParentNode = _previousOrParentNode;\n }\n return viewNode;\n}\nfunction renderComponentOrTemplate(node, hostView, componentOrContext, template) {\n var oldView = enterView(hostView, node);\n try {\n if (rendererFactory.begin) {\n rendererFactory.begin();\n }\n if (template) {\n template(getRenderFlags(hostView), (componentOrContext));\n refreshDynamicChildren();\n refreshDirectives();\n }\n else {\n executeInitAndContentHooks();\n // Element was stored at 0 in data and directive was stored at 0 in directives\n // in renderComponent()\n setHostBindings(_ROOT_DIRECTIVE_INDICES);\n componentRefresh(0, 0);\n }\n }\n finally {\n if (rendererFactory.end) {\n rendererFactory.end();\n }\n leaveView(oldView);\n }\n}\n/**\n * This function returns the default configuration of rendering flags depending on when the\n * template is in creation mode or update mode. By default, the update block is run with the\n * creation block when the view is in creation mode. Otherwise, the update block is run\n * alone.\n *\n * Dynamically created views do NOT use this configuration (update block and create block are\n * always run separately).\n */\nfunction getRenderFlags(view) {\n return view.flags & 1 /* CreationMode */ ? 1 /* Create */ | 2 /* Update */ :\n 2 /* Update */;\n}\n/**\n * Create DOM element. The instruction must later be followed by `elementEnd()` call.\n *\n * @param index Index of the element in the data array\n * @param name Name of the DOM Node\n * @param attrs Statically bound set of attributes to be written into the DOM element on creation.\n * @param localRefs A set of local reference bindings on the element.\n *\n * Attributes and localRefs are passed as an array of strings where elements with an even index\n * hold an attribute name and elements with an odd index hold an attribute value, ex.:\n * ['id', 'warning5', 'class', 'alert']\n */\nfunction elementStart(index, name, attrs, localRefs) {\n ngDevMode &&\n assertEqual(currentView.bindingStartIndex, -1, 'elements should be created before any bindings');\n var native = renderer.createElement(name);\n var node = createLNode(index, 3 /* Element */, (native), null);\n if (attrs)\n setUpAttributes(native, attrs);\n appendChild((node.parent), native, currentView);\n createDirectivesAndLocals(index, name, attrs, localRefs, null);\n return native;\n}\nfunction createDirectivesAndLocals(index, name, attrs, localRefs, containerData) {\n var node = previousOrParentNode;\n if (firstTemplatePass) {\n ngDevMode && assertDataInRange(index - 1);\n node.tNode = tData[index] = createTNode(name, attrs || null, containerData);\n cacheMatchingDirectivesForNode(node.tNode, currentView.tView, localRefs || null);\n }\n else {\n instantiateDirectivesDirectly();\n }\n saveResolvedLocalsInData();\n}\n/**\n * On first template pass, we match each node against available directive selectors and save\n * the resulting defs in the correct instantiation order for subsequent change detection runs\n * (so dependencies are always created before the directives that inject them).\n */\nfunction cacheMatchingDirectivesForNode(tNode, tView, localRefs) {\n // Please make sure to have explicit type for `exportsMap`. Inferred type triggers bug in tsickle.\n var exportsMap = localRefs ? { '': -1 } : null;\n var matches = tView.currentMatches = findDirectiveMatches(tNode);\n if (matches) {\n for (var i = 0; i < matches.length; i += 2) {\n var def = matches[i];\n var valueIndex = i + 1;\n resolveDirective(def, valueIndex, matches, tView);\n saveNameToExportMap(matches[valueIndex], def, exportsMap);\n }\n }\n if (exportsMap)\n cacheMatchingLocalNames(tNode, localRefs, exportsMap);\n}\n/** Matches the current node against all available selectors. */\nfunction findDirectiveMatches(tNode) {\n var registry = currentView.tView.directiveRegistry;\n var matches = null;\n if (registry) {\n for (var i = 0; i < registry.length; i++) {\n var def = registry[i];\n if (isNodeMatchingSelectorList(tNode, (def.selectors))) {\n if (def.template) {\n if (tNode.flags & 4096 /* isComponent */)\n throwMultipleComponentError(tNode);\n tNode.flags = 4096 /* isComponent */;\n }\n if (def.diPublic)\n def.diPublic(def);\n (matches || (matches = [])).push(def, null);\n }\n }\n }\n return matches;\n}\nfunction resolveDirective(def, valueIndex, matches, tView) {\n if (matches[valueIndex] === null) {\n matches[valueIndex] = CIRCULAR$2;\n var instance = def.factory();\n (tView.directives || (tView.directives = [])).push(def);\n return directiveCreate(matches[valueIndex] = tView.directives.length - 1, instance, def);\n }\n else if (matches[valueIndex] === CIRCULAR$2) {\n // If we revisit this directive before it's resolved, we know it's circular\n throwCyclicDependencyError(def.type);\n }\n return null;\n}\n/** Stores index of component's host element so it will be queued for view refresh during CD. */\nfunction queueComponentIndexForCheck(dirIndex) {\n if (firstTemplatePass) {\n (currentView.tView.components || (currentView.tView.components = [])).push(dirIndex, data.length - 1);\n }\n}\n/** Stores index of directive and host element so it will be queued for binding refresh during CD.\n */\nfunction queueHostBindingForCheck(dirIndex) {\n ngDevMode &&\n assertEqual(firstTemplatePass, true, 'Should only be called in first template pass.');\n (currentView.tView.hostBindings || (currentView.tView.hostBindings = [])).push(dirIndex, data.length - 1);\n}\n/** Sets the context for a ChangeDetectorRef to the given instance. */\nfunction initChangeDetectorIfExisting(injector, instance, view) {\n if (injector && injector.changeDetectorRef != null) {\n injector.changeDetectorRef._setComponentContext(view, instance);\n }\n}\nfunction isComponent(tNode) {\n return (tNode.flags & 4096 /* isComponent */) === 4096 /* isComponent */;\n}\n/**\n * This function instantiates the given directives.\n */\nfunction instantiateDirectivesDirectly() {\n var tNode = (previousOrParentNode.tNode);\n var count = tNode.flags & 4095;\n if (count > 0) {\n var start = tNode.flags >> 13;\n var end = start + count;\n var tDirectives = (currentView.tView.directives);\n for (var i = start; i < end; i++) {\n var def = tDirectives[i];\n directiveCreate(i, def.factory(), def);\n }\n }\n}\n/** Caches local names and their matching directive indices for query and template lookups. */\nfunction cacheMatchingLocalNames(tNode, localRefs, exportsMap) {\n if (localRefs) {\n var localNames = tNode.localNames = [];\n // Local names must be stored in tNode in the same order that localRefs are defined\n // in the template to ensure the data is loaded in the same slots as their refs\n // in the template (for template queries).\n for (var i = 0; i < localRefs.length; i += 2) {\n var index = exportsMap[localRefs[i + 1]];\n if (index == null)\n throw new Error(\"Export of name '\" + localRefs[i + 1] + \"' not found!\");\n localNames.push(localRefs[i], index);\n }\n }\n}\n/**\n * Builds up an export map as directives are created, so local refs can be quickly mapped\n * to their directive instances.\n */\nfunction saveNameToExportMap(index, def, exportsMap) {\n if (exportsMap) {\n if (def.exportAs)\n exportsMap[def.exportAs] = index;\n if (def.template)\n exportsMap[''] = index;\n }\n}\n/**\n * Takes a list of local names and indices and pushes the resolved local variable values\n * to data[] in the same order as they are loaded in the template with load().\n */\nfunction saveResolvedLocalsInData() {\n var localNames = previousOrParentNode.tNode.localNames;\n if (localNames) {\n for (var i = 0; i < localNames.length; i += 2) {\n var index = localNames[i + 1];\n var value = index === -1 ? previousOrParentNode.native : directives[index];\n data.push(value);\n }\n }\n}\n/**\n * Gets TView from a template function or creates a new TView\n * if it doesn't already exist.\n *\n * @param template The template from which to get static data\n * @param directives Directive defs that should be saved on TView\n * @param pipes Pipe defs that should be saved on TView\n * @returns TView\n */\nfunction getOrCreateTView(template, directives, pipes) {\n return template.ngPrivateData ||\n (template.ngPrivateData = createTView(directives, pipes));\n}\n/** Creates a TView instance */\nfunction createTView(defs, pipes) {\n return {\n data: [],\n directives: null,\n firstTemplatePass: true,\n initHooks: null,\n checkHooks: null,\n contentHooks: null,\n contentCheckHooks: null,\n viewHooks: null,\n viewCheckHooks: null,\n destroyHooks: null,\n pipeDestroyHooks: null,\n hostBindings: null,\n components: null,\n directiveRegistry: typeof defs === 'function' ? defs() : defs,\n pipeRegistry: typeof pipes === 'function' ? pipes() : pipes,\n currentMatches: null\n };\n}\nfunction setUpAttributes(native, attrs) {\n ngDevMode && assertEqual(attrs.length % 2, 0, 'each attribute should have a key and a value');\n var isProc = isProceduralRenderer(renderer);\n for (var i = 0; i < attrs.length; i += 2) {\n var attrName = attrs[i];\n if (attrName !== NG_PROJECT_AS_ATTR_NAME) {\n var attrVal = attrs[i + 1];\n isProc ? renderer.setAttribute(native, attrName, attrVal) :\n native.setAttribute(attrName, attrVal);\n }\n }\n}\nfunction createError(text, token) {\n return new Error(\"Renderer: \" + text + \" [\" + stringify$1(token) + \"]\");\n}\n/**\n * Locates the host native element, used for bootstrapping existing nodes into rendering pipeline.\n *\n * @param elementOrSelector Render element or CSS selector to locate the element.\n */\nfunction locateHostElement(factory, elementOrSelector) {\n ngDevMode && assertDataInRange(-1);\n rendererFactory = factory;\n var defaultRenderer = factory.createRenderer(null, null);\n var rNode = typeof elementOrSelector === 'string' ?\n (isProceduralRenderer(defaultRenderer) ?\n defaultRenderer.selectRootElement(elementOrSelector) :\n defaultRenderer.querySelector(elementOrSelector)) :\n elementOrSelector;\n if (ngDevMode && !rNode) {\n if (typeof elementOrSelector === 'string') {\n throw createError('Host node with selector not found:', elementOrSelector);\n }\n else {\n throw createError('Host node is required:', elementOrSelector);\n }\n }\n return rNode;\n}\n/**\n * Creates the host LNode.\n *\n * @param rNode Render host element.\n * @param def ComponentDef\n *\n * @returns LElementNode created\n */\nfunction hostElement(tag, rNode, def) {\n resetApplicationState();\n var node = createLNode(0, 3 /* Element */, rNode, createLView(-1, renderer, getOrCreateTView(def.template, def.directiveDefs, def.pipeDefs), null, null, def.onPush ? 4 /* Dirty */ : 2 /* CheckAlways */));\n if (firstTemplatePass) {\n node.tNode = createTNode(tag, null, null);\n node.tNode.flags = 4096 /* isComponent */;\n if (def.diPublic)\n def.diPublic(def);\n currentView.tView.directives = [def];\n }\n return node;\n}\n/**\n * Adds an event listener to the current node.\n *\n * If an output exists on one of the node's directives, it also subscribes to the output\n * and saves the subscription for later cleanup.\n *\n * @param eventName Name of the event\n * @param listenerFn The function to be called when event emits\n * @param useCapture Whether or not to use capture in event listener.\n */\nfunction listener(eventName, listenerFn, useCapture) {\n if (useCapture === void 0) { useCapture = false; }\n ngDevMode && assertPreviousIsParent();\n var node = previousOrParentNode;\n var native = node.native;\n // In order to match current behavior, native DOM event listeners must be added for all\n // events (including outputs).\n var cleanupFns = cleanup || (cleanup = currentView.cleanup = []);\n if (isProceduralRenderer(renderer)) {\n var wrappedListener = wrapListenerWithDirtyLogic(currentView, listenerFn);\n var cleanupFn = renderer.listen(native, eventName, wrappedListener);\n cleanupFns.push(cleanupFn, null);\n }\n else {\n var wrappedListener = wrapListenerWithDirtyAndDefault(currentView, listenerFn);\n native.addEventListener(eventName, wrappedListener, useCapture);\n cleanupFns.push(eventName, native, wrappedListener, useCapture);\n }\n var tNode = (node.tNode);\n if (tNode.outputs === undefined) {\n // if we create TNode here, inputs must be undefined so we know they still need to be\n // checked\n tNode.outputs = generatePropertyAliases(node.tNode.flags, 1 /* Output */);\n }\n var outputs = tNode.outputs;\n var outputData;\n if (outputs && (outputData = outputs[eventName])) {\n createOutput(outputData, listenerFn);\n }\n}\n/**\n * Iterates through the outputs associated with a particular event name and subscribes to\n * each output.\n */\nfunction createOutput(outputs, listener) {\n for (var i = 0; i < outputs.length; i += 2) {\n ngDevMode && assertDataInRange(outputs[i], (directives));\n var subscription = directives[outputs[i]][outputs[i + 1]].subscribe(listener);\n cleanup.push(subscription.unsubscribe, subscription);\n }\n}\n/** Mark the end of the element. */\nfunction elementEnd() {\n if (isParent) {\n isParent = false;\n }\n else {\n ngDevMode && assertHasParent();\n previousOrParentNode = (previousOrParentNode.parent);\n }\n ngDevMode && assertNodeType(previousOrParentNode, 3 /* Element */);\n var queries = previousOrParentNode.queries;\n queries && queries.addNode(previousOrParentNode);\n queueLifecycleHooks(previousOrParentNode.tNode.flags, currentView);\n}\n/**\n * Updates the value of removes an attribute on an Element.\n *\n * @param number index The index of the element in the data array\n * @param name name The name of the attribute.\n * @param value value The attribute is removed when value is `null` or `undefined`.\n * Otherwise the attribute value is set to the stringified value.\n * @param sanitizer An optional function used to sanitize the value.\n */\nfunction elementAttribute(index, name, value, sanitizer) {\n if (value !== NO_CHANGE) {\n var element = data[index];\n if (value == null) {\n isProceduralRenderer(renderer) ? renderer.removeAttribute(element.native, name) :\n element.native.removeAttribute(name);\n }\n else {\n var strValue = sanitizer == null ? stringify$1(value) : sanitizer(value);\n isProceduralRenderer(renderer) ? renderer.setAttribute(element.native, name, strValue) :\n element.native.setAttribute(name, strValue);\n }\n }\n}\n/**\n * Update a property on an Element.\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new @Inputs don't have to be re-compiled.\n *\n * @param index The index of the element to update in the data array\n * @param propName Name of property. Because it is going to DOM, this is not subject to\n * renaming as part of minification.\n * @param value New value to write.\n * @param sanitizer An optional function used to sanitize the value.\n */\nfunction elementProperty(index, propName, value, sanitizer) {\n if (value === NO_CHANGE)\n return;\n var node = data[index];\n var tNode = (node.tNode);\n // if tNode.inputs is undefined, a listener has created outputs, but inputs haven't\n // yet been checked\n if (tNode && tNode.inputs === undefined) {\n // mark inputs as checked\n tNode.inputs = generatePropertyAliases(node.tNode.flags, 0 /* Input */);\n }\n var inputData = tNode && tNode.inputs;\n var dataValue;\n if (inputData && (dataValue = inputData[propName])) {\n setInputsForProperty(dataValue, value);\n markDirtyIfOnPush(node);\n }\n else {\n // It is assumed that the sanitizer is only added when the compiler determines that the property\n // is risky, so sanitization can be done without further checks.\n value = sanitizer != null ? sanitizer(value) : value;\n var native = node.native;\n isProceduralRenderer(renderer) ? renderer.setProperty(native, propName, value) :\n (native.setProperty ? native.setProperty(propName, value) :\n native[propName] = value);\n }\n}\n/**\n * Constructs a TNode object from the arguments.\n *\n * @param tagName\n * @param attrs\n * @param data\n * @param localNames A list of local names and their matching indices\n * @returns the TNode object\n */\nfunction createTNode(tagName, attrs, data) {\n return {\n flags: 0,\n tagName: tagName,\n attrs: attrs,\n localNames: null,\n initialInputs: undefined,\n inputs: undefined,\n outputs: undefined,\n data: data\n };\n}\n/**\n * Given a list of directive indices and minified input names, sets the\n * input properties on the corresponding directives.\n */\nfunction setInputsForProperty(inputs, value) {\n for (var i = 0; i < inputs.length; i += 2) {\n ngDevMode && assertDataInRange(inputs[i], (directives));\n directives[inputs[i]][inputs[i + 1]] = value;\n }\n}\n/**\n * Consolidates all inputs or outputs of all directives on this logical node.\n *\n * @param number lNodeFlags logical node flags\n * @param Direction direction whether to consider inputs or outputs\n * @returns PropertyAliases|null aggregate of all properties if any, `null` otherwise\n */\nfunction generatePropertyAliases(tNodeFlags, direction) {\n var count = tNodeFlags & 4095;\n var propStore = null;\n if (count > 0) {\n var start = tNodeFlags >> 13;\n var end = start + count;\n var isInput = direction === 0;\n var defs = (currentView.tView.directives);\n for (var i = start; i < end; i++) {\n var directiveDef = defs[i];\n var propertyAliasMap = isInput ? directiveDef.inputs : directiveDef.outputs;\n for (var publicName in propertyAliasMap) {\n if (propertyAliasMap.hasOwnProperty(publicName)) {\n propStore = propStore || {};\n var internalName = propertyAliasMap[publicName];\n var hasProperty = propStore.hasOwnProperty(publicName);\n hasProperty ? propStore[publicName].push(i, internalName) :\n (propStore[publicName] = [i, internalName]);\n }\n }\n }\n }\n return propStore;\n}\n/**\n * Add or remove a class in a `classList` on a DOM element.\n *\n * This instruction is meant to handle the [class.foo]=\"exp\" case\n *\n * @param index The index of the element to update in the data array\n * @param className Name of class to toggle. Because it is going to DOM, this is not subject to\n * renaming as part of minification.\n * @param value A value indicating if a given class should be added or removed.\n */\nfunction elementClassNamed(index, className, value) {\n if (value !== NO_CHANGE) {\n var lElement = data[index];\n if (value) {\n isProceduralRenderer(renderer) ? renderer.addClass(lElement.native, className) :\n lElement.native.classList.add(className);\n }\n else {\n isProceduralRenderer(renderer) ? renderer.removeClass(lElement.native, className) :\n lElement.native.classList.remove(className);\n }\n }\n}\n/**\n * Set the `className` property on a DOM element.\n *\n * This instruction is meant to handle the `[class]=\"exp\"` usage.\n *\n * `elementClass` instruction writes the value to the \"element's\" `className` property.\n *\n * @param index The index of the element to update in the data array\n * @param value A value indicating a set of classes which should be applied. The method overrides\n * any existing classes. The value is stringified (`toString`) before it is applied to the\n * element.\n */\nfunction elementClass(index, value) {\n if (value !== NO_CHANGE) {\n // TODO: This is a naive implementation which simply writes value to the `className`. In the\n // future\n // we will add logic here which would work with the animation code.\n var lElement = data[index];\n isProceduralRenderer(renderer) ? renderer.setProperty(lElement.native, 'className', value) :\n lElement.native['className'] = stringify$1(value);\n }\n}\nfunction elementStyleNamed(index, styleName, value, suffixOrSanitizer) {\n if (value !== NO_CHANGE) {\n var lElement = data[index];\n if (value == null) {\n isProceduralRenderer(renderer) ?\n renderer.removeStyle(lElement.native, styleName, RendererStyleFlags3.DashCase) :\n lElement.native['style'].removeProperty(styleName);\n }\n else {\n var strValue = typeof suffixOrSanitizer == 'function' ? suffixOrSanitizer(value) : stringify$1(value);\n if (typeof suffixOrSanitizer == 'string')\n strValue = strValue + suffixOrSanitizer;\n isProceduralRenderer(renderer) ?\n renderer.setStyle(lElement.native, styleName, strValue, RendererStyleFlags3.DashCase) :\n lElement.native['style'].setProperty(styleName, strValue);\n }\n }\n}\n/**\n * Set the `style` property on a DOM element.\n *\n * This instruction is meant to handle the `[style]=\"exp\"` usage.\n *\n *\n * @param index The index of the element to update in the data array\n * @param value A value indicating if a given style should be added or removed.\n * The expected shape of `value` is an object where keys are style names and the values\n * are their corresponding values to set. If value is falsy than the style is remove. An absence\n * of style does not cause that style to be removed. `NO_CHANGE` implies that no update should be\n * performed.\n */\nfunction elementStyle(index, value) {\n if (value !== NO_CHANGE) {\n // TODO: This is a naive implementation which simply writes value to the `style`. In the future\n // we will add logic here which would work with the animation code.\n var lElement = data[index];\n if (isProceduralRenderer(renderer)) {\n renderer.setProperty(lElement.native, 'style', value);\n }\n else {\n var style = lElement.native['style'];\n for (var i = 0, keys = Object.keys(value); i < keys.length; i++) {\n var styleName = keys[i];\n var styleValue = value[styleName];\n styleValue == null ? style.removeProperty(styleName) :\n style.setProperty(styleName, styleValue);\n }\n }\n }\n}\n/**\n * Create static text node\n *\n * @param index Index of the node in the data array.\n * @param value Value to write. This value will be stringified.\n * If value is not provided than the actual creation of the text node is delayed.\n */\nfunction text(index, value) {\n ngDevMode &&\n assertEqual(currentView.bindingStartIndex, -1, 'text nodes should be created before bindings');\n var textNode = value != null ? createTextNode(value, renderer) : null;\n var node = createLNode(index, 3 /* Element */, textNode);\n // Text nodes are self closing.\n isParent = false;\n appendChild((node.parent), textNode, currentView);\n}\n/**\n * Create text node with binding\n * Bindings should be handled externally with the proper bind(1-8) method\n *\n * @param index Index of the node in the data array.\n * @param value Stringified value to write.\n */\nfunction textBinding(index, value) {\n ngDevMode && assertDataInRange(index);\n var existingNode = data[index];\n ngDevMode && assertNotNull(existingNode, 'existing node');\n if (existingNode.native) {\n // If DOM node exists and value changed, update textContent\n value !== NO_CHANGE &&\n (isProceduralRenderer(renderer) ? renderer.setValue(existingNode.native, stringify$1(value)) :\n existingNode.native.textContent = stringify$1(value));\n }\n else {\n // Node was created but DOM node creation was delayed. Create and append now.\n existingNode.native = createTextNode(value, renderer);\n insertChild(existingNode, currentView);\n }\n}\n/**\n * Create a directive.\n *\n * NOTE: directives can be created in order other than the index order. They can also\n * be retrieved before they are created in which case the value will be null.\n *\n * @param directive The directive instance.\n * @param directiveDef DirectiveDef object which contains information about the template.\n */\nfunction directiveCreate(index, directive, directiveDef) {\n var instance = baseDirectiveCreate(index, directive, directiveDef);\n ngDevMode && assertNotNull(previousOrParentNode.tNode, 'previousOrParentNode.tNode');\n var tNode = previousOrParentNode.tNode;\n var isComponent = directiveDef.template;\n if (isComponent) {\n addComponentLogic(index, directive, directiveDef);\n }\n if (firstTemplatePass) {\n // Init hooks are queued now so ngOnInit is called in host components before\n // any projected components.\n queueInitHooks(index, directiveDef.onInit, directiveDef.doCheck, currentView.tView);\n if (directiveDef.hostBindings)\n queueHostBindingForCheck(index);\n }\n if (tNode && tNode.attrs) {\n setInputsFromAttrs(index, instance, directiveDef.inputs, tNode);\n }\n return instance;\n}\nfunction addComponentLogic(index, instance, def) {\n var tView = getOrCreateTView(def.template, def.directiveDefs, def.pipeDefs);\n // Only component views should be added to the view tree directly. Embedded views are\n // accessed through their containers because they may be removed / re-added later.\n var hostView = addToViewTree(currentView, createLView(-1, rendererFactory.createRenderer(previousOrParentNode.native, def.rendererType), tView, null, null, def.onPush ? 4 /* Dirty */ : 2 /* CheckAlways */));\n previousOrParentNode.data = hostView;\n hostView.node = previousOrParentNode;\n initChangeDetectorIfExisting(previousOrParentNode.nodeInjector, instance, hostView);\n if (firstTemplatePass)\n queueComponentIndexForCheck(index);\n}\n/**\n * A lighter version of directiveCreate() that is used for the root component\n *\n * This version does not contain features that we don't already support at root in\n * current Angular. Example: local refs and inputs on root component.\n */\nfunction baseDirectiveCreate(index, directive, directiveDef) {\n ngDevMode &&\n assertEqual(currentView.bindingStartIndex, -1, 'directives should be created before any bindings');\n ngDevMode && assertPreviousIsParent();\n Object.defineProperty(directive, NG_HOST_SYMBOL, { enumerable: false, value: previousOrParentNode });\n if (directives == null)\n currentView.directives = directives = [];\n ngDevMode && assertDataNext(index, directives);\n directives[index] = directive;\n if (firstTemplatePass) {\n var flags = previousOrParentNode.tNode.flags;\n if ((flags & 4095 /* DirectiveCountMask */) === 0) {\n // When the first directive is created:\n // - save the index,\n // - set the number of directives to 1\n // When the first directive is created:\n // - save the index,\n // - set the number of directives to 1\n previousOrParentNode.tNode.flags =\n index << 13 /* DirectiveStartingIndexShift */ | flags & 4096 /* isComponent */ | 1;\n }\n else {\n // Only need to bump the size when subsequent directives are created\n ngDevMode && assertNotEqual(flags & 4095 /* DirectiveCountMask */, 4095 /* DirectiveCountMask */, 'Reached the max number of directives');\n previousOrParentNode.tNode.flags++;\n }\n }\n else {\n var diPublic = directiveDef.diPublic;\n if (diPublic)\n diPublic((directiveDef));\n }\n if (directiveDef.attributes != null && previousOrParentNode.type == 3 /* Element */) {\n setUpAttributes(previousOrParentNode.native, directiveDef.attributes);\n }\n return directive;\n}\n/**\n * Sets initial input properties on directive instances from attribute data\n *\n * @param directiveIndex Index of the directive in directives array\n * @param instance Instance of the directive on which to set the initial inputs\n * @param inputs The list of inputs from the directive def\n * @param tNode The static data for this node\n */\nfunction setInputsFromAttrs(directiveIndex, instance, inputs, tNode) {\n var initialInputData = tNode.initialInputs;\n if (initialInputData === undefined || directiveIndex >= initialInputData.length) {\n initialInputData = generateInitialInputs(directiveIndex, inputs, tNode);\n }\n var initialInputs = initialInputData[directiveIndex];\n if (initialInputs) {\n for (var i = 0; i < initialInputs.length; i += 2) {\n instance[initialInputs[i]] = initialInputs[i + 1];\n }\n }\n}\n/**\n * Generates initialInputData for a node and stores it in the template's static storage\n * so subsequent template invocations don't have to recalculate it.\n *\n * initialInputData is an array containing values that need to be set as input properties\n * for directives on this node, but only once on creation. We need this array to support\n * the case where you set an @Input property of a directive using attribute-like syntax.\n * e.g. if you have a `name` @Input, you can set it once like this:\n *\n * <my-component name=\"Bess\"></my-component>\n *\n * @param directiveIndex Index to store the initial input data\n * @param inputs The list of inputs from the directive def\n * @param tNode The static data on this node\n */\nfunction generateInitialInputs(directiveIndex, inputs, tNode) {\n var initialInputData = tNode.initialInputs || (tNode.initialInputs = []);\n initialInputData[directiveIndex] = null;\n var attrs = (tNode.attrs);\n for (var i = 0; i < attrs.length; i += 2) {\n var attrName = attrs[i];\n var minifiedInputName = inputs[attrName];\n if (minifiedInputName !== undefined) {\n var inputsToStore = initialInputData[directiveIndex] || (initialInputData[directiveIndex] = []);\n inputsToStore.push(minifiedInputName, attrs[i + 1]);\n }\n }\n return initialInputData;\n}\nfunction createLContainer(parentLNode, currentView, template) {\n ngDevMode && assertNotNull(parentLNode, 'containers should have a parent');\n return {\n views: [],\n nextIndex: 0,\n // If the direct parent of the container is a view, its views will need to be added\n // through insertView() when its parent view is being inserted:\n renderParent: canInsertNativeNode(parentLNode, currentView) ? parentLNode : null,\n template: template == null ? null : template,\n next: null,\n parent: currentView,\n dynamicViewCount: 0,\n queries: null\n };\n}\n/**\n * Creates an LContainerNode.\n *\n * Only `LViewNodes` can go into `LContainerNodes`.\n *\n * @param index The index of the container in the data array\n * @param template Optional inline template\n * @param tagName The name of the container element, if applicable\n * @param attrs The attrs attached to the container, if applicable\n * @param localRefs A set of local reference bindings on the element.\n */\nfunction container(index, template, tagName, attrs, localRefs) {\n ngDevMode && assertEqual(currentView.bindingStartIndex, -1, 'container nodes should be created before any bindings');\n var currentParent = isParent ? previousOrParentNode : previousOrParentNode.parent;\n var lContainer = createLContainer(currentParent, currentView, template);\n var node = createLNode(index, 0 /* Container */, undefined, lContainer);\n // Containers are added to the current view tree instead of their embedded views\n // because views can be removed and re-inserted.\n addToViewTree(currentView, node.data);\n createDirectivesAndLocals(index, tagName || null, attrs, localRefs, []);\n isParent = false;\n ngDevMode && assertNodeType(previousOrParentNode, 0 /* Container */);\n var queries = node.queries;\n if (queries) {\n // check if a given container node matches\n queries.addNode(node);\n // prepare place for matching nodes from views inserted into a given container\n lContainer.queries = queries.container();\n }\n}\n/**\n * Sets a container up to receive views.\n *\n * @param index The index of the container in the data array\n */\nfunction containerRefreshStart(index) {\n ngDevMode && assertDataInRange(index);\n previousOrParentNode = data[index];\n ngDevMode && assertNodeType(previousOrParentNode, 0 /* Container */);\n isParent = true;\n previousOrParentNode.data.nextIndex = 0;\n ngDevMode && assertSame(previousOrParentNode.native, undefined, \"the container's native element should not have been set yet.\");\n if (!checkNoChangesMode) {\n // We need to execute init hooks here so ngOnInit hooks are called in top level views\n // before they are called in embedded views (for backwards compatibility).\n executeInitHooks(currentView, currentView.tView, creationMode);\n }\n}\n/**\n * Marks the end of the LContainerNode.\n *\n * Marking the end of LContainerNode is the time when to child Views get inserted or removed.\n */\nfunction containerRefreshEnd() {\n if (isParent) {\n isParent = false;\n }\n else {\n ngDevMode && assertNodeType(previousOrParentNode, 2 /* View */);\n ngDevMode && assertHasParent();\n previousOrParentNode = (previousOrParentNode.parent);\n }\n ngDevMode && assertNodeType(previousOrParentNode, 0 /* Container */);\n var container = previousOrParentNode;\n container.native = undefined;\n ngDevMode && assertNodeType(container, 0 /* Container */);\n var nextIndex = container.data.nextIndex;\n // remove extra views at the end of the container\n while (nextIndex < container.data.views.length) {\n removeView(container, nextIndex);\n }\n}\nfunction refreshDynamicChildren() {\n for (var current = currentView.child; current !== null; current = current.next) {\n if (current.dynamicViewCount !== 0 && current.views) {\n var container_1 = current;\n for (var i = 0; i < container_1.views.length; i++) {\n var view = container_1.views[i];\n // The directives and pipes are not needed here as an existing view is only being refreshed.\n renderEmbeddedTemplate(view, (view.data.template), (view.data.context), renderer);\n }\n }\n }\n}\n/**\n * Looks for a view with a given view block id inside a provided LContainer.\n * Removes views that need to be deleted in the process.\n *\n * @param containerNode where to search for views\n * @param startIdx starting index in the views array to search from\n * @param viewBlockId exact view block id to look for\n * @returns index of a found view or -1 if not found\n */\nfunction scanForView(containerNode, startIdx, viewBlockId) {\n var views = containerNode.data.views;\n for (var i = startIdx; i < views.length; i++) {\n var viewAtPositionId = views[i].data.id;\n if (viewAtPositionId === viewBlockId) {\n return views[i];\n }\n else if (viewAtPositionId < viewBlockId) {\n // found a view that should not be at this position - remove\n removeView(containerNode, i);\n }\n else {\n // found a view with id grater than the one we are searching for\n // which means that required view doesn't exist and can't be found at\n // later positions in the views array - stop the search here\n break;\n }\n }\n return null;\n}\n/**\n * Marks the start of an embedded view.\n *\n * @param viewBlockId The ID of this view\n * @return boolean Whether or not this view is in creation mode\n */\nfunction embeddedViewStart(viewBlockId) {\n var container = (isParent ? previousOrParentNode : previousOrParentNode.parent);\n ngDevMode && assertNodeType(container, 0 /* Container */);\n var lContainer = container.data;\n var viewNode = scanForView(container, lContainer.nextIndex, viewBlockId);\n if (viewNode) {\n previousOrParentNode = viewNode;\n ngDevMode && assertNodeType(previousOrParentNode, 2 /* View */);\n isParent = true;\n enterView(viewNode.data, viewNode);\n }\n else {\n // When we create a new LView, we always reset the state of the instructions.\n var newView = createLView(viewBlockId, renderer, getOrCreateEmbeddedTView(viewBlockId, container), null, null, 2 /* CheckAlways */);\n if (lContainer.queries) {\n newView.queries = lContainer.queries.enterView(lContainer.nextIndex);\n }\n enterView(newView, viewNode = createLNode(null, 2 /* View */, null, newView));\n }\n return getRenderFlags(viewNode.data);\n}\n/**\n * Initialize the TView (e.g. static data) for the active embedded view.\n *\n * Each embedded view needs to set the global tData variable to the static data for\n * that view. Otherwise, the view's static data for a particular node would overwrite\n * the static data for a node in the view above it with the same index (since it's in the\n * same template).\n *\n * @param viewIndex The index of the TView in TContainer\n * @param parent The parent container in which to look for the view's static data\n * @returns TView\n */\nfunction getOrCreateEmbeddedTView(viewIndex, parent) {\n ngDevMode && assertNodeType(parent, 0 /* Container */);\n var tContainer = parent.tNode.data;\n if (viewIndex >= tContainer.length || tContainer[viewIndex] == null) {\n var tView = currentView.tView;\n tContainer[viewIndex] = createTView(tView.directiveRegistry, tView.pipeRegistry);\n }\n return tContainer[viewIndex];\n}\n/** Marks the end of an embedded view. */\nfunction embeddedViewEnd() {\n refreshDirectives();\n isParent = false;\n var viewNode = previousOrParentNode = currentView.node;\n var containerNode = previousOrParentNode.parent;\n if (containerNode) {\n ngDevMode && assertNodeType(viewNode, 2 /* View */);\n ngDevMode && assertNodeType(containerNode, 0 /* Container */);\n var lContainer = containerNode.data;\n if (creationMode) {\n // When projected nodes are going to be inserted, the renderParent of the dynamic container\n // used by the ViewContainerRef must be set.\n setRenderParentInProjectedNodes(lContainer.renderParent, viewNode);\n // it is a new view, insert it into collection of views for a given container\n insertView(containerNode, viewNode, lContainer.nextIndex);\n }\n lContainer.nextIndex++;\n }\n leaveView((currentView.parent));\n ngDevMode && assertEqual(isParent, false, 'isParent');\n ngDevMode && assertNodeType(previousOrParentNode, 2 /* View */);\n}\n/**\n * For nodes which are projected inside an embedded view, this function sets the renderParent\n * of their dynamic LContainerNode.\n * @param renderParent the renderParent of the LContainer which contains the embedded view.\n * @param viewNode the embedded view.\n */\nfunction setRenderParentInProjectedNodes(renderParent, viewNode) {\n if (renderParent != null) {\n var node = viewNode.child;\n while (node) {\n if (node.type === 1 /* Projection */) {\n var nodeToProject = node.data.head;\n var lastNodeToProject = node.data.tail;\n while (nodeToProject) {\n if (nodeToProject.dynamicLContainerNode) {\n nodeToProject.dynamicLContainerNode.data.renderParent = renderParent;\n }\n nodeToProject = nodeToProject === lastNodeToProject ? null : nodeToProject.pNextOrParent;\n }\n }\n node = node.next;\n }\n }\n}\n/**\n * Refreshes components by entering the component view and processing its bindings, queries, etc.\n *\n * @param directiveIndex\n * @param elementIndex\n */\nfunction componentRefresh(directiveIndex, elementIndex) {\n ngDevMode && assertDataInRange(elementIndex);\n var element = data[elementIndex];\n ngDevMode && assertNodeType(element, 3 /* Element */);\n ngDevMode && assertNotNull(element.data, \"Component's host node should have an LView attached.\");\n var hostView = (element.data);\n // Only attached CheckAlways components or attached, dirty OnPush components should be checked\n if (viewAttached(hostView) && hostView.flags & (2 /* CheckAlways */ | 4 /* Dirty */)) {\n ngDevMode && assertDataInRange(directiveIndex, (directives));\n var def = currentView.tView.directives[directiveIndex];\n detectChangesInternal(hostView, element, def, getDirectiveInstance(directives[directiveIndex]));\n }\n}\n/** Returns a boolean for whether the view is attached */\nfunction viewAttached(view) {\n return (view.flags & 8 /* Attached */) === 8 /* Attached */;\n}\n/**\n * Instruction to distribute projectable nodes among <ng-content> occurrences in a given template.\n * It takes all the selectors from the entire component's template and decides where\n * each projected node belongs (it re-distributes nodes among \"buckets\" where each \"bucket\" is\n * backed by a selector).\n *\n * This function requires CSS selectors to be provided in 2 forms: parsed (by a compiler) and text,\n * un-parsed form.\n *\n * The parsed form is needed for efficient matching of a node against a given CSS selector.\n * The un-parsed, textual form is needed for support of the ngProjectAs attribute.\n *\n * Having a CSS selector in 2 different formats is not ideal, but alternatives have even more\n * drawbacks:\n * - having only a textual form would require runtime parsing of CSS selectors;\n * - we can't have only a parsed as we can't re-construct textual form from it (as entered by a\n * template author).\n *\n * @param selectors A collection of parsed CSS selectors\n * @param rawSelectors A collection of CSS selectors in the raw, un-parsed form\n */\nfunction projectionDef(index, selectors, textSelectors) {\n var noOfNodeBuckets = selectors ? selectors.length + 1 : 1;\n var distributedNodes = new Array(noOfNodeBuckets);\n for (var i = 0; i < noOfNodeBuckets; i++) {\n distributedNodes[i] = [];\n }\n var componentNode = findComponentHost(currentView);\n var componentChild = componentNode.child;\n while (componentChild !== null) {\n // execute selector matching logic if and only if:\n // - there are selectors defined\n // - a node has a tag name / attributes that can be matched\n if (selectors && componentChild.tNode) {\n var matchedIdx = matchingSelectorIndex(componentChild.tNode, selectors, (textSelectors));\n distributedNodes[matchedIdx].push(componentChild);\n }\n else {\n distributedNodes[0].push(componentChild);\n }\n componentChild = componentChild.next;\n }\n ngDevMode && assertDataNext(index);\n data[index] = distributedNodes;\n}\n/**\n * Updates the linked list of a projection node, by appending another linked list.\n *\n * @param projectionNode Projection node whose projected nodes linked list has to be updated\n * @param appendedFirst First node of the linked list to append.\n * @param appendedLast Last node of the linked list to append.\n */\nfunction appendToProjectionNode(projectionNode, appendedFirst, appendedLast) {\n ngDevMode && assertEqual(!!appendedFirst, !!appendedLast, 'appendedFirst can be null if and only if appendedLast is also null');\n if (!appendedLast) {\n // nothing to append\n return;\n }\n var projectionNodeData = projectionNode.data;\n if (projectionNodeData.tail) {\n projectionNodeData.tail.pNextOrParent = appendedFirst;\n }\n else {\n projectionNodeData.head = appendedFirst;\n }\n projectionNodeData.tail = appendedLast;\n appendedLast.pNextOrParent = projectionNode;\n}\n/**\n * Inserts previously re-distributed projected nodes. This instruction must be preceded by a call\n * to the projectionDef instruction.\n *\n * @param nodeIndex\n * @param localIndex - index under which distribution of projected nodes was memorized\n * @param selectorIndex - 0 means <ng-content> without any selector\n * @param attrs - attributes attached to the ng-content node, if present\n */\nfunction projection(nodeIndex, localIndex, selectorIndex, attrs) {\n if (selectorIndex === void 0) { selectorIndex = 0; }\n var node = createLNode(nodeIndex, 1 /* Projection */, null, { head: null, tail: null });\n if (node.tNode == null) {\n node.tNode = createTNode(null, attrs || null, null);\n }\n isParent = false; // self closing\n var currentParent = node.parent;\n // re-distribution of projectable nodes is memorized on a component's view level\n var componentNode = findComponentHost(currentView);\n // make sure that nodes to project were memorized\n var nodesForSelector = componentNode.data.data[localIndex][selectorIndex];\n // build the linked list of projected nodes:\n for (var i = 0; i < nodesForSelector.length; i++) {\n var nodeToProject = nodesForSelector[i];\n if (nodeToProject.type === 1 /* Projection */) {\n var previouslyProjected = nodeToProject.data;\n appendToProjectionNode(node, previouslyProjected.head, previouslyProjected.tail);\n }\n else {\n appendToProjectionNode(node, nodeToProject, nodeToProject);\n }\n }\n if (canInsertNativeNode(currentParent, currentView)) {\n ngDevMode && assertNodeType(currentParent, 3 /* Element */);\n // process each node in the list of projected nodes:\n var nodeToProject = node.data.head;\n var lastNodeToProject = node.data.tail;\n while (nodeToProject) {\n appendProjectedNode(nodeToProject, currentParent, currentView);\n nodeToProject = nodeToProject === lastNodeToProject ? null : nodeToProject.pNextOrParent;\n }\n }\n}\n/**\n * Given a current view, finds the nearest component's host (LElement).\n *\n * @param lView LView for which we want a host element node\n * @returns The host node\n */\nfunction findComponentHost(lView) {\n var viewRootLNode = lView.node;\n while (viewRootLNode.type === 2 /* View */) {\n ngDevMode && assertNotNull(lView.parent, 'lView.parent');\n lView = (lView.parent);\n viewRootLNode = lView.node;\n }\n ngDevMode && assertNodeType(viewRootLNode, 3 /* Element */);\n ngDevMode && assertNotNull(viewRootLNode.data, 'node.data');\n return viewRootLNode;\n}\n/**\n * Adds a LView or a LContainer to the end of the current view tree.\n *\n * This structure will be used to traverse through nested views to remove listeners\n * and call onDestroy callbacks.\n *\n * @param currentView The view where LView or LContainer should be added\n * @param state The LView or LContainer to add to the view tree\n * @returns The state passed in\n */\nfunction addToViewTree(currentView, state) {\n currentView.tail ? (currentView.tail.next = state) : (currentView.child = state);\n currentView.tail = state;\n return state;\n}\n/** If node is an OnPush component, marks its LView dirty. */\nfunction markDirtyIfOnPush(node) {\n // Because data flows down the component tree, ancestors do not need to be marked dirty\n if (node.data && !(node.data.flags & 2 /* CheckAlways */)) {\n node.data.flags |= 4 /* Dirty */;\n }\n}\n/**\n * Wraps an event listener so its host view and its ancestor views will be marked dirty\n * whenever the event fires. Necessary to support OnPush components.\n */\nfunction wrapListenerWithDirtyLogic(view, listenerFn) {\n return function (e) {\n markViewDirty(view);\n return listenerFn(e);\n };\n}\n/**\n * Wraps an event listener so its host view and its ancestor views will be marked dirty\n * whenever the event fires. Also wraps with preventDefault behavior.\n */\nfunction wrapListenerWithDirtyAndDefault(view, listenerFn) {\n return function wrapListenerIn_markViewDirty(e) {\n markViewDirty(view);\n if (listenerFn(e) === false) {\n e.preventDefault();\n // Necessary for legacy browsers that don't support preventDefault (e.g. IE)\n e.returnValue = false;\n }\n };\n}\n/** Marks current view and all ancestors dirty */\nfunction markViewDirty(view) {\n var currentView = view;\n while (currentView.parent != null) {\n currentView.flags |= 4 /* Dirty */;\n currentView = currentView.parent;\n }\n currentView.flags |= 4 /* Dirty */;\n ngDevMode && assertNotNull(currentView.context, 'rootContext');\n scheduleTick(currentView.context);\n}\n/**\n * Used to schedule change detection on the whole application.\n *\n * Unlike `tick`, `scheduleTick` coalesces multiple calls into one change detection run.\n * It is usually called indirectly by calling `markDirty` when the view needs to be\n * re-rendered.\n *\n * Typically `scheduleTick` uses `requestAnimationFrame` to coalesce multiple\n * `scheduleTick` requests. The scheduling function can be overridden in\n * `renderComponent`'s `scheduler` option.\n */\nfunction scheduleTick(rootContext) {\n if (rootContext.clean == _CLEAN_PROMISE) {\n var res_1;\n rootContext.clean = new Promise(function (r) { return res_1 = r; });\n rootContext.scheduler(function () {\n tick(rootContext.component);\n res_1(null);\n rootContext.clean = _CLEAN_PROMISE;\n });\n }\n}\n/**\n * Used to perform change detection on the whole application.\n *\n * This is equivalent to `detectChanges`, but invoked on root component. Additionally, `tick`\n * executes lifecycle hooks and conditionally checks components based on their\n * `ChangeDetectionStrategy` and dirtiness.\n *\n * The preferred way to trigger change detection is to call `markDirty`. `markDirty` internally\n * schedules `tick` using a scheduler in order to coalesce multiple `markDirty` calls into a\n * single change detection run. By default, the scheduler is `requestAnimationFrame`, but can\n * be changed when calling `renderComponent` and providing the `scheduler` option.\n */\nfunction tick(component) {\n var rootView = getRootView(component);\n var rootComponent = rootView.context.component;\n var hostNode = _getComponentHostLElementNode(rootComponent);\n ngDevMode && assertNotNull(hostNode.data, 'Component host node should be attached to an LView');\n renderComponentOrTemplate(hostNode, rootView, rootComponent);\n}\n/**\n * Retrieve the root view from any component by walking the parent `LView` until\n * reaching the root `LView`.\n *\n * @param component any component\n */\nfunction getRootView(component) {\n ngDevMode && assertNotNull(component, 'component');\n var lElementNode = _getComponentHostLElementNode(component);\n var lView = lElementNode.view;\n while (lView.parent) {\n lView = lView.parent;\n }\n return lView;\n}\n/**\n * Synchronously perform change detection on a component (and possibly its sub-components).\n *\n * This function triggers change detection in a synchronous way on a component. There should\n * be very little reason to call this function directly since a preferred way to do change\n * detection is to {@link markDirty} the component and wait for the scheduler to call this method\n * at some future point in time. This is because a single user action often results in many\n * components being invalidated and calling change detection on each component synchronously\n * would be inefficient. It is better to wait until all components are marked as dirty and\n * then perform single change detection across all of the components\n *\n * @param component The component which the change detection should be performed on.\n */\nfunction detectChanges(component) {\n var hostNode = _getComponentHostLElementNode(component);\n ngDevMode && assertNotNull(hostNode.data, 'Component host node should be attached to an LView');\n var componentIndex = hostNode.tNode.flags >> 13;\n var def = hostNode.view.tView.directives[componentIndex];\n detectChangesInternal(hostNode.data, hostNode, def, component);\n}\n/**\n * Checks the change detector and its children, and throws if any changes are detected.\n *\n * This is used in development mode to verify that running change detection doesn't\n * introduce other changes.\n */\nfunction checkNoChanges(component) {\n checkNoChangesMode = true;\n try {\n detectChanges(component);\n }\n finally {\n checkNoChangesMode = false;\n }\n}\n/** Checks the view of the component provided. Does not gate on dirty checks or execute doCheck. */\nfunction detectChangesInternal(hostView, hostNode, def, component) {\n var oldView = enterView(hostView, hostNode);\n var template = def.template;\n try {\n template(getRenderFlags(hostView), component);\n refreshDirectives();\n refreshDynamicChildren();\n }\n finally {\n leaveView(oldView);\n }\n}\n/**\n * Mark the component as dirty (needing change detection).\n *\n * Marking a component dirty will schedule a change detection on this\n * component at some point in the future. Marking an already dirty\n * component as dirty is a noop. Only one outstanding change detection\n * can be scheduled per component tree. (Two components bootstrapped with\n * separate `renderComponent` will have separate schedulers)\n *\n * When the root component is bootstrapped with `renderComponent`, a scheduler\n * can be provided.\n *\n * @param component Component to mark as dirty.\n */\nfunction markDirty(component) {\n ngDevMode && assertNotNull(component, 'component');\n var lElementNode = _getComponentHostLElementNode(component);\n markViewDirty(lElementNode.view);\n}\n/** A special value which designates that a value has not changed. */\nvar NO_CHANGE = {};\n/**\n * Initializes the binding start index. Will get inlined.\n *\n * This function must be called before any binding related function is called\n * (ie `bind()`, `interpolationX()`, `pureFunctionX()`)\n */\nfunction initBindings() {\n ngDevMode && assertEqual(currentView.bindingStartIndex, -1, 'Binding start index should only be set once, when null');\n ngDevMode && assertEqual(currentView.bindingIndex, -1, 'Binding index should not yet be set ' + currentView.bindingIndex);\n currentView.bindingIndex = currentView.bindingStartIndex = data.length;\n}\n/**\n * Creates a single value binding.\n *\n * @param value Value to diff\n */\nfunction bind(value) {\n if (currentView.bindingStartIndex < 0) {\n initBindings();\n return data[currentView.bindingIndex++] = value;\n }\n var changed = value !== NO_CHANGE && isDifferent(data[currentView.bindingIndex], value);\n if (changed) {\n throwErrorIfNoChangesMode(creationMode, checkNoChangesMode, data[currentView.bindingIndex], value);\n data[currentView.bindingIndex] = value;\n }\n currentView.bindingIndex++;\n return changed ? value : NO_CHANGE;\n}\n/**\n * Create interpolation bindings with a variable number of expressions.\n *\n * If there are 1 to 8 expressions `interpolation1()` to `interpolation8()` should be used instead.\n * Those are faster because there is no need to create an array of expressions and iterate over it.\n *\n * `values`:\n * - has static text at even indexes,\n * - has evaluated expressions at odd indexes.\n *\n * Returns the concatenated string when any of the arguments changes, `NO_CHANGE` otherwise.\n */\nfunction interpolationV(values) {\n ngDevMode && assertLessThan(2, values.length, 'should have at least 3 values');\n ngDevMode && assertEqual(values.length % 2, 1, 'should have an odd number of values');\n var different = false;\n for (var i = 1; i < values.length; i += 2) {\n // Check if bindings (odd indexes) have changed\n bindingUpdated(values[i]) && (different = true);\n }\n if (!different) {\n return NO_CHANGE;\n }\n // Build the updated content\n var content = values[0];\n for (var i = 1; i < values.length; i += 2) {\n content += stringify$1(values[i]) + values[i + 1];\n }\n return content;\n}\n/**\n * Creates an interpolation binding with 1 expression.\n *\n * @param prefix static value used for concatenation only.\n * @param v0 value checked for change.\n * @param suffix static value used for concatenation only.\n */\nfunction interpolation1(prefix, v0, suffix) {\n var different = bindingUpdated(v0);\n return different ? prefix + stringify$1(v0) + suffix : NO_CHANGE;\n}\n/** Creates an interpolation binding with 2 expressions. */\nfunction interpolation2(prefix, v0, i0, v1, suffix) {\n var different = bindingUpdated2(v0, v1);\n return different ? prefix + stringify$1(v0) + i0 + stringify$1(v1) + suffix : NO_CHANGE;\n}\n/** Creates an interpolation bindings with 3 expressions. */\nfunction interpolation3(prefix, v0, i0, v1, i1, v2, suffix) {\n var different = bindingUpdated2(v0, v1);\n different = bindingUpdated(v2) || different;\n return different ? prefix + stringify$1(v0) + i0 + stringify$1(v1) + i1 + stringify$1(v2) + suffix :\n NO_CHANGE;\n}\n/** Create an interpolation binding with 4 expressions. */\nfunction interpolation4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix) {\n var different = bindingUpdated4(v0, v1, v2, v3);\n return different ?\n prefix + stringify$1(v0) + i0 + stringify$1(v1) + i1 + stringify$1(v2) + i2 + stringify$1(v3) +\n suffix :\n NO_CHANGE;\n}\n/** Creates an interpolation binding with 5 expressions. */\nfunction interpolation5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix) {\n var different = bindingUpdated4(v0, v1, v2, v3);\n different = bindingUpdated(v4) || different;\n return different ?\n prefix + stringify$1(v0) + i0 + stringify$1(v1) + i1 + stringify$1(v2) + i2 + stringify$1(v3) + i3 +\n stringify$1(v4) + suffix :\n NO_CHANGE;\n}\n/** Creates an interpolation binding with 6 expressions. */\nfunction interpolation6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix) {\n var different = bindingUpdated4(v0, v1, v2, v3);\n different = bindingUpdated2(v4, v5) || different;\n return different ?\n prefix + stringify$1(v0) + i0 + stringify$1(v1) + i1 + stringify$1(v2) + i2 + stringify$1(v3) + i3 +\n stringify$1(v4) + i4 + stringify$1(v5) + suffix :\n NO_CHANGE;\n}\n/** Creates an interpolation binding with 7 expressions. */\nfunction interpolation7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix) {\n var different = bindingUpdated4(v0, v1, v2, v3);\n different = bindingUpdated2(v4, v5) || different;\n different = bindingUpdated(v6) || different;\n return different ?\n prefix + stringify$1(v0) + i0 + stringify$1(v1) + i1 + stringify$1(v2) + i2 + stringify$1(v3) + i3 +\n stringify$1(v4) + i4 + stringify$1(v5) + i5 + stringify$1(v6) + suffix :\n NO_CHANGE;\n}\n/** Creates an interpolation binding with 8 expressions. */\nfunction interpolation8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix) {\n var different = bindingUpdated4(v0, v1, v2, v3);\n different = bindingUpdated4(v4, v5, v6, v7) || different;\n return different ?\n prefix + stringify$1(v0) + i0 + stringify$1(v1) + i1 + stringify$1(v2) + i2 + stringify$1(v3) + i3 +\n stringify$1(v4) + i4 + stringify$1(v5) + i5 + stringify$1(v6) + i6 + stringify$1(v7) + suffix :\n NO_CHANGE;\n}\n/** Store a value in the `data` at a given `index`. */\nfunction store(index, value) {\n // We don't store any static data for local variables, so the first time\n // we see the template, we should store as null to avoid a sparse array\n if (index >= tData.length) {\n tData[index] = null;\n }\n data[index] = value;\n}\n/** Retrieves a value from the `data`. */\nfunction load(index) {\n ngDevMode && assertDataInRange(index);\n return data[index];\n}\n/** Retrieves a value from the `directives` array. */\nfunction loadDirective(index) {\n ngDevMode && assertNotNull(directives, 'Directives array should be defined if reading a dir.');\n ngDevMode && assertDataInRange(index, (directives));\n return directives[index];\n}\n/** Gets the current binding value and increments the binding index. */\nfunction consumeBinding() {\n ngDevMode && assertDataInRange(currentView.bindingIndex);\n ngDevMode &&\n assertNotEqual(data[currentView.bindingIndex], NO_CHANGE, 'Stored value should never be NO_CHANGE.');\n return data[currentView.bindingIndex++];\n}\n/** Updates binding if changed, then returns whether it was updated. */\nfunction bindingUpdated(value) {\n ngDevMode && assertNotEqual(value, NO_CHANGE, 'Incoming value should never be NO_CHANGE.');\n if (currentView.bindingStartIndex < 0) {\n initBindings();\n }\n else if (isDifferent(data[currentView.bindingIndex], value)) {\n throwErrorIfNoChangesMode(creationMode, checkNoChangesMode, data[currentView.bindingIndex], value);\n }\n else {\n currentView.bindingIndex++;\n return false;\n }\n data[currentView.bindingIndex++] = value;\n return true;\n}\n/** Updates binding if changed, then returns the latest value. */\nfunction checkAndUpdateBinding$1(value) {\n bindingUpdated(value);\n return value;\n}\n/** Updates 2 bindings if changed, then returns whether either was updated. */\nfunction bindingUpdated2(exp1, exp2) {\n var different = bindingUpdated(exp1);\n return bindingUpdated(exp2) || different;\n}\n/** Updates 4 bindings if changed, then returns whether any was updated. */\nfunction bindingUpdated4(exp1, exp2, exp3, exp4) {\n var different = bindingUpdated2(exp1, exp2);\n return bindingUpdated2(exp3, exp4) || different;\n}\nfunction getTView() {\n return currentView.tView;\n}\nfunction getDirectiveInstance(instanceOrArray) {\n // Directives with content queries store an array in directives[directiveIndex]\n // with the instance as the first index\n return Array.isArray(instanceOrArray) ? instanceOrArray[0] : instanceOrArray;\n}\nfunction assertPreviousIsParent() {\n assertEqual(isParent, true, 'previousOrParentNode should be a parent');\n}\nfunction assertHasParent() {\n assertNotNull(previousOrParentNode.parent, 'previousOrParentNode should have a parent');\n}\nfunction assertDataInRange(index, arr) {\n if (arr == null)\n arr = data;\n assertLessThan(index, arr ? arr.length : 0, 'index expected to be a valid data index');\n}\nfunction assertDataNext(index, arr) {\n if (arr == null)\n arr = data;\n assertEqual(arr.length, index, \"index \" + index + \" expected to be at the end of arr (length \" + arr.length + \")\");\n}\nfunction _getComponentHostLElementNode(component) {\n ngDevMode && assertNotNull(component, 'expecting component got null');\n var lElementNode = component[NG_HOST_SYMBOL];\n ngDevMode && assertNotNull(component, 'object is not a component');\n return lElementNode;\n}\nvar CLEAN_PROMISE = _CLEAN_PROMISE;\nvar ROOT_DIRECTIVE_INDICES = _ROOT_DIRECTIVE_INDICES;\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar ViewRef$1 = /** @class */ (function () {\n function ViewRef(_view, context) {\n this._view = _view;\n this.context = (context);\n }\n /** @internal */\n /** @internal */\n ViewRef.prototype._setComponentContext = /** @internal */\n function (view, context) {\n this._view = view;\n this.context = context;\n };\n ViewRef.prototype.destroy = function () { };\n ViewRef.prototype.onDestroy = function (callback) { };\n /**\n * Marks a view and all of its ancestors dirty.\n *\n * It also triggers change detection by calling `scheduleTick` internally, which coalesces\n * multiple `markForCheck` calls to into one change detection run.\n *\n * This can be used to ensure an {@link ChangeDetectionStrategy#OnPush OnPush} component is\n * checked when it needs to be re-rendered but the two normal triggers haven't marked it\n * dirty (i.e. inputs haven't changed and events haven't fired in the view).\n *\n * <!-- TODO: Add a link to a chapter on OnPush components -->\n *\n * ### Example ([live demo](https://stackblitz.com/edit/angular-kx7rrw))\n *\n * ```typescript\n * @Component({\n * selector: 'my-app',\n * template: `Number of ticks: {{numberOfTicks}}`\n * changeDetection: ChangeDetectionStrategy.OnPush,\n * })\n * class AppComponent {\n * numberOfTicks = 0;\n *\n * constructor(private ref: ChangeDetectorRef) {\n * setInterval(() => {\n * this.numberOfTicks++;\n * // the following is required, otherwise the view will not be updated\n * this.ref.markForCheck();\n * }, 1000);\n * }\n * }\n * ```\n */\n /**\n * Marks a view and all of its ancestors dirty.\n *\n * It also triggers change detection by calling `scheduleTick` internally, which coalesces\n * multiple `markForCheck` calls to into one change detection run.\n *\n * This can be used to ensure an {@link ChangeDetectionStrategy#OnPush OnPush} component is\n * checked when it needs to be re-rendered but the two normal triggers haven't marked it\n * dirty (i.e. inputs haven't changed and events haven't fired in the view).\n *\n * <!-- TODO: Add a link to a chapter on OnPush components -->\n *\n * ### Example ([live demo](https://stackblitz.com/edit/angular-kx7rrw))\n *\n * ```typescript\n * @Component({\n * selector: 'my-app',\n * template: `Number of ticks: {{numberOfTicks}}`\n * changeDetection: ChangeDetectionStrategy.OnPush,\n * })\n * class AppComponent {\n * numberOfTicks = 0;\n *\n * constructor(private ref: ChangeDetectorRef) {\n * setInterval(() => {\n * this.numberOfTicks++;\n * // the following is required, otherwise the view will not be updated\n * this.ref.markForCheck();\n * }, 1000);\n * }\n * }\n * ```\n */\n ViewRef.prototype.markForCheck = /**\n * Marks a view and all of its ancestors dirty.\n *\n * It also triggers change detection by calling `scheduleTick` internally, which coalesces\n * multiple `markForCheck` calls to into one change detection run.\n *\n * This can be used to ensure an {@link ChangeDetectionStrategy#OnPush OnPush} component is\n * checked when it needs to be re-rendered but the two normal triggers haven't marked it\n * dirty (i.e. inputs haven't changed and events haven't fired in the view).\n *\n * <!-- TODO: Add a link to a chapter on OnPush components -->\n *\n * ### Example ([live demo](https://stackblitz.com/edit/angular-kx7rrw))\n *\n * ```typescript\n * @Component({\n * selector: 'my-app',\n * template: `Number of ticks: {{numberOfTicks}}`\n * changeDetection: ChangeDetectionStrategy.OnPush,\n * })\n * class AppComponent {\n * numberOfTicks = 0;\n *\n * constructor(private ref: ChangeDetectorRef) {\n * setInterval(() => {\n * this.numberOfTicks++;\n * // the following is required, otherwise the view will not be updated\n * this.ref.markForCheck();\n * }, 1000);\n * }\n * }\n * ```\n */\n function () { markViewDirty(this._view); };\n /**\n * Detaches the view from the change detection tree.\n *\n * Detached views will not be checked during change detection runs until they are\n * re-attached, even if they are dirty. `detach` can be used in combination with\n * {@link ChangeDetectorRef#detectChanges detectChanges} to implement local change\n * detection checks.\n *\n * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->\n *\n * ### Example\n *\n * The following example defines a component with a large list of readonly data.\n * Imagine the data changes constantly, many times per second. For performance reasons,\n * we want to check and update the list every five seconds. We can do that by detaching\n * the component's change detector and doing a local check every five seconds.\n *\n * ```typescript\n * class DataProvider {\n * // in a real application the returned data will be different every time\n * get data() {\n * return [1,2,3,4,5];\n * }\n * }\n *\n * @Component({\n * selector: 'giant-list',\n * template: `\n * <li *ngFor=\"let d of dataProvider.data\">Data {{d}}</li>\n * `,\n * })\n * class GiantList {\n * constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {\n * ref.detach();\n * setInterval(() => {\n * this.ref.detectChanges();\n * }, 5000);\n * }\n * }\n *\n * @Component({\n * selector: 'app',\n * providers: [DataProvider],\n * template: `\n * <giant-list><giant-list>\n * `,\n * })\n * class App {\n * }\n * ```\n */\n /**\n * Detaches the view from the change detection tree.\n *\n * Detached views will not be checked during change detection runs until they are\n * re-attached, even if they are dirty. `detach` can be used in combination with\n * {@link ChangeDetectorRef#detectChanges detectChanges} to implement local change\n * detection checks.\n *\n * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->\n *\n * ### Example\n *\n * The following example defines a component with a large list of readonly data.\n * Imagine the data changes constantly, many times per second. For performance reasons,\n * we want to check and update the list every five seconds. We can do that by detaching\n * the component's change detector and doing a local check every five seconds.\n *\n * ```typescript\n * class DataProvider {\n * // in a real application the returned data will be different every time\n * get data() {\n * return [1,2,3,4,5];\n * }\n * }\n *\n * @Component({\n * selector: 'giant-list',\n * template: `\n * <li *ngFor=\"let d of dataProvider.data\">Data {{d}}</li>\n * `,\n * })\n * class GiantList {\n * constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {\n * ref.detach();\n * setInterval(() => {\n * this.ref.detectChanges();\n * }, 5000);\n * }\n * }\n *\n * @Component({\n * selector: 'app',\n * providers: [DataProvider],\n * template: `\n * <giant-list><giant-list>\n * `,\n * })\n * class App {\n * }\n * ```\n */\n ViewRef.prototype.detach = /**\n * Detaches the view from the change detection tree.\n *\n * Detached views will not be checked during change detection runs until they are\n * re-attached, even if they are dirty. `detach` can be used in combination with\n * {@link ChangeDetectorRef#detectChanges detectChanges} to implement local change\n * detection checks.\n *\n * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->\n *\n * ### Example\n *\n * The following example defines a component with a large list of readonly data.\n * Imagine the data changes constantly, many times per second. For performance reasons,\n * we want to check and update the list every five seconds. We can do that by detaching\n * the component's change detector and doing a local check every five seconds.\n *\n * ```typescript\n * class DataProvider {\n * // in a real application the returned data will be different every time\n * get data() {\n * return [1,2,3,4,5];\n * }\n * }\n *\n * @Component({\n * selector: 'giant-list',\n * template: `\n * <li *ngFor=\"let d of dataProvider.data\">Data {{d}}</li>\n * `,\n * })\n * class GiantList {\n * constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {\n * ref.detach();\n * setInterval(() => {\n * this.ref.detectChanges();\n * }, 5000);\n * }\n * }\n *\n * @Component({\n * selector: 'app',\n * providers: [DataProvider],\n * template: `\n * <giant-list><giant-list>\n * `,\n * })\n * class App {\n * }\n * ```\n */\n function () { this._view.flags &= ~8 /* Attached */; };\n /**\n * Re-attaches a view to the change detection tree.\n *\n * This can be used to re-attach views that were previously detached from the tree\n * using {@link ChangeDetectorRef#detach detach}. Views are attached to the tree by default.\n *\n * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n *\n * ### Example ([live demo](https://stackblitz.com/edit/angular-ymgsxw))\n *\n * The following example creates a component displaying `live` data. The component will detach\n * its change detector from the main change detector tree when the component's live property\n * is set to false.\n *\n * ```typescript\n * class DataProvider {\n * data = 1;\n *\n * constructor() {\n * setInterval(() => {\n * this.data = this.data * 2;\n * }, 500);\n * }\n * }\n *\n * @Component({\n * selector: 'live-data',\n * inputs: ['live'],\n * template: 'Data: {{dataProvider.data}}'\n * })\n * class LiveData {\n * constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {}\n *\n * set live(value) {\n * if (value) {\n * this.ref.reattach();\n * } else {\n * this.ref.detach();\n * }\n * }\n * }\n *\n * @Component({\n * selector: 'my-app',\n * providers: [DataProvider],\n * template: `\n * Live Update: <input type=\"checkbox\" [(ngModel)]=\"live\">\n * <live-data [live]=\"live\"><live-data>\n * `,\n * })\n * class AppComponent {\n * live = true;\n * }\n * ```\n */\n /**\n * Re-attaches a view to the change detection tree.\n *\n * This can be used to re-attach views that were previously detached from the tree\n * using {@link ChangeDetectorRef#detach detach}. Views are attached to the tree by default.\n *\n * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n *\n * ### Example ([live demo](https://stackblitz.com/edit/angular-ymgsxw))\n *\n * The following example creates a component displaying `live` data. The component will detach\n * its change detector from the main change detector tree when the component's live property\n * is set to false.\n *\n * ```typescript\n * class DataProvider {\n * data = 1;\n *\n * constructor() {\n * setInterval(() => {\n * this.data = this.data * 2;\n * }, 500);\n * }\n * }\n *\n * @Component({\n * selector: 'live-data',\n * inputs: ['live'],\n * template: 'Data: {{dataProvider.data}}'\n * })\n * class LiveData {\n * constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {}\n *\n * set live(value) {\n * if (value) {\n * this.ref.reattach();\n * } else {\n * this.ref.detach();\n * }\n * }\n * }\n *\n * @Component({\n * selector: 'my-app',\n * providers: [DataProvider],\n * template: `\n * Live Update: <input type=\"checkbox\" [(ngModel)]=\"live\">\n * <live-data [live]=\"live\"><live-data>\n * `,\n * })\n * class AppComponent {\n * live = true;\n * }\n * ```\n */\n ViewRef.prototype.reattach = /**\n * Re-attaches a view to the change detection tree.\n *\n * This can be used to re-attach views that were previously detached from the tree\n * using {@link ChangeDetectorRef#detach detach}. Views are attached to the tree by default.\n *\n * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n *\n * ### Example ([live demo](https://stackblitz.com/edit/angular-ymgsxw))\n *\n * The following example creates a component displaying `live` data. The component will detach\n * its change detector from the main change detector tree when the component's live property\n * is set to false.\n *\n * ```typescript\n * class DataProvider {\n * data = 1;\n *\n * constructor() {\n * setInterval(() => {\n * this.data = this.data * 2;\n * }, 500);\n * }\n * }\n *\n * @Component({\n * selector: 'live-data',\n * inputs: ['live'],\n * template: 'Data: {{dataProvider.data}}'\n * })\n * class LiveData {\n * constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {}\n *\n * set live(value) {\n * if (value) {\n * this.ref.reattach();\n * } else {\n * this.ref.detach();\n * }\n * }\n * }\n *\n * @Component({\n * selector: 'my-app',\n * providers: [DataProvider],\n * template: `\n * Live Update: <input type=\"checkbox\" [(ngModel)]=\"live\">\n * <live-data [live]=\"live\"><live-data>\n * `,\n * })\n * class AppComponent {\n * live = true;\n * }\n * ```\n */\n function () { this._view.flags |= 8 /* Attached */; };\n /**\n * Checks the view and its children.\n *\n * This can also be used in combination with {@link ChangeDetectorRef#detach detach} to implement\n * local change detection checks.\n *\n * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->\n *\n * ### Example\n *\n * The following example defines a component with a large list of readonly data.\n * Imagine, the data changes constantly, many times per second. For performance reasons,\n * we want to check and update the list every five seconds.\n *\n * We can do that by detaching the component's change detector and doing a local change detection\n * check every five seconds.\n *\n * See {@link ChangeDetectorRef#detach detach} for more information.\n */\n /**\n * Checks the view and its children.\n *\n * This can also be used in combination with {@link ChangeDetectorRef#detach detach} to implement\n * local change detection checks.\n *\n * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->\n *\n * ### Example\n *\n * The following example defines a component with a large list of readonly data.\n * Imagine, the data changes constantly, many times per second. For performance reasons,\n * we want to check and update the list every five seconds.\n *\n * We can do that by detaching the component's change detector and doing a local change detection\n * check every five seconds.\n *\n * See {@link ChangeDetectorRef#detach detach} for more information.\n */\n ViewRef.prototype.detectChanges = /**\n * Checks the view and its children.\n *\n * This can also be used in combination with {@link ChangeDetectorRef#detach detach} to implement\n * local change detection checks.\n *\n * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->\n *\n * ### Example\n *\n * The following example defines a component with a large list of readonly data.\n * Imagine, the data changes constantly, many times per second. For performance reasons,\n * we want to check and update the list every five seconds.\n *\n * We can do that by detaching the component's change detector and doing a local change detection\n * check every five seconds.\n *\n * See {@link ChangeDetectorRef#detach detach} for more information.\n */\n function () { detectChanges(this.context); };\n /**\n * Checks the change detector and its children, and throws if any changes are detected.\n *\n * This is used in development mode to verify that running change detection doesn't\n * introduce other changes.\n */\n /**\n * Checks the change detector and its children, and throws if any changes are detected.\n *\n * This is used in development mode to verify that running change detection doesn't\n * introduce other changes.\n */\n ViewRef.prototype.checkNoChanges = /**\n * Checks the change detector and its children, and throws if any changes are detected.\n *\n * This is used in development mode to verify that running change detection doesn't\n * introduce other changes.\n */\n function () { checkNoChanges(this.context); };\n return ViewRef;\n}());\nvar EmbeddedViewRef$1 = /** @class */ (function (_super) {\n __extends(EmbeddedViewRef, _super);\n function EmbeddedViewRef(viewNode, template, context) {\n var _this = _super.call(this, viewNode.data, context) || this;\n _this._lViewNode = viewNode;\n return _this;\n }\n return EmbeddedViewRef;\n}(ViewRef$1));\n/**\n * Creates a ViewRef bundled with destroy functionality.\n *\n * @param context The context for this view\n * @returns The ViewRef\n */\nfunction createViewRef(view, context) {\n // TODO: add detectChanges back in when implementing ChangeDetectorRef.detectChanges\n return addDestroyable(new ViewRef$1((view), context));\n}\n/**\n * Decorates an object with destroy logic (implementing the DestroyRef interface)\n * and returns the enhanced object.\n *\n * @param obj The object to decorate\n * @returns The object with destroy logic\n */\nfunction addDestroyable(obj) {\n var destroyFn = null;\n obj.destroyed = false;\n obj.destroy = function () {\n destroyFn && destroyFn.forEach(function (fn) { return fn(); });\n this.destroyed = true;\n };\n obj.onDestroy = function (fn) { return (destroyFn || (destroyFn = [])).push(fn); };\n return obj;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * Bootstraps a component, then creates and returns a `ComponentRef` for that component.\n *\n * @param componentType Component to bootstrap\n * @param options Optional parameters which control bootstrapping\n */\n\n// TODO: A hack to not pull in the NullInjector from @angular/core.\n\n/**\n * Bootstraps a Component into an existing host element and returns an instance\n * of the component.\n *\n * Use this function to bootstrap a component into the DOM tree. Each invocation\n * of this function will create a separate tree of components, injectors and\n * change detection cycles and lifetimes. To dynamically insert a new component\n * into an existing tree such that it shares the same injection, change detection\n * and object lifetime, use {@link ViewContainer#createComponent}.\n *\n * @param componentType Component to bootstrap\n * @param options Optional parameters which control bootstrapping\n */\nfunction renderComponent(componentType /* Type as workaround for: Microsoft/TypeScript/issues/4881 */, opts) {\n if (opts === void 0) { opts = {}; }\n ngDevMode && assertComponentType(componentType);\n var rendererFactory = opts.rendererFactory || domRendererFactory3;\n var componentDef = componentType.ngComponentDef;\n if (componentDef.type != componentType)\n componentDef.type = componentType;\n var component;\n // The first index of the first selector is the tag name.\n var componentTag = componentDef.selectors[0][0];\n var hostNode = locateHostElement(rendererFactory, opts.host || componentTag);\n var rootContext = {\n // Incomplete initialization due to circular reference.\n component: (null),\n scheduler: opts.scheduler || requestAnimationFrame.bind(window),\n clean: CLEAN_PROMISE,\n };\n var rootView = createLView(-1, rendererFactory.createRenderer(hostNode, componentDef.rendererType), createTView(null, null), null, rootContext, componentDef.onPush ? 4 /* Dirty */ : 2 /* CheckAlways */);\n rootView.injector = opts.injector || null;\n var oldView = enterView(rootView, (null));\n var elementNode;\n try {\n if (rendererFactory.begin)\n rendererFactory.begin();\n // Create element node at index 0 in data array\n elementNode = hostElement(componentTag, hostNode, componentDef);\n // Create directive instance with factory() and store at index 0 in directives array\n component = rootContext.component = baseDirectiveCreate(0, componentDef.factory(), componentDef);\n initChangeDetectorIfExisting(elementNode.nodeInjector, component, (elementNode.data));\n opts.hostFeatures && opts.hostFeatures.forEach(function (feature) { return feature(component, componentDef); });\n executeInitAndContentHooks();\n setHostBindings(ROOT_DIRECTIVE_INDICES);\n detectChangesInternal(elementNode.data, elementNode, componentDef, component);\n }\n finally {\n leaveView(oldView);\n if (rendererFactory.end)\n rendererFactory.end();\n }\n return component;\n}\n/**\n * Used to enable lifecycle hooks on the root component.\n *\n * Include this feature when calling `renderComponent` if the root component\n * you are rendering has lifecycle hooks defined. Otherwise, the hooks won't\n * be called properly.\n *\n * Example:\n *\n * ```\n * renderComponent(AppComponent, {features: [RootLifecycleHooks]});\n * ```\n */\n\n/**\n * Retrieve the root context for any component by walking the parent `LView` until\n * reaching the root `LView`.\n *\n * @param component any component\n */\nfunction getRootContext(component) {\n var rootContext = getRootView(component).context;\n ngDevMode && assertNotNull(rootContext, 'rootContext');\n return rootContext;\n}\n/**\n * Retrieve the host element of the component.\n *\n * Use this function to retrieve the host element of the component. The host\n * element is the element which the component is associated with.\n *\n * @param component Component for which the host element should be retrieved.\n */\n\n/**\n * Retrieves the rendered text for a given component.\n *\n * This function retrieves the host element of a component and\n * and then returns the `textContent` for that element. This implies\n * that the text returned will include re-projected content of\n * the component as well.\n *\n * @param component The component to return the content text for.\n */\n\n/**\n * Wait on component until it is rendered.\n *\n * This function returns a `Promise` which is resolved when the component's\n * change detection is executed. This is determined by finding the scheduler\n * associated with the `component`'s render tree and waiting until the scheduler\n * flushes. If nothing is scheduled, the function returns a resolved promise.\n *\n * Example:\n * ```\n * await whenRendered(myComponent);\n * ```\n *\n * @param component Component to wait upon\n * @returns Promise which resolves when the component is rendered.\n */\nfunction whenRendered(component) {\n return getRootContext(component).clean;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * If a directive is diPublic, bloomAdd sets a property on the instance 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 */\nvar NG_ELEMENT_ID = '__NG_ELEMENT_ID__';\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 */\nvar BLOOM_SIZE = 256;\n/** Counter used to generate unique IDs for directives. */\nvar nextNgElementId = 0;\n/**\n * Registers this directive as present in its node's injector by flipping the directive's\n * corresponding bit in the injector's bloom filter.\n *\n * @param injector The node injector in which the directive should be registered\n * @param type The directive to register\n */\nfunction bloomAdd(injector, type) {\n var id = type[NG_ELEMENT_ID];\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 // This means that after 255, some directives will share slots, leading to some false positives\n // when checking for a directive's presence.\n var bloomBit = id % BLOOM_SIZE;\n // Create a mask that targets the specific bit associated with the directive.\n // JS bit operations are 32 bits, so this will be a number between 2^0 and 2^31, corresponding\n // to bit positions 0 - 31 in a 32 bit integer.\n var mask = 1 << bloomBit;\n // Use the raw bloomBit number to determine which bloom filter bucket we should check\n // e.g: bf0 = [0 - 31], bf1 = [32 - 63], bf2 = [64 - 95], bf3 = [96 - 127], etc\n if (bloomBit < 128) {\n // Then use the mask to flip on the bit (0-31) associated with the directive in that bucket\n bloomBit < 64 ? (bloomBit < 32 ? (injector.bf0 |= mask) : (injector.bf1 |= mask)) :\n (bloomBit < 96 ? (injector.bf2 |= mask) : (injector.bf3 |= mask));\n }\n else {\n bloomBit < 192 ? (bloomBit < 160 ? (injector.bf4 |= mask) : (injector.bf5 |= mask)) :\n (bloomBit < 224 ? (injector.bf6 |= mask) : (injector.bf7 |= mask));\n }\n}\nfunction getOrCreateNodeInjector() {\n ngDevMode && assertPreviousIsParent();\n return getOrCreateNodeInjectorForNode(getPreviousOrParentNode());\n}\n/**\n * Creates (or gets an existing) injector for a given element or container.\n *\n * @param node for which an injector should be retrieved / created.\n * @returns Node injector\n */\nfunction getOrCreateNodeInjectorForNode(node) {\n var nodeInjector = node.nodeInjector;\n var parentInjector = node.parent && node.parent.nodeInjector;\n if (nodeInjector != parentInjector) {\n return nodeInjector;\n }\n return node.nodeInjector = {\n parent: parentInjector,\n node: node,\n bf0: 0,\n bf1: 0,\n bf2: 0,\n bf3: 0,\n bf4: 0,\n bf5: 0,\n bf6: 0,\n bf7: 0,\n cbf0: parentInjector == null ? 0 : parentInjector.cbf0 | parentInjector.bf0,\n cbf1: parentInjector == null ? 0 : parentInjector.cbf1 | parentInjector.bf1,\n cbf2: parentInjector == null ? 0 : parentInjector.cbf2 | parentInjector.bf2,\n cbf3: parentInjector == null ? 0 : parentInjector.cbf3 | parentInjector.bf3,\n cbf4: parentInjector == null ? 0 : parentInjector.cbf4 | parentInjector.bf4,\n cbf5: parentInjector == null ? 0 : parentInjector.cbf5 | parentInjector.bf5,\n cbf6: parentInjector == null ? 0 : parentInjector.cbf6 | parentInjector.bf6,\n cbf7: parentInjector == null ? 0 : parentInjector.cbf7 | parentInjector.bf7,\n templateRef: null,\n viewContainerRef: null,\n elementRef: null,\n changeDetectorRef: null\n };\n}\n/**\n * Makes a directive public to the DI system by adding it to an injector's bloom filter.\n *\n * @param di The node injector in which a directive will be added\n * @param def The definition of the directive to be made public\n */\nfunction diPublicInInjector(di, def) {\n bloomAdd(di, def.type);\n}\n/**\n * Makes a directive public to the DI system by adding it to an injector's bloom filter.\n *\n * @param def The definition of the directive to be made public\n */\nfunction diPublic(def) {\n diPublicInInjector(getOrCreateNodeInjector(), def);\n}\nfunction directiveInject(token, flags) {\n if (flags === void 0) { flags = 0 /* Default */; }\n return getOrCreateInjectable(getOrCreateNodeInjector(), token, flags);\n}\n/**\n * Creates an ElementRef and stores it on the injector.\n * Or, if the ElementRef already exists, retrieves the existing ElementRef.\n *\n * @returns The ElementRef instance to use\n */\n\n/**\n * Creates a TemplateRef and stores it on the injector. Or, if the TemplateRef already\n * exists, retrieves the existing TemplateRef.\n *\n * @returns The TemplateRef instance to use\n */\nfunction injectTemplateRef() {\n return getOrCreateTemplateRef(getOrCreateNodeInjector());\n}\n/**\n * Creates a ViewContainerRef and stores it on the injector. Or, if the ViewContainerRef\n * already exists, retrieves the existing ViewContainerRef.\n *\n * @returns The ViewContainerRef instance to use\n */\nfunction injectViewContainerRef() {\n return getOrCreateContainerRef(getOrCreateNodeInjector());\n}\n/** Returns a ChangeDetectorRef (a.k.a. a ViewRef) */\nfunction injectChangeDetectorRef() {\n return getOrCreateChangeDetectorRef(getOrCreateNodeInjector(), null);\n}\n/**\n * Inject static attribute value into directive constructor.\n *\n * This method is used with `factory` functions which are generated as part of\n * `defineDirective` or `defineComponent`. The method retrieves the static value\n * of an attribute. (Dynamic attributes are not supported since they are not resolved\n * at the time of injection and can change over time.)\n *\n * # Example\n * Given:\n * ```\n * @Component(...)\n * class MyComponent {\n * constructor(@Attribute('title') title: string) { ... }\n * }\n * ```\n * When instantiated with\n * ```\n * <my-component title=\"Hello\"></my-component>\n * ```\n *\n * Then factory method generated is:\n * ```\n * MyComponent.ngComponentDef = defineComponent({\n * factory: () => new MyComponent(injectAttribute('title'))\n * ...\n * })\n * ```\n *\n * @experimental\n */\nfunction injectAttribute(attrName) {\n ngDevMode && assertPreviousIsParent();\n var lElement = getPreviousOrParentNode();\n ngDevMode && assertNodeType(lElement, 3 /* Element */);\n var tElement = (lElement.tNode);\n ngDevMode && assertNotNull(tElement, 'expecting tNode');\n var attrs = tElement.attrs;\n if (attrs) {\n for (var i = 0; i < attrs.length; i = i + 2) {\n if (attrs[i] == attrName) {\n return attrs[i + 1];\n }\n }\n }\n return undefined;\n}\n/**\n * Creates a ViewRef and stores it on the injector as ChangeDetectorRef (public alias).\n * Or, if it already exists, retrieves the existing instance.\n *\n * @returns The ChangeDetectorRef to use\n */\nfunction getOrCreateChangeDetectorRef(di, context) {\n if (di.changeDetectorRef)\n return di.changeDetectorRef;\n var currentNode = di.node;\n if (isComponent((currentNode.tNode))) {\n return di.changeDetectorRef = createViewRef(currentNode.data, context);\n }\n else if (currentNode.type === 3 /* Element */) {\n return di.changeDetectorRef = getOrCreateHostChangeDetector(currentNode.view.node);\n }\n return null;\n}\n/** Gets or creates ChangeDetectorRef for the closest host component */\nfunction getOrCreateHostChangeDetector(currentNode) {\n var hostNode = getClosestComponentAncestor(currentNode);\n var hostInjector = hostNode.nodeInjector;\n var existingRef = hostInjector && hostInjector.changeDetectorRef;\n return existingRef ?\n existingRef :\n createViewRef(hostNode.data, hostNode.view\n .directives[hostNode.tNode.flags >> 13 /* DirectiveStartingIndexShift */]);\n}\n/**\n * If the node is an embedded view, traverses up the view tree to return the closest\n * ancestor view that is attached to a component. If it's already a component node,\n * returns itself.\n */\nfunction getClosestComponentAncestor(node) {\n while (node.type === 2 /* View */) {\n node = node.view.node;\n }\n return node;\n}\n/**\n * Searches for an instance of the given directive type up the injector tree and returns\n * that instance if found.\n *\n * Specifically, it gets the bloom filter bit associated with the directive (see bloomHashBit),\n * checks that bit against the bloom filter structure to identify an injector that might have\n * the directive (see bloomFindPossibleInjector), then searches the directives on that injector\n * for a match.\n *\n * If not found, it will propagate up to the next parent injector until the token\n * is found or the top is reached.\n *\n * @param di Node injector where the search should start\n * @param token The directive type to search for\n * @param flags Injection flags (e.g. CheckParent)\n * @returns The instance found\n */\nfunction getOrCreateInjectable(di, token, flags) {\n var bloomHash = bloomHashBit(token);\n // If the token has a bloom hash, then it is a directive that is public to the injection system\n // (diPublic). If there is no hash, fall back to the module injector.\n if (bloomHash === null) {\n var moduleInjector = getPreviousOrParentNode().view.injector;\n var formerInjector = setCurrentInjector(moduleInjector);\n try {\n return inject(token, flags);\n }\n finally {\n setCurrentInjector(formerInjector);\n }\n }\n else {\n var injector = di;\n while (injector) {\n // Get the closest potential matching injector (upwards in the injector tree) that\n // *potentially* has the token.\n injector = bloomFindPossibleInjector(injector, bloomHash);\n // If no injector is found, we *know* that there is no ancestor injector that contains the\n // token, so we abort.\n if (!injector) {\n break;\n }\n // At this point, we have an injector which *may* contain the token, so we step through the\n // directives associated with the injector's corresponding node to get the directive instance.\n var node = injector.node;\n var flags_1 = node.tNode.flags;\n var count = flags_1 & 4095;\n if (count !== 0) {\n var start = flags_1 >> 13;\n var end = start + count;\n var defs = (node.view.tView.directives);\n for (var i = start; i < end; i++) {\n // Get the definition for the directive at this index and, if it is injectable (diPublic),\n // and matches the given token, return the directive instance.\n var directiveDef = defs[i];\n if (directiveDef.type === token && directiveDef.diPublic) {\n return getDirectiveInstance(node.view.directives[i]);\n }\n }\n }\n // If we *didn't* find the directive for the token and we are searching the current node's\n // injector, it's possible the directive is on this node and hasn't been created yet.\n var instance = void 0;\n if (injector === di && (instance = searchMatchesQueuedForCreation(node, token))) {\n return instance;\n }\n // The def wasn't found anywhere on this node, so it might be a false positive.\n // Traverse up the tree and continue searching.\n injector = injector.parent;\n }\n }\n // No directive was found for the given token.\n // TODO: implement optional, check-self, and check-parent.\n throw new Error('Implement');\n}\nfunction searchMatchesQueuedForCreation(node, token) {\n var matches = node.view.tView.currentMatches;\n if (matches) {\n for (var i = 0; i < matches.length; i += 2) {\n var def = matches[i];\n if (def.type === token) {\n return resolveDirective(def, i + 1, matches, node.view.tView);\n }\n }\n }\n return null;\n}\n/**\n * Given a directive type, this function returns the bit in an injector's bloom filter\n * that should be used to determine whether or not the directive is present.\n *\n * When the directive was added to the bloom filter, it was given a unique ID that can be\n * retrieved on the class. Since there are only BLOOM_SIZE slots per bloom filter, the directive's\n * ID must be modulo-ed by BLOOM_SIZE to get the correct bloom bit (directives share slots after\n * BLOOM_SIZE is reached).\n *\n * @param type The directive type\n * @returns The bloom bit to check for the directive\n */\nfunction bloomHashBit(type) {\n var id = type[NG_ELEMENT_ID];\n return typeof id === 'number' ? id % BLOOM_SIZE : null;\n}\n/**\n * Finds the closest injector that might have a certain directive.\n *\n * Each directive corresponds to a bit in an injector's bloom filter. Given the bloom bit to\n * check and a starting injector, this function traverses up injectors until it finds an\n * injector that contains a 1 for that bit in its bloom filter. A 1 indicates that the\n * injector may have that directive. It only *may* have the directive because directives begin\n * to share bloom filter bits after the BLOOM_SIZE is reached, and it could correspond to a\n * different directive sharing the bit.\n *\n * Note: We can skip checking further injectors up the tree if an injector's cbf structure\n * has a 0 for that bloom bit. Since cbf contains the merged value of all the parent\n * injectors, a 0 in the bloom bit indicates that the parents definitely do not contain\n * the directive and do not need to be checked.\n *\n * @param injector The starting node injector to check\n * @param bloomBit The bit to check in each injector's bloom filter\n * @returns An injector that might have the directive\n */\nfunction bloomFindPossibleInjector(startInjector, bloomBit) {\n // Create a mask that targets the specific bit associated with the directive we're looking for.\n // JS bit operations are 32 bits, so this will be a number between 2^0 and 2^31, corresponding\n // to bit positions 0 - 31 in a 32 bit integer.\n var mask = 1 << bloomBit;\n // Traverse up the injector tree until we find a potential match or until we know there *isn't* a\n // match.\n var injector = startInjector;\n while (injector) {\n // Our bloom filter size is 256 bits, which is eight 32-bit bloom filter buckets:\n // bf0 = [0 - 31], bf1 = [32 - 63], bf2 = [64 - 95], bf3 = [96 - 127], etc.\n // Get the bloom filter value from the appropriate bucket based on the directive's bloomBit.\n var value = void 0;\n if (bloomBit < 128) {\n value = bloomBit < 64 ? (bloomBit < 32 ? injector.bf0 : injector.bf1) :\n (bloomBit < 96 ? injector.bf2 : injector.bf3);\n }\n else {\n value = bloomBit < 192 ? (bloomBit < 160 ? injector.bf4 : injector.bf5) :\n (bloomBit < 224 ? injector.bf6 : injector.bf7);\n }\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 if ((value & mask) === mask) {\n return injector;\n }\n // If the current injector does not have the directive, check the bloom filters for the ancestor\n // injectors (cbf0 - cbf7). These filters capture *all* ancestor injectors.\n if (bloomBit < 128) {\n value = bloomBit < 64 ? (bloomBit < 32 ? injector.cbf0 : injector.cbf1) :\n (bloomBit < 96 ? injector.cbf2 : injector.cbf3);\n }\n else {\n value = bloomBit < 192 ? (bloomBit < 160 ? injector.cbf4 : injector.cbf5) :\n (bloomBit < 224 ? injector.cbf6 : injector.cbf7);\n }\n // If the ancestor bloom filter value has the bit corresponding to the directive, traverse up to\n // find the specific injector. If the ancestor bloom filter does not have the bit, we can abort.\n injector = (value & mask) ? injector.parent : null;\n }\n return null;\n}\nvar ReadFromInjectorFn = /** @class */ (function () {\n function ReadFromInjectorFn(read) {\n this.read = read;\n }\n return ReadFromInjectorFn;\n}());\n/**\n * Creates an ElementRef for a given node injector and stores it on the injector.\n * Or, if the ElementRef already exists, retrieves the existing ElementRef.\n *\n * @param di The node injector where we should store a created ElementRef\n * @returns The ElementRef instance to use\n */\nfunction getOrCreateElementRef(di) {\n return di.elementRef || (di.elementRef = new ElementRef$1(di.node.type === 0 /* Container */ ? null : di.node.native));\n}\n\n\n\n\n/** A ref to a node's native element. */\nvar ElementRef$1 = /** @class */ (function () {\n function ElementRef(nativeElement) {\n this.nativeElement = nativeElement;\n }\n return ElementRef;\n}());\n/**\n * Creates a ViewContainerRef and stores it on the injector. Or, if the ViewContainerRef\n * already exists, retrieves the existing ViewContainerRef.\n *\n * @returns The ViewContainerRef instance to use\n */\nfunction getOrCreateContainerRef(di) {\n if (!di.viewContainerRef) {\n var vcRefHost = di.node;\n ngDevMode && assertNodeOfPossibleTypes(vcRefHost, 0 /* Container */, 3 /* Element */);\n var lContainer = createLContainer((vcRefHost.parent), vcRefHost.view);\n var lContainerNode = createLNodeObject(0 /* Container */, vcRefHost.view, (vcRefHost.parent), undefined, lContainer, null);\n vcRefHost.dynamicLContainerNode = lContainerNode;\n addToViewTree(vcRefHost.view, lContainer);\n di.viewContainerRef = new ViewContainerRef$1(lContainerNode);\n }\n return di.viewContainerRef;\n}\n/**\n * A ref to a container that enables adding and removing views from that container\n * imperatively.\n */\nvar ViewContainerRef$1 = /** @class */ (function () {\n function ViewContainerRef(_lContainerNode) {\n this._lContainerNode = _lContainerNode;\n this._viewRefs = [];\n }\n ViewContainerRef.prototype.clear = function () {\n var lContainer = this._lContainerNode.data;\n while (lContainer.views.length) {\n this.remove(0);\n }\n };\n ViewContainerRef.prototype.get = function (index) { return this._viewRefs[index] || null; };\n Object.defineProperty(ViewContainerRef.prototype, \"length\", {\n get: function () {\n var lContainer = this._lContainerNode.data;\n return lContainer.views.length;\n },\n enumerable: true,\n configurable: true\n });\n ViewContainerRef.prototype.createEmbeddedView = function (templateRef, context, index) {\n var viewRef = templateRef.createEmbeddedView(context || {});\n this.insert(viewRef, index);\n return viewRef;\n };\n ViewContainerRef.prototype.createComponent = function (componentFactory, index, injector, projectableNodes, ngModule) {\n throw notImplemented();\n };\n ViewContainerRef.prototype.insert = function (viewRef, index) {\n var lViewNode = viewRef._lViewNode;\n var adjustedIdx = this._adjustIndex(index);\n insertView(this._lContainerNode, lViewNode, adjustedIdx);\n // invalidate cache of next sibling RNode (we do similar operation in the containerRefreshEnd\n // instruction)\n this._lContainerNode.native = undefined;\n this._viewRefs.splice(adjustedIdx, 0, viewRef);\n lViewNode.parent = this._lContainerNode;\n // If the view is dynamic (has a template), it needs to be counted both at the container\n // level and at the node above the container.\n if (lViewNode.data.template !== null) {\n // Increment the container view count.\n this._lContainerNode.data.dynamicViewCount++;\n // Look for the parent node and increment its dynamic view count.\n if (this._lContainerNode.parent !== null && this._lContainerNode.parent.data !== null) {\n ngDevMode && assertNodeOfPossibleTypes(this._lContainerNode.parent, 2 /* View */, 3 /* Element */);\n this._lContainerNode.parent.data.dynamicViewCount++;\n }\n }\n return viewRef;\n };\n ViewContainerRef.prototype.move = function (viewRef, newIndex) {\n var index = this.indexOf(viewRef);\n this.detach(index);\n this.insert(viewRef, this._adjustIndex(newIndex));\n return viewRef;\n };\n ViewContainerRef.prototype.indexOf = function (viewRef) { return this._viewRefs.indexOf(viewRef); };\n ViewContainerRef.prototype.remove = function (index) {\n this.detach(index);\n // TODO(ml): proper destroy of the ViewRef, i.e. recursively destroy the LviewNode and its\n // children, delete DOM nodes and QueryList, trigger hooks (onDestroy), destroy the renderer,\n // detach projected nodes\n };\n ViewContainerRef.prototype.detach = function (index) {\n var adjustedIdx = this._adjustIndex(index, -1);\n removeView(this._lContainerNode, adjustedIdx);\n return this._viewRefs.splice(adjustedIdx, 1)[0] || null;\n };\n ViewContainerRef.prototype._adjustIndex = function (index, shift) {\n if (shift === void 0) { shift = 0; }\n if (index == null) {\n return this._lContainerNode.data.views.length + shift;\n }\n if (ngDevMode) {\n assertGreaterThan(index, -1, 'index must be positive');\n // +1 because it's legal to insert at the end.\n assertLessThan(index, this._lContainerNode.data.views.length + 1 + shift, 'index');\n }\n return index;\n };\n return ViewContainerRef;\n}());\n/**\n * Creates a TemplateRef and stores it on the injector. Or, if the TemplateRef already\n * exists, retrieves the existing TemplateRef.\n *\n * @param di The node injector where we should store a created TemplateRef\n * @returns The TemplateRef instance to use\n */\nfunction getOrCreateTemplateRef(di) {\n ngDevMode && assertNodeType(di.node, 0 /* Container */);\n var data = di.node.data;\n var tView = di.node.view.tView;\n return di.templateRef || (di.templateRef = new TemplateRef$1(getOrCreateElementRef(di), (data.template), getRenderer(), tView.directiveRegistry, tView.pipeRegistry));\n}\nvar TemplateRef$1 = /** @class */ (function () {\n function TemplateRef(elementRef, template, _renderer, _directives, _pipes) {\n this._renderer = _renderer;\n this._directives = _directives;\n this._pipes = _pipes;\n this.elementRef = elementRef;\n this._template = template;\n }\n TemplateRef.prototype.createEmbeddedView = function (context) {\n var viewNode = renderEmbeddedTemplate(null, this._template, context, this._renderer, this._directives, this._pipes);\n return addDestroyable(new EmbeddedViewRef$1(viewNode, this._template, context));\n };\n return TemplateRef;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Create a component definition object.\n *\n *\n * # Example\n * ```\n * class MyDirective {\n * // Generated by Angular Template Compiler\n * // [Symbol] syntax will not be supported by TypeScript until v2.7\n * static ngComponentDef = defineComponent({\n * ...\n * });\n * }\n * ```\n */\nfunction defineComponent(componentDefinition) {\n var type = componentDefinition.type;\n var pipeTypes = (componentDefinition.pipes);\n var directiveTypes = (componentDefinition.directives);\n var def = {\n type: type,\n diPublic: null,\n factory: componentDefinition.factory,\n template: componentDefinition.template || (null),\n hostBindings: componentDefinition.hostBindings || null,\n attributes: componentDefinition.attributes || null,\n inputs: invertObject(componentDefinition.inputs),\n outputs: invertObject(componentDefinition.outputs),\n rendererType: resolveRendererType2(componentDefinition.rendererType) || null,\n exportAs: componentDefinition.exportAs,\n onInit: type.prototype.ngOnInit || null,\n doCheck: type.prototype.ngDoCheck || null,\n afterContentInit: type.prototype.ngAfterContentInit || null,\n afterContentChecked: type.prototype.ngAfterContentChecked || null,\n afterViewInit: type.prototype.ngAfterViewInit || null,\n afterViewChecked: type.prototype.ngAfterViewChecked || null,\n onDestroy: type.prototype.ngOnDestroy || null,\n onPush: componentDefinition.changeDetection === exports.ChangeDetectionStrategy.OnPush,\n directiveDefs: directiveTypes ?\n function () {\n return (typeof directiveTypes === 'function' ? directiveTypes() : directiveTypes)\n .map(extractDirectiveDef);\n } :\n null,\n pipeDefs: pipeTypes ?\n function () { return (typeof pipeTypes === 'function' ? pipeTypes() : pipeTypes).map(extractPipeDef); } :\n null,\n selectors: componentDefinition.selectors\n };\n var feature = componentDefinition.features;\n feature && feature.forEach(function (fn) { return fn(def); });\n return def;\n}\nfunction extractDirectiveDef(type) {\n var def = type.ngComponentDef || type.ngDirectiveDef;\n if (ngDevMode && !def) {\n throw new Error(\"'\" + type.name + \"' is neither 'ComponentType' or 'DirectiveType'.\");\n }\n return def;\n}\nfunction extractPipeDef(type) {\n var def = type.ngPipeDef;\n if (ngDevMode && !def) {\n throw new Error(\"'\" + type.name + \"' is not a 'PipeType'.\");\n }\n return def;\n}\nvar PRIVATE_PREFIX = '__ngOnChanges_';\n/**\n * Creates an NgOnChangesFeature function for a component's features list.\n *\n * It accepts an optional map of minified input property names to original property names,\n * if any input properties have a public alias.\n *\n * The NgOnChangesFeature function that is returned decorates a component with support for\n * the ngOnChanges lifecycle hook, so it should be included in any component that implements\n * that hook.\n *\n * Example usage:\n *\n * ```\n * static ngComponentDef = defineComponent({\n * ...\n * inputs: {name: 'publicName'},\n * features: [NgOnChangesFeature({name: 'name'})]\n * });\n * ```\n *\n * @param inputPropertyNames Map of input property names, if they are aliased\n * @returns DirectiveDefFeature\n */\nfunction NgOnChangesFeature(inputPropertyNames) {\n return function (definition) {\n var inputs = definition.inputs;\n var proto = definition.type.prototype;\n // Place where we will store SimpleChanges if there is a change\n Object.defineProperty(proto, PRIVATE_PREFIX, { value: undefined, writable: true });\n var _loop_1 = function (pubKey) {\n var minKey = inputs[pubKey];\n var propertyName = inputPropertyNames && inputPropertyNames[minKey] || pubKey;\n var privateMinKey = PRIVATE_PREFIX + minKey;\n // Create a place where the actual value will be stored and make it non-enumerable\n Object.defineProperty(proto, privateMinKey, { value: undefined, writable: true });\n var existingDesc = Object.getOwnPropertyDescriptor(proto, minKey);\n // create a getter and setter for property\n Object.defineProperty(proto, minKey, {\n get: function () {\n return (existingDesc && existingDesc.get) ? existingDesc.get.call(this) :\n this[privateMinKey];\n },\n set: function (value) {\n var simpleChanges = this[PRIVATE_PREFIX];\n var isFirstChange = simpleChanges === undefined;\n if (simpleChanges == null) {\n simpleChanges = this[PRIVATE_PREFIX] = {};\n }\n simpleChanges[propertyName] = new SimpleChange(this[privateMinKey], value, isFirstChange);\n (existingDesc && existingDesc.set) ? existingDesc.set.call(this, value) :\n this[privateMinKey] = value;\n }\n });\n };\n for (var pubKey in inputs) {\n _loop_1(pubKey);\n }\n // If an onInit hook is defined, it will need to wrap the ngOnChanges call\n // so the call order is changes-init-check in creation mode. In subsequent\n // change detection runs, only the check wrapper will be called.\n if (definition.onInit != null) {\n definition.onInit = onChangesWrapper(definition.onInit);\n }\n definition.doCheck = onChangesWrapper(definition.doCheck);\n };\n function onChangesWrapper(delegateHook) {\n return function () {\n var simpleChanges = this[PRIVATE_PREFIX];\n if (simpleChanges != null) {\n this.ngOnChanges(simpleChanges);\n this[PRIVATE_PREFIX] = null;\n }\n delegateHook && delegateHook.apply(this);\n };\n }\n}\nfunction PublicFeature(definition) {\n definition.diPublic = diPublic;\n}\nvar EMPTY$1 = {};\n/** Swaps the keys and values of an object. */\nfunction invertObject(obj) {\n if (obj == null)\n return EMPTY$1;\n var newObj = {};\n for (var minifiedKey in obj) {\n newObj[obj[minifiedKey]] = minifiedKey;\n }\n return newObj;\n}\n/**\n * Create a directive definition object.\n *\n * # Example\n * ```\n * class MyDirective {\n * // Generated by Angular Template Compiler\n * // [Symbol] syntax will not be supported by TypeScript until v2.7\n * static ngDirectiveDef = defineDirective({\n * ...\n * });\n * }\n * ```\n */\nvar defineDirective = defineComponent;\n/**\n * Create a pipe definition object.\n *\n * # Example\n * ```\n * class MyPipe implements PipeTransform {\n * // Generated by Angular Template Compiler\n * static ngPipeDef = definePipe({\n * ...\n * });\n * }\n * ```\n * @param pipeDef Pipe definition generated by the compiler\n */\nfunction definePipe(pipeDef) {\n return {\n name: pipeDef.name,\n n: pipeDef.factory,\n pure: pipeDef.pure !== false,\n onDestroy: pipeDef.type.prototype.ngOnDestroy || null\n };\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * If the value hasn't been saved, calls the pure function to store and return the\n * value. If it has been saved, returns the saved value.\n *\n * @param pureFn Function that returns a value\n * @returns value\n */\nfunction pureFunction0(pureFn, thisArg) {\n return getCreationMode() ? checkAndUpdateBinding$1(thisArg ? pureFn.call(thisArg) : pureFn()) :\n consumeBinding();\n}\n/**\n * If the value of the provided exp has changed, calls the pure function to return\n * an updated value. Or if the value has not changed, returns cached value.\n *\n * @param pureFn Function that returns an updated value\n * @param exp Updated expression value\n * @returns Updated value\n */\nfunction pureFunction1(pureFn, exp, thisArg) {\n return bindingUpdated(exp) ?\n checkAndUpdateBinding$1(thisArg ? pureFn.call(thisArg, exp) : pureFn(exp)) :\n consumeBinding();\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param pureFn\n * @param exp1\n * @param exp2\n * @returns Updated value\n */\nfunction pureFunction2(pureFn, exp1, exp2, thisArg) {\n return bindingUpdated2(exp1, exp2) ?\n checkAndUpdateBinding$1(thisArg ? pureFn.call(thisArg, exp1, exp2) : pureFn(exp1, exp2)) :\n consumeBinding();\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @returns Updated value\n */\nfunction pureFunction3(pureFn, exp1, exp2, exp3, thisArg) {\n var different = bindingUpdated2(exp1, exp2);\n return bindingUpdated(exp3) || different ?\n checkAndUpdateBinding$1(thisArg ? pureFn.call(thisArg, exp1, exp2, exp3) : pureFn(exp1, exp2, exp3)) :\n consumeBinding();\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @returns Updated value\n */\nfunction pureFunction4(pureFn, exp1, exp2, exp3, exp4, thisArg) {\n return bindingUpdated4(exp1, exp2, exp3, exp4) ?\n checkAndUpdateBinding$1(thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4) : pureFn(exp1, exp2, exp3, exp4)) :\n consumeBinding();\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @returns Updated value\n */\nfunction pureFunction5(pureFn, exp1, exp2, exp3, exp4, exp5, thisArg) {\n var different = bindingUpdated4(exp1, exp2, exp3, exp4);\n return bindingUpdated(exp5) || different ?\n checkAndUpdateBinding$1(thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5) :\n pureFn(exp1, exp2, exp3, exp4, exp5)) :\n consumeBinding();\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param exp6\n * @returns Updated value\n */\nfunction pureFunction6(pureFn, exp1, exp2, exp3, exp4, exp5, exp6, thisArg) {\n var different = bindingUpdated4(exp1, exp2, exp3, exp4);\n return bindingUpdated2(exp5, exp6) || different ?\n checkAndUpdateBinding$1(thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6) :\n pureFn(exp1, exp2, exp3, exp4, exp5, exp6)) :\n consumeBinding();\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param exp6\n * @param exp7\n * @returns Updated value\n */\nfunction pureFunction7(pureFn, exp1, exp2, exp3, exp4, exp5, exp6, exp7, thisArg) {\n var different = bindingUpdated4(exp1, exp2, exp3, exp4);\n different = bindingUpdated2(exp5, exp6) || different;\n return bindingUpdated(exp7) || different ?\n checkAndUpdateBinding$1(thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6, exp7) :\n pureFn(exp1, exp2, exp3, exp4, exp5, exp6, exp7)) :\n consumeBinding();\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param exp6\n * @param exp7\n * @param exp8\n * @returns Updated value\n */\nfunction pureFunction8(pureFn, exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8, thisArg) {\n var different = bindingUpdated4(exp1, exp2, exp3, exp4);\n return bindingUpdated4(exp5, exp6, exp7, exp8) || different ?\n checkAndUpdateBinding$1(thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8) :\n pureFn(exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8)) :\n consumeBinding();\n}\n/**\n * pureFunction instruction that can support any number of bindings.\n *\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param pureFn A pure function that takes binding values and builds an object or array\n * containing those values.\n * @param exp An array of binding values\n * @returns Updated value\n */\nfunction pureFunctionV(pureFn, exps, thisArg) {\n var different = false;\n for (var i = 0; i < exps.length; i++) {\n bindingUpdated(exps[i]) && (different = true);\n }\n return different ? checkAndUpdateBinding$1(pureFn.apply(thisArg, exps)) : consumeBinding();\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Create a pipe.\n *\n * @param index Pipe index where the pipe will be stored.\n * @param pipeName The name of the pipe\n * @returns T the instance of the pipe.\n */\nfunction pipe(index, pipeName) {\n var tView = getTView();\n var pipeDef;\n if (tView.firstTemplatePass) {\n pipeDef = getPipeDef(pipeName, tView.pipeRegistry);\n tView.data[index] = pipeDef;\n if (pipeDef.onDestroy) {\n (tView.pipeDestroyHooks || (tView.pipeDestroyHooks = [])).push(index, pipeDef.onDestroy);\n }\n }\n else {\n pipeDef = tView.data[index];\n }\n var pipeInstance = pipeDef.n();\n store(index, pipeInstance);\n return pipeInstance;\n}\n/**\n * Searches the pipe registry for a pipe with the given name. If one is found,\n * returns the pipe. Otherwise, an error is thrown because the pipe cannot be resolved.\n *\n * @param name Name of pipe to resolve\n * @param registry Full list of available pipes\n * @returns Matching PipeDef\n */\nfunction getPipeDef(name, registry) {\n if (registry) {\n for (var i = 0; i < registry.length; i++) {\n var pipeDef = registry[i];\n if (name === pipeDef.name) {\n return pipeDef;\n }\n }\n }\n throw new Error(\"Pipe with name '\" + name + \"' not found!\");\n}\n/**\n * Invokes a pipe with 1 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param v1 1st argument to {@link PipeTransform#transform}.\n */\nfunction pipeBind1(index, v1) {\n var pipeInstance = load(index);\n return isPure(index) ? pureFunction1(pipeInstance.transform, v1, pipeInstance) :\n pipeInstance.transform(v1);\n}\n/**\n * Invokes a pipe with 2 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param v1 1st argument to {@link PipeTransform#transform}.\n * @param v2 2nd argument to {@link PipeTransform#transform}.\n */\nfunction pipeBind2(index, v1, v2) {\n var pipeInstance = load(index);\n return isPure(index) ? pureFunction2(pipeInstance.transform, v1, v2, pipeInstance) :\n pipeInstance.transform(v1, v2);\n}\n/**\n * Invokes a pipe with 3 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param v1 1st argument to {@link PipeTransform#transform}.\n * @param v2 2nd argument to {@link PipeTransform#transform}.\n * @param v3 4rd argument to {@link PipeTransform#transform}.\n */\nfunction pipeBind3(index, v1, v2, v3) {\n var pipeInstance = load(index);\n return isPure(index) ? pureFunction3(pipeInstance.transform.bind(pipeInstance), v1, v2, v3) :\n pipeInstance.transform(v1, v2, v3);\n}\n/**\n * Invokes a pipe with 4 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param v1 1st argument to {@link PipeTransform#transform}.\n * @param v2 2nd argument to {@link PipeTransform#transform}.\n * @param v3 3rd argument to {@link PipeTransform#transform}.\n * @param v4 4th argument to {@link PipeTransform#transform}.\n */\nfunction pipeBind4(index, v1, v2, v3, v4) {\n var pipeInstance = load(index);\n return isPure(index) ? pureFunction4(pipeInstance.transform, v1, v2, v3, v4, pipeInstance) :\n pipeInstance.transform(v1, v2, v3, v4);\n}\n/**\n * Invokes a pipe with variable number of arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param values Array of arguments to pass to {@link PipeTransform#transform} method.\n */\nfunction pipeBindV(index, values) {\n var pipeInstance = load(index);\n return isPure(index) ? pureFunctionV(pipeInstance.transform, values, pipeInstance) :\n pipeInstance.transform.apply(pipeInstance, values);\n}\nfunction isPure(index) {\n return getTView().data[index].pure;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar LQueries_ = /** @class */ (function () {\n function LQueries_(deep) {\n this.shallow = null;\n this.deep = null;\n this.deep = deep == null ? null : deep;\n }\n LQueries_.prototype.track = function (queryList, predicate, descend, read) {\n // TODO(misko): This is not right. In case of inherited state, a calling track will incorrectly\n // mutate parent.\n if (descend) {\n this.deep = createQuery$1(this.deep, queryList, predicate, read != null ? read : null);\n }\n else {\n this.shallow = createQuery$1(this.shallow, queryList, predicate, read != null ? read : null);\n }\n };\n LQueries_.prototype.child = function () {\n if (this.deep === null) {\n // if we don't have any deep queries then no need to track anything more.\n return null;\n }\n if (this.shallow === null) {\n // DeepQuery: We can reuse the current state if the child state would be same as current\n // state.\n return this;\n }\n else {\n // We need to create new state\n return new LQueries_(this.deep);\n }\n };\n LQueries_.prototype.container = function () {\n var result = null;\n var query = this.deep;\n while (query) {\n var containerValues = []; // prepare room for views\n query.values.push(containerValues);\n var clonedQuery = { next: null, list: query.list, predicate: query.predicate, values: containerValues };\n clonedQuery.next = result;\n result = clonedQuery;\n query = query.next;\n }\n return result ? new LQueries_(result) : null;\n };\n LQueries_.prototype.enterView = function (index) {\n var result = null;\n var query = this.deep;\n while (query) {\n var viewValues = []; // prepare room for view nodes\n query.values.splice(index, 0, viewValues);\n var clonedQuery = { next: null, list: query.list, predicate: query.predicate, values: viewValues };\n clonedQuery.next = result;\n result = clonedQuery;\n query = query.next;\n }\n return result ? new LQueries_(result) : null;\n };\n LQueries_.prototype.addNode = function (node) {\n add(this.shallow, node);\n add(this.deep, node);\n };\n LQueries_.prototype.removeView = function (index) {\n var query = this.deep;\n while (query) {\n var removed = query.values.splice(index, 1);\n // mark a query as dirty only when removed view had matching modes\n ngDevMode && assertEqual(removed.length, 1, 'removed.length');\n if (removed[0].length) {\n query.list.setDirty();\n }\n query = query.next;\n }\n };\n return LQueries_;\n}());\n/**\n * Iterates over local names for a given node and returns directive index\n * (or -1 if a local name points to an element).\n *\n * @param tNode static data of a node to check\n * @param selector selector to match\n * @returns directive index, -1 or null if a selector didn't match any of the local names\n */\nfunction getIdxOfMatchingSelector(tNode, selector) {\n var localNames = tNode.localNames;\n if (localNames) {\n for (var i = 0; i < localNames.length; i += 2) {\n if (localNames[i] === selector) {\n return localNames[i + 1];\n }\n }\n }\n return null;\n}\n/**\n * Iterates over all the directives for a node and returns index of a directive for a given type.\n *\n * @param node Node on which directives are present.\n * @param type Type of a directive to look for.\n * @returns Index of a found directive or null when none found.\n */\nfunction getIdxOfMatchingDirective(node, type) {\n var defs = (node.view.tView.directives);\n var flags = node.tNode.flags;\n var count = flags & 4095;\n var start = flags >> 13;\n var end = start + count;\n for (var i = start; i < end; i++) {\n var def = defs[i];\n if (def.type === type && def.diPublic) {\n return i;\n }\n }\n return null;\n}\nfunction readFromNodeInjector(nodeInjector, node, read, directiveIdx) {\n if (read instanceof ReadFromInjectorFn) {\n return read.read(nodeInjector, node, directiveIdx);\n }\n else {\n var matchingIdx = getIdxOfMatchingDirective(node, read);\n if (matchingIdx !== null) {\n return node.view.directives[matchingIdx];\n }\n }\n return null;\n}\nfunction add(query, node) {\n var nodeInjector = getOrCreateNodeInjectorForNode(node);\n while (query) {\n var predicate = query.predicate;\n var type = predicate.type;\n if (type) {\n var directiveIdx = getIdxOfMatchingDirective(node, type);\n if (directiveIdx !== null) {\n // a node is matching a predicate - determine what to read\n // if read token and / or strategy is not specified, use type as read token\n var result = readFromNodeInjector(nodeInjector, node, predicate.read || type, directiveIdx);\n if (result !== null) {\n addMatch(query, result);\n }\n }\n }\n else {\n var selector = (predicate.selector);\n for (var i = 0; i < selector.length; i++) {\n ngDevMode && assertNotNull(node.tNode, 'node.tNode');\n var directiveIdx = getIdxOfMatchingSelector((node.tNode), selector[i]);\n if (directiveIdx !== null) {\n // a node is matching a predicate - determine what to read\n // note that queries using name selector must specify read strategy\n ngDevMode && assertNotNull(predicate.read, 'the node should have a predicate');\n var result = readFromNodeInjector(nodeInjector, node, (predicate.read), directiveIdx);\n if (result !== null) {\n addMatch(query, result);\n }\n }\n }\n }\n query = query.next;\n }\n}\nfunction addMatch(query, matchingValue) {\n query.values.push(matchingValue);\n query.list.setDirty();\n}\nfunction createPredicate(predicate, read) {\n var isArray = Array.isArray(predicate);\n return {\n type: isArray ? null : predicate,\n selector: isArray ? predicate : null,\n read: read\n };\n}\nfunction createQuery$1(previous, queryList, predicate, read) {\n return {\n next: previous,\n list: queryList,\n predicate: createPredicate(predicate, read),\n values: queryList._valuesTree\n };\n}\nvar QueryList_ = /** @class */ (function () {\n function QueryList_() {\n this.dirty = true;\n this.changes = new EventEmitter();\n this._values = [];\n /** @internal */\n this._valuesTree = [];\n }\n Object.defineProperty(QueryList_.prototype, \"length\", {\n get: function () { return this._values.length; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(QueryList_.prototype, \"first\", {\n get: function () {\n var values = this._values;\n return values.length ? values[0] : null;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(QueryList_.prototype, \"last\", {\n get: function () {\n var values = this._values;\n return values.length ? values[values.length - 1] : null;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * See\n * [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)\n */\n /**\n * See\n * [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)\n */\n QueryList_.prototype.map = /**\n * See\n * [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)\n */\n function (fn) { return this._values.map(fn); };\n /**\n * See\n * [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)\n */\n /**\n * See\n * [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)\n */\n QueryList_.prototype.filter = /**\n * See\n * [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)\n */\n function (fn) {\n return this._values.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 /**\n * See\n * [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)\n */\n QueryList_.prototype.find = /**\n * See\n * [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)\n */\n function (fn) {\n return this._values.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 /**\n * See\n * [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)\n */\n QueryList_.prototype.reduce = /**\n * See\n * [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)\n */\n function (fn, init) {\n return this._values.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 /**\n * See\n * [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)\n */\n QueryList_.prototype.forEach = /**\n * See\n * [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)\n */\n function (fn) { this._values.forEach(fn); };\n /**\n * See\n * [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)\n */\n /**\n * See\n * [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)\n */\n QueryList_.prototype.some = /**\n * See\n * [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)\n */\n function (fn) {\n return this._values.some(fn);\n };\n QueryList_.prototype.toArray = function () { return this._values.slice(0); };\n QueryList_.prototype[getSymbolIterator()] = function () { return this._values[getSymbolIterator()](); };\n QueryList_.prototype.toString = function () { return this._values.toString(); };\n QueryList_.prototype.reset = function (res) {\n this._values = flatten$1(res);\n this.dirty = false;\n };\n QueryList_.prototype.notifyOnChanges = function () { this.changes.emit(this); };\n QueryList_.prototype.setDirty = function () { this.dirty = true; };\n QueryList_.prototype.destroy = function () {\n this.changes.complete();\n this.changes.unsubscribe();\n };\n return QueryList_;\n}());\nvar QueryList$1 = QueryList_;\n/**\n * Creates and returns a QueryList.\n *\n * @param memoryIndex The index in memory where the QueryList should be saved. If null,\n * this is is a content query and the QueryList will be saved later through directiveCreate.\n * @param predicate The type for which the query will search\n * @param descend Whether or not to descend into children\n * @param read What to save in the query\n * @returns QueryList<T>\n */\nfunction query(memoryIndex, predicate, descend, read) {\n ngDevMode && assertPreviousIsParent();\n var queryList = new QueryList$1();\n var queries = getCurrentQueries(LQueries_);\n queries.track(queryList, predicate, descend, read);\n if (memoryIndex != null) {\n store(memoryIndex, queryList);\n }\n return queryList;\n}\n/**\n * Refreshes a query by combining matches from all active views and removing matches from deleted\n * views.\n * Returns true if a query got dirty during change detection, false otherwise.\n */\nfunction queryRefresh(queryList) {\n var queryListImpl = queryList;\n if (queryList.dirty) {\n queryList.reset(queryListImpl._valuesTree);\n queryList.notifyOnChanges();\n return true;\n }\n return false;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar BRAND = '__SANITIZER_TRUSTED_BRAND__';\n/**\n * An `html` sanitizer which converts untrusted `html` **string** into trusted string by removing\n * dangerous content.\n *\n * This method parses the `html` and locates potentially dangerous content (such as urls and\n * javascript) and removes it.\n *\n * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustHtml}.\n *\n * @param unsafeHtml untrusted `html`, typically from the user.\n * @returns `html` string which is safe to display to user, because all of the dangerous javascript\n * and urls have been removed.\n */\nfunction sanitizeHtml(unsafeHtml) {\n if (unsafeHtml instanceof String && unsafeHtml[BRAND] === 'Html') {\n return unsafeHtml.toString();\n }\n return _sanitizeHtml(document, stringify$1(unsafeHtml));\n}\n/**\n * A `style` sanitizer which converts untrusted `style` **string** into trusted string by removing\n * dangerous content.\n *\n * This method parses the `style` and locates potentially dangerous content (such as urls and\n * javascript) and removes it.\n *\n * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustStyle}.\n *\n * @param unsafeStyle untrusted `style`, typically from the user.\n * @returns `style` string which is safe to bind to the `style` properties, because all of the\n * dangerous javascript and urls have been removed.\n */\nfunction sanitizeStyle(unsafeStyle) {\n if (unsafeStyle instanceof String && unsafeStyle[BRAND] === 'Style') {\n return unsafeStyle.toString();\n }\n return _sanitizeStyle(stringify$1(unsafeStyle));\n}\n/**\n * A `url` sanitizer which converts untrusted `url` **string** into trusted string by removing\n * dangerous\n * content.\n *\n * This method parses the `url` and locates potentially dangerous content (such as javascript) and\n * removes it.\n *\n * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustUrl}.\n *\n * @param unsafeUrl untrusted `url`, typically from the user.\n * @returns `url` string which is safe to bind to the `src` properties such as `<img src>`, because\n * all of the dangerous javascript has been removed.\n */\nfunction sanitizeUrl(unsafeUrl) {\n if (unsafeUrl instanceof String && unsafeUrl[BRAND] === 'Url') {\n return unsafeUrl.toString();\n }\n return _sanitizeUrl(stringify$1(unsafeUrl));\n}\n/**\n * A `url` sanitizer which only lets trusted `url`s through.\n *\n * This passes only `url`s marked trusted by calling {@link bypassSanitizationTrustResourceUrl}.\n *\n * @param unsafeResourceUrl untrusted `url`, typically from the user.\n * @returns `url` string which is safe to bind to the `src` properties such as `<img src>`, because\n * only trusted `url`s have been allowed to pass.\n */\nfunction sanitizeResourceUrl(unsafeResourceUrl) {\n if (unsafeResourceUrl instanceof String &&\n unsafeResourceUrl[BRAND] === 'ResourceUrl') {\n return unsafeResourceUrl.toString();\n }\n throw new Error('unsafe value used in a resource URL context (see http://g.co/ng/security#xss)');\n}\n/**\n * A `script` sanitizer which only lets trusted javascript through.\n *\n * This passes only `script`s marked trusted by calling {@link bypassSanitizationTrustScript}.\n *\n * @param unsafeScript untrusted `script`, typically from the user.\n * @returns `url` string which is safe to bind to the `<script>` element such as `<img src>`,\n * because only trusted `scripts`s have been allowed to pass.\n */\n\n/**\n * Mark `html` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link htmlSanitizer} to be trusted implicitly.\n *\n * @param trustedHtml `html` string which needs to be implicitly trusted.\n * @returns a `html` `String` which has been branded to be implicitly trusted.\n */\nfunction bypassSanitizationTrustHtml(trustedHtml) {\n return bypassSanitizationTrustString(trustedHtml, 'Html');\n}\n/**\n * Mark `style` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link styleSanitizer} to be trusted implicitly.\n *\n * @param trustedStyle `style` string which needs to be implicitly trusted.\n * @returns a `style` `String` which has been branded to be implicitly trusted.\n */\nfunction bypassSanitizationTrustStyle(trustedStyle) {\n return bypassSanitizationTrustString(trustedStyle, 'Style');\n}\n/**\n * Mark `script` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link scriptSanitizer} to be trusted implicitly.\n *\n * @param trustedScript `script` string which needs to be implicitly trusted.\n * @returns a `script` `String` which has been branded to be implicitly trusted.\n */\nfunction bypassSanitizationTrustScript(trustedScript) {\n return bypassSanitizationTrustString(trustedScript, 'Script');\n}\n/**\n * Mark `url` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link urlSanitizer} to be trusted implicitly.\n *\n * @param trustedUrl `url` string which needs to be implicitly trusted.\n * @returns a `url` `String` which has been branded to be implicitly trusted.\n */\nfunction bypassSanitizationTrustUrl(trustedUrl) {\n return bypassSanitizationTrustString(trustedUrl, 'Url');\n}\n/**\n * Mark `url` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link resourceUrlSanitizer} to be trusted implicitly.\n *\n * @param trustedResourceUrl `url` string which needs to be implicitly trusted.\n * @returns a `url` `String` which has been branded to be implicitly trusted.\n */\nfunction bypassSanitizationTrustResourceUrl(trustedResourceUrl) {\n return bypassSanitizationTrustString(trustedResourceUrl, 'ResourceUrl');\n}\nfunction bypassSanitizationTrustString(trustedString, mode) {\n var trusted = new String(trustedString);\n trusted[BRAND] = mode;\n return trusted;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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// clang-format on\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// This file only reexports content of the `src` folder. Keep it that way.\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexports.ɵangular_packages_core_core_j = _iterableDiffersFactory;\nexports.ɵangular_packages_core_core_k = _keyValueDiffersFactory;\nexports.ɵangular_packages_core_core_l = _localeFactory;\nexports.ɵangular_packages_core_core_f = _appIdRandomProviderFactory;\nexports.ɵangular_packages_core_core_g = defaultKeyValueDiffers;\nexports.ɵangular_packages_core_core_h = DefaultIterableDifferFactory;\nexports.ɵangular_packages_core_core_i = DefaultKeyValueDifferFactory;\nexports.ɵangular_packages_core_core_c = ReflectiveInjector_;\nexports.ɵangular_packages_core_core_d = ReflectiveDependency;\nexports.ɵangular_packages_core_core_e = resolveReflectiveProviders;\nexports.ɵangular_packages_core_core_m = wtfEnabled;\nexports.ɵangular_packages_core_core_o = createScope;\nexports.ɵangular_packages_core_core_n = detectWTF;\nexports.ɵangular_packages_core_core_r = endTimeRange;\nexports.ɵangular_packages_core_core_p = leave;\nexports.ɵangular_packages_core_core_q = startTimeRange;\nexports.ɵangular_packages_core_core_v = getOrCreateChangeDetectorRef;\nexports.ɵangular_packages_core_core_x = getOrCreateContainerRef;\nexports.ɵangular_packages_core_core_w = getOrCreateInjectable;\nexports.ɵangular_packages_core_core_u = getOrCreateNodeInjector;\nexports.ɵangular_packages_core_core_y = getOrCreateTemplateRef;\nexports.ɵangular_packages_core_core_bb = bindingUpdated;\nexports.ɵangular_packages_core_core_bd = bindingUpdated2;\nexports.ɵangular_packages_core_core_be = bindingUpdated4;\nexports.ɵangular_packages_core_core_bc = checkAndUpdateBinding$1;\nexports.ɵangular_packages_core_core_ba = consumeBinding;\nexports.ɵangular_packages_core_core_z = getCreationMode;\nexports.ɵangular_packages_core_core_a = makeParamDecorator;\nexports.ɵangular_packages_core_core_b = makePropDecorator;\nexports.ɵangular_packages_core_core_s = _def;\nexports.ɵangular_packages_core_core_t = DebugContext;\nexports.createPlatform = createPlatform;\nexports.assertPlatform = assertPlatform;\nexports.destroyPlatform = destroyPlatform;\nexports.getPlatform = getPlatform;\nexports.PlatformRef = PlatformRef;\nexports.ApplicationRef = ApplicationRef;\nexports.enableProdMode = enableProdMode;\nexports.isDevMode = isDevMode;\nexports.createPlatformFactory = createPlatformFactory;\nexports.NgProbeToken = NgProbeToken;\nexports.APP_ID = APP_ID;\nexports.PACKAGE_ROOT_URL = PACKAGE_ROOT_URL;\nexports.PLATFORM_INITIALIZER = PLATFORM_INITIALIZER;\nexports.PLATFORM_ID = PLATFORM_ID;\nexports.APP_BOOTSTRAP_LISTENER = APP_BOOTSTRAP_LISTENER;\nexports.APP_INITIALIZER = APP_INITIALIZER;\nexports.ApplicationInitStatus = ApplicationInitStatus;\nexports.DebugElement = DebugElement;\nexports.DebugNode = DebugNode;\nexports.asNativeElements = asNativeElements;\nexports.getDebugNode = getDebugNode;\nexports.Testability = Testability;\nexports.TestabilityRegistry = TestabilityRegistry;\nexports.setTestabilityGetter = setTestabilityGetter;\nexports.TRANSLATIONS = TRANSLATIONS;\nexports.TRANSLATIONS_FORMAT = TRANSLATIONS_FORMAT;\nexports.LOCALE_ID = LOCALE_ID;\nexports.ApplicationModule = ApplicationModule;\nexports.wtfCreateScope = wtfCreateScope;\nexports.wtfLeave = wtfLeave;\nexports.wtfStartTimeRange = wtfStartTimeRange;\nexports.wtfEndTimeRange = wtfEndTimeRange;\nexports.Type = Type;\nexports.EventEmitter = EventEmitter;\nexports.ErrorHandler = ErrorHandler;\nexports.Sanitizer = Sanitizer;\nexports.ANALYZE_FOR_ENTRY_COMPONENTS = ANALYZE_FOR_ENTRY_COMPONENTS;\nexports.Attribute = Attribute;\nexports.ContentChild = ContentChild;\nexports.ContentChildren = ContentChildren;\nexports.Query = Query;\nexports.ViewChild = ViewChild;\nexports.ViewChildren = ViewChildren;\nexports.Component = Component;\nexports.Directive = Directive;\nexports.HostBinding = HostBinding;\nexports.HostListener = HostListener;\nexports.Input = Input;\nexports.Output = Output;\nexports.Pipe = Pipe;\nexports.CUSTOM_ELEMENTS_SCHEMA = CUSTOM_ELEMENTS_SCHEMA;\nexports.NO_ERRORS_SCHEMA = NO_ERRORS_SCHEMA;\nexports.NgModule = NgModule;\nexports.Version = Version;\nexports.VERSION = VERSION;\nexports.defineInjectable = defineInjectable;\nexports.defineInjector = defineInjector;\nexports.forwardRef = forwardRef;\nexports.resolveForwardRef = resolveForwardRef;\nexports.Injectable = Injectable;\nexports.inject = inject;\nexports.INJECTOR = INJECTOR;\nexports.Injector = Injector;\nexports.ReflectiveInjector = ReflectiveInjector;\nexports.createInjector = createInjector;\nexports.ResolvedReflectiveFactory = ResolvedReflectiveFactory;\nexports.ReflectiveKey = ReflectiveKey;\nexports.InjectionToken = InjectionToken;\nexports.Inject = Inject;\nexports.Optional = Optional;\nexports.Self = Self;\nexports.SkipSelf = SkipSelf;\nexports.Host = Host;\nexports.NgZone = NgZone;\nexports.RenderComponentType = RenderComponentType;\nexports.Renderer = Renderer;\nexports.Renderer2 = Renderer2;\nexports.RendererFactory2 = RendererFactory2;\nexports.RootRenderer = RootRenderer;\nexports.COMPILER_OPTIONS = COMPILER_OPTIONS;\nexports.Compiler = Compiler;\nexports.CompilerFactory = CompilerFactory;\nexports.ModuleWithComponentFactories = ModuleWithComponentFactories;\nexports.ComponentFactory = ComponentFactory;\nexports.ComponentRef = ComponentRef;\nexports.ComponentFactoryResolver = ComponentFactoryResolver;\nexports.ElementRef = ElementRef;\nexports.NgModuleFactory = NgModuleFactory;\nexports.NgModuleRef = NgModuleRef;\nexports.NgModuleFactoryLoader = NgModuleFactoryLoader;\nexports.getModuleFactory = getModuleFactory;\nexports.QueryList = QueryList;\nexports.SystemJsNgModuleLoader = SystemJsNgModuleLoader;\nexports.SystemJsNgModuleLoaderConfig = SystemJsNgModuleLoaderConfig;\nexports.TemplateRef = TemplateRef;\nexports.ViewContainerRef = ViewContainerRef;\nexports.EmbeddedViewRef = EmbeddedViewRef;\nexports.ViewRef = ViewRef;\nexports.ChangeDetectorRef = ChangeDetectorRef;\nexports.DefaultIterableDiffer = DefaultIterableDiffer;\nexports.IterableDiffers = IterableDiffers;\nexports.KeyValueDiffers = KeyValueDiffers;\nexports.SimpleChange = SimpleChange;\nexports.WrappedValue = WrappedValue;\nexports.platformCore = platformCore;\nexports.ɵALLOW_MULTIPLE_PLATFORMS = ALLOW_MULTIPLE_PLATFORMS;\nexports.ɵAPP_ID_RANDOM_PROVIDER = APP_ID_RANDOM_PROVIDER;\nexports.ɵdefaultIterableDiffers = defaultIterableDiffers;\nexports.ɵdevModeEqual = devModeEqual;\nexports.ɵisListLikeIterable = isListLikeIterable;\nexports.ɵisDefaultChangeDetectionStrategy = isDefaultChangeDetectionStrategy;\nexports.ɵConsole = Console;\nexports.ɵinject = inject;\nexports.ɵsetCurrentInjector = setCurrentInjector;\nexports.ɵAPP_ROOT = APP_ROOT;\nexports.ɵComponentFactory = ComponentFactory;\nexports.ɵCodegenComponentFactoryResolver = CodegenComponentFactoryResolver;\nexports.ɵReflectionCapabilities = ReflectionCapabilities;\nexports.ɵRenderDebugInfo = RenderDebugInfo;\nexports.ɵ_sanitizeHtml = _sanitizeHtml;\nexports.ɵ_sanitizeStyle = _sanitizeStyle;\nexports.ɵ_sanitizeUrl = _sanitizeUrl;\nexports.ɵglobal = _global;\nexports.ɵlooseIdentical = looseIdentical;\nexports.ɵstringify = stringify;\nexports.ɵmakeDecorator = makeDecorator;\nexports.ɵisObservable = isObservable;\nexports.ɵisPromise = isPromise;\nexports.ɵclearOverrides = clearOverrides;\nexports.ɵoverrideComponentView = overrideComponentView;\nexports.ɵoverrideProvider = overrideProvider;\nexports.ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR = NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR;\nexports.ɵdefineComponent = defineComponent;\nexports.ɵdefineDirective = defineDirective;\nexports.ɵdefinePipe = definePipe;\nexports.ɵdetectChanges = detectChanges;\nexports.ɵrenderComponent = renderComponent;\nexports.ɵdirectiveInject = directiveInject;\nexports.ɵinjectTemplateRef = injectTemplateRef;\nexports.ɵinjectViewContainerRef = injectViewContainerRef;\nexports.ɵinjectChangeDetectorRef = injectChangeDetectorRef;\nexports.ɵinjectAttribute = injectAttribute;\nexports.ɵPublicFeature = PublicFeature;\nexports.ɵNgOnChangesFeature = NgOnChangesFeature;\nexports.ɵmarkDirty = markDirty;\nexports.ɵNC = NO_CHANGE;\nexports.ɵC = container;\nexports.ɵE = elementStart;\nexports.ɵL = listener;\nexports.ɵT = text;\nexports.ɵV = embeddedViewStart;\nexports.ɵQ = query;\nexports.ɵd = loadDirective;\nexports.ɵP = projection;\nexports.ɵb = bind;\nexports.ɵi1 = interpolation1;\nexports.ɵi2 = interpolation2;\nexports.ɵi3 = interpolation3;\nexports.ɵi4 = interpolation4;\nexports.ɵi5 = interpolation5;\nexports.ɵi6 = interpolation6;\nexports.ɵi7 = interpolation7;\nexports.ɵi8 = interpolation8;\nexports.ɵiV = interpolationV;\nexports.ɵpb1 = pipeBind1;\nexports.ɵpb2 = pipeBind2;\nexports.ɵpb3 = pipeBind3;\nexports.ɵpb4 = pipeBind4;\nexports.ɵpbV = pipeBindV;\nexports.ɵf0 = pureFunction0;\nexports.ɵf1 = pureFunction1;\nexports.ɵf2 = pureFunction2;\nexports.ɵf3 = pureFunction3;\nexports.ɵf4 = pureFunction4;\nexports.ɵf5 = pureFunction5;\nexports.ɵf6 = pureFunction6;\nexports.ɵf7 = pureFunction7;\nexports.ɵf8 = pureFunction8;\nexports.ɵfV = pureFunctionV;\nexports.ɵcR = containerRefreshStart;\nexports.ɵcr = containerRefreshEnd;\nexports.ɵqR = queryRefresh;\nexports.ɵe = elementEnd;\nexports.ɵp = elementProperty;\nexports.ɵpD = projectionDef;\nexports.ɵa = elementAttribute;\nexports.ɵs = elementStyle;\nexports.ɵsn = elementStyleNamed;\nexports.ɵk = elementClass;\nexports.ɵkn = elementClassNamed;\nexports.ɵt = textBinding;\nexports.ɵv = embeddedViewEnd;\nexports.ɵst = store;\nexports.ɵld = load;\nexports.ɵPp = pipe;\nexports.ɵwhenRendered = whenRendered;\nexports.ɵbypassSanitizationTrustHtml = bypassSanitizationTrustHtml;\nexports.ɵbypassSanitizationTrustStyle = bypassSanitizationTrustStyle;\nexports.ɵbypassSanitizationTrustScript = bypassSanitizationTrustScript;\nexports.ɵbypassSanitizationTrustUrl = bypassSanitizationTrustUrl;\nexports.ɵbypassSanitizationTrustResourceUrl = bypassSanitizationTrustResourceUrl;\nexports.ɵsanitizeHtml = sanitizeHtml;\nexports.ɵsanitizeStyle = sanitizeStyle;\nexports.ɵsanitizeUrl = sanitizeUrl;\nexports.ɵsanitizeResourceUrl = sanitizeResourceUrl;\nexports.ɵregisterModuleFactory = registerModuleFactory;\nexports.ɵEMPTY_ARRAY = EMPTY_ARRAY$2;\nexports.ɵEMPTY_MAP = EMPTY_MAP;\nexports.ɵand = anchorDef;\nexports.ɵccf = createComponentFactory;\nexports.ɵcmf = createNgModuleFactory;\nexports.ɵcrt = createRendererType2;\nexports.ɵdid = directiveDef;\nexports.ɵeld = elementDef;\nexports.ɵelementEventFullName = elementEventFullName;\nexports.ɵgetComponentViewDefinitionFactory = getComponentViewDefinitionFactory;\nexports.ɵinlineInterpolate = inlineInterpolate;\nexports.ɵinterpolate = interpolate;\nexports.ɵmod = moduleDef;\nexports.ɵmpd = moduleProvideDef;\nexports.ɵncd = ngContentDef;\nexports.ɵnov = nodeValue;\nexports.ɵpid = pipeDef;\nexports.ɵprd = providerDef;\nexports.ɵpad = pureArrayDef;\nexports.ɵpod = pureObjectDef;\nexports.ɵppd = purePipeDef;\nexports.ɵqud = queryDef;\nexports.ɵted = textDef;\nexports.ɵunv = unwrapValue;\nexports.ɵvid = viewDef;\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\n})));\n//# sourceMappingURL=core.umd.js.map\n"]}
1
+ {"version":3,"sources":["packages/core/core.umd.js"],"names":["global","factory","exports","module","require","define","amd","ng","core","rxjs","operators","this","extendStatics","Object","setPrototypeOf","__proto__","Array","d","b","p","hasOwnProperty","__extends","__","constructor","prototype","create","__assign","assign","t","s","i","n","arguments","length","call","__values","o","m","Symbol","iterator","next","value","done","__read","r","e","ar","push","error","__spread","concat","defineInjectable","opts","providedIn","undefined","defineInjector","options","providers","imports","InjectionToken","_desc","ngMetadataName","ngInjectableDef","toString","ANNOTATIONS","PARAMETERS","PROP_METADATA","makeDecorator","name","props","parentClass","chainFn","typeFn","metaCtor","makeMetadataCtor","DecoratorFactory","args","_i","apply","_a","annotationInstance","bind","TypeDecorator","cls","defineProperty","annotationCls","ctor","values","propName","makeParamDecorator","ParamDecoratorFactory","ParamDecorator","annotation","unusedKey","index","parameters","makePropDecorator","PropDecoratorFactory","decoratorInstance","PropDecorator","target","meta","unshift","ChangeDetectionStrategy","ChangeDetectorStatus","Query","ANALYZE_FOR_ENTRY_COMPONENTS","Attribute","attributeName","ContentChildren","selector","data","first","isViewQuery","descendants","ContentChild","ViewChildren","ViewChild","ɵChangeDetectorStatus","Directive","dir","Component","c","changeDetection","Default","Pipe","pure","Input","bindingPropertyName","Output","HostBinding","hostPropertyName","HostListener","eventName","Type","Function","isType","v","__window","window","__self","self","WorkerGlobalScope","__global","_global","promise","Promise","resolve","_symbolIterator","getSymbolIterator","Symbol_1","keys","getOwnPropertyNames","Map","key","scheduleMicroTask","fn","Zone","then","current","looseIdentical","a","isNaN","stringify","token","map","join","overriddenName","res","newLineIndex","indexOf","substring","DELEGATE_CTOR","INHERITED_CLASS","INHERITED_CLASS_WITH_CTOR","ReflectionCapabilities","reflect","_reflect","isReflectionEnabled","_zipTypesAndAnnotations","paramTypes","paramAnnotations","result","_ownParameters","type","parentCtor","typeStr","exec","tsickleCtorParams","ctorParameters","paramTypes_1","ctorParam","paramAnnotations_1","convertTsickleDecoratorIntoMetadata","decorators","getOwnMetadata","fill","getParentCtor","_ownAnnotations","typeOrFunc","annotations","ownAnnotations","_ownPropMetadata","propMetadata","propDecorators","propDecorators_1","propMetadata_1","forEach","prop","parentPropMetadata_1","ownPropMetadata","hasLifecycleHook","lcProperty","guards","getter","setter","method","importUri","resourceUri","resolveIdentifier","moduleUrl","members","runtime","resolveEnum","enumIdentifier","decoratorInvocations","decoratorInvocation","parentProto","getPrototypeOf","forwardRef","forwardRefFn","__forward_ref__","resolveForwardRef","Inject","Optional","Self","SkipSelf","Host","SOURCE","_THROW_IF_NOT_FOUND","THROW_IF_NOT_FOUND","INJECTOR","NullInjector","get","notFoundValue","Error","Injector","parent","isArray","StaticInjector","NULL","inject","IDENT","EMPTY","CIRCULAR","MULTI_PROVIDER_FN","slice","GET_PROPERTY_NAME$1","USE_VALUE$1","getClosureSafeProperty$1","objWithPropertyToExtract","provide","String","useValue","NULL_INJECTOR","NEW_LINE","NO_NEW_LINE","source","records","_records","set","deps","useNew","recursivelyProcessProviders","provider","staticError","resolvedProvider","resolveProvider","computeDeps","providerDeps","j","useExisting","useFactory","useClass","multi","multiProvider","multiProviderMixError","record","flags","tryResolveToken","resolveToken","depRecords","depRecord","childRecord","tokenPath","message","formatError","tokens","text","obj","charAt","substr","context","parts","JSON","replace","_currentInjector","setCurrentInjector","injector","former","injectableDef","injectArgs","types","arg","GET_PROPERTY_NAME","USE_VALUE","getClosureSafeProperty","EMPTY_ARRAY","convertInjectableProviderToFactory","deps_1","reflectionCapabilities","valueProvider_1","existingProvider_1","factoryProvider_1","classProvider_1","deps_2","deps_3","ViewEncapsulation","Injectable","injectableType","NgModule","ngModule","moduleType","metadata","ngInjectorDef","Version","VERSION","full","major","split","minor","patch","ERROR_DEBUG_CONTEXT","ERROR_ORIGINAL_ERROR","ERROR_LOGGER","getDebugContext","getOriginalError","defaultErrorLogger","console","ErrorHandler","_console","handleError","originalError","_findOriginalError","_findContext","errorLogger","getErrorLogger","constructResolvingPath","findFirstClosedCycle","reverse","k","injectionError","constructResolvingMessage","errMsg","wrappedError","msg","addKey","injectors","noAnnotationError","params","signature","ii","parameter","ReflectiveKey","id","displayName","_globalKeyRegistry","numberOfKeys","enumerable","configurable","KeyRegistry","_allKeys","has","newKey","size","reflector","Reflector","updateCapabilities","caps","identifier","ReflectiveDependency","optional","visibility","fromKey","_EMPTY_LIST","ResolvedReflectiveProvider_","resolvedFactories","resolvedFactory","ResolvedReflectiveFactory","dependencies","resolveReflectiveProvider","resolveReflectiveFactory","factoryFn","resolvedDeps","_dependenciesFor","aliasInstance","constructDependencies","params_1","_extractToken","resolveReflectiveProviders","resolvedProviderMap","mergeResolvedReflectiveProviders","normalizedProvidersMap","existing","_normalizeProviders","invalidProviderError","from","some","_createDependency","paramMetadata","UNDEFINED","ReflectiveInjector","resolveAndCreate","ResolvedReflectiveProviders","fromResolvedProviders","ReflectiveInjector_","_providers","_parent","_constructionCounter","len","keyIds","objs","_getByKey","resolveAndCreateChild","createChildFromResolved","inj","resolveAndInstantiate","instantiateResolved","_instantiateProvider","getProviderAtIndex","outOfBoundsError","_new","_getMaxNumberOfObjects","cyclicDependencyError","_instantiate","ResolvedReflectiveFactory$$1","_this","dep","_getByReflectiveDependency","instantiationError","originalException","originalStack","INJECTOR_KEY","_getByKeySelf","_getByKeyDefault","_getObjByKeyId","keyId","_throwOrNull","noProviderError","inj_","_mapProviders","APP_ROOT","NOT_YET","CIRCULAR$1","EMPTY_ARRAY$1","NULL_INJECTOR$1","getNullInjector","R3Injector","def","injectorDefTypes","Set","onDestroy","destroyed","deepForEach","injectorDef","processInjectorType","makeRecord","isRootInjector","defType","destroy","assertNotDestroyed","service","ngOnDestroy","clear","previousInjector","couldBeInjectableType","injectableDefInScope","injectableDefRecord","hydrate","defOrWrappedDef","parents","add","imported","delete","processProvider","isTypeProvider","providerToRecord","isValueProvider","isExistingProvider","isFactoryProvider","classRef_1","hasDeps","multiRecord_1","hasOnDestroy","input","isPromise","APP_INITIALIZER","ApplicationInitStatus","appInits","initialized","donePromise","rej","reject","runInitializers","asyncInitPromises","complete","initResult","all","catch","APP_ID","_appIdRandomProviderFactory","_randomChar","APP_ID_RANDOM_PROVIDER","fromCharCode","Math","floor","random","PLATFORM_INITIALIZER","PLATFORM_ID","APP_BOOTSTRAP_LISTENER","PACKAGE_ROOT_URL","Console","log","warn","ModuleWithComponentFactories","ngModuleFactory","componentFactories","_throwError","Compiler","compileModuleSync","compileModuleAsync","compileModuleAndAllComponentsSync","compileModuleAndAllComponentsAsync","clearCache","clearCacheFor","COMPILER_OPTIONS","CompilerFactory","ComponentRef","ComponentFactory","noComponentFactoryError","component","ERROR_COMPONENT","trace","events","_NullComponentFactoryResolver","resolveComponentFactory","ComponentFactoryResolver","CodegenComponentFactoryResolver","factories","_ngModule","_factories","componentType","ComponentFactoryBoundToModule","_super","ngContentSelectors","inputs","outputs","projectableNodes","rootSelectorOrNode","NgModuleRef","NgModuleFactory","detectWTF","wtf","createScope","leave","scope","returnValue","leaveScope","startTimeRange","rangeType","action","beginTimeRange","endTimeRange","range","wtfEnabled","noopScope","arg0","arg1","wtfCreateScope","wtfLeave","wtfStartTimeRange","wtfEndTimeRange","EventEmitter","isAsync","__isAsync","emit","subscribe","generatorOrNext","schedulerFn","errorFn","err","completeFn","setTimeout","sink","Subscription","Subject","NgZone","_b","enableLongStackTrace","hasPendingMicrotasks","hasPendingMacrotasks","isStable","onUnstable","onMicrotaskEmpty","onStable","onError","assertZonePatched","_nesting","_outer","_inner","fork","forkInnerZoneWithAngularBehavior","zone","properties","isAngularZone","onInvokeTask","delegate","task","applyThis","applyArgs","onEnter","invokeTask","onLeave","onInvoke","callback","invoke","onHasTask","hasTaskState","hasTask","change","microTask","checkStable","macroTask","onHandleError","runOutsideAngular","isInAngularZone","assertInAngularZone","assertNotInAngularZone","run","runTask","scheduleEventTask","EMPTY_PAYLOAD","noop","cancelTask","runGuarded","_platform","NoopNgZone","Testability","_ngZone","_pendingCount","_isZoneStable","_didWork","_callbacks","_watchAngularEvents","taskTrackingZone","_runCallbacksIfReady","increasePendingRequestCount","decreasePendingRequestCount","cb","pop","clearTimeout","timeoutId","doneCb","pending_1","getPendingTasks","filter","updateCb","macroTasks","isPeriodic","delay","creationLocation","xhr","addCallback","timeout","whenStable","getPendingRequestCount","findProviders","using","exactMatch","TestabilityRegistry","_applications","_testabilityGetter","addToWindow","registerApplication","testability","unregisterApplication","unregisterAllApplications","getTestability","elem","getAllTestabilities","getAllRootElements","findTestabilityInTree","findInAncestors","_NoopGetTestability","registry","_devMode","_runModeLocked","ALLOW_MULTIPLE_PLATFORMS","isDevMode","NgProbeToken","createPlatform","PlatformRef","inits","init","createPlatformFactory","parentPlatformFactory","desc","marker","extraProviders","platform","getPlatform","injectedProviders","assertPlatform","requiredToken","_injector","_modules","_destroyListeners","_destroyed","bootstrapModuleFactory","moduleFactory","ngZone","getNgZone","ngZoneOption","ngZoneInjector","moduleRef","exceptionHandler","remove","_callAndReportToErrorHandler","errorHandler","initStatus","_moduleDoBootstrap","bootstrapModule","compilerOptions","compilerFactory","optionsReducer","createCompiler","appRef","ApplicationRef","_bootstrapComponents","f","bootstrap","instance","ngDoBootstrap","listener","dst","reduce","_zone","_exceptionHandler","_componentFactoryResolver","_initStatus","_bootstrapListeners","_views","_runningTick","_enforceNoNewChanges","_stable","componentTypes","components","tick","isCurrentlyStable","Observable","observer","stableSub","unstableSub","unsubscribe","merge","pipe","share","componentOrFactory","componentFactory","compRef","_unloadComponent","location","nativeElement","_loadComponent","_tickScope","view","detectChanges","checkNoChanges","attachView","viewRef","attachToAppRef","detachView","detachFromAppRef","componentRef","hostView","list","el","splice","RendererStyleFlags2","RenderComponentType","templateUrl","slotCount","encapsulation","styles","animations","RenderDebugInfo","Renderer","RootRenderer","RendererFactory2","Renderer2","ElementRef","NgModuleFactoryLoader","moduleFactories","QueryList","dirty","_results","changes","find","toArray","reset","flatten","flat","item","flatItem","last","notifyOnChanges","setDirty","SystemJsNgModuleLoaderConfig","DEFAULT_CONFIG","factoryPathPrefix","factoryPathSuffix","SystemJsNgModuleLoader","_compiler","config","_config","load","path","loadFactory","loadAndCompile","exportName","System","import","checkNotEmpty","factoryClassSuffix","modulePath","ChangeDetectorRef","TemplateRef","ViewContainerRef","ViewRef","EmbeddedViewRef","EventListener","DebugNode","nativeNode","_debugContext","DebugElement","addChild","listeners","references","providerTokens","attributes","classes","childNodes","child","removeChild","childIndex","insertChildrenAfter","newChildren","siblingIndex","insertBefore","refChild","newChild","refIndex","query","predicate","queryAll","matches","_queryElementChildren","queryAllNodes","_queryNodeChildren","node","triggerEventHandler","eventObj","element","parentNode","_nativeNodeToDebugNode","getDebugNode","indexDebugNode","devModeEqual","isListLikeIterableA","isListLikeIterable","isListLikeIterableB","areIterablesEqual","comparator","iterator1","iterator2","item1","item2","WrappedValue","wrapped","wrap","unwrap","isWrapped","SimpleChange","previousValue","currentValue","firstChange","isFirstChange","isJsObject","DefaultIterableDifferFactory","supports","trackByFn","DefaultIterableDiffer","trackByIdentity","_linkedRecords","_unlinkedRecords","_previousItHead","_itHead","_itTail","_additionsHead","_additionsTail","_movesHead","_movesTail","_removalsHead","_removalsTail","_identityChangesHead","_identityChangesTail","_trackByFn","forEachItem","_next","forEachOperation","nextIt","nextRemove","addRemoveOffset","moveOffsets","currentIndex","getPreviousIndex","adjPreviousIndex","_nextRemoved","previousIndex","localMovePreviousIndex","localCurrentIndex","offset","forEachPreviousItem","_nextPrevious","forEachAddedItem","_nextAdded","forEachMovedItem","_nextMoved","forEachRemovedItem","forEachIdentityChange","_nextIdentityChange","diff","collection","check","_reset","itemTrackBy","mayBeDirty","index_1","trackById","_verifyReinsertion","_addIdentityChange","_mismatch","iterateListLike","_truncate","isDirty","nextRecord","previousRecord","_prev","_remove","_moveAfter","_reinsertAfter","_addAfter","IterableChangeRecord_","reinsertRecord","_addToMoves","_addToRemovals","_unlink","prevRecord","prev","_prevRemoved","_insertAfter","_DuplicateMap","put","toIndex","_prevDup","_nextDup","_DuplicateItemRecordList","_head","_tail","atOrAfterIndex","duplicates","recordList","moveOffset","MissingTranslationStrategy","DefaultKeyValueDifferFactory","DefaultKeyValueDiffer","_mapHead","_appendAfter","_previousMapHead","_changesHead","_changesTail","forEachChangedItem","_nextChanged","_forEach","_maybeAddToChanges","_getOrCreateRecordForKey","_insertBeforeOrAppend","before","record_1","KeyValueChangeRecord_","_addToAdditions","newValue","_addToChanges","IterableDiffers","copied","extend","iterable","getTypeNameForDebugging","KeyValueDiffers","kv","keyValDiff","iterableDiff","defaultIterableDiffers","defaultKeyValueDiffers","platformCore","LOCALE_ID","TRANSLATIONS","TRANSLATIONS_FORMAT","_iterableDiffersFactory","_keyValueDiffersFactory","_localeFactory","locale","ApplicationModule","InertBodyHelper","defaultDoc","inertDocument","implementation","createHTMLDocument","inertBodyElement","body","inertHtml","createElement","appendChild","innerHTML","querySelector","getInertBodyElement","isDOMParserAvailable","DOMParser","getInertBodyElement_DOMParser","getInertBodyElement_InertDocument","getInertBodyElement_XHR","html","encodeURI","XMLHttpRequest","responseType","open","send","response","firstChild","parseFromString","templateEl","documentMode","stripCustomNsAttrs","elAttrs","attrName","removeAttribute","childNode","nodeType","Node","ELEMENT_NODE","nextSibling","SAFE_URL_PATTERN","DATA_URL_PATTERN","_sanitizeUrl","url","match","tagSet","tags","e_1","_c","e_1_1","return","merge$1","sets","e_2","sets_1","sets_1_1","e_2_1","inertBodyHelper","VOID_ELEMENTS","OPTIONAL_END_TAG_BLOCK_ELEMENTS","OPTIONAL_END_TAG_INLINE_ELEMENTS","OPTIONAL_END_TAG_ELEMENTS","BLOCK_ELEMENTS","INLINE_ELEMENTS","VALID_ELEMENTS","URI_ATTRS","SRCSET_ATTRS","HTML_ATTRS","VALID_ATTRS","SanitizingHtmlSerializer","sanitizedSomething","buf","sanitizeChildren","startElement","TEXT_NODE","chars","nodeValue","endElement","checkClobberedElement","tagName","nodeName","toLowerCase","srcset","elAttr","lower","trim","encodeEntities","nextNode","compareDocumentPosition","DOCUMENT_POSITION_CONTAINED_BY","outerHTML","SURROGATE_PAIR_REGEXP","NON_ALPHANUMERIC_REGEXP","charCodeAt","_sanitizeHtml","unsafeHtmlInput","unsafeHtml","mXSSAttempts","parsedHtml","sanitizer","safeHtml","getTemplateContent","parent_1","isTemplateElement","content","SecurityContext","SAFE_STYLE_VALUE","RegExp","URL_RE","_sanitizeStyle","urlMatch","hasBalancedQuotes","outsideSingle","outsideDouble","Sanitizer","shiftInitState","priorInitState","newInitState","state","initState","initIndex","shouldCallLifecycleInitHook","asTextData","nodes","asElementData","asProviderData","asPureExpressionData","asQueryList","DebugContext","Services","setCurrentNode","createRootView","createEmbeddedView","createComponentView","createNgModuleRef","overrideProvider","overrideComponentView","clearOverrides","checkAndUpdateView","checkNoChangesView","destroyView","resolveDep","createDebugContext","handleEvent","updateDirectives","updateRenderer","dirtyParentQueries","expressionChangedAfterItHasBeenCheckedError","oldValue","currValue","isFirstCheck","viewDebugError","_addDebugContext","logError","viewDestroyedError","NOOP","_tokenKeyCache","tokenKey","UNDEFINED_RENDERER_TYPE_ID","EMPTY_RENDERER_TYPE_ID","_renderCompCount","resolveRendererType2","isFilled","None","checkBinding","bindingIdx","oldValues","bindingIndex","checkAndUpdateBinding","checkBindingNoChanges","bindingName","bindings","nodeIndex","markParentViewsForCheck","currView","viewContainerParent","markParentViewsForCheckProjectedViews","endView","dispatchEvent","event","componentView","root","declaredViewContainer","parentNodeDef","viewParentEl","renderNode","renderElement","renderText","elementEventFullName","isComponentView","isEmbeddedView","filterQueryId","queryId","splitMatchedQueriesDsl","matchedQueriesDsl","matchedQueries","matchedQueryIds","valueType","splitDepsDsl","sourceName","getParentRenderElement","renderHost","renderParent","componentRendererType","Native","DEFINITION_CACHE","WeakMap","resolveDefinition","visitRootRenderNodes","renderer","lastRenderRootNode","visitSiblingRenderNodes","startIndex","endIndex","nodeDef","visitRenderNode","childCount","visitProjectedRenderNodes","ngContentIndex","compView","hostElDef","projectedNodes","execRenderNodeAction","ngContent","rn","bindingFlags","embeddedViews","viewContainer","_embeddedViews","NS_PREFIX_RE","splitNamespace","calcBindingFlags","_toStringWithNull","elDef","selectorOrNode","ns","createComment","parentEl","selectRootElement","attrs","setAttribute","listenToElementOutputs","output","handleEventClosure","renderEventHandlerClosure","listenTarget","listenerView","disposable","listen","disposables","outputIndex","checkAndUpdateElementValue","binding","elData","renderNode$$1","setElementAttribute","securityContext","renderValue","sanitize","setElementClass","addClass","removeClass","setElementStyle","STYLE","unit","suffix","setStyle","removeStyle","setElementProperty","setProperty","UNDEFINED_VALUE","InjectorRefTokenKey$1","INJECTORRefTokenKey$1","NgModuleRefTokenKey","resolveNgModuleDep","depDef","tokenKey_1","providerDef","_def","providersByKey","providerInstance","_createProviderInstance$1","targetsModule","moduleTransitivelyPresent","modules","isRoot","injectable","_createClass","depValues","_callFactory","detachEmbeddedView","elementData","viewIndex","removeFromArray","renderDetachView","renderAttachEmbeddedView","prevView","prevRenderNode","addToArray","arr","EMPTY_CONTEXT","getComponentViewDefinitionFactory","viewDefFactory","ComponentFactory_","_inputs","_outputs","inputsArr","templateName","outputsArr","viewDef","componentNodeIndex","componentProvider","ComponentRef_","ViewRef_","_view","_viewRef","_component","_elDef","changeDetectorRef","Injector_","createViewContainerData","ViewContainerRef_","_data","ref","attachToViewContainerRef","templateRef","insert","createComponent","ngModuleRef","contextInjector","parentInjector","viewRef_","attachEmbeddedView","parentView","attachProjectedView","vcElementData","dvcElementData","projectedViews","template","_projectedViews","markNodeAsProjectedTemplate","nodeFlags","childFlags","move","moveEmbeddedView","oldViewIndex","newViewIndex","viewData","detach","createChangeDetectorRef","_viewContainerRef","_appRef","rootRenderNodes","renderNodes","markForCheck","fs","rendererFactory","begin","end","reattach","vcRef","createTemplateData","TemplateRef_","_parentView","createInjector$1","createRendererV1","RendererAdapter","namespaceAndName","createViewRoot","hostElement","createTemplateAnchor","parentElement","comment","createText","projectNodes","attachViewAfter","viewRootNodes","viewAllNodes","destroyNode","listenGlobal","propertyName","propertyValue","attributeValue","setBindingDebugInfo","className","isAdd","styleName","styleValue","invokeElementMethod","methodName","setText","setValue","animate","bootstrapComponents","NgModuleRef_","_moduleType","initNgModule","provDef","injectFlags","callNgModuleLifecycle","lifecycles","RendererV1TokenKey","Renderer2TokenKey","ElementRefTokenKey","ViewContainerRefTokenKey","TemplateRefTokenKey","ChangeDetectorRefTokenKey","InjectorRefTokenKey","INJECTORRefTokenKey","checkIndex","depDefs","directChildFlags","childMatchedQueries","createProviderInstance","_createProviderInstance","createPipeInstance","createClass","createDirectiveInstance","subscription","eventHandlerClosure","allowPrivateServices","callFactory","ViewAction","NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR","startView","tokenKey$$1","searchView","findCompView","providerDef_1","allProviders","publicProviders","providerData","updateProp","nonMinifiedName","callLifecycleHooksChildrenFirst","callProviderLifecycles","callElementProvidersLifecycles","ngAfterContentInit","ngAfterContentChecked","ngAfterViewInit","ngAfterViewChecked","queryIds","nodeMatchedQueries","tplDef","filterId","checkAndUpdateQuery","queryList","directiveInstance","newValues","elementDef","calcQueryValues","notify","boundValue","bindingType","queryDef","getQueryValue","embeddedView","dvc","projectedView","queryValueType","appendNgContent","_pureExpressionDef","propertyNames","prefix","_addInterpolationPart","isNgContainer","validateNode","nodeCount","parentEnd","anchorDef$$1","createView","initView","createViewNodes","compRenderer","rendererType","createRenderer","outputCount","bindingCount","nodeData","compViewDef","execComponentViewsAction","CreateViewNodes","execQueriesAction","markProjectedViewsForCheck","execEmbeddedViewsAction","CheckNoChanges","CheckAndUpdate","callInit","checkAndUpdateNode","argStyle","v0","v1","v2","v3","v4","v5","v6","v7","v8","v9","checkAndUpdateNodeInline","checkAndUpdateElementInline","bindLen","changed","checkAndUpdateTextInline","checkAndUpdateDirectiveInline","directive","ngOnChanges","ngOnInit","ngDoCheck","checkAndUpdatePureExpressionInline","transform","checkAndUpdateNodeDynamic","checkAndUpdateElementDynamic","checkAndUpdateTextDynamic","checkAndUpdateDirectiveDynamic","checkAndUpdatePureExpressionDynamic","i_1","checkNoChangesNode","checkNoChangesNodeInline","checkNoChangesNodeDynamic","checkNoChangesQuery","Destroy","detachProjectedView","destroyViewNodes","callViewAction","viewState","execProjectedViewsAction","CheckNoChangesProjectedViews","CheckAndUpdateProjectedViews","queryFlags","staticDynamicQueryFlag","checkType","initServicesIfNeeded","services","createDebugServices","debugSetCurrentNode","debugCreateRootView","debugCreateEmbeddedView","debugCreateComponentView","debugCreateNgModuleRef","debugOverrideProvider","debugOverrideComponentView","debugClearOverrides","debugCheckAndUpdateView","debugCheckNoChangesView","debugDestroyView","DebugContext_","debugHandleEvent","debugUpdateDirectives","debugUpdateRenderer","createProdServices","createProdRootView","prodCheckAndUpdateNode","prodCheckNoChangesNode","elInjector","createRootData","DebugRendererFactory2","defWithOverride","applyProviderOverridesToView","callWithDebugContext","DebugAction","anchorDef","viewDef$$1","viewDefOverrides","applyProviderOverridesToNgModule","calcHasOverrides","hasOverrides","hasDeprecatedOverrides","providerOverrides","override","deprecatedBehavior","providerOverridesWithScope","applyProviderOverrides","moduleSet_1","_currentAction","_currentView","_currentNodeIndex","comp","compFactory","elementIndicesWithOverwrittenProviders","findElementIndicesWithOverwrittenProviders","elIndicesWithOverwrittenProviders","lastElementDef","applyProviderOverridesToElement","elIndex","nextDirectiveWithBinding","debugCheckDirectivesFn","debugCheckAndUpdateNode","debugCheckNoChangesNode","nextRenderNodeWithBinding","debugCheckRenderNodeFn","givenValues","bindingValues","camelCaseToDashCase","CAMEL_CASE_REGEXP","normalizeDebugBindingValue","attr","elView","elOrCompView","childDef","collectReferences","findHostElement","logViewDef","logNodeIndex","renderNodeIndex","getRenderNodeIndex","currRenderNodeIndex","refName","oldAction","oldView","oldNodeIndex","isViewDebugError","viewWrappedDebugError","getCurrentDebugContext","renderData","DebugRenderer2","whenRenderingDone","removeDebugNodeFromIndex","namespace","debugCtx","debugEl","debugChildEl","debugRefEl","oldChild","style","NgModuleFactory_","_ngModuleDefFactory","queueContentHooks","tView","afterContentInit","contentHooks","afterContentChecked","contentCheckHooks","queueViewHooks","afterViewInit","viewHooks","afterViewChecked","viewCheckHooks","queueDestroyHooks","destroyHooks","executeInitHooks","currentView","creationMode","lifecycleStage","executeHooks","directives","initHooks","checkHooks","allHooks","hooksToCall","callHooks","RendererStyleFlags3","NG_PROJECT_AS_ATTR_NAME","isProceduralRenderer","domRendererFactory3","document","isDifferent","stringify$1","findNextRNodeSibling","stopNode","currentNode","pNextOrParent","findFirstRNode","currentSibling","parentType","getNextLNodeWithProjection","getNextOrParentSiblingNode","initialNode","rootNode","native","childContainerData","dynamicLContainerNode","views","head","createTextNode","addRemoveViewFromContainer","container","insertMode","beforeNode","insertView","newView","setViewNext","containerNextNativeNode","removeView","removeIndex","viewNode","destroyViewTree","rootView","viewOrContainer","cleanUpView","getParentState","queries","removeListeners","cleanup","removeEventListener","executeOnDestroys","executePipeOnDestroys","pipeDestroyHooks","canInsertNativeNode","appendProjectedNode","currentParent","lContainer","isNodeMatchingSelector","tNode","nodeClassAttrVal","cssClassToMatch","nodeClassesLen","matchIndex","matchEndIdx","mode","nodeAttrs","skipToNextSelector","isPositive","attrIndexInNode","findAttrIndexInNode","selectorAttrValue","nodeAttrValue","isNodeMatchingSelectorList","matchingSelectorIndex","selectors","textSelectors","ngProjectAsAttrVal","getProjectAsAttrValue","ngProjectAsAttrIdx","throwMultipleComponentError","throwErrorIfNoChangesMode","checkNoChangesMode","previousOrParentNode","isParent","tData","NG_HOST_SYMBOL","_CLEAN_PROMISE","_ROOT_DIRECTIVE_INDICES","CIRCULAR$2","getPreviousOrParentNode","currentQueries","getCreationMode","firstTemplatePass","enterView","host","bindingStartIndex","leaveView","refreshDirectives","executeInitAndContentHooks","setHostBindings","hostBindings","refreshChildComponents","componentRefresh","defs","dirIndex","createLView","viewId","tail","dynamicViewCount","createLNodeObject","nodeInjector","createLNode","isState","renderEmbeddedTemplate","pipes","_isParent","_previousOrParentNode","rf","getOrCreateTView","refreshDynamicChildren","getRenderFlags","createDirectivesAndLocals","localRefs","containerData","createTNode","cacheMatchingDirectivesForNode","exportsMap","","currentMatches","findDirectiveMatches","directiveRegistry","diPublic","valueIndex","resolveDirective","saveNameToExportMap","cacheMatchingLocalNames","localNames","instantiateDirectivesDirectly","count","start","tDirectives","directiveCreate","saveResolvedLocalsInData","throwCyclicDependencyError","initChangeDetectorIfExisting","_setComponentContext","exportAs","ngPrivateData","createTView","pipeRegistry","setUpAttributes","isProc","attrVal","locateHostElement","elementOrSelector","defaultRenderer","initialInputs","generatePropertyAliases","tNodeFlags","direction","propStore","isInput","directiveDef","propertyAliasMap","publicName","internalName","baseDirectiveCreate","addComponentLogic","directiveDefs","pipeDefs","addToViewTree","onPush","queueComponentIndexForCheck","queueInitHooks","onInit","doCheck","queueHostBindingForCheck","setInputsFromAttrs","directiveIndex","initialInputData","generateInitialInputs","minifiedInputName","createLContainer","parentLNode","nextIndex","container_1","elementIndex","viewAttached","detectChangesInternal","getDirectiveInstance","appendToProjectionNode","projectionNode","appendedFirst","appendedLast","projectionNodeData","findComponentHost","lView","viewRootLNode","markViewDirty","scheduleTick","rootContext","res_1","clean","scheduler","getRootView","rootComponent","renderComponentOrTemplate","componentOrContext","_getComponentHostLElementNode","hostNode","NO_CHANGE","initBindings","store","consumeBinding","bindingUpdated","checkAndUpdateBinding$1","bindingUpdated2","exp1","exp2","different","bindingUpdated4","exp3","exp4","getTView","instanceOrArray","CLEAN_PROMISE","ROOT_DIRECTIVE_INDICES","ViewRef$1","EmbeddedViewRef$1","_lViewNode","createViewRef","addDestroyable","destroyFn","NG_ELEMENT_ID","BLOOM_SIZE","nextNgElementId","getOrCreateNodeInjector","getOrCreateNodeInjectorForNode","bf0","bf1","bf2","bf3","bf4","bf5","bf6","bf7","cbf0","cbf1","cbf2","cbf3","cbf4","cbf5","cbf6","cbf7","viewContainerRef","elementRef","diPublicInInjector","di","bloomAdd","bloomBit","mask","getOrCreateChangeDetectorRef","isComponent","getOrCreateHostChangeDetector","getClosestComponentAncestor","hostInjector","getOrCreateInjectable","bloomHash","bloomHashBit","formerInjector","bloomFindPossibleInjector","flags_1","searchMatchesQueuedForCreation","startInjector","ReadFromInjectorFn","read","ElementRef$1","getOrCreateContainerRef","vcRefHost","lContainerNode","ViewContainerRef$1","_lContainerNode","_viewRefs","notImplemented","lViewNode","adjustedIdx","_adjustIndex","newIndex","shift","getOrCreateTemplateRef","TemplateRef$1","getOrCreateElementRef","getRenderer","_renderer","_directives","_pipes","_template","defineComponent","componentDefinition","pipeTypes","directiveTypes","invertObject","OnPush","extractDirectiveDef","extractPipeDef","feature","features","ngComponentDef","ngDirectiveDef","ngPipeDef","PRIVATE_PREFIX","EMPTY$1","newObj","minifiedKey","defineDirective","pureFunction1","pureFn","exp","thisArg","pureFunction2","pureFunction3","pureFunction4","pureFunctionV","exps","isPure","LQueries_","deep","shallow","track","descend","createQuery$1","containerValues","clonedQuery","viewValues","addNode","getIdxOfMatchingSelector","getIdxOfMatchingDirective","readFromNodeInjector","directiveIdx","matchingIdx","addMatch","matchingValue","previous","createPredicate","_valuesTree","QueryList$1","QueryList_","_values","flatten$1","BRAND","bypassSanitizationTrustString","trustedString","trusted","ɵangular_packages_core_core_j","ɵangular_packages_core_core_k","ɵangular_packages_core_core_l","ɵangular_packages_core_core_f","ɵangular_packages_core_core_g","ɵangular_packages_core_core_h","ɵangular_packages_core_core_i","ɵangular_packages_core_core_c","ɵangular_packages_core_core_d","ɵangular_packages_core_core_e","ɵangular_packages_core_core_m","ɵangular_packages_core_core_o","ɵangular_packages_core_core_n","ɵangular_packages_core_core_r","ɵangular_packages_core_core_p","ɵangular_packages_core_core_q","ɵangular_packages_core_core_v","ɵangular_packages_core_core_x","ɵangular_packages_core_core_w","ɵangular_packages_core_core_u","ɵangular_packages_core_core_y","ɵangular_packages_core_core_bb","ɵangular_packages_core_core_bd","ɵangular_packages_core_core_be","ɵangular_packages_core_core_bc","ɵangular_packages_core_core_ba","ɵangular_packages_core_core_z","ɵangular_packages_core_core_a","ɵangular_packages_core_core_b","ɵangular_packages_core_core_s","ɵangular_packages_core_core_t","destroyPlatform","enableProdMode","asNativeElements","debugEls","setTestabilityGetter","CUSTOM_ELEMENTS_SCHEMA","NO_ERRORS_SCHEMA","createInjector","getModuleFactory","ɵALLOW_MULTIPLE_PLATFORMS","ɵAPP_ID_RANDOM_PROVIDER","ɵdefaultIterableDiffers","ɵdevModeEqual","ɵisListLikeIterable","ɵisDefaultChangeDetectionStrategy","isDefaultChangeDetectionStrategy","changeDetectionStrategy","ɵConsole","ɵinject","ɵsetCurrentInjector","ɵAPP_ROOT","ɵComponentFactory","ɵCodegenComponentFactoryResolver","ɵReflectionCapabilities","ɵRenderDebugInfo","ɵ_sanitizeHtml","ɵ_sanitizeStyle","ɵ_sanitizeUrl","ɵglobal","ɵlooseIdentical","ɵstringify","ɵmakeDecorator","ɵisObservable","isObservable","ɵisPromise","ɵclearOverrides","ɵoverrideComponentView","ɵoverrideProvider","ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR","ɵdefineComponent","ɵdefineDirective","ɵdefinePipe","definePipe","pipeDef","ɵdetectChanges","ɵrenderComponent","renderComponent","componentDef","componentTag","requestAnimationFrame","elementNode","tag","rNode","resetApplicationState","hostFeatures","ɵdirectiveInject","directiveInject","ɵinjectTemplateRef","injectTemplateRef","ɵinjectViewContainerRef","injectViewContainerRef","ɵinjectChangeDetectorRef","injectChangeDetectorRef","ɵinjectAttribute","injectAttribute","ɵPublicFeature","PublicFeature","definition","ɵNgOnChangesFeature","NgOnChangesFeature","inputPropertyNames","proto","writable","_loop_1","pubKey","minKey","privateMinKey","existingDesc","getOwnPropertyDescriptor","simpleChanges","onChangesWrapper","delegateHook","ɵmarkDirty","markDirty","ɵNC","ɵC","ɵE","elementStart","ɵL","listenerFn","useCapture","cleanupFns","wrappedListener","wrapListenerWithDirtyLogic","cleanupFn","wrapListenerWithDirtyAndDefault","wrapListenerIn_markViewDirty","preventDefault","addEventListener","outputData","createOutput","ɵT","textNode","ɵV","embeddedViewStart","viewBlockId","scanForView","containerNode","startIdx","viewAtPositionId","getOrCreateEmbeddedTView","tContainer","ɵQ","memoryIndex","getCurrentQueries","QueryType","ɵd","loadDirective","ɵP","projection","localIndex","selectorIndex","nodesForSelector","nodeToProject","previouslyProjected","lastNodeToProject","ɵb","ɵi1","interpolation1","ɵi2","interpolation2","i0","ɵi3","interpolation3","i1","ɵi4","interpolation4","i2","ɵi5","interpolation5","i3","ɵi6","interpolation6","i4","ɵi7","interpolation7","i5","ɵi8","interpolation8","i6","ɵiV","interpolationV","ɵpb1","pipeBind1","pipeInstance","ɵpb2","pipeBind2","ɵpb3","pipeBind3","ɵpb4","pipeBind4","ɵpbV","pipeBindV","ɵf0","pureFunction0","ɵf1","ɵf2","ɵf3","ɵf4","ɵf5","pureFunction5","exp5","ɵf6","pureFunction6","exp6","ɵf7","pureFunction7","exp7","ɵf8","pureFunction8","exp8","ɵfV","ɵcR","containerRefreshStart","ɵcr","containerRefreshEnd","ɵqR","queryRefresh","ɵe","elementEnd","queueLifecycleHooks","ɵp","elementProperty","dataValue","inputData","setInputsForProperty","markDirtyIfOnPush","ɵpD","projectionDef","noOfNodeBuckets","distributedNodes","componentChild","ɵa","elementAttribute","strValue","ɵs","elementStyle","lElement","removeProperty","ɵsn","elementStyleNamed","suffixOrSanitizer","DashCase","ɵk","elementClass","ɵkn","elementClassNamed","classList","ɵt","textBinding","existingNode","textContent","insertChild","nativeSibling","ɵv","embeddedViewEnd","setRenderParentInProjectedNodes","ɵst","ɵld","ɵPp","pipeName","getPipeDef","ɵwhenRendered","whenRendered","getRootContext","ɵbypassSanitizationTrustHtml","bypassSanitizationTrustHtml","trustedHtml","ɵbypassSanitizationTrustStyle","bypassSanitizationTrustStyle","trustedStyle","ɵbypassSanitizationTrustScript","bypassSanitizationTrustScript","trustedScript","ɵbypassSanitizationTrustUrl","bypassSanitizationTrustUrl","trustedUrl","ɵbypassSanitizationTrustResourceUrl","bypassSanitizationTrustResourceUrl","trustedResourceUrl","ɵsanitizeHtml","sanitizeHtml","ɵsanitizeStyle","sanitizeStyle","unsafeStyle","ɵsanitizeUrl","sanitizeUrl","unsafeUrl","ɵsanitizeResourceUrl","sanitizeResourceUrl","unsafeResourceUrl","ɵregisterModuleFactory","registerModuleFactory","ɵEMPTY_ARRAY","ɵEMPTY_MAP","ɵand","templateFactory","ɵccf","createComponentFactory","ɵcmf","createNgModuleFactory","ngModuleType","defFactory","ɵcrt","createRendererType2","ɵdid","outputDefs","ɵeld","fixedAttrs","bindingDefs","suffixOrSecurityContext","_d","ns_1","name_1","_e","ɵelementEventFullName","ɵgetComponentViewDefinitionFactory","ɵinlineInterpolate","inlineInterpolate","valueCount","c0","a1","c1","a2","c2","a3","c3","a4","c4","a5","c5","a6","c6","a7","c7","a8","c8","a9","c9","ɵinterpolate","interpolate","constAndInterp","ɵmod","moduleDef","ɵmpd","moduleProvideDef","ɵncd","ngContentDef","ɵnov","ɵpid","ɵprd","ɵpad","pureArrayDef","argCount","ɵpod","pureObjectDef","propToIndex","nbKeys","ɵppd","purePipeDef","ɵqud","ɵted","textDef","staticText","ɵunv","unwrapValue","nodeIdx","globalBindingIdx","ɵvid","viewBindingCount","viewDisposableCount","viewNodeFlags","viewRootNodeFlags","viewMatchedQueries","currentRenderParent","currentElementHasPublicProviders","currentElementHasPrivateProviders","newParent","rootNodeFlags"],"mappings":";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9D5sC,OAAOuE,eAAelF,EAAS,cAAgBuC,OAAO","sourcesContent":["/**\n * @license Angular v6.0.7\n * (c) 2010-2018 Google, Inc. https://angular.io/\n * License: MIT\n */\n\n(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('rxjs'), require('rxjs/operators')) :\n\ttypeof define === 'function' && define.amd ? define('@angular/core', ['exports', 'rxjs', 'rxjs/operators'], factory) :\n\t(factory((global.ng = global.ng || {}, global.ng.core = {}),global.rxjs,global.rxjs.operators));\n}(this, (function (exports,rxjs,operators) { 'use strict';\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n\r\nfunction __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nvar __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nfunction __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nfunction __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nfunction __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Construct an `InjectableDef` which defines how a token will be constructed by the DI system, and\n * in which injectors (if any) it will be available.\n *\n * This should be assigned to a static `ngInjectableDef` field on a type, which will then be an\n * `InjectableType`.\n *\n * Options:\n * * `providedIn` determines which injectors will include the injectable, by either associating it\n * with an `@NgModule` or other `InjectorType`, or by specifying that this injectable should be\n * provided in the `'root'` injector, which will be the application-level injector in most apps.\n * * `factory` gives the zero argument function which will create an instance of the injectable.\n * The factory can call `inject` to access the `Injector` and request injection of dependencies.\n *\n * @experimental\n */\nfunction defineInjectable(opts) {\n return {\n providedIn: opts.providedIn || null, factory: opts.factory, value: undefined,\n };\n}\n/**\n * Construct an `InjectorDef` which configures an injector.\n *\n * This should be assigned to a static `ngInjectorDef` field on a type, which will then be an\n * `InjectorType`.\n *\n * Options:\n *\n * * `factory`: an `InjectorType` is an instantiable type, so a zero argument `factory` function to\n * create the type must be provided. If that factory function needs to inject arguments, it can\n * use the `inject` function.\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 an `ngInjectableDef` 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 * @experimental\n */\nfunction defineInjector(options) {\n return {\n factory: options.factory, providers: options.providers || [], imports: options.imports || [],\n };\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Creates a token that can be used in a DI Provider.\n *\n * Use an `InjectionToken` whenever the type you are injecting is not reified (does not have a\n * runtime representation) such as when injecting an interface, callable type, array or\n * parametrized type.\n *\n * `InjectionToken` is parameterized on `T` which is the type of object which will be returned by\n * the `Injector`. This provides additional level of type safety.\n *\n * ```\n * interface MyInterface {...}\n * var myInterface = injector.get(new InjectionToken<MyInterface>('SomeToken'));\n * // myInterface is inferred to be MyInterface.\n * ```\n *\n * When creating an `InjectionToken`, you can optionally specify a factory function which returns\n * (possibly by creating) a default value of the parameterized type `T`. This sets up the\n * `InjectionToken` using this factory as a provider as if it was defined explicitly in the\n * application's root injector. If the factory function, which takes zero arguments, needs to inject\n * dependencies, it can do so using the `inject` function. See below for an example.\n *\n * Additionally, if a `factory` is specified you can also specify the `providedIn` option, which\n * overrides the above behavior and marks the token as belonging to a particular `@NgModule`. As\n * mentioned above, `'root'` is the default value for `providedIn`.\n *\n * @usageNotes\n * ### Basic Example\n *\n * {@example core/di/ts/injector_spec.ts region='InjectionToken'}\n *\n * ### Tree-shakeable Example\n *\n * {@example core/di/ts/injector_spec.ts region='ShakeableInjectionToken'}\n *\n */\nvar InjectionToken = /** @class */ (function () {\n function InjectionToken(_desc, options) {\n this._desc = _desc;\n /** @internal */\n this.ngMetadataName = 'InjectionToken';\n if (options !== undefined) {\n this.ngInjectableDef = defineInjectable({\n providedIn: options.providedIn || 'root',\n factory: options.factory,\n });\n }\n else {\n this.ngInjectableDef = undefined;\n }\n }\n InjectionToken.prototype.toString = function () { return \"InjectionToken \" + this._desc; };\n return InjectionToken;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar ANNOTATIONS = '__annotations__';\nvar PARAMETERS = '__parameters__';\nvar PROP_METADATA = '__prop__metadata__';\n/**\n * @suppress {globalThis}\n */\nfunction makeDecorator(name, props, parentClass, chainFn, typeFn) {\n var metaCtor = makeMetadataCtor(props);\n function DecoratorFactory() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (this instanceof DecoratorFactory) {\n metaCtor.call.apply(metaCtor, __spread([this], args));\n return this;\n }\n var annotationInstance = new ((_a = DecoratorFactory).bind.apply(_a, __spread([void 0], args)))();\n var TypeDecorator = function TypeDecorator(cls) {\n typeFn && typeFn.apply(void 0, __spread([cls], args));\n // Use of Object.defineProperty is important since it creates non-enumerable property which\n // prevents the property is copied during subclassing.\n var annotations = cls.hasOwnProperty(ANNOTATIONS) ?\n cls[ANNOTATIONS] :\n Object.defineProperty(cls, ANNOTATIONS, { value: [] })[ANNOTATIONS];\n annotations.push(annotationInstance);\n return cls;\n };\n if (chainFn)\n chainFn(TypeDecorator);\n return TypeDecorator;\n var _a;\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}\nfunction makeMetadataCtor(props) {\n return function ctor() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (props) {\n var values = props.apply(void 0, __spread(args));\n for (var propName in values) {\n this[propName] = values[propName];\n }\n }\n };\n}\nfunction makeParamDecorator(name, props, parentClass) {\n var metaCtor = makeMetadataCtor(props);\n function ParamDecoratorFactory() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (this instanceof ParamDecoratorFactory) {\n metaCtor.apply(this, args);\n return this;\n }\n var annotationInstance = new ((_a = ParamDecoratorFactory).bind.apply(_a, __spread([void 0], args)))();\n ParamDecorator.annotation = annotationInstance;\n return ParamDecorator;\n function ParamDecorator(cls, unusedKey, index) {\n // Use of Object.defineProperty is important since it creates non-enumerable property which\n // prevents the property is copied during subclassing.\n var parameters = cls.hasOwnProperty(PARAMETERS) ?\n cls[PARAMETERS] :\n Object.defineProperty(cls, PARAMETERS, { value: [] })[PARAMETERS];\n // there might be gaps if some in between parameters do not have annotations.\n // we pad with nulls.\n while (parameters.length <= index) {\n parameters.push(null);\n }\n (parameters[index] = parameters[index] || []).push(annotationInstance);\n return cls;\n }\n var _a;\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}\nfunction makePropDecorator(name, props, parentClass) {\n var metaCtor = makeMetadataCtor(props);\n function PropDecoratorFactory() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (this instanceof PropDecoratorFactory) {\n metaCtor.apply(this, args);\n return this;\n }\n var decoratorInstance = new ((_a = PropDecoratorFactory).bind.apply(_a, __spread([void 0], args)))();\n return function PropDecorator(target, name) {\n var constructor = target.constructor;\n // Use of Object.defineProperty is important since it creates non-enumerable property which\n // prevents the property is copied during subclassing.\n var meta = constructor.hasOwnProperty(PROP_METADATA) ?\n constructor[PROP_METADATA] :\n Object.defineProperty(constructor, PROP_METADATA, { value: {} })[PROP_METADATA];\n meta[name] = meta.hasOwnProperty(name) && meta[name] || [];\n meta[name].unshift(decoratorInstance);\n };\n var _a;\n }\n if (parentClass) {\n PropDecoratorFactory.prototype = Object.create(parentClass.prototype);\n }\n PropDecoratorFactory.prototype.ngMetadataName = name;\n PropDecoratorFactory.annotationCls = PropDecoratorFactory;\n return PropDecoratorFactory;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * This token can be used to create a virtual provider that will populate the\n * `entryComponents` fields of components and ng modules based on its `useValue`.\n * All components that are referenced in the `useValue` value (either directly\n * or in a nested array or map) will be added to the `entryComponents` property.\n *\n * @usageNotes\n * ### Example\n * The following example shows how the router can populate the `entryComponents`\n * field of an NgModule based on the router configuration which refers\n * to components.\n *\n * ```typescript\n * // helper function inside the router\n * function provideRoutes(routes) {\n * return [\n * {provide: ROUTES, useValue: routes},\n * {provide: ANALYZE_FOR_ENTRY_COMPONENTS, useValue: routes, multi: true}\n * ];\n * }\n *\n * // user code\n * let routes = [\n * {path: '/root', component: RootComp},\n * {path: '/teams', component: TeamsComp}\n * ];\n *\n * @NgModule({\n * providers: [provideRoutes(routes)]\n * })\n * class ModuleWithRoutes {}\n * ```\n *\n * @experimental\n */\nvar ANALYZE_FOR_ENTRY_COMPONENTS = new InjectionToken('AnalyzeForEntryComponents');\n/**\n * Attribute decorator and metadata.\n *\n * @Annotation\n */\nvar Attribute = makeParamDecorator('Attribute', function (attributeName) { return ({ attributeName: attributeName }); });\n/**\n * Base class for query metadata.\n *\n * @see `ContentChildren`.\n * @see `ContentChild`.\n * @see `ViewChildren`.\n * @see `ViewChild`.\n */\nvar Query = /** @class */ (function () {\n function Query() {\n }\n return Query;\n}());\n/**\n * ContentChildren decorator and metadata.\n *\n *\n * @Annotation\n */\nvar ContentChildren = makePropDecorator('ContentChildren', function (selector, data) {\n if (data === void 0) { data = {}; }\n return (__assign({ selector: selector, first: false, isViewQuery: false, descendants: false }, data));\n}, Query);\n/**\n * ContentChild decorator and metadata.\n *\n *\n * @Annotation\n */\nvar ContentChild = makePropDecorator('ContentChild', function (selector, data) {\n if (data === void 0) { data = {}; }\n return (__assign({ selector: selector, first: true, isViewQuery: false, descendants: true }, data));\n}, Query);\n/**\n * ViewChildren decorator and metadata.\n *\n * @Annotation\n */\nvar ViewChildren = makePropDecorator('ViewChildren', function (selector, data) {\n if (data === void 0) { data = {}; }\n return (__assign({ selector: selector, first: false, isViewQuery: true, descendants: true }, data));\n}, Query);\n/**\n * ViewChild decorator and metadata.\n *\n * @Annotation\n */\nvar ViewChild = makePropDecorator('ViewChild', function (selector, data) {\n return (__assign({ selector: selector, first: true, isViewQuery: true, descendants: true }, data));\n}, Query);\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * Describes within the change detector which strategy will be used the next time change\n * detection is triggered.\n *\n */\n\n(function (ChangeDetectionStrategy) {\n /**\n * `OnPush` means that the change detector's mode will be initially set to `CheckOnce`.\n */\n ChangeDetectionStrategy[ChangeDetectionStrategy[\"OnPush\"] = 0] = \"OnPush\";\n /**\n * `Default` means that the change detector's mode will be initially set to `CheckAlways`.\n */\n ChangeDetectionStrategy[ChangeDetectionStrategy[\"Default\"] = 1] = \"Default\";\n})(exports.ChangeDetectionStrategy || (exports.ChangeDetectionStrategy = {}));\n/**\n * Describes the status of the detector.\n */\n\n(function (ChangeDetectorStatus) {\n /**\n * `CheckOnce` means that after calling detectChanges the mode of the change detector\n * will become `Checked`.\n */\n ChangeDetectorStatus[ChangeDetectorStatus[\"CheckOnce\"] = 0] = \"CheckOnce\";\n /**\n * `Checked` means that the change detector should be skipped until its mode changes to\n * `CheckOnce`.\n */\n ChangeDetectorStatus[ChangeDetectorStatus[\"Checked\"] = 1] = \"Checked\";\n /**\n * `CheckAlways` means that after calling detectChanges the mode of the change detector\n * will remain `CheckAlways`.\n */\n ChangeDetectorStatus[ChangeDetectorStatus[\"CheckAlways\"] = 2] = \"CheckAlways\";\n /**\n * `Detached` means that the change detector sub tree is not a part of the main tree and\n * should be skipped.\n */\n ChangeDetectorStatus[ChangeDetectorStatus[\"Detached\"] = 3] = \"Detached\";\n /**\n * `Errored` means that the change detector encountered an error checking a binding\n * or calling a directive lifecycle method and is now in an inconsistent state. Change\n * detectors in this state will no longer detect changes.\n */\n ChangeDetectorStatus[ChangeDetectorStatus[\"Errored\"] = 4] = \"Errored\";\n /**\n * `Destroyed` means that the change detector is destroyed.\n */\n ChangeDetectorStatus[ChangeDetectorStatus[\"Destroyed\"] = 5] = \"Destroyed\";\n})(exports.ɵChangeDetectorStatus || (exports.ɵChangeDetectorStatus = {}));\nfunction isDefaultChangeDetectionStrategy(changeDetectionStrategy) {\n return changeDetectionStrategy == null ||\n changeDetectionStrategy === exports.ChangeDetectionStrategy.Default;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * Type of the Component metadata.\n */\nvar Directive = makeDecorator('Directive', function (dir) {\n if (dir === void 0) { dir = {}; }\n return dir;\n});\n/**\n * Component decorator and metadata.\n *\n * @usageNotes\n *\n * ### Using animations\n *\n * The following snippet shows an animation trigger in a component's\n * metadata. The trigger is attached to an element in the component's\n * template, using \"@_trigger_name_\", and a state expression that is evaluated\n * at run time to determine whether the animation should start.\n *\n * ```typescript\n * @Component({\n * selector: 'animation-cmp',\n * templateUrl: 'animation-cmp.html',\n * animations: [\n * trigger('myTriggerName', [\n * state('on', style({ opacity: 1 }),\n * state('off', style({ opacity: 0 }),\n * transition('on => off', [\n * animate(\"1s\")\n * ])\n * ])\n * ]\n * })\n * ```\n *\n * ```html\n * <!-- animation-cmp.html -->\n * <div @myTriggerName=\"expression\">...</div>\n * ```\n *\n * ### Preserving whitespace\n *\n * Removing whitespace can greatly reduce AOT-generated code size, and speed up view creation.\n * As of Angular 6, default for `preserveWhitespaces` is false (whitespace is removed).\n * To change the default setting for all components in your application, set\n * the `preserveWhitespaces` option of the AOT compiler.\n *\n * Current implementation removes whitespace characters as follows:\n * - Trims all whitespaces at the beginning and the end of a template.\n * - Removes whitespace-only text nodes. For example,\n * `<button>Action 1</button> <button>Action 2</button>` becomes\n * `<button>Action 1</button><button>Action 2</button>`.\n * - Replaces a series of whitespace characters in text nodes with a single space.\n * For example, `<span>\\n some text\\n</span>` becomes `<span> some text </span>`.\n * - Does NOT alter text nodes inside HTML tags such as `<pre>` or `<textarea>`,\n * where whitespace characters are significant.\n *\n * Note that these transformations can influence DOM nodes layout, although impact\n * should be minimal.\n *\n * You can override the default behavior to preserve whitespace characters\n * in certain fragments of a template. For example, you can exclude an entire\n * DOM sub-tree by using the `ngPreserveWhitespaces` attribute:\n *\n * ```html\n * <div ngPreserveWhitespaces>\n * whitespaces are preserved here\n * <span> and here </span>\n * </div>\n * ```\n *\n * You can force a single space to be preserved in a text node by using `&ngsp;`,\n * which is replaced with a space character by Angular's template\n * compiler:\n *\n * ```html\n * <a>Spaces</a>&ngsp;<a>between</a>&ngsp;<a>links.</a>\n * <!-->compiled to be equivalent to:</>\n * <a>Spaces</a> <a>between</a> <a>links.</a>\n * ```\n *\n * Note that sequences of `&ngsp;` are still collapsed to just one space character when\n * the `preserveWhitespaces` option is set to `false`.\n *\n * ```html\n * <a>before</a>&ngsp;&ngsp;&ngsp;<a>after</a>\n * <!-->compiled to be equivalent to:</>\n * <a>Spaces</a> <a>between</a> <a>links.</a>\n * ```\n *\n * To preserve sequences of whitespace characters, use the\n * `ngPreserveWhitespaces` attribute.\n *\n * @Annotation\n */\nvar Component = makeDecorator('Component', function (c) {\n if (c === void 0) { c = {}; }\n return (__assign({ changeDetection: exports.ChangeDetectionStrategy.Default }, c));\n}, Directive);\n/**\n *\n *\n * @Annotation\n */\nvar Pipe = makeDecorator('Pipe', function (p) { return (__assign({ pure: true }, p)); });\n/**\n *\n * @Annotation\n */\nvar Input = makePropDecorator('Input', function (bindingPropertyName) { return ({ bindingPropertyName: bindingPropertyName }); });\n/**\n *\n * @Annotation\n */\nvar Output = makePropDecorator('Output', function (bindingPropertyName) { return ({ bindingPropertyName: bindingPropertyName }); });\n/**\n *\n * @Annotation\n */\nvar HostBinding = makePropDecorator('HostBinding', function (hostPropertyName) { return ({ hostPropertyName: hostPropertyName }); });\n/**\n * Binds a CSS event to a host listener and supplies configuration metadata.\n * Angular invokes the supplied handler method when the host element emits the specified event,\n * and updates the bound element with the result.\n * If the handler method returns false, applies `preventDefault` on the bound element.\n *\n * @usageNotes\n *\n * The following example declares a directive\n * that attaches a click listener to a button and counts clicks.\n *\n * ```\n * @Directive({selector: 'button[counting]'})\n * class CountClicks {\n * numberOfClicks = 0;\n *\n * @HostListener('click', ['$event.target'])\n * onClick(btn) {\n * console.log('button', btn, 'number of clicks:', this.numberOfClicks++);\n * }\n * }\n *\n * @Component({\n * selector: 'app',\n * template: '<button counting>Increment</button>',\n * })\n * class App {}\n * ```\n *\n * @Annotation\n */\nvar HostListener = makePropDecorator('HostListener', function (eventName, args) { return ({ eventName: eventName, args: args }); });\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @description\n *\n * Represents a type that a Component or other object is instances of.\n *\n * An example of a `Type` is `MyCustomComponent` class, which in JavaScript is be represented by\n * the `MyCustomComponent` constructor function.\n *\n *\n */\nvar Type = Function;\nfunction isType(v) {\n return typeof v === 'function';\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar __window = typeof window !== 'undefined' && window;\nvar __self = typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' &&\n self instanceof WorkerGlobalScope && self;\nvar __global = typeof global !== 'undefined' && global;\nvar _global = __window || __global || __self;\nvar promise = Promise.resolve(0);\nvar _symbolIterator = null;\nfunction getSymbolIterator() {\n if (!_symbolIterator) {\n var Symbol_1 = _global['Symbol'];\n if (Symbol_1 && Symbol_1.iterator) {\n _symbolIterator = Symbol_1.iterator;\n }\n else {\n // es6-shim specific logic\n var keys = Object.getOwnPropertyNames(Map.prototype);\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n if (key !== 'entries' && key !== 'size' &&\n Map.prototype[key] === Map.prototype['entries']) {\n _symbolIterator = key;\n }\n }\n }\n }\n return _symbolIterator;\n}\nfunction scheduleMicroTask(fn) {\n if (typeof Zone === 'undefined') {\n // use promise to schedule microTask instead of use Zone\n promise.then(function () { fn && fn.apply(null, null); });\n }\n else {\n Zone.current.scheduleMicroTask('scheduleMicrotask', fn);\n }\n}\n// JS has NaN !== NaN\nfunction looseIdentical(a, b) {\n return a === b || typeof a === 'number' && typeof b === 'number' && isNaN(a) && isNaN(b);\n}\nfunction stringify(token) {\n if (typeof token === 'string') {\n return token;\n }\n if (token instanceof Array) {\n return '[' + token.map(stringify).join(', ') + ']';\n }\n if (token == null) {\n return '' + token;\n }\n if (token.overriddenName) {\n return \"\" + token.overriddenName;\n }\n if (token.name) {\n return \"\" + token.name;\n }\n var res = token.toString();\n if (res == null) {\n return '' + res;\n }\n var newLineIndex = res.indexOf('\\n');\n return newLineIndex === -1 ? res : res.substring(0, newLineIndex);\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * Attention: These regex has to hold even if the code is minified!\n */\nvar DELEGATE_CTOR = /^function\\s+\\S+\\(\\)\\s*{[\\s\\S]+\\.apply\\(this,\\s*arguments\\)/;\nvar INHERITED_CLASS = /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[A-Za-z\\d$_]+\\s*{/;\nvar INHERITED_CLASS_WITH_CTOR = /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[A-Za-z\\d$_]+\\s*{[\\s\\S]*constructor\\s*\\(/;\nvar ReflectionCapabilities = /** @class */ (function () {\n function ReflectionCapabilities(reflect) {\n this._reflect = reflect || _global['Reflect'];\n }\n ReflectionCapabilities.prototype.isReflectionEnabled = function () { return true; };\n ReflectionCapabilities.prototype.factory = function (t) { return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return new (t.bind.apply(t, __spread([void 0], args)))();\n }; };\n /** @internal */\n ReflectionCapabilities.prototype._zipTypesAndAnnotations = function (paramTypes, paramAnnotations) {\n var result;\n if (typeof paramTypes === 'undefined') {\n result = new Array(paramAnnotations.length);\n }\n else {\n result = new Array(paramTypes.length);\n }\n for (var i = 0; i < result.length; i++) {\n // TS outputs Object for parameters without types, while Traceur omits\n // the annotations. For now we preserve the Traceur behavior to aid\n // migration, but this can be revisited.\n if (typeof paramTypes === 'undefined') {\n result[i] = [];\n }\n else if (paramTypes[i] != Object) {\n result[i] = [paramTypes[i]];\n }\n else {\n result[i] = [];\n }\n if (paramAnnotations && paramAnnotations[i] != null) {\n result[i] = result[i].concat(paramAnnotations[i]);\n }\n }\n return result;\n };\n ReflectionCapabilities.prototype._ownParameters = function (type, parentCtor) {\n var typeStr = type.toString();\n // If we have no decorators, we only have function.length as metadata.\n // In that case, to detect whether a child class declared an own constructor or not,\n // we need to look inside of that constructor to check whether it is\n // just calling the parent.\n // This also helps to work around for https://github.com/Microsoft/TypeScript/issues/12439\n // that sets 'design:paramtypes' to []\n // if a class inherits from another class but has no ctor declared itself.\n if (DELEGATE_CTOR.exec(typeStr) ||\n (INHERITED_CLASS.exec(typeStr) && !INHERITED_CLASS_WITH_CTOR.exec(typeStr))) {\n return null;\n }\n // Prefer the direct API.\n if (type.parameters && type.parameters !== parentCtor.parameters) {\n return type.parameters;\n }\n // API of tsickle for lowering decorators to properties on the class.\n var tsickleCtorParams = type.ctorParameters;\n if (tsickleCtorParams && tsickleCtorParams !== parentCtor.ctorParameters) {\n // Newer tsickle uses a function closure\n // Retain the non-function case for compatibility with older tsickle\n var ctorParameters = typeof tsickleCtorParams === 'function' ? tsickleCtorParams() : tsickleCtorParams;\n var paramTypes_1 = ctorParameters.map(function (ctorParam) { return ctorParam && ctorParam.type; });\n var paramAnnotations_1 = ctorParameters.map(function (ctorParam) {\n return ctorParam && convertTsickleDecoratorIntoMetadata(ctorParam.decorators);\n });\n return this._zipTypesAndAnnotations(paramTypes_1, paramAnnotations_1);\n }\n // API for metadata created by invoking the decorators.\n var paramAnnotations = type.hasOwnProperty(PARAMETERS) && type[PARAMETERS];\n var paramTypes = this._reflect && this._reflect.getOwnMetadata &&\n this._reflect.getOwnMetadata('design:paramtypes', type);\n if (paramTypes || paramAnnotations) {\n return this._zipTypesAndAnnotations(paramTypes, paramAnnotations);\n }\n // If a class has no decorators, at least create metadata\n // based on function.length.\n // Note: We know that this is a real constructor as we checked\n // the content of the constructor above.\n return new Array(type.length).fill(undefined);\n };\n ReflectionCapabilities.prototype.parameters = function (type) {\n // Note: only report metadata if we have at least one class decorator\n // to stay in sync with the static reflector.\n if (!isType(type)) {\n return [];\n }\n var parentCtor = getParentCtor(type);\n var parameters = this._ownParameters(type, parentCtor);\n if (!parameters && parentCtor !== Object) {\n parameters = this.parameters(parentCtor);\n }\n return parameters || [];\n };\n ReflectionCapabilities.prototype._ownAnnotations = function (typeOrFunc, parentCtor) {\n // Prefer the direct API.\n if (typeOrFunc.annotations && typeOrFunc.annotations !== parentCtor.annotations) {\n var annotations = typeOrFunc.annotations;\n if (typeof annotations === 'function' && annotations.annotations) {\n annotations = annotations.annotations;\n }\n return annotations;\n }\n // API of tsickle for lowering decorators to properties on the class.\n if (typeOrFunc.decorators && typeOrFunc.decorators !== parentCtor.decorators) {\n return convertTsickleDecoratorIntoMetadata(typeOrFunc.decorators);\n }\n // API for metadata created by invoking the decorators.\n if (typeOrFunc.hasOwnProperty(ANNOTATIONS)) {\n return typeOrFunc[ANNOTATIONS];\n }\n return null;\n };\n ReflectionCapabilities.prototype.annotations = function (typeOrFunc) {\n if (!isType(typeOrFunc)) {\n return [];\n }\n var parentCtor = getParentCtor(typeOrFunc);\n var ownAnnotations = this._ownAnnotations(typeOrFunc, parentCtor) || [];\n var parentAnnotations = parentCtor !== Object ? this.annotations(parentCtor) : [];\n return parentAnnotations.concat(ownAnnotations);\n };\n ReflectionCapabilities.prototype._ownPropMetadata = function (typeOrFunc, parentCtor) {\n // Prefer the direct API.\n if (typeOrFunc.propMetadata &&\n typeOrFunc.propMetadata !== parentCtor.propMetadata) {\n var propMetadata = typeOrFunc.propMetadata;\n if (typeof propMetadata === 'function' && propMetadata.propMetadata) {\n propMetadata = propMetadata.propMetadata;\n }\n return propMetadata;\n }\n // API of tsickle for lowering decorators to properties on the class.\n if (typeOrFunc.propDecorators &&\n typeOrFunc.propDecorators !== parentCtor.propDecorators) {\n var propDecorators_1 = typeOrFunc.propDecorators;\n var propMetadata_1 = {};\n Object.keys(propDecorators_1).forEach(function (prop) {\n propMetadata_1[prop] = convertTsickleDecoratorIntoMetadata(propDecorators_1[prop]);\n });\n return propMetadata_1;\n }\n // API for metadata created by invoking the decorators.\n if (typeOrFunc.hasOwnProperty(PROP_METADATA)) {\n return typeOrFunc[PROP_METADATA];\n }\n return null;\n };\n ReflectionCapabilities.prototype.propMetadata = function (typeOrFunc) {\n if (!isType(typeOrFunc)) {\n return {};\n }\n var parentCtor = getParentCtor(typeOrFunc);\n var propMetadata = {};\n if (parentCtor !== Object) {\n var parentPropMetadata_1 = this.propMetadata(parentCtor);\n Object.keys(parentPropMetadata_1).forEach(function (propName) {\n propMetadata[propName] = parentPropMetadata_1[propName];\n });\n }\n var ownPropMetadata = this._ownPropMetadata(typeOrFunc, parentCtor);\n if (ownPropMetadata) {\n Object.keys(ownPropMetadata).forEach(function (propName) {\n var decorators = [];\n if (propMetadata.hasOwnProperty(propName)) {\n decorators.push.apply(decorators, __spread(propMetadata[propName]));\n }\n decorators.push.apply(decorators, __spread(ownPropMetadata[propName]));\n propMetadata[propName] = decorators;\n });\n }\n return propMetadata;\n };\n ReflectionCapabilities.prototype.hasLifecycleHook = function (type, lcProperty) {\n return type instanceof Type && lcProperty in type.prototype;\n };\n ReflectionCapabilities.prototype.guards = function (type) { return {}; };\n ReflectionCapabilities.prototype.getter = function (name) { return new Function('o', 'return o.' + name + ';'); };\n ReflectionCapabilities.prototype.setter = function (name) {\n return new Function('o', 'v', 'return o.' + name + ' = v;');\n };\n ReflectionCapabilities.prototype.method = function (name) {\n var functionBody = \"if (!o.\" + name + \") throw new Error('\\\"\" + name + \"\\\" is undefined');\\n return o.\" + name + \".apply(o, args);\";\n return new Function('o', 'args', functionBody);\n };\n // There is not a concept of import uri in Js, but this is useful in developing Dart applications.\n ReflectionCapabilities.prototype.importUri = function (type) {\n // StaticSymbol\n if (typeof type === 'object' && type['filePath']) {\n return type['filePath'];\n }\n // Runtime type\n return \"./\" + stringify(type);\n };\n ReflectionCapabilities.prototype.resourceUri = function (type) { return \"./\" + stringify(type); };\n ReflectionCapabilities.prototype.resolveIdentifier = function (name, moduleUrl, members, runtime) {\n return runtime;\n };\n ReflectionCapabilities.prototype.resolveEnum = function (enumIdentifier, name) { return enumIdentifier[name]; };\n return ReflectionCapabilities;\n}());\nfunction convertTsickleDecoratorIntoMetadata(decoratorInvocations) {\n if (!decoratorInvocations) {\n return [];\n }\n return decoratorInvocations.map(function (decoratorInvocation) {\n var decoratorType = decoratorInvocation.type;\n var annotationCls = decoratorType.annotationCls;\n var annotationArgs = decoratorInvocation.args ? decoratorInvocation.args : [];\n return new (annotationCls.bind.apply(annotationCls, __spread([void 0], annotationArgs)))();\n });\n}\nfunction getParentCtor(ctor) {\n var parentProto = ctor.prototype ? Object.getPrototypeOf(ctor.prototype) : null;\n var parentCtor = parentProto ? parentProto.constructor : null;\n // Note: We always use `Object` as the null value\n // to simplify checking later on.\n return parentCtor || Object;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction getClosureSafeProperty(objWithPropertyToExtract, target) {\n for (var key in objWithPropertyToExtract) {\n if (objWithPropertyToExtract[key] === target) {\n return key;\n }\n }\n throw Error('Could not find renamed property on target object.');\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * Allows to refer to references which are not yet defined.\n *\n * For instance, `forwardRef` is used when the `token` which we need to refer to for the purposes of\n * DI is declared, but not yet defined. It is also used when the `token` which we use when creating\n * a query is not yet defined.\n *\n * @usageNotes\n * ### Example\n * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref'}\n * @experimental\n */\nfunction forwardRef(forwardRefFn) {\n forwardRefFn.__forward_ref__ = forwardRef;\n forwardRefFn.toString = function () { return stringify(this()); };\n return forwardRefFn;\n}\n/**\n * Lazily retrieves the reference value from a forwardRef.\n *\n * Acts as the identity function when given a non-forward-ref value.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='resolve_forward_ref'}\n *\n * @see `forwardRef`\n * @experimental\n */\nfunction resolveForwardRef(type) {\n if (typeof type === 'function' && type.hasOwnProperty('__forward_ref__') &&\n type.__forward_ref__ === forwardRef) {\n return type();\n }\n else {\n return type;\n }\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * Inject decorator and metadata.\n *\n * @Annotation\n */\nvar Inject = makeParamDecorator('Inject', function (token) { return ({ token: token }); });\n/**\n * Optional decorator and metadata.\n *\n * @Annotation\n */\nvar Optional = makeParamDecorator('Optional');\n/**\n * Self decorator and metadata.\n *\n * @Annotation\n */\nvar Self = makeParamDecorator('Self');\n/**\n * SkipSelf decorator and metadata.\n *\n * @Annotation\n */\nvar SkipSelf = makeParamDecorator('SkipSelf');\n/**\n * Host decorator and metadata.\n *\n * @Annotation\n */\nvar Host = makeParamDecorator('Host');\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar SOURCE = '__source';\nvar _THROW_IF_NOT_FOUND = new Object();\nvar THROW_IF_NOT_FOUND = _THROW_IF_NOT_FOUND;\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 * @experimental\n */\nvar INJECTOR = new InjectionToken('INJECTOR');\nvar NullInjector = /** @class */ (function () {\n function NullInjector() {\n }\n NullInjector.prototype.get = function (token, notFoundValue) {\n if (notFoundValue === void 0) { notFoundValue = _THROW_IF_NOT_FOUND; }\n if (notFoundValue === _THROW_IF_NOT_FOUND) {\n throw new Error(\"NullInjectorError: No provider for \" + stringify(token) + \"!\");\n }\n return notFoundValue;\n };\n return NullInjector;\n}());\n/**\n * Concrete injectors implement this interface.\n *\n * For more details, see the [\"Dependency Injection Guide\"](guide/dependency-injection).\n *\n * @usageNotes\n * ### 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 *\n */\nvar Injector = /** @class */ (function () {\n function Injector() {\n }\n /**\n * Create a new Injector which is configure using `StaticProvider`s.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}\n */\n Injector.create = function (options, parent) {\n if (Array.isArray(options)) {\n return new StaticInjector(options, parent);\n }\n else {\n return new StaticInjector(options.providers, options.parent, options.name || null);\n }\n };\n Injector.THROW_IF_NOT_FOUND = _THROW_IF_NOT_FOUND;\n Injector.NULL = new NullInjector();\n Injector.ngInjectableDef = defineInjectable({\n providedIn: 'any',\n factory: function () { return inject(INJECTOR); },\n });\n return Injector;\n}());\nvar IDENT = function (value) {\n return value;\n};\nvar EMPTY = [];\nvar CIRCULAR = IDENT;\nvar MULTI_PROVIDER_FN = function () {\n return Array.prototype.slice.call(arguments);\n};\nvar GET_PROPERTY_NAME$1 = {};\nvar USE_VALUE$1 = getClosureSafeProperty$1({ provide: String, useValue: GET_PROPERTY_NAME$1 });\nvar NG_TOKEN_PATH = 'ngTokenPath';\nvar NG_TEMP_TOKEN_PATH = 'ngTempTokenPath';\nvar NULL_INJECTOR = Injector.NULL;\nvar NEW_LINE = /\\n/gm;\nvar NO_NEW_LINE = 'ɵ';\nvar StaticInjector = /** @class */ (function () {\n function StaticInjector(providers, parent, source) {\n if (parent === void 0) { parent = NULL_INJECTOR; }\n if (source === void 0) { source = null; }\n this.parent = parent;\n this.source = source;\n var records = this._records = new Map();\n records.set(Injector, { token: Injector, fn: IDENT, deps: EMPTY, value: this, useNew: false });\n records.set(INJECTOR, { token: INJECTOR, fn: IDENT, deps: EMPTY, value: this, useNew: false });\n recursivelyProcessProviders(records, providers);\n }\n StaticInjector.prototype.get = function (token, notFoundValue, flags) {\n if (flags === void 0) { flags = 0 /* Default */; }\n var record = this._records.get(token);\n try {\n return tryResolveToken(token, record, this._records, this.parent, notFoundValue, flags);\n }\n catch (e) {\n var tokenPath = e[NG_TEMP_TOKEN_PATH];\n if (token[SOURCE]) {\n tokenPath.unshift(token[SOURCE]);\n }\n e.message = formatError('\\n' + e.message, tokenPath, this.source);\n e[NG_TOKEN_PATH] = tokenPath;\n e[NG_TEMP_TOKEN_PATH] = null;\n throw e;\n }\n };\n StaticInjector.prototype.toString = function () {\n var tokens = [], records = this._records;\n records.forEach(function (v, token) { return tokens.push(stringify(token)); });\n return \"StaticInjector[\" + tokens.join(', ') + \"]\";\n };\n return StaticInjector;\n}());\nfunction resolveProvider(provider) {\n var deps = computeDeps(provider);\n var fn = IDENT;\n var value = EMPTY;\n var useNew = false;\n var provide = resolveForwardRef(provider.provide);\n if (USE_VALUE$1 in provider) {\n // We need to use USE_VALUE in provider since provider.useValue could be defined as undefined.\n value = provider.useValue;\n }\n else if (provider.useFactory) {\n fn = provider.useFactory;\n }\n else if (provider.useExisting) {\n // Just use IDENT\n }\n else if (provider.useClass) {\n useNew = true;\n fn = resolveForwardRef(provider.useClass);\n }\n else if (typeof provide == 'function') {\n useNew = true;\n fn = provide;\n }\n else {\n throw staticError('StaticProvider does not have [useValue|useFactory|useExisting|useClass] or [provide] is not newable', provider);\n }\n return { deps: deps, fn: fn, useNew: useNew, value: value };\n}\nfunction multiProviderMixError(token) {\n return staticError('Cannot mix multi providers and regular providers', token);\n}\nfunction recursivelyProcessProviders(records, provider) {\n if (provider) {\n provider = resolveForwardRef(provider);\n if (provider instanceof Array) {\n // if we have an array recurse into the array\n for (var i = 0; i < provider.length; i++) {\n recursivelyProcessProviders(records, provider[i]);\n }\n }\n else if (typeof provider === 'function') {\n // Functions were supported in ReflectiveInjector, but are not here. For safety give useful\n // error messages\n throw staticError('Function/Class not supported', provider);\n }\n else if (provider && typeof provider === 'object' && provider.provide) {\n // At this point we have what looks like a provider: {provide: ?, ....}\n var token = resolveForwardRef(provider.provide);\n var resolvedProvider = resolveProvider(provider);\n if (provider.multi === true) {\n // This is a multi provider.\n var multiProvider = records.get(token);\n if (multiProvider) {\n if (multiProvider.fn !== MULTI_PROVIDER_FN) {\n throw multiProviderMixError(token);\n }\n }\n else {\n // Create a placeholder factory which will look up the constituents of the multi provider.\n records.set(token, multiProvider = {\n token: provider.provide,\n deps: [],\n useNew: false,\n fn: MULTI_PROVIDER_FN,\n value: EMPTY\n });\n }\n // Treat the provider as the token.\n token = provider;\n multiProvider.deps.push({ token: token, options: 6 /* Default */ });\n }\n var record = records.get(token);\n if (record && record.fn == MULTI_PROVIDER_FN) {\n throw multiProviderMixError(token);\n }\n records.set(token, resolvedProvider);\n }\n else {\n throw staticError('Unexpected provider', provider);\n }\n }\n}\nfunction tryResolveToken(token, record, records, parent, notFoundValue, flags) {\n try {\n return resolveToken(token, record, records, parent, notFoundValue, flags);\n }\n catch (e) {\n // ensure that 'e' is of type Error.\n if (!(e instanceof Error)) {\n e = new Error(e);\n }\n var path = e[NG_TEMP_TOKEN_PATH] = e[NG_TEMP_TOKEN_PATH] || [];\n path.unshift(token);\n if (record && record.value == CIRCULAR) {\n // Reset the Circular flag.\n record.value = EMPTY;\n }\n throw e;\n }\n}\nfunction resolveToken(token, record, records, parent, notFoundValue, flags) {\n var value;\n if (record && !(flags & 4 /* SkipSelf */)) {\n // If we don't have a record, this implies that we don't own the provider hence don't know how\n // to resolve it.\n value = record.value;\n if (value == CIRCULAR) {\n throw Error(NO_NEW_LINE + 'Circular dependency');\n }\n else if (value === EMPTY) {\n record.value = CIRCULAR;\n var obj = undefined;\n var useNew = record.useNew;\n var fn = record.fn;\n var depRecords = record.deps;\n var deps = EMPTY;\n if (depRecords.length) {\n deps = [];\n for (var i = 0; i < depRecords.length; i++) {\n var depRecord = depRecords[i];\n var options = depRecord.options;\n var childRecord = options & 2 /* CheckSelf */ ? records.get(depRecord.token) : undefined;\n deps.push(tryResolveToken(\n // Current Token to resolve\n depRecord.token, \n // A record which describes how to resolve the token.\n // If undefined, this means we don't have such a record\n childRecord, \n // Other records we know about.\n records, \n // If we don't know how to resolve dependency and we should not check parent for it,\n // than pass in Null injector.\n !childRecord && !(options & 4 /* CheckParent */) ? NULL_INJECTOR : parent, options & 1 /* Optional */ ? null : Injector.THROW_IF_NOT_FOUND, 0 /* Default */));\n }\n }\n record.value = value = useNew ? new ((_a = fn).bind.apply(_a, __spread([void 0], deps)))() : fn.apply(obj, deps);\n }\n }\n else if (!(flags & 2 /* Self */)) {\n value = parent.get(token, notFoundValue, 0 /* Default */);\n }\n return value;\n var _a;\n}\nfunction computeDeps(provider) {\n var deps = EMPTY;\n var providerDeps = provider.deps;\n if (providerDeps && providerDeps.length) {\n deps = [];\n for (var i = 0; i < providerDeps.length; i++) {\n var options = 6;\n var token = resolveForwardRef(providerDeps[i]);\n if (token instanceof Array) {\n for (var j = 0, annotations = token; j < annotations.length; j++) {\n var annotation = annotations[j];\n if (annotation instanceof Optional || annotation == Optional) {\n options = options | 1 /* Optional */;\n }\n else if (annotation instanceof SkipSelf || annotation == SkipSelf) {\n options = options & ~2 /* CheckSelf */;\n }\n else if (annotation instanceof Self || annotation == Self) {\n options = options & ~4 /* CheckParent */;\n }\n else if (annotation instanceof Inject) {\n token = annotation.token;\n }\n else {\n token = resolveForwardRef(annotation);\n }\n }\n }\n deps.push({ token: token, options: options });\n }\n }\n else if (provider.useExisting) {\n var token = resolveForwardRef(provider.useExisting);\n deps = [{ token: token, options: 6 /* Default */ }];\n }\n else if (!providerDeps && !(USE_VALUE$1 in provider)) {\n // useValue & useExisting are the only ones which are exempt from deps all others need it.\n throw staticError('\\'deps\\' required', provider);\n }\n return deps;\n}\nfunction formatError(text, obj, source) {\n if (source === void 0) { source = null; }\n text = text && text.charAt(0) === '\\n' && text.charAt(1) == NO_NEW_LINE ? text.substr(2) : text;\n var context = stringify(obj);\n if (obj instanceof Array) {\n context = obj.map(stringify).join(' -> ');\n }\n else if (typeof obj === 'object') {\n var parts = [];\n for (var key in obj) {\n if (obj.hasOwnProperty(key)) {\n var value = obj[key];\n parts.push(key + ':' + (typeof value === 'string' ? JSON.stringify(value) : stringify(value)));\n }\n }\n context = \"{\" + parts.join(', ') + \"}\";\n }\n return \"StaticInjectorError\" + (source ? '(' + source + ')' : '') + \"[\" + context + \"]: \" + text.replace(NEW_LINE, '\\n ');\n}\nfunction staticError(text, obj) {\n return new Error(formatError(text, obj));\n}\nfunction getClosureSafeProperty$1(objWithPropertyToExtract) {\n for (var key in objWithPropertyToExtract) {\n if (objWithPropertyToExtract[key] === GET_PROPERTY_NAME$1) {\n return key;\n }\n }\n throw Error('!prop');\n}\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 */\nvar _currentInjector = undefined;\nfunction setCurrentInjector(injector) {\n var former = _currentInjector;\n _currentInjector = injector;\n return former;\n}\nfunction inject(token, flags) {\n if (flags === void 0) { flags = 0 /* Default */; }\n if (_currentInjector === undefined) {\n throw new Error(\"inject() must be called from an injection context\");\n }\n else if (_currentInjector === null) {\n var injectableDef = token.ngInjectableDef;\n if (injectableDef && injectableDef.providedIn == 'root') {\n return injectableDef.value === undefined ? injectableDef.value = injectableDef.factory() :\n injectableDef.value;\n }\n throw new Error(\"Injector: NOT_FOUND [\" + stringify(token) + \"]\");\n }\n else {\n return _currentInjector.get(token, flags & 8 /* Optional */ ? null : undefined, flags);\n }\n}\nfunction injectArgs(types) {\n var args = [];\n for (var i = 0; i < types.length; i++) {\n var arg = types[i];\n if (Array.isArray(arg)) {\n if (arg.length === 0) {\n throw new Error('Arguments array must have arguments.');\n }\n var type = undefined;\n var flags = 0;\n for (var j = 0; j < arg.length; j++) {\n var meta = arg[j];\n if (meta instanceof Optional || meta.__proto__.ngMetadataName === 'Optional') {\n flags |= 8 /* Optional */;\n }\n else if (meta instanceof SkipSelf || meta.__proto__.ngMetadataName === 'SkipSelf') {\n flags |= 4 /* SkipSelf */;\n }\n else if (meta instanceof Self || meta.__proto__.ngMetadataName === 'Self') {\n flags |= 2 /* Self */;\n }\n else if (meta instanceof Inject) {\n type = meta.token;\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/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar GET_PROPERTY_NAME = {};\nvar ɵ0 = GET_PROPERTY_NAME;\nvar USE_VALUE = getClosureSafeProperty({ provide: String, useValue: ɵ0 }, GET_PROPERTY_NAME);\nvar EMPTY_ARRAY = [];\nfunction convertInjectableProviderToFactory(type, provider) {\n if (!provider) {\n var reflectionCapabilities = new ReflectionCapabilities();\n var deps_1 = reflectionCapabilities.parameters(type);\n // TODO - convert to flags.\n return function () { return new (type.bind.apply(type, __spread([void 0], injectArgs(deps_1))))(); };\n }\n if (USE_VALUE in provider) {\n var valueProvider_1 = provider;\n return function () { return valueProvider_1.useValue; };\n }\n else if (provider.useExisting) {\n var existingProvider_1 = provider;\n return function () { return inject(existingProvider_1.useExisting); };\n }\n else if (provider.useFactory) {\n var factoryProvider_1 = provider;\n return function () { return factoryProvider_1.useFactory.apply(factoryProvider_1, __spread(injectArgs(factoryProvider_1.deps || EMPTY_ARRAY))); };\n }\n else if (provider.useClass) {\n var classProvider_1 = provider;\n var deps_2 = provider.deps;\n if (!deps_2) {\n var reflectionCapabilities = new ReflectionCapabilities();\n deps_2 = reflectionCapabilities.parameters(type);\n }\n return function () {\n return new ((_a = classProvider_1.useClass).bind.apply(_a, __spread([void 0], injectArgs(deps_2))))();\n var _a;\n };\n }\n else {\n var deps_3 = provider.deps;\n if (!deps_3) {\n var reflectionCapabilities = new ReflectionCapabilities();\n deps_3 = reflectionCapabilities.parameters(type);\n }\n return function () { return new (type.bind.apply(type, __spread([void 0], injectArgs(deps_3))))(); };\n }\n}\n/**\n* Injectable decorator and metadata.\n*\n* @Annotation\n*/\nvar Injectable = makeDecorator('Injectable', undefined, undefined, undefined, function (injectableType, options) {\n if (options && options.providedIn !== undefined &&\n injectableType.ngInjectableDef === undefined) {\n injectableType.ngInjectableDef = defineInjectable({\n providedIn: options.providedIn,\n factory: convertInjectableProviderToFactory(injectableType, options)\n });\n }\n});\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Defines a schema that allows an NgModule to contain the following:\n * - Non-Angular elements named with dash case (`-`).\n * - Element properties named with dash case (`-`).\n * Dash case is the naming convention for custom elements.\n *\n *\n */\nvar CUSTOM_ELEMENTS_SCHEMA = {\n name: 'custom-elements'\n};\n/**\n * Defines a schema that allows any property on any element.\n *\n * @experimental\n */\nvar NO_ERRORS_SCHEMA = {\n name: 'no-errors-schema'\n};\n/**\n * Decorator that marks the following class as an NgModule, and supplies\n * configuration metadata for it.\n *\n * @Annotation\n */\nvar NgModule = makeDecorator('NgModule', function (ngModule) { return ngModule; }, undefined, undefined, \n/**\n * Decorator that marks the following class as an NgModule, and supplies\n * configuration metadata for it.\n */\nfunction (moduleType, metadata) {\n var imports = (metadata && metadata.imports) || [];\n if (metadata && metadata.exports) {\n imports = __spread(imports, [metadata.exports]);\n }\n moduleType.ngInjectorDef = defineInjector({\n factory: convertInjectableProviderToFactory(moduleType, { useClass: moduleType }),\n providers: metadata && metadata.providers,\n imports: imports,\n });\n});\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Defines template and style encapsulation options available for Component's {@link Component}.\n *\n * See {@link Component#encapsulation encapsulation}.\n *\n */\n\n(function (ViewEncapsulation) {\n /**\n * Emulate `Native` scoping of styles by adding an attribute containing surrogate id to the Host\n * Element and pre-processing the style rules provided via {@link Component#styles styles} or\n * {@link Component#styleUrls styleUrls}, and adding the new Host Element attribute to all\n * selectors.\n *\n * This is the default option.\n */\n ViewEncapsulation[ViewEncapsulation[\"Emulated\"] = 0] = \"Emulated\";\n /**\n * Use the native encapsulation mechanism of the renderer.\n *\n * For the DOM this means using [Shadow DOM](https://w3c.github.io/webcomponents/spec/shadow/) and\n * creating a ShadowRoot for Component's Host Element.\n */\n ViewEncapsulation[ViewEncapsulation[\"Native\"] = 1] = \"Native\";\n /**\n * Don't provide any template or style encapsulation.\n */\n ViewEncapsulation[ViewEncapsulation[\"None\"] = 2] = \"None\";\n})(exports.ViewEncapsulation || (exports.ViewEncapsulation = {}));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @description Represents the version of Angular\n *\n *\n */\nvar Version = /** @class */ (function () {\n function Version(full) {\n this.full = full;\n this.major = full.split('.')[0];\n this.minor = full.split('.')[1];\n this.patch = full.split('.').slice(2).join('.');\n }\n return Version;\n}());\nvar VERSION = new Version('6.0.7');\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nvar ERROR_DEBUG_CONTEXT = 'ngDebugContext';\nvar ERROR_ORIGINAL_ERROR = 'ngOriginalError';\nvar ERROR_LOGGER = 'ngErrorLogger';\n\nfunction getDebugContext(error) {\n return error[ERROR_DEBUG_CONTEXT];\n}\nfunction getOriginalError(error) {\n return error[ERROR_ORIGINAL_ERROR];\n}\nfunction getErrorLogger(error) {\n return error[ERROR_LOGGER] || defaultErrorLogger;\n}\nfunction defaultErrorLogger(console) {\n var values = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n values[_i - 1] = arguments[_i];\n }\n console.error.apply(console, __spread(values));\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Provides a hook for centralized exception handling.\n *\n * The default implementation of `ErrorHandler` prints error messages to the `console`. To\n * intercept error handling, write a custom exception handler that replaces this default as\n * appropriate for your app.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * class MyErrorHandler implements ErrorHandler {\n * handleError(error) {\n * // do something with the exception\n * }\n * }\n *\n * @NgModule({\n * providers: [{provide: ErrorHandler, useClass: MyErrorHandler}]\n * })\n * class MyModule {}\n * ```\n */\nvar ErrorHandler = /** @class */ (function () {\n function ErrorHandler() {\n /**\n * @internal\n */\n this._console = console;\n }\n ErrorHandler.prototype.handleError = function (error) {\n var originalError = this._findOriginalError(error);\n var context = this._findContext(error);\n // Note: Browser consoles show the place from where console.error was called.\n // We can use this to give users additional information about the error.\n var errorLogger = getErrorLogger(error);\n errorLogger(this._console, \"ERROR\", error);\n if (originalError) {\n errorLogger(this._console, \"ORIGINAL ERROR\", originalError);\n }\n if (context) {\n errorLogger(this._console, 'ERROR CONTEXT', context);\n }\n };\n /** @internal */\n ErrorHandler.prototype._findContext = function (error) {\n if (error) {\n return getDebugContext(error) ? getDebugContext(error) :\n this._findContext(getOriginalError(error));\n }\n return null;\n };\n /** @internal */\n ErrorHandler.prototype._findOriginalError = function (error) {\n var e = getOriginalError(error);\n while (e && getOriginalError(e)) {\n e = getOriginalError(e);\n }\n return e;\n };\n return ErrorHandler;\n}());\nfunction wrappedError(message, originalError) {\n var msg = message + \" caused by: \" + (originalError instanceof Error ? originalError.message : originalError);\n var error = Error(msg);\n error[ERROR_ORIGINAL_ERROR] = originalError;\n return error;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction findFirstClosedCycle(keys) {\n var res = [];\n for (var i = 0; i < keys.length; ++i) {\n if (res.indexOf(keys[i]) > -1) {\n res.push(keys[i]);\n return res;\n }\n res.push(keys[i]);\n }\n return res;\n}\nfunction constructResolvingPath(keys) {\n if (keys.length > 1) {\n var reversed = findFirstClosedCycle(keys.slice().reverse());\n var tokenStrs = reversed.map(function (k) { return stringify(k.token); });\n return ' (' + tokenStrs.join(' -> ') + ')';\n }\n return '';\n}\nfunction injectionError(injector, key, constructResolvingMessage, originalError) {\n var keys = [key];\n var errMsg = constructResolvingMessage(keys);\n var error = (originalError ? wrappedError(errMsg, originalError) : Error(errMsg));\n error.addKey = addKey;\n error.keys = keys;\n error.injectors = [injector];\n error.constructResolvingMessage = constructResolvingMessage;\n error[ERROR_ORIGINAL_ERROR] = originalError;\n return error;\n}\nfunction addKey(injector, key) {\n this.injectors.push(injector);\n this.keys.push(key);\n // Note: This updated message won't be reflected in the `.stack` property\n this.message = this.constructResolvingMessage(this.keys);\n}\n/**\n * Thrown when trying to retrieve a dependency by key from {@link Injector}, but the\n * {@link Injector} does not have a {@link Provider} for the given key.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class A {\n * constructor(b:B) {}\n * }\n *\n * expect(() => Injector.resolveAndCreate([A])).toThrowError();\n * ```\n */\nfunction noProviderError(injector, key) {\n return injectionError(injector, key, function (keys) {\n var first = stringify(keys[0].token);\n return \"No provider for \" + first + \"!\" + constructResolvingPath(keys);\n });\n}\n/**\n * Thrown when dependencies form a cycle.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * var injector = Injector.resolveAndCreate([\n * {provide: \"one\", useFactory: (two) => \"two\", deps: [[new Inject(\"two\")]]},\n * {provide: \"two\", useFactory: (one) => \"one\", deps: [[new Inject(\"one\")]]}\n * ]);\n *\n * expect(() => injector.get(\"one\")).toThrowError();\n * ```\n *\n * Retrieving `A` or `B` throws a `CyclicDependencyError` as the graph above cannot be constructed.\n */\nfunction cyclicDependencyError(injector, key) {\n return injectionError(injector, key, function (keys) {\n return \"Cannot instantiate cyclic dependency!\" + constructResolvingPath(keys);\n });\n}\n/**\n * Thrown when a constructing type returns with an Error.\n *\n * The `InstantiationError` class contains the original error plus the dependency graph which caused\n * this object to be instantiated.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class A {\n * constructor() {\n * throw new Error('message');\n * }\n * }\n *\n * var injector = Injector.resolveAndCreate([A]);\n\n * try {\n * injector.get(A);\n * } catch (e) {\n * expect(e instanceof InstantiationError).toBe(true);\n * expect(e.originalException.message).toEqual(\"message\");\n * expect(e.originalStack).toBeDefined();\n * }\n * ```\n */\nfunction instantiationError(injector, originalException, originalStack, key) {\n return injectionError(injector, key, function (keys) {\n var first = stringify(keys[0].token);\n return originalException.message + \": Error during instantiation of \" + first + \"!\" + constructResolvingPath(keys) + \".\";\n }, originalException);\n}\n/**\n * Thrown when an object other then {@link Provider} (or `Type`) is passed to {@link Injector}\n * creation.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * expect(() => Injector.resolveAndCreate([\"not a type\"])).toThrowError();\n * ```\n */\nfunction invalidProviderError(provider) {\n return Error(\"Invalid provider - only instances of Provider and Type are allowed, got: \" + provider);\n}\n/**\n * Thrown when the class has no annotation information.\n *\n * Lack of annotation information prevents the {@link Injector} from determining which dependencies\n * need to be injected into the constructor.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class A {\n * constructor(b) {}\n * }\n *\n * expect(() => Injector.resolveAndCreate([A])).toThrowError();\n * ```\n *\n * This error is also thrown when the class not marked with {@link Injectable} has parameter types.\n *\n * ```typescript\n * class B {}\n *\n * class A {\n * constructor(b:B) {} // no information about the parameter types of A is available at runtime.\n * }\n *\n * expect(() => Injector.resolveAndCreate([A,B])).toThrowError();\n * ```\n *\n */\nfunction noAnnotationError(typeOrFunc, params) {\n var signature = [];\n for (var i = 0, ii = params.length; i < ii; i++) {\n var parameter = params[i];\n if (!parameter || parameter.length == 0) {\n signature.push('?');\n }\n else {\n signature.push(parameter.map(stringify).join(' '));\n }\n }\n return Error('Cannot resolve all parameters for \\'' + stringify(typeOrFunc) + '\\'(' +\n signature.join(', ') + '). ' +\n 'Make sure that all the parameters are decorated with Inject or have valid type annotations and that \\'' +\n stringify(typeOrFunc) + '\\' is decorated with Injectable.');\n}\n/**\n * Thrown when getting an object by index.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class A {}\n *\n * var injector = Injector.resolveAndCreate([A]);\n *\n * expect(() => injector.getAt(100)).toThrowError();\n * ```\n *\n */\nfunction outOfBoundsError(index) {\n return Error(\"Index \" + index + \" is out-of-bounds.\");\n}\n// TODO: add a working example after alpha38 is released\n/**\n * Thrown when a multi provider and a regular provider are bound to the same token.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * expect(() => Injector.resolveAndCreate([\n * { provide: \"Strings\", useValue: \"string1\", multi: true},\n * { provide: \"Strings\", useValue: \"string2\", multi: false}\n * ])).toThrowError();\n * ```\n */\nfunction mixingMultiProvidersWithRegularProvidersError(provider1, provider2) {\n return Error(\"Cannot mix multi providers and regular providers, got: \" + provider1 + \" \" + provider2);\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A unique object used for retrieving items from the {@link ReflectiveInjector}.\n *\n * Keys have:\n * - a system-wide unique `id`.\n * - a `token`.\n *\n * `Key` is used internally by {@link ReflectiveInjector} because its system-wide unique `id` allows\n * the\n * injector to store created objects in a more efficient way.\n *\n * `Key` should not be created directly. {@link ReflectiveInjector} creates keys automatically when\n * resolving\n * providers.\n * @deprecated No replacement\n */\nvar ReflectiveKey = /** @class */ (function () {\n /**\n * Private\n */\n function ReflectiveKey(token, id) {\n this.token = token;\n this.id = id;\n if (!token) {\n throw new Error('Token must be defined!');\n }\n this.displayName = stringify(this.token);\n }\n /**\n * Retrieves a `Key` for a token.\n */\n ReflectiveKey.get = function (token) {\n return _globalKeyRegistry.get(resolveForwardRef(token));\n };\n Object.defineProperty(ReflectiveKey, \"numberOfKeys\", {\n /**\n * @returns the number of keys registered in the system.\n */\n get: function () { return _globalKeyRegistry.numberOfKeys; },\n enumerable: true,\n configurable: true\n });\n return ReflectiveKey;\n}());\nvar KeyRegistry = /** @class */ (function () {\n function KeyRegistry() {\n this._allKeys = new Map();\n }\n KeyRegistry.prototype.get = function (token) {\n if (token instanceof ReflectiveKey)\n return token;\n if (this._allKeys.has(token)) {\n return this._allKeys.get(token);\n }\n var newKey = new ReflectiveKey(token, ReflectiveKey.numberOfKeys);\n this._allKeys.set(token, newKey);\n return newKey;\n };\n Object.defineProperty(KeyRegistry.prototype, \"numberOfKeys\", {\n get: function () { return this._allKeys.size; },\n enumerable: true,\n configurable: true\n });\n return KeyRegistry;\n}());\nvar _globalKeyRegistry = new KeyRegistry();\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Provides access to reflection data about symbols. Used internally by Angular\n * to power dependency injection and compilation.\n */\nvar Reflector = /** @class */ (function () {\n function Reflector(reflectionCapabilities) {\n this.reflectionCapabilities = reflectionCapabilities;\n }\n Reflector.prototype.updateCapabilities = function (caps) { this.reflectionCapabilities = caps; };\n Reflector.prototype.factory = function (type) { return this.reflectionCapabilities.factory(type); };\n Reflector.prototype.parameters = function (typeOrFunc) {\n return this.reflectionCapabilities.parameters(typeOrFunc);\n };\n Reflector.prototype.annotations = function (typeOrFunc) {\n return this.reflectionCapabilities.annotations(typeOrFunc);\n };\n Reflector.prototype.propMetadata = function (typeOrFunc) {\n return this.reflectionCapabilities.propMetadata(typeOrFunc);\n };\n Reflector.prototype.hasLifecycleHook = function (type, lcProperty) {\n return this.reflectionCapabilities.hasLifecycleHook(type, lcProperty);\n };\n Reflector.prototype.getter = function (name) { return this.reflectionCapabilities.getter(name); };\n Reflector.prototype.setter = function (name) { return this.reflectionCapabilities.setter(name); };\n Reflector.prototype.method = function (name) { return this.reflectionCapabilities.method(name); };\n Reflector.prototype.importUri = function (type) { return this.reflectionCapabilities.importUri(type); };\n Reflector.prototype.resourceUri = function (type) { return this.reflectionCapabilities.resourceUri(type); };\n Reflector.prototype.resolveIdentifier = function (name, moduleUrl, members, runtime) {\n return this.reflectionCapabilities.resolveIdentifier(name, moduleUrl, members, runtime);\n };\n Reflector.prototype.resolveEnum = function (identifier, name) {\n return this.reflectionCapabilities.resolveEnum(identifier, name);\n };\n return Reflector;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * The {@link Reflector} used internally in Angular to access metadata\n * about symbols.\n */\nvar reflector = new Reflector(new ReflectionCapabilities());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * `Dependency` is used by the framework to extend DI.\n * This is internal to Angular and should not be used directly.\n */\nvar ReflectiveDependency = /** @class */ (function () {\n function ReflectiveDependency(key, optional, visibility) {\n this.key = key;\n this.optional = optional;\n this.visibility = visibility;\n }\n ReflectiveDependency.fromKey = function (key) {\n return new ReflectiveDependency(key, false, null);\n };\n return ReflectiveDependency;\n}());\nvar _EMPTY_LIST = [];\nvar ResolvedReflectiveProvider_ = /** @class */ (function () {\n function ResolvedReflectiveProvider_(key, resolvedFactories, multiProvider) {\n this.key = key;\n this.resolvedFactories = resolvedFactories;\n this.multiProvider = multiProvider;\n this.resolvedFactory = this.resolvedFactories[0];\n }\n return ResolvedReflectiveProvider_;\n}());\n/**\n * An internal resolved representation of a factory function created by resolving `Provider`.\n * @experimental\n */\nvar ResolvedReflectiveFactory = /** @class */ (function () {\n function ResolvedReflectiveFactory(\n /**\n * Factory function which can return an instance of an object represented by a key.\n */\n factory, \n /**\n * Arguments (dependencies) to the `factory` function.\n */\n dependencies) {\n this.factory = factory;\n this.dependencies = dependencies;\n }\n return ResolvedReflectiveFactory;\n}());\n/**\n * Resolve a single provider.\n */\nfunction resolveReflectiveFactory(provider) {\n var factoryFn;\n var resolvedDeps;\n if (provider.useClass) {\n var useClass = resolveForwardRef(provider.useClass);\n factoryFn = reflector.factory(useClass);\n resolvedDeps = _dependenciesFor(useClass);\n }\n else if (provider.useExisting) {\n factoryFn = function (aliasInstance) { return aliasInstance; };\n resolvedDeps = [ReflectiveDependency.fromKey(ReflectiveKey.get(provider.useExisting))];\n }\n else if (provider.useFactory) {\n factoryFn = provider.useFactory;\n resolvedDeps = constructDependencies(provider.useFactory, provider.deps);\n }\n else {\n factoryFn = function () { return provider.useValue; };\n resolvedDeps = _EMPTY_LIST;\n }\n return new ResolvedReflectiveFactory(factoryFn, resolvedDeps);\n}\n/**\n * Converts the `Provider` into `ResolvedProvider`.\n *\n * `Injector` internally only uses `ResolvedProvider`, `Provider` contains convenience provider\n * syntax.\n */\nfunction resolveReflectiveProvider(provider) {\n return new ResolvedReflectiveProvider_(ReflectiveKey.get(provider.provide), [resolveReflectiveFactory(provider)], provider.multi || false);\n}\n/**\n * Resolve a list of Providers.\n */\nfunction resolveReflectiveProviders(providers) {\n var normalized = _normalizeProviders(providers, []);\n var resolved = normalized.map(resolveReflectiveProvider);\n var resolvedProviderMap = mergeResolvedReflectiveProviders(resolved, new Map());\n return Array.from(resolvedProviderMap.values());\n}\n/**\n * Merges a list of ResolvedProviders into a list where each key is contained exactly once and\n * multi providers have been merged.\n */\nfunction mergeResolvedReflectiveProviders(providers, normalizedProvidersMap) {\n for (var i = 0; i < providers.length; i++) {\n var provider = providers[i];\n var existing = normalizedProvidersMap.get(provider.key.id);\n if (existing) {\n if (provider.multiProvider !== existing.multiProvider) {\n throw mixingMultiProvidersWithRegularProvidersError(existing, provider);\n }\n if (provider.multiProvider) {\n for (var j = 0; j < provider.resolvedFactories.length; j++) {\n existing.resolvedFactories.push(provider.resolvedFactories[j]);\n }\n }\n else {\n normalizedProvidersMap.set(provider.key.id, provider);\n }\n }\n else {\n var resolvedProvider = void 0;\n if (provider.multiProvider) {\n resolvedProvider = new ResolvedReflectiveProvider_(provider.key, provider.resolvedFactories.slice(), provider.multiProvider);\n }\n else {\n resolvedProvider = provider;\n }\n normalizedProvidersMap.set(provider.key.id, resolvedProvider);\n }\n }\n return normalizedProvidersMap;\n}\nfunction _normalizeProviders(providers, res) {\n providers.forEach(function (b) {\n if (b instanceof Type) {\n res.push({ provide: b, useClass: b });\n }\n else if (b && typeof b == 'object' && b.provide !== undefined) {\n res.push(b);\n }\n else if (b instanceof Array) {\n _normalizeProviders(b, res);\n }\n else {\n throw invalidProviderError(b);\n }\n });\n return res;\n}\nfunction constructDependencies(typeOrFunc, dependencies) {\n if (!dependencies) {\n return _dependenciesFor(typeOrFunc);\n }\n else {\n var params_1 = dependencies.map(function (t) { return [t]; });\n return dependencies.map(function (t) { return _extractToken(typeOrFunc, t, params_1); });\n }\n}\nfunction _dependenciesFor(typeOrFunc) {\n var params = reflector.parameters(typeOrFunc);\n if (!params)\n return [];\n if (params.some(function (p) { return p == null; })) {\n throw noAnnotationError(typeOrFunc, params);\n }\n return params.map(function (p) { return _extractToken(typeOrFunc, p, params); });\n}\nfunction _extractToken(typeOrFunc, metadata, params) {\n var token = null;\n var optional = false;\n if (!Array.isArray(metadata)) {\n if (metadata instanceof Inject) {\n return _createDependency(metadata.token, optional, null);\n }\n else {\n return _createDependency(metadata, optional, null);\n }\n }\n var visibility = null;\n for (var i = 0; i < metadata.length; ++i) {\n var paramMetadata = metadata[i];\n if (paramMetadata instanceof Type) {\n token = paramMetadata;\n }\n else if (paramMetadata instanceof Inject) {\n token = paramMetadata.token;\n }\n else if (paramMetadata instanceof Optional) {\n optional = true;\n }\n else if (paramMetadata instanceof Self || paramMetadata instanceof SkipSelf) {\n visibility = paramMetadata;\n }\n else if (paramMetadata instanceof InjectionToken) {\n token = paramMetadata;\n }\n }\n token = resolveForwardRef(token);\n if (token != null) {\n return _createDependency(token, optional, visibility);\n }\n else {\n throw noAnnotationError(typeOrFunc, params);\n }\n}\nfunction _createDependency(token, optional, visibility) {\n return new ReflectiveDependency(ReflectiveKey.get(token), optional, visibility);\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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// Threshold for the dynamic version\nvar UNDEFINED = new Object();\n/**\n * A ReflectiveDependency injection container used for instantiating objects and resolving\n * dependencies.\n *\n * An `Injector` is a replacement for a `new` operator, which can automatically resolve the\n * constructor dependencies.\n *\n * In typical use, application code asks for the dependencies in the constructor and they are\n * resolved by the `Injector`.\n *\n * @usageNotes\n * ### Example\n *\n * The following example creates an `Injector` configured to create `Engine` and `Car`.\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n * constructor(public engine:Engine) {}\n * }\n *\n * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);\n * var car = injector.get(Car);\n * expect(car instanceof Car).toBe(true);\n * expect(car.engine instanceof Engine).toBe(true);\n * ```\n *\n * Notice, we don't use the `new` operator because we explicitly want to have the `Injector`\n * resolve all of the object's dependencies automatically.\n *\n * @deprecated from v5 - slow and brings in a lot of code, Use `Injector.create` instead.\n */\nvar ReflectiveInjector = /** @class */ (function () {\n function ReflectiveInjector() {\n }\n /**\n * Turns an array of provider definitions into an array of resolved providers.\n *\n * A resolution is a process of flattening multiple nested arrays and converting individual\n * providers into an array of `ResolvedReflectiveProvider`s.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n * constructor(public engine:Engine) {}\n * }\n *\n * var providers = ReflectiveInjector.resolve([Car, [[Engine]]]);\n *\n * expect(providers.length).toEqual(2);\n *\n * expect(providers[0] instanceof ResolvedReflectiveProvider).toBe(true);\n * expect(providers[0].key.displayName).toBe(\"Car\");\n * expect(providers[0].dependencies.length).toEqual(1);\n * expect(providers[0].factory).toBeDefined();\n *\n * expect(providers[1].key.displayName).toBe(\"Engine\");\n * });\n * ```\n *\n */\n ReflectiveInjector.resolve = function (providers) {\n return resolveReflectiveProviders(providers);\n };\n /**\n * Resolves an array of providers and creates an injector from those providers.\n *\n * The passed-in providers can be an array of `Type`, `Provider`,\n * or a recursive array of more providers.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n * constructor(public engine:Engine) {}\n * }\n *\n * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);\n * expect(injector.get(Car) instanceof Car).toBe(true);\n * ```\n */\n ReflectiveInjector.resolveAndCreate = function (providers, parent) {\n var ResolvedReflectiveProviders = ReflectiveInjector.resolve(providers);\n return ReflectiveInjector.fromResolvedProviders(ResolvedReflectiveProviders, parent);\n };\n /**\n * Creates an injector from previously resolved providers.\n *\n * This API is the recommended way to construct injectors in performance-sensitive parts.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n * constructor(public engine:Engine) {}\n * }\n *\n * var providers = ReflectiveInjector.resolve([Car, Engine]);\n * var injector = ReflectiveInjector.fromResolvedProviders(providers);\n * expect(injector.get(Car) instanceof Car).toBe(true);\n * ```\n * @experimental\n */\n ReflectiveInjector.fromResolvedProviders = function (providers, parent) {\n return new ReflectiveInjector_(providers, parent);\n };\n return ReflectiveInjector;\n}());\nvar ReflectiveInjector_ = /** @class */ (function () {\n /**\n * Private\n */\n function ReflectiveInjector_(_providers, _parent) {\n /** @internal */\n this._constructionCounter = 0;\n this._providers = _providers;\n this.parent = _parent || null;\n var len = _providers.length;\n this.keyIds = new Array(len);\n this.objs = new Array(len);\n for (var i = 0; i < len; i++) {\n this.keyIds[i] = _providers[i].key.id;\n this.objs[i] = UNDEFINED;\n }\n }\n ReflectiveInjector_.prototype.get = function (token, notFoundValue) {\n if (notFoundValue === void 0) { notFoundValue = THROW_IF_NOT_FOUND; }\n return this._getByKey(ReflectiveKey.get(token), null, notFoundValue);\n };\n ReflectiveInjector_.prototype.resolveAndCreateChild = function (providers) {\n var ResolvedReflectiveProviders = ReflectiveInjector.resolve(providers);\n return this.createChildFromResolved(ResolvedReflectiveProviders);\n };\n ReflectiveInjector_.prototype.createChildFromResolved = function (providers) {\n var inj = new ReflectiveInjector_(providers);\n inj.parent = this;\n return inj;\n };\n ReflectiveInjector_.prototype.resolveAndInstantiate = function (provider) {\n return this.instantiateResolved(ReflectiveInjector.resolve([provider])[0]);\n };\n ReflectiveInjector_.prototype.instantiateResolved = function (provider) {\n return this._instantiateProvider(provider);\n };\n ReflectiveInjector_.prototype.getProviderAtIndex = function (index) {\n if (index < 0 || index >= this._providers.length) {\n throw outOfBoundsError(index);\n }\n return this._providers[index];\n };\n /** @internal */\n ReflectiveInjector_.prototype._new = function (provider) {\n if (this._constructionCounter++ > this._getMaxNumberOfObjects()) {\n throw cyclicDependencyError(this, provider.key);\n }\n return this._instantiateProvider(provider);\n };\n ReflectiveInjector_.prototype._getMaxNumberOfObjects = function () { return this.objs.length; };\n ReflectiveInjector_.prototype._instantiateProvider = function (provider) {\n if (provider.multiProvider) {\n var res = new Array(provider.resolvedFactories.length);\n for (var i = 0; i < provider.resolvedFactories.length; ++i) {\n res[i] = this._instantiate(provider, provider.resolvedFactories[i]);\n }\n return res;\n }\n else {\n return this._instantiate(provider, provider.resolvedFactories[0]);\n }\n };\n ReflectiveInjector_.prototype._instantiate = function (provider, ResolvedReflectiveFactory$$1) {\n var _this = this;\n var factory = ResolvedReflectiveFactory$$1.factory;\n var deps;\n try {\n deps =\n ResolvedReflectiveFactory$$1.dependencies.map(function (dep) { return _this._getByReflectiveDependency(dep); });\n }\n catch (e) {\n if (e.addKey) {\n e.addKey(this, provider.key);\n }\n throw e;\n }\n var obj;\n try {\n obj = factory.apply(void 0, __spread(deps));\n }\n catch (e) {\n throw instantiationError(this, e, e.stack, provider.key);\n }\n return obj;\n };\n ReflectiveInjector_.prototype._getByReflectiveDependency = function (dep) {\n return this._getByKey(dep.key, dep.visibility, dep.optional ? null : THROW_IF_NOT_FOUND);\n };\n ReflectiveInjector_.prototype._getByKey = function (key, visibility, notFoundValue) {\n if (key === ReflectiveInjector_.INJECTOR_KEY) {\n return this;\n }\n if (visibility instanceof Self) {\n return this._getByKeySelf(key, notFoundValue);\n }\n else {\n return this._getByKeyDefault(key, notFoundValue, visibility);\n }\n };\n ReflectiveInjector_.prototype._getObjByKeyId = function (keyId) {\n for (var i = 0; i < this.keyIds.length; i++) {\n if (this.keyIds[i] === keyId) {\n if (this.objs[i] === UNDEFINED) {\n this.objs[i] = this._new(this._providers[i]);\n }\n return this.objs[i];\n }\n }\n return UNDEFINED;\n };\n /** @internal */\n ReflectiveInjector_.prototype._throwOrNull = function (key, notFoundValue) {\n if (notFoundValue !== THROW_IF_NOT_FOUND) {\n return notFoundValue;\n }\n else {\n throw noProviderError(this, key);\n }\n };\n /** @internal */\n ReflectiveInjector_.prototype._getByKeySelf = function (key, notFoundValue) {\n var obj = this._getObjByKeyId(key.id);\n return (obj !== UNDEFINED) ? obj : this._throwOrNull(key, notFoundValue);\n };\n /** @internal */\n ReflectiveInjector_.prototype._getByKeyDefault = function (key, notFoundValue, visibility) {\n var inj;\n if (visibility instanceof SkipSelf) {\n inj = this.parent;\n }\n else {\n inj = this;\n }\n while (inj instanceof ReflectiveInjector_) {\n var inj_ = inj;\n var obj = inj_._getObjByKeyId(key.id);\n if (obj !== UNDEFINED)\n return obj;\n inj = inj_.parent;\n }\n if (inj !== null) {\n return inj.get(key.token, notFoundValue);\n }\n else {\n return this._throwOrNull(key, notFoundValue);\n }\n };\n Object.defineProperty(ReflectiveInjector_.prototype, \"displayName\", {\n get: function () {\n var providers = _mapProviders(this, function (b) { return ' \"' + b.key.displayName + '\" '; })\n .join(', ');\n return \"ReflectiveInjector(providers: [\" + providers + \"])\";\n },\n enumerable: true,\n configurable: true\n });\n ReflectiveInjector_.prototype.toString = function () { return this.displayName; };\n ReflectiveInjector_.INJECTOR_KEY = ReflectiveKey.get(Injector);\n return ReflectiveInjector_;\n}());\nfunction _mapProviders(injector, fn) {\n var res = new Array(injector._providers.length);\n for (var i = 0; i < injector._providers.length; ++i) {\n res[i] = fn(injector.getProviderAtIndex(i));\n }\n return res;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * An internal token whose presence in an injector indicates that the injector should treat itself\n * as a root scoped injector when processing requests for unknown tokens which may indicate\n * they are provided in the root scope.\n */\nvar APP_ROOT = new InjectionToken('The presence of this token marks an injector as being the root injector.');\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * Marker which indicates that a value has not yet been created from the factory function.\n */\nvar 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 */\nvar CIRCULAR$1 = {};\nvar EMPTY_ARRAY$1 = [];\n/**\n * A lazily initialized NullInjector.\n */\nvar NULL_INJECTOR$1 = undefined;\nfunction getNullInjector() {\n if (NULL_INJECTOR$1 === undefined) {\n NULL_INJECTOR$1 = new NullInjector();\n }\n return NULL_INJECTOR$1;\n}\n/**\n * Create a new `Injector` which is configured using `InjectorType`s.\n *\n * @experimental\n */\nfunction createInjector(defType, parent) {\n if (parent === void 0) { parent = null; }\n parent = parent || getNullInjector();\n return new R3Injector(defType, parent);\n}\nvar R3Injector = /** @class */ (function () {\n function R3Injector(def, parent) {\n var _this = this;\n this.parent = parent;\n /**\n * Map of tokens to records which contain the instances of those tokens.\n */\n this.records = new Map();\n /**\n * The transitive set of `InjectorType`s which define this injector.\n */\n this.injectorDefTypes = new Set();\n /**\n * Set of values instantiated by this injector which contain `ngOnDestroy` lifecycle hooks.\n */\n this.onDestroy = new Set();\n /**\n * Flag indicating that this injector was previously destroyed.\n */\n this.destroyed = false;\n // Start off by creating Records for every provider declared in every InjectorType\n // included transitively in `def`.\n deepForEach([def], function (injectorDef) { return _this.processInjectorType(injectorDef, new Set()); });\n // Make sure the INJECTOR token provides this injector.\n this.records.set(INJECTOR, makeRecord(undefined, this));\n // Detect whether this injector has the APP_ROOT_SCOPE token and thus should provide\n // any injectable scoped to APP_ROOT_SCOPE.\n this.isRootInjector = this.records.has(APP_ROOT);\n // Eagerly instantiate the InjectorType classes themselves.\n this.injectorDefTypes.forEach(function (defType) { return _this.get(defType); });\n }\n /**\n * Destroy the injector and release references to every instance or provider associated with it.\n *\n * Also calls the `OnDestroy` lifecycle hooks of every instance that was created for which a\n * hook was found.\n */\n R3Injector.prototype.destroy = function () {\n this.assertNotDestroyed();\n // Set destroyed = true first, in case lifecycle hooks re-enter destroy().\n this.destroyed = true;\n try {\n // Call all the lifecycle hooks.\n this.onDestroy.forEach(function (service) { return service.ngOnDestroy(); });\n }\n finally {\n // Release all references.\n this.records.clear();\n this.onDestroy.clear();\n this.injectorDefTypes.clear();\n }\n };\n R3Injector.prototype.get = function (token, notFoundValue, flags) {\n if (notFoundValue === void 0) { notFoundValue = THROW_IF_NOT_FOUND; }\n if (flags === void 0) { flags = 0 /* Default */; }\n this.assertNotDestroyed();\n // Set the injection context.\n var previousInjector = setCurrentInjector(this);\n try {\n // Check for the SkipSelf flag.\n if (!(flags & 4 /* SkipSelf */)) {\n // SkipSelf isn't set, check if the record belongs to this injector.\n var record = this.records.get(token);\n if (record === undefined) {\n // No record, but maybe the token is scoped to this injector. Look for an ngInjectableDef\n // with a scope matching this injector.\n var def = couldBeInjectableType(token) &&\n token.ngInjectableDef ||\n undefined;\n if (def !== undefined && this.injectableDefInScope(def)) {\n // Found an ngInjectableDef and it's scoped to this injector. Pretend as if it was here\n // all along.\n record = injectableDefRecord(token);\n this.records.set(token, record);\n }\n }\n // If a record was found, get the instance for it and return it.\n if (record !== undefined) {\n return this.hydrate(token, record);\n }\n }\n // Select the next injector based on the Self flag - if self is set, the next injector is\n // the NullInjector, otherwise it's the parent.\n var next = !(flags & 2 /* Self */) ? this.parent : getNullInjector();\n return this.parent.get(token, notFoundValue);\n }\n finally {\n // Lastly, clean up the state by restoring the previous injector.\n setCurrentInjector(previousInjector);\n }\n };\n R3Injector.prototype.assertNotDestroyed = function () {\n if (this.destroyed) {\n throw new Error('Injector has already been destroyed.');\n }\n };\n /**\n * Add an `InjectorType` or `InjectorDefTypeWithProviders` and all of its transitive providers\n * to this injector.\n */\n R3Injector.prototype.processInjectorType = function (defOrWrappedDef, parents) {\n var _this = this;\n defOrWrappedDef = resolveForwardRef(defOrWrappedDef);\n // Either the defOrWrappedDef is an InjectorType (with ngInjectorDef) or an\n // InjectorDefTypeWithProviders (aka ModuleWithProviders). Detecting either is a megamorphic\n // read, so care is taken to only do the read once.\n // First attempt to read the ngInjectorDef.\n var def = defOrWrappedDef.ngInjectorDef;\n // If that's not present, then attempt to read ngModule from the InjectorDefTypeWithProviders.\n var ngModule = (def == null) && defOrWrappedDef.ngModule || undefined;\n // Determine the InjectorType. In the case where `defOrWrappedDef` is an `InjectorType`,\n // then this is easy. In the case of an InjectorDefTypeWithProviders, then the definition type\n // is the `ngModule`.\n var defType = (ngModule === undefined) ? defOrWrappedDef : ngModule;\n // If defOrWrappedType was an InjectorDefTypeWithProviders, then .providers may hold some\n // extra providers.\n var providers = (ngModule !== undefined) && defOrWrappedDef.providers ||\n EMPTY_ARRAY$1;\n // Finally, if defOrWrappedType was an `InjectorDefTypeWithProviders`, then the actual\n // `InjectorDef` is on its `ngModule`.\n if (ngModule !== undefined) {\n def = ngModule.ngInjectorDef;\n }\n // If no definition was found, throw.\n if (def == null) {\n throw new Error(\"Type \" + stringify(defType) + \" is missing an ngInjectorDef definition.\");\n }\n // Check for circular dependencies.\n if (parents.has(defType)) {\n throw new Error(\"Circular dependency: type \" + stringify(defType) + \" ends up importing itself.\");\n }\n // Track the InjectorType and add a provider for it.\n this.injectorDefTypes.add(defType);\n this.records.set(defType, makeRecord(def.factory));\n // Add providers in the same way that @NgModule resolution did:\n // First, include providers from any imports.\n if (def.imports != null) {\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 parents.add(defType);\n try {\n deepForEach(def.imports, function (imported) { return _this.processInjectorType(imported, parents); });\n }\n finally {\n // Remove it from the parents set when finished.\n parents.delete(defType);\n }\n }\n // Next, include providers listed on the definition itself.\n if (def.providers != null) {\n deepForEach(def.providers, function (provider) { return _this.processProvider(provider); });\n }\n // Finally, include providers from an InjectorDefTypeWithProviders if there was one.\n deepForEach(providers, function (provider) { return _this.processProvider(provider); });\n };\n /**\n * Process a `SingleProvider` and add it.\n */\n R3Injector.prototype.processProvider = function (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 var token = isTypeProvider(provider) ? provider : resolveForwardRef(provider.provide);\n // Construct a `Record` for the provider.\n var record = providerToRecord(provider);\n if (!isTypeProvider(provider) && provider.multi === true) {\n // If the provider indicates that it's a multi-provider, process it specially.\n // First check whether it's been defined already.\n var multiRecord_1 = this.records.get(token);\n if (multiRecord_1) {\n // It has. Throw a nice error if\n if (multiRecord_1.multi === undefined) {\n throw new Error(\"Mixed multi-provider for \" + token + \".\");\n }\n }\n else {\n token = provider;\n multiRecord_1 = makeRecord(undefined, NOT_YET, true);\n multiRecord_1.factory = function () { return injectArgs(multiRecord_1.multi); };\n this.records.set(token, multiRecord_1);\n }\n token = provider;\n multiRecord_1.multi.push(provider);\n }\n var existing = this.records.get(token);\n if (existing && existing.multi !== undefined) {\n throw new Error(\"Mixed multi-provider for \" + token);\n }\n this.records.set(token, record);\n };\n R3Injector.prototype.hydrate = function (token, record) {\n if (record.value === CIRCULAR$1) {\n throw new Error(\"Circular dep for \" + stringify(token));\n }\n else if (record.value === NOT_YET) {\n record.value = CIRCULAR$1;\n record.value = record.factory();\n }\n if (typeof record.value === 'object' && record.value && hasOnDestroy(record.value)) {\n this.onDestroy.add(record.value);\n }\n return record.value;\n };\n R3Injector.prototype.injectableDefInScope = function (def) {\n if (!def.providedIn) {\n return false;\n }\n else if (typeof def.providedIn === 'string') {\n return def.providedIn === 'any' || (def.providedIn === 'root' && this.isRootInjector);\n }\n else {\n return this.injectorDefTypes.has(def.providedIn);\n }\n };\n return R3Injector;\n}());\nfunction injectableDefRecord(token) {\n var def = token.ngInjectableDef;\n if (def === undefined) {\n throw new Error(\"Type \" + stringify(token) + \" is missing an ngInjectableDef definition.\");\n }\n return makeRecord(def.factory);\n}\nfunction providerToRecord(provider) {\n var token = resolveForwardRef(provider);\n var value = NOT_YET;\n var factory = undefined;\n if (isTypeProvider(provider)) {\n return injectableDefRecord(provider);\n }\n else {\n token = resolveForwardRef(provider.provide);\n if (isValueProvider(provider)) {\n value = provider.useValue;\n }\n else if (isExistingProvider(provider)) {\n factory = function () { return inject(provider.useExisting); };\n }\n else if (isFactoryProvider(provider)) {\n factory = function () { return provider.useFactory.apply(provider, __spread(injectArgs(provider.deps || []))); };\n }\n else {\n var classRef_1 = provider.useClass || token;\n if (hasDeps(provider)) {\n factory = function () { return new ((classRef_1).bind.apply((classRef_1), __spread([void 0], injectArgs(provider.deps))))(); };\n }\n else {\n return injectableDefRecord(classRef_1);\n }\n }\n }\n return makeRecord(factory, value);\n}\nfunction makeRecord(factory, value, multi) {\n if (value === void 0) { value = NOT_YET; }\n if (multi === void 0) { multi = false; }\n return {\n factory: factory,\n value: value,\n multi: multi ? [] : undefined,\n };\n}\nfunction deepForEach(input, fn) {\n input.forEach(function (value) { return Array.isArray(value) ? deepForEach(value, fn) : fn(value); });\n}\nfunction isValueProvider(value) {\n return USE_VALUE$1 in value;\n}\nfunction isExistingProvider(value) {\n return !!value.useExisting;\n}\nfunction isFactoryProvider(value) {\n return !!value.useFactory;\n}\nfunction isTypeProvider(value) {\n return typeof value === 'function';\n}\nfunction hasDeps(value) {\n return !!value.deps;\n}\nfunction hasOnDestroy(value) {\n return typeof value === 'object' && value != null && value.ngOnDestroy &&\n typeof value.ngOnDestroy === 'function';\n}\nfunction couldBeInjectableType(value) {\n return (typeof value === 'function') ||\n (typeof value === 'object' && value instanceof InjectionToken);\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * @module\n * @description\n * The `di` module provides dependency injection container services.\n */\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Determine if the argument is shaped like a Promise\n */\nfunction isPromise(obj) {\n // allow any Promise/A+ compliant thenable.\n // It's up to the caller to ensure that obj.then conforms to the spec\n return !!obj && typeof obj.then === 'function';\n}\n/**\n * Determine if the argument is an Observable\n */\nfunction isObservable(obj) {\n // TODO: use Symbol.observable when https://github.com/ReactiveX/rxjs/issues/2415 will be resolved\n return !!obj && typeof obj.subscribe === 'function';\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A function that will be executed when an application is initialized.\n * @experimental\n */\nvar APP_INITIALIZER = new InjectionToken('Application Initializer');\n/**\n * A class that reflects the state of running {@link APP_INITIALIZER}s.\n *\n * @experimental\n */\nvar ApplicationInitStatus = /** @class */ (function () {\n function ApplicationInitStatus(appInits) {\n var _this = this;\n this.appInits = appInits;\n this.initialized = false;\n this.done = false;\n this.donePromise = new Promise(function (res, rej) {\n _this.resolve = res;\n _this.reject = rej;\n });\n }\n /** @internal */\n ApplicationInitStatus.prototype.runInitializers = function () {\n var _this = this;\n if (this.initialized) {\n return;\n }\n var asyncInitPromises = [];\n var complete = function () {\n _this.done = true;\n _this.resolve();\n };\n if (this.appInits) {\n for (var i = 0; i < this.appInits.length; i++) {\n var initResult = this.appInits[i]();\n if (isPromise(initResult)) {\n asyncInitPromises.push(initResult);\n }\n }\n }\n Promise.all(asyncInitPromises).then(function () { complete(); }).catch(function (e) { _this.reject(e); });\n if (asyncInitPromises.length === 0) {\n complete();\n }\n this.initialized = true;\n };\n ApplicationInitStatus.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n ApplicationInitStatus.ctorParameters = function () { return [\n { type: Array, decorators: [{ type: Inject, args: [APP_INITIALIZER,] }, { type: Optional }] }\n ]; };\n return ApplicationInitStatus;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A DI Token representing a unique string id assigned to the application by Angular and used\n * primarily for prefixing application attributes and CSS styles when\n * {@link ViewEncapsulation#Emulated ViewEncapsulation.Emulated} is being used.\n *\n * If you need to avoid randomly generated value to be used as an application id, you can provide\n * a custom value via a DI provider <!-- TODO: provider --> configuring the root {@link Injector}\n * using this token.\n * @experimental\n */\nvar APP_ID = new InjectionToken('AppId');\nfunction _appIdRandomProviderFactory() {\n return \"\" + _randomChar() + _randomChar() + _randomChar();\n}\n/**\n * Providers that will generate a random APP_ID_TOKEN.\n * @experimental\n */\nvar APP_ID_RANDOM_PROVIDER = {\n provide: APP_ID,\n useFactory: _appIdRandomProviderFactory,\n deps: [],\n};\nfunction _randomChar() {\n return String.fromCharCode(97 + Math.floor(Math.random() * 25));\n}\n/**\n * A function that will be executed when a platform is initialized.\n * @experimental\n */\nvar PLATFORM_INITIALIZER = new InjectionToken('Platform Initializer');\n/**\n * A token that indicates an opaque platform id.\n * @experimental\n */\nvar PLATFORM_ID = new InjectionToken('Platform ID');\n/**\n * All callbacks provided via this token will be called for every component that is bootstrapped.\n * Signature of the callback:\n *\n * `(componentRef: ComponentRef) => void`.\n *\n * @experimental\n */\nvar APP_BOOTSTRAP_LISTENER = new InjectionToken('appBootstrapListener');\n/**\n * A token which indicates the root directory of the application\n * @experimental\n */\nvar PACKAGE_ROOT_URL = new InjectionToken('Application Packages Root URL');\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar Console = /** @class */ (function () {\n function Console() {\n }\n Console.prototype.log = function (message) {\n // tslint:disable-next-line:no-console\n console.log(message);\n };\n // Note: for reporting errors use `DOM.logError()` as it is platform specific\n Console.prototype.warn = function (message) {\n // tslint:disable-next-line:no-console\n console.warn(message);\n };\n Console.decorators = [\n { type: Injectable }\n ];\n return Console;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Combination of NgModuleFactory and ComponentFactorys.\n *\n * @experimental\n */\nvar ModuleWithComponentFactories = /** @class */ (function () {\n function ModuleWithComponentFactories(ngModuleFactory, componentFactories) {\n this.ngModuleFactory = ngModuleFactory;\n this.componentFactories = componentFactories;\n }\n return ModuleWithComponentFactories;\n}());\nfunction _throwError() {\n throw new Error(\"Runtime compiler is not loaded\");\n}\n/**\n * Low-level service for running the angular compiler during runtime\n * to create {@link ComponentFactory}s, which\n * can later be used to create and render a Component instance.\n *\n * Each `@NgModule` provides an own `Compiler` to its injector,\n * that will use the directives/pipes of the ng module for compilation\n * of components.\n *\n */\nvar Compiler = /** @class */ (function () {\n function Compiler() {\n }\n /**\n * Compiles the given NgModule and all of its components. All templates of the components listed\n * in `entryComponents` have to be inlined.\n */\n Compiler.prototype.compileModuleSync = function (moduleType) { throw _throwError(); };\n /**\n * Compiles the given NgModule and all of its components\n */\n Compiler.prototype.compileModuleAsync = function (moduleType) { throw _throwError(); };\n /**\n * Same as {@link #compileModuleSync} but also creates ComponentFactories for all components.\n */\n Compiler.prototype.compileModuleAndAllComponentsSync = function (moduleType) {\n throw _throwError();\n };\n /**\n * Same as {@link #compileModuleAsync} but also creates ComponentFactories for all components.\n */\n Compiler.prototype.compileModuleAndAllComponentsAsync = function (moduleType) {\n throw _throwError();\n };\n /**\n * Clears all caches.\n */\n Compiler.prototype.clearCache = function () { };\n /**\n * Clears the cache for the given component/ngModule.\n */\n Compiler.prototype.clearCacheFor = function (type) { };\n Compiler.decorators = [\n { type: Injectable }\n ];\n return Compiler;\n}());\n/**\n * Token to provide CompilerOptions in the platform injector.\n *\n * @experimental\n */\nvar COMPILER_OPTIONS = new InjectionToken('compilerOptions');\n/**\n * A factory for creating a Compiler\n *\n * @experimental\n */\nvar CompilerFactory = /** @class */ (function () {\n function CompilerFactory() {\n }\n return CompilerFactory;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Represents an instance of a Component created via a {@link ComponentFactory}.\n *\n * `ComponentRef` provides access to the Component Instance as well other objects related to this\n * Component Instance and allows you to destroy the Component Instance via the {@link #destroy}\n * method.\n *\n */\nvar ComponentRef = /** @class */ (function () {\n function ComponentRef() {\n }\n return ComponentRef;\n}());\nvar ComponentFactory = /** @class */ (function () {\n function ComponentFactory() {\n }\n return ComponentFactory;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction noComponentFactoryError(component) {\n var error = Error(\"No component factory found for \" + stringify(component) + \". Did you add it to @NgModule.entryComponents?\");\n error[ERROR_COMPONENT] = component;\n return error;\n}\nvar ERROR_COMPONENT = 'ngComponent';\n\nvar _NullComponentFactoryResolver = /** @class */ (function () {\n function _NullComponentFactoryResolver() {\n }\n _NullComponentFactoryResolver.prototype.resolveComponentFactory = function (component) {\n throw noComponentFactoryError(component);\n };\n return _NullComponentFactoryResolver;\n}());\nvar ComponentFactoryResolver = /** @class */ (function () {\n function ComponentFactoryResolver() {\n }\n ComponentFactoryResolver.NULL = new _NullComponentFactoryResolver();\n return ComponentFactoryResolver;\n}());\nvar CodegenComponentFactoryResolver = /** @class */ (function () {\n function CodegenComponentFactoryResolver(factories, _parent, _ngModule) {\n this._parent = _parent;\n this._ngModule = _ngModule;\n this._factories = new Map();\n for (var i = 0; i < factories.length; i++) {\n var factory = factories[i];\n this._factories.set(factory.componentType, factory);\n }\n }\n CodegenComponentFactoryResolver.prototype.resolveComponentFactory = function (component) {\n var factory = this._factories.get(component);\n if (!factory && this._parent) {\n factory = this._parent.resolveComponentFactory(component);\n }\n if (!factory) {\n throw noComponentFactoryError(component);\n }\n return new ComponentFactoryBoundToModule(factory, this._ngModule);\n };\n return CodegenComponentFactoryResolver;\n}());\nvar ComponentFactoryBoundToModule = /** @class */ (function (_super) {\n __extends(ComponentFactoryBoundToModule, _super);\n function ComponentFactoryBoundToModule(factory, ngModule) {\n var _this = _super.call(this) || this;\n _this.factory = factory;\n _this.ngModule = ngModule;\n _this.selector = factory.selector;\n _this.componentType = factory.componentType;\n _this.ngContentSelectors = factory.ngContentSelectors;\n _this.inputs = factory.inputs;\n _this.outputs = factory.outputs;\n return _this;\n }\n ComponentFactoryBoundToModule.prototype.create = function (injector, projectableNodes, rootSelectorOrNode, ngModule) {\n return this.factory.create(injector, projectableNodes, rootSelectorOrNode, ngModule || this.ngModule);\n };\n return ComponentFactoryBoundToModule;\n}(ComponentFactory));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Represents an instance of an NgModule created via a {@link NgModuleFactory}.\n *\n * `NgModuleRef` provides access to the NgModule Instance as well other objects related to this\n * NgModule Instance.\n *\n *\n */\nvar NgModuleRef = /** @class */ (function () {\n function NgModuleRef() {\n }\n return NgModuleRef;\n}());\n/**\n * @experimental\n */\nvar NgModuleFactory = /** @class */ (function () {\n function NgModuleFactory() {\n }\n return NgModuleFactory;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar trace;\nvar events;\nfunction detectWTF() {\n var wtf = _global /** TODO #9100 */['wtf'];\n if (wtf) {\n trace = wtf['trace'];\n if (trace) {\n events = trace['events'];\n return true;\n }\n }\n return false;\n}\nfunction createScope(signature, flags) {\n if (flags === void 0) { flags = null; }\n return events.createScope(signature, flags);\n}\nfunction leave(scope, returnValue) {\n trace.leaveScope(scope, returnValue);\n return returnValue;\n}\nfunction startTimeRange(rangeType, action) {\n return trace.beginTimeRange(rangeType, action);\n}\nfunction endTimeRange(range) {\n trace.endTimeRange(range);\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * True if WTF is enabled.\n */\nvar wtfEnabled = detectWTF();\nfunction noopScope(arg0, arg1) {\n return null;\n}\n/**\n * Create trace scope.\n *\n * Scopes must be strictly nested and are analogous to stack frames, but\n * do not have to follow the stack frames. Instead it is recommended that they follow logical\n * nesting. You may want to use\n * [Event\n * Signatures](http://google.github.io/tracing-framework/instrumenting-code.html#custom-events)\n * as they are defined in WTF.\n *\n * Used to mark scope entry. The return value is used to leave the scope.\n *\n * var myScope = wtfCreateScope('MyClass#myMethod(ascii someVal)');\n *\n * someMethod() {\n * var s = myScope('Foo'); // 'Foo' gets stored in tracing UI\n * // DO SOME WORK HERE\n * return wtfLeave(s, 123); // Return value 123\n * }\n *\n * Note, adding try-finally block around the work to ensure that `wtfLeave` gets called can\n * negatively impact the performance of your application. For this reason we recommend that\n * you don't add them to ensure that `wtfLeave` gets called. In production `wtfLeave` is a noop and\n * so try-finally block has no value. When debugging perf issues, skipping `wtfLeave`, do to\n * exception, will produce incorrect trace, but presence of exception signifies logic error which\n * needs to be fixed before the app should be profiled. Add try-finally only when you expect that\n * an exception is expected during normal execution while profiling.\n *\n * @experimental\n */\nvar wtfCreateScope = wtfEnabled ? createScope : function (signature, flags) { return noopScope; };\n/**\n * Used to mark end of Scope.\n *\n * - `scope` to end.\n * - `returnValue` (optional) to be passed to the WTF.\n *\n * Returns the `returnValue for easy chaining.\n * @experimental\n */\nvar wtfLeave = wtfEnabled ? leave : function (s, r) { return r; };\n/**\n * Used to mark Async start. Async are similar to scope but they don't have to be strictly nested.\n * The return value is used in the call to [endAsync]. Async ranges only work if WTF has been\n * enabled.\n *\n * someMethod() {\n * var s = wtfStartTimeRange('HTTP:GET', 'some.url');\n * var future = new Future.delay(5).then((_) {\n * wtfEndTimeRange(s);\n * });\n * }\n * @experimental\n */\nvar wtfStartTimeRange = wtfEnabled ? startTimeRange : function (rangeType, action) { return null; };\n/**\n * Ends a async time range operation.\n * [range] is the return value from [wtfStartTimeRange] Async ranges only work if WTF has been\n * enabled.\n * @experimental\n */\nvar wtfEndTimeRange = wtfEnabled ? endTimeRange : function (r) { return null; };\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * Use by directives and components to emit custom Events.\n *\n * @usageNotes\n * ### Examples\n *\n * In the following example, `Zippy` alternatively emits `open` and `close` events when its\n * title gets clicked:\n *\n * ```\n * @Component({\n * selector: 'zippy',\n * template: `\n * <div class=\"zippy\">\n * <div (click)=\"toggle()\">Toggle</div>\n * <div [hidden]=\"!visible\">\n * <ng-content></ng-content>\n * </div>\n * </div>`})\n * export class Zippy {\n * visible: boolean = true;\n * @Output() open: EventEmitter<any> = new EventEmitter();\n * @Output() close: EventEmitter<any> = new EventEmitter();\n *\n * toggle() {\n * this.visible = !this.visible;\n * if (this.visible) {\n * this.open.emit(null);\n * } else {\n * this.close.emit(null);\n * }\n * }\n * }\n * ```\n *\n * The events payload can be accessed by the parameter `$event` on the components output event\n * handler:\n *\n * ```\n * <zippy (open)=\"onOpen($event)\" (close)=\"onClose($event)\"></zippy>\n * ```\n *\n * ### Notes\n *\n * Uses Rx.Observable but provides an adapter to make it work as specified here:\n * https://github.com/jhusain/observable-spec\n *\n * Once a reference implementation of the spec is available, switch to it.\n *\n */\nvar EventEmitter = /** @class */ (function (_super) {\n __extends(EventEmitter, _super);\n /**\n * Creates an instance of {@link EventEmitter}, which depending on `isAsync`,\n * delivers events synchronously or asynchronously.\n *\n * @param isAsync By default, events are delivered synchronously (default value: `false`).\n * Set to `true` for asynchronous event delivery.\n */\n function EventEmitter(isAsync) {\n if (isAsync === void 0) { isAsync = false; }\n var _this = _super.call(this) || this;\n _this.__isAsync = isAsync;\n return _this;\n }\n EventEmitter.prototype.emit = function (value) { _super.prototype.next.call(this, value); };\n EventEmitter.prototype.subscribe = function (generatorOrNext, error, complete) {\n var schedulerFn;\n var errorFn = function (err) { return null; };\n var completeFn = function () { return null; };\n if (generatorOrNext && typeof generatorOrNext === 'object') {\n schedulerFn = this.__isAsync ? function (value) {\n setTimeout(function () { return generatorOrNext.next(value); });\n } : function (value) { generatorOrNext.next(value); };\n if (generatorOrNext.error) {\n errorFn = this.__isAsync ? function (err) { setTimeout(function () { return generatorOrNext.error(err); }); } :\n function (err) { generatorOrNext.error(err); };\n }\n if (generatorOrNext.complete) {\n completeFn = this.__isAsync ? function () { setTimeout(function () { return generatorOrNext.complete(); }); } :\n function () { generatorOrNext.complete(); };\n }\n }\n else {\n schedulerFn = this.__isAsync ? function (value) { setTimeout(function () { return generatorOrNext(value); }); } :\n function (value) { generatorOrNext(value); };\n if (error) {\n errorFn =\n this.__isAsync ? function (err) { setTimeout(function () { return error(err); }); } : function (err) { error(err); };\n }\n if (complete) {\n completeFn =\n this.__isAsync ? function () { setTimeout(function () { return complete(); }); } : function () { complete(); };\n }\n }\n var sink = _super.prototype.subscribe.call(this, schedulerFn, errorFn, completeFn);\n if (generatorOrNext instanceof rxjs.Subscription) {\n generatorOrNext.add(sink);\n }\n return sink;\n };\n return EventEmitter;\n}(rxjs.Subject));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * An injectable service for executing work inside or outside of the Angular zone.\n *\n * The most common use of this service is to optimize performance when starting a work consisting of\n * one or more asynchronous tasks that don't require UI updates or error handling to be handled by\n * Angular. Such tasks can be kicked off via {@link #runOutsideAngular} and if needed, these tasks\n * can reenter the Angular zone via {@link #run}.\n *\n * <!-- TODO: add/fix links to:\n * - docs explaining zones and the use of zones in Angular and change-detection\n * - link to runOutsideAngular/run (throughout this file!)\n * -->\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * import {Component, NgZone} from '@angular/core';\n * import {NgIf} from '@angular/common';\n *\n * @Component({\n * selector: 'ng-zone-demo',\n * template: `\n * <h2>Demo: NgZone</h2>\n *\n * <p>Progress: {{progress}}%</p>\n * <p *ngIf=\"progress >= 100\">Done processing {{label}} of Angular zone!</p>\n *\n * <button (click)=\"processWithinAngularZone()\">Process within Angular zone</button>\n * <button (click)=\"processOutsideOfAngularZone()\">Process outside of Angular zone</button>\n * `,\n * })\n * export class NgZoneDemo {\n * progress: number = 0;\n * label: string;\n *\n * constructor(private _ngZone: NgZone) {}\n *\n * // Loop inside the Angular zone\n * // so the UI DOES refresh after each setTimeout cycle\n * processWithinAngularZone() {\n * this.label = 'inside';\n * this.progress = 0;\n * this._increaseProgress(() => console.log('Inside Done!'));\n * }\n *\n * // Loop outside of the Angular zone\n * // so the UI DOES NOT refresh after each setTimeout cycle\n * processOutsideOfAngularZone() {\n * this.label = 'outside';\n * this.progress = 0;\n * this._ngZone.runOutsideAngular(() => {\n * this._increaseProgress(() => {\n * // reenter the Angular zone and display done\n * this._ngZone.run(() => { console.log('Outside Done!'); });\n * });\n * });\n * }\n *\n * _increaseProgress(doneCallback: () => void) {\n * this.progress += 1;\n * console.log(`Current progress: ${this.progress}%`);\n *\n * if (this.progress < 100) {\n * window.setTimeout(() => this._increaseProgress(doneCallback), 10);\n * } else {\n * doneCallback();\n * }\n * }\n * }\n * ```\n *\n * @experimental\n */\nvar NgZone = /** @class */ (function () {\n function NgZone(_a) {\n var _b = _a.enableLongStackTrace, enableLongStackTrace = _b === void 0 ? false : _b;\n this.hasPendingMicrotasks = false;\n this.hasPendingMacrotasks = false;\n /**\n * Whether there are no outstanding microtasks or macrotasks.\n */\n this.isStable = true;\n /**\n * Notifies when code enters Angular Zone. This gets fired first on VM Turn.\n */\n this.onUnstable = new EventEmitter(false);\n /**\n * Notifies when there is no more microtasks enqueued in the current VM Turn.\n * This is a hint for Angular to do change detection, which may enqueue more microtasks.\n * For this reason this event can fire multiple times per VM Turn.\n */\n this.onMicrotaskEmpty = new EventEmitter(false);\n /**\n * Notifies when the last `onMicrotaskEmpty` has run and there are no more microtasks, which\n * implies we are about to relinquish VM turn.\n * This event gets called just once.\n */\n this.onStable = new EventEmitter(false);\n /**\n * Notifies that an error has been delivered.\n */\n this.onError = new EventEmitter(false);\n if (typeof Zone == 'undefined') {\n throw new Error(\"In this configuration Angular requires Zone.js\");\n }\n Zone.assertZonePatched();\n var self = this;\n self._nesting = 0;\n self._outer = self._inner = Zone.current;\n if (Zone['wtfZoneSpec']) {\n self._inner = self._inner.fork(Zone['wtfZoneSpec']);\n }\n if (Zone['TaskTrackingZoneSpec']) {\n self._inner = self._inner.fork(new Zone['TaskTrackingZoneSpec']);\n }\n if (enableLongStackTrace && Zone['longStackTraceZoneSpec']) {\n self._inner = self._inner.fork(Zone['longStackTraceZoneSpec']);\n }\n forkInnerZoneWithAngularBehavior(self);\n }\n NgZone.isInAngularZone = function () { return Zone.current.get('isAngularZone') === true; };\n NgZone.assertInAngularZone = function () {\n if (!NgZone.isInAngularZone()) {\n throw new Error('Expected to be in Angular Zone, but it is not!');\n }\n };\n NgZone.assertNotInAngularZone = function () {\n if (NgZone.isInAngularZone()) {\n throw new Error('Expected to not be in Angular Zone, but it is!');\n }\n };\n /**\n * Executes the `fn` function synchronously within the Angular zone and returns value returned by\n * the function.\n *\n * Running functions via `run` allows you to reenter Angular zone from a task that was executed\n * outside of the Angular zone (typically started via {@link #runOutsideAngular}).\n *\n * Any future tasks or microtasks scheduled from within this function will continue executing from\n * within the Angular zone.\n *\n * If a synchronous error happens it will be rethrown and not reported via `onError`.\n */\n NgZone.prototype.run = function (fn, applyThis, applyArgs) {\n return this._inner.run(fn, applyThis, applyArgs);\n };\n /**\n * Executes the `fn` function synchronously within the Angular zone as a task and returns value\n * returned by the function.\n *\n * Running functions via `run` allows you to reenter Angular zone from a task that was executed\n * outside of the Angular zone (typically started via {@link #runOutsideAngular}).\n *\n * Any future tasks or microtasks scheduled from within this function will continue executing from\n * within the Angular zone.\n *\n * If a synchronous error happens it will be rethrown and not reported via `onError`.\n */\n NgZone.prototype.runTask = function (fn, applyThis, applyArgs, name) {\n var zone = this._inner;\n var task = zone.scheduleEventTask('NgZoneEvent: ' + name, fn, EMPTY_PAYLOAD, noop, noop);\n try {\n return zone.runTask(task, applyThis, applyArgs);\n }\n finally {\n zone.cancelTask(task);\n }\n };\n /**\n * Same as `run`, except that synchronous errors are caught and forwarded via `onError` and not\n * rethrown.\n */\n NgZone.prototype.runGuarded = function (fn, applyThis, applyArgs) {\n return this._inner.runGuarded(fn, applyThis, applyArgs);\n };\n /**\n * Executes the `fn` function synchronously in Angular's parent zone and returns value returned by\n * the function.\n *\n * Running functions via {@link #runOutsideAngular} allows you to escape Angular's zone and do\n * work that\n * doesn't trigger Angular change-detection or is subject to Angular's error handling.\n *\n * Any future tasks or microtasks scheduled from within this function will continue executing from\n * outside of the Angular zone.\n *\n * Use {@link #run} to reenter the Angular zone and do work that updates the application model.\n */\n NgZone.prototype.runOutsideAngular = function (fn) {\n return this._outer.run(fn);\n };\n return NgZone;\n}());\nfunction noop() { }\nvar EMPTY_PAYLOAD = {};\nfunction checkStable(zone) {\n if (zone._nesting == 0 && !zone.hasPendingMicrotasks && !zone.isStable) {\n try {\n zone._nesting++;\n zone.onMicrotaskEmpty.emit(null);\n }\n finally {\n zone._nesting--;\n if (!zone.hasPendingMicrotasks) {\n try {\n zone.runOutsideAngular(function () { return zone.onStable.emit(null); });\n }\n finally {\n zone.isStable = true;\n }\n }\n }\n }\n}\nfunction forkInnerZoneWithAngularBehavior(zone) {\n zone._inner = zone._inner.fork({\n name: 'angular',\n properties: { 'isAngularZone': true },\n onInvokeTask: function (delegate, current, target, task, applyThis, applyArgs) {\n try {\n onEnter(zone);\n return delegate.invokeTask(target, task, applyThis, applyArgs);\n }\n finally {\n onLeave(zone);\n }\n },\n onInvoke: function (delegate, current, target, callback, applyThis, applyArgs, source) {\n try {\n onEnter(zone);\n return delegate.invoke(target, callback, applyThis, applyArgs, source);\n }\n finally {\n onLeave(zone);\n }\n },\n onHasTask: function (delegate, current, target, hasTaskState) {\n delegate.hasTask(target, hasTaskState);\n if (current === target) {\n // We are only interested in hasTask events which originate from our zone\n // (A child hasTask event is not interesting to us)\n if (hasTaskState.change == 'microTask') {\n zone.hasPendingMicrotasks = hasTaskState.microTask;\n checkStable(zone);\n }\n else if (hasTaskState.change == 'macroTask') {\n zone.hasPendingMacrotasks = hasTaskState.macroTask;\n }\n }\n },\n onHandleError: function (delegate, current, target, error) {\n delegate.handleError(target, error);\n zone.runOutsideAngular(function () { return zone.onError.emit(error); });\n return false;\n }\n });\n}\nfunction onEnter(zone) {\n zone._nesting++;\n if (zone.isStable) {\n zone.isStable = false;\n zone.onUnstable.emit(null);\n }\n}\nfunction onLeave(zone) {\n zone._nesting--;\n checkStable(zone);\n}\n/**\n * Provides a noop implementation of `NgZone` which does nothing. This zone requires explicit calls\n * to framework to perform rendering.\n */\nvar NoopNgZone = /** @class */ (function () {\n function NoopNgZone() {\n this.hasPendingMicrotasks = false;\n this.hasPendingMacrotasks = false;\n this.isStable = true;\n this.onUnstable = new EventEmitter();\n this.onMicrotaskEmpty = new EventEmitter();\n this.onStable = new EventEmitter();\n this.onError = new EventEmitter();\n }\n NoopNgZone.prototype.run = function (fn) { return fn(); };\n NoopNgZone.prototype.runGuarded = function (fn) { return fn(); };\n NoopNgZone.prototype.runOutsideAngular = function (fn) { return fn(); };\n NoopNgZone.prototype.runTask = function (fn) { return fn(); };\n return NoopNgZone;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * The Testability service provides testing hooks that can be accessed from\n * the browser and by services such as Protractor. Each bootstrapped Angular\n * application on the page will have an instance of Testability.\n * @experimental\n */\nvar Testability = /** @class */ (function () {\n function Testability(_ngZone) {\n var _this = this;\n this._ngZone = _ngZone;\n this._pendingCount = 0;\n this._isZoneStable = true;\n /**\n * Whether any work was done since the last 'whenStable' callback. This is\n * useful to detect if this could have potentially destabilized another\n * component while it is stabilizing.\n * @internal\n */\n this._didWork = false;\n this._callbacks = [];\n this._watchAngularEvents();\n _ngZone.run(function () { _this.taskTrackingZone = Zone.current.get('TaskTrackingZone'); });\n }\n Testability.prototype._watchAngularEvents = function () {\n var _this = this;\n this._ngZone.onUnstable.subscribe({\n next: function () {\n _this._didWork = true;\n _this._isZoneStable = false;\n }\n });\n this._ngZone.runOutsideAngular(function () {\n _this._ngZone.onStable.subscribe({\n next: function () {\n NgZone.assertNotInAngularZone();\n scheduleMicroTask(function () {\n _this._isZoneStable = true;\n _this._runCallbacksIfReady();\n });\n }\n });\n });\n };\n /**\n * Increases the number of pending request\n * @deprecated pending requests are now tracked with zones.\n */\n Testability.prototype.increasePendingRequestCount = function () {\n this._pendingCount += 1;\n this._didWork = true;\n return this._pendingCount;\n };\n /**\n * Decreases the number of pending request\n * @deprecated pending requests are now tracked with zones\n */\n Testability.prototype.decreasePendingRequestCount = function () {\n this._pendingCount -= 1;\n if (this._pendingCount < 0) {\n throw new Error('pending async requests below zero');\n }\n this._runCallbacksIfReady();\n return this._pendingCount;\n };\n /**\n * Whether an associated application is stable\n */\n Testability.prototype.isStable = function () {\n return this._isZoneStable && this._pendingCount === 0 && !this._ngZone.hasPendingMacrotasks;\n };\n Testability.prototype._runCallbacksIfReady = function () {\n var _this = this;\n if (this.isStable()) {\n // Schedules the call backs in a new frame so that it is always async.\n scheduleMicroTask(function () {\n while (_this._callbacks.length !== 0) {\n var cb = _this._callbacks.pop();\n clearTimeout(cb.timeoutId);\n cb.doneCb(_this._didWork);\n }\n _this._didWork = false;\n });\n }\n else {\n // Still not stable, send updates.\n var pending_1 = this.getPendingTasks();\n this._callbacks = this._callbacks.filter(function (cb) {\n if (cb.updateCb && cb.updateCb(pending_1)) {\n clearTimeout(cb.timeoutId);\n return false;\n }\n return true;\n });\n this._didWork = true;\n }\n };\n Testability.prototype.getPendingTasks = function () {\n if (!this.taskTrackingZone) {\n return [];\n }\n return this.taskTrackingZone.macroTasks.map(function (t) {\n return {\n source: t.source,\n isPeriodic: t.data.isPeriodic,\n delay: t.data.delay,\n // From TaskTrackingZone:\n // https://github.com/angular/zone.js/blob/master/lib/zone-spec/task-tracking.ts#L40\n creationLocation: t.creationLocation,\n // Added by Zones for XHRs\n // https://github.com/angular/zone.js/blob/master/lib/browser/browser.ts#L133\n xhr: t.data.target\n };\n });\n };\n Testability.prototype.addCallback = function (cb, timeout, updateCb) {\n var _this = this;\n var timeoutId = -1;\n if (timeout && timeout > 0) {\n timeoutId = setTimeout(function () {\n _this._callbacks = _this._callbacks.filter(function (cb) { return cb.timeoutId !== timeoutId; });\n cb(_this._didWork, _this.getPendingTasks());\n }, timeout);\n }\n this._callbacks.push({ doneCb: cb, timeoutId: timeoutId, updateCb: updateCb });\n };\n /**\n * Wait for the application to be stable with a timeout. If the timeout is reached before that\n * happens, the callback receives a list of the macro tasks that were pending, otherwise null.\n *\n * @param doneCb The callback to invoke when Angular is stable or the timeout expires\n * whichever comes first.\n * @param timeout Optional. The maximum time to wait for Angular to become stable. If not\n * specified, whenStable() will wait forever.\n * @param updateCb Optional. If specified, this callback will be invoked whenever the set of\n * pending macrotasks changes. If this callback returns true doneCb will not be invoked\n * and no further updates will be issued.\n */\n Testability.prototype.whenStable = function (doneCb, timeout, updateCb) {\n if (updateCb && !this.taskTrackingZone) {\n throw new Error('Task tracking zone is required when passing an update callback to ' +\n 'whenStable(). Is \"zone.js/dist/task-tracking.js\" loaded?');\n }\n // These arguments are 'Function' above to keep the public API simple.\n this.addCallback(doneCb, timeout, updateCb);\n this._runCallbacksIfReady();\n };\n /**\n * Get the number of pending requests\n * @deprecated pending requests are now tracked with zones\n */\n Testability.prototype.getPendingRequestCount = function () { return this._pendingCount; };\n /**\n * Find providers by name\n * @param using The root element to search from\n * @param provider The name of binding variable\n * @param exactMatch Whether using exactMatch\n */\n Testability.prototype.findProviders = function (using, provider, exactMatch) {\n // TODO(juliemr): implement.\n return [];\n };\n Testability.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n Testability.ctorParameters = function () { return [\n { type: NgZone }\n ]; };\n return Testability;\n}());\n/**\n * A global registry of {@link Testability} instances for specific elements.\n * @experimental\n */\nvar TestabilityRegistry = /** @class */ (function () {\n function TestabilityRegistry() {\n /** @internal */\n this._applications = new Map();\n _testabilityGetter.addToWindow(this);\n }\n /**\n * Registers an application with a testability hook so that it can be tracked\n * @param token token of application, root element\n * @param testability Testability hook\n */\n TestabilityRegistry.prototype.registerApplication = function (token, testability) {\n this._applications.set(token, testability);\n };\n /**\n * Unregisters an application.\n * @param token token of application, root element\n */\n TestabilityRegistry.prototype.unregisterApplication = function (token) { this._applications.delete(token); };\n /**\n * Unregisters all applications\n */\n TestabilityRegistry.prototype.unregisterAllApplications = function () { this._applications.clear(); };\n /**\n * Get a testability hook associated with the application\n * @param elem root element\n */\n TestabilityRegistry.prototype.getTestability = function (elem) { return this._applications.get(elem) || null; };\n /**\n * Get all registered testabilities\n */\n TestabilityRegistry.prototype.getAllTestabilities = function () { return Array.from(this._applications.values()); };\n /**\n * Get all registered applications(root elements)\n */\n TestabilityRegistry.prototype.getAllRootElements = function () { return Array.from(this._applications.keys()); };\n /**\n * Find testability of a node in the Tree\n * @param elem node\n * @param findInAncestors whether finding testability in ancestors if testability was not found in\n * current node\n */\n TestabilityRegistry.prototype.findTestabilityInTree = function (elem, findInAncestors) {\n if (findInAncestors === void 0) { findInAncestors = true; }\n return _testabilityGetter.findTestabilityInTree(this, elem, findInAncestors);\n };\n TestabilityRegistry.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n TestabilityRegistry.ctorParameters = function () { return []; };\n return TestabilityRegistry;\n}());\nvar _NoopGetTestability = /** @class */ (function () {\n function _NoopGetTestability() {\n }\n _NoopGetTestability.prototype.addToWindow = function (registry) { };\n _NoopGetTestability.prototype.findTestabilityInTree = function (registry, elem, findInAncestors) {\n return null;\n };\n return _NoopGetTestability;\n}());\n/**\n * Set the {@link GetTestability} implementation used by the Angular testing framework.\n * @experimental\n */\nfunction setTestabilityGetter(getter) {\n _testabilityGetter = getter;\n}\nvar _testabilityGetter = new _NoopGetTestability();\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar _devMode = true;\nvar _runModeLocked = false;\nvar _platform;\nvar ALLOW_MULTIPLE_PLATFORMS = new InjectionToken('AllowMultipleToken');\n/**\n * Disable Angular's development mode, which turns off assertions and other\n * checks within the framework.\n *\n * One important assertion this disables verifies that a change detection pass\n * does not result in additional changes to any bindings (also known as\n * unidirectional data flow).\n *\n *\n */\nfunction enableProdMode() {\n if (_runModeLocked) {\n throw new Error('Cannot enable prod mode after platform setup.');\n }\n _devMode = false;\n}\n/**\n * Returns whether Angular is in development mode. After called once,\n * the value is locked and won't change any more.\n *\n * By default, this is true, unless a user calls `enableProdMode` before calling this.\n *\n * @experimental APIs related to application bootstrap are currently under review.\n */\nfunction isDevMode() {\n _runModeLocked = true;\n return _devMode;\n}\n/**\n * A token for third-party components that can register themselves with NgProbe.\n *\n * @experimental\n */\nvar NgProbeToken = /** @class */ (function () {\n function NgProbeToken(name, token) {\n this.name = name;\n this.token = token;\n }\n return NgProbeToken;\n}());\n/**\n * Creates a platform.\n * Platforms have to be eagerly created via this function.\n *\n * @experimental APIs related to application bootstrap are currently under review.\n */\nfunction createPlatform(injector) {\n if (_platform && !_platform.destroyed &&\n !_platform.injector.get(ALLOW_MULTIPLE_PLATFORMS, false)) {\n throw new Error('There can be only one platform. Destroy the previous one to create a new one.');\n }\n _platform = injector.get(PlatformRef);\n var inits = injector.get(PLATFORM_INITIALIZER, null);\n if (inits)\n inits.forEach(function (init) { return init(); });\n return _platform;\n}\n/**\n * Creates a factory for a platform\n *\n * @experimental APIs related to application bootstrap are currently under review.\n */\nfunction createPlatformFactory(parentPlatformFactory, name, providers) {\n if (providers === void 0) { providers = []; }\n var desc = \"Platform: \" + name;\n var marker = new InjectionToken(desc);\n return function (extraProviders) {\n if (extraProviders === void 0) { extraProviders = []; }\n var platform = getPlatform();\n if (!platform || platform.injector.get(ALLOW_MULTIPLE_PLATFORMS, false)) {\n if (parentPlatformFactory) {\n parentPlatformFactory(providers.concat(extraProviders).concat({ provide: marker, useValue: true }));\n }\n else {\n var injectedProviders = providers.concat(extraProviders).concat({ provide: marker, useValue: true });\n createPlatform(Injector.create({ providers: injectedProviders, name: desc }));\n }\n }\n return assertPlatform(marker);\n };\n}\n/**\n * Checks that there currently is a platform which contains the given token as a provider.\n *\n * @experimental APIs related to application bootstrap are currently under review.\n */\nfunction assertPlatform(requiredToken) {\n var platform = getPlatform();\n if (!platform) {\n throw new Error('No platform exists!');\n }\n if (!platform.injector.get(requiredToken, null)) {\n throw new Error('A platform with a different configuration has been created. Please destroy it first.');\n }\n return platform;\n}\n/**\n * Destroy the existing platform.\n *\n * @experimental APIs related to application bootstrap are currently under review.\n */\nfunction destroyPlatform() {\n if (_platform && !_platform.destroyed) {\n _platform.destroy();\n }\n}\n/**\n * Returns the current platform.\n *\n * @experimental APIs related to application bootstrap are currently under review.\n */\nfunction getPlatform() {\n return _platform && !_platform.destroyed ? _platform : null;\n}\n/**\n * The Angular platform is the entry point for Angular on a web page. Each page\n * has exactly one platform, and services (such as reflection) which are common\n * to every Angular application running on the page are bound in its scope.\n *\n * A page's platform is initialized implicitly when a platform is created via a platform factory\n * (e.g. {@link platformBrowser}), or explicitly by calling the {@link createPlatform} function.\n */\nvar PlatformRef = /** @class */ (function () {\n /** @internal */\n function PlatformRef(_injector) {\n this._injector = _injector;\n this._modules = [];\n this._destroyListeners = [];\n this._destroyed = false;\n }\n /**\n * Creates an instance of an `@NgModule` for the given platform\n * for offline compilation.\n *\n * @usageNotes\n * ### Simple Example\n *\n * ```typescript\n * my_module.ts:\n *\n * @NgModule({\n * imports: [BrowserModule]\n * })\n * class MyModule {}\n *\n * main.ts:\n * import {MyModuleNgFactory} from './my_module.ngfactory';\n * import {platformBrowser} from '@angular/platform-browser';\n *\n * let moduleRef = platformBrowser().bootstrapModuleFactory(MyModuleNgFactory);\n * ```\n *\n * @experimental APIs related to application bootstrap are currently under review.\n */\n PlatformRef.prototype.bootstrapModuleFactory = function (moduleFactory, options) {\n var _this = this;\n // Note: We need to create the NgZone _before_ we instantiate the module,\n // as instantiating the module creates some providers eagerly.\n // So we create a mini parent injector that just contains the new NgZone and\n // pass that as parent to the NgModuleFactory.\n var ngZoneOption = options ? options.ngZone : undefined;\n var ngZone = getNgZone(ngZoneOption);\n var providers = [{ provide: NgZone, useValue: ngZone }];\n // Attention: Don't use ApplicationRef.run here,\n // as we want to be sure that all possible constructor calls are inside `ngZone.run`!\n return ngZone.run(function () {\n var ngZoneInjector = Injector.create({ providers: providers, parent: _this.injector, name: moduleFactory.moduleType.name });\n var moduleRef = moduleFactory.create(ngZoneInjector);\n var exceptionHandler = moduleRef.injector.get(ErrorHandler, null);\n if (!exceptionHandler) {\n throw new Error('No ErrorHandler. Is platform module (BrowserModule) included?');\n }\n moduleRef.onDestroy(function () { return remove(_this._modules, moduleRef); });\n ngZone.runOutsideAngular(function () { return ngZone.onError.subscribe({ next: function (error) { exceptionHandler.handleError(error); } }); });\n return _callAndReportToErrorHandler(exceptionHandler, ngZone, function () {\n var initStatus = moduleRef.injector.get(ApplicationInitStatus);\n initStatus.runInitializers();\n return initStatus.donePromise.then(function () {\n _this._moduleDoBootstrap(moduleRef);\n return moduleRef;\n });\n });\n });\n };\n /**\n * Creates an instance of an `@NgModule` for a given platform using the given runtime compiler.\n *\n * @usageNotes\n * ### Simple Example\n *\n * ```typescript\n * @NgModule({\n * imports: [BrowserModule]\n * })\n * class MyModule {}\n *\n * let moduleRef = platformBrowser().bootstrapModule(MyModule);\n * ```\n *\n */\n PlatformRef.prototype.bootstrapModule = function (moduleType, compilerOptions) {\n var _this = this;\n if (compilerOptions === void 0) { compilerOptions = []; }\n var compilerFactory = this.injector.get(CompilerFactory);\n var options = optionsReducer({}, compilerOptions);\n var compiler = compilerFactory.createCompiler([options]);\n return compiler.compileModuleAsync(moduleType)\n .then(function (moduleFactory) { return _this.bootstrapModuleFactory(moduleFactory, options); });\n };\n PlatformRef.prototype._moduleDoBootstrap = function (moduleRef) {\n var appRef = moduleRef.injector.get(ApplicationRef);\n if (moduleRef._bootstrapComponents.length > 0) {\n moduleRef._bootstrapComponents.forEach(function (f) { return appRef.bootstrap(f); });\n }\n else if (moduleRef.instance.ngDoBootstrap) {\n moduleRef.instance.ngDoBootstrap(appRef);\n }\n else {\n throw new Error(\"The module \" + stringify(moduleRef.instance.constructor) + \" was bootstrapped, but it does not declare \\\"@NgModule.bootstrap\\\" components nor a \\\"ngDoBootstrap\\\" method. \" +\n \"Please define one of these.\");\n }\n this._modules.push(moduleRef);\n };\n /**\n * Register a listener to be called when the platform is disposed.\n */\n PlatformRef.prototype.onDestroy = function (callback) { this._destroyListeners.push(callback); };\n Object.defineProperty(PlatformRef.prototype, \"injector\", {\n /**\n * Retrieve the platform {@link Injector}, which is the parent injector for\n * every Angular application on the page and provides singleton providers.\n */\n get: function () { return this._injector; },\n enumerable: true,\n configurable: true\n });\n /**\n * Destroy the Angular platform and all Angular applications on the page.\n */\n PlatformRef.prototype.destroy = function () {\n if (this._destroyed) {\n throw new Error('The platform has already been destroyed!');\n }\n this._modules.slice().forEach(function (module) { return module.destroy(); });\n this._destroyListeners.forEach(function (listener) { return listener(); });\n this._destroyed = true;\n };\n Object.defineProperty(PlatformRef.prototype, \"destroyed\", {\n get: function () { return this._destroyed; },\n enumerable: true,\n configurable: true\n });\n PlatformRef.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n PlatformRef.ctorParameters = function () { return [\n { type: Injector }\n ]; };\n return PlatformRef;\n}());\nfunction getNgZone(ngZoneOption) {\n var ngZone;\n if (ngZoneOption === 'noop') {\n ngZone = new NoopNgZone();\n }\n else {\n ngZone = (ngZoneOption === 'zone.js' ? undefined : ngZoneOption) ||\n new NgZone({ enableLongStackTrace: isDevMode() });\n }\n return ngZone;\n}\nfunction _callAndReportToErrorHandler(errorHandler, ngZone, callback) {\n try {\n var result = callback();\n if (isPromise(result)) {\n return result.catch(function (e) {\n ngZone.runOutsideAngular(function () { return errorHandler.handleError(e); });\n // rethrow as the exception handler might not do it\n throw e;\n });\n }\n return result;\n }\n catch (e) {\n ngZone.runOutsideAngular(function () { return errorHandler.handleError(e); });\n // rethrow as the exception handler might not do it\n throw e;\n }\n}\nfunction optionsReducer(dst, objs) {\n if (Array.isArray(objs)) {\n dst = objs.reduce(optionsReducer, dst);\n }\n else {\n dst = __assign({}, dst, objs);\n }\n return dst;\n}\n/**\n * A reference to an Angular application running on a page.\n */\nvar ApplicationRef = /** @class */ (function () {\n /** @internal */\n function ApplicationRef(_zone, _console, _injector, _exceptionHandler, _componentFactoryResolver, _initStatus) {\n var _this = this;\n this._zone = _zone;\n this._console = _console;\n this._injector = _injector;\n this._exceptionHandler = _exceptionHandler;\n this._componentFactoryResolver = _componentFactoryResolver;\n this._initStatus = _initStatus;\n this._bootstrapListeners = [];\n this._views = [];\n this._runningTick = false;\n this._enforceNoNewChanges = false;\n this._stable = true;\n /**\n * Get a list of component types registered to this application.\n * This list is populated even before the component is created.\n */\n this.componentTypes = [];\n /**\n * Get a list of components registered to this application.\n */\n this.components = [];\n this._enforceNoNewChanges = isDevMode();\n this._zone.onMicrotaskEmpty.subscribe({ next: function () { _this._zone.run(function () { _this.tick(); }); } });\n var isCurrentlyStable = new rxjs.Observable(function (observer) {\n _this._stable = _this._zone.isStable && !_this._zone.hasPendingMacrotasks &&\n !_this._zone.hasPendingMicrotasks;\n _this._zone.runOutsideAngular(function () {\n observer.next(_this._stable);\n observer.complete();\n });\n });\n var isStable = new rxjs.Observable(function (observer) {\n // Create the subscription to onStable outside the Angular Zone so that\n // the callback is run outside the Angular Zone.\n var stableSub;\n _this._zone.runOutsideAngular(function () {\n stableSub = _this._zone.onStable.subscribe(function () {\n NgZone.assertNotInAngularZone();\n // Check whether there are no pending macro/micro tasks in the next tick\n // to allow for NgZone to update the state.\n scheduleMicroTask(function () {\n if (!_this._stable && !_this._zone.hasPendingMacrotasks &&\n !_this._zone.hasPendingMicrotasks) {\n _this._stable = true;\n observer.next(true);\n }\n });\n });\n });\n var unstableSub = _this._zone.onUnstable.subscribe(function () {\n NgZone.assertInAngularZone();\n if (_this._stable) {\n _this._stable = false;\n _this._zone.runOutsideAngular(function () { observer.next(false); });\n }\n });\n return function () {\n stableSub.unsubscribe();\n unstableSub.unsubscribe();\n };\n });\n this.isStable =\n rxjs.merge(isCurrentlyStable, isStable.pipe(operators.share()));\n }\n /**\n * Bootstrap a new component at the root level of the application.\n *\n * @usageNotes\n * ### Bootstrap process\n *\n * When bootstrapping a new root component into an application, Angular mounts the\n * specified application component onto DOM elements identified by the componentType's\n * selector and kicks off automatic change detection to finish initializing the component.\n *\n * Optionally, a component can be mounted onto a DOM element that does not match the\n * componentType's selector.\n *\n * ### Example\n * {@example core/ts/platform/platform.ts region='longform'}\n */\n ApplicationRef.prototype.bootstrap = function (componentOrFactory, rootSelectorOrNode) {\n var _this = this;\n if (!this._initStatus.done) {\n throw new Error('Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.');\n }\n var componentFactory;\n if (componentOrFactory instanceof ComponentFactory) {\n componentFactory = componentOrFactory;\n }\n else {\n componentFactory =\n this._componentFactoryResolver.resolveComponentFactory(componentOrFactory);\n }\n this.componentTypes.push(componentFactory.componentType);\n // Create a factory associated with the current module if it's not bound to some other\n var ngModule = componentFactory instanceof ComponentFactoryBoundToModule ?\n null :\n this._injector.get(NgModuleRef);\n var selectorOrNode = rootSelectorOrNode || componentFactory.selector;\n var compRef = componentFactory.create(Injector.NULL, [], selectorOrNode, ngModule);\n compRef.onDestroy(function () { _this._unloadComponent(compRef); });\n var testability = compRef.injector.get(Testability, null);\n if (testability) {\n compRef.injector.get(TestabilityRegistry)\n .registerApplication(compRef.location.nativeElement, testability);\n }\n this._loadComponent(compRef);\n if (isDevMode()) {\n this._console.log(\"Angular is running in the development mode. Call enableProdMode() to enable the production mode.\");\n }\n return compRef;\n };\n /**\n * Invoke this method to explicitly process change detection and its side-effects.\n *\n * In development mode, `tick()` also performs a second change detection cycle to ensure that no\n * further changes are detected. If additional changes are picked up during this second cycle,\n * bindings in the app have side-effects that cannot be resolved in a single change detection\n * pass.\n * In this case, Angular throws an error, since an Angular application can only have one change\n * detection pass during which all change detection must complete.\n */\n ApplicationRef.prototype.tick = function () {\n var _this = this;\n if (this._runningTick) {\n throw new Error('ApplicationRef.tick is called recursively');\n }\n var scope = ApplicationRef._tickScope();\n try {\n this._runningTick = true;\n this._views.forEach(function (view) { return view.detectChanges(); });\n if (this._enforceNoNewChanges) {\n this._views.forEach(function (view) { return view.checkNoChanges(); });\n }\n }\n catch (e) {\n // Attention: Don't rethrow as it could cancel subscriptions to Observables!\n this._zone.runOutsideAngular(function () { return _this._exceptionHandler.handleError(e); });\n }\n finally {\n this._runningTick = false;\n wtfLeave(scope);\n }\n };\n /**\n * Attaches a view so that it will be dirty checked.\n * The view will be automatically detached when it is destroyed.\n * This will throw if the view is already attached to a ViewContainer.\n */\n ApplicationRef.prototype.attachView = function (viewRef) {\n var view = viewRef;\n this._views.push(view);\n view.attachToAppRef(this);\n };\n /**\n * Detaches a view from dirty checking again.\n */\n ApplicationRef.prototype.detachView = function (viewRef) {\n var view = viewRef;\n remove(this._views, view);\n view.detachFromAppRef();\n };\n ApplicationRef.prototype._loadComponent = function (componentRef) {\n this.attachView(componentRef.hostView);\n this.tick();\n this.components.push(componentRef);\n // Get the listeners lazily to prevent DI cycles.\n var listeners = this._injector.get(APP_BOOTSTRAP_LISTENER, []).concat(this._bootstrapListeners);\n listeners.forEach(function (listener) { return listener(componentRef); });\n };\n ApplicationRef.prototype._unloadComponent = function (componentRef) {\n this.detachView(componentRef.hostView);\n remove(this.components, componentRef);\n };\n /** @internal */\n ApplicationRef.prototype.ngOnDestroy = function () {\n // TODO(alxhub): Dispose of the NgZone.\n this._views.slice().forEach(function (view) { return view.destroy(); });\n };\n Object.defineProperty(ApplicationRef.prototype, \"viewCount\", {\n /**\n * Returns the number of attached views.\n */\n get: function () { return this._views.length; },\n enumerable: true,\n configurable: true\n });\n /** @internal */\n ApplicationRef._tickScope = wtfCreateScope('ApplicationRef#tick()');\n ApplicationRef.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n ApplicationRef.ctorParameters = function () { return [\n { type: NgZone },\n { type: Console },\n { type: Injector },\n { type: ErrorHandler },\n { type: ComponentFactoryResolver },\n { type: ApplicationInitStatus }\n ]; };\n return ApplicationRef;\n}());\nfunction remove(list, el) {\n var index = list.indexOf(el);\n if (index > -1) {\n list.splice(index, 1);\n }\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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// Public API for Zone\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * @deprecated Use `RendererType2` (and `Renderer2`) instead.\n */\nvar RenderComponentType = /** @class */ (function () {\n function RenderComponentType(id, templateUrl, slotCount, encapsulation, styles, animations) {\n this.id = id;\n this.templateUrl = templateUrl;\n this.slotCount = slotCount;\n this.encapsulation = encapsulation;\n this.styles = styles;\n this.animations = animations;\n }\n return RenderComponentType;\n}());\n/**\n * @deprecated Debug info is handeled internally in the view engine now.\n */\nvar RenderDebugInfo = /** @class */ (function () {\n function RenderDebugInfo() {\n }\n return RenderDebugInfo;\n}());\n/**\n * @deprecated Use the `Renderer2` instead.\n */\nvar Renderer = /** @class */ (function () {\n function Renderer() {\n }\n return Renderer;\n}());\nvar Renderer2Interceptor = new InjectionToken('Renderer2Interceptor');\n/**\n * Injectable service that provides a low-level interface for modifying the UI.\n *\n * Use this service to bypass Angular's templating and make custom UI changes that can't be\n * expressed declaratively. For example if you need to set a property or an attribute whose name is\n * not statically known, use {@link Renderer#setElementProperty setElementProperty} or\n * {@link Renderer#setElementAttribute setElementAttribute} respectively.\n *\n * If you are implementing a custom renderer, you must implement this interface.\n *\n * The default Renderer implementation is `DomRenderer`. Also available is `WebWorkerRenderer`.\n *\n * @deprecated Use `RendererFactory2` instead.\n */\nvar RootRenderer = /** @class */ (function () {\n function RootRenderer() {\n }\n return RootRenderer;\n}());\n/**\n * @experimental\n */\nvar RendererFactory2 = /** @class */ (function () {\n function RendererFactory2() {\n }\n return RendererFactory2;\n}());\n/**\n * @experimental\n */\n\n(function (RendererStyleFlags2) {\n RendererStyleFlags2[RendererStyleFlags2[\"Important\"] = 1] = \"Important\";\n RendererStyleFlags2[RendererStyleFlags2[\"DashCase\"] = 2] = \"DashCase\";\n})(exports.RendererStyleFlags2 || (exports.RendererStyleFlags2 = {}));\n/**\n * @experimental\n */\nvar Renderer2 = /** @class */ (function () {\n function Renderer2() {\n }\n return Renderer2;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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// Public API for render\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A 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](http://g.co/ng/security).\n *\n *\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.\nvar ElementRef = /** @class */ (function () {\n function ElementRef(nativeElement) {\n this.nativeElement = nativeElement;\n }\n return ElementRef;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Used to load ng module factories.\n *\n */\nvar NgModuleFactoryLoader = /** @class */ (function () {\n function NgModuleFactoryLoader() {\n }\n return NgModuleFactoryLoader;\n}());\nvar moduleFactories = new Map();\n/**\n * Registers a loaded module. Should only be called from generated NgModuleFactory code.\n * @experimental\n */\nfunction registerModuleFactory(id, factory) {\n var existing = moduleFactories.get(id);\n if (existing) {\n throw new Error(\"Duplicate module registered for \" + id + \" - \" + existing.moduleType.name + \" vs \" + factory.moduleType.name);\n }\n moduleFactories.set(id, factory);\n}\n\n/**\n * Returns the NgModuleFactory with the given id, if it exists and has been loaded.\n * Factories for modules that do not specify an `id` cannot be retrieved. Throws if the module\n * cannot be found.\n * @experimental\n */\nfunction getModuleFactory(id) {\n var factory = moduleFactories.get(id);\n if (!factory)\n throw new Error(\"No module with ID \" + id + \" loaded\");\n return factory;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * An unmodifiable list of items that Angular keeps up to date when the state\n * of the application changes.\n *\n * The type of object that {@link ViewChildren}, {@link ContentChildren}, and {@link QueryList}\n * provide.\n *\n * Implements an iterable interface, therefore it can be used in both ES6\n * javascript `for (var i of items)` loops as well as in Angular templates with\n * `*ngFor=\"let i of myList\"`.\n *\n * Changes can be observed by subscribing to the changes `Observable`.\n *\n * NOTE: In the future this class will implement an `Observable` interface.\n *\n * @usageNotes\n * ### Example\n * ```typescript\n * @Component({...})\n * class Container {\n * @ViewChildren(Item) items:QueryList<Item>;\n * }\n * ```\n */\nvar QueryList = /** @class */ (function () {\n function QueryList() {\n this.dirty = true;\n this._results = [];\n this.changes = new EventEmitter();\n this.length = 0;\n }\n /**\n * See\n * [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)\n */\n QueryList.prototype.map = function (fn) { return this._results.map(fn); };\n /**\n * See\n * [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)\n */\n QueryList.prototype.filter = function (fn) {\n return this._results.filter(fn);\n };\n /**\n * See\n * [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)\n */\n QueryList.prototype.find = function (fn) {\n return this._results.find(fn);\n };\n /**\n * See\n * [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)\n */\n QueryList.prototype.reduce = function (fn, init) {\n return this._results.reduce(fn, init);\n };\n /**\n * See\n * [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)\n */\n QueryList.prototype.forEach = function (fn) { this._results.forEach(fn); };\n /**\n * See\n * [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)\n */\n QueryList.prototype.some = function (fn) {\n return this._results.some(fn);\n };\n QueryList.prototype.toArray = function () { return this._results.slice(); };\n QueryList.prototype[getSymbolIterator()] = function () { return this._results[getSymbolIterator()](); };\n QueryList.prototype.toString = function () { return this._results.toString(); };\n QueryList.prototype.reset = function (res) {\n this._results = flatten(res);\n this.dirty = false;\n this.length = this._results.length;\n this.last = this._results[this.length - 1];\n this.first = this._results[0];\n };\n QueryList.prototype.notifyOnChanges = function () { this.changes.emit(this); };\n /** internal */\n QueryList.prototype.setDirty = function () { this.dirty = true; };\n /** internal */\n QueryList.prototype.destroy = function () {\n this.changes.complete();\n this.changes.unsubscribe();\n };\n return QueryList;\n}());\nfunction flatten(list) {\n return list.reduce(function (flat, item) {\n var flatItem = Array.isArray(item) ? flatten(item) : item;\n return flat.concat(flatItem);\n }, []);\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar _SEPARATOR = '#';\nvar FACTORY_CLASS_SUFFIX = 'NgFactory';\n/**\n * Configuration for SystemJsNgModuleLoader.\n * token.\n *\n * @experimental\n */\nvar SystemJsNgModuleLoaderConfig = /** @class */ (function () {\n function SystemJsNgModuleLoaderConfig() {\n }\n return SystemJsNgModuleLoaderConfig;\n}());\nvar DEFAULT_CONFIG = {\n factoryPathPrefix: '',\n factoryPathSuffix: '.ngfactory',\n};\n/**\n * NgModuleFactoryLoader that uses SystemJS to load NgModuleFactory\n * @experimental\n */\nvar SystemJsNgModuleLoader = /** @class */ (function () {\n function SystemJsNgModuleLoader(_compiler, config) {\n this._compiler = _compiler;\n this._config = config || DEFAULT_CONFIG;\n }\n SystemJsNgModuleLoader.prototype.load = function (path) {\n var offlineMode = this._compiler instanceof Compiler;\n return offlineMode ? this.loadFactory(path) : this.loadAndCompile(path);\n };\n SystemJsNgModuleLoader.prototype.loadAndCompile = function (path) {\n var _this = this;\n var _a = __read(path.split(_SEPARATOR), 2), module = _a[0], exportName = _a[1];\n if (exportName === undefined) {\n exportName = 'default';\n }\n return System.import(module)\n .then(function (module) { return module[exportName]; })\n .then(function (type) { return checkNotEmpty(type, module, exportName); })\n .then(function (type) { return _this._compiler.compileModuleAsync(type); });\n };\n SystemJsNgModuleLoader.prototype.loadFactory = function (path) {\n var _a = __read(path.split(_SEPARATOR), 2), module = _a[0], exportName = _a[1];\n var factoryClassSuffix = FACTORY_CLASS_SUFFIX;\n if (exportName === undefined) {\n exportName = 'default';\n factoryClassSuffix = '';\n }\n return System.import(this._config.factoryPathPrefix + module + this._config.factoryPathSuffix)\n .then(function (module) { return module[exportName + factoryClassSuffix]; })\n .then(function (factory) { return checkNotEmpty(factory, module, exportName); });\n };\n SystemJsNgModuleLoader.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n SystemJsNgModuleLoader.ctorParameters = function () { return [\n { type: Compiler },\n { type: SystemJsNgModuleLoaderConfig, decorators: [{ type: Optional }] }\n ]; };\n return SystemJsNgModuleLoader;\n}());\nfunction checkNotEmpty(value, modulePath, exportName) {\n if (!value) {\n throw new Error(\"Cannot find '\" + exportName + \"' in '\" + modulePath + \"'\");\n }\n return value;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Represents an Embedded Template that can be used to instantiate Embedded Views.\n *\n * You can access a `TemplateRef`, in two ways. Via a directive placed on a `<ng-template>` element\n * (or directive prefixed with `*`) and have the `TemplateRef` for this Embedded View injected into\n * the constructor of the directive using the `TemplateRef` Token. Alternatively you can query for\n * the `TemplateRef` from a Component or a Directive via {@link Query}.\n *\n * To instantiate Embedded Views based on a Template, use {@link ViewContainerRef#\n * createEmbeddedView}, which will create the View and attach it to the View Container.\n *\n */\nvar TemplateRef = /** @class */ (function () {\n function TemplateRef() {\n }\n return TemplateRef;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Represents a container where one or more Views can be attached.\n *\n * The container can contain two kinds of Views. Host Views, created by instantiating a\n * {@link Component} via {@link #createComponent}, and Embedded Views, created by instantiating an\n * {@link TemplateRef Embedded Template} via {@link #createEmbeddedView}.\n *\n * The location of the View Container within the containing View is specified by the Anchor\n * `element`. Each View Container can have only one Anchor Element and each Anchor Element can only\n * have a single View Container.\n *\n * Root elements of Views attached to this container become siblings of the Anchor Element in\n * the Rendered View.\n *\n * To access a `ViewContainerRef` of an Element, you can either place a {@link Directive} injected\n * with `ViewContainerRef` on the Element, or you obtain it via a {@link ViewChild} query.\n *\n */\nvar ViewContainerRef = /** @class */ (function () {\n function ViewContainerRef() {\n }\n return ViewContainerRef;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar ChangeDetectorRef = /** @class */ (function () {\n function ChangeDetectorRef() {\n }\n return ChangeDetectorRef;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar ViewRef = /** @class */ (function (_super) {\n __extends(ViewRef, _super);\n function ViewRef() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ViewRef;\n}(ChangeDetectorRef));\n/**\n * Represents an Angular View.\n *\n * <!-- TODO: move the next two paragraphs to the dev guide -->\n * A View is a fundamental building block of the application UI. It is the smallest grouping of\n * Elements which are created and destroyed together.\n *\n * Properties of elements in a View can change, but the structure (number and order) of elements in\n * a View cannot. Changing the structure of Elements can only be done by inserting, moving or\n * removing nested Views via a `ViewContainerRef`. Each View can contain many View Containers.\n * <!-- /TODO -->\n *\n * @usageNotes\n * ### Example\n *\n * Given this template...\n *\n * ```\n * Count: {{items.length}}\n * <ul>\n * <li *ngFor=\"let item of items\">{{item}}</li>\n * </ul>\n * ```\n *\n * We have two `TemplateRef`s:\n *\n * Outer `TemplateRef`:\n *\n * ```\n * Count: {{items.length}}\n * <ul>\n * <ng-template ngFor let-item [ngForOf]=\"items\"></ng-template>\n * </ul>\n * ```\n *\n * Inner `TemplateRef`:\n *\n * ```\n * <li>{{item}}</li>\n * ```\n *\n * Notice that the original template is broken down into two separate `TemplateRef`s.\n *\n * The outer/inner `TemplateRef`s are then assembled into views like so:\n *\n * ```\n * <!-- ViewRef: outer-0 -->\n * Count: 2\n * <ul>\n * <ng-template view-container-ref></ng-template>\n * <!-- ViewRef: inner-1 --><li>first</li><!-- /ViewRef: inner-1 -->\n * <!-- ViewRef: inner-2 --><li>second</li><!-- /ViewRef: inner-2 -->\n * </ul>\n * <!-- /ViewRef: outer-0 -->\n * ```\n * @experimental\n */\nvar EmbeddedViewRef = /** @class */ (function (_super) {\n __extends(EmbeddedViewRef, _super);\n function EmbeddedViewRef() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return EmbeddedViewRef;\n}(ViewRef));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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// Public API for compiler\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar EventListener = /** @class */ (function () {\n function EventListener(name, callback) {\n this.name = name;\n this.callback = callback;\n }\n return EventListener;\n}());\n/**\n * @experimental All debugging apis are currently experimental.\n */\nvar DebugNode = /** @class */ (function () {\n function DebugNode(nativeNode, parent, _debugContext) {\n this._debugContext = _debugContext;\n this.nativeNode = nativeNode;\n if (parent && parent instanceof DebugElement) {\n parent.addChild(this);\n }\n else {\n this.parent = null;\n }\n this.listeners = [];\n }\n Object.defineProperty(DebugNode.prototype, \"injector\", {\n get: function () { return this._debugContext.injector; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugNode.prototype, \"componentInstance\", {\n get: function () { return this._debugContext.component; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugNode.prototype, \"context\", {\n get: function () { return this._debugContext.context; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugNode.prototype, \"references\", {\n get: function () { return this._debugContext.references; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugNode.prototype, \"providerTokens\", {\n get: function () { return this._debugContext.providerTokens; },\n enumerable: true,\n configurable: true\n });\n return DebugNode;\n}());\n/**\n * @experimental All debugging apis are currently experimental.\n */\nvar DebugElement = /** @class */ (function (_super) {\n __extends(DebugElement, _super);\n function DebugElement(nativeNode, parent, _debugContext) {\n var _this = _super.call(this, nativeNode, parent, _debugContext) || this;\n _this.properties = {};\n _this.attributes = {};\n _this.classes = {};\n _this.styles = {};\n _this.childNodes = [];\n _this.nativeElement = nativeNode;\n return _this;\n }\n DebugElement.prototype.addChild = function (child) {\n if (child) {\n this.childNodes.push(child);\n child.parent = this;\n }\n };\n DebugElement.prototype.removeChild = function (child) {\n var childIndex = this.childNodes.indexOf(child);\n if (childIndex !== -1) {\n child.parent = null;\n this.childNodes.splice(childIndex, 1);\n }\n };\n DebugElement.prototype.insertChildrenAfter = function (child, newChildren) {\n var _this = this;\n var siblingIndex = this.childNodes.indexOf(child);\n if (siblingIndex !== -1) {\n (_a = this.childNodes).splice.apply(_a, __spread([siblingIndex + 1, 0], newChildren));\n newChildren.forEach(function (c) {\n if (c.parent) {\n c.parent.removeChild(c);\n }\n c.parent = _this;\n });\n }\n var _a;\n };\n DebugElement.prototype.insertBefore = function (refChild, newChild) {\n var refIndex = this.childNodes.indexOf(refChild);\n if (refIndex === -1) {\n this.addChild(newChild);\n }\n else {\n if (newChild.parent) {\n newChild.parent.removeChild(newChild);\n }\n newChild.parent = this;\n this.childNodes.splice(refIndex, 0, newChild);\n }\n };\n DebugElement.prototype.query = function (predicate) {\n var results = this.queryAll(predicate);\n return results[0] || null;\n };\n DebugElement.prototype.queryAll = function (predicate) {\n var matches = [];\n _queryElementChildren(this, predicate, matches);\n return matches;\n };\n DebugElement.prototype.queryAllNodes = function (predicate) {\n var matches = [];\n _queryNodeChildren(this, predicate, matches);\n return matches;\n };\n Object.defineProperty(DebugElement.prototype, \"children\", {\n get: function () {\n return this.childNodes.filter(function (node) { return node instanceof DebugElement; });\n },\n enumerable: true,\n configurable: true\n });\n DebugElement.prototype.triggerEventHandler = function (eventName, eventObj) {\n this.listeners.forEach(function (listener) {\n if (listener.name == eventName) {\n listener.callback(eventObj);\n }\n });\n };\n return DebugElement;\n}(DebugNode));\n/**\n * @experimental\n */\nfunction asNativeElements(debugEls) {\n return debugEls.map(function (el) { return el.nativeElement; });\n}\nfunction _queryElementChildren(element, predicate, matches) {\n element.childNodes.forEach(function (node) {\n if (node instanceof DebugElement) {\n if (predicate(node)) {\n matches.push(node);\n }\n _queryElementChildren(node, predicate, matches);\n }\n });\n}\nfunction _queryNodeChildren(parentNode, predicate, matches) {\n if (parentNode instanceof DebugElement) {\n parentNode.childNodes.forEach(function (node) {\n if (predicate(node)) {\n matches.push(node);\n }\n if (node instanceof DebugElement) {\n _queryNodeChildren(node, predicate, matches);\n }\n });\n }\n}\n// Need to keep the nodes in a global Map so that multiple angular apps are supported.\nvar _nativeNodeToDebugNode = new Map();\n/**\n * @experimental\n */\nfunction getDebugNode(nativeNode) {\n return _nativeNodeToDebugNode.get(nativeNode) || null;\n}\n\nfunction indexDebugNode(node) {\n _nativeNodeToDebugNode.set(node.nativeNode, node);\n}\nfunction removeDebugNodeFromIndex(node) {\n _nativeNodeToDebugNode.delete(node.nativeNode);\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction devModeEqual(a, b) {\n var isListLikeIterableA = isListLikeIterable(a);\n var isListLikeIterableB = isListLikeIterable(b);\n if (isListLikeIterableA && isListLikeIterableB) {\n return areIterablesEqual(a, b, devModeEqual);\n }\n else {\n var isAObject = a && (typeof a === 'object' || typeof a === 'function');\n var isBObject = b && (typeof b === 'object' || typeof b === 'function');\n if (!isListLikeIterableA && isAObject && !isListLikeIterableB && isBObject) {\n return true;\n }\n else {\n return looseIdentical(a, b);\n }\n }\n}\n/**\n * Indicates that the result of a {@link Pipe} transformation has changed even though the\n * reference has not changed.\n *\n * Wrapped values are unwrapped automatically during the change detection, and the unwrapped value\n * is stored.\n *\n * Example:\n *\n * ```\n * if (this._latestValue === this._latestReturnedValue) {\n * return this._latestReturnedValue;\n * } else {\n * this._latestReturnedValue = this._latestValue;\n * return WrappedValue.wrap(this._latestValue); // this will force update\n * }\n * ```\n *\n */\nvar WrappedValue = /** @class */ (function () {\n function WrappedValue(value) {\n this.wrapped = value;\n }\n /** Creates a wrapped value. */\n WrappedValue.wrap = function (value) { return new WrappedValue(value); };\n /**\n * Returns the underlying value of a wrapped value.\n * Returns the given `value` when it is not wrapped.\n **/\n WrappedValue.unwrap = function (value) { return WrappedValue.isWrapped(value) ? value.wrapped : value; };\n /** Returns true if `value` is a wrapped value. */\n WrappedValue.isWrapped = function (value) { return value instanceof WrappedValue; };\n return WrappedValue;\n}());\n/**\n * Represents a basic change from a previous to a new value.\n *\n */\nvar SimpleChange = /** @class */ (function () {\n function SimpleChange(previousValue, currentValue, firstChange) {\n this.previousValue = previousValue;\n this.currentValue = currentValue;\n this.firstChange = firstChange;\n }\n /**\n * Check whether the new value is the first value assigned.\n */\n SimpleChange.prototype.isFirstChange = function () { return this.firstChange; };\n return SimpleChange;\n}());\nfunction isListLikeIterable(obj) {\n if (!isJsObject(obj))\n return false;\n return Array.isArray(obj) ||\n (!(obj instanceof Map) && // JS Map are iterables but return entries as [k, v]\n getSymbolIterator() in obj); // JS Iterable have a Symbol.iterator prop\n}\nfunction areIterablesEqual(a, b, comparator) {\n var iterator1 = a[getSymbolIterator()]();\n var iterator2 = b[getSymbolIterator()]();\n while (true) {\n var item1 = iterator1.next();\n var item2 = iterator2.next();\n if (item1.done && item2.done)\n return true;\n if (item1.done || item2.done)\n return false;\n if (!comparator(item1.value, item2.value))\n return false;\n }\n}\nfunction iterateListLike(obj, fn) {\n if (Array.isArray(obj)) {\n for (var i = 0; i < obj.length; i++) {\n fn(obj[i]);\n }\n }\n else {\n var iterator = obj[getSymbolIterator()]();\n var item = void 0;\n while (!((item = iterator.next()).done)) {\n fn(item.value);\n }\n }\n}\nfunction isJsObject(o) {\n return o !== null && (typeof o === 'function' || typeof o === 'object');\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar DefaultIterableDifferFactory = /** @class */ (function () {\n function DefaultIterableDifferFactory() {\n }\n DefaultIterableDifferFactory.prototype.supports = function (obj) { return isListLikeIterable(obj); };\n DefaultIterableDifferFactory.prototype.create = function (trackByFn) {\n return new DefaultIterableDiffer(trackByFn);\n };\n return DefaultIterableDifferFactory;\n}());\nvar trackByIdentity = function (index, item) { return item; };\n/**\n * @deprecated v4.0.0 - Should not be part of public API.\n */\nvar DefaultIterableDiffer = /** @class */ (function () {\n function DefaultIterableDiffer(trackByFn) {\n this.length = 0;\n // Keeps track of the used records at any point in time (during & across `_check()` calls)\n this._linkedRecords = null;\n // Keeps track of the removed records at any point in time during `_check()` calls.\n this._unlinkedRecords = null;\n this._previousItHead = null;\n this._itHead = null;\n this._itTail = null;\n this._additionsHead = null;\n this._additionsTail = null;\n this._movesHead = null;\n this._movesTail = null;\n this._removalsHead = null;\n this._removalsTail = null;\n // Keeps track of records where custom track by is the same, but item identity has changed\n this._identityChangesHead = null;\n this._identityChangesTail = null;\n this._trackByFn = trackByFn || trackByIdentity;\n }\n DefaultIterableDiffer.prototype.forEachItem = function (fn) {\n var record;\n for (record = this._itHead; record !== null; record = record._next) {\n fn(record);\n }\n };\n DefaultIterableDiffer.prototype.forEachOperation = function (fn) {\n var nextIt = this._itHead;\n var nextRemove = this._removalsHead;\n var addRemoveOffset = 0;\n var moveOffsets = null;\n while (nextIt || nextRemove) {\n // Figure out which is the next record to process\n // Order: remove, add, move\n var record = !nextRemove ||\n nextIt &&\n nextIt.currentIndex <\n getPreviousIndex(nextRemove, addRemoveOffset, moveOffsets) ?\n nextIt :\n nextRemove;\n var adjPreviousIndex = getPreviousIndex(record, addRemoveOffset, moveOffsets);\n var currentIndex = record.currentIndex;\n // consume the item, and adjust the addRemoveOffset and update moveDistance if necessary\n if (record === nextRemove) {\n addRemoveOffset--;\n nextRemove = nextRemove._nextRemoved;\n }\n else {\n nextIt = nextIt._next;\n if (record.previousIndex == null) {\n addRemoveOffset++;\n }\n else {\n // INVARIANT: currentIndex < previousIndex\n if (!moveOffsets)\n moveOffsets = [];\n var localMovePreviousIndex = adjPreviousIndex - addRemoveOffset;\n var localCurrentIndex = currentIndex - addRemoveOffset;\n if (localMovePreviousIndex != localCurrentIndex) {\n for (var i = 0; i < localMovePreviousIndex; i++) {\n var offset = i < moveOffsets.length ? moveOffsets[i] : (moveOffsets[i] = 0);\n var index = offset + i;\n if (localCurrentIndex <= index && index < localMovePreviousIndex) {\n moveOffsets[i] = offset + 1;\n }\n }\n var previousIndex = record.previousIndex;\n moveOffsets[previousIndex] = localCurrentIndex - localMovePreviousIndex;\n }\n }\n }\n if (adjPreviousIndex !== currentIndex) {\n fn(record, adjPreviousIndex, currentIndex);\n }\n }\n };\n DefaultIterableDiffer.prototype.forEachPreviousItem = function (fn) {\n var record;\n for (record = this._previousItHead; record !== null; record = record._nextPrevious) {\n fn(record);\n }\n };\n DefaultIterableDiffer.prototype.forEachAddedItem = function (fn) {\n var record;\n for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n fn(record);\n }\n };\n DefaultIterableDiffer.prototype.forEachMovedItem = function (fn) {\n var record;\n for (record = this._movesHead; record !== null; record = record._nextMoved) {\n fn(record);\n }\n };\n DefaultIterableDiffer.prototype.forEachRemovedItem = function (fn) {\n var record;\n for (record = this._removalsHead; record !== null; record = record._nextRemoved) {\n fn(record);\n }\n };\n DefaultIterableDiffer.prototype.forEachIdentityChange = function (fn) {\n var record;\n for (record = this._identityChangesHead; record !== null; record = record._nextIdentityChange) {\n fn(record);\n }\n };\n DefaultIterableDiffer.prototype.diff = function (collection) {\n if (collection == null)\n collection = [];\n if (!isListLikeIterable(collection)) {\n throw new Error(\"Error trying to diff '\" + stringify(collection) + \"'. Only arrays and iterables are allowed\");\n }\n if (this.check(collection)) {\n return this;\n }\n else {\n return null;\n }\n };\n DefaultIterableDiffer.prototype.onDestroy = function () { };\n DefaultIterableDiffer.prototype.check = function (collection) {\n var _this = this;\n this._reset();\n var record = this._itHead;\n var mayBeDirty = false;\n var index;\n var item;\n var itemTrackBy;\n if (Array.isArray(collection)) {\n this.length = collection.length;\n for (var index_1 = 0; index_1 < this.length; index_1++) {\n item = collection[index_1];\n itemTrackBy = this._trackByFn(index_1, item);\n if (record === null || !looseIdentical(record.trackById, itemTrackBy)) {\n record = this._mismatch(record, item, itemTrackBy, index_1);\n mayBeDirty = true;\n }\n else {\n if (mayBeDirty) {\n // TODO(misko): can we limit this to duplicates only?\n record = this._verifyReinsertion(record, item, itemTrackBy, index_1);\n }\n if (!looseIdentical(record.item, item))\n this._addIdentityChange(record, item);\n }\n record = record._next;\n }\n }\n else {\n index = 0;\n iterateListLike(collection, function (item) {\n itemTrackBy = _this._trackByFn(index, item);\n if (record === null || !looseIdentical(record.trackById, itemTrackBy)) {\n record = _this._mismatch(record, item, itemTrackBy, index);\n mayBeDirty = true;\n }\n else {\n if (mayBeDirty) {\n // TODO(misko): can we limit this to duplicates only?\n record = _this._verifyReinsertion(record, item, itemTrackBy, index);\n }\n if (!looseIdentical(record.item, item))\n _this._addIdentityChange(record, item);\n }\n record = record._next;\n index++;\n });\n this.length = index;\n }\n this._truncate(record);\n this.collection = collection;\n return this.isDirty;\n };\n Object.defineProperty(DefaultIterableDiffer.prototype, \"isDirty\", {\n /* CollectionChanges is considered dirty if it has any additions, moves, removals, or identity\n * changes.\n */\n get: function () {\n return this._additionsHead !== null || this._movesHead !== null ||\n this._removalsHead !== null || this._identityChangesHead !== null;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Reset the state of the change objects to show no changes. This means set previousKey to\n * currentKey, and clear all of the queues (additions, moves, removals).\n * Set the previousIndexes of moved and added items to their currentIndexes\n * Reset the list of additions, moves and removals\n *\n * @internal\n */\n DefaultIterableDiffer.prototype._reset = function () {\n if (this.isDirty) {\n var record = void 0;\n var nextRecord = void 0;\n for (record = this._previousItHead = this._itHead; record !== null; record = record._next) {\n record._nextPrevious = record._next;\n }\n for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n record.previousIndex = record.currentIndex;\n }\n this._additionsHead = this._additionsTail = null;\n for (record = this._movesHead; record !== null; record = nextRecord) {\n record.previousIndex = record.currentIndex;\n nextRecord = record._nextMoved;\n }\n this._movesHead = this._movesTail = null;\n this._removalsHead = this._removalsTail = null;\n this._identityChangesHead = this._identityChangesTail = null;\n // TODO(vicb): when assert gets supported\n // assert(!this.isDirty);\n }\n };\n /**\n * This is the core function which handles differences between collections.\n *\n * - `record` is the record which we saw at this position last time. If null then it is a new\n * item.\n * - `item` is the current item in the collection\n * - `index` is the position of the item in the collection\n *\n * @internal\n */\n DefaultIterableDiffer.prototype._mismatch = function (record, item, itemTrackBy, index) {\n // The previous record after which we will append the current one.\n var previousRecord;\n if (record === null) {\n previousRecord = this._itTail;\n }\n else {\n previousRecord = record._prev;\n // Remove the record from the collection since we know it does not match the item.\n this._remove(record);\n }\n // Attempt to see if we have seen the item before.\n record = this._linkedRecords === null ? null : this._linkedRecords.get(itemTrackBy, index);\n if (record !== null) {\n // We have seen this before, we need to move it forward in the collection.\n // But first we need to check if identity changed, so we can update in view if necessary\n if (!looseIdentical(record.item, item))\n this._addIdentityChange(record, item);\n this._moveAfter(record, previousRecord, index);\n }\n else {\n // Never seen it, check evicted list.\n record = this._unlinkedRecords === null ? null : this._unlinkedRecords.get(itemTrackBy, null);\n if (record !== null) {\n // It is an item which we have evicted earlier: reinsert it back into the list.\n // But first we need to check if identity changed, so we can update in view if necessary\n if (!looseIdentical(record.item, item))\n this._addIdentityChange(record, item);\n this._reinsertAfter(record, previousRecord, index);\n }\n else {\n // It is a new item: add it.\n record =\n this._addAfter(new IterableChangeRecord_(item, itemTrackBy), previousRecord, index);\n }\n }\n return record;\n };\n /**\n * This check is only needed if an array contains duplicates. (Short circuit of nothing dirty)\n *\n * Use case: `[a, a]` => `[b, a, a]`\n *\n * If we did not have this check then the insertion of `b` would:\n * 1) evict first `a`\n * 2) insert `b` at `0` index.\n * 3) leave `a` at index `1` as is. <-- this is wrong!\n * 3) reinsert `a` at index 2. <-- this is wrong!\n *\n * The correct behavior is:\n * 1) evict first `a`\n * 2) insert `b` at `0` index.\n * 3) reinsert `a` at index 1.\n * 3) move `a` at from `1` to `2`.\n *\n *\n * Double check that we have not evicted a duplicate item. We need to check if the item type may\n * have already been removed:\n * The insertion of b will evict the first 'a'. If we don't reinsert it now it will be reinserted\n * at the end. Which will show up as the two 'a's switching position. This is incorrect, since a\n * better way to think of it is as insert of 'b' rather then switch 'a' with 'b' and then add 'a'\n * at the end.\n *\n * @internal\n */\n DefaultIterableDiffer.prototype._verifyReinsertion = function (record, item, itemTrackBy, index) {\n var reinsertRecord = this._unlinkedRecords === null ? null : this._unlinkedRecords.get(itemTrackBy, null);\n if (reinsertRecord !== null) {\n record = this._reinsertAfter(reinsertRecord, record._prev, index);\n }\n else if (record.currentIndex != index) {\n record.currentIndex = index;\n this._addToMoves(record, index);\n }\n return record;\n };\n /**\n * Get rid of any excess {@link IterableChangeRecord_}s from the previous collection\n *\n * - `record` The first excess {@link IterableChangeRecord_}.\n *\n * @internal\n */\n DefaultIterableDiffer.prototype._truncate = function (record) {\n // Anything after that needs to be removed;\n while (record !== null) {\n var nextRecord = record._next;\n this._addToRemovals(this._unlink(record));\n record = nextRecord;\n }\n if (this._unlinkedRecords !== null) {\n this._unlinkedRecords.clear();\n }\n if (this._additionsTail !== null) {\n this._additionsTail._nextAdded = null;\n }\n if (this._movesTail !== null) {\n this._movesTail._nextMoved = null;\n }\n if (this._itTail !== null) {\n this._itTail._next = null;\n }\n if (this._removalsTail !== null) {\n this._removalsTail._nextRemoved = null;\n }\n if (this._identityChangesTail !== null) {\n this._identityChangesTail._nextIdentityChange = null;\n }\n };\n /** @internal */\n DefaultIterableDiffer.prototype._reinsertAfter = function (record, prevRecord, index) {\n if (this._unlinkedRecords !== null) {\n this._unlinkedRecords.remove(record);\n }\n var prev = record._prevRemoved;\n var next = record._nextRemoved;\n if (prev === null) {\n this._removalsHead = next;\n }\n else {\n prev._nextRemoved = next;\n }\n if (next === null) {\n this._removalsTail = prev;\n }\n else {\n next._prevRemoved = prev;\n }\n this._insertAfter(record, prevRecord, index);\n this._addToMoves(record, index);\n return record;\n };\n /** @internal */\n DefaultIterableDiffer.prototype._moveAfter = function (record, prevRecord, index) {\n this._unlink(record);\n this._insertAfter(record, prevRecord, index);\n this._addToMoves(record, index);\n return record;\n };\n /** @internal */\n DefaultIterableDiffer.prototype._addAfter = function (record, prevRecord, index) {\n this._insertAfter(record, prevRecord, index);\n if (this._additionsTail === null) {\n // TODO(vicb):\n // assert(this._additionsHead === null);\n this._additionsTail = this._additionsHead = record;\n }\n else {\n // TODO(vicb):\n // assert(_additionsTail._nextAdded === null);\n // assert(record._nextAdded === null);\n this._additionsTail = this._additionsTail._nextAdded = record;\n }\n return record;\n };\n /** @internal */\n DefaultIterableDiffer.prototype._insertAfter = function (record, prevRecord, index) {\n // TODO(vicb):\n // assert(record != prevRecord);\n // assert(record._next === null);\n // assert(record._prev === null);\n var next = prevRecord === null ? this._itHead : prevRecord._next;\n // TODO(vicb):\n // assert(next != record);\n // assert(prevRecord != record);\n record._next = next;\n record._prev = prevRecord;\n if (next === null) {\n this._itTail = record;\n }\n else {\n next._prev = record;\n }\n if (prevRecord === null) {\n this._itHead = record;\n }\n else {\n prevRecord._next = record;\n }\n if (this._linkedRecords === null) {\n this._linkedRecords = new _DuplicateMap();\n }\n this._linkedRecords.put(record);\n record.currentIndex = index;\n return record;\n };\n /** @internal */\n DefaultIterableDiffer.prototype._remove = function (record) {\n return this._addToRemovals(this._unlink(record));\n };\n /** @internal */\n DefaultIterableDiffer.prototype._unlink = function (record) {\n if (this._linkedRecords !== null) {\n this._linkedRecords.remove(record);\n }\n var prev = record._prev;\n var next = record._next;\n // TODO(vicb):\n // assert((record._prev = null) === null);\n // assert((record._next = null) === null);\n if (prev === null) {\n this._itHead = next;\n }\n else {\n prev._next = next;\n }\n if (next === null) {\n this._itTail = prev;\n }\n else {\n next._prev = prev;\n }\n return record;\n };\n /** @internal */\n DefaultIterableDiffer.prototype._addToMoves = function (record, toIndex) {\n // TODO(vicb):\n // assert(record._nextMoved === null);\n if (record.previousIndex === toIndex) {\n return record;\n }\n if (this._movesTail === null) {\n // TODO(vicb):\n // assert(_movesHead === null);\n this._movesTail = this._movesHead = record;\n }\n else {\n // TODO(vicb):\n // assert(_movesTail._nextMoved === null);\n this._movesTail = this._movesTail._nextMoved = record;\n }\n return record;\n };\n DefaultIterableDiffer.prototype._addToRemovals = function (record) {\n if (this._unlinkedRecords === null) {\n this._unlinkedRecords = new _DuplicateMap();\n }\n this._unlinkedRecords.put(record);\n record.currentIndex = null;\n record._nextRemoved = null;\n if (this._removalsTail === null) {\n // TODO(vicb):\n // assert(_removalsHead === null);\n this._removalsTail = this._removalsHead = record;\n record._prevRemoved = null;\n }\n else {\n // TODO(vicb):\n // assert(_removalsTail._nextRemoved === null);\n // assert(record._nextRemoved === null);\n record._prevRemoved = this._removalsTail;\n this._removalsTail = this._removalsTail._nextRemoved = record;\n }\n return record;\n };\n /** @internal */\n DefaultIterableDiffer.prototype._addIdentityChange = function (record, item) {\n record.item = item;\n if (this._identityChangesTail === null) {\n this._identityChangesTail = this._identityChangesHead = record;\n }\n else {\n this._identityChangesTail = this._identityChangesTail._nextIdentityChange = record;\n }\n return record;\n };\n return DefaultIterableDiffer;\n}());\nvar IterableChangeRecord_ = /** @class */ (function () {\n function IterableChangeRecord_(item, trackById) {\n this.item = item;\n this.trackById = trackById;\n this.currentIndex = null;\n this.previousIndex = null;\n /** @internal */\n this._nextPrevious = null;\n /** @internal */\n this._prev = null;\n /** @internal */\n this._next = null;\n /** @internal */\n this._prevDup = null;\n /** @internal */\n this._nextDup = null;\n /** @internal */\n this._prevRemoved = null;\n /** @internal */\n this._nextRemoved = null;\n /** @internal */\n this._nextAdded = null;\n /** @internal */\n this._nextMoved = null;\n /** @internal */\n this._nextIdentityChange = null;\n }\n return IterableChangeRecord_;\n}());\n// A linked list of CollectionChangeRecords with the same IterableChangeRecord_.item\nvar _DuplicateItemRecordList = /** @class */ (function () {\n function _DuplicateItemRecordList() {\n /** @internal */\n this._head = null;\n /** @internal */\n this._tail = null;\n }\n /**\n * Append the record to the list of duplicates.\n *\n * Note: by design all records in the list of duplicates hold the same value in record.item.\n */\n _DuplicateItemRecordList.prototype.add = function (record) {\n if (this._head === null) {\n this._head = this._tail = record;\n record._nextDup = null;\n record._prevDup = null;\n }\n else {\n // TODO(vicb):\n // assert(record.item == _head.item ||\n // record.item is num && record.item.isNaN && _head.item is num && _head.item.isNaN);\n this._tail._nextDup = record;\n record._prevDup = this._tail;\n record._nextDup = null;\n this._tail = record;\n }\n };\n // Returns a IterableChangeRecord_ having IterableChangeRecord_.trackById == trackById and\n // IterableChangeRecord_.currentIndex >= atOrAfterIndex\n _DuplicateItemRecordList.prototype.get = function (trackById, atOrAfterIndex) {\n var record;\n for (record = this._head; record !== null; record = record._nextDup) {\n if ((atOrAfterIndex === null || atOrAfterIndex <= record.currentIndex) &&\n looseIdentical(record.trackById, trackById)) {\n return record;\n }\n }\n return null;\n };\n /**\n * Remove one {@link IterableChangeRecord_} from the list of duplicates.\n *\n * Returns whether the list of duplicates is empty.\n */\n _DuplicateItemRecordList.prototype.remove = function (record) {\n // TODO(vicb):\n // assert(() {\n // // verify that the record being removed is in the list.\n // for (IterableChangeRecord_ cursor = _head; cursor != null; cursor = cursor._nextDup) {\n // if (identical(cursor, record)) return true;\n // }\n // return false;\n //});\n var prev = record._prevDup;\n var next = record._nextDup;\n if (prev === null) {\n this._head = next;\n }\n else {\n prev._nextDup = next;\n }\n if (next === null) {\n this._tail = prev;\n }\n else {\n next._prevDup = prev;\n }\n return this._head === null;\n };\n return _DuplicateItemRecordList;\n}());\nvar _DuplicateMap = /** @class */ (function () {\n function _DuplicateMap() {\n this.map = new Map();\n }\n _DuplicateMap.prototype.put = function (record) {\n var key = record.trackById;\n var duplicates = this.map.get(key);\n if (!duplicates) {\n duplicates = new _DuplicateItemRecordList();\n this.map.set(key, duplicates);\n }\n duplicates.add(record);\n };\n /**\n * Retrieve the `value` using key. Because the IterableChangeRecord_ value may be one which we\n * have already iterated over, we use the `atOrAfterIndex` to pretend it is not there.\n *\n * Use case: `[a, b, c, a, a]` if we are at index `3` which is the second `a` then asking if we\n * have any more `a`s needs to return the second `a`.\n */\n _DuplicateMap.prototype.get = function (trackById, atOrAfterIndex) {\n var key = trackById;\n var recordList = this.map.get(key);\n return recordList ? recordList.get(trackById, atOrAfterIndex) : null;\n };\n /**\n * Removes a {@link IterableChangeRecord_} from the list of duplicates.\n *\n * The list of duplicates also is removed from the map if it gets empty.\n */\n _DuplicateMap.prototype.remove = function (record) {\n var key = record.trackById;\n var recordList = this.map.get(key);\n // Remove the list of duplicates when it gets empty\n if (recordList.remove(record)) {\n this.map.delete(key);\n }\n return record;\n };\n Object.defineProperty(_DuplicateMap.prototype, \"isEmpty\", {\n get: function () { return this.map.size === 0; },\n enumerable: true,\n configurable: true\n });\n _DuplicateMap.prototype.clear = function () { this.map.clear(); };\n return _DuplicateMap;\n}());\nfunction getPreviousIndex(item, addRemoveOffset, moveOffsets) {\n var previousIndex = item.previousIndex;\n if (previousIndex === null)\n return previousIndex;\n var moveOffset = 0;\n if (moveOffsets && previousIndex < moveOffsets.length) {\n moveOffset = moveOffsets[previousIndex];\n }\n return previousIndex + addRemoveOffset + moveOffset;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar DefaultKeyValueDifferFactory = /** @class */ (function () {\n function DefaultKeyValueDifferFactory() {\n }\n DefaultKeyValueDifferFactory.prototype.supports = function (obj) { return obj instanceof Map || isJsObject(obj); };\n DefaultKeyValueDifferFactory.prototype.create = function () { return new DefaultKeyValueDiffer(); };\n return DefaultKeyValueDifferFactory;\n}());\nvar DefaultKeyValueDiffer = /** @class */ (function () {\n function DefaultKeyValueDiffer() {\n this._records = new Map();\n this._mapHead = null;\n // _appendAfter is used in the check loop\n this._appendAfter = null;\n this._previousMapHead = null;\n this._changesHead = null;\n this._changesTail = null;\n this._additionsHead = null;\n this._additionsTail = null;\n this._removalsHead = null;\n this._removalsTail = null;\n }\n Object.defineProperty(DefaultKeyValueDiffer.prototype, \"isDirty\", {\n get: function () {\n return this._additionsHead !== null || this._changesHead !== null ||\n this._removalsHead !== null;\n },\n enumerable: true,\n configurable: true\n });\n DefaultKeyValueDiffer.prototype.forEachItem = function (fn) {\n var record;\n for (record = this._mapHead; record !== null; record = record._next) {\n fn(record);\n }\n };\n DefaultKeyValueDiffer.prototype.forEachPreviousItem = function (fn) {\n var record;\n for (record = this._previousMapHead; record !== null; record = record._nextPrevious) {\n fn(record);\n }\n };\n DefaultKeyValueDiffer.prototype.forEachChangedItem = function (fn) {\n var record;\n for (record = this._changesHead; record !== null; record = record._nextChanged) {\n fn(record);\n }\n };\n DefaultKeyValueDiffer.prototype.forEachAddedItem = function (fn) {\n var record;\n for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n fn(record);\n }\n };\n DefaultKeyValueDiffer.prototype.forEachRemovedItem = function (fn) {\n var record;\n for (record = this._removalsHead; record !== null; record = record._nextRemoved) {\n fn(record);\n }\n };\n DefaultKeyValueDiffer.prototype.diff = function (map) {\n if (!map) {\n map = new Map();\n }\n else if (!(map instanceof Map || isJsObject(map))) {\n throw new Error(\"Error trying to diff '\" + stringify(map) + \"'. Only maps and objects are allowed\");\n }\n return this.check(map) ? this : null;\n };\n DefaultKeyValueDiffer.prototype.onDestroy = function () { };\n /**\n * Check the current state of the map vs the previous.\n * The algorithm is optimised for when the keys do no change.\n */\n DefaultKeyValueDiffer.prototype.check = function (map) {\n var _this = this;\n this._reset();\n var insertBefore = this._mapHead;\n this._appendAfter = null;\n this._forEach(map, function (value, key) {\n if (insertBefore && insertBefore.key === key) {\n _this._maybeAddToChanges(insertBefore, value);\n _this._appendAfter = insertBefore;\n insertBefore = insertBefore._next;\n }\n else {\n var record = _this._getOrCreateRecordForKey(key, value);\n insertBefore = _this._insertBeforeOrAppend(insertBefore, record);\n }\n });\n // Items remaining at the end of the list have been deleted\n if (insertBefore) {\n if (insertBefore._prev) {\n insertBefore._prev._next = null;\n }\n this._removalsHead = insertBefore;\n for (var record = insertBefore; record !== null; record = record._nextRemoved) {\n if (record === this._mapHead) {\n this._mapHead = null;\n }\n this._records.delete(record.key);\n record._nextRemoved = record._next;\n record.previousValue = record.currentValue;\n record.currentValue = null;\n record._prev = null;\n record._next = null;\n }\n }\n // Make sure tails have no next records from previous runs\n if (this._changesTail)\n this._changesTail._nextChanged = null;\n if (this._additionsTail)\n this._additionsTail._nextAdded = null;\n return this.isDirty;\n };\n /**\n * Inserts a record before `before` or append at the end of the list when `before` is null.\n *\n * Notes:\n * - This method appends at `this._appendAfter`,\n * - This method updates `this._appendAfter`,\n * - The return value is the new value for the insertion pointer.\n */\n DefaultKeyValueDiffer.prototype._insertBeforeOrAppend = function (before, record) {\n if (before) {\n var prev = before._prev;\n record._next = before;\n record._prev = prev;\n before._prev = record;\n if (prev) {\n prev._next = record;\n }\n if (before === this._mapHead) {\n this._mapHead = record;\n }\n this._appendAfter = before;\n return before;\n }\n if (this._appendAfter) {\n this._appendAfter._next = record;\n record._prev = this._appendAfter;\n }\n else {\n this._mapHead = record;\n }\n this._appendAfter = record;\n return null;\n };\n DefaultKeyValueDiffer.prototype._getOrCreateRecordForKey = function (key, value) {\n if (this._records.has(key)) {\n var record_1 = this._records.get(key);\n this._maybeAddToChanges(record_1, value);\n var prev = record_1._prev;\n var next = record_1._next;\n if (prev) {\n prev._next = next;\n }\n if (next) {\n next._prev = prev;\n }\n record_1._next = null;\n record_1._prev = null;\n return record_1;\n }\n var record = new KeyValueChangeRecord_(key);\n this._records.set(key, record);\n record.currentValue = value;\n this._addToAdditions(record);\n return record;\n };\n /** @internal */\n DefaultKeyValueDiffer.prototype._reset = function () {\n if (this.isDirty) {\n var record = void 0;\n // let `_previousMapHead` contain the state of the map before the changes\n this._previousMapHead = this._mapHead;\n for (record = this._previousMapHead; record !== null; record = record._next) {\n record._nextPrevious = record._next;\n }\n // Update `record.previousValue` with the value of the item before the changes\n // We need to update all changed items (that's those which have been added and changed)\n for (record = this._changesHead; record !== null; record = record._nextChanged) {\n record.previousValue = record.currentValue;\n }\n for (record = this._additionsHead; record != null; record = record._nextAdded) {\n record.previousValue = record.currentValue;\n }\n this._changesHead = this._changesTail = null;\n this._additionsHead = this._additionsTail = null;\n this._removalsHead = null;\n }\n };\n // Add the record or a given key to the list of changes only when the value has actually changed\n DefaultKeyValueDiffer.prototype._maybeAddToChanges = function (record, newValue) {\n if (!looseIdentical(newValue, record.currentValue)) {\n record.previousValue = record.currentValue;\n record.currentValue = newValue;\n this._addToChanges(record);\n }\n };\n DefaultKeyValueDiffer.prototype._addToAdditions = function (record) {\n if (this._additionsHead === null) {\n this._additionsHead = this._additionsTail = record;\n }\n else {\n this._additionsTail._nextAdded = record;\n this._additionsTail = record;\n }\n };\n DefaultKeyValueDiffer.prototype._addToChanges = function (record) {\n if (this._changesHead === null) {\n this._changesHead = this._changesTail = record;\n }\n else {\n this._changesTail._nextChanged = record;\n this._changesTail = record;\n }\n };\n /** @internal */\n DefaultKeyValueDiffer.prototype._forEach = function (obj, fn) {\n if (obj instanceof Map) {\n obj.forEach(fn);\n }\n else {\n Object.keys(obj).forEach(function (k) { return fn(obj[k], k); });\n }\n };\n return DefaultKeyValueDiffer;\n}());\nvar KeyValueChangeRecord_ = /** @class */ (function () {\n function KeyValueChangeRecord_(key) {\n this.key = key;\n this.previousValue = null;\n this.currentValue = null;\n /** @internal */\n this._nextPrevious = null;\n /** @internal */\n this._next = null;\n /** @internal */\n this._prev = null;\n /** @internal */\n this._nextAdded = null;\n /** @internal */\n this._nextRemoved = null;\n /** @internal */\n this._nextChanged = null;\n }\n return KeyValueChangeRecord_;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A repository of different iterable diffing strategies used by NgFor, NgClass, and others.\n *\n */\nvar IterableDiffers = /** @class */ (function () {\n function IterableDiffers(factories) {\n this.factories = factories;\n }\n IterableDiffers.create = function (factories, parent) {\n if (parent != null) {\n var copied = parent.factories.slice();\n factories = factories.concat(copied);\n }\n return new IterableDiffers(factories);\n };\n /**\n * Takes an array of {@link IterableDifferFactory} and returns a provider used to extend the\n * inherited {@link IterableDiffers} instance with the provided factories and return a new\n * {@link IterableDiffers} instance.\n *\n * @usageNotes\n * ### Example\n *\n * The following example shows how to extend an existing list of factories,\n * which will only be applied to the injector for this component and its children.\n * This step is all that's required to make a new {@link IterableDiffer} available.\n *\n * ```\n * @Component({\n * viewProviders: [\n * IterableDiffers.extend([new ImmutableListDiffer()])\n * ]\n * })\n * ```\n */\n IterableDiffers.extend = function (factories) {\n return {\n provide: IterableDiffers,\n useFactory: function (parent) {\n if (!parent) {\n // Typically would occur when calling IterableDiffers.extend inside of dependencies passed\n // to\n // bootstrap(), which would override default pipes instead of extending them.\n throw new Error('Cannot extend IterableDiffers without a parent injector');\n }\n return IterableDiffers.create(factories, parent);\n },\n // Dependency technically isn't optional, but we can provide a better error message this way.\n deps: [[IterableDiffers, new SkipSelf(), new Optional()]]\n };\n };\n IterableDiffers.prototype.find = function (iterable) {\n var factory = this.factories.find(function (f) { return f.supports(iterable); });\n if (factory != null) {\n return factory;\n }\n else {\n throw new Error(\"Cannot find a differ supporting object '\" + iterable + \"' of type '\" + getTypeNameForDebugging(iterable) + \"'\");\n }\n };\n IterableDiffers.ngInjectableDef = defineInjectable({\n providedIn: 'root',\n factory: function () { return new IterableDiffers([new DefaultIterableDifferFactory()]); }\n });\n return IterableDiffers;\n}());\nfunction getTypeNameForDebugging(type) {\n return type['name'] || typeof type;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A repository of different Map diffing strategies used by NgClass, NgStyle, and others.\n *\n */\nvar KeyValueDiffers = /** @class */ (function () {\n function KeyValueDiffers(factories) {\n this.factories = factories;\n }\n KeyValueDiffers.create = function (factories, parent) {\n if (parent) {\n var copied = parent.factories.slice();\n factories = factories.concat(copied);\n }\n return new KeyValueDiffers(factories);\n };\n /**\n * Takes an array of {@link KeyValueDifferFactory} and returns a provider used to extend the\n * inherited {@link KeyValueDiffers} instance with the provided factories and return a new\n * {@link KeyValueDiffers} instance.\n *\n * @usageNotes\n * ### Example\n *\n * The following example shows how to extend an existing list of factories,\n * which will only be applied to the injector for this component and its children.\n * This step is all that's required to make a new {@link KeyValueDiffer} available.\n *\n * ```\n * @Component({\n * viewProviders: [\n * KeyValueDiffers.extend([new ImmutableMapDiffer()])\n * ]\n * })\n * ```\n */\n KeyValueDiffers.extend = function (factories) {\n return {\n provide: KeyValueDiffers,\n useFactory: function (parent) {\n if (!parent) {\n // Typically would occur when calling KeyValueDiffers.extend inside of dependencies passed\n // to bootstrap(), which would override default pipes instead of extending them.\n throw new Error('Cannot extend KeyValueDiffers without a parent injector');\n }\n return KeyValueDiffers.create(factories, parent);\n },\n // Dependency technically isn't optional, but we can provide a better error message this way.\n deps: [[KeyValueDiffers, new SkipSelf(), new Optional()]]\n };\n };\n KeyValueDiffers.prototype.find = function (kv) {\n var factory = this.factories.find(function (f) { return f.supports(kv); });\n if (factory) {\n return factory;\n }\n throw new Error(\"Cannot find a differ supporting object '\" + kv + \"'\");\n };\n return KeyValueDiffers;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Structural diffing for `Object`s and `Map`s.\n */\nvar keyValDiff = [new DefaultKeyValueDifferFactory()];\n/**\n * Structural diffing for `Iterable` types such as `Array`s.\n */\nvar iterableDiff = [new DefaultIterableDifferFactory()];\nvar defaultIterableDiffers = new IterableDiffers(iterableDiff);\nvar defaultKeyValueDiffers = new KeyValueDiffers(keyValDiff);\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * @module\n * @description\n * Change detection enables data binding in Angular.\n */\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar _CORE_PLATFORM_PROVIDERS = [\n // Set a default platform name for platforms that don't set it explicitly.\n { provide: PLATFORM_ID, useValue: 'unknown' },\n { provide: PlatformRef, deps: [Injector] },\n { provide: TestabilityRegistry, deps: [] },\n { provide: Console, deps: [] },\n];\n/**\n * This platform has to be included in any other platform\n *\n * @experimental\n */\nvar platformCore = createPlatformFactory(null, 'core', _CORE_PLATFORM_PROVIDERS);\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Provide this token to set the locale of your application.\n * It is used for i18n extraction, by i18n pipes (DatePipe, I18nPluralPipe, CurrencyPipe,\n * DecimalPipe and PercentPipe) and by ICU expressions.\n *\n * See the [i18n guide](guide/i18n#setting-up-locale) for more information.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * import { LOCALE_ID } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n * providers: [{provide: LOCALE_ID, useValue: 'en-US' }]\n * });\n * ```\n *\n * @experimental i18n support is experimental.\n */\nvar LOCALE_ID = new InjectionToken('LocaleId');\n/**\n * Use this token at bootstrap to provide the content of your translation file (`xtb`,\n * `xlf` or `xlf2`) when you want to translate your application in another language.\n *\n * See the [i18n guide](guide/i18n#merge) for more information.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * import { TRANSLATIONS } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * // content of your translation file\n * const translations = '....';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n * providers: [{provide: TRANSLATIONS, useValue: translations }]\n * });\n * ```\n *\n * @experimental i18n support is experimental.\n */\nvar TRANSLATIONS = new InjectionToken('Translations');\n/**\n * Provide this token at bootstrap to set the format of your {@link TRANSLATIONS}: `xtb`,\n * `xlf` or `xlf2`.\n *\n * See the [i18n guide](guide/i18n#merge) for more information.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * import { TRANSLATIONS_FORMAT } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n * providers: [{provide: TRANSLATIONS_FORMAT, useValue: 'xlf' }]\n * });\n * ```\n *\n * @experimental i18n support is experimental.\n */\nvar TRANSLATIONS_FORMAT = new InjectionToken('TranslationsFormat');\n/**\n * Use this enum at bootstrap as an option of `bootstrapModule` to define the strategy\n * that the compiler should use in case of missing translations:\n * - Error: throw if you have missing translations.\n * - Warning (default): show a warning in the console and/or shell.\n * - Ignore: do nothing.\n *\n * See the [i18n guide](guide/i18n#missing-translation) for more information.\n *\n * @usageNotes\n * ### Example\n * ```typescript\n * import { MissingTranslationStrategy } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n * missingTranslation: MissingTranslationStrategy.Error\n * });\n * ```\n *\n * @experimental i18n support is experimental.\n */\n\n(function (MissingTranslationStrategy) {\n MissingTranslationStrategy[MissingTranslationStrategy[\"Error\"] = 0] = \"Error\";\n MissingTranslationStrategy[MissingTranslationStrategy[\"Warning\"] = 1] = \"Warning\";\n MissingTranslationStrategy[MissingTranslationStrategy[\"Ignore\"] = 2] = \"Ignore\";\n})(exports.MissingTranslationStrategy || (exports.MissingTranslationStrategy = {}));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction _iterableDiffersFactory() {\n return defaultIterableDiffers;\n}\nfunction _keyValueDiffersFactory() {\n return defaultKeyValueDiffers;\n}\nfunction _localeFactory(locale) {\n return locale || 'en-US';\n}\n/**\n * This module includes the providers of @angular/core that are needed\n * to bootstrap components via `ApplicationRef`.\n *\n * @experimental\n */\nvar ApplicationModule = /** @class */ (function () {\n // Inject ApplicationRef to make it eager...\n function ApplicationModule(appRef) {\n }\n ApplicationModule.decorators = [\n { type: NgModule, args: [{\n providers: [\n ApplicationRef,\n ApplicationInitStatus,\n Compiler,\n APP_ID_RANDOM_PROVIDER,\n { provide: IterableDiffers, useFactory: _iterableDiffersFactory },\n { provide: KeyValueDiffers, useFactory: _keyValueDiffersFactory },\n {\n provide: LOCALE_ID,\n useFactory: _localeFactory,\n deps: [[new Inject(LOCALE_ID), new Optional(), new SkipSelf()]]\n },\n ]\n },] }\n ];\n /** @nocollapse */\n ApplicationModule.ctorParameters = function () { return [\n { type: ApplicationRef }\n ]; };\n return ApplicationModule;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * This helper class is used to get hold of an inert tree of DOM elements containing dirty HTML\n * that needs sanitizing.\n * Depending upon browser support we must use one of three strategies for doing this.\n * Support: Safari 10.x -> XHR strategy\n * Support: Firefox -> DomParser strategy\n * Default: InertDocument strategy\n */\nvar InertBodyHelper = /** @class */ (function () {\n function InertBodyHelper(defaultDoc) {\n this.defaultDoc = defaultDoc;\n this.inertDocument = this.defaultDoc.implementation.createHTMLDocument('sanitization-inert');\n this.inertBodyElement = this.inertDocument.body;\n if (this.inertBodyElement == null) {\n // usually there should be only one body element in the document, but IE doesn't have any, so\n // we need to create one.\n var inertHtml = this.inertDocument.createElement('html');\n this.inertDocument.appendChild(inertHtml);\n this.inertBodyElement = this.inertDocument.createElement('body');\n inertHtml.appendChild(this.inertBodyElement);\n }\n this.inertBodyElement.innerHTML = '<svg><g onload=\"this.parentNode.remove()\"></g></svg>';\n if (this.inertBodyElement.querySelector && !this.inertBodyElement.querySelector('svg')) {\n // We just hit the Safari 10.1 bug - which allows JS to run inside the SVG G element\n // so use the XHR strategy.\n this.getInertBodyElement = this.getInertBodyElement_XHR;\n return;\n }\n this.inertBodyElement.innerHTML =\n '<svg><p><style><img src=\"</style><img src=x onerror=alert(1)//\">';\n if (this.inertBodyElement.querySelector && this.inertBodyElement.querySelector('svg img')) {\n // We just hit the Firefox bug - which prevents the inner img JS from being sanitized\n // so use the DOMParser strategy, if it is available.\n // If the DOMParser is not available then we are not in Firefox (Server/WebWorker?) so we\n // fall through to the default strategy below.\n if (isDOMParserAvailable()) {\n this.getInertBodyElement = this.getInertBodyElement_DOMParser;\n return;\n }\n }\n // None of the bugs were hit so it is safe for us to use the default InertDocument strategy\n this.getInertBodyElement = this.getInertBodyElement_InertDocument;\n }\n /**\n * Use XHR to create and fill an inert body element (on Safari 10.1)\n * See\n * https://github.com/cure53/DOMPurify/blob/a992d3a75031cb8bb032e5ea8399ba972bdf9a65/src/purify.js#L439-L449\n */\n InertBodyHelper.prototype.getInertBodyElement_XHR = function (html) {\n // We add these extra elements to ensure that the rest of the content is parsed as expected\n // e.g. leading whitespace is maintained and tags like `<meta>` do not get hoisted to the\n // `<head>` tag.\n html = '<body><remove></remove>' + html + '</body>';\n try {\n html = encodeURI(html);\n }\n catch (e) {\n return null;\n }\n var xhr = new XMLHttpRequest();\n xhr.responseType = 'document';\n xhr.open('GET', 'data:text/html;charset=utf-8,' + html, false);\n xhr.send(null);\n var body = xhr.response.body;\n body.removeChild(body.firstChild);\n return body;\n };\n /**\n * Use DOMParser to create and fill an inert body element (on Firefox)\n * See https://github.com/cure53/DOMPurify/releases/tag/0.6.7\n *\n */\n InertBodyHelper.prototype.getInertBodyElement_DOMParser = function (html) {\n // We add these extra elements to ensure that the rest of the content is parsed as expected\n // e.g. leading whitespace is maintained and tags like `<meta>` do not get hoisted to the\n // `<head>` tag.\n html = '<body><remove></remove>' + html + '</body>';\n try {\n var body = new window\n .DOMParser()\n .parseFromString(html, 'text/html')\n .body;\n body.removeChild(body.firstChild);\n return body;\n }\n catch (e) {\n return null;\n }\n };\n /**\n * Use an HTML5 `template` element, if supported, or an inert body element created via\n * `createHtmlDocument` to create and fill an inert DOM element.\n * This is the default sane strategy to use if the browser does not require one of the specialised\n * strategies above.\n */\n InertBodyHelper.prototype.getInertBodyElement_InertDocument = function (html) {\n // Prefer using <template> element if supported.\n var templateEl = this.inertDocument.createElement('template');\n if ('content' in templateEl) {\n templateEl.innerHTML = html;\n return templateEl;\n }\n this.inertBodyElement.innerHTML = html;\n // Support: IE 9-11 only\n // strip custom-namespaced attributes on IE<=11\n if (this.defaultDoc.documentMode) {\n this.stripCustomNsAttrs(this.inertBodyElement);\n }\n return this.inertBodyElement;\n };\n /**\n * When IE9-11 comes across an unknown namespaced attribute e.g. 'xlink:foo' it adds 'xmlns:ns1'\n * attribute to declare ns1 namespace and prefixes the attribute with 'ns1' (e.g.\n * 'ns1:xlink:foo').\n *\n * This is undesirable since we don't want to allow any of these custom attributes. This method\n * strips them all.\n */\n InertBodyHelper.prototype.stripCustomNsAttrs = function (el) {\n var elAttrs = el.attributes;\n // loop backwards so that we can support removals.\n for (var i = elAttrs.length - 1; 0 < i; i--) {\n var attrib = elAttrs.item(i);\n var attrName = attrib.name;\n if (attrName === 'xmlns:ns1' || attrName.indexOf('ns1:') === 0) {\n el.removeAttribute(attrName);\n }\n }\n var childNode = el.firstChild;\n while (childNode) {\n if (childNode.nodeType === Node.ELEMENT_NODE)\n this.stripCustomNsAttrs(childNode);\n childNode = childNode.nextSibling;\n }\n };\n return InertBodyHelper;\n}());\n/**\n * We need to determine whether the DOMParser exists in the global context.\n * The try-catch is because, on some browsers, trying to access this property\n * on window can actually throw an error.\n *\n * @suppress {uselessCode}\n */\nfunction isDOMParserAvailable() {\n try {\n return !!window.DOMParser;\n }\n catch (e) {\n return false;\n }\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A pattern that recognizes a commonly useful subset of URLs that are safe.\n *\n * This regular expression matches a subset of URLs that will not cause script\n * execution if used in URL context within a HTML document. Specifically, this\n * regular expression matches if (comment from here on and regex copied from\n * Soy's EscapingConventions):\n * (1) Either a protocol in a whitelist (http, https, mailto or ftp).\n * (2) or no protocol. A protocol must be followed by a colon. The below\n * allows that by allowing colons only after one of the characters [/?#].\n * A colon after a hash (#) must be in the fragment.\n * Otherwise, a colon after a (?) must be in a query.\n * Otherwise, a colon after a single solidus (/) must be in a path.\n * Otherwise, a colon after a double solidus (//) must be in the authority\n * (before port).\n *\n * The pattern disallows &, used in HTML entity declarations before\n * one of the characters in [/?#]. This disallows HTML entities used in the\n * protocol name, which should never happen, e.g. \"h&#116;tp\" for \"http\".\n * It also disallows HTML entities in the first path part of a relative path,\n * e.g. \"foo&lt;bar/baz\". Our existing escaping functions should not produce\n * that. More importantly, it disallows masking of a colon,\n * e.g. \"javascript&#58;...\".\n *\n * This regular expression was taken from the Closure sanitization library.\n */\nvar SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi;\n/** A pattern that matches safe data URLs. Only matches image, video and audio types. */\nvar DATA_URL_PATTERN = /^data:(?:image\\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\\/(?:mpeg|mp4|ogg|webm)|audio\\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\\/]+=*$/i;\nfunction _sanitizeUrl(url) {\n url = String(url);\n if (url.match(SAFE_URL_PATTERN) || url.match(DATA_URL_PATTERN))\n return url;\n if (isDevMode()) {\n console.warn(\"WARNING: sanitizing unsafe URL value \" + url + \" (see http://g.co/ng/security#xss)\");\n }\n return 'unsafe:' + url;\n}\nfunction sanitizeSrcset(srcset) {\n srcset = String(srcset);\n return srcset.split(',').map(function (srcset) { return _sanitizeUrl(srcset.trim()); }).join(', ');\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction tagSet(tags) {\n var res = {};\n try {\n for (var _a = __values(tags.split(',')), _b = _a.next(); !_b.done; _b = _a.next()) {\n var t = _b.value;\n res[t] = true;\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_b && !_b.done && (_c = _a.return)) _c.call(_a);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return res;\n var e_1, _c;\n}\nfunction merge$1() {\n var sets = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n sets[_i] = arguments[_i];\n }\n var res = {};\n try {\n for (var sets_1 = __values(sets), sets_1_1 = sets_1.next(); !sets_1_1.done; sets_1_1 = sets_1.next()) {\n var s = sets_1_1.value;\n for (var v in s) {\n if (s.hasOwnProperty(v))\n res[v] = true;\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (sets_1_1 && !sets_1_1.done && (_a = sets_1.return)) _a.call(sets_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n return res;\n var e_2, _a;\n}\n// Good source of info about elements and attributes\n// http://dev.w3.org/html5/spec/Overview.html#semantics\n// http://simon.html5.org/html-elements\n// Safe Void Elements - HTML5\n// http://dev.w3.org/html5/spec/Overview.html#void-elements\nvar VOID_ELEMENTS = tagSet('area,br,col,hr,img,wbr');\n// Elements that you can, intentionally, leave open (and which close themselves)\n// http://dev.w3.org/html5/spec/Overview.html#optional-tags\nvar OPTIONAL_END_TAG_BLOCK_ELEMENTS = tagSet('colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr');\nvar OPTIONAL_END_TAG_INLINE_ELEMENTS = tagSet('rp,rt');\nvar OPTIONAL_END_TAG_ELEMENTS = merge$1(OPTIONAL_END_TAG_INLINE_ELEMENTS, OPTIONAL_END_TAG_BLOCK_ELEMENTS);\n// Safe Block Elements - HTML5\nvar BLOCK_ELEMENTS = merge$1(OPTIONAL_END_TAG_BLOCK_ELEMENTS, tagSet('address,article,' +\n 'aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,' +\n 'h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul'));\n// Inline Elements - HTML5\nvar INLINE_ELEMENTS = merge$1(OPTIONAL_END_TAG_INLINE_ELEMENTS, tagSet('a,abbr,acronym,audio,b,' +\n 'bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,' +\n 'samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video'));\nvar VALID_ELEMENTS = merge$1(VOID_ELEMENTS, BLOCK_ELEMENTS, INLINE_ELEMENTS, OPTIONAL_END_TAG_ELEMENTS);\n// Attributes that have href and hence need to be sanitized\nvar URI_ATTRS = tagSet('background,cite,href,itemtype,longdesc,poster,src,xlink:href');\n// Attributes that have special href set hence need to be sanitized\nvar SRCSET_ATTRS = tagSet('srcset');\nvar HTML_ATTRS = tagSet('abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,' +\n 'compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,' +\n 'ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,' +\n 'scope,scrolling,shape,size,sizes,span,srclang,start,summary,tabindex,target,title,translate,type,usemap,' +\n 'valign,value,vspace,width');\n// NB: This currently consciously doesn't support SVG. SVG sanitization has had several security\n// issues in the past, so it seems safer to leave it out if possible. If support for binding SVG via\n// innerHTML is required, SVG attributes should be added here.\n// NB: Sanitization does not allow <form> elements or other active elements (<button> etc). Those\n// can be sanitized, but they increase security surface area without a legitimate use case, so they\n// are left out here.\nvar VALID_ATTRS = merge$1(URI_ATTRS, SRCSET_ATTRS, HTML_ATTRS);\n/**\n * SanitizingHtmlSerializer serializes a DOM fragment, stripping out any unsafe elements and unsafe\n * attributes.\n */\nvar SanitizingHtmlSerializer = /** @class */ (function () {\n function SanitizingHtmlSerializer() {\n // Explicitly track if something was stripped, to avoid accidentally warning of sanitization just\n // because characters were re-encoded.\n this.sanitizedSomething = false;\n this.buf = [];\n }\n SanitizingHtmlSerializer.prototype.sanitizeChildren = function (el) {\n // This cannot use a TreeWalker, as it has to run on Angular's various DOM adapters.\n // However this code never accesses properties off of `document` before deleting its contents\n // again, so it shouldn't be vulnerable to DOM clobbering.\n var current = el.firstChild;\n while (current) {\n if (current.nodeType === Node.ELEMENT_NODE) {\n this.startElement(current);\n }\n else if (current.nodeType === Node.TEXT_NODE) {\n this.chars(current.nodeValue);\n }\n else {\n // Strip non-element, non-text nodes.\n this.sanitizedSomething = true;\n }\n if (current.firstChild) {\n current = current.firstChild;\n continue;\n }\n while (current) {\n // Leaving the element. Walk up and to the right, closing tags as we go.\n if (current.nodeType === Node.ELEMENT_NODE) {\n this.endElement(current);\n }\n var next = this.checkClobberedElement(current, current.nextSibling);\n if (next) {\n current = next;\n break;\n }\n current = this.checkClobberedElement(current, current.parentNode);\n }\n }\n return this.buf.join('');\n };\n SanitizingHtmlSerializer.prototype.startElement = function (element) {\n var tagName = element.nodeName.toLowerCase();\n if (!VALID_ELEMENTS.hasOwnProperty(tagName)) {\n this.sanitizedSomething = true;\n return;\n }\n this.buf.push('<');\n this.buf.push(tagName);\n var elAttrs = element.attributes;\n for (var i = 0; i < elAttrs.length; i++) {\n var elAttr = elAttrs.item(i);\n var attrName = elAttr.name;\n var lower = attrName.toLowerCase();\n if (!VALID_ATTRS.hasOwnProperty(lower)) {\n this.sanitizedSomething = true;\n continue;\n }\n var value = elAttr.value;\n // TODO(martinprobst): Special case image URIs for data:image/...\n if (URI_ATTRS[lower])\n value = _sanitizeUrl(value);\n if (SRCSET_ATTRS[lower])\n value = sanitizeSrcset(value);\n this.buf.push(' ', attrName, '=\"', encodeEntities(value), '\"');\n }\n this.buf.push('>');\n };\n SanitizingHtmlSerializer.prototype.endElement = function (current) {\n var tagName = current.nodeName.toLowerCase();\n if (VALID_ELEMENTS.hasOwnProperty(tagName) && !VOID_ELEMENTS.hasOwnProperty(tagName)) {\n this.buf.push('</');\n this.buf.push(tagName);\n this.buf.push('>');\n }\n };\n SanitizingHtmlSerializer.prototype.chars = function (chars) { this.buf.push(encodeEntities(chars)); };\n SanitizingHtmlSerializer.prototype.checkClobberedElement = function (node, nextNode) {\n if (nextNode &&\n (node.compareDocumentPosition(nextNode) &\n Node.DOCUMENT_POSITION_CONTAINED_BY) === Node.DOCUMENT_POSITION_CONTAINED_BY) {\n throw new Error(\"Failed to sanitize html because the element is clobbered: \" + node.outerHTML);\n }\n return nextNode;\n };\n return SanitizingHtmlSerializer;\n}());\n// Regular Expressions for parsing tags and attributes\nvar SURROGATE_PAIR_REGEXP = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g;\n// ! to ~ is the ASCII range.\nvar NON_ALPHANUMERIC_REGEXP = /([^\\#-~ |!])/g;\n/**\n * Escapes all potentially dangerous characters, so that the\n * resulting string can be safely inserted into attribute or\n * element text.\n * @param value\n */\nfunction encodeEntities(value) {\n return value.replace(/&/g, '&amp;')\n .replace(SURROGATE_PAIR_REGEXP, function (match) {\n var hi = match.charCodeAt(0);\n var low = match.charCodeAt(1);\n return '&#' + (((hi - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000) + ';';\n })\n .replace(NON_ALPHANUMERIC_REGEXP, function (match) { return '&#' + match.charCodeAt(0) + ';'; })\n .replace(/</g, '&lt;')\n .replace(/>/g, '&gt;');\n}\nvar inertBodyHelper;\n/**\n * Sanitizes the given unsafe, untrusted HTML fragment, and returns HTML text that is safe to add to\n * the DOM in a browser environment.\n */\nfunction _sanitizeHtml(defaultDoc, unsafeHtmlInput) {\n var inertBodyElement = null;\n try {\n inertBodyHelper = inertBodyHelper || new InertBodyHelper(defaultDoc);\n // Make sure unsafeHtml is actually a string (TypeScript types are not enforced at runtime).\n var unsafeHtml = unsafeHtmlInput ? String(unsafeHtmlInput) : '';\n inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeHtml);\n // mXSS protection. Repeatedly parse the document to make sure it stabilizes, so that a browser\n // trying to auto-correct incorrect HTML cannot cause formerly inert HTML to become dangerous.\n var mXSSAttempts = 5;\n var parsedHtml = unsafeHtml;\n do {\n if (mXSSAttempts === 0) {\n throw new Error('Failed to sanitize html because the input is unstable');\n }\n mXSSAttempts--;\n unsafeHtml = parsedHtml;\n parsedHtml = inertBodyElement.innerHTML;\n inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeHtml);\n } while (unsafeHtml !== parsedHtml);\n var sanitizer = new SanitizingHtmlSerializer();\n var safeHtml = sanitizer.sanitizeChildren(getTemplateContent(inertBodyElement) || inertBodyElement);\n if (isDevMode() && sanitizer.sanitizedSomething) {\n console.warn('WARNING: sanitizing HTML stripped some content (see http://g.co/ng/security#xss).');\n }\n return safeHtml;\n }\n finally {\n // In case anything goes wrong, clear out inertElement to reset the entire DOM structure.\n if (inertBodyElement) {\n var parent_1 = getTemplateContent(inertBodyElement) || inertBodyElement;\n while (parent_1.firstChild) {\n parent_1.removeChild(parent_1.firstChild);\n }\n }\n }\n}\nfunction getTemplateContent(el) {\n return 'content' in el /** Microsoft/TypeScript#21517 */ && isTemplateElement(el) ?\n el.content :\n null;\n}\nfunction isTemplateElement(el) {\n return el.nodeType === Node.ELEMENT_NODE && el.nodeName === 'TEMPLATE';\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * Regular expression for safe style values.\n *\n * Quotes (\" and ') are allowed, but a check must be done elsewhere to ensure they're balanced.\n *\n * ',' allows multiple values to be assigned to the same property (e.g. background-attachment or\n * font-family) and hence could allow multiple values to get injected, but that should pose no risk\n * of XSS.\n *\n * The function expression checks only for XSS safety, not for CSS validity.\n *\n * This regular expression was taken from the Closure sanitization library, and augmented for\n * transformation values.\n */\nvar VALUES = '[-,.\"\\'%_!# a-zA-Z0-9]+';\nvar TRANSFORMATION_FNS = '(?:matrix|translate|scale|rotate|skew|perspective)(?:X|Y|3d)?';\nvar COLOR_FNS = '(?:rgb|hsl)a?';\nvar GRADIENTS = '(?:repeating-)?(?:linear|radial)-gradient';\nvar CSS3_FNS = '(?:calc|attr)';\nvar FN_ARGS = '\\\\([-0-9.%, #a-zA-Z]+\\\\)';\nvar SAFE_STYLE_VALUE = new RegExp(\"^(\" + VALUES + \"|\" +\n (\"(?:\" + TRANSFORMATION_FNS + \"|\" + COLOR_FNS + \"|\" + GRADIENTS + \"|\" + CSS3_FNS + \")\") +\n (FN_ARGS + \")$\"), 'g');\n/**\n * Matches a `url(...)` value with an arbitrary argument as long as it does\n * not contain parentheses.\n *\n * The URL value still needs to be sanitized separately.\n *\n * `url(...)` values are a very common use case, e.g. for `background-image`. With carefully crafted\n * CSS style rules, it is possible to construct an information leak with `url` values in CSS, e.g.\n * by observing whether scroll bars are displayed, or character ranges used by a font face\n * definition.\n *\n * Angular only allows binding CSS values (as opposed to entire CSS rules), so it is unlikely that\n * binding a URL value without further cooperation from the page will cause an information leak, and\n * if so, it is just a leak, not a full blown XSS vulnerability.\n *\n * Given the common use case, low likelihood of attack vector, and low impact of an attack, this\n * code is permissive and allows URLs that sanitize otherwise.\n */\nvar URL_RE = /^url\\(([^)]+)\\)$/;\n/**\n * Checks that quotes (\" and ') are properly balanced inside a string. Assumes\n * that neither escape (\\) nor any other character that could result in\n * breaking out of a string parsing context are allowed;\n * see http://www.w3.org/TR/css3-syntax/#string-token-diagram.\n *\n * This code was taken from the Closure sanitization library.\n */\nfunction hasBalancedQuotes(value) {\n var outsideSingle = true;\n var outsideDouble = true;\n for (var i = 0; i < value.length; i++) {\n var c = value.charAt(i);\n if (c === '\\'' && outsideDouble) {\n outsideSingle = !outsideSingle;\n }\n else if (c === '\"' && outsideSingle) {\n outsideDouble = !outsideDouble;\n }\n }\n return outsideSingle && outsideDouble;\n}\n/**\n * Sanitizes the given untrusted CSS style property value (i.e. not an entire object, just a single\n * value) and returns a value that is safe to use in a browser environment.\n */\nfunction _sanitizeStyle(value) {\n value = String(value).trim(); // Make sure it's actually a string.\n if (!value)\n return '';\n // Single url(...) values are supported, but only for URLs that sanitize cleanly. See above for\n // reasoning behind this.\n var urlMatch = value.match(URL_RE);\n if ((urlMatch && _sanitizeUrl(urlMatch[1]) === urlMatch[1]) ||\n value.match(SAFE_STYLE_VALUE) && hasBalancedQuotes(value)) {\n return value; // Safe style values.\n }\n if (isDevMode()) {\n console.warn(\"WARNING: sanitizing unsafe style value \" + value + \" (see http://g.co/ng/security#xss).\");\n }\n return 'unsafe';\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A SecurityContext marks a location that has dangerous security implications, e.g. a DOM property\n * like `innerHTML` that could cause Cross Site Scripting (XSS) security bugs when improperly\n * handled.\n *\n * See DomSanitizer for more details on security in Angular applications.\n *\n *\n */\n\n(function (SecurityContext) {\n SecurityContext[SecurityContext[\"NONE\"] = 0] = \"NONE\";\n SecurityContext[SecurityContext[\"HTML\"] = 1] = \"HTML\";\n SecurityContext[SecurityContext[\"STYLE\"] = 2] = \"STYLE\";\n SecurityContext[SecurityContext[\"SCRIPT\"] = 3] = \"SCRIPT\";\n SecurityContext[SecurityContext[\"URL\"] = 4] = \"URL\";\n SecurityContext[SecurityContext[\"RESOURCE_URL\"] = 5] = \"RESOURCE_URL\";\n})(exports.SecurityContext || (exports.SecurityContext = {}));\n/**\n * Sanitizer is used by the views to sanitize potentially dangerous values.\n *\n *\n */\nvar Sanitizer = /** @class */ (function () {\n function Sanitizer() {\n }\n return Sanitizer;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Called before each cycle of a view's check to detect whether this is in the\n// initState for which we need to call ngOnInit, ngAfterContentInit or ngAfterViewInit\n// lifecycle methods. Returns true if this check cycle should call lifecycle\n// methods.\nfunction shiftInitState(view, priorInitState, newInitState) {\n // Only update the InitState if we are currently in the prior state.\n // For example, only move into CallingInit if we are in BeforeInit. Only\n // move into CallingContentInit if we are in CallingInit. Normally this will\n // always be true because of how checkCycle is called in checkAndUpdateView.\n // However, if checkAndUpdateView is called recursively or if an exception is\n // thrown while checkAndUpdateView is running, checkAndUpdateView starts over\n // from the beginning. This ensures the state is monotonically increasing,\n // terminating in the AfterInit state, which ensures the Init methods are called\n // at least once and only once.\n var state = view.state;\n var initState = state & 1792;\n if (initState === priorInitState) {\n view.state = (state & ~1792 /* InitState_Mask */) | newInitState;\n view.initIndex = -1;\n return true;\n }\n return initState === newInitState;\n}\n// Returns true if the lifecycle init method should be called for the node with\n// the given init index.\nfunction shouldCallLifecycleInitHook(view, initState, index) {\n if ((view.state & 1792 /* InitState_Mask */) === initState && view.initIndex <= index) {\n view.initIndex = index + 1;\n return true;\n }\n return false;\n}\n/**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\nfunction asTextData(view, index) {\n return view.nodes[index];\n}\n/**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\nfunction asElementData(view, index) {\n return view.nodes[index];\n}\n/**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\nfunction asProviderData(view, index) {\n return view.nodes[index];\n}\n/**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\nfunction asPureExpressionData(view, index) {\n return view.nodes[index];\n}\n/**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\nfunction asQueryList(view, index) {\n return view.nodes[index];\n}\nvar DebugContext = /** @class */ (function () {\n function DebugContext() {\n }\n return DebugContext;\n}());\n/**\n * This object is used to prevent cycles in the source files and to have a place where\n * debug mode can hook it. It is lazily filled when `isDevMode` is known.\n */\nvar Services = {\n setCurrentNode: undefined,\n createRootView: undefined,\n createEmbeddedView: undefined,\n createComponentView: undefined,\n createNgModuleRef: undefined,\n overrideProvider: undefined,\n overrideComponentView: undefined,\n clearOverrides: undefined,\n checkAndUpdateView: undefined,\n checkNoChangesView: undefined,\n destroyView: undefined,\n resolveDep: undefined,\n createDebugContext: undefined,\n handleEvent: undefined,\n updateDirectives: undefined,\n updateRenderer: undefined,\n dirtyParentQueries: undefined,\n};\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction expressionChangedAfterItHasBeenCheckedError(context, oldValue, currValue, isFirstCheck) {\n var msg = \"ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: '\" + oldValue + \"'. Current value: '\" + currValue + \"'.\";\n if (isFirstCheck) {\n msg +=\n \" It seems like the view has been created after its parent and its children have been dirty checked.\" +\n \" Has it been created in a change detection hook ?\";\n }\n return viewDebugError(msg, context);\n}\nfunction viewWrappedDebugError(err, context) {\n if (!(err instanceof Error)) {\n // errors that are not Error instances don't have a stack,\n // so it is ok to wrap them into a new Error object...\n err = new Error(err.toString());\n }\n _addDebugContext(err, context);\n return err;\n}\nfunction viewDebugError(msg, context) {\n var err = new Error(msg);\n _addDebugContext(err, context);\n return err;\n}\nfunction _addDebugContext(err, context) {\n err[ERROR_DEBUG_CONTEXT] = context;\n err[ERROR_LOGGER] = context.logError.bind(context);\n}\nfunction isViewDebugError(err) {\n return !!getDebugContext(err);\n}\nfunction viewDestroyedError(action) {\n return new Error(\"ViewDestroyedError: Attempt to use a destroyed view: \" + action);\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar NOOP = function () { };\nvar _tokenKeyCache = new Map();\nfunction tokenKey(token) {\n var key = _tokenKeyCache.get(token);\n if (!key) {\n key = stringify(token) + '_' + _tokenKeyCache.size;\n _tokenKeyCache.set(token, key);\n }\n return key;\n}\nfunction unwrapValue(view, nodeIdx, bindingIdx, value) {\n if (WrappedValue.isWrapped(value)) {\n value = WrappedValue.unwrap(value);\n var globalBindingIdx = view.def.nodes[nodeIdx].bindingIndex + bindingIdx;\n var oldValue = WrappedValue.unwrap(view.oldValues[globalBindingIdx]);\n view.oldValues[globalBindingIdx] = new WrappedValue(oldValue);\n }\n return value;\n}\nvar UNDEFINED_RENDERER_TYPE_ID = '$$undefined';\nvar EMPTY_RENDERER_TYPE_ID = '$$empty';\n// Attention: this function is called as top level function.\n// Putting any logic in here will destroy closure tree shaking!\nfunction createRendererType2(values) {\n return {\n id: UNDEFINED_RENDERER_TYPE_ID,\n styles: values.styles,\n encapsulation: values.encapsulation,\n data: values.data\n };\n}\nvar _renderCompCount = 0;\nfunction resolveRendererType2(type) {\n if (type && type.id === UNDEFINED_RENDERER_TYPE_ID) {\n // first time we see this RendererType2. Initialize it...\n var isFilled = ((type.encapsulation != null && type.encapsulation !== exports.ViewEncapsulation.None) ||\n type.styles.length || Object.keys(type.data).length);\n if (isFilled) {\n type.id = \"c\" + _renderCompCount++;\n }\n else {\n type.id = EMPTY_RENDERER_TYPE_ID;\n }\n }\n if (type && type.id === EMPTY_RENDERER_TYPE_ID) {\n type = null;\n }\n return type || null;\n}\nfunction checkBinding(view, def, bindingIdx, value) {\n var oldValues = view.oldValues;\n if ((view.state & 2 /* FirstCheck */) ||\n !looseIdentical(oldValues[def.bindingIndex + bindingIdx], value)) {\n return true;\n }\n return false;\n}\nfunction checkAndUpdateBinding(view, def, bindingIdx, value) {\n if (checkBinding(view, def, bindingIdx, value)) {\n view.oldValues[def.bindingIndex + bindingIdx] = value;\n return true;\n }\n return false;\n}\nfunction checkBindingNoChanges(view, def, bindingIdx, value) {\n var oldValue = view.oldValues[def.bindingIndex + bindingIdx];\n if ((view.state & 1 /* BeforeFirstCheck */) || !devModeEqual(oldValue, value)) {\n var bindingName = def.bindings[bindingIdx].name;\n throw expressionChangedAfterItHasBeenCheckedError(Services.createDebugContext(view, def.nodeIndex), bindingName + \": \" + oldValue, bindingName + \": \" + value, (view.state & 1 /* BeforeFirstCheck */) !== 0);\n }\n}\nfunction markParentViewsForCheck(view) {\n var currView = view;\n while (currView) {\n if (currView.def.flags & 2 /* OnPush */) {\n currView.state |= 8 /* ChecksEnabled */;\n }\n currView = currView.viewContainerParent || currView.parent;\n }\n}\nfunction markParentViewsForCheckProjectedViews(view, endView) {\n var currView = view;\n while (currView && currView !== endView) {\n currView.state |= 64 /* CheckProjectedViews */;\n currView = currView.viewContainerParent || currView.parent;\n }\n}\nfunction dispatchEvent(view, nodeIndex, eventName, event) {\n try {\n var nodeDef = view.def.nodes[nodeIndex];\n var startView = nodeDef.flags & 33554432 /* ComponentView */ ?\n asElementData(view, nodeIndex).componentView :\n view;\n markParentViewsForCheck(startView);\n return Services.handleEvent(view, nodeIndex, eventName, event);\n }\n catch (e) {\n // Attention: Don't rethrow, as it would cancel Observable subscriptions!\n view.root.errorHandler.handleError(e);\n }\n}\nfunction declaredViewContainer(view) {\n if (view.parent) {\n var parentView = view.parent;\n return asElementData(parentView, view.parentNodeDef.nodeIndex);\n }\n return null;\n}\n/**\n * for component views, this is the host element.\n * for embedded views, this is the index of the parent node\n * that contains the view container.\n */\nfunction viewParentEl(view) {\n var parentView = view.parent;\n if (parentView) {\n return view.parentNodeDef.parent;\n }\n else {\n return null;\n }\n}\nfunction renderNode(view, def) {\n switch (def.flags & 201347067 /* Types */) {\n case 1 /* TypeElement */:\n return asElementData(view, def.nodeIndex).renderElement;\n case 2 /* TypeText */:\n return asTextData(view, def.nodeIndex).renderText;\n }\n}\nfunction elementEventFullName(target, name) {\n return target ? target + \":\" + name : name;\n}\nfunction isComponentView(view) {\n return !!view.parent && !!(view.parentNodeDef.flags & 32768 /* Component */);\n}\nfunction isEmbeddedView(view) {\n return !!view.parent && !(view.parentNodeDef.flags & 32768 /* Component */);\n}\nfunction filterQueryId(queryId) {\n return 1 << (queryId % 32);\n}\nfunction splitMatchedQueriesDsl(matchedQueriesDsl) {\n var matchedQueries = {};\n var matchedQueryIds = 0;\n var references = {};\n if (matchedQueriesDsl) {\n matchedQueriesDsl.forEach(function (_a) {\n var _b = __read(_a, 2), queryId = _b[0], valueType = _b[1];\n if (typeof queryId === 'number') {\n matchedQueries[queryId] = valueType;\n matchedQueryIds |= filterQueryId(queryId);\n }\n else {\n references[queryId] = valueType;\n }\n });\n }\n return { matchedQueries: matchedQueries, references: references, matchedQueryIds: matchedQueryIds };\n}\nfunction splitDepsDsl(deps, sourceName) {\n return deps.map(function (value) {\n var token;\n var flags;\n if (Array.isArray(value)) {\n _a = __read(value, 2), flags = _a[0], token = _a[1];\n }\n else {\n flags = 0 /* None */;\n token = value;\n }\n if (token && (typeof token === 'function' || typeof token === 'object') && sourceName) {\n Object.defineProperty(token, SOURCE, { value: sourceName, configurable: true });\n }\n return { flags: flags, token: token, tokenKey: tokenKey(token) };\n var _a;\n });\n}\nfunction getParentRenderElement(view, renderHost, def) {\n var renderParent = def.renderParent;\n if (renderParent) {\n if ((renderParent.flags & 1 /* TypeElement */) === 0 ||\n (renderParent.flags & 33554432 /* ComponentView */) === 0 ||\n (renderParent.element.componentRendererType &&\n renderParent.element.componentRendererType.encapsulation ===\n exports.ViewEncapsulation.Native)) {\n // only children of non components, or children of components with native encapsulation should\n // be attached.\n return asElementData(view, def.renderParent.nodeIndex).renderElement;\n }\n }\n else {\n return renderHost;\n }\n}\nvar DEFINITION_CACHE = new WeakMap();\nfunction resolveDefinition(factory) {\n var value = DEFINITION_CACHE.get(factory);\n if (!value) {\n value = factory(function () { return NOOP; });\n value.factory = factory;\n DEFINITION_CACHE.set(factory, value);\n }\n return value;\n}\nfunction rootRenderNodes(view) {\n var renderNodes = [];\n visitRootRenderNodes(view, 0 /* Collect */, undefined, undefined, renderNodes);\n return renderNodes;\n}\nfunction visitRootRenderNodes(view, action, parentNode, nextSibling, target) {\n // We need to re-compute the parent node in case the nodes have been moved around manually\n if (action === 3 /* RemoveChild */) {\n parentNode = view.renderer.parentNode(renderNode(view, view.def.lastRenderRootNode));\n }\n visitSiblingRenderNodes(view, action, 0, view.def.nodes.length - 1, parentNode, nextSibling, target);\n}\nfunction visitSiblingRenderNodes(view, action, startIndex, endIndex, parentNode, nextSibling, target) {\n for (var i = startIndex; i <= endIndex; i++) {\n var nodeDef = view.def.nodes[i];\n if (nodeDef.flags & (1 /* TypeElement */ | 2 /* TypeText */ | 8 /* TypeNgContent */)) {\n visitRenderNode(view, nodeDef, action, parentNode, nextSibling, target);\n }\n // jump to next sibling\n i += nodeDef.childCount;\n }\n}\nfunction visitProjectedRenderNodes(view, ngContentIndex, action, parentNode, nextSibling, target) {\n var compView = view;\n while (compView && !isComponentView(compView)) {\n compView = compView.parent;\n }\n var hostView = compView.parent;\n var hostElDef = viewParentEl(compView);\n var startIndex = hostElDef.nodeIndex + 1;\n var endIndex = hostElDef.nodeIndex + hostElDef.childCount;\n for (var i = startIndex; i <= endIndex; i++) {\n var nodeDef = hostView.def.nodes[i];\n if (nodeDef.ngContentIndex === ngContentIndex) {\n visitRenderNode(hostView, nodeDef, action, parentNode, nextSibling, target);\n }\n // jump to next sibling\n i += nodeDef.childCount;\n }\n if (!hostView.parent) {\n // a root view\n var projectedNodes = view.root.projectableNodes[ngContentIndex];\n if (projectedNodes) {\n for (var i = 0; i < projectedNodes.length; i++) {\n execRenderNodeAction(view, projectedNodes[i], action, parentNode, nextSibling, target);\n }\n }\n }\n}\nfunction visitRenderNode(view, nodeDef, action, parentNode, nextSibling, target) {\n if (nodeDef.flags & 8 /* TypeNgContent */) {\n visitProjectedRenderNodes(view, nodeDef.ngContent.index, action, parentNode, nextSibling, target);\n }\n else {\n var rn = renderNode(view, nodeDef);\n if (action === 3 /* RemoveChild */ && (nodeDef.flags & 33554432 /* ComponentView */) &&\n (nodeDef.bindingFlags & 48 /* CatSyntheticProperty */)) {\n // Note: we might need to do both actions.\n if (nodeDef.bindingFlags & (16 /* SyntheticProperty */)) {\n execRenderNodeAction(view, rn, action, parentNode, nextSibling, target);\n }\n if (nodeDef.bindingFlags & (32 /* SyntheticHostProperty */)) {\n var compView = asElementData(view, nodeDef.nodeIndex).componentView;\n execRenderNodeAction(compView, rn, action, parentNode, nextSibling, target);\n }\n }\n else {\n execRenderNodeAction(view, rn, action, parentNode, nextSibling, target);\n }\n if (nodeDef.flags & 16777216 /* EmbeddedViews */) {\n var embeddedViews = asElementData(view, nodeDef.nodeIndex).viewContainer._embeddedViews;\n for (var k = 0; k < embeddedViews.length; k++) {\n visitRootRenderNodes(embeddedViews[k], action, parentNode, nextSibling, target);\n }\n }\n if (nodeDef.flags & 1 /* TypeElement */ && !nodeDef.element.name) {\n visitSiblingRenderNodes(view, action, nodeDef.nodeIndex + 1, nodeDef.nodeIndex + nodeDef.childCount, parentNode, nextSibling, target);\n }\n }\n}\nfunction execRenderNodeAction(view, renderNode, action, parentNode, nextSibling, target) {\n var renderer = view.renderer;\n switch (action) {\n case 1 /* AppendChild */:\n renderer.appendChild(parentNode, renderNode);\n break;\n case 2 /* InsertBefore */:\n renderer.insertBefore(parentNode, renderNode, nextSibling);\n break;\n case 3 /* RemoveChild */:\n renderer.removeChild(parentNode, renderNode);\n break;\n case 0 /* Collect */:\n target.push(renderNode);\n break;\n }\n}\nvar NS_PREFIX_RE = /^:([^:]+):(.+)$/;\nfunction splitNamespace(name) {\n if (name[0] === ':') {\n var match = name.match(NS_PREFIX_RE);\n return [match[1], match[2]];\n }\n return ['', name];\n}\nfunction calcBindingFlags(bindings) {\n var flags = 0;\n for (var i = 0; i < bindings.length; i++) {\n flags |= bindings[i].flags;\n }\n return flags;\n}\nfunction interpolate(valueCount, constAndInterp) {\n var result = '';\n for (var i = 0; i < valueCount * 2; i = i + 2) {\n result = result + constAndInterp[i] + _toStringWithNull(constAndInterp[i + 1]);\n }\n return result + constAndInterp[valueCount * 2];\n}\nfunction inlineInterpolate(valueCount, c0, a1, c1, a2, c2, a3, c3, a4, c4, a5, c5, a6, c6, a7, c7, a8, c8, a9, c9) {\n switch (valueCount) {\n case 1:\n return c0 + _toStringWithNull(a1) + c1;\n case 2:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2;\n case 3:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n c3;\n case 4:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n c3 + _toStringWithNull(a4) + c4;\n case 5:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5;\n case 6:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) + c6;\n case 7:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) +\n c6 + _toStringWithNull(a7) + c7;\n case 8:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) +\n c6 + _toStringWithNull(a7) + c7 + _toStringWithNull(a8) + c8;\n case 9:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) +\n c6 + _toStringWithNull(a7) + c7 + _toStringWithNull(a8) + c8 + _toStringWithNull(a9) + c9;\n default:\n throw new Error(\"Does not support more than 9 expressions\");\n }\n}\nfunction _toStringWithNull(v) {\n return v != null ? v.toString() : '';\n}\nvar EMPTY_ARRAY$2 = [];\nvar EMPTY_MAP = {};\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction anchorDef(flags, matchedQueriesDsl, ngContentIndex, childCount, handleEvent, templateFactory) {\n flags |= 1 /* TypeElement */;\n var _a = splitMatchedQueriesDsl(matchedQueriesDsl), matchedQueries = _a.matchedQueries, references = _a.references, matchedQueryIds = _a.matchedQueryIds;\n var template = templateFactory ? resolveDefinition(templateFactory) : null;\n return {\n // will bet set by the view definition\n nodeIndex: -1,\n parent: null,\n renderParent: null,\n bindingIndex: -1,\n outputIndex: -1,\n // regular values\n flags: flags,\n checkIndex: -1,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0, matchedQueries: matchedQueries, matchedQueryIds: matchedQueryIds, references: references, ngContentIndex: ngContentIndex, childCount: childCount,\n bindings: [],\n bindingFlags: 0,\n outputs: [],\n element: {\n ns: null,\n name: null,\n attrs: null, template: template,\n componentProvider: null,\n componentView: null,\n componentRendererType: null,\n publicProviders: null,\n allProviders: null,\n handleEvent: handleEvent || NOOP\n },\n provider: null,\n text: null,\n query: null,\n ngContent: null\n };\n}\nfunction elementDef(checkIndex, flags, matchedQueriesDsl, ngContentIndex, childCount, namespaceAndName, fixedAttrs, bindings, outputs, handleEvent, componentView, componentRendererType) {\n if (fixedAttrs === void 0) { fixedAttrs = []; }\n if (!handleEvent) {\n handleEvent = NOOP;\n }\n var _a = splitMatchedQueriesDsl(matchedQueriesDsl), matchedQueries = _a.matchedQueries, references = _a.references, matchedQueryIds = _a.matchedQueryIds;\n var ns = null;\n var name = null;\n if (namespaceAndName) {\n _b = __read(splitNamespace(namespaceAndName), 2), ns = _b[0], name = _b[1];\n }\n bindings = bindings || [];\n var bindingDefs = new Array(bindings.length);\n for (var i = 0; i < bindings.length; i++) {\n var _c = __read(bindings[i], 3), bindingFlags = _c[0], namespaceAndName_1 = _c[1], suffixOrSecurityContext = _c[2];\n var _d = __read(splitNamespace(namespaceAndName_1), 2), ns_1 = _d[0], name_1 = _d[1];\n var securityContext = undefined;\n var suffix = undefined;\n switch (bindingFlags & 15 /* Types */) {\n case 4 /* TypeElementStyle */:\n suffix = suffixOrSecurityContext;\n break;\n case 1 /* TypeElementAttribute */:\n case 8 /* TypeProperty */:\n securityContext = suffixOrSecurityContext;\n break;\n }\n bindingDefs[i] =\n { flags: bindingFlags, ns: ns_1, name: name_1, nonMinifiedName: name_1, securityContext: securityContext, suffix: suffix };\n }\n outputs = outputs || [];\n var outputDefs = new Array(outputs.length);\n for (var i = 0; i < outputs.length; i++) {\n var _e = __read(outputs[i], 2), target = _e[0], eventName = _e[1];\n outputDefs[i] = {\n type: 0 /* ElementOutput */,\n target: target, eventName: eventName,\n propName: null\n };\n }\n fixedAttrs = fixedAttrs || [];\n var attrs = fixedAttrs.map(function (_a) {\n var _b = __read(_a, 2), namespaceAndName = _b[0], value = _b[1];\n var _c = __read(splitNamespace(namespaceAndName), 2), ns = _c[0], name = _c[1];\n return [ns, name, value];\n });\n componentRendererType = resolveRendererType2(componentRendererType);\n if (componentView) {\n flags |= 33554432 /* ComponentView */;\n }\n flags |= 1 /* TypeElement */;\n return {\n // will bet set by the view definition\n nodeIndex: -1,\n parent: null,\n renderParent: null,\n bindingIndex: -1,\n outputIndex: -1,\n // regular values\n checkIndex: checkIndex,\n flags: flags,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0, matchedQueries: matchedQueries, matchedQueryIds: matchedQueryIds, references: references, ngContentIndex: ngContentIndex, childCount: childCount,\n bindings: bindingDefs,\n bindingFlags: calcBindingFlags(bindingDefs),\n outputs: outputDefs,\n element: {\n ns: ns,\n name: name,\n attrs: attrs,\n template: null,\n // will bet set by the view definition\n componentProvider: null,\n componentView: componentView || null,\n componentRendererType: componentRendererType,\n publicProviders: null,\n allProviders: null,\n handleEvent: handleEvent || NOOP,\n },\n provider: null,\n text: null,\n query: null,\n ngContent: null\n };\n var _b;\n}\nfunction createElement(view, renderHost, def) {\n var elDef = def.element;\n var rootSelectorOrNode = view.root.selectorOrNode;\n var renderer = view.renderer;\n var el;\n if (view.parent || !rootSelectorOrNode) {\n if (elDef.name) {\n el = renderer.createElement(elDef.name, elDef.ns);\n }\n else {\n el = renderer.createComment('');\n }\n var parentEl = getParentRenderElement(view, renderHost, def);\n if (parentEl) {\n renderer.appendChild(parentEl, el);\n }\n }\n else {\n el = renderer.selectRootElement(rootSelectorOrNode);\n }\n if (elDef.attrs) {\n for (var i = 0; i < elDef.attrs.length; i++) {\n var _a = __read(elDef.attrs[i], 3), ns = _a[0], name_2 = _a[1], value = _a[2];\n renderer.setAttribute(el, name_2, value, ns);\n }\n }\n return el;\n}\nfunction listenToElementOutputs(view, compView, def, el) {\n for (var i = 0; i < def.outputs.length; i++) {\n var output = def.outputs[i];\n var handleEventClosure = renderEventHandlerClosure(view, def.nodeIndex, elementEventFullName(output.target, output.eventName));\n var listenTarget = output.target;\n var listenerView = view;\n if (output.target === 'component') {\n listenTarget = null;\n listenerView = compView;\n }\n var disposable = listenerView.renderer.listen(listenTarget || el, output.eventName, handleEventClosure);\n view.disposables[def.outputIndex + i] = disposable;\n }\n}\nfunction renderEventHandlerClosure(view, index, eventName) {\n return function (event) { return dispatchEvent(view, index, eventName, event); };\n}\nfunction checkAndUpdateElementInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n var bindLen = def.bindings.length;\n var changed = false;\n if (bindLen > 0 && checkAndUpdateElementValue(view, def, 0, v0))\n changed = true;\n if (bindLen > 1 && checkAndUpdateElementValue(view, def, 1, v1))\n changed = true;\n if (bindLen > 2 && checkAndUpdateElementValue(view, def, 2, v2))\n changed = true;\n if (bindLen > 3 && checkAndUpdateElementValue(view, def, 3, v3))\n changed = true;\n if (bindLen > 4 && checkAndUpdateElementValue(view, def, 4, v4))\n changed = true;\n if (bindLen > 5 && checkAndUpdateElementValue(view, def, 5, v5))\n changed = true;\n if (bindLen > 6 && checkAndUpdateElementValue(view, def, 6, v6))\n changed = true;\n if (bindLen > 7 && checkAndUpdateElementValue(view, def, 7, v7))\n changed = true;\n if (bindLen > 8 && checkAndUpdateElementValue(view, def, 8, v8))\n changed = true;\n if (bindLen > 9 && checkAndUpdateElementValue(view, def, 9, v9))\n changed = true;\n return changed;\n}\nfunction checkAndUpdateElementDynamic(view, def, values) {\n var changed = false;\n for (var i = 0; i < values.length; i++) {\n if (checkAndUpdateElementValue(view, def, i, values[i]))\n changed = true;\n }\n return changed;\n}\nfunction checkAndUpdateElementValue(view, def, bindingIdx, value) {\n if (!checkAndUpdateBinding(view, def, bindingIdx, value)) {\n return false;\n }\n var binding = def.bindings[bindingIdx];\n var elData = asElementData(view, def.nodeIndex);\n var renderNode$$1 = elData.renderElement;\n var name = binding.name;\n switch (binding.flags & 15 /* Types */) {\n case 1 /* TypeElementAttribute */:\n setElementAttribute(view, binding, renderNode$$1, binding.ns, name, value);\n break;\n case 2 /* TypeElementClass */:\n setElementClass(view, renderNode$$1, name, value);\n break;\n case 4 /* TypeElementStyle */:\n setElementStyle(view, binding, renderNode$$1, name, value);\n break;\n case 8 /* TypeProperty */:\n var bindView = (def.flags & 33554432 /* ComponentView */ &&\n binding.flags & 32 /* SyntheticHostProperty */) ?\n elData.componentView :\n view;\n setElementProperty(bindView, binding, renderNode$$1, name, value);\n break;\n }\n return true;\n}\nfunction setElementAttribute(view, binding, renderNode$$1, ns, name, value) {\n var securityContext = binding.securityContext;\n var renderValue = securityContext ? view.root.sanitizer.sanitize(securityContext, value) : value;\n renderValue = renderValue != null ? renderValue.toString() : null;\n var renderer = view.renderer;\n if (value != null) {\n renderer.setAttribute(renderNode$$1, name, renderValue, ns);\n }\n else {\n renderer.removeAttribute(renderNode$$1, name, ns);\n }\n}\nfunction setElementClass(view, renderNode$$1, name, value) {\n var renderer = view.renderer;\n if (value) {\n renderer.addClass(renderNode$$1, name);\n }\n else {\n renderer.removeClass(renderNode$$1, name);\n }\n}\nfunction setElementStyle(view, binding, renderNode$$1, name, value) {\n var renderValue = view.root.sanitizer.sanitize(exports.SecurityContext.STYLE, value);\n if (renderValue != null) {\n renderValue = renderValue.toString();\n var unit = binding.suffix;\n if (unit != null) {\n renderValue = renderValue + unit;\n }\n }\n else {\n renderValue = null;\n }\n var renderer = view.renderer;\n if (renderValue != null) {\n renderer.setStyle(renderNode$$1, name, renderValue);\n }\n else {\n renderer.removeStyle(renderNode$$1, name);\n }\n}\nfunction setElementProperty(view, binding, renderNode$$1, name, value) {\n var securityContext = binding.securityContext;\n var renderValue = securityContext ? view.root.sanitizer.sanitize(securityContext, value) : value;\n view.renderer.setProperty(renderNode$$1, name, renderValue);\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar UNDEFINED_VALUE = new Object();\nvar InjectorRefTokenKey$1 = tokenKey(Injector);\nvar INJECTORRefTokenKey$1 = tokenKey(INJECTOR);\nvar NgModuleRefTokenKey = tokenKey(NgModuleRef);\nfunction moduleProvideDef(flags, token, value, deps) {\n // Need to resolve forwardRefs as e.g. for `useValue` we\n // lowered the expression and then stopped evaluating it,\n // i.e. also didn't unwrap it.\n value = resolveForwardRef(value);\n var depDefs = splitDepsDsl(deps, stringify(token));\n return {\n // will bet set by the module definition\n index: -1,\n deps: depDefs, flags: flags, token: token, value: value\n };\n}\nfunction moduleDef(providers) {\n var providersByKey = {};\n var modules = [];\n var isRoot = false;\n for (var i = 0; i < providers.length; i++) {\n var provider = providers[i];\n if (provider.token === APP_ROOT) {\n isRoot = true;\n }\n if (provider.flags & 1073741824 /* TypeNgModule */) {\n modules.push(provider.token);\n }\n provider.index = i;\n providersByKey[tokenKey(provider.token)] = provider;\n }\n return {\n // Will be filled later...\n factory: null,\n providersByKey: providersByKey,\n providers: providers,\n modules: modules,\n isRoot: isRoot,\n };\n}\nfunction initNgModule(data) {\n var def = data._def;\n var providers = data._providers = new Array(def.providers.length);\n for (var i = 0; i < def.providers.length; i++) {\n var provDef = def.providers[i];\n if (!(provDef.flags & 4096 /* LazyProvider */)) {\n // Make sure the provider has not been already initialized outside this loop.\n if (providers[i] === undefined) {\n providers[i] = _createProviderInstance$1(data, provDef);\n }\n }\n }\n}\nfunction resolveNgModuleDep(data, depDef, notFoundValue) {\n if (notFoundValue === void 0) { notFoundValue = Injector.THROW_IF_NOT_FOUND; }\n var former = setCurrentInjector(data);\n try {\n if (depDef.flags & 8 /* Value */) {\n return depDef.token;\n }\n if (depDef.flags & 2 /* Optional */) {\n notFoundValue = null;\n }\n if (depDef.flags & 1 /* SkipSelf */) {\n return data._parent.get(depDef.token, notFoundValue);\n }\n var tokenKey_1 = depDef.tokenKey;\n switch (tokenKey_1) {\n case InjectorRefTokenKey$1:\n case INJECTORRefTokenKey$1:\n case NgModuleRefTokenKey:\n return data;\n }\n var providerDef = data._def.providersByKey[tokenKey_1];\n if (providerDef) {\n var providerInstance = data._providers[providerDef.index];\n if (providerInstance === undefined) {\n providerInstance = data._providers[providerDef.index] =\n _createProviderInstance$1(data, providerDef);\n }\n return providerInstance === UNDEFINED_VALUE ? undefined : providerInstance;\n }\n else if (depDef.token.ngInjectableDef && targetsModule(data, depDef.token.ngInjectableDef)) {\n var injectableDef = depDef.token.ngInjectableDef;\n var index = data._providers.length;\n data._def.providersByKey[depDef.tokenKey] = {\n flags: 1024 /* TypeFactoryProvider */ | 4096 /* LazyProvider */,\n value: injectableDef.factory,\n deps: [], index: index,\n token: depDef.token,\n };\n data._providers[index] = UNDEFINED_VALUE;\n return (data._providers[index] =\n _createProviderInstance$1(data, data._def.providersByKey[depDef.tokenKey]));\n }\n else if (depDef.flags & 4 /* Self */) {\n return notFoundValue;\n }\n return data._parent.get(depDef.token, notFoundValue);\n }\n finally {\n setCurrentInjector(former);\n }\n}\nfunction moduleTransitivelyPresent(ngModule, scope) {\n return ngModule._def.modules.indexOf(scope) > -1;\n}\nfunction targetsModule(ngModule, def) {\n return def.providedIn != null && (moduleTransitivelyPresent(ngModule, def.providedIn) ||\n def.providedIn === 'root' && ngModule._def.isRoot);\n}\nfunction _createProviderInstance$1(ngModule, providerDef) {\n var injectable;\n switch (providerDef.flags & 201347067 /* Types */) {\n case 512 /* TypeClassProvider */:\n injectable = _createClass(ngModule, providerDef.value, providerDef.deps);\n break;\n case 1024 /* TypeFactoryProvider */:\n injectable = _callFactory(ngModule, providerDef.value, providerDef.deps);\n break;\n case 2048 /* TypeUseExistingProvider */:\n injectable = resolveNgModuleDep(ngModule, providerDef.deps[0]);\n break;\n case 256 /* TypeValueProvider */:\n injectable = providerDef.value;\n break;\n }\n // The read of `ngOnDestroy` here is slightly expensive as it's megamorphic, so it should be\n // avoided if possible. The sequence of checks here determines whether ngOnDestroy needs to be\n // checked. It might not if the `injectable` isn't an object or if NodeFlags.OnDestroy is already\n // set (ngOnDestroy was detected statically).\n if (injectable !== UNDEFINED_VALUE && injectable != null && typeof injectable === 'object' &&\n !(providerDef.flags & 131072 /* OnDestroy */) && typeof injectable.ngOnDestroy === 'function') {\n providerDef.flags |= 131072 /* OnDestroy */;\n }\n return injectable === undefined ? UNDEFINED_VALUE : injectable;\n}\nfunction _createClass(ngModule, ctor, deps) {\n var len = deps.length;\n switch (len) {\n case 0:\n return new ctor();\n case 1:\n return new ctor(resolveNgModuleDep(ngModule, deps[0]));\n case 2:\n return new ctor(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]));\n case 3:\n return new ctor(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]), resolveNgModuleDep(ngModule, deps[2]));\n default:\n var depValues = new Array(len);\n for (var i = 0; i < len; i++) {\n depValues[i] = resolveNgModuleDep(ngModule, deps[i]);\n }\n return new (ctor.bind.apply(ctor, __spread([void 0], depValues)))();\n }\n}\nfunction _callFactory(ngModule, factory, deps) {\n var len = deps.length;\n switch (len) {\n case 0:\n return factory();\n case 1:\n return factory(resolveNgModuleDep(ngModule, deps[0]));\n case 2:\n return factory(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]));\n case 3:\n return factory(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]), resolveNgModuleDep(ngModule, deps[2]));\n default:\n var depValues = Array(len);\n for (var i = 0; i < len; i++) {\n depValues[i] = resolveNgModuleDep(ngModule, deps[i]);\n }\n return factory.apply(void 0, __spread(depValues));\n }\n}\nfunction callNgModuleLifecycle(ngModule, lifecycles) {\n var def = ngModule._def;\n var destroyed = new Set();\n for (var i = 0; i < def.providers.length; i++) {\n var provDef = def.providers[i];\n if (provDef.flags & 131072 /* OnDestroy */) {\n var instance = ngModule._providers[i];\n if (instance && instance !== UNDEFINED_VALUE) {\n var onDestroy = instance.ngOnDestroy;\n if (typeof onDestroy === 'function' && !destroyed.has(instance)) {\n onDestroy.apply(instance);\n destroyed.add(instance);\n }\n }\n }\n }\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction attachEmbeddedView(parentView, elementData, viewIndex, view) {\n var embeddedViews = elementData.viewContainer._embeddedViews;\n if (viewIndex === null || viewIndex === undefined) {\n viewIndex = embeddedViews.length;\n }\n view.viewContainerParent = parentView;\n addToArray(embeddedViews, viewIndex, view);\n attachProjectedView(elementData, view);\n Services.dirtyParentQueries(view);\n var prevView = viewIndex > 0 ? embeddedViews[viewIndex - 1] : null;\n renderAttachEmbeddedView(elementData, prevView, view);\n}\nfunction attachProjectedView(vcElementData, view) {\n var dvcElementData = declaredViewContainer(view);\n if (!dvcElementData || dvcElementData === vcElementData ||\n view.state & 16 /* IsProjectedView */) {\n return;\n }\n // Note: For performance reasons, we\n // - add a view to template._projectedViews only 1x throughout its lifetime,\n // and remove it not until the view is destroyed.\n // (hard, as when a parent view is attached/detached we would need to attach/detach all\n // nested projected views as well, even across component boundaries).\n // - don't track the insertion order of views in the projected views array\n // (hard, as when the views of the same template are inserted different view containers)\n view.state |= 16 /* IsProjectedView */;\n var projectedViews = dvcElementData.template._projectedViews;\n if (!projectedViews) {\n projectedViews = dvcElementData.template._projectedViews = [];\n }\n projectedViews.push(view);\n // Note: we are changing the NodeDef here as we cannot calculate\n // the fact whether a template is used for projection during compilation.\n markNodeAsProjectedTemplate(view.parent.def, view.parentNodeDef);\n}\nfunction markNodeAsProjectedTemplate(viewDef, nodeDef) {\n if (nodeDef.flags & 4 /* ProjectedTemplate */) {\n return;\n }\n viewDef.nodeFlags |= 4 /* ProjectedTemplate */;\n nodeDef.flags |= 4 /* ProjectedTemplate */;\n var parentNodeDef = nodeDef.parent;\n while (parentNodeDef) {\n parentNodeDef.childFlags |= 4 /* ProjectedTemplate */;\n parentNodeDef = parentNodeDef.parent;\n }\n}\nfunction detachEmbeddedView(elementData, viewIndex) {\n var embeddedViews = elementData.viewContainer._embeddedViews;\n if (viewIndex == null || viewIndex >= embeddedViews.length) {\n viewIndex = embeddedViews.length - 1;\n }\n if (viewIndex < 0) {\n return null;\n }\n var view = embeddedViews[viewIndex];\n view.viewContainerParent = null;\n removeFromArray(embeddedViews, viewIndex);\n // See attachProjectedView for why we don't update projectedViews here.\n Services.dirtyParentQueries(view);\n renderDetachView(view);\n return view;\n}\nfunction detachProjectedView(view) {\n if (!(view.state & 16 /* IsProjectedView */)) {\n return;\n }\n var dvcElementData = declaredViewContainer(view);\n if (dvcElementData) {\n var projectedViews = dvcElementData.template._projectedViews;\n if (projectedViews) {\n removeFromArray(projectedViews, projectedViews.indexOf(view));\n Services.dirtyParentQueries(view);\n }\n }\n}\nfunction moveEmbeddedView(elementData, oldViewIndex, newViewIndex) {\n var embeddedViews = elementData.viewContainer._embeddedViews;\n var view = embeddedViews[oldViewIndex];\n removeFromArray(embeddedViews, oldViewIndex);\n if (newViewIndex == null) {\n newViewIndex = embeddedViews.length;\n }\n addToArray(embeddedViews, newViewIndex, view);\n // Note: Don't need to change projectedViews as the order in there\n // as always invalid...\n Services.dirtyParentQueries(view);\n renderDetachView(view);\n var prevView = newViewIndex > 0 ? embeddedViews[newViewIndex - 1] : null;\n renderAttachEmbeddedView(elementData, prevView, view);\n return view;\n}\nfunction renderAttachEmbeddedView(elementData, prevView, view) {\n var prevRenderNode = prevView ? renderNode(prevView, prevView.def.lastRenderRootNode) :\n elementData.renderElement;\n var parentNode = view.renderer.parentNode(prevRenderNode);\n var nextSibling = view.renderer.nextSibling(prevRenderNode);\n // Note: We can't check if `nextSibling` is present, as on WebWorkers it will always be!\n // However, browsers automatically do `appendChild` when there is no `nextSibling`.\n visitRootRenderNodes(view, 2 /* InsertBefore */, parentNode, nextSibling, undefined);\n}\nfunction renderDetachView(view) {\n visitRootRenderNodes(view, 3 /* RemoveChild */, null, null, undefined);\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 arr.pop();\n }\n else {\n arr.splice(index, 1);\n }\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar EMPTY_CONTEXT = new Object();\n// Attention: this function is called as top level function.\n// Putting any logic in here will destroy closure tree shaking!\nfunction createComponentFactory(selector, componentType, viewDefFactory, inputs, outputs, ngContentSelectors) {\n return new ComponentFactory_(selector, componentType, viewDefFactory, inputs, outputs, ngContentSelectors);\n}\nfunction getComponentViewDefinitionFactory(componentFactory) {\n return componentFactory.viewDefFactory;\n}\nvar ComponentFactory_ = /** @class */ (function (_super) {\n __extends(ComponentFactory_, _super);\n function ComponentFactory_(selector, componentType, viewDefFactory, _inputs, _outputs, ngContentSelectors) {\n var _this = \n // Attention: this ctor is called as top level function.\n // Putting any logic in here will destroy closure tree shaking!\n _super.call(this) || this;\n _this.selector = selector;\n _this.componentType = componentType;\n _this._inputs = _inputs;\n _this._outputs = _outputs;\n _this.ngContentSelectors = ngContentSelectors;\n _this.viewDefFactory = viewDefFactory;\n return _this;\n }\n Object.defineProperty(ComponentFactory_.prototype, \"inputs\", {\n get: function () {\n var inputsArr = [];\n var inputs = this._inputs;\n for (var propName in inputs) {\n var templateName = inputs[propName];\n inputsArr.push({ propName: propName, templateName: templateName });\n }\n return inputsArr;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ComponentFactory_.prototype, \"outputs\", {\n get: function () {\n var outputsArr = [];\n for (var propName in this._outputs) {\n var templateName = this._outputs[propName];\n outputsArr.push({ propName: propName, templateName: templateName });\n }\n return outputsArr;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Creates a new component.\n */\n ComponentFactory_.prototype.create = function (injector, projectableNodes, rootSelectorOrNode, ngModule) {\n if (!ngModule) {\n throw new Error('ngModule should be provided');\n }\n var viewDef = resolveDefinition(this.viewDefFactory);\n var componentNodeIndex = viewDef.nodes[0].element.componentProvider.nodeIndex;\n var view = Services.createRootView(injector, projectableNodes || [], rootSelectorOrNode, viewDef, ngModule, EMPTY_CONTEXT);\n var component = asProviderData(view, componentNodeIndex).instance;\n if (rootSelectorOrNode) {\n view.renderer.setAttribute(asElementData(view, 0).renderElement, 'ng-version', VERSION.full);\n }\n return new ComponentRef_(view, new ViewRef_(view), component);\n };\n return ComponentFactory_;\n}(ComponentFactory));\nvar ComponentRef_ = /** @class */ (function (_super) {\n __extends(ComponentRef_, _super);\n function ComponentRef_(_view, _viewRef, _component) {\n var _this = _super.call(this) || this;\n _this._view = _view;\n _this._viewRef = _viewRef;\n _this._component = _component;\n _this._elDef = _this._view.def.nodes[0];\n _this.hostView = _viewRef;\n _this.changeDetectorRef = _viewRef;\n _this.instance = _component;\n return _this;\n }\n Object.defineProperty(ComponentRef_.prototype, \"location\", {\n get: function () {\n return new ElementRef(asElementData(this._view, this._elDef.nodeIndex).renderElement);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ComponentRef_.prototype, \"injector\", {\n get: function () { return new Injector_(this._view, this._elDef); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ComponentRef_.prototype, \"componentType\", {\n get: function () { return this._component.constructor; },\n enumerable: true,\n configurable: true\n });\n ComponentRef_.prototype.destroy = function () { this._viewRef.destroy(); };\n ComponentRef_.prototype.onDestroy = function (callback) { this._viewRef.onDestroy(callback); };\n return ComponentRef_;\n}(ComponentRef));\nfunction createViewContainerData(view, elDef, elData) {\n return new ViewContainerRef_(view, elDef, elData);\n}\nvar ViewContainerRef_ = /** @class */ (function () {\n function ViewContainerRef_(_view, _elDef, _data) {\n this._view = _view;\n this._elDef = _elDef;\n this._data = _data;\n /**\n * @internal\n */\n this._embeddedViews = [];\n }\n Object.defineProperty(ViewContainerRef_.prototype, \"element\", {\n get: function () { return new ElementRef(this._data.renderElement); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ViewContainerRef_.prototype, \"injector\", {\n get: function () { return new Injector_(this._view, this._elDef); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ViewContainerRef_.prototype, \"parentInjector\", {\n get: function () {\n var view = this._view;\n var elDef = this._elDef.parent;\n while (!elDef && view) {\n elDef = viewParentEl(view);\n view = view.parent;\n }\n return view ? new Injector_(view, elDef) : new Injector_(this._view, null);\n },\n enumerable: true,\n configurable: true\n });\n ViewContainerRef_.prototype.clear = function () {\n var len = this._embeddedViews.length;\n for (var i = len - 1; i >= 0; i--) {\n var view = detachEmbeddedView(this._data, i);\n Services.destroyView(view);\n }\n };\n ViewContainerRef_.prototype.get = function (index) {\n var view = this._embeddedViews[index];\n if (view) {\n var ref = new ViewRef_(view);\n ref.attachToViewContainerRef(this);\n return ref;\n }\n return null;\n };\n Object.defineProperty(ViewContainerRef_.prototype, \"length\", {\n get: function () { return this._embeddedViews.length; },\n enumerable: true,\n configurable: true\n });\n ViewContainerRef_.prototype.createEmbeddedView = function (templateRef, context, index) {\n var viewRef = templateRef.createEmbeddedView(context || {});\n this.insert(viewRef, index);\n return viewRef;\n };\n ViewContainerRef_.prototype.createComponent = function (componentFactory, index, injector, projectableNodes, ngModuleRef) {\n var contextInjector = injector || this.parentInjector;\n if (!ngModuleRef && !(componentFactory instanceof ComponentFactoryBoundToModule)) {\n ngModuleRef = contextInjector.get(NgModuleRef);\n }\n var componentRef = componentFactory.create(contextInjector, projectableNodes, undefined, ngModuleRef);\n this.insert(componentRef.hostView, index);\n return componentRef;\n };\n ViewContainerRef_.prototype.insert = function (viewRef, index) {\n if (viewRef.destroyed) {\n throw new Error('Cannot insert a destroyed View in a ViewContainer!');\n }\n var viewRef_ = viewRef;\n var viewData = viewRef_._view;\n attachEmbeddedView(this._view, this._data, index, viewData);\n viewRef_.attachToViewContainerRef(this);\n return viewRef;\n };\n ViewContainerRef_.prototype.move = function (viewRef, currentIndex) {\n if (viewRef.destroyed) {\n throw new Error('Cannot move a destroyed View in a ViewContainer!');\n }\n var previousIndex = this._embeddedViews.indexOf(viewRef._view);\n moveEmbeddedView(this._data, previousIndex, currentIndex);\n return viewRef;\n };\n ViewContainerRef_.prototype.indexOf = function (viewRef) {\n return this._embeddedViews.indexOf(viewRef._view);\n };\n ViewContainerRef_.prototype.remove = function (index) {\n var viewData = detachEmbeddedView(this._data, index);\n if (viewData) {\n Services.destroyView(viewData);\n }\n };\n ViewContainerRef_.prototype.detach = function (index) {\n var view = detachEmbeddedView(this._data, index);\n return view ? new ViewRef_(view) : null;\n };\n return ViewContainerRef_;\n}());\nfunction createChangeDetectorRef(view) {\n return new ViewRef_(view);\n}\nvar ViewRef_ = /** @class */ (function () {\n function ViewRef_(_view) {\n this._view = _view;\n this._viewContainerRef = null;\n this._appRef = null;\n }\n Object.defineProperty(ViewRef_.prototype, \"rootNodes\", {\n get: function () { return rootRenderNodes(this._view); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ViewRef_.prototype, \"context\", {\n get: function () { return this._view.context; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ViewRef_.prototype, \"destroyed\", {\n get: function () { return (this._view.state & 128 /* Destroyed */) !== 0; },\n enumerable: true,\n configurable: true\n });\n ViewRef_.prototype.markForCheck = function () { markParentViewsForCheck(this._view); };\n ViewRef_.prototype.detach = function () { this._view.state &= ~4 /* Attached */; };\n ViewRef_.prototype.detectChanges = function () {\n var fs = this._view.root.rendererFactory;\n if (fs.begin) {\n fs.begin();\n }\n try {\n Services.checkAndUpdateView(this._view);\n }\n finally {\n if (fs.end) {\n fs.end();\n }\n }\n };\n ViewRef_.prototype.checkNoChanges = function () { Services.checkNoChangesView(this._view); };\n ViewRef_.prototype.reattach = function () { this._view.state |= 4 /* Attached */; };\n ViewRef_.prototype.onDestroy = function (callback) {\n if (!this._view.disposables) {\n this._view.disposables = [];\n }\n this._view.disposables.push(callback);\n };\n ViewRef_.prototype.destroy = function () {\n if (this._appRef) {\n this._appRef.detachView(this);\n }\n else if (this._viewContainerRef) {\n this._viewContainerRef.detach(this._viewContainerRef.indexOf(this));\n }\n Services.destroyView(this._view);\n };\n ViewRef_.prototype.detachFromAppRef = function () {\n this._appRef = null;\n renderDetachView(this._view);\n Services.dirtyParentQueries(this._view);\n };\n ViewRef_.prototype.attachToAppRef = function (appRef) {\n if (this._viewContainerRef) {\n throw new Error('This view is already attached to a ViewContainer!');\n }\n this._appRef = appRef;\n };\n ViewRef_.prototype.attachToViewContainerRef = function (vcRef) {\n if (this._appRef) {\n throw new Error('This view is already attached directly to the ApplicationRef!');\n }\n this._viewContainerRef = vcRef;\n };\n return ViewRef_;\n}());\nfunction createTemplateData(view, def) {\n return new TemplateRef_(view, def);\n}\nvar TemplateRef_ = /** @class */ (function (_super) {\n __extends(TemplateRef_, _super);\n function TemplateRef_(_parentView, _def) {\n var _this = _super.call(this) || this;\n _this._parentView = _parentView;\n _this._def = _def;\n return _this;\n }\n TemplateRef_.prototype.createEmbeddedView = function (context) {\n return new ViewRef_(Services.createEmbeddedView(this._parentView, this._def, this._def.element.template, context));\n };\n Object.defineProperty(TemplateRef_.prototype, \"elementRef\", {\n get: function () {\n return new ElementRef(asElementData(this._parentView, this._def.nodeIndex).renderElement);\n },\n enumerable: true,\n configurable: true\n });\n return TemplateRef_;\n}(TemplateRef));\nfunction createInjector$1(view, elDef) {\n return new Injector_(view, elDef);\n}\nvar Injector_ = /** @class */ (function () {\n function Injector_(view, elDef) {\n this.view = view;\n this.elDef = elDef;\n }\n Injector_.prototype.get = function (token, notFoundValue) {\n if (notFoundValue === void 0) { notFoundValue = Injector.THROW_IF_NOT_FOUND; }\n var allowPrivateServices = this.elDef ? (this.elDef.flags & 33554432 /* ComponentView */) !== 0 : false;\n return Services.resolveDep(this.view, this.elDef, allowPrivateServices, { flags: 0 /* None */, token: token, tokenKey: tokenKey(token) }, notFoundValue);\n };\n return Injector_;\n}());\nfunction nodeValue(view, index) {\n var def = view.def.nodes[index];\n if (def.flags & 1 /* TypeElement */) {\n var elData = asElementData(view, def.nodeIndex);\n return def.element.template ? elData.template : elData.renderElement;\n }\n else if (def.flags & 2 /* TypeText */) {\n return asTextData(view, def.nodeIndex).renderText;\n }\n else if (def.flags & (20224 /* CatProvider */ | 16 /* TypePipe */)) {\n return asProviderData(view, def.nodeIndex).instance;\n }\n throw new Error(\"Illegal state: read nodeValue for node index \" + index);\n}\nfunction createRendererV1(view) {\n return new RendererAdapter(view.renderer);\n}\nvar RendererAdapter = /** @class */ (function () {\n function RendererAdapter(delegate) {\n this.delegate = delegate;\n }\n RendererAdapter.prototype.selectRootElement = function (selectorOrNode) {\n return this.delegate.selectRootElement(selectorOrNode);\n };\n RendererAdapter.prototype.createElement = function (parent, namespaceAndName) {\n var _a = __read(splitNamespace(namespaceAndName), 2), ns = _a[0], name = _a[1];\n var el = this.delegate.createElement(name, ns);\n if (parent) {\n this.delegate.appendChild(parent, el);\n }\n return el;\n };\n RendererAdapter.prototype.createViewRoot = function (hostElement) { return hostElement; };\n RendererAdapter.prototype.createTemplateAnchor = function (parentElement) {\n var comment = this.delegate.createComment('');\n if (parentElement) {\n this.delegate.appendChild(parentElement, comment);\n }\n return comment;\n };\n RendererAdapter.prototype.createText = function (parentElement, value) {\n var node = this.delegate.createText(value);\n if (parentElement) {\n this.delegate.appendChild(parentElement, node);\n }\n return node;\n };\n RendererAdapter.prototype.projectNodes = function (parentElement, nodes) {\n for (var i = 0; i < nodes.length; i++) {\n this.delegate.appendChild(parentElement, nodes[i]);\n }\n };\n RendererAdapter.prototype.attachViewAfter = function (node, viewRootNodes) {\n var parentElement = this.delegate.parentNode(node);\n var nextSibling = this.delegate.nextSibling(node);\n for (var i = 0; i < viewRootNodes.length; i++) {\n this.delegate.insertBefore(parentElement, viewRootNodes[i], nextSibling);\n }\n };\n RendererAdapter.prototype.detachView = function (viewRootNodes) {\n for (var i = 0; i < viewRootNodes.length; i++) {\n var node = viewRootNodes[i];\n var parentElement = this.delegate.parentNode(node);\n this.delegate.removeChild(parentElement, node);\n }\n };\n RendererAdapter.prototype.destroyView = function (hostElement, viewAllNodes) {\n for (var i = 0; i < viewAllNodes.length; i++) {\n this.delegate.destroyNode(viewAllNodes[i]);\n }\n };\n RendererAdapter.prototype.listen = function (renderElement, name, callback) {\n return this.delegate.listen(renderElement, name, callback);\n };\n RendererAdapter.prototype.listenGlobal = function (target, name, callback) {\n return this.delegate.listen(target, name, callback);\n };\n RendererAdapter.prototype.setElementProperty = function (renderElement, propertyName, propertyValue) {\n this.delegate.setProperty(renderElement, propertyName, propertyValue);\n };\n RendererAdapter.prototype.setElementAttribute = function (renderElement, namespaceAndName, attributeValue) {\n var _a = __read(splitNamespace(namespaceAndName), 2), ns = _a[0], name = _a[1];\n if (attributeValue != null) {\n this.delegate.setAttribute(renderElement, name, attributeValue, ns);\n }\n else {\n this.delegate.removeAttribute(renderElement, name, ns);\n }\n };\n RendererAdapter.prototype.setBindingDebugInfo = function (renderElement, propertyName, propertyValue) { };\n RendererAdapter.prototype.setElementClass = function (renderElement, className, isAdd) {\n if (isAdd) {\n this.delegate.addClass(renderElement, className);\n }\n else {\n this.delegate.removeClass(renderElement, className);\n }\n };\n RendererAdapter.prototype.setElementStyle = function (renderElement, styleName, styleValue) {\n if (styleValue != null) {\n this.delegate.setStyle(renderElement, styleName, styleValue);\n }\n else {\n this.delegate.removeStyle(renderElement, styleName);\n }\n };\n RendererAdapter.prototype.invokeElementMethod = function (renderElement, methodName, args) {\n renderElement[methodName].apply(renderElement, args);\n };\n RendererAdapter.prototype.setText = function (renderNode$$1, text) { this.delegate.setValue(renderNode$$1, text); };\n RendererAdapter.prototype.animate = function () { throw new Error('Renderer.animate is no longer supported!'); };\n return RendererAdapter;\n}());\nfunction createNgModuleRef(moduleType, parent, bootstrapComponents, def) {\n return new NgModuleRef_(moduleType, parent, bootstrapComponents, def);\n}\nvar NgModuleRef_ = /** @class */ (function () {\n function NgModuleRef_(_moduleType, _parent, _bootstrapComponents, _def) {\n this._moduleType = _moduleType;\n this._parent = _parent;\n this._bootstrapComponents = _bootstrapComponents;\n this._def = _def;\n this._destroyListeners = [];\n this._destroyed = false;\n this.injector = this;\n initNgModule(this);\n }\n NgModuleRef_.prototype.get = function (token, notFoundValue, injectFlags) {\n if (notFoundValue === void 0) { notFoundValue = Injector.THROW_IF_NOT_FOUND; }\n if (injectFlags === void 0) { injectFlags = 0 /* Default */; }\n var flags = 0;\n if (injectFlags & 4 /* SkipSelf */) {\n flags |= 1 /* SkipSelf */;\n }\n else if (injectFlags & 2 /* Self */) {\n flags |= 4 /* Self */;\n }\n return resolveNgModuleDep(this, { token: token, tokenKey: tokenKey(token), flags: flags }, notFoundValue);\n };\n Object.defineProperty(NgModuleRef_.prototype, \"instance\", {\n get: function () { return this.get(this._moduleType); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NgModuleRef_.prototype, \"componentFactoryResolver\", {\n get: function () { return this.get(ComponentFactoryResolver); },\n enumerable: true,\n configurable: true\n });\n NgModuleRef_.prototype.destroy = function () {\n if (this._destroyed) {\n throw new Error(\"The ng module \" + stringify(this.instance.constructor) + \" has already been destroyed.\");\n }\n this._destroyed = true;\n callNgModuleLifecycle(this, 131072 /* OnDestroy */);\n this._destroyListeners.forEach(function (listener) { return listener(); });\n };\n NgModuleRef_.prototype.onDestroy = function (callback) { this._destroyListeners.push(callback); };\n return NgModuleRef_;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar RendererV1TokenKey = tokenKey(Renderer);\nvar Renderer2TokenKey = tokenKey(Renderer2);\nvar ElementRefTokenKey = tokenKey(ElementRef);\nvar ViewContainerRefTokenKey = tokenKey(ViewContainerRef);\nvar TemplateRefTokenKey = tokenKey(TemplateRef);\nvar ChangeDetectorRefTokenKey = tokenKey(ChangeDetectorRef);\nvar InjectorRefTokenKey = tokenKey(Injector);\nvar INJECTORRefTokenKey = tokenKey(INJECTOR);\nfunction directiveDef(checkIndex, flags, matchedQueries, childCount, ctor, deps, props, outputs) {\n var bindings = [];\n if (props) {\n for (var prop in props) {\n var _a = __read(props[prop], 2), bindingIndex = _a[0], nonMinifiedName = _a[1];\n bindings[bindingIndex] = {\n flags: 8 /* TypeProperty */,\n name: prop, nonMinifiedName: nonMinifiedName,\n ns: null,\n securityContext: null,\n suffix: null\n };\n }\n }\n var outputDefs = [];\n if (outputs) {\n for (var propName in outputs) {\n outputDefs.push({ type: 1 /* DirectiveOutput */, propName: propName, target: null, eventName: outputs[propName] });\n }\n }\n flags |= 16384 /* TypeDirective */;\n return _def(checkIndex, flags, matchedQueries, childCount, ctor, ctor, deps, bindings, outputDefs);\n}\nfunction pipeDef(flags, ctor, deps) {\n flags |= 16 /* TypePipe */;\n return _def(-1, flags, null, 0, ctor, ctor, deps);\n}\nfunction providerDef(flags, matchedQueries, token, value, deps) {\n return _def(-1, flags, matchedQueries, 0, token, value, deps);\n}\nfunction _def(checkIndex, flags, matchedQueriesDsl, childCount, token, value, deps, bindings, outputs) {\n var _a = splitMatchedQueriesDsl(matchedQueriesDsl), matchedQueries = _a.matchedQueries, references = _a.references, matchedQueryIds = _a.matchedQueryIds;\n if (!outputs) {\n outputs = [];\n }\n if (!bindings) {\n bindings = [];\n }\n // Need to resolve forwardRefs as e.g. for `useValue` we\n // lowered the expression and then stopped evaluating it,\n // i.e. also didn't unwrap it.\n value = resolveForwardRef(value);\n var depDefs = splitDepsDsl(deps, stringify(token));\n return {\n // will bet set by the view definition\n nodeIndex: -1,\n parent: null,\n renderParent: null,\n bindingIndex: -1,\n outputIndex: -1,\n // regular values\n checkIndex: checkIndex,\n flags: flags,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0, matchedQueries: matchedQueries, matchedQueryIds: matchedQueryIds, references: references,\n ngContentIndex: -1, childCount: childCount, bindings: bindings,\n bindingFlags: calcBindingFlags(bindings), outputs: outputs,\n element: null,\n provider: { token: token, value: value, deps: depDefs },\n text: null,\n query: null,\n ngContent: null\n };\n}\nfunction createProviderInstance(view, def) {\n return _createProviderInstance(view, def);\n}\nfunction createPipeInstance(view, def) {\n // deps are looked up from component.\n var compView = view;\n while (compView.parent && !isComponentView(compView)) {\n compView = compView.parent;\n }\n // pipes can see the private services of the component\n var allowPrivateServices = true;\n // pipes are always eager and classes!\n return createClass(compView.parent, viewParentEl(compView), allowPrivateServices, def.provider.value, def.provider.deps);\n}\nfunction createDirectiveInstance(view, def) {\n // components can see other private services, other directives can't.\n var allowPrivateServices = (def.flags & 32768 /* Component */) > 0;\n // directives are always eager and classes!\n var instance = createClass(view, def.parent, allowPrivateServices, def.provider.value, def.provider.deps);\n if (def.outputs.length) {\n for (var i = 0; i < def.outputs.length; i++) {\n var output = def.outputs[i];\n var subscription = instance[output.propName].subscribe(eventHandlerClosure(view, def.parent.nodeIndex, output.eventName));\n view.disposables[def.outputIndex + i] = subscription.unsubscribe.bind(subscription);\n }\n }\n return instance;\n}\nfunction eventHandlerClosure(view, index, eventName) {\n return function (event) { return dispatchEvent(view, index, eventName, event); };\n}\nfunction checkAndUpdateDirectiveInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n var providerData = asProviderData(view, def.nodeIndex);\n var directive = providerData.instance;\n var changed = false;\n var changes = undefined;\n var bindLen = def.bindings.length;\n if (bindLen > 0 && checkBinding(view, def, 0, v0)) {\n changed = true;\n changes = updateProp(view, providerData, def, 0, v0, changes);\n }\n if (bindLen > 1 && checkBinding(view, def, 1, v1)) {\n changed = true;\n changes = updateProp(view, providerData, def, 1, v1, changes);\n }\n if (bindLen > 2 && checkBinding(view, def, 2, v2)) {\n changed = true;\n changes = updateProp(view, providerData, def, 2, v2, changes);\n }\n if (bindLen > 3 && checkBinding(view, def, 3, v3)) {\n changed = true;\n changes = updateProp(view, providerData, def, 3, v3, changes);\n }\n if (bindLen > 4 && checkBinding(view, def, 4, v4)) {\n changed = true;\n changes = updateProp(view, providerData, def, 4, v4, changes);\n }\n if (bindLen > 5 && checkBinding(view, def, 5, v5)) {\n changed = true;\n changes = updateProp(view, providerData, def, 5, v5, changes);\n }\n if (bindLen > 6 && checkBinding(view, def, 6, v6)) {\n changed = true;\n changes = updateProp(view, providerData, def, 6, v6, changes);\n }\n if (bindLen > 7 && checkBinding(view, def, 7, v7)) {\n changed = true;\n changes = updateProp(view, providerData, def, 7, v7, changes);\n }\n if (bindLen > 8 && checkBinding(view, def, 8, v8)) {\n changed = true;\n changes = updateProp(view, providerData, def, 8, v8, changes);\n }\n if (bindLen > 9 && checkBinding(view, def, 9, v9)) {\n changed = true;\n changes = updateProp(view, providerData, def, 9, v9, changes);\n }\n if (changes) {\n directive.ngOnChanges(changes);\n }\n if ((def.flags & 65536 /* OnInit */) &&\n shouldCallLifecycleInitHook(view, 256 /* InitState_CallingOnInit */, def.nodeIndex)) {\n directive.ngOnInit();\n }\n if (def.flags & 262144 /* DoCheck */) {\n directive.ngDoCheck();\n }\n return changed;\n}\nfunction checkAndUpdateDirectiveDynamic(view, def, values) {\n var providerData = asProviderData(view, def.nodeIndex);\n var directive = providerData.instance;\n var changed = false;\n var changes = undefined;\n for (var i = 0; i < values.length; i++) {\n if (checkBinding(view, def, i, values[i])) {\n changed = true;\n changes = updateProp(view, providerData, def, i, values[i], changes);\n }\n }\n if (changes) {\n directive.ngOnChanges(changes);\n }\n if ((def.flags & 65536 /* OnInit */) &&\n shouldCallLifecycleInitHook(view, 256 /* InitState_CallingOnInit */, def.nodeIndex)) {\n directive.ngOnInit();\n }\n if (def.flags & 262144 /* DoCheck */) {\n directive.ngDoCheck();\n }\n return changed;\n}\nfunction _createProviderInstance(view, def) {\n // private services can see other private services\n var allowPrivateServices = (def.flags & 8192 /* PrivateProvider */) > 0;\n var providerDef = def.provider;\n switch (def.flags & 201347067 /* Types */) {\n case 512 /* TypeClassProvider */:\n return createClass(view, def.parent, allowPrivateServices, providerDef.value, providerDef.deps);\n case 1024 /* TypeFactoryProvider */:\n return callFactory(view, def.parent, allowPrivateServices, providerDef.value, providerDef.deps);\n case 2048 /* TypeUseExistingProvider */:\n return resolveDep(view, def.parent, allowPrivateServices, providerDef.deps[0]);\n case 256 /* TypeValueProvider */:\n return providerDef.value;\n }\n}\nfunction createClass(view, elDef, allowPrivateServices, ctor, deps) {\n var len = deps.length;\n switch (len) {\n case 0:\n return new ctor();\n case 1:\n return new ctor(resolveDep(view, elDef, allowPrivateServices, deps[0]));\n case 2:\n return new ctor(resolveDep(view, elDef, allowPrivateServices, deps[0]), resolveDep(view, elDef, allowPrivateServices, deps[1]));\n case 3:\n return new ctor(resolveDep(view, elDef, allowPrivateServices, deps[0]), resolveDep(view, elDef, allowPrivateServices, deps[1]), resolveDep(view, elDef, allowPrivateServices, deps[2]));\n default:\n var depValues = new Array(len);\n for (var i = 0; i < len; i++) {\n depValues[i] = resolveDep(view, elDef, allowPrivateServices, deps[i]);\n }\n return new (ctor.bind.apply(ctor, __spread([void 0], depValues)))();\n }\n}\nfunction callFactory(view, elDef, allowPrivateServices, factory, deps) {\n var len = deps.length;\n switch (len) {\n case 0:\n return factory();\n case 1:\n return factory(resolveDep(view, elDef, allowPrivateServices, deps[0]));\n case 2:\n return factory(resolveDep(view, elDef, allowPrivateServices, deps[0]), resolveDep(view, elDef, allowPrivateServices, deps[1]));\n case 3:\n return factory(resolveDep(view, elDef, allowPrivateServices, deps[0]), resolveDep(view, elDef, allowPrivateServices, deps[1]), resolveDep(view, elDef, allowPrivateServices, deps[2]));\n default:\n var depValues = Array(len);\n for (var i = 0; i < len; i++) {\n depValues[i] = resolveDep(view, elDef, allowPrivateServices, deps[i]);\n }\n return factory.apply(void 0, __spread(depValues));\n }\n}\n// This default value is when checking the hierarchy for a token.\n//\n// It means both:\n// - the token is not provided by the current injector,\n// - only the element injectors should be checked (ie do not check module injectors\n//\n// mod1\n// /\n// el1 mod2\n// \\ /\n// el2\n//\n// When requesting el2.injector.get(token), we should check in the following order and return the\n// first found value:\n// - el2.injector.get(token, default)\n// - el1.injector.get(token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) -> do not check the module\n// - mod2.injector.get(token, default)\nvar NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR = {};\nfunction resolveDep(view, elDef, allowPrivateServices, depDef, notFoundValue) {\n if (notFoundValue === void 0) { notFoundValue = Injector.THROW_IF_NOT_FOUND; }\n if (depDef.flags & 8 /* Value */) {\n return depDef.token;\n }\n var startView = view;\n if (depDef.flags & 2 /* Optional */) {\n notFoundValue = null;\n }\n var tokenKey$$1 = depDef.tokenKey;\n if (tokenKey$$1 === ChangeDetectorRefTokenKey) {\n // directives on the same element as a component should be able to control the change detector\n // of that component as well.\n allowPrivateServices = !!(elDef && elDef.element.componentView);\n }\n if (elDef && (depDef.flags & 1 /* SkipSelf */)) {\n allowPrivateServices = false;\n elDef = elDef.parent;\n }\n var searchView = view;\n while (searchView) {\n if (elDef) {\n switch (tokenKey$$1) {\n case RendererV1TokenKey: {\n var compView = findCompView(searchView, elDef, allowPrivateServices);\n return createRendererV1(compView);\n }\n case Renderer2TokenKey: {\n var compView = findCompView(searchView, elDef, allowPrivateServices);\n return compView.renderer;\n }\n case ElementRefTokenKey:\n return new ElementRef(asElementData(searchView, elDef.nodeIndex).renderElement);\n case ViewContainerRefTokenKey:\n return asElementData(searchView, elDef.nodeIndex).viewContainer;\n case TemplateRefTokenKey: {\n if (elDef.element.template) {\n return asElementData(searchView, elDef.nodeIndex).template;\n }\n break;\n }\n case ChangeDetectorRefTokenKey: {\n var cdView = findCompView(searchView, elDef, allowPrivateServices);\n return createChangeDetectorRef(cdView);\n }\n case InjectorRefTokenKey:\n case INJECTORRefTokenKey:\n return createInjector$1(searchView, elDef);\n default:\n var providerDef_1 = (allowPrivateServices ? elDef.element.allProviders :\n elDef.element.publicProviders)[tokenKey$$1];\n if (providerDef_1) {\n var providerData = asProviderData(searchView, providerDef_1.nodeIndex);\n if (!providerData) {\n providerData = { instance: _createProviderInstance(searchView, providerDef_1) };\n searchView.nodes[providerDef_1.nodeIndex] = providerData;\n }\n return providerData.instance;\n }\n }\n }\n allowPrivateServices = isComponentView(searchView);\n elDef = viewParentEl(searchView);\n searchView = searchView.parent;\n if (depDef.flags & 4 /* Self */) {\n searchView = null;\n }\n }\n var value = startView.root.injector.get(depDef.token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR);\n if (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR ||\n notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) {\n // Return the value from the root element injector when\n // - it provides it\n // (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)\n // - the module injector should not be checked\n // (notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)\n return value;\n }\n return startView.root.ngModule.injector.get(depDef.token, notFoundValue);\n}\nfunction findCompView(view, elDef, allowPrivateServices) {\n var compView;\n if (allowPrivateServices) {\n compView = asElementData(view, elDef.nodeIndex).componentView;\n }\n else {\n compView = view;\n while (compView.parent && !isComponentView(compView)) {\n compView = compView.parent;\n }\n }\n return compView;\n}\nfunction updateProp(view, providerData, def, bindingIdx, value, changes) {\n if (def.flags & 32768 /* Component */) {\n var compView = asElementData(view, def.parent.nodeIndex).componentView;\n if (compView.def.flags & 2 /* OnPush */) {\n compView.state |= 8 /* ChecksEnabled */;\n }\n }\n var binding = def.bindings[bindingIdx];\n var propName = binding.name;\n // Note: This is still safe with Closure Compiler as\n // the user passed in the property name as an object has to `providerDef`,\n // so Closure Compiler will have renamed the property correctly already.\n providerData.instance[propName] = value;\n if (def.flags & 524288 /* OnChanges */) {\n changes = changes || {};\n var oldValue = WrappedValue.unwrap(view.oldValues[def.bindingIndex + bindingIdx]);\n var binding_1 = def.bindings[bindingIdx];\n changes[binding_1.nonMinifiedName] =\n new SimpleChange(oldValue, value, (view.state & 2 /* FirstCheck */) !== 0);\n }\n view.oldValues[def.bindingIndex + bindingIdx] = value;\n return changes;\n}\n// This function calls the ngAfterContentCheck, ngAfterContentInit,\n// ngAfterViewCheck, and ngAfterViewInit lifecycle hooks (depending on the node\n// flags in lifecycle). Unlike ngDoCheck, ngOnChanges and ngOnInit, which are\n// called during a pre-order traversal of the view tree (that is calling the\n// parent hooks before the child hooks) these events are sent in using a\n// post-order traversal of the tree (children before parents). This changes the\n// meaning of initIndex in the view state. For ngOnInit, initIndex tracks the\n// expected nodeIndex which a ngOnInit should be called. When sending\n// ngAfterContentInit and ngAfterViewInit it is the expected count of\n// ngAfterContentInit or ngAfterViewInit methods that have been called. This\n// ensure that despite being called recursively or after picking up after an\n// exception, the ngAfterContentInit or ngAfterViewInit will be called on the\n// correct nodes. Consider for example, the following (where E is an element\n// and D is a directive)\n// Tree: pre-order index post-order index\n// E1 0 6\n// E2 1 1\n// D3 2 0\n// E4 3 5\n// E5 4 4\n// E6 5 2\n// E7 6 3\n// As can be seen, the post-order index has an unclear relationship to the\n// pre-order index (postOrderIndex === preOrderIndex - parentCount +\n// childCount). Since number of calls to ngAfterContentInit and ngAfterViewInit\n// are stable (will be the same for the same view regardless of exceptions or\n// recursion) we just need to count them which will roughly correspond to the\n// post-order index (it skips elements and directives that do not have\n// lifecycle hooks).\n//\n// For example, if an exception is raised in the E6.onAfterViewInit() the\n// initIndex is left at 3 (by shouldCallLifecycleInitHook() which set it to\n// initIndex + 1). When checkAndUpdateView() is called again D3, E2 and E6 will\n// not have their ngAfterViewInit() called but, starting with E7, the rest of\n// the view will begin getting ngAfterViewInit() called until a check and\n// pass is complete.\n//\n// This algorthim also handles recursion. Consider if E4's ngAfterViewInit()\n// indirectly calls E1's ChangeDetectorRef.detectChanges(). The expected\n// initIndex is set to 6, the recusive checkAndUpdateView() starts walk again.\n// D3, E2, E6, E7, E5 and E4 are skipped, ngAfterViewInit() is called on E1.\n// When the recursion returns the initIndex will be 7 so E1 is skipped as it\n// has already been called in the recursively called checkAnUpdateView().\nfunction callLifecycleHooksChildrenFirst(view, lifecycles) {\n if (!(view.def.nodeFlags & lifecycles)) {\n return;\n }\n var nodes = view.def.nodes;\n var initIndex = 0;\n for (var i = 0; i < nodes.length; i++) {\n var nodeDef = nodes[i];\n var parent_1 = nodeDef.parent;\n if (!parent_1 && nodeDef.flags & lifecycles) {\n // matching root node (e.g. a pipe)\n callProviderLifecycles(view, i, nodeDef.flags & lifecycles, initIndex++);\n }\n if ((nodeDef.childFlags & lifecycles) === 0) {\n // no child matches one of the lifecycles\n i += nodeDef.childCount;\n }\n while (parent_1 && (parent_1.flags & 1 /* TypeElement */) &&\n i === parent_1.nodeIndex + parent_1.childCount) {\n // last child of an element\n if (parent_1.directChildFlags & lifecycles) {\n initIndex = callElementProvidersLifecycles(view, parent_1, lifecycles, initIndex);\n }\n parent_1 = parent_1.parent;\n }\n }\n}\nfunction callElementProvidersLifecycles(view, elDef, lifecycles, initIndex) {\n for (var i = elDef.nodeIndex + 1; i <= elDef.nodeIndex + elDef.childCount; i++) {\n var nodeDef = view.def.nodes[i];\n if (nodeDef.flags & lifecycles) {\n callProviderLifecycles(view, i, nodeDef.flags & lifecycles, initIndex++);\n }\n // only visit direct children\n i += nodeDef.childCount;\n }\n return initIndex;\n}\nfunction callProviderLifecycles(view, index, lifecycles, initIndex) {\n var providerData = asProviderData(view, index);\n if (!providerData) {\n return;\n }\n var provider = providerData.instance;\n if (!provider) {\n return;\n }\n Services.setCurrentNode(view, index);\n if (lifecycles & 1048576 /* AfterContentInit */ &&\n shouldCallLifecycleInitHook(view, 512 /* InitState_CallingAfterContentInit */, initIndex)) {\n provider.ngAfterContentInit();\n }\n if (lifecycles & 2097152 /* AfterContentChecked */) {\n provider.ngAfterContentChecked();\n }\n if (lifecycles & 4194304 /* AfterViewInit */ &&\n shouldCallLifecycleInitHook(view, 768 /* InitState_CallingAfterViewInit */, initIndex)) {\n provider.ngAfterViewInit();\n }\n if (lifecycles & 8388608 /* AfterViewChecked */) {\n provider.ngAfterViewChecked();\n }\n if (lifecycles & 131072 /* OnDestroy */) {\n provider.ngOnDestroy();\n }\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction queryDef(flags, id, bindings) {\n var bindingDefs = [];\n for (var propName in bindings) {\n var bindingType = bindings[propName];\n bindingDefs.push({ propName: propName, bindingType: bindingType });\n }\n return {\n // will bet set by the view definition\n nodeIndex: -1,\n parent: null,\n renderParent: null,\n bindingIndex: -1,\n outputIndex: -1,\n // regular values\n // TODO(vicb): check\n checkIndex: -1, flags: flags,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0,\n ngContentIndex: -1,\n matchedQueries: {},\n matchedQueryIds: 0,\n references: {},\n childCount: 0,\n bindings: [],\n bindingFlags: 0,\n outputs: [],\n element: null,\n provider: null,\n text: null,\n query: { id: id, filterId: filterQueryId(id), bindings: bindingDefs },\n ngContent: null\n };\n}\nfunction createQuery() {\n return new QueryList();\n}\nfunction dirtyParentQueries(view) {\n var queryIds = view.def.nodeMatchedQueries;\n while (view.parent && isEmbeddedView(view)) {\n var tplDef = view.parentNodeDef;\n view = view.parent;\n // content queries\n var end = tplDef.nodeIndex + tplDef.childCount;\n for (var i = 0; i <= end; i++) {\n var nodeDef = view.def.nodes[i];\n if ((nodeDef.flags & 67108864 /* TypeContentQuery */) &&\n (nodeDef.flags & 536870912 /* DynamicQuery */) &&\n (nodeDef.query.filterId & queryIds) === nodeDef.query.filterId) {\n asQueryList(view, i).setDirty();\n }\n if ((nodeDef.flags & 1 /* TypeElement */ && i + nodeDef.childCount < tplDef.nodeIndex) ||\n !(nodeDef.childFlags & 67108864 /* TypeContentQuery */) ||\n !(nodeDef.childFlags & 536870912 /* DynamicQuery */)) {\n // skip elements that don't contain the template element or no query.\n i += nodeDef.childCount;\n }\n }\n }\n // view queries\n if (view.def.nodeFlags & 134217728 /* TypeViewQuery */) {\n for (var i = 0; i < view.def.nodes.length; i++) {\n var nodeDef = view.def.nodes[i];\n if ((nodeDef.flags & 134217728 /* TypeViewQuery */) && (nodeDef.flags & 536870912 /* DynamicQuery */)) {\n asQueryList(view, i).setDirty();\n }\n // only visit the root nodes\n i += nodeDef.childCount;\n }\n }\n}\nfunction checkAndUpdateQuery(view, nodeDef) {\n var queryList = asQueryList(view, nodeDef.nodeIndex);\n if (!queryList.dirty) {\n return;\n }\n var directiveInstance;\n var newValues = undefined;\n if (nodeDef.flags & 67108864 /* TypeContentQuery */) {\n var elementDef = nodeDef.parent.parent;\n newValues = calcQueryValues(view, elementDef.nodeIndex, elementDef.nodeIndex + elementDef.childCount, nodeDef.query, []);\n directiveInstance = asProviderData(view, nodeDef.parent.nodeIndex).instance;\n }\n else if (nodeDef.flags & 134217728 /* TypeViewQuery */) {\n newValues = calcQueryValues(view, 0, view.def.nodes.length - 1, nodeDef.query, []);\n directiveInstance = view.component;\n }\n queryList.reset(newValues);\n var bindings = nodeDef.query.bindings;\n var notify = false;\n for (var i = 0; i < bindings.length; i++) {\n var binding = bindings[i];\n var boundValue = void 0;\n switch (binding.bindingType) {\n case 0 /* First */:\n boundValue = queryList.first;\n break;\n case 1 /* All */:\n boundValue = queryList;\n notify = true;\n break;\n }\n directiveInstance[binding.propName] = boundValue;\n }\n if (notify) {\n queryList.notifyOnChanges();\n }\n}\nfunction calcQueryValues(view, startIndex, endIndex, queryDef, values) {\n for (var i = startIndex; i <= endIndex; i++) {\n var nodeDef = view.def.nodes[i];\n var valueType = nodeDef.matchedQueries[queryDef.id];\n if (valueType != null) {\n values.push(getQueryValue(view, nodeDef, valueType));\n }\n if (nodeDef.flags & 1 /* TypeElement */ && nodeDef.element.template &&\n (nodeDef.element.template.nodeMatchedQueries & queryDef.filterId) ===\n queryDef.filterId) {\n var elementData = asElementData(view, i);\n // check embedded views that were attached at the place of their template,\n // but process child nodes first if some match the query (see issue #16568)\n if ((nodeDef.childMatchedQueries & queryDef.filterId) === queryDef.filterId) {\n calcQueryValues(view, i + 1, i + nodeDef.childCount, queryDef, values);\n i += nodeDef.childCount;\n }\n if (nodeDef.flags & 16777216 /* EmbeddedViews */) {\n var embeddedViews = elementData.viewContainer._embeddedViews;\n for (var k = 0; k < embeddedViews.length; k++) {\n var embeddedView = embeddedViews[k];\n var dvc = declaredViewContainer(embeddedView);\n if (dvc && dvc === elementData) {\n calcQueryValues(embeddedView, 0, embeddedView.def.nodes.length - 1, queryDef, values);\n }\n }\n }\n var projectedViews = elementData.template._projectedViews;\n if (projectedViews) {\n for (var k = 0; k < projectedViews.length; k++) {\n var projectedView = projectedViews[k];\n calcQueryValues(projectedView, 0, projectedView.def.nodes.length - 1, queryDef, values);\n }\n }\n }\n if ((nodeDef.childMatchedQueries & queryDef.filterId) !== queryDef.filterId) {\n // if no child matches the query, skip the children.\n i += nodeDef.childCount;\n }\n }\n return values;\n}\nfunction getQueryValue(view, nodeDef, queryValueType) {\n if (queryValueType != null) {\n // a match\n switch (queryValueType) {\n case 1 /* RenderElement */:\n return asElementData(view, nodeDef.nodeIndex).renderElement;\n case 0 /* ElementRef */:\n return new ElementRef(asElementData(view, nodeDef.nodeIndex).renderElement);\n case 2 /* TemplateRef */:\n return asElementData(view, nodeDef.nodeIndex).template;\n case 3 /* ViewContainerRef */:\n return asElementData(view, nodeDef.nodeIndex).viewContainer;\n case 4 /* Provider */:\n return asProviderData(view, nodeDef.nodeIndex).instance;\n }\n }\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction ngContentDef(ngContentIndex, index) {\n return {\n // will bet set by the view definition\n nodeIndex: -1,\n parent: null,\n renderParent: null,\n bindingIndex: -1,\n outputIndex: -1,\n // regular values\n checkIndex: -1,\n flags: 8 /* TypeNgContent */,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0,\n matchedQueries: {},\n matchedQueryIds: 0,\n references: {}, ngContentIndex: ngContentIndex,\n childCount: 0,\n bindings: [],\n bindingFlags: 0,\n outputs: [],\n element: null,\n provider: null,\n text: null,\n query: null,\n ngContent: { index: index }\n };\n}\nfunction appendNgContent(view, renderHost, def) {\n var parentEl = getParentRenderElement(view, renderHost, def);\n if (!parentEl) {\n // Nothing to do if there is no parent element.\n return;\n }\n var ngContentIndex = def.ngContent.index;\n visitProjectedRenderNodes(view, ngContentIndex, 1 /* AppendChild */, parentEl, null, undefined);\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction purePipeDef(checkIndex, argCount) {\n // argCount + 1 to include the pipe as first arg\n return _pureExpressionDef(128 /* TypePurePipe */, checkIndex, new Array(argCount + 1));\n}\nfunction pureArrayDef(checkIndex, argCount) {\n return _pureExpressionDef(32 /* TypePureArray */, checkIndex, new Array(argCount));\n}\nfunction pureObjectDef(checkIndex, propToIndex) {\n var keys = Object.keys(propToIndex);\n var nbKeys = keys.length;\n var propertyNames = new Array(nbKeys);\n for (var i = 0; i < nbKeys; i++) {\n var key = keys[i];\n var index = propToIndex[key];\n propertyNames[index] = key;\n }\n return _pureExpressionDef(64 /* TypePureObject */, checkIndex, propertyNames);\n}\nfunction _pureExpressionDef(flags, checkIndex, propertyNames) {\n var bindings = new Array(propertyNames.length);\n for (var i = 0; i < propertyNames.length; i++) {\n var prop = propertyNames[i];\n bindings[i] = {\n flags: 8 /* TypeProperty */,\n name: prop,\n ns: null,\n nonMinifiedName: prop,\n securityContext: null,\n suffix: null\n };\n }\n return {\n // will bet set by the view definition\n nodeIndex: -1,\n parent: null,\n renderParent: null,\n bindingIndex: -1,\n outputIndex: -1,\n // regular values\n checkIndex: checkIndex,\n flags: flags,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0,\n matchedQueries: {},\n matchedQueryIds: 0,\n references: {},\n ngContentIndex: -1,\n childCount: 0, bindings: bindings,\n bindingFlags: calcBindingFlags(bindings),\n outputs: [],\n element: null,\n provider: null,\n text: null,\n query: null,\n ngContent: null\n };\n}\nfunction createPureExpression(view, def) {\n return { value: undefined };\n}\nfunction checkAndUpdatePureExpressionInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n var bindings = def.bindings;\n var changed = false;\n var bindLen = bindings.length;\n if (bindLen > 0 && checkAndUpdateBinding(view, def, 0, v0))\n changed = true;\n if (bindLen > 1 && checkAndUpdateBinding(view, def, 1, v1))\n changed = true;\n if (bindLen > 2 && checkAndUpdateBinding(view, def, 2, v2))\n changed = true;\n if (bindLen > 3 && checkAndUpdateBinding(view, def, 3, v3))\n changed = true;\n if (bindLen > 4 && checkAndUpdateBinding(view, def, 4, v4))\n changed = true;\n if (bindLen > 5 && checkAndUpdateBinding(view, def, 5, v5))\n changed = true;\n if (bindLen > 6 && checkAndUpdateBinding(view, def, 6, v6))\n changed = true;\n if (bindLen > 7 && checkAndUpdateBinding(view, def, 7, v7))\n changed = true;\n if (bindLen > 8 && checkAndUpdateBinding(view, def, 8, v8))\n changed = true;\n if (bindLen > 9 && checkAndUpdateBinding(view, def, 9, v9))\n changed = true;\n if (changed) {\n var data = asPureExpressionData(view, def.nodeIndex);\n var value = void 0;\n switch (def.flags & 201347067 /* Types */) {\n case 32 /* TypePureArray */:\n value = new Array(bindings.length);\n if (bindLen > 0)\n value[0] = v0;\n if (bindLen > 1)\n value[1] = v1;\n if (bindLen > 2)\n value[2] = v2;\n if (bindLen > 3)\n value[3] = v3;\n if (bindLen > 4)\n value[4] = v4;\n if (bindLen > 5)\n value[5] = v5;\n if (bindLen > 6)\n value[6] = v6;\n if (bindLen > 7)\n value[7] = v7;\n if (bindLen > 8)\n value[8] = v8;\n if (bindLen > 9)\n value[9] = v9;\n break;\n case 64 /* TypePureObject */:\n value = {};\n if (bindLen > 0)\n value[bindings[0].name] = v0;\n if (bindLen > 1)\n value[bindings[1].name] = v1;\n if (bindLen > 2)\n value[bindings[2].name] = v2;\n if (bindLen > 3)\n value[bindings[3].name] = v3;\n if (bindLen > 4)\n value[bindings[4].name] = v4;\n if (bindLen > 5)\n value[bindings[5].name] = v5;\n if (bindLen > 6)\n value[bindings[6].name] = v6;\n if (bindLen > 7)\n value[bindings[7].name] = v7;\n if (bindLen > 8)\n value[bindings[8].name] = v8;\n if (bindLen > 9)\n value[bindings[9].name] = v9;\n break;\n case 128 /* TypePurePipe */:\n var pipe = v0;\n switch (bindLen) {\n case 1:\n value = pipe.transform(v0);\n break;\n case 2:\n value = pipe.transform(v1);\n break;\n case 3:\n value = pipe.transform(v1, v2);\n break;\n case 4:\n value = pipe.transform(v1, v2, v3);\n break;\n case 5:\n value = pipe.transform(v1, v2, v3, v4);\n break;\n case 6:\n value = pipe.transform(v1, v2, v3, v4, v5);\n break;\n case 7:\n value = pipe.transform(v1, v2, v3, v4, v5, v6);\n break;\n case 8:\n value = pipe.transform(v1, v2, v3, v4, v5, v6, v7);\n break;\n case 9:\n value = pipe.transform(v1, v2, v3, v4, v5, v6, v7, v8);\n break;\n case 10:\n value = pipe.transform(v1, v2, v3, v4, v5, v6, v7, v8, v9);\n break;\n }\n break;\n }\n data.value = value;\n }\n return changed;\n}\nfunction checkAndUpdatePureExpressionDynamic(view, def, values) {\n var bindings = def.bindings;\n var changed = false;\n for (var i = 0; i < values.length; i++) {\n // Note: We need to loop over all values, so that\n // the old values are updates as well!\n if (checkAndUpdateBinding(view, def, i, values[i])) {\n changed = true;\n }\n }\n if (changed) {\n var data = asPureExpressionData(view, def.nodeIndex);\n var value = void 0;\n switch (def.flags & 201347067 /* Types */) {\n case 32 /* TypePureArray */:\n value = values;\n break;\n case 64 /* TypePureObject */:\n value = {};\n for (var i = 0; i < values.length; i++) {\n value[bindings[i].name] = values[i];\n }\n break;\n case 128 /* TypePurePipe */:\n var pipe = values[0];\n var params = values.slice(1);\n value = pipe.transform.apply(pipe, __spread(params));\n break;\n }\n data.value = value;\n }\n return changed;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction textDef(checkIndex, ngContentIndex, staticText) {\n var bindings = new Array(staticText.length - 1);\n for (var i = 1; i < staticText.length; i++) {\n bindings[i - 1] = {\n flags: 8 /* TypeProperty */,\n name: null,\n ns: null,\n nonMinifiedName: null,\n securityContext: null,\n suffix: staticText[i],\n };\n }\n return {\n // will bet set by the view definition\n nodeIndex: -1,\n parent: null,\n renderParent: null,\n bindingIndex: -1,\n outputIndex: -1,\n // regular values\n checkIndex: checkIndex,\n flags: 2 /* TypeText */,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0,\n matchedQueries: {},\n matchedQueryIds: 0,\n references: {}, ngContentIndex: ngContentIndex,\n childCount: 0, bindings: bindings,\n bindingFlags: 8 /* TypeProperty */,\n outputs: [],\n element: null,\n provider: null,\n text: { prefix: staticText[0] },\n query: null,\n ngContent: null,\n };\n}\nfunction createText(view, renderHost, def) {\n var renderNode$$1;\n var renderer = view.renderer;\n renderNode$$1 = renderer.createText(def.text.prefix);\n var parentEl = getParentRenderElement(view, renderHost, def);\n if (parentEl) {\n renderer.appendChild(parentEl, renderNode$$1);\n }\n return { renderText: renderNode$$1 };\n}\nfunction checkAndUpdateTextInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n var changed = false;\n var bindings = def.bindings;\n var bindLen = bindings.length;\n if (bindLen > 0 && checkAndUpdateBinding(view, def, 0, v0))\n changed = true;\n if (bindLen > 1 && checkAndUpdateBinding(view, def, 1, v1))\n changed = true;\n if (bindLen > 2 && checkAndUpdateBinding(view, def, 2, v2))\n changed = true;\n if (bindLen > 3 && checkAndUpdateBinding(view, def, 3, v3))\n changed = true;\n if (bindLen > 4 && checkAndUpdateBinding(view, def, 4, v4))\n changed = true;\n if (bindLen > 5 && checkAndUpdateBinding(view, def, 5, v5))\n changed = true;\n if (bindLen > 6 && checkAndUpdateBinding(view, def, 6, v6))\n changed = true;\n if (bindLen > 7 && checkAndUpdateBinding(view, def, 7, v7))\n changed = true;\n if (bindLen > 8 && checkAndUpdateBinding(view, def, 8, v8))\n changed = true;\n if (bindLen > 9 && checkAndUpdateBinding(view, def, 9, v9))\n changed = true;\n if (changed) {\n var value = def.text.prefix;\n if (bindLen > 0)\n value += _addInterpolationPart(v0, bindings[0]);\n if (bindLen > 1)\n value += _addInterpolationPart(v1, bindings[1]);\n if (bindLen > 2)\n value += _addInterpolationPart(v2, bindings[2]);\n if (bindLen > 3)\n value += _addInterpolationPart(v3, bindings[3]);\n if (bindLen > 4)\n value += _addInterpolationPart(v4, bindings[4]);\n if (bindLen > 5)\n value += _addInterpolationPart(v5, bindings[5]);\n if (bindLen > 6)\n value += _addInterpolationPart(v6, bindings[6]);\n if (bindLen > 7)\n value += _addInterpolationPart(v7, bindings[7]);\n if (bindLen > 8)\n value += _addInterpolationPart(v8, bindings[8]);\n if (bindLen > 9)\n value += _addInterpolationPart(v9, bindings[9]);\n var renderNode$$1 = asTextData(view, def.nodeIndex).renderText;\n view.renderer.setValue(renderNode$$1, value);\n }\n return changed;\n}\nfunction checkAndUpdateTextDynamic(view, def, values) {\n var bindings = def.bindings;\n var changed = false;\n for (var i = 0; i < values.length; i++) {\n // Note: We need to loop over all values, so that\n // the old values are updates as well!\n if (checkAndUpdateBinding(view, def, i, values[i])) {\n changed = true;\n }\n }\n if (changed) {\n var value = '';\n for (var i = 0; i < values.length; i++) {\n value = value + _addInterpolationPart(values[i], bindings[i]);\n }\n value = def.text.prefix + value;\n var renderNode$$1 = asTextData(view, def.nodeIndex).renderText;\n view.renderer.setValue(renderNode$$1, value);\n }\n return changed;\n}\nfunction _addInterpolationPart(value, binding) {\n var valueStr = value != null ? value.toString() : '';\n return valueStr + binding.suffix;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction viewDef(flags, nodes, updateDirectives, updateRenderer) {\n // clone nodes and set auto calculated values\n var viewBindingCount = 0;\n var viewDisposableCount = 0;\n var viewNodeFlags = 0;\n var viewRootNodeFlags = 0;\n var viewMatchedQueries = 0;\n var currentParent = null;\n var currentRenderParent = null;\n var currentElementHasPublicProviders = false;\n var currentElementHasPrivateProviders = false;\n var lastRenderRootNode = null;\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n node.nodeIndex = i;\n node.parent = currentParent;\n node.bindingIndex = viewBindingCount;\n node.outputIndex = viewDisposableCount;\n node.renderParent = currentRenderParent;\n viewNodeFlags |= node.flags;\n viewMatchedQueries |= node.matchedQueryIds;\n if (node.element) {\n var elDef = node.element;\n elDef.publicProviders =\n currentParent ? currentParent.element.publicProviders : Object.create(null);\n elDef.allProviders = elDef.publicProviders;\n // Note: We assume that all providers of an element are before any child element!\n currentElementHasPublicProviders = false;\n currentElementHasPrivateProviders = false;\n if (node.element.template) {\n viewMatchedQueries |= node.element.template.nodeMatchedQueries;\n }\n }\n validateNode(currentParent, node, nodes.length);\n viewBindingCount += node.bindings.length;\n viewDisposableCount += node.outputs.length;\n if (!currentRenderParent && (node.flags & 3 /* CatRenderNode */)) {\n lastRenderRootNode = node;\n }\n if (node.flags & 20224 /* CatProvider */) {\n if (!currentElementHasPublicProviders) {\n currentElementHasPublicProviders = true;\n // Use prototypical inheritance to not get O(n^2) complexity...\n currentParent.element.publicProviders =\n Object.create(currentParent.element.publicProviders);\n currentParent.element.allProviders = currentParent.element.publicProviders;\n }\n var isPrivateService = (node.flags & 8192 /* PrivateProvider */) !== 0;\n var isComponent = (node.flags & 32768 /* Component */) !== 0;\n if (!isPrivateService || isComponent) {\n currentParent.element.publicProviders[tokenKey(node.provider.token)] = node;\n }\n else {\n if (!currentElementHasPrivateProviders) {\n currentElementHasPrivateProviders = true;\n // Use prototypical inheritance to not get O(n^2) complexity...\n currentParent.element.allProviders =\n Object.create(currentParent.element.publicProviders);\n }\n currentParent.element.allProviders[tokenKey(node.provider.token)] = node;\n }\n if (isComponent) {\n currentParent.element.componentProvider = node;\n }\n }\n if (currentParent) {\n currentParent.childFlags |= node.flags;\n currentParent.directChildFlags |= node.flags;\n currentParent.childMatchedQueries |= node.matchedQueryIds;\n if (node.element && node.element.template) {\n currentParent.childMatchedQueries |= node.element.template.nodeMatchedQueries;\n }\n }\n else {\n viewRootNodeFlags |= node.flags;\n }\n if (node.childCount > 0) {\n currentParent = node;\n if (!isNgContainer(node)) {\n currentRenderParent = node;\n }\n }\n else {\n // When the current node has no children, check if it is the last children of its parent.\n // When it is, propagate the flags up.\n // The loop is required because an element could be the last transitive children of several\n // elements. We loop to either the root or the highest opened element (= with remaining\n // children)\n while (currentParent && i === currentParent.nodeIndex + currentParent.childCount) {\n var newParent = currentParent.parent;\n if (newParent) {\n newParent.childFlags |= currentParent.childFlags;\n newParent.childMatchedQueries |= currentParent.childMatchedQueries;\n }\n currentParent = newParent;\n // We also need to update the render parent & account for ng-container\n if (currentParent && isNgContainer(currentParent)) {\n currentRenderParent = currentParent.renderParent;\n }\n else {\n currentRenderParent = currentParent;\n }\n }\n }\n }\n var handleEvent = function (view, nodeIndex, eventName, event) {\n return nodes[nodeIndex].element.handleEvent(view, eventName, event);\n };\n return {\n // Will be filled later...\n factory: null,\n nodeFlags: viewNodeFlags,\n rootNodeFlags: viewRootNodeFlags,\n nodeMatchedQueries: viewMatchedQueries, flags: flags,\n nodes: nodes,\n updateDirectives: updateDirectives || NOOP,\n updateRenderer: updateRenderer || NOOP, handleEvent: handleEvent,\n bindingCount: viewBindingCount,\n outputCount: viewDisposableCount, lastRenderRootNode: lastRenderRootNode\n };\n}\nfunction isNgContainer(node) {\n return (node.flags & 1 /* TypeElement */) !== 0 && node.element.name === null;\n}\nfunction validateNode(parent, node, nodeCount) {\n var template = node.element && node.element.template;\n if (template) {\n if (!template.lastRenderRootNode) {\n throw new Error(\"Illegal State: Embedded templates without nodes are not allowed!\");\n }\n if (template.lastRenderRootNode &&\n template.lastRenderRootNode.flags & 16777216 /* EmbeddedViews */) {\n throw new Error(\"Illegal State: Last root node of a template can't have embedded views, at index \" + node.nodeIndex + \"!\");\n }\n }\n if (node.flags & 20224 /* CatProvider */) {\n var parentFlags = parent ? parent.flags : 0;\n if ((parentFlags & 1 /* TypeElement */) === 0) {\n throw new Error(\"Illegal State: StaticProvider/Directive nodes need to be children of elements or anchors, at index \" + node.nodeIndex + \"!\");\n }\n }\n if (node.query) {\n if (node.flags & 67108864 /* TypeContentQuery */ &&\n (!parent || (parent.flags & 16384 /* TypeDirective */) === 0)) {\n throw new Error(\"Illegal State: Content Query nodes need to be children of directives, at index \" + node.nodeIndex + \"!\");\n }\n if (node.flags & 134217728 /* TypeViewQuery */ && parent) {\n throw new Error(\"Illegal State: View Query nodes have to be top level nodes, at index \" + node.nodeIndex + \"!\");\n }\n }\n if (node.childCount) {\n var parentEnd = parent ? parent.nodeIndex + parent.childCount : nodeCount - 1;\n if (node.nodeIndex <= parentEnd && node.nodeIndex + node.childCount > parentEnd) {\n throw new Error(\"Illegal State: childCount of node leads outside of parent, at index \" + node.nodeIndex + \"!\");\n }\n }\n}\nfunction createEmbeddedView(parent, anchorDef$$1, viewDef, context) {\n // embedded views are seen as siblings to the anchor, so we need\n // to get the parent of the anchor and use it as parentIndex.\n var view = createView(parent.root, parent.renderer, parent, anchorDef$$1, viewDef);\n initView(view, parent.component, context);\n createViewNodes(view);\n return view;\n}\nfunction createRootView(root, def, context) {\n var view = createView(root, root.renderer, null, null, def);\n initView(view, context, context);\n createViewNodes(view);\n return view;\n}\nfunction createComponentView(parentView, nodeDef, viewDef, hostElement) {\n var rendererType = nodeDef.element.componentRendererType;\n var compRenderer;\n if (!rendererType) {\n compRenderer = parentView.root.renderer;\n }\n else {\n compRenderer = parentView.root.rendererFactory.createRenderer(hostElement, rendererType);\n }\n return createView(parentView.root, compRenderer, parentView, nodeDef.element.componentProvider, viewDef);\n}\nfunction createView(root, renderer, parent, parentNodeDef, def) {\n var nodes = new Array(def.nodes.length);\n var disposables = def.outputCount ? new Array(def.outputCount) : null;\n var view = {\n def: def,\n parent: parent,\n viewContainerParent: null, parentNodeDef: parentNodeDef,\n context: null,\n component: null, nodes: nodes,\n state: 13 /* CatInit */, root: root, renderer: renderer,\n oldValues: new Array(def.bindingCount), disposables: disposables,\n initIndex: -1\n };\n return view;\n}\nfunction initView(view, component, context) {\n view.component = component;\n view.context = context;\n}\nfunction createViewNodes(view) {\n var renderHost;\n if (isComponentView(view)) {\n var hostDef = view.parentNodeDef;\n renderHost = asElementData(view.parent, hostDef.parent.nodeIndex).renderElement;\n }\n var def = view.def;\n var nodes = view.nodes;\n for (var i = 0; i < def.nodes.length; i++) {\n var nodeDef = def.nodes[i];\n Services.setCurrentNode(view, i);\n var nodeData = void 0;\n switch (nodeDef.flags & 201347067 /* Types */) {\n case 1 /* TypeElement */:\n var el = createElement(view, renderHost, nodeDef);\n var componentView = undefined;\n if (nodeDef.flags & 33554432 /* ComponentView */) {\n var compViewDef = resolveDefinition(nodeDef.element.componentView);\n componentView = Services.createComponentView(view, nodeDef, compViewDef, el);\n }\n listenToElementOutputs(view, componentView, nodeDef, el);\n nodeData = {\n renderElement: el,\n componentView: componentView,\n viewContainer: null,\n template: nodeDef.element.template ? createTemplateData(view, nodeDef) : undefined\n };\n if (nodeDef.flags & 16777216 /* EmbeddedViews */) {\n nodeData.viewContainer = createViewContainerData(view, nodeDef, nodeData);\n }\n break;\n case 2 /* TypeText */:\n nodeData = createText(view, renderHost, nodeDef);\n break;\n case 512 /* TypeClassProvider */:\n case 1024 /* TypeFactoryProvider */:\n case 2048 /* TypeUseExistingProvider */:\n case 256 /* TypeValueProvider */: {\n nodeData = nodes[i];\n if (!nodeData && !(nodeDef.flags & 4096 /* LazyProvider */)) {\n var instance = createProviderInstance(view, nodeDef);\n nodeData = { instance: instance };\n }\n break;\n }\n case 16 /* TypePipe */: {\n var instance = createPipeInstance(view, nodeDef);\n nodeData = { instance: instance };\n break;\n }\n case 16384 /* TypeDirective */: {\n nodeData = nodes[i];\n if (!nodeData) {\n var instance = createDirectiveInstance(view, nodeDef);\n nodeData = { instance: instance };\n }\n if (nodeDef.flags & 32768 /* Component */) {\n var compView = asElementData(view, nodeDef.parent.nodeIndex).componentView;\n initView(compView, nodeData.instance, nodeData.instance);\n }\n break;\n }\n case 32 /* TypePureArray */:\n case 64 /* TypePureObject */:\n case 128 /* TypePurePipe */:\n nodeData = createPureExpression(view, nodeDef);\n break;\n case 67108864 /* TypeContentQuery */:\n case 134217728 /* TypeViewQuery */:\n nodeData = createQuery();\n break;\n case 8 /* TypeNgContent */:\n appendNgContent(view, renderHost, nodeDef);\n // no runtime data needed for NgContent...\n nodeData = undefined;\n break;\n }\n nodes[i] = nodeData;\n }\n // Create the ViewData.nodes of component views after we created everything else,\n // so that e.g. ng-content works\n execComponentViewsAction(view, ViewAction.CreateViewNodes);\n // fill static content and view queries\n execQueriesAction(view, 67108864 /* TypeContentQuery */ | 134217728 /* TypeViewQuery */, 268435456 /* StaticQuery */, 0 /* CheckAndUpdate */);\n}\nfunction checkNoChangesView(view) {\n markProjectedViewsForCheck(view);\n Services.updateDirectives(view, 1 /* CheckNoChanges */);\n execEmbeddedViewsAction(view, ViewAction.CheckNoChanges);\n Services.updateRenderer(view, 1 /* CheckNoChanges */);\n execComponentViewsAction(view, ViewAction.CheckNoChanges);\n // Note: We don't check queries for changes as we didn't do this in v2.x.\n // TODO(tbosch): investigate if we can enable the check again in v5.x with a nicer error message.\n view.state &= ~(64 /* CheckProjectedViews */ | 32 /* CheckProjectedView */);\n}\nfunction checkAndUpdateView(view) {\n if (view.state & 1 /* BeforeFirstCheck */) {\n view.state &= ~1 /* BeforeFirstCheck */;\n view.state |= 2 /* FirstCheck */;\n }\n else {\n view.state &= ~2 /* FirstCheck */;\n }\n shiftInitState(view, 0 /* InitState_BeforeInit */, 256 /* InitState_CallingOnInit */);\n markProjectedViewsForCheck(view);\n Services.updateDirectives(view, 0 /* CheckAndUpdate */);\n execEmbeddedViewsAction(view, ViewAction.CheckAndUpdate);\n execQueriesAction(view, 67108864 /* TypeContentQuery */, 536870912 /* DynamicQuery */, 0 /* CheckAndUpdate */);\n var callInit = shiftInitState(view, 256 /* InitState_CallingOnInit */, 512 /* InitState_CallingAfterContentInit */);\n callLifecycleHooksChildrenFirst(view, 2097152 /* AfterContentChecked */ | (callInit ? 1048576 /* AfterContentInit */ : 0));\n Services.updateRenderer(view, 0 /* CheckAndUpdate */);\n execComponentViewsAction(view, ViewAction.CheckAndUpdate);\n execQueriesAction(view, 134217728 /* TypeViewQuery */, 536870912 /* DynamicQuery */, 0 /* CheckAndUpdate */);\n callInit = shiftInitState(view, 512 /* InitState_CallingAfterContentInit */, 768 /* InitState_CallingAfterViewInit */);\n callLifecycleHooksChildrenFirst(view, 8388608 /* AfterViewChecked */ | (callInit ? 4194304 /* AfterViewInit */ : 0));\n if (view.def.flags & 2 /* OnPush */) {\n view.state &= ~8 /* ChecksEnabled */;\n }\n view.state &= ~(64 /* CheckProjectedViews */ | 32 /* CheckProjectedView */);\n shiftInitState(view, 768 /* InitState_CallingAfterViewInit */, 1024 /* InitState_AfterInit */);\n}\nfunction checkAndUpdateNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n if (argStyle === 0 /* Inline */) {\n return checkAndUpdateNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n }\n else {\n return checkAndUpdateNodeDynamic(view, nodeDef, v0);\n }\n}\nfunction markProjectedViewsForCheck(view) {\n var def = view.def;\n if (!(def.nodeFlags & 4 /* ProjectedTemplate */)) {\n return;\n }\n for (var i = 0; i < def.nodes.length; i++) {\n var nodeDef = def.nodes[i];\n if (nodeDef.flags & 4 /* ProjectedTemplate */) {\n var projectedViews = asElementData(view, i).template._projectedViews;\n if (projectedViews) {\n for (var i_1 = 0; i_1 < projectedViews.length; i_1++) {\n var projectedView = projectedViews[i_1];\n projectedView.state |= 32 /* CheckProjectedView */;\n markParentViewsForCheckProjectedViews(projectedView, view);\n }\n }\n }\n else if ((nodeDef.childFlags & 4 /* ProjectedTemplate */) === 0) {\n // a parent with leafs\n // no child is a component,\n // then skip the children\n i += nodeDef.childCount;\n }\n }\n}\nfunction checkAndUpdateNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n switch (nodeDef.flags & 201347067 /* Types */) {\n case 1 /* TypeElement */:\n return checkAndUpdateElementInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n case 2 /* TypeText */:\n return checkAndUpdateTextInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n case 16384 /* TypeDirective */:\n return checkAndUpdateDirectiveInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n case 32 /* TypePureArray */:\n case 64 /* TypePureObject */:\n case 128 /* TypePurePipe */:\n return checkAndUpdatePureExpressionInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n default:\n throw 'unreachable';\n }\n}\nfunction checkAndUpdateNodeDynamic(view, nodeDef, values) {\n switch (nodeDef.flags & 201347067 /* Types */) {\n case 1 /* TypeElement */:\n return checkAndUpdateElementDynamic(view, nodeDef, values);\n case 2 /* TypeText */:\n return checkAndUpdateTextDynamic(view, nodeDef, values);\n case 16384 /* TypeDirective */:\n return checkAndUpdateDirectiveDynamic(view, nodeDef, values);\n case 32 /* TypePureArray */:\n case 64 /* TypePureObject */:\n case 128 /* TypePurePipe */:\n return checkAndUpdatePureExpressionDynamic(view, nodeDef, values);\n default:\n throw 'unreachable';\n }\n}\nfunction checkNoChangesNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n if (argStyle === 0 /* Inline */) {\n checkNoChangesNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n }\n else {\n checkNoChangesNodeDynamic(view, nodeDef, v0);\n }\n // Returning false is ok here as we would have thrown in case of a change.\n return false;\n}\nfunction checkNoChangesNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n var bindLen = nodeDef.bindings.length;\n if (bindLen > 0)\n checkBindingNoChanges(view, nodeDef, 0, v0);\n if (bindLen > 1)\n checkBindingNoChanges(view, nodeDef, 1, v1);\n if (bindLen > 2)\n checkBindingNoChanges(view, nodeDef, 2, v2);\n if (bindLen > 3)\n checkBindingNoChanges(view, nodeDef, 3, v3);\n if (bindLen > 4)\n checkBindingNoChanges(view, nodeDef, 4, v4);\n if (bindLen > 5)\n checkBindingNoChanges(view, nodeDef, 5, v5);\n if (bindLen > 6)\n checkBindingNoChanges(view, nodeDef, 6, v6);\n if (bindLen > 7)\n checkBindingNoChanges(view, nodeDef, 7, v7);\n if (bindLen > 8)\n checkBindingNoChanges(view, nodeDef, 8, v8);\n if (bindLen > 9)\n checkBindingNoChanges(view, nodeDef, 9, v9);\n}\nfunction checkNoChangesNodeDynamic(view, nodeDef, values) {\n for (var i = 0; i < values.length; i++) {\n checkBindingNoChanges(view, nodeDef, i, values[i]);\n }\n}\n/**\n * Workaround https://github.com/angular/tsickle/issues/497\n * @suppress {misplacedTypeAnnotation}\n */\nfunction checkNoChangesQuery(view, nodeDef) {\n var queryList = asQueryList(view, nodeDef.nodeIndex);\n if (queryList.dirty) {\n throw expressionChangedAfterItHasBeenCheckedError(Services.createDebugContext(view, nodeDef.nodeIndex), \"Query \" + nodeDef.query.id + \" not dirty\", \"Query \" + nodeDef.query.id + \" dirty\", (view.state & 1 /* BeforeFirstCheck */) !== 0);\n }\n}\nfunction destroyView(view) {\n if (view.state & 128 /* Destroyed */) {\n return;\n }\n execEmbeddedViewsAction(view, ViewAction.Destroy);\n execComponentViewsAction(view, ViewAction.Destroy);\n callLifecycleHooksChildrenFirst(view, 131072 /* OnDestroy */);\n if (view.disposables) {\n for (var i = 0; i < view.disposables.length; i++) {\n view.disposables[i]();\n }\n }\n detachProjectedView(view);\n if (view.renderer.destroyNode) {\n destroyViewNodes(view);\n }\n if (isComponentView(view)) {\n view.renderer.destroy();\n }\n view.state |= 128 /* Destroyed */;\n}\nfunction destroyViewNodes(view) {\n var len = view.def.nodes.length;\n for (var i = 0; i < len; i++) {\n var def = view.def.nodes[i];\n if (def.flags & 1 /* TypeElement */) {\n view.renderer.destroyNode(asElementData(view, i).renderElement);\n }\n else if (def.flags & 2 /* TypeText */) {\n view.renderer.destroyNode(asTextData(view, i).renderText);\n }\n else if (def.flags & 67108864 /* TypeContentQuery */ || def.flags & 134217728 /* TypeViewQuery */) {\n asQueryList(view, i).destroy();\n }\n }\n}\nvar ViewAction;\n(function (ViewAction) {\n ViewAction[ViewAction[\"CreateViewNodes\"] = 0] = \"CreateViewNodes\";\n ViewAction[ViewAction[\"CheckNoChanges\"] = 1] = \"CheckNoChanges\";\n ViewAction[ViewAction[\"CheckNoChangesProjectedViews\"] = 2] = \"CheckNoChangesProjectedViews\";\n ViewAction[ViewAction[\"CheckAndUpdate\"] = 3] = \"CheckAndUpdate\";\n ViewAction[ViewAction[\"CheckAndUpdateProjectedViews\"] = 4] = \"CheckAndUpdateProjectedViews\";\n ViewAction[ViewAction[\"Destroy\"] = 5] = \"Destroy\";\n})(ViewAction || (ViewAction = {}));\nfunction execComponentViewsAction(view, action) {\n var def = view.def;\n if (!(def.nodeFlags & 33554432 /* ComponentView */)) {\n return;\n }\n for (var i = 0; i < def.nodes.length; i++) {\n var nodeDef = def.nodes[i];\n if (nodeDef.flags & 33554432 /* ComponentView */) {\n // a leaf\n callViewAction(asElementData(view, i).componentView, action);\n }\n else if ((nodeDef.childFlags & 33554432 /* ComponentView */) === 0) {\n // a parent with leafs\n // no child is a component,\n // then skip the children\n i += nodeDef.childCount;\n }\n }\n}\nfunction execEmbeddedViewsAction(view, action) {\n var def = view.def;\n if (!(def.nodeFlags & 16777216 /* EmbeddedViews */)) {\n return;\n }\n for (var i = 0; i < def.nodes.length; i++) {\n var nodeDef = def.nodes[i];\n if (nodeDef.flags & 16777216 /* EmbeddedViews */) {\n // a leaf\n var embeddedViews = asElementData(view, i).viewContainer._embeddedViews;\n for (var k = 0; k < embeddedViews.length; k++) {\n callViewAction(embeddedViews[k], action);\n }\n }\n else if ((nodeDef.childFlags & 16777216 /* EmbeddedViews */) === 0) {\n // a parent with leafs\n // no child is a component,\n // then skip the children\n i += nodeDef.childCount;\n }\n }\n}\nfunction callViewAction(view, action) {\n var viewState = view.state;\n switch (action) {\n case ViewAction.CheckNoChanges:\n if ((viewState & 128 /* Destroyed */) === 0) {\n if ((viewState & 12 /* CatDetectChanges */) === 12 /* CatDetectChanges */) {\n checkNoChangesView(view);\n }\n else if (viewState & 64 /* CheckProjectedViews */) {\n execProjectedViewsAction(view, ViewAction.CheckNoChangesProjectedViews);\n }\n }\n break;\n case ViewAction.CheckNoChangesProjectedViews:\n if ((viewState & 128 /* Destroyed */) === 0) {\n if (viewState & 32 /* CheckProjectedView */) {\n checkNoChangesView(view);\n }\n else if (viewState & 64 /* CheckProjectedViews */) {\n execProjectedViewsAction(view, action);\n }\n }\n break;\n case ViewAction.CheckAndUpdate:\n if ((viewState & 128 /* Destroyed */) === 0) {\n if ((viewState & 12 /* CatDetectChanges */) === 12 /* CatDetectChanges */) {\n checkAndUpdateView(view);\n }\n else if (viewState & 64 /* CheckProjectedViews */) {\n execProjectedViewsAction(view, ViewAction.CheckAndUpdateProjectedViews);\n }\n }\n break;\n case ViewAction.CheckAndUpdateProjectedViews:\n if ((viewState & 128 /* Destroyed */) === 0) {\n if (viewState & 32 /* CheckProjectedView */) {\n checkAndUpdateView(view);\n }\n else if (viewState & 64 /* CheckProjectedViews */) {\n execProjectedViewsAction(view, action);\n }\n }\n break;\n case ViewAction.Destroy:\n // Note: destroyView recurses over all views,\n // so we don't need to special case projected views here.\n destroyView(view);\n break;\n case ViewAction.CreateViewNodes:\n createViewNodes(view);\n break;\n }\n}\nfunction execProjectedViewsAction(view, action) {\n execEmbeddedViewsAction(view, action);\n execComponentViewsAction(view, action);\n}\nfunction execQueriesAction(view, queryFlags, staticDynamicQueryFlag, checkType) {\n if (!(view.def.nodeFlags & queryFlags) || !(view.def.nodeFlags & staticDynamicQueryFlag)) {\n return;\n }\n var nodeCount = view.def.nodes.length;\n for (var i = 0; i < nodeCount; i++) {\n var nodeDef = view.def.nodes[i];\n if ((nodeDef.flags & queryFlags) && (nodeDef.flags & staticDynamicQueryFlag)) {\n Services.setCurrentNode(view, nodeDef.nodeIndex);\n switch (checkType) {\n case 0 /* CheckAndUpdate */:\n checkAndUpdateQuery(view, nodeDef);\n break;\n case 1 /* CheckNoChanges */:\n checkNoChangesQuery(view, nodeDef);\n break;\n }\n }\n if (!(nodeDef.childFlags & queryFlags) || !(nodeDef.childFlags & staticDynamicQueryFlag)) {\n // no child has a matching query\n // then skip the children\n i += nodeDef.childCount;\n }\n }\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar initialized = false;\nfunction initServicesIfNeeded() {\n if (initialized) {\n return;\n }\n initialized = true;\n var services = isDevMode() ? createDebugServices() : createProdServices();\n Services.setCurrentNode = services.setCurrentNode;\n Services.createRootView = services.createRootView;\n Services.createEmbeddedView = services.createEmbeddedView;\n Services.createComponentView = services.createComponentView;\n Services.createNgModuleRef = services.createNgModuleRef;\n Services.overrideProvider = services.overrideProvider;\n Services.overrideComponentView = services.overrideComponentView;\n Services.clearOverrides = services.clearOverrides;\n Services.checkAndUpdateView = services.checkAndUpdateView;\n Services.checkNoChangesView = services.checkNoChangesView;\n Services.destroyView = services.destroyView;\n Services.resolveDep = resolveDep;\n Services.createDebugContext = services.createDebugContext;\n Services.handleEvent = services.handleEvent;\n Services.updateDirectives = services.updateDirectives;\n Services.updateRenderer = services.updateRenderer;\n Services.dirtyParentQueries = dirtyParentQueries;\n}\nfunction createProdServices() {\n return {\n setCurrentNode: function () { },\n createRootView: createProdRootView,\n createEmbeddedView: createEmbeddedView,\n createComponentView: createComponentView,\n createNgModuleRef: createNgModuleRef,\n overrideProvider: NOOP,\n overrideComponentView: NOOP,\n clearOverrides: NOOP,\n checkAndUpdateView: checkAndUpdateView,\n checkNoChangesView: checkNoChangesView,\n destroyView: destroyView,\n createDebugContext: function (view, nodeIndex) { return new DebugContext_(view, nodeIndex); },\n handleEvent: function (view, nodeIndex, eventName, event) {\n return view.def.handleEvent(view, nodeIndex, eventName, event);\n },\n updateDirectives: function (view, checkType) { return view.def.updateDirectives(checkType === 0 /* CheckAndUpdate */ ? prodCheckAndUpdateNode :\n prodCheckNoChangesNode, view); },\n updateRenderer: function (view, checkType) { return view.def.updateRenderer(checkType === 0 /* CheckAndUpdate */ ? prodCheckAndUpdateNode :\n prodCheckNoChangesNode, view); },\n };\n}\nfunction createDebugServices() {\n return {\n setCurrentNode: debugSetCurrentNode,\n createRootView: debugCreateRootView,\n createEmbeddedView: debugCreateEmbeddedView,\n createComponentView: debugCreateComponentView,\n createNgModuleRef: debugCreateNgModuleRef,\n overrideProvider: debugOverrideProvider,\n overrideComponentView: debugOverrideComponentView,\n clearOverrides: debugClearOverrides,\n checkAndUpdateView: debugCheckAndUpdateView,\n checkNoChangesView: debugCheckNoChangesView,\n destroyView: debugDestroyView,\n createDebugContext: function (view, nodeIndex) { return new DebugContext_(view, nodeIndex); },\n handleEvent: debugHandleEvent,\n updateDirectives: debugUpdateDirectives,\n updateRenderer: debugUpdateRenderer,\n };\n}\nfunction createProdRootView(elInjector, projectableNodes, rootSelectorOrNode, def, ngModule, context) {\n var rendererFactory = ngModule.injector.get(RendererFactory2);\n return createRootView(createRootData(elInjector, ngModule, rendererFactory, projectableNodes, rootSelectorOrNode), def, context);\n}\nfunction debugCreateRootView(elInjector, projectableNodes, rootSelectorOrNode, def, ngModule, context) {\n var rendererFactory = ngModule.injector.get(RendererFactory2);\n var root = createRootData(elInjector, ngModule, new DebugRendererFactory2(rendererFactory), projectableNodes, rootSelectorOrNode);\n var defWithOverride = applyProviderOverridesToView(def);\n return callWithDebugContext(DebugAction.create, createRootView, null, [root, defWithOverride, context]);\n}\nfunction createRootData(elInjector, ngModule, rendererFactory, projectableNodes, rootSelectorOrNode) {\n var sanitizer = ngModule.injector.get(Sanitizer);\n var errorHandler = ngModule.injector.get(ErrorHandler);\n var renderer = rendererFactory.createRenderer(null, null);\n return {\n ngModule: ngModule,\n injector: elInjector, projectableNodes: projectableNodes,\n selectorOrNode: rootSelectorOrNode, sanitizer: sanitizer, rendererFactory: rendererFactory, renderer: renderer, errorHandler: errorHandler\n };\n}\nfunction debugCreateEmbeddedView(parentView, anchorDef, viewDef$$1, context) {\n var defWithOverride = applyProviderOverridesToView(viewDef$$1);\n return callWithDebugContext(DebugAction.create, createEmbeddedView, null, [parentView, anchorDef, defWithOverride, context]);\n}\nfunction debugCreateComponentView(parentView, nodeDef, viewDef$$1, hostElement) {\n var overrideComponentView = viewDefOverrides.get(nodeDef.element.componentProvider.provider.token);\n if (overrideComponentView) {\n viewDef$$1 = overrideComponentView;\n }\n else {\n viewDef$$1 = applyProviderOverridesToView(viewDef$$1);\n }\n return callWithDebugContext(DebugAction.create, createComponentView, null, [parentView, nodeDef, viewDef$$1, hostElement]);\n}\nfunction debugCreateNgModuleRef(moduleType, parentInjector, bootstrapComponents, def) {\n var defWithOverride = applyProviderOverridesToNgModule(def);\n return createNgModuleRef(moduleType, parentInjector, bootstrapComponents, defWithOverride);\n}\nvar providerOverrides = new Map();\nvar providerOverridesWithScope = new Map();\nvar viewDefOverrides = new Map();\nfunction debugOverrideProvider(override) {\n providerOverrides.set(override.token, override);\n if (typeof override.token === 'function' && override.token.ngInjectableDef &&\n typeof override.token.ngInjectableDef.providedIn === 'function') {\n providerOverridesWithScope.set(override.token, override);\n }\n}\nfunction debugOverrideComponentView(comp, compFactory) {\n var hostViewDef = resolveDefinition(getComponentViewDefinitionFactory(compFactory));\n var compViewDef = resolveDefinition(hostViewDef.nodes[0].element.componentView);\n viewDefOverrides.set(comp, compViewDef);\n}\nfunction debugClearOverrides() {\n providerOverrides.clear();\n providerOverridesWithScope.clear();\n viewDefOverrides.clear();\n}\n// Notes about the algorithm:\n// 1) Locate the providers of an element and check if one of them was overwritten\n// 2) Change the providers of that element\n//\n// We only create new datastructures if we need to, to keep perf impact\n// reasonable.\nfunction applyProviderOverridesToView(def) {\n if (providerOverrides.size === 0) {\n return def;\n }\n var elementIndicesWithOverwrittenProviders = findElementIndicesWithOverwrittenProviders(def);\n if (elementIndicesWithOverwrittenProviders.length === 0) {\n return def;\n }\n // clone the whole view definition,\n // as it maintains references between the nodes that are hard to update.\n def = def.factory(function () { return NOOP; });\n for (var i = 0; i < elementIndicesWithOverwrittenProviders.length; i++) {\n applyProviderOverridesToElement(def, elementIndicesWithOverwrittenProviders[i]);\n }\n return def;\n function findElementIndicesWithOverwrittenProviders(def) {\n var elIndicesWithOverwrittenProviders = [];\n var lastElementDef = null;\n for (var i = 0; i < def.nodes.length; i++) {\n var nodeDef = def.nodes[i];\n if (nodeDef.flags & 1 /* TypeElement */) {\n lastElementDef = nodeDef;\n }\n if (lastElementDef && nodeDef.flags & 3840 /* CatProviderNoDirective */ &&\n providerOverrides.has(nodeDef.provider.token)) {\n elIndicesWithOverwrittenProviders.push(lastElementDef.nodeIndex);\n lastElementDef = null;\n }\n }\n return elIndicesWithOverwrittenProviders;\n }\n function applyProviderOverridesToElement(viewDef$$1, elIndex) {\n for (var i = elIndex + 1; i < viewDef$$1.nodes.length; i++) {\n var nodeDef = viewDef$$1.nodes[i];\n if (nodeDef.flags & 1 /* TypeElement */) {\n // stop at the next element\n return;\n }\n if (nodeDef.flags & 3840 /* CatProviderNoDirective */) {\n var provider = nodeDef.provider;\n var override = providerOverrides.get(provider.token);\n if (override) {\n nodeDef.flags = (nodeDef.flags & ~3840 /* CatProviderNoDirective */) | override.flags;\n provider.deps = splitDepsDsl(override.deps);\n provider.value = override.value;\n }\n }\n }\n }\n}\n// Notes about the algorithm:\n// We only create new datastructures if we need to, to keep perf impact\n// reasonable.\nfunction applyProviderOverridesToNgModule(def) {\n var _a = calcHasOverrides(def), hasOverrides = _a.hasOverrides, hasDeprecatedOverrides = _a.hasDeprecatedOverrides;\n if (!hasOverrides) {\n return def;\n }\n // clone the whole view definition,\n // as it maintains references between the nodes that are hard to update.\n def = def.factory(function () { return NOOP; });\n applyProviderOverrides(def);\n return def;\n function calcHasOverrides(def) {\n var hasOverrides = false;\n var hasDeprecatedOverrides = false;\n if (providerOverrides.size === 0) {\n return { hasOverrides: hasOverrides, hasDeprecatedOverrides: hasDeprecatedOverrides };\n }\n def.providers.forEach(function (node) {\n var override = providerOverrides.get(node.token);\n if ((node.flags & 3840 /* CatProviderNoDirective */) && override) {\n hasOverrides = true;\n hasDeprecatedOverrides = hasDeprecatedOverrides || override.deprecatedBehavior;\n }\n });\n def.modules.forEach(function (module) {\n providerOverridesWithScope.forEach(function (override, token) {\n if (token.ngInjectableDef.providedIn === module) {\n hasOverrides = true;\n hasDeprecatedOverrides = hasDeprecatedOverrides || override.deprecatedBehavior;\n }\n });\n });\n return { hasOverrides: hasOverrides, hasDeprecatedOverrides: hasDeprecatedOverrides };\n }\n function applyProviderOverrides(def) {\n for (var i = 0; i < def.providers.length; i++) {\n var provider = def.providers[i];\n if (hasDeprecatedOverrides) {\n // We had a bug where me made\n // all providers lazy. Keep this logic behind a flag\n // for migrating existing users.\n provider.flags |= 4096 /* LazyProvider */;\n }\n var override = providerOverrides.get(provider.token);\n if (override) {\n provider.flags = (provider.flags & ~3840 /* CatProviderNoDirective */) | override.flags;\n provider.deps = splitDepsDsl(override.deps);\n provider.value = override.value;\n }\n }\n if (providerOverridesWithScope.size > 0) {\n var moduleSet_1 = new Set(def.modules);\n providerOverridesWithScope.forEach(function (override, token) {\n if (moduleSet_1.has(token.ngInjectableDef.providedIn)) {\n var provider = {\n token: token,\n flags: override.flags | (hasDeprecatedOverrides ? 4096 /* LazyProvider */ : 0 /* None */),\n deps: splitDepsDsl(override.deps),\n value: override.value,\n index: def.providers.length,\n };\n def.providers.push(provider);\n def.providersByKey[tokenKey(token)] = provider;\n }\n });\n }\n }\n}\nfunction prodCheckAndUpdateNode(view, checkIndex, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n var nodeDef = view.def.nodes[checkIndex];\n checkAndUpdateNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n return (nodeDef.flags & 224 /* CatPureExpression */) ?\n asPureExpressionData(view, checkIndex).value :\n undefined;\n}\nfunction prodCheckNoChangesNode(view, checkIndex, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n var nodeDef = view.def.nodes[checkIndex];\n checkNoChangesNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n return (nodeDef.flags & 224 /* CatPureExpression */) ?\n asPureExpressionData(view, checkIndex).value :\n undefined;\n}\nfunction debugCheckAndUpdateView(view) {\n return callWithDebugContext(DebugAction.detectChanges, checkAndUpdateView, null, [view]);\n}\nfunction debugCheckNoChangesView(view) {\n return callWithDebugContext(DebugAction.checkNoChanges, checkNoChangesView, null, [view]);\n}\nfunction debugDestroyView(view) {\n return callWithDebugContext(DebugAction.destroy, destroyView, null, [view]);\n}\nvar DebugAction;\n(function (DebugAction) {\n DebugAction[DebugAction[\"create\"] = 0] = \"create\";\n DebugAction[DebugAction[\"detectChanges\"] = 1] = \"detectChanges\";\n DebugAction[DebugAction[\"checkNoChanges\"] = 2] = \"checkNoChanges\";\n DebugAction[DebugAction[\"destroy\"] = 3] = \"destroy\";\n DebugAction[DebugAction[\"handleEvent\"] = 4] = \"handleEvent\";\n})(DebugAction || (DebugAction = {}));\nvar _currentAction;\nvar _currentView;\nvar _currentNodeIndex;\nfunction debugSetCurrentNode(view, nodeIndex) {\n _currentView = view;\n _currentNodeIndex = nodeIndex;\n}\nfunction debugHandleEvent(view, nodeIndex, eventName, event) {\n debugSetCurrentNode(view, nodeIndex);\n return callWithDebugContext(DebugAction.handleEvent, view.def.handleEvent, null, [view, nodeIndex, eventName, event]);\n}\nfunction debugUpdateDirectives(view, checkType) {\n if (view.state & 128 /* Destroyed */) {\n throw viewDestroyedError(DebugAction[_currentAction]);\n }\n debugSetCurrentNode(view, nextDirectiveWithBinding(view, 0));\n return view.def.updateDirectives(debugCheckDirectivesFn, view);\n function debugCheckDirectivesFn(view, nodeIndex, argStyle) {\n var values = [];\n for (var _i = 3; _i < arguments.length; _i++) {\n values[_i - 3] = arguments[_i];\n }\n var nodeDef = view.def.nodes[nodeIndex];\n if (checkType === 0 /* CheckAndUpdate */) {\n debugCheckAndUpdateNode(view, nodeDef, argStyle, values);\n }\n else {\n debugCheckNoChangesNode(view, nodeDef, argStyle, values);\n }\n if (nodeDef.flags & 16384 /* TypeDirective */) {\n debugSetCurrentNode(view, nextDirectiveWithBinding(view, nodeIndex));\n }\n return (nodeDef.flags & 224 /* CatPureExpression */) ?\n asPureExpressionData(view, nodeDef.nodeIndex).value :\n undefined;\n }\n}\nfunction debugUpdateRenderer(view, checkType) {\n if (view.state & 128 /* Destroyed */) {\n throw viewDestroyedError(DebugAction[_currentAction]);\n }\n debugSetCurrentNode(view, nextRenderNodeWithBinding(view, 0));\n return view.def.updateRenderer(debugCheckRenderNodeFn, view);\n function debugCheckRenderNodeFn(view, nodeIndex, argStyle) {\n var values = [];\n for (var _i = 3; _i < arguments.length; _i++) {\n values[_i - 3] = arguments[_i];\n }\n var nodeDef = view.def.nodes[nodeIndex];\n if (checkType === 0 /* CheckAndUpdate */) {\n debugCheckAndUpdateNode(view, nodeDef, argStyle, values);\n }\n else {\n debugCheckNoChangesNode(view, nodeDef, argStyle, values);\n }\n if (nodeDef.flags & 3 /* CatRenderNode */) {\n debugSetCurrentNode(view, nextRenderNodeWithBinding(view, nodeIndex));\n }\n return (nodeDef.flags & 224 /* CatPureExpression */) ?\n asPureExpressionData(view, nodeDef.nodeIndex).value :\n undefined;\n }\n}\nfunction debugCheckAndUpdateNode(view, nodeDef, argStyle, givenValues) {\n var changed = checkAndUpdateNode.apply(void 0, __spread([view, nodeDef, argStyle], givenValues));\n if (changed) {\n var values = argStyle === 1 /* Dynamic */ ? givenValues[0] : givenValues;\n if (nodeDef.flags & 16384 /* TypeDirective */) {\n var bindingValues = {};\n for (var i = 0; i < nodeDef.bindings.length; i++) {\n var binding = nodeDef.bindings[i];\n var value = values[i];\n if (binding.flags & 8 /* TypeProperty */) {\n bindingValues[normalizeDebugBindingName(binding.nonMinifiedName)] =\n normalizeDebugBindingValue(value);\n }\n }\n var elDef = nodeDef.parent;\n var el = asElementData(view, elDef.nodeIndex).renderElement;\n if (!elDef.element.name) {\n // a comment.\n view.renderer.setValue(el, \"bindings=\" + JSON.stringify(bindingValues, null, 2));\n }\n else {\n // a regular element.\n for (var attr in bindingValues) {\n var value = bindingValues[attr];\n if (value != null) {\n view.renderer.setAttribute(el, attr, value);\n }\n else {\n view.renderer.removeAttribute(el, attr);\n }\n }\n }\n }\n }\n}\nfunction debugCheckNoChangesNode(view, nodeDef, argStyle, values) {\n checkNoChangesNode.apply(void 0, __spread([view, nodeDef, argStyle], values));\n}\nfunction normalizeDebugBindingName(name) {\n // Attribute names with `$` (eg `x-y$`) are valid per spec, but unsupported by some browsers\n name = camelCaseToDashCase(name.replace(/[$@]/g, '_'));\n return \"ng-reflect-\" + name;\n}\nvar CAMEL_CASE_REGEXP = /([A-Z])/g;\nfunction camelCaseToDashCase(input) {\n return input.replace(CAMEL_CASE_REGEXP, function () {\n var m = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n m[_i] = arguments[_i];\n }\n return '-' + m[1].toLowerCase();\n });\n}\nfunction normalizeDebugBindingValue(value) {\n try {\n // Limit the size of the value as otherwise the DOM just gets polluted.\n return value != null ? value.toString().slice(0, 30) : value;\n }\n catch (e) {\n return '[ERROR] Exception while trying to serialize the value';\n }\n}\nfunction nextDirectiveWithBinding(view, nodeIndex) {\n for (var i = nodeIndex; i < view.def.nodes.length; i++) {\n var nodeDef = view.def.nodes[i];\n if (nodeDef.flags & 16384 /* TypeDirective */ && nodeDef.bindings && nodeDef.bindings.length) {\n return i;\n }\n }\n return null;\n}\nfunction nextRenderNodeWithBinding(view, nodeIndex) {\n for (var i = nodeIndex; i < view.def.nodes.length; i++) {\n var nodeDef = view.def.nodes[i];\n if ((nodeDef.flags & 3 /* CatRenderNode */) && nodeDef.bindings && nodeDef.bindings.length) {\n return i;\n }\n }\n return null;\n}\nvar DebugContext_ = /** @class */ (function () {\n function DebugContext_(view, nodeIndex) {\n this.view = view;\n this.nodeIndex = nodeIndex;\n if (nodeIndex == null) {\n this.nodeIndex = nodeIndex = 0;\n }\n this.nodeDef = view.def.nodes[nodeIndex];\n var elDef = this.nodeDef;\n var elView = view;\n while (elDef && (elDef.flags & 1 /* TypeElement */) === 0) {\n elDef = elDef.parent;\n }\n if (!elDef) {\n while (!elDef && elView) {\n elDef = viewParentEl(elView);\n elView = elView.parent;\n }\n }\n this.elDef = elDef;\n this.elView = elView;\n }\n Object.defineProperty(DebugContext_.prototype, \"elOrCompView\", {\n get: function () {\n // Has to be done lazily as we use the DebugContext also during creation of elements...\n return asElementData(this.elView, this.elDef.nodeIndex).componentView || this.view;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugContext_.prototype, \"injector\", {\n get: function () { return createInjector$1(this.elView, this.elDef); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugContext_.prototype, \"component\", {\n get: function () { return this.elOrCompView.component; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugContext_.prototype, \"context\", {\n get: function () { return this.elOrCompView.context; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugContext_.prototype, \"providerTokens\", {\n get: function () {\n var tokens = [];\n if (this.elDef) {\n for (var i = this.elDef.nodeIndex + 1; i <= this.elDef.nodeIndex + this.elDef.childCount; i++) {\n var childDef = this.elView.def.nodes[i];\n if (childDef.flags & 20224 /* CatProvider */) {\n tokens.push(childDef.provider.token);\n }\n i += childDef.childCount;\n }\n }\n return tokens;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugContext_.prototype, \"references\", {\n get: function () {\n var references = {};\n if (this.elDef) {\n collectReferences(this.elView, this.elDef, references);\n for (var i = this.elDef.nodeIndex + 1; i <= this.elDef.nodeIndex + this.elDef.childCount; i++) {\n var childDef = this.elView.def.nodes[i];\n if (childDef.flags & 20224 /* CatProvider */) {\n collectReferences(this.elView, childDef, references);\n }\n i += childDef.childCount;\n }\n }\n return references;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugContext_.prototype, \"componentRenderElement\", {\n get: function () {\n var elData = findHostElement(this.elOrCompView);\n return elData ? elData.renderElement : undefined;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugContext_.prototype, \"renderNode\", {\n get: function () {\n return this.nodeDef.flags & 2 /* TypeText */ ? renderNode(this.view, this.nodeDef) :\n renderNode(this.elView, this.elDef);\n },\n enumerable: true,\n configurable: true\n });\n DebugContext_.prototype.logError = function (console) {\n var values = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n values[_i - 1] = arguments[_i];\n }\n var logViewDef;\n var logNodeIndex;\n if (this.nodeDef.flags & 2 /* TypeText */) {\n logViewDef = this.view.def;\n logNodeIndex = this.nodeDef.nodeIndex;\n }\n else {\n logViewDef = this.elView.def;\n logNodeIndex = this.elDef.nodeIndex;\n }\n // Note: we only generate a log function for text and element nodes\n // to make the generated code as small as possible.\n var renderNodeIndex = getRenderNodeIndex(logViewDef, logNodeIndex);\n var currRenderNodeIndex = -1;\n var nodeLogger = function () {\n currRenderNodeIndex++;\n if (currRenderNodeIndex === renderNodeIndex) {\n return (_a = console.error).bind.apply(_a, __spread([console], values));\n }\n else {\n return NOOP;\n }\n var _a;\n };\n logViewDef.factory(nodeLogger);\n if (currRenderNodeIndex < renderNodeIndex) {\n console.error('Illegal state: the ViewDefinitionFactory did not call the logger!');\n console.error.apply(console, __spread(values));\n }\n };\n return DebugContext_;\n}());\nfunction getRenderNodeIndex(viewDef$$1, nodeIndex) {\n var renderNodeIndex = -1;\n for (var i = 0; i <= nodeIndex; i++) {\n var nodeDef = viewDef$$1.nodes[i];\n if (nodeDef.flags & 3 /* CatRenderNode */) {\n renderNodeIndex++;\n }\n }\n return renderNodeIndex;\n}\nfunction findHostElement(view) {\n while (view && !isComponentView(view)) {\n view = view.parent;\n }\n if (view.parent) {\n return asElementData(view.parent, viewParentEl(view).nodeIndex);\n }\n return null;\n}\nfunction collectReferences(view, nodeDef, references) {\n for (var refName in nodeDef.references) {\n references[refName] = getQueryValue(view, nodeDef, nodeDef.references[refName]);\n }\n}\nfunction callWithDebugContext(action, fn, self, args) {\n var oldAction = _currentAction;\n var oldView = _currentView;\n var oldNodeIndex = _currentNodeIndex;\n try {\n _currentAction = action;\n var result = fn.apply(self, args);\n _currentView = oldView;\n _currentNodeIndex = oldNodeIndex;\n _currentAction = oldAction;\n return result;\n }\n catch (e) {\n if (isViewDebugError(e) || !_currentView) {\n throw e;\n }\n throw viewWrappedDebugError(e, getCurrentDebugContext());\n }\n}\nfunction getCurrentDebugContext() {\n return _currentView ? new DebugContext_(_currentView, _currentNodeIndex) : null;\n}\nvar DebugRendererFactory2 = /** @class */ (function () {\n function DebugRendererFactory2(delegate) {\n this.delegate = delegate;\n }\n DebugRendererFactory2.prototype.createRenderer = function (element, renderData) {\n return new DebugRenderer2(this.delegate.createRenderer(element, renderData));\n };\n DebugRendererFactory2.prototype.begin = function () {\n if (this.delegate.begin) {\n this.delegate.begin();\n }\n };\n DebugRendererFactory2.prototype.end = function () {\n if (this.delegate.end) {\n this.delegate.end();\n }\n };\n DebugRendererFactory2.prototype.whenRenderingDone = function () {\n if (this.delegate.whenRenderingDone) {\n return this.delegate.whenRenderingDone();\n }\n return Promise.resolve(null);\n };\n return DebugRendererFactory2;\n}());\nvar DebugRenderer2 = /** @class */ (function () {\n function DebugRenderer2(delegate) {\n this.delegate = delegate;\n this.data = this.delegate.data;\n }\n DebugRenderer2.prototype.destroyNode = function (node) {\n removeDebugNodeFromIndex(getDebugNode(node));\n if (this.delegate.destroyNode) {\n this.delegate.destroyNode(node);\n }\n };\n DebugRenderer2.prototype.destroy = function () { this.delegate.destroy(); };\n DebugRenderer2.prototype.createElement = function (name, namespace) {\n var el = this.delegate.createElement(name, namespace);\n var debugCtx = getCurrentDebugContext();\n if (debugCtx) {\n var debugEl = new DebugElement(el, null, debugCtx);\n debugEl.name = name;\n indexDebugNode(debugEl);\n }\n return el;\n };\n DebugRenderer2.prototype.createComment = function (value) {\n var comment = this.delegate.createComment(value);\n var debugCtx = getCurrentDebugContext();\n if (debugCtx) {\n indexDebugNode(new DebugNode(comment, null, debugCtx));\n }\n return comment;\n };\n DebugRenderer2.prototype.createText = function (value) {\n var text = this.delegate.createText(value);\n var debugCtx = getCurrentDebugContext();\n if (debugCtx) {\n indexDebugNode(new DebugNode(text, null, debugCtx));\n }\n return text;\n };\n DebugRenderer2.prototype.appendChild = function (parent, newChild) {\n var debugEl = getDebugNode(parent);\n var debugChildEl = getDebugNode(newChild);\n if (debugEl && debugChildEl && debugEl instanceof DebugElement) {\n debugEl.addChild(debugChildEl);\n }\n this.delegate.appendChild(parent, newChild);\n };\n DebugRenderer2.prototype.insertBefore = function (parent, newChild, refChild) {\n var debugEl = getDebugNode(parent);\n var debugChildEl = getDebugNode(newChild);\n var debugRefEl = getDebugNode(refChild);\n if (debugEl && debugChildEl && debugEl instanceof DebugElement) {\n debugEl.insertBefore(debugRefEl, debugChildEl);\n }\n this.delegate.insertBefore(parent, newChild, refChild);\n };\n DebugRenderer2.prototype.removeChild = function (parent, oldChild) {\n var debugEl = getDebugNode(parent);\n var debugChildEl = getDebugNode(oldChild);\n if (debugEl && debugChildEl && debugEl instanceof DebugElement) {\n debugEl.removeChild(debugChildEl);\n }\n this.delegate.removeChild(parent, oldChild);\n };\n DebugRenderer2.prototype.selectRootElement = function (selectorOrNode) {\n var el = this.delegate.selectRootElement(selectorOrNode);\n var debugCtx = getCurrentDebugContext();\n if (debugCtx) {\n indexDebugNode(new DebugElement(el, null, debugCtx));\n }\n return el;\n };\n DebugRenderer2.prototype.setAttribute = function (el, name, value, namespace) {\n var debugEl = getDebugNode(el);\n if (debugEl && debugEl instanceof DebugElement) {\n var fullName = namespace ? namespace + ':' + name : name;\n debugEl.attributes[fullName] = value;\n }\n this.delegate.setAttribute(el, name, value, namespace);\n };\n DebugRenderer2.prototype.removeAttribute = function (el, name, namespace) {\n var debugEl = getDebugNode(el);\n if (debugEl && debugEl instanceof DebugElement) {\n var fullName = namespace ? namespace + ':' + name : name;\n debugEl.attributes[fullName] = null;\n }\n this.delegate.removeAttribute(el, name, namespace);\n };\n DebugRenderer2.prototype.addClass = function (el, name) {\n var debugEl = getDebugNode(el);\n if (debugEl && debugEl instanceof DebugElement) {\n debugEl.classes[name] = true;\n }\n this.delegate.addClass(el, name);\n };\n DebugRenderer2.prototype.removeClass = function (el, name) {\n var debugEl = getDebugNode(el);\n if (debugEl && debugEl instanceof DebugElement) {\n debugEl.classes[name] = false;\n }\n this.delegate.removeClass(el, name);\n };\n DebugRenderer2.prototype.setStyle = function (el, style, value, flags) {\n var debugEl = getDebugNode(el);\n if (debugEl && debugEl instanceof DebugElement) {\n debugEl.styles[style] = value;\n }\n this.delegate.setStyle(el, style, value, flags);\n };\n DebugRenderer2.prototype.removeStyle = function (el, style, flags) {\n var debugEl = getDebugNode(el);\n if (debugEl && debugEl instanceof DebugElement) {\n debugEl.styles[style] = null;\n }\n this.delegate.removeStyle(el, style, flags);\n };\n DebugRenderer2.prototype.setProperty = function (el, name, value) {\n var debugEl = getDebugNode(el);\n if (debugEl && debugEl instanceof DebugElement) {\n debugEl.properties[name] = value;\n }\n this.delegate.setProperty(el, name, value);\n };\n DebugRenderer2.prototype.listen = function (target, eventName, callback) {\n if (typeof target !== 'string') {\n var debugEl = getDebugNode(target);\n if (debugEl) {\n debugEl.listeners.push(new EventListener(eventName, callback));\n }\n }\n return this.delegate.listen(target, eventName, callback);\n };\n DebugRenderer2.prototype.parentNode = function (node) { return this.delegate.parentNode(node); };\n DebugRenderer2.prototype.nextSibling = function (node) { return this.delegate.nextSibling(node); };\n DebugRenderer2.prototype.setValue = function (node, value) { return this.delegate.setValue(node, value); };\n return DebugRenderer2;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction overrideProvider(override) {\n initServicesIfNeeded();\n return Services.overrideProvider(override);\n}\nfunction overrideComponentView(comp, componentFactory) {\n initServicesIfNeeded();\n return Services.overrideComponentView(comp, componentFactory);\n}\nfunction clearOverrides() {\n initServicesIfNeeded();\n return Services.clearOverrides();\n}\n// Attention: this function is called as top level function.\n// Putting any logic in here will destroy closure tree shaking!\nfunction createNgModuleFactory(ngModuleType, bootstrapComponents, defFactory) {\n return new NgModuleFactory_(ngModuleType, bootstrapComponents, defFactory);\n}\nvar NgModuleFactory_ = /** @class */ (function (_super) {\n __extends(NgModuleFactory_, _super);\n function NgModuleFactory_(moduleType, _bootstrapComponents, _ngModuleDefFactory) {\n var _this = \n // Attention: this ctor is called as top level function.\n // Putting any logic in here will destroy closure tree shaking!\n _super.call(this) || this;\n _this.moduleType = moduleType;\n _this._bootstrapComponents = _bootstrapComponents;\n _this._ngModuleDefFactory = _ngModuleDefFactory;\n return _this;\n }\n NgModuleFactory_.prototype.create = function (parentInjector) {\n initServicesIfNeeded();\n var def = resolveDefinition(this._ngModuleDefFactory);\n return Services.createNgModuleRef(this.moduleType, parentInjector || Injector.NULL, this._bootstrapComponents, def);\n };\n return NgModuleFactory_;\n}(NgModuleFactory));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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// The functions in this file verify that the assumptions we are making\n// about state in an instruction are correct before implementing any logic.\n// They are meant only to be called in dev mode as sanity checks.\n\nfunction assertEqual(actual, expected, msg) {\n if (actual != expected) {\n throwError(msg);\n }\n}\nfunction assertNotEqual(actual, expected, msg) {\n if (actual == expected) {\n throwError(msg);\n }\n}\nfunction assertSame(actual, expected, msg) {\n if (actual !== expected) {\n throwError(msg);\n }\n}\nfunction assertLessThan(actual, expected, msg) {\n if (actual >= expected) {\n throwError(msg);\n }\n}\nfunction assertGreaterThan(actual, expected, msg) {\n if (actual <= expected) {\n throwError(msg);\n }\n}\nfunction assertNull(actual, msg) {\n if (actual != null) {\n throwError(msg);\n }\n}\nfunction assertNotNull(actual, msg) {\n if (actual == null) {\n throwError(msg);\n }\n}\nfunction assertComponentType(actual, msg) {\n if (msg === void 0) { msg = 'Type passed in is not ComponentType, it does not have \\'ngComponentDef\\' property.'; }\n if (!actual.ngComponentDef) {\n throwError(msg);\n }\n}\nfunction throwError(msg) {\n debugger; // Left intentionally for better debugger experience.\n throw new Error(\"ASSERTION ERROR: \" + msg);\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * If this is the first template pass, any ngOnInit or ngDoCheck hooks will be queued into\n * TView.initHooks during directiveCreate.\n *\n * The directive index and hook type are encoded into one number (1st bit: type, remaining bits:\n * directive index), then saved in the even indices of the initHooks array. The odd indices\n * hold the hook functions themselves.\n *\n * @param index The index of the directive in LView.data\n * @param hooks The static hooks map on the directive def\n * @param tView The current TView\n */\nfunction queueInitHooks(index, onInit, doCheck, tView) {\n ngDevMode &&\n assertEqual(tView.firstTemplatePass, true, 'Should only be called on first template pass');\n if (onInit) {\n (tView.initHooks || (tView.initHooks = [])).push(index, onInit);\n }\n if (doCheck) {\n (tView.initHooks || (tView.initHooks = [])).push(index, doCheck);\n (tView.checkHooks || (tView.checkHooks = [])).push(index, doCheck);\n }\n}\n/**\n * Loops through the directives on a node and queues all their hooks except ngOnInit\n * and ngDoCheck, which are queued separately in directiveCreate.\n */\nfunction queueLifecycleHooks(flags, currentView) {\n var tView = currentView.tView;\n if (tView.firstTemplatePass === true) {\n var start = flags >> 13;\n var count = flags & 4095;\n var end = start + count;\n // It's necessary to loop through the directives at elementEnd() (rather than processing in\n // directiveCreate) so we can preserve the current hook order. Content, view, and destroy\n // hooks for projected components and directives must be called *before* their hosts.\n for (var i = start; i < end; i++) {\n var def = tView.directives[i];\n queueContentHooks(def, tView, i);\n queueViewHooks(def, tView, i);\n queueDestroyHooks(def, tView, i);\n }\n }\n}\n/** Queues afterContentInit and afterContentChecked hooks on TView */\nfunction queueContentHooks(def, tView, i) {\n if (def.afterContentInit) {\n (tView.contentHooks || (tView.contentHooks = [])).push(i, def.afterContentInit);\n }\n if (def.afterContentChecked) {\n (tView.contentHooks || (tView.contentHooks = [])).push(i, def.afterContentChecked);\n (tView.contentCheckHooks || (tView.contentCheckHooks = [])).push(i, def.afterContentChecked);\n }\n}\n/** Queues afterViewInit and afterViewChecked hooks on TView */\nfunction queueViewHooks(def, tView, i) {\n if (def.afterViewInit) {\n (tView.viewHooks || (tView.viewHooks = [])).push(i, def.afterViewInit);\n }\n if (def.afterViewChecked) {\n (tView.viewHooks || (tView.viewHooks = [])).push(i, def.afterViewChecked);\n (tView.viewCheckHooks || (tView.viewCheckHooks = [])).push(i, def.afterViewChecked);\n }\n}\n/** Queues onDestroy hooks on TView */\nfunction queueDestroyHooks(def, tView, i) {\n if (def.onDestroy != null) {\n (tView.destroyHooks || (tView.destroyHooks = [])).push(i, def.onDestroy);\n }\n}\n/**\n * Calls onInit and doCheck calls if they haven't already been called.\n *\n * @param currentView The current view\n */\nfunction executeInitHooks(currentView, tView, creationMode) {\n if (currentView.lifecycleStage === 1 /* Init */) {\n executeHooks(currentView.directives, tView.initHooks, tView.checkHooks, creationMode);\n currentView.lifecycleStage = 2 /* AfterInit */;\n }\n}\n/**\n * Iterates over afterViewInit and afterViewChecked functions and calls them.\n *\n * @param currentView The current view\n */\nfunction executeHooks(data, allHooks, checkHooks, creationMode) {\n var hooksToCall = creationMode ? allHooks : checkHooks;\n if (hooksToCall) {\n callHooks(data, hooksToCall);\n }\n}\n/**\n * Calls lifecycle hooks with their contexts, skipping init hooks if it's not\n * creation mode.\n *\n * @param currentView The current view\n * @param arr The array in which the hooks are found\n */\nfunction callHooks(data, arr) {\n for (var i = 0; i < arr.length; i += 2) {\n arr[i + 1].call(data[arr[i]]);\n }\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nif (typeof ngDevMode == 'undefined') {\n if (typeof window != 'undefined')\n window.ngDevMode = true;\n if (typeof self != 'undefined')\n self.ngDevMode = true;\n if (typeof global != 'undefined')\n global.ngDevMode = true;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar NG_PROJECT_AS_ATTR_NAME = 'ngProjectAs';\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction assertNodeType(node, type) {\n assertNotNull(node, 'should be called with a node');\n assertEqual(node.type, type, \"should be a \" + typeName(type));\n}\nfunction assertNodeOfPossibleTypes(node) {\n var types = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n types[_i - 1] = arguments[_i];\n }\n assertNotNull(node, 'should be called with a node');\n var found = types.some(function (type) { return node.type === type; });\n assertEqual(found, true, \"Should be one of \" + types.map(typeName).join(', '));\n}\nfunction typeName(type) {\n if (type == 1 /* Projection */)\n return 'Projection';\n if (type == 0 /* Container */)\n return 'Container';\n if (type == 2 /* View */)\n return 'View';\n if (type == 3 /* Element */)\n return 'Element';\n return '<unknown>';\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// TODO: cleanup once the code is merged in angular/angular\nvar RendererStyleFlags3;\n(function (RendererStyleFlags3) {\n RendererStyleFlags3[RendererStyleFlags3[\"Important\"] = 1] = \"Important\";\n RendererStyleFlags3[RendererStyleFlags3[\"DashCase\"] = 2] = \"DashCase\";\n})(RendererStyleFlags3 || (RendererStyleFlags3 = {}));\n/** Returns whether the `renderer` is a `ProceduralRenderer3` */\nfunction isProceduralRenderer(renderer) {\n return !!(renderer.listen);\n}\nvar domRendererFactory3 = {\n createRenderer: function (hostElement, rendererType) { return document; }\n};\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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* Must use this method for CD (instead of === ) since NaN !== NaN\n*/\nfunction isDifferent(a, b) {\n // NaN is the only value that is not equal to itself so the first\n // test checks if both a and b are not NaN\n return !(a !== a && b !== b) && a !== b;\n}\nfunction stringify$1(value) {\n if (typeof value == 'function')\n return value.name || value;\n if (typeof value == 'string')\n return value;\n if (value == null)\n return '';\n return '' + value;\n}\n/**\n * Function that throws a \"not implemented\" error so it's clear certain\n * behaviors/methods aren't yet ready.\n *\n * @returns Not implemented error\n */\nfunction notImplemented() {\n return new Error('NotImplemented');\n}\n/**\n * Flattens an array in non-recursive way. Input arrays are not modified.\n */\nfunction flatten$1(list) {\n var result = [];\n var i = 0;\n while (i < list.length) {\n var item = list[i];\n if (Array.isArray(item)) {\n if (item.length > 0) {\n list = item.concat(list.slice(i + 1));\n i = 0;\n }\n else {\n i++;\n }\n }\n else {\n result.push(item);\n i++;\n }\n }\n return result;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Returns the first RNode following the given LNode in the same parent DOM element.\n *\n * This is needed in order to insert the given node with insertBefore.\n *\n * @param node The node whose following DOM node must be found.\n * @param stopNode A parent node at which the lookup in the tree should be stopped, or null if the\n * lookup should not be stopped until the result is found.\n * @returns RNode before which the provided node should be inserted or null if the lookup was\n * stopped\n * or if there is no native node after the given logical node in the same native parent.\n */\nfunction findNextRNodeSibling(node, stopNode) {\n var currentNode = node;\n while (currentNode && currentNode !== stopNode) {\n var pNextOrParent = currentNode.pNextOrParent;\n if (pNextOrParent) {\n while (pNextOrParent.type !== 1 /* Projection */) {\n var nativeNode = findFirstRNode(pNextOrParent);\n if (nativeNode) {\n return nativeNode;\n }\n pNextOrParent = pNextOrParent.pNextOrParent;\n }\n currentNode = pNextOrParent;\n }\n else {\n var currentSibling = currentNode.next;\n while (currentSibling) {\n var nativeNode = findFirstRNode(currentSibling);\n if (nativeNode) {\n return nativeNode;\n }\n currentSibling = currentSibling.next;\n }\n var parentNode = currentNode.parent;\n currentNode = null;\n if (parentNode) {\n var parentType = parentNode.type;\n if (parentType === 0 /* Container */ || parentType === 2 /* View */) {\n currentNode = parentNode;\n }\n }\n }\n }\n return null;\n}\n/**\n * Get the next node in the LNode tree, taking into account the place where a node is\n * projected (in the shadow DOM) rather than where it comes from (in the light DOM).\n *\n * @param node The node whose next node in the LNode tree must be found.\n * @return LNode|null The next sibling in the LNode tree.\n */\nfunction getNextLNodeWithProjection(node) {\n var pNextOrParent = node.pNextOrParent;\n if (pNextOrParent) {\n // The node is projected\n var isLastProjectedNode = pNextOrParent.type === 1;\n // returns pNextOrParent if we are not at the end of the list, null otherwise\n return isLastProjectedNode ? null : pNextOrParent;\n }\n // returns node.next because the the node is not projected\n return node.next;\n}\n/**\n * Find the next node in the LNode tree, taking into account the place where a node is\n * projected (in the shadow DOM) rather than where it comes from (in the light DOM).\n *\n * If there is no sibling node, this function goes to the next sibling of the parent node...\n * until it reaches rootNode (at which point null is returned).\n *\n * @param initialNode The node whose following node in the LNode tree must be found.\n * @param rootNode The root node at which the lookup should stop.\n * @return LNode|null The following node in the LNode tree.\n */\nfunction getNextOrParentSiblingNode(initialNode, rootNode) {\n var node = initialNode;\n var nextNode = getNextLNodeWithProjection(node);\n while (node && !nextNode) {\n // if node.pNextOrParent is not null here, it is not the next node\n // (because, at this point, nextNode is null, so it is the parent)\n node = node.pNextOrParent || node.parent;\n if (node === rootNode) {\n return null;\n }\n nextNode = node && getNextLNodeWithProjection(node);\n }\n return nextNode;\n}\n/**\n * Returns the first RNode inside the given LNode.\n *\n * @param node The node whose first DOM node must be found\n * @returns RNode The first RNode of the given LNode or null if there is none.\n */\nfunction findFirstRNode(rootNode) {\n var node = rootNode;\n while (node) {\n var nextNode = null;\n if (node.type === 3 /* Element */) {\n // A LElementNode has a matching RNode in LElementNode.native\n return node.native;\n }\n else if (node.type === 0 /* Container */) {\n var lContainerNode = node;\n var childContainerData = lContainerNode.dynamicLContainerNode ?\n lContainerNode.dynamicLContainerNode.data :\n lContainerNode.data;\n nextNode = childContainerData.views.length ? childContainerData.views[0].child : null;\n }\n else if (node.type === 1 /* Projection */) {\n // For Projection look at the first projected node\n nextNode = node.data.head;\n }\n else {\n // Otherwise look at the first child\n nextNode = node.child;\n }\n node = nextNode === null ? getNextOrParentSiblingNode(node, rootNode) : nextNode;\n }\n return null;\n}\nfunction createTextNode(value, renderer) {\n return isProceduralRenderer(renderer) ? renderer.createText(stringify$1(value)) :\n renderer.createTextNode(stringify$1(value));\n}\nfunction addRemoveViewFromContainer(container, rootNode, insertMode, beforeNode) {\n ngDevMode && assertNodeType(container, 0 /* Container */);\n ngDevMode && assertNodeType(rootNode, 2 /* View */);\n var parentNode = container.data.renderParent;\n var parent = parentNode ? parentNode.native : null;\n var node = rootNode.child;\n if (parent) {\n while (node) {\n var nextNode = null;\n var renderer = container.view.renderer;\n if (node.type === 3 /* Element */) {\n if (insertMode) {\n if (!node.native) {\n // If the native element doesn't exist, this is a bound text node that hasn't yet been\n // created because update mode has not run (occurs when a bound text node is a root\n // node of a dynamically created view). See textBinding() in instructions for ctx.\n node.native = createTextNode('', renderer);\n }\n isProceduralRenderer(renderer) ?\n renderer.insertBefore(parent, node.native, beforeNode) :\n parent.insertBefore(node.native, beforeNode, true);\n }\n else {\n isProceduralRenderer(renderer) ? renderer.removeChild(parent, node.native) :\n parent.removeChild(node.native);\n }\n nextNode = node.next;\n }\n else if (node.type === 0 /* Container */) {\n // if we get to a container, it must be a root node of a view because we are only\n // propagating down into child views / containers and not child elements\n var childContainerData = node.data;\n childContainerData.renderParent = parentNode;\n nextNode = childContainerData.views.length ? childContainerData.views[0].child : null;\n }\n else if (node.type === 1 /* Projection */) {\n nextNode = node.data.head;\n }\n else {\n nextNode = node.child;\n }\n if (nextNode === null) {\n node = getNextOrParentSiblingNode(node, rootNode);\n }\n else {\n node = nextNode;\n }\n }\n }\n}\n/**\n * Traverses the tree of component views and containers to remove listeners and\n * call onDestroy callbacks.\n *\n * Notes:\n * - Because it's used for onDestroy calls, it needs to be bottom-up.\n * - Must process containers instead of their views to avoid splicing\n * when views are destroyed and re-added.\n * - Using a while loop because it's faster than recursion\n * - Destroy only called on movement to sibling or movement to parent (laterally or up)\n *\n * @param rootView The view to destroy\n */\nfunction destroyViewTree(rootView) {\n var viewOrContainer = rootView;\n while (viewOrContainer) {\n var next = null;\n if (viewOrContainer.views && viewOrContainer.views.length) {\n next = viewOrContainer.views[0].data;\n }\n else if (viewOrContainer.child) {\n next = viewOrContainer.child;\n }\n else if (viewOrContainer.next) {\n cleanUpView(viewOrContainer);\n next = viewOrContainer.next;\n }\n if (next == null) {\n // If the viewOrContainer is the rootView, then the cleanup is done twice.\n // Without this check, ngOnDestroy would be called twice for a directive on an element.\n while (viewOrContainer && !viewOrContainer.next && viewOrContainer !== rootView) {\n cleanUpView(viewOrContainer);\n viewOrContainer = getParentState(viewOrContainer, rootView);\n }\n cleanUpView(viewOrContainer || rootView);\n next = viewOrContainer && viewOrContainer.next;\n }\n viewOrContainer = next;\n }\n}\n/**\n * Inserts a view into a container.\n *\n * This adds the view to the container's array of active views in the correct\n * position. It also adds the view's elements to the DOM if the container isn't a\n * root node of another view (in that case, the view's elements will be added when\n * the container's parent view is added later).\n *\n * @param container The container into which the view should be inserted\n * @param newView The view to insert\n * @param index The index at which to insert the view\n * @returns The inserted view\n */\nfunction insertView(container, newView, index) {\n var state = container.data;\n var views = state.views;\n if (index > 0) {\n // This is a new view, we need to add it to the children.\n setViewNext(views[index - 1], newView);\n }\n if (index < views.length) {\n setViewNext(newView, views[index]);\n views.splice(index, 0, newView);\n }\n else {\n views.push(newView);\n }\n // If the container's renderParent is null, we know that it is a root node of its own parent view\n // and we should wait until that parent processes its nodes (otherwise, we will insert this view's\n // nodes twice - once now and once when its parent inserts its views).\n if (container.data.renderParent !== null) {\n var beforeNode = findNextRNodeSibling(newView, container);\n if (!beforeNode) {\n var containerNextNativeNode = container.native;\n if (containerNextNativeNode === undefined) {\n containerNextNativeNode = container.native = findNextRNodeSibling(container, null);\n }\n beforeNode = containerNextNativeNode;\n }\n addRemoveViewFromContainer(container, newView, true, beforeNode);\n }\n return newView;\n}\n/**\n * Removes a view from a container.\n *\n * This method splices the view from the container's array of active views. It also\n * removes the view's elements from the DOM and conducts cleanup (e.g. removing\n * listeners, calling onDestroys).\n *\n * @param container The container from which to remove a view\n * @param removeIndex The index of the view to remove\n * @returns The removed view\n */\nfunction removeView(container, removeIndex) {\n var views = container.data.views;\n var viewNode = views[removeIndex];\n if (removeIndex > 0) {\n setViewNext(views[removeIndex - 1], viewNode.next);\n }\n views.splice(removeIndex, 1);\n viewNode.next = null;\n destroyViewTree(viewNode.data);\n addRemoveViewFromContainer(container, viewNode, false);\n // Notify query that view has been removed\n container.data.queries && container.data.queries.removeView(removeIndex);\n return viewNode;\n}\n/**\n * Sets a next on the view node, so views in for loops can easily jump from\n * one view to the next to add/remove elements. Also adds the LView (view.data)\n * to the view tree for easy traversal when cleaning up the view.\n *\n * @param view The view to set up\n * @param next The view's new next\n */\nfunction setViewNext(view, next) {\n view.next = next;\n view.data.next = next ? next.data : null;\n}\n/**\n * Determines which LViewOrLContainer to jump to when traversing back up the\n * tree in destroyViewTree.\n *\n * Normally, the view's parent LView should be checked, but in the case of\n * embedded views, the container (which is the view node's parent, but not the\n * LView's parent) needs to be checked for a possible next property.\n *\n * @param state The LViewOrLContainer for which we need a parent state\n * @param rootView The rootView, so we don't propagate too far up the view tree\n * @returns The correct parent LViewOrLContainer\n */\nfunction getParentState(state, rootView) {\n var node;\n if ((node = state.node) && node.type === 2 /* View */) {\n // if it's an embedded view, the state needs to go up to the container, in case the\n // container has a next\n return node.parent.data;\n }\n else {\n // otherwise, use parent view for containers or component views\n return state.parent === rootView ? null : state.parent;\n }\n}\n/**\n * Removes all listeners and call all onDestroys in a given view.\n *\n * @param view The LView to clean up\n */\nfunction cleanUpView(view) {\n removeListeners(view);\n executeOnDestroys(view);\n executePipeOnDestroys(view);\n}\n/** Removes listeners and unsubscribes from output subscriptions */\nfunction removeListeners(view) {\n var cleanup = view.cleanup;\n if (cleanup != null) {\n for (var i = 0; i < cleanup.length - 1; i += 2) {\n if (typeof cleanup[i] === 'string') {\n cleanup[i + 1].removeEventListener(cleanup[i], cleanup[i + 2], cleanup[i + 3]);\n i += 2;\n }\n else {\n cleanup[i].call(cleanup[i + 1]);\n }\n }\n view.cleanup = null;\n }\n}\n/** Calls onDestroy hooks for this view */\nfunction executeOnDestroys(view) {\n var tView = view.tView;\n var destroyHooks;\n if (tView != null && (destroyHooks = tView.destroyHooks) != null) {\n callHooks(view.directives, destroyHooks);\n }\n}\n/** Calls pipe destroy hooks for this view */\nfunction executePipeOnDestroys(view) {\n var pipeDestroyHooks = view.tView && view.tView.pipeDestroyHooks;\n if (pipeDestroyHooks) {\n callHooks(view.data, pipeDestroyHooks);\n }\n}\n/**\n * Returns whether a native element should be inserted in the given parent.\n *\n * The native node can be inserted when its parent is:\n * - A regular element => Yes\n * - A component host element =>\n * - if the `currentView` === the parent `view`: The element is in the content (vs the\n * template)\n * => don't add as the parent component will project if needed.\n * - `currentView` !== the parent `view` => The element is in the template (vs the content),\n * add it\n * - View element => delay insertion, will be done on `viewEnd()`\n *\n * @param parent The parent in which to insert the child\n * @param currentView The LView being processed\n * @return boolean Whether the child element should be inserted.\n */\nfunction canInsertNativeNode(parent, currentView) {\n var parentIsElement = parent.type === 3;\n return parentIsElement &&\n (parent.view !== currentView || parent.data === null /* Regular Element. */);\n}\n/**\n * Appends the `child` element to the `parent`.\n *\n * The element insertion might be delayed {@link canInsertNativeNode}\n *\n * @param parent The parent to which to append the child\n * @param child The child that should be appended\n * @param currentView The current LView\n * @returns Whether or not the child was appended\n */\nfunction appendChild(parent, child, currentView) {\n if (child !== null && canInsertNativeNode(parent, currentView)) {\n // We only add element if not in View or not projected.\n var renderer = currentView.renderer;\n isProceduralRenderer(renderer) ? renderer.appendChild(parent.native, child) :\n parent.native.appendChild(child);\n return true;\n }\n return false;\n}\n/**\n * Inserts the provided node before the correct element in the DOM.\n *\n * The element insertion might be delayed {@link canInsertNativeNode}\n *\n * @param node Node to insert\n * @param currentView Current LView\n */\nfunction insertChild(node, currentView) {\n var parent = node.parent;\n if (canInsertNativeNode(parent, currentView)) {\n var nativeSibling = findNextRNodeSibling(node, null);\n var renderer = currentView.renderer;\n isProceduralRenderer(renderer) ?\n renderer.insertBefore(parent.native, node.native, nativeSibling) :\n parent.native.insertBefore(node.native, nativeSibling, false);\n }\n}\n/**\n * Appends a projected node to the DOM, or in the case of a projected container,\n * appends the nodes from all of the container's active views to the DOM.\n *\n * @param node The node to process\n * @param currentParent The last parent element to be processed\n * @param currentView Current LView\n */\nfunction appendProjectedNode(node, currentParent, currentView) {\n if (node.type !== 0 /* Container */) {\n appendChild(currentParent, node.native, currentView);\n }\n else {\n // The node we are adding is a Container and we are adding it to Element which\n // is not a component (no more re-projection).\n // Alternatively a container is projected at the root of a component's template\n // and can't be re-projected (as not content of any component).\n // Assignee the final projection location in those cases.\n var lContainer = node.data;\n lContainer.renderParent = currentParent;\n var views = lContainer.views;\n for (var i = 0; i < views.length; i++) {\n addRemoveViewFromContainer(node, views[i], true, null);\n }\n }\n if (node.dynamicLContainerNode) {\n node.dynamicLContainerNode.data.renderParent = currentParent;\n }\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction isCssClassMatching(nodeClassAttrVal, cssClassToMatch) {\n var nodeClassesLen = nodeClassAttrVal.length;\n var matchIndex = nodeClassAttrVal.indexOf(cssClassToMatch);\n var matchEndIdx = matchIndex + cssClassToMatch.length;\n if (matchIndex === -1 // no match\n || (matchIndex > 0 && nodeClassAttrVal[matchIndex - 1] !== ' ') // no space before\n ||\n (matchEndIdx < nodeClassesLen && nodeClassAttrVal[matchEndIdx] !== ' ')) {\n return false;\n }\n return true;\n}\n/**\n * A utility function to match an Ivy node static data against a simple CSS selector\n *\n * @param node static data to match\n * @param selector\n * @returns true if node matches the selector.\n */\nfunction isNodeMatchingSelector(tNode, selector) {\n ngDevMode && assertNotNull(selector[0], 'Selector should have a tag name');\n var mode = 4;\n var nodeAttrs = tNode.attrs;\n // When processing \":not\" selectors, we skip to the next \":not\" if the\n // current one doesn't match\n var skipToNextSelector = false;\n for (var i = 0; i < selector.length; i++) {\n var current = selector[i];\n if (typeof current === 'number') {\n // If we finish processing a :not selector and it hasn't failed, return false\n if (!skipToNextSelector && !isPositive(mode) && !isPositive(current)) {\n return false;\n }\n // If we are skipping to the next :not() and this mode flag is positive,\n // it's a part of the current :not() selector, and we should keep skipping\n if (skipToNextSelector && isPositive(current))\n continue;\n skipToNextSelector = false;\n mode = current | (mode & 1 /* NOT */);\n continue;\n }\n if (skipToNextSelector)\n continue;\n if (mode & 4 /* ELEMENT */) {\n mode = 2 /* ATTRIBUTE */ | mode & 1 /* NOT */;\n if (current !== '' && current !== tNode.tagName) {\n if (isPositive(mode))\n return false;\n skipToNextSelector = true;\n }\n }\n else {\n var attrName = mode & 8 /* CLASS */ ? 'class' : current;\n var attrIndexInNode = findAttrIndexInNode(attrName, nodeAttrs);\n if (attrIndexInNode === -1) {\n if (isPositive(mode))\n return false;\n skipToNextSelector = true;\n continue;\n }\n var selectorAttrValue = mode & 8 /* CLASS */ ? current : selector[++i];\n if (selectorAttrValue !== '') {\n var nodeAttrValue = nodeAttrs[attrIndexInNode + 1];\n if (mode & 8 /* CLASS */ &&\n !isCssClassMatching(nodeAttrValue, selectorAttrValue) ||\n mode & 2 /* ATTRIBUTE */ && selectorAttrValue !== nodeAttrValue) {\n if (isPositive(mode))\n return false;\n skipToNextSelector = true;\n }\n }\n }\n }\n return isPositive(mode) || skipToNextSelector;\n}\nfunction isPositive(mode) {\n return (mode & 1 /* NOT */) === 0;\n}\nfunction findAttrIndexInNode(name, attrs) {\n if (attrs === null)\n return -1;\n for (var i = 0; i < attrs.length; i += 2) {\n if (attrs[i] === name)\n return i;\n }\n return -1;\n}\nfunction isNodeMatchingSelectorList(tNode, selector) {\n for (var i = 0; i < selector.length; i++) {\n if (isNodeMatchingSelector(tNode, selector[i])) {\n return true;\n }\n }\n return false;\n}\nfunction getProjectAsAttrValue(tNode) {\n var nodeAttrs = tNode.attrs;\n if (nodeAttrs != null) {\n var ngProjectAsAttrIdx = nodeAttrs.indexOf(NG_PROJECT_AS_ATTR_NAME);\n // only check for ngProjectAs in attribute names, don't accidentally match attribute's value\n // (attribute names are stored at even indexes)\n if ((ngProjectAsAttrIdx & 1) === 0) {\n return nodeAttrs[ngProjectAsAttrIdx + 1];\n }\n }\n return null;\n}\n/**\n * Checks a given node against matching selectors and returns\n * selector index (or 0 if none matched).\n *\n * This function takes into account the ngProjectAs attribute: if present its value will be compared\n * to the raw (un-parsed) CSS selector instead of using standard selector matching logic.\n */\nfunction matchingSelectorIndex(tNode, selectors, textSelectors) {\n var ngProjectAsAttrVal = getProjectAsAttrValue(tNode);\n for (var i = 0; i < selectors.length; i++) {\n // if a node has the ngProjectAs attribute match it against unparsed selector\n // match a node against a parsed selector only if ngProjectAs attribute is not present\n if (ngProjectAsAttrVal === textSelectors[i] ||\n ngProjectAsAttrVal === null && isNodeMatchingSelectorList(tNode, selectors[i])) {\n return i + 1; // first matching selector \"captures\" a given node\n }\n }\n return 0;\n}\n\n/** Called when directives inject each other (creating a circular dependency) */\nfunction throwCyclicDependencyError(token) {\n throw new Error(\"Cannot instantiate cyclic dependency! \" + token);\n}\n/** Called when there are multiple component selectors that match a given node */\nfunction throwMultipleComponentError(tNode) {\n throw new Error(\"Multiple components match node with tagname \" + tNode.tagName);\n}\n/** Throws an ExpressionChangedAfterChecked error if checkNoChanges mode is on. */\nfunction throwErrorIfNoChangesMode(creationMode, checkNoChangesMode, oldValue, currValue) {\n if (checkNoChangesMode) {\n var msg = \"ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: '\" + oldValue + \"'. Current value: '\" + currValue + \"'.\";\n if (creationMode) {\n msg +=\n \" It seems like the view has been created after its parent and its children have been dirty checked.\" +\n \" Has it been created in a change detection hook ?\";\n }\n // TODO: include debug context\n throw new Error(msg);\n }\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * Directive (D) sets a property on all component instances using this constant as a key and the\n * component's host node (LElement) as the value. This is used in methods like detectChanges to\n * facilitate jumping from an instance to the host node.\n */\nvar NG_HOST_SYMBOL = '__ngHostLNode__';\n/**\n * A permanent marker promise which signifies that the current CD tree is\n * clean.\n */\nvar _CLEAN_PROMISE = Promise.resolve(null);\n/**\n * Directive and element indices for top-level directive.\n *\n * Saved here to avoid re-instantiating an array on every change detection run.\n */\nvar _ROOT_DIRECTIVE_INDICES = [0, 0];\n/**\n * Token set in currentMatches while dependencies are being resolved.\n *\n * If we visit a directive that has a value set to CIRCULAR, we know we've\n * already seen it, and thus have a circular dependency.\n */\nvar CIRCULAR$2 = '__CIRCULAR__';\n/**\n * This property gets set before entering a template.\n *\n * This renderer can be one of two varieties of Renderer3:\n *\n * - ObjectedOrientedRenderer3\n *\n * This is the native browser API style, e.g. operations are methods on individual objects\n * like HTMLElement. With this style, no additional code is needed as a facade (reducing payload\n * size).\n *\n * - ProceduralRenderer3\n *\n * In non-native browser environments (e.g. platforms such as web-workers), this is the facade\n * that enables element manipulation. This also facilitates backwards compatibility with\n * Renderer2.\n */\nvar renderer;\nvar rendererFactory;\nfunction getRenderer() {\n // top level variables should not be exported for performance reason (PERF_NOTES.md)\n return renderer;\n}\n/** Used to set the parent property when nodes are created. */\nvar previousOrParentNode;\nfunction getPreviousOrParentNode() {\n // top level variables should not be exported for performance reason (PERF_NOTES.md)\n return previousOrParentNode;\n}\n/**\n * If `isParent` is:\n * - `true`: then `previousOrParentNode` points to a parent node.\n * - `false`: then `previousOrParentNode` points to previous node (sibling).\n */\nvar isParent;\n/**\n * Static data that corresponds to the instance-specific data array on an LView.\n *\n * Each node's static data is stored in tData at the same index that it's stored\n * in the data array. Any nodes that do not have static data store a null value in\n * tData to avoid a sparse array.\n */\nvar tData;\n/**\n * State of the current view being processed.\n *\n * NOTE: we cheat here and initialize it to `null` even thought the type does not\n * contain `null`. This is because we expect this value to be not `null` as soon\n * as we enter the view. Declaring the type as `null` would require us to place `!`\n * in most instructions since they all assume that `currentView` is defined.\n */\nvar currentView = null;\nvar currentQueries;\nfunction getCurrentQueries(QueryType) {\n // top level variables should not be exported for performance reason (PERF_NOTES.md)\n return currentQueries || (currentQueries = new QueryType());\n}\n/**\n * This property gets set before entering a template.\n */\nvar creationMode;\nfunction getCreationMode() {\n // top level variables should not be exported for performance reason (PERF_NOTES.md)\n return creationMode;\n}\n/**\n * An array of nodes (text, element, container, etc), pipes, their bindings, and\n * any local variables that need to be stored between invocations.\n */\nvar data;\n/**\n * An array of directive instances in the current view.\n *\n * These must be stored separately from LNodes because their presence is\n * unknown at compile-time and thus space cannot be reserved in data[].\n */\nvar directives;\n/**\n * When a view is destroyed, listeners need to be released and outputs need to be\n * unsubscribed. This cleanup array stores both listener data (in chunks of 4)\n * and output data (in chunks of 2) for a particular view. Combining the arrays\n * saves on memory (70 bytes per array) and on a few bytes of code size (for two\n * separate for loops).\n *\n * If it's a listener being stored:\n * 1st index is: event name to remove\n * 2nd index is: native element\n * 3rd index is: listener function\n * 4th index is: useCapture boolean\n *\n * If it's an output subscription:\n * 1st index is: unsubscribe function\n * 2nd index is: context for function\n */\nvar cleanup;\n/**\n * In this mode, any changes in bindings will throw an ExpressionChangedAfterChecked error.\n *\n * Necessary to support ChangeDetectorRef.checkNoChanges().\n */\nvar checkNoChangesMode = false;\n/** Whether or not this is the first time the current view has been processed. */\nvar firstTemplatePass = true;\n/**\n * Swap the current state with a new state.\n *\n * For performance reasons we store the state 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 state for later, and when the view is\n * exited the state has to be restored\n *\n * @param newView New state to become active\n * @param host Element to which the View is a child of\n * @returns the previous state;\n */\nfunction enterView(newView, host) {\n var oldView = currentView;\n data = newView && newView.data;\n directives = newView && newView.directives;\n tData = newView && newView.tView.data;\n creationMode = newView && (newView.flags & 1 /* CreationMode */) === 1 /* CreationMode */;\n firstTemplatePass = newView && newView.tView.firstTemplatePass;\n cleanup = newView && newView.cleanup;\n renderer = newView && newView.renderer;\n if (newView && newView.bindingIndex < 0) {\n newView.bindingIndex = newView.bindingStartIndex;\n }\n if (host != null) {\n previousOrParentNode = host;\n isParent = true;\n }\n currentView = newView;\n currentQueries = newView && newView.queries;\n return oldView;\n}\n/**\n * Used in lieu of enterView to make it clear when we are exiting a child view. This makes\n * the direction of traversal (up or down the view tree) a bit clearer.\n */\nfunction leaveView(newView) {\n if (!checkNoChangesMode) {\n executeHooks(directives, currentView.tView.viewHooks, currentView.tView.viewCheckHooks, creationMode);\n }\n // Views should be clean and in update mode after being checked, so these bits are cleared\n currentView.flags &= ~(1 /* CreationMode */ | 4 /* Dirty */);\n currentView.lifecycleStage = 1 /* Init */;\n currentView.bindingIndex = -1;\n enterView(newView, null);\n}\n/** Refreshes directives in this view and triggers any init/content hooks. */\nfunction refreshDirectives() {\n executeInitAndContentHooks();\n var tView = currentView.tView;\n // This needs to be set before children are processed to support recursive components\n tView.firstTemplatePass = firstTemplatePass = false;\n setHostBindings(tView.hostBindings);\n refreshChildComponents(tView.components);\n}\n/** Sets the host bindings for the current view. */\nfunction setHostBindings(bindings) {\n if (bindings != null) {\n var defs = currentView.tView.directives;\n for (var i = 0; i < bindings.length; i += 2) {\n var dirIndex = bindings[i];\n var def = defs[dirIndex];\n def.hostBindings && def.hostBindings(dirIndex, bindings[i + 1]);\n }\n }\n}\n/** Refreshes child components in the current view. */\nfunction refreshChildComponents(components) {\n if (components != null) {\n for (var i = 0; i < components.length; i += 2) {\n componentRefresh(components[i], components[i + 1]);\n }\n }\n}\nfunction executeInitAndContentHooks() {\n if (!checkNoChangesMode) {\n var tView = currentView.tView;\n executeInitHooks(currentView, tView, creationMode);\n executeHooks(directives, tView.contentHooks, tView.contentCheckHooks, creationMode);\n }\n}\nfunction createLView(viewId, renderer, tView, template, context, flags) {\n var newView = {\n parent: currentView,\n id: viewId,\n flags: flags | 1 /* CreationMode */ | 8 /* Attached */,\n node: null,\n data: [],\n directives: null,\n tView: tView,\n cleanup: null,\n renderer: renderer,\n child: null,\n tail: null,\n next: null,\n bindingStartIndex: -1,\n bindingIndex: -1,\n template: template,\n context: context,\n dynamicViewCount: 0,\n lifecycleStage: 1 /* Init */,\n queries: null,\n injector: currentView && currentView.injector,\n };\n return newView;\n}\n/**\n * Creation of LNode object is extracted to a separate function so we always create LNode object\n * with the same shape\n * (same properties assigned in the same order).\n */\nfunction createLNodeObject(type, currentView, parent, native, state, queries) {\n return {\n type: type,\n native: native,\n view: currentView,\n parent: parent,\n child: null,\n next: null,\n nodeInjector: parent ? parent.nodeInjector : null,\n data: state,\n queries: queries,\n tNode: null,\n pNextOrParent: null,\n dynamicLContainerNode: null\n };\n}\nfunction createLNode(index, type, native, state) {\n var parent = isParent ? previousOrParentNode :\n previousOrParentNode && previousOrParentNode.parent;\n var queries = (isParent ? currentQueries : previousOrParentNode && previousOrParentNode.queries) ||\n parent && parent.queries && parent.queries.child();\n var isState = state != null;\n var node = createLNodeObject(type, currentView, parent, native, isState ? state : null, queries);\n if ((type & 2 /* ViewOrElement */) === 2 /* ViewOrElement */ && isState) {\n // Bit of a hack to bust through the readonly because there is a circular dep between\n // LView and LNode.\n ngDevMode && assertNull(state.node, 'LView.node should not have been initialized');\n state.node = node;\n }\n if (index != null) {\n // We are Element or Container\n ngDevMode && assertDataNext(index);\n data[index] = node;\n // Every node adds a value to the static data array to avoid a sparse array\n if (index >= tData.length) {\n tData[index] = null;\n }\n else {\n node.tNode = tData[index];\n }\n // Now link ourselves into the tree.\n if (isParent) {\n currentQueries = null;\n if (previousOrParentNode.view === currentView ||\n previousOrParentNode.type === 2 /* View */) {\n // We are in the same view, which means we are adding content node to the parent View.\n ngDevMode && assertNull(previousOrParentNode.child, \"previousOrParentNode's child should not have been set.\");\n previousOrParentNode.child = node;\n }\n else {\n // We are adding component view, so we don't link parent node child to this node.\n }\n }\n else if (previousOrParentNode) {\n ngDevMode && assertNull(previousOrParentNode.next, \"previousOrParentNode's next property should not have been set \" + index + \".\");\n previousOrParentNode.next = node;\n if (previousOrParentNode.dynamicLContainerNode) {\n previousOrParentNode.dynamicLContainerNode.next = node;\n }\n }\n }\n previousOrParentNode = node;\n isParent = true;\n return node;\n}\n//////////////////////////\n//// Render\n//////////////////////////\n/**\n * Resets the application state.\n */\nfunction resetApplicationState() {\n isParent = false;\n previousOrParentNode = null;\n}\n/**\n *\n * @param hostNode Existing node to render into.\n * @param template Template function with the instructions.\n * @param context to pass into the template.\n * @param providedRendererFactory renderer factory to use\n * @param host The host element node to use\n * @param directives Directive defs that should be used for matching\n * @param pipes Pipe defs that should be used for matching\n */\n\nfunction renderEmbeddedTemplate(viewNode, template, context, renderer, directives, pipes) {\n var _isParent = isParent;\n var _previousOrParentNode = previousOrParentNode;\n var oldView;\n try {\n isParent = true;\n previousOrParentNode = null;\n var rf = 2;\n if (viewNode == null) {\n var tView = getOrCreateTView(template, directives || null, pipes || null);\n var lView = createLView(-1, renderer, tView, template, context, 2 /* CheckAlways */);\n viewNode = createLNode(null, 2 /* View */, null, lView);\n rf = 1 /* Create */;\n }\n oldView = enterView(viewNode.data, viewNode);\n template(rf, context);\n refreshDirectives();\n refreshDynamicChildren();\n }\n finally {\n leaveView(oldView);\n isParent = _isParent;\n previousOrParentNode = _previousOrParentNode;\n }\n return viewNode;\n}\nfunction renderComponentOrTemplate(node, hostView, componentOrContext, template) {\n var oldView = enterView(hostView, node);\n try {\n if (rendererFactory.begin) {\n rendererFactory.begin();\n }\n if (template) {\n template(getRenderFlags(hostView), componentOrContext);\n refreshDynamicChildren();\n refreshDirectives();\n }\n else {\n executeInitAndContentHooks();\n // Element was stored at 0 in data and directive was stored at 0 in directives\n // in renderComponent()\n setHostBindings(_ROOT_DIRECTIVE_INDICES);\n componentRefresh(0, 0);\n }\n }\n finally {\n if (rendererFactory.end) {\n rendererFactory.end();\n }\n leaveView(oldView);\n }\n}\n/**\n * This function returns the default configuration of rendering flags depending on when the\n * template is in creation mode or update mode. By default, the update block is run with the\n * creation block when the view is in creation mode. Otherwise, the update block is run\n * alone.\n *\n * Dynamically created views do NOT use this configuration (update block and create block are\n * always run separately).\n */\nfunction getRenderFlags(view) {\n return view.flags & 1 /* CreationMode */ ? 1 /* Create */ | 2 /* Update */ :\n 2 /* Update */;\n}\n//////////////////////////\n//// Element\n//////////////////////////\n/**\n * Create DOM element. The instruction must later be followed by `elementEnd()` call.\n *\n * @param index Index of the element in the data array\n * @param name Name of the DOM Node\n * @param attrs Statically bound set of attributes to be written into the DOM element on creation.\n * @param localRefs A set of local reference bindings on the element.\n *\n * Attributes and localRefs are passed as an array of strings where elements with an even index\n * hold an attribute name and elements with an odd index hold an attribute value, ex.:\n * ['id', 'warning5', 'class', 'alert']\n */\nfunction elementStart(index, name, attrs, localRefs) {\n ngDevMode &&\n assertEqual(currentView.bindingStartIndex, -1, 'elements should be created before any bindings');\n var native = renderer.createElement(name);\n var node = createLNode(index, 3 /* Element */, native, null);\n if (attrs)\n setUpAttributes(native, attrs);\n appendChild(node.parent, native, currentView);\n createDirectivesAndLocals(index, name, attrs, localRefs, null);\n return native;\n}\nfunction createDirectivesAndLocals(index, name, attrs, localRefs, containerData) {\n var node = previousOrParentNode;\n if (firstTemplatePass) {\n ngDevMode && assertDataInRange(index - 1);\n node.tNode = tData[index] = createTNode(name, attrs || null, containerData);\n cacheMatchingDirectivesForNode(node.tNode, currentView.tView, localRefs || null);\n }\n else {\n instantiateDirectivesDirectly();\n }\n saveResolvedLocalsInData();\n}\n/**\n * On first template pass, we match each node against available directive selectors and save\n * the resulting defs in the correct instantiation order for subsequent change detection runs\n * (so dependencies are always created before the directives that inject them).\n */\nfunction cacheMatchingDirectivesForNode(tNode, tView, localRefs) {\n // Please make sure to have explicit type for `exportsMap`. Inferred type triggers bug in tsickle.\n var exportsMap = localRefs ? { '': -1 } : null;\n var matches = tView.currentMatches = findDirectiveMatches(tNode);\n if (matches) {\n for (var i = 0; i < matches.length; i += 2) {\n var def = matches[i];\n var valueIndex = i + 1;\n resolveDirective(def, valueIndex, matches, tView);\n saveNameToExportMap(matches[valueIndex], def, exportsMap);\n }\n }\n if (exportsMap)\n cacheMatchingLocalNames(tNode, localRefs, exportsMap);\n}\n/** Matches the current node against all available selectors. */\nfunction findDirectiveMatches(tNode) {\n var registry = currentView.tView.directiveRegistry;\n var matches = null;\n if (registry) {\n for (var i = 0; i < registry.length; i++) {\n var def = registry[i];\n if (isNodeMatchingSelectorList(tNode, def.selectors)) {\n if (def.template) {\n if (tNode.flags & 4096 /* isComponent */)\n throwMultipleComponentError(tNode);\n tNode.flags = 4096 /* isComponent */;\n }\n if (def.diPublic)\n def.diPublic(def);\n (matches || (matches = [])).push(def, null);\n }\n }\n }\n return matches;\n}\nfunction resolveDirective(def, valueIndex, matches, tView) {\n if (matches[valueIndex] === null) {\n matches[valueIndex] = CIRCULAR$2;\n var instance = def.factory();\n (tView.directives || (tView.directives = [])).push(def);\n return directiveCreate(matches[valueIndex] = tView.directives.length - 1, instance, def);\n }\n else if (matches[valueIndex] === CIRCULAR$2) {\n // If we revisit this directive before it's resolved, we know it's circular\n throwCyclicDependencyError(def.type);\n }\n return null;\n}\n/** Stores index of component's host element so it will be queued for view refresh during CD. */\nfunction queueComponentIndexForCheck(dirIndex) {\n if (firstTemplatePass) {\n (currentView.tView.components || (currentView.tView.components = [])).push(dirIndex, data.length - 1);\n }\n}\n/** Stores index of directive and host element so it will be queued for binding refresh during CD.\n */\nfunction queueHostBindingForCheck(dirIndex) {\n ngDevMode &&\n assertEqual(firstTemplatePass, true, 'Should only be called in first template pass.');\n (currentView.tView.hostBindings || (currentView.tView.hostBindings = [])).push(dirIndex, data.length - 1);\n}\n/** Sets the context for a ChangeDetectorRef to the given instance. */\nfunction initChangeDetectorIfExisting(injector, instance, view) {\n if (injector && injector.changeDetectorRef != null) {\n injector.changeDetectorRef._setComponentContext(view, instance);\n }\n}\nfunction isComponent(tNode) {\n return (tNode.flags & 4096 /* isComponent */) === 4096 /* isComponent */;\n}\n/**\n * This function instantiates the given directives.\n */\nfunction instantiateDirectivesDirectly() {\n var tNode = previousOrParentNode.tNode;\n var count = tNode.flags & 4095;\n if (count > 0) {\n var start = tNode.flags >> 13;\n var end = start + count;\n var tDirectives = currentView.tView.directives;\n for (var i = start; i < end; i++) {\n var def = tDirectives[i];\n directiveCreate(i, def.factory(), def);\n }\n }\n}\n/** Caches local names and their matching directive indices for query and template lookups. */\nfunction cacheMatchingLocalNames(tNode, localRefs, exportsMap) {\n if (localRefs) {\n var localNames = tNode.localNames = [];\n // Local names must be stored in tNode in the same order that localRefs are defined\n // in the template to ensure the data is loaded in the same slots as their refs\n // in the template (for template queries).\n for (var i = 0; i < localRefs.length; i += 2) {\n var index = exportsMap[localRefs[i + 1]];\n if (index == null)\n throw new Error(\"Export of name '\" + localRefs[i + 1] + \"' not found!\");\n localNames.push(localRefs[i], index);\n }\n }\n}\n/**\n * Builds up an export map as directives are created, so local refs can be quickly mapped\n * to their directive instances.\n */\nfunction saveNameToExportMap(index, def, exportsMap) {\n if (exportsMap) {\n if (def.exportAs)\n exportsMap[def.exportAs] = index;\n if (def.template)\n exportsMap[''] = index;\n }\n}\n/**\n * Takes a list of local names and indices and pushes the resolved local variable values\n * to data[] in the same order as they are loaded in the template with load().\n */\nfunction saveResolvedLocalsInData() {\n var localNames = previousOrParentNode.tNode.localNames;\n if (localNames) {\n for (var i = 0; i < localNames.length; i += 2) {\n var index = localNames[i + 1];\n var value = index === -1 ? previousOrParentNode.native : directives[index];\n data.push(value);\n }\n }\n}\n/**\n * Gets TView from a template function or creates a new TView\n * if it doesn't already exist.\n *\n * @param template The template from which to get static data\n * @param directives Directive defs that should be saved on TView\n * @param pipes Pipe defs that should be saved on TView\n * @returns TView\n */\nfunction getOrCreateTView(template, directives, pipes) {\n return template.ngPrivateData ||\n (template.ngPrivateData = createTView(directives, pipes));\n}\n/** Creates a TView instance */\nfunction createTView(defs, pipes) {\n return {\n data: [],\n directives: null,\n firstTemplatePass: true,\n initHooks: null,\n checkHooks: null,\n contentHooks: null,\n contentCheckHooks: null,\n viewHooks: null,\n viewCheckHooks: null,\n destroyHooks: null,\n pipeDestroyHooks: null,\n hostBindings: null,\n components: null,\n directiveRegistry: typeof defs === 'function' ? defs() : defs,\n pipeRegistry: typeof pipes === 'function' ? pipes() : pipes,\n currentMatches: null\n };\n}\nfunction setUpAttributes(native, attrs) {\n ngDevMode && assertEqual(attrs.length % 2, 0, 'each attribute should have a key and a value');\n var isProc = isProceduralRenderer(renderer);\n for (var i = 0; i < attrs.length; i += 2) {\n var attrName = attrs[i];\n if (attrName !== NG_PROJECT_AS_ATTR_NAME) {\n var attrVal = attrs[i + 1];\n isProc ? renderer.setAttribute(native, attrName, attrVal) :\n native.setAttribute(attrName, attrVal);\n }\n }\n}\nfunction createError(text, token) {\n return new Error(\"Renderer: \" + text + \" [\" + stringify$1(token) + \"]\");\n}\n/**\n * Locates the host native element, used for bootstrapping existing nodes into rendering pipeline.\n *\n * @param elementOrSelector Render element or CSS selector to locate the element.\n */\nfunction locateHostElement(factory, elementOrSelector) {\n ngDevMode && assertDataInRange(-1);\n rendererFactory = factory;\n var defaultRenderer = factory.createRenderer(null, null);\n var rNode = typeof elementOrSelector === 'string' ?\n (isProceduralRenderer(defaultRenderer) ?\n defaultRenderer.selectRootElement(elementOrSelector) :\n defaultRenderer.querySelector(elementOrSelector)) :\n elementOrSelector;\n if (ngDevMode && !rNode) {\n if (typeof elementOrSelector === 'string') {\n throw createError('Host node with selector not found:', elementOrSelector);\n }\n else {\n throw createError('Host node is required:', elementOrSelector);\n }\n }\n return rNode;\n}\n/**\n * Creates the host LNode.\n *\n * @param rNode Render host element.\n * @param def ComponentDef\n *\n * @returns LElementNode created\n */\nfunction hostElement(tag, rNode, def) {\n resetApplicationState();\n var node = createLNode(0, 3 /* Element */, rNode, createLView(-1, renderer, getOrCreateTView(def.template, def.directiveDefs, def.pipeDefs), null, null, def.onPush ? 4 /* Dirty */ : 2 /* CheckAlways */));\n if (firstTemplatePass) {\n node.tNode = createTNode(tag, null, null);\n node.tNode.flags = 4096 /* isComponent */;\n if (def.diPublic)\n def.diPublic(def);\n currentView.tView.directives = [def];\n }\n return node;\n}\n/**\n * Adds an event listener to the current node.\n *\n * If an output exists on one of the node's directives, it also subscribes to the output\n * and saves the subscription for later cleanup.\n *\n * @param eventName Name of the event\n * @param listenerFn The function to be called when event emits\n * @param useCapture Whether or not to use capture in event listener.\n */\nfunction listener(eventName, listenerFn, useCapture) {\n if (useCapture === void 0) { useCapture = false; }\n ngDevMode && assertPreviousIsParent();\n var node = previousOrParentNode;\n var native = node.native;\n // In order to match current behavior, native DOM event listeners must be added for all\n // events (including outputs).\n var cleanupFns = cleanup || (cleanup = currentView.cleanup = []);\n if (isProceduralRenderer(renderer)) {\n var wrappedListener = wrapListenerWithDirtyLogic(currentView, listenerFn);\n var cleanupFn = renderer.listen(native, eventName, wrappedListener);\n cleanupFns.push(cleanupFn, null);\n }\n else {\n var wrappedListener = wrapListenerWithDirtyAndDefault(currentView, listenerFn);\n native.addEventListener(eventName, wrappedListener, useCapture);\n cleanupFns.push(eventName, native, wrappedListener, useCapture);\n }\n var tNode = node.tNode;\n if (tNode.outputs === undefined) {\n // if we create TNode here, inputs must be undefined so we know they still need to be\n // checked\n tNode.outputs = generatePropertyAliases(node.tNode.flags, 1 /* Output */);\n }\n var outputs = tNode.outputs;\n var outputData;\n if (outputs && (outputData = outputs[eventName])) {\n createOutput(outputData, listenerFn);\n }\n}\n/**\n * Iterates through the outputs associated with a particular event name and subscribes to\n * each output.\n */\nfunction createOutput(outputs, listener) {\n for (var i = 0; i < outputs.length; i += 2) {\n ngDevMode && assertDataInRange(outputs[i], directives);\n var subscription = directives[outputs[i]][outputs[i + 1]].subscribe(listener);\n cleanup.push(subscription.unsubscribe, subscription);\n }\n}\n/** Mark the end of the element. */\nfunction elementEnd() {\n if (isParent) {\n isParent = false;\n }\n else {\n ngDevMode && assertHasParent();\n previousOrParentNode = previousOrParentNode.parent;\n }\n ngDevMode && assertNodeType(previousOrParentNode, 3 /* Element */);\n var queries = previousOrParentNode.queries;\n queries && queries.addNode(previousOrParentNode);\n queueLifecycleHooks(previousOrParentNode.tNode.flags, currentView);\n}\n/**\n * Updates the value of removes an attribute on an Element.\n *\n * @param number index The index of the element in the data array\n * @param name name The name of the attribute.\n * @param value value The attribute is removed when value is `null` or `undefined`.\n * Otherwise the attribute value is set to the stringified value.\n * @param sanitizer An optional function used to sanitize the value.\n */\nfunction elementAttribute(index, name, value, sanitizer) {\n if (value !== NO_CHANGE) {\n var element = data[index];\n if (value == null) {\n isProceduralRenderer(renderer) ? renderer.removeAttribute(element.native, name) :\n element.native.removeAttribute(name);\n }\n else {\n var strValue = sanitizer == null ? stringify$1(value) : sanitizer(value);\n isProceduralRenderer(renderer) ? renderer.setAttribute(element.native, name, strValue) :\n element.native.setAttribute(name, strValue);\n }\n }\n}\n/**\n * Update a property on an Element.\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new @Inputs don't have to be re-compiled.\n *\n * @param index The index of the element to update in the data array\n * @param propName Name of property. Because it is going to DOM, this is not subject to\n * renaming as part of minification.\n * @param value New value to write.\n * @param sanitizer An optional function used to sanitize the value.\n */\nfunction elementProperty(index, propName, value, sanitizer) {\n if (value === NO_CHANGE)\n return;\n var node = data[index];\n var tNode = node.tNode;\n // if tNode.inputs is undefined, a listener has created outputs, but inputs haven't\n // yet been checked\n if (tNode && tNode.inputs === undefined) {\n // mark inputs as checked\n tNode.inputs = generatePropertyAliases(node.tNode.flags, 0 /* Input */);\n }\n var inputData = tNode && tNode.inputs;\n var dataValue;\n if (inputData && (dataValue = inputData[propName])) {\n setInputsForProperty(dataValue, value);\n markDirtyIfOnPush(node);\n }\n else {\n // It is assumed that the sanitizer is only added when the compiler determines that the property\n // is risky, so sanitization can be done without further checks.\n value = sanitizer != null ? sanitizer(value) : value;\n var native = node.native;\n isProceduralRenderer(renderer) ? renderer.setProperty(native, propName, value) :\n (native.setProperty ? native.setProperty(propName, value) :\n native[propName] = value);\n }\n}\n/**\n * Constructs a TNode object from the arguments.\n *\n * @param tagName\n * @param attrs\n * @param data\n * @param localNames A list of local names and their matching indices\n * @returns the TNode object\n */\nfunction createTNode(tagName, attrs, data) {\n return {\n flags: 0,\n tagName: tagName,\n attrs: attrs,\n localNames: null,\n initialInputs: undefined,\n inputs: undefined,\n outputs: undefined,\n data: data\n };\n}\n/**\n * Given a list of directive indices and minified input names, sets the\n * input properties on the corresponding directives.\n */\nfunction setInputsForProperty(inputs, value) {\n for (var i = 0; i < inputs.length; i += 2) {\n ngDevMode && assertDataInRange(inputs[i], directives);\n directives[inputs[i]][inputs[i + 1]] = value;\n }\n}\n/**\n * Consolidates all inputs or outputs of all directives on this logical node.\n *\n * @param number lNodeFlags logical node flags\n * @param Direction direction whether to consider inputs or outputs\n * @returns PropertyAliases|null aggregate of all properties if any, `null` otherwise\n */\nfunction generatePropertyAliases(tNodeFlags, direction) {\n var count = tNodeFlags & 4095;\n var propStore = null;\n if (count > 0) {\n var start = tNodeFlags >> 13;\n var end = start + count;\n var isInput = direction === 0;\n var defs = currentView.tView.directives;\n for (var i = start; i < end; i++) {\n var directiveDef = defs[i];\n var propertyAliasMap = isInput ? directiveDef.inputs : directiveDef.outputs;\n for (var publicName in propertyAliasMap) {\n if (propertyAliasMap.hasOwnProperty(publicName)) {\n propStore = propStore || {};\n var internalName = propertyAliasMap[publicName];\n var hasProperty = propStore.hasOwnProperty(publicName);\n hasProperty ? propStore[publicName].push(i, internalName) :\n (propStore[publicName] = [i, internalName]);\n }\n }\n }\n }\n return propStore;\n}\n/**\n * Add or remove a class in a `classList` on a DOM element.\n *\n * This instruction is meant to handle the [class.foo]=\"exp\" case\n *\n * @param index The index of the element to update in the data array\n * @param className Name of class to toggle. Because it is going to DOM, this is not subject to\n * renaming as part of minification.\n * @param value A value indicating if a given class should be added or removed.\n */\nfunction elementClassNamed(index, className, value) {\n if (value !== NO_CHANGE) {\n var lElement = data[index];\n if (value) {\n isProceduralRenderer(renderer) ? renderer.addClass(lElement.native, className) :\n lElement.native.classList.add(className);\n }\n else {\n isProceduralRenderer(renderer) ? renderer.removeClass(lElement.native, className) :\n lElement.native.classList.remove(className);\n }\n }\n}\n/**\n * Set the `className` property on a DOM element.\n *\n * This instruction is meant to handle the `[class]=\"exp\"` usage.\n *\n * `elementClass` instruction writes the value to the \"element's\" `className` property.\n *\n * @param index The index of the element to update in the data array\n * @param value A value indicating a set of classes which should be applied. The method overrides\n * any existing classes. The value is stringified (`toString`) before it is applied to the\n * element.\n */\nfunction elementClass(index, value) {\n if (value !== NO_CHANGE) {\n // TODO: This is a naive implementation which simply writes value to the `className`. In the\n // future\n // we will add logic here which would work with the animation code.\n var lElement = data[index];\n isProceduralRenderer(renderer) ? renderer.setProperty(lElement.native, 'className', value) :\n lElement.native['className'] = stringify$1(value);\n }\n}\nfunction elementStyleNamed(index, styleName, value, suffixOrSanitizer) {\n if (value !== NO_CHANGE) {\n var lElement = data[index];\n if (value == null) {\n isProceduralRenderer(renderer) ?\n renderer.removeStyle(lElement.native, styleName, RendererStyleFlags3.DashCase) :\n lElement.native['style'].removeProperty(styleName);\n }\n else {\n var strValue = typeof suffixOrSanitizer == 'function' ? suffixOrSanitizer(value) : stringify$1(value);\n if (typeof suffixOrSanitizer == 'string')\n strValue = strValue + suffixOrSanitizer;\n isProceduralRenderer(renderer) ?\n renderer.setStyle(lElement.native, styleName, strValue, RendererStyleFlags3.DashCase) :\n lElement.native['style'].setProperty(styleName, strValue);\n }\n }\n}\n/**\n * Set the `style` property on a DOM element.\n *\n * This instruction is meant to handle the `[style]=\"exp\"` usage.\n *\n *\n * @param index The index of the element to update in the data array\n * @param value A value indicating if a given style should be added or removed.\n * The expected shape of `value` is an object where keys are style names and the values\n * are their corresponding values to set. If value is falsy than the style is remove. An absence\n * of style does not cause that style to be removed. `NO_CHANGE` implies that no update should be\n * performed.\n */\nfunction elementStyle(index, value) {\n if (value !== NO_CHANGE) {\n // TODO: This is a naive implementation which simply writes value to the `style`. In the future\n // we will add logic here which would work with the animation code.\n var lElement = data[index];\n if (isProceduralRenderer(renderer)) {\n renderer.setProperty(lElement.native, 'style', value);\n }\n else {\n var style = lElement.native['style'];\n for (var i = 0, keys = Object.keys(value); i < keys.length; i++) {\n var styleName = keys[i];\n var styleValue = value[styleName];\n styleValue == null ? style.removeProperty(styleName) :\n style.setProperty(styleName, styleValue);\n }\n }\n }\n}\n//////////////////////////\n//// Text\n//////////////////////////\n/**\n * Create static text node\n *\n * @param index Index of the node in the data array.\n * @param value Value to write. This value will be stringified.\n * If value is not provided than the actual creation of the text node is delayed.\n */\nfunction text(index, value) {\n ngDevMode &&\n assertEqual(currentView.bindingStartIndex, -1, 'text nodes should be created before bindings');\n var textNode = value != null ? createTextNode(value, renderer) : null;\n var node = createLNode(index, 3 /* Element */, textNode);\n // Text nodes are self closing.\n isParent = false;\n appendChild(node.parent, textNode, currentView);\n}\n/**\n * Create text node with binding\n * Bindings should be handled externally with the proper bind(1-8) method\n *\n * @param index Index of the node in the data array.\n * @param value Stringified value to write.\n */\nfunction textBinding(index, value) {\n ngDevMode && assertDataInRange(index);\n var existingNode = data[index];\n ngDevMode && assertNotNull(existingNode, 'existing node');\n if (existingNode.native) {\n // If DOM node exists and value changed, update textContent\n value !== NO_CHANGE &&\n (isProceduralRenderer(renderer) ? renderer.setValue(existingNode.native, stringify$1(value)) :\n existingNode.native.textContent = stringify$1(value));\n }\n else {\n // Node was created but DOM node creation was delayed. Create and append now.\n existingNode.native = createTextNode(value, renderer);\n insertChild(existingNode, currentView);\n }\n}\n//////////////////////////\n//// Directive\n//////////////////////////\n/**\n * Create a directive.\n *\n * NOTE: directives can be created in order other than the index order. They can also\n * be retrieved before they are created in which case the value will be null.\n *\n * @param directive The directive instance.\n * @param directiveDef DirectiveDef object which contains information about the template.\n */\nfunction directiveCreate(index, directive, directiveDef) {\n var instance = baseDirectiveCreate(index, directive, directiveDef);\n ngDevMode && assertNotNull(previousOrParentNode.tNode, 'previousOrParentNode.tNode');\n var tNode = previousOrParentNode.tNode;\n var isComponent = directiveDef.template;\n if (isComponent) {\n addComponentLogic(index, directive, directiveDef);\n }\n if (firstTemplatePass) {\n // Init hooks are queued now so ngOnInit is called in host components before\n // any projected components.\n queueInitHooks(index, directiveDef.onInit, directiveDef.doCheck, currentView.tView);\n if (directiveDef.hostBindings)\n queueHostBindingForCheck(index);\n }\n if (tNode && tNode.attrs) {\n setInputsFromAttrs(index, instance, directiveDef.inputs, tNode);\n }\n return instance;\n}\nfunction addComponentLogic(index, instance, def) {\n var tView = getOrCreateTView(def.template, def.directiveDefs, def.pipeDefs);\n // Only component views should be added to the view tree directly. Embedded views are\n // accessed through their containers because they may be removed / re-added later.\n var hostView = addToViewTree(currentView, createLView(-1, rendererFactory.createRenderer(previousOrParentNode.native, def.rendererType), tView, null, null, def.onPush ? 4 /* Dirty */ : 2 /* CheckAlways */));\n previousOrParentNode.data = hostView;\n hostView.node = previousOrParentNode;\n initChangeDetectorIfExisting(previousOrParentNode.nodeInjector, instance, hostView);\n if (firstTemplatePass)\n queueComponentIndexForCheck(index);\n}\n/**\n * A lighter version of directiveCreate() that is used for the root component\n *\n * This version does not contain features that we don't already support at root in\n * current Angular. Example: local refs and inputs on root component.\n */\nfunction baseDirectiveCreate(index, directive, directiveDef) {\n ngDevMode &&\n assertEqual(currentView.bindingStartIndex, -1, 'directives should be created before any bindings');\n ngDevMode && assertPreviousIsParent();\n Object.defineProperty(directive, NG_HOST_SYMBOL, { enumerable: false, value: previousOrParentNode });\n if (directives == null)\n currentView.directives = directives = [];\n ngDevMode && assertDataNext(index, directives);\n directives[index] = directive;\n if (firstTemplatePass) {\n var flags = previousOrParentNode.tNode.flags;\n if ((flags & 4095 /* DirectiveCountMask */) === 0) {\n // When the first directive is created:\n // - save the index,\n // - set the number of directives to 1\n previousOrParentNode.tNode.flags =\n index << 13 /* DirectiveStartingIndexShift */ | flags & 4096 /* isComponent */ | 1;\n }\n else {\n // Only need to bump the size when subsequent directives are created\n ngDevMode && assertNotEqual(flags & 4095 /* DirectiveCountMask */, 4095 /* DirectiveCountMask */, 'Reached the max number of directives');\n previousOrParentNode.tNode.flags++;\n }\n }\n else {\n var diPublic = directiveDef.diPublic;\n if (diPublic)\n diPublic(directiveDef);\n }\n if (directiveDef.attributes != null && previousOrParentNode.type == 3 /* Element */) {\n setUpAttributes(previousOrParentNode.native, directiveDef.attributes);\n }\n return directive;\n}\n/**\n * Sets initial input properties on directive instances from attribute data\n *\n * @param directiveIndex Index of the directive in directives array\n * @param instance Instance of the directive on which to set the initial inputs\n * @param inputs The list of inputs from the directive def\n * @param tNode The static data for this node\n */\nfunction setInputsFromAttrs(directiveIndex, instance, inputs, tNode) {\n var initialInputData = tNode.initialInputs;\n if (initialInputData === undefined || directiveIndex >= initialInputData.length) {\n initialInputData = generateInitialInputs(directiveIndex, inputs, tNode);\n }\n var initialInputs = initialInputData[directiveIndex];\n if (initialInputs) {\n for (var i = 0; i < initialInputs.length; i += 2) {\n instance[initialInputs[i]] = initialInputs[i + 1];\n }\n }\n}\n/**\n * Generates initialInputData for a node and stores it in the template's static storage\n * so subsequent template invocations don't have to recalculate it.\n *\n * initialInputData is an array containing values that need to be set as input properties\n * for directives on this node, but only once on creation. We need this array to support\n * the case where you set an @Input property of a directive using attribute-like syntax.\n * e.g. if you have a `name` @Input, you can set it once like this:\n *\n * <my-component name=\"Bess\"></my-component>\n *\n * @param directiveIndex Index to store the initial input data\n * @param inputs The list of inputs from the directive def\n * @param tNode The static data on this node\n */\nfunction generateInitialInputs(directiveIndex, inputs, tNode) {\n var initialInputData = tNode.initialInputs || (tNode.initialInputs = []);\n initialInputData[directiveIndex] = null;\n var attrs = tNode.attrs;\n for (var i = 0; i < attrs.length; i += 2) {\n var attrName = attrs[i];\n var minifiedInputName = inputs[attrName];\n if (minifiedInputName !== undefined) {\n var inputsToStore = initialInputData[directiveIndex] || (initialInputData[directiveIndex] = []);\n inputsToStore.push(minifiedInputName, attrs[i + 1]);\n }\n }\n return initialInputData;\n}\n//////////////////////////\n//// ViewContainer & View\n//////////////////////////\nfunction createLContainer(parentLNode, currentView, template) {\n ngDevMode && assertNotNull(parentLNode, 'containers should have a parent');\n return {\n views: [],\n nextIndex: 0,\n // If the direct parent of the container is a view, its views will need to be added\n // through insertView() when its parent view is being inserted:\n renderParent: canInsertNativeNode(parentLNode, currentView) ? parentLNode : null,\n template: template == null ? null : template,\n next: null,\n parent: currentView,\n dynamicViewCount: 0,\n queries: null\n };\n}\n/**\n * Creates an LContainerNode.\n *\n * Only `LViewNodes` can go into `LContainerNodes`.\n *\n * @param index The index of the container in the data array\n * @param template Optional inline template\n * @param tagName The name of the container element, if applicable\n * @param attrs The attrs attached to the container, if applicable\n * @param localRefs A set of local reference bindings on the element.\n */\nfunction container(index, template, tagName, attrs, localRefs) {\n ngDevMode && assertEqual(currentView.bindingStartIndex, -1, 'container nodes should be created before any bindings');\n var currentParent = isParent ? previousOrParentNode : previousOrParentNode.parent;\n var lContainer = createLContainer(currentParent, currentView, template);\n var node = createLNode(index, 0 /* Container */, undefined, lContainer);\n // Containers are added to the current view tree instead of their embedded views\n // because views can be removed and re-inserted.\n addToViewTree(currentView, node.data);\n createDirectivesAndLocals(index, tagName || null, attrs, localRefs, []);\n isParent = false;\n ngDevMode && assertNodeType(previousOrParentNode, 0 /* Container */);\n var queries = node.queries;\n if (queries) {\n // check if a given container node matches\n queries.addNode(node);\n // prepare place for matching nodes from views inserted into a given container\n lContainer.queries = queries.container();\n }\n}\n/**\n * Sets a container up to receive views.\n *\n * @param index The index of the container in the data array\n */\nfunction containerRefreshStart(index) {\n ngDevMode && assertDataInRange(index);\n previousOrParentNode = data[index];\n ngDevMode && assertNodeType(previousOrParentNode, 0 /* Container */);\n isParent = true;\n previousOrParentNode.data.nextIndex = 0;\n ngDevMode && assertSame(previousOrParentNode.native, undefined, \"the container's native element should not have been set yet.\");\n if (!checkNoChangesMode) {\n // We need to execute init hooks here so ngOnInit hooks are called in top level views\n // before they are called in embedded views (for backwards compatibility).\n executeInitHooks(currentView, currentView.tView, creationMode);\n }\n}\n/**\n * Marks the end of the LContainerNode.\n *\n * Marking the end of LContainerNode is the time when to child Views get inserted or removed.\n */\nfunction containerRefreshEnd() {\n if (isParent) {\n isParent = false;\n }\n else {\n ngDevMode && assertNodeType(previousOrParentNode, 2 /* View */);\n ngDevMode && assertHasParent();\n previousOrParentNode = previousOrParentNode.parent;\n }\n ngDevMode && assertNodeType(previousOrParentNode, 0 /* Container */);\n var container = previousOrParentNode;\n container.native = undefined;\n ngDevMode && assertNodeType(container, 0 /* Container */);\n var nextIndex = container.data.nextIndex;\n // remove extra views at the end of the container\n while (nextIndex < container.data.views.length) {\n removeView(container, nextIndex);\n }\n}\nfunction refreshDynamicChildren() {\n for (var current = currentView.child; current !== null; current = current.next) {\n if (current.dynamicViewCount !== 0 && current.views) {\n var container_1 = current;\n for (var i = 0; i < container_1.views.length; i++) {\n var view = container_1.views[i];\n // The directives and pipes are not needed here as an existing view is only being refreshed.\n renderEmbeddedTemplate(view, view.data.template, view.data.context, renderer);\n }\n }\n }\n}\n/**\n * Looks for a view with a given view block id inside a provided LContainer.\n * Removes views that need to be deleted in the process.\n *\n * @param containerNode where to search for views\n * @param startIdx starting index in the views array to search from\n * @param viewBlockId exact view block id to look for\n * @returns index of a found view or -1 if not found\n */\nfunction scanForView(containerNode, startIdx, viewBlockId) {\n var views = containerNode.data.views;\n for (var i = startIdx; i < views.length; i++) {\n var viewAtPositionId = views[i].data.id;\n if (viewAtPositionId === viewBlockId) {\n return views[i];\n }\n else if (viewAtPositionId < viewBlockId) {\n // found a view that should not be at this position - remove\n removeView(containerNode, i);\n }\n else {\n // found a view with id grater than the one we are searching for\n // which means that required view doesn't exist and can't be found at\n // later positions in the views array - stop the search here\n break;\n }\n }\n return null;\n}\n/**\n * Marks the start of an embedded view.\n *\n * @param viewBlockId The ID of this view\n * @return boolean Whether or not this view is in creation mode\n */\nfunction embeddedViewStart(viewBlockId) {\n var container = (isParent ? previousOrParentNode : previousOrParentNode.parent);\n ngDevMode && assertNodeType(container, 0 /* Container */);\n var lContainer = container.data;\n var viewNode = scanForView(container, lContainer.nextIndex, viewBlockId);\n if (viewNode) {\n previousOrParentNode = viewNode;\n ngDevMode && assertNodeType(previousOrParentNode, 2 /* View */);\n isParent = true;\n enterView(viewNode.data, viewNode);\n }\n else {\n // When we create a new LView, we always reset the state of the instructions.\n var newView = createLView(viewBlockId, renderer, getOrCreateEmbeddedTView(viewBlockId, container), null, null, 2 /* CheckAlways */);\n if (lContainer.queries) {\n newView.queries = lContainer.queries.enterView(lContainer.nextIndex);\n }\n enterView(newView, viewNode = createLNode(null, 2 /* View */, null, newView));\n }\n return getRenderFlags(viewNode.data);\n}\n/**\n * Initialize the TView (e.g. static data) for the active embedded view.\n *\n * Each embedded view needs to set the global tData variable to the static data for\n * that view. Otherwise, the view's static data for a particular node would overwrite\n * the static data for a node in the view above it with the same index (since it's in the\n * same template).\n *\n * @param viewIndex The index of the TView in TContainer\n * @param parent The parent container in which to look for the view's static data\n * @returns TView\n */\nfunction getOrCreateEmbeddedTView(viewIndex, parent) {\n ngDevMode && assertNodeType(parent, 0 /* Container */);\n var tContainer = parent.tNode.data;\n if (viewIndex >= tContainer.length || tContainer[viewIndex] == null) {\n var tView = currentView.tView;\n tContainer[viewIndex] = createTView(tView.directiveRegistry, tView.pipeRegistry);\n }\n return tContainer[viewIndex];\n}\n/** Marks the end of an embedded view. */\nfunction embeddedViewEnd() {\n refreshDirectives();\n isParent = false;\n var viewNode = previousOrParentNode = currentView.node;\n var containerNode = previousOrParentNode.parent;\n if (containerNode) {\n ngDevMode && assertNodeType(viewNode, 2 /* View */);\n ngDevMode && assertNodeType(containerNode, 0 /* Container */);\n var lContainer = containerNode.data;\n if (creationMode) {\n // When projected nodes are going to be inserted, the renderParent of the dynamic container\n // used by the ViewContainerRef must be set.\n setRenderParentInProjectedNodes(lContainer.renderParent, viewNode);\n // it is a new view, insert it into collection of views for a given container\n insertView(containerNode, viewNode, lContainer.nextIndex);\n }\n lContainer.nextIndex++;\n }\n leaveView(currentView.parent);\n ngDevMode && assertEqual(isParent, false, 'isParent');\n ngDevMode && assertNodeType(previousOrParentNode, 2 /* View */);\n}\n/**\n * For nodes which are projected inside an embedded view, this function sets the renderParent\n * of their dynamic LContainerNode.\n * @param renderParent the renderParent of the LContainer which contains the embedded view.\n * @param viewNode the embedded view.\n */\nfunction setRenderParentInProjectedNodes(renderParent, viewNode) {\n if (renderParent != null) {\n var node = viewNode.child;\n while (node) {\n if (node.type === 1 /* Projection */) {\n var nodeToProject = node.data.head;\n var lastNodeToProject = node.data.tail;\n while (nodeToProject) {\n if (nodeToProject.dynamicLContainerNode) {\n nodeToProject.dynamicLContainerNode.data.renderParent = renderParent;\n }\n nodeToProject = nodeToProject === lastNodeToProject ? null : nodeToProject.pNextOrParent;\n }\n }\n node = node.next;\n }\n }\n}\n/////////////\n/**\n * Refreshes components by entering the component view and processing its bindings, queries, etc.\n *\n * @param directiveIndex\n * @param elementIndex\n */\nfunction componentRefresh(directiveIndex, elementIndex) {\n ngDevMode && assertDataInRange(elementIndex);\n var element = data[elementIndex];\n ngDevMode && assertNodeType(element, 3 /* Element */);\n ngDevMode && assertNotNull(element.data, \"Component's host node should have an LView attached.\");\n var hostView = element.data;\n // Only attached CheckAlways components or attached, dirty OnPush components should be checked\n if (viewAttached(hostView) && hostView.flags & (2 /* CheckAlways */ | 4 /* Dirty */)) {\n ngDevMode && assertDataInRange(directiveIndex, directives);\n var def = currentView.tView.directives[directiveIndex];\n detectChangesInternal(hostView, element, def, getDirectiveInstance(directives[directiveIndex]));\n }\n}\n/** Returns a boolean for whether the view is attached */\nfunction viewAttached(view) {\n return (view.flags & 8 /* Attached */) === 8 /* Attached */;\n}\n/**\n * Instruction to distribute projectable nodes among <ng-content> occurrences in a given template.\n * It takes all the selectors from the entire component's template and decides where\n * each projected node belongs (it re-distributes nodes among \"buckets\" where each \"bucket\" is\n * backed by a selector).\n *\n * This function requires CSS selectors to be provided in 2 forms: parsed (by a compiler) and text,\n * un-parsed form.\n *\n * The parsed form is needed for efficient matching of a node against a given CSS selector.\n * The un-parsed, textual form is needed for support of the ngProjectAs attribute.\n *\n * Having a CSS selector in 2 different formats is not ideal, but alternatives have even more\n * drawbacks:\n * - having only a textual form would require runtime parsing of CSS selectors;\n * - we can't have only a parsed as we can't re-construct textual form from it (as entered by a\n * template author).\n *\n * @param selectors A collection of parsed CSS selectors\n * @param rawSelectors A collection of CSS selectors in the raw, un-parsed form\n */\nfunction projectionDef(index, selectors, textSelectors) {\n var noOfNodeBuckets = selectors ? selectors.length + 1 : 1;\n var distributedNodes = new Array(noOfNodeBuckets);\n for (var i = 0; i < noOfNodeBuckets; i++) {\n distributedNodes[i] = [];\n }\n var componentNode = findComponentHost(currentView);\n var componentChild = componentNode.child;\n while (componentChild !== null) {\n // execute selector matching logic if and only if:\n // - there are selectors defined\n // - a node has a tag name / attributes that can be matched\n if (selectors && componentChild.tNode) {\n var matchedIdx = matchingSelectorIndex(componentChild.tNode, selectors, textSelectors);\n distributedNodes[matchedIdx].push(componentChild);\n }\n else {\n distributedNodes[0].push(componentChild);\n }\n componentChild = componentChild.next;\n }\n ngDevMode && assertDataNext(index);\n data[index] = distributedNodes;\n}\n/**\n * Updates the linked list of a projection node, by appending another linked list.\n *\n * @param projectionNode Projection node whose projected nodes linked list has to be updated\n * @param appendedFirst First node of the linked list to append.\n * @param appendedLast Last node of the linked list to append.\n */\nfunction appendToProjectionNode(projectionNode, appendedFirst, appendedLast) {\n ngDevMode && assertEqual(!!appendedFirst, !!appendedLast, 'appendedFirst can be null if and only if appendedLast is also null');\n if (!appendedLast) {\n // nothing to append\n return;\n }\n var projectionNodeData = projectionNode.data;\n if (projectionNodeData.tail) {\n projectionNodeData.tail.pNextOrParent = appendedFirst;\n }\n else {\n projectionNodeData.head = appendedFirst;\n }\n projectionNodeData.tail = appendedLast;\n appendedLast.pNextOrParent = projectionNode;\n}\n/**\n * Inserts previously re-distributed projected nodes. This instruction must be preceded by a call\n * to the projectionDef instruction.\n *\n * @param nodeIndex\n * @param localIndex - index under which distribution of projected nodes was memorized\n * @param selectorIndex - 0 means <ng-content> without any selector\n * @param attrs - attributes attached to the ng-content node, if present\n */\nfunction projection(nodeIndex, localIndex, selectorIndex, attrs) {\n if (selectorIndex === void 0) { selectorIndex = 0; }\n var node = createLNode(nodeIndex, 1 /* Projection */, null, { head: null, tail: null });\n if (node.tNode == null) {\n node.tNode = createTNode(null, attrs || null, null);\n }\n isParent = false; // self closing\n var currentParent = node.parent;\n // re-distribution of projectable nodes is memorized on a component's view level\n var componentNode = findComponentHost(currentView);\n // make sure that nodes to project were memorized\n var nodesForSelector = componentNode.data.data[localIndex][selectorIndex];\n // build the linked list of projected nodes:\n for (var i = 0; i < nodesForSelector.length; i++) {\n var nodeToProject = nodesForSelector[i];\n if (nodeToProject.type === 1 /* Projection */) {\n var previouslyProjected = nodeToProject.data;\n appendToProjectionNode(node, previouslyProjected.head, previouslyProjected.tail);\n }\n else {\n appendToProjectionNode(node, nodeToProject, nodeToProject);\n }\n }\n if (canInsertNativeNode(currentParent, currentView)) {\n ngDevMode && assertNodeType(currentParent, 3 /* Element */);\n // process each node in the list of projected nodes:\n var nodeToProject = node.data.head;\n var lastNodeToProject = node.data.tail;\n while (nodeToProject) {\n appendProjectedNode(nodeToProject, currentParent, currentView);\n nodeToProject = nodeToProject === lastNodeToProject ? null : nodeToProject.pNextOrParent;\n }\n }\n}\n/**\n * Given a current view, finds the nearest component's host (LElement).\n *\n * @param lView LView for which we want a host element node\n * @returns The host node\n */\nfunction findComponentHost(lView) {\n var viewRootLNode = lView.node;\n while (viewRootLNode.type === 2 /* View */) {\n ngDevMode && assertNotNull(lView.parent, 'lView.parent');\n lView = lView.parent;\n viewRootLNode = lView.node;\n }\n ngDevMode && assertNodeType(viewRootLNode, 3 /* Element */);\n ngDevMode && assertNotNull(viewRootLNode.data, 'node.data');\n return viewRootLNode;\n}\n/**\n * Adds a LView or a LContainer to the end of the current view tree.\n *\n * This structure will be used to traverse through nested views to remove listeners\n * and call onDestroy callbacks.\n *\n * @param currentView The view where LView or LContainer should be added\n * @param state The LView or LContainer to add to the view tree\n * @returns The state passed in\n */\nfunction addToViewTree(currentView, state) {\n currentView.tail ? (currentView.tail.next = state) : (currentView.child = state);\n currentView.tail = state;\n return state;\n}\n///////////////////////////////\n//// Change detection\n///////////////////////////////\n/** If node is an OnPush component, marks its LView dirty. */\nfunction markDirtyIfOnPush(node) {\n // Because data flows down the component tree, ancestors do not need to be marked dirty\n if (node.data && !(node.data.flags & 2 /* CheckAlways */)) {\n node.data.flags |= 4 /* Dirty */;\n }\n}\n/**\n * Wraps an event listener so its host view and its ancestor views will be marked dirty\n * whenever the event fires. Necessary to support OnPush components.\n */\nfunction wrapListenerWithDirtyLogic(view, listenerFn) {\n return function (e) {\n markViewDirty(view);\n return listenerFn(e);\n };\n}\n/**\n * Wraps an event listener so its host view and its ancestor views will be marked dirty\n * whenever the event fires. Also wraps with preventDefault behavior.\n */\nfunction wrapListenerWithDirtyAndDefault(view, listenerFn) {\n return function wrapListenerIn_markViewDirty(e) {\n markViewDirty(view);\n if (listenerFn(e) === false) {\n e.preventDefault();\n // Necessary for legacy browsers that don't support preventDefault (e.g. IE)\n e.returnValue = false;\n }\n };\n}\n/** Marks current view and all ancestors dirty */\nfunction markViewDirty(view) {\n var currentView = view;\n while (currentView.parent != null) {\n currentView.flags |= 4 /* Dirty */;\n currentView = currentView.parent;\n }\n currentView.flags |= 4 /* Dirty */;\n ngDevMode && assertNotNull(currentView.context, 'rootContext');\n scheduleTick(currentView.context);\n}\n/**\n * Used to schedule change detection on the whole application.\n *\n * Unlike `tick`, `scheduleTick` coalesces multiple calls into one change detection run.\n * It is usually called indirectly by calling `markDirty` when the view needs to be\n * re-rendered.\n *\n * Typically `scheduleTick` uses `requestAnimationFrame` to coalesce multiple\n * `scheduleTick` requests. The scheduling function can be overridden in\n * `renderComponent`'s `scheduler` option.\n */\nfunction scheduleTick(rootContext) {\n if (rootContext.clean == _CLEAN_PROMISE) {\n var res_1;\n rootContext.clean = new Promise(function (r) { return res_1 = r; });\n rootContext.scheduler(function () {\n tick(rootContext.component);\n res_1(null);\n rootContext.clean = _CLEAN_PROMISE;\n });\n }\n}\n/**\n * Used to perform change detection on the whole application.\n *\n * This is equivalent to `detectChanges`, but invoked on root component. Additionally, `tick`\n * executes lifecycle hooks and conditionally checks components based on their\n * `ChangeDetectionStrategy` and dirtiness.\n *\n * The preferred way to trigger change detection is to call `markDirty`. `markDirty` internally\n * schedules `tick` using a scheduler in order to coalesce multiple `markDirty` calls into a\n * single change detection run. By default, the scheduler is `requestAnimationFrame`, but can\n * be changed when calling `renderComponent` and providing the `scheduler` option.\n */\nfunction tick(component) {\n var rootView = getRootView(component);\n var rootComponent = rootView.context.component;\n var hostNode = _getComponentHostLElementNode(rootComponent);\n ngDevMode && assertNotNull(hostNode.data, 'Component host node should be attached to an LView');\n renderComponentOrTemplate(hostNode, rootView, rootComponent);\n}\n/**\n * Retrieve the root view from any component by walking the parent `LView` until\n * reaching the root `LView`.\n *\n * @param component any component\n */\nfunction getRootView(component) {\n ngDevMode && assertNotNull(component, 'component');\n var lElementNode = _getComponentHostLElementNode(component);\n var lView = lElementNode.view;\n while (lView.parent) {\n lView = lView.parent;\n }\n return lView;\n}\n/**\n * Synchronously perform change detection on a component (and possibly its sub-components).\n *\n * This function triggers change detection in a synchronous way on a component. There should\n * be very little reason to call this function directly since a preferred way to do change\n * detection is to {@link markDirty} the component and wait for the scheduler to call this method\n * at some future point in time. This is because a single user action often results in many\n * components being invalidated and calling change detection on each component synchronously\n * would be inefficient. It is better to wait until all components are marked as dirty and\n * then perform single change detection across all of the components\n *\n * @param component The component which the change detection should be performed on.\n */\nfunction detectChanges(component) {\n var hostNode = _getComponentHostLElementNode(component);\n ngDevMode && assertNotNull(hostNode.data, 'Component host node should be attached to an LView');\n var componentIndex = hostNode.tNode.flags >> 13;\n var def = hostNode.view.tView.directives[componentIndex];\n detectChangesInternal(hostNode.data, hostNode, def, component);\n}\n/**\n * Checks the change detector and its children, and throws if any changes are detected.\n *\n * This is used in development mode to verify that running change detection doesn't\n * introduce other changes.\n */\nfunction checkNoChanges(component) {\n checkNoChangesMode = true;\n try {\n detectChanges(component);\n }\n finally {\n checkNoChangesMode = false;\n }\n}\n/** Checks the view of the component provided. Does not gate on dirty checks or execute doCheck. */\nfunction detectChangesInternal(hostView, hostNode, def, component) {\n var oldView = enterView(hostView, hostNode);\n var template = def.template;\n try {\n template(getRenderFlags(hostView), component);\n refreshDirectives();\n refreshDynamicChildren();\n }\n finally {\n leaveView(oldView);\n }\n}\n/**\n * Mark the component as dirty (needing change detection).\n *\n * Marking a component dirty will schedule a change detection on this\n * component at some point in the future. Marking an already dirty\n * component as dirty is a noop. Only one outstanding change detection\n * can be scheduled per component tree. (Two components bootstrapped with\n * separate `renderComponent` will have separate schedulers)\n *\n * When the root component is bootstrapped with `renderComponent`, a scheduler\n * can be provided.\n *\n * @param component Component to mark as dirty.\n */\nfunction markDirty(component) {\n ngDevMode && assertNotNull(component, 'component');\n var lElementNode = _getComponentHostLElementNode(component);\n markViewDirty(lElementNode.view);\n}\n/** A special value which designates that a value has not changed. */\nvar NO_CHANGE = {};\n/**\n * Initializes the binding start index. Will get inlined.\n *\n * This function must be called before any binding related function is called\n * (ie `bind()`, `interpolationX()`, `pureFunctionX()`)\n */\nfunction initBindings() {\n ngDevMode && assertEqual(currentView.bindingStartIndex, -1, 'Binding start index should only be set once, when null');\n ngDevMode && assertEqual(currentView.bindingIndex, -1, 'Binding index should not yet be set ' + currentView.bindingIndex);\n currentView.bindingIndex = currentView.bindingStartIndex = data.length;\n}\n/**\n * Creates a single value binding.\n *\n * @param value Value to diff\n */\nfunction bind(value) {\n if (currentView.bindingStartIndex < 0) {\n initBindings();\n return data[currentView.bindingIndex++] = value;\n }\n var changed = value !== NO_CHANGE && isDifferent(data[currentView.bindingIndex], value);\n if (changed) {\n throwErrorIfNoChangesMode(creationMode, checkNoChangesMode, data[currentView.bindingIndex], value);\n data[currentView.bindingIndex] = value;\n }\n currentView.bindingIndex++;\n return changed ? value : NO_CHANGE;\n}\n/**\n * Create interpolation bindings with a variable number of expressions.\n *\n * If there are 1 to 8 expressions `interpolation1()` to `interpolation8()` should be used instead.\n * Those are faster because there is no need to create an array of expressions and iterate over it.\n *\n * `values`:\n * - has static text at even indexes,\n * - has evaluated expressions at odd indexes.\n *\n * Returns the concatenated string when any of the arguments changes, `NO_CHANGE` otherwise.\n */\nfunction interpolationV(values) {\n ngDevMode && assertLessThan(2, values.length, 'should have at least 3 values');\n ngDevMode && assertEqual(values.length % 2, 1, 'should have an odd number of values');\n var different = false;\n for (var i = 1; i < values.length; i += 2) {\n // Check if bindings (odd indexes) have changed\n bindingUpdated(values[i]) && (different = true);\n }\n if (!different) {\n return NO_CHANGE;\n }\n // Build the updated content\n var content = values[0];\n for (var i = 1; i < values.length; i += 2) {\n content += stringify$1(values[i]) + values[i + 1];\n }\n return content;\n}\n/**\n * Creates an interpolation binding with 1 expression.\n *\n * @param prefix static value used for concatenation only.\n * @param v0 value checked for change.\n * @param suffix static value used for concatenation only.\n */\nfunction interpolation1(prefix, v0, suffix) {\n var different = bindingUpdated(v0);\n return different ? prefix + stringify$1(v0) + suffix : NO_CHANGE;\n}\n/** Creates an interpolation binding with 2 expressions. */\nfunction interpolation2(prefix, v0, i0, v1, suffix) {\n var different = bindingUpdated2(v0, v1);\n return different ? prefix + stringify$1(v0) + i0 + stringify$1(v1) + suffix : NO_CHANGE;\n}\n/** Creates an interpolation bindings with 3 expressions. */\nfunction interpolation3(prefix, v0, i0, v1, i1, v2, suffix) {\n var different = bindingUpdated2(v0, v1);\n different = bindingUpdated(v2) || different;\n return different ? prefix + stringify$1(v0) + i0 + stringify$1(v1) + i1 + stringify$1(v2) + suffix :\n NO_CHANGE;\n}\n/** Create an interpolation binding with 4 expressions. */\nfunction interpolation4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix) {\n var different = bindingUpdated4(v0, v1, v2, v3);\n return different ?\n prefix + stringify$1(v0) + i0 + stringify$1(v1) + i1 + stringify$1(v2) + i2 + stringify$1(v3) +\n suffix :\n NO_CHANGE;\n}\n/** Creates an interpolation binding with 5 expressions. */\nfunction interpolation5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix) {\n var different = bindingUpdated4(v0, v1, v2, v3);\n different = bindingUpdated(v4) || different;\n return different ?\n prefix + stringify$1(v0) + i0 + stringify$1(v1) + i1 + stringify$1(v2) + i2 + stringify$1(v3) + i3 +\n stringify$1(v4) + suffix :\n NO_CHANGE;\n}\n/** Creates an interpolation binding with 6 expressions. */\nfunction interpolation6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix) {\n var different = bindingUpdated4(v0, v1, v2, v3);\n different = bindingUpdated2(v4, v5) || different;\n return different ?\n prefix + stringify$1(v0) + i0 + stringify$1(v1) + i1 + stringify$1(v2) + i2 + stringify$1(v3) + i3 +\n stringify$1(v4) + i4 + stringify$1(v5) + suffix :\n NO_CHANGE;\n}\n/** Creates an interpolation binding with 7 expressions. */\nfunction interpolation7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix) {\n var different = bindingUpdated4(v0, v1, v2, v3);\n different = bindingUpdated2(v4, v5) || different;\n different = bindingUpdated(v6) || different;\n return different ?\n prefix + stringify$1(v0) + i0 + stringify$1(v1) + i1 + stringify$1(v2) + i2 + stringify$1(v3) + i3 +\n stringify$1(v4) + i4 + stringify$1(v5) + i5 + stringify$1(v6) + suffix :\n NO_CHANGE;\n}\n/** Creates an interpolation binding with 8 expressions. */\nfunction interpolation8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix) {\n var different = bindingUpdated4(v0, v1, v2, v3);\n different = bindingUpdated4(v4, v5, v6, v7) || different;\n return different ?\n prefix + stringify$1(v0) + i0 + stringify$1(v1) + i1 + stringify$1(v2) + i2 + stringify$1(v3) + i3 +\n stringify$1(v4) + i4 + stringify$1(v5) + i5 + stringify$1(v6) + i6 + stringify$1(v7) + suffix :\n NO_CHANGE;\n}\n/** Store a value in the `data` at a given `index`. */\nfunction store(index, value) {\n // We don't store any static data for local variables, so the first time\n // we see the template, we should store as null to avoid a sparse array\n if (index >= tData.length) {\n tData[index] = null;\n }\n data[index] = value;\n}\n/** Retrieves a value from the `data`. */\nfunction load(index) {\n ngDevMode && assertDataInRange(index);\n return data[index];\n}\n/** Retrieves a value from the `directives` array. */\nfunction loadDirective(index) {\n ngDevMode && assertNotNull(directives, 'Directives array should be defined if reading a dir.');\n ngDevMode && assertDataInRange(index, directives);\n return directives[index];\n}\n/** Gets the current binding value and increments the binding index. */\nfunction consumeBinding() {\n ngDevMode && assertDataInRange(currentView.bindingIndex);\n ngDevMode &&\n assertNotEqual(data[currentView.bindingIndex], NO_CHANGE, 'Stored value should never be NO_CHANGE.');\n return data[currentView.bindingIndex++];\n}\n/** Updates binding if changed, then returns whether it was updated. */\nfunction bindingUpdated(value) {\n ngDevMode && assertNotEqual(value, NO_CHANGE, 'Incoming value should never be NO_CHANGE.');\n if (currentView.bindingStartIndex < 0) {\n initBindings();\n }\n else if (isDifferent(data[currentView.bindingIndex], value)) {\n throwErrorIfNoChangesMode(creationMode, checkNoChangesMode, data[currentView.bindingIndex], value);\n }\n else {\n currentView.bindingIndex++;\n return false;\n }\n data[currentView.bindingIndex++] = value;\n return true;\n}\n/** Updates binding if changed, then returns the latest value. */\nfunction checkAndUpdateBinding$1(value) {\n bindingUpdated(value);\n return value;\n}\n/** Updates 2 bindings if changed, then returns whether either was updated. */\nfunction bindingUpdated2(exp1, exp2) {\n var different = bindingUpdated(exp1);\n return bindingUpdated(exp2) || different;\n}\n/** Updates 4 bindings if changed, then returns whether any was updated. */\nfunction bindingUpdated4(exp1, exp2, exp3, exp4) {\n var different = bindingUpdated2(exp1, exp2);\n return bindingUpdated2(exp3, exp4) || different;\n}\nfunction getTView() {\n return currentView.tView;\n}\nfunction getDirectiveInstance(instanceOrArray) {\n // Directives with content queries store an array in directives[directiveIndex]\n // with the instance as the first index\n return Array.isArray(instanceOrArray) ? instanceOrArray[0] : instanceOrArray;\n}\nfunction assertPreviousIsParent() {\n assertEqual(isParent, true, 'previousOrParentNode should be a parent');\n}\nfunction assertHasParent() {\n assertNotNull(previousOrParentNode.parent, 'previousOrParentNode should have a parent');\n}\nfunction assertDataInRange(index, arr) {\n if (arr == null)\n arr = data;\n assertLessThan(index, arr ? arr.length : 0, 'index expected to be a valid data index');\n}\nfunction assertDataNext(index, arr) {\n if (arr == null)\n arr = data;\n assertEqual(arr.length, index, \"index \" + index + \" expected to be at the end of arr (length \" + arr.length + \")\");\n}\nfunction _getComponentHostLElementNode(component) {\n ngDevMode && assertNotNull(component, 'expecting component got null');\n var lElementNode = component[NG_HOST_SYMBOL];\n ngDevMode && assertNotNull(component, 'object is not a component');\n return lElementNode;\n}\nvar CLEAN_PROMISE = _CLEAN_PROMISE;\nvar ROOT_DIRECTIVE_INDICES = _ROOT_DIRECTIVE_INDICES;\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar ViewRef$1 = /** @class */ (function () {\n function ViewRef(_view, context) {\n this._view = _view;\n this.context = context;\n }\n /** @internal */\n ViewRef.prototype._setComponentContext = function (view, context) {\n this._view = view;\n this.context = context;\n };\n ViewRef.prototype.destroy = function () { };\n ViewRef.prototype.onDestroy = function (callback) { };\n /**\n * Marks a view and all of its ancestors dirty.\n *\n * It also triggers change detection by calling `scheduleTick` internally, which coalesces\n * multiple `markForCheck` calls to into one change detection run.\n *\n * This can be used to ensure an {@link ChangeDetectionStrategy#OnPush OnPush} component is\n * checked when it needs to be re-rendered but the two normal triggers haven't marked it\n * dirty (i.e. inputs haven't changed and events haven't fired in the view).\n *\n * <!-- TODO: Add a link to a chapter on OnPush components -->\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * @Component({\n * selector: 'my-app',\n * template: `Number of ticks: {{numberOfTicks}}`\n * changeDetection: ChangeDetectionStrategy.OnPush,\n * })\n * class AppComponent {\n * numberOfTicks = 0;\n *\n * constructor(private ref: ChangeDetectorRef) {\n * setInterval(() => {\n * this.numberOfTicks++;\n * // the following is required, otherwise the view will not be updated\n * this.ref.markForCheck();\n * }, 1000);\n * }\n * }\n * ```\n */\n ViewRef.prototype.markForCheck = function () { markViewDirty(this._view); };\n /**\n * Detaches the view from the change detection tree.\n *\n * Detached views will not be checked during change detection runs until they are\n * re-attached, even if they are dirty. `detach` can be used in combination with\n * {@link ChangeDetectorRef#detectChanges detectChanges} to implement local change\n * detection checks.\n *\n * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->\n *\n * @usageNotes\n * ### Example\n *\n * The following example defines a component with a large list of readonly data.\n * Imagine the data changes constantly, many times per second. For performance reasons,\n * we want to check and update the list every five seconds. We can do that by detaching\n * the component's change detector and doing a local check every five seconds.\n *\n * ```typescript\n * class DataProvider {\n * // in a real application the returned data will be different every time\n * get data() {\n * return [1,2,3,4,5];\n * }\n * }\n *\n * @Component({\n * selector: 'giant-list',\n * template: `\n * <li *ngFor=\"let d of dataProvider.data\">Data {{d}}</li>\n * `,\n * })\n * class GiantList {\n * constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {\n * ref.detach();\n * setInterval(() => {\n * this.ref.detectChanges();\n * }, 5000);\n * }\n * }\n *\n * @Component({\n * selector: 'app',\n * providers: [DataProvider],\n * template: `\n * <giant-list><giant-list>\n * `,\n * })\n * class App {\n * }\n * ```\n */\n ViewRef.prototype.detach = function () { this._view.flags &= ~8 /* Attached */; };\n /**\n * Re-attaches a view to the change detection tree.\n *\n * This can be used to re-attach views that were previously detached from the tree\n * using {@link ChangeDetectorRef#detach detach}. Views are attached to the tree by default.\n *\n * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n *\n * @usageNotes\n * ### Example\n *\n * The following example creates a component displaying `live` data. The component will detach\n * its change detector from the main change detector tree when the component's live property\n * is set to false.\n *\n * ```typescript\n * class DataProvider {\n * data = 1;\n *\n * constructor() {\n * setInterval(() => {\n * this.data = this.data * 2;\n * }, 500);\n * }\n * }\n *\n * @Component({\n * selector: 'live-data',\n * inputs: ['live'],\n * template: 'Data: {{dataProvider.data}}'\n * })\n * class LiveData {\n * constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {}\n *\n * set live(value) {\n * if (value) {\n * this.ref.reattach();\n * } else {\n * this.ref.detach();\n * }\n * }\n * }\n *\n * @Component({\n * selector: 'my-app',\n * providers: [DataProvider],\n * template: `\n * Live Update: <input type=\"checkbox\" [(ngModel)]=\"live\">\n * <live-data [live]=\"live\"><live-data>\n * `,\n * })\n * class AppComponent {\n * live = true;\n * }\n * ```\n */\n ViewRef.prototype.reattach = function () { this._view.flags |= 8 /* Attached */; };\n /**\n * Checks the view and its children.\n *\n * This can also be used in combination with {@link ChangeDetectorRef#detach detach} to implement\n * local change detection checks.\n *\n * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->\n *\n * @usageNotes\n * ### Example\n *\n * The following example defines a component with a large list of readonly data.\n * Imagine, the data changes constantly, many times per second. For performance reasons,\n * we want to check and update the list every five seconds.\n *\n * We can do that by detaching the component's change detector and doing a local change detection\n * check every five seconds.\n *\n * See {@link ChangeDetectorRef#detach detach} for more information.\n */\n ViewRef.prototype.detectChanges = function () { detectChanges(this.context); };\n /**\n * Checks the change detector and its children, and throws if any changes are detected.\n *\n * This is used in development mode to verify that running change detection doesn't\n * introduce other changes.\n */\n ViewRef.prototype.checkNoChanges = function () { checkNoChanges(this.context); };\n return ViewRef;\n}());\nvar EmbeddedViewRef$1 = /** @class */ (function (_super) {\n __extends(EmbeddedViewRef, _super);\n function EmbeddedViewRef(viewNode, template, context) {\n var _this = _super.call(this, viewNode.data, context) || this;\n _this._lViewNode = viewNode;\n return _this;\n }\n return EmbeddedViewRef;\n}(ViewRef$1));\n/**\n * Creates a ViewRef bundled with destroy functionality.\n *\n * @param context The context for this view\n * @returns The ViewRef\n */\nfunction createViewRef(view, context) {\n // TODO: add detectChanges back in when implementing ChangeDetectorRef.detectChanges\n return addDestroyable(new ViewRef$1(view, context));\n}\n/**\n * Decorates an object with destroy logic (implementing the DestroyRef interface)\n * and returns the enhanced object.\n *\n * @param obj The object to decorate\n * @returns The object with destroy logic\n */\nfunction addDestroyable(obj) {\n var destroyFn = null;\n obj.destroyed = false;\n obj.destroy = function () {\n destroyFn && destroyFn.forEach(function (fn) { return fn(); });\n this.destroyed = true;\n };\n obj.onDestroy = function (fn) { return (destroyFn || (destroyFn = [])).push(fn); };\n return obj;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * Bootstraps a component, then creates and returns a `ComponentRef` for that component.\n *\n * @param componentType Component to bootstrap\n * @param options Optional parameters which control bootstrapping\n */\n\n// TODO: A hack to not pull in the NullInjector from @angular/core.\n\n/**\n * Bootstraps a Component into an existing host element and returns an instance\n * of the component.\n *\n * Use this function to bootstrap a component into the DOM tree. Each invocation\n * of this function will create a separate tree of components, injectors and\n * change detection cycles and lifetimes. To dynamically insert a new component\n * into an existing tree such that it shares the same injection, change detection\n * and object lifetime, use {@link ViewContainer#createComponent}.\n *\n * @param componentType Component to bootstrap\n * @param options Optional parameters which control bootstrapping\n */\nfunction renderComponent(componentType /* Type as workaround for: Microsoft/TypeScript/issues/4881 */, opts) {\n if (opts === void 0) { opts = {}; }\n ngDevMode && assertComponentType(componentType);\n var rendererFactory = opts.rendererFactory || domRendererFactory3;\n var componentDef = componentType.ngComponentDef;\n if (componentDef.type != componentType)\n componentDef.type = componentType;\n var component;\n // The first index of the first selector is the tag name.\n var componentTag = componentDef.selectors[0][0];\n var hostNode = locateHostElement(rendererFactory, opts.host || componentTag);\n var rootContext = {\n // Incomplete initialization due to circular reference.\n component: null,\n scheduler: opts.scheduler || requestAnimationFrame.bind(window),\n clean: CLEAN_PROMISE,\n };\n var rootView = createLView(-1, rendererFactory.createRenderer(hostNode, componentDef.rendererType), createTView(null, null), null, rootContext, componentDef.onPush ? 4 /* Dirty */ : 2 /* CheckAlways */);\n rootView.injector = opts.injector || null;\n var oldView = enterView(rootView, null);\n var elementNode;\n try {\n if (rendererFactory.begin)\n rendererFactory.begin();\n // Create element node at index 0 in data array\n elementNode = hostElement(componentTag, hostNode, componentDef);\n // Create directive instance with factory() and store at index 0 in directives array\n component = rootContext.component =\n baseDirectiveCreate(0, componentDef.factory(), componentDef);\n initChangeDetectorIfExisting(elementNode.nodeInjector, component, elementNode.data);\n opts.hostFeatures && opts.hostFeatures.forEach(function (feature) { return feature(component, componentDef); });\n executeInitAndContentHooks();\n setHostBindings(ROOT_DIRECTIVE_INDICES);\n detectChangesInternal(elementNode.data, elementNode, componentDef, component);\n }\n finally {\n leaveView(oldView);\n if (rendererFactory.end)\n rendererFactory.end();\n }\n return component;\n}\n/**\n * Used to enable lifecycle hooks on the root component.\n *\n * Include this feature when calling `renderComponent` if the root component\n * you are rendering has lifecycle hooks defined. Otherwise, the hooks won't\n * be called properly.\n *\n * Example:\n *\n * ```\n * renderComponent(AppComponent, {features: [RootLifecycleHooks]});\n * ```\n */\n\n/**\n * Retrieve the root context for any component by walking the parent `LView` until\n * reaching the root `LView`.\n *\n * @param component any component\n */\nfunction getRootContext(component) {\n var rootContext = getRootView(component).context;\n ngDevMode && assertNotNull(rootContext, 'rootContext');\n return rootContext;\n}\n/**\n * Retrieve the host element of the component.\n *\n * Use this function to retrieve the host element of the component. The host\n * element is the element which the component is associated with.\n *\n * @param component Component for which the host element should be retrieved.\n */\n\n/**\n * Retrieves the rendered text for a given component.\n *\n * This function retrieves the host element of a component and\n * and then returns the `textContent` for that element. This implies\n * that the text returned will include re-projected content of\n * the component as well.\n *\n * @param component The component to return the content text for.\n */\n\n/**\n * Wait on component until it is rendered.\n *\n * This function returns a `Promise` which is resolved when the component's\n * change detection is executed. This is determined by finding the scheduler\n * associated with the `component`'s render tree and waiting until the scheduler\n * flushes. If nothing is scheduled, the function returns a resolved promise.\n *\n * Example:\n * ```\n * await whenRendered(myComponent);\n * ```\n *\n * @param component Component to wait upon\n * @returns Promise which resolves when the component is rendered.\n */\nfunction whenRendered(component) {\n return getRootContext(component).clean;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * If a directive is diPublic, bloomAdd sets a property on the instance 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 */\nvar NG_ELEMENT_ID = '__NG_ELEMENT_ID__';\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 */\nvar BLOOM_SIZE = 256;\n/** Counter used to generate unique IDs for directives. */\nvar nextNgElementId = 0;\n/**\n * Registers this directive as present in its node's injector by flipping the directive's\n * corresponding bit in the injector's bloom filter.\n *\n * @param injector The node injector in which the directive should be registered\n * @param type The directive to register\n */\nfunction bloomAdd(injector, type) {\n var id = type[NG_ELEMENT_ID];\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 // This means that after 255, some directives will share slots, leading to some false positives\n // when checking for a directive's presence.\n var bloomBit = id % BLOOM_SIZE;\n // Create a mask that targets the specific bit associated with the directive.\n // JS bit operations are 32 bits, so this will be a number between 2^0 and 2^31, corresponding\n // to bit positions 0 - 31 in a 32 bit integer.\n var mask = 1 << bloomBit;\n // Use the raw bloomBit number to determine which bloom filter bucket we should check\n // e.g: bf0 = [0 - 31], bf1 = [32 - 63], bf2 = [64 - 95], bf3 = [96 - 127], etc\n if (bloomBit < 128) {\n // Then use the mask to flip on the bit (0-31) associated with the directive in that bucket\n bloomBit < 64 ? (bloomBit < 32 ? (injector.bf0 |= mask) : (injector.bf1 |= mask)) :\n (bloomBit < 96 ? (injector.bf2 |= mask) : (injector.bf3 |= mask));\n }\n else {\n bloomBit < 192 ? (bloomBit < 160 ? (injector.bf4 |= mask) : (injector.bf5 |= mask)) :\n (bloomBit < 224 ? (injector.bf6 |= mask) : (injector.bf7 |= mask));\n }\n}\nfunction getOrCreateNodeInjector() {\n ngDevMode && assertPreviousIsParent();\n return getOrCreateNodeInjectorForNode(getPreviousOrParentNode());\n}\n/**\n * Creates (or gets an existing) injector for a given element or container.\n *\n * @param node for which an injector should be retrieved / created.\n * @returns Node injector\n */\nfunction getOrCreateNodeInjectorForNode(node) {\n var nodeInjector = node.nodeInjector;\n var parentInjector = node.parent && node.parent.nodeInjector;\n if (nodeInjector != parentInjector) {\n return nodeInjector;\n }\n return node.nodeInjector = {\n parent: parentInjector,\n node: node,\n bf0: 0,\n bf1: 0,\n bf2: 0,\n bf3: 0,\n bf4: 0,\n bf5: 0,\n bf6: 0,\n bf7: 0,\n cbf0: parentInjector == null ? 0 : parentInjector.cbf0 | parentInjector.bf0,\n cbf1: parentInjector == null ? 0 : parentInjector.cbf1 | parentInjector.bf1,\n cbf2: parentInjector == null ? 0 : parentInjector.cbf2 | parentInjector.bf2,\n cbf3: parentInjector == null ? 0 : parentInjector.cbf3 | parentInjector.bf3,\n cbf4: parentInjector == null ? 0 : parentInjector.cbf4 | parentInjector.bf4,\n cbf5: parentInjector == null ? 0 : parentInjector.cbf5 | parentInjector.bf5,\n cbf6: parentInjector == null ? 0 : parentInjector.cbf6 | parentInjector.bf6,\n cbf7: parentInjector == null ? 0 : parentInjector.cbf7 | parentInjector.bf7,\n templateRef: null,\n viewContainerRef: null,\n elementRef: null,\n changeDetectorRef: null\n };\n}\n/**\n * Makes a directive public to the DI system by adding it to an injector's bloom filter.\n *\n * @param di The node injector in which a directive will be added\n * @param def The definition of the directive to be made public\n */\nfunction diPublicInInjector(di, def) {\n bloomAdd(di, def.type);\n}\n/**\n * Makes a directive public to the DI system by adding it to an injector's bloom filter.\n *\n * @param def The definition of the directive to be made public\n */\nfunction diPublic(def) {\n diPublicInInjector(getOrCreateNodeInjector(), def);\n}\nfunction directiveInject(token, flags) {\n if (flags === void 0) { flags = 0 /* Default */; }\n return getOrCreateInjectable(getOrCreateNodeInjector(), token, flags);\n}\n/**\n * Creates an ElementRef and stores it on the injector.\n * Or, if the ElementRef already exists, retrieves the existing ElementRef.\n *\n * @returns The ElementRef instance to use\n */\n\n/**\n * Creates a TemplateRef and stores it on the injector. Or, if the TemplateRef already\n * exists, retrieves the existing TemplateRef.\n *\n * @returns The TemplateRef instance to use\n */\nfunction injectTemplateRef() {\n return getOrCreateTemplateRef(getOrCreateNodeInjector());\n}\n/**\n * Creates a ViewContainerRef and stores it on the injector. Or, if the ViewContainerRef\n * already exists, retrieves the existing ViewContainerRef.\n *\n * @returns The ViewContainerRef instance to use\n */\nfunction injectViewContainerRef() {\n return getOrCreateContainerRef(getOrCreateNodeInjector());\n}\n/** Returns a ChangeDetectorRef (a.k.a. a ViewRef) */\nfunction injectChangeDetectorRef() {\n return getOrCreateChangeDetectorRef(getOrCreateNodeInjector(), null);\n}\n/**\n * Inject static attribute value into directive constructor.\n *\n * This method is used with `factory` functions which are generated as part of\n * `defineDirective` or `defineComponent`. The method retrieves the static value\n * of an attribute. (Dynamic attributes are not supported since they are not resolved\n * at the time of injection and can change over time.)\n *\n * # Example\n * Given:\n * ```\n * @Component(...)\n * class MyComponent {\n * constructor(@Attribute('title') title: string) { ... }\n * }\n * ```\n * When instantiated with\n * ```\n * <my-component title=\"Hello\"></my-component>\n * ```\n *\n * Then factory method generated is:\n * ```\n * MyComponent.ngComponentDef = defineComponent({\n * factory: () => new MyComponent(injectAttribute('title'))\n * ...\n * })\n * ```\n *\n * @experimental\n */\nfunction injectAttribute(attrName) {\n ngDevMode && assertPreviousIsParent();\n var lElement = getPreviousOrParentNode();\n ngDevMode && assertNodeType(lElement, 3 /* Element */);\n var tElement = lElement.tNode;\n ngDevMode && assertNotNull(tElement, 'expecting tNode');\n var attrs = tElement.attrs;\n if (attrs) {\n for (var i = 0; i < attrs.length; i = i + 2) {\n if (attrs[i] == attrName) {\n return attrs[i + 1];\n }\n }\n }\n return undefined;\n}\n/**\n * Creates a ViewRef and stores it on the injector as ChangeDetectorRef (public alias).\n * Or, if it already exists, retrieves the existing instance.\n *\n * @returns The ChangeDetectorRef to use\n */\nfunction getOrCreateChangeDetectorRef(di, context) {\n if (di.changeDetectorRef)\n return di.changeDetectorRef;\n var currentNode = di.node;\n if (isComponent(currentNode.tNode)) {\n return di.changeDetectorRef = createViewRef(currentNode.data, context);\n }\n else if (currentNode.type === 3 /* Element */) {\n return di.changeDetectorRef = getOrCreateHostChangeDetector(currentNode.view.node);\n }\n return null;\n}\n/** Gets or creates ChangeDetectorRef for the closest host component */\nfunction getOrCreateHostChangeDetector(currentNode) {\n var hostNode = getClosestComponentAncestor(currentNode);\n var hostInjector = hostNode.nodeInjector;\n var existingRef = hostInjector && hostInjector.changeDetectorRef;\n return existingRef ?\n existingRef :\n createViewRef(hostNode.data, hostNode.view\n .directives[hostNode.tNode.flags >> 13 /* DirectiveStartingIndexShift */]);\n}\n/**\n * If the node is an embedded view, traverses up the view tree to return the closest\n * ancestor view that is attached to a component. If it's already a component node,\n * returns itself.\n */\nfunction getClosestComponentAncestor(node) {\n while (node.type === 2 /* View */) {\n node = node.view.node;\n }\n return node;\n}\n/**\n * Searches for an instance of the given directive type up the injector tree and returns\n * that instance if found.\n *\n * Specifically, it gets the bloom filter bit associated with the directive (see bloomHashBit),\n * checks that bit against the bloom filter structure to identify an injector that might have\n * the directive (see bloomFindPossibleInjector), then searches the directives on that injector\n * for a match.\n *\n * If not found, it will propagate up to the next parent injector until the token\n * is found or the top is reached.\n *\n * @param di Node injector where the search should start\n * @param token The directive type to search for\n * @param flags Injection flags (e.g. CheckParent)\n * @returns The instance found\n */\nfunction getOrCreateInjectable(di, token, flags) {\n var bloomHash = bloomHashBit(token);\n // If the token has a bloom hash, then it is a directive that is public to the injection system\n // (diPublic). If there is no hash, fall back to the module injector.\n if (bloomHash === null) {\n var moduleInjector = getPreviousOrParentNode().view.injector;\n var formerInjector = setCurrentInjector(moduleInjector);\n try {\n return inject(token, flags);\n }\n finally {\n setCurrentInjector(formerInjector);\n }\n }\n else {\n var injector = di;\n while (injector) {\n // Get the closest potential matching injector (upwards in the injector tree) that\n // *potentially* has the token.\n injector = bloomFindPossibleInjector(injector, bloomHash);\n // If no injector is found, we *know* that there is no ancestor injector that contains the\n // token, so we abort.\n if (!injector) {\n break;\n }\n // At this point, we have an injector which *may* contain the token, so we step through the\n // directives associated with the injector's corresponding node to get the directive instance.\n var node = injector.node;\n var flags_1 = node.tNode.flags;\n var count = flags_1 & 4095;\n if (count !== 0) {\n var start = flags_1 >> 13;\n var end = start + count;\n var defs = node.view.tView.directives;\n for (var i = start; i < end; i++) {\n // Get the definition for the directive at this index and, if it is injectable (diPublic),\n // and matches the given token, return the directive instance.\n var directiveDef = defs[i];\n if (directiveDef.type === token && directiveDef.diPublic) {\n return getDirectiveInstance(node.view.directives[i]);\n }\n }\n }\n // If we *didn't* find the directive for the token and we are searching the current node's\n // injector, it's possible the directive is on this node and hasn't been created yet.\n var instance = void 0;\n if (injector === di && (instance = searchMatchesQueuedForCreation(node, token))) {\n return instance;\n }\n // The def wasn't found anywhere on this node, so it might be a false positive.\n // Traverse up the tree and continue searching.\n injector = injector.parent;\n }\n }\n // No directive was found for the given token.\n // TODO: implement optional, check-self, and check-parent.\n throw new Error('Implement');\n}\nfunction searchMatchesQueuedForCreation(node, token) {\n var matches = node.view.tView.currentMatches;\n if (matches) {\n for (var i = 0; i < matches.length; i += 2) {\n var def = matches[i];\n if (def.type === token) {\n return resolveDirective(def, i + 1, matches, node.view.tView);\n }\n }\n }\n return null;\n}\n/**\n * Given a directive type, this function returns the bit in an injector's bloom filter\n * that should be used to determine whether or not the directive is present.\n *\n * When the directive was added to the bloom filter, it was given a unique ID that can be\n * retrieved on the class. Since there are only BLOOM_SIZE slots per bloom filter, the directive's\n * ID must be modulo-ed by BLOOM_SIZE to get the correct bloom bit (directives share slots after\n * BLOOM_SIZE is reached).\n *\n * @param type The directive type\n * @returns The bloom bit to check for the directive\n */\nfunction bloomHashBit(type) {\n var id = type[NG_ELEMENT_ID];\n return typeof id === 'number' ? id % BLOOM_SIZE : null;\n}\n/**\n * Finds the closest injector that might have a certain directive.\n *\n * Each directive corresponds to a bit in an injector's bloom filter. Given the bloom bit to\n * check and a starting injector, this function traverses up injectors until it finds an\n * injector that contains a 1 for that bit in its bloom filter. A 1 indicates that the\n * injector may have that directive. It only *may* have the directive because directives begin\n * to share bloom filter bits after the BLOOM_SIZE is reached, and it could correspond to a\n * different directive sharing the bit.\n *\n * Note: We can skip checking further injectors up the tree if an injector's cbf structure\n * has a 0 for that bloom bit. Since cbf contains the merged value of all the parent\n * injectors, a 0 in the bloom bit indicates that the parents definitely do not contain\n * the directive and do not need to be checked.\n *\n * @param injector The starting node injector to check\n * @param bloomBit The bit to check in each injector's bloom filter\n * @returns An injector that might have the directive\n */\nfunction bloomFindPossibleInjector(startInjector, bloomBit) {\n // Create a mask that targets the specific bit associated with the directive we're looking for.\n // JS bit operations are 32 bits, so this will be a number between 2^0 and 2^31, corresponding\n // to bit positions 0 - 31 in a 32 bit integer.\n var mask = 1 << bloomBit;\n // Traverse up the injector tree until we find a potential match or until we know there *isn't* a\n // match.\n var injector = startInjector;\n while (injector) {\n // Our bloom filter size is 256 bits, which is eight 32-bit bloom filter buckets:\n // bf0 = [0 - 31], bf1 = [32 - 63], bf2 = [64 - 95], bf3 = [96 - 127], etc.\n // Get the bloom filter value from the appropriate bucket based on the directive's bloomBit.\n var value = void 0;\n if (bloomBit < 128) {\n value = bloomBit < 64 ? (bloomBit < 32 ? injector.bf0 : injector.bf1) :\n (bloomBit < 96 ? injector.bf2 : injector.bf3);\n }\n else {\n value = bloomBit < 192 ? (bloomBit < 160 ? injector.bf4 : injector.bf5) :\n (bloomBit < 224 ? injector.bf6 : injector.bf7);\n }\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 if ((value & mask) === mask) {\n return injector;\n }\n // If the current injector does not have the directive, check the bloom filters for the ancestor\n // injectors (cbf0 - cbf7). These filters capture *all* ancestor injectors.\n if (bloomBit < 128) {\n value = bloomBit < 64 ? (bloomBit < 32 ? injector.cbf0 : injector.cbf1) :\n (bloomBit < 96 ? injector.cbf2 : injector.cbf3);\n }\n else {\n value = bloomBit < 192 ? (bloomBit < 160 ? injector.cbf4 : injector.cbf5) :\n (bloomBit < 224 ? injector.cbf6 : injector.cbf7);\n }\n // If the ancestor bloom filter value has the bit corresponding to the directive, traverse up to\n // find the specific injector. If the ancestor bloom filter does not have the bit, we can abort.\n injector = (value & mask) ? injector.parent : null;\n }\n return null;\n}\nvar ReadFromInjectorFn = /** @class */ (function () {\n function ReadFromInjectorFn(read) {\n this.read = read;\n }\n return ReadFromInjectorFn;\n}());\n/**\n * Creates an ElementRef for a given node injector and stores it on the injector.\n * Or, if the ElementRef already exists, retrieves the existing ElementRef.\n *\n * @param di The node injector where we should store a created ElementRef\n * @returns The ElementRef instance to use\n */\nfunction getOrCreateElementRef(di) {\n return di.elementRef || (di.elementRef = new ElementRef$1(di.node.type === 0 /* Container */ ? null : di.node.native));\n}\n\n\n\n\n/** A ref to a node's native element. */\nvar ElementRef$1 = /** @class */ (function () {\n function ElementRef(nativeElement) {\n this.nativeElement = nativeElement;\n }\n return ElementRef;\n}());\n/**\n * Creates a ViewContainerRef and stores it on the injector. Or, if the ViewContainerRef\n * already exists, retrieves the existing ViewContainerRef.\n *\n * @returns The ViewContainerRef instance to use\n */\nfunction getOrCreateContainerRef(di) {\n if (!di.viewContainerRef) {\n var vcRefHost = di.node;\n ngDevMode && assertNodeOfPossibleTypes(vcRefHost, 0 /* Container */, 3 /* Element */);\n var lContainer = createLContainer(vcRefHost.parent, vcRefHost.view);\n var lContainerNode = createLNodeObject(0 /* Container */, vcRefHost.view, vcRefHost.parent, undefined, lContainer, null);\n vcRefHost.dynamicLContainerNode = lContainerNode;\n addToViewTree(vcRefHost.view, lContainer);\n di.viewContainerRef = new ViewContainerRef$1(lContainerNode);\n }\n return di.viewContainerRef;\n}\n/**\n * A ref to a container that enables adding and removing views from that container\n * imperatively.\n */\nvar ViewContainerRef$1 = /** @class */ (function () {\n function ViewContainerRef(_lContainerNode) {\n this._lContainerNode = _lContainerNode;\n this._viewRefs = [];\n }\n ViewContainerRef.prototype.clear = function () {\n var lContainer = this._lContainerNode.data;\n while (lContainer.views.length) {\n this.remove(0);\n }\n };\n ViewContainerRef.prototype.get = function (index) { return this._viewRefs[index] || null; };\n Object.defineProperty(ViewContainerRef.prototype, \"length\", {\n get: function () {\n var lContainer = this._lContainerNode.data;\n return lContainer.views.length;\n },\n enumerable: true,\n configurable: true\n });\n ViewContainerRef.prototype.createEmbeddedView = function (templateRef, context, index) {\n var viewRef = templateRef.createEmbeddedView(context || {});\n this.insert(viewRef, index);\n return viewRef;\n };\n ViewContainerRef.prototype.createComponent = function (componentFactory, index, injector, projectableNodes, ngModule) {\n throw notImplemented();\n };\n ViewContainerRef.prototype.insert = function (viewRef, index) {\n var lViewNode = viewRef._lViewNode;\n var adjustedIdx = this._adjustIndex(index);\n insertView(this._lContainerNode, lViewNode, adjustedIdx);\n // invalidate cache of next sibling RNode (we do similar operation in the containerRefreshEnd\n // instruction)\n this._lContainerNode.native = undefined;\n this._viewRefs.splice(adjustedIdx, 0, viewRef);\n lViewNode.parent = this._lContainerNode;\n // If the view is dynamic (has a template), it needs to be counted both at the container\n // level and at the node above the container.\n if (lViewNode.data.template !== null) {\n // Increment the container view count.\n this._lContainerNode.data.dynamicViewCount++;\n // Look for the parent node and increment its dynamic view count.\n if (this._lContainerNode.parent !== null && this._lContainerNode.parent.data !== null) {\n ngDevMode && assertNodeOfPossibleTypes(this._lContainerNode.parent, 2 /* View */, 3 /* Element */);\n this._lContainerNode.parent.data.dynamicViewCount++;\n }\n }\n return viewRef;\n };\n ViewContainerRef.prototype.move = function (viewRef, newIndex) {\n var index = this.indexOf(viewRef);\n this.detach(index);\n this.insert(viewRef, this._adjustIndex(newIndex));\n return viewRef;\n };\n ViewContainerRef.prototype.indexOf = function (viewRef) { return this._viewRefs.indexOf(viewRef); };\n ViewContainerRef.prototype.remove = function (index) {\n this.detach(index);\n // TODO(ml): proper destroy of the ViewRef, i.e. recursively destroy the LviewNode and its\n // children, delete DOM nodes and QueryList, trigger hooks (onDestroy), destroy the renderer,\n // detach projected nodes\n };\n ViewContainerRef.prototype.detach = function (index) {\n var adjustedIdx = this._adjustIndex(index, -1);\n removeView(this._lContainerNode, adjustedIdx);\n return this._viewRefs.splice(adjustedIdx, 1)[0] || null;\n };\n ViewContainerRef.prototype._adjustIndex = function (index, shift) {\n if (shift === void 0) { shift = 0; }\n if (index == null) {\n return this._lContainerNode.data.views.length + shift;\n }\n if (ngDevMode) {\n assertGreaterThan(index, -1, 'index must be positive');\n // +1 because it's legal to insert at the end.\n assertLessThan(index, this._lContainerNode.data.views.length + 1 + shift, 'index');\n }\n return index;\n };\n return ViewContainerRef;\n}());\n/**\n * Creates a TemplateRef and stores it on the injector. Or, if the TemplateRef already\n * exists, retrieves the existing TemplateRef.\n *\n * @param di The node injector where we should store a created TemplateRef\n * @returns The TemplateRef instance to use\n */\nfunction getOrCreateTemplateRef(di) {\n ngDevMode && assertNodeType(di.node, 0 /* Container */);\n var data = di.node.data;\n var tView = di.node.view.tView;\n return di.templateRef || (di.templateRef = new TemplateRef$1(getOrCreateElementRef(di), data.template, getRenderer(), tView.directiveRegistry, tView.pipeRegistry));\n}\nvar TemplateRef$1 = /** @class */ (function () {\n function TemplateRef(elementRef, template, _renderer, _directives, _pipes) {\n this._renderer = _renderer;\n this._directives = _directives;\n this._pipes = _pipes;\n this.elementRef = elementRef;\n this._template = template;\n }\n TemplateRef.prototype.createEmbeddedView = function (context) {\n var viewNode = renderEmbeddedTemplate(null, this._template, context, this._renderer, this._directives, this._pipes);\n return addDestroyable(new EmbeddedViewRef$1(viewNode, this._template, context));\n };\n return TemplateRef;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Create a component definition object.\n *\n *\n * # Example\n * ```\n * class MyDirective {\n * // Generated by Angular Template Compiler\n * // [Symbol] syntax will not be supported by TypeScript until v2.7\n * static ngComponentDef = defineComponent({\n * ...\n * });\n * }\n * ```\n */\nfunction defineComponent(componentDefinition) {\n var type = componentDefinition.type;\n var pipeTypes = componentDefinition.pipes;\n var directiveTypes = componentDefinition.directives;\n var def = {\n type: type,\n diPublic: null,\n factory: componentDefinition.factory,\n template: componentDefinition.template || null,\n hostBindings: componentDefinition.hostBindings || null,\n attributes: componentDefinition.attributes || null,\n inputs: invertObject(componentDefinition.inputs),\n outputs: invertObject(componentDefinition.outputs),\n rendererType: resolveRendererType2(componentDefinition.rendererType) || null,\n exportAs: componentDefinition.exportAs,\n onInit: type.prototype.ngOnInit || null,\n doCheck: type.prototype.ngDoCheck || null,\n afterContentInit: type.prototype.ngAfterContentInit || null,\n afterContentChecked: type.prototype.ngAfterContentChecked || null,\n afterViewInit: type.prototype.ngAfterViewInit || null,\n afterViewChecked: type.prototype.ngAfterViewChecked || null,\n onDestroy: type.prototype.ngOnDestroy || null,\n onPush: componentDefinition.changeDetection === exports.ChangeDetectionStrategy.OnPush,\n directiveDefs: directiveTypes ?\n function () { return (typeof directiveTypes === 'function' ? directiveTypes() : directiveTypes)\n .map(extractDirectiveDef); } :\n null,\n pipeDefs: pipeTypes ?\n function () { return (typeof pipeTypes === 'function' ? pipeTypes() : pipeTypes).map(extractPipeDef); } :\n null,\n selectors: componentDefinition.selectors\n };\n var feature = componentDefinition.features;\n feature && feature.forEach(function (fn) { return fn(def); });\n return def;\n}\nfunction extractDirectiveDef(type) {\n var def = type.ngComponentDef || type.ngDirectiveDef;\n if (ngDevMode && !def) {\n throw new Error(\"'\" + type.name + \"' is neither 'ComponentType' or 'DirectiveType'.\");\n }\n return def;\n}\nfunction extractPipeDef(type) {\n var def = type.ngPipeDef;\n if (ngDevMode && !def) {\n throw new Error(\"'\" + type.name + \"' is not a 'PipeType'.\");\n }\n return def;\n}\nvar PRIVATE_PREFIX = '__ngOnChanges_';\n/**\n * Creates an NgOnChangesFeature function for a component's features list.\n *\n * It accepts an optional map of minified input property names to original property names,\n * if any input properties have a public alias.\n *\n * The NgOnChangesFeature function that is returned decorates a component with support for\n * the ngOnChanges lifecycle hook, so it should be included in any component that implements\n * that hook.\n *\n * Example usage:\n *\n * ```\n * static ngComponentDef = defineComponent({\n * ...\n * inputs: {name: 'publicName'},\n * features: [NgOnChangesFeature({name: 'name'})]\n * });\n * ```\n *\n * @param inputPropertyNames Map of input property names, if they are aliased\n * @returns DirectiveDefFeature\n */\nfunction NgOnChangesFeature(inputPropertyNames) {\n return function (definition) {\n var inputs = definition.inputs;\n var proto = definition.type.prototype;\n // Place where we will store SimpleChanges if there is a change\n Object.defineProperty(proto, PRIVATE_PREFIX, { value: undefined, writable: true });\n var _loop_1 = function (pubKey) {\n var minKey = inputs[pubKey];\n var propertyName = inputPropertyNames && inputPropertyNames[minKey] || pubKey;\n var privateMinKey = PRIVATE_PREFIX + minKey;\n // Create a place where the actual value will be stored and make it non-enumerable\n Object.defineProperty(proto, privateMinKey, { value: undefined, writable: true });\n var existingDesc = Object.getOwnPropertyDescriptor(proto, minKey);\n // create a getter and setter for property\n Object.defineProperty(proto, minKey, {\n get: function () {\n return (existingDesc && existingDesc.get) ? existingDesc.get.call(this) :\n this[privateMinKey];\n },\n set: function (value) {\n var simpleChanges = this[PRIVATE_PREFIX];\n var isFirstChange = simpleChanges === undefined;\n if (simpleChanges == null) {\n simpleChanges = this[PRIVATE_PREFIX] = {};\n }\n simpleChanges[propertyName] = new SimpleChange(this[privateMinKey], value, isFirstChange);\n (existingDesc && existingDesc.set) ? existingDesc.set.call(this, value) :\n this[privateMinKey] = value;\n }\n });\n };\n for (var pubKey in inputs) {\n _loop_1(pubKey);\n }\n // If an onInit hook is defined, it will need to wrap the ngOnChanges call\n // so the call order is changes-init-check in creation mode. In subsequent\n // change detection runs, only the check wrapper will be called.\n if (definition.onInit != null) {\n definition.onInit = onChangesWrapper(definition.onInit);\n }\n definition.doCheck = onChangesWrapper(definition.doCheck);\n };\n function onChangesWrapper(delegateHook) {\n return function () {\n var simpleChanges = this[PRIVATE_PREFIX];\n if (simpleChanges != null) {\n this.ngOnChanges(simpleChanges);\n this[PRIVATE_PREFIX] = null;\n }\n delegateHook && delegateHook.apply(this);\n };\n }\n}\nfunction PublicFeature(definition) {\n definition.diPublic = diPublic;\n}\nvar EMPTY$1 = {};\n/** Swaps the keys and values of an object. */\nfunction invertObject(obj) {\n if (obj == null)\n return EMPTY$1;\n var newObj = {};\n for (var minifiedKey in obj) {\n newObj[obj[minifiedKey]] = minifiedKey;\n }\n return newObj;\n}\n/**\n * Create a directive definition object.\n *\n * # Example\n * ```\n * class MyDirective {\n * // Generated by Angular Template Compiler\n * // [Symbol] syntax will not be supported by TypeScript until v2.7\n * static ngDirectiveDef = defineDirective({\n * ...\n * });\n * }\n * ```\n */\nvar defineDirective = defineComponent;\n/**\n * Create a pipe definition object.\n *\n * # Example\n * ```\n * class MyPipe implements PipeTransform {\n * // Generated by Angular Template Compiler\n * static ngPipeDef = definePipe({\n * ...\n * });\n * }\n * ```\n * @param pipeDef Pipe definition generated by the compiler\n */\nfunction definePipe(pipeDef) {\n return {\n name: pipeDef.name,\n n: pipeDef.factory,\n pure: pipeDef.pure !== false,\n onDestroy: pipeDef.type.prototype.ngOnDestroy || null\n };\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * If the value hasn't been saved, calls the pure function to store and return the\n * value. If it has been saved, returns the saved value.\n *\n * @param pureFn Function that returns a value\n * @returns value\n */\nfunction pureFunction0(pureFn, thisArg) {\n return getCreationMode() ? checkAndUpdateBinding$1(thisArg ? pureFn.call(thisArg) : pureFn()) :\n consumeBinding();\n}\n/**\n * If the value of the provided exp has changed, calls the pure function to return\n * an updated value. Or if the value has not changed, returns cached value.\n *\n * @param pureFn Function that returns an updated value\n * @param exp Updated expression value\n * @returns Updated value\n */\nfunction pureFunction1(pureFn, exp, thisArg) {\n return bindingUpdated(exp) ?\n checkAndUpdateBinding$1(thisArg ? pureFn.call(thisArg, exp) : pureFn(exp)) :\n consumeBinding();\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param pureFn\n * @param exp1\n * @param exp2\n * @returns Updated value\n */\nfunction pureFunction2(pureFn, exp1, exp2, thisArg) {\n return bindingUpdated2(exp1, exp2) ?\n checkAndUpdateBinding$1(thisArg ? pureFn.call(thisArg, exp1, exp2) : pureFn(exp1, exp2)) :\n consumeBinding();\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @returns Updated value\n */\nfunction pureFunction3(pureFn, exp1, exp2, exp3, thisArg) {\n var different = bindingUpdated2(exp1, exp2);\n return bindingUpdated(exp3) || different ?\n checkAndUpdateBinding$1(thisArg ? pureFn.call(thisArg, exp1, exp2, exp3) : pureFn(exp1, exp2, exp3)) :\n consumeBinding();\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @returns Updated value\n */\nfunction pureFunction4(pureFn, exp1, exp2, exp3, exp4, thisArg) {\n return bindingUpdated4(exp1, exp2, exp3, exp4) ?\n checkAndUpdateBinding$1(thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4) : pureFn(exp1, exp2, exp3, exp4)) :\n consumeBinding();\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @returns Updated value\n */\nfunction pureFunction5(pureFn, exp1, exp2, exp3, exp4, exp5, thisArg) {\n var different = bindingUpdated4(exp1, exp2, exp3, exp4);\n return bindingUpdated(exp5) || different ?\n checkAndUpdateBinding$1(thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5) :\n pureFn(exp1, exp2, exp3, exp4, exp5)) :\n consumeBinding();\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param exp6\n * @returns Updated value\n */\nfunction pureFunction6(pureFn, exp1, exp2, exp3, exp4, exp5, exp6, thisArg) {\n var different = bindingUpdated4(exp1, exp2, exp3, exp4);\n return bindingUpdated2(exp5, exp6) || different ?\n checkAndUpdateBinding$1(thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6) :\n pureFn(exp1, exp2, exp3, exp4, exp5, exp6)) :\n consumeBinding();\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param exp6\n * @param exp7\n * @returns Updated value\n */\nfunction pureFunction7(pureFn, exp1, exp2, exp3, exp4, exp5, exp6, exp7, thisArg) {\n var different = bindingUpdated4(exp1, exp2, exp3, exp4);\n different = bindingUpdated2(exp5, exp6) || different;\n return bindingUpdated(exp7) || different ?\n checkAndUpdateBinding$1(thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6, exp7) :\n pureFn(exp1, exp2, exp3, exp4, exp5, exp6, exp7)) :\n consumeBinding();\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param exp6\n * @param exp7\n * @param exp8\n * @returns Updated value\n */\nfunction pureFunction8(pureFn, exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8, thisArg) {\n var different = bindingUpdated4(exp1, exp2, exp3, exp4);\n return bindingUpdated4(exp5, exp6, exp7, exp8) || different ?\n checkAndUpdateBinding$1(thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8) :\n pureFn(exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8)) :\n consumeBinding();\n}\n/**\n * pureFunction instruction that can support any number of bindings.\n *\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param pureFn A pure function that takes binding values and builds an object or array\n * containing those values.\n * @param exp An array of binding values\n * @returns Updated value\n */\nfunction pureFunctionV(pureFn, exps, thisArg) {\n var different = false;\n for (var i = 0; i < exps.length; i++) {\n bindingUpdated(exps[i]) && (different = true);\n }\n return different ? checkAndUpdateBinding$1(pureFn.apply(thisArg, exps)) : consumeBinding();\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Create a pipe.\n *\n * @param index Pipe index where the pipe will be stored.\n * @param pipeName The name of the pipe\n * @returns T the instance of the pipe.\n */\nfunction pipe(index, pipeName) {\n var tView = getTView();\n var pipeDef;\n if (tView.firstTemplatePass) {\n pipeDef = getPipeDef(pipeName, tView.pipeRegistry);\n tView.data[index] = pipeDef;\n if (pipeDef.onDestroy) {\n (tView.pipeDestroyHooks || (tView.pipeDestroyHooks = [])).push(index, pipeDef.onDestroy);\n }\n }\n else {\n pipeDef = tView.data[index];\n }\n var pipeInstance = pipeDef.n();\n store(index, pipeInstance);\n return pipeInstance;\n}\n/**\n * Searches the pipe registry for a pipe with the given name. If one is found,\n * returns the pipe. Otherwise, an error is thrown because the pipe cannot be resolved.\n *\n * @param name Name of pipe to resolve\n * @param registry Full list of available pipes\n * @returns Matching PipeDef\n */\nfunction getPipeDef(name, registry) {\n if (registry) {\n for (var i = 0; i < registry.length; i++) {\n var pipeDef = registry[i];\n if (name === pipeDef.name) {\n return pipeDef;\n }\n }\n }\n throw new Error(\"Pipe with name '\" + name + \"' not found!\");\n}\n/**\n * Invokes a pipe with 1 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param v1 1st argument to {@link PipeTransform#transform}.\n */\nfunction pipeBind1(index, v1) {\n var pipeInstance = load(index);\n return isPure(index) ? pureFunction1(pipeInstance.transform, v1, pipeInstance) :\n pipeInstance.transform(v1);\n}\n/**\n * Invokes a pipe with 2 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param v1 1st argument to {@link PipeTransform#transform}.\n * @param v2 2nd argument to {@link PipeTransform#transform}.\n */\nfunction pipeBind2(index, v1, v2) {\n var pipeInstance = load(index);\n return isPure(index) ? pureFunction2(pipeInstance.transform, v1, v2, pipeInstance) :\n pipeInstance.transform(v1, v2);\n}\n/**\n * Invokes a pipe with 3 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param v1 1st argument to {@link PipeTransform#transform}.\n * @param v2 2nd argument to {@link PipeTransform#transform}.\n * @param v3 4rd argument to {@link PipeTransform#transform}.\n */\nfunction pipeBind3(index, v1, v2, v3) {\n var pipeInstance = load(index);\n return isPure(index) ? pureFunction3(pipeInstance.transform.bind(pipeInstance), v1, v2, v3) :\n pipeInstance.transform(v1, v2, v3);\n}\n/**\n * Invokes a pipe with 4 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param v1 1st argument to {@link PipeTransform#transform}.\n * @param v2 2nd argument to {@link PipeTransform#transform}.\n * @param v3 3rd argument to {@link PipeTransform#transform}.\n * @param v4 4th argument to {@link PipeTransform#transform}.\n */\nfunction pipeBind4(index, v1, v2, v3, v4) {\n var pipeInstance = load(index);\n return isPure(index) ? pureFunction4(pipeInstance.transform, v1, v2, v3, v4, pipeInstance) :\n pipeInstance.transform(v1, v2, v3, v4);\n}\n/**\n * Invokes a pipe with variable number of arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param values Array of arguments to pass to {@link PipeTransform#transform} method.\n */\nfunction pipeBindV(index, values) {\n var pipeInstance = load(index);\n return isPure(index) ? pureFunctionV(pipeInstance.transform, values, pipeInstance) :\n pipeInstance.transform.apply(pipeInstance, values);\n}\nfunction isPure(index) {\n return getTView().data[index].pure;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar LQueries_ = /** @class */ (function () {\n function LQueries_(deep) {\n this.shallow = null;\n this.deep = null;\n this.deep = deep == null ? null : deep;\n }\n LQueries_.prototype.track = function (queryList, predicate, descend, read) {\n // TODO(misko): This is not right. In case of inherited state, a calling track will incorrectly\n // mutate parent.\n if (descend) {\n this.deep = createQuery$1(this.deep, queryList, predicate, read != null ? read : null);\n }\n else {\n this.shallow = createQuery$1(this.shallow, queryList, predicate, read != null ? read : null);\n }\n };\n LQueries_.prototype.child = function () {\n if (this.deep === null) {\n // if we don't have any deep queries then no need to track anything more.\n return null;\n }\n if (this.shallow === null) {\n // DeepQuery: We can reuse the current state if the child state would be same as current\n // state.\n return this;\n }\n else {\n // We need to create new state\n return new LQueries_(this.deep);\n }\n };\n LQueries_.prototype.container = function () {\n var result = null;\n var query = this.deep;\n while (query) {\n var containerValues = []; // prepare room for views\n query.values.push(containerValues);\n var clonedQuery = { next: null, list: query.list, predicate: query.predicate, values: containerValues };\n clonedQuery.next = result;\n result = clonedQuery;\n query = query.next;\n }\n return result ? new LQueries_(result) : null;\n };\n LQueries_.prototype.enterView = function (index) {\n var result = null;\n var query = this.deep;\n while (query) {\n var viewValues = []; // prepare room for view nodes\n query.values.splice(index, 0, viewValues);\n var clonedQuery = { next: null, list: query.list, predicate: query.predicate, values: viewValues };\n clonedQuery.next = result;\n result = clonedQuery;\n query = query.next;\n }\n return result ? new LQueries_(result) : null;\n };\n LQueries_.prototype.addNode = function (node) {\n add(this.shallow, node);\n add(this.deep, node);\n };\n LQueries_.prototype.removeView = function (index) {\n var query = this.deep;\n while (query) {\n var removed = query.values.splice(index, 1);\n // mark a query as dirty only when removed view had matching modes\n ngDevMode && assertEqual(removed.length, 1, 'removed.length');\n if (removed[0].length) {\n query.list.setDirty();\n }\n query = query.next;\n }\n };\n return LQueries_;\n}());\n/**\n * Iterates over local names for a given node and returns directive index\n * (or -1 if a local name points to an element).\n *\n * @param tNode static data of a node to check\n * @param selector selector to match\n * @returns directive index, -1 or null if a selector didn't match any of the local names\n */\nfunction getIdxOfMatchingSelector(tNode, selector) {\n var localNames = tNode.localNames;\n if (localNames) {\n for (var i = 0; i < localNames.length; i += 2) {\n if (localNames[i] === selector) {\n return localNames[i + 1];\n }\n }\n }\n return null;\n}\n/**\n * Iterates over all the directives for a node and returns index of a directive for a given type.\n *\n * @param node Node on which directives are present.\n * @param type Type of a directive to look for.\n * @returns Index of a found directive or null when none found.\n */\nfunction getIdxOfMatchingDirective(node, type) {\n var defs = node.view.tView.directives;\n var flags = node.tNode.flags;\n var count = flags & 4095;\n var start = flags >> 13;\n var end = start + count;\n for (var i = start; i < end; i++) {\n var def = defs[i];\n if (def.type === type && def.diPublic) {\n return i;\n }\n }\n return null;\n}\nfunction readFromNodeInjector(nodeInjector, node, read, directiveIdx) {\n if (read instanceof ReadFromInjectorFn) {\n return read.read(nodeInjector, node, directiveIdx);\n }\n else {\n var matchingIdx = getIdxOfMatchingDirective(node, read);\n if (matchingIdx !== null) {\n return node.view.directives[matchingIdx];\n }\n }\n return null;\n}\nfunction add(query, node) {\n var nodeInjector = getOrCreateNodeInjectorForNode(node);\n while (query) {\n var predicate = query.predicate;\n var type = predicate.type;\n if (type) {\n var directiveIdx = getIdxOfMatchingDirective(node, type);\n if (directiveIdx !== null) {\n // a node is matching a predicate - determine what to read\n // if read token and / or strategy is not specified, use type as read token\n var result = readFromNodeInjector(nodeInjector, node, predicate.read || type, directiveIdx);\n if (result !== null) {\n addMatch(query, result);\n }\n }\n }\n else {\n var selector = predicate.selector;\n for (var i = 0; i < selector.length; i++) {\n ngDevMode && assertNotNull(node.tNode, 'node.tNode');\n var directiveIdx = getIdxOfMatchingSelector(node.tNode, selector[i]);\n if (directiveIdx !== null) {\n // a node is matching a predicate - determine what to read\n // note that queries using name selector must specify read strategy\n ngDevMode && assertNotNull(predicate.read, 'the node should have a predicate');\n var result = readFromNodeInjector(nodeInjector, node, predicate.read, directiveIdx);\n if (result !== null) {\n addMatch(query, result);\n }\n }\n }\n }\n query = query.next;\n }\n}\nfunction addMatch(query, matchingValue) {\n query.values.push(matchingValue);\n query.list.setDirty();\n}\nfunction createPredicate(predicate, read) {\n var isArray = Array.isArray(predicate);\n return {\n type: isArray ? null : predicate,\n selector: isArray ? predicate : null,\n read: read\n };\n}\nfunction createQuery$1(previous, queryList, predicate, read) {\n return {\n next: previous,\n list: queryList,\n predicate: createPredicate(predicate, read),\n values: queryList._valuesTree\n };\n}\nvar QueryList_ = /** @class */ (function () {\n function QueryList_() {\n this.dirty = true;\n this.changes = new EventEmitter();\n this._values = [];\n /** @internal */\n this._valuesTree = [];\n }\n Object.defineProperty(QueryList_.prototype, \"length\", {\n get: function () { return this._values.length; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(QueryList_.prototype, \"first\", {\n get: function () {\n var values = this._values;\n return values.length ? values[0] : null;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(QueryList_.prototype, \"last\", {\n get: function () {\n var values = this._values;\n return values.length ? values[values.length - 1] : null;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * See\n * [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)\n */\n QueryList_.prototype.map = function (fn) { return this._values.map(fn); };\n /**\n * See\n * [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)\n */\n QueryList_.prototype.filter = function (fn) {\n return this._values.filter(fn);\n };\n /**\n * See\n * [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)\n */\n QueryList_.prototype.find = function (fn) {\n return this._values.find(fn);\n };\n /**\n * See\n * [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)\n */\n QueryList_.prototype.reduce = function (fn, init) {\n return this._values.reduce(fn, init);\n };\n /**\n * See\n * [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)\n */\n QueryList_.prototype.forEach = function (fn) { this._values.forEach(fn); };\n /**\n * See\n * [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)\n */\n QueryList_.prototype.some = function (fn) {\n return this._values.some(fn);\n };\n QueryList_.prototype.toArray = function () { return this._values.slice(0); };\n QueryList_.prototype[getSymbolIterator()] = function () { return this._values[getSymbolIterator()](); };\n QueryList_.prototype.toString = function () { return this._values.toString(); };\n QueryList_.prototype.reset = function (res) {\n this._values = flatten$1(res);\n this.dirty = false;\n };\n QueryList_.prototype.notifyOnChanges = function () { this.changes.emit(this); };\n QueryList_.prototype.setDirty = function () { this.dirty = true; };\n QueryList_.prototype.destroy = function () {\n this.changes.complete();\n this.changes.unsubscribe();\n };\n return QueryList_;\n}());\nvar QueryList$1 = QueryList_;\n/**\n * Creates and returns a QueryList.\n *\n * @param memoryIndex The index in memory where the QueryList should be saved. If null,\n * this is is a content query and the QueryList will be saved later through directiveCreate.\n * @param predicate The type for which the query will search\n * @param descend Whether or not to descend into children\n * @param read What to save in the query\n * @returns QueryList<T>\n */\nfunction query(memoryIndex, predicate, descend, read) {\n ngDevMode && assertPreviousIsParent();\n var queryList = new QueryList$1();\n var queries = getCurrentQueries(LQueries_);\n queries.track(queryList, predicate, descend, read);\n if (memoryIndex != null) {\n store(memoryIndex, queryList);\n }\n return queryList;\n}\n/**\n * Refreshes a query by combining matches from all active views and removing matches from deleted\n * views.\n * Returns true if a query got dirty during change detection, false otherwise.\n */\nfunction queryRefresh(queryList) {\n var queryListImpl = queryList;\n if (queryList.dirty) {\n queryList.reset(queryListImpl._valuesTree);\n queryList.notifyOnChanges();\n return true;\n }\n return false;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar BRAND = '__SANITIZER_TRUSTED_BRAND__';\n/**\n * An `html` sanitizer which converts untrusted `html` **string** into trusted string by removing\n * dangerous content.\n *\n * This method parses the `html` and locates potentially dangerous content (such as urls and\n * javascript) and removes it.\n *\n * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustHtml}.\n *\n * @param unsafeHtml untrusted `html`, typically from the user.\n * @returns `html` string which is safe to display to user, because all of the dangerous javascript\n * and urls have been removed.\n */\nfunction sanitizeHtml(unsafeHtml) {\n if (unsafeHtml instanceof String && unsafeHtml[BRAND] === 'Html') {\n return unsafeHtml.toString();\n }\n return _sanitizeHtml(document, stringify$1(unsafeHtml));\n}\n/**\n * A `style` sanitizer which converts untrusted `style` **string** into trusted string by removing\n * dangerous content.\n *\n * This method parses the `style` and locates potentially dangerous content (such as urls and\n * javascript) and removes it.\n *\n * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustStyle}.\n *\n * @param unsafeStyle untrusted `style`, typically from the user.\n * @returns `style` string which is safe to bind to the `style` properties, because all of the\n * dangerous javascript and urls have been removed.\n */\nfunction sanitizeStyle(unsafeStyle) {\n if (unsafeStyle instanceof String && unsafeStyle[BRAND] === 'Style') {\n return unsafeStyle.toString();\n }\n return _sanitizeStyle(stringify$1(unsafeStyle));\n}\n/**\n * A `url` sanitizer which converts untrusted `url` **string** into trusted string by removing\n * dangerous\n * content.\n *\n * This method parses the `url` and locates potentially dangerous content (such as javascript) and\n * removes it.\n *\n * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustUrl}.\n *\n * @param unsafeUrl untrusted `url`, typically from the user.\n * @returns `url` string which is safe to bind to the `src` properties such as `<img src>`, because\n * all of the dangerous javascript has been removed.\n */\nfunction sanitizeUrl(unsafeUrl) {\n if (unsafeUrl instanceof String && unsafeUrl[BRAND] === 'Url') {\n return unsafeUrl.toString();\n }\n return _sanitizeUrl(stringify$1(unsafeUrl));\n}\n/**\n * A `url` sanitizer which only lets trusted `url`s through.\n *\n * This passes only `url`s marked trusted by calling {@link bypassSanitizationTrustResourceUrl}.\n *\n * @param unsafeResourceUrl untrusted `url`, typically from the user.\n * @returns `url` string which is safe to bind to the `src` properties such as `<img src>`, because\n * only trusted `url`s have been allowed to pass.\n */\nfunction sanitizeResourceUrl(unsafeResourceUrl) {\n if (unsafeResourceUrl instanceof String &&\n unsafeResourceUrl[BRAND] === 'ResourceUrl') {\n return unsafeResourceUrl.toString();\n }\n throw new Error('unsafe value used in a resource URL context (see http://g.co/ng/security#xss)');\n}\n/**\n * A `script` sanitizer which only lets trusted javascript through.\n *\n * This passes only `script`s marked trusted by calling {@link bypassSanitizationTrustScript}.\n *\n * @param unsafeScript untrusted `script`, typically from the user.\n * @returns `url` string which is safe to bind to the `<script>` element such as `<img src>`,\n * because only trusted `scripts`s have been allowed to pass.\n */\n\n/**\n * Mark `html` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link htmlSanitizer} to be trusted implicitly.\n *\n * @param trustedHtml `html` string which needs to be implicitly trusted.\n * @returns a `html` `String` which has been branded to be implicitly trusted.\n */\nfunction bypassSanitizationTrustHtml(trustedHtml) {\n return bypassSanitizationTrustString(trustedHtml, 'Html');\n}\n/**\n * Mark `style` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link styleSanitizer} to be trusted implicitly.\n *\n * @param trustedStyle `style` string which needs to be implicitly trusted.\n * @returns a `style` `String` which has been branded to be implicitly trusted.\n */\nfunction bypassSanitizationTrustStyle(trustedStyle) {\n return bypassSanitizationTrustString(trustedStyle, 'Style');\n}\n/**\n * Mark `script` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link scriptSanitizer} to be trusted implicitly.\n *\n * @param trustedScript `script` string which needs to be implicitly trusted.\n * @returns a `script` `String` which has been branded to be implicitly trusted.\n */\nfunction bypassSanitizationTrustScript(trustedScript) {\n return bypassSanitizationTrustString(trustedScript, 'Script');\n}\n/**\n * Mark `url` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link urlSanitizer} to be trusted implicitly.\n *\n * @param trustedUrl `url` string which needs to be implicitly trusted.\n * @returns a `url` `String` which has been branded to be implicitly trusted.\n */\nfunction bypassSanitizationTrustUrl(trustedUrl) {\n return bypassSanitizationTrustString(trustedUrl, 'Url');\n}\n/**\n * Mark `url` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link resourceUrlSanitizer} to be trusted implicitly.\n *\n * @param trustedResourceUrl `url` string which needs to be implicitly trusted.\n * @returns a `url` `String` which has been branded to be implicitly trusted.\n */\nfunction bypassSanitizationTrustResourceUrl(trustedResourceUrl) {\n return bypassSanitizationTrustString(trustedResourceUrl, 'ResourceUrl');\n}\nfunction bypassSanitizationTrustString(trustedString, mode) {\n var trusted = new String(trustedString);\n trusted[BRAND] = mode;\n return trusted;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// clang-format off\n\n// clang-format on\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * @module\n * @description\n * Entry point from which you should import all public core APIs.\n */\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * @module\n * @description\n * Entry point for all public APIs of this package.\n */\n\n// This file only reexports content of the `src` folder. Keep it that way.\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// This file is not used to build this module. It is only used during editing\n// by the TypeScript language service and during build for verification. `ngc`\n// replaces this file with production index.ts when it rewrites private symbol\n// names.\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexports.ɵangular_packages_core_core_j = _iterableDiffersFactory;\nexports.ɵangular_packages_core_core_k = _keyValueDiffersFactory;\nexports.ɵangular_packages_core_core_l = _localeFactory;\nexports.ɵangular_packages_core_core_f = _appIdRandomProviderFactory;\nexports.ɵangular_packages_core_core_g = defaultKeyValueDiffers;\nexports.ɵangular_packages_core_core_h = DefaultIterableDifferFactory;\nexports.ɵangular_packages_core_core_i = DefaultKeyValueDifferFactory;\nexports.ɵangular_packages_core_core_c = ReflectiveInjector_;\nexports.ɵangular_packages_core_core_d = ReflectiveDependency;\nexports.ɵangular_packages_core_core_e = resolveReflectiveProviders;\nexports.ɵangular_packages_core_core_m = wtfEnabled;\nexports.ɵangular_packages_core_core_o = createScope;\nexports.ɵangular_packages_core_core_n = detectWTF;\nexports.ɵangular_packages_core_core_r = endTimeRange;\nexports.ɵangular_packages_core_core_p = leave;\nexports.ɵangular_packages_core_core_q = startTimeRange;\nexports.ɵangular_packages_core_core_v = getOrCreateChangeDetectorRef;\nexports.ɵangular_packages_core_core_x = getOrCreateContainerRef;\nexports.ɵangular_packages_core_core_w = getOrCreateInjectable;\nexports.ɵangular_packages_core_core_u = getOrCreateNodeInjector;\nexports.ɵangular_packages_core_core_y = getOrCreateTemplateRef;\nexports.ɵangular_packages_core_core_bb = bindingUpdated;\nexports.ɵangular_packages_core_core_bd = bindingUpdated2;\nexports.ɵangular_packages_core_core_be = bindingUpdated4;\nexports.ɵangular_packages_core_core_bc = checkAndUpdateBinding$1;\nexports.ɵangular_packages_core_core_ba = consumeBinding;\nexports.ɵangular_packages_core_core_z = getCreationMode;\nexports.ɵangular_packages_core_core_a = makeParamDecorator;\nexports.ɵangular_packages_core_core_b = makePropDecorator;\nexports.ɵangular_packages_core_core_s = _def;\nexports.ɵangular_packages_core_core_t = DebugContext;\nexports.createPlatform = createPlatform;\nexports.assertPlatform = assertPlatform;\nexports.destroyPlatform = destroyPlatform;\nexports.getPlatform = getPlatform;\nexports.PlatformRef = PlatformRef;\nexports.ApplicationRef = ApplicationRef;\nexports.enableProdMode = enableProdMode;\nexports.isDevMode = isDevMode;\nexports.createPlatformFactory = createPlatformFactory;\nexports.NgProbeToken = NgProbeToken;\nexports.APP_ID = APP_ID;\nexports.PACKAGE_ROOT_URL = PACKAGE_ROOT_URL;\nexports.PLATFORM_INITIALIZER = PLATFORM_INITIALIZER;\nexports.PLATFORM_ID = PLATFORM_ID;\nexports.APP_BOOTSTRAP_LISTENER = APP_BOOTSTRAP_LISTENER;\nexports.APP_INITIALIZER = APP_INITIALIZER;\nexports.ApplicationInitStatus = ApplicationInitStatus;\nexports.DebugElement = DebugElement;\nexports.DebugNode = DebugNode;\nexports.asNativeElements = asNativeElements;\nexports.getDebugNode = getDebugNode;\nexports.Testability = Testability;\nexports.TestabilityRegistry = TestabilityRegistry;\nexports.setTestabilityGetter = setTestabilityGetter;\nexports.TRANSLATIONS = TRANSLATIONS;\nexports.TRANSLATIONS_FORMAT = TRANSLATIONS_FORMAT;\nexports.LOCALE_ID = LOCALE_ID;\nexports.ApplicationModule = ApplicationModule;\nexports.wtfCreateScope = wtfCreateScope;\nexports.wtfLeave = wtfLeave;\nexports.wtfStartTimeRange = wtfStartTimeRange;\nexports.wtfEndTimeRange = wtfEndTimeRange;\nexports.Type = Type;\nexports.EventEmitter = EventEmitter;\nexports.ErrorHandler = ErrorHandler;\nexports.Sanitizer = Sanitizer;\nexports.ANALYZE_FOR_ENTRY_COMPONENTS = ANALYZE_FOR_ENTRY_COMPONENTS;\nexports.Attribute = Attribute;\nexports.ContentChild = ContentChild;\nexports.ContentChildren = ContentChildren;\nexports.Query = Query;\nexports.ViewChild = ViewChild;\nexports.ViewChildren = ViewChildren;\nexports.Component = Component;\nexports.Directive = Directive;\nexports.HostBinding = HostBinding;\nexports.HostListener = HostListener;\nexports.Input = Input;\nexports.Output = Output;\nexports.Pipe = Pipe;\nexports.CUSTOM_ELEMENTS_SCHEMA = CUSTOM_ELEMENTS_SCHEMA;\nexports.NO_ERRORS_SCHEMA = NO_ERRORS_SCHEMA;\nexports.NgModule = NgModule;\nexports.Version = Version;\nexports.VERSION = VERSION;\nexports.defineInjectable = defineInjectable;\nexports.defineInjector = defineInjector;\nexports.forwardRef = forwardRef;\nexports.resolveForwardRef = resolveForwardRef;\nexports.Injectable = Injectable;\nexports.inject = inject;\nexports.INJECTOR = INJECTOR;\nexports.Injector = Injector;\nexports.ReflectiveInjector = ReflectiveInjector;\nexports.createInjector = createInjector;\nexports.ResolvedReflectiveFactory = ResolvedReflectiveFactory;\nexports.ReflectiveKey = ReflectiveKey;\nexports.InjectionToken = InjectionToken;\nexports.Inject = Inject;\nexports.Optional = Optional;\nexports.Self = Self;\nexports.SkipSelf = SkipSelf;\nexports.Host = Host;\nexports.NgZone = NgZone;\nexports.RenderComponentType = RenderComponentType;\nexports.Renderer = Renderer;\nexports.Renderer2 = Renderer2;\nexports.RendererFactory2 = RendererFactory2;\nexports.RootRenderer = RootRenderer;\nexports.COMPILER_OPTIONS = COMPILER_OPTIONS;\nexports.Compiler = Compiler;\nexports.CompilerFactory = CompilerFactory;\nexports.ModuleWithComponentFactories = ModuleWithComponentFactories;\nexports.ComponentFactory = ComponentFactory;\nexports.ComponentRef = ComponentRef;\nexports.ComponentFactoryResolver = ComponentFactoryResolver;\nexports.ElementRef = ElementRef;\nexports.NgModuleFactory = NgModuleFactory;\nexports.NgModuleRef = NgModuleRef;\nexports.NgModuleFactoryLoader = NgModuleFactoryLoader;\nexports.getModuleFactory = getModuleFactory;\nexports.QueryList = QueryList;\nexports.SystemJsNgModuleLoader = SystemJsNgModuleLoader;\nexports.SystemJsNgModuleLoaderConfig = SystemJsNgModuleLoaderConfig;\nexports.TemplateRef = TemplateRef;\nexports.ViewContainerRef = ViewContainerRef;\nexports.EmbeddedViewRef = EmbeddedViewRef;\nexports.ViewRef = ViewRef;\nexports.ChangeDetectorRef = ChangeDetectorRef;\nexports.DefaultIterableDiffer = DefaultIterableDiffer;\nexports.IterableDiffers = IterableDiffers;\nexports.KeyValueDiffers = KeyValueDiffers;\nexports.SimpleChange = SimpleChange;\nexports.WrappedValue = WrappedValue;\nexports.platformCore = platformCore;\nexports.ɵALLOW_MULTIPLE_PLATFORMS = ALLOW_MULTIPLE_PLATFORMS;\nexports.ɵAPP_ID_RANDOM_PROVIDER = APP_ID_RANDOM_PROVIDER;\nexports.ɵdefaultIterableDiffers = defaultIterableDiffers;\nexports.ɵdevModeEqual = devModeEqual;\nexports.ɵisListLikeIterable = isListLikeIterable;\nexports.ɵisDefaultChangeDetectionStrategy = isDefaultChangeDetectionStrategy;\nexports.ɵConsole = Console;\nexports.ɵinject = inject;\nexports.ɵsetCurrentInjector = setCurrentInjector;\nexports.ɵAPP_ROOT = APP_ROOT;\nexports.ɵComponentFactory = ComponentFactory;\nexports.ɵCodegenComponentFactoryResolver = CodegenComponentFactoryResolver;\nexports.ɵReflectionCapabilities = ReflectionCapabilities;\nexports.ɵRenderDebugInfo = RenderDebugInfo;\nexports.ɵ_sanitizeHtml = _sanitizeHtml;\nexports.ɵ_sanitizeStyle = _sanitizeStyle;\nexports.ɵ_sanitizeUrl = _sanitizeUrl;\nexports.ɵglobal = _global;\nexports.ɵlooseIdentical = looseIdentical;\nexports.ɵstringify = stringify;\nexports.ɵmakeDecorator = makeDecorator;\nexports.ɵisObservable = isObservable;\nexports.ɵisPromise = isPromise;\nexports.ɵclearOverrides = clearOverrides;\nexports.ɵoverrideComponentView = overrideComponentView;\nexports.ɵoverrideProvider = overrideProvider;\nexports.ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR = NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR;\nexports.ɵdefineComponent = defineComponent;\nexports.ɵdefineDirective = defineDirective;\nexports.ɵdefinePipe = definePipe;\nexports.ɵdetectChanges = detectChanges;\nexports.ɵrenderComponent = renderComponent;\nexports.ɵdirectiveInject = directiveInject;\nexports.ɵinjectTemplateRef = injectTemplateRef;\nexports.ɵinjectViewContainerRef = injectViewContainerRef;\nexports.ɵinjectChangeDetectorRef = injectChangeDetectorRef;\nexports.ɵinjectAttribute = injectAttribute;\nexports.ɵPublicFeature = PublicFeature;\nexports.ɵNgOnChangesFeature = NgOnChangesFeature;\nexports.ɵmarkDirty = markDirty;\nexports.ɵNC = NO_CHANGE;\nexports.ɵC = container;\nexports.ɵE = elementStart;\nexports.ɵL = listener;\nexports.ɵT = text;\nexports.ɵV = embeddedViewStart;\nexports.ɵQ = query;\nexports.ɵd = loadDirective;\nexports.ɵP = projection;\nexports.ɵb = bind;\nexports.ɵi1 = interpolation1;\nexports.ɵi2 = interpolation2;\nexports.ɵi3 = interpolation3;\nexports.ɵi4 = interpolation4;\nexports.ɵi5 = interpolation5;\nexports.ɵi6 = interpolation6;\nexports.ɵi7 = interpolation7;\nexports.ɵi8 = interpolation8;\nexports.ɵiV = interpolationV;\nexports.ɵpb1 = pipeBind1;\nexports.ɵpb2 = pipeBind2;\nexports.ɵpb3 = pipeBind3;\nexports.ɵpb4 = pipeBind4;\nexports.ɵpbV = pipeBindV;\nexports.ɵf0 = pureFunction0;\nexports.ɵf1 = pureFunction1;\nexports.ɵf2 = pureFunction2;\nexports.ɵf3 = pureFunction3;\nexports.ɵf4 = pureFunction4;\nexports.ɵf5 = pureFunction5;\nexports.ɵf6 = pureFunction6;\nexports.ɵf7 = pureFunction7;\nexports.ɵf8 = pureFunction8;\nexports.ɵfV = pureFunctionV;\nexports.ɵcR = containerRefreshStart;\nexports.ɵcr = containerRefreshEnd;\nexports.ɵqR = queryRefresh;\nexports.ɵe = elementEnd;\nexports.ɵp = elementProperty;\nexports.ɵpD = projectionDef;\nexports.ɵa = elementAttribute;\nexports.ɵs = elementStyle;\nexports.ɵsn = elementStyleNamed;\nexports.ɵk = elementClass;\nexports.ɵkn = elementClassNamed;\nexports.ɵt = textBinding;\nexports.ɵv = embeddedViewEnd;\nexports.ɵst = store;\nexports.ɵld = load;\nexports.ɵPp = pipe;\nexports.ɵwhenRendered = whenRendered;\nexports.ɵbypassSanitizationTrustHtml = bypassSanitizationTrustHtml;\nexports.ɵbypassSanitizationTrustStyle = bypassSanitizationTrustStyle;\nexports.ɵbypassSanitizationTrustScript = bypassSanitizationTrustScript;\nexports.ɵbypassSanitizationTrustUrl = bypassSanitizationTrustUrl;\nexports.ɵbypassSanitizationTrustResourceUrl = bypassSanitizationTrustResourceUrl;\nexports.ɵsanitizeHtml = sanitizeHtml;\nexports.ɵsanitizeStyle = sanitizeStyle;\nexports.ɵsanitizeUrl = sanitizeUrl;\nexports.ɵsanitizeResourceUrl = sanitizeResourceUrl;\nexports.ɵregisterModuleFactory = registerModuleFactory;\nexports.ɵEMPTY_ARRAY = EMPTY_ARRAY$2;\nexports.ɵEMPTY_MAP = EMPTY_MAP;\nexports.ɵand = anchorDef;\nexports.ɵccf = createComponentFactory;\nexports.ɵcmf = createNgModuleFactory;\nexports.ɵcrt = createRendererType2;\nexports.ɵdid = directiveDef;\nexports.ɵeld = elementDef;\nexports.ɵelementEventFullName = elementEventFullName;\nexports.ɵgetComponentViewDefinitionFactory = getComponentViewDefinitionFactory;\nexports.ɵinlineInterpolate = inlineInterpolate;\nexports.ɵinterpolate = interpolate;\nexports.ɵmod = moduleDef;\nexports.ɵmpd = moduleProvideDef;\nexports.ɵncd = ngContentDef;\nexports.ɵnov = nodeValue;\nexports.ɵpid = pipeDef;\nexports.ɵprd = providerDef;\nexports.ɵpad = pureArrayDef;\nexports.ɵpod = pureObjectDef;\nexports.ɵppd = purePipeDef;\nexports.ɵqud = queryDef;\nexports.ɵted = textDef;\nexports.ɵunv = unwrapValue;\nexports.ɵvid = viewDef;\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\n})));\n//# sourceMappingURL=core.umd.js.map\n"]}