core.mjs.map 3.1 MB

1
  1. {"version":3,"file":"core.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/error_details_base_url.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/errors.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/authoring/input/input_signal_node.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/authoring/input/input_signal.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/util/closure.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/util/decorators.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/util/global.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/util/ng_dev_mode.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/util/property.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/util/stringify.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/di/forward_ref.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/util/assert.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/di/interface/defs.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/di/injection_token.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/debug/injector_profiler.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/di/interface/provider.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/fields.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/util/stringify_utils.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/errors_di.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/di/interface/injector.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/di/inject_switch.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/di/injector_compatibility.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/di/metadata.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/definition_factory.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/util/array_utils.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/util/empty.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/di/initializer_token.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/di/injector_token.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/di/internal_tokens.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/di/null_injector.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/def_getters.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/di/provider_collection.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/di/scope.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/di/r3_injector.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/di/contextual.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/compiler/compiler_facade_interface.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/compiler/compiler_facade.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/di/jit/environment.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/interface/type.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/reflection/reflection_capabilities.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/interfaces/view.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/interfaces/container.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/interfaces/type_checks.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/assert.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/interface/simple_change.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/apply_value_input_field.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/features/ng_onchanges_feature.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/profiler.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/namespaces.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/util/view_utils.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/state.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/hooks.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/interfaces/injector.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/interfaces/node.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/node_assert.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/util/attrs_utils.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/util/injector_utils.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/di.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/instructions/di_attr.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/di/metadata_attr.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/di/jit/util.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/di/jit/injectable.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/di/injectable.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/di/create_injector.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/di/injector.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/di/host_attribute_token.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/di/host_tag_name_token.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/change_detection/scheduling/flags.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/linker/destroy_ref.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/change_detection/scheduling/zoneless_scheduling.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/pending_tasks.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/event_emitter.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/util/noop.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/util/callback_scheduler.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/zone/async-stack-tagging.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/zone/ng_zone.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/error_handler.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/authoring/output/output_emitter_ref.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/authoring/output/output.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/authoring/input/input.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/linker/element_ref.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/reactivity/api.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/reactivity/signal.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/linker/query_list.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/hydration/skip_hydration.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/change_detection/constants.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/interfaces/lview_tracking.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/interfaces/context.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/context_discovery.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/util/view_traversal_utils.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/util/discovery_utils.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/interfaces/document.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/application/application_tokens.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/transfer_state.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/hydration/interfaces.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/hydration/tokens.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/application/tracing.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/util/performance.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/reactivity/asserts.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/view_context.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/after_render/api.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/after_render/manager.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/after_render/hooks.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/defer/interfaces.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/defer/cleanup.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/defer/utils.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/defer/dom_triggers.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/event_delegation_utils.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/defer/registry.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/hydration/utils.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/queries/query_execution.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/metadata/view.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/util/security/trusted_types.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/util/security/trusted_types_bypass.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/sanitization/bypass.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/sanitization/inert_body.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/sanitization/url_sanitizer.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/sanitization/html_sanitizer.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/sanitization/security.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/sanitization/sanitization.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/util/dom.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/util/ng_reflect.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/metadata/schema.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/instructions/element_validation.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/util/misc_utils.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/errors.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/styling/class_differ.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/node_selector_matcher.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/tokens.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/dom_node_manipulation.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/view/construction.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/instructions/advance.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/interfaces/input_flags.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/instructions/write_to_directive_input.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/instructions/shared.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/instructions/render.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/view_manipulation.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/i18n/i18n_tree_shaking.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render/api_flags.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/i18n/utils.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/node_manipulation.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/collect_native_nodes.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/after_render/view.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/reactive_lview_consumer.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/reactivity/view_effect_runner.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/instructions/change_detection.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/instructions/mark_view_dirty.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/view/container.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/view_ref.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/linker/template_ref.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/hydration/error_handling.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/node_manipulation_i18n.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/tnode_manipulation.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/i18n/i18n_insert_before_index.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/i18n/i18n_util.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/i18n/i18n_icu_container_visitor.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/hydration/compression.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/hydration/node_lookup_utils.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/hydration/i18n.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/hydration/cleanup.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/hydration/views.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/linker/component_factory.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/linker/component_factory_resolver.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render/api.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/sanitization/sanitizer.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/jit/util.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/deps_tracker/deps_tracker.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/view/provider_flags.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/chained_injector.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/styling/static_styling.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/instructions/di.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/view/directives.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/view/elements.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/component_ref.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/linker/view_container_ref.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/queries/query.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/queries/query_reactive.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/authoring/queries.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/authoring/model/model_signal.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/authoring/model/model.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/metadata/di.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/metadata/resource_loading.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/linker/ng_module_registration.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/sanitization/iframe_attrs_validation.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/linker/ng_module_factory.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/ng_module_ref.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/standalone_service.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/definition.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/features/inherit_definition_feature.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/features/copy_definition_feature.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/features/host_directives_feature.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/util/iterable.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/util/comparison.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/bindings.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/instructions/template.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/defer/idle_scheduler.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/defer/timer_scheduler.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/cached_injector_service.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/defer/rendering.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/metadata.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/console.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/debug/framework_injector_profiler.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/util/change_detection_utils.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/defer/discovery.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/util/defer.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/util/injector_discovery_utils.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/util/signal_debug.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/util/global_utils.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/testability/testability.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/reactivity/root_effect_scheduler.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/util/lang.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/application/application_init.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/application/application_ref.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/defer/triggering.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/defer/instructions.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/instructions/attribute.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/instructions/interpolation.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/instructions/attribute_interpolation.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/interfaces/styling.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/styling/style_binding_list.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/styling/styling_parser.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/instructions/property.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/instructions/styling.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/instructions/class_map_interpolation.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/instructions/component_instance.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/list_reconciliation.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/instructions/control_flow.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/instructions/element.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/instructions/element_container.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/instructions/get_current_view.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/instructions/host_property.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/i18n/locale_en.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/i18n/locale_data_api.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/i18n/localization.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/interfaces/i18n.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/i18n/i18n_locale_id.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/i18n/i18n_apply.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/i18n/i18n_debug.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/i18n/i18n_parse.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/i18n/i18n_postprocess.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/instructions/i18n.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/view/listeners.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/view/directive_outputs.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/instructions/listener.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/instructions/next_context.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/instructions/projection.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/instructions/property_interpolation.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/instructions/queries.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/instructions/queries_signals.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/instructions/storage.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/instructions/style_map_interpolation.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/instructions/style_prop_interpolation.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/instructions/text.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/instructions/text_interpolation.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/instructions/two_way.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/instructions/let_declaration.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/instructions/attach_source_locations.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/di_setup.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/features/providers_feature.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/features/external_styles_feature.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/scope.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/pure_function.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/pipe.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/view_engine_compatibility_prebound.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/local_compilation.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/debug/set_debug_info.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/hmr.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/jit/environment.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/jit/jit_options.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/jit/module.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/jit/directive.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/jit/pipe.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/metadata/directives.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/metadata/ng_module.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/version.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/linker/compiler.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/application/application_ngmodule_factory_compiler.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/change_detection/scheduling/ng_zone_scheduling.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/change_detection/scheduling/zoneless_scheduling_impl.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/i18n/tokens.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/image_performance_warning.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/platform/platform_destroy_listeners.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/platform/bootstrap.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/platform/platform_ref.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/platform/platform.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/change_detection/scheduling/exhaustive_check_no_changes.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/util/is_dev_mode.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/linker/ng_module_factory_loader.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/change_detection/change_detector_ref.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/linker/view_ref.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/debug/debug_node.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/change_detection/differs/default_iterable_differ.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/change_detection/differs/default_keyvalue_differ.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/change_detection/differs/iterable_differs.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/change_detection/differs/keyvalue_differs.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/change_detection/change_detection.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/platform/platform_core_providers.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/application/application_module.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/application/create_application.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/hydration/event_replay.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/hydration/annotate.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/hydration/api.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/util/coercion.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/profiler.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/reactivity/untracked.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/reactivity/computed.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/reactivity/microtask_effect.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/reactivity/effect.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/resource/api.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/reactivity/linked_signal.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/resource/resource.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/internal/get_closest_component_name.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/jit/partial.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/reactivity/after_render_effect.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/render3/component.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/application/application_config.ts","../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/core/src/application/platform_tokens.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/**\n * Base URL for the error details page.\n *\n * Keep this constant in sync across:\n * - packages/compiler-cli/src/ngtsc/diagnostics/src/error_details_base_url.ts\n * - packages/core/src/error_details_base_url.ts\n */\nexport const ERROR_DETAILS_PAGE_BASE_URL = 'https://angular.dev/errors';\n\n/**\n * URL for the XSS security documentation.\n */\nexport const XSS_SECURITY_URL =\n 'https://angular.dev/best-practices/security#preventing-cross-site-scripting-xss';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ERROR_DETAILS_PAGE_BASE_URL} from './error_details_base_url';\n\n/**\n * The list of error codes used in runtime code of the `core` package.\n * Reserved error code range: 100-999.\n *\n * Note: the minus sign denotes the fact that a particular code has a detailed guide on\n * angular.io. This extra annotation is needed to avoid introducing a separate set to store\n * error codes which have guides, which might leak into runtime code.\n *\n * Full list of available error guides can be found at https://angular.dev/errors.\n *\n * Error code ranges per package:\n * - core (this package): 100-999\n * - forms: 1000-1999\n * - common: 2000-2999\n * - animations: 3000-3999\n * - router: 4000-4999\n * - platform-browser: 5000-5500\n */\nexport const enum RuntimeErrorCode {\n // Change Detection Errors\n EXPRESSION_CHANGED_AFTER_CHECKED = -100,\n RECURSIVE_APPLICATION_REF_TICK = 101,\n INFINITE_CHANGE_DETECTION = 103,\n\n // Dependency Injection Errors\n CYCLIC_DI_DEPENDENCY = -200,\n PROVIDER_NOT_FOUND = -201,\n INVALID_FACTORY_DEPENDENCY = 202,\n MISSING_INJECTION_CONTEXT = -203,\n INVALID_INJECTION_TOKEN = 204,\n INJECTOR_ALREADY_DESTROYED = 205,\n PROVIDER_IN_WRONG_CONTEXT = 207,\n MISSING_INJECTION_TOKEN = 208,\n INVALID_MULTI_PROVIDER = -209,\n MISSING_DOCUMENT = 210,\n\n // Template Errors\n MULTIPLE_COMPONENTS_MATCH = -300,\n EXPORT_NOT_FOUND = -301,\n PIPE_NOT_FOUND = -302,\n UNKNOWN_BINDING = 303,\n UNKNOWN_ELEMENT = 304,\n TEMPLATE_STRUCTURE_ERROR = 305,\n INVALID_EVENT_BINDING = 306,\n HOST_DIRECTIVE_UNRESOLVABLE = 307,\n HOST_DIRECTIVE_NOT_STANDALONE = 308,\n DUPLICATE_DIRECTIVE = 309,\n HOST_DIRECTIVE_COMPONENT = 310,\n HOST_DIRECTIVE_UNDEFINED_BINDING = 311,\n HOST_DIRECTIVE_CONFLICTING_ALIAS = 312,\n MULTIPLE_MATCHING_PIPES = 313,\n UNINITIALIZED_LET_ACCESS = 314,\n\n // Bootstrap Errors\n MULTIPLE_PLATFORMS = 400,\n PLATFORM_NOT_FOUND = 401,\n MISSING_REQUIRED_INJECTABLE_IN_BOOTSTRAP = 402,\n BOOTSTRAP_COMPONENTS_NOT_FOUND = -403,\n PLATFORM_ALREADY_DESTROYED = 404,\n ASYNC_INITIALIZERS_STILL_RUNNING = 405,\n APPLICATION_REF_ALREADY_DESTROYED = 406,\n RENDERER_NOT_FOUND = 407,\n PROVIDED_BOTH_ZONE_AND_ZONELESS = 408,\n\n // Hydration Errors\n HYDRATION_NODE_MISMATCH = -500,\n HYDRATION_MISSING_SIBLINGS = -501,\n HYDRATION_MISSING_NODE = -502,\n UNSUPPORTED_PROJECTION_DOM_NODES = -503,\n INVALID_SKIP_HYDRATION_HOST = -504,\n MISSING_HYDRATION_ANNOTATIONS = -505,\n HYDRATION_STABLE_TIMEDOUT = -506,\n MISSING_SSR_CONTENT_INTEGRITY_MARKER = -507,\n MISCONFIGURED_INCREMENTAL_HYDRATION = 508,\n\n // Signal Errors\n SIGNAL_WRITE_FROM_ILLEGAL_CONTEXT = 600,\n REQUIRE_SYNC_WITHOUT_SYNC_EMIT = 601,\n ASSERTION_NOT_INSIDE_REACTIVE_CONTEXT = -602,\n\n // Styling Errors\n\n // Declarations Errors\n\n // i18n Errors\n INVALID_I18N_STRUCTURE = 700,\n MISSING_LOCALE_DATA = 701,\n\n // Defer errors (750-799 range)\n DEFER_LOADING_FAILED = -750,\n DEFER_IN_HMR_MODE = -751,\n\n // standalone errors\n IMPORT_PROVIDERS_FROM_STANDALONE = 800,\n\n // JIT Compilation Errors\n // Other\n INVALID_DIFFER_INPUT = 900,\n NO_SUPPORTING_DIFFER_FACTORY = 901,\n VIEW_ALREADY_ATTACHED = 902,\n INVALID_INHERITANCE = 903,\n UNSAFE_VALUE_IN_RESOURCE_URL = 904,\n UNSAFE_VALUE_IN_SCRIPT = 905,\n MISSING_GENERATED_DEF = 906,\n TYPE_IS_NOT_STANDALONE = 907,\n MISSING_ZONEJS = 908,\n UNEXPECTED_ZONE_STATE = 909,\n UNSAFE_IFRAME_ATTRS = -910,\n VIEW_ALREADY_DESTROYED = 911,\n COMPONENT_ID_COLLISION = -912,\n IMAGE_PERFORMANCE_WARNING = -913,\n UNEXPECTED_ZONEJS_PRESENT_IN_ZONELESS_MODE = 914,\n\n // Signal integration errors\n REQUIRED_INPUT_NO_VALUE = -950,\n REQUIRED_QUERY_NO_VALUE = -951,\n REQUIRED_MODEL_NO_VALUE = 952,\n\n // Output()\n OUTPUT_REF_DESTROYED = 953,\n\n // Repeater errors\n LOOP_TRACK_DUPLICATE_KEYS = -955,\n LOOP_TRACK_RECREATE = -956,\n\n // Runtime dependency tracker errors\n RUNTIME_DEPS_INVALID_IMPORTED_TYPE = 980,\n RUNTIME_DEPS_ORPHAN_COMPONENT = 981,\n\n // Upper bounds for core runtime errors is 999\n}\n\n/**\n * Class that represents a runtime error.\n * Formats and outputs the error message in a consistent way.\n *\n * Example:\n * ```ts\n * throw new RuntimeError(\n * RuntimeErrorCode.INJECTOR_ALREADY_DESTROYED,\n * ngDevMode && 'Injector has already been destroyed.');\n * ```\n *\n * Note: the `message` argument contains a descriptive error message as a string in development\n * mode (when the `ngDevMode` is defined). In production mode (after tree-shaking pass), the\n * `message` argument becomes `false`, thus we account for it in the typings and the runtime\n * logic.\n */\nexport class RuntimeError<T extends number = RuntimeErrorCode> extends Error {\n constructor(\n public code: T,\n message: null | false | string,\n ) {\n super(formatRuntimeError<T>(code, message));\n }\n}\n\nexport function formatRuntimeErrorCode<T extends number = RuntimeErrorCode>(code: T): string {\n // Error code might be a negative number, which is a special marker that instructs the logic to\n // generate a link to the error details page on angular.io.\n // We also prepend `0` to non-compile-time errors.\n return `NG0${Math.abs(code)}`;\n}\n\n/**\n * Called to format a runtime error.\n * See additional info on the `message` argument type in the `RuntimeError` class description.\n */\nexport function formatRuntimeError<T extends number = RuntimeErrorCode>(\n code: T,\n message: null | false | string,\n): string {\n const fullCode = formatRuntimeErrorCode(code);\n\n let errorMessage = `${fullCode}${message ? ': ' + message : ''}`;\n\n if (ngDevMode && code < 0) {\n const addPeriodSeparator = !errorMessage.match(/[.,;!?\\n]$/);\n const separator = addPeriodSeparator ? '.' : '';\n errorMessage = `${errorMessage}${separator} Find more at ${ERROR_DETAILS_PAGE_BASE_URL}/${fullCode}`;\n }\n return errorMessage;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {SIGNAL_NODE, SignalNode, signalSetFn} from '../../../primitives/signals';\n\nexport const REQUIRED_UNSET_VALUE: unique symbol = /* @__PURE__ */ Symbol('InputSignalNode#UNSET');\n\n/**\n * Reactive node type for an input signal. An input signal extends a signal.\n * There are special properties to enable transforms and required inputs.\n */\nexport interface InputSignalNode<T, TransformT> extends SignalNode<T> {\n /**\n * User-configured transform that will run whenever a new value is applied\n * to the input signal node.\n */\n transformFn: ((value: TransformT) => T) | undefined;\n\n /**\n * Applies a new value to the input signal. Expects transforms to be run\n * manually before.\n *\n * This function is called by the framework runtime code whenever a binding\n * changes. The value can in practice be anything at runtime, but for typing\n * purposes we assume it's a valid `T` value. Type-checking will enforce that.\n */\n applyValueToInputSignal<T, TransformT>(node: InputSignalNode<T, TransformT>, value: T): void;\n\n /**\n * A debug name for the input signal. Used in Angular DevTools to identify the signal.\n */\n debugName?: string;\n}\n\n// Note: Using an IIFE here to ensure that the spread assignment is not considered\n// a side-effect, ending up preserving `COMPUTED_NODE` and `REACTIVE_NODE`.\n// TODO: remove when https://github.com/evanw/esbuild/issues/3392 is resolved.\nexport const INPUT_SIGNAL_NODE: InputSignalNode<unknown, unknown> = /* @__PURE__ */ (() => {\n return {\n ...SIGNAL_NODE,\n transformFn: undefined,\n\n applyValueToInputSignal<T, TransformT>(node: InputSignalNode<T, TransformT>, value: T) {\n signalSetFn(node, value);\n },\n };\n})();\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {producerAccessed, SIGNAL} from '../../../primitives/signals';\n\nimport {RuntimeError, RuntimeErrorCode} from '../../errors';\nimport {Signal} from '../../render3/reactivity/api';\n\nimport {INPUT_SIGNAL_NODE, InputSignalNode, REQUIRED_UNSET_VALUE} from './input_signal_node';\n\n/**\n * @publicAPI\n *\n * Options for signal inputs.\n */\nexport interface InputOptions<T, TransformT> {\n /** Optional public name for the input. By default, the class field name is used. */\n alias?: string;\n /**\n * Optional transform that runs whenever a new value is bound. Can be used to\n * transform the input value before the input is updated.\n *\n * The transform function can widen the type of the input. For example, consider\n * an input for `disabled`. In practice, as the component author, you want to only\n * deal with a boolean, but users may want to bind a string if they just use the\n * attribute form to bind to the input via `<my-dir input>`. A transform can then\n * handle such string values and convert them to `boolean`. See: {@link booleanAttribute}.\n */\n transform?: (v: TransformT) => T;\n\n /**\n * A debug name for the input signal. Used in Angular DevTools to identify the signal.\n */\n debugName?: string;\n}\n\n/**\n * Signal input options without the transform option.\n *\n * @publicAPI\n */\nexport type InputOptionsWithoutTransform<T> =\n // Note: We still keep a notion of `transform` for auto-completion.\n Omit<InputOptions<T, T>, 'transform'> & {transform?: undefined};\n/**\n * Signal input options with the transform option required.\n *\n * @publicAPI\n */\nexport type InputOptionsWithTransform<T, TransformT> = Required<\n Pick<InputOptions<T, TransformT>, 'transform'>\n> &\n InputOptions<T, TransformT>;\n\nexport const ɵINPUT_SIGNAL_BRAND_READ_TYPE: unique symbol = /* @__PURE__ */ Symbol();\nexport const ɵINPUT_SIGNAL_BRAND_WRITE_TYPE: unique symbol = /* @__PURE__ */ Symbol();\n\n/**\n * `InputSignalWithTransform` represents a special `Signal` for a\n * directive/component input with a `transform` function.\n *\n * Signal inputs with transforms capture an extra generic for their transform write\n * type. Transforms can expand the accepted bound values for an input while ensuring\n * value retrievals of the signal input are still matching the generic input type.\n *\n * ```ts\n * class MyDir {\n * disabled = input(false, {\n * transform: (v: string|boolean) => convertToBoolean(v),\n * }); // InputSignalWithTransform<boolean, string|boolean>\n *\n * click() {\n * this.disabled() // always returns a `boolean`.\n * }\n * }\n * ```\n *\n * @see {@link InputSignal} for additional information.\n *\n * @publicAPI\n */\nexport interface InputSignalWithTransform<T, TransformT> extends Signal<T> {\n [SIGNAL]: InputSignalNode<T, TransformT>;\n [ɵINPUT_SIGNAL_BRAND_READ_TYPE]: T;\n [ɵINPUT_SIGNAL_BRAND_WRITE_TYPE]: TransformT;\n}\n\n/**\n * `InputSignal` represents a special `Signal` for a directive/component input.\n *\n * An input signal is similar to a non-writable signal except that it also\n * carries additional type-information for transforms, and that Angular internally\n * updates the signal whenever a new value is bound.\n *\n * @see {@link InputOptionsWithTransform} for inputs with transforms.\n *\n * @publicAPI\n */\nexport interface InputSignal<T> extends InputSignalWithTransform<T, T> {}\n\n/**\n * Creates an input signal.\n *\n * @param initialValue The initial value.\n * Can be set to {@link REQUIRED_UNSET_VALUE} for required inputs.\n * @param options Additional options for the input. e.g. a transform, or an alias.\n */\nexport function createInputSignal<T, TransformT>(\n initialValue: T,\n options?: InputOptions<T, TransformT>,\n): InputSignalWithTransform<T, TransformT> {\n const node: InputSignalNode<T, TransformT> = Object.create(INPUT_SIGNAL_NODE);\n\n node.value = initialValue;\n\n // Perf note: Always set `transformFn` here to ensure that `node` always\n // has the same v8 class shape, allowing monomorphic reads on input signals.\n node.transformFn = options?.transform;\n\n function inputValueFn() {\n // Record that someone looked at this signal.\n producerAccessed(node);\n\n if (node.value === REQUIRED_UNSET_VALUE) {\n let message: string | null = null;\n if (ngDevMode) {\n const name = options?.debugName ?? options?.alias;\n message = `Input${name ? ` \"${name}\"` : ''} is required but no value is available yet.`;\n }\n throw new RuntimeError(RuntimeErrorCode.REQUIRED_INPUT_NO_VALUE, message);\n }\n\n return node.value;\n }\n\n (inputValueFn as any)[SIGNAL] = node;\n\n if (ngDevMode) {\n inputValueFn.toString = () => `[Input Signal: ${inputValueFn()}]`;\n node.debugName = options?.debugName;\n }\n\n return inputValueFn as InputSignalWithTransform<T, TransformT>;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/**\n * Convince closure compiler that the wrapped function has no side-effects.\n *\n * Closure compiler always assumes that `toString` has no side-effects. We use this quirk to\n * allow us to execute a function but have closure compiler mark the call as no-side-effects.\n * It is important that the return value for the `noSideEffects` function be assigned\n * to something which is retained otherwise the call to `noSideEffects` will be removed by closure\n * compiler.\n */\nexport function noSideEffects<T>(fn: () => T): T {\n return {toString: fn}.toString() as unknown as T;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Type} from '../interface/type';\n\nimport {noSideEffects} from './closure';\n\n/**\n * An interface implemented by all Angular type decorators, which allows them to be used as\n * decorators as well as Angular syntax.\n *\n * ```ts\n * @ng.Component({...})\n * class MyClass {...}\n * ```\n *\n * @publicApi\n */\nexport interface TypeDecorator {\n /**\n * Invoke as decorator.\n */\n <T extends Type<any>>(type: T): T;\n\n // Make TypeDecorator assignable to built-in ParameterDecorator type.\n // ParameterDecorator is declared in lib.d.ts as a `declare type`\n // so we cannot declare this interface as a subtype.\n // see https://github.com/angular/angular/issues/3379#issuecomment-126169417\n (target: Object, propertyKey?: string | symbol, parameterIndex?: number): void;\n // Standard (non-experimental) Decorator signature that avoids direct usage of\n // any TS 5.0+ specific types.\n (target: unknown, context: unknown): void;\n}\n\nexport const ANNOTATIONS = '__annotations__';\nexport const PARAMETERS = '__parameters__';\nexport const PROP_METADATA = '__prop__metadata__';\n\n/**\n * @suppress {globalThis}\n */\nexport function makeDecorator<T>(\n name: string,\n props?: (...args: any[]) => any,\n parentClass?: any,\n additionalProcessing?: (type: Type<T>) => void,\n typeFn?: (type: Type<T>, ...args: any[]) => void,\n): {new (...args: any[]): any; (...args: any[]): any; (...args: any[]): (cls: any) => any} {\n return noSideEffects(() => {\n const metaCtor = makeMetadataCtor(props);\n\n function DecoratorFactory(\n this: unknown | typeof DecoratorFactory,\n ...args: any[]\n ): (cls: Type<T>) => any {\n if (this instanceof DecoratorFactory) {\n metaCtor.call(this, ...args);\n return this as typeof DecoratorFactory;\n }\n\n const annotationInstance = new (DecoratorFactory as any)(...args);\n return function TypeDecorator(cls: Type<T>) {\n if (typeFn) typeFn(cls, ...args);\n // Use of Object.defineProperty is important since it creates non-enumerable property which\n // prevents the property is copied during subclassing.\n const annotations = cls.hasOwnProperty(ANNOTATIONS)\n ? (cls as any)[ANNOTATIONS]\n : (Object.defineProperty(cls, ANNOTATIONS, {value: []}) as any)[ANNOTATIONS];\n annotations.push(annotationInstance);\n\n if (additionalProcessing) additionalProcessing(cls);\n\n return cls;\n };\n }\n\n if (parentClass) {\n DecoratorFactory.prototype = Object.create(parentClass.prototype);\n }\n\n DecoratorFactory.prototype.ngMetadataName = name;\n (DecoratorFactory as any).annotationCls = DecoratorFactory;\n return DecoratorFactory as any;\n });\n}\n\nfunction makeMetadataCtor(props?: (...args: any[]) => any): any {\n return function ctor(this: any, ...args: any[]) {\n if (props) {\n const values = props(...args);\n for (const propName in values) {\n this[propName] = values[propName];\n }\n }\n };\n}\n\nexport function makeParamDecorator(\n name: string,\n props?: (...args: any[]) => any,\n parentClass?: any,\n): any {\n return noSideEffects(() => {\n const metaCtor = makeMetadataCtor(props);\n function ParamDecoratorFactory(\n this: unknown | typeof ParamDecoratorFactory,\n ...args: any[]\n ): any {\n if (this instanceof ParamDecoratorFactory) {\n metaCtor.apply(this, args);\n return this;\n }\n const annotationInstance = new (<any>ParamDecoratorFactory)(...args);\n\n (<any>ParamDecorator).annotation = annotationInstance;\n return ParamDecorator;\n\n function ParamDecorator(cls: any, unusedKey: any, index: number): any {\n // Use of Object.defineProperty is important since it creates non-enumerable property which\n // prevents the property is copied during subclassing.\n const parameters = cls.hasOwnProperty(PARAMETERS)\n ? (cls as any)[PARAMETERS]\n : Object.defineProperty(cls, PARAMETERS, {value: []})[PARAMETERS];\n\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\n (parameters[index] = parameters[index] || []).push(annotationInstance);\n return cls;\n }\n }\n if (parentClass) {\n ParamDecoratorFactory.prototype = Object.create(parentClass.prototype);\n }\n ParamDecoratorFactory.prototype.ngMetadataName = name;\n (<any>ParamDecoratorFactory).annotationCls = ParamDecoratorFactory;\n return ParamDecoratorFactory;\n });\n}\n\nexport function makePropDecorator(\n name: string,\n props?: (...args: any[]) => any,\n parentClass?: any,\n additionalProcessing?: (target: any, name: string, ...args: any[]) => void,\n): any {\n return noSideEffects(() => {\n const metaCtor = makeMetadataCtor(props);\n\n function PropDecoratorFactory(\n this: unknown | typeof PropDecoratorFactory,\n ...args: any[]\n ): any {\n if (this instanceof PropDecoratorFactory) {\n metaCtor.apply(this, args);\n return this;\n }\n\n const decoratorInstance = new (<any>PropDecoratorFactory)(...args);\n\n function PropDecorator(target: any, name: string) {\n // target is undefined with standard decorators. This case is not supported and will throw\n // if this decorator is used in JIT mode with standard decorators.\n if (target === undefined) {\n throw new Error('Standard Angular field decorators are not supported in JIT mode.');\n }\n\n const constructor = target.constructor;\n // Use of Object.defineProperty is important because it creates a non-enumerable property\n // which prevents the property from being copied during subclassing.\n const meta = constructor.hasOwnProperty(PROP_METADATA)\n ? (constructor as any)[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 if (additionalProcessing) additionalProcessing(target, name, ...args);\n }\n\n return PropDecorator;\n }\n\n if (parentClass) {\n PropDecoratorFactory.prototype = Object.create(parentClass.prototype);\n }\n\n PropDecoratorFactory.prototype.ngMetadataName = name;\n (<any>PropDecoratorFactory).annotationCls = PropDecoratorFactory;\n return PropDecoratorFactory;\n });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nconst _global: any = globalThis;\n\n/**\n * Attention: whenever providing a new value, be sure to add an\n * entry into the corresponding `....externs.js` file,\n * so that closure won't use that global for its purposes.\n */\nexport {_global as global};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {global} from './global';\n\ndeclare global {\n /**\n * Values of ngDevMode\n * Depending on the current state of the application, ngDevMode may have one of several values.\n *\n * For convenience, the “truthy” value which enables dev mode is also an object which contains\n * Angular’s performance counters. This is not necessary, but cuts down on boilerplate for the\n * perf counters.\n *\n * ngDevMode may also be set to false. This can happen in one of a few ways:\n * - The user explicitly sets `window.ngDevMode = false` somewhere in their app.\n * - The user calls `enableProdMode()`.\n * - The URL contains a `ngDevMode=false` text.\n * Finally, ngDevMode may not have been defined at all.\n */\n const ngDevMode: null | NgDevModePerfCounters;\n\n interface NgDevModePerfCounters {\n namedConstructors: boolean;\n firstCreatePass: number;\n tNode: number;\n tView: number;\n rendererCreateTextNode: number;\n rendererSetText: number;\n rendererCreateElement: number;\n rendererAddEventListener: number;\n rendererSetAttribute: number;\n rendererRemoveAttribute: number;\n rendererSetProperty: number;\n rendererSetClassName: number;\n rendererAddClass: number;\n rendererRemoveClass: number;\n rendererSetStyle: number;\n rendererRemoveStyle: number;\n rendererDestroy: number;\n rendererDestroyNode: number;\n rendererMoveNode: number;\n rendererRemoveNode: number;\n rendererAppendChild: number;\n rendererInsertBefore: number;\n rendererCreateComment: number;\n hydratedNodes: number;\n hydratedComponents: number;\n dehydratedViewsRemoved: number;\n dehydratedViewsCleanupRuns: number;\n componentsSkippedHydration: number;\n deferBlocksWithIncrementalHydration: number;\n }\n}\n\nexport function ngDevModeResetPerfCounters(): NgDevModePerfCounters {\n const locationString = typeof location !== 'undefined' ? location.toString() : '';\n const newCounters: NgDevModePerfCounters = {\n namedConstructors: locationString.indexOf('ngDevMode=namedConstructors') != -1,\n firstCreatePass: 0,\n tNode: 0,\n tView: 0,\n rendererCreateTextNode: 0,\n rendererSetText: 0,\n rendererCreateElement: 0,\n rendererAddEventListener: 0,\n rendererSetAttribute: 0,\n rendererRemoveAttribute: 0,\n rendererSetProperty: 0,\n rendererSetClassName: 0,\n rendererAddClass: 0,\n rendererRemoveClass: 0,\n rendererSetStyle: 0,\n rendererRemoveStyle: 0,\n rendererDestroy: 0,\n rendererDestroyNode: 0,\n rendererMoveNode: 0,\n rendererRemoveNode: 0,\n rendererAppendChild: 0,\n rendererInsertBefore: 0,\n rendererCreateComment: 0,\n hydratedNodes: 0,\n hydratedComponents: 0,\n dehydratedViewsRemoved: 0,\n dehydratedViewsCleanupRuns: 0,\n componentsSkippedHydration: 0,\n deferBlocksWithIncrementalHydration: 0,\n };\n\n // Make sure to refer to ngDevMode as ['ngDevMode'] for closure.\n const allowNgDevModeTrue = locationString.indexOf('ngDevMode=false') === -1;\n if (!allowNgDevModeTrue) {\n global['ngDevMode'] = false;\n } else {\n if (typeof global['ngDevMode'] !== 'object') {\n global['ngDevMode'] = {};\n }\n Object.assign(global['ngDevMode'], newCounters);\n }\n return newCounters;\n}\n\n/**\n * This function checks to see if the `ngDevMode` has been set. If yes,\n * then we honor it, otherwise we default to dev mode with additional checks.\n *\n * The idea is that unless we are doing production build where we explicitly\n * set `ngDevMode == false` we should be helping the developer by providing\n * as much early warning and errors as possible.\n *\n * `ɵɵdefineComponent` is guaranteed to have been called before any component template functions\n * (and thus Ivy instructions), so a single initialization there is sufficient to ensure ngDevMode\n * is defined for the entire instruction set.\n *\n * When checking `ngDevMode` on toplevel, always init it before referencing it\n * (e.g. `((typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode())`), otherwise you can\n * get a `ReferenceError` like in https://github.com/angular/angular/issues/31595.\n *\n * Details on possible values for `ngDevMode` can be found on its docstring.\n *\n * NOTE:\n * - changes to the `ngDevMode` name must be synced with `compiler-cli/src/tooling.ts`.\n */\nexport function initNgDevMode(): boolean {\n // The below checks are to ensure that calling `initNgDevMode` multiple times does not\n // reset the counters.\n // If the `ngDevMode` is not an object, then it means we have not created the perf counters\n // yet.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (typeof ngDevMode !== 'object' || Object.keys(ngDevMode).length === 0) {\n ngDevModeResetPerfCounters();\n }\n return typeof ngDevMode !== 'undefined' && !!ngDevMode;\n }\n return false;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nexport function getClosureSafeProperty<T>(objWithPropertyToExtract: T): string {\n for (let key in objWithPropertyToExtract) {\n if (objWithPropertyToExtract[key] === (getClosureSafeProperty as any)) {\n return key;\n }\n }\n throw Error('Could not find renamed property on target object.');\n}\n\n/**\n * Sets properties on a target object from a source object, but only if\n * the property doesn't already exist on the target object.\n * @param target The target to set properties on\n * @param source The source of the property keys and values to set\n */\nexport function fillProperties(target: Record<string, unknown>, source: Record<string, unknown>) {\n for (const key in source) {\n if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n target[key] = source[key];\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nexport function stringify(token: any): string {\n if (typeof token === 'string') {\n return token;\n }\n\n if (Array.isArray(token)) {\n return `[${token.map(stringify).join(', ')}]`;\n }\n\n if (token == null) {\n return '' + token;\n }\n\n const name = token.overriddenName || token.name;\n if (name) {\n return `${name}`;\n }\n\n const result = token.toString();\n\n if (result == null) {\n return '' + result;\n }\n\n const newLineIndex = result.indexOf('\\n');\n return newLineIndex >= 0 ? result.slice(0, newLineIndex) : result;\n}\n\n/**\n * Concatenates two strings with separator, allocating new strings only when necessary.\n *\n * @param before before string.\n * @param separator separator string.\n * @param after after string.\n * @returns concatenated string.\n */\nexport function concatStringsWithSpace(before: string | null, after: string | null): string {\n if (!before) return after || '';\n if (!after) return before;\n return `${before} ${after}`;\n}\n\n/**\n * Ellipses the string in the middle when longer than the max length\n *\n * @param string\n * @param maxLength of the output string\n * @returns ellipsed string with ... in the middle\n */\nexport function truncateMiddle(str: string, maxLength = 100): string {\n if (!str || maxLength < 1 || str.length <= maxLength) return str;\n if (maxLength == 1) return str.substring(0, 1) + '...';\n\n const halfLimit = Math.round(maxLength / 2);\n return str.substring(0, halfLimit) + '...' + str.substring(str.length - halfLimit);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Type} from '../interface/type';\nimport {getClosureSafeProperty} from '../util/property';\nimport {stringify} from '../util/stringify';\n\n/**\n * An interface that a function passed into `forwardRef` has to implement.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref_fn'}\n * @publicApi\n */\nexport interface ForwardRefFn {\n (): any;\n}\n\nconst __forward_ref__ = getClosureSafeProperty({__forward_ref__: getClosureSafeProperty});\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 * `forwardRef` is also used to break circularities in standalone components imports.\n *\n * @usageNotes\n * ### Circular dependency example\n * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref'}\n *\n * ### Circular standalone reference import example\n * ```angular-ts\n * @Component({\n * standalone: true,\n * imports: [ChildComponent],\n * selector: 'app-parent',\n * template: `<app-child [hideParent]=\"hideParent\"></app-child>`,\n * })\n * export class ParentComponent {\n * @Input() hideParent: boolean;\n * }\n *\n *\n * @Component({\n * standalone: true,\n * imports: [CommonModule, forwardRef(() => ParentComponent)],\n * selector: 'app-child',\n * template: `<app-parent *ngIf=\"!hideParent\"></app-parent>`,\n * })\n * export class ChildComponent {\n * @Input() hideParent: boolean;\n * }\n * ```\n *\n * @publicApi\n */\nexport function forwardRef(forwardRefFn: ForwardRefFn): Type<any> {\n (<any>forwardRefFn).__forward_ref__ = forwardRef;\n (<any>forwardRefFn).toString = function () {\n return stringify(this());\n };\n return <Type<any>>(<any>forwardRefFn);\n}\n\n/**\n * Lazily retrieves the reference value from a forwardRef.\n *\n * Acts as the identity function when given a non-forward-ref value.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='resolve_forward_ref'}\n *\n * @see {@link forwardRef}\n * @publicApi\n */\nexport function resolveForwardRef<T>(type: T): T {\n return isForwardRef(type) ? type() : type;\n}\n\n/** Checks whether a function is wrapped by a `forwardRef`. */\nexport function isForwardRef(fn: any): fn is () => any {\n return (\n typeof fn === 'function' &&\n fn.hasOwnProperty(__forward_ref__) &&\n fn.__forward_ref__ === forwardRef\n );\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\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\nimport {getActiveConsumer} from '../../primitives/signals';\n\nimport {stringify} from './stringify';\n\nexport function assertNumber(actual: any, msg: string): asserts actual is number {\n if (!(typeof actual === 'number')) {\n throwError(msg, typeof actual, 'number', '===');\n }\n}\n\nexport function assertNumberInRange(\n actual: any,\n minInclusive: number,\n maxInclusive: number,\n): asserts actual is number {\n assertNumber(actual, 'Expected a number');\n assertLessThanOrEqual(actual, maxInclusive, 'Expected number to be less than or equal to');\n assertGreaterThanOrEqual(actual, minInclusive, 'Expected number to be greater than or equal to');\n}\n\nexport function assertString(actual: any, msg: string): asserts actual is string {\n if (!(typeof actual === 'string')) {\n throwError(msg, actual === null ? 'null' : typeof actual, 'string', '===');\n }\n}\n\nexport function assertFunction(actual: any, msg: string): asserts actual is Function {\n if (!(typeof actual === 'function')) {\n throwError(msg, actual === null ? 'null' : typeof actual, 'function', '===');\n }\n}\n\nexport function assertEqual<T>(actual: T, expected: T, msg: string) {\n if (!(actual == expected)) {\n throwError(msg, actual, expected, '==');\n }\n}\n\nexport function assertNotEqual<T>(actual: T, expected: T, msg: string): asserts actual is T {\n if (!(actual != expected)) {\n throwError(msg, actual, expected, '!=');\n }\n}\n\nexport function assertSame<T>(actual: T, expected: T, msg: string): asserts actual is T {\n if (!(actual === expected)) {\n throwError(msg, actual, expected, '===');\n }\n}\n\nexport function assertNotSame<T>(actual: T, expected: T, msg: string) {\n if (!(actual !== expected)) {\n throwError(msg, actual, expected, '!==');\n }\n}\n\nexport function assertLessThan<T>(actual: T, expected: T, msg: string): asserts actual is T {\n if (!(actual < expected)) {\n throwError(msg, actual, expected, '<');\n }\n}\n\nexport function assertLessThanOrEqual<T>(actual: T, expected: T, msg: string): asserts actual is T {\n if (!(actual <= expected)) {\n throwError(msg, actual, expected, '<=');\n }\n}\n\nexport function assertGreaterThan<T>(actual: T, expected: T, msg: string): asserts actual is T {\n if (!(actual > expected)) {\n throwError(msg, actual, expected, '>');\n }\n}\n\nexport function assertGreaterThanOrEqual<T>(\n actual: T,\n expected: T,\n msg: string,\n): asserts actual is T {\n if (!(actual >= expected)) {\n throwError(msg, actual, expected, '>=');\n }\n}\n\nexport function assertNotDefined<T>(actual: T, msg: string) {\n if (actual != null) {\n throwError(msg, actual, null, '==');\n }\n}\n\nexport function assertDefined<T>(actual: T | null | undefined, msg: string): asserts actual is T {\n if (actual == null) {\n throwError(msg, actual, null, '!=');\n }\n}\n\nexport function throwError(msg: string): never;\nexport function throwError(msg: string, actual: any, expected: any, comparison: string): never;\nexport function throwError(msg: string, actual?: any, expected?: any, comparison?: string): never {\n throw new Error(\n `ASSERTION ERROR: ${msg}` +\n (comparison == null ? '' : ` [Expected=> ${expected} ${comparison} ${actual} <=Actual]`),\n );\n}\n\nexport function assertDomNode(node: any): asserts node is Node {\n if (!(node instanceof Node)) {\n throwError(`The provided value must be an instance of a DOM Node but got ${stringify(node)}`);\n }\n}\n\nexport function assertElement(node: any): asserts node is Element {\n if (!(node instanceof Element)) {\n throwError(`The provided value must be an element but got ${stringify(node)}`);\n }\n}\n\nexport function assertIndexInRange(arr: any[], index: number) {\n assertDefined(arr, 'Array must be defined.');\n const maxLen = arr.length;\n if (index < 0 || index >= maxLen) {\n throwError(`Index expected to be less than ${maxLen} but got ${index}`);\n }\n}\n\nexport function assertOneOf(value: any, ...validValues: any[]) {\n if (validValues.indexOf(value) !== -1) return true;\n throwError(\n `Expected value to be one of ${JSON.stringify(validValues)} but was ${JSON.stringify(value)}.`,\n );\n}\n\nexport function assertNotReactive(fn: string): void {\n if (getActiveConsumer() !== null) {\n throwError(`${fn}() should never be called in a reactive context.`);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Type} from '../../interface/type';\nimport {getClosureSafeProperty} from '../../util/property';\n\nimport {\n ClassProvider,\n ConstructorProvider,\n EnvironmentProviders,\n ExistingProvider,\n FactoryProvider,\n StaticClassProvider,\n ValueProvider,\n} from './provider';\n\n/**\n * Information about how a type or `InjectionToken` interfaces with the DI system.\n *\n * At a minimum, this includes a `factory` which defines how to create the given type `T`, possibly\n * requesting injection of other types if necessary.\n *\n * Optionally, a `providedIn` parameter specifies that the given type belongs to a particular\n * `Injector`, `NgModule`, or a special scope (e.g. `'root'`). A value of `null` indicates\n * that the injectable does not belong to any scope.\n *\n * @codeGenApi\n * @publicApi The ViewEngine compiler emits code with this type for injectables. This code is\n * deployed to npm, and should be treated as public api.\n\n */\nexport interface ɵɵInjectableDeclaration<T> {\n /**\n * Specifies that the given type belongs to a particular injector:\n * - `InjectorType` such as `NgModule`,\n * - `'root'` the root injector\n * - `'any'` all injectors.\n * - `null`, does not belong to any injector. Must be explicitly listed in the injector\n * `providers`.\n */\n providedIn: InjectorType<any> | 'root' | 'platform' | 'any' | 'environment' | null;\n\n /**\n * The token to which this definition belongs.\n *\n * Note that this may not be the same as the type that the `factory` will create.\n */\n token: unknown;\n\n /**\n * Factory method to execute to create an instance of the injectable.\n */\n factory: (t?: Type<any>) => T;\n\n /**\n * In a case of no explicit injector, a location where the instance of the injectable is stored.\n */\n value: T | undefined;\n}\n\n/**\n * Information about the providers to be included in an `Injector` as well as how the given type\n * which carries the information should be created by the DI system.\n *\n * An `InjectorDef` can import other types which have `InjectorDefs`, forming a deep nested\n * structure of providers with a defined priority (identically to how `NgModule`s also have\n * an import/dependency structure).\n *\n * NOTE: This is a private type and should not be exported\n *\n * @codeGenApi\n */\nexport interface ɵɵInjectorDef<T> {\n // TODO(alxhub): Narrow down the type here once decorators properly change the return type of the\n // class they are decorating (to add the ɵprov property for example).\n providers: (\n | Type<any>\n | ValueProvider\n | ExistingProvider\n | FactoryProvider\n | ConstructorProvider\n | StaticClassProvider\n | ClassProvider\n | EnvironmentProviders\n | any[]\n )[];\n\n imports: (InjectorType<any> | InjectorTypeWithProviders<any>)[];\n}\n\n/**\n * A `Type` which has a `ɵprov: ɵɵInjectableDeclaration` static field.\n *\n * `InjectableType`s contain their own Dependency Injection metadata and are usable in an\n * `InjectorDef`-based `StaticInjector`.\n *\n * @publicApi\n */\nexport interface InjectableType<T> extends Type<T> {\n /**\n * Opaque type whose structure is highly version dependent. Do not rely on any properties.\n */\n ɵprov: unknown;\n}\n\n/**\n * A type which has an `InjectorDef` static field.\n *\n * `InjectorTypes` can be used to configure a `StaticInjector`.\n *\n * This is an opaque type whose structure is highly version dependent. Do not rely on any\n * properties.\n *\n * @publicApi\n */\nexport interface InjectorType<T> extends Type<T> {\n ɵfac?: unknown;\n ɵinj: unknown;\n}\n\n/**\n * Describes the `InjectorDef` equivalent of a `ModuleWithProviders`, an `InjectorType` with an\n * associated array of providers.\n *\n * Objects of this type can be listed in the imports section of an `InjectorDef`.\n *\n * NOTE: This is a private type and should not be exported\n */\nexport interface InjectorTypeWithProviders<T> {\n ngModule: InjectorType<T>;\n providers?: (\n | Type<any>\n | ValueProvider\n | ExistingProvider\n | FactoryProvider\n | ConstructorProvider\n | StaticClassProvider\n | ClassProvider\n | EnvironmentProviders\n | any[]\n )[];\n}\n\n/**\n * Construct an injectable definition which defines how a token will be constructed by the DI\n * system, and in which injectors (if any) it will be available.\n *\n * This should be assigned to a static `ɵprov` field on a type, which will then be an\n * `InjectableType`.\n *\n * Options:\n * * `providedIn` determines which injectors will include the injectable, by either associating it\n * with an `@NgModule` or other `InjectorType`, or by specifying that this injectable should be\n * provided in the `'root'` injector, which will be the application-level injector in most apps.\n * * `factory` gives the zero argument function which will create an instance of the injectable.\n * The factory can call [`inject`](api/core/inject) to access the `Injector` and request injection\n * of dependencies.\n *\n * @codeGenApi\n * @publicApi This instruction has been emitted by ViewEngine for some time and is deployed to npm.\n */\nexport function ɵɵdefineInjectable<T>(opts: {\n token: unknown;\n providedIn?: Type<any> | 'root' | 'platform' | 'any' | 'environment' | null;\n factory: () => T;\n}): unknown {\n return {\n token: opts.token,\n providedIn: (opts.providedIn as any) || null,\n factory: opts.factory,\n value: undefined,\n } as ɵɵInjectableDeclaration<T>;\n}\n\n/**\n * @deprecated in v8, delete after v10. This API should be used only by generated code, and that\n * code should now use ɵɵdefineInjectable instead.\n * @publicApi\n */\nexport const defineInjectable = ɵɵdefineInjectable;\n\n/**\n * Construct an `InjectorDef` which configures an injector.\n *\n * This should be assigned to a static injector def (`ɵinj`) field on a type, which will then be an\n * `InjectorType`.\n *\n * Options:\n *\n * * `providers`: an optional array of providers to add to the injector. Each provider must\n * either have a factory or point to a type which has a `ɵprov` static property (the\n * type must be an `InjectableType`).\n * * `imports`: an optional array of imports of other `InjectorType`s or `InjectorTypeWithModule`s\n * whose providers will also be added to the injector. Locally provided types will override\n * providers from imports.\n *\n * @codeGenApi\n */\nexport function ɵɵdefineInjector(options: {providers?: any[]; imports?: any[]}): unknown {\n return {providers: options.providers || [], imports: options.imports || []};\n}\n\n/**\n * Read the injectable def (`ɵprov`) for `type` in a way which is immune to accidentally reading\n * inherited value.\n *\n * @param type A type which may have its own (non-inherited) `ɵprov`.\n */\nexport function getInjectableDef<T>(type: any): ɵɵInjectableDeclaration<T> | null {\n return getOwnDefinition(type, NG_PROV_DEF) || getOwnDefinition(type, NG_INJECTABLE_DEF);\n}\n\nexport function isInjectable(type: any): boolean {\n return getInjectableDef(type) !== null;\n}\n\n/**\n * Return definition only if it is defined directly on `type` and is not inherited from a base\n * class of `type`.\n */\nfunction getOwnDefinition<T>(type: any, field: string): ɵɵInjectableDeclaration<T> | null {\n return type.hasOwnProperty(field) ? type[field] : null;\n}\n\n/**\n * Read the injectable def (`ɵprov`) for `type` or read the `ɵprov` from one of its ancestors.\n *\n * @param type A type which may have `ɵprov`, via inheritance.\n *\n * @deprecated Will be removed in a future version of Angular, where an error will occur in the\n * scenario if we find the `ɵprov` on an ancestor only.\n */\nexport function getInheritedInjectableDef<T>(type: any): ɵɵInjectableDeclaration<T> | null {\n const def = type && (type[NG_PROV_DEF] || type[NG_INJECTABLE_DEF]);\n\n if (def) {\n ngDevMode &&\n console.warn(\n `DEPRECATED: DI is instantiating a token \"${type.name}\" that inherits its @Injectable decorator but does not provide one itself.\\n` +\n `This will become an error in a future version of Angular. Please add @Injectable() to the \"${type.name}\" class.`,\n );\n return def;\n } else {\n return null;\n }\n}\n\n/**\n * Read the injector def type in a way which is immune to accidentally reading inherited value.\n *\n * @param type type which may have an injector def (`ɵinj`)\n */\nexport function getInjectorDef<T>(type: any): ɵɵInjectorDef<T> | null {\n return type && (type.hasOwnProperty(NG_INJ_DEF) || type.hasOwnProperty(NG_INJECTOR_DEF))\n ? (type as any)[NG_INJ_DEF]\n : null;\n}\n\nexport const NG_PROV_DEF: string = getClosureSafeProperty({ɵprov: getClosureSafeProperty});\nexport const NG_INJ_DEF: string = getClosureSafeProperty({ɵinj: getClosureSafeProperty});\n\n// We need to keep these around so we can read off old defs if new defs are unavailable\nexport const NG_INJECTABLE_DEF: string = getClosureSafeProperty({\n ngInjectableDef: getClosureSafeProperty,\n});\nexport const NG_INJECTOR_DEF: string = getClosureSafeProperty({\n ngInjectorDef: getClosureSafeProperty,\n});\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Type} from '../interface/type';\nimport {assertLessThan} from '../util/assert';\n\nimport {ɵɵdefineInjectable} from './interface/defs';\n\n/**\n * Creates a token that can be used in a DI Provider.\n *\n * Use an `InjectionToken` whenever the type you are injecting is not reified (does not have a\n * runtime representation) such as when injecting an interface, callable type, array or\n * parameterized type.\n *\n * `InjectionToken` is parameterized on `T` which is the type of object which will be returned by\n * the `Injector`. This provides an additional level of type safety.\n *\n * <div class=\"docs-alert docs-alert-helpful\">\n *\n * **Important Note**: Ensure that you use the same instance of the `InjectionToken` in both the\n * provider and the injection call. Creating a new instance of `InjectionToken` in different places,\n * even with the same description, will be treated as different tokens by Angular's DI system,\n * leading to a `NullInjectorError`.\n *\n * </div>\n *\n * {@example injection-token/src/main.ts region='InjectionToken'}\n *\n * When creating an `InjectionToken`, you can optionally specify a factory function which returns\n * (possibly by creating) a default value of the parameterized type `T`. This sets up the\n * `InjectionToken` using this factory as a provider as if it was defined explicitly in the\n * application's root injector. If the factory function, which takes zero arguments, needs to inject\n * dependencies, it can do so using the [`inject`](api/core/inject) function.\n * As you can see in the Tree-shakable InjectionToken example below.\n *\n * Additionally, if a `factory` is specified you can also specify the `providedIn` option, which\n * overrides the above behavior and marks the token as belonging to a particular `@NgModule` (note:\n * this option is now deprecated). As mentioned above, `'root'` is the default value for\n * `providedIn`.\n *\n * The `providedIn: NgModule` and `providedIn: 'any'` options are deprecated.\n *\n * @usageNotes\n * ### Basic Examples\n *\n * ### Plain InjectionToken\n *\n * {@example core/di/ts/injector_spec.ts region='InjectionToken'}\n *\n * ### Tree-shakable InjectionToken\n *\n * {@example core/di/ts/injector_spec.ts region='ShakableInjectionToken'}\n *\n * @publicApi\n */\nexport class InjectionToken<T> {\n /** @internal */\n readonly ngMetadataName = 'InjectionToken';\n\n readonly ɵprov: unknown;\n\n /**\n * @param _desc Description for the token,\n * used only for debugging purposes,\n * it should but does not need to be unique\n * @param options Options for the token's usage, as described above\n */\n constructor(\n protected _desc: string,\n options?: {\n providedIn?: Type<any> | 'root' | 'platform' | 'any' | null;\n factory: () => T;\n },\n ) {\n this.ɵprov = undefined;\n if (typeof options == 'number') {\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n assertLessThan(options, 0, 'Only negative numbers are supported here');\n // This is a special hack to assign __NG_ELEMENT_ID__ to this instance.\n // See `InjectorMarkers`\n (this as any).__NG_ELEMENT_ID__ = options;\n } else if (options !== undefined) {\n this.ɵprov = ɵɵdefineInjectable({\n token: this,\n providedIn: options.providedIn || 'root',\n factory: options.factory,\n });\n }\n }\n\n /**\n * @internal\n */\n get multi(): InjectionToken<Array<T>> {\n return this as InjectionToken<Array<T>>;\n }\n\n toString(): string {\n return `InjectionToken ${this._desc}`;\n }\n}\n\nexport interface InjectableDefToken<T> extends InjectionToken<T> {\n ɵprov: unknown;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport type {FactoryProvider} from '../../di';\nimport {resolveForwardRef} from '../../di/forward_ref';\nimport {InjectionToken} from '../../di/injection_token';\nimport type {Injector} from '../../di/injector';\nimport {InjectFlags, InjectOptions, InternalInjectFlags} from '../../di/interface/injector';\nimport type {SingleProvider} from '../../di/provider_collection';\nimport {Type} from '../../interface/type';\nimport {throwError} from '../../util/assert';\nimport type {TNode} from '../interfaces/node';\nimport type {LView} from '../interfaces/view';\nimport type {EffectRef} from '../reactivity/effect';\n\n/**\n * An enum describing the types of events that can be emitted from the injector profiler\n */\nexport const enum InjectorProfilerEventType {\n /**\n * Emits when a service is injected.\n */\n Inject,\n\n /**\n * Emits when an Angular class instance is created by an injector.\n */\n InstanceCreatedByInjector,\n\n /**\n * Emits when an injector configures a provider.\n */\n ProviderConfigured,\n\n /**\n * Emits when an effect is created.\n */\n EffectCreated,\n}\n\n/**\n * An object that defines an injection context for the injector profiler.\n */\nexport interface InjectorProfilerContext {\n /**\n * The Injector that service is being injected into.\n * - Example: if ModuleA --provides--> ServiceA --injects--> ServiceB\n * then inject(ServiceB) in ServiceA has ModuleA as an injector context\n */\n injector: Injector;\n\n /**\n * The class where the constructor that is calling `inject` is located\n * - Example: if ModuleA --provides--> ServiceA --injects--> ServiceB\n * then inject(ServiceB) in ServiceA has ServiceA as a construction context\n */\n token: Type<unknown> | null;\n}\n\nexport interface InjectedServiceEvent {\n type: InjectorProfilerEventType.Inject;\n context: InjectorProfilerContext;\n service: InjectedService;\n}\n\nexport interface InjectorCreatedInstanceEvent {\n type: InjectorProfilerEventType.InstanceCreatedByInjector;\n context: InjectorProfilerContext;\n instance: InjectorCreatedInstance;\n}\n\nexport interface ProviderConfiguredEvent {\n type: InjectorProfilerEventType.ProviderConfigured;\n context: InjectorProfilerContext;\n providerRecord: ProviderRecord;\n}\n\nexport interface EffectCreatedEvent {\n type: InjectorProfilerEventType.EffectCreated;\n context: InjectorProfilerContext;\n effect: EffectRef;\n}\n\n/**\n * An object representing an event that is emitted through the injector profiler\n */\n\nexport type InjectorProfilerEvent =\n | InjectedServiceEvent\n | InjectorCreatedInstanceEvent\n | ProviderConfiguredEvent\n | EffectCreatedEvent;\n\n/**\n * An object that contains information about a provider that has been configured\n *\n * TODO: rename to indicate that it is a debug structure eg. ProviderDebugInfo.\n */\nexport interface ProviderRecord {\n /**\n * DI token that this provider is configuring\n */\n token: Type<unknown> | InjectionToken<unknown>;\n\n /**\n * Determines if provider is configured as view provider.\n */\n isViewProvider: boolean;\n\n /**\n * The raw provider associated with this ProviderRecord.\n */\n provider: SingleProvider;\n\n /**\n * The path of DI containers that were followed to import this provider\n */\n importPath?: Type<unknown>[];\n}\n\n/**\n * An object that contains information about a value that has been constructed within an injector\n */\nexport interface InjectorCreatedInstance {\n /**\n * Value of the created instance\n */\n value: unknown;\n}\n\n/**\n * An object that contains information a service that has been injected within an\n * InjectorProfilerContext\n */\nexport interface InjectedService {\n /**\n * DI token of the Service that is injected\n */\n token?: Type<unknown> | InjectionToken<unknown>;\n\n /**\n * Value of the injected service\n */\n value: unknown;\n\n /**\n * Flags that this service was injected with\n */\n flags?: InternalInjectFlags | InjectFlags | InjectOptions;\n\n /**\n * Injector that this service was provided in.\n */\n providedIn?: Injector;\n\n /**\n * In NodeInjectors, the LView and TNode that serviced this injection.\n */\n injectedIn?: {lView: LView; tNode: TNode};\n}\n\nexport interface InjectorProfiler {\n (event: InjectorProfilerEvent): void;\n}\n\nlet _injectorProfilerContext: InjectorProfilerContext;\nexport function getInjectorProfilerContext() {\n !ngDevMode && throwError('getInjectorProfilerContext should never be called in production mode');\n return _injectorProfilerContext;\n}\n\nexport function setInjectorProfilerContext(context: InjectorProfilerContext) {\n !ngDevMode && throwError('setInjectorProfilerContext should never be called in production mode');\n\n const previous = _injectorProfilerContext;\n _injectorProfilerContext = context;\n return previous;\n}\n\nlet injectorProfilerCallback: InjectorProfiler | null = null;\n\n/**\n * Sets the callback function which will be invoked during certain DI events within the\n * runtime (for example: injecting services, creating injectable instances, configuring providers)\n *\n * Warning: this function is *INTERNAL* and should not be relied upon in application's code.\n * The contract of the function might be changed in any release and/or the function can be removed\n * completely.\n *\n * @param profiler function provided by the caller or null value to disable profiling.\n */\nexport const setInjectorProfiler = (injectorProfiler: InjectorProfiler | null) => {\n !ngDevMode && throwError('setInjectorProfiler should never be called in production mode');\n injectorProfilerCallback = injectorProfiler;\n};\n\n/**\n * Injector profiler function which emits on DI events executed by the runtime.\n *\n * @param event InjectorProfilerEvent corresponding to the DI event being emitted\n */\nfunction injectorProfiler(event: InjectorProfilerEvent): void {\n !ngDevMode && throwError('Injector profiler should never be called in production mode');\n\n if (injectorProfilerCallback != null /* both `null` and `undefined` */) {\n injectorProfilerCallback!(event);\n }\n}\n\n/**\n * Emits an InjectorProfilerEventType.ProviderConfigured to the injector profiler. The data in the\n * emitted event includes the raw provider, as well as the token that provider is providing.\n *\n * @param eventProvider A provider object\n */\nexport function emitProviderConfiguredEvent(\n eventProvider: SingleProvider,\n isViewProvider: boolean = false,\n): void {\n !ngDevMode && throwError('Injector profiler should never be called in production mode');\n\n let token;\n // if the provider is a TypeProvider (typeof provider is function) then the token is the\n // provider itself\n if (typeof eventProvider === 'function') {\n token = eventProvider;\n }\n // if the provider is an injection token, then the token is the injection token.\n else if (eventProvider instanceof InjectionToken) {\n token = eventProvider;\n }\n // in all other cases we can access the token via the `provide` property of the provider\n else {\n token = resolveForwardRef(eventProvider.provide);\n }\n\n let provider = eventProvider;\n // Injection tokens may define their own default provider which gets attached to the token itself\n // as `ɵprov`. In this case, we want to emit the provider that is attached to the token, not the\n // token itself.\n if (eventProvider instanceof InjectionToken) {\n provider = (eventProvider.ɵprov as FactoryProvider) || eventProvider;\n }\n\n injectorProfiler({\n type: InjectorProfilerEventType.ProviderConfigured,\n context: getInjectorProfilerContext(),\n providerRecord: {token, provider, isViewProvider},\n });\n}\n\n/**\n * Emits an event to the injector profiler with the instance that was created. Note that\n * the injector associated with this emission can be accessed by using getDebugInjectContext()\n *\n * @param instance an object created by an injector\n */\nexport function emitInstanceCreatedByInjectorEvent(instance: unknown): void {\n !ngDevMode && throwError('Injector profiler should never be called in production mode');\n\n injectorProfiler({\n type: InjectorProfilerEventType.InstanceCreatedByInjector,\n context: getInjectorProfilerContext(),\n instance: {value: instance},\n });\n}\n\n/**\n * @param token DI token associated with injected service\n * @param value the instance of the injected service (i.e the result of `inject(token)`)\n * @param flags the flags that the token was injected with\n */\nexport function emitInjectEvent(token: Type<unknown>, value: unknown, flags: InjectFlags): void {\n !ngDevMode && throwError('Injector profiler should never be called in production mode');\n\n injectorProfiler({\n type: InjectorProfilerEventType.Inject,\n context: getInjectorProfilerContext(),\n service: {token, value, flags},\n });\n}\n\nexport function emitEffectCreatedEvent(effect: EffectRef): void {\n !ngDevMode && throwError('Injector profiler should never be called in production mode');\n\n injectorProfiler({\n type: InjectorProfilerEventType.EffectCreated,\n context: getInjectorProfilerContext(),\n effect,\n });\n}\n\nexport function runInInjectorProfilerContext(\n injector: Injector,\n token: Type<unknown>,\n callback: () => void,\n): void {\n !ngDevMode &&\n throwError('runInInjectorProfilerContext should never be called in production mode');\n\n const prevInjectContext = setInjectorProfilerContext({injector, token});\n try {\n callback();\n } finally {\n setInjectorProfilerContext(prevInjectContext);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Type} from '../../interface/type';\n\n/**\n * Configures the `Injector` to return a value for a token.\n * Base for `ValueProvider` decorator.\n *\n * @publicApi\n */\nexport interface ValueSansProvider {\n /**\n * The value to inject.\n */\n useValue: any;\n}\n\n/**\n * Configures the `Injector` to return a value for a token.\n * @see [Dependency Injection Guide](guide/di/dependency-injection.\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example core/di/ts/provider_spec.ts region='ValueProvider'}\n *\n * ### Multi-value example\n *\n * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}\n *\n * @publicApi\n */\nexport interface ValueProvider extends ValueSansProvider {\n /**\n * An injection token. Typically an instance of `Type` or `InjectionToken`, but can be `any`.\n */\n provide: any;\n\n /**\n * When true, injector returns an array of instances. This is useful to allow multiple\n * providers spread across many files to provide configuration information to a common token.\n */\n multi?: boolean;\n}\n\n/**\n * Configures the `Injector` to return an instance of `useClass` for a token.\n * Base for `StaticClassProvider` decorator.\n *\n * @publicApi\n */\nexport interface StaticClassSansProvider {\n /**\n * An optional class to instantiate for the `token`. By default, the `provide`\n * class is instantiated.\n */\n useClass: Type<any>;\n\n /**\n * A list of `token`s to be resolved by the injector. The list of values is then\n * used as arguments to the `useClass` constructor.\n */\n deps: any[];\n}\n\n/**\n * Configures the `Injector` to return an instance of `useClass` for a token.\n * @see [Dependency Injection Guide](guide/di/dependency-injection.\n *\n * @usageNotes\n *\n * {@example core/di/ts/provider_spec.ts region='StaticClassProvider'}\n *\n * Note that following two providers are not equal:\n *\n * {@example core/di/ts/provider_spec.ts region='StaticClassProviderDifference'}\n *\n * ### Multi-value example\n *\n * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}\n *\n * @publicApi\n */\nexport interface StaticClassProvider extends StaticClassSansProvider {\n /**\n * An injection token. Typically an instance of `Type` or `InjectionToken`, but can be `any`.\n */\n provide: any;\n\n /**\n * When true, injector returns an array of instances. This is useful to allow multiple\n * providers spread across many files to provide configuration information to a common token.\n */\n multi?: boolean;\n}\n\n/**\n * Configures the `Injector` to return an instance of a token.\n *\n * @see [Dependency Injection Guide](guide/di/dependency-injection.\n *\n * @usageNotes\n *\n * ```ts\n * @Injectable(SomeModule, {deps: []})\n * class MyService {}\n * ```\n *\n * @publicApi\n */\nexport interface ConstructorSansProvider {\n /**\n * A list of `token`s to be resolved by the injector.\n */\n deps?: any[];\n}\n\n/**\n * Configures the `Injector` to return an instance of a token.\n *\n * @see [Dependency Injection Guide](guide/di/dependency-injection.\n *\n * @usageNotes\n *\n * {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}\n *\n * ### Multi-value example\n *\n * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}\n *\n * @publicApi\n */\nexport interface ConstructorProvider extends ConstructorSansProvider {\n /**\n * An injection token. Typically an instance of `Type` or `InjectionToken`, but can be `any`.\n */\n provide: Type<any>;\n\n /**\n * When true, injector returns an array of instances. This is useful to allow multiple\n * providers spread across many files to provide configuration information to a common token.\n */\n multi?: boolean;\n}\n\n/**\n * Configures the `Injector` to return a value of another `useExisting` token.\n *\n * @see {@link ExistingProvider}\n * @see [Dependency Injection Guide](guide/di/dependency-injection.\n *\n * @publicApi\n */\nexport interface ExistingSansProvider {\n /**\n * Existing `token` to return. (Equivalent to `injector.get(useExisting)`)\n */\n useExisting: any;\n}\n\n/**\n * Configures the `Injector` to return a value of another `useExisting` token.\n *\n * @see [Dependency Injection Guide](guide/di/dependency-injection.\n *\n * @usageNotes\n *\n * {@example core/di/ts/provider_spec.ts region='ExistingProvider'}\n *\n * ### Multi-value example\n *\n * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}\n *\n * @publicApi\n */\nexport interface ExistingProvider extends ExistingSansProvider {\n /**\n * An injection token. Typically an instance of `Type` or `InjectionToken`, but can be `any`.\n */\n provide: any;\n\n /**\n * When true, injector returns an array of instances. This is useful to allow multiple\n * providers spread across many files to provide configuration information to a common token.\n */\n multi?: boolean;\n}\n\n/**\n * Configures the `Injector` to return a value by invoking a `useFactory` function.\n *\n * @see {@link FactoryProvider}\n * @see [Dependency Injection Guide](guide/di/dependency-injection.\n *\n * @publicApi\n */\nexport interface FactorySansProvider {\n /**\n * A function to invoke to create a value for this `token`. The function is invoked with\n * resolved values of `token`s in the `deps` field.\n */\n useFactory: Function;\n\n /**\n * A list of `token`s to be resolved by the injector. The list of values is then\n * used as arguments to the `useFactory` function.\n */\n deps?: any[];\n}\n\n/**\n * Configures the `Injector` to return a value by invoking a `useFactory` function.\n * @see [Dependency Injection Guide](guide/di/dependency-injection.\n *\n * @usageNotes\n *\n * {@example core/di/ts/provider_spec.ts region='FactoryProvider'}\n *\n * Dependencies can also be marked as optional:\n *\n * {@example core/di/ts/provider_spec.ts region='FactoryProviderOptionalDeps'}\n *\n * ### Multi-value example\n *\n * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}\n *\n * @publicApi\n */\nexport interface FactoryProvider extends FactorySansProvider {\n /**\n * An injection token. (Typically an instance of `Type` or `InjectionToken`, but can be `any`).\n */\n provide: any;\n\n /**\n * When true, injector returns an array of instances. This is useful to allow multiple\n * providers spread across many files to provide configuration information to a common token.\n */\n multi?: boolean;\n}\n\n/**\n * Describes how an `Injector` should be configured as static (that is, without reflection).\n * A static provider provides tokens to an injector for various types of dependencies.\n *\n * @see {@link Injector.create()}\n * @see [Dependency Injection Guide](guide/di/dependency-injection-providers).\n *\n * @publicApi\n */\nexport type StaticProvider =\n | ValueProvider\n | ExistingProvider\n | StaticClassProvider\n | ConstructorProvider\n | FactoryProvider\n | any[];\n\n/**\n * Configures the `Injector` to return an instance of `Type` when `Type' is used as the token.\n *\n * Create an instance by invoking the `new` operator and supplying additional arguments.\n * This form is a short form of `TypeProvider`;\n *\n * For more details, see the [\"Dependency Injection Guide\"](guide/di/dependency-injection.\n *\n * @usageNotes\n *\n * {@example core/di/ts/provider_spec.ts region='TypeProvider'}\n *\n * @publicApi\n */\nexport interface TypeProvider extends Type<any> {}\n\n/**\n * Configures the `Injector` to return a value by invoking a `useClass` function.\n * Base for `ClassProvider` decorator.\n *\n * @see [Dependency Injection Guide](guide/di/dependency-injection.\n *\n * @publicApi\n */\nexport interface ClassSansProvider {\n /**\n * Class to instantiate for the `token`.\n */\n useClass: Type<any>;\n}\n\n/**\n * Configures the `Injector` to return an instance of `useClass` for a token.\n * @see [Dependency Injection Guide](guide/di/dependency-injection.\n *\n * @usageNotes\n *\n * {@example core/di/ts/provider_spec.ts region='ClassProvider'}\n *\n * Note that following two providers are not equal:\n *\n * {@example core/di/ts/provider_spec.ts region='ClassProviderDifference'}\n *\n * ### Multi-value example\n *\n * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}\n *\n * @publicApi\n */\nexport interface ClassProvider extends ClassSansProvider {\n /**\n * An injection token. (Typically an instance of `Type` or `InjectionToken`, but can be `any`).\n */\n provide: any;\n\n /**\n * When true, injector returns an array of instances. This is useful to allow multiple\n * providers spread across many files to provide configuration information to a common token.\n */\n multi?: boolean;\n}\n\n/**\n * Describes how the `Injector` should be configured.\n * @see [Dependency Injection Guide](guide/di/dependency-injection.\n *\n * @see {@link StaticProvider}\n *\n * @publicApi\n */\nexport type Provider =\n | TypeProvider\n | ValueProvider\n | ClassProvider\n | ConstructorProvider\n | ExistingProvider\n | FactoryProvider\n | any[];\n\n/**\n * Encapsulated `Provider`s that are only accepted during creation of an `EnvironmentInjector` (e.g.\n * in an `NgModule`).\n *\n * Using this wrapper type prevents providers which are only designed to work in\n * application/environment injectors from being accidentally included in\n * `@Component.providers` and ending up in a component injector.\n *\n * This wrapper type prevents access to the `Provider`s inside.\n *\n * @see {@link makeEnvironmentProviders}\n * @see {@link importProvidersFrom}\n *\n * @publicApi\n */\nexport type EnvironmentProviders = {\n ɵbrand: 'EnvironmentProviders';\n};\n\nexport interface InternalEnvironmentProviders extends EnvironmentProviders {\n ɵproviders: (Provider | EnvironmentProviders)[];\n\n /**\n * If present, indicates that the `EnvironmentProviders` were derived from NgModule providers.\n *\n * This is used to produce clearer error messages.\n */\n ɵfromNgModule?: true;\n}\n\nexport function isEnvironmentProviders(\n value: Provider | EnvironmentProviders | InternalEnvironmentProviders,\n): value is InternalEnvironmentProviders {\n return value && !!(value as InternalEnvironmentProviders).ɵproviders;\n}\n\n/**\n * Describes a function that is used to process provider lists (such as provider\n * overrides).\n */\nexport type ProcessProvidersFunction = (providers: Provider[]) => Provider[];\n\n/**\n * A wrapper around an NgModule that associates it with providers\n * Usage without a generic type is deprecated.\n *\n * @publicApi\n */\nexport interface ModuleWithProviders<T> {\n ngModule: Type<T>;\n providers?: Array<Provider | EnvironmentProviders>;\n}\n\n/**\n * Providers that were imported from NgModules via the `importProvidersFrom` function.\n *\n * These providers are meant for use in an application injector (or other environment injectors) and\n * should not be used in component injectors.\n *\n * This type cannot be directly implemented. It's returned from the `importProvidersFrom` function\n * and serves to prevent the extracted NgModule providers from being used in the wrong contexts.\n *\n * @see {@link importProvidersFrom}\n *\n * @publicApi\n * @deprecated replaced by `EnvironmentProviders`\n */\nexport type ImportedNgModuleProviders = EnvironmentProviders;\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {getClosureSafeProperty} from '../util/property';\n\nexport const NG_COMP_DEF: string = getClosureSafeProperty({ɵcmp: getClosureSafeProperty});\nexport const NG_DIR_DEF: string = getClosureSafeProperty({ɵdir: getClosureSafeProperty});\nexport const NG_PIPE_DEF: string = getClosureSafeProperty({ɵpipe: getClosureSafeProperty});\nexport const NG_MOD_DEF: string = getClosureSafeProperty({ɵmod: getClosureSafeProperty});\nexport const NG_FACTORY_DEF: string = getClosureSafeProperty({ɵfac: getClosureSafeProperty});\n\n/**\n * If a directive is diPublic, bloomAdd sets a property on the type with this constant as\n * the key and the directive's unique ID as the value. This allows us to map directives to their\n * bloom filter bit for DI.\n */\n// TODO(misko): This is wrong. The NG_ELEMENT_ID should never be minified.\nexport const NG_ELEMENT_ID: string = getClosureSafeProperty({\n __NG_ELEMENT_ID__: getClosureSafeProperty,\n});\n\n/**\n * The `NG_ENV_ID` field on a DI token indicates special processing in the `EnvironmentInjector`:\n * getting such tokens from the `EnvironmentInjector` will bypass the standard DI resolution\n * strategy and instead will return implementation produced by the `NG_ENV_ID` factory function.\n *\n * This particular retrieval of DI tokens is mostly done to eliminate circular dependencies and\n * improve tree-shaking.\n */\nexport const NG_ENV_ID: string = getClosureSafeProperty({__NG_ENV_ID__: getClosureSafeProperty});\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Type} from '../../interface/type';\nimport {NG_COMP_DEF} from '../fields';\n\n/**\n * Used for stringify render output in Ivy.\n * Important! This function is very performance-sensitive and we should\n * be extra careful not to introduce megamorphic reads in it.\n * Check `core/test/render3/perf/render_stringify` for benchmarks and alternate implementations.\n */\nexport function renderStringify(value: any): string {\n if (typeof value === 'string') return value;\n if (value == null) return '';\n // Use `String` so that it invokes the `toString` method of the value. Note that this\n // appears to be faster than calling `value.toString` (see `render_stringify` benchmark).\n return String(value);\n}\n\n/**\n * Used to stringify a value so that it can be displayed in an error message.\n *\n * Important! This function contains a megamorphic read and should only be\n * used for error messages.\n */\nexport function stringifyForError(value: any): string {\n if (typeof value === 'function') return value.name || value.toString();\n if (typeof value === 'object' && value != null && typeof value.type === 'function') {\n return value.type.name || value.type.toString();\n }\n\n return renderStringify(value);\n}\n\n/**\n * Used to stringify a `Type` and including the file path and line number in which it is defined, if\n * possible, for better debugging experience.\n *\n * Important! This function contains a megamorphic read and should only be used for error messages.\n */\nexport function debugStringifyTypeForError(type: Type<any>): string {\n // TODO(pmvald): Do some refactoring so that we can use getComponentDef here without creating\n // circular deps.\n let componentDef = (type as any)[NG_COMP_DEF] || null;\n if (componentDef !== null && componentDef.debugInfo) {\n return stringifyTypeFromDebugInfo(componentDef.debugInfo);\n }\n\n return stringifyForError(type);\n}\n\n// TODO(pmvald): Do some refactoring so that we can use the type ClassDebugInfo for the param\n// debugInfo here without creating circular deps.\nfunction stringifyTypeFromDebugInfo(debugInfo: any): string {\n if (!debugInfo.filePath || !debugInfo.lineNumber) {\n return debugInfo.className;\n } else {\n return `${debugInfo.className} (at ${debugInfo.filePath}:${debugInfo.lineNumber})`;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport type {ProviderToken} from '../di';\nimport {isEnvironmentProviders} from '../di/interface/provider';\nimport {RuntimeError, RuntimeErrorCode} from '../errors';\nimport {Type} from '../interface/type';\nimport {stringify} from '../util/stringify';\n\nimport {stringifyForError} from './util/stringify_utils';\n\n/** Called when directives inject each other (creating a circular dependency) */\nexport function throwCyclicDependencyError(token: string, path?: string[]): never {\n throw new RuntimeError(\n RuntimeErrorCode.CYCLIC_DI_DEPENDENCY,\n ngDevMode\n ? `Circular dependency in DI detected for ${token}${path ? `. Dependency path: ${path.join(' > ')} > ${token}` : ''}`\n : token,\n );\n}\n\nexport function throwMixedMultiProviderError() {\n throw new Error(`Cannot mix multi providers and regular providers`);\n}\n\nexport function throwInvalidProviderError(\n ngModuleType?: Type<unknown>,\n providers?: any[],\n provider?: any,\n): never {\n if (ngModuleType && providers) {\n const providerDetail = providers.map((v) => (v == provider ? '?' + provider + '?' : '...'));\n throw new Error(\n `Invalid provider for the NgModule '${stringify(\n ngModuleType,\n )}' - only instances of Provider and Type are allowed, got: [${providerDetail.join(', ')}]`,\n );\n } else if (isEnvironmentProviders(provider)) {\n if (provider.ɵfromNgModule) {\n throw new RuntimeError(\n RuntimeErrorCode.PROVIDER_IN_WRONG_CONTEXT,\n `Invalid providers from 'importProvidersFrom' present in a non-environment injector. 'importProvidersFrom' can't be used for component providers.`,\n );\n } else {\n throw new RuntimeError(\n RuntimeErrorCode.PROVIDER_IN_WRONG_CONTEXT,\n `Invalid providers present in a non-environment injector. 'EnvironmentProviders' can't be used for component providers.`,\n );\n }\n } else {\n throw new Error('Invalid provider');\n }\n}\n\n/** Throws an error when a token is not found in DI. */\nexport function throwProviderNotFoundError(\n token: ProviderToken<unknown>,\n injectorName?: string,\n): never {\n const errorMessage =\n ngDevMode &&\n `No provider for ${stringifyForError(token)} found${injectorName ? ` in ${injectorName}` : ''}`;\n throw new RuntimeError(RuntimeErrorCode.PROVIDER_NOT_FOUND, errorMessage);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/**\n * Special flag indicating that a decorator is of type `Inject`. It's used to make `Inject`\n * decorator tree-shakable (so we don't have to rely on the `instanceof` checks).\n * Note: this flag is not included into the `InjectFlags` since it's an internal-only API.\n */\nexport const enum DecoratorFlags {\n Inject = -1,\n}\n\n/**\n * Injection flags for DI.\n *\n * @publicApi\n * @deprecated use an options object for [`inject`](api/core/inject) instead.\n */\nexport enum InjectFlags {\n // TODO(alxhub): make this 'const' (and remove `InternalInjectFlags` enum) when ngc no longer\n // writes exports of it into ngfactory files.\n\n /** Check self and check parent injector if needed */\n Default = 0b0000,\n\n /**\n * Specifies that an injector should retrieve a dependency from any injector until reaching the\n * host element of the current component. (Only used with Element Injector)\n */\n Host = 0b0001,\n\n /** Don't ascend to ancestors of the node requesting injection. */\n Self = 0b0010,\n\n /** Skip the node that is requesting injection. */\n SkipSelf = 0b0100,\n\n /** Inject `defaultValue` instead if token not found. */\n Optional = 0b1000,\n}\n\n/**\n * This enum is an exact copy of the `InjectFlags` enum above, but the difference is that this is a\n * const enum, so actual enum values would be inlined in generated code. The `InjectFlags` enum can\n * be turned into a const enum when ViewEngine is removed (see TODO at the `InjectFlags` enum\n * above). The benefit of inlining is that we can use these flags at the top level without affecting\n * tree-shaking (see \"no-toplevel-property-access\" tslint rule for more info).\n * Keep this enum in sync with `InjectFlags` enum above.\n */\nexport const enum InternalInjectFlags {\n /** Check self and check parent injector if needed */\n Default = 0b0000,\n\n /**\n * Specifies that an injector should retrieve a dependency from any injector until reaching the\n * host element of the current component. (Only used with Element Injector)\n */\n Host = 0b0001,\n\n /** Don't ascend to ancestors of the node requesting injection. */\n Self = 0b0010,\n\n /** Skip the node that is requesting injection. */\n SkipSelf = 0b0100,\n\n /** Inject `defaultValue` instead if token not found. */\n Optional = 0b1000,\n\n /**\n * This token is being injected into a pipe.\n *\n * This flag is intentionally not in the public facing `InjectFlags` because it is only added by\n * the compiler and is not a developer applicable flag.\n */\n ForPipe = 0b10000,\n}\n\n/**\n * Type of the options argument to [`inject`](api/core/inject).\n *\n * @publicApi\n */\nexport interface InjectOptions {\n /**\n * Use optional injection, and return `null` if the requested token is not found.\n */\n optional?: boolean;\n\n /**\n * Start injection at the parent of the current injector.\n */\n skipSelf?: boolean;\n\n /**\n * Only query the current injector for the token, and don't fall back to the parent injector if\n * it's not found.\n */\n self?: boolean;\n\n /**\n * Stop injection at the host component's injector. Only relevant when injecting from an element\n * injector, and a no-op for environment injectors.\n */\n host?: boolean;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {throwProviderNotFoundError} from '../render3/errors_di';\nimport {assertNotEqual} from '../util/assert';\nimport {stringify} from '../util/stringify';\n\nimport {getInjectableDef, ɵɵInjectableDeclaration} from './interface/defs';\nimport {InjectFlags} from './interface/injector';\nimport {ProviderToken} from './provider_token';\n\n/**\n * Current implementation of inject.\n *\n * By default, it is `injectInjectorOnly`, which makes it `Injector`-only aware. It can be changed\n * to `directiveInject`, which brings in the `NodeInjector` system of ivy. It is designed this\n * way for two reasons:\n * 1. `Injector` should not depend on ivy logic.\n * 2. To maintain tree shake-ability we don't want to bring in unnecessary code.\n */\nlet _injectImplementation:\n | (<T>(token: ProviderToken<T>, flags?: InjectFlags) => T | null)\n | undefined;\nexport function getInjectImplementation() {\n return _injectImplementation;\n}\n\n/**\n * Sets the current inject implementation.\n */\nexport function setInjectImplementation(\n impl: (<T>(token: ProviderToken<T>, flags?: InjectFlags) => T | null) | undefined,\n): (<T>(token: ProviderToken<T>, flags?: InjectFlags) => T | null) | undefined {\n const previous = _injectImplementation;\n _injectImplementation = impl;\n return previous;\n}\n\n/**\n * Injects `root` tokens in limp mode.\n *\n * If no injector exists, we can still inject tree-shakable providers which have `providedIn` set to\n * `\"root\"`. This is known as the limp mode injection. In such case the value is stored in the\n * injectable definition.\n */\nexport function injectRootLimpMode<T>(\n token: ProviderToken<T>,\n notFoundValue: T | undefined,\n flags: InjectFlags,\n): T | null {\n const injectableDef: ɵɵInjectableDeclaration<T> | null = getInjectableDef(token);\n if (injectableDef && injectableDef.providedIn == 'root') {\n return injectableDef.value === undefined\n ? (injectableDef.value = injectableDef.factory())\n : injectableDef.value;\n }\n if (flags & InjectFlags.Optional) return null;\n if (notFoundValue !== undefined) return notFoundValue;\n throwProviderNotFoundError(token, 'Injector');\n}\n\n/**\n * Assert that `_injectImplementation` is not `fn`.\n *\n * This is useful, to prevent infinite recursion.\n *\n * @param fn Function which it should not equal to\n */\nexport function assertInjectImplementationNotEqual(\n fn: <T>(token: ProviderToken<T>, flags?: InjectFlags) => T | null,\n) {\n ngDevMode &&\n assertNotEqual(_injectImplementation, fn, 'Calling ɵɵinject would cause infinite recursion');\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport '../util/ng_dev_mode';\n\nimport {RuntimeError, RuntimeErrorCode} from '../errors';\nimport {Type} from '../interface/type';\nimport {emitInjectEvent} from '../render3/debug/injector_profiler';\nimport {stringify} from '../util/stringify';\n\nimport {resolveForwardRef} from './forward_ref';\nimport {getInjectImplementation, injectRootLimpMode} from './inject_switch';\nimport type {Injector} from './injector';\nimport {\n DecoratorFlags,\n InjectFlags,\n InjectOptions,\n InternalInjectFlags,\n} from './interface/injector';\nimport {ProviderToken} from './provider_token';\nimport type {HostAttributeToken} from './host_attribute_token';\nimport {\n Injector as PrimitivesInjector,\n NotFound,\n NOT_FOUND,\n InjectionToken as PrimitivesInjectionToken,\n getCurrentInjector,\n} from '../../primitives/di';\n\nconst _THROW_IF_NOT_FOUND = {};\nexport const THROW_IF_NOT_FOUND = _THROW_IF_NOT_FOUND;\n\nexport {getCurrentInjector, setCurrentInjector} from '../../primitives/di';\n\n/*\n * Name of a property (that we patch onto DI decorator), which is used as an annotation of which\n * InjectFlag this decorator represents. This allows to avoid direct references to the DI decorators\n * in the code, thus making them tree-shakable.\n */\nconst DI_DECORATOR_FLAG = '__NG_DI_FLAG__';\n\nexport class RetrievingInjector implements PrimitivesInjector {\n constructor(readonly injector: Injector) {}\n retrieve<T>(token: PrimitivesInjectionToken<T>, options: unknown): T | NotFound {\n const ngOptions = options as InjectOptions;\n return this.injector.get(token, ngOptions.optional ? NOT_FOUND : THROW_IF_NOT_FOUND, ngOptions);\n }\n}\n\nexport const NG_TEMP_TOKEN_PATH = 'ngTempTokenPath';\nconst NG_TOKEN_PATH = 'ngTokenPath';\nconst NEW_LINE = /\\n/gm;\nconst NO_NEW_LINE = 'ɵ';\nexport const SOURCE = '__source';\n\nexport function injectInjectorOnly<T>(token: ProviderToken<T>): T;\nexport function injectInjectorOnly<T>(token: ProviderToken<T>, flags?: InjectFlags): T | null;\nexport function injectInjectorOnly<T>(\n token: ProviderToken<T>,\n flags = InjectFlags.Default,\n): T | null {\n if (getCurrentInjector() === undefined) {\n throw new RuntimeError(\n RuntimeErrorCode.MISSING_INJECTION_CONTEXT,\n ngDevMode &&\n `The \\`${stringify(token)}\\` token injection failed. \\`inject()\\` function must be called from an injection context such as a constructor, a factory function, a field initializer, or a function used with \\`runInInjectionContext\\`.`,\n );\n } else if (getCurrentInjector() === null) {\n return injectRootLimpMode(token, undefined, flags);\n } else {\n const currentInjector = getCurrentInjector();\n let injector: Injector;\n if (currentInjector instanceof RetrievingInjector) {\n injector = currentInjector.injector;\n } else {\n injector = currentInjector as unknown as Injector;\n }\n const value = injector.get(token, flags & InjectFlags.Optional ? null : undefined, flags);\n ngDevMode && emitInjectEvent(token as Type<unknown>, value, flags);\n return value;\n }\n}\n\n/**\n * Generated instruction: injects a token from the currently active injector.\n *\n * (Additional documentation moved to `inject`, as it is the public API, and an alias for this\n * instruction)\n *\n * @see inject\n * @codeGenApi\n * @publicApi This instruction has been emitted by ViewEngine for some time and is deployed to npm.\n */\nexport function ɵɵinject<T>(token: ProviderToken<T>): T;\nexport function ɵɵinject<T>(token: ProviderToken<T>, flags?: InjectFlags): T | null;\nexport function ɵɵinject(token: HostAttributeToken): string;\nexport function ɵɵinject(token: HostAttributeToken, flags?: InjectFlags): string | null;\nexport function ɵɵinject<T>(\n token: ProviderToken<T> | HostAttributeToken,\n flags?: InjectFlags,\n): string | null;\nexport function ɵɵinject<T>(\n token: ProviderToken<T> | HostAttributeToken,\n flags = InjectFlags.Default,\n): T | null {\n return (getInjectImplementation() || injectInjectorOnly)(\n resolveForwardRef(token as Type<T>),\n flags,\n );\n}\n\n/**\n * Throws an error indicating that a factory function could not be generated by the compiler for a\n * particular class.\n *\n * The name of the class is not mentioned here, but will be in the generated factory function name\n * and thus in the stack trace.\n *\n * @codeGenApi\n */\nexport function ɵɵinvalidFactoryDep(index: number): never {\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_FACTORY_DEPENDENCY,\n ngDevMode &&\n `This constructor is not compatible with Angular Dependency Injection because its dependency at index ${index} of the parameter list is invalid.\nThis can happen if the dependency type is a primitive like a string or if an ancestor of this class is missing an Angular decorator.\n\nPlease check that 1) the type for the parameter at index ${index} is correct and 2) the correct Angular decorators are defined for this class and its ancestors.`,\n );\n}\n\n/**\n * @param token A token that represents a dependency that should be injected.\n * @returns the injected value if operation is successful, `null` otherwise.\n * @throws if called outside of a supported context.\n *\n * @publicApi\n */\nexport function inject<T>(token: ProviderToken<T>): T;\n/**\n * @param token A token that represents a dependency that should be injected.\n * @param flags Control how injection is executed. The flags correspond to injection strategies that\n * can be specified with parameter decorators `@Host`, `@Self`, `@SkipSelf`, and `@Optional`.\n * @returns the injected value if operation is successful, `null` otherwise.\n * @throws if called outside of a supported context.\n *\n * @publicApi\n * @deprecated prefer an options object instead of `InjectFlags`\n */\nexport function inject<T>(token: ProviderToken<T>, flags?: InjectFlags): T | null;\n/**\n * @param token A token that represents a dependency that should be injected.\n * @param options Control how injection is executed. Options correspond to injection strategies\n * that can be specified with parameter decorators `@Host`, `@Self`, `@SkipSelf`, and\n * `@Optional`.\n * @returns the injected value if operation is successful.\n * @throws if called outside of a supported context, or if the token is not found.\n *\n * @publicApi\n */\nexport function inject<T>(token: ProviderToken<T>, options: InjectOptions & {optional?: false}): T;\n/**\n * @param token A token that represents a dependency that should be injected.\n * @param options Control how injection is executed. Options correspond to injection strategies\n * that can be specified with parameter decorators `@Host`, `@Self`, `@SkipSelf`, and\n * `@Optional`.\n * @returns the injected value if operation is successful, `null` if the token is not\n * found and optional injection has been requested.\n * @throws if called outside of a supported context, or if the token is not found and optional\n * injection was not requested.\n *\n * @publicApi\n */\nexport function inject<T>(token: ProviderToken<T>, options: InjectOptions): T | null;\n/**\n * @param token A token that represents a static attribute on the host node that should be injected.\n * @returns Value of the attribute if it exists.\n * @throws If called outside of a supported context or the attribute does not exist.\n *\n * @publicApi\n */\nexport function inject(token: HostAttributeToken): string;\n/**\n * @param token A token that represents a static attribute on the host node that should be injected.\n * @returns Value of the attribute if it exists, otherwise `null`.\n * @throws If called outside of a supported context.\n *\n * @publicApi\n */\nexport function inject(token: HostAttributeToken, options: {optional: true}): string | null;\n/**\n * @param token A token that represents a static attribute on the host node that should be injected.\n * @returns Value of the attribute if it exists.\n * @throws If called outside of a supported context or the attribute does not exist.\n *\n * @publicApi\n */\nexport function inject(token: HostAttributeToken, options: {optional: false}): string;\n/**\n * Injects a token from the currently active injector.\n * `inject` is only supported in an [injection context](guide/di/dependency-injection-context). It\n * can be used during:\n * - Construction (via the `constructor`) of a class being instantiated by the DI system, such\n * as an `@Injectable` or `@Component`.\n * - In the initializer for fields of such classes.\n * - In the factory function specified for `useFactory` of a `Provider` or an `@Injectable`.\n * - In the `factory` function specified for an `InjectionToken`.\n * - In a stackframe of a function call in a DI context\n *\n * @param token A token that represents a dependency that should be injected.\n * @param flags Optional flags that control how injection is executed.\n * The flags correspond to injection strategies that can be specified with\n * parameter decorators `@Host`, `@Self`, `@SkipSelf`, and `@Optional`.\n * @returns the injected value if operation is successful, `null` otherwise.\n * @throws if called outside of a supported context.\n *\n * @usageNotes\n * In practice the `inject()` calls are allowed in a constructor, a constructor parameter and a\n * field initializer:\n *\n * ```ts\n * @Injectable({providedIn: 'root'})\n * export class Car {\n * radio: Radio|undefined;\n * // OK: field initializer\n * spareTyre = inject(Tyre);\n *\n * constructor() {\n * // OK: constructor body\n * this.radio = inject(Radio);\n * }\n * }\n * ```\n *\n * It is also legal to call `inject` from a provider's factory:\n *\n * ```ts\n * providers: [\n * {provide: Car, useFactory: () => {\n * // OK: a class factory\n * const engine = inject(Engine);\n * return new Car(engine);\n * }}\n * ]\n * ```\n *\n * Calls to the `inject()` function outside of the class creation context will result in error. Most\n * notably, calls to `inject()` are disallowed after a class instance was created, in methods\n * (including lifecycle hooks):\n *\n * ```ts\n * @Component({ ... })\n * export class CarComponent {\n * ngOnInit() {\n * // ERROR: too late, the component instance was already created\n * const engine = inject(Engine);\n * engine.start();\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport function inject<T>(\n token: ProviderToken<T> | HostAttributeToken,\n flags: InjectFlags | InjectOptions = InjectFlags.Default,\n) {\n // The `as any` here _shouldn't_ be necessary, but without it JSCompiler\n // throws a disambiguation error due to the multiple signatures.\n return ɵɵinject(token as any, convertToBitFlags(flags));\n}\n\n// Converts object-based DI flags (`InjectOptions`) to bit flags (`InjectFlags`).\nexport function convertToBitFlags(\n flags: InjectOptions | InjectFlags | undefined,\n): InjectFlags | undefined {\n if (typeof flags === 'undefined' || typeof flags === 'number') {\n return flags;\n }\n\n // While TypeScript doesn't accept it without a cast, bitwise OR with false-y values in\n // JavaScript is a no-op. We can use that for a very codesize-efficient conversion from\n // `InjectOptions` to `InjectFlags`.\n return (InternalInjectFlags.Default | // comment to force a line break in the formatter\n ((flags.optional && InternalInjectFlags.Optional) as number) |\n ((flags.host && InternalInjectFlags.Host) as number) |\n ((flags.self && InternalInjectFlags.Self) as number) |\n ((flags.skipSelf && InternalInjectFlags.SkipSelf) as number)) as InjectFlags;\n}\n\nexport function injectArgs(types: (ProviderToken<any> | any[])[]): any[] {\n const args: any[] = [];\n for (let i = 0; i < types.length; i++) {\n const arg = resolveForwardRef(types[i]);\n if (Array.isArray(arg)) {\n if (arg.length === 0) {\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_DIFFER_INPUT,\n ngDevMode && 'Arguments array must have arguments.',\n );\n }\n let type: Type<any> | undefined = undefined;\n let flags: InjectFlags = InjectFlags.Default;\n\n for (let j = 0; j < arg.length; j++) {\n const meta = arg[j];\n const flag = getInjectFlag(meta);\n if (typeof flag === 'number') {\n // Special case when we handle @Inject decorator.\n if (flag === DecoratorFlags.Inject) {\n type = meta.token;\n } else {\n flags |= flag;\n }\n } else {\n type = meta;\n }\n }\n\n args.push(ɵɵinject(type!, flags));\n } else {\n args.push(ɵɵinject(arg));\n }\n }\n return args;\n}\n\n/**\n * Attaches a given InjectFlag to a given decorator using monkey-patching.\n * Since DI decorators can be used in providers `deps` array (when provider is configured using\n * `useFactory`) without initialization (e.g. `Host`) and as an instance (e.g. `new Host()`), we\n * attach the flag to make it available both as a static property and as a field on decorator\n * instance.\n *\n * @param decorator Provided DI decorator.\n * @param flag InjectFlag that should be applied.\n */\nexport function attachInjectFlag(decorator: any, flag: InternalInjectFlags | DecoratorFlags): any {\n decorator[DI_DECORATOR_FLAG] = flag;\n decorator.prototype[DI_DECORATOR_FLAG] = flag;\n return decorator;\n}\n\n/**\n * Reads monkey-patched property that contains InjectFlag attached to a decorator.\n *\n * @param token Token that may contain monkey-patched DI flags property.\n */\nexport function getInjectFlag(token: any): number | undefined {\n return token[DI_DECORATOR_FLAG];\n}\n\nexport function catchInjectorError(\n e: any,\n token: any,\n injectorErrorName: string,\n source: string | null,\n): never {\n const tokenPath: any[] = e[NG_TEMP_TOKEN_PATH];\n if (token[SOURCE]) {\n tokenPath.unshift(token[SOURCE]);\n }\n e.message = formatError('\\n' + e.message, tokenPath, injectorErrorName, source);\n e[NG_TOKEN_PATH] = tokenPath;\n e[NG_TEMP_TOKEN_PATH] = null;\n throw e;\n}\n\nexport function formatError(\n text: string,\n obj: any,\n injectorErrorName: string,\n source: string | null = null,\n): string {\n text = text && text.charAt(0) === '\\n' && text.charAt(1) == NO_NEW_LINE ? text.slice(2) : text;\n let context = stringify(obj);\n if (Array.isArray(obj)) {\n context = obj.map(stringify).join(' -> ');\n } else if (typeof obj === 'object') {\n let parts = <string[]>[];\n for (let key in obj) {\n if (obj.hasOwnProperty(key)) {\n let value = obj[key];\n parts.push(\n key + ':' + (typeof value === 'string' ? JSON.stringify(value) : stringify(value)),\n );\n }\n }\n context = `{${parts.join(', ')}}`;\n }\n return `${injectorErrorName}${source ? '(' + source + ')' : ''}[${context}]: ${text.replace(\n NEW_LINE,\n '\\n ',\n )}`;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {makeParamDecorator} from '../util/decorators';\n\nimport {attachInjectFlag} from './injector_compatibility';\nimport {DecoratorFlags, InternalInjectFlags} from './interface/injector';\n\n/**\n * Type of the Inject decorator / constructor function.\n *\n * @publicApi\n */\nexport interface InjectDecorator {\n /**\n * Parameter decorator on a dependency parameter of a class constructor\n * that specifies a custom provider of the dependency.\n *\n * @usageNotes\n * The following example shows a class constructor that specifies a\n * custom provider of a dependency using the parameter decorator.\n *\n * When `@Inject()` is not present, the injector uses the type annotation of the\n * parameter as the provider.\n *\n * {@example core/di/ts/metadata_spec.ts region='InjectWithoutDecorator'}\n *\n * @see [Dependency Injection Guide](guide/di/dependency-injection\n *\n */\n (token: any): any;\n new (token: any): Inject;\n}\n\n/**\n * Type of the Inject metadata.\n *\n * @publicApi\n */\nexport interface Inject {\n /**\n * A DI token that maps to the dependency to be injected.\n */\n token: any;\n}\n\n/**\n * Inject decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const Inject: InjectDecorator = attachInjectFlag(\n // Disable tslint because `DecoratorFlags` is a const enum which gets inlined.\n makeParamDecorator('Inject', (token: any) => ({token})),\n // tslint:disable-next-line: no-toplevel-property-access\n DecoratorFlags.Inject,\n);\n\n/**\n * Type of the Optional decorator / constructor function.\n *\n * @publicApi\n */\nexport interface OptionalDecorator {\n /**\n * Parameter decorator to be used on constructor parameters,\n * which marks the parameter as being an optional dependency.\n * The DI framework provides `null` if the dependency is not found.\n *\n * Can be used together with other parameter decorators\n * that modify how dependency injection operates.\n *\n * @usageNotes\n *\n * The following code allows the possibility of a `null` result:\n *\n * {@example core/di/ts/metadata_spec.ts region='Optional'}\n *\n * @see [Dependency Injection Guide](guide/di/dependency-injection.\n */\n (): any;\n new (): Optional;\n}\n\n/**\n * Type of the Optional metadata.\n *\n * @publicApi\n */\nexport interface Optional {}\n\n/**\n * Optional decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const Optional: OptionalDecorator =\n // Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n // tslint:disable-next-line: no-toplevel-property-access\n attachInjectFlag(makeParamDecorator('Optional'), InternalInjectFlags.Optional);\n\n/**\n * Type of the Self decorator / constructor function.\n *\n * @publicApi\n */\nexport interface SelfDecorator {\n /**\n * Parameter decorator to be used on constructor parameters,\n * which tells the DI framework to start dependency resolution from the local injector.\n *\n * Resolution works upward through the injector hierarchy, so the children\n * of this class must configure their own providers or be prepared for a `null` result.\n *\n * @usageNotes\n *\n * In the following example, the dependency can be resolved\n * by the local injector when instantiating the class itself, but not\n * when instantiating a child.\n *\n * {@example core/di/ts/metadata_spec.ts region='Self'}\n *\n * @see {@link SkipSelf}\n * @see {@link Optional}\n *\n */\n (): any;\n new (): Self;\n}\n\n/**\n * Type of the Self metadata.\n *\n * @publicApi\n */\nexport interface Self {}\n\n/**\n * Self decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const Self: SelfDecorator =\n // Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n // tslint:disable-next-line: no-toplevel-property-access\n attachInjectFlag(makeParamDecorator('Self'), InternalInjectFlags.Self);\n\n/**\n * Type of the `SkipSelf` decorator / constructor function.\n *\n * @publicApi\n */\nexport interface SkipSelfDecorator {\n /**\n * Parameter decorator to be used on constructor parameters,\n * which tells the DI framework to start dependency resolution from the parent injector.\n * Resolution works upward through the injector hierarchy, so the local injector\n * is not checked for a provider.\n *\n * @usageNotes\n *\n * In the following example, the dependency can be resolved when\n * instantiating a child, but not when instantiating the class itself.\n *\n * {@example core/di/ts/metadata_spec.ts region='SkipSelf'}\n *\n * @see [Dependency Injection guide](guide/di/di-in-action#skip).\n * @see {@link Self}\n * @see {@link Optional}\n *\n */\n (): any;\n new (): SkipSelf;\n}\n\n/**\n * Type of the `SkipSelf` metadata.\n *\n * @publicApi\n */\nexport interface SkipSelf {}\n\n/**\n * `SkipSelf` decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const SkipSelf: SkipSelfDecorator =\n // Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n // tslint:disable-next-line: no-toplevel-property-access\n attachInjectFlag(makeParamDecorator('SkipSelf'), InternalInjectFlags.SkipSelf);\n\n/**\n * Type of the `Host` decorator / constructor function.\n *\n * @publicApi\n */\nexport interface HostDecorator {\n /**\n * Parameter decorator on a view-provider parameter of a class constructor\n * that tells the DI framework to resolve the view by checking injectors of child\n * elements, and stop when reaching the host element of the current component.\n *\n * @usageNotes\n *\n * The following shows use with the `@Optional` decorator, and allows for a `null` result.\n *\n * {@example core/di/ts/metadata_spec.ts region='Host'}\n *\n * For an extended example, see [\"Dependency Injection\n * Guide\"](guide/di/di-in-action#optional).\n */\n (): any;\n new (): Host;\n}\n\n/**\n * Type of the Host metadata.\n *\n * @publicApi\n */\nexport interface Host {}\n\n/**\n * Host decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const Host: HostDecorator =\n // Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n // tslint:disable-next-line: no-toplevel-property-access\n attachInjectFlag(makeParamDecorator('Host'), InternalInjectFlags.Host);\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Type} from '../interface/type';\nimport {stringify} from '../util/stringify';\nimport {NG_FACTORY_DEF} from './fields';\n\n/**\n * Definition of what a factory function should look like.\n */\nexport type FactoryFn<T> = {\n /**\n * Subclasses without an explicit constructor call through to the factory of their base\n * definition, providing it with their own constructor to instantiate.\n */\n <U extends T>(t?: Type<U>): U;\n\n /**\n * If no constructor to instantiate is provided, an instance of type T itself is created.\n */\n (t?: undefined): T;\n};\n\nexport function getFactoryDef<T>(type: any, throwNotFound: true): FactoryFn<T>;\nexport function getFactoryDef<T>(type: any): FactoryFn<T> | null;\nexport function getFactoryDef<T>(type: any, throwNotFound?: boolean): FactoryFn<T> | null {\n const hasFactoryDef = type.hasOwnProperty(NG_FACTORY_DEF);\n if (!hasFactoryDef && throwNotFound === true && ngDevMode) {\n throw new Error(`Type ${stringify(type)} does not have 'ɵfac' property.`);\n }\n return hasFactoryDef ? type[NG_FACTORY_DEF] : null;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {assertEqual, assertLessThanOrEqual} from './assert';\n\n/**\n * Determines if the contents of two arrays is identical\n *\n * @param a first array\n * @param b second array\n * @param identityAccessor Optional function for extracting stable object identity from a value in\n * the array.\n */\nexport function arrayEquals<T>(a: T[], b: T[], identityAccessor?: (value: T) => unknown): boolean {\n if (a.length !== b.length) return false;\n for (let i = 0; i < a.length; i++) {\n let valueA = a[i];\n let valueB = b[i];\n if (identityAccessor) {\n valueA = identityAccessor(valueA) as any;\n valueB = identityAccessor(valueB) as any;\n }\n if (valueB !== valueA) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * Flattens an array.\n */\nexport function flatten(list: any[]): any[] {\n return list.flat(Number.POSITIVE_INFINITY);\n}\n\nexport function deepForEach<T>(input: (T | any[])[], fn: (value: T) => void): void {\n input.forEach((value) => (Array.isArray(value) ? deepForEach(value, fn) : fn(value)));\n}\n\nexport function addToArray(arr: any[], index: number, value: any): void {\n // perf: array.push is faster than array.splice!\n if (index >= arr.length) {\n arr.push(value);\n } else {\n arr.splice(index, 0, value);\n }\n}\n\nexport function removeFromArray(arr: any[], index: number): any {\n // perf: array.pop is faster than array.splice!\n if (index >= arr.length - 1) {\n return arr.pop();\n } else {\n return arr.splice(index, 1)[0];\n }\n}\n\nexport function newArray<T = any>(size: number): T[];\nexport function newArray<T>(size: number, value: T): T[];\nexport function newArray<T>(size: number, value?: T): T[] {\n const list: T[] = [];\n for (let i = 0; i < size; i++) {\n list.push(value!);\n }\n return list;\n}\n\n/**\n * Remove item from array (Same as `Array.splice()` but faster.)\n *\n * `Array.splice()` is not as fast because it has to allocate an array for the elements which were\n * removed. This causes memory pressure and slows down code when most of the time we don't\n * care about the deleted items array.\n *\n * https://jsperf.com/fast-array-splice (About 20x faster)\n *\n * @param array Array to splice\n * @param index Index of element in array to remove.\n * @param count Number of items to remove.\n */\nexport function arraySplice(array: any[], index: number, count: number): void {\n const length = array.length - count;\n while (index < length) {\n array[index] = array[index + count];\n index++;\n }\n while (count--) {\n array.pop(); // shrink the array\n }\n}\n\n/**\n * Same as `Array.splice(index, 0, value)` but faster.\n *\n * `Array.splice()` is not fast because it has to allocate an array for the elements which were\n * removed. This causes memory pressure and slows down code when most of the time we don't\n * care about the deleted items array.\n *\n * @param array Array to splice.\n * @param index Index in array where the `value` should be added.\n * @param value Value to add to array.\n */\nexport function arrayInsert(array: any[], index: number, value: any): void {\n ngDevMode && assertLessThanOrEqual(index, array.length, \"Can't insert past array end.\");\n let end = array.length;\n while (end > index) {\n const previousEnd = end - 1;\n array[end] = array[previousEnd];\n end = previousEnd;\n }\n array[index] = value;\n}\n\n/**\n * Same as `Array.splice2(index, 0, value1, value2)` but faster.\n *\n * `Array.splice()` is not fast because it has to allocate an array for the elements which were\n * removed. This causes memory pressure and slows down code when most of the time we don't\n * care about the deleted items array.\n *\n * @param array Array to splice.\n * @param index Index in array where the `value` should be added.\n * @param value1 Value to add to array.\n * @param value2 Value to add to array.\n */\nexport function arrayInsert2(array: any[], index: number, value1: any, value2: any): void {\n ngDevMode && assertLessThanOrEqual(index, array.length, \"Can't insert past array end.\");\n let end = array.length;\n if (end == index) {\n // inserting at the end.\n array.push(value1, value2);\n } else if (end === 1) {\n // corner case when we have less items in array than we have items to insert.\n array.push(value2, array[0]);\n array[0] = value1;\n } else {\n end--;\n array.push(array[end - 1], array[end]);\n while (end > index) {\n const previousEnd = end - 2;\n array[end] = array[previousEnd];\n end--;\n }\n array[index] = value1;\n array[index + 1] = value2;\n }\n}\n\n/**\n * Get an index of an `value` in a sorted `array`.\n *\n * NOTE:\n * - This uses binary search algorithm for fast removals.\n *\n * @param array A sorted array to binary search.\n * @param value The value to look for.\n * @returns index of the value.\n * - positive index if value found.\n * - negative index if value not found. (`~index` to get the value where it should have been\n * located)\n */\nexport function arrayIndexOfSorted(array: string[], value: string): number {\n return _arrayIndexOfSorted(array, value, 0);\n}\n\n/**\n * `KeyValueArray` is an array where even positions contain keys and odd positions contain values.\n *\n * `KeyValueArray` provides a very efficient way of iterating over its contents. For small\n * sets (~10) the cost of binary searching an `KeyValueArray` has about the same performance\n * characteristics that of a `Map` with significantly better memory footprint.\n *\n * If used as a `Map` the keys are stored in alphabetical order so that they can be binary searched\n * for retrieval.\n *\n * See: `keyValueArraySet`, `keyValueArrayGet`, `keyValueArrayIndexOf`, `keyValueArrayDelete`.\n */\nexport interface KeyValueArray<VALUE> extends Array<VALUE | string> {\n __brand__: 'array-map';\n}\n\n/**\n * Set a `value` for a `key`.\n *\n * @param keyValueArray to modify.\n * @param key The key to locate or create.\n * @param value The value to set for a `key`.\n * @returns index (always even) of where the value vas set.\n */\nexport function keyValueArraySet<V>(\n keyValueArray: KeyValueArray<V>,\n key: string,\n value: V,\n): number {\n let index = keyValueArrayIndexOf(keyValueArray, key);\n if (index >= 0) {\n // if we found it set it.\n keyValueArray[index | 1] = value;\n } else {\n index = ~index;\n arrayInsert2(keyValueArray, index, key, value);\n }\n return index;\n}\n\n/**\n * Retrieve a `value` for a `key` (on `undefined` if not found.)\n *\n * @param keyValueArray to search.\n * @param key The key to locate.\n * @return The `value` stored at the `key` location or `undefined if not found.\n */\nexport function keyValueArrayGet<V>(keyValueArray: KeyValueArray<V>, key: string): V | undefined {\n const index = keyValueArrayIndexOf(keyValueArray, key);\n if (index >= 0) {\n // if we found it retrieve it.\n return keyValueArray[index | 1] as V;\n }\n return undefined;\n}\n\n/**\n * Retrieve a `key` index value in the array or `-1` if not found.\n *\n * @param keyValueArray to search.\n * @param key The key to locate.\n * @returns index of where the key is (or should have been.)\n * - positive (even) index if key found.\n * - negative index if key not found. (`~index` (even) to get the index where it should have\n * been inserted.)\n */\nexport function keyValueArrayIndexOf<V>(keyValueArray: KeyValueArray<V>, key: string): number {\n return _arrayIndexOfSorted(keyValueArray as string[], key, 1);\n}\n\n/**\n * Delete a `key` (and `value`) from the `KeyValueArray`.\n *\n * @param keyValueArray to modify.\n * @param key The key to locate or delete (if exist).\n * @returns index of where the key was (or should have been.)\n * - positive (even) index if key found and deleted.\n * - negative index if key not found. (`~index` (even) to get the index where it should have\n * been.)\n */\nexport function keyValueArrayDelete<V>(keyValueArray: KeyValueArray<V>, key: string): number {\n const index = keyValueArrayIndexOf(keyValueArray, key);\n if (index >= 0) {\n // if we found it remove it.\n arraySplice(keyValueArray, index, 2);\n }\n return index;\n}\n\n/**\n * INTERNAL: Get an index of an `value` in a sorted `array` by grouping search by `shift`.\n *\n * NOTE:\n * - This uses binary search algorithm for fast removals.\n *\n * @param array A sorted array to binary search.\n * @param value The value to look for.\n * @param shift grouping shift.\n * - `0` means look at every location\n * - `1` means only look at every other (even) location (the odd locations are to be ignored as\n * they are values.)\n * @returns index of the value.\n * - positive index if value found.\n * - negative index if value not found. (`~index` to get the value where it should have been\n * inserted)\n */\nfunction _arrayIndexOfSorted(array: string[], value: string, shift: number): number {\n ngDevMode && assertEqual(Array.isArray(array), true, 'Expecting an array');\n let start = 0;\n let end = array.length >> shift;\n while (end !== start) {\n const middle = start + ((end - start) >> 1); // find the middle.\n const current = array[middle << shift];\n if (value === current) {\n return middle << shift;\n } else if (current > value) {\n end = middle;\n } else {\n start = middle + 1; // We already searched middle so make it non-inclusive by adding 1\n }\n }\n return ~(end << shift);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport {initNgDevMode} from './ng_dev_mode';\n\n/**\n * This file contains reuseable \"empty\" symbols that can be used as default return values\n * in different parts of the rendering code. Because the same symbols are returned, this\n * allows for identity checks against these values to be consistently used by the framework\n * code.\n */\n\nexport const EMPTY_OBJ: never = {} as never;\nexport const EMPTY_ARRAY: any[] = [];\n\n// freezing the values prevents any code from accidentally inserting new values in\nif ((typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode()) {\n // These property accesses can be ignored because ngDevMode will be set to false\n // when optimizing code and the whole if statement will be dropped.\n // tslint:disable-next-line:no-toplevel-property-access\n Object.freeze(EMPTY_OBJ);\n // tslint:disable-next-line:no-toplevel-property-access\n Object.freeze(EMPTY_ARRAY);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {InjectionToken} from './injection_token';\n\n/**\n * A multi-provider token for initialization functions that will run upon construction of an\n * environment injector.\n *\n * @deprecated from v19.0.0, use provideEnvironmentInitializer instead\n *\n * @see {@link provideEnvironmentInitializer}\n *\n * Note: As opposed to the `APP_INITIALIZER` token, the `ENVIRONMENT_INITIALIZER` functions are not awaited,\n * hence they should not be `async`.\n *\n * @publicApi\n */\nexport const ENVIRONMENT_INITIALIZER = new InjectionToken<ReadonlyArray<() => void>>(\n ngDevMode ? 'ENVIRONMENT_INITIALIZER' : '',\n);\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {InjectionToken} from './injection_token';\nimport type {Injector} from './injector';\nimport {InjectorMarkers} from './injector_marker';\n\n/**\n * An InjectionToken that gets the current `Injector` for `createInjector()`-style injectors.\n *\n * Requesting this token instead of `Injector` allows `StaticInjector` to be tree-shaken from a\n * project.\n *\n * @publicApi\n */\nexport const INJECTOR = new InjectionToken<Injector>(\n ngDevMode ? 'INJECTOR' : '',\n // Disable tslint because this is const enum which gets inlined not top level prop access.\n // tslint:disable-next-line: no-toplevel-property-access\n InjectorMarkers.Injector as any, // Special value used by Ivy to identify `Injector`.\n);\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Type} from '../interface/type';\n\nimport {InjectionToken} from './injection_token';\n\nexport const INJECTOR_DEF_TYPES = new InjectionToken<ReadonlyArray<Type<unknown>>>(\n ngDevMode ? 'INJECTOR_DEF_TYPES' : '',\n);\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {stringify} from '../util/stringify';\nimport type {Injector} from './injector';\nimport {THROW_IF_NOT_FOUND} from './injector_compatibility';\n\nexport class NullInjector implements Injector {\n get(token: any, notFoundValue: any = THROW_IF_NOT_FOUND): any {\n if (notFoundValue === THROW_IF_NOT_FOUND) {\n const error = new Error(`NullInjectorError: No provider for ${stringify(token)}!`);\n error.name = 'NullInjectorError';\n throw error;\n }\n return notFoundValue;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Type} from '../interface/type';\nimport type {NgModuleDef} from '../r3_symbols';\nimport {stringify} from '../util/stringify';\nimport {NG_COMP_DEF, NG_DIR_DEF, NG_MOD_DEF, NG_PIPE_DEF} from './fields';\nimport type {ComponentDef, DirectiveDef, PipeDef} from './interfaces/definition';\n\nexport function getNgModuleDef<T>(type: any, throwNotFound: true): NgModuleDef<T>;\nexport function getNgModuleDef<T>(type: any): NgModuleDef<T> | null;\nexport function getNgModuleDef<T>(type: any, throwNotFound?: boolean): NgModuleDef<T> | null {\n const ngModuleDef = type[NG_MOD_DEF] || null;\n if (!ngModuleDef && throwNotFound === true) {\n throw new Error(`Type ${stringify(type)} does not have 'ɵmod' property.`);\n }\n return ngModuleDef;\n}\n\n/**\n * The following getter methods retrieve the definition from the type. Currently the retrieval\n * honors inheritance, but in the future we may change the rule to require that definitions are\n * explicit. This would require some sort of migration strategy.\n */\n\nexport function getComponentDef<T>(type: any): ComponentDef<T> | null {\n return type[NG_COMP_DEF] || null;\n}\n\nexport function getDirectiveDef<T>(type: any): DirectiveDef<T> | null {\n return type[NG_DIR_DEF] || null;\n}\n\nexport function getPipeDef<T>(type: any): PipeDef<T> | null {\n return type[NG_PIPE_DEF] || null;\n}\n\n/**\n * Checks whether a given Component, Directive or Pipe is marked as standalone.\n * This will return false if passed anything other than a Component, Directive, or Pipe class\n * See [this guide](guide/components/importing) for additional information:\n *\n * @param type A reference to a Component, Directive or Pipe.\n * @publicApi\n */\nexport function isStandalone(type: Type<unknown>): boolean {\n const def = getComponentDef(type) || getDirectiveDef(type) || getPipeDef(type);\n return def !== null && def.standalone;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {RuntimeError, RuntimeErrorCode} from '../errors';\nimport {Type} from '../interface/type';\nimport {getComponentDef} from '../render3/def_getters';\nimport {getFactoryDef} from '../render3/definition_factory';\nimport {throwCyclicDependencyError, throwInvalidProviderError} from '../render3/errors_di';\nimport {stringifyForError} from '../render3/util/stringify_utils';\nimport {deepForEach} from '../util/array_utils';\nimport {EMPTY_ARRAY} from '../util/empty';\nimport {getClosureSafeProperty} from '../util/property';\nimport {stringify} from '../util/stringify';\n\nimport {resolveForwardRef} from './forward_ref';\nimport {ENVIRONMENT_INITIALIZER} from './initializer_token';\nimport {ɵɵinject as inject} from './injector_compatibility';\nimport {getInjectorDef, InjectorType, InjectorTypeWithProviders} from './interface/defs';\nimport {\n ClassProvider,\n ConstructorProvider,\n EnvironmentProviders,\n ExistingProvider,\n FactoryProvider,\n InternalEnvironmentProviders,\n isEnvironmentProviders,\n ModuleWithProviders,\n Provider,\n StaticClassProvider,\n TypeProvider,\n ValueProvider,\n} from './interface/provider';\nimport {INJECTOR_DEF_TYPES} from './internal_tokens';\n\n/**\n * Wrap an array of `Provider`s into `EnvironmentProviders`, preventing them from being accidentally\n * referenced in `@Component` in a component injector.\n *\n * @publicApi\n */\nexport function makeEnvironmentProviders(\n providers: (Provider | EnvironmentProviders)[],\n): EnvironmentProviders {\n return {\n ɵproviders: providers,\n } as unknown as EnvironmentProviders;\n}\n\n/**\n * @description\n * This function is used to provide initialization functions that will be executed upon construction\n * of an environment injector.\n *\n * Note that the provided initializer is run in the injection context.\n *\n * Previously, this was achieved using the `ENVIRONMENT_INITIALIZER` token which is now deprecated.\n *\n * @see {@link ENVIRONMENT_INITIALIZER}\n *\n * @usageNotes\n * The following example illustrates how to configure an initialization function using\n * `provideEnvironmentInitializer()`\n * ```ts\n * createEnvironmentInjector(\n * [\n * provideEnvironmentInitializer(() => {\n * console.log('environment initialized');\n * }),\n * ],\n * parentInjector\n * );\n * ```\n *\n * @publicApi\n */\nexport function provideEnvironmentInitializer(initializerFn: () => void): EnvironmentProviders {\n return makeEnvironmentProviders([\n {\n provide: ENVIRONMENT_INITIALIZER,\n multi: true,\n useValue: initializerFn,\n },\n ]);\n}\n\n/**\n * A source of providers for the `importProvidersFrom` function.\n *\n * @publicApi\n */\nexport type ImportProvidersSource =\n | Type<unknown>\n | ModuleWithProviders<unknown>\n | Array<ImportProvidersSource>;\n\ntype WalkProviderTreeVisitor = (\n provider: SingleProvider,\n container: Type<unknown> | InjectorType<unknown>,\n) => void;\n\n/**\n * Collects providers from all NgModules and standalone components, including transitively imported\n * ones.\n *\n * Providers extracted via `importProvidersFrom` are only usable in an application injector or\n * another environment injector (such as a route injector). They should not be used in component\n * providers.\n *\n * More information about standalone components can be found in [this\n * guide](guide/components/importing).\n *\n * @usageNotes\n * The results of the `importProvidersFrom` call can be used in the `bootstrapApplication` call:\n *\n * ```ts\n * await bootstrapApplication(RootComponent, {\n * providers: [\n * importProvidersFrom(NgModuleOne, NgModuleTwo)\n * ]\n * });\n * ```\n *\n * You can also use the `importProvidersFrom` results in the `providers` field of a route, when a\n * standalone component is used:\n *\n * ```ts\n * export const ROUTES: Route[] = [\n * {\n * path: 'foo',\n * providers: [\n * importProvidersFrom(NgModuleOne, NgModuleTwo)\n * ],\n * component: YourStandaloneComponent\n * }\n * ];\n * ```\n *\n * @returns Collected providers from the specified list of types.\n * @publicApi\n */\nexport function importProvidersFrom(...sources: ImportProvidersSource[]): EnvironmentProviders {\n return {\n ɵproviders: internalImportProvidersFrom(true, sources),\n ɵfromNgModule: true,\n } as InternalEnvironmentProviders;\n}\n\nexport function internalImportProvidersFrom(\n checkForStandaloneCmp: boolean,\n ...sources: ImportProvidersSource[]\n): Provider[] {\n const providersOut: SingleProvider[] = [];\n const dedup = new Set<Type<unknown>>(); // already seen types\n let injectorTypesWithProviders: InjectorTypeWithProviders<unknown>[] | undefined;\n\n const collectProviders: WalkProviderTreeVisitor = (provider) => {\n providersOut.push(provider);\n };\n\n deepForEach(sources, (source) => {\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && checkForStandaloneCmp) {\n const cmpDef = getComponentDef(source);\n if (cmpDef?.standalone) {\n throw new RuntimeError(\n RuntimeErrorCode.IMPORT_PROVIDERS_FROM_STANDALONE,\n `Importing providers supports NgModule or ModuleWithProviders but got a standalone component \"${stringifyForError(\n source,\n )}\"`,\n );\n }\n }\n\n // Narrow `source` to access the internal type analogue for `ModuleWithProviders`.\n const internalSource = source as Type<unknown> | InjectorTypeWithProviders<unknown>;\n if (walkProviderTree(internalSource, collectProviders, [], dedup)) {\n injectorTypesWithProviders ||= [];\n injectorTypesWithProviders.push(internalSource);\n }\n });\n // Collect all providers from `ModuleWithProviders` types.\n if (injectorTypesWithProviders !== undefined) {\n processInjectorTypesWithProviders(injectorTypesWithProviders, collectProviders);\n }\n\n return providersOut;\n}\n\n/**\n * Collects all providers from the list of `ModuleWithProviders` and appends them to the provided\n * array.\n */\nfunction processInjectorTypesWithProviders(\n typesWithProviders: InjectorTypeWithProviders<unknown>[],\n visitor: WalkProviderTreeVisitor,\n): void {\n for (let i = 0; i < typesWithProviders.length; i++) {\n const {ngModule, providers} = typesWithProviders[i];\n deepForEachProvider(\n providers! as Array<Provider | InternalEnvironmentProviders>,\n (provider) => {\n ngDevMode && validateProvider(provider, providers || EMPTY_ARRAY, ngModule);\n visitor(provider, ngModule);\n },\n );\n }\n}\n\n/**\n * Internal type for a single provider in a deep provider array.\n */\nexport type SingleProvider =\n | TypeProvider\n | ValueProvider\n | ClassProvider\n | ConstructorProvider\n | ExistingProvider\n | FactoryProvider\n | StaticClassProvider;\n\n/**\n * The logic visits an `InjectorType`, an `InjectorTypeWithProviders`, or a standalone\n * `ComponentType`, and all of its transitive providers and collects providers.\n *\n * If an `InjectorTypeWithProviders` that declares providers besides the type is specified,\n * the function will return \"true\" to indicate that the providers of the type definition need\n * to be processed. This allows us to process providers of injector types after all imports of\n * an injector definition are processed. (following View Engine semantics: see FW-1349)\n */\nexport function walkProviderTree(\n container: Type<unknown> | InjectorTypeWithProviders<unknown>,\n visitor: WalkProviderTreeVisitor,\n parents: Type<unknown>[],\n dedup: Set<Type<unknown>>,\n): container is InjectorTypeWithProviders<unknown> {\n container = resolveForwardRef(container);\n if (!container) return false;\n\n // The actual type which had the definition. Usually `container`, but may be an unwrapped type\n // from `InjectorTypeWithProviders`.\n let defType: Type<unknown> | null = null;\n\n let injDef = getInjectorDef(container);\n const cmpDef = !injDef && getComponentDef(container);\n if (!injDef && !cmpDef) {\n // `container` is not an injector type or a component type. It might be:\n // * An `InjectorTypeWithProviders` that wraps an injector type.\n // * A standalone directive or pipe that got pulled in from a standalone component's\n // dependencies.\n // Try to unwrap it as an `InjectorTypeWithProviders` first.\n const ngModule: Type<unknown> | undefined = (container as InjectorTypeWithProviders<any>)\n .ngModule as Type<unknown> | undefined;\n injDef = getInjectorDef(ngModule);\n if (injDef) {\n defType = ngModule!;\n } else {\n // Not a component or injector type, so ignore it.\n return false;\n }\n } else if (cmpDef && !cmpDef.standalone) {\n return false;\n } else {\n defType = container as Type<unknown>;\n }\n\n // Check for circular dependencies.\n if (ngDevMode && parents.indexOf(defType) !== -1) {\n const defName = stringify(defType);\n const path = parents.map(stringify);\n throwCyclicDependencyError(defName, path);\n }\n\n // Check for multiple imports of the same module\n const isDuplicate = dedup.has(defType);\n\n if (cmpDef) {\n if (isDuplicate) {\n // This component definition has already been processed.\n return false;\n }\n dedup.add(defType);\n\n if (cmpDef.dependencies) {\n const deps =\n typeof cmpDef.dependencies === 'function' ? cmpDef.dependencies() : cmpDef.dependencies;\n for (const dep of deps) {\n walkProviderTree(dep, visitor, parents, dedup);\n }\n }\n } else if (injDef) {\n // First, include providers from any imports.\n if (injDef.imports != null && !isDuplicate) {\n // Before processing defType's imports, add it to the set of parents. This way, if it ends\n // up deeply importing itself, this can be detected.\n ngDevMode && parents.push(defType);\n // Add it to the set of dedups. This way we can detect multiple imports of the same module\n dedup.add(defType);\n\n let importTypesWithProviders: InjectorTypeWithProviders<any>[] | undefined;\n try {\n deepForEach(injDef.imports, (imported) => {\n if (walkProviderTree(imported, visitor, parents, dedup)) {\n importTypesWithProviders ||= [];\n // If the processed import is an injector type with providers, we store it in the\n // list of import types with providers, so that we can process those afterwards.\n importTypesWithProviders.push(imported);\n }\n });\n } finally {\n // Remove it from the parents set when finished.\n ngDevMode && parents.pop();\n }\n\n // Imports which are declared with providers (TypeWithProviders) need to be processed\n // after all imported modules are processed. This is similar to how View Engine\n // processes/merges module imports in the metadata resolver. See: FW-1349.\n if (importTypesWithProviders !== undefined) {\n processInjectorTypesWithProviders(importTypesWithProviders, visitor);\n }\n }\n\n if (!isDuplicate) {\n // Track the InjectorType and add a provider for it.\n // It's important that this is done after the def's imports.\n const factory = getFactoryDef(defType) || (() => new defType!());\n\n // Append extra providers to make more info available for consumers (to retrieve an injector\n // type), as well as internally (to calculate an injection scope correctly and eagerly\n // instantiate a `defType` when an injector is created).\n\n // Provider to create `defType` using its factory.\n visitor({provide: defType, useFactory: factory, deps: EMPTY_ARRAY}, defType);\n\n // Make this `defType` available to an internal logic that calculates injector scope.\n visitor({provide: INJECTOR_DEF_TYPES, useValue: defType, multi: true}, defType);\n\n // Provider to eagerly instantiate `defType` via `INJECTOR_INITIALIZER`.\n visitor(\n {provide: ENVIRONMENT_INITIALIZER, useValue: () => inject(defType!), multi: true},\n defType,\n );\n }\n\n // Next, include providers listed on the definition itself.\n const defProviders = injDef.providers as Array<SingleProvider | InternalEnvironmentProviders>;\n if (defProviders != null && !isDuplicate) {\n const injectorType = container as InjectorType<any>;\n deepForEachProvider(defProviders, (provider) => {\n ngDevMode && validateProvider(provider as SingleProvider, defProviders, injectorType);\n visitor(provider, injectorType);\n });\n }\n } else {\n // Should not happen, but just in case.\n return false;\n }\n\n return (\n defType !== container && (container as InjectorTypeWithProviders<any>).providers !== undefined\n );\n}\n\nfunction validateProvider(\n provider: SingleProvider,\n providers: Array<SingleProvider | InternalEnvironmentProviders>,\n containerType: Type<unknown>,\n): void {\n if (\n isTypeProvider(provider) ||\n isValueProvider(provider) ||\n isFactoryProvider(provider) ||\n isExistingProvider(provider)\n ) {\n return;\n }\n\n // Here we expect the provider to be a `useClass` provider (by elimination).\n const classRef = resolveForwardRef(\n provider && ((provider as StaticClassProvider | ClassProvider).useClass || provider.provide),\n );\n if (!classRef) {\n throwInvalidProviderError(containerType, providers, provider);\n }\n}\n\nfunction deepForEachProvider(\n providers: Array<Provider | InternalEnvironmentProviders>,\n fn: (provider: SingleProvider) => void,\n): void {\n for (let provider of providers) {\n if (isEnvironmentProviders(provider)) {\n provider = provider.ɵproviders;\n }\n if (Array.isArray(provider)) {\n deepForEachProvider(provider, fn);\n } else {\n fn(provider);\n }\n }\n}\n\nexport const USE_VALUE: string = getClosureSafeProperty<ValueProvider>({\n provide: String,\n useValue: getClosureSafeProperty,\n});\n\nexport function isValueProvider(value: SingleProvider): value is ValueProvider {\n return value !== null && typeof value == 'object' && USE_VALUE in value;\n}\n\nexport function isExistingProvider(value: SingleProvider): value is ExistingProvider {\n return !!(value && (value as ExistingProvider).useExisting);\n}\n\nexport function isFactoryProvider(value: SingleProvider): value is FactoryProvider {\n return !!(value && (value as FactoryProvider).useFactory);\n}\n\nexport function isTypeProvider(value: SingleProvider): value is TypeProvider {\n return typeof value === 'function';\n}\n\nexport function isClassProvider(value: SingleProvider): value is ClassProvider {\n return !!(value as StaticClassProvider | ClassProvider).useClass;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {InjectionToken} from './injection_token';\n\nexport type InjectorScope = 'root' | 'platform' | 'environment';\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 */\nexport const INJECTOR_SCOPE = new InjectionToken<InjectorScope | null>(\n ngDevMode ? 'Set Injector scope.' : '',\n);\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport '../util/ng_dev_mode';\n\nimport {RuntimeError, RuntimeErrorCode} from '../errors';\nimport {OnDestroy} from '../interface/lifecycle_hooks';\nimport {Type} from '../interface/type';\nimport {\n emitInstanceCreatedByInjectorEvent,\n emitProviderConfiguredEvent,\n InjectorProfilerContext,\n runInInjectorProfilerContext,\n setInjectorProfilerContext,\n} from '../render3/debug/injector_profiler';\nimport {FactoryFn, getFactoryDef} from '../render3/definition_factory';\nimport {\n throwCyclicDependencyError,\n throwInvalidProviderError,\n throwMixedMultiProviderError,\n} from '../render3/errors_di';\nimport {NG_ENV_ID} from '../render3/fields';\nimport {newArray} from '../util/array_utils';\nimport {EMPTY_ARRAY} from '../util/empty';\nimport {stringify} from '../util/stringify';\n\nimport {resolveForwardRef} from './forward_ref';\nimport {ENVIRONMENT_INITIALIZER} from './initializer_token';\nimport {setInjectImplementation} from './inject_switch';\nimport {InjectionToken} from './injection_token';\nimport type {Injector} from './injector';\nimport {\n catchInjectorError,\n convertToBitFlags,\n injectArgs,\n NG_TEMP_TOKEN_PATH,\n setCurrentInjector,\n THROW_IF_NOT_FOUND,\n ɵɵinject,\n} from './injector_compatibility';\nimport {INJECTOR} from './injector_token';\nimport {\n getInheritedInjectableDef,\n getInjectableDef,\n InjectorType,\n ɵɵInjectableDeclaration,\n} from './interface/defs';\nimport {InjectFlags, InjectOptions} from './interface/injector';\nimport {\n ClassProvider,\n ConstructorProvider,\n EnvironmentProviders,\n InternalEnvironmentProviders,\n isEnvironmentProviders,\n Provider,\n StaticClassProvider,\n TypeProvider,\n} from './interface/provider';\nimport {INJECTOR_DEF_TYPES} from './internal_tokens';\nimport {NullInjector} from './null_injector';\nimport {\n isExistingProvider,\n isFactoryProvider,\n isTypeProvider,\n isValueProvider,\n SingleProvider,\n} from './provider_collection';\nimport {ProviderToken} from './provider_token';\nimport {INJECTOR_SCOPE, InjectorScope} from './scope';\nimport {setActiveConsumer} from '@angular/core/primitives/signals';\nimport {\n Injector as PrimitivesInjector,\n InjectionToken as PrimitivesInjectionToken,\n NOT_FOUND,\n NotFound,\n} from '@angular/core/primitives/di';\n\n/**\n * Marker which indicates that a value has not yet been created from the factory function.\n */\nconst NOT_YET = {};\n\n/**\n * Marker which indicates that the factory function for a token is in the process of being called.\n *\n * If the injector is asked to inject a token with its value set to CIRCULAR, that indicates\n * injection of a dependency has recursively attempted to inject the original token, and there is\n * a circular dependency among the providers.\n */\nconst CIRCULAR = {};\n\n/**\n * A lazily initialized NullInjector.\n */\nlet NULL_INJECTOR: Injector | undefined = undefined;\n\nexport function getNullInjector(): Injector {\n if (NULL_INJECTOR === undefined) {\n NULL_INJECTOR = new NullInjector();\n }\n return NULL_INJECTOR;\n}\n\n/**\n * An entry in the injector which tracks information about the given token, including a possible\n * current value.\n */\ninterface Record<T> {\n factory: ((_: undefined, flags?: InjectFlags) => T) | undefined;\n value: T | {};\n multi: any[] | undefined;\n}\n\n/**\n * An `Injector` that's part of the environment injector hierarchy, which exists outside of the\n * component tree.\n */\nexport abstract class EnvironmentInjector implements Injector {\n /**\n * Retrieves an instance from the injector based on the provided token.\n * @returns The instance from the injector if defined, otherwise the `notFoundValue`.\n * @throws When the `notFoundValue` is `undefined` or `Injector.THROW_IF_NOT_FOUND`.\n */\n abstract get<T>(\n token: ProviderToken<T>,\n notFoundValue: undefined,\n options: InjectOptions & {\n optional?: false;\n },\n ): T;\n /**\n * Retrieves an instance from the injector based on the provided token.\n * @returns The instance from the injector if defined, otherwise the `notFoundValue`.\n * @throws When the `notFoundValue` is `undefined` or `Injector.THROW_IF_NOT_FOUND`.\n */\n abstract get<T>(\n token: ProviderToken<T>,\n notFoundValue: null | undefined,\n options: InjectOptions,\n ): T | null;\n /**\n * Retrieves an instance from the injector based on the provided token.\n * @returns The instance from the injector if defined, otherwise the `notFoundValue`.\n * @throws When the `notFoundValue` is `undefined` or `Injector.THROW_IF_NOT_FOUND`.\n */\n abstract get<T>(token: ProviderToken<T>, notFoundValue?: T, options?: InjectOptions): T;\n /**\n * Retrieves an instance from the injector based on the provided token.\n * @returns The instance from the injector if defined, otherwise the `notFoundValue`.\n * @throws When the `notFoundValue` is `undefined` or `Injector.THROW_IF_NOT_FOUND`.\n * @deprecated use object-based flags (`InjectOptions`) instead.\n */\n abstract get<T>(token: ProviderToken<T>, notFoundValue?: T, flags?: InjectFlags): T;\n /**\n * @deprecated from v4.0.0 use ProviderToken<T>\n * @suppress {duplicate}\n */\n abstract get(token: any, notFoundValue?: any): any;\n\n /**\n * Runs the given function in the context of this `EnvironmentInjector`.\n *\n * Within the function's stack frame, [`inject`](api/core/inject) can be used to inject\n * dependencies from this injector. Note that `inject` is only usable synchronously, and cannot be\n * used in any asynchronous callbacks or after any `await` points.\n *\n * @param fn the closure to be run in the context of this injector\n * @returns the return value of the function, if any\n * @deprecated use the standalone function `runInInjectionContext` instead\n */\n abstract runInContext<ReturnT>(fn: () => ReturnT): ReturnT;\n\n abstract destroy(): void;\n\n /**\n * @internal\n */\n abstract onDestroy(callback: () => void): () => void;\n}\n\nexport class R3Injector extends EnvironmentInjector implements PrimitivesInjector {\n /**\n * Map of tokens to records which contain the instances of those tokens.\n * - `null` value implies that we don't have the record. Used by tree-shakable injectors\n * to prevent further searches.\n */\n private records = new Map<ProviderToken<any>, Record<any> | null>();\n\n /**\n * Set of values instantiated by this injector which contain `ngOnDestroy` lifecycle hooks.\n */\n private _ngOnDestroyHooks = new Set<OnDestroy>();\n\n private _onDestroyHooks: Array<() => void> = [];\n\n /**\n * Flag indicating that this injector was previously destroyed.\n */\n get destroyed(): boolean {\n return this._destroyed;\n }\n private _destroyed = false;\n\n private injectorDefTypes: Set<Type<unknown>>;\n\n constructor(\n providers: Array<Provider | EnvironmentProviders>,\n readonly parent: Injector,\n readonly source: string | null,\n readonly scopes: Set<InjectorScope>,\n ) {\n super();\n // Start off by creating Records for every provider.\n forEachSingleProvider(providers as Array<Provider | InternalEnvironmentProviders>, (provider) =>\n this.processProvider(provider),\n );\n\n // Make sure the INJECTOR token provides this injector.\n this.records.set(INJECTOR, makeRecord(undefined, this));\n\n // And `EnvironmentInjector` if the current injector is supposed to be env-scoped.\n if (scopes.has('environment')) {\n this.records.set(EnvironmentInjector, makeRecord(undefined, this));\n }\n\n // Detect whether this injector has the APP_ROOT_SCOPE token and thus should provide\n // any injectable scoped to APP_ROOT_SCOPE.\n const record = this.records.get(INJECTOR_SCOPE) as Record<InjectorScope | null>;\n if (record != null && typeof record.value === 'string') {\n this.scopes.add(record.value as InjectorScope);\n }\n\n this.injectorDefTypes = new Set(this.get(INJECTOR_DEF_TYPES, EMPTY_ARRAY, InjectFlags.Self));\n }\n\n retrieve<T>(token: PrimitivesInjectionToken<T>, options?: unknown): T | NotFound {\n const ngOptions = options as InjectOptions;\n return this.get(token, ngOptions.optional ? NOT_FOUND : THROW_IF_NOT_FOUND, ngOptions);\n }\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 override destroy(): void {\n assertNotDestroyed(this);\n\n // Set destroyed = true first, in case lifecycle hooks re-enter destroy().\n this._destroyed = true;\n const prevConsumer = setActiveConsumer(null);\n try {\n // Call all the lifecycle hooks.\n for (const service of this._ngOnDestroyHooks) {\n service.ngOnDestroy();\n }\n const onDestroyHooks = this._onDestroyHooks;\n // Reset the _onDestroyHooks array before iterating over it to prevent hooks that unregister\n // themselves from mutating the array during iteration.\n this._onDestroyHooks = [];\n for (const hook of onDestroyHooks) {\n hook();\n }\n } finally {\n // Release all references.\n this.records.clear();\n this._ngOnDestroyHooks.clear();\n this.injectorDefTypes.clear();\n setActiveConsumer(prevConsumer);\n }\n }\n\n override onDestroy(callback: () => void): () => void {\n assertNotDestroyed(this);\n this._onDestroyHooks.push(callback);\n return () => this.removeOnDestroy(callback);\n }\n\n override runInContext<ReturnT>(fn: () => ReturnT): ReturnT {\n assertNotDestroyed(this);\n\n const previousInjector = setCurrentInjector(this);\n const previousInjectImplementation = setInjectImplementation(undefined);\n\n let prevInjectContext: InjectorProfilerContext | undefined;\n if (ngDevMode) {\n prevInjectContext = setInjectorProfilerContext({injector: this, token: null});\n }\n\n try {\n return fn();\n } finally {\n setCurrentInjector(previousInjector);\n setInjectImplementation(previousInjectImplementation);\n ngDevMode && setInjectorProfilerContext(prevInjectContext!);\n }\n }\n\n override get<T>(\n token: ProviderToken<T>,\n notFoundValue: any = THROW_IF_NOT_FOUND,\n flags: InjectFlags | InjectOptions = InjectFlags.Default,\n ): T {\n assertNotDestroyed(this);\n\n if (token.hasOwnProperty(NG_ENV_ID)) {\n return (token as any)[NG_ENV_ID](this);\n }\n\n flags = convertToBitFlags(flags) as InjectFlags;\n\n // Set the injection context.\n let prevInjectContext: InjectorProfilerContext;\n if (ngDevMode) {\n prevInjectContext = setInjectorProfilerContext({injector: this, token: token as Type<T>});\n }\n const previousInjector = setCurrentInjector(this);\n const previousInjectImplementation = setInjectImplementation(undefined);\n try {\n // Check for the SkipSelf flag.\n if (!(flags & InjectFlags.SkipSelf)) {\n // SkipSelf isn't set, check if the record belongs to this injector.\n let record: Record<T> | undefined | null = this.records.get(token);\n if (record === undefined) {\n // No record, but maybe the token is scoped to this injector. Look for an injectable\n // def with a scope matching this injector.\n const def = couldBeInjectableType(token) && getInjectableDef(token);\n if (def && this.injectableDefInScope(def)) {\n // Found an injectable def and it's scoped to this injector. Pretend as if it was here\n // all along.\n\n if (ngDevMode) {\n runInInjectorProfilerContext(this, token as Type<T>, () => {\n emitProviderConfiguredEvent(token as TypeProvider);\n });\n }\n\n record = makeRecord(injectableDefOrInjectorDefFactory(token), NOT_YET);\n } else {\n record = null;\n }\n this.records.set(token, record);\n }\n // If a record was found, get the instance for it and return it.\n if (record != null /* NOT null || undefined */) {\n return this.hydrate(token, record, flags);\n }\n }\n\n // Select the next injector based on the Self flag - if self is set, the next injector is\n // the NullInjector, otherwise it's the parent.\n const nextInjector = !(flags & InjectFlags.Self) ? this.parent : getNullInjector();\n // Set the notFoundValue based on the Optional flag - if optional is set and notFoundValue\n // is undefined, the value is null, otherwise it's the notFoundValue.\n notFoundValue =\n flags & InjectFlags.Optional && notFoundValue === THROW_IF_NOT_FOUND ? null : notFoundValue;\n return nextInjector.get(token, notFoundValue);\n } catch (e: any) {\n if (e.name === 'NullInjectorError') {\n const path: any[] = (e[NG_TEMP_TOKEN_PATH] = e[NG_TEMP_TOKEN_PATH] || []);\n path.unshift(stringify(token));\n if (previousInjector) {\n // We still have a parent injector, keep throwing\n throw e;\n } else {\n // Format & throw the final error message when we don't have any previous injector\n return catchInjectorError(e, token, 'R3InjectorError', this.source);\n }\n } else {\n throw e;\n }\n } finally {\n // Lastly, restore the previous injection context.\n setInjectImplementation(previousInjectImplementation);\n setCurrentInjector(previousInjector);\n ngDevMode && setInjectorProfilerContext(prevInjectContext!);\n }\n }\n\n /** @internal */\n resolveInjectorInitializers() {\n const prevConsumer = setActiveConsumer(null);\n const previousInjector = setCurrentInjector(this);\n const previousInjectImplementation = setInjectImplementation(undefined);\n let prevInjectContext: InjectorProfilerContext | undefined;\n if (ngDevMode) {\n prevInjectContext = setInjectorProfilerContext({injector: this, token: null});\n }\n\n try {\n const initializers = this.get(ENVIRONMENT_INITIALIZER, EMPTY_ARRAY, InjectFlags.Self);\n if (ngDevMode && !Array.isArray(initializers)) {\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_MULTI_PROVIDER,\n 'Unexpected type of the `ENVIRONMENT_INITIALIZER` token value ' +\n `(expected an array, but got ${typeof initializers}). ` +\n 'Please check that the `ENVIRONMENT_INITIALIZER` token is configured as a ' +\n '`multi: true` provider.',\n );\n }\n for (const initializer of initializers) {\n initializer();\n }\n } finally {\n setCurrentInjector(previousInjector);\n setInjectImplementation(previousInjectImplementation);\n ngDevMode && setInjectorProfilerContext(prevInjectContext!);\n setActiveConsumer(prevConsumer);\n }\n }\n\n override toString() {\n const tokens: string[] = [];\n const records = this.records;\n for (const token of records.keys()) {\n tokens.push(stringify(token));\n }\n return `R3Injector[${tokens.join(', ')}]`;\n }\n\n /**\n * Process a `SingleProvider` and add it.\n */\n private processProvider(provider: SingleProvider): void {\n // Determine the token from the provider. Either it's its own token, or has a {provide: ...}\n // property.\n provider = resolveForwardRef(provider);\n let token: any = isTypeProvider(provider)\n ? provider\n : resolveForwardRef(provider && provider.provide);\n\n // Construct a `Record` for the provider.\n const record = providerToRecord(provider);\n if (ngDevMode) {\n runInInjectorProfilerContext(this, token, () => {\n // Emit InjectorProfilerEventType.Create if provider is a value provider because\n // these are the only providers that do not go through the value hydration logic\n // where this event would normally be emitted from.\n if (isValueProvider(provider)) {\n emitInstanceCreatedByInjectorEvent(provider.useValue);\n }\n\n emitProviderConfiguredEvent(provider);\n });\n }\n\n if (!isTypeProvider(provider) && provider.multi === true) {\n // If the provider indicates that it's a multi-provider, process it specially.\n // First check whether it's been defined already.\n let multiRecord = this.records.get(token);\n if (multiRecord) {\n // It has. Throw a nice error if\n if (ngDevMode && multiRecord.multi === undefined) {\n throwMixedMultiProviderError();\n }\n } else {\n multiRecord = makeRecord(undefined, NOT_YET, true);\n multiRecord.factory = () => injectArgs(multiRecord!.multi!);\n this.records.set(token, multiRecord);\n }\n token = provider;\n multiRecord.multi!.push(provider);\n } else {\n if (ngDevMode) {\n const existing = this.records.get(token);\n if (existing && existing.multi !== undefined) {\n throwMixedMultiProviderError();\n }\n }\n }\n this.records.set(token, record);\n }\n\n private hydrate<T>(token: ProviderToken<T>, record: Record<T>, flags: InjectFlags): T {\n const prevConsumer = setActiveConsumer(null);\n try {\n if (record.value === CIRCULAR) {\n throwCyclicDependencyError(stringify(token));\n } else if (record.value === NOT_YET) {\n record.value = CIRCULAR;\n\n if (ngDevMode) {\n runInInjectorProfilerContext(this, token as Type<T>, () => {\n record.value = record.factory!(undefined, flags);\n emitInstanceCreatedByInjectorEvent(record.value);\n });\n } else {\n record.value = record.factory!(undefined, flags);\n }\n }\n if (typeof record.value === 'object' && record.value && hasOnDestroy(record.value)) {\n this._ngOnDestroyHooks.add(record.value);\n }\n return record.value as T;\n } finally {\n setActiveConsumer(prevConsumer);\n }\n }\n\n private injectableDefInScope(def: ɵɵInjectableDeclaration<any>): boolean {\n if (!def.providedIn) {\n return false;\n }\n const providedIn = resolveForwardRef(def.providedIn);\n if (typeof providedIn === 'string') {\n return providedIn === 'any' || this.scopes.has(providedIn);\n } else {\n return this.injectorDefTypes.has(providedIn);\n }\n }\n\n private removeOnDestroy(callback: () => void): void {\n const destroyCBIdx = this._onDestroyHooks.indexOf(callback);\n if (destroyCBIdx !== -1) {\n this._onDestroyHooks.splice(destroyCBIdx, 1);\n }\n }\n}\n\nfunction injectableDefOrInjectorDefFactory(token: ProviderToken<any>): FactoryFn<any> {\n // Most tokens will have an injectable def directly on them, which specifies a factory directly.\n const injectableDef = getInjectableDef(token);\n const factory = injectableDef !== null ? injectableDef.factory : getFactoryDef(token);\n\n if (factory !== null) {\n return factory;\n }\n\n // InjectionTokens should have an injectable def (ɵprov) and thus should be handled above.\n // If it's missing that, it's an error.\n if (token instanceof InjectionToken) {\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_INJECTION_TOKEN,\n ngDevMode && `Token ${stringify(token)} is missing a ɵprov definition.`,\n );\n }\n\n // Undecorated types can sometimes be created if they have no constructor arguments.\n if (token instanceof Function) {\n return getUndecoratedInjectableFactory(token);\n }\n\n // There was no way to resolve a factory for this token.\n throw new RuntimeError(RuntimeErrorCode.INVALID_INJECTION_TOKEN, ngDevMode && 'unreachable');\n}\n\nfunction getUndecoratedInjectableFactory(token: Function) {\n // If the token has parameters then it has dependencies that we cannot resolve implicitly.\n const paramLength = token.length;\n if (paramLength > 0) {\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_INJECTION_TOKEN,\n ngDevMode &&\n `Can't resolve all parameters for ${stringify(token)}: (${newArray(paramLength, '?').join(\n ', ',\n )}).`,\n );\n }\n\n // The constructor function appears to have no parameters.\n // This might be because it inherits from a super-class. In which case, use an injectable\n // def from an ancestor if there is one.\n // Otherwise this really is a simple class with no dependencies, so return a factory that\n // just instantiates the zero-arg constructor.\n const inheritedInjectableDef = getInheritedInjectableDef(token);\n if (inheritedInjectableDef !== null) {\n return () => inheritedInjectableDef.factory(token as Type<any>);\n } else {\n return () => new (token as Type<any>)();\n }\n}\n\nfunction providerToRecord(provider: SingleProvider): Record<any> {\n if (isValueProvider(provider)) {\n return makeRecord(undefined, provider.useValue);\n } else {\n const factory: ((type?: Type<unknown>, flags?: InjectFlags) => any) | undefined =\n providerToFactory(provider);\n return makeRecord(factory, NOT_YET);\n }\n}\n\n/**\n * Converts a `SingleProvider` into a factory function.\n *\n * @param provider provider to convert to factory\n */\nexport function providerToFactory(\n provider: SingleProvider,\n ngModuleType?: InjectorType<any>,\n providers?: any[],\n): (type?: Type<unknown>, flags?: number) => any {\n let factory: ((type?: Type<unknown>, flags?: InjectFlags) => any) | undefined = undefined;\n if (ngDevMode && isEnvironmentProviders(provider)) {\n throwInvalidProviderError(undefined, providers, provider);\n }\n\n if (isTypeProvider(provider)) {\n const unwrappedProvider = resolveForwardRef(provider);\n return getFactoryDef(unwrappedProvider) || injectableDefOrInjectorDefFactory(unwrappedProvider);\n } else {\n if (isValueProvider(provider)) {\n factory = () => resolveForwardRef(provider.useValue);\n } else if (isFactoryProvider(provider)) {\n factory = () => provider.useFactory(...injectArgs(provider.deps || []));\n } else if (isExistingProvider(provider)) {\n factory = (_, flags) =>\n ɵɵinject(\n resolveForwardRef(provider.useExisting),\n flags !== undefined && flags & InjectFlags.Optional ? InjectFlags.Optional : undefined,\n );\n } else {\n const classRef = resolveForwardRef(\n provider &&\n ((provider as StaticClassProvider | ClassProvider).useClass || provider.provide),\n );\n if (ngDevMode && !classRef) {\n throwInvalidProviderError(ngModuleType, providers, provider);\n }\n if (hasDeps(provider)) {\n factory = () => new classRef(...injectArgs(provider.deps));\n } else {\n return getFactoryDef(classRef) || injectableDefOrInjectorDefFactory(classRef);\n }\n }\n }\n return factory;\n}\n\nexport function assertNotDestroyed(injector: R3Injector): void {\n if (injector.destroyed) {\n throw new RuntimeError(\n RuntimeErrorCode.INJECTOR_ALREADY_DESTROYED,\n ngDevMode && 'Injector has already been destroyed.',\n );\n }\n}\n\nfunction makeRecord<T>(\n factory: (() => T) | undefined,\n value: T | {},\n multi: boolean = false,\n): Record<T> {\n return {\n factory: factory,\n value: value,\n multi: multi ? [] : undefined,\n };\n}\n\nfunction hasDeps(\n value: ClassProvider | ConstructorProvider | StaticClassProvider,\n): value is ClassProvider & {deps: any[]} {\n return !!(value as any).deps;\n}\n\nfunction hasOnDestroy(value: any): value is OnDestroy {\n return (\n value !== null &&\n typeof value === 'object' &&\n typeof (value as OnDestroy).ngOnDestroy === 'function'\n );\n}\n\nfunction couldBeInjectableType(value: any): value is ProviderToken<any> {\n return (\n typeof value === 'function' || (typeof value === 'object' && value instanceof InjectionToken)\n );\n}\n\nfunction forEachSingleProvider(\n providers: Array<Provider | EnvironmentProviders>,\n fn: (provider: SingleProvider) => void,\n): void {\n for (const provider of providers) {\n if (Array.isArray(provider)) {\n forEachSingleProvider(provider, fn);\n } else if (provider && isEnvironmentProviders(provider)) {\n forEachSingleProvider(provider.ɵproviders, fn);\n } else {\n fn(provider as SingleProvider);\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {RuntimeError, RuntimeErrorCode} from '../errors';\nimport {\n InjectorProfilerContext,\n setInjectorProfilerContext,\n} from '../render3/debug/injector_profiler';\n\nimport {getInjectImplementation, setInjectImplementation} from './inject_switch';\nimport type {Injector} from './injector';\nimport {getCurrentInjector, setCurrentInjector, RetrievingInjector} from './injector_compatibility';\nimport {assertNotDestroyed, R3Injector} from './r3_injector';\nimport {Injector as PrimitivesInjector} from '@angular/core/primitives/di';\n\n/**\n * Runs the given function in the [context](guide/di/dependency-injection-context) of the given\n * `Injector`.\n *\n * Within the function's stack frame, [`inject`](api/core/inject) can be used to inject dependencies\n * from the given `Injector`. Note that `inject` is only usable synchronously, and cannot be used in\n * any asynchronous callbacks or after any `await` points.\n *\n * @param injector the injector which will satisfy calls to [`inject`](api/core/inject) while `fn`\n * is executing\n * @param fn the closure to be run in the context of `injector`\n * @returns the return value of the function, if any\n * @publicApi\n */\nexport function runInInjectionContext<ReturnT>(injector: Injector, fn: () => ReturnT): ReturnT {\n let internalInjector: PrimitivesInjector;\n if (injector instanceof R3Injector) {\n assertNotDestroyed(injector);\n internalInjector = injector;\n } else {\n internalInjector = new RetrievingInjector(injector);\n }\n\n let prevInjectorProfilerContext: InjectorProfilerContext;\n if (ngDevMode) {\n prevInjectorProfilerContext = setInjectorProfilerContext({injector, token: null});\n }\n const prevInjector = setCurrentInjector(internalInjector);\n const previousInjectImplementation = setInjectImplementation(undefined);\n try {\n return fn();\n } finally {\n setCurrentInjector(prevInjector);\n ngDevMode && setInjectorProfilerContext(prevInjectorProfilerContext!);\n setInjectImplementation(previousInjectImplementation);\n }\n}\n\n/**\n * Whether the current stack frame is inside an injection context.\n */\nexport function isInInjectionContext(): boolean {\n return getInjectImplementation() !== undefined || getCurrentInjector() != null;\n}\n/**\n * Asserts that the current stack frame is within an [injection\n * context](guide/di/dependency-injection-context) and has access to `inject`.\n *\n * @param debugFn a reference to the function making the assertion (used for the error message).\n *\n * @publicApi\n */\nexport function assertInInjectionContext(debugFn: Function): void {\n // Taking a `Function` instead of a string name here prevents the unminified name of the function\n // from being retained in the bundle regardless of minification.\n if (!isInInjectionContext()) {\n throw new RuntimeError(\n RuntimeErrorCode.MISSING_INJECTION_CONTEXT,\n ngDevMode &&\n debugFn.name +\n '() can only be used within an injection context such as a constructor, a factory function, a field initializer, or a function used with `runInInjectionContext`',\n );\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/**\n * A set of interfaces which are shared between `@angular/core` and `@angular/compiler` to allow\n * for late binding of `@angular/compiler` for JIT purposes.\n *\n * This file has two copies. Please ensure that they are in sync:\n * - packages/compiler/src/compiler_facade_interface.ts (main)\n * - packages/core/src/compiler/compiler_facade_interface.ts (replica)\n *\n * Please ensure that the two files are in sync using this command:\n * ```shell\n * cp packages/compiler/src/compiler_facade_interface.ts \\\n * packages/core/src/compiler/compiler_facade_interface.ts\n * ```\n */\n\nexport interface ExportedCompilerFacade {\n ɵcompilerFacade: CompilerFacade;\n}\n\nexport interface CompilerFacade {\n compilePipe(\n angularCoreEnv: CoreEnvironment,\n sourceMapUrl: string,\n meta: R3PipeMetadataFacade,\n ): any;\n compilePipeDeclaration(\n angularCoreEnv: CoreEnvironment,\n sourceMapUrl: string,\n declaration: R3DeclarePipeFacade,\n ): any;\n compileInjectable(\n angularCoreEnv: CoreEnvironment,\n sourceMapUrl: string,\n meta: R3InjectableMetadataFacade,\n ): any;\n compileInjectableDeclaration(\n angularCoreEnv: CoreEnvironment,\n sourceMapUrl: string,\n meta: R3DeclareInjectableFacade,\n ): any;\n compileInjector(\n angularCoreEnv: CoreEnvironment,\n sourceMapUrl: string,\n meta: R3InjectorMetadataFacade,\n ): any;\n compileInjectorDeclaration(\n angularCoreEnv: CoreEnvironment,\n sourceMapUrl: string,\n declaration: R3DeclareInjectorFacade,\n ): any;\n compileNgModule(\n angularCoreEnv: CoreEnvironment,\n sourceMapUrl: string,\n meta: R3NgModuleMetadataFacade,\n ): any;\n compileNgModuleDeclaration(\n angularCoreEnv: CoreEnvironment,\n sourceMapUrl: string,\n declaration: R3DeclareNgModuleFacade,\n ): any;\n compileDirective(\n angularCoreEnv: CoreEnvironment,\n sourceMapUrl: string,\n meta: R3DirectiveMetadataFacade,\n ): any;\n compileDirectiveDeclaration(\n angularCoreEnv: CoreEnvironment,\n sourceMapUrl: string,\n declaration: R3DeclareDirectiveFacade,\n ): any;\n compileComponent(\n angularCoreEnv: CoreEnvironment,\n sourceMapUrl: string,\n meta: R3ComponentMetadataFacade,\n ): any;\n compileComponentDeclaration(\n angularCoreEnv: CoreEnvironment,\n sourceMapUrl: string,\n declaration: R3DeclareComponentFacade,\n ): any;\n compileFactory(\n angularCoreEnv: CoreEnvironment,\n sourceMapUrl: string,\n meta: R3FactoryDefMetadataFacade,\n ): any;\n compileFactoryDeclaration(\n angularCoreEnv: CoreEnvironment,\n sourceMapUrl: string,\n meta: R3DeclareFactoryFacade,\n ): any;\n\n createParseSourceSpan(kind: string, typeName: string, sourceUrl: string): ParseSourceSpan;\n\n FactoryTarget: typeof FactoryTarget;\n // Note that we do not use `{new(): ResourceLoader}` here because\n // the resource loader class is abstract and not constructable.\n ResourceLoader: Function & {prototype: ResourceLoader};\n}\n\nexport interface CoreEnvironment {\n [name: string]: unknown;\n}\n\nexport type ResourceLoader = {\n get(url: string): Promise<string> | string;\n};\n\nexport type Provider = unknown;\nexport type Type = Function;\nexport type OpaqueValue = unknown;\n\nexport enum FactoryTarget {\n Directive = 0,\n Component = 1,\n Injectable = 2,\n Pipe = 3,\n NgModule = 4,\n}\n\nexport interface R3DependencyMetadataFacade {\n token: OpaqueValue;\n attribute: string | null;\n host: boolean;\n optional: boolean;\n self: boolean;\n skipSelf: boolean;\n}\n\nexport interface R3DeclareDependencyMetadataFacade {\n token: OpaqueValue;\n attribute?: boolean;\n host?: boolean;\n optional?: boolean;\n self?: boolean;\n skipSelf?: boolean;\n}\n\nexport interface R3PipeMetadataFacade {\n name: string;\n type: Type;\n pipeName: string;\n pure: boolean;\n isStandalone: boolean;\n}\n\nexport interface R3InjectableMetadataFacade {\n name: string;\n type: Type;\n typeArgumentCount: number;\n providedIn?: Type | 'root' | 'platform' | 'any' | null;\n useClass?: OpaqueValue;\n useFactory?: OpaqueValue;\n useExisting?: OpaqueValue;\n useValue?: OpaqueValue;\n deps?: R3DependencyMetadataFacade[];\n}\n\nexport interface R3NgModuleMetadataFacade {\n type: Type;\n bootstrap: Function[];\n declarations: Function[];\n imports: Function[];\n exports: Function[];\n schemas: {name: string}[] | null;\n id: string | null;\n}\n\nexport interface R3InjectorMetadataFacade {\n name: string;\n type: Type;\n providers: Provider[];\n imports: OpaqueValue[];\n}\n\nexport interface R3HostDirectiveMetadataFacade {\n directive: Type;\n inputs?: string[];\n outputs?: string[];\n}\n\nexport interface R3DirectiveMetadataFacade {\n name: string;\n type: Type;\n typeSourceSpan: ParseSourceSpan;\n selector: string | null;\n queries: R3QueryMetadataFacade[];\n host: {[key: string]: string};\n propMetadata: {[key: string]: OpaqueValue[]};\n lifecycle: {usesOnChanges: boolean};\n inputs: (string | {name: string; alias?: string; required?: boolean})[];\n outputs: string[];\n usesInheritance: boolean;\n exportAs: string[] | null;\n providers: Provider[] | null;\n viewQueries: R3QueryMetadataFacade[];\n isStandalone: boolean;\n isSignal: boolean;\n hostDirectives: R3HostDirectiveMetadataFacade[] | null;\n}\n\nexport interface R3ComponentMetadataFacade extends R3DirectiveMetadataFacade {\n template: string;\n preserveWhitespaces: boolean;\n animations: OpaqueValue[] | undefined;\n declarations: R3TemplateDependencyFacade[];\n styles: string[];\n encapsulation: ViewEncapsulation;\n viewProviders: Provider[] | null;\n interpolation?: [string, string];\n changeDetection?: ChangeDetectionStrategy;\n}\n\n// TODO(legacy-partial-output-inputs): Remove in v18.\n// https://github.com/angular/angular/blob/d4b423690210872b5c32a322a6090beda30b05a3/packages/core/src/compiler/compiler_facade_interface.ts#L197-L199\nexport type LegacyInputPartialMapping =\n | string\n | [bindingPropertyName: string, classPropertyName: string, transformFunction?: Function];\n\nexport interface R3DeclareDirectiveFacade {\n selector?: string;\n type: Type;\n version: string;\n inputs?: {\n [fieldName: string]:\n | {\n classPropertyName: string;\n publicName: string;\n isSignal: boolean;\n isRequired: boolean;\n transformFunction: Function | null;\n }\n | LegacyInputPartialMapping;\n };\n outputs?: {[classPropertyName: string]: string};\n host?: {\n attributes?: {[key: string]: OpaqueValue};\n listeners?: {[key: string]: string};\n properties?: {[key: string]: string};\n classAttribute?: string;\n styleAttribute?: string;\n };\n queries?: R3DeclareQueryMetadataFacade[];\n viewQueries?: R3DeclareQueryMetadataFacade[];\n providers?: OpaqueValue;\n exportAs?: string[];\n usesInheritance?: boolean;\n usesOnChanges?: boolean;\n isStandalone?: boolean;\n hostDirectives?: R3HostDirectiveMetadataFacade[] | null;\n isSignal?: boolean;\n}\n\nexport interface R3DeclareComponentFacade extends R3DeclareDirectiveFacade {\n template: string;\n isInline?: boolean;\n styles?: string[];\n\n // Post-standalone libraries use a unified dependencies field.\n dependencies?: R3DeclareTemplateDependencyFacade[];\n\n // Pre-standalone libraries have separate component/directive/pipe fields:\n components?: R3DeclareDirectiveDependencyFacade[];\n directives?: R3DeclareDirectiveDependencyFacade[];\n pipes?: {[pipeName: string]: OpaqueValue | (() => OpaqueValue)};\n\n deferBlockDependencies?: (() => Promise<Type> | null)[];\n viewProviders?: OpaqueValue;\n animations?: OpaqueValue;\n changeDetection?: ChangeDetectionStrategy;\n encapsulation?: ViewEncapsulation;\n interpolation?: [string, string];\n preserveWhitespaces?: boolean;\n}\n\nexport type R3DeclareTemplateDependencyFacade = {\n kind: string;\n} & (\n | R3DeclareDirectiveDependencyFacade\n | R3DeclarePipeDependencyFacade\n | R3DeclareNgModuleDependencyFacade\n);\n\nexport interface R3DeclareDirectiveDependencyFacade {\n kind?: 'directive' | 'component';\n selector: string;\n type: OpaqueValue | (() => OpaqueValue);\n inputs?: string[];\n outputs?: string[];\n exportAs?: string[];\n}\n\nexport interface R3DeclarePipeDependencyFacade {\n kind?: 'pipe';\n name: string;\n type: OpaqueValue | (() => OpaqueValue);\n}\n\nexport interface R3DeclareNgModuleDependencyFacade {\n kind: 'ngmodule';\n type: OpaqueValue | (() => OpaqueValue);\n}\n\nexport enum R3TemplateDependencyKind {\n Directive = 0,\n Pipe = 1,\n NgModule = 2,\n}\n\nexport interface R3TemplateDependencyFacade {\n kind: R3TemplateDependencyKind;\n type: OpaqueValue | (() => OpaqueValue);\n}\nexport interface R3FactoryDefMetadataFacade {\n name: string;\n type: Type;\n typeArgumentCount: number;\n deps: R3DependencyMetadataFacade[] | null;\n target: FactoryTarget;\n}\n\nexport interface R3DeclareFactoryFacade {\n type: Type;\n deps: R3DeclareDependencyMetadataFacade[] | 'invalid' | null;\n target: FactoryTarget;\n}\n\nexport interface R3DeclareInjectableFacade {\n type: Type;\n providedIn?: Type | 'root' | 'platform' | 'any' | null;\n useClass?: OpaqueValue;\n useFactory?: OpaqueValue;\n useExisting?: OpaqueValue;\n useValue?: OpaqueValue;\n deps?: R3DeclareDependencyMetadataFacade[];\n}\n\nexport enum ViewEncapsulation {\n Emulated = 0,\n // Historically the 1 value was for `Native` encapsulation which has been removed as of v11.\n None = 2,\n ShadowDom = 3,\n}\n\nexport type ChangeDetectionStrategy = number;\n\nexport interface R3QueryMetadataFacade {\n propertyName: string;\n first: boolean;\n predicate: OpaqueValue | string[];\n descendants: boolean;\n emitDistinctChangesOnly: boolean;\n read: OpaqueValue | null;\n static: boolean;\n isSignal: boolean;\n}\n\nexport interface R3DeclareQueryMetadataFacade {\n propertyName: string;\n first?: boolean;\n predicate: OpaqueValue | string[];\n descendants?: boolean;\n read?: OpaqueValue;\n static?: boolean;\n emitDistinctChangesOnly?: boolean;\n isSignal?: boolean;\n}\n\nexport interface R3DeclareInjectorFacade {\n type: Type;\n imports?: OpaqueValue[];\n providers?: OpaqueValue[];\n}\n\nexport interface R3DeclareNgModuleFacade {\n type: Type;\n bootstrap?: OpaqueValue[] | (() => OpaqueValue[]);\n declarations?: OpaqueValue[] | (() => OpaqueValue[]);\n imports?: OpaqueValue[] | (() => OpaqueValue[]);\n exports?: OpaqueValue[] | (() => OpaqueValue[]);\n schemas?: OpaqueValue[];\n id?: OpaqueValue;\n}\n\nexport interface R3DeclarePipeFacade {\n type: Type;\n name: string;\n version: string;\n pure?: boolean;\n isStandalone?: boolean;\n}\n\nexport interface ParseSourceSpan {\n start: any;\n end: any;\n details: any;\n fullStart: any;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport {global} from '../util/global';\nimport {CompilerFacade, ExportedCompilerFacade, Type} from './compiler_facade_interface';\nexport * from './compiler_facade_interface';\n\nexport const enum JitCompilerUsage {\n Decorator,\n PartialDeclaration,\n}\n\ninterface JitCompilerUsageRequest {\n usage: JitCompilerUsage;\n kind: 'directive' | 'component' | 'pipe' | 'injectable' | 'NgModule';\n type: Type;\n}\n\nexport function getCompilerFacade(request: JitCompilerUsageRequest): CompilerFacade {\n const globalNg: ExportedCompilerFacade = global['ng'];\n if (globalNg && globalNg.ɵcompilerFacade) {\n return globalNg.ɵcompilerFacade;\n }\n\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n // Log the type as an error so that a developer can easily navigate to the type from the\n // console.\n console.error(`JIT compilation failed for ${request.kind}`, request.type);\n\n let message = `The ${request.kind} '${request.type.name}' needs to be compiled using the JIT compiler, but '@angular/compiler' is not available.\\n\\n`;\n if (request.usage === JitCompilerUsage.PartialDeclaration) {\n message += `The ${request.kind} is part of a library that has been partially compiled.\\n`;\n message += `However, the Angular Linker has not processed the library such that JIT compilation is used as fallback.\\n`;\n message += '\\n';\n message += `Ideally, the library is processed using the Angular Linker to become fully AOT compiled.\\n`;\n } else {\n message += `JIT compilation is discouraged for production use-cases! Consider using AOT mode instead.\\n`;\n }\n message += `Alternatively, the JIT compiler should be loaded by bootstrapping using '@angular/platform-browser-dynamic' or '@angular/platform-server',\\n`;\n message += `or manually provide the compiler with 'import \"@angular/compiler\";' before bootstrapping.`;\n throw new Error(message);\n } else {\n throw new Error('JIT compiler unavailable');\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport {resolveForwardRef} from '../forward_ref';\nimport {ɵɵinject, ɵɵinvalidFactoryDep} from '../injector_compatibility';\nimport {ɵɵdefineInjectable, ɵɵdefineInjector} from '../interface/defs';\n\n/**\n * A mapping of the @angular/core API surface used in generated expressions to the actual symbols.\n *\n * This should be kept up to date with the public exports of @angular/core.\n */\nexport const angularCoreDiEnv: {[name: string]: Function} = {\n 'ɵɵdefineInjectable': ɵɵdefineInjectable,\n 'ɵɵdefineInjector': ɵɵdefineInjector,\n 'ɵɵinject': ɵɵinject,\n 'ɵɵinvalidFactoryDep': ɵɵinvalidFactoryDep,\n 'resolveForwardRef': resolveForwardRef,\n};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/**\n * @description\n *\n * Represents a type that a Component or other object is instances of.\n *\n * An example of a `Type` is `MyCustomComponent` class, which in JavaScript is represented by\n * the `MyCustomComponent` constructor function.\n *\n * @publicApi\n */\nexport const Type = Function;\n\nexport function isType(v: any): v is Type<any> {\n return typeof v === 'function';\n}\n\n/**\n * @description\n *\n * Represents an abstract class `T`, if applied to a concrete class it would stop being\n * instantiable.\n *\n * @publicApi\n */\nexport interface AbstractType<T> extends Function {\n prototype: T;\n}\n\nexport interface Type<T> extends Function {\n new (...args: any[]): T;\n}\n\n/**\n * Returns a writable type version of type.\n *\n * USAGE:\n * Given:\n * ```ts\n * interface Person {readonly name: string}\n * ```\n *\n * We would like to get a read/write version of `Person`.\n * ```ts\n * const WritablePerson = Writable<Person>;\n * ```\n *\n * The result is that you can do:\n *\n * ```ts\n * const readonlyPerson: Person = {name: 'Marry'};\n * readonlyPerson.name = 'John'; // TypeError\n * (readonlyPerson as WritablePerson).name = 'John'; // OK\n *\n * // Error: Correctly detects that `Person` did not have `age` property.\n * (readonlyPerson as WritablePerson).age = 30;\n * ```\n */\nexport type Writable<T> = {\n -readonly [K in keyof T]: T[K];\n};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {isType, Type} from '../interface/type';\nimport {newArray} from '../util/array_utils';\nimport {ANNOTATIONS, PARAMETERS, PROP_METADATA} from '../util/decorators';\nimport {global} from '../util/global';\n\nimport {PlatformReflectionCapabilities} from './platform_reflection_capabilities';\n\n/*\n * #########################\n * Attention: These Regular expressions have to hold even if the code is minified!\n * ##########################\n */\n\n/**\n * Regular expression that detects pass-through constructors for ES5 output. This Regex\n * intends to capture the common delegation pattern emitted by TypeScript and Babel. Also\n * it intends to capture the pattern where existing constructors have been downleveled from\n * ES2015 to ES5 using TypeScript w/ downlevel iteration. e.g.\n *\n * ```ts\n * function MyClass() {\n * var _this = _super.apply(this, arguments) || this;\n * ```\n *\n * downleveled to ES5 with `downlevelIteration` for TypeScript < 4.2:\n * ```ts\n * function MyClass() {\n * var _this = _super.apply(this, __spread(arguments)) || this;\n * ```\n *\n * or downleveled to ES5 with `downlevelIteration` for TypeScript >= 4.2:\n * ```ts\n * function MyClass() {\n * var _this = _super.apply(this, __spreadArray([], __read(arguments), false)) || this;\n * ```\n *\n * More details can be found in: https://github.com/angular/angular/issues/38453.\n */\nexport const ES5_DELEGATE_CTOR =\n /^function\\s+\\S+\\(\\)\\s*{[\\s\\S]+\\.apply\\(this,\\s*(arguments|(?:[^()]+\\(\\[\\],)?[^()]+\\(arguments\\).*)\\)/;\n/** Regular expression that detects ES2015 classes which extend from other classes. */\nexport const ES2015_INHERITED_CLASS = /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[^{]+{/;\n/**\n * Regular expression that detects ES2015 classes which extend from other classes and\n * have an explicit constructor defined.\n */\nexport const ES2015_INHERITED_CLASS_WITH_CTOR =\n /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[^{]+{[\\s\\S]*constructor\\s*\\(/;\n/**\n * Regular expression that detects ES2015 classes which extend from other classes\n * and inherit a constructor.\n */\nexport const ES2015_INHERITED_CLASS_WITH_DELEGATE_CTOR =\n /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[^{]+{[\\s\\S]*constructor\\s*\\(\\)\\s*{[^}]*super\\(\\.\\.\\.arguments\\)/;\n\n/**\n * Determine whether a stringified type is a class which delegates its constructor\n * to its parent.\n *\n * This is not trivial since compiled code can actually contain a constructor function\n * even if the original source code did not. For instance, when the child class contains\n * an initialized instance property.\n */\nexport function isDelegateCtor(typeStr: string): boolean {\n return (\n ES5_DELEGATE_CTOR.test(typeStr) ||\n ES2015_INHERITED_CLASS_WITH_DELEGATE_CTOR.test(typeStr) ||\n (ES2015_INHERITED_CLASS.test(typeStr) && !ES2015_INHERITED_CLASS_WITH_CTOR.test(typeStr))\n );\n}\n\nexport class ReflectionCapabilities implements PlatformReflectionCapabilities {\n private _reflect: any;\n\n constructor(reflect?: any) {\n this._reflect = reflect || global['Reflect'];\n }\n\n factory<T>(t: Type<T>): (args: any[]) => T {\n return (...args: any[]) => new t(...args);\n }\n\n /** @internal */\n _zipTypesAndAnnotations(paramTypes: any[], paramAnnotations: any[]): any[][] {\n let result: any[][];\n\n if (typeof paramTypes === 'undefined') {\n result = newArray(paramAnnotations.length);\n } else {\n result = newArray(paramTypes.length);\n }\n\n for (let i = 0; i < result.length; i++) {\n // TS outputs Object for parameters without types, while Traceur omits\n // the annotations. For now we preserve the Traceur behavior to aid\n // migration, but this can be revisited.\n if (typeof paramTypes === 'undefined') {\n result[i] = [];\n } else if (paramTypes[i] && paramTypes[i] != Object) {\n result[i] = [paramTypes[i]];\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\n private _ownParameters(type: Type<any>, parentCtor: any): any[][] | null {\n const typeStr = type.toString();\n // If we have no decorators, we only have function.length as metadata.\n // In that case, to detect whether a child class declared an own constructor or not,\n // we need to look inside of that constructor to check whether it is\n // just calling the parent.\n // This also helps to work around for https://github.com/Microsoft/TypeScript/issues/12439\n // that sets 'design:paramtypes' to []\n // if a class inherits from another class but has no ctor declared itself.\n if (isDelegateCtor(typeStr)) {\n return null;\n }\n\n // Prefer the direct API.\n if ((<any>type).parameters && (<any>type).parameters !== parentCtor.parameters) {\n return (<any>type).parameters;\n }\n\n // API of tsickle for lowering decorators to properties on the class.\n const tsickleCtorParams = (<any>type).ctorParameters;\n if (tsickleCtorParams && tsickleCtorParams !== parentCtor.ctorParameters) {\n // Newer tsickle uses a function closure\n // Retain the non-function case for compatibility with older tsickle\n const ctorParameters =\n typeof tsickleCtorParams === 'function' ? tsickleCtorParams() : tsickleCtorParams;\n const paramTypes = ctorParameters.map((ctorParam: any) => ctorParam && ctorParam.type);\n const paramAnnotations = ctorParameters.map(\n (ctorParam: any) => ctorParam && convertTsickleDecoratorIntoMetadata(ctorParam.decorators),\n );\n return this._zipTypesAndAnnotations(paramTypes, paramAnnotations);\n }\n\n // API for metadata created by invoking the decorators.\n const paramAnnotations = type.hasOwnProperty(PARAMETERS) && (type as any)[PARAMETERS];\n const paramTypes =\n this._reflect &&\n this._reflect.getOwnMetadata &&\n this._reflect.getOwnMetadata('design:paramtypes', type);\n if (paramTypes || paramAnnotations) {\n return this._zipTypesAndAnnotations(paramTypes, paramAnnotations);\n }\n\n // If a class has no decorators, at least create metadata\n // based on function.length.\n // Note: We know that this is a real constructor as we checked\n // the content of the constructor above.\n return newArray<any[]>(type.length);\n }\n\n parameters(type: Type<any>): any[][] {\n // Note: only report metadata if we have at least one class decorator\n // to stay in sync with the static reflector.\n if (!isType(type)) {\n return [];\n }\n const parentCtor = getParentCtor(type);\n let parameters = this._ownParameters(type, parentCtor);\n if (!parameters && parentCtor !== Object) {\n parameters = this.parameters(parentCtor);\n }\n return parameters || [];\n }\n\n private _ownAnnotations(typeOrFunc: Type<any>, parentCtor: any): any[] | null {\n // Prefer the direct API.\n if ((<any>typeOrFunc).annotations && (<any>typeOrFunc).annotations !== parentCtor.annotations) {\n let annotations = (<any>typeOrFunc).annotations;\n if (typeof annotations === 'function' && annotations.annotations) {\n annotations = annotations.annotations;\n }\n return annotations;\n }\n\n // API of tsickle for lowering decorators to properties on the class.\n if ((<any>typeOrFunc).decorators && (<any>typeOrFunc).decorators !== parentCtor.decorators) {\n return convertTsickleDecoratorIntoMetadata((<any>typeOrFunc).decorators);\n }\n\n // API for metadata created by invoking the decorators.\n if (typeOrFunc.hasOwnProperty(ANNOTATIONS)) {\n return (typeOrFunc as any)[ANNOTATIONS];\n }\n return null;\n }\n\n annotations(typeOrFunc: Type<any>): any[] {\n if (!isType(typeOrFunc)) {\n return [];\n }\n const parentCtor = getParentCtor(typeOrFunc);\n const ownAnnotations = this._ownAnnotations(typeOrFunc, parentCtor) || [];\n const parentAnnotations = parentCtor !== Object ? this.annotations(parentCtor) : [];\n return parentAnnotations.concat(ownAnnotations);\n }\n\n private _ownPropMetadata(typeOrFunc: any, parentCtor: any): {[key: string]: any[]} | null {\n // Prefer the direct API.\n if (\n (<any>typeOrFunc).propMetadata &&\n (<any>typeOrFunc).propMetadata !== parentCtor.propMetadata\n ) {\n let propMetadata = (<any>typeOrFunc).propMetadata;\n if (typeof propMetadata === 'function' && propMetadata.propMetadata) {\n propMetadata = propMetadata.propMetadata;\n }\n return propMetadata;\n }\n\n // API of tsickle for lowering decorators to properties on the class.\n if (\n (<any>typeOrFunc).propDecorators &&\n (<any>typeOrFunc).propDecorators !== parentCtor.propDecorators\n ) {\n const propDecorators = (<any>typeOrFunc).propDecorators;\n const propMetadata = <{[key: string]: any[]}>{};\n Object.keys(propDecorators).forEach((prop) => {\n propMetadata[prop] = convertTsickleDecoratorIntoMetadata(propDecorators[prop]);\n });\n return propMetadata;\n }\n\n // API for metadata created by invoking the decorators.\n if (typeOrFunc.hasOwnProperty(PROP_METADATA)) {\n return (typeOrFunc as any)[PROP_METADATA];\n }\n return null;\n }\n\n propMetadata(typeOrFunc: any): {[key: string]: any[]} {\n if (!isType(typeOrFunc)) {\n return {};\n }\n const parentCtor = getParentCtor(typeOrFunc);\n const propMetadata: {[key: string]: any[]} = {};\n if (parentCtor !== Object) {\n const parentPropMetadata = this.propMetadata(parentCtor);\n Object.keys(parentPropMetadata).forEach((propName) => {\n propMetadata[propName] = parentPropMetadata[propName];\n });\n }\n const ownPropMetadata = this._ownPropMetadata(typeOrFunc, parentCtor);\n if (ownPropMetadata) {\n Object.keys(ownPropMetadata).forEach((propName) => {\n const decorators: any[] = [];\n if (propMetadata.hasOwnProperty(propName)) {\n decorators.push(...propMetadata[propName]);\n }\n decorators.push(...ownPropMetadata[propName]);\n propMetadata[propName] = decorators;\n });\n }\n return propMetadata;\n }\n\n ownPropMetadata(typeOrFunc: any): {[key: string]: any[]} {\n if (!isType(typeOrFunc)) {\n return {};\n }\n return this._ownPropMetadata(typeOrFunc, getParentCtor(typeOrFunc)) || {};\n }\n\n hasLifecycleHook(type: any, lcProperty: string): boolean {\n return type instanceof Type && lcProperty in type.prototype;\n }\n}\n\nfunction convertTsickleDecoratorIntoMetadata(decoratorInvocations: any[]): any[] {\n if (!decoratorInvocations) {\n return [];\n }\n return decoratorInvocations.map((decoratorInvocation) => {\n const decoratorType = decoratorInvocation.type;\n const annotationCls = decoratorType.annotationCls;\n const annotationArgs = decoratorInvocation.args ? decoratorInvocation.args : [];\n return new annotationCls(...annotationArgs);\n });\n}\n\nfunction getParentCtor(ctor: Function): Type<any> {\n const parentProto = ctor.prototype ? Object.getPrototypeOf(ctor.prototype) : null;\n const parentCtor = parentProto ? parentProto.constructor : null;\n // Note: We always use `Object` as the null value\n // to simplify checking later on.\n return parentCtor || Object;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport type {ChangeDetectionScheduler} from '../../change_detection/scheduling/zoneless_scheduling';\nimport {TDeferBlockDetails} from '../../defer/interfaces';\nimport type {Injector} from '../../di/injector';\nimport {ProviderToken} from '../../di/provider_token';\nimport {DehydratedView} from '../../hydration/interfaces';\nimport {SchemaMetadata} from '../../metadata/schema';\nimport {Sanitizer} from '../../sanitization/sanitizer';\nimport type {AfterRenderSequence} from '../after_render/manager';\nimport type {ReactiveLViewConsumer} from '../reactive_lview_consumer';\nimport type {ViewEffectNode} from '../reactivity/effect';\n\nimport type {LContainer} from './container';\nimport {\n ComponentDef,\n ComponentTemplate,\n DirectiveDef,\n DirectiveDefList,\n HostBindingsFunction,\n PipeDef,\n PipeDefList,\n ViewQueriesFunction,\n} from './definition';\nimport {I18nUpdateOpCodes, TI18n, TIcu} from './i18n';\nimport {TConstants, TNode} from './node';\nimport type {LQueries, TQueries} from './query';\nimport {Renderer, RendererFactory} from './renderer';\nimport {RElement} from './renderer_dom';\nimport {TStylingKey, TStylingRange} from './styling';\n\n// Below are constants for LView indices to help us look up LView members\n// without having to remember the specific indices.\n// Uglify will inline these when minifying so there shouldn't be a cost.\nexport const HOST = 0;\nexport const TVIEW = 1;\n\n// Shared with LContainer\nexport const FLAGS = 2;\nexport const PARENT = 3;\nexport const NEXT = 4;\nexport const T_HOST = 5;\n// End shared with LContainer\n\nexport const HYDRATION = 6;\nexport const CLEANUP = 7;\nexport const CONTEXT = 8;\nexport const INJECTOR = 9;\nexport const ENVIRONMENT = 10;\nexport const RENDERER = 11;\nexport const CHILD_HEAD = 12;\nexport const CHILD_TAIL = 13;\n// FIXME(misko): Investigate if the three declarations aren't all same thing.\nexport const DECLARATION_VIEW = 14;\nexport const DECLARATION_COMPONENT_VIEW = 15;\nexport const DECLARATION_LCONTAINER = 16;\nexport const PREORDER_HOOK_FLAGS = 17;\nexport const QUERIES = 18;\nexport const ID = 19;\nexport const EMBEDDED_VIEW_INJECTOR = 20;\nexport const ON_DESTROY_HOOKS = 21;\nexport const EFFECTS_TO_SCHEDULE = 22;\nexport const EFFECTS = 23;\nexport const REACTIVE_TEMPLATE_CONSUMER = 24;\nexport const AFTER_RENDER_SEQUENCES_TO_ADD = 25;\n\n/**\n * Size of LView's header. Necessary to adjust for it when setting slots.\n *\n * IMPORTANT: `HEADER_OFFSET` should only be referred to the in the `ɵɵ*` instructions to translate\n * instruction index into `LView` index. All other indexes should be in the `LView` index space and\n * there should be no need to refer to `HEADER_OFFSET` anywhere else.\n */\nexport const HEADER_OFFSET = 26;\n\n// This interface replaces the real LView interface if it is an arg or a\n// return value of a public instruction. This ensures we don't need to expose\n// the actual interface, which should be kept private.\nexport interface OpaqueViewState {\n '__brand__': 'Brand for OpaqueViewState that nothing will match';\n}\n\n/**\n * `LView` stores all of the information needed to process the instructions as\n * they are invoked from the template. Each embedded view and component view has its\n * own `LView`. When processing a particular view, we set the `viewData` to that\n * `LView`. When that view is done processing, the `viewData` is set back to\n * whatever the original `viewData` was before (the parent `LView`).\n *\n * Keeping separate state for each view facilities view insertion / deletion, so we\n * don't have to edit the data array based on which views are present.\n */\nexport interface LView<T = unknown> extends Array<any> {\n /**\n * The node into which this `LView` is inserted.\n */\n [HOST]: RElement | null;\n\n /**\n * The static data for this view. We need a reference to this so we can easily walk up the\n * node tree in DI and get the TView.data array associated with a node (where the\n * directive defs are stored).\n */\n readonly [TVIEW]: TView;\n\n /** Flags for this view. See LViewFlags for more info. */\n [FLAGS]: LViewFlags;\n\n /**\n * This may store an {@link LView} or {@link LContainer}.\n *\n * `LView` - The parent view. This is needed when we exit the view and must restore the previous\n * LView. Without this, the render method would have to keep a stack of\n * views as it is recursively rendering templates.\n *\n * `LContainer` - The current view is part of a container, and is an embedded view.\n */\n [PARENT]: LView | LContainer | null;\n\n /**\n *\n * The next sibling LView or LContainer.\n *\n * Allows us to propagate between sibling view states that aren't in the same\n * container. Embedded views already have a node.next, but it is only set for\n * views in the same container. We need a way to link component views and views\n * across containers as well.\n */\n [NEXT]: LView | LContainer | null;\n\n /** Queries active for this view - nodes from a view are reported to those queries. */\n [QUERIES]: LQueries | null;\n\n /**\n * Store the `TNode` of the location where the current `LView` is inserted into.\n *\n * Given:\n * ```html\n * <div>\n * <ng-template><span></span></ng-template>\n * </div>\n * ```\n *\n * We end up with two `TView`s.\n * - `parent` `TView` which contains `<div><!-- anchor --></div>`\n * - `child` `TView` which contains `<span></span>`\n *\n * Typically the `child` is inserted into the declaration location of the `parent`, but it can be\n * inserted anywhere. Because it can be inserted anywhere it is not possible to store the\n * insertion information in the `TView` and instead we must store it in the `LView[T_HOST]`.\n *\n * So to determine where is our insertion parent we would execute:\n * ```ts\n * const parentLView = lView[PARENT];\n * const parentTNode = lView[T_HOST];\n * const insertionParent = parentLView[parentTNode.index];\n * ```\n *\n *\n * If `null`, this is the root view of an application (root component is in this view) and it has\n * no parents.\n */\n [T_HOST]: TNode | null;\n\n /**\n * When a view is destroyed, listeners need to be released and outputs need to be\n * unsubscribed. This context array stores both listener functions wrapped with\n * their context and output subscription instances for a particular view.\n *\n * These change per LView instance, so they cannot be stored on TView. Instead,\n * TView.cleanup saves an index to the necessary context in this array.\n *\n * After `LView` is created it is possible to attach additional instance specific functions at the\n * end of the `lView[CLEANUP]` because we know that no more `T` level cleanup functions will be\n * added here.\n */\n [CLEANUP]: any[] | null;\n\n /**\n * - For dynamic views, this is the context with which to render the template (e.g.\n * `NgForContext`), or `{}` if not defined explicitly.\n * - For root view of the root component it's a reference to the component instance itself.\n * - For components, the context is a reference to the component instance itself.\n * - For inline views, the context is null.\n */\n [CONTEXT]: T;\n\n /** A Module Injector to be used as fall back after Element Injectors are consulted. */\n readonly [INJECTOR]: Injector;\n\n /**\n * Contextual data that is shared across multiple instances of `LView` in the same application.\n */\n [ENVIRONMENT]: LViewEnvironment;\n\n /** Renderer to be used for this view. */\n [RENDERER]: Renderer;\n\n /**\n * Reference to the first LView or LContainer beneath this LView in\n * the hierarchy.\n *\n * Necessary to store this so views can traverse through their nested views\n * to remove listeners and call onDestroy callbacks.\n */\n [CHILD_HEAD]: LView | LContainer | null;\n\n /**\n * The last LView or LContainer beneath this LView in the hierarchy.\n *\n * The tail allows us to quickly add a new state to the end of the view list\n * without having to propagate starting from the first child.\n */\n [CHILD_TAIL]: LView | LContainer | null;\n\n /**\n * View where this view's template was declared.\n *\n * The template for a dynamically created view may be declared in a different view than\n * it is inserted. We already track the \"insertion view\" (view where the template was\n * inserted) in LView[PARENT], but we also need access to the \"declaration view\"\n * (view where the template was declared). Otherwise, we wouldn't be able to call the\n * view's template function with the proper contexts. Context should be inherited from\n * the declaration view tree, not the insertion view tree.\n *\n * Example (AppComponent template):\n *\n * <ng-template #foo></ng-template> <-- declared here -->\n * <some-comp [tpl]=\"foo\"></some-comp> <-- inserted inside this component -->\n *\n * The <ng-template> above is declared in the AppComponent template, but it will be passed into\n * SomeComp and inserted there. In this case, the declaration view would be the AppComponent,\n * but the insertion view would be SomeComp. When we are removing views, we would want to\n * traverse through the insertion view to clean up listeners. When we are calling the\n * template function during change detection, we need the declaration view to get inherited\n * context.\n */\n [DECLARATION_VIEW]: LView | null;\n\n /**\n * Points to the declaration component view, used to track transplanted `LView`s.\n *\n * See: `DECLARATION_VIEW` which points to the actual `LView` where it was declared, whereas\n * `DECLARATION_COMPONENT_VIEW` points to the component which may not be same as\n * `DECLARATION_VIEW`.\n *\n * Example:\n * ```html\n * <#VIEW #myComp>\n * <div *ngIf=\"true\">\n * <ng-template #myTmpl>...</ng-template>\n * </div>\n * </#VIEW>\n * ```\n * In the above case `DECLARATION_VIEW` for `myTmpl` points to the `LView` of `ngIf` whereas\n * `DECLARATION_COMPONENT_VIEW` points to `LView` of the `myComp` which owns the template.\n *\n * The reason for this is that all embedded views are always check-always whereas the component\n * view can be check-always or on-push. When we have a transplanted view it is important to\n * determine if we have transplanted a view from check-always declaration to on-push insertion\n * point. In such a case the transplanted view needs to be added to the `LContainer` in the\n * declared `LView` and CD during the declared view CD (in addition to the CD at the insertion\n * point.) (Any transplanted views which are intra Component are of no interest because the CD\n * strategy of declaration and insertion will always be the same, because it is the same\n * component.)\n *\n * Queries already track moved views in `LView[DECLARATION_LCONTAINER]` and\n * `LContainer[MOVED_VIEWS]`. However the queries also track `LView`s which moved within the same\n * component `LView`. Transplanted views are a subset of moved views, and we use\n * `DECLARATION_COMPONENT_VIEW` to differentiate them. As in this example.\n *\n * Example showing intra component `LView` movement.\n * ```html\n * <#VIEW #myComp>\n * <div *ngIf=\"condition; then thenBlock else elseBlock\"></div>\n * <ng-template #thenBlock>Content to render when condition is true.</ng-template>\n * <ng-template #elseBlock>Content to render when condition is false.</ng-template>\n * </#VIEW>\n * ```\n * The `thenBlock` and `elseBlock` is moved but not transplanted.\n *\n * Example showing inter component `LView` movement (transplanted view).\n * ```html\n * <#VIEW #myComp>\n * <ng-template #myTmpl>...</ng-template>\n * <insertion-component [template]=\"myTmpl\"></insertion-component>\n * </#VIEW>\n * ```\n * In the above example `myTmpl` is passed into a different component. If `insertion-component`\n * instantiates `myTmpl` and `insertion-component` is on-push then the `LContainer` needs to be\n * marked as containing transplanted views and those views need to be CD as part of the\n * declaration CD.\n *\n *\n * When change detection runs, it iterates over `[MOVED_VIEWS]` and CDs any child `LView`s where\n * the `DECLARATION_COMPONENT_VIEW` of the current component and the child `LView` does not match\n * (it has been transplanted across components.)\n *\n * Note: `[DECLARATION_COMPONENT_VIEW]` points to itself if the LView is a component view (the\n * simplest / most common case).\n *\n * see also:\n * - https://hackmd.io/@mhevery/rJUJsvv9H write up of the problem\n * - `LContainer[HAS_TRANSPLANTED_VIEWS]` which marks which `LContainer` has transplanted views.\n * - `LContainer[TRANSPLANT_HEAD]` and `LContainer[TRANSPLANT_TAIL]` storage for transplanted\n * - `LView[DECLARATION_LCONTAINER]` similar problem for queries\n * - `LContainer[MOVED_VIEWS]` similar problem for queries\n */\n [DECLARATION_COMPONENT_VIEW]: LView;\n\n /**\n * A declaration point of embedded views (ones instantiated based on the content of a\n * <ng-template>), null for other types of views.\n *\n * We need to track all embedded views created from a given declaration point so we can prepare\n * query matches in a proper order (query matches are ordered based on their declaration point and\n * _not_ the insertion point).\n */\n [DECLARATION_LCONTAINER]: LContainer | null;\n\n /**\n * More flags for this view. See PreOrderHookFlags for more info.\n */\n [PREORDER_HOOK_FLAGS]: PreOrderHookFlags;\n\n /** Unique ID of the view. Used for `__ngContext__` lookups in the `LView` registry. */\n [ID]: number;\n\n /**\n * A container related to hydration annotation information that's associated with this LView.\n */\n [HYDRATION]: DehydratedView | null;\n\n /**\n * Optional injector assigned to embedded views that takes\n * precedence over the element and module injectors.\n */\n readonly [EMBEDDED_VIEW_INJECTOR]: Injector | null;\n\n /**\n * Effect scheduling operations that need to run during this views's update pass.\n */\n [EFFECTS_TO_SCHEDULE]: Array<() => void> | null;\n\n [EFFECTS]: Set<ViewEffectNode> | null;\n\n /**\n * A collection of callbacks functions that are executed when a given LView is destroyed. Those\n * are user defined, LView-specific destroy callbacks that don't have any corresponding TView\n * entries.\n */\n [ON_DESTROY_HOOKS]: Array<() => void> | null;\n\n /**\n * The `Consumer` for this `LView`'s template so that signal reads can be tracked.\n *\n * This is initially `null` and gets assigned a consumer after template execution\n * if any signals were read.\n */\n [REACTIVE_TEMPLATE_CONSUMER]: ReactiveLViewConsumer | null;\n\n // AfterRenderSequences that need to be scheduled\n [AFTER_RENDER_SEQUENCES_TO_ADD]: AfterRenderSequence[] | null;\n}\n\n/**\n * Contextual data that is shared across multiple instances of `LView` in the same application.\n */\nexport interface LViewEnvironment {\n /** Factory to be used for creating Renderer. */\n rendererFactory: RendererFactory;\n\n /** An optional custom sanitizer. */\n sanitizer: Sanitizer | null;\n\n /** Scheduler for change detection to notify when application state changes. */\n changeDetectionScheduler: ChangeDetectionScheduler | null;\n}\n\n/** Flags associated with an LView (saved in LView[FLAGS]) */\nexport const enum LViewFlags {\n /** The state of the init phase on the first 2 bits */\n InitPhaseStateIncrementer = 0b00000000001,\n InitPhaseStateMask = 0b00000000011,\n\n /**\n * Whether or not the view is in creationMode.\n *\n * This must be stored in the view rather than using `data` as a marker so that\n * we can properly support embedded views. Otherwise, when exiting a child view\n * back into the parent view, `data` will be defined and `creationMode` will be\n * improperly reported as false.\n */\n CreationMode = 1 << 2,\n\n /**\n * Whether or not this LView instance is on its first processing pass.\n *\n * An LView instance is considered to be on its \"first pass\" until it\n * has completed one creation mode run and one update mode run. At this\n * time, the flag is turned off.\n */\n FirstLViewPass = 1 << 3,\n\n /** Whether this view has default change detection strategy (checks always) or onPush */\n CheckAlways = 1 << 4,\n\n /** Whether there are any i18n blocks inside this LView. */\n HasI18n = 1 << 5,\n\n /** Whether or not this view is currently dirty (needing check) */\n Dirty = 1 << 6,\n\n /** Whether or not this view is currently attached to change detection tree. */\n Attached = 1 << 7,\n\n /** Whether or not this view is destroyed. */\n Destroyed = 1 << 8,\n\n /** Whether or not this view is the root view */\n IsRoot = 1 << 9,\n\n /**\n * Whether this moved LView needs to be refreshed. Similar to the Dirty flag, but used for\n * transplanted and signal views where the parent/ancestor views are not marked dirty as well.\n * i.e. \"Refresh just this view\". Used in conjunction with the HAS_CHILD_VIEWS_TO_REFRESH\n * flag.\n */\n RefreshView = 1 << 10,\n\n /** Indicates that the view **or any of its ancestors** have an embedded view injector. */\n HasEmbeddedViewInjector = 1 << 11,\n\n /** Indicates that the view was created with `signals: true`. */\n SignalView = 1 << 12,\n\n /**\n * Indicates that this LView has a view underneath it that needs to be refreshed during change\n * detection. This flag indicates that even if this view is not dirty itself, we still need to\n * traverse its children during change detection.\n */\n HasChildViewsToRefresh = 1 << 13,\n\n /**\n * This is the count of the bits the 1 was shifted above (base 10)\n */\n IndexWithinInitPhaseShift = 14,\n\n /**\n * Index of the current init phase on last 21 bits\n */\n IndexWithinInitPhaseIncrementer = 1 << IndexWithinInitPhaseShift,\n\n // Subtracting 1 gives all 1s to the right of the initial shift\n // So `(1 << 3) - 1` would give 3 1s: 1 << 3 = 0b01000, subtract 1 = 0b00111\n IndexWithinInitPhaseReset = (1 << IndexWithinInitPhaseShift) - 1,\n}\n\n/**\n * Possible states of the init phase:\n * - 00: OnInit hooks to be run.\n * - 01: AfterContentInit hooks to be run\n * - 10: AfterViewInit hooks to be run\n * - 11: All init hooks have been run\n */\nexport const enum InitPhaseState {\n OnInitHooksToBeRun = 0b00,\n AfterContentInitHooksToBeRun = 0b01,\n AfterViewInitHooksToBeRun = 0b10,\n InitPhaseCompleted = 0b11,\n}\n\n/** More flags associated with an LView (saved in LView[PREORDER_HOOK_FLAGS]) */\nexport const enum PreOrderHookFlags {\n /**\n The index of the next pre-order hook to be called in the hooks array, on the first 16\n bits\n */\n IndexOfTheNextPreOrderHookMaskMask = 0b01111111111111111,\n\n /**\n * The number of init hooks that have already been called, on the last 16 bits\n */\n NumberOfInitHooksCalledIncrementer = 0b010000000000000000,\n NumberOfInitHooksCalledShift = 16,\n NumberOfInitHooksCalledMask = 0b11111111111111110000000000000000,\n}\n\n/**\n * Stores a set of OpCodes to process `HostBindingsFunction` associated with a current view.\n *\n * In order to invoke `HostBindingsFunction` we need:\n * 1. 'elementIdx`: Index to the element associated with the `HostBindingsFunction`.\n * 2. 'directiveIdx`: Index to the directive associated with the `HostBindingsFunction`. (This will\n * become the context for the `HostBindingsFunction` invocation.)\n * 3. `bindingRootIdx`: Location where the bindings for the `HostBindingsFunction` start. Internally\n * `HostBindingsFunction` binding indexes start from `0` so we need to add `bindingRootIdx` to\n * it.\n * 4. `HostBindingsFunction`: A host binding function to execute.\n *\n * The above information needs to be encoded into the `HostBindingOpCodes` in an efficient manner.\n *\n * 1. `elementIdx` is encoded into the `HostBindingOpCodes` as `~elementIdx` (so a negative number);\n * 2. `directiveIdx`\n * 3. `bindingRootIdx`\n * 4. `HostBindingsFunction` is passed in as is.\n *\n * The `HostBindingOpCodes` array contains:\n * - negative number to select the element index.\n * - followed by 1 or more of:\n * - a number to select the directive index\n * - a number to select the bindingRoot index\n * - and a function to invoke.\n *\n * ## Example\n *\n * ```ts\n * const hostBindingOpCodes = [\n * ~30, // Select element 30\n * 40, 45, MyDir.ɵdir.hostBindings // Invoke host bindings on MyDir on element 30;\n * // directiveIdx = 40; bindingRootIdx = 45;\n * 50, 55, OtherDir.ɵdir.hostBindings // Invoke host bindings on OtherDire on element 30\n * // directiveIdx = 50; bindingRootIdx = 55;\n * ]\n * ```\n *\n * ## Pseudocode\n * ```ts\n * const hostBindingOpCodes = tView.hostBindingOpCodes;\n * if (hostBindingOpCodes === null) return;\n * for (let i = 0; i < hostBindingOpCodes.length; i++) {\n * const opCode = hostBindingOpCodes[i] as number;\n * if (opCode < 0) {\n * // Negative numbers are element indexes.\n * setSelectedIndex(~opCode);\n * } else {\n * // Positive numbers are NumberTuple which store bindingRootIndex and directiveIndex.\n * const directiveIdx = opCode;\n * const bindingRootIndx = hostBindingOpCodes[++i] as number;\n * const hostBindingFn = hostBindingOpCodes[++i] as HostBindingsFunction<any>;\n * setBindingRootForHostBindings(bindingRootIndx, directiveIdx);\n * const context = lView[directiveIdx];\n * hostBindingFn(RenderFlags.Update, context);\n * }\n * }\n * ```\n *\n */\nexport interface HostBindingOpCodes extends Array<number | HostBindingsFunction<any>> {\n __brand__: 'HostBindingOpCodes';\n debug?: string[];\n}\n\n/**\n * Explicitly marks `TView` as a specific type in `ngDevMode`\n *\n * It is useful to know conceptually what time of `TView` we are dealing with when\n * debugging an application (even if the runtime does not need it.) For this reason\n * we store this information in the `ngDevMode` `TView` and than use it for\n * better debugging experience.\n */\nexport const enum TViewType {\n /**\n * Root `TView` is the used to bootstrap components into. It is used in conjunction with\n * `LView` which takes an existing DOM node not owned by Angular and wraps it in `TView`/`LView`\n * so that other components can be loaded into it.\n */\n Root = 0,\n\n /**\n * `TView` associated with a Component. This would be the `TView` directly associated with the\n * component view (as opposed an `Embedded` `TView` which would be a child of `Component` `TView`)\n */\n Component = 1,\n\n /**\n * `TView` associated with a template. Such as `*ngIf`, `<ng-template>` etc... A `Component`\n * can have zero or more `Embedded` `TView`s.\n */\n Embedded = 2,\n}\n\n/**\n * The static data for an LView (shared between all templates of a\n * given type).\n *\n * Stored on the `ComponentDef.tView`.\n */\nexport interface TView {\n /**\n * Type of `TView` (`Root`|`Component`|`Embedded`).\n */\n type: TViewType;\n\n /**\n * This is a blueprint used to generate LView instances for this TView. Copying this\n * blueprint is faster than creating a new LView from scratch.\n */\n blueprint: LView;\n\n /**\n * The template function used to refresh the view of dynamically created views\n * and components. Will be null for inline views.\n */\n template: ComponentTemplate<{}> | null;\n\n /**\n * A function containing query-related instructions.\n */\n viewQuery: ViewQueriesFunction<{}> | null;\n\n /**\n * A `TNode` representing the declaration location of this `TView` (not part of this TView).\n */\n declTNode: TNode | null;\n\n // FIXME(misko): Why does `TView` not have `declarationTView` property?\n\n /** Whether or not this template has been processed in creation mode. */\n firstCreatePass: boolean;\n\n /**\n * Whether or not this template has been processed in update mode (e.g. change detected)\n *\n * `firstUpdatePass` is used by styling to set up `TData` to contain metadata about the styling\n * instructions. (Mainly to build up a linked list of styling priority order.)\n *\n * Typically this function gets cleared after first execution. If exception is thrown then this\n * flag can remain turned un until there is first successful (no exception) pass. This means that\n * individual styling instructions keep track of if they have already been added to the linked\n * list to prevent double adding.\n */\n firstUpdatePass: boolean;\n\n /** Static data equivalent of LView.data[]. Contains TNodes, PipeDefInternal or TI18n. */\n data: TData;\n\n /**\n * The binding start index is the index at which the data array\n * starts to store bindings only. Saving this value ensures that we\n * will begin reading bindings at the correct point in the array when\n * we are in update mode.\n *\n * -1 means that it has not been initialized.\n */\n bindingStartIndex: number;\n\n /**\n * The index where the \"expando\" section of `LView` begins. The expando\n * section contains injectors, directive instances, and host binding values.\n * Unlike the \"decls\" and \"vars\" sections of `LView`, the length of this\n * section cannot be calculated at compile-time because directives are matched\n * at runtime to preserve locality.\n *\n * We store this start index so we know where to start checking host bindings\n * in `setHostBindings`.\n */\n expandoStartIndex: number;\n\n /**\n * Whether or not there are any static view queries tracked on this view.\n *\n * We store this so we know whether or not we should do a view query\n * refresh after creation mode to collect static query results.\n */\n staticViewQueries: boolean;\n\n /**\n * Whether or not there are any static content queries tracked on this view.\n *\n * We store this so we know whether or not we should do a content query\n * refresh after creation mode to collect static query results.\n */\n staticContentQueries: boolean;\n\n /**\n * A reference to the first child node located in the view.\n */\n firstChild: TNode | null;\n\n /**\n * Stores the OpCodes to be replayed during change-detection to process the `HostBindings`\n *\n * See `HostBindingOpCodes` for encoding details.\n */\n hostBindingOpCodes: HostBindingOpCodes | null;\n\n /**\n * Full registry of directives and components that may be found in this view.\n *\n * It's necessary to keep a copy of the full def list on the TView so it's possible\n * to render template functions without a host component.\n */\n directiveRegistry: DirectiveDefList | null;\n\n /**\n * Full registry of pipes that may be found in this view.\n *\n * The property is either an array of `PipeDefs`s or a function which returns the array of\n * `PipeDefs`s. The function is necessary to be able to support forward declarations.\n *\n * It's necessary to keep a copy of the full def list on the TView so it's possible\n * to render template functions without a host component.\n */\n pipeRegistry: PipeDefList | null;\n\n /**\n * Array of ngOnInit, ngOnChanges and ngDoCheck hooks that should be executed for this view in\n * creation mode.\n *\n * This array has a flat structure and contains TNode indices, directive indices (where an\n * instance can be found in `LView`) and hook functions. TNode index is followed by the directive\n * index and a hook function. If there are multiple hooks for a given TNode, the TNode index is\n * not repeated and the next lifecycle hook information is stored right after the previous hook\n * function. This is done so that at runtime the system can efficiently iterate over all of the\n * functions to invoke without having to make any decisions/lookups.\n */\n preOrderHooks: HookData | null;\n\n /**\n * Array of ngOnChanges and ngDoCheck hooks that should be executed for this view in update mode.\n *\n * This array has the same structure as the `preOrderHooks` one.\n */\n preOrderCheckHooks: HookData | null;\n\n /**\n * Array of ngAfterContentInit and ngAfterContentChecked hooks that should be executed\n * for this view in creation mode.\n *\n * Even indices: Directive index\n * Odd indices: Hook function\n */\n contentHooks: HookData | null;\n\n /**\n * Array of ngAfterContentChecked hooks that should be executed for this view in update\n * mode.\n *\n * Even indices: Directive index\n * Odd indices: Hook function\n */\n contentCheckHooks: HookData | null;\n\n /**\n * Array of ngAfterViewInit and ngAfterViewChecked hooks that should be executed for\n * this view in creation mode.\n *\n * Even indices: Directive index\n * Odd indices: Hook function\n */\n viewHooks: HookData | null;\n\n /**\n * Array of ngAfterViewChecked hooks that should be executed for this view in\n * update mode.\n *\n * Even indices: Directive index\n * Odd indices: Hook function\n */\n viewCheckHooks: HookData | null;\n\n /**\n * Array of ngOnDestroy hooks that should be executed when this view is destroyed.\n *\n * Even indices: Directive index\n * Odd indices: Hook function\n */\n destroyHooks: DestroyHookData | null;\n\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 native DOM listener or output subscription being stored:\n * 1st index is: event name `name = tView.cleanup[i+0]`\n * 2nd index is: index of native element or a function that retrieves global target (window,\n * document or body) reference based on the native element:\n * `typeof idxOrTargetGetter === 'function'`: global target getter function\n * `typeof idxOrTargetGetter === 'number'`: index of native element\n *\n * 3rd index is: index of listener function `listener = lView[CLEANUP][tView.cleanup[i+2]]`\n * 4th index is: `useCaptureOrIndx = tView.cleanup[i+3]`\n * `typeof useCaptureOrIndx == 'boolean' : useCapture boolean\n * `typeof useCaptureOrIndx == 'number':\n * `useCaptureOrIndx >= 0` `removeListener = LView[CLEANUP][useCaptureOrIndx]`\n * `useCaptureOrIndx < 0` `subscription = LView[CLEANUP][-useCaptureOrIndx]`\n *\n * If it's an output subscription or query list destroy hook:\n * 1st index is: output unsubscribe function / query list destroy function\n * 2nd index is: index of function context in LView.cleanupInstances[]\n * `tView.cleanup[i+0].call(lView[CLEANUP][tView.cleanup[i+1]])`\n */\n cleanup: any[] | null;\n\n /**\n * A list of element indices for child components that will need to be\n * refreshed when the current view has finished its check. These indices have\n * already been adjusted for the HEADER_OFFSET.\n *\n */\n components: number[] | null;\n\n /**\n * A collection of queries tracked in a given view.\n */\n queries: TQueries | null;\n\n /**\n * An array of indices pointing to directives with content queries alongside with the\n * corresponding query index. Each entry in this array is a tuple of:\n * - index of the first content query index declared by a given directive;\n * - index of a directive.\n *\n * We are storing those indexes so we can refresh content queries as part of a view refresh\n * process.\n */\n contentQueries: number[] | null;\n\n /**\n * Set of schemas that declare elements to be allowed inside the view.\n */\n schemas: SchemaMetadata[] | null;\n\n /**\n * Array of constants for the view. Includes attribute arrays, local definition arrays etc.\n * Used for directive matching, attribute bindings, local definitions and more.\n */\n consts: TConstants | null;\n\n /**\n * Indicates that there was an error before we managed to complete the first create pass of the\n * view. This means that the view is likely corrupted and we should try to recover it.\n */\n incompleteFirstPass: boolean;\n\n /**\n * Unique id of this TView for hydration purposes:\n * - TViewType.Embedded: a unique id generated during serialization on the server\n * - TViewType.Component: an id generated based on component properties\n * (see `getComponentId` function for details)\n */\n ssrId: string | null;\n}\n\n/** Single hook callback function. */\nexport type HookFn = () => void;\n\n/**\n * Information necessary to call a hook. E.g. the callback that\n * needs to invoked and the index at which to find its context.\n */\nexport type HookEntry = number | HookFn;\n\n/**\n * Array of hooks that should be executed for a view and their directive indices.\n *\n * For each node of the view, the following data is stored:\n * 1) Node index (optional)\n * 2) A series of number/function pairs where:\n * - even indices are directive indices\n * - odd indices are hook functions\n *\n * Special cases:\n * - a negative directive index flags an init hook (ngOnInit, ngAfterContentInit, ngAfterViewInit)\n */\nexport type HookData = HookEntry[];\n\n/**\n * Array of destroy hooks that should be executed for a view and their directive indices.\n *\n * The array is set up as a series of number/function or number/(number|function)[]:\n * - Even indices represent the context with which hooks should be called.\n * - Odd indices are the hook functions themselves. If a value at an odd index is an array,\n * it represents the destroy hooks of a `multi` provider where:\n * - Even indices represent the index of the provider for which we've registered a destroy hook,\n * inside of the `multi` provider array.\n * - Odd indices are the destroy hook functions.\n * For example:\n * LView: `[0, 1, 2, AService, 4, [BService, CService, DService]]`\n * destroyHooks: `[3, AService.ngOnDestroy, 5, [0, BService.ngOnDestroy, 2, DService.ngOnDestroy]]`\n *\n * In the example above `AService` is a type provider with an `ngOnDestroy`, whereas `BService`,\n * `CService` and `DService` are part of a `multi` provider where only `BService` and `DService`\n * have an `ngOnDestroy` hook.\n */\nexport type DestroyHookData = (HookEntry | HookData)[];\n\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 *\n * Each pipe's definition is stored here at the same index as its pipe instance in\n * the data array.\n *\n * Each host property's name is stored here at the same index as its value in the\n * data array.\n *\n * Each property binding name is stored here at the same index as its value in\n * the data array. If the binding is an interpolation, the static string values\n * are stored parallel to the dynamic values. Example:\n *\n * id=\"prefix {{ v0 }} a {{ v1 }} b {{ v2 }} suffix\"\n *\n * LView | TView.data\n *------------------------\n * v0 value | 'a'\n * v1 value | 'b'\n * v2 value | id � prefix � suffix\n *\n * Injector bloom filters are also stored here.\n */\nexport type TData = (\n | TNode\n | PipeDef<any>\n | DirectiveDef<any>\n | ComponentDef<any>\n | number\n | TStylingRange\n | TStylingKey\n | ProviderToken<any>\n | TI18n\n | I18nUpdateOpCodes\n | TIcu\n | null\n | string\n | TDeferBlockDetails\n)[];\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {DehydratedContainerView} from '../../hydration/interfaces';\n\nimport {TNode} from './node';\nimport {RComment, RElement} from './renderer_dom';\nimport {FLAGS, HOST, LView, NEXT, PARENT, T_HOST} from './view';\n\n/**\n * Special location which allows easy identification of type. If we have an array which was\n * retrieved from the `LView` and that array has `true` at `TYPE` location, we know it is\n * `LContainer`.\n */\nexport const TYPE = 1;\n\n/**\n * Below are constants for LContainer indices to help us look up LContainer members\n * without having to remember the specific indices.\n * Uglify will inline these when minifying so there shouldn't be a cost.\n */\n\n// FLAGS, PARENT, NEXT, and T_HOST are indices 2, 3, 4, and 5\n// As we already have these constants in LView, we don't need to re-create them.\n\nexport const DEHYDRATED_VIEWS = 6;\nexport const NATIVE = 7;\nexport const VIEW_REFS = 8;\nexport const MOVED_VIEWS = 9;\n\n/**\n * Size of LContainer's header. Represents the index after which all views in the\n * container will be inserted. We need to keep a record of current views so we know\n * which views are already in the DOM (and don't need to be re-added) and so we can\n * remove views from the DOM when they are no longer required.\n */\nexport const CONTAINER_HEADER_OFFSET = 10;\n\n/**\n * The state associated with a container.\n *\n * This is an array so that its structure is closer to LView. This helps\n * when traversing the view tree (which is a mix of containers and component\n * views), so we can jump to viewOrContainer[NEXT] in the same way regardless\n * of type.\n */\nexport interface LContainer extends Array<any> {\n /**\n * The host element of this LContainer.\n *\n * The host could be an LView if this container is on a component node.\n * In that case, the component LView is its HOST.\n */\n readonly [HOST]: RElement | RComment | LView;\n\n /**\n * This is a type field which allows us to differentiate `LContainer` from `StylingContext` in an\n * efficient way. The value is always set to `true`\n */\n [TYPE]: true;\n\n /** Flags for this container. See LContainerFlags for more info. */\n [FLAGS]: LContainerFlags;\n\n /**\n * Access to the parent view is necessary so we can propagate back\n * up from inside a container to parent[NEXT].\n */\n [PARENT]: LView;\n\n /**\n * This allows us to jump from a container to a sibling container or component\n * view with the same parent, so we can remove listeners efficiently.\n */\n [NEXT]: LView | LContainer | null;\n\n /**\n * A collection of views created based on the underlying `<ng-template>` element but inserted into\n * a different `LContainer`. We need to track views created from a given declaration point since\n * queries collect matches from the embedded view declaration point and _not_ the insertion point.\n */\n [MOVED_VIEWS]: LView[] | null;\n\n /**\n * Pointer to the `TNode` which represents the host of the container.\n */\n [T_HOST]: TNode;\n\n /** The comment element that serves as an anchor for this LContainer. */\n [NATIVE]: RComment;\n\n /**\n * Array of `ViewRef`s used by any `ViewContainerRef`s that point to this container.\n *\n * This is lazily initialized by `ViewContainerRef` when the first view is inserted.\n *\n * NOTE: This is stored as `any[]` because render3 should really not be aware of `ViewRef` and\n * doing so creates circular dependency.\n */\n [VIEW_REFS]: unknown[] | null;\n\n /**\n * Array of dehydrated views within this container.\n *\n * This information is used during the hydration process on the client.\n * The hydration logic tries to find a matching dehydrated view, \"claim\" it\n * and use this information to do further matching. After that, this \"claimed\"\n * view is removed from the list. The remaining \"unclaimed\" views are\n * \"garbage-collected\" later on, i.e. removed from the DOM once the hydration\n * logic finishes.\n */\n [DEHYDRATED_VIEWS]: DehydratedContainerView[] | null;\n}\n\n/** Flags associated with an LContainer (saved in LContainer[FLAGS]) */\nexport const enum LContainerFlags {\n None = 0,\n /**\n * Flag to signify that this `LContainer` may have transplanted views which need to be change\n * detected. (see: `LView[DECLARATION_COMPONENT_VIEW])`.\n *\n * This flag, once set, is never unset for the `LContainer`.\n */\n HasTransplantedViews = 1 << 1,\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {LContainer, TYPE} from './container';\nimport {ComponentDef, DirectiveDef} from './definition';\nimport {TNode, TNodeFlags, TNodeType} from './node';\nimport {RNode} from './renderer_dom';\nimport {FLAGS, LView, LViewFlags} from './view';\n\n/**\n * True if `value` is `LView`.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\nexport function isLView(value: RNode | LView | LContainer | {} | null): value is LView {\n return Array.isArray(value) && typeof value[TYPE] === 'object';\n}\n\n/**\n * True if `value` is `LContainer`.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\nexport function isLContainer(value: RNode | LView | LContainer | {} | null): value is LContainer {\n return Array.isArray(value) && value[TYPE] === true;\n}\n\nexport function isContentQueryHost(tNode: TNode): boolean {\n return (tNode.flags & TNodeFlags.hasContentQuery) !== 0;\n}\n\nexport function isComponentHost(tNode: TNode): boolean {\n return tNode.componentOffset > -1;\n}\n\nexport function isDirectiveHost(tNode: TNode): boolean {\n return (tNode.flags & TNodeFlags.isDirectiveHost) === TNodeFlags.isDirectiveHost;\n}\n\nexport function isComponentDef<T>(def: DirectiveDef<T>): def is ComponentDef<T> {\n return !!(def as ComponentDef<T>).template;\n}\n\nexport function isRootView(target: LView): boolean {\n // Determines whether a given LView is marked as a root view.\n return (target[FLAGS] & LViewFlags.IsRoot) !== 0;\n}\n\nexport function isProjectionTNode(tNode: TNode): boolean {\n return (tNode.type & TNodeType.Projection) === TNodeType.Projection;\n}\n\nexport function hasI18n(lView: LView): boolean {\n return (lView[FLAGS] & LViewFlags.HasI18n) === LViewFlags.HasI18n;\n}\n\nexport function isDestroyed(lView: LView): boolean {\n // Determines whether a given LView is marked as destroyed.\n return (lView[FLAGS] & LViewFlags.Destroyed) === LViewFlags.Destroyed;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {RuntimeError, RuntimeErrorCode} from '../errors';\nimport {assertDefined, assertEqual, assertNumber, throwError} from '../util/assert';\n\nimport {getComponentDef, getNgModuleDef} from './def_getters';\nimport {LContainer} from './interfaces/container';\nimport {DirectiveDef} from './interfaces/definition';\nimport {TIcu} from './interfaces/i18n';\nimport {NodeInjectorOffset} from './interfaces/injector';\nimport {TNode} from './interfaces/node';\nimport {isLContainer, isLView} from './interfaces/type_checks';\nimport {\n DECLARATION_COMPONENT_VIEW,\n FLAGS,\n HEADER_OFFSET,\n LView,\n LViewFlags,\n T_HOST,\n TVIEW,\n TView,\n} from './interfaces/view';\n\n// [Assert functions do not constraint type when they are guarded by a truthy\n// expression.](https://github.com/microsoft/TypeScript/issues/37295)\n\nexport function assertTNodeForLView(tNode: TNode, lView: LView) {\n assertTNodeForTView(tNode, lView[TVIEW]);\n}\n\nexport function assertTNodeForTView(tNode: TNode, tView: TView) {\n assertTNode(tNode);\n const tData = tView.data;\n for (let i = HEADER_OFFSET; i < tData.length; i++) {\n if (tData[i] === tNode) {\n return;\n }\n }\n throwError('This TNode does not belong to this TView.');\n}\n\nexport function assertTNode(tNode: TNode) {\n assertDefined(tNode, 'TNode must be defined');\n if (!(tNode && typeof tNode === 'object' && tNode.hasOwnProperty('directiveStylingLast'))) {\n throwError('Not of type TNode, got: ' + tNode);\n }\n}\n\nexport function assertTIcu(tIcu: TIcu) {\n assertDefined(tIcu, 'Expected TIcu to be defined');\n if (!(typeof tIcu.currentCaseLViewIndex === 'number')) {\n throwError('Object is not of TIcu type.');\n }\n}\n\nexport function assertComponentType(\n actual: any,\n msg: string = \"Type passed in is not ComponentType, it does not have 'ɵcmp' property.\",\n) {\n if (!getComponentDef(actual)) {\n throwError(msg);\n }\n}\n\nexport function assertNgModuleType(\n actual: any,\n msg: string = \"Type passed in is not NgModuleType, it does not have 'ɵmod' property.\",\n) {\n if (!getNgModuleDef(actual)) {\n throwError(msg);\n }\n}\n\nexport function assertCurrentTNodeIsParent(isParent: boolean) {\n assertEqual(isParent, true, 'currentTNode should be a parent');\n}\n\nexport function assertHasParent(tNode: TNode | null) {\n assertDefined(tNode, 'currentTNode should exist!');\n assertDefined(tNode!.parent, 'currentTNode should have a parent');\n}\n\nexport function assertLContainer(value: any): asserts value is LContainer {\n assertDefined(value, 'LContainer must be defined');\n assertEqual(isLContainer(value), true, 'Expecting LContainer');\n}\n\nexport function assertLViewOrUndefined(value: any): asserts value is LView | null | undefined {\n value && assertEqual(isLView(value), true, 'Expecting LView or undefined or null');\n}\n\nexport function assertLView(value: any): asserts value is LView {\n assertDefined(value, 'LView must be defined');\n assertEqual(isLView(value), true, 'Expecting LView');\n}\n\nexport function assertFirstCreatePass(tView: TView, errMessage?: string) {\n assertEqual(\n tView.firstCreatePass,\n true,\n errMessage || 'Should only be called in first create pass.',\n );\n}\n\nexport function assertFirstUpdatePass(tView: TView, errMessage?: string) {\n assertEqual(\n tView.firstUpdatePass,\n true,\n errMessage || 'Should only be called in first update pass.',\n );\n}\n\n/**\n * This is a basic sanity check that an object is probably a directive def. DirectiveDef is\n * an interface, so we can't do a direct instanceof check.\n */\nexport function assertDirectiveDef<T>(obj: any): asserts obj is DirectiveDef<T> {\n if (obj.type === undefined || obj.selectors == undefined || obj.inputs === undefined) {\n throwError(\n `Expected a DirectiveDef/ComponentDef and this object does not seem to have the expected shape.`,\n );\n }\n}\n\nexport function assertIndexInDeclRange(tView: TView, index: number) {\n assertBetween(HEADER_OFFSET, tView.bindingStartIndex, index);\n}\n\nexport function assertIndexInExpandoRange(lView: LView, index: number) {\n const tView = lView[1];\n assertBetween(tView.expandoStartIndex, lView.length, index);\n}\n\nexport function assertBetween(lower: number, upper: number, index: number) {\n if (!(lower <= index && index < upper)) {\n throwError(`Index out of range (expecting ${lower} <= ${index} < ${upper})`);\n }\n}\n\nexport function assertProjectionSlots(lView: LView, errMessage?: string) {\n assertDefined(lView[DECLARATION_COMPONENT_VIEW], 'Component views should exist.');\n assertDefined(\n lView[DECLARATION_COMPONENT_VIEW][T_HOST]!.projection,\n errMessage ||\n 'Components with projection nodes (<ng-content>) must have projection slots defined.',\n );\n}\n\nexport function assertParentView(lView: LView | null, errMessage?: string) {\n assertDefined(\n lView,\n errMessage || \"Component views should always have a parent view (component's host view)\",\n );\n}\n\nexport function assertNoDuplicateDirectives(directives: DirectiveDef<unknown>[]): void {\n // The array needs at least two elements in order to have duplicates.\n if (directives.length < 2) {\n return;\n }\n\n const seenDirectives = new Set<DirectiveDef<unknown>>();\n\n for (const current of directives) {\n if (seenDirectives.has(current)) {\n throw new RuntimeError(\n RuntimeErrorCode.DUPLICATE_DIRECTIVE,\n `Directive ${current.type.name} matches multiple times on the same element. ` +\n `Directives can only match an element once.`,\n );\n }\n seenDirectives.add(current);\n }\n}\n\n/**\n * This is a basic sanity check that the `injectorIndex` seems to point to what looks like a\n * NodeInjector data structure.\n *\n * @param lView `LView` which should be checked.\n * @param injectorIndex index into the `LView` where the `NodeInjector` is expected.\n */\nexport function assertNodeInjector(lView: LView, injectorIndex: number) {\n assertIndexInExpandoRange(lView, injectorIndex);\n assertIndexInExpandoRange(lView, injectorIndex + NodeInjectorOffset.PARENT);\n assertNumber(lView[injectorIndex + 0], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 1], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 2], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 3], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 4], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 5], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 6], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 7], 'injectorIndex should point to a bloom filter');\n assertNumber(\n lView[injectorIndex + NodeInjectorOffset.PARENT],\n 'injectorIndex should point to parent injector',\n );\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/**\n * Represents a basic change from a previous to a new value for a single\n * property on a directive instance. Passed as a value in a\n * {@link SimpleChanges} object to the `ngOnChanges` hook.\n *\n * @see {@link OnChanges}\n *\n * @publicApi\n */\nexport class SimpleChange {\n constructor(\n public previousValue: any,\n public currentValue: any,\n public firstChange: boolean,\n ) {}\n /**\n * Check whether the new value is the first value assigned.\n */\n isFirstChange(): boolean {\n return this.firstChange;\n }\n}\n\n/**\n * A hashtable of changes represented by {@link SimpleChange} objects stored\n * at the declared property name they belong to on a Directive or Component. This is\n * the type passed to the `ngOnChanges` hook.\n *\n * @see {@link OnChanges}\n *\n * @publicApi\n */\nexport interface SimpleChanges {\n [propName: string]: SimpleChange;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {InputSignalNode} from '../authoring/input/input_signal_node';\n\nexport function applyValueToInputField<T>(\n instance: T,\n inputSignalNode: null | InputSignalNode<unknown, unknown>,\n privateName: string,\n value: unknown,\n) {\n if (inputSignalNode !== null) {\n inputSignalNode.applyValueToInputSignal(inputSignalNode, value);\n } else {\n (instance as any)[privateName] = value;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {InputSignalNode} from '../../authoring/input/input_signal_node';\nimport {OnChanges} from '../../interface/lifecycle_hooks';\nimport {SimpleChange, SimpleChanges} from '../../interface/simple_change';\nimport {assertString} from '../../util/assert';\nimport {EMPTY_OBJ} from '../../util/empty';\nimport {applyValueToInputField} from '../apply_value_input_field';\nimport {DirectiveDef, DirectiveDefFeature} from '../interfaces/definition';\n\n/**\n * The NgOnChangesFeature decorates a component with support for the ngOnChanges\n * lifecycle hook, so it should be included in any component that implements\n * that hook.\n *\n * If the component or directive uses inheritance, the NgOnChangesFeature MUST\n * be included as a feature AFTER {@link InheritDefinitionFeature}, otherwise\n * inherited properties will not be propagated to the ngOnChanges lifecycle\n * hook.\n *\n * Example usage:\n *\n * ```ts\n * static ɵcmp = defineComponent({\n * ...\n * inputs: {name: 'publicName'},\n * features: [NgOnChangesFeature]\n * });\n * ```\n *\n * @codeGenApi\n */\nexport const ɵɵNgOnChangesFeature: () => DirectiveDefFeature = /* @__PURE__ */ (() => {\n const ɵɵNgOnChangesFeatureImpl = () => NgOnChangesFeatureImpl;\n\n // This option ensures that the ngOnChanges lifecycle hook will be inherited\n // from superclasses (in InheritDefinitionFeature).\n /** @nocollapse */\n ɵɵNgOnChangesFeatureImpl.ngInherit = true;\n\n return ɵɵNgOnChangesFeatureImpl;\n})();\n\nexport function NgOnChangesFeatureImpl<T>(definition: DirectiveDef<T>) {\n if (definition.type.prototype.ngOnChanges) {\n definition.setInput = ngOnChangesSetInput;\n }\n return rememberChangeHistoryAndInvokeOnChangesHook;\n}\n\n/**\n * This is a synthetic lifecycle hook which gets inserted into `TView.preOrderHooks` to simulate\n * `ngOnChanges`.\n *\n * The hook reads the `NgSimpleChangesStore` data from the component instance and if changes are\n * found it invokes `ngOnChanges` on the component instance.\n *\n * @param this Component instance. Because this function gets inserted into `TView.preOrderHooks`,\n * it is guaranteed to be called with component instance.\n */\nfunction rememberChangeHistoryAndInvokeOnChangesHook(this: OnChanges) {\n const simpleChangesStore = getSimpleChangesStore(this);\n const current = simpleChangesStore?.current;\n\n if (current) {\n const previous = simpleChangesStore!.previous;\n if (previous === EMPTY_OBJ) {\n simpleChangesStore!.previous = current;\n } else {\n // New changes are copied to the previous store, so that we don't lose history for inputs\n // which were not changed this time\n for (let key in current) {\n previous[key] = current[key];\n }\n }\n simpleChangesStore!.current = null;\n this.ngOnChanges(current);\n }\n}\n\nfunction ngOnChangesSetInput<T>(\n this: DirectiveDef<T>,\n instance: T,\n inputSignalNode: null | InputSignalNode<unknown, unknown>,\n value: unknown,\n publicName: string,\n privateName: string,\n): void {\n const declaredName = (this.declaredInputs as {[key: string]: string})[publicName];\n ngDevMode && assertString(declaredName, 'Name of input in ngOnChanges has to be a string');\n const simpleChangesStore =\n getSimpleChangesStore(instance) ||\n setSimpleChangesStore(instance, {previous: EMPTY_OBJ, current: null});\n const current = simpleChangesStore.current || (simpleChangesStore.current = {});\n const previous = simpleChangesStore.previous;\n const previousChange = previous[declaredName];\n current[declaredName] = new SimpleChange(\n previousChange && previousChange.currentValue,\n value,\n previous === EMPTY_OBJ,\n );\n\n applyValueToInputField(instance, inputSignalNode, privateName, value);\n}\n\nconst SIMPLE_CHANGES_STORE = '__ngSimpleChanges__';\n\nfunction getSimpleChangesStore(instance: any): null | NgSimpleChangesStore {\n return instance[SIMPLE_CHANGES_STORE] || null;\n}\n\nfunction setSimpleChangesStore(instance: any, store: NgSimpleChangesStore): NgSimpleChangesStore {\n return (instance[SIMPLE_CHANGES_STORE] = store);\n}\n\n/**\n * Data structure which is monkey-patched on the component instance and used by `ngOnChanges`\n * life-cycle hook to track previous input values.\n */\ninterface NgSimpleChangesStore {\n previous: SimpleChanges;\n current: SimpleChanges | null;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {type Profiler} from './profiler_types';\n\nlet profilerCallback: Profiler | null = null;\n\n/**\n * Sets the callback function which will be invoked before and after performing certain actions at\n * runtime (for example, before and after running change detection).\n *\n * Warning: this function is *INTERNAL* and should not be relied upon in application's code.\n * The contract of the function might be changed in any release and/or the function can be removed\n * completely.\n *\n * @param profiler function provided by the caller or null value to disable profiling.\n */\nexport const setProfiler = (profiler: Profiler | null) => {\n profilerCallback = profiler;\n};\n\n/**\n * Profiler function which wraps user code executed by the runtime.\n *\n * @param event ProfilerEvent corresponding to the execution context\n * @param instance component instance\n * @param hookOrListener lifecycle hook function or output listener. The value depends on the\n * execution context\n * @returns\n */\nexport const profiler: Profiler = function (event, instance = null, hookOrListener) {\n if (profilerCallback != null /* both `null` and `undefined` */) {\n profilerCallback(event, instance, hookOrListener);\n }\n};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nexport const SVG_NAMESPACE = 'svg';\nexport const MATH_ML_NAMESPACE = 'math';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {NotificationSource} from '../../change_detection/scheduling/zoneless_scheduling';\nimport {RuntimeError, RuntimeErrorCode} from '../../errors';\nimport {\n assertDefined,\n assertGreaterThan,\n assertGreaterThanOrEqual,\n assertIndexInRange,\n assertLessThan,\n} from '../../util/assert';\nimport {assertLView, assertTNode, assertTNodeForLView} from '../assert';\nimport {LContainer, TYPE} from '../interfaces/container';\nimport {TConstants, TNode} from '../interfaces/node';\nimport {RNode} from '../interfaces/renderer_dom';\nimport {isDestroyed, isLContainer, isLView} from '../interfaces/type_checks';\nimport {\n CLEANUP,\n DECLARATION_VIEW,\n ENVIRONMENT,\n FLAGS,\n HEADER_OFFSET,\n HOST,\n LView,\n LViewFlags,\n ON_DESTROY_HOOKS,\n PARENT,\n PREORDER_HOOK_FLAGS,\n PreOrderHookFlags,\n REACTIVE_TEMPLATE_CONSUMER,\n TData,\n TView,\n} from '../interfaces/view';\n\n/**\n * For efficiency reasons we often put several different data types (`RNode`, `LView`, `LContainer`)\n * in same location in `LView`. This is because we don't want to pre-allocate space for it\n * because the storage is sparse. This file contains utilities for dealing with such data types.\n *\n * How do we know what is stored at a given location in `LView`.\n * - `Array.isArray(value) === false` => `RNode` (The normal storage value)\n * - `Array.isArray(value) === true` => then the `value[0]` represents the wrapped value.\n * - `typeof value[TYPE] === 'object'` => `LView`\n * - This happens when we have a component at a given location\n * - `typeof value[TYPE] === true` => `LContainer`\n * - This happens when we have `LContainer` binding at a given location.\n *\n *\n * NOTE: it is assumed that `Array.isArray` and `typeof` operations are very efficient.\n */\n\n/**\n * Returns `RNode`.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\nexport function unwrapRNode(value: RNode | LView | LContainer): RNode {\n while (Array.isArray(value)) {\n value = value[HOST] as any;\n }\n return value as RNode;\n}\n\n/**\n * Returns `LView` or `null` if not found.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\nexport function unwrapLView(value: RNode | LView | LContainer): LView | null {\n while (Array.isArray(value)) {\n // This check is same as `isLView()` but we don't call at as we don't want to call\n // `Array.isArray()` twice and give JITer more work for inlining.\n if (typeof value[TYPE] === 'object') return value as LView;\n value = value[HOST] as any;\n }\n return null;\n}\n\n/**\n * Retrieves an element value from the provided `viewData`, by unwrapping\n * from any containers, component views, or style contexts.\n */\nexport function getNativeByIndex(index: number, lView: LView): RNode {\n ngDevMode && assertIndexInRange(lView, index);\n ngDevMode && assertGreaterThanOrEqual(index, HEADER_OFFSET, 'Expected to be past HEADER_OFFSET');\n return unwrapRNode(lView[index]);\n}\n\n/**\n * Retrieve an `RNode` for a given `TNode` and `LView`.\n *\n * This function guarantees in dev mode to retrieve a non-null `RNode`.\n *\n * @param tNode\n * @param lView\n */\nexport function getNativeByTNode(tNode: TNode, lView: LView): RNode {\n ngDevMode && assertTNodeForLView(tNode, lView);\n ngDevMode && assertIndexInRange(lView, tNode.index);\n const node: RNode = unwrapRNode(lView[tNode.index]);\n return node;\n}\n\n/**\n * Retrieve an `RNode` or `null` for a given `TNode` and `LView`.\n *\n * Some `TNode`s don't have associated `RNode`s. For example `Projection`\n *\n * @param tNode\n * @param lView\n */\nexport function getNativeByTNodeOrNull(tNode: TNode | null, lView: LView): RNode | null {\n const index = tNode === null ? -1 : tNode.index;\n if (index !== -1) {\n ngDevMode && assertTNodeForLView(tNode!, lView);\n const node: RNode | null = unwrapRNode(lView[index]);\n return node;\n }\n return null;\n}\n\n// fixme(misko): The return Type should be `TNode|null`\nexport function getTNode(tView: TView, index: number): TNode {\n ngDevMode && assertGreaterThan(index, -1, 'wrong index for TNode');\n ngDevMode && assertLessThan(index, tView.data.length, 'wrong index for TNode');\n const tNode = tView.data[index] as TNode;\n ngDevMode && tNode !== null && assertTNode(tNode);\n return tNode;\n}\n\n/** Retrieves a value from any `LView` or `TData`. */\nexport function load<T>(view: LView | TData, index: number): T {\n ngDevMode && assertIndexInRange(view, index);\n return view[index];\n}\n\n/** Store a value in the `data` at a given `index`. */\nexport function store<T>(tView: TView, lView: LView, index: number, value: T): void {\n // We don't store any static data for local variables, so the first time\n // we see the template, we should store as null to avoid a sparse array\n if (index >= tView.data.length) {\n tView.data[index] = null;\n tView.blueprint[index] = null;\n }\n lView[index] = value;\n}\n\nexport function getComponentLViewByIndex(nodeIndex: number, hostView: LView): LView {\n // Could be an LView or an LContainer. If LContainer, unwrap to find LView.\n ngDevMode && assertIndexInRange(hostView, nodeIndex);\n const slotValue = hostView[nodeIndex];\n const lView = isLView(slotValue) ? slotValue : slotValue[HOST];\n return lView;\n}\n\n/** Checks whether a given view is in creation mode */\nexport function isCreationMode(view: LView): boolean {\n return (view[FLAGS] & LViewFlags.CreationMode) === LViewFlags.CreationMode;\n}\n\n/**\n * Returns a boolean for whether the view is attached to the change detection tree.\n *\n * Note: This determines whether a view should be checked, not whether it's inserted\n * into a container. For that, you'll want `viewAttachedToContainer` below.\n */\nexport function viewAttachedToChangeDetector(view: LView): boolean {\n return (view[FLAGS] & LViewFlags.Attached) === LViewFlags.Attached;\n}\n\n/** Returns a boolean for whether the view is attached to a container. */\nexport function viewAttachedToContainer(view: LView): boolean {\n return isLContainer(view[PARENT]);\n}\n\n/** Returns a constant from `TConstants` instance. */\nexport function getConstant<T>(consts: TConstants | null, index: null | undefined): null;\nexport function getConstant<T>(consts: TConstants, index: number): T | null;\nexport function getConstant<T>(\n consts: TConstants | null,\n index: number | null | undefined,\n): T | null;\nexport function getConstant<T>(\n consts: TConstants | null,\n index: number | null | undefined,\n): T | null {\n if (index === null || index === undefined) return null;\n ngDevMode && assertIndexInRange(consts!, index);\n return consts![index] as unknown as T;\n}\n\n/**\n * Resets the pre-order hook flags of the view.\n * @param lView the LView on which the flags are reset\n */\nexport function resetPreOrderHookFlags(lView: LView) {\n lView[PREORDER_HOOK_FLAGS] = 0 as PreOrderHookFlags;\n}\n\n/**\n * Adds the `RefreshView` flag from the lView and updates HAS_CHILD_VIEWS_TO_REFRESH flag of\n * parents.\n */\nexport function markViewForRefresh(lView: LView) {\n if (lView[FLAGS] & LViewFlags.RefreshView) {\n return;\n }\n lView[FLAGS] |= LViewFlags.RefreshView;\n if (viewAttachedToChangeDetector(lView)) {\n markAncestorsForTraversal(lView);\n }\n}\n\n/**\n * Walks up the LView hierarchy.\n * @param nestingLevel Number of times to walk up in hierarchy.\n * @param currentView View from which to start the lookup.\n */\nexport function walkUpViews(nestingLevel: number, currentView: LView): LView {\n while (nestingLevel > 0) {\n ngDevMode &&\n assertDefined(\n currentView[DECLARATION_VIEW],\n 'Declaration view should be defined if nesting level is greater than 0.',\n );\n currentView = currentView[DECLARATION_VIEW]!;\n nestingLevel--;\n }\n return currentView;\n}\n\nexport function requiresRefreshOrTraversal(lView: LView) {\n return !!(\n lView[FLAGS] & (LViewFlags.RefreshView | LViewFlags.HasChildViewsToRefresh) ||\n lView[REACTIVE_TEMPLATE_CONSUMER]?.dirty\n );\n}\n\n/**\n * Updates the `HasChildViewsToRefresh` flag on the parents of the `LView` as well as the\n * parents above.\n */\nexport function updateAncestorTraversalFlagsOnAttach(lView: LView) {\n lView[ENVIRONMENT].changeDetectionScheduler?.notify(NotificationSource.ViewAttached);\n if (lView[FLAGS] & LViewFlags.Dirty) {\n lView[FLAGS] |= LViewFlags.RefreshView;\n }\n if (requiresRefreshOrTraversal(lView)) {\n markAncestorsForTraversal(lView);\n }\n}\n\n/**\n * Ensures views above the given `lView` are traversed during change detection even when they are\n * not dirty.\n *\n * This is done by setting the `HAS_CHILD_VIEWS_TO_REFRESH` flag up to the root, stopping when the\n * flag is already `true` or the `lView` is detached.\n */\nexport function markAncestorsForTraversal(lView: LView) {\n lView[ENVIRONMENT].changeDetectionScheduler?.notify(NotificationSource.MarkAncestorsForTraversal);\n let parent = getLViewParent(lView);\n while (parent !== null) {\n // We stop adding markers to the ancestors once we reach one that already has the marker. This\n // is to avoid needlessly traversing all the way to the root when the marker already exists.\n if (parent[FLAGS] & LViewFlags.HasChildViewsToRefresh) {\n break;\n }\n\n parent[FLAGS] |= LViewFlags.HasChildViewsToRefresh;\n if (!viewAttachedToChangeDetector(parent)) {\n break;\n }\n parent = getLViewParent(parent);\n }\n}\n\n/**\n * Stores a LView-specific destroy callback.\n */\nexport function storeLViewOnDestroy(lView: LView, onDestroyCallback: () => void) {\n if (isDestroyed(lView)) {\n throw new RuntimeError(\n RuntimeErrorCode.VIEW_ALREADY_DESTROYED,\n ngDevMode && 'View has already been destroyed.',\n );\n }\n if (lView[ON_DESTROY_HOOKS] === null) {\n lView[ON_DESTROY_HOOKS] = [];\n }\n lView[ON_DESTROY_HOOKS].push(onDestroyCallback);\n}\n\n/**\n * Removes previously registered LView-specific destroy callback.\n */\nexport function removeLViewOnDestroy(lView: LView, onDestroyCallback: () => void) {\n if (lView[ON_DESTROY_HOOKS] === null) return;\n\n const destroyCBIdx = lView[ON_DESTROY_HOOKS].indexOf(onDestroyCallback);\n if (destroyCBIdx !== -1) {\n lView[ON_DESTROY_HOOKS].splice(destroyCBIdx, 1);\n }\n}\n\n/**\n * Gets the parent LView of the passed LView, if the PARENT is an LContainer, will get the parent of\n * that LContainer, which is an LView\n * @param lView the lView whose parent to get\n */\nexport function getLViewParent(lView: LView): LView | null {\n ngDevMode && assertLView(lView);\n const parent = lView[PARENT];\n return isLContainer(parent) ? parent[PARENT] : parent;\n}\n\nexport function getOrCreateLViewCleanup(view: LView): any[] {\n // top level variables should not be exported for performance reasons (PERF_NOTES.md)\n return (view[CLEANUP] ??= []);\n}\n\nexport function getOrCreateTViewCleanup(tView: TView): any[] {\n return (tView.cleanup ??= []);\n}\n\n/**\n * Saves context for this cleanup function in LView.cleanupInstances.\n *\n * On the first template pass, saves in TView:\n * - Cleanup function\n * - Index of context we just saved in LView.cleanupInstances\n */\nexport function storeCleanupWithContext(\n tView: TView,\n lView: LView,\n context: any,\n cleanupFn: Function,\n): void {\n const lCleanup = getOrCreateLViewCleanup(lView);\n\n // Historically the `storeCleanupWithContext` was used to register both framework-level and\n // user-defined cleanup callbacks, but over time those two types of cleanups were separated.\n // This dev mode checks assures that user-level cleanup callbacks are _not_ stored in data\n // structures reserved for framework-specific hooks.\n ngDevMode &&\n assertDefined(\n context,\n 'Cleanup context is mandatory when registering framework-level destroy hooks',\n );\n lCleanup.push(context);\n\n if (tView.firstCreatePass) {\n getOrCreateTViewCleanup(tView).push(cleanupFn, lCleanup.length - 1);\n } else {\n // Make sure that no new framework-level cleanup functions are registered after the first\n // template pass is done (and TView data structures are meant to fully constructed).\n if (ngDevMode) {\n Object.freeze(getOrCreateTViewCleanup(tView));\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {InjectFlags} from '../di/interface/injector';\nimport {\n assertDefined,\n assertEqual,\n assertGreaterThanOrEqual,\n assertLessThan,\n assertNotEqual,\n throwError,\n} from '../util/assert';\n\nimport {assertLViewOrUndefined, assertTNodeForLView, assertTNodeForTView} from './assert';\nimport {DirectiveDef} from './interfaces/definition';\nimport {TNode, TNodeType} from './interfaces/node';\nimport {\n CONTEXT,\n DECLARATION_VIEW,\n HEADER_OFFSET,\n LView,\n OpaqueViewState,\n T_HOST,\n TData,\n TVIEW,\n TView,\n TViewType,\n} from './interfaces/view';\nimport {MATH_ML_NAMESPACE, SVG_NAMESPACE} from './namespaces';\nimport {getTNode, walkUpViews} from './util/view_utils';\n\n/**\n *\n */\ninterface LFrame {\n /**\n * Parent LFrame.\n *\n * This is needed when `leaveView` is called to restore the previous state.\n */\n parent: LFrame;\n\n /**\n * Child LFrame.\n *\n * This is used to cache existing LFrames to relieve the memory pressure.\n */\n child: LFrame | null;\n\n /**\n * State of the current view being processed.\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 */\n lView: LView;\n\n /**\n * Current `TView` associated with the `LFrame.lView`.\n *\n * One can get `TView` from `lFrame[TVIEW]` however because it is so common it makes sense to\n * store it in `LFrame` for perf reasons.\n */\n tView: TView;\n\n /**\n * Used to set the parent property when nodes are created and track query results.\n *\n * This is used in conjunction with `isParent`.\n */\n currentTNode: TNode | null;\n\n /**\n * If `isParent` is:\n * - `true`: then `currentTNode` points to a parent node.\n * - `false`: then `currentTNode` points to previous node (sibling).\n */\n isParent: boolean;\n\n /**\n * Index of currently selected element in LView.\n *\n * Used by binding instructions. Updated as part of advance instruction.\n */\n selectedIndex: number;\n\n /**\n * Current pointer to the binding index.\n */\n bindingIndex: number;\n\n /**\n * The last viewData retrieved by nextContext().\n * Allows building nextContext() and reference() calls.\n *\n * e.g. const inner = x().$implicit; const outer = x().$implicit;\n */\n contextLView: LView | null;\n\n /**\n * Store the element depth count. This is used to identify the root elements of the template\n * so that we can then attach patch data `LView` to only those elements. We know that those\n * are the only places where the patch data could change, this way we will save on number\n * of places where tha patching occurs.\n */\n elementDepthCount: number;\n\n /**\n * Current namespace to be used when creating elements\n */\n currentNamespace: string | null;\n\n /**\n * The root index from which pure function instructions should calculate their binding\n * indices. In component views, this is TView.bindingStartIndex. In a host binding\n * context, this is the TView.expandoStartIndex + any dirs/hostVars before the given dir.\n */\n bindingRootIndex: number;\n\n /**\n * Current index of a View or Content Query which needs to be processed next.\n * We iterate over the list of Queries and increment current query index at every step.\n */\n currentQueryIndex: number;\n\n /**\n * When host binding is executing this points to the directive index.\n * `TView.data[currentDirectiveIndex]` is `DirectiveDef`\n * `LView[currentDirectiveIndex]` is directive instance.\n */\n currentDirectiveIndex: number;\n\n /**\n * Are we currently in i18n block as denoted by `ɵɵelementStart` and `ɵɵelementEnd`.\n *\n * This information is needed because while we are in i18n block all elements must be pre-declared\n * in the translation. (i.e. `Hello �#2�World�/#2�!` pre-declares element at `�#2�` location.)\n * This allocates `TNodeType.Placeholder` element at location `2`. If translator removes `�#2�`\n * from translation than the runtime must also ensure tha element at `2` does not get inserted\n * into the DOM. The translation does not carry information about deleted elements. Therefor the\n * only way to know that an element is deleted is that it was not pre-declared in the translation.\n *\n * This flag works by ensuring that elements which are created without pre-declaration\n * (`TNodeType.Placeholder`) are not inserted into the DOM render tree. (It does mean that the\n * element still gets instantiated along with all of its behavior [directives])\n */\n inI18n: boolean;\n}\n\n/**\n * All implicit instruction state is stored here.\n *\n * It is useful to have a single object where all of the state is stored as a mental model\n * (rather it being spread across many different variables.)\n *\n * PERF NOTE: Turns out that writing to a true global variable is slower than\n * having an intermediate object with properties.\n */\ninterface InstructionState {\n /**\n * Current `LFrame`\n *\n * `null` if we have not called `enterView`\n */\n lFrame: LFrame;\n\n /**\n * Stores whether directives should be matched to elements.\n *\n * When template contains `ngNonBindable` then we need to prevent the runtime from matching\n * directives on children of that element.\n *\n * Example:\n * ```html\n * <my-comp my-directive>\n * Should match component / directive.\n * </my-comp>\n * <div ngNonBindable>\n * <my-comp my-directive>\n * Should not match component / directive because we are in ngNonBindable.\n * </my-comp>\n * </div>\n * ```\n */\n bindingsEnabled: boolean;\n\n /**\n * Stores the root TNode that has the 'ngSkipHydration' attribute on it for later reference.\n *\n * Example:\n * ```html\n * <my-comp ngSkipHydration>\n * Should reference this root node\n * </my-comp>\n * ```\n */\n skipHydrationRootTNode: TNode | null;\n}\n\nconst instructionState: InstructionState = {\n lFrame: createLFrame(null),\n bindingsEnabled: true,\n skipHydrationRootTNode: null,\n};\n\nexport enum CheckNoChangesMode {\n Off,\n Exhaustive,\n OnlyDirtyViews,\n}\n\n/**\n * In this mode, any changes in bindings will throw an ExpressionChangedAfterChecked error.\n *\n * Necessary to support ChangeDetectorRef.checkNoChanges().\n *\n * The `checkNoChanges` function is invoked only in ngDevMode=true and verifies that no unintended\n * changes exist in the change detector or its children.\n */\nlet _checkNoChangesMode: CheckNoChangesMode = 0; /* CheckNoChangesMode.Off */\n\n/**\n * Flag used to indicate that we are in the middle running change detection on a view\n *\n * @see detectChangesInViewWhileDirty\n */\nlet _isRefreshingViews = false;\n\n/**\n * Returns true if the instruction state stack is empty.\n *\n * Intended to be called from tests only (tree shaken otherwise).\n */\nexport function specOnlyIsInstructionStateEmpty(): boolean {\n return instructionState.lFrame.parent === null;\n}\n\nexport function getElementDepthCount() {\n return instructionState.lFrame.elementDepthCount;\n}\n\nexport function increaseElementDepthCount() {\n instructionState.lFrame.elementDepthCount++;\n}\n\nexport function decreaseElementDepthCount() {\n instructionState.lFrame.elementDepthCount--;\n}\n\nexport function getBindingsEnabled(): boolean {\n return instructionState.bindingsEnabled;\n}\n\n/**\n * Returns true if currently inside a skip hydration block.\n * @returns boolean\n */\nexport function isInSkipHydrationBlock(): boolean {\n return instructionState.skipHydrationRootTNode !== null;\n}\n\n/**\n * Returns true if this is the root TNode of the skip hydration block.\n * @param tNode the current TNode\n * @returns boolean\n */\nexport function isSkipHydrationRootTNode(tNode: TNode): boolean {\n return instructionState.skipHydrationRootTNode === tNode;\n}\n\n/**\n * Enables directive matching on elements.\n *\n * * Example:\n * ```html\n * <my-comp my-directive>\n * Should match component / directive.\n * </my-comp>\n * <div ngNonBindable>\n * <!-- ɵɵdisableBindings() -->\n * <my-comp my-directive>\n * Should not match component / directive because we are in ngNonBindable.\n * </my-comp>\n * <!-- ɵɵenableBindings() -->\n * </div>\n * ```\n *\n * @codeGenApi\n */\nexport function ɵɵenableBindings(): void {\n instructionState.bindingsEnabled = true;\n}\n\n/**\n * Sets a flag to specify that the TNode is in a skip hydration block.\n * @param tNode the current TNode\n */\nexport function enterSkipHydrationBlock(tNode: TNode): void {\n instructionState.skipHydrationRootTNode = tNode;\n}\n\n/**\n * Disables directive matching on element.\n *\n * * Example:\n * ```html\n * <my-comp my-directive>\n * Should match component / directive.\n * </my-comp>\n * <div ngNonBindable>\n * <!-- ɵɵdisableBindings() -->\n * <my-comp my-directive>\n * Should not match component / directive because we are in ngNonBindable.\n * </my-comp>\n * <!-- ɵɵenableBindings() -->\n * </div>\n * ```\n *\n * @codeGenApi\n */\nexport function ɵɵdisableBindings(): void {\n instructionState.bindingsEnabled = false;\n}\n\n/**\n * Clears the root skip hydration node when leaving a skip hydration block.\n */\nexport function leaveSkipHydrationBlock(): void {\n instructionState.skipHydrationRootTNode = null;\n}\n\n/**\n * Return the current `LView`.\n */\nexport function getLView<T>(): LView<T> {\n return instructionState.lFrame.lView as LView<T>;\n}\n\n/**\n * Return the current `TView`.\n */\nexport function getTView(): TView {\n return instructionState.lFrame.tView;\n}\n\n/**\n * Restores `contextViewData` to the given OpaqueViewState instance.\n *\n * Used in conjunction with the getCurrentView() instruction to save a snapshot\n * of the current view and restore it when listeners are invoked. This allows\n * walking the declaration view tree in listeners to get vars from parent views.\n *\n * @param viewToRestore The OpaqueViewState instance to restore.\n * @returns Context of the restored OpaqueViewState instance.\n *\n * @codeGenApi\n */\nexport function ɵɵrestoreView<T = any>(viewToRestore: OpaqueViewState): T {\n instructionState.lFrame.contextLView = viewToRestore as any as LView;\n return (viewToRestore as any as LView)[CONTEXT] as unknown as T;\n}\n\n/**\n * Clears the view set in `ɵɵrestoreView` from memory. Returns the passed in\n * value so that it can be used as a return value of an instruction.\n *\n * @codeGenApi\n */\nexport function ɵɵresetView<T>(value?: T): T | undefined {\n instructionState.lFrame.contextLView = null;\n return value;\n}\n\nexport function getCurrentTNode(): TNode | null {\n let currentTNode = getCurrentTNodePlaceholderOk();\n while (currentTNode !== null && currentTNode.type === TNodeType.Placeholder) {\n currentTNode = currentTNode.parent;\n }\n return currentTNode;\n}\n\nexport function getCurrentTNodePlaceholderOk(): TNode | null {\n return instructionState.lFrame.currentTNode;\n}\n\nexport function getCurrentParentTNode(): TNode | null {\n const lFrame = instructionState.lFrame;\n const currentTNode = lFrame.currentTNode;\n return lFrame.isParent ? currentTNode : currentTNode!.parent;\n}\n\nexport function setCurrentTNode(tNode: TNode | null, isParent: boolean) {\n ngDevMode && tNode && assertTNodeForTView(tNode, instructionState.lFrame.tView);\n const lFrame = instructionState.lFrame;\n lFrame.currentTNode = tNode;\n lFrame.isParent = isParent;\n}\n\nexport function isCurrentTNodeParent(): boolean {\n return instructionState.lFrame.isParent;\n}\n\nexport function setCurrentTNodeAsNotParent(): void {\n instructionState.lFrame.isParent = false;\n}\n\nexport function getContextLView(): LView {\n const contextLView = instructionState.lFrame.contextLView;\n ngDevMode && assertDefined(contextLView, 'contextLView must be defined.');\n return contextLView!;\n}\n\nexport function isInCheckNoChangesMode(): boolean {\n !ngDevMode && throwError('Must never be called in production mode');\n return _checkNoChangesMode !== CheckNoChangesMode.Off;\n}\n\nexport function isExhaustiveCheckNoChanges(): boolean {\n !ngDevMode && throwError('Must never be called in production mode');\n return _checkNoChangesMode === CheckNoChangesMode.Exhaustive;\n}\n\nexport function setIsInCheckNoChangesMode(mode: CheckNoChangesMode): void {\n !ngDevMode && throwError('Must never be called in production mode');\n _checkNoChangesMode = mode;\n}\n\nexport function isRefreshingViews(): boolean {\n return _isRefreshingViews;\n}\n\nexport function setIsRefreshingViews(mode: boolean): boolean {\n const prev = _isRefreshingViews;\n _isRefreshingViews = mode;\n return prev;\n}\n\n// top level variables should not be exported for performance reasons (PERF_NOTES.md)\nexport function getBindingRoot() {\n const lFrame = instructionState.lFrame;\n let index = lFrame.bindingRootIndex;\n if (index === -1) {\n index = lFrame.bindingRootIndex = lFrame.tView.bindingStartIndex;\n }\n return index;\n}\n\nexport function getBindingIndex(): number {\n return instructionState.lFrame.bindingIndex;\n}\n\nexport function setBindingIndex(value: number): number {\n return (instructionState.lFrame.bindingIndex = value);\n}\n\nexport function nextBindingIndex(): number {\n return instructionState.lFrame.bindingIndex++;\n}\n\nexport function incrementBindingIndex(count: number): number {\n const lFrame = instructionState.lFrame;\n const index = lFrame.bindingIndex;\n lFrame.bindingIndex = lFrame.bindingIndex + count;\n return index;\n}\n\nexport function isInI18nBlock() {\n return instructionState.lFrame.inI18n;\n}\n\nexport function setInI18nBlock(isInI18nBlock: boolean): void {\n instructionState.lFrame.inI18n = isInI18nBlock;\n}\n\n/**\n * Set a new binding root index so that host template functions can execute.\n *\n * Bindings inside the host template are 0 index. But because we don't know ahead of time\n * how many host bindings we have we can't pre-compute them. For this reason they are all\n * 0 index and we just shift the root so that they match next available location in the LView.\n *\n * @param bindingRootIndex Root index for `hostBindings`\n * @param currentDirectiveIndex `TData[currentDirectiveIndex]` will point to the current directive\n * whose `hostBindings` are being processed.\n */\nexport function setBindingRootForHostBindings(\n bindingRootIndex: number,\n currentDirectiveIndex: number,\n) {\n const lFrame = instructionState.lFrame;\n lFrame.bindingIndex = lFrame.bindingRootIndex = bindingRootIndex;\n setCurrentDirectiveIndex(currentDirectiveIndex);\n}\n\n/**\n * When host binding is executing this points to the directive index.\n * `TView.data[getCurrentDirectiveIndex()]` is `DirectiveDef`\n * `LView[getCurrentDirectiveIndex()]` is directive instance.\n */\nexport function getCurrentDirectiveIndex(): number {\n return instructionState.lFrame.currentDirectiveIndex;\n}\n\n/**\n * Sets an index of a directive whose `hostBindings` are being processed.\n *\n * @param currentDirectiveIndex `TData` index where current directive instance can be found.\n */\nexport function setCurrentDirectiveIndex(currentDirectiveIndex: number): void {\n instructionState.lFrame.currentDirectiveIndex = currentDirectiveIndex;\n}\n\n/**\n * Retrieve the current `DirectiveDef` which is active when `hostBindings` instruction is being\n * executed.\n *\n * @param tData Current `TData` where the `DirectiveDef` will be looked up at.\n */\nexport function getCurrentDirectiveDef(tData: TData): DirectiveDef<any> | null {\n const currentDirectiveIndex = instructionState.lFrame.currentDirectiveIndex;\n return currentDirectiveIndex === -1 ? null : (tData[currentDirectiveIndex] as DirectiveDef<any>);\n}\n\nexport function getCurrentQueryIndex(): number {\n return instructionState.lFrame.currentQueryIndex;\n}\n\nexport function setCurrentQueryIndex(value: number): void {\n instructionState.lFrame.currentQueryIndex = value;\n}\n\n/**\n * Returns a `TNode` of the location where the current `LView` is declared at.\n *\n * @param lView an `LView` that we want to find parent `TNode` for.\n */\nfunction getDeclarationTNode(lView: LView): TNode | null {\n const tView = lView[TVIEW];\n\n // Return the declaration parent for embedded views\n if (tView.type === TViewType.Embedded) {\n ngDevMode && assertDefined(tView.declTNode, 'Embedded TNodes should have declaration parents.');\n return tView.declTNode;\n }\n\n // Components don't have `TView.declTNode` because each instance of component could be\n // inserted in different location, hence `TView.declTNode` is meaningless.\n // Falling back to `T_HOST` in case we cross component boundary.\n if (tView.type === TViewType.Component) {\n return lView[T_HOST];\n }\n\n // Remaining TNode type is `TViewType.Root` which doesn't have a parent TNode.\n return null;\n}\n\n/**\n * This is a light weight version of the `enterView` which is needed by the DI system.\n *\n * @param lView `LView` location of the DI context.\n * @param tNode `TNode` for DI context\n * @param flags DI context flags. if `SkipSelf` flag is set than we walk up the declaration\n * tree from `tNode` until we find parent declared `TElementNode`.\n * @returns `true` if we have successfully entered DI associated with `tNode` (or with declared\n * `TNode` if `flags` has `SkipSelf`). Failing to enter DI implies that no associated\n * `NodeInjector` can be found and we should instead use `ModuleInjector`.\n * - If `true` than this call must be fallowed by `leaveDI`\n * - If `false` than this call failed and we should NOT call `leaveDI`\n */\nexport function enterDI(lView: LView, tNode: TNode, flags: InjectFlags) {\n ngDevMode && assertLViewOrUndefined(lView);\n\n if (flags & InjectFlags.SkipSelf) {\n ngDevMode && assertTNodeForTView(tNode, lView[TVIEW]);\n\n let parentTNode = tNode as TNode | null;\n let parentLView = lView;\n\n while (true) {\n ngDevMode && assertDefined(parentTNode, 'Parent TNode should be defined');\n parentTNode = parentTNode!.parent as TNode | null;\n if (parentTNode === null && !(flags & InjectFlags.Host)) {\n parentTNode = getDeclarationTNode(parentLView);\n if (parentTNode === null) break;\n\n // In this case, a parent exists and is definitely an element. So it will definitely\n // have an existing lView as the declaration view, which is why we can assume it's defined.\n ngDevMode && assertDefined(parentLView, 'Parent LView should be defined');\n parentLView = parentLView[DECLARATION_VIEW]!;\n\n // In Ivy there are Comment nodes that correspond to ngIf and NgFor embedded directives\n // We want to skip those and look only at Elements and ElementContainers to ensure\n // we're looking at true parent nodes, and not content or other types.\n if (parentTNode.type & (TNodeType.Element | TNodeType.ElementContainer)) {\n break;\n }\n } else {\n break;\n }\n }\n if (parentTNode === null) {\n // If we failed to find a parent TNode this means that we should use module injector.\n return false;\n } else {\n tNode = parentTNode;\n lView = parentLView;\n }\n }\n\n ngDevMode && assertTNodeForLView(tNode, lView);\n const lFrame = (instructionState.lFrame = allocLFrame());\n lFrame.currentTNode = tNode;\n lFrame.lView = lView;\n\n return true;\n}\n\n/**\n * Swap the current lView with a new lView.\n *\n * For performance reasons we store the lView in the top level of the module.\n * This way we minimize the number of properties to read. Whenever a new view\n * is entered we have to store the lView for later, and when the view is\n * exited the state has to be restored\n *\n * @param newView New lView to become active\n * @returns the previously active lView;\n */\nexport function enterView(newView: LView): void {\n ngDevMode && assertNotEqual(newView[0], newView[1] as any, '????');\n ngDevMode && assertLViewOrUndefined(newView);\n const newLFrame = allocLFrame();\n if (ngDevMode) {\n assertEqual(newLFrame.isParent, true, 'Expected clean LFrame');\n assertEqual(newLFrame.lView, null, 'Expected clean LFrame');\n assertEqual(newLFrame.tView, null, 'Expected clean LFrame');\n assertEqual(newLFrame.selectedIndex, -1, 'Expected clean LFrame');\n assertEqual(newLFrame.elementDepthCount, 0, 'Expected clean LFrame');\n assertEqual(newLFrame.currentDirectiveIndex, -1, 'Expected clean LFrame');\n assertEqual(newLFrame.currentNamespace, null, 'Expected clean LFrame');\n assertEqual(newLFrame.bindingRootIndex, -1, 'Expected clean LFrame');\n assertEqual(newLFrame.currentQueryIndex, 0, 'Expected clean LFrame');\n }\n const tView = newView[TVIEW];\n instructionState.lFrame = newLFrame;\n ngDevMode && tView.firstChild && assertTNodeForTView(tView.firstChild, tView);\n newLFrame.currentTNode = tView.firstChild!;\n newLFrame.lView = newView;\n newLFrame.tView = tView;\n newLFrame.contextLView = newView;\n newLFrame.bindingIndex = tView.bindingStartIndex;\n newLFrame.inI18n = false;\n}\n\n/**\n * Allocates next free LFrame. This function tries to reuse the `LFrame`s to lower memory pressure.\n */\nfunction allocLFrame() {\n const currentLFrame = instructionState.lFrame;\n const childLFrame = currentLFrame === null ? null : currentLFrame.child;\n const newLFrame = childLFrame === null ? createLFrame(currentLFrame) : childLFrame;\n return newLFrame;\n}\n\nfunction createLFrame(parent: LFrame | null): LFrame {\n const lFrame: LFrame = {\n currentTNode: null,\n isParent: true,\n lView: null!,\n tView: null!,\n selectedIndex: -1,\n contextLView: null,\n elementDepthCount: 0,\n currentNamespace: null,\n currentDirectiveIndex: -1,\n bindingRootIndex: -1,\n bindingIndex: -1,\n currentQueryIndex: 0,\n parent: parent!,\n child: null,\n inI18n: false,\n };\n parent !== null && (parent.child = lFrame); // link the new LFrame for reuse.\n return lFrame;\n}\n\n/**\n * A lightweight version of leave which is used with DI.\n *\n * This function only resets `currentTNode` and `LView` as those are the only properties\n * used with DI (`enterDI()`).\n *\n * NOTE: This function is reexported as `leaveDI`. However `leaveDI` has return type of `void` where\n * as `leaveViewLight` has `LFrame`. This is so that `leaveViewLight` can be used in `leaveView`.\n */\nfunction leaveViewLight(): LFrame {\n const oldLFrame = instructionState.lFrame;\n instructionState.lFrame = oldLFrame.parent;\n oldLFrame.currentTNode = null!;\n oldLFrame.lView = null!;\n return oldLFrame;\n}\n\n/**\n * This is a lightweight version of the `leaveView` which is needed by the DI system.\n *\n * NOTE: this function is an alias so that we can change the type of the function to have `void`\n * return type.\n */\nexport const leaveDI: () => void = leaveViewLight;\n\n/**\n * Leave the current `LView`\n *\n * This pops the `LFrame` with the associated `LView` from the stack.\n *\n * IMPORTANT: We must zero out the `LFrame` values here otherwise they will be retained. This is\n * because for performance reasons we don't release `LFrame` but rather keep it for next use.\n */\nexport function leaveView() {\n const oldLFrame = leaveViewLight();\n oldLFrame.isParent = true;\n oldLFrame.tView = null!;\n oldLFrame.selectedIndex = -1;\n oldLFrame.contextLView = null;\n oldLFrame.elementDepthCount = 0;\n oldLFrame.currentDirectiveIndex = -1;\n oldLFrame.currentNamespace = null;\n oldLFrame.bindingRootIndex = -1;\n oldLFrame.bindingIndex = -1;\n oldLFrame.currentQueryIndex = 0;\n}\n\nexport function nextContextImpl<T = any>(level: number): T {\n const contextLView = (instructionState.lFrame.contextLView = walkUpViews(\n level,\n instructionState.lFrame.contextLView!,\n ));\n return contextLView[CONTEXT] as unknown as T;\n}\n\n/**\n * Gets the currently selected element index.\n *\n * Used with {@link property} instruction (and more in the future) to identify the index in the\n * current `LView` to act on.\n */\nexport function getSelectedIndex() {\n return instructionState.lFrame.selectedIndex;\n}\n\n/**\n * Sets the most recent index passed to {@link select}\n *\n * Used with {@link property} instruction (and more in the future) to identify the index in the\n * current `LView` to act on.\n *\n * (Note that if an \"exit function\" was set earlier (via `setElementExitFn()`) then that will be\n * run if and when the provided `index` value is different from the current selected index value.)\n */\nexport function setSelectedIndex(index: number) {\n ngDevMode &&\n index !== -1 &&\n assertGreaterThanOrEqual(index, HEADER_OFFSET, 'Index must be past HEADER_OFFSET (or -1).');\n ngDevMode &&\n assertLessThan(\n index,\n instructionState.lFrame.lView.length,\n \"Can't set index passed end of LView\",\n );\n instructionState.lFrame.selectedIndex = index;\n}\n\n/**\n * Gets the `tNode` that represents currently selected element.\n */\nexport function getSelectedTNode() {\n const lFrame = instructionState.lFrame;\n return getTNode(lFrame.tView, lFrame.selectedIndex);\n}\n\n/**\n * Sets the namespace used to create elements to `'http://www.w3.org/2000/svg'` in global state.\n *\n * @codeGenApi\n */\nexport function ɵɵnamespaceSVG() {\n instructionState.lFrame.currentNamespace = SVG_NAMESPACE;\n}\n\n/**\n * Sets the namespace used to create elements to `'http://www.w3.org/1998/MathML/'` in global state.\n *\n * @codeGenApi\n */\nexport function ɵɵnamespaceMathML() {\n instructionState.lFrame.currentNamespace = MATH_ML_NAMESPACE;\n}\n\n/**\n * Sets the namespace used to create elements to `null`, which forces element creation to use\n * `createElement` rather than `createElementNS`.\n *\n * @codeGenApi\n */\nexport function ɵɵnamespaceHTML() {\n namespaceHTMLInternal();\n}\n\n/**\n * Sets the namespace used to create elements to `null`, which forces element creation to use\n * `createElement` rather than `createElementNS`.\n */\nexport function namespaceHTMLInternal() {\n instructionState.lFrame.currentNamespace = null;\n}\n\nexport function getNamespace(): string | null {\n return instructionState.lFrame.currentNamespace;\n}\n\nlet _wasLastNodeCreated = true;\n\n/**\n * Retrieves a global flag that indicates whether the most recent DOM node\n * was created or hydrated.\n */\nexport function wasLastNodeCreated(): boolean {\n return _wasLastNodeCreated;\n}\n\n/**\n * Sets a global flag to indicate whether the most recent DOM node\n * was created or hydrated.\n */\nexport function lastNodeWasCreated(flag: boolean): void {\n _wasLastNodeCreated = flag;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {setActiveConsumer} from '../../primitives/signals';\n\nimport {\n AfterContentChecked,\n AfterContentInit,\n AfterViewChecked,\n AfterViewInit,\n DoCheck,\n OnChanges,\n OnDestroy,\n OnInit,\n} from '../interface/lifecycle_hooks';\nimport {assertDefined, assertEqual, assertNotEqual} from '../util/assert';\n\nimport {assertFirstCreatePass} from './assert';\nimport {NgOnChangesFeatureImpl} from './features/ng_onchanges_feature';\nimport {DirectiveDef} from './interfaces/definition';\nimport {TNode} from './interfaces/node';\nimport {\n FLAGS,\n HookData,\n InitPhaseState,\n LView,\n LViewFlags,\n PREORDER_HOOK_FLAGS,\n PreOrderHookFlags,\n TView,\n} from './interfaces/view';\nimport {profiler} from './profiler';\nimport {ProfilerEvent} from './profiler_types';\nimport {isInCheckNoChangesMode} from './state';\n\n/**\n * Adds all directive lifecycle hooks from the given `DirectiveDef` to the given `TView`.\n *\n * Must be run *only* on the first template pass.\n *\n * Sets up the pre-order hooks on the provided `tView`,\n * see {@link HookData} for details about the data structure.\n *\n * @param directiveIndex The index of the directive in LView\n * @param directiveDef The definition containing the hooks to setup in tView\n * @param tView The current TView\n */\nexport function registerPreOrderHooks(\n directiveIndex: number,\n directiveDef: DirectiveDef<any>,\n tView: TView,\n): void {\n ngDevMode && assertFirstCreatePass(tView);\n const {ngOnChanges, ngOnInit, ngDoCheck} = directiveDef.type.prototype as OnChanges &\n OnInit &\n DoCheck;\n\n if (ngOnChanges as Function | undefined) {\n const wrappedOnChanges = NgOnChangesFeatureImpl(directiveDef);\n (tView.preOrderHooks ??= []).push(directiveIndex, wrappedOnChanges);\n (tView.preOrderCheckHooks ??= []).push(directiveIndex, wrappedOnChanges);\n }\n\n if (ngOnInit) {\n (tView.preOrderHooks ??= []).push(0 - directiveIndex, ngOnInit);\n }\n\n if (ngDoCheck) {\n (tView.preOrderHooks ??= []).push(directiveIndex, ngDoCheck);\n (tView.preOrderCheckHooks ??= []).push(directiveIndex, ngDoCheck);\n }\n}\n\n/**\n *\n * Loops through the directives on the provided `tNode` and queues hooks to be\n * run that are not initialization hooks.\n *\n * Should be executed during `elementEnd()` and similar to\n * preserve hook execution order. Content, view, and destroy hooks for projected\n * components and directives must be called *before* their hosts.\n *\n * Sets up the content, view, and destroy hooks on the provided `tView`,\n * see {@link HookData} for details about the data structure.\n *\n * NOTE: This does not set up `onChanges`, `onInit` or `doCheck`, those are set up\n * separately at `elementStart`.\n *\n * @param tView The current TView\n * @param tNode The TNode whose directives are to be searched for hooks to queue\n */\nexport function registerPostOrderHooks(tView: TView, tNode: TNode): void {\n ngDevMode && assertFirstCreatePass(tView);\n // It's necessary to loop through the directives at elementEnd() (rather than processing in\n // directiveCreate) so we can preserve the current hook order. Content, view, and destroy\n // hooks for projected components and directives must be called *before* their hosts.\n for (let i = tNode.directiveStart, end = tNode.directiveEnd; i < end; i++) {\n const directiveDef = tView.data[i] as DirectiveDef<any>;\n ngDevMode && assertDefined(directiveDef, 'Expecting DirectiveDef');\n const lifecycleHooks: AfterContentInit &\n AfterContentChecked &\n AfterViewInit &\n AfterViewChecked &\n OnDestroy = directiveDef.type.prototype;\n const {\n ngAfterContentInit,\n ngAfterContentChecked,\n ngAfterViewInit,\n ngAfterViewChecked,\n ngOnDestroy,\n } = lifecycleHooks;\n\n if (ngAfterContentInit) {\n (tView.contentHooks ??= []).push(-i, ngAfterContentInit);\n }\n\n if (ngAfterContentChecked) {\n (tView.contentHooks ??= []).push(i, ngAfterContentChecked);\n (tView.contentCheckHooks ??= []).push(i, ngAfterContentChecked);\n }\n\n if (ngAfterViewInit) {\n (tView.viewHooks ??= []).push(-i, ngAfterViewInit);\n }\n\n if (ngAfterViewChecked) {\n (tView.viewHooks ??= []).push(i, ngAfterViewChecked);\n (tView.viewCheckHooks ??= []).push(i, ngAfterViewChecked);\n }\n\n if (ngOnDestroy != null) {\n (tView.destroyHooks ??= []).push(i, ngOnDestroy);\n }\n }\n}\n\n/**\n * Executing hooks requires complex logic as we need to deal with 2 constraints.\n *\n * 1. Init hooks (ngOnInit, ngAfterContentInit, ngAfterViewInit) must all be executed once and only\n * once, across many change detection cycles. This must be true even if some hooks throw, or if\n * some recursively trigger a change detection cycle.\n * To solve that, it is required to track the state of the execution of these init hooks.\n * This is done by storing and maintaining flags in the view: the {@link InitPhaseState},\n * and the index within that phase. They can be seen as a cursor in the following structure:\n * [[onInit1, onInit2], [afterContentInit1], [afterViewInit1, afterViewInit2, afterViewInit3]]\n * They are stored as flags in LView[FLAGS].\n *\n * 2. Pre-order hooks can be executed in batches, because of the select instruction.\n * To be able to pause and resume their execution, we also need some state about the hook's array\n * that is being processed:\n * - the index of the next hook to be executed\n * - the number of init hooks already found in the processed part of the array\n * They are stored as flags in LView[PREORDER_HOOK_FLAGS].\n */\n\n/**\n * Executes pre-order check hooks ( OnChanges, DoChanges) given a view where all the init hooks were\n * executed once. This is a light version of executeInitAndCheckPreOrderHooks where we can skip read\n * / write of the init-hooks related flags.\n * @param lView The LView where hooks are defined\n * @param hooks Hooks to be run\n * @param nodeIndex 3 cases depending on the value:\n * - undefined: all hooks from the array should be executed (post-order case)\n * - null: execute hooks only from the saved index until the end of the array (pre-order case, when\n * flushing the remaining hooks)\n * - number: execute hooks only from the saved index until that node index exclusive (pre-order\n * case, when executing select(number))\n */\nexport function executeCheckHooks(lView: LView, hooks: HookData, nodeIndex?: number | null) {\n callHooks(lView, hooks, InitPhaseState.InitPhaseCompleted, nodeIndex);\n}\n\n/**\n * Executes post-order init and check hooks (one of AfterContentInit, AfterContentChecked,\n * AfterViewInit, AfterViewChecked) given a view where there are pending init hooks to be executed.\n * @param lView The LView where hooks are defined\n * @param hooks Hooks to be run\n * @param initPhase A phase for which hooks should be run\n * @param nodeIndex 3 cases depending on the value:\n * - undefined: all hooks from the array should be executed (post-order case)\n * - null: execute hooks only from the saved index until the end of the array (pre-order case, when\n * flushing the remaining hooks)\n * - number: execute hooks only from the saved index until that node index exclusive (pre-order\n * case, when executing select(number))\n */\nexport function executeInitAndCheckHooks(\n lView: LView,\n hooks: HookData,\n initPhase: InitPhaseState,\n nodeIndex?: number | null,\n) {\n ngDevMode &&\n assertNotEqual(\n initPhase,\n InitPhaseState.InitPhaseCompleted,\n 'Init pre-order hooks should not be called more than once',\n );\n if ((lView[FLAGS] & LViewFlags.InitPhaseStateMask) === initPhase) {\n callHooks(lView, hooks, initPhase, nodeIndex);\n }\n}\n\nexport function incrementInitPhaseFlags(lView: LView, initPhase: InitPhaseState): void {\n ngDevMode &&\n assertNotEqual(\n initPhase,\n InitPhaseState.InitPhaseCompleted,\n 'Init hooks phase should not be incremented after all init hooks have been run.',\n );\n let flags = lView[FLAGS];\n if ((flags & LViewFlags.InitPhaseStateMask) === initPhase) {\n flags &= LViewFlags.IndexWithinInitPhaseReset;\n flags += LViewFlags.InitPhaseStateIncrementer;\n lView[FLAGS] = flags;\n }\n}\n\n/**\n * Calls lifecycle hooks with their contexts, skipping init hooks if it's not\n * the first LView pass\n *\n * @param currentView The current view\n * @param arr The array in which the hooks are found\n * @param initPhaseState the current state of the init phase\n * @param currentNodeIndex 3 cases depending on the value:\n * - undefined: all hooks from the array should be executed (post-order case)\n * - null: execute hooks only from the saved index until the end of the array (pre-order case, when\n * flushing the remaining hooks)\n * - number: execute hooks only from the saved index until that node index exclusive (pre-order\n * case, when executing select(number))\n */\nfunction callHooks(\n currentView: LView,\n arr: HookData,\n initPhase: InitPhaseState,\n currentNodeIndex: number | null | undefined,\n): void {\n ngDevMode &&\n assertEqual(\n isInCheckNoChangesMode(),\n false,\n 'Hooks should never be run when in check no changes mode.',\n );\n const startIndex =\n currentNodeIndex !== undefined\n ? currentView[PREORDER_HOOK_FLAGS] & PreOrderHookFlags.IndexOfTheNextPreOrderHookMaskMask\n : 0;\n const nodeIndexLimit = currentNodeIndex != null ? currentNodeIndex : -1;\n const max = arr.length - 1; // Stop the loop at length - 1, because we look for the hook at i + 1\n let lastNodeIndexFound = 0;\n for (let i = startIndex; i < max; i++) {\n const hook = arr[i + 1] as number | (() => void);\n if (typeof hook === 'number') {\n lastNodeIndexFound = arr[i] as number;\n if (currentNodeIndex != null && lastNodeIndexFound >= currentNodeIndex) {\n break;\n }\n } else {\n const isInitHook = (arr[i] as number) < 0;\n if (isInitHook) {\n currentView[PREORDER_HOOK_FLAGS] += PreOrderHookFlags.NumberOfInitHooksCalledIncrementer;\n }\n if (lastNodeIndexFound < nodeIndexLimit || nodeIndexLimit == -1) {\n callHook(currentView, initPhase, arr, i);\n currentView[PREORDER_HOOK_FLAGS] =\n (currentView[PREORDER_HOOK_FLAGS] & PreOrderHookFlags.NumberOfInitHooksCalledMask) +\n i +\n 2;\n }\n i++;\n }\n }\n}\n\n/**\n * Executes a single lifecycle hook, making sure that:\n * - it is called in the non-reactive context;\n * - profiling data are registered.\n */\nfunction callHookInternal(directive: any, hook: () => void) {\n profiler(ProfilerEvent.LifecycleHookStart, directive, hook);\n const prevConsumer = setActiveConsumer(null);\n try {\n hook.call(directive);\n } finally {\n setActiveConsumer(prevConsumer);\n profiler(ProfilerEvent.LifecycleHookEnd, directive, hook);\n }\n}\n\n/**\n * Execute one hook against the current `LView`.\n *\n * @param currentView The current view\n * @param initPhaseState the current state of the init phase\n * @param arr The array in which the hooks are found\n * @param i The current index within the hook data array\n */\nfunction callHook(currentView: LView, initPhase: InitPhaseState, arr: HookData, i: number) {\n const isInitHook = (arr[i] as number) < 0;\n const hook = arr[i + 1] as () => void;\n const directiveIndex = isInitHook ? -arr[i] : (arr[i] as number);\n const directive = currentView[directiveIndex];\n if (isInitHook) {\n const indexWithintInitPhase = currentView[FLAGS] >> LViewFlags.IndexWithinInitPhaseShift;\n // The init phase state must be always checked here as it may have been recursively updated.\n if (\n indexWithintInitPhase <\n currentView[PREORDER_HOOK_FLAGS] >> PreOrderHookFlags.NumberOfInitHooksCalledShift &&\n (currentView[FLAGS] & LViewFlags.InitPhaseStateMask) === initPhase\n ) {\n currentView[FLAGS] += LViewFlags.IndexWithinInitPhaseIncrementer;\n callHookInternal(directive, hook);\n }\n } else {\n callHookInternal(directive, hook);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {InjectFlags} from '../../di/interface/injector';\nimport {ProviderToken} from '../../di/provider_token';\nimport {assertDefined, assertEqual} from '../../util/assert';\n\nimport {TDirectiveHostNode} from './node';\nimport {LView, TData} from './view';\n\n/**\n * Offsets of the `NodeInjector` data structure in the expando.\n *\n * `NodeInjector` is stored in both `LView` as well as `TView.data`. All storage requires 9 words.\n * First 8 are reserved for bloom filter and the 9th is reserved for the associated `TNode` as well\n * as parent `NodeInjector` pointer. All indexes are starting with `index` and have an offset as\n * shown.\n *\n * `LView` layout:\n * ```\n * index + 0: cumulative bloom filter\n * index + 1: cumulative bloom filter\n * index + 2: cumulative bloom filter\n * index + 3: cumulative bloom filter\n * index + 4: cumulative bloom filter\n * index + 5: cumulative bloom filter\n * index + 6: cumulative bloom filter\n * index + 7: cumulative bloom filter\n * index + 8: cumulative bloom filter\n * index + PARENT: Index to the parent injector. See `RelativeInjectorLocation`\n * `const parent = lView[index + NodeInjectorOffset.PARENT]`\n * ```\n *\n * `TViewData` layout:\n * ```\n * index + 0: cumulative bloom filter\n * index + 1: cumulative bloom filter\n * index + 2: cumulative bloom filter\n * index + 3: cumulative bloom filter\n * index + 4: cumulative bloom filter\n * index + 5: cumulative bloom filter\n * index + 6: cumulative bloom filter\n * index + 7: cumulative bloom filter\n * index + 8: cumulative bloom filter\n * index + TNODE: TNode associated with this `NodeInjector`\n * `const tNode = tView.data[index + NodeInjectorOffset.TNODE]`\n * ```\n */\nexport const enum NodeInjectorOffset {\n TNODE = 8,\n PARENT = 8,\n BLOOM_SIZE = 8,\n SIZE = 9,\n}\n\n/**\n * Represents a relative location of parent injector.\n *\n * The interfaces encodes number of parents `LView`s to traverse and index in the `LView`\n * pointing to the parent injector.\n */\nexport type RelativeInjectorLocation = number & {\n __brand__: 'RelativeInjectorLocationFlags';\n};\n\nexport const enum RelativeInjectorLocationFlags {\n InjectorIndexMask = 0b111111111111111,\n ViewOffsetShift = 16,\n NO_PARENT = -1,\n}\n\nexport const NO_PARENT_INJECTOR = -1 as RelativeInjectorLocation;\n\n/**\n * Each injector is saved in 9 contiguous slots in `LView` and 9 contiguous slots in\n * `TView.data`. This allows us to store information about the current node's tokens (which\n * can be shared in `TView`) as well as the tokens of its ancestor nodes (which cannot be\n * shared, so they live in `LView`).\n *\n * Each of these slots (aside from the last slot) contains a bloom filter. This bloom filter\n * determines whether a directive is available on the associated node or not. This prevents us\n * from searching the directives array at this level unless it's probable the directive is in it.\n *\n * See: https://en.wikipedia.org/wiki/Bloom_filter for more about bloom filters.\n *\n * Because all injectors have been flattened into `LView` and `TViewData`, they cannot typed\n * using interfaces as they were previously. The start index of each `LInjector` and `TInjector`\n * will differ based on where it is flattened into the main array, so it's not possible to know\n * the indices ahead of time and save their types here. The interfaces are still included here\n * for documentation purposes.\n *\n * export interface LInjector extends Array<any> {\n *\n * // Cumulative bloom for directive IDs 0-31 (IDs are % BLOOM_SIZE)\n * [0]: number;\n *\n * // Cumulative bloom for directive IDs 32-63\n * [1]: number;\n *\n * // Cumulative bloom for directive IDs 64-95\n * [2]: number;\n *\n * // Cumulative bloom for directive IDs 96-127\n * [3]: number;\n *\n * // Cumulative bloom for directive IDs 128-159\n * [4]: number;\n *\n * // Cumulative bloom for directive IDs 160 - 191\n * [5]: number;\n *\n * // Cumulative bloom for directive IDs 192 - 223\n * [6]: number;\n *\n * // Cumulative bloom for directive IDs 224 - 255\n * [7]: number;\n *\n * // We need to store a reference to the injector's parent so DI can keep looking up\n * // the injector tree until it finds the dependency it's looking for.\n * [PARENT_INJECTOR]: number;\n * }\n *\n * export interface TInjector extends Array<any> {\n *\n * // Shared node bloom for directive IDs 0-31 (IDs are % BLOOM_SIZE)\n * [0]: number;\n *\n * // Shared node bloom for directive IDs 32-63\n * [1]: number;\n *\n * // Shared node bloom for directive IDs 64-95\n * [2]: number;\n *\n * // Shared node bloom for directive IDs 96-127\n * [3]: number;\n *\n * // Shared node bloom for directive IDs 128-159\n * [4]: number;\n *\n * // Shared node bloom for directive IDs 160 - 191\n * [5]: number;\n *\n * // Shared node bloom for directive IDs 192 - 223\n * [6]: number;\n *\n * // Shared node bloom for directive IDs 224 - 255\n * [7]: number;\n *\n * // Necessary to find directive indices for a particular node.\n * [TNODE]: TElementNode|TElementContainerNode|TContainerNode;\n * }\n */\n\n/**\n * Factory for creating instances of injectors in the NodeInjector.\n *\n * This factory is complicated by the fact that it can resolve `multi` factories as well.\n *\n * NOTE: Some of the fields are optional which means that this class has two hidden classes.\n * - One without `multi` support (most common)\n * - One with `multi` values, (rare).\n *\n * Since VMs can cache up to 4 inline hidden classes this is OK.\n *\n * - Single factory: Only `resolving` and `factory` is defined.\n * - `providers` factory: `componentProviders` is a number and `index = -1`.\n * - `viewProviders` factory: `componentProviders` is a number and `index` points to `providers`.\n */\nexport class NodeInjectorFactory {\n /**\n * The inject implementation to be activated when using the factory.\n */\n injectImpl: null | (<T>(token: ProviderToken<T>, flags?: InjectFlags) => T);\n\n /**\n * Marker set to true during factory invocation to see if we get into recursive loop.\n * Recursive loop causes an error to be displayed.\n */\n resolving = false;\n\n /**\n * Marks that the token can see other Tokens declared in `viewProviders` on the same node.\n */\n canSeeViewProviders: boolean;\n\n /**\n * An array of factories to use in case of `multi` provider.\n */\n multi?: Array<() => any>;\n\n /**\n * Number of `multi`-providers which belong to the component.\n *\n * This is needed because when multiple components and directives declare the `multi` provider\n * they have to be concatenated in the correct order.\n *\n * Example:\n *\n * If we have a component and directive active an a single element as declared here\n * ```ts\n * component:\n * providers: [ {provide: String, useValue: 'component', multi: true} ],\n * viewProviders: [ {provide: String, useValue: 'componentView', multi: true} ],\n *\n * directive:\n * providers: [ {provide: String, useValue: 'directive', multi: true} ],\n * ```\n *\n * Then the expected results are:\n *\n * ```ts\n * providers: ['component', 'directive']\n * viewProviders: ['component', 'componentView', 'directive']\n * ```\n *\n * The way to think about it is that the `viewProviders` have been inserted after the component\n * but before the directives, which is why we need to know how many `multi`s have been declared by\n * the component.\n */\n componentProviders?: number;\n\n /**\n * Current index of the Factory in the `data`. Needed for `viewProviders` and `providers` merging.\n * See `providerFactory`.\n */\n index?: number;\n\n /**\n * Because the same `multi` provider can be declared in `providers` and `viewProviders` it is\n * possible for `viewProviders` to shadow the `providers`. For this reason we store the\n * `provideFactory` of the `providers` so that `providers` can be extended with `viewProviders`.\n *\n * Example:\n *\n * Given:\n * ```ts\n * providers: [ {provide: String, useValue: 'all', multi: true} ],\n * viewProviders: [ {provide: String, useValue: 'viewOnly', multi: true} ],\n * ```\n *\n * We have to return `['all']` in case of content injection, but `['all', 'viewOnly']` in case\n * of view injection. We further have to make sure that the shared instances (in our case\n * `all`) are the exact same instance in both the content as well as the view injection. (We\n * have to make sure that we don't double instantiate.) For this reason the `viewProviders`\n * `Factory` has a pointer to the shadowed `providers` factory so that it can instantiate the\n * `providers` (`['all']`) and then extend it with `viewProviders` (`['all'] + ['viewOnly'] =\n * ['all', 'viewOnly']`).\n */\n providerFactory?: NodeInjectorFactory | null;\n\n constructor(\n /**\n * Factory to invoke in order to create a new instance.\n */\n public factory: (\n this: NodeInjectorFactory,\n _: undefined,\n /**\n * Flags that control the injection behavior.\n */\n flags: InjectFlags | undefined,\n /**\n * array where injectables tokens are stored. This is used in\n * case of an error reporting to produce friendlier errors.\n */\n tData: TData,\n /**\n * array where existing instances of injectables are stored. This is used in case\n * of multi shadow is needed. See `multi` field documentation.\n */\n lView: LView,\n /**\n * The TNode of the same element injector.\n */\n tNode: TDirectiveHostNode,\n ) => any,\n /**\n * Set to `true` if the token is declared in `viewProviders` (or if it is component).\n */\n isViewProvider: boolean,\n injectImplementation: null | (<T>(token: ProviderToken<T>, flags?: InjectFlags) => T),\n ) {\n ngDevMode && assertDefined(factory, 'Factory not specified');\n ngDevMode && assertEqual(typeof factory, 'function', 'Expected factory function.');\n this.canSeeViewProviders = isViewProvider;\n this.injectImpl = injectImplementation;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport {Type} from '../../interface/type';\nimport {KeyValueArray} from '../../util/array_utils';\nimport {TStylingRange} from '../interfaces/styling';\nimport {AttributeMarker} from './attribute_marker';\n\nimport {TIcu} from './i18n';\nimport {CssSelector} from './projection';\nimport {RNode} from './renderer_dom';\nimport type {LView, TView} from './view';\n\n/**\n * TNodeType corresponds to the {@link TNode} `type` property.\n *\n * NOTE: type IDs are such that we use each bit to denote a type. This is done so that we can easily\n * check if the `TNode` is of more than one type.\n *\n * `if (tNode.type === TNodeType.Text || tNode.type === TNode.Element)`\n * can be written as:\n * `if (tNode.type & (TNodeType.Text | TNodeType.Element))`\n *\n * However any given `TNode` can only be of one type.\n */\nexport const enum TNodeType {\n /**\n * The TNode contains information about a DOM element aka {@link RText}.\n */\n Text = 0b1,\n\n /**\n * The TNode contains information about a DOM element aka {@link RElement}.\n */\n Element = 0b10,\n\n /**\n * The TNode contains information about an {@link LContainer} for embedded views.\n */\n Container = 0b100,\n\n /**\n * The TNode contains information about an `<ng-container>` element {@link RNode}.\n */\n ElementContainer = 0b1000,\n\n /**\n * The TNode contains information about an `<ng-content>` projection\n */\n Projection = 0b10000,\n\n /**\n * The TNode contains information about an ICU comment used in `i18n`.\n */\n Icu = 0b100000,\n\n /**\n * Special node type representing a placeholder for future `TNode` at this location.\n *\n * I18n translation blocks are created before the element nodes which they contain. (I18n blocks\n * can span over many elements.) Because i18n `TNode`s (representing text) are created first they\n * often may need to point to element `TNode`s which are not yet created. In such a case we create\n * a `Placeholder` `TNode`. This allows the i18n to structurally link the `TNode`s together\n * without knowing any information about the future nodes which will be at that location.\n *\n * On `firstCreatePass` When element instruction executes it will try to create a `TNode` at that\n * location. Seeing a `Placeholder` `TNode` already there tells the system that it should reuse\n * existing `TNode` (rather than create a new one) and just update the missing information.\n */\n Placeholder = 0b1000000,\n\n /**\n * The TNode contains information about a `@let` declaration.\n */\n LetDeclaration = 0b10000000,\n\n // Combined Types These should never be used for `TNode.type` only as a useful way to check\n // if `TNode.type` is one of several choices.\n\n // See: https://github.com/microsoft/TypeScript/issues/35875 why we can't refer to existing enum.\n AnyRNode = 0b11, // Text | Element\n AnyContainer = 0b1100, // Container | ElementContainer\n}\n\n/**\n * Converts `TNodeType` into human readable text.\n * Make sure this matches with `TNodeType`\n */\nexport function toTNodeTypeAsString(tNodeType: TNodeType): string {\n let text = '';\n tNodeType & TNodeType.Text && (text += '|Text');\n tNodeType & TNodeType.Element && (text += '|Element');\n tNodeType & TNodeType.Container && (text += '|Container');\n tNodeType & TNodeType.ElementContainer && (text += '|ElementContainer');\n tNodeType & TNodeType.Projection && (text += '|Projection');\n tNodeType & TNodeType.Icu && (text += '|IcuContainer');\n tNodeType & TNodeType.Placeholder && (text += '|Placeholder');\n tNodeType & TNodeType.LetDeclaration && (text += '|LetDeclaration');\n return text.length > 0 ? text.substring(1) : text;\n}\n\n/**\n * Helper function to detect if a given value matches a `TNode` shape.\n *\n * The logic uses the `insertBeforeIndex` and its possible values as\n * a way to differentiate a TNode shape from other types of objects\n * within the `TView.data`. This is not a perfect check, but it can\n * be a reasonable differentiator, since we control the shapes of objects\n * within `TView.data`.\n */\nexport function isTNodeShape(value: unknown): value is TNode {\n return (\n value != null &&\n typeof value === 'object' &&\n ((value as TNode).insertBeforeIndex === null ||\n typeof (value as TNode).insertBeforeIndex === 'number' ||\n Array.isArray((value as TNode).insertBeforeIndex))\n );\n}\n\nexport function isLetDeclaration(tNode: TNode): boolean {\n return !!(tNode.type & TNodeType.LetDeclaration);\n}\n\n/**\n * Corresponds to the TNode.flags property.\n */\nexport const enum TNodeFlags {\n /** Bit #1 - This bit is set if the node is a host for any directive (including a component) */\n isDirectiveHost = 0x1,\n\n /** Bit #2 - This bit is set if the node has been projected */\n isProjected = 0x2,\n\n /** Bit #3 - This bit is set if any directive on this node has content queries */\n hasContentQuery = 0x4,\n\n /** Bit #4 - This bit is set if the node has any \"class\" inputs */\n hasClassInput = 0x8,\n\n /** Bit #5 - This bit is set if the node has any \"style\" inputs */\n hasStyleInput = 0x10,\n\n /** Bit #6 - This bit is set if the node has been detached by i18n */\n isDetached = 0x20,\n\n /**\n * Bit #7 - This bit is set if the node has directives with host bindings.\n *\n * This flags allows us to guard host-binding logic and invoke it only on nodes\n * that actually have directives with host bindings.\n */\n hasHostBindings = 0x40,\n\n /**\n * Bit #8 - This bit is set if the node is a located inside skip hydration block.\n */\n inSkipHydrationBlock = 0x80,\n}\n\n/**\n * Corresponds to the TNode.providerIndexes property.\n */\nexport const enum TNodeProviderIndexes {\n /** The index of the first provider on this node is encoded on the least significant bits. */\n ProvidersStartIndexMask = 0b00000000000011111111111111111111,\n\n /**\n * The count of view providers from the component on this node is\n * encoded on the 20 most significant bits.\n */\n CptViewProvidersCountShift = 20,\n CptViewProvidersCountShifter = 0b00000000000100000000000000000000,\n}\n\n/**\n * A combination of:\n * - Attribute names and values.\n * - Special markers acting as flags to alter attributes processing.\n * - Parsed ngProjectAs selectors.\n */\nexport type TAttributes = (string | AttributeMarker | CssSelector)[];\n\n/**\n * Constants that are associated with a view. Includes:\n * - Attribute arrays.\n * - Local definition arrays.\n * - Translated messages (i18n).\n */\nexport type TConstants = (TAttributes | string)[];\n\n/**\n * Factory function that returns an array of consts. Consts can be represented as a function in\n * case any additional statements are required to define consts in the list. An example is i18n\n * where additional i18n calls are generated, which should be executed when consts are requested\n * for the first time.\n */\nexport type TConstantsFactory = () => TConstants;\n\n/**\n * TConstants type that describes how the `consts` field is generated on ComponentDef: it can be\n * either an array or a factory function that returns that array.\n */\nexport type TConstantsOrFactory = TConstants | TConstantsFactory;\n\n/**\n * Binding data (flyweight) for a particular node that is shared between all templates\n * of a specific type.\n *\n * If a property is:\n * - PropertyAliases: that property's data was generated and this is it\n * - Null: that property's data was already generated and nothing was found.\n * - Undefined: that property's data has not yet been generated\n *\n * see: https://en.wikipedia.org/wiki/Flyweight_pattern for more on the Flyweight pattern\n */\nexport interface TNode {\n /** The type of the TNode. See TNodeType. */\n type: TNodeType;\n\n /**\n * Index of the TNode in TView.data and corresponding native element in LView.\n *\n * This is necessary to get from any TNode to its corresponding native element when\n * traversing the node tree.\n *\n * If index is -1, this is a dynamically created container node or embedded view node.\n */\n index: number;\n\n /**\n * Insert before existing DOM node index.\n *\n * When DOM nodes are being inserted, normally they are being appended as they are created.\n * Under i18n case, the translated text nodes are created ahead of time as part of the\n * `ɵɵi18nStart` instruction which means that this `TNode` can't just be appended and instead\n * needs to be inserted using `insertBeforeIndex` semantics.\n *\n * Additionally sometimes it is necessary to insert new text nodes as a child of this `TNode`. In\n * such a case the value stores an array of text nodes to insert.\n *\n * Example:\n * ```html\n * <div i18n>\n * Hello <span>World</span>!\n * </div>\n * ```\n * In the above example the `ɵɵi18nStart` instruction can create `Hello `, `World` and `!` text\n * nodes. It can also insert `Hello ` and `!` text node as a child of `<div>`, but it can't\n * insert `World` because the `<span>` node has not yet been created. In such a case the\n * `<span>` `TNode` will have an array which will direct the `<span>` to not only insert\n * itself in front of `!` but also to insert the `World` (created by `ɵɵi18nStart`) into\n * `<span>` itself.\n *\n * Pseudo code:\n * ```ts\n * if (insertBeforeIndex === null) {\n * // append as normal\n * } else if (Array.isArray(insertBeforeIndex)) {\n * // First insert current `TNode` at correct location\n * const currentNode = lView[this.index];\n * parentNode.insertBefore(currentNode, lView[this.insertBeforeIndex[0]]);\n * // Now append all of the children\n * for(let i=1; i<this.insertBeforeIndex; i++) {\n * currentNode.appendChild(lView[this.insertBeforeIndex[i]]);\n * }\n * } else {\n * parentNode.insertBefore(lView[this.index], lView[this.insertBeforeIndex])\n * }\n * ```\n * - null: Append as normal using `parentNode.appendChild`\n * - `number`: Append using\n * `parentNode.insertBefore(lView[this.index], lView[this.insertBeforeIndex])`\n *\n * *Initialization*\n *\n * Because `ɵɵi18nStart` executes before nodes are created, on `TView.firstCreatePass` it is not\n * possible for `ɵɵi18nStart` to set the `insertBeforeIndex` value as the corresponding `TNode`\n * has not yet been created. For this reason the `ɵɵi18nStart` creates a `TNodeType.Placeholder`\n * `TNode` at that location. See `TNodeType.Placeholder` for more information.\n */\n insertBeforeIndex: InsertBeforeIndex;\n\n /**\n * The index of the closest injector in this node's LView.\n *\n * If the index === -1, there is no injector on this node or any ancestor node in this view.\n *\n * If the index !== -1, it is the index of this node's injector OR the index of a parent\n * injector in the same view. We pass the parent injector index down the node tree of a view so\n * it's possible to find the parent injector without walking a potentially deep node tree.\n * Injector indices are not set across view boundaries because there could be multiple component\n * hosts.\n *\n * If tNode.injectorIndex === tNode.parent.injectorIndex, then the index belongs to a parent\n * injector.\n */\n injectorIndex: number;\n\n /** Stores starting index of the directives. */\n directiveStart: number;\n\n /**\n * Stores final exclusive index of the directives.\n *\n * The area right behind the `directiveStart-directiveEnd` range is used to allocate the\n * `HostBindingFunction` `vars` (or null if no bindings.) Therefore `directiveEnd` is used to set\n * `LFrame.bindingRootIndex` before `HostBindingFunction` is executed.\n */\n directiveEnd: number;\n\n /**\n * Offset from the `directiveStart` at which the component (one at most) of the node is stored.\n * Set to -1 if no components have been applied to the node. Component index can be found using\n * `directiveStart + componentOffset`.\n */\n componentOffset: number;\n\n /**\n * Stores the last directive which had a styling instruction.\n *\n * Initial value of this is `-1` which means that no `hostBindings` styling instruction has\n * executed. As `hostBindings` instructions execute they set the value to the index of the\n * `DirectiveDef` which contained the last `hostBindings` styling instruction.\n *\n * Valid values are:\n * - `-1` No `hostBindings` instruction has executed.\n * - `directiveStart <= directiveStylingLast < directiveEnd`: Points to the `DirectiveDef` of\n * the last styling instruction which executed in the `hostBindings`.\n *\n * This data is needed so that styling instructions know which static styling data needs to be\n * collected from the `DirectiveDef.hostAttrs`. A styling instruction needs to collect all data\n * since last styling instruction.\n */\n directiveStylingLast: number;\n\n /**\n * Stores indexes of property bindings. This field is only set in the ngDevMode and holds\n * indexes of property bindings so TestBed can get bound property metadata for a given node.\n */\n propertyBindings: number[] | null;\n\n /**\n * Stores if Node isComponent, isProjected, hasContentQuery, hasClassInput and hasStyleInput\n * etc.\n */\n flags: TNodeFlags;\n\n /**\n * This number stores two values using its bits:\n *\n * - the index of the first provider on that node (first 16 bits)\n * - the count of view providers from the component on this node (last 16 bits)\n */\n // TODO(misko): break this into actual vars.\n providerIndexes: TNodeProviderIndexes;\n\n /**\n * The value name associated with this node.\n * if type:\n * `TNodeType.Text`: text value\n * `TNodeType.Element`: tag name\n * `TNodeType.ICUContainer`: `TIcu`\n */\n value: any;\n\n /**\n * Attributes associated with an element. We need to store attributes to support various\n * use-cases (attribute injection, content projection with selectors, directives matching).\n * Attributes are stored statically because reading them from the DOM would be way too slow for\n * content projection and queries.\n *\n * Since attrs will always be calculated first, they will never need to be marked undefined by\n * other instructions.\n *\n * For regular attributes a name of an attribute and its value alternate in the array.\n * e.g. ['role', 'checkbox']\n * This array can contain flags that will indicate \"special attributes\" (attributes with\n * namespaces, attributes extracted from bindings and outputs).\n */\n attrs: TAttributes | null;\n\n /**\n * Same as `TNode.attrs` but contains merged data across all directive host bindings.\n *\n * We need to keep `attrs` as unmerged so that it can be used for attribute selectors.\n * We merge attrs here so that it can be used in a performant way for initial rendering.\n *\n * The `attrs` are merged in first pass in following order:\n * - Component's `hostAttrs`\n * - Directives' `hostAttrs`\n * - Template `TNode.attrs` associated with the current `TNode`.\n */\n mergedAttrs: TAttributes | null;\n\n /**\n * A set of local names under which a given element is exported in a template and\n * visible to queries. An entry in this array can be created for different reasons:\n * - an element itself is referenced, ex.: `<div #foo>`\n * - a component is referenced, ex.: `<my-cmpt #foo>`\n * - a directive is referenced, ex.: `<my-cmpt #foo=\"directiveExportAs\">`.\n *\n * A given element might have different local names and those names can be associated\n * with a directive. We store local names at even indexes while odd indexes are reserved\n * for directive index in a view (or `-1` if there is no associated directive).\n *\n * Some examples:\n * - `<div #foo>` => `[\"foo\", -1]`\n * - `<my-cmpt #foo>` => `[\"foo\", myCmptIdx]`\n * - `<my-cmpt #foo #bar=\"directiveExportAs\">` => `[\"foo\", myCmptIdx, \"bar\", directiveIdx]`\n * - `<div #foo #bar=\"directiveExportAs\">` => `[\"foo\", -1, \"bar\", directiveIdx]`\n */\n localNames: (string | number)[] | null;\n\n /** Information about input properties that need to be set once from attribute data. */\n initialInputs: InitialInputData | null;\n\n /**\n * Input data for all directives on this node. `null` means that there are no directives with\n * inputs on this node.\n */\n inputs: NodeInputBindings | null;\n\n /**\n * Input data for host directives applied to the node.\n */\n hostDirectiveInputs: HostDirectiveInputs | null;\n\n /**\n * Output data for all directives on this node. `null` means that there are no directives with\n * outputs on this node.\n */\n outputs: NodeOutputBindings | null;\n\n /**\n * Input data for host directives applied to the node.\n */\n hostDirectiveOutputs: HostDirectiveOutputs | null;\n\n /**\n * Mapping between directive classes applied to the node and their indexes.\n */\n directiveToIndex: DirectiveIndexMap | null;\n\n /**\n * The TView attached to this node.\n *\n * If this TNode corresponds to an LContainer with a template (e.g. structural\n * directive), the template's TView will be stored here.\n *\n * If this TNode corresponds to an element, tView will be `null`.\n */\n tView: TView | null;\n\n /**\n * The next sibling node. Necessary so we can propagate through the root nodes of a view\n * to insert them or remove them from the DOM.\n */\n next: TNode | null;\n\n /**\n * The previous sibling node.\n * This simplifies operations when we need a pointer to the previous node.\n */\n prev: TNode | null;\n\n /**\n * The next projected sibling. Since in Angular content projection works on the node-by-node\n * basis the act of projecting nodes might change nodes relationship at the insertion point\n * (target view). At the same time we need to keep initial relationship between nodes as\n * expressed in content view.\n */\n projectionNext: TNode | null;\n\n /**\n * First child of the current node.\n *\n * For component nodes, the child will always be a ContentChild (in same view).\n * For embedded view nodes, the child will be in their child view.\n */\n child: TNode | null;\n\n /**\n * Parent node (in the same view only).\n *\n * We need a reference to a node's parent so we can append the node to its parent's native\n * element at the appropriate time.\n *\n * If the parent would be in a different view (e.g. component host), this property will be null.\n * It's important that we don't try to cross component boundaries when retrieving the parent\n * because the parent will change (e.g. index, attrs) depending on where the component was\n * used (and thus shouldn't be stored on TNode). In these cases, we retrieve the parent through\n * LView.node instead (which will be instance-specific).\n *\n * If this is an inline view node (V), the parent will be its container.\n */\n parent: TElementNode | TContainerNode | null;\n\n /**\n * List of projected TNodes for a given component host element OR index into the said nodes.\n *\n * For easier discussion assume this example:\n * `<parent>`'s view definition:\n * ```html\n * <child id=\"c1\">content1</child>\n * <child id=\"c2\"><span>content2</span></child>\n * ```\n * `<child>`'s view definition:\n * ```html\n * <ng-content id=\"cont1\"></ng-content>\n * ```\n *\n * If `Array.isArray(projection)` then `TNode` is a host element:\n * - `projection` stores the content nodes which are to be projected.\n * - The nodes represent categories defined by the selector: For example:\n * `<ng-content/><ng-content select=\"abc\"/>` would represent the heads for `<ng-content/>`\n * and `<ng-content select=\"abc\"/>` respectively.\n * - The nodes we store in `projection` are heads only, we used `.next` to get their\n * siblings.\n * - The nodes `.next` is sorted/rewritten as part of the projection setup.\n * - `projection` size is equal to the number of projections `<ng-content>`. The size of\n * `c1` will be `1` because `<child>` has only one `<ng-content>`.\n * - we store `projection` with the host (`c1`, `c2`) rather than the `<ng-content>` (`cont1`)\n * because the same component (`<child>`) can be used in multiple locations (`c1`, `c2`) and\n * as a result have different set of nodes to project.\n * - without `projection` it would be difficult to efficiently traverse nodes to be projected.\n *\n * If `typeof projection == 'number'` then `TNode` is a `<ng-content>` element:\n * - `projection` is an index of the host's `projection`Nodes.\n * - This would return the first head node to project:\n * `getHost(currentTNode).projection[currentTNode.projection]`.\n * - When projecting nodes the parent node retrieved may be a `<ng-content>` node, in which case\n * the process is recursive in nature.\n *\n * If `projection` is of type `RNode[][]` than we have a collection of native nodes passed as\n * projectable nodes during dynamic component creation.\n */\n projection: (TNode | RNode[])[] | number | null;\n\n /**\n * A collection of all `style` static values for an element (including from host).\n *\n * This field will be populated if and when:\n *\n * - There are one or more initial `style`s on an element (e.g. `<div style=\"width:200px;\">`)\n * - There are one or more initial `style`s on a directive/component host\n * (e.g. `@Directive({host: {style: \"width:200px;\" } }`)\n */\n styles: string | null;\n\n /**\n * A collection of all `style` static values for an element excluding host sources.\n *\n * Populated when there are one or more initial `style`s on an element\n * (e.g. `<div style=\"width:200px;\">`)\n * Must be stored separately from `tNode.styles` to facilitate setting directive\n * inputs that shadow the `style` property. If we used `tNode.styles` as is for shadowed inputs,\n * we would feed host styles back into directives as \"inputs\". If we used `tNode.attrs`, we\n * would have to concatenate the attributes on every template pass. Instead, we process once on\n * first create pass and store here.\n */\n stylesWithoutHost: string | null;\n\n /**\n * A `KeyValueArray` version of residual `styles`.\n *\n * When there are styling instructions than each instruction stores the static styling\n * which is of lower priority than itself. This means that there may be a higher priority\n * styling than the instruction.\n *\n * Imagine:\n * ```angular-ts\n * <div style=\"color: highest;\" my-dir>\n *\n * @Directive({\n * host: {\n * style: 'color: lowest; ',\n * '[styles.color]': 'exp' // ɵɵstyleProp('color', ctx.exp);\n * }\n * })\n * ```\n *\n * In the above case:\n * - `color: lowest` is stored with `ɵɵstyleProp('color', ctx.exp);` instruction\n * - `color: highest` is the residual and is stored here.\n *\n * - `undefined': not initialized.\n * - `null`: initialized but `styles` is `null`\n * - `KeyValueArray`: parsed version of `styles`.\n */\n residualStyles: KeyValueArray<any> | undefined | null;\n\n /**\n * A collection of all class static values for an element (including from host).\n *\n * This field will be populated if and when:\n *\n * - There are one or more initial classes on an element (e.g. `<div class=\"one two three\">`)\n * - There are one or more initial classes on an directive/component host\n * (e.g. `@Directive({host: {class: \"SOME_CLASS\" } }`)\n */\n classes: string | null;\n\n /**\n * A collection of all class static values for an element excluding host sources.\n *\n * Populated when there are one or more initial classes on an element\n * (e.g. `<div class=\"SOME_CLASS\">`)\n * Must be stored separately from `tNode.classes` to facilitate setting directive\n * inputs that shadow the `class` property. If we used `tNode.classes` as is for shadowed\n * inputs, we would feed host classes back into directives as \"inputs\". If we used\n * `tNode.attrs`, we would have to concatenate the attributes on every template pass. Instead,\n * we process once on first create pass and store here.\n */\n classesWithoutHost: string | null;\n\n /**\n * A `KeyValueArray` version of residual `classes`.\n *\n * Same as `TNode.residualStyles` but for classes.\n *\n * - `undefined': not initialized.\n * - `null`: initialized but `classes` is `null`\n * - `KeyValueArray`: parsed version of `classes`.\n */\n residualClasses: KeyValueArray<any> | undefined | null;\n\n /**\n * Stores the head/tail index of the class bindings.\n *\n * - If no bindings, the head and tail will both be 0.\n * - If there are template bindings, stores the head/tail of the class bindings in the template.\n * - If no template bindings but there are host bindings, the head value will point to the last\n * host binding for \"class\" (not the head of the linked list), tail will be 0.\n *\n * See: `style_binding_list.ts` for details.\n *\n * This is used by `insertTStylingBinding` to know where the next styling binding should be\n * inserted so that they can be sorted in priority order.\n */\n classBindings: TStylingRange;\n\n /**\n * Stores the head/tail index of the class bindings.\n *\n * - If no bindings, the head and tail will both be 0.\n * - If there are template bindings, stores the head/tail of the style bindings in the template.\n * - If no template bindings but there are host bindings, the head value will point to the last\n * host binding for \"style\" (not the head of the linked list), tail will be 0.\n *\n * See: `style_binding_list.ts` for details.\n *\n * This is used by `insertTStylingBinding` to know where the next styling binding should be\n * inserted so that they can be sorted in priority order.\n */\n styleBindings: TStylingRange;\n}\n\n/**\n * See `TNode.insertBeforeIndex`\n */\nexport type InsertBeforeIndex = null | number | number[];\n\n/** Static data for an element */\nexport interface TElementNode extends TNode {\n /** Index in the data[] array */\n index: number;\n child: TElementNode | TTextNode | TElementContainerNode | TContainerNode | TProjectionNode | null;\n /**\n * Element nodes will have parents unless they are the first node of a component or\n * embedded view (which means their parent is in a different view and must be\n * retrieved using viewData[HOST_NODE]).\n */\n parent: TElementNode | TElementContainerNode | null;\n tView: null;\n\n /**\n * If this is a component TNode with projection, this will be an array of projected\n * TNodes or native nodes (see TNode.projection for more info). If it's a regular element node\n * or a component without projection, it will be null.\n */\n projection: (TNode | RNode[])[] | null;\n\n /**\n * Stores TagName\n */\n value: string;\n}\n\n/** Static data for a text node */\nexport interface TTextNode extends TNode {\n /** Index in the data[] array */\n index: number;\n child: null;\n /**\n * Text nodes will have parents unless they are the first node of a component or\n * embedded view (which means their parent is in a different view and must be\n * retrieved using LView.node).\n */\n parent: TElementNode | TElementContainerNode | null;\n tView: null;\n projection: null;\n}\n\n/** Static data for an LContainer */\nexport interface TContainerNode extends TNode {\n /**\n * Index in the data[] array.\n *\n * If it's -1, this is a dynamically created container node that isn't stored in\n * data[] (e.g. when you inject ViewContainerRef) .\n */\n index: number;\n child: null;\n\n /**\n * Container nodes will have parents unless:\n *\n * - They are the first node of a component or embedded view\n * - They are dynamically created\n */\n parent: TElementNode | TElementContainerNode | null;\n tView: TView | null;\n projection: null;\n value: null;\n}\n\n/** Static data for an <ng-container> */\nexport interface TElementContainerNode extends TNode {\n /** Index in the LView[] array. */\n index: number;\n child: TElementNode | TTextNode | TContainerNode | TElementContainerNode | TProjectionNode | null;\n parent: TElementNode | TElementContainerNode | null;\n tView: null;\n projection: null;\n}\n\n/** Static data for an ICU expression */\nexport interface TIcuContainerNode extends TNode {\n /** Index in the LView[] array. */\n index: number;\n child: null;\n parent: TElementNode | TElementContainerNode | null;\n tView: null;\n projection: null;\n value: TIcu;\n}\n\n/** Static data for an LProjectionNode */\nexport interface TProjectionNode extends TNode {\n /** Index in the data[] array */\n child: null;\n /**\n * Projection nodes will have parents unless they are the first node of a component\n * or embedded view (which means their parent is in a different view and must be\n * retrieved using LView.node).\n */\n parent: TElementNode | TElementContainerNode | null;\n tView: null;\n\n /** Index of the projection node. (See TNode.projection for more info.) */\n projection: number;\n value: null;\n}\n\n/**\n * Static data for a `@let` declaration. This node is necessary, because the expression of a\n * `@let` declaration can contain code that uses the node injector (e.g. pipes). In order for\n * the node injector to work, it needs this `TNode`.\n */\nexport interface TLetDeclarationNode extends TNode {\n index: number;\n child: null;\n parent: TElementNode | TElementContainerNode | null;\n tView: null;\n projection: null;\n value: null; // TODO(crisbeto): capture the name here? Might come in handy for the dev tools.\n}\n\n/**\n * A union type representing all TNode types that can host a directive.\n */\nexport type TDirectiveHostNode = TElementNode | TContainerNode | TElementContainerNode;\n\n/**\n * Maps the public names of outputs available on a specific node to the index\n * of the directive instance that defines the output, for example:\n *\n * ```\n * {\n * \"publicName\": [0, 5]\n * }\n * ```\n */\nexport type NodeOutputBindings = Record<string, number[]>;\n\n/**\n * Maps the public names of inputs applied to a specific node to the index of the\n * directive instance to which the input value should be written, for example:\n *\n * ```\n * {\n * \"publicName\": [0, 5]\n * }\n * ```\n */\nexport type NodeInputBindings = Record<string, number[]>;\n\n/**\n * This array contains information about input properties that\n * need to be set once from attribute data. It's ordered by\n * directive index (relative to element) so it's simple to\n * look up a specific directive's initial input data.\n *\n * Within each sub-array:\n *\n * i+0: public name\n * i+1: initial value\n *\n * If a directive on a node does not have any input properties\n * that should be set from attributes, its index is set to null\n * to avoid a sparse array.\n *\n * e.g. [null, ['role-min', 'minified-input', 'button']]\n */\nexport type InitialInputData = (InitialInputs | null)[];\n\n/**\n * Used by InitialInputData to store input properties\n * that should be set once from attributes.\n *\n * i+0: attribute name\n * i+1: minified/internal input name\n * i+2: input flags\n * i+3: initial value\n *\n * e.g. ['role-min', 'minified-input', 'button']\n */\nexport type InitialInputs = string[];\n\n/**\n * Represents inputs coming from a host directive and exposed on a TNode.\n *\n * - The key is the public name of an input as it is exposed on the specific node.\n * - The value is an array where:\n * - i+0: Index of the host directive that should be written to.\n * - i+1: Public name of the input as it was defined on the host directive before aliasing.\n */\nexport type HostDirectiveInputs = Record<string, (number | string)[]>;\n\n/**\n * Represents outputs coming from a host directive and exposed on a TNode.\n *\n * - The key is the public name of an output as it is exposed on the specific node.\n * - The value is an array where:\n * - i+0: Index of the host directive on which the output is defined..\n * - i+1: Public name of the output as it was defined on the host directive before aliasing.\n */\nexport type HostDirectiveOutputs = Record<string, (number | string)[]>;\n\n/**\n * Represents a map between a class reference and the index at which its directive is available on\n * a specific TNode. The value can be either:\n * 1. A number means that there's only one selector-matched directive on the node and it\n * doesn't have any host directives.\n * 2. An array means that there's a selector-matched directive and it has host directives.\n * The array is structured as follows:\n * - 0: Index of the selector-matched directive.\n * - 1: Start index of the range within which the host directives are defined.\n * - 2: End of the host directive range.\n *\n * Example:\n * ```\n * Map {\n * [NoHostDirectives]: 5,\n * [HasHostDirectives]: [10, 6, 8],\n * }\n * ```\n */\nexport type DirectiveIndexMap = Map<\n Type<unknown>,\n number | [directiveIndex: number, hostDirectivesStart: number, hostDirectivesEnd: number]\n>;\n\n/**\n * Type representing a set of TNodes that can have local refs (`#foo`) placed on them.\n */\nexport type TNodeWithLocalRefs = TContainerNode | TElementNode | TElementContainerNode;\n\n/**\n * Type for a function that extracts a value for a local refs.\n * Example:\n * - `<div #nativeDivEl>` - `nativeDivEl` should point to the native `<div>` element;\n * - `<ng-template #tplRef>` - `tplRef` should point to the `TemplateRef` instance;\n */\nexport type LocalRefExtractor = (tNode: TNodeWithLocalRefs, currentView: LView) => any;\n\n/**\n * Returns `true` if the `TNode` has a directive which has `@Input()` for `class` binding.\n *\n * ```html\n * <div my-dir [class]=\"exp\"></div>\n * ```\n * and\n * ```ts\n * @Directive({\n * })\n * class MyDirective {\n * @Input()\n * class: string;\n * }\n * ```\n *\n * In the above case it is necessary to write the reconciled styling information into the\n * directive's input.\n *\n * @param tNode\n */\nexport function hasClassInput(tNode: TNode) {\n return (tNode.flags & TNodeFlags.hasClassInput) !== 0;\n}\n\n/**\n * Returns `true` if the `TNode` has a directive which has `@Input()` for `style` binding.\n *\n * ```html\n * <div my-dir [style]=\"exp\"></div>\n * ```\n * and\n * ```ts\n * @Directive({\n * })\n * class MyDirective {\n * @Input()\n * class: string;\n * }\n * ```\n *\n * In the above case it is necessary to write the reconciled styling information into the\n * directive's input.\n *\n * @param tNode\n */\nexport function hasStyleInput(tNode: TNode) {\n return (tNode.flags & TNodeFlags.hasStyleInput) !== 0;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {assertDefined, throwError} from '../util/assert';\nimport {TNode, TNodeType, toTNodeTypeAsString} from './interfaces/node';\n\nexport function assertTNodeType(\n tNode: TNode | null,\n expectedTypes: TNodeType,\n message?: string,\n): void {\n assertDefined(tNode, 'should be called with a TNode');\n if ((tNode.type & expectedTypes) === 0) {\n throwError(\n message ||\n `Expected [${toTNodeTypeAsString(expectedTypes)}] but got ${toTNodeTypeAsString(\n tNode.type,\n )}.`,\n );\n }\n}\n\nexport function assertPureTNodeType(type: TNodeType) {\n if (\n !(\n type === TNodeType.Element ||\n type === TNodeType.Text ||\n type === TNodeType.Container ||\n type === TNodeType.ElementContainer ||\n type === TNodeType.Icu ||\n type === TNodeType.Projection ||\n type === TNodeType.Placeholder ||\n type === TNodeType.LetDeclaration\n )\n ) {\n throwError(\n `Expected TNodeType to have only a single type selected, but got ${toTNodeTypeAsString(\n type,\n )}.`,\n );\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport {CharCode} from '../../util/char_code';\nimport {AttributeMarker} from '../interfaces/attribute_marker';\nimport {TAttributes} from '../interfaces/node';\nimport {CssSelector} from '../interfaces/projection';\nimport {Renderer} from '../interfaces/renderer';\nimport {RElement} from '../interfaces/renderer_dom';\n\n/**\n * Assigns all attribute values to the provided element via the inferred renderer.\n *\n * This function accepts two forms of attribute entries:\n *\n * default: (key, value):\n * attrs = [key1, value1, key2, value2]\n *\n * namespaced: (NAMESPACE_MARKER, uri, name, value)\n * attrs = [NAMESPACE_MARKER, uri, name, value, NAMESPACE_MARKER, uri, name, value]\n *\n * The `attrs` array can contain a mix of both the default and namespaced entries.\n * The \"default\" values are set without a marker, but if the function comes across\n * a marker value then it will attempt to set a namespaced value. If the marker is\n * not of a namespaced value then the function will quit and return the index value\n * where it stopped during the iteration of the attrs array.\n *\n * See [AttributeMarker] to understand what the namespace marker value is.\n *\n * Note that this instruction does not support assigning style and class values to\n * an element. See `elementStart` and `elementHostAttrs` to learn how styling values\n * are applied to an element.\n * @param renderer The renderer to be used\n * @param native The element that the attributes will be assigned to\n * @param attrs The attribute array of values that will be assigned to the element\n * @returns the index value that was last accessed in the attributes array\n */\nexport function setUpAttributes(renderer: Renderer, native: RElement, attrs: TAttributes): number {\n let i = 0;\n while (i < attrs.length) {\n const value = attrs[i];\n if (typeof value === 'number') {\n // only namespaces are supported. Other value types (such as style/class\n // entries) are not supported in this function.\n if (value !== AttributeMarker.NamespaceURI) {\n break;\n }\n\n // we just landed on the marker value ... therefore\n // we should skip to the next entry\n i++;\n\n const namespaceURI = attrs[i++] as string;\n const attrName = attrs[i++] as string;\n const attrVal = attrs[i++] as string;\n ngDevMode && ngDevMode.rendererSetAttribute++;\n renderer.setAttribute(native, attrName, attrVal, namespaceURI);\n } else {\n // attrName is string;\n const attrName = value as string;\n const attrVal = attrs[++i];\n // Standard attributes\n ngDevMode && ngDevMode.rendererSetAttribute++;\n if (isAnimationProp(attrName)) {\n renderer.setProperty(native, attrName, attrVal);\n } else {\n renderer.setAttribute(native, attrName, attrVal as string);\n }\n i++;\n }\n }\n\n // another piece of code may iterate over the same attributes array. Therefore\n // it may be helpful to return the exact spot where the attributes array exited\n // whether by running into an unsupported marker or if all the static values were\n // iterated over.\n return i;\n}\n\n/**\n * Test whether the given value is a marker that indicates that the following\n * attribute values in a `TAttributes` array are only the names of attributes,\n * and not name-value pairs.\n * @param marker The attribute marker to test.\n * @returns true if the marker is a \"name-only\" marker (e.g. `Bindings`, `Template` or `I18n`).\n */\nexport function isNameOnlyAttributeMarker(marker: string | AttributeMarker | CssSelector) {\n return (\n marker === AttributeMarker.Bindings ||\n marker === AttributeMarker.Template ||\n marker === AttributeMarker.I18n\n );\n}\n\nexport function isAnimationProp(name: string): boolean {\n // Perf note: accessing charCodeAt to check for the first character of a string is faster as\n // compared to accessing a character at index 0 (ex. name[0]). The main reason for this is that\n // charCodeAt doesn't allocate memory to return a substring.\n return name.charCodeAt(0) === CharCode.AT_SIGN;\n}\n\n/**\n * Merges `src` `TAttributes` into `dst` `TAttributes` removing any duplicates in the process.\n *\n * This merge function keeps the order of attrs same.\n *\n * @param dst Location of where the merged `TAttributes` should end up.\n * @param src `TAttributes` which should be appended to `dst`\n */\nexport function mergeHostAttrs(\n dst: TAttributes | null,\n src: TAttributes | null,\n): TAttributes | null {\n if (src === null || src.length === 0) {\n // do nothing\n } else if (dst === null || dst.length === 0) {\n // We have source, but dst is empty, just make a copy.\n dst = src.slice();\n } else {\n let srcMarker: AttributeMarker = AttributeMarker.ImplicitAttributes;\n for (let i = 0; i < src.length; i++) {\n const item = src[i];\n if (typeof item === 'number') {\n srcMarker = item;\n } else {\n if (srcMarker === AttributeMarker.NamespaceURI) {\n // Case where we need to consume `key1`, `key2`, `value` items.\n } else if (\n srcMarker === AttributeMarker.ImplicitAttributes ||\n srcMarker === AttributeMarker.Styles\n ) {\n // Case where we have to consume `key1` and `value` only.\n mergeHostAttribute(dst, srcMarker, item as string, null, src[++i] as string);\n } else {\n // Case where we have to consume `key1` only.\n mergeHostAttribute(dst, srcMarker, item as string, null, null);\n }\n }\n }\n }\n return dst;\n}\n\n/**\n * Append `key`/`value` to existing `TAttributes` taking region marker and duplicates into account.\n *\n * @param dst `TAttributes` to append to.\n * @param marker Region where the `key`/`value` should be added.\n * @param key1 Key to add to `TAttributes`\n * @param key2 Key to add to `TAttributes` (in case of `AttributeMarker.NamespaceURI`)\n * @param value Value to add or to overwrite to `TAttributes` Only used if `marker` is not Class.\n */\nexport function mergeHostAttribute(\n dst: TAttributes,\n marker: AttributeMarker,\n key1: string,\n key2: string | null,\n value: string | null,\n): void {\n let i = 0;\n // Assume that new markers will be inserted at the end.\n let markerInsertPosition = dst.length;\n // scan until correct type.\n if (marker === AttributeMarker.ImplicitAttributes) {\n markerInsertPosition = -1;\n } else {\n while (i < dst.length) {\n const dstValue = dst[i++];\n if (typeof dstValue === 'number') {\n if (dstValue === marker) {\n markerInsertPosition = -1;\n break;\n } else if (dstValue > marker) {\n // We need to save this as we want the markers to be inserted in specific order.\n markerInsertPosition = i - 1;\n break;\n }\n }\n }\n }\n\n // search until you find place of insertion\n while (i < dst.length) {\n const item = dst[i];\n if (typeof item === 'number') {\n // since `i` started as the index after the marker, we did not find it if we are at the next\n // marker\n break;\n } else if (item === key1) {\n // We already have same token\n if (key2 === null) {\n if (value !== null) {\n dst[i + 1] = value;\n }\n return;\n } else if (key2 === dst[i + 1]) {\n dst[i + 2] = value!;\n return;\n }\n }\n // Increment counter.\n i++;\n if (key2 !== null) i++;\n if (value !== null) i++;\n }\n\n // insert at location.\n if (markerInsertPosition !== -1) {\n dst.splice(markerInsertPosition, 0, marker);\n i = markerInsertPosition + 1;\n }\n dst.splice(i++, 0, key1);\n if (key2 !== null) {\n dst.splice(i++, 0, key2);\n }\n if (value !== null) {\n dst.splice(i++, 0, value);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {type Injector} from '../../di/injector';\nimport {assertGreaterThan, assertNotEqual, assertNumber} from '../../util/assert';\nimport {ChainedInjector} from '../chained_injector';\nimport {\n NO_PARENT_INJECTOR,\n RelativeInjectorLocation,\n RelativeInjectorLocationFlags,\n} from '../interfaces/injector';\nimport {DECLARATION_VIEW, HEADER_OFFSET, LView} from '../interfaces/view';\n\n/// Parent Injector Utils ///////////////////////////////////////////////////////////////\nexport function hasParentInjector(parentLocation: RelativeInjectorLocation): boolean {\n return parentLocation !== NO_PARENT_INJECTOR;\n}\n\nexport function getParentInjectorIndex(parentLocation: RelativeInjectorLocation): number {\n if (ngDevMode) {\n assertNumber(parentLocation, 'Number expected');\n assertNotEqual(parentLocation as any, -1, 'Not a valid state.');\n const parentInjectorIndex = parentLocation & RelativeInjectorLocationFlags.InjectorIndexMask;\n\n assertGreaterThan(\n parentInjectorIndex,\n HEADER_OFFSET,\n 'Parent injector must be pointing past HEADER_OFFSET.',\n );\n }\n return parentLocation & RelativeInjectorLocationFlags.InjectorIndexMask;\n}\n\nexport function getParentInjectorViewOffset(parentLocation: RelativeInjectorLocation): number {\n return parentLocation >> RelativeInjectorLocationFlags.ViewOffsetShift;\n}\n\n/**\n * Unwraps a parent injector location number to find the view offset from the current injector,\n * then walks up the declaration view tree until the view is found that contains the parent\n * injector.\n *\n * @param location The location of the parent injector, which contains the view offset\n * @param startView The LView instance from which to start walking up the view tree\n * @returns The LView instance that contains the parent injector\n */\nexport function getParentInjectorView(location: RelativeInjectorLocation, startView: LView): LView {\n let viewOffset = getParentInjectorViewOffset(location);\n let parentView = startView;\n // For most cases, the parent injector can be found on the host node (e.g. for component\n // or container), but we must keep the loop here to support the rarer case of deeply nested\n // <ng-template> tags or inline views, where the parent injector might live many views\n // above the child injector.\n while (viewOffset > 0) {\n parentView = parentView[DECLARATION_VIEW]!;\n viewOffset--;\n }\n return parentView;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {isForwardRef, resolveForwardRef} from '../di/forward_ref';\nimport {injectRootLimpMode, setInjectImplementation} from '../di/inject_switch';\nimport {Injector} from '../di/injector';\nimport {convertToBitFlags} from '../di/injector_compatibility';\nimport {InjectorMarkers} from '../di/injector_marker';\nimport {InjectFlags, InjectOptions} from '../di/interface/injector';\nimport {ProviderToken} from '../di/provider_token';\nimport {Type} from '../interface/type';\nimport {assertDefined, assertEqual, assertIndexInRange} from '../util/assert';\nimport {noSideEffects} from '../util/closure';\n\nimport {assertDirectiveDef, assertNodeInjector, assertTNodeForLView} from './assert';\nimport {\n emitInstanceCreatedByInjectorEvent,\n InjectorProfilerContext,\n runInInjectorProfilerContext,\n setInjectorProfilerContext,\n} from './debug/injector_profiler';\nimport {getFactoryDef} from './definition_factory';\nimport {throwCyclicDependencyError, throwProviderNotFoundError} from './errors_di';\nimport {NG_ELEMENT_ID, NG_FACTORY_DEF} from './fields';\nimport {registerPreOrderHooks} from './hooks';\nimport {AttributeMarker} from './interfaces/attribute_marker';\nimport {ComponentDef, DirectiveDef} from './interfaces/definition';\nimport {\n NO_PARENT_INJECTOR,\n NodeInjectorFactory,\n NodeInjectorOffset,\n RelativeInjectorLocation,\n RelativeInjectorLocationFlags,\n} from './interfaces/injector';\nimport {\n TContainerNode,\n TDirectiveHostNode,\n TElementContainerNode,\n TElementNode,\n TNode,\n TNodeProviderIndexes,\n TNodeType,\n} from './interfaces/node';\nimport {isComponentDef, isComponentHost, isRootView} from './interfaces/type_checks';\nimport {\n DECLARATION_COMPONENT_VIEW,\n DECLARATION_VIEW,\n EMBEDDED_VIEW_INJECTOR,\n FLAGS,\n INJECTOR,\n LView,\n LViewFlags,\n T_HOST,\n TData,\n TVIEW,\n TView,\n TViewType,\n} from './interfaces/view';\nimport {assertTNodeType} from './node_assert';\nimport {enterDI, getCurrentTNode, getLView, leaveDI} from './state';\nimport {isNameOnlyAttributeMarker} from './util/attrs_utils';\nimport {\n getParentInjectorIndex,\n getParentInjectorView,\n hasParentInjector,\n} from './util/injector_utils';\nimport {stringifyForError} from './util/stringify_utils';\n\n/**\n * Defines if the call to `inject` should include `viewProviders` in its resolution.\n *\n * This is set to true when we try to instantiate a component. This value is reset in\n * `getNodeInjectable` to a value which matches the declaration location of the token about to be\n * instantiated. This is done so that if we are injecting a token which was declared outside of\n * `viewProviders` we don't accidentally pull `viewProviders` in.\n *\n * Example:\n *\n * ```ts\n * @Injectable()\n * class MyService {\n * constructor(public value: String) {}\n * }\n *\n * @Component({\n * providers: [\n * MyService,\n * {provide: String, value: 'providers' }\n * ]\n * viewProviders: [\n * {provide: String, value: 'viewProviders'}\n * ]\n * })\n * class MyComponent {\n * constructor(myService: MyService, value: String) {\n * // We expect that Component can see into `viewProviders`.\n * expect(value).toEqual('viewProviders');\n * // `MyService` was not declared in `viewProviders` hence it can't see it.\n * expect(myService.value).toEqual('providers');\n * }\n * }\n *\n * ```\n */\nlet includeViewProviders = true;\n\nexport function setIncludeViewProviders(v: boolean): boolean {\n const oldValue = includeViewProviders;\n includeViewProviders = v;\n return oldValue;\n}\n\n/**\n * The number of slots in each bloom filter (used by DI). The larger this number, the fewer\n * directives that will share slots, and thus, the fewer false positives when checking for\n * the existence of a directive.\n */\nconst BLOOM_SIZE = 256;\nconst BLOOM_MASK = BLOOM_SIZE - 1;\n\n/**\n * The number of bits that is represented by a single bloom bucket. JS bit operations are 32 bits,\n * so each bucket represents 32 distinct tokens which accounts for log2(32) = 5 bits of a bloom hash\n * number.\n */\nconst BLOOM_BUCKET_BITS = 5;\n\n/** Counter used to generate unique IDs for directives. */\nlet nextNgElementId = 0;\n\n/** Value used when something wasn't found by an injector. */\nconst NOT_FOUND = {};\n\n/**\n * Registers this directive as present in its node's injector by flipping the directive's\n * corresponding bit in the injector's bloom filter.\n *\n * @param injectorIndex The index of the node injector where this token should be registered\n * @param tView The TView for the injector's bloom filters\n * @param type The directive token to register\n */\nexport function bloomAdd(\n injectorIndex: number,\n tView: TView,\n type: ProviderToken<any> | string,\n): void {\n ngDevMode && assertEqual(tView.firstCreatePass, true, 'expected firstCreatePass to be true');\n let id: number | undefined;\n if (typeof type === 'string') {\n id = type.charCodeAt(0) || 0;\n } else if (type.hasOwnProperty(NG_ELEMENT_ID)) {\n id = (type as any)[NG_ELEMENT_ID];\n }\n\n // Set a unique ID on the directive type, so if something tries to inject the directive,\n // we can easily retrieve the ID and hash it into the bloom bit that should be checked.\n if (id == null) {\n id = (type as any)[NG_ELEMENT_ID] = nextNgElementId++;\n }\n\n // We only have BLOOM_SIZE (256) slots in our bloom filter (8 buckets * 32 bits each),\n // so all unique IDs must be modulo-ed into a number from 0 - 255 to fit into the filter.\n const bloomHash = id & BLOOM_MASK;\n\n // Create a mask that targets the specific bit associated with the directive.\n // JS bit operations are 32 bits, so this will be a number between 2^0 and 2^31, corresponding\n // to bit positions 0 - 31 in a 32 bit integer.\n const mask = 1 << bloomHash;\n\n // Each bloom bucket in `tData` represents `BLOOM_BUCKET_BITS` number of bits of `bloomHash`.\n // Any bits in `bloomHash` beyond `BLOOM_BUCKET_BITS` indicate the bucket offset that the mask\n // should be written to.\n (tView.data as number[])[injectorIndex + (bloomHash >> BLOOM_BUCKET_BITS)] |= mask;\n}\n\n/**\n * Creates (or gets an existing) injector for a given element or container.\n *\n * @param tNode for which an injector should be retrieved / created.\n * @param lView View where the node is stored\n * @returns Node injector\n */\nexport function getOrCreateNodeInjectorForNode(\n tNode: TElementNode | TContainerNode | TElementContainerNode,\n lView: LView,\n): number {\n const existingInjectorIndex = getInjectorIndex(tNode, lView);\n if (existingInjectorIndex !== -1) {\n return existingInjectorIndex;\n }\n\n const tView = lView[TVIEW];\n if (tView.firstCreatePass) {\n tNode.injectorIndex = lView.length;\n insertBloom(tView.data, tNode); // foundation for node bloom\n insertBloom(lView, null); // foundation for cumulative bloom\n insertBloom(tView.blueprint, null);\n }\n\n const parentLoc = getParentInjectorLocation(tNode, lView);\n const injectorIndex = tNode.injectorIndex;\n\n // If a parent injector can't be found, its location is set to -1.\n // In that case, we don't need to set up a cumulative bloom\n if (hasParentInjector(parentLoc)) {\n const parentIndex = getParentInjectorIndex(parentLoc);\n const parentLView = getParentInjectorView(parentLoc, lView);\n const parentData = parentLView[TVIEW].data as any;\n // Creates a cumulative bloom filter that merges the parent's bloom filter\n // and its own cumulative bloom (which contains tokens for all ancestors)\n for (let i = 0; i < NodeInjectorOffset.BLOOM_SIZE; i++) {\n lView[injectorIndex + i] = parentLView[parentIndex + i] | parentData[parentIndex + i];\n }\n }\n\n lView[injectorIndex + NodeInjectorOffset.PARENT] = parentLoc;\n return injectorIndex;\n}\n\nfunction insertBloom(arr: any[], footer: TNode | null): void {\n arr.push(0, 0, 0, 0, 0, 0, 0, 0, footer);\n}\n\nexport function getInjectorIndex(tNode: TNode, lView: LView): number {\n if (\n tNode.injectorIndex === -1 ||\n // If the injector index is the same as its parent's injector index, then the index has been\n // copied down from the parent node. No injector has been created yet on this node.\n (tNode.parent && tNode.parent.injectorIndex === tNode.injectorIndex) ||\n // After the first template pass, the injector index might exist but the parent values\n // might not have been calculated yet for this instance\n lView[tNode.injectorIndex + NodeInjectorOffset.PARENT] === null\n ) {\n return -1;\n } else {\n ngDevMode && assertIndexInRange(lView, tNode.injectorIndex);\n return tNode.injectorIndex;\n }\n}\n\n/**\n * Finds the index of the parent injector, with a view offset if applicable. Used to set the\n * parent injector initially.\n *\n * @returns Returns a number that is the combination of the number of LViews that we have to go up\n * to find the LView containing the parent inject AND the index of the injector within that LView.\n */\nexport function getParentInjectorLocation(tNode: TNode, lView: LView): RelativeInjectorLocation {\n if (tNode.parent && tNode.parent.injectorIndex !== -1) {\n // If we have a parent `TNode` and there is an injector associated with it we are done, because\n // the parent injector is within the current `LView`.\n return tNode.parent.injectorIndex as RelativeInjectorLocation; // ViewOffset is 0\n }\n\n // When parent injector location is computed it may be outside of the current view. (ie it could\n // be pointing to a declared parent location). This variable stores number of declaration parents\n // we need to walk up in order to find the parent injector location.\n let declarationViewOffset = 0;\n let parentTNode: TNode | null = null;\n let lViewCursor: LView | null = lView;\n\n // The parent injector is not in the current `LView`. We will have to walk the declared parent\n // `LView` hierarchy and look for it. If we walk of the top, that means that there is no parent\n // `NodeInjector`.\n while (lViewCursor !== null) {\n parentTNode = getTNodeFromLView(lViewCursor);\n\n if (parentTNode === null) {\n // If we have no parent, than we are done.\n return NO_PARENT_INJECTOR;\n }\n\n ngDevMode && parentTNode && assertTNodeForLView(parentTNode!, lViewCursor[DECLARATION_VIEW]!);\n // Every iteration of the loop requires that we go to the declared parent.\n declarationViewOffset++;\n lViewCursor = lViewCursor[DECLARATION_VIEW];\n\n if (parentTNode.injectorIndex !== -1) {\n // We found a NodeInjector which points to something.\n return (parentTNode.injectorIndex |\n (declarationViewOffset <<\n RelativeInjectorLocationFlags.ViewOffsetShift)) as RelativeInjectorLocation;\n }\n }\n return NO_PARENT_INJECTOR;\n}\n/**\n * Makes a type or an injection token public to the DI system by adding it to an\n * injector's bloom filter.\n *\n * @param di The node injector in which a directive will be added\n * @param token The type or the injection token to be made public\n */\nexport function diPublicInInjector(\n injectorIndex: number,\n tView: TView,\n token: ProviderToken<any>,\n): void {\n bloomAdd(injectorIndex, tView, token);\n}\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 * ```ts\n * @Component(...)\n * class MyComponent {\n * constructor(@Attribute('title') title: string) { ... }\n * }\n * ```\n * When instantiated with\n * ```html\n * <my-component title=\"Hello\"></my-component>\n * ```\n *\n * Then factory method generated is:\n * ```ts\n * MyComponent.ɵcmp = defineComponent({\n * factory: () => new MyComponent(injectAttribute('title'))\n * ...\n * })\n * ```\n *\n * @publicApi\n */\nexport function injectAttributeImpl(tNode: TNode, attrNameToInject: string): string | null {\n ngDevMode && assertTNodeType(tNode, TNodeType.AnyContainer | TNodeType.AnyRNode);\n ngDevMode && assertDefined(tNode, 'expecting tNode');\n if (attrNameToInject === 'class') {\n return tNode.classes;\n }\n if (attrNameToInject === 'style') {\n return tNode.styles;\n }\n\n const attrs = tNode.attrs;\n if (attrs) {\n const attrsLength = attrs.length;\n let i = 0;\n while (i < attrsLength) {\n const value = attrs[i];\n\n // If we hit a `Bindings` or `Template` marker then we are done.\n if (isNameOnlyAttributeMarker(value)) break;\n\n // Skip namespaced attributes\n if (value === AttributeMarker.NamespaceURI) {\n // we skip the next two values\n // as namespaced attributes looks like\n // [..., AttributeMarker.NamespaceURI, 'http://someuri.com/test', 'test:exist',\n // 'existValue', ...]\n i = i + 2;\n } else if (typeof value === 'number') {\n // Skip to the first value of the marked attribute.\n i++;\n while (i < attrsLength && typeof attrs[i] === 'string') {\n i++;\n }\n } else if (value === attrNameToInject) {\n return attrs[i + 1] as string;\n } else {\n i = i + 2;\n }\n }\n }\n return null;\n}\n\nfunction notFoundValueOrThrow<T>(\n notFoundValue: T | null,\n token: ProviderToken<T>,\n flags: InjectFlags,\n): T | null {\n if (flags & InjectFlags.Optional || notFoundValue !== undefined) {\n return notFoundValue;\n } else {\n throwProviderNotFoundError(token, 'NodeInjector');\n }\n}\n\n/**\n * Returns the value associated to the given token from the ModuleInjector or throws exception\n *\n * @param lView The `LView` that contains the `tNode`\n * @param token The token to look for\n * @param flags Injection flags\n * @param notFoundValue The value to return when the injection flags is `InjectFlags.Optional`\n * @returns the value from the injector or throws an exception\n */\nfunction lookupTokenUsingModuleInjector<T>(\n lView: LView,\n token: ProviderToken<T>,\n flags: InjectFlags,\n notFoundValue?: any,\n): T | null {\n if (flags & InjectFlags.Optional && notFoundValue === undefined) {\n // This must be set or the NullInjector will throw for optional deps\n notFoundValue = null;\n }\n\n if ((flags & (InjectFlags.Self | InjectFlags.Host)) === 0) {\n const moduleInjector = lView[INJECTOR];\n // switch to `injectInjectorOnly` implementation for module injector, since module injector\n // should not have access to Component/Directive DI scope (that may happen through\n // `directiveInject` implementation)\n const previousInjectImplementation = setInjectImplementation(undefined);\n try {\n if (moduleInjector) {\n return moduleInjector.get(token, notFoundValue, flags & InjectFlags.Optional);\n } else {\n return injectRootLimpMode(token, notFoundValue, flags & InjectFlags.Optional);\n }\n } finally {\n setInjectImplementation(previousInjectImplementation);\n }\n }\n return notFoundValueOrThrow<T>(notFoundValue, token, flags);\n}\n\n/**\n * Returns the value associated to the given token from the NodeInjectors => ModuleInjector.\n *\n * Look for the injector providing the token by walking up the node injector tree and then\n * the module injector tree.\n *\n * This function patches `token` with `__NG_ELEMENT_ID__` which contains the id for the bloom\n * filter. `-1` is reserved for injecting `Injector` (implemented by `NodeInjector`)\n *\n * @param tNode The Node where the search for the injector should start\n * @param lView The `LView` that contains the `tNode`\n * @param token The token to look for\n * @param flags Injection flags\n * @param notFoundValue The value to return when the injection flags is `InjectFlags.Optional`\n * @returns the value from the injector, `null` when not found, or `notFoundValue` if provided\n */\nexport function getOrCreateInjectable<T>(\n tNode: TDirectiveHostNode | null,\n lView: LView,\n token: ProviderToken<T>,\n flags: InjectFlags = InjectFlags.Default,\n notFoundValue?: any,\n): T | null {\n if (tNode !== null) {\n // If the view or any of its ancestors have an embedded\n // view injector, we have to look it up there first.\n if (\n lView[FLAGS] & LViewFlags.HasEmbeddedViewInjector &&\n // The token must be present on the current node injector when the `Self`\n // flag is set, so the lookup on embedded view injector(s) can be skipped.\n !(flags & InjectFlags.Self)\n ) {\n const embeddedInjectorValue = lookupTokenUsingEmbeddedInjector(\n tNode,\n lView,\n token,\n flags,\n NOT_FOUND,\n );\n if (embeddedInjectorValue !== NOT_FOUND) {\n return embeddedInjectorValue;\n }\n }\n\n // Otherwise try the node injector.\n const value = lookupTokenUsingNodeInjector(tNode, lView, token, flags, NOT_FOUND);\n if (value !== NOT_FOUND) {\n return value;\n }\n }\n\n // Finally, fall back to the module injector.\n return lookupTokenUsingModuleInjector<T>(lView, token, flags, notFoundValue);\n}\n\n/**\n * Returns the value associated to the given token from the node injector.\n *\n * @param tNode The Node where the search for the injector should start\n * @param lView The `LView` that contains the `tNode`\n * @param token The token to look for\n * @param flags Injection flags\n * @param notFoundValue The value to return when the injection flags is `InjectFlags.Optional`\n * @returns the value from the injector, `null` when not found, or `notFoundValue` if provided\n */\nfunction lookupTokenUsingNodeInjector<T>(\n tNode: TDirectiveHostNode,\n lView: LView,\n token: ProviderToken<T>,\n flags: InjectFlags,\n notFoundValue?: any,\n) {\n const bloomHash = bloomHashBitOrFactory(token);\n // If the ID stored here is a function, this is a special object like ElementRef or TemplateRef\n // so just call the factory function to create it.\n if (typeof bloomHash === 'function') {\n if (!enterDI(lView, tNode, flags)) {\n // Failed to enter DI, try module injector instead. If a token is injected with the @Host\n // flag, the module injector is not searched for that token in Ivy.\n return flags & InjectFlags.Host\n ? notFoundValueOrThrow<T>(notFoundValue, token, flags)\n : lookupTokenUsingModuleInjector<T>(lView, token, flags, notFoundValue);\n }\n try {\n let value: unknown;\n\n if (ngDevMode) {\n runInInjectorProfilerContext(\n new NodeInjector(getCurrentTNode() as TElementNode, getLView()),\n token as Type<T>,\n () => {\n value = bloomHash(flags);\n\n if (value != null) {\n emitInstanceCreatedByInjectorEvent(value);\n }\n },\n );\n } else {\n value = bloomHash(flags);\n }\n\n if (value == null && !(flags & InjectFlags.Optional)) {\n throwProviderNotFoundError(token);\n } else {\n return value;\n }\n } finally {\n leaveDI();\n }\n } else if (typeof bloomHash === 'number') {\n // A reference to the previous injector TView that was found while climbing the element\n // injector tree. This is used to know if viewProviders can be accessed on the current\n // injector.\n let previousTView: TView | null = null;\n let injectorIndex = getInjectorIndex(tNode, lView);\n let parentLocation = NO_PARENT_INJECTOR;\n let hostTElementNode: TNode | null =\n flags & InjectFlags.Host ? lView[DECLARATION_COMPONENT_VIEW][T_HOST] : null;\n\n // If we should skip this injector, or if there is no injector on this node, start by\n // searching the parent injector.\n if (injectorIndex === -1 || flags & InjectFlags.SkipSelf) {\n parentLocation =\n injectorIndex === -1\n ? getParentInjectorLocation(tNode, lView)\n : lView[injectorIndex + NodeInjectorOffset.PARENT];\n\n if (parentLocation === NO_PARENT_INJECTOR || !shouldSearchParent(flags, false)) {\n injectorIndex = -1;\n } else {\n previousTView = lView[TVIEW];\n injectorIndex = getParentInjectorIndex(parentLocation);\n lView = getParentInjectorView(parentLocation, lView);\n }\n }\n\n // Traverse up the injector tree until we find a potential match or until we know there\n // *isn't* a match.\n while (injectorIndex !== -1) {\n ngDevMode && assertNodeInjector(lView, injectorIndex);\n\n // Check the current injector. If it matches, see if it contains token.\n const tView = lView[TVIEW];\n ngDevMode &&\n assertTNodeForLView(tView.data[injectorIndex + NodeInjectorOffset.TNODE] as TNode, lView);\n if (bloomHasToken(bloomHash, injectorIndex, tView.data)) {\n // At this point, we have an injector which *may* contain the token, so we step through\n // the providers and directives associated with the injector's corresponding node to get\n // the instance.\n const instance: T | {} | null = searchTokensOnInjector<T>(\n injectorIndex,\n lView,\n token,\n previousTView,\n flags,\n hostTElementNode,\n );\n if (instance !== NOT_FOUND) {\n return instance;\n }\n }\n parentLocation = lView[injectorIndex + NodeInjectorOffset.PARENT];\n if (\n parentLocation !== NO_PARENT_INJECTOR &&\n shouldSearchParent(\n flags,\n lView[TVIEW].data[injectorIndex + NodeInjectorOffset.TNODE] === hostTElementNode,\n ) &&\n bloomHasToken(bloomHash, injectorIndex, lView)\n ) {\n // The def wasn't found anywhere on this node, so it was a false positive.\n // Traverse up the tree and continue searching.\n previousTView = tView;\n injectorIndex = getParentInjectorIndex(parentLocation);\n lView = getParentInjectorView(parentLocation, lView);\n } else {\n // If we should not search parent OR If the ancestor bloom filter value does not have the\n // bit corresponding to the directive we can give up on traversing up to find the specific\n // injector.\n injectorIndex = -1;\n }\n }\n }\n\n return notFoundValue;\n}\n\nfunction searchTokensOnInjector<T>(\n injectorIndex: number,\n lView: LView,\n token: ProviderToken<T>,\n previousTView: TView | null,\n flags: InjectFlags,\n hostTElementNode: TNode | null,\n) {\n const currentTView = lView[TVIEW];\n const tNode = currentTView.data[injectorIndex + NodeInjectorOffset.TNODE] as TNode;\n // First, we need to determine if view providers can be accessed by the starting element.\n // There are two possibilities\n const canAccessViewProviders =\n previousTView == null\n ? // 1) This is the first invocation `previousTView == null` which means that we are at the\n // `TNode` of where injector is starting to look. In such a case the only time we are allowed\n // to look into the ViewProviders is if:\n // - we are on a component\n // - AND the injector set `includeViewProviders` to true (implying that the token can see\n // ViewProviders because it is the Component or a Service which itself was declared in\n // ViewProviders)\n isComponentHost(tNode) && includeViewProviders\n : // 2) `previousTView != null` which means that we are now walking across the parent nodes.\n // In such a case we are only allowed to look into the ViewProviders if:\n // - We just crossed from child View to Parent View `previousTView != currentTView`\n // - AND the parent TNode is an Element.\n // This means that we just came from the Component's View and therefore are allowed to see\n // into the ViewProviders.\n previousTView != currentTView && (tNode.type & TNodeType.AnyRNode) !== 0;\n\n // This special case happens when there is a @host on the inject and when we are searching\n // on the host element node.\n const isHostSpecialCase = flags & InjectFlags.Host && hostTElementNode === tNode;\n\n const injectableIdx = locateDirectiveOrProvider(\n tNode,\n currentTView,\n token,\n canAccessViewProviders,\n isHostSpecialCase,\n );\n if (injectableIdx !== null) {\n return getNodeInjectable(lView, currentTView, injectableIdx, tNode as TElementNode, flags);\n } else {\n return NOT_FOUND;\n }\n}\n\n/**\n * Searches for the given token among the node's directives and providers.\n *\n * @param tNode TNode on which directives are present.\n * @param tView The tView we are currently processing\n * @param token Provider token or type of a directive to look for.\n * @param canAccessViewProviders Whether view providers should be considered.\n * @param isHostSpecialCase Whether the host special case applies.\n * @returns Index of a found directive or provider, or null when none found.\n */\nexport function locateDirectiveOrProvider<T>(\n tNode: TNode,\n tView: TView,\n token: ProviderToken<T> | string,\n canAccessViewProviders: boolean,\n isHostSpecialCase: boolean | number,\n): number | null {\n const nodeProviderIndexes = tNode.providerIndexes;\n const tInjectables = tView.data;\n\n const injectablesStart = nodeProviderIndexes & TNodeProviderIndexes.ProvidersStartIndexMask;\n const directivesStart = tNode.directiveStart;\n const directiveEnd = tNode.directiveEnd;\n const cptViewProvidersCount =\n nodeProviderIndexes >> TNodeProviderIndexes.CptViewProvidersCountShift;\n const startingIndex = canAccessViewProviders\n ? injectablesStart\n : injectablesStart + cptViewProvidersCount;\n // When the host special case applies, only the viewProviders and the component are visible\n const endIndex = isHostSpecialCase ? injectablesStart + cptViewProvidersCount : directiveEnd;\n for (let i = startingIndex; i < endIndex; i++) {\n const providerTokenOrDef = tInjectables[i] as ProviderToken<any> | DirectiveDef<any> | string;\n if (\n (i < directivesStart && token === providerTokenOrDef) ||\n (i >= directivesStart && (providerTokenOrDef as DirectiveDef<any>).type === token)\n ) {\n return i;\n }\n }\n if (isHostSpecialCase) {\n const dirDef = tInjectables[directivesStart] as DirectiveDef<any>;\n if (dirDef && isComponentDef(dirDef) && dirDef.type === token) {\n return directivesStart;\n }\n }\n return null;\n}\n\n/**\n * Retrieve or instantiate the injectable from the `LView` at particular `index`.\n *\n * This function checks to see if the value has already been instantiated and if so returns the\n * cached `injectable`. Otherwise if it detects that the value is still a factory it\n * instantiates the `injectable` and caches the value.\n */\nexport function getNodeInjectable(\n lView: LView,\n tView: TView,\n index: number,\n tNode: TDirectiveHostNode,\n flags?: InjectFlags,\n): any {\n let value = lView[index];\n const tData = tView.data;\n if (value instanceof NodeInjectorFactory) {\n const factory: NodeInjectorFactory = value;\n if (factory.resolving) {\n throwCyclicDependencyError(stringifyForError(tData[index]));\n }\n const previousIncludeViewProviders = setIncludeViewProviders(factory.canSeeViewProviders);\n factory.resolving = true;\n\n let prevInjectContext: InjectorProfilerContext | undefined;\n if (ngDevMode) {\n // tData indexes mirror the concrete instances in its corresponding LView.\n // lView[index] here is either the injectable instace itself or a factory,\n // therefore tData[index] is the constructor of that injectable or a\n // definition object that contains the constructor in a `.type` field.\n const token =\n (tData[index] as DirectiveDef<unknown> | ComponentDef<unknown>).type || tData[index];\n const injector = new NodeInjector(tNode, lView);\n prevInjectContext = setInjectorProfilerContext({injector, token});\n }\n\n const previousInjectImplementation = factory.injectImpl\n ? setInjectImplementation(factory.injectImpl)\n : null;\n const success = enterDI(lView, tNode, InjectFlags.Default);\n ngDevMode &&\n assertEqual(\n success,\n true,\n \"Because flags do not contain `SkipSelf' we expect this to always succeed.\",\n );\n try {\n value = lView[index] = factory.factory(undefined, flags, tData, lView, tNode);\n\n ngDevMode && emitInstanceCreatedByInjectorEvent(value);\n\n // This code path is hit for both directives and providers.\n // For perf reasons, we want to avoid searching for hooks on providers.\n // It does no harm to try (the hooks just won't exist), but the extra\n // checks are unnecessary and this is a hot path. So we check to see\n // if the index of the dependency is in the directive range for this\n // tNode. If it's not, we know it's a provider and skip hook registration.\n if (tView.firstCreatePass && index >= tNode.directiveStart) {\n ngDevMode && assertDirectiveDef(tData[index]);\n registerPreOrderHooks(index, tData[index] as DirectiveDef<any>, tView);\n }\n } finally {\n ngDevMode && setInjectorProfilerContext(prevInjectContext!);\n\n previousInjectImplementation !== null &&\n setInjectImplementation(previousInjectImplementation);\n setIncludeViewProviders(previousIncludeViewProviders);\n factory.resolving = false;\n leaveDI();\n }\n }\n return value;\n}\n\n/**\n * Returns the bit in an injector's bloom filter that should be used to determine whether or not\n * the directive might be provided by the injector.\n *\n * When a directive is public, it is added to the bloom filter and given a unique ID that can be\n * retrieved on the Type. When the directive isn't public or the token is not a directive `null`\n * is returned as the node injector can not possibly provide that token.\n *\n * @param token the injection token\n * @returns the matching bit to check in the bloom filter or `null` if the token is not known.\n * When the returned value is negative then it represents special values such as `Injector`.\n */\nexport function bloomHashBitOrFactory(\n token: ProviderToken<any> | string,\n): number | Function | undefined {\n ngDevMode && assertDefined(token, 'token must be defined');\n if (typeof token === 'string') {\n return token.charCodeAt(0) || 0;\n }\n const tokenId: number | undefined =\n // First check with `hasOwnProperty` so we don't get an inherited ID.\n token.hasOwnProperty(NG_ELEMENT_ID) ? (token as any)[NG_ELEMENT_ID] : undefined;\n // Negative token IDs are used for special objects such as `Injector`\n if (typeof tokenId === 'number') {\n if (tokenId >= 0) {\n return tokenId & BLOOM_MASK;\n } else {\n ngDevMode &&\n assertEqual(tokenId, InjectorMarkers.Injector, 'Expecting to get Special Injector Id');\n return createNodeInjector;\n }\n } else {\n return tokenId;\n }\n}\n\nexport function bloomHasToken(\n bloomHash: number,\n injectorIndex: number,\n injectorView: LView | TData,\n) {\n // Create a mask that targets the specific bit associated with the directive we're looking for.\n // JS bit operations are 32 bits, so this will be a number between 2^0 and 2^31, corresponding\n // to bit positions 0 - 31 in a 32 bit integer.\n const mask = 1 << bloomHash;\n\n // Each bloom bucket in `injectorView` represents `BLOOM_BUCKET_BITS` number of bits of\n // `bloomHash`. Any bits in `bloomHash` beyond `BLOOM_BUCKET_BITS` indicate the bucket offset\n // that should be used.\n const value = injectorView[injectorIndex + (bloomHash >> BLOOM_BUCKET_BITS)];\n\n // If the bloom filter value has the bit corresponding to the directive's bloomBit flipped on,\n // this injector is a potential match.\n return !!(value & mask);\n}\n\n/** Returns true if flags prevent parent injector from being searched for tokens */\nfunction shouldSearchParent(flags: InjectFlags, isFirstHostTNode: boolean): boolean | number {\n return !(flags & InjectFlags.Self) && !(flags & InjectFlags.Host && isFirstHostTNode);\n}\n\nexport function getNodeInjectorLView(nodeInjector: NodeInjector): LView {\n return (nodeInjector as any)._lView as LView;\n}\n\nexport function getNodeInjectorTNode(\n nodeInjector: NodeInjector,\n): TElementNode | TContainerNode | TElementContainerNode | null {\n return (nodeInjector as any)._tNode as\n | TElementNode\n | TContainerNode\n | TElementContainerNode\n | null;\n}\n\nexport class NodeInjector implements Injector {\n constructor(\n private _tNode: TElementNode | TContainerNode | TElementContainerNode | null,\n private _lView: LView,\n ) {}\n\n get(token: any, notFoundValue?: any, flags?: InjectFlags | InjectOptions): any {\n return getOrCreateInjectable(\n this._tNode,\n this._lView,\n token,\n convertToBitFlags(flags),\n notFoundValue,\n );\n }\n}\n\n/** Creates a `NodeInjector` for the current node. */\nexport function createNodeInjector(): Injector {\n return new NodeInjector(getCurrentTNode()! as TDirectiveHostNode, getLView()) as any;\n}\n\n/**\n * @codeGenApi\n */\nexport function ɵɵgetInheritedFactory<T>(type: Type<any>): (type: Type<T>) => T {\n return noSideEffects(() => {\n const ownConstructor = type.prototype.constructor;\n const ownFactory = ownConstructor[NG_FACTORY_DEF] || getFactoryOf(ownConstructor);\n const objectPrototype = Object.prototype;\n let parent = Object.getPrototypeOf(type.prototype).constructor;\n\n // Go up the prototype until we hit `Object`.\n while (parent && parent !== objectPrototype) {\n const factory = parent[NG_FACTORY_DEF] || getFactoryOf(parent);\n\n // If we hit something that has a factory and the factory isn't the same as the type,\n // we've found the inherited factory. Note the check that the factory isn't the type's\n // own factory is redundant in most cases, but if the user has custom decorators on the\n // class, this lookup will start one level down in the prototype chain, causing us to\n // find the own factory first and potentially triggering an infinite loop downstream.\n if (factory && factory !== ownFactory) {\n return factory;\n }\n\n parent = Object.getPrototypeOf(parent);\n }\n\n // There is no factory defined. Either this was improper usage of inheritance\n // (no Angular decorator on the superclass) or there is no constructor at all\n // in the inheritance chain. Since the two cases cannot be distinguished, the\n // latter has to be assumed.\n return (t: Type<T>) => new t();\n });\n}\n\nfunction getFactoryOf<T>(type: Type<any>): ((type?: Type<T>) => T | null) | null {\n if (isForwardRef(type)) {\n return () => {\n const factory = getFactoryOf<T>(resolveForwardRef(type));\n return factory && factory();\n };\n }\n return getFactoryDef<T>(type);\n}\n\n/**\n * Returns a value from the closest embedded or node injector.\n *\n * @param tNode The Node where the search for the injector should start\n * @param lView The `LView` that contains the `tNode`\n * @param token The token to look for\n * @param flags Injection flags\n * @param notFoundValue The value to return when the injection flags is `InjectFlags.Optional`\n * @returns the value from the injector, `null` when not found, or `notFoundValue` if provided\n */\nfunction lookupTokenUsingEmbeddedInjector<T>(\n tNode: TDirectiveHostNode,\n lView: LView,\n token: ProviderToken<T>,\n flags: InjectFlags,\n notFoundValue?: any,\n) {\n let currentTNode: TDirectiveHostNode | null = tNode;\n let currentLView: LView | null = lView;\n\n // When an LView with an embedded view injector is inserted, it'll likely be interlaced with\n // nodes who may have injectors (e.g. node injector -> embedded view injector -> node injector).\n // Since the bloom filters for the node injectors have already been constructed and we don't\n // have a way of extracting the records from an injector, the only way to maintain the correct\n // hierarchy when resolving the value is to walk it node-by-node while attempting to resolve\n // the token at each level.\n while (\n currentTNode !== null &&\n currentLView !== null &&\n currentLView[FLAGS] & LViewFlags.HasEmbeddedViewInjector &&\n !isRootView(currentLView)\n ) {\n ngDevMode && assertTNodeForLView(currentTNode, currentLView);\n\n // Note that this lookup on the node injector is using the `Self` flag, because\n // we don't want the node injector to look at any parent injectors since we\n // may hit the embedded view injector first.\n const nodeInjectorValue = lookupTokenUsingNodeInjector(\n currentTNode,\n currentLView,\n token,\n flags | InjectFlags.Self,\n NOT_FOUND,\n );\n if (nodeInjectorValue !== NOT_FOUND) {\n return nodeInjectorValue;\n }\n\n // Has an explicit type due to a TS bug: https://github.com/microsoft/TypeScript/issues/33191\n let parentTNode: TElementNode | TContainerNode | null = currentTNode.parent;\n\n // `TNode.parent` includes the parent within the current view only. If it doesn't exist,\n // it means that we've hit the view boundary and we need to go up to the next view.\n if (!parentTNode) {\n // Before we go to the next LView, check if the token exists on the current embedded injector.\n const embeddedViewInjector = currentLView[EMBEDDED_VIEW_INJECTOR];\n if (embeddedViewInjector) {\n const embeddedViewInjectorValue = embeddedViewInjector.get(\n token,\n NOT_FOUND as T | {},\n flags,\n );\n if (embeddedViewInjectorValue !== NOT_FOUND) {\n return embeddedViewInjectorValue;\n }\n }\n\n // Otherwise keep going up the tree.\n parentTNode = getTNodeFromLView(currentLView);\n currentLView = currentLView[DECLARATION_VIEW];\n }\n\n currentTNode = parentTNode;\n }\n\n return notFoundValue;\n}\n\n/** Gets the TNode associated with an LView inside of the declaration view. */\nfunction getTNodeFromLView(lView: LView): TElementNode | TElementContainerNode | null {\n const tView = lView[TVIEW];\n const tViewType = tView.type;\n\n // The parent pointer differs based on `TView.type`.\n if (tViewType === TViewType.Embedded) {\n ngDevMode && assertDefined(tView.declTNode, 'Embedded TNodes should have declaration parents.');\n return tView.declTNode as TElementContainerNode;\n } else if (tViewType === TViewType.Component) {\n // Components don't have `TView.declTNode` because each instance of component could be\n // inserted in different location, hence `TView.declTNode` is meaningless.\n return lView[T_HOST] as TElementNode;\n }\n\n return null;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport {injectAttributeImpl} from '../di';\nimport {getCurrentTNode} from '../state';\n\n/**\n * Facade for the attribute injection from DI.\n *\n * @codeGenApi\n */\nexport function ɵɵinjectAttribute(attrNameToInject: string): string | null {\n return injectAttributeImpl(getCurrentTNode()!, attrNameToInject);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ɵɵinjectAttribute} from '../render3/instructions/di_attr';\nimport {makeParamDecorator} from '../util/decorators';\n\n/**\n * Type of the Attribute decorator / constructor function.\n *\n * @publicApi\n */\nexport interface AttributeDecorator {\n /**\n * Parameter decorator for a directive constructor that designates\n * a host-element attribute whose value is injected as a constant string literal.\n *\n * @usageNotes\n *\n * Suppose we have an `<input>` element and want to know its `type`.\n *\n * ```html\n * <input type=\"text\">\n * ```\n *\n * The following example uses the decorator to inject the string literal `text` in a directive.\n *\n * {@example core/ts/metadata/metadata.ts region='attributeMetadata'}\n *\n * The following example uses the decorator in a component constructor.\n *\n * {@example core/ts/metadata/metadata.ts region='attributeFactory'}\n *\n */\n (name: string): any;\n new (name: string): Attribute;\n}\n\n/**\n * Type of the Attribute metadata.\n *\n * @publicApi\n */\nexport interface Attribute {\n /**\n * The name of the attribute whose value can be injected.\n */\n attributeName: string;\n}\n\n/**\n * Attribute decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const Attribute: AttributeDecorator = makeParamDecorator(\n 'Attribute',\n (attributeName?: string) => ({\n attributeName,\n __NG_ELEMENT_ID__: () => ɵɵinjectAttribute(attributeName!),\n }),\n);\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {R3DependencyMetadataFacade} from '../../compiler/compiler_facade';\nimport {RuntimeError, RuntimeErrorCode} from '../../errors';\nimport {Type} from '../../interface/type';\nimport {ReflectionCapabilities} from '../../reflection/reflection_capabilities';\nimport {Host, Inject, Optional, Self, SkipSelf} from '../metadata';\nimport {Attribute} from '../metadata_attr';\n\nlet _reflect: ReflectionCapabilities | null = null;\n\nexport function getReflect(): ReflectionCapabilities {\n return (_reflect = _reflect || new ReflectionCapabilities());\n}\n\nexport function reflectDependencies(type: Type<any>): R3DependencyMetadataFacade[] {\n return convertDependencies(getReflect().parameters(type));\n}\n\nexport function convertDependencies(deps: any[]): R3DependencyMetadataFacade[] {\n return deps.map((dep) => reflectDependency(dep));\n}\n\nfunction reflectDependency(dep: any | any[]): R3DependencyMetadataFacade {\n const meta: R3DependencyMetadataFacade = {\n token: null,\n attribute: null,\n host: false,\n optional: false,\n self: false,\n skipSelf: false,\n };\n\n if (Array.isArray(dep) && dep.length > 0) {\n for (let j = 0; j < dep.length; j++) {\n const param = dep[j];\n if (param === undefined) {\n // param may be undefined if type of dep is not set by ngtsc\n continue;\n }\n\n const proto = Object.getPrototypeOf(param);\n\n if (param instanceof Optional || proto.ngMetadataName === 'Optional') {\n meta.optional = true;\n } else if (param instanceof SkipSelf || proto.ngMetadataName === 'SkipSelf') {\n meta.skipSelf = true;\n } else if (param instanceof Self || proto.ngMetadataName === 'Self') {\n meta.self = true;\n } else if (param instanceof Host || proto.ngMetadataName === 'Host') {\n meta.host = true;\n } else if (param instanceof Inject) {\n meta.token = param.token;\n } else if (param instanceof Attribute) {\n if (param.attributeName === undefined) {\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_INJECTION_TOKEN,\n ngDevMode && `Attribute name must be defined.`,\n );\n }\n meta.attribute = param.attributeName;\n } else {\n meta.token = param;\n }\n }\n } else if (dep === undefined || (Array.isArray(dep) && dep.length === 0)) {\n meta.token = null;\n } else {\n meta.token = dep;\n }\n return meta;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n getCompilerFacade,\n JitCompilerUsage,\n R3InjectableMetadataFacade,\n} from '../../compiler/compiler_facade';\nimport {Type} from '../../interface/type';\nimport {NG_FACTORY_DEF} from '../../render3/fields';\nimport {getClosureSafeProperty} from '../../util/property';\nimport {resolveForwardRef} from '../forward_ref';\nimport type {Injectable} from '../injectable';\nimport {NG_PROV_DEF} from '../interface/defs';\nimport {\n ClassSansProvider,\n ExistingSansProvider,\n FactorySansProvider,\n ValueProvider,\n ValueSansProvider,\n} from '../interface/provider';\n\nimport {angularCoreDiEnv} from './environment';\nimport {convertDependencies, reflectDependencies} from './util';\n\n/**\n * Compile an Angular injectable according to its `Injectable` metadata, and patch the resulting\n * injectable def (`ɵprov`) onto the injectable type.\n */\nexport function compileInjectable(type: Type<any>, meta?: Injectable): void {\n let ngInjectableDef: any = null;\n let ngFactoryDef: any = null;\n\n // if NG_PROV_DEF is already defined on this class then don't overwrite it\n if (!type.hasOwnProperty(NG_PROV_DEF)) {\n Object.defineProperty(type, NG_PROV_DEF, {\n get: () => {\n if (ngInjectableDef === null) {\n const compiler = getCompilerFacade({\n usage: JitCompilerUsage.Decorator,\n kind: 'injectable',\n type,\n });\n ngInjectableDef = compiler.compileInjectable(\n angularCoreDiEnv,\n `ng:///${type.name}/ɵprov.js`,\n getInjectableMetadata(type, meta),\n );\n }\n return ngInjectableDef;\n },\n });\n }\n\n // if NG_FACTORY_DEF is already defined on this class then don't overwrite it\n if (!type.hasOwnProperty(NG_FACTORY_DEF)) {\n Object.defineProperty(type, NG_FACTORY_DEF, {\n get: () => {\n if (ngFactoryDef === null) {\n const compiler = getCompilerFacade({\n usage: JitCompilerUsage.Decorator,\n kind: 'injectable',\n type,\n });\n ngFactoryDef = compiler.compileFactory(angularCoreDiEnv, `ng:///${type.name}/ɵfac.js`, {\n name: type.name,\n type,\n typeArgumentCount: 0, // In JIT mode types are not available nor used.\n deps: reflectDependencies(type),\n target: compiler.FactoryTarget.Injectable,\n });\n }\n return ngFactoryDef;\n },\n // Leave this configurable so that the factories from directives or pipes can take precedence.\n configurable: true,\n });\n }\n}\n\ntype UseClassProvider = Injectable & ClassSansProvider & {deps?: any[]};\n\nconst USE_VALUE = getClosureSafeProperty<ValueProvider>({\n provide: String,\n useValue: getClosureSafeProperty,\n});\n\nfunction isUseClassProvider(meta: Injectable): meta is UseClassProvider {\n return (meta as UseClassProvider).useClass !== undefined;\n}\n\nfunction isUseValueProvider(meta: Injectable): meta is Injectable & ValueSansProvider {\n return USE_VALUE in meta;\n}\n\nfunction isUseFactoryProvider(meta: Injectable): meta is Injectable & FactorySansProvider {\n return (meta as FactorySansProvider).useFactory !== undefined;\n}\n\nfunction isUseExistingProvider(meta: Injectable): meta is Injectable & ExistingSansProvider {\n return (meta as ExistingSansProvider).useExisting !== undefined;\n}\n\nfunction getInjectableMetadata(type: Type<any>, srcMeta?: Injectable): R3InjectableMetadataFacade {\n // Allow the compilation of a class with a `@Injectable()` decorator without parameters\n const meta: Injectable = srcMeta || {providedIn: null};\n const compilerMeta: R3InjectableMetadataFacade = {\n name: type.name,\n type: type,\n typeArgumentCount: 0,\n providedIn: meta.providedIn,\n };\n if ((isUseClassProvider(meta) || isUseFactoryProvider(meta)) && meta.deps !== undefined) {\n compilerMeta.deps = convertDependencies(meta.deps);\n }\n // Check to see if the user explicitly provided a `useXxxx` property.\n if (isUseClassProvider(meta)) {\n compilerMeta.useClass = meta.useClass;\n } else if (isUseValueProvider(meta)) {\n compilerMeta.useValue = meta.useValue;\n } else if (isUseFactoryProvider(meta)) {\n compilerMeta.useFactory = meta.useFactory;\n } else if (isUseExistingProvider(meta)) {\n compilerMeta.useExisting = meta.useExisting;\n }\n return compilerMeta;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Type} from '../interface/type';\nimport {makeDecorator, TypeDecorator} from '../util/decorators';\n\nimport {\n ClassSansProvider,\n ConstructorSansProvider,\n ExistingSansProvider,\n FactorySansProvider,\n StaticClassSansProvider,\n ValueSansProvider,\n} from './interface/provider';\nimport {compileInjectable} from './jit/injectable';\n\nexport {compileInjectable};\n\n/**\n * Injectable providers used in `@Injectable` decorator.\n *\n * @publicApi\n */\nexport type InjectableProvider =\n | ValueSansProvider\n | ExistingSansProvider\n | StaticClassSansProvider\n | ConstructorSansProvider\n | FactorySansProvider\n | ClassSansProvider;\n\n/**\n * Type of the Injectable decorator / constructor function.\n *\n * @publicApi\n */\nexport interface InjectableDecorator {\n /**\n * Decorator that marks a class as available to be\n * provided and injected as a dependency.\n *\n * @see [Introduction to Services and DI](guide/di)\n * @see [Dependency Injection Guide](guide/di/dependency-injection\n *\n * @usageNotes\n *\n * Marking a class with `@Injectable` ensures that the compiler\n * will generate the necessary metadata to create the class's\n * dependencies when the class is injected.\n *\n * The following example shows how a service class is properly\n * marked so that a supporting service can be injected upon creation.\n *\n * {@example core/di/ts/metadata_spec.ts region='Injectable'}\n *\n */\n (): TypeDecorator;\n (\n options?: {providedIn: Type<any> | 'root' | 'platform' | 'any' | null} & InjectableProvider,\n ): TypeDecorator;\n new (): Injectable;\n new (\n options?: {providedIn: Type<any> | 'root' | 'platform' | 'any' | null} & InjectableProvider,\n ): Injectable;\n}\n\n/**\n * Type of the Injectable metadata.\n *\n * @publicApi\n */\nexport interface Injectable {\n /**\n * Determines which injectors will provide the injectable.\n *\n * - `Type<any>` - associates the injectable with an `@NgModule` or other `InjectorType`. This\n * option is DEPRECATED.\n * - 'null' : Equivalent to `undefined`. The injectable is not provided in any scope automatically\n * and must be added to a `providers` array of an [@NgModule](api/core/NgModule#providers),\n * [@Component](api/core/Directive#providers) or [@Directive](api/core/Directive#providers).\n *\n * The following options specify that this injectable should be provided in one of the following\n * injectors:\n * - 'root' : The application-level injector in most apps.\n * - 'platform' : A special singleton platform injector shared by all\n * applications on the page.\n * - 'any' : Provides a unique instance in each lazy loaded module while all eagerly loaded\n * modules share one instance. This option is DEPRECATED.\n *\n */\n providedIn?: Type<any> | 'root' | 'platform' | 'any' | null;\n}\n\n/**\n * Injectable decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const Injectable: InjectableDecorator = makeDecorator(\n 'Injectable',\n undefined,\n undefined,\n undefined,\n (type: Type<any>, meta: Injectable) => compileInjectable(type as any, meta),\n);\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {EMPTY_ARRAY} from '../util/empty';\nimport {stringify} from '../util/stringify';\n\nimport type {Injector} from './injector';\nimport type {Provider, StaticProvider} from './interface/provider';\nimport {importProvidersFrom} from './provider_collection';\nimport {getNullInjector, R3Injector} from './r3_injector';\nimport {InjectorScope} from './scope';\n\n/**\n * Create a new `Injector` which is configured using a `defType` of `InjectorType<any>`s.\n */\nexport function createInjector(\n defType: /* InjectorType<any> */ any,\n parent: Injector | null = null,\n additionalProviders: Array<Provider | StaticProvider> | null = null,\n name?: string,\n): Injector {\n const injector = createInjectorWithoutInjectorInstances(\n defType,\n parent,\n additionalProviders,\n name,\n );\n injector.resolveInjectorInitializers();\n return injector;\n}\n\n/**\n * Creates a new injector without eagerly resolving its injector types. Can be used in places\n * where resolving the injector types immediately can lead to an infinite loop. The injector types\n * should be resolved at a later point by calling `_resolveInjectorDefTypes`.\n */\nexport function createInjectorWithoutInjectorInstances(\n defType: /* InjectorType<any> */ any,\n parent: Injector | null = null,\n additionalProviders: Array<Provider | StaticProvider> | null = null,\n name?: string,\n scopes = new Set<InjectorScope>(),\n): R3Injector {\n const providers = [additionalProviders || EMPTY_ARRAY, importProvidersFrom(defType)];\n name = name || (typeof defType === 'object' ? undefined : stringify(defType));\n\n return new R3Injector(providers, parent || getNullInjector(), name || null, scopes);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {createInjector} from './create_injector';\nimport {THROW_IF_NOT_FOUND, ɵɵinject} from './injector_compatibility';\nimport {InjectorMarkers} from './injector_marker';\nimport {INJECTOR} from './injector_token';\nimport {ɵɵdefineInjectable} from './interface/defs';\nimport {InjectFlags, InjectOptions} from './interface/injector';\nimport {Provider, StaticProvider} from './interface/provider';\nimport {NullInjector} from './null_injector';\nimport {ProviderToken} from './provider_token';\n\n/**\n * Concrete injectors implement this interface. Injectors are configured\n * with [providers](guide/di/dependency-injection-providers) that associate\n * dependencies of various types with [injection tokens](guide/di/dependency-injection-providers).\n *\n * @see [DI Providers](guide/di/dependency-injection-providers).\n * @see {@link StaticProvider}\n *\n * @usageNotes\n *\n * The following example creates a service injector instance.\n *\n * {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}\n *\n * ### Usage example\n *\n * {@example core/di/ts/injector_spec.ts region='Injector'}\n *\n * `Injector` returns itself when given `Injector` as a token:\n *\n * {@example core/di/ts/injector_spec.ts region='injectInjector'}\n *\n * @publicApi\n */\nexport abstract class Injector {\n static THROW_IF_NOT_FOUND = THROW_IF_NOT_FOUND;\n static NULL: Injector = /* @__PURE__ */ new NullInjector();\n\n /**\n * Internal note on the `options?: InjectOptions|InjectFlags` override of the `get`\n * method: consider dropping the `InjectFlags` part in one of the major versions.\n * It can **not** be done in minor/patch, since it's breaking for custom injectors\n * that only implement the old `InjectorFlags` interface.\n */\n\n /**\n * Retrieves an instance from the injector based on the provided token.\n * @returns The instance from the injector if defined, otherwise the `notFoundValue`.\n * @throws When the `notFoundValue` is `undefined` or `Injector.THROW_IF_NOT_FOUND`.\n */\n abstract get<T>(\n token: ProviderToken<T>,\n notFoundValue: undefined,\n options: InjectOptions & {\n optional?: false;\n },\n ): T;\n /**\n * Retrieves an instance from the injector based on the provided token.\n * @returns The instance from the injector if defined, otherwise the `notFoundValue`.\n * @throws When the `notFoundValue` is `undefined` or `Injector.THROW_IF_NOT_FOUND`.\n */\n abstract get<T>(\n token: ProviderToken<T>,\n notFoundValue: null | undefined,\n options: InjectOptions,\n ): T | null;\n /**\n * Retrieves an instance from the injector based on the provided token.\n * @returns The instance from the injector if defined, otherwise the `notFoundValue`.\n * @throws When the `notFoundValue` is `undefined` or `Injector.THROW_IF_NOT_FOUND`.\n */\n abstract get<T>(\n token: ProviderToken<T>,\n notFoundValue?: T,\n options?: InjectOptions | InjectFlags,\n ): T;\n /**\n * Retrieves an instance from the injector based on the provided token.\n * @returns The instance from the injector if defined, otherwise the `notFoundValue`.\n * @throws When the `notFoundValue` is `undefined` or `Injector.THROW_IF_NOT_FOUND`.\n * @deprecated use object-based flags (`InjectOptions`) instead.\n */\n abstract get<T>(token: ProviderToken<T>, notFoundValue?: T, flags?: InjectFlags): T;\n /**\n * @deprecated from v4.0.0 use ProviderToken<T>\n * @suppress {duplicate}\n */\n abstract get(token: any, notFoundValue?: any): any;\n\n /**\n * @deprecated from v5 use the new signature Injector.create(options)\n */\n static create(providers: StaticProvider[], parent?: Injector): Injector;\n\n /**\n * Creates a new injector instance that provides one or more dependencies,\n * according to a given type or types of `StaticProvider`.\n *\n * @param options An object with the following properties:\n * * `providers`: An array of providers of the [StaticProvider type](api/core/StaticProvider).\n * * `parent`: (optional) A parent injector.\n * * `name`: (optional) A developer-defined identifying name for the new injector.\n *\n * @returns The new injector instance.\n *\n */\n static create(options: {\n providers: Array<Provider | StaticProvider>;\n parent?: Injector;\n name?: string;\n }): Injector;\n\n static create(\n options:\n | StaticProvider[]\n | {providers: Array<Provider | StaticProvider>; parent?: Injector; name?: string},\n parent?: Injector,\n ): Injector {\n if (Array.isArray(options)) {\n return createInjector({name: ''}, parent, options, '');\n } else {\n const name = options.name ?? '';\n return createInjector({name}, options.parent, options.providers, name);\n }\n }\n\n /** @nocollapse */\n static ɵprov = /** @pureOrBreakMyCode */ /* @__PURE__ */ ɵɵdefineInjectable({\n token: Injector,\n providedIn: 'any',\n factory: () => ɵɵinject(INJECTOR),\n });\n\n /**\n * @internal\n * @nocollapse\n */\n static __NG_ELEMENT_ID__ = InjectorMarkers.Injector;\n}\n","/*!\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ɵɵinjectAttribute} from '../render3/instructions/di_attr';\n\n/**\n * Creates a token that can be used to inject static attributes of the host node.\n *\n * @usageNotes\n * ### Injecting an attribute that is known to exist\n * ```ts\n * @Directive()\n * class MyDir {\n * attr: string = inject(new HostAttributeToken('some-attr'));\n * }\n * ```\n *\n * ### Optionally injecting an attribute\n * ```ts\n * @Directive()\n * class MyDir {\n * attr: string | null = inject(new HostAttributeToken('some-attr'), {optional: true});\n * }\n * ```\n * @publicApi\n */\nexport class HostAttributeToken {\n constructor(private attributeName: string) {}\n\n /** @internal */\n __NG_ELEMENT_ID__ = () => ɵɵinjectAttribute(this.attributeName);\n\n toString(): string {\n return `HostAttributeToken ${this.attributeName}`;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {RuntimeError, RuntimeErrorCode} from '../errors';\nimport {TNode, TNodeType} from '../render3/interfaces/node';\nimport {getCurrentTNode} from '../render3/state';\n\nimport {InjectionToken} from './injection_token';\nimport {InjectFlags} from './interface/injector';\n\n/**\n * A token that can be used to inject the tag name of the host node.\n *\n * @usageNotes\n * ### Injecting a tag name that is known to exist\n * ```ts\n * @Directive()\n * class MyDir {\n * tagName: string = inject(HOST_TAG_NAME);\n * }\n * ```\n *\n * ### Optionally injecting a tag name\n * ```ts\n * @Directive()\n * class MyDir {\n * tagName: string | null = inject(HOST_TAG_NAME, {optional: true});\n * }\n * ```\n * @publicApi\n */\nexport const HOST_TAG_NAME = new InjectionToken<string>(ngDevMode ? 'HOST_TAG_NAME' : '');\n\n// HOST_TAG_NAME should be resolved at the current node, similar to e.g. ElementRef,\n// so we manually specify __NG_ELEMENT_ID__ here, instead of using a factory.\n// tslint:disable-next-line:no-toplevel-property-access\n(HOST_TAG_NAME as any).__NG_ELEMENT_ID__ = (flags: InjectFlags) => {\n const tNode = getCurrentTNode();\n if (tNode === null) {\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_INJECTION_TOKEN,\n ngDevMode &&\n 'HOST_TAG_NAME can only be injected in directives and components ' +\n 'during construction time (in a class constructor or as a class field initializer)',\n );\n }\n if (tNode.type & TNodeType.Element) {\n return tNode.value;\n }\n if (flags & InjectFlags.Optional) {\n return null;\n }\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_INJECTION_TOKEN,\n ngDevMode &&\n `HOST_TAG_NAME was used on ${getDevModeNodeName(\n tNode,\n )} which doesn't have an underlying element in the DOM. ` +\n `This is invalid, and so the dependency should be marked as optional.`,\n );\n};\n\nfunction getDevModeNodeName(tNode: TNode) {\n if (tNode.type & TNodeType.ElementContainer) {\n return 'an <ng-container>';\n } else if (tNode.type & TNodeType.Container) {\n return 'an <ng-template>';\n } else if (tNode.type & TNodeType.LetDeclaration) {\n return 'an @let declaration';\n } else {\n return 'a node';\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nexport const SCHEDULE_IN_ROOT_ZONE_DEFAULT = false;\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {EnvironmentInjector} from '../di';\nimport {isDestroyed} from '../render3/interfaces/type_checks';\nimport {LView} from '../render3/interfaces/view';\nimport {getLView} from '../render3/state';\nimport {removeLViewOnDestroy, storeLViewOnDestroy} from '../render3/util/view_utils';\n\n/**\n * `DestroyRef` lets you set callbacks to run for any cleanup or destruction behavior.\n * The scope of this destruction depends on where `DestroyRef` is injected. If `DestroyRef`\n * is injected in a component or directive, the callbacks run when that component or\n * directive is destroyed. Otherwise the callbacks run when a corresponding injector is destroyed.\n *\n * @publicApi\n */\nexport abstract class DestroyRef {\n // Here the `DestroyRef` acts primarily as a DI token. There are (currently) types of objects that\n // can be returned from the injector when asking for this token:\n // - `NodeInjectorDestroyRef` when retrieved from a node injector;\n // - `EnvironmentInjector` when retrieved from an environment injector\n\n /**\n * Registers a destroy callback in a given lifecycle scope. Returns a cleanup function that can\n * be invoked to unregister the callback.\n *\n * @usageNotes\n * ### Example\n * ```ts\n * const destroyRef = inject(DestroyRef);\n *\n * // register a destroy callback\n * const unregisterFn = destroyRef.onDestroy(() => doSomethingOnDestroy());\n *\n * // stop the destroy callback from executing if needed\n * unregisterFn();\n * ```\n */\n abstract onDestroy(callback: () => void): () => void;\n\n /**\n * @internal\n * @nocollapse\n */\n static __NG_ELEMENT_ID__: () => DestroyRef = injectDestroyRef;\n\n /**\n * @internal\n * @nocollapse\n */\n static __NG_ENV_ID__: (injector: EnvironmentInjector) => DestroyRef = (injector) => injector;\n}\n\nexport class NodeInjectorDestroyRef extends DestroyRef {\n constructor(readonly _lView: LView) {\n super();\n }\n\n override onDestroy(callback: () => void): () => void {\n const lView = this._lView;\n\n // Checking if `lView` is already destroyed before storing the `callback` enhances\n // safety and integrity for applications.\n // If `lView` is destroyed, we call the `callback` immediately to ensure that\n // any necessary cleanup is handled gracefully.\n // With this approach, we're providing better reliability in managing resources.\n // One of the use cases is `takeUntilDestroyed`, which aims to replace `takeUntil`\n // in existing applications. While `takeUntil` can be safely called once the view\n // is destroyed — resulting in no errors and finalizing the subscription depending\n // on whether a subject or replay subject is used, replacing it with\n // `takeUntilDestroyed` introduces a breaking change, as it throws an error if\n // the `lView` is destroyed (https://github.com/angular/angular/issues/54527).\n if (isDestroyed(lView)) {\n callback();\n // We return a \"noop\" callback, which, when executed, does nothing because\n // we haven't stored anything on the `lView`, and thus there's nothing to remove.\n return () => {};\n }\n\n storeLViewOnDestroy(lView, callback);\n return () => removeLViewOnDestroy(lView, callback);\n }\n}\n\nfunction injectDestroyRef(): DestroyRef {\n return new NodeInjectorDestroyRef(getLView());\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {InjectionToken} from '../../di/injection_token';\n\nexport const enum NotificationSource {\n // Change detection needs to run in order to synchronize application state\n // with the DOM when the following notifications are received:\n // This operation indicates that a subtree needs to be traversed during change detection.\n MarkAncestorsForTraversal,\n // A component/directive gets a new input.\n SetInput,\n // Defer block state updates need change detection to fully render the state.\n DeferBlockStateUpdate,\n // Debugging tools updated state and have requested change detection.\n DebugApplyChanges,\n // ChangeDetectorRef.markForCheck indicates the component is dirty/needs to refresh.\n MarkForCheck,\n\n // Bound listener callbacks execute and can update state without causing other notifications from\n // above.\n Listener,\n\n // Custom elements do sometimes require checking directly.\n CustomElement,\n\n // The following notifications do not require views to be refreshed\n // but we should execute render hooks:\n // Render hooks are guaranteed to execute with the schedulers timing.\n RenderHook,\n // Views might be created outside and manipulated in ways that\n // we cannot be aware of. When a view is attached, Angular now \"knows\"\n // about it and we now know that DOM might have changed (and we should\n // run render hooks). If the attached view is dirty, the `MarkAncestorsForTraversal`\n // notification should also be received.\n ViewAttached,\n // When DOM removal happens, render hooks may be interested in the new\n // DOM state but we do not need to refresh any views unless. If change\n // detection is required after DOM removal, another notification should\n // be received (i.e. `markForCheck`).\n ViewDetachedFromDOM,\n // Applying animations might result in new DOM state and should rerun render hooks\n AsyncAnimationsLoaded,\n // The scheduler is notified when a pending task is removed via the public API.\n // This allows us to make stability async, delayed until the next application tick.\n PendingTaskRemoved,\n // An `effect()` outside of the view tree became dirty and might need to run.\n RootEffect,\n // An `effect()` within the view tree became dirty.\n ViewEffect,\n}\n\n/**\n * Injectable that is notified when an `LView` is made aware of changes to application state.\n */\nexport abstract class ChangeDetectionScheduler {\n abstract notify(source: NotificationSource): void;\n abstract runningTick: boolean;\n}\n\n/** Token used to indicate if zoneless was enabled via provideZonelessChangeDetection(). */\nexport const ZONELESS_ENABLED = new InjectionToken<boolean>(\n typeof ngDevMode === 'undefined' || ngDevMode ? 'Zoneless enabled' : '',\n {providedIn: 'root', factory: () => false},\n);\n\n/** Token used to indicate `provideExperimentalZonelessChangeDetection` was used. */\nexport const PROVIDED_ZONELESS = new InjectionToken<boolean>(\n typeof ngDevMode === 'undefined' || ngDevMode ? 'Zoneless provided' : '',\n {providedIn: 'root', factory: () => false},\n);\n\nexport const ZONELESS_SCHEDULER_DISABLED = new InjectionToken<boolean>(\n typeof ngDevMode === 'undefined' || ngDevMode ? 'scheduler disabled' : '',\n);\n\n// TODO(atscott): Remove in v19. Scheduler should be done with runOutsideAngular.\nexport const SCHEDULE_IN_ROOT_ZONE = new InjectionToken<boolean>(\n typeof ngDevMode === 'undefined' || ngDevMode ? 'run changes outside zone in root' : '',\n);\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {BehaviorSubject} from 'rxjs';\n\nimport {inject} from './di/injector_compatibility';\nimport {ɵɵdefineInjectable} from './di/interface/defs';\nimport {OnDestroy} from './interface/lifecycle_hooks';\nimport {\n ChangeDetectionScheduler,\n NotificationSource,\n} from './change_detection/scheduling/zoneless_scheduling';\n\n/**\n * Internal implementation of the pending tasks service.\n */\nexport class PendingTasksInternal implements OnDestroy {\n private taskId = 0;\n private pendingTasks = new Set<number>();\n private get _hasPendingTasks() {\n return this.hasPendingTasks.value;\n }\n hasPendingTasks = new BehaviorSubject<boolean>(false);\n\n add(): number {\n if (!this._hasPendingTasks) {\n this.hasPendingTasks.next(true);\n }\n const taskId = this.taskId++;\n this.pendingTasks.add(taskId);\n return taskId;\n }\n\n has(taskId: number): boolean {\n return this.pendingTasks.has(taskId);\n }\n\n remove(taskId: number): void {\n this.pendingTasks.delete(taskId);\n if (this.pendingTasks.size === 0 && this._hasPendingTasks) {\n this.hasPendingTasks.next(false);\n }\n }\n\n ngOnDestroy(): void {\n this.pendingTasks.clear();\n if (this._hasPendingTasks) {\n this.hasPendingTasks.next(false);\n }\n }\n\n /** @nocollapse */\n static ɵprov = /** @pureOrBreakMyCode */ /* @__PURE__ */ ɵɵdefineInjectable({\n token: PendingTasksInternal,\n providedIn: 'root',\n factory: () => new PendingTasksInternal(),\n });\n}\n\n/**\n * Service that keeps track of pending tasks contributing to the stableness of Angular\n * application. While several existing Angular services (ex.: `HttpClient`) will internally manage\n * tasks influencing stability, this API gives control over stability to library and application\n * developers for specific cases not covered by Angular internals.\n *\n * The concept of stability comes into play in several important scenarios:\n * - SSR process needs to wait for the application stability before serializing and sending rendered\n * HTML;\n * - tests might want to delay assertions until the application becomes stable;\n *\n * @usageNotes\n * ```ts\n * const pendingTasks = inject(PendingTasks);\n * const taskCleanup = pendingTasks.add();\n * // do work that should block application's stability and then:\n * taskCleanup();\n * ```\n *\n * @publicApi\n * @developerPreview\n */\nexport class PendingTasks {\n private internalPendingTasks = inject(PendingTasksInternal);\n private scheduler = inject(ChangeDetectionScheduler);\n /**\n * Adds a new task that should block application's stability.\n * @returns A cleanup function that removes a task when called.\n */\n add(): () => void {\n const taskId = this.internalPendingTasks.add();\n return () => {\n if (!this.internalPendingTasks.has(taskId)) {\n // This pending task has already been cleared.\n return;\n }\n // Notifying the scheduler will hold application stability open until the next tick.\n this.scheduler.notify(NotificationSource.PendingTaskRemoved);\n this.internalPendingTasks.remove(taskId);\n };\n }\n\n /**\n * Runs an asynchronous function and blocks the application's stability until the function completes.\n *\n * ```ts\n * pendingTasks.run(async () => {\n * const userData = await fetch('/api/user');\n * this.userData.set(userData);\n * });\n * ```\n *\n * Application stability is at least delayed until the next tick after the `run` method resolves\n * so it is safe to make additional updates to application state that would require UI synchronization:\n *\n * ```ts\n * const userData = await pendingTasks.run(() => fetch('/api/user'));\n * this.userData.set(userData);\n * ```\n *\n * @param fn The asynchronous function to execute\n */\n async run<T>(fn: () => Promise<T>): Promise<T> {\n const removeTask = this.add();\n try {\n return await fn();\n } finally {\n removeTask();\n }\n }\n\n /** @nocollapse */\n static ɵprov = /** @pureOrBreakMyCode */ /* @__PURE__ */ ɵɵdefineInjectable({\n token: PendingTasks,\n providedIn: 'root',\n factory: () => new PendingTasks(),\n });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {setActiveConsumer} from '../primitives/signals';\nimport {PartialObserver, Subject, Subscription} from 'rxjs';\n\nimport {OutputRef} from './authoring/output/output_ref';\nimport {isInInjectionContext} from './di/contextual';\nimport {inject} from './di/injector_compatibility';\nimport {DestroyRef} from './linker/destroy_ref';\nimport {PendingTasksInternal} from './pending_tasks';\n\n/**\n * Use in components with the `@Output` directive to emit custom events\n * synchronously or asynchronously, and register handlers for those events\n * by subscribing to an instance.\n *\n * @usageNotes\n *\n * Extends\n * [RxJS `Subject`](https://rxjs.dev/api/index/class/Subject)\n * for Angular by adding the `emit()` method.\n *\n * In the following example, a component defines two output properties\n * that create event emitters. When the title is clicked, the emitter\n * emits an open or close event to toggle the current visibility state.\n *\n * ```angular-ts\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 * Access the event object with the `$event` argument passed to the output event\n * handler:\n *\n * ```html\n * <zippy (open)=\"onOpen($event)\" (close)=\"onClose($event)\"></zippy>\n * ```\n *\n * @publicApi\n */\nexport interface EventEmitter<T> extends Subject<T>, OutputRef<T> {\n /**\n * @internal\n */\n __isAsync: boolean;\n\n /**\n * Creates an instance of this class that can\n * deliver events synchronously or asynchronously.\n *\n * @param [isAsync=false] When true, deliver events asynchronously.\n *\n */\n new (isAsync?: boolean): EventEmitter<T>;\n\n /**\n * Emits an event containing a given value.\n * @param value The value to emit.\n */\n emit(value?: T): void;\n\n /**\n * Registers handlers for events emitted by this instance.\n * @param next When supplied, a custom handler for emitted events.\n * @param error When supplied, a custom handler for an error notification from this emitter.\n * @param complete When supplied, a custom handler for a completion notification from this\n * emitter.\n */\n subscribe(\n next?: (value: T) => void,\n error?: (error: any) => void,\n complete?: () => void,\n ): Subscription;\n /**\n * Registers handlers for events emitted by this instance.\n * @param observerOrNext When supplied, a custom handler for emitted events, or an observer\n * object.\n * @param error When supplied, a custom handler for an error notification from this emitter.\n * @param complete When supplied, a custom handler for a completion notification from this\n * emitter.\n */\n subscribe(observerOrNext?: any, error?: any, complete?: any): Subscription;\n}\n\nclass EventEmitter_ extends Subject<any> implements OutputRef<any> {\n // tslint:disable-next-line:require-internal-with-underscore\n __isAsync: boolean;\n destroyRef: DestroyRef | undefined = undefined;\n private readonly pendingTasks: PendingTasksInternal | undefined = undefined;\n\n constructor(isAsync: boolean = false) {\n super();\n this.__isAsync = isAsync;\n\n // Attempt to retrieve a `DestroyRef` and `PendingTasks` optionally.\n // For backwards compatibility reasons, this cannot be required.\n if (isInInjectionContext()) {\n // `DestroyRef` is optional because it is not available in all contexts.\n // But it is useful to properly complete the `EventEmitter` if used with `outputToObservable`\n // when the component/directive is destroyed. (See `outputToObservable` for more details.)\n this.destroyRef = inject(DestroyRef, {optional: true}) ?? undefined;\n this.pendingTasks = inject(PendingTasksInternal, {optional: true}) ?? undefined;\n }\n }\n\n emit(value?: any) {\n const prevConsumer = setActiveConsumer(null);\n try {\n super.next(value);\n } finally {\n setActiveConsumer(prevConsumer);\n }\n }\n\n override subscribe(observerOrNext?: any, error?: any, complete?: any): Subscription {\n let nextFn = observerOrNext;\n let errorFn = error || (() => null);\n let completeFn = complete;\n\n if (observerOrNext && typeof observerOrNext === 'object') {\n const observer = observerOrNext as PartialObserver<unknown>;\n nextFn = observer.next?.bind(observer);\n errorFn = observer.error?.bind(observer);\n completeFn = observer.complete?.bind(observer);\n }\n\n if (this.__isAsync) {\n errorFn = this.wrapInTimeout(errorFn);\n\n if (nextFn) {\n nextFn = this.wrapInTimeout(nextFn);\n }\n\n if (completeFn) {\n completeFn = this.wrapInTimeout(completeFn);\n }\n }\n\n const sink = super.subscribe({next: nextFn, error: errorFn, complete: completeFn});\n\n if (observerOrNext instanceof Subscription) {\n observerOrNext.add(sink);\n }\n\n return sink;\n }\n\n private wrapInTimeout(fn: (value: unknown) => any) {\n return (value: unknown) => {\n const taskId = this.pendingTasks?.add();\n setTimeout(() => {\n try {\n fn(value);\n } finally {\n if (taskId !== undefined) {\n this.pendingTasks?.remove(taskId);\n }\n }\n });\n };\n }\n}\n\n/**\n * @publicApi\n */\nexport const EventEmitter: {\n new (isAsync?: boolean): EventEmitter<any>;\n new <T>(isAsync?: boolean): EventEmitter<T>;\n readonly prototype: EventEmitter<any>;\n} = EventEmitter_ as any;\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nexport function noop(...args: any[]): any {\n // Do nothing.\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {noop} from './noop';\n\n/**\n * Gets a scheduling function that runs the callback after the first of setTimeout and\n * requestAnimationFrame resolves.\n *\n * - `requestAnimationFrame` ensures that change detection runs ahead of a browser repaint.\n * This ensures that the create and update passes of a change detection always happen\n * in the same frame.\n * - When the browser is resource-starved, `rAF` can execute _before_ a `setTimeout` because\n * rendering is a very high priority process. This means that `setTimeout` cannot guarantee\n * same-frame create and update pass, when `setTimeout` is used to schedule the update phase.\n * - While `rAF` gives us the desirable same-frame updates, it has two limitations that\n * prevent it from being used alone. First, it does not run in background tabs, which would\n * prevent Angular from initializing an application when opened in a new tab (for example).\n * Second, repeated calls to requestAnimationFrame will execute at the refresh rate of the\n * hardware (~16ms for a 60Hz display). This would cause significant slowdown of tests that\n * are written with several updates and asserts in the form of \"update; await stable; assert;\".\n * - Both `setTimeout` and `rAF` are able to \"coalesce\" several events from a single user\n * interaction into a single change detection. Importantly, this reduces view tree traversals when\n * compared to an alternative timing mechanism like `queueMicrotask`, where change detection would\n * then be interleaves between each event.\n *\n * By running change detection after the first of `setTimeout` and `rAF` to execute, we get the\n * best of both worlds.\n *\n * @returns a function to cancel the scheduled callback\n */\nexport function scheduleCallbackWithRafRace(callback: Function): () => void {\n let timeoutId: number;\n let animationFrameId: number;\n function cleanup() {\n callback = noop;\n try {\n if (animationFrameId !== undefined && typeof cancelAnimationFrame === 'function') {\n cancelAnimationFrame(animationFrameId);\n }\n if (timeoutId !== undefined) {\n clearTimeout(timeoutId);\n }\n } catch {\n // Clearing/canceling can fail in tests due to the timing of functions being patched and unpatched\n // Just ignore the errors - we protect ourselves from this issue by also making the callback a no-op.\n }\n }\n timeoutId = setTimeout(() => {\n callback();\n cleanup();\n }) as unknown as number;\n if (typeof requestAnimationFrame === 'function') {\n animationFrameId = requestAnimationFrame(() => {\n callback();\n cleanup();\n });\n }\n\n return () => cleanup();\n}\n\nexport function scheduleCallbackWithMicrotask(callback: Function): () => void {\n queueMicrotask(() => callback());\n\n return () => {\n callback = noop;\n };\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\ninterface ConsoleWithAsyncTagging {\n createTask(name: string): ConsoleTask;\n}\n\ninterface ConsoleTask {\n run<T>(f: () => T): T;\n}\n\ninterface ZoneConsoleTask extends Task {\n consoleTask?: ConsoleTask;\n}\n\nexport class AsyncStackTaggingZoneSpec implements ZoneSpec {\n createTask: ConsoleWithAsyncTagging['createTask'];\n\n constructor(\n namePrefix: string,\n consoleAsyncStackTaggingImpl: ConsoleWithAsyncTagging = console as any,\n ) {\n this.name = 'asyncStackTagging for ' + namePrefix;\n this.createTask = consoleAsyncStackTaggingImpl?.createTask ?? (() => null);\n }\n\n // ZoneSpec implementation below.\n name: string;\n\n onScheduleTask(\n delegate: ZoneDelegate,\n _current: Zone,\n target: Zone,\n task: ZoneConsoleTask,\n ): Task {\n task.consoleTask = this.createTask(`Zone - ${task.source || task.type}`);\n return delegate.scheduleTask(target, task);\n }\n\n onInvokeTask(\n delegate: ZoneDelegate,\n _currentZone: Zone,\n targetZone: Zone,\n task: ZoneConsoleTask,\n applyThis: any,\n applyArgs?: any[],\n ) {\n let ret;\n if (task.consoleTask) {\n ret = task.consoleTask.run(() => delegate.invokeTask(targetZone, task, applyThis, applyArgs));\n } else {\n ret = delegate.invokeTask(targetZone, task, applyThis, applyArgs);\n }\n return ret;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n// Needed for the global `Zone` ambient types to be available.\nimport type {} from 'zone.js';\n\nimport {SCHEDULE_IN_ROOT_ZONE_DEFAULT} from '../change_detection/scheduling/flags';\nimport {RuntimeError, RuntimeErrorCode} from '../errors';\nimport {EventEmitter} from '../event_emitter';\nimport {scheduleCallbackWithRafRace} from '../util/callback_scheduler';\nimport {noop} from '../util/noop';\n\nimport {AsyncStackTaggingZoneSpec} from './async-stack-tagging';\n\n// The below is needed as otherwise a number of targets fail in G3 due to:\n// ERROR - [JSC_UNDEFINED_VARIABLE] variable Zone is undeclared\ndeclare const Zone: any;\n\nconst isAngularZoneProperty = 'isAngularZone';\nexport const angularZoneInstanceIdProperty = isAngularZoneProperty + '_ID';\n\nlet ngZoneInstanceId = 0;\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 * ```ts\n * import {Component, NgZone} from '@angular/core';\n * import {NgIf} from '@angular/common';\n *\n * @Component({\n * selector: 'ng-zone-demo',\n * template: `\n * <h2>Demo: NgZone</h2>\n *\n * <p>Progress: {{progress}}%</p>\n * <p *ngIf=\"progress >= 100\">Done processing {{label}} of Angular zone!</p>\n *\n * <button (click)=\"processWithinAngularZone()\">Process within Angular zone</button>\n * <button (click)=\"processOutsideOfAngularZone()\">Process outside of Angular zone</button>\n * `,\n * })\n * export class NgZoneDemo {\n * progress: number = 0;\n * label: string;\n *\n * constructor(private _ngZone: NgZone) {}\n *\n * // Loop inside the Angular zone\n * // so the UI DOES refresh after each setTimeout cycle\n * processWithinAngularZone() {\n * this.label = 'inside';\n * this.progress = 0;\n * this._increaseProgress(() => console.log('Inside Done!'));\n * }\n *\n * // Loop outside of the Angular zone\n * // so the UI DOES NOT refresh after each setTimeout cycle\n * processOutsideOfAngularZone() {\n * this.label = 'outside';\n * this.progress = 0;\n * this._ngZone.runOutsideAngular(() => {\n * this._increaseProgress(() => {\n * // reenter the Angular zone and display done\n * this._ngZone.run(() => { console.log('Outside Done!'); });\n * });\n * });\n * }\n *\n * _increaseProgress(doneCallback: () => void) {\n * this.progress += 1;\n * console.log(`Current progress: ${this.progress}%`);\n *\n * if (this.progress < 100) {\n * window.setTimeout(() => this._increaseProgress(doneCallback), 10);\n * } else {\n * doneCallback();\n * }\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport class NgZone {\n readonly hasPendingMacrotasks: boolean = false;\n readonly hasPendingMicrotasks: boolean = false;\n\n /**\n * Whether there are no outstanding microtasks or macrotasks.\n */\n readonly isStable: boolean = true;\n\n /**\n * Notifies when code enters Angular Zone. This gets fired first on VM Turn.\n */\n readonly onUnstable: EventEmitter<any> = new EventEmitter(false);\n\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 readonly onMicrotaskEmpty: EventEmitter<any> = new EventEmitter(false);\n\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 readonly onStable: EventEmitter<any> = new EventEmitter(false);\n\n /**\n * Notifies that an error has been delivered.\n */\n readonly onError: EventEmitter<any> = new EventEmitter(false);\n\n constructor(options: {\n enableLongStackTrace?: boolean;\n shouldCoalesceEventChangeDetection?: boolean;\n shouldCoalesceRunChangeDetection?: boolean;\n }) {\n const {\n enableLongStackTrace = false,\n shouldCoalesceEventChangeDetection = false,\n shouldCoalesceRunChangeDetection = false,\n scheduleInRootZone = SCHEDULE_IN_ROOT_ZONE_DEFAULT,\n } = options as InternalNgZoneOptions;\n\n if (typeof Zone == 'undefined') {\n throw new RuntimeError(\n RuntimeErrorCode.MISSING_ZONEJS,\n ngDevMode && `In this configuration Angular requires Zone.js`,\n );\n }\n\n Zone.assertZonePatched();\n const self = this as any as NgZonePrivate;\n self._nesting = 0;\n\n self._outer = self._inner = Zone.current;\n\n // AsyncStackTaggingZoneSpec provides `linked stack traces` to show\n // where the async operation is scheduled. For more details, refer\n // to this article, https://developer.chrome.com/blog/devtools-better-angular-debugging/\n // And we only import this AsyncStackTaggingZoneSpec in development mode,\n // in the production mode, the AsyncStackTaggingZoneSpec will be tree shaken away.\n if (ngDevMode) {\n self._inner = self._inner.fork(new AsyncStackTaggingZoneSpec('Angular'));\n }\n\n if ((Zone as any)['TaskTrackingZoneSpec']) {\n self._inner = self._inner.fork(new ((Zone as any)['TaskTrackingZoneSpec'] as any)());\n }\n\n if (enableLongStackTrace && (Zone as any)['longStackTraceZoneSpec']) {\n self._inner = self._inner.fork((Zone as any)['longStackTraceZoneSpec']);\n }\n // if shouldCoalesceRunChangeDetection is true, all tasks including event tasks will be\n // coalesced, so shouldCoalesceEventChangeDetection option is not necessary and can be skipped.\n self.shouldCoalesceEventChangeDetection =\n !shouldCoalesceRunChangeDetection && shouldCoalesceEventChangeDetection;\n self.shouldCoalesceRunChangeDetection = shouldCoalesceRunChangeDetection;\n self.callbackScheduled = false;\n self.scheduleInRootZone = scheduleInRootZone;\n forkInnerZoneWithAngularBehavior(self);\n }\n\n /**\n This method checks whether the method call happens within an Angular Zone instance.\n */\n static isInAngularZone(): boolean {\n // Zone needs to be checked, because this method might be called even when NoopNgZone is used.\n return typeof Zone !== 'undefined' && Zone.current.get(isAngularZoneProperty) === true;\n }\n\n /**\n Assures that the method is called within the Angular Zone, otherwise throws an error.\n */\n static assertInAngularZone(): void {\n if (!NgZone.isInAngularZone()) {\n throw new RuntimeError(\n RuntimeErrorCode.UNEXPECTED_ZONE_STATE,\n ngDevMode && 'Expected to be in Angular Zone, but it is not!',\n );\n }\n }\n\n /**\n Assures that the method is called outside of the Angular Zone, otherwise throws an error.\n */\n static assertNotInAngularZone(): void {\n if (NgZone.isInAngularZone()) {\n throw new RuntimeError(\n RuntimeErrorCode.UNEXPECTED_ZONE_STATE,\n ngDevMode && 'Expected to not be in Angular Zone, but it is!',\n );\n }\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 run<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[]): T {\n return (this as any as NgZonePrivate)._inner.run(fn, applyThis, applyArgs);\n }\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 `runTask` 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 runTask<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[], name?: string): T {\n const zone = (this as any as NgZonePrivate)._inner;\n const task = zone.scheduleEventTask('NgZoneEvent: ' + name, fn, EMPTY_PAYLOAD, noop, noop);\n try {\n return zone.runTask(task, applyThis, applyArgs);\n } finally {\n zone.cancelTask(task);\n }\n }\n\n /**\n * Same as `run`, except that synchronous errors are caught and forwarded via `onError` and not\n * rethrown.\n */\n runGuarded<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[]): T {\n return (this as any as NgZonePrivate)._inner.runGuarded(fn, applyThis, applyArgs);\n }\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 runOutsideAngular<T>(fn: (...args: any[]) => T): T {\n return (this as any as NgZonePrivate)._outer.run(fn);\n }\n}\n\nconst EMPTY_PAYLOAD = {};\n\nexport interface NgZonePrivate extends NgZone {\n _outer: Zone;\n _inner: Zone;\n _nesting: number;\n _hasPendingMicrotasks: boolean;\n\n hasPendingMacrotasks: boolean;\n hasPendingMicrotasks: boolean;\n callbackScheduled: boolean;\n /**\n * A flag to indicate if NgZone is currently inside\n * checkStable and to prevent re-entry. The flag is\n * needed because it is possible to invoke the change\n * detection from within change detection leading to\n * incorrect behavior.\n *\n * For detail, please refer here,\n * https://github.com/angular/angular/pull/40540\n */\n isCheckStableRunning: boolean;\n isStable: boolean;\n /**\n * Optionally specify coalescing event change detections or not.\n * Consider the following case.\n *\n * <div (click)=\"doSomething()\">\n * <button (click)=\"doSomethingElse()\"></button>\n * </div>\n *\n * When button is clicked, because of the event bubbling, both\n * event handlers will be called and 2 change detections will be\n * triggered. We can coalesce such kind of events to trigger\n * change detection only once.\n *\n * By default, this option will be false. So the events will not be\n * coalesced and the change detection will be triggered multiple times.\n * And if this option be set to true, the change detection will be\n * triggered async by scheduling it in an animation frame. So in the case above,\n * the change detection will only be trigged once.\n */\n shouldCoalesceEventChangeDetection: boolean;\n /**\n * Optionally specify if `NgZone#run()` method invocations should be coalesced\n * into a single change detection.\n *\n * Consider the following case.\n *\n * for (let i = 0; i < 10; i ++) {\n * ngZone.run(() => {\n * // do something\n * });\n * }\n *\n * This case triggers the change detection multiple times.\n * With ngZoneRunCoalescing options, all change detections in an event loops trigger only once.\n * In addition, the change detection executes in requestAnimation.\n *\n */\n shouldCoalesceRunChangeDetection: boolean;\n\n /**\n * Whether to schedule the coalesced change detection in the root zone\n */\n scheduleInRootZone: boolean;\n}\n\nfunction checkStable(zone: NgZonePrivate) {\n // TODO: @JiaLiPassion, should check zone.isCheckStableRunning to prevent\n // re-entry. The case is:\n //\n // @Component({...})\n // export class AppComponent {\n // constructor(private ngZone: NgZone) {\n // this.ngZone.onStable.subscribe(() => {\n // this.ngZone.run(() => console.log('stable'););\n // });\n // }\n //\n // The onStable subscriber run another function inside ngZone\n // which causes `checkStable()` re-entry.\n // But this fix causes some issues in g3, so this fix will be\n // launched in another PR.\n if (zone._nesting == 0 && !zone.hasPendingMicrotasks && !zone.isStable) {\n try {\n zone._nesting++;\n zone.onMicrotaskEmpty.emit(null);\n } finally {\n zone._nesting--;\n if (!zone.hasPendingMicrotasks) {\n try {\n zone.runOutsideAngular(() => zone.onStable.emit(null));\n } finally {\n zone.isStable = true;\n }\n }\n }\n }\n}\n\nfunction delayChangeDetectionForEvents(zone: NgZonePrivate) {\n /**\n * We also need to check _nesting here\n * Consider the following case with shouldCoalesceRunChangeDetection = true\n *\n * ngZone.run(() => {});\n * ngZone.run(() => {});\n *\n * We want the two `ngZone.run()` only trigger one change detection\n * when shouldCoalesceRunChangeDetection is true.\n * And because in this case, change detection run in async way(requestAnimationFrame),\n * so we also need to check the _nesting here to prevent multiple\n * change detections.\n */\n if (zone.isCheckStableRunning || zone.callbackScheduled) {\n return;\n }\n zone.callbackScheduled = true;\n function scheduleCheckStable() {\n scheduleCallbackWithRafRace(() => {\n zone.callbackScheduled = false;\n updateMicroTaskStatus(zone);\n zone.isCheckStableRunning = true;\n checkStable(zone);\n zone.isCheckStableRunning = false;\n });\n }\n if (zone.scheduleInRootZone) {\n Zone.root.run(() => {\n scheduleCheckStable();\n });\n } else {\n zone._outer.run(() => {\n scheduleCheckStable();\n });\n }\n updateMicroTaskStatus(zone);\n}\n\nfunction forkInnerZoneWithAngularBehavior(zone: NgZonePrivate) {\n const delayChangeDetectionForEventsDelegate = () => {\n delayChangeDetectionForEvents(zone);\n };\n const instanceId = ngZoneInstanceId++;\n zone._inner = zone._inner.fork({\n name: 'angular',\n properties: <any>{\n [isAngularZoneProperty]: true,\n [angularZoneInstanceIdProperty]: instanceId,\n [angularZoneInstanceIdProperty + instanceId]: true,\n },\n onInvokeTask: (\n delegate: ZoneDelegate,\n current: Zone,\n target: Zone,\n task: Task,\n applyThis: any,\n applyArgs: any,\n ): any => {\n // Prevent triggering change detection when the flag is detected.\n if (shouldBeIgnoredByZone(applyArgs)) {\n return delegate.invokeTask(target, task, applyThis, applyArgs);\n }\n\n try {\n onEnter(zone);\n return delegate.invokeTask(target, task, applyThis, applyArgs);\n } finally {\n if (\n (zone.shouldCoalesceEventChangeDetection && task.type === 'eventTask') ||\n zone.shouldCoalesceRunChangeDetection\n ) {\n delayChangeDetectionForEventsDelegate();\n }\n onLeave(zone);\n }\n },\n\n onInvoke: (\n delegate: ZoneDelegate,\n current: Zone,\n target: Zone,\n callback: Function,\n applyThis: any,\n applyArgs?: any[],\n source?: string,\n ): any => {\n try {\n onEnter(zone);\n return delegate.invoke(target, callback, applyThis, applyArgs, source);\n } finally {\n if (\n zone.shouldCoalesceRunChangeDetection &&\n // Do not delay change detection when the task is the scheduler's tick.\n // We need to synchronously trigger the stability logic so that the\n // zone-based scheduler can prevent a duplicate ApplicationRef.tick\n // by first checking if the scheduler tick is running. This does seem a bit roundabout,\n // but we _do_ still want to trigger all the correct events when we exit the zone.run\n // (`onMicrotaskEmpty` and `onStable` _should_ emit; developers can have code which\n // relies on these events happening after change detection runs).\n // Note: `zone.callbackScheduled` is already in delayChangeDetectionForEventsDelegate\n // but is added here as well to prevent reads of applyArgs when not necessary\n !zone.callbackScheduled &&\n !isSchedulerTick(applyArgs)\n ) {\n delayChangeDetectionForEventsDelegate();\n }\n onLeave(zone);\n }\n },\n\n onHasTask: (\n delegate: ZoneDelegate,\n current: Zone,\n target: Zone,\n hasTaskState: HasTaskState,\n ) => {\n delegate.hasTask(target, hasTaskState);\n if (current === target) {\n // We are only interested in hasTask events which originate from our zone\n // (A child hasTask event is not interesting to us)\n if (hasTaskState.change == 'microTask') {\n zone._hasPendingMicrotasks = hasTaskState.microTask;\n updateMicroTaskStatus(zone);\n checkStable(zone);\n } else if (hasTaskState.change == 'macroTask') {\n zone.hasPendingMacrotasks = hasTaskState.macroTask;\n }\n }\n },\n\n onHandleError: (delegate: ZoneDelegate, current: Zone, target: Zone, error: any): boolean => {\n delegate.handleError(target, error);\n zone.runOutsideAngular(() => zone.onError.emit(error));\n return false;\n },\n });\n}\n\nfunction updateMicroTaskStatus(zone: NgZonePrivate) {\n if (\n zone._hasPendingMicrotasks ||\n ((zone.shouldCoalesceEventChangeDetection || zone.shouldCoalesceRunChangeDetection) &&\n zone.callbackScheduled === true)\n ) {\n zone.hasPendingMicrotasks = true;\n } else {\n zone.hasPendingMicrotasks = false;\n }\n}\n\nfunction onEnter(zone: NgZonePrivate) {\n zone._nesting++;\n if (zone.isStable) {\n zone.isStable = false;\n zone.onUnstable.emit(null);\n }\n}\n\nfunction onLeave(zone: NgZonePrivate) {\n zone._nesting--;\n checkStable(zone);\n}\n\n/**\n * Provides a noop implementation of `NgZone` which does nothing. This zone requires explicit calls\n * to framework to perform rendering.\n */\nexport class NoopNgZone implements NgZone {\n readonly hasPendingMicrotasks = false;\n readonly hasPendingMacrotasks = false;\n readonly isStable = true;\n readonly onUnstable = new EventEmitter<any>();\n readonly onMicrotaskEmpty = new EventEmitter<any>();\n readonly onStable = new EventEmitter<any>();\n readonly onError = new EventEmitter<any>();\n\n run<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any): T {\n return fn.apply(applyThis, applyArgs);\n }\n\n runGuarded<T>(fn: (...args: any[]) => any, applyThis?: any, applyArgs?: any): T {\n return fn.apply(applyThis, applyArgs);\n }\n\n runOutsideAngular<T>(fn: (...args: any[]) => T): T {\n return fn();\n }\n\n runTask<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any, name?: string): T {\n return fn.apply(applyThis, applyArgs);\n }\n}\n\nfunction shouldBeIgnoredByZone(applyArgs: unknown): boolean {\n return hasApplyArgsData(applyArgs, '__ignore_ng_zone__');\n}\n\nfunction isSchedulerTick(applyArgs: unknown): boolean {\n return hasApplyArgsData(applyArgs, '__scheduler_tick__');\n}\n\nfunction hasApplyArgsData(applyArgs: unknown, key: string) {\n if (!Array.isArray(applyArgs)) {\n return false;\n }\n\n // We should only ever get 1 arg passed through to invokeTask.\n // Short circuit here incase that behavior changes.\n if (applyArgs.length !== 1) {\n return false;\n }\n\n return applyArgs[0]?.data?.[key] === true;\n}\n\n// Set of options recognized by the NgZone.\nexport interface InternalNgZoneOptions {\n enableLongStackTrace?: boolean;\n shouldCoalesceEventChangeDetection?: boolean;\n shouldCoalesceRunChangeDetection?: boolean;\n scheduleInRootZone?: boolean;\n}\n\nexport function getNgZone(\n ngZoneToUse: NgZone | 'zone.js' | 'noop' = 'zone.js',\n options: InternalNgZoneOptions,\n): NgZone {\n if (ngZoneToUse === 'noop') {\n return new NoopNgZone();\n }\n if (ngZoneToUse === 'zone.js') {\n return new NgZone(options);\n }\n return ngZoneToUse;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {inject, InjectionToken} from './di';\nimport {NgZone} from './zone';\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 * ```ts\n * class MyErrorHandler implements ErrorHandler {\n * handleError(error) {\n * // do something with the exception\n * }\n * }\n *\n * // Provide in standalone apps\n * bootstrapApplication(AppComponent, {\n * providers: [{provide: ErrorHandler, useClass: MyErrorHandler}]\n * })\n *\n * // Provide in module-based apps\n * @NgModule({\n * providers: [{provide: ErrorHandler, useClass: MyErrorHandler}]\n * })\n * class MyModule {}\n * ```\n *\n * @publicApi\n */\nexport class ErrorHandler {\n /**\n * @internal\n */\n _console: Console = console;\n\n handleError(error: any): void {\n this._console.error('ERROR', error);\n }\n}\n\n/**\n * `InjectionToken` used to configure how to call the `ErrorHandler`.\n *\n * `NgZone` is provided by default today so the default (and only) implementation for this\n * is calling `ErrorHandler.handleError` outside of the Angular zone.\n */\nexport const INTERNAL_APPLICATION_ERROR_HANDLER = new InjectionToken<(e: any) => void>(\n typeof ngDevMode === 'undefined' || ngDevMode ? 'internal error handler' : '',\n {\n providedIn: 'root',\n factory: () => {\n const zone = inject(NgZone);\n const userErrorHandler = inject(ErrorHandler);\n return (e: unknown) => zone.runOutsideAngular(() => userErrorHandler.handleError(e));\n },\n },\n);\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {setActiveConsumer} from '../../../primitives/signals';\n\nimport {inject} from '../../di/injector_compatibility';\nimport {ErrorHandler} from '../../error_handler';\nimport {formatRuntimeError, RuntimeError, RuntimeErrorCode} from '../../errors';\nimport {DestroyRef} from '../../linker/destroy_ref';\n\nimport {OutputRef, OutputRefSubscription} from './output_ref';\n\n/**\n * An `OutputEmitterRef` is created by the `output()` function and can be\n * used to emit values to consumers of your directive or component.\n *\n * Consumers of your directive/component can bind to the output and\n * subscribe to changes via the bound event syntax. For example:\n *\n * ```html\n * <my-comp (valueChange)=\"processNewValue($event)\" />\n * ```\n *\n * @publicAPI\n */\nexport class OutputEmitterRef<T> implements OutputRef<T> {\n private destroyed = false;\n private listeners: Array<(value: T) => void> | null = null;\n private errorHandler = inject(ErrorHandler, {optional: true});\n\n /** @internal */\n destroyRef: DestroyRef = inject(DestroyRef);\n\n constructor() {\n // Clean-up all listeners and mark as destroyed upon destroy.\n this.destroyRef.onDestroy(() => {\n this.destroyed = true;\n this.listeners = null;\n });\n }\n\n subscribe(callback: (value: T) => void): OutputRefSubscription {\n if (this.destroyed) {\n throw new RuntimeError(\n RuntimeErrorCode.OUTPUT_REF_DESTROYED,\n ngDevMode &&\n 'Unexpected subscription to destroyed `OutputRef`. ' +\n 'The owning directive/component is destroyed.',\n );\n }\n\n (this.listeners ??= []).push(callback);\n\n return {\n unsubscribe: () => {\n const idx = this.listeners?.indexOf(callback);\n if (idx !== undefined && idx !== -1) {\n this.listeners?.splice(idx, 1);\n }\n },\n };\n }\n\n /** Emits a new value to the output. */\n emit(value: T): void {\n if (this.destroyed) {\n console.warn(\n formatRuntimeError(\n RuntimeErrorCode.OUTPUT_REF_DESTROYED,\n ngDevMode &&\n 'Unexpected emit for destroyed `OutputRef`. ' +\n 'The owning directive/component is destroyed.',\n ),\n );\n return;\n }\n\n if (this.listeners === null) {\n return;\n }\n\n const previousConsumer = setActiveConsumer(null);\n try {\n for (const listenerFn of this.listeners) {\n try {\n listenerFn(value);\n } catch (err: unknown) {\n this.errorHandler?.handleError(err);\n }\n }\n } finally {\n setActiveConsumer(previousConsumer);\n }\n }\n}\n\n/** Gets the owning `DestroyRef` for the given output. */\nexport function getOutputDestroyRef(ref: OutputRef<unknown>): DestroyRef | undefined {\n return ref.destroyRef;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {assertInInjectionContext} from '../../di';\n\nimport {OutputEmitterRef} from './output_emitter_ref';\n\n/**\n * Options for declaring an output.\n *\n * @publicAPI\n */\nexport interface OutputOptions {\n alias?: string;\n}\n\n/**\n * The `output` function allows declaration of Angular outputs in\n * directives and components.\n *\n * You can use outputs to emit values to parent directives and component.\n * Parents can subscribe to changes via:\n *\n * - template event bindings. For example, `(myOutput)=\"doSomething($event)\"`\n * - programmatic subscription by using `OutputRef#subscribe`.\n *\n * @usageNotes\n *\n * To use `output()`, import the function from `@angular/core`.\n *\n * ```ts\n * import {output} from '@angular/core';\n * ```\n *\n * Inside your component, introduce a new class member and initialize\n * it with a call to `output`.\n *\n * ```ts\n * @Directive({\n * ...\n * })\n * export class MyDir {\n * nameChange = output<string>(); // OutputEmitterRef<string>\n * onClick = output(); // OutputEmitterRef<void>\n * }\n * ```\n *\n * You can emit values to consumers of your directive, by using\n * the `emit` method from `OutputEmitterRef`.\n *\n * ```ts\n * updateName(newName: string): void {\n * this.nameChange.emit(newName);\n * }\n * ```\n * @initializerApiFunction {\"showTypesInSignaturePreview\": true}\n * @publicAPI\n */\nexport function output<T = void>(opts?: OutputOptions): OutputEmitterRef<T> {\n ngDevMode && assertInInjectionContext(output);\n return new OutputEmitterRef<T>();\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {assertInInjectionContext} from '../../di';\n\nimport {\n createInputSignal,\n InputOptions,\n InputOptionsWithoutTransform,\n InputOptionsWithTransform,\n InputSignal,\n InputSignalWithTransform,\n} from './input_signal';\nimport {REQUIRED_UNSET_VALUE} from './input_signal_node';\n\nexport function inputFunction<ReadT, WriteT>(\n initialValue?: ReadT,\n opts?: InputOptions<ReadT, WriteT>,\n): InputSignalWithTransform<ReadT | undefined, WriteT> {\n ngDevMode && assertInInjectionContext(input);\n return createInputSignal(initialValue, opts);\n}\n\nexport function inputRequiredFunction<ReadT, WriteT = ReadT>(\n opts?: InputOptions<ReadT, WriteT>,\n): InputSignalWithTransform<ReadT, WriteT> {\n ngDevMode && assertInInjectionContext(input);\n return createInputSignal(REQUIRED_UNSET_VALUE as never, opts);\n}\n\n/**\n * The `input` function allows declaration of inputs in directives and\n * components.\n *\n * The function exposes an API for also declaring required inputs via the\n * `input.required` function.\n *\n * @publicAPI\n * @docsPrivate Ignored because `input` is the canonical API entry.\n */\nexport interface InputFunction {\n /**\n * Initializes an input of type `T` with an initial value of `undefined`.\n * Angular will implicitly use `undefined` as initial value.\n */\n <T>(): InputSignal<T | undefined>;\n /** Declares an input of type `T` with an explicit initial value. */\n <T>(initialValue: T, opts?: InputOptionsWithoutTransform<T>): InputSignal<T>;\n /** Declares an input of type `T|undefined` without an initial value, but with input options */\n <T>(initialValue: undefined, opts: InputOptionsWithoutTransform<T>): InputSignal<T | undefined>;\n /**\n * Declares an input of type `T` with an initial value and a transform\n * function.\n *\n * The input accepts values of type `TransformT` and the given\n * transform function will transform the value to type `T`.\n */\n <T, TransformT>(\n initialValue: T,\n opts: InputOptionsWithTransform<T, TransformT>,\n ): InputSignalWithTransform<T, TransformT>;\n /**\n * Declares an input of type `T|undefined` without an initial value and with a transform\n * function.\n *\n * The input accepts values of type `TransformT` and the given\n * transform function will transform the value to type `T|undefined`.\n */ <T, TransformT>(\n initialValue: undefined,\n opts: InputOptionsWithTransform<T | undefined, TransformT>,\n ): InputSignalWithTransform<T | undefined, TransformT>;\n\n /**\n * Initializes a required input.\n *\n * Consumers of your directive/component need to bind to this\n * input. If unset, a compile time error will be reported.\n *\n * @publicAPI\n */\n required: {\n /** Declares a required input of type `T`. */\n <T>(opts?: InputOptionsWithoutTransform<T>): InputSignal<T>;\n /**\n * Declares a required input of type `T` with a transform function.\n *\n * The input accepts values of type `TransformT` and the given\n * transform function will transform the value to type `T`.\n */\n <T, TransformT>(\n opts: InputOptionsWithTransform<T, TransformT>,\n ): InputSignalWithTransform<T, TransformT>;\n };\n}\n\n/**\n * The `input` function allows declaration of Angular inputs in directives\n * and components.\n *\n * There are two variants of inputs that can be declared:\n *\n * 1. **Optional inputs** with an initial value.\n * 2. **Required inputs** that consumers need to set.\n *\n * By default, the `input` function will declare optional inputs that\n * always have an initial value. Required inputs can be declared\n * using the `input.required()` function.\n *\n * Inputs are signals. The values of an input are exposed as a `Signal`.\n * The signal always holds the latest value of the input that is bound\n * from the parent.\n *\n * @usageNotes\n * To use signal-based inputs, import `input` from `@angular/core`.\n *\n * ```ts\n * import {input} from '@angular/core`;\n * ```\n *\n * Inside your component, introduce a new class member and initialize\n * it with a call to `input` or `input.required`.\n *\n * ```ts\n * @Component({\n * ...\n * })\n * export class UserProfileComponent {\n * firstName = input<string>(); // Signal<string|undefined>\n * lastName = input.required<string>(); // Signal<string>\n * age = input(0) // Signal<number>\n * }\n * ```\n *\n * Inside your component template, you can display values of the inputs\n * by calling the signal.\n *\n * ```html\n * <span>{{firstName()}}</span>\n * ```\n *\n * @publicAPI\n * @initializerApiFunction\n */\nexport const input: InputFunction = (() => {\n // Note: This may be considered a side-effect, but nothing will depend on\n // this assignment, unless this `input` constant export is accessed. It's a\n // self-contained side effect that is local to the user facing`input` export.\n (inputFunction as any).required = inputRequiredFunction;\n return inputFunction as typeof inputFunction & {required: typeof inputRequiredFunction};\n})();\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {TNode} from '../render3/interfaces/node';\nimport {RElement} from '../render3/interfaces/renderer_dom';\nimport {LView} from '../render3/interfaces/view';\nimport {getCurrentTNode, getLView} from '../render3/state';\nimport {getNativeByTNode} from '../render3/util/view_utils';\n\n/**\n * Creates an ElementRef from the most recent node.\n *\n * @returns The ElementRef instance to use\n */\nexport function injectElementRef(): ElementRef {\n return createElementRef(getCurrentTNode()!, getLView());\n}\n\n/**\n * Creates an ElementRef given a node.\n *\n * @param tNode The node for which you'd like an ElementRef\n * @param lView The view to which the node belongs\n * @returns The ElementRef instance to use\n */\nexport function createElementRef(tNode: TNode, lView: LView): ElementRef {\n return new ElementRef(getNativeByTNode(tNode, lView) as RElement);\n}\n\n/**\n * A wrapper around a native element inside of a View.\n *\n * An `ElementRef` is backed by a render-specific element. In the browser, this is usually a DOM\n * element.\n *\n * @security Permitting direct access to the DOM can make your application more vulnerable to\n * XSS attacks. Carefully review any use of `ElementRef` in your code. For more detail, see the\n * [Security Guide](https://g.co/ng/security).\n *\n * @publicApi\n */\n// Note: We don't expose things like `Injector`, `ViewContainer`, ... here,\n// i.e. users have to ask for what they need. With that, we can build better analysis tools\n// and could do better codegen in the future.\nexport class ElementRef<T = any> {\n /**\n * <div class=\"docs-alert docs-alert-important\">\n * <header>Use with caution</header>\n * <p>\n * Use this API as the last resort when direct access to DOM is needed. Use templating and\n * data-binding provided by Angular instead. If used, it is recommended in combination with\n * {@link /best-practices/security#direct-use-of-the-dom-apis-and-explicit-sanitization-calls DomSanitizer}\n * for maxiumum security;\n * </p>\n * </div>\n */\n public nativeElement: T;\n\n constructor(nativeElement: T) {\n this.nativeElement = nativeElement;\n }\n\n /**\n * @internal\n * @nocollapse\n */\n static __NG_ELEMENT_ID__: () => ElementRef = injectElementRef;\n}\n\n/**\n * Unwraps `ElementRef` and return the `nativeElement`.\n *\n * @param value value to unwrap\n * @returns `nativeElement` if `ElementRef` otherwise returns value as is.\n */\nexport function unwrapElementRef<T, R>(value: T | ElementRef<R>): T | R {\n return value instanceof ElementRef ? value.nativeElement : value;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {SIGNAL} from '../../../primitives/signals';\n\n/**\n * A reactive value which notifies consumers of any changes.\n *\n * Signals are functions which returns their current value. To access the current value of a signal,\n * call it.\n *\n * Ordinary values can be turned into `Signal`s with the `signal` function.\n */\nexport type Signal<T> = (() => T) & {\n [SIGNAL]: unknown;\n};\n\n/**\n * Checks if the given `value` is a reactive `Signal`.\n */\nexport function isSignal(value: unknown): value is Signal<unknown> {\n return typeof value === 'function' && (value as Signal<unknown>)[SIGNAL] !== undefined;\n}\n\n/**\n * A comparison function which can determine if two values are equal.\n */\nexport type ValueEqualityFn<T> = (a: T, b: T) => boolean;\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n createSignal,\n SIGNAL,\n SignalGetter,\n SignalNode,\n signalSetFn,\n signalUpdateFn,\n} from '../../../primitives/signals';\n\nimport {isSignal, Signal, ValueEqualityFn} from './api';\n\n/** Symbol used distinguish `WritableSignal` from other non-writable signals and functions. */\nexport const ɵWRITABLE_SIGNAL: unique symbol = /* @__PURE__ */ Symbol('WRITABLE_SIGNAL');\n\n/**\n * A `Signal` with a value that can be mutated via a setter interface.\n */\nexport interface WritableSignal<T> extends Signal<T> {\n [ɵWRITABLE_SIGNAL]: T;\n\n /**\n * Directly set the signal to a new value, and notify any dependents.\n */\n set(value: T): void;\n\n /**\n * Update the value of the signal based on its current value, and\n * notify any dependents.\n */\n update(updateFn: (value: T) => T): void;\n\n /**\n * Returns a readonly version of this signal. Readonly signals can be accessed to read their value\n * but can't be changed using set or update methods. The readonly signals do _not_ have\n * any built-in mechanism that would prevent deep-mutation of their value.\n */\n asReadonly(): Signal<T>;\n}\n\n/**\n * Utility function used during template type checking to extract the value from a `WritableSignal`.\n * @codeGenApi\n */\nexport function ɵunwrapWritableSignal<T>(value: T | {[ɵWRITABLE_SIGNAL]: T}): T {\n // Note: the function uses `WRITABLE_SIGNAL` as a brand instead of `WritableSignal<T>`,\n // because the latter incorrectly unwraps non-signal getter functions.\n return null!;\n}\n\n/**\n * Options passed to the `signal` creation function.\n */\nexport interface CreateSignalOptions<T> {\n /**\n * A comparison function which defines equality for signal values.\n */\n equal?: ValueEqualityFn<T>;\n\n /**\n * A debug name for the signal. Used in Angular DevTools to identify the signal.\n */\n debugName?: string;\n}\n\n/**\n * Create a `Signal` that can be set or updated directly.\n */\nexport function signal<T>(initialValue: T, options?: CreateSignalOptions<T>): WritableSignal<T> {\n const signalFn = createSignal(initialValue, options?.equal) as SignalGetter<T> &\n WritableSignal<T>;\n\n const node = signalFn[SIGNAL];\n\n signalFn.set = (newValue: T) => signalSetFn(node, newValue);\n signalFn.update = (updateFn: (value: T) => T) => signalUpdateFn(node, updateFn);\n signalFn.asReadonly = signalAsReadonlyFn.bind(signalFn as any) as () => Signal<T>;\n\n if (ngDevMode) {\n signalFn.toString = () => `[Signal: ${signalFn()}]`;\n node.debugName = options?.debugName;\n }\n\n return signalFn as WritableSignal<T>;\n}\n\nexport function signalAsReadonlyFn<T>(this: SignalGetter<T>): Signal<T> {\n const node = this[SIGNAL] as SignalNode<T> & {readonlyFn?: Signal<T>};\n if (node.readonlyFn === undefined) {\n const readonlyFn = () => this();\n (readonlyFn as any)[SIGNAL] = node;\n node.readonlyFn = readonlyFn as Signal<T>;\n }\n return node.readonlyFn;\n}\n\n/**\n * Checks if the given `value` is a writeable signal.\n */\nexport function isWritableSignal(value: unknown): value is WritableSignal<unknown> {\n return isSignal(value) && typeof (value as any).set === 'function';\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Observable, Subject} from 'rxjs';\n\nimport {EventEmitter} from '../event_emitter';\nimport {Writable} from '../interface/type';\nimport {arrayEquals, flatten} from '../util/array_utils';\n\nfunction symbolIterator<T>(this: QueryList<T>): Iterator<T> {\n // @ts-expect-error accessing a private member\n return this._results[Symbol.iterator]();\n}\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 * ```ts\n * @Component({...})\n * class Container {\n * @ViewChildren(Item) items:QueryList<Item>;\n * }\n * ```\n *\n * @publicApi\n */\nexport class QueryList<T> implements Iterable<T> {\n public readonly dirty = true;\n private _onDirty?: () => void = undefined;\n private _results: Array<T> = [];\n private _changesDetected: boolean = false;\n private _changes: Subject<QueryList<T>> | undefined = undefined;\n\n readonly length: number = 0;\n readonly first: T = undefined!;\n readonly last: T = undefined!;\n\n /**\n * Returns `Observable` of `QueryList` notifying the subscriber of changes.\n */\n get changes(): Observable<any> {\n return (this._changes ??= new Subject());\n }\n\n /**\n * @param emitDistinctChangesOnly Whether `QueryList.changes` should fire only when actual change\n * has occurred. Or if it should fire when query is recomputed. (recomputing could resolve in\n * the same result)\n */\n constructor(private _emitDistinctChangesOnly: boolean = false) {}\n\n /**\n * Returns the QueryList entry at `index`.\n */\n get(index: number): T | undefined {\n return this._results[index];\n }\n\n /**\n * See\n * [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)\n */\n map<U>(fn: (item: T, index: number, array: T[]) => U): U[] {\n return this._results.map(fn);\n }\n\n /**\n * See\n * [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)\n */\n filter<S extends T>(predicate: (value: T, index: number, array: readonly T[]) => value is S): S[];\n filter(predicate: (value: T, index: number, array: readonly T[]) => unknown): T[];\n filter(fn: (item: T, index: number, array: T[]) => boolean): T[] {\n return this._results.filter(fn);\n }\n\n /**\n * See\n * [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)\n */\n find(fn: (item: T, index: number, array: T[]) => boolean): T | undefined {\n return this._results.find(fn);\n }\n\n /**\n * See\n * [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)\n */\n reduce<U>(fn: (prevValue: U, curValue: T, curIndex: number, array: T[]) => U, init: U): U {\n return this._results.reduce(fn, init);\n }\n\n /**\n * See\n * [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)\n */\n forEach(fn: (item: T, index: number, array: T[]) => void): void {\n this._results.forEach(fn);\n }\n\n /**\n * See\n * [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)\n */\n some(fn: (value: T, index: number, array: T[]) => boolean): boolean {\n return this._results.some(fn);\n }\n\n /**\n * Returns a copy of the internal results list as an Array.\n */\n toArray(): T[] {\n return this._results.slice();\n }\n\n toString(): string {\n return this._results.toString();\n }\n\n /**\n * Updates the stored data of the query list, and resets the `dirty` flag to `false`, so that\n * on change detection, it will not notify of changes to the queries, unless a new change\n * occurs.\n *\n * @param resultsTree The query results to store\n * @param identityAccessor Optional function for extracting stable object identity from a value\n * in the array. This function is executed for each element of the query result list while\n * comparing current query list with the new one (provided as a first argument of the `reset`\n * function) to detect if the lists are different. If the function is not provided, elements\n * are compared as is (without any pre-processing).\n */\n reset(resultsTree: Array<T | any[]>, identityAccessor?: (value: T) => unknown): void {\n (this as {dirty: boolean}).dirty = false;\n const newResultFlat = flatten(resultsTree);\n if ((this._changesDetected = !arrayEquals(this._results, newResultFlat, identityAccessor))) {\n this._results = newResultFlat;\n (this as Writable<this>).length = newResultFlat.length;\n (this as Writable<this>).last = newResultFlat[this.length - 1];\n (this as Writable<this>).first = newResultFlat[0];\n }\n }\n\n /**\n * Triggers a change event by emitting on the `changes` {@link EventEmitter}.\n */\n notifyOnChanges(): void {\n if (this._changes !== undefined && (this._changesDetected || !this._emitDistinctChangesOnly))\n this._changes.next(this);\n }\n\n /** @internal */\n onDirty(cb: () => void) {\n this._onDirty = cb;\n }\n\n /** internal */\n setDirty() {\n (this as {dirty: boolean}).dirty = true;\n this._onDirty?.();\n }\n\n /** internal */\n destroy(): void {\n if (this._changes !== undefined) {\n this._changes.complete();\n this._changes.unsubscribe();\n }\n }\n\n [Symbol.iterator]: () => Iterator<T> = /** @__PURE__*/ (() => symbolIterator)();\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {TNode, TNodeFlags} from '../render3/interfaces/node';\nimport {RElement} from '../render3/interfaces/renderer_dom';\n\n/**\n * The name of an attribute that can be added to the hydration boundary node\n * (component host node) to disable hydration for the content within that boundary.\n */\nexport const SKIP_HYDRATION_ATTR_NAME = 'ngSkipHydration';\n\n/** Lowercase name of the `ngSkipHydration` attribute used for case-insensitive comparisons. */\nconst SKIP_HYDRATION_ATTR_NAME_LOWER_CASE = 'ngskiphydration';\n\n/**\n * Helper function to check if a given TNode has the 'ngSkipHydration' attribute.\n */\nexport function hasSkipHydrationAttrOnTNode(tNode: TNode): boolean {\n const attrs = tNode.mergedAttrs;\n if (attrs === null) return false;\n // only ever look at the attribute name and skip the values\n for (let i = 0; i < attrs.length; i += 2) {\n const value = attrs[i];\n // This is a marker, which means that the static attributes section is over,\n // so we can exit early.\n if (typeof value === 'number') return false;\n if (typeof value === 'string' && value.toLowerCase() === SKIP_HYDRATION_ATTR_NAME_LOWER_CASE) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * Helper function to check if a given RElement has the 'ngSkipHydration' attribute.\n */\nexport function hasSkipHydrationAttrOnRElement(rNode: RElement): boolean {\n return rNode.hasAttribute(SKIP_HYDRATION_ATTR_NAME);\n}\n\n/**\n * Checks whether a TNode has a flag to indicate that it's a part of\n * a skip hydration block.\n */\nexport function hasInSkipHydrationBlockFlag(tNode: TNode): boolean {\n return (tNode.flags & TNodeFlags.inSkipHydrationBlock) === TNodeFlags.inSkipHydrationBlock;\n}\n\n/**\n * Helper function that determines if a given node is within a skip hydration block\n * by navigating up the TNode tree to see if any parent nodes have skip hydration\n * attribute.\n */\nexport function isInSkipHydrationBlock(tNode: TNode): boolean {\n if (hasInSkipHydrationBlockFlag(tNode)) {\n return true;\n }\n let currentTNode: TNode | null = tNode.parent;\n while (currentTNode) {\n if (hasInSkipHydrationBlockFlag(tNode) || hasSkipHydrationAttrOnTNode(currentTNode)) {\n return true;\n }\n currentTNode = currentTNode.parent;\n }\n return false;\n}\n\n/**\n * Check if an i18n block is in a skip hydration section by looking at a parent TNode\n * to determine if this TNode is in a skip hydration section or the TNode has\n * the `ngSkipHydration` attribute.\n */\nexport function isI18nInSkipHydrationBlock(parentTNode: TNode): boolean {\n return (\n hasInSkipHydrationBlockFlag(parentTNode) ||\n hasSkipHydrationAttrOnTNode(parentTNode) ||\n isInSkipHydrationBlock(parentTNode)\n );\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/**\n * The strategy that the default change detector uses to detect changes.\n * When set, takes effect the next time change detection is triggered.\n *\n * @see {@link /api/core/ChangeDetectorRef?tab=usage-notes Change detection usage}\n * @see {@link /best-practices/skipping-subtrees Skipping component subtrees}\n *\n * @publicApi\n */\nexport enum ChangeDetectionStrategy {\n /**\n * Use the `CheckOnce` strategy, meaning that automatic change detection is deactivated\n * until reactivated by setting the strategy to `Default` (`CheckAlways`).\n * Change detection can still be explicitly invoked.\n * This strategy applies to all child directives and cannot be overridden.\n */\n OnPush = 0,\n\n /**\n * Use the default `CheckAlways` strategy, in which change detection is automatic until\n * explicitly deactivated.\n */\n Default = 1,\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {assertNumber} from '../../util/assert';\n\nimport {ID, LView} from './view';\n\n// Keeps track of the currently-active LViews.\nconst TRACKED_LVIEWS = new Map<number, LView>();\n\n// Used for generating unique IDs for LViews.\nlet uniqueIdCounter = 0;\n\n/** Gets a unique ID that can be assigned to an LView. */\nexport function getUniqueLViewId(): number {\n return uniqueIdCounter++;\n}\n\n/** Starts tracking an LView. */\nexport function registerLView(lView: LView): void {\n ngDevMode && assertNumber(lView[ID], 'LView must have an ID in order to be registered');\n TRACKED_LVIEWS.set(lView[ID], lView);\n}\n\n/** Gets an LView by its unique ID. */\nexport function getLViewById(id: number): LView | null {\n ngDevMode && assertNumber(id, 'ID used for LView lookup must be a number');\n return TRACKED_LVIEWS.get(id) || null;\n}\n\n/** Stops tracking an LView. */\nexport function unregisterLView(lView: LView): void {\n ngDevMode && assertNumber(lView[ID], 'Cannot stop tracking an LView that does not have an ID');\n TRACKED_LVIEWS.delete(lView[ID]);\n}\n\n/** Gets the currently-tracked views. */\nexport function getTrackedLViews(): ReadonlyMap<number, LView> {\n return TRACKED_LVIEWS;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {getLViewById} from './lview_tracking';\nimport {RNode} from './renderer_dom';\nimport {LView} from './view';\n\n/**\n * The internal view context which is specific to a given DOM element, directive or\n * component instance. Each value in here (besides the LView and element node details)\n * can be present, null or undefined. If undefined then it implies the value has not been\n * looked up yet, otherwise, if null, then a lookup was executed and nothing was found.\n *\n * Each value will get filled when the respective value is examined within the getContext\n * function. The component, element and each directive instance will share the same instance\n * of the context.\n */\nexport class LContext {\n /**\n * The instance of the Component node.\n */\n public component: {} | null | undefined;\n\n /**\n * The list of active directives that exist on this element.\n */\n public directives: any[] | null | undefined;\n\n /**\n * The map of local references (local reference name => element or directive instance) that\n * exist on this element.\n */\n public localRefs: {[key: string]: any} | null | undefined;\n\n /** Component's parent view data. */\n get lView(): LView | null {\n return getLViewById(this.lViewId);\n }\n\n constructor(\n /**\n * ID of the component's parent view data.\n */\n private lViewId: number,\n\n /**\n * The index instance of the node.\n */\n public nodeIndex: number,\n\n /**\n * The instance of the DOM node that is attached to the lNode.\n */\n public native: RNode,\n ) {}\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport '../util/ng_dev_mode';\n\nimport {assertDefined, assertDomNode} from '../util/assert';\nimport {EMPTY_ARRAY} from '../util/empty';\n\nimport {assertLView} from './assert';\nimport {LContext} from './interfaces/context';\nimport {getLViewById, registerLView} from './interfaces/lview_tracking';\nimport {TNode} from './interfaces/node';\nimport {RElement, RNode} from './interfaces/renderer_dom';\nimport {isComponentHost, isLView} from './interfaces/type_checks';\nimport {CONTEXT, HEADER_OFFSET, HOST, ID, LView, TVIEW} from './interfaces/view';\nimport {getComponentLViewByIndex, unwrapRNode} from './util/view_utils';\n\n/**\n * Returns the matching `LContext` data for a given DOM node, directive or component instance.\n *\n * This function will examine the provided DOM element, component, or directive instance\\'s\n * monkey-patched property to derive the `LContext` data. Once called then the monkey-patched\n * value will be that of the newly created `LContext`.\n *\n * If the monkey-patched value is the `LView` instance then the context value for that\n * target will be created and the monkey-patch reference will be updated. Therefore when this\n * function is called it may mutate the provided element\\'s, component\\'s or any of the associated\n * directive\\'s monkey-patch values.\n *\n * If the monkey-patch value is not detected then the code will walk up the DOM until an element\n * is found which contains a monkey-patch reference. When that occurs then the provided element\n * will be updated with a new context (which is then returned). If the monkey-patch value is not\n * detected for a component/directive instance then it will throw an error (all components and\n * directives should be automatically monkey-patched by ivy).\n *\n * @param target Component, Directive or DOM Node.\n */\nexport function getLContext(target: any): LContext | null {\n let mpValue = readPatchedData(target);\n if (mpValue) {\n // only when it's an array is it considered an LView instance\n // ... otherwise it's an already constructed LContext instance\n if (isLView(mpValue)) {\n const lView: LView = mpValue!;\n let nodeIndex: number;\n let component: any = undefined;\n let directives: any[] | null | undefined = undefined;\n\n if (isComponentInstance(target)) {\n nodeIndex = findViaComponent(lView, target);\n if (nodeIndex == -1) {\n throw new Error('The provided component was not found in the application');\n }\n component = target;\n } else if (isDirectiveInstance(target)) {\n nodeIndex = findViaDirective(lView, target);\n if (nodeIndex == -1) {\n throw new Error('The provided directive was not found in the application');\n }\n directives = getDirectivesAtNodeIndex(nodeIndex, lView);\n } else {\n nodeIndex = findViaNativeElement(lView, target as RElement);\n if (nodeIndex == -1) {\n return null;\n }\n }\n\n // the goal is not to fill the entire context full of data because the lookups\n // are expensive. Instead, only the target data (the element, component, container, ICU\n // expression or directive details) are filled into the context. If called multiple times\n // with different target values then the missing target data will be filled in.\n const native = unwrapRNode(lView[nodeIndex]);\n const existingCtx = readPatchedData(native);\n const context: LContext =\n existingCtx && !Array.isArray(existingCtx)\n ? existingCtx\n : createLContext(lView, nodeIndex, native);\n\n // only when the component has been discovered then update the monkey-patch\n if (component && context.component === undefined) {\n context.component = component;\n attachPatchData(context.component, context);\n }\n\n // only when the directives have been discovered then update the monkey-patch\n if (directives && context.directives === undefined) {\n context.directives = directives;\n for (let i = 0; i < directives.length; i++) {\n attachPatchData(directives[i], context);\n }\n }\n\n attachPatchData(context.native, context);\n mpValue = context;\n }\n } else {\n const rElement = target as RElement;\n ngDevMode && assertDomNode(rElement);\n\n // if the context is not found then we need to traverse upwards up the DOM\n // to find the nearest element that has already been monkey patched with data\n let parent = rElement as any;\n while ((parent = parent.parentNode)) {\n const parentContext = readPatchedData(parent);\n if (parentContext) {\n const lView = Array.isArray(parentContext) ? (parentContext as LView) : parentContext.lView;\n\n // the edge of the app was also reached here through another means\n // (maybe because the DOM was changed manually).\n if (!lView) {\n return null;\n }\n\n const index = findViaNativeElement(lView, rElement);\n if (index >= 0) {\n const native = unwrapRNode(lView[index]);\n const context = createLContext(lView, index, native);\n attachPatchData(native, context);\n mpValue = context;\n break;\n }\n }\n }\n }\n return (mpValue as LContext) || null;\n}\n\n/**\n * Creates an empty instance of a `LContext` context\n */\nfunction createLContext(lView: LView, nodeIndex: number, native: RNode): LContext {\n return new LContext(lView[ID], nodeIndex, native);\n}\n\n/**\n * Takes a component instance and returns the view for that component.\n *\n * @param componentInstance\n * @returns The component's view\n */\nexport function getComponentViewByInstance(componentInstance: {}): LView {\n let patchedData = readPatchedData(componentInstance);\n let lView: LView;\n\n if (isLView(patchedData)) {\n const contextLView: LView = patchedData;\n const nodeIndex = findViaComponent(contextLView, componentInstance);\n lView = getComponentLViewByIndex(nodeIndex, contextLView);\n const context = createLContext(contextLView, nodeIndex, lView[HOST] as RElement);\n context.component = componentInstance;\n attachPatchData(componentInstance, context);\n attachPatchData(context.native, context);\n } else {\n const context = patchedData as unknown as LContext;\n const contextLView = context.lView!;\n ngDevMode && assertLView(contextLView);\n lView = getComponentLViewByIndex(context.nodeIndex, contextLView);\n }\n return lView;\n}\n\n/**\n * This property will be monkey-patched on elements, components and directives.\n */\nconst MONKEY_PATCH_KEY_NAME = '__ngContext__';\n\nexport function attachLViewId(target: any, data: LView) {\n target[MONKEY_PATCH_KEY_NAME] = data[ID];\n}\n\n/**\n * Returns the monkey-patch value data present on the target (which could be\n * a component, directive or a DOM node).\n */\nexport function readLView(target: any): LView | null {\n const data = readPatchedData(target);\n if (isLView(data)) {\n return data;\n }\n return data ? data.lView : null;\n}\n\n/**\n * Assigns the given data to the given target (which could be a component,\n * directive or DOM node instance) using monkey-patching.\n */\nexport function attachPatchData(target: any, data: LView | LContext) {\n ngDevMode && assertDefined(target, 'Target expected');\n // Only attach the ID of the view in order to avoid memory leaks (see #41047). We only do this\n // for `LView`, because we have control over when an `LView` is created and destroyed, whereas\n // we can't know when to remove an `LContext`.\n if (isLView(data)) {\n target[MONKEY_PATCH_KEY_NAME] = data[ID];\n registerLView(data);\n } else {\n target[MONKEY_PATCH_KEY_NAME] = data;\n }\n}\n\n/**\n * Returns the monkey-patch value data present on the target (which could be\n * a component, directive or a DOM node).\n */\nexport function readPatchedData(target: any): LView | LContext | null {\n ngDevMode && assertDefined(target, 'Target expected');\n const data = target[MONKEY_PATCH_KEY_NAME];\n return typeof data === 'number' ? getLViewById(data) : data || null;\n}\n\nexport function readPatchedLView<T>(target: any): LView<T> | null {\n const value = readPatchedData(target);\n if (value) {\n return (isLView(value) ? value : value.lView) as LView<T>;\n }\n return null;\n}\n\nexport function isComponentInstance(instance: any): boolean {\n return instance && instance.constructor && instance.constructor.ɵcmp;\n}\n\nexport function isDirectiveInstance(instance: any): boolean {\n return instance && instance.constructor && instance.constructor.ɵdir;\n}\n\n/**\n * Locates the element within the given LView and returns the matching index\n */\nfunction findViaNativeElement(lView: LView, target: RElement): number {\n const tView = lView[TVIEW];\n for (let i = HEADER_OFFSET; i < tView.bindingStartIndex; i++) {\n if (unwrapRNode(lView[i]) === target) {\n return i;\n }\n }\n\n return -1;\n}\n\n/**\n * Locates the next tNode (child, sibling or parent).\n */\nfunction traverseNextElement(tNode: TNode): TNode | null {\n if (tNode.child) {\n return tNode.child;\n } else if (tNode.next) {\n return tNode.next;\n } else {\n // Let's take the following template: <div><span>text</span></div><component/>\n // After checking the text node, we need to find the next parent that has a \"next\" TNode,\n // in this case the parent `div`, so that we can find the component.\n while (tNode.parent && !tNode.parent.next) {\n tNode = tNode.parent;\n }\n return tNode.parent && tNode.parent.next;\n }\n}\n\n/**\n * Locates the component within the given LView and returns the matching index\n */\nfunction findViaComponent(lView: LView, componentInstance: {}): number {\n const componentIndices = lView[TVIEW].components;\n if (componentIndices) {\n for (let i = 0; i < componentIndices.length; i++) {\n const elementComponentIndex = componentIndices[i];\n const componentView = getComponentLViewByIndex(elementComponentIndex, lView);\n if (componentView[CONTEXT] === componentInstance) {\n return elementComponentIndex;\n }\n }\n } else {\n const rootComponentView = getComponentLViewByIndex(HEADER_OFFSET, lView);\n const rootComponent = rootComponentView[CONTEXT];\n if (rootComponent === componentInstance) {\n // we are dealing with the root element here therefore we know that the\n // element is the very first element after the HEADER data in the lView\n return HEADER_OFFSET;\n }\n }\n return -1;\n}\n\n/**\n * Locates the directive within the given LView and returns the matching index\n */\nfunction findViaDirective(lView: LView, directiveInstance: {}): number {\n // if a directive is monkey patched then it will (by default)\n // have a reference to the LView of the current view. The\n // element bound to the directive being search lives somewhere\n // in the view data. We loop through the nodes and check their\n // list of directives for the instance.\n let tNode = lView[TVIEW].firstChild;\n while (tNode) {\n const directiveIndexStart = tNode.directiveStart;\n const directiveIndexEnd = tNode.directiveEnd;\n for (let i = directiveIndexStart; i < directiveIndexEnd; i++) {\n if (lView[i] === directiveInstance) {\n return tNode.index;\n }\n }\n tNode = traverseNextElement(tNode);\n }\n return -1;\n}\n\n/**\n * Returns a list of directives applied to a node at a specific index. The list includes\n * directives matched by selector and any host directives, but it excludes components.\n * Use `getComponentAtNodeIndex` to find the component applied to a node.\n *\n * @param nodeIndex The node index\n * @param lView The target view data\n */\nexport function getDirectivesAtNodeIndex(nodeIndex: number, lView: LView): any[] | null {\n const tNode = lView[TVIEW].data[nodeIndex] as TNode;\n if (tNode.directiveStart === 0) return EMPTY_ARRAY;\n const results: any[] = [];\n for (let i = tNode.directiveStart; i < tNode.directiveEnd; i++) {\n const directiveInstance = lView[i];\n if (!isComponentInstance(directiveInstance)) {\n results.push(directiveInstance);\n }\n }\n return results;\n}\n\nexport function getComponentAtNodeIndex(nodeIndex: number, lView: LView): {} | null {\n const tNode = lView[TVIEW].data[nodeIndex] as TNode;\n return isComponentHost(tNode) ? lView[tNode.directiveStart + tNode.componentOffset] : null;\n}\n\n/**\n * Returns a map of local references (local reference name => element or directive instance) that\n * exist on a given element.\n */\nexport function discoverLocalRefs(lView: LView, nodeIndex: number): {[key: string]: any} | null {\n const tNode = lView[TVIEW].data[nodeIndex] as TNode;\n if (tNode && tNode.localNames) {\n const result: {[key: string]: any} = {};\n let localIndex = tNode.index + 1;\n for (let i = 0; i < tNode.localNames.length; i += 2) {\n result[tNode.localNames[i]] = lView[localIndex];\n localIndex++;\n }\n return result;\n }\n\n return null;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {assertDefined} from '../../util/assert';\nimport {assertLView} from '../assert';\nimport {readPatchedLView} from '../context_discovery';\nimport {LContainer} from '../interfaces/container';\nimport {isLContainer, isLView, isRootView} from '../interfaces/type_checks';\nimport {CHILD_HEAD, CONTEXT, LView, NEXT} from '../interfaces/view';\n\nimport {getLViewParent} from './view_utils';\n\n/**\n * Retrieve the root view from any component or `LView` by walking the parent `LView` until\n * reaching the root `LView`.\n *\n * @param componentOrLView any component or `LView`\n */\nexport function getRootView<T>(componentOrLView: LView | {}): LView<T> {\n ngDevMode && assertDefined(componentOrLView, 'component');\n let lView = isLView(componentOrLView) ? componentOrLView : readPatchedLView(componentOrLView)!;\n while (lView && !isRootView(lView)) {\n lView = getLViewParent(lView)!;\n }\n ngDevMode && assertLView(lView);\n return lView as LView<T>;\n}\n\n/**\n * Returns the context information associated with the application where the target is situated. It\n * does this by walking the parent views until it gets to the root view, then getting the context\n * off of that.\n *\n * @param viewOrComponent the `LView` or component to get the root context for.\n */\nexport function getRootContext<T>(viewOrComponent: LView<T> | {}): T {\n const rootView = getRootView(viewOrComponent);\n ngDevMode &&\n assertDefined(rootView[CONTEXT], 'Root view has no context. Perhaps it is disconnected?');\n return rootView[CONTEXT] as T;\n}\n\n/**\n * Gets the first `LContainer` in the LView or `null` if none exists.\n */\nexport function getFirstLContainer(lView: LView): LContainer | null {\n return getNearestLContainer(lView[CHILD_HEAD]);\n}\n\n/**\n * Gets the next `LContainer` that is a sibling of the given container.\n */\nexport function getNextLContainer(container: LContainer): LContainer | null {\n return getNearestLContainer(container[NEXT]);\n}\n\nfunction getNearestLContainer(viewOrContainer: LContainer | LView | null) {\n while (viewOrContainer !== null && !isLContainer(viewOrContainer)) {\n viewOrContainer = viewOrContainer[NEXT];\n }\n return viewOrContainer as LContainer | null;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ChangeDetectionStrategy} from '../../change_detection/constants';\nimport {Injector} from '../../di/injector';\nimport {ViewEncapsulation} from '../../metadata/view';\nimport {assertLView} from '../assert';\nimport {\n discoverLocalRefs,\n getComponentAtNodeIndex,\n getDirectivesAtNodeIndex,\n getLContext,\n readPatchedLView,\n} from '../context_discovery';\nimport {getComponentDef, getDirectiveDef} from '../def_getters';\nimport {NodeInjector} from '../di';\nimport {DirectiveDef} from '../interfaces/definition';\nimport {TElementNode, TNode, TNodeProviderIndexes} from '../interfaces/node';\nimport {isRootView} from '../interfaces/type_checks';\nimport {CLEANUP, CONTEXT, LView, TVIEW, TViewType} from '../interfaces/view';\n\nimport {getRootContext} from './view_traversal_utils';\nimport {getLViewParent, unwrapRNode} from './view_utils';\n\n/**\n * Retrieves the component instance associated with a given DOM element.\n *\n * @usageNotes\n * Given the following DOM structure:\n *\n * ```html\n * <app-root>\n * <div>\n * <child-comp></child-comp>\n * </div>\n * </app-root>\n * ```\n *\n * Calling `getComponent` on `<child-comp>` will return the instance of `ChildComponent`\n * associated with this DOM element.\n *\n * Calling the function on `<app-root>` will return the `MyApp` instance.\n *\n *\n * @param element DOM element from which the component should be retrieved.\n * @returns Component instance associated with the element or `null` if there\n * is no component associated with it.\n *\n * @publicApi\n */\nexport function getComponent<T>(element: Element): T | null {\n ngDevMode && assertDomElement(element);\n const context = getLContext(element);\n if (context === null) return null;\n\n if (context.component === undefined) {\n const lView = context.lView;\n if (lView === null) {\n return null;\n }\n context.component = getComponentAtNodeIndex(context.nodeIndex, lView);\n }\n\n return context.component as unknown as T;\n}\n\n/**\n * If inside an embedded view (e.g. `*ngIf` or `*ngFor`), retrieves the context of the embedded\n * view that the element is part of. Otherwise retrieves the instance of the component whose view\n * owns the element (in this case, the result is the same as calling `getOwningComponent`).\n *\n * @param element Element for which to get the surrounding component instance.\n * @returns Instance of the component that is around the element or null if the element isn't\n * inside any component.\n *\n * @publicApi\n */\nexport function getContext<T extends {}>(element: Element): T | null {\n assertDomElement(element);\n const context = getLContext(element)!;\n const lView = context ? context.lView : null;\n return lView === null ? null : (lView[CONTEXT] as T);\n}\n\n/**\n * Retrieves the component instance whose view contains the DOM element.\n *\n * For example, if `<child-comp>` is used in the template of `<app-comp>`\n * (i.e. a `ViewChild` of `<app-comp>`), calling `getOwningComponent` on `<child-comp>`\n * would return `<app-comp>`.\n *\n * @param elementOrDir DOM element, component or directive instance\n * for which to retrieve the root components.\n * @returns Component instance whose view owns the DOM element or null if the element is not\n * part of a component view.\n *\n * @publicApi\n */\nexport function getOwningComponent<T>(elementOrDir: Element | {}): T | null {\n const context = getLContext(elementOrDir)!;\n let lView = context ? context.lView : null;\n if (lView === null) return null;\n\n let parent: LView | null;\n while (lView[TVIEW].type === TViewType.Embedded && (parent = getLViewParent(lView)!)) {\n lView = parent;\n }\n return isRootView(lView) ? null : (lView[CONTEXT] as unknown as T);\n}\n\n/**\n * Retrieves all root components associated with a DOM element, directive or component instance.\n * Root components are those which have been bootstrapped by Angular.\n *\n * @param elementOrDir DOM element, component or directive instance\n * for which to retrieve the root components.\n * @returns Root components associated with the target object.\n *\n * @publicApi\n */\nexport function getRootComponents(elementOrDir: Element | {}): {}[] {\n const lView = readPatchedLView<{}>(elementOrDir);\n return lView !== null ? [getRootContext(lView)] : [];\n}\n\n/**\n * Retrieves an `Injector` associated with an element, component or directive instance.\n *\n * @param elementOrDir DOM element, component or directive instance for which to\n * retrieve the injector.\n * @returns Injector associated with the element, component or directive instance.\n *\n * @publicApi\n */\nexport function getInjector(elementOrDir: Element | {}): Injector {\n const context = getLContext(elementOrDir)!;\n const lView = context ? context.lView : null;\n if (lView === null) return Injector.NULL;\n\n const tNode = lView[TVIEW].data[context.nodeIndex] as TElementNode;\n return new NodeInjector(tNode, lView);\n}\n\n/**\n * Retrieve a set of injection tokens at a given DOM node.\n *\n * @param element Element for which the injection tokens should be retrieved.\n */\nexport function getInjectionTokens(element: Element): any[] {\n const context = getLContext(element)!;\n const lView = context ? context.lView : null;\n if (lView === null) return [];\n const tView = lView[TVIEW];\n const tNode = tView.data[context.nodeIndex] as TNode;\n const providerTokens: any[] = [];\n const startIndex = tNode.providerIndexes & TNodeProviderIndexes.ProvidersStartIndexMask;\n const endIndex = tNode.directiveEnd;\n for (let i = startIndex; i < endIndex; i++) {\n let value = tView.data[i];\n if (isDirectiveDefHack(value)) {\n // The fact that we sometimes store Type and sometimes DirectiveDef in this location is a\n // design flaw. We should always store same type so that we can be monomorphic. The issue\n // is that for Components/Directives we store the def instead the type. The correct behavior\n // is that we should always be storing injectable type in this location.\n value = value.type;\n }\n providerTokens.push(value);\n }\n return providerTokens;\n}\n\n/**\n * Retrieves directive instances associated with a given DOM node. Does not include\n * component instances.\n *\n * @usageNotes\n * Given the following DOM structure:\n *\n * ```html\n * <app-root>\n * <button my-button></button>\n * <my-comp></my-comp>\n * </app-root>\n * ```\n *\n * Calling `getDirectives` on `<button>` will return an array with an instance of the `MyButton`\n * directive that is associated with the DOM node.\n *\n * Calling `getDirectives` on `<my-comp>` will return an empty array.\n *\n * @param node DOM node for which to get the directives.\n * @returns Array of directives associated with the node.\n *\n * @publicApi\n */\nexport function getDirectives(node: Node): {}[] {\n // Skip text nodes because we can't have directives associated with them.\n if (node instanceof Text) {\n return [];\n }\n\n const context = getLContext(node)!;\n const lView = context ? context.lView : null;\n if (lView === null) {\n return [];\n }\n\n const tView = lView[TVIEW];\n const nodeIndex = context.nodeIndex;\n if (!tView?.data[nodeIndex]) {\n return [];\n }\n if (context.directives === undefined) {\n context.directives = getDirectivesAtNodeIndex(nodeIndex, lView);\n }\n\n // The `directives` in this case are a named array called `LComponentView`. Clone the\n // result so we don't expose an internal data structure in the user's console.\n return context.directives === null ? [] : [...context.directives];\n}\n\n/**\n * Partial metadata for a given directive instance.\n * This information might be useful for debugging purposes or tooling.\n * Currently only `inputs` and `outputs` metadata is available.\n *\n * @publicApi\n */\nexport interface DirectiveDebugMetadata {\n inputs: Record<string, string>;\n outputs: Record<string, string>;\n}\n\n/**\n * Partial metadata for a given component instance.\n * This information might be useful for debugging purposes or tooling.\n * Currently the following fields are available:\n * - inputs\n * - outputs\n * - encapsulation\n * - changeDetection\n *\n * @publicApi\n */\nexport interface ComponentDebugMetadata extends DirectiveDebugMetadata {\n encapsulation: ViewEncapsulation;\n changeDetection: ChangeDetectionStrategy;\n}\n\n/**\n * Returns the debug (partial) metadata for a particular directive or component instance.\n * The function accepts an instance of a directive or component and returns the corresponding\n * metadata.\n *\n * @param directiveOrComponentInstance Instance of a directive or component\n * @returns metadata of the passed directive or component\n *\n * @publicApi\n */\nexport function getDirectiveMetadata(\n directiveOrComponentInstance: any,\n): ComponentDebugMetadata | DirectiveDebugMetadata | null {\n const {constructor} = directiveOrComponentInstance;\n if (!constructor) {\n throw new Error('Unable to find the instance constructor');\n }\n // In case a component inherits from a directive, we may have component and directive metadata\n // To ensure we don't get the metadata of the directive, we want to call `getComponentDef` first.\n const componentDef = getComponentDef(constructor);\n if (componentDef) {\n const inputs = extractInputDebugMetadata(componentDef.inputs);\n return {\n inputs,\n outputs: componentDef.outputs,\n encapsulation: componentDef.encapsulation,\n changeDetection: componentDef.onPush\n ? ChangeDetectionStrategy.OnPush\n : ChangeDetectionStrategy.Default,\n };\n }\n const directiveDef = getDirectiveDef(constructor);\n if (directiveDef) {\n const inputs = extractInputDebugMetadata(directiveDef.inputs);\n return {inputs, outputs: directiveDef.outputs};\n }\n return null;\n}\n\n/**\n * Retrieve map of local references.\n *\n * The references are retrieved as a map of local reference name to element or directive instance.\n *\n * @param target DOM element, component or directive instance for which to retrieve\n * the local references.\n */\nexport function getLocalRefs(target: {}): {[key: string]: any} {\n const context = getLContext(target);\n if (context === null) return {};\n\n if (context.localRefs === undefined) {\n const lView = context.lView;\n if (lView === null) {\n return {};\n }\n context.localRefs = discoverLocalRefs(lView, context.nodeIndex);\n }\n\n return context.localRefs || {};\n}\n\n/**\n * Retrieves the host element of a component or directive instance.\n * The host element is the DOM element that matched the selector of the directive.\n *\n * @param componentOrDirective Component or directive instance for which the host\n * element should be retrieved.\n * @returns Host element of the target.\n *\n * @publicApi\n */\nexport function getHostElement(componentOrDirective: {}): Element {\n return getLContext(componentOrDirective)!.native as unknown as Element;\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 */\nexport function getRenderedText(component: any): string {\n const hostElement = getHostElement(component);\n return hostElement.textContent || '';\n}\n\n/**\n * Event listener configuration returned from `getListeners`.\n * @publicApi\n */\nexport interface Listener {\n /** Name of the event listener. */\n name: string;\n /** Element that the listener is bound to. */\n element: Element;\n /** Callback that is invoked when the event is triggered. */\n callback: (value: any) => any;\n /** Whether the listener is using event capturing. */\n useCapture: boolean;\n /**\n * Type of the listener (e.g. a native DOM event or a custom @Output).\n */\n type: 'dom' | 'output';\n}\n\n/**\n * Retrieves a list of event listeners associated with a DOM element. The list does include host\n * listeners, but it does not include event listeners defined outside of the Angular context\n * (e.g. through `addEventListener`).\n *\n * @usageNotes\n * Given the following DOM structure:\n *\n * ```html\n * <app-root>\n * <div (click)=\"doSomething()\"></div>\n * </app-root>\n * ```\n *\n * Calling `getListeners` on `<div>` will return an object that looks as follows:\n *\n * ```ts\n * {\n * name: 'click',\n * element: <div>,\n * callback: () => doSomething(),\n * useCapture: false\n * }\n * ```\n *\n * @param element Element for which the DOM listeners should be retrieved.\n * @returns Array of event listeners on the DOM element.\n *\n * @publicApi\n */\nexport function getListeners(element: Element): Listener[] {\n ngDevMode && assertDomElement(element);\n const lContext = getLContext(element);\n const lView = lContext === null ? null : lContext.lView;\n if (lView === null) return [];\n\n const tView = lView[TVIEW];\n const lCleanup = lView[CLEANUP];\n const tCleanup = tView.cleanup;\n const listeners: Listener[] = [];\n if (tCleanup && lCleanup) {\n for (let i = 0; i < tCleanup.length; ) {\n const firstParam = tCleanup[i++];\n const secondParam = tCleanup[i++];\n if (typeof firstParam === 'string') {\n const name: string = firstParam;\n const listenerElement = unwrapRNode(lView[secondParam]) as any as Element;\n const callback: (value: any) => any = lCleanup[tCleanup[i++]];\n const useCaptureOrIndx = tCleanup[i++];\n // if useCaptureOrIndx is boolean then report it as is.\n // if useCaptureOrIndx is positive number then it in unsubscribe method\n // if useCaptureOrIndx is negative number then it is a Subscription\n const type =\n typeof useCaptureOrIndx === 'boolean' || useCaptureOrIndx >= 0 ? 'dom' : 'output';\n const useCapture = typeof useCaptureOrIndx === 'boolean' ? useCaptureOrIndx : false;\n if (element == listenerElement) {\n listeners.push({element, name, callback, useCapture, type});\n }\n }\n }\n }\n listeners.sort(sortListeners);\n return listeners;\n}\n\nfunction sortListeners(a: Listener, b: Listener) {\n if (a.name == b.name) return 0;\n return a.name < b.name ? -1 : 1;\n}\n\n/**\n * This function should not exist because it is megamorphic and only mostly correct.\n *\n * See call site for more info.\n */\nfunction isDirectiveDefHack(obj: any): obj is DirectiveDef<any> {\n return (\n obj.type !== undefined &&\n obj.declaredInputs !== undefined &&\n obj.findHostDirectiveDefs !== undefined\n );\n}\n\n/**\n * Retrieve the component `LView` from component/element.\n *\n * NOTE: `LView` is a private and should not be leaked outside.\n * Don't export this method to `ng.*` on window.\n *\n * @param target DOM element or component instance for which to retrieve the LView.\n */\nexport function getComponentLView(target: any): LView {\n const lContext = getLContext(target)!;\n const nodeIndx = lContext.nodeIndex;\n const lView = lContext.lView!;\n ngDevMode && assertLView(lView);\n const componentLView = lView[nodeIndx];\n ngDevMode && assertLView(componentLView);\n return componentLView;\n}\n\n/** Asserts that a value is a DOM Element. */\nfunction assertDomElement(value: any) {\n if (typeof Element !== 'undefined' && !(value instanceof Element)) {\n throw new Error('Expecting instance of DOM Element');\n }\n}\n\n/**\n * A directive definition holds additional metadata using bitwise flags to indicate\n * for example whether it is signal based.\n *\n * This information needs to be separate from the `publicName -> minifiedName`\n * mappings for backwards compatibility.\n */\nfunction extractInputDebugMetadata<T>(inputs: DirectiveDef<T>['inputs']) {\n const res: DirectiveDebugMetadata['inputs'] = {};\n\n for (const key in inputs) {\n if (inputs.hasOwnProperty(key)) {\n const value = inputs[key];\n\n if (value !== undefined) {\n res[key] = value[0];\n }\n }\n }\n\n return res;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {RuntimeError, RuntimeErrorCode} from '../../errors';\n\n/**\n * Most of the use of `document` in Angular is from within the DI system so it is possible to simply\n * inject the `DOCUMENT` token and are done.\n *\n * Ivy is special because it does not rely upon the DI and must get hold of the document some other\n * way.\n *\n * The solution is to define `getDocument()` and `setDocument()` top-level functions for ivy.\n * Wherever ivy needs the global document, it calls `getDocument()` instead.\n *\n * When running ivy outside of a browser environment, it is necessary to call `setDocument()` to\n * tell ivy what the global `document` is.\n *\n * Angular does this for us in each of the standard platforms (`Browser` and `Server`)\n * by calling `setDocument()` when providing the `DOCUMENT` token.\n */\nlet DOCUMENT: Document | undefined = undefined;\n\n/**\n * Tell ivy what the `document` is for this platform.\n *\n * It is only necessary to call this if the current platform is not a browser.\n *\n * @param document The object representing the global `document` in this environment.\n */\nexport function setDocument(document: Document | undefined): void {\n DOCUMENT = document;\n}\n\n/**\n * Access the object that represents the `document` for this platform.\n *\n * Ivy calls this whenever it needs to access the `document` object.\n * For example to create the renderer or to do sanitization.\n */\nexport function getDocument(): Document {\n if (DOCUMENT !== undefined) {\n return DOCUMENT;\n } else if (typeof document !== 'undefined') {\n return document;\n }\n\n throw new RuntimeError(\n RuntimeErrorCode.MISSING_DOCUMENT,\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n `The document object is not available in this context. Make sure the DOCUMENT injection token is provided.`,\n );\n\n // No \"document\" can be found. This should only happen if we are running ivy outside Angular and\n // the current platform is not a browser. Since this is not a supported scenario at the moment\n // this should not happen in Angular apps.\n // Once we support running ivy outside of Angular we will need to publish `setDocument()` as a\n // public API.\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {InjectionToken} from '../di/injection_token';\nimport {getDocument} from '../render3/interfaces/document';\n\n/**\n * A DI token representing a string ID, used\n * primarily for prefixing application attributes and CSS styles when\n * {@link ViewEncapsulation#Emulated} is being used.\n *\n * The token is needed in cases when multiple applications are bootstrapped on a page\n * (for example, using `bootstrapApplication` calls). In this case, ensure that those applications\n * have different `APP_ID` value setup. For example:\n *\n * ```ts\n * bootstrapApplication(ComponentA, {\n * providers: [\n * { provide: APP_ID, useValue: 'app-a' },\n * // ... other providers ...\n * ]\n * });\n *\n * bootstrapApplication(ComponentB, {\n * providers: [\n * { provide: APP_ID, useValue: 'app-b' },\n * // ... other providers ...\n * ]\n * });\n * ```\n *\n * By default, when there is only one application bootstrapped, you don't need to provide the\n * `APP_ID` token (the `ng` will be used as an app ID).\n *\n * @publicApi\n */\nexport const APP_ID = new InjectionToken<string>(ngDevMode ? 'AppId' : '', {\n providedIn: 'root',\n factory: () => DEFAULT_APP_ID,\n});\n\n/** Default value of the `APP_ID` token. */\nconst DEFAULT_APP_ID = 'ng';\n\n/**\n * A function that is executed when a platform is initialized.\n *\n * @deprecated from v19.0.0, use providePlatformInitializer instead\n *\n * @see {@link providePlatformInitializer}\n *\n * @publicApi\n */\nexport const PLATFORM_INITIALIZER = new InjectionToken<ReadonlyArray<() => void>>(\n ngDevMode ? 'Platform Initializer' : '',\n);\n\n/**\n * A token that indicates an opaque platform ID.\n * @publicApi\n */\nexport const PLATFORM_ID = new InjectionToken<Object>(ngDevMode ? 'Platform ID' : '', {\n providedIn: 'platform',\n factory: () => 'unknown', // set a default platform name, when none set explicitly\n});\n\n/**\n * A DI token that indicates the root directory of\n * the application\n * @publicApi\n * @deprecated\n */\nexport const PACKAGE_ROOT_URL = new InjectionToken<string>(\n ngDevMode ? 'Application Packages Root URL' : '',\n);\n\n// We keep this token here, rather than the animations package, so that modules that only care\n// about which animations module is loaded (e.g. the CDK) can retrieve it without having to\n// include extra dependencies. See #44970 for more context.\n\n/**\n * A [DI token](api/core/InjectionToken) that indicates which animations\n * module has been loaded.\n * @publicApi\n */\nexport const ANIMATION_MODULE_TYPE = new InjectionToken<'NoopAnimations' | 'BrowserAnimations'>(\n ngDevMode ? 'AnimationModuleType' : '',\n);\n\n// TODO(crisbeto): link to CSP guide here.\n/**\n * Token used to configure the [Content Security Policy](https://web.dev/strict-csp/) nonce that\n * Angular will apply when inserting inline styles. If not provided, Angular will look up its value\n * from the `ngCspNonce` attribute of the application root node.\n *\n * @publicApi\n */\nexport const CSP_NONCE = new InjectionToken<string | null>(ngDevMode ? 'CSP nonce' : '', {\n providedIn: 'root',\n factory: () => {\n // Ideally we wouldn't have to use `querySelector` here since we know that the nonce will be on\n // the root node, but because the token value is used in renderers, it has to be available\n // *very* early in the bootstrapping process. This should be a fairly shallow search, because\n // the app won't have been added to the DOM yet. Some approaches that were considered:\n // 1. Find the root node through `ApplicationRef.components[i].location` - normally this would\n // be enough for our purposes, but the token is injected very early so the `components` array\n // isn't populated yet.\n // 2. Find the root `LView` through the current `LView` - renderers are a prerequisite to\n // creating the `LView`. This means that no `LView` will have been entered when this factory is\n // invoked for the root component.\n // 3. Have the token factory return `() => string` which is invoked when a nonce is requested -\n // the slightly later execution does allow us to get an `LView` reference, but the fact that\n // it is a function means that it could be executed at *any* time (including immediately) which\n // may lead to weird bugs.\n // 4. Have the `ComponentFactory` read the attribute and provide it to the injector under the\n // hood - has the same problem as #1 and #2 in that the renderer is used to query for the root\n // node and the nonce value needs to be available when the renderer is created.\n return getDocument().body?.querySelector('[ngCspNonce]')?.getAttribute('ngCspNonce') || null;\n },\n});\n\n/**\n * A configuration object for the image-related options. Contains:\n * - breakpoints: An array of integer breakpoints used to generate\n * srcsets for responsive images.\n * - disableImageSizeWarning: A boolean value. Setting this to true will\n * disable console warnings about oversized images.\n * - disableImageLazyLoadWarning: A boolean value. Setting this to true will\n * disable console warnings about LCP images configured with `loading=\"lazy\"`.\n * Learn more about the responsive image configuration in [the NgOptimizedImage\n * guide](guide/image-optimization).\n * Learn more about image warning options in [the related error page](errors/NG0913).\n * @publicApi\n */\nexport type ImageConfig = {\n breakpoints?: number[];\n placeholderResolution?: number;\n disableImageSizeWarning?: boolean;\n disableImageLazyLoadWarning?: boolean;\n};\n\nexport const IMAGE_CONFIG_DEFAULTS: ImageConfig = {\n breakpoints: [16, 32, 48, 64, 96, 128, 256, 384, 640, 750, 828, 1080, 1200, 1920, 2048, 3840],\n placeholderResolution: 30,\n disableImageSizeWarning: false,\n disableImageLazyLoadWarning: false,\n};\n\n/**\n * Injection token that configures the image optimized image functionality.\n * See {@link ImageConfig} for additional information about parameters that\n * can be used.\n *\n * @see {@link NgOptimizedImage}\n * @see {@link ImageConfig}\n * @publicApi\n */\nexport const IMAGE_CONFIG = new InjectionToken<ImageConfig>(ngDevMode ? 'ImageConfig' : '', {\n providedIn: 'root',\n factory: () => IMAGE_CONFIG_DEFAULTS,\n});\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {APP_ID} from './application/application_tokens';\nimport {inject} from './di/injector_compatibility';\nimport {ɵɵdefineInjectable} from './di/interface/defs';\nimport {getDocument} from './render3/interfaces/document';\n\n/**\n * A type-safe key to use with `TransferState`.\n *\n * Example:\n *\n * ```ts\n * const COUNTER_KEY = makeStateKey<number>('counter');\n * let value = 10;\n *\n * transferState.set(COUNTER_KEY, value);\n * ```\n *\n * @publicApi\n */\nexport type StateKey<T> = string & {\n __not_a_string: never;\n __value_type?: T;\n};\n\n/**\n * Create a `StateKey<T>` that can be used to store value of type T with `TransferState`.\n *\n * Example:\n *\n * ```ts\n * const COUNTER_KEY = makeStateKey<number>('counter');\n * let value = 10;\n *\n * transferState.set(COUNTER_KEY, value);\n * ```\n *\n * @publicApi\n */\nexport function makeStateKey<T = void>(key: string): StateKey<T> {\n return key as StateKey<T>;\n}\n\nfunction initTransferState(): TransferState {\n const transferState = new TransferState();\n if (typeof ngServerMode === 'undefined' || !ngServerMode) {\n transferState.store = retrieveTransferredState(getDocument(), inject(APP_ID));\n }\n\n return transferState;\n}\n\n/**\n * A key value store that is transferred from the application on the server side to the application\n * on the client side.\n *\n * The `TransferState` is available as an injectable token.\n * On the client, just inject this token using DI and use it, it will be lazily initialized.\n * On the server it's already included if `renderApplication` function is used. Otherwise, import\n * the `ServerTransferStateModule` module to make the `TransferState` available.\n *\n * The values in the store are serialized/deserialized using JSON.stringify/JSON.parse. So only\n * boolean, number, string, null and non-class objects will be serialized and deserialized in a\n * non-lossy manner.\n *\n * @publicApi\n */\nexport class TransferState {\n /** @nocollapse */\n static ɵprov = /** @pureOrBreakMyCode */ /* @__PURE__ */ ɵɵdefineInjectable({\n token: TransferState,\n providedIn: 'root',\n factory: initTransferState,\n });\n\n /** @internal */\n store: Record<string, unknown | undefined> = {};\n\n private onSerializeCallbacks: {[k: string]: () => unknown | undefined} = {};\n\n /**\n * Get the value corresponding to a key. Return `defaultValue` if key is not found.\n */\n get<T>(key: StateKey<T>, defaultValue: T): T {\n return this.store[key] !== undefined ? (this.store[key] as T) : defaultValue;\n }\n\n /**\n * Set the value corresponding to a key.\n */\n set<T>(key: StateKey<T>, value: T): void {\n this.store[key] = value;\n }\n\n /**\n * Remove a key from the store.\n */\n remove<T>(key: StateKey<T>): void {\n delete this.store[key];\n }\n\n /**\n * Test whether a key exists in the store.\n */\n hasKey<T>(key: StateKey<T>): boolean {\n return this.store.hasOwnProperty(key);\n }\n\n /**\n * Indicates whether the state is empty.\n */\n get isEmpty(): boolean {\n return Object.keys(this.store).length === 0;\n }\n\n /**\n * Register a callback to provide the value for a key when `toJson` is called.\n */\n onSerialize<T>(key: StateKey<T>, callback: () => T): void {\n this.onSerializeCallbacks[key] = callback;\n }\n\n /**\n * Serialize the current state of the store to JSON.\n */\n toJson(): string {\n // Call the onSerialize callbacks and put those values into the store.\n for (const key in this.onSerializeCallbacks) {\n if (this.onSerializeCallbacks.hasOwnProperty(key)) {\n try {\n this.store[key] = this.onSerializeCallbacks[key]();\n } catch (e) {\n console.warn('Exception in onSerialize callback: ', e);\n }\n }\n }\n\n // Escape script tag to avoid break out of <script> tag in serialized output.\n // Encoding of `<` is the same behaviour as G3 script_builders.\n return JSON.stringify(this.store).replace(/</g, '\\\\u003C');\n }\n}\n\nfunction retrieveTransferredState(\n doc: Document,\n appId: string,\n): Record<string, unknown | undefined> {\n // Locate the script tag with the JSON data transferred from the server.\n // The id of the script tag is set to the Angular appId + 'state'.\n const script = doc.getElementById(appId + '-state');\n if (script?.textContent) {\n try {\n // Avoid using any here as it triggers lint errors in google3 (any is not allowed).\n // Decoding of `<` is done of the box by browsers and node.js, same behaviour as G3\n // script_builders.\n return JSON.parse(script.textContent) as {};\n } catch (e) {\n console.warn('Exception while restoring TransferState for app ' + appId, e);\n }\n }\n\n return {};\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport type {DeferBlockTrigger} from '../defer/interfaces';\nimport type {I18nICUNode} from '../render3/interfaces/i18n';\nimport {RNode} from '../render3/interfaces/renderer_dom';\n\n/** Encodes that the node lookup should start from the host node of this component. */\nexport const REFERENCE_NODE_HOST = 'h';\n\n/** Encodes that the node lookup should start from the document body node. */\nexport const REFERENCE_NODE_BODY = 'b';\n\n/**\n * Describes navigation steps that the runtime logic need to perform,\n * starting from a given (known) element.\n * We're not using enum `NodeNavigationStep` because it produces more code overhead;\n * thus, using plain `const` eliminates extra bytes. We can't use `const enum` due\n * to single-file compilation restrictions.\n */\n\nexport type NodeNavigationStep = 'f' | 'n';\n\nexport const NODE_NAVIGATION_STEP_FIRST_CHILD = 'f';\nexport const NODE_NAVIGATION_STEP_NEXT_SIBLING = 'n';\n\n/**\n * Keys within serialized view data structure to represent various\n * parts. See the `SerializedView` interface below for additional information.\n */\nexport const ELEMENT_CONTAINERS = 'e';\nexport const TEMPLATES = 't';\nexport const CONTAINERS = 'c';\nexport const MULTIPLIER = 'x';\nexport const NUM_ROOT_NODES = 'r';\nexport const TEMPLATE_ID = 'i'; // as it's also an \"id\"\nexport const NODES = 'n';\nexport const DISCONNECTED_NODES = 'd';\nexport const I18N_DATA = 'l';\nexport const DEFER_BLOCK_ID = 'di';\nexport const DEFER_BLOCK_STATE = 's';\nexport const DEFER_PARENT_BLOCK_ID = 'p';\nexport const DEFER_HYDRATE_TRIGGERS = 't';\nexport const DEFER_PREFETCH_TRIGGERS = 'pt';\n\n/**\n * Represents element containers within this view, stored as key-value pairs\n * where key is an index of a container in an LView (also used in the\n * `elementContainerStart` instruction), the value is the number of root nodes\n * in this container. This information is needed to locate an anchor comment\n * node that goes after all container nodes.\n */\nexport interface SerializedElementContainers {\n [key: number]: number;\n}\n\n/**\n * Serialized data structure that contains relevant hydration\n * annotation information that describes a given hydration boundary\n * (e.g. a component).\n */\nexport interface SerializedView {\n /**\n * Serialized information about <ng-container>s.\n */\n [ELEMENT_CONTAINERS]?: SerializedElementContainers;\n\n /**\n * Serialized information about templates.\n * Key-value pairs where a key is an index of the corresponding\n * `template` instruction and the value is a unique id that can\n * be used during hydration to identify that template.\n */\n [TEMPLATES]?: Record<number, string>;\n\n /**\n * Serialized information about view containers.\n * Key-value pairs where a key is an index of the corresponding\n * LContainer entry within an LView, and the value is a list\n * of serialized information about views within this container.\n */\n [CONTAINERS]?: Record<number, SerializedContainerView[]>;\n\n /**\n * Serialized information about nodes in a template.\n * Key-value pairs where a key is an index of the corresponding\n * DOM node in an LView and the value is a path that describes\n * the location of this node (as a set of navigation instructions).\n */\n [NODES]?: Record<number, string>;\n\n /**\n * A list of ids which represents a set of nodes disconnected\n * from the DOM tree at the serialization time, but otherwise\n * present in the internal data structures.\n *\n * This information is used to avoid triggering the hydration\n * logic for such nodes and instead use a regular \"creation mode\".\n */\n [DISCONNECTED_NODES]?: number[];\n\n /**\n * Serialized information about i18n blocks in a template.\n * Key-value pairs where a key is an index of the corresponding\n * i18n entry within an LView, and the value is a list of\n * active ICU cases.\n */\n [I18N_DATA]?: Record<number, number[]>;\n\n /**\n * If this view represents a `@defer` block, this field contains\n * unique id of the block.\n */\n [DEFER_BLOCK_ID]?: string;\n\n /**\n * This field represents a status, based on the `DeferBlockState` enum.\n */\n [DEFER_BLOCK_STATE]?: number;\n}\n\n/**\n * Serialized data structure that contains relevant hydration\n * annotation information about a view that is a part of a\n * ViewContainer collection.\n */\nexport interface SerializedContainerView extends SerializedView {\n /**\n * Unique id that represents a TView that was used to create\n * a given instance of a view:\n * - TViewType.Embedded: a unique id generated during serialization on the server\n * - TViewType.Component: an id generated based on component properties\n * (see `getComponentId` function for details)\n */\n [TEMPLATE_ID]: string;\n\n /**\n * Number of root nodes that belong to this view.\n * This information is needed to effectively traverse the DOM tree\n * and identify segments that belong to different views.\n */\n [NUM_ROOT_NODES]: number;\n\n /**\n * Number of times this view is repeated.\n * This is used to avoid serializing and sending the same hydration\n * information about similar views (for example, produced by *ngFor).\n */\n [MULTIPLIER]?: number;\n}\n\n/**\n * Serialized data structure that contains relevant defer block\n * information that describes a given incremental hydration boundary\n */\nexport interface SerializedDeferBlock {\n /**\n * This contains the unique id of this defer block's parent, if it exists.\n */\n [DEFER_PARENT_BLOCK_ID]?: string;\n\n /**\n * This field represents a status, based on the `DeferBlockState` enum.\n */\n [DEFER_BLOCK_STATE]?: number;\n\n /**\n * Number of root nodes that belong to this defer block's template.\n * This information is needed to effectively traverse the DOM tree\n * and add jsaction attributes to root nodes appropriately for\n * incremental hydration.\n */\n [NUM_ROOT_NODES]: number;\n\n /**\n * The list of triggers that exist for incremental hydration, based on the\n * `Trigger` enum.\n */\n [DEFER_HYDRATE_TRIGGERS]?: (DeferBlockTrigger | SerializedTriggerDetails)[];\n}\n\nexport interface SerializedTriggerDetails {\n trigger: DeferBlockTrigger;\n delay?: number;\n}\n\n/**\n * An object that contains hydration-related information serialized\n * on the server, as well as the necessary references to segments of\n * the DOM, to facilitate the hydration process for a given hydration\n * boundary on the client.\n */\nexport interface DehydratedView {\n /**\n * The readonly hydration annotation data.\n */\n data: Readonly<SerializedView>;\n\n /**\n * A reference to the first child in a DOM segment associated\n * with a given hydration boundary.\n *\n * Once a view becomes hydrated, the value is set to `null`, which\n * indicates that further detaching/attaching view actions should result\n * in invoking corresponding DOM actions (attaching DOM nodes action is\n * skipped when we hydrate, since nodes are already in the DOM).\n */\n firstChild: RNode | null;\n\n /**\n * Stores references to first nodes in DOM segments that\n * represent either an <ng-container> or a view container.\n */\n segmentHeads?: {[index: number]: RNode | null};\n\n /**\n * An instance of a Set that represents nodes disconnected from\n * the DOM tree at the serialization time, but otherwise present\n * in the internal data structures.\n *\n * The Set is based on the `SerializedView[DISCONNECTED_NODES]` data\n * and is needed to have constant-time lookups.\n *\n * If the value is `null`, it means that there were no disconnected\n * nodes detected in this view at serialization time.\n */\n disconnectedNodes?: Set<number> | null;\n\n /**\n * A mapping from a view to the first child to begin claiming nodes.\n *\n * This mapping is generated by an i18n block, and is the source of\n * truth for the nodes inside of it.\n */\n i18nNodes?: Map<number, RNode | null>;\n\n /**\n * A mapping from the index of an ICU node to dehydrated data for it.\n *\n * This information is used during the hydration process on the client.\n * ICU cases that were active during server-side rendering will be added\n * to the map. The hydration logic will \"claim\" matching cases, removing\n * them from the map. The remaining entries are \"unclaimed\", and will be\n * removed from the DOM during hydration cleanup.\n */\n dehydratedIcuData?: Map<number, DehydratedIcuData>;\n}\n\n/**\n * An object that contains hydration-related information serialized\n * on the server, as well as the necessary references to segments of\n * the DOM, to facilitate the hydration process for a given view\n * inside a view container (either an embedded view or a view created\n * for a component).\n */\nexport interface DehydratedContainerView extends DehydratedView {\n data: Readonly<SerializedContainerView>;\n}\n\n/**\n * An object that contains information about a dehydrated ICU case,\n * to facilitate cleaning up ICU cases that were active during\n * server-side rendering, but not during hydration.\n */\nexport interface DehydratedIcuData {\n /**\n * The case index that this data represents.\n */\n case: number;\n\n /**\n * A reference back to the AST for the ICU node. This allows the\n * AST to be used to clean up dehydrated nodes.\n */\n node: I18nICUNode;\n}\n\n/**\n * Summarizes the presence of specific types of triggers anywhere in the DOM\n */\nexport interface BlockSummary {\n data: SerializedDeferBlock;\n hydrate: {idle: boolean; immediate: boolean; viewport: boolean; timer: number | null};\n}\n\n/**\n * The details of a specific element's trigger and how it is associated to a block\n */\nexport interface ElementTrigger {\n el: HTMLElement;\n blockName: string;\n delay?: number;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {InjectionToken} from '../di/injection_token';\n\n/**\n * Internal token that specifies whether DOM reuse logic\n * during hydration is enabled.\n */\nexport const IS_HYDRATION_DOM_REUSE_ENABLED = new InjectionToken<boolean>(\n typeof ngDevMode === 'undefined' || !!ngDevMode ? 'IS_HYDRATION_DOM_REUSE_ENABLED' : '',\n);\n\n// By default (in client rendering mode), we remove all the contents\n// of the host element and render an application after that.\nexport const PRESERVE_HOST_CONTENT_DEFAULT = false;\n\n/**\n * Internal token that indicates whether host element content should be\n * retained during the bootstrap.\n */\nexport const PRESERVE_HOST_CONTENT = new InjectionToken<boolean>(\n typeof ngDevMode === 'undefined' || !!ngDevMode ? 'PRESERVE_HOST_CONTENT' : '',\n {\n providedIn: 'root',\n factory: () => PRESERVE_HOST_CONTENT_DEFAULT,\n },\n);\n\n/**\n * Internal token that indicates whether hydration support for i18n\n * is enabled.\n */\nexport const IS_I18N_HYDRATION_ENABLED = new InjectionToken<boolean>(\n typeof ngDevMode === 'undefined' || !!ngDevMode ? 'IS_I18N_HYDRATION_ENABLED' : '',\n);\n\n/**\n * Internal token that indicates whether event replay support for SSR\n * is enabled.\n */\nexport const IS_EVENT_REPLAY_ENABLED = new InjectionToken<boolean>(\n typeof ngDevMode === 'undefined' || !!ngDevMode ? 'IS_EVENT_REPLAY_ENABLED' : '',\n);\n\nexport const EVENT_REPLAY_ENABLED_DEFAULT = false;\n\n/**\n * Internal token that indicates whether incremental hydration support\n * is enabled.\n */\nexport const IS_INCREMENTAL_HYDRATION_ENABLED = new InjectionToken<boolean>(\n typeof ngDevMode === 'undefined' || !!ngDevMode ? 'IS_INCREMENTAL_HYDRATION_ENABLED' : '',\n);\n\n/**\n * A map of DOM elements with `jsaction` attributes grouped by action names.\n */\nexport const JSACTION_BLOCK_ELEMENT_MAP = new InjectionToken<Map<string, Set<Element>>>(\n ngDevMode ? 'JSACTION_BLOCK_ELEMENT_MAP' : '',\n {\n providedIn: 'root',\n factory: () => new Map<string, Set<Element>>(),\n },\n);\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {InjectionToken} from '../di/injection_token';\n\n/** Actions that are supported by the tracing framework. */\nexport enum TracingAction {\n CHANGE_DETECTION,\n AFTER_NEXT_RENDER,\n}\n\n/** A single tracing snapshot. */\nexport interface TracingSnapshot {\n run<T>(action: TracingAction, fn: () => T): T;\n\n /** Disposes of the tracing snapshot. Must be run exactly once per TracingSnapshot. */\n dispose(): void;\n}\n\n/**\n * Injection token for a `TracingService`, optionally provided.\n */\nexport const TracingService = new InjectionToken<TracingService<TracingSnapshot>>(\n ngDevMode ? 'TracingService' : '',\n);\n\n/**\n * Tracing mechanism which can associate causes (snapshots) with runs of\n * subsequent operations.\n *\n * Not defined by Angular directly, but defined in contexts where tracing is\n * desired.\n */\nexport interface TracingService<T extends TracingSnapshot> {\n /**\n * Take a snapshot of the current context which will be stored by Angular and\n * used when additional work is performed that was scheduled in this context.\n *\n * @param linkedSnapshot Optional snapshot to use link to the current context.\n * The caller is no longer responsible for calling dispose on the linkedSnapshot.\n *\n * @return The tracing snapshot. The caller is responsible for diposing of the\n * snapshot.\n */\n snapshot(linkedSnapshot: T | null): T;\n\n /**\n * Wrap an event listener bound by the framework for tracing.\n * @param element Element on which the event is bound.\n * @param eventName Name of the event.\n * @param handler Event handler.\n * @return A new event handler to be bound instead of the original one.\n */\n wrapEventListener?<T extends Function>(element: HTMLElement, eventName: string, handler: T): T;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nconst markedFeatures = new Set<string>();\n\n// tslint:disable:ban\n/**\n * A guarded `performance.mark` for feature marking.\n *\n * This method exists because while all supported browser and node.js version supported by Angular\n * support performance.mark API. This is not the case for other environments such as JSDOM and\n * Cloudflare workers.\n */\nexport function performanceMarkFeature(feature: string): void {\n if (markedFeatures.has(feature)) {\n return;\n }\n markedFeatures.add(feature);\n performance?.mark?.('mark_feature_usage', {detail: {feature}});\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {getActiveConsumer} from '../../../primitives/signals';\n\nimport {RuntimeError, RuntimeErrorCode} from '../../errors';\n\n/**\n * Asserts that the current stack frame is not within a reactive context. Useful\n * to disallow certain code from running inside a reactive context (see {@link /api/core/rxjs/toSignal toSignal})\n *\n * @param debugFn a reference to the function making the assertion (used for the error message).\n *\n * @publicApi\n */\nexport function assertNotInReactiveContext(debugFn: Function, extraContext?: string): void {\n // Taking a `Function` instead of a string name here prevents the un-minified name of the function\n // from being retained in the bundle regardless of minification.\n if (getActiveConsumer() !== null) {\n throw new RuntimeError(\n RuntimeErrorCode.ASSERTION_NOT_INSIDE_REACTIVE_CONTEXT,\n ngDevMode &&\n `${debugFn.name}() cannot be called from within a reactive context.${\n extraContext ? ` ${extraContext}` : ''\n }`,\n );\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport type {TNode} from './interfaces/node';\nimport type {LView} from './interfaces/view';\nimport {getCurrentTNode, getLView} from './state';\n\nexport class ViewContext {\n constructor(\n readonly view: LView,\n readonly node: TNode,\n ) {}\n\n /**\n * @internal\n * @nocollapse\n */\n static __NG_ELEMENT_ID__ = injectViewContext;\n}\n\nexport function injectViewContext(): ViewContext {\n return new ViewContext(getLView()!, getCurrentTNode()!);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/**\n * The phase to run an `afterRender` or `afterNextRender` callback in.\n *\n * Callbacks in the same phase run in the order they are registered. Phases run in the\n * following order after each render:\n *\n * 1. `AfterRenderPhase.EarlyRead`\n * 2. `AfterRenderPhase.Write`\n * 3. `AfterRenderPhase.MixedReadWrite`\n * 4. `AfterRenderPhase.Read`\n *\n * Angular is unable to verify or enforce that phases are used correctly, and instead\n * relies on each developer to follow the guidelines documented for each value and\n * carefully choose the appropriate one, refactoring their code if necessary. By doing\n * so, Angular is better able to minimize the performance degradation associated with\n * manual DOM access, ensuring the best experience for the end users of your application\n * or library.\n *\n * @deprecated Specify the phase for your callback to run in by passing a spec-object as the first\n * parameter to `afterRender` or `afterNextRender` instead of a function.\n */\nexport enum AfterRenderPhase {\n /**\n * Use `AfterRenderPhase.EarlyRead` for callbacks that only need to **read** from the\n * DOM before a subsequent `AfterRenderPhase.Write` callback, for example to perform\n * custom layout that the browser doesn't natively support. Prefer the\n * `AfterRenderPhase.Read` phase if reading can wait until after the write phase.\n * **Never** write to the DOM in this phase.\n *\n * <div class=\"docs-alert docs-alert-important\">\n *\n * Using this value can degrade performance.\n * Instead, prefer using built-in browser functionality when possible.\n *\n * </div>\n */\n EarlyRead,\n\n /**\n * Use `AfterRenderPhase.Write` for callbacks that only **write** to the DOM. **Never**\n * read from the DOM in this phase.\n */\n Write,\n\n /**\n * Use `AfterRenderPhase.MixedReadWrite` for callbacks that read from or write to the\n * DOM, that haven't been refactored to use a different phase. **Never** use this phase if\n * it is possible to divide the work among the other phases instead.\n *\n * <div class=\"docs-alert docs-alert-critical\">\n *\n * Using this value can **significantly** degrade performance.\n * Instead, prefer dividing work into the appropriate phase callbacks.\n *\n * </div>\n */\n MixedReadWrite,\n\n /**\n * Use `AfterRenderPhase.Read` for callbacks that only **read** from the DOM. **Never**\n * write to the DOM in this phase.\n */\n Read,\n}\n\n/**\n * A callback that runs after render.\n *\n * @developerPreview\n */\nexport interface AfterRenderRef {\n /**\n * Shut down the callback, preventing it from being called again.\n */\n destroy(): void;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {TracingAction, TracingService, TracingSnapshot} from '../../application/tracing';\nimport {\n ChangeDetectionScheduler,\n NotificationSource,\n} from '../../change_detection/scheduling/zoneless_scheduling';\nimport {inject} from '../../di/injector_compatibility';\nimport {ɵɵdefineInjectable} from '../../di/interface/defs';\nimport {ErrorHandler} from '../../error_handler';\nimport {type DestroyRef} from '../../linker/destroy_ref';\nimport {NgZone} from '../../zone';\nimport {AFTER_RENDER_SEQUENCES_TO_ADD, FLAGS, LView, LViewFlags} from '../interfaces/view';\nimport {profiler} from '../profiler';\nimport {ProfilerEvent} from '../profiler_types';\nimport {markAncestorsForTraversal} from '../util/view_utils';\nimport {AfterRenderPhase, AfterRenderRef} from './api';\n\nexport class AfterRenderManager {\n impl: AfterRenderImpl | null = null;\n\n execute(): void {\n this.impl?.execute();\n }\n\n /** @nocollapse */\n static ɵprov = /** @pureOrBreakMyCode */ /* @__PURE__ */ ɵɵdefineInjectable({\n token: AfterRenderManager,\n providedIn: 'root',\n factory: () => new AfterRenderManager(),\n });\n}\n\nexport const AFTER_RENDER_PHASES: AfterRenderPhase[] = /* @__PURE__ **/ (() =>\n [\n AfterRenderPhase.EarlyRead,\n AfterRenderPhase.Write,\n AfterRenderPhase.MixedReadWrite,\n AfterRenderPhase.Read,\n ] as const)();\n\nexport class AfterRenderImpl {\n private readonly ngZone = inject(NgZone);\n private readonly scheduler = inject(ChangeDetectionScheduler);\n private readonly errorHandler = inject(ErrorHandler, {optional: true});\n\n /** Current set of active sequences. */\n private readonly sequences = new Set<AfterRenderSequence>();\n\n /** Tracks registrations made during the current set of executions. */\n private readonly deferredRegistrations = new Set<AfterRenderSequence>();\n\n /** Whether the `AfterRenderManager` is currently executing hooks. */\n executing = false;\n\n constructor() {\n // Inject the tracing service to make sure it's initialized.\n inject(TracingService, {optional: true});\n }\n\n /**\n * Run the sequence of phases of hooks, once through. As a result of executing some hooks, more\n * might be scheduled.\n */\n execute(): void {\n const hasSequencesToExecute = this.sequences.size > 0;\n\n if (hasSequencesToExecute) {\n profiler(ProfilerEvent.AfterRenderHooksStart);\n }\n\n this.executing = true;\n for (const phase of AFTER_RENDER_PHASES) {\n for (const sequence of this.sequences) {\n if (sequence.erroredOrDestroyed || !sequence.hooks[phase]) {\n continue;\n }\n\n try {\n sequence.pipelinedValue = this.ngZone.runOutsideAngular(() =>\n this.maybeTrace(() => {\n const hookFn = sequence.hooks[phase]!;\n const value = hookFn(sequence.pipelinedValue);\n return value;\n }, sequence.snapshot),\n );\n } catch (err) {\n sequence.erroredOrDestroyed = true;\n this.errorHandler?.handleError(err);\n }\n }\n }\n this.executing = false;\n\n // Cleanup step to reset sequence state and also collect one-shot sequences for removal.\n for (const sequence of this.sequences) {\n sequence.afterRun();\n if (sequence.once) {\n this.sequences.delete(sequence);\n // Destroy the sequence so its on destroy callbacks can be cleaned up\n // immediately, instead of waiting until the injector is destroyed.\n sequence.destroy();\n }\n }\n\n for (const sequence of this.deferredRegistrations) {\n this.sequences.add(sequence);\n }\n if (this.deferredRegistrations.size > 0) {\n this.scheduler.notify(NotificationSource.RenderHook);\n }\n this.deferredRegistrations.clear();\n\n if (hasSequencesToExecute) {\n profiler(ProfilerEvent.AfterRenderHooksEnd);\n }\n }\n\n register(sequence: AfterRenderSequence): void {\n const {view} = sequence;\n if (view !== undefined) {\n // Delay adding it to the manager, add it to the view instead.\n (view[AFTER_RENDER_SEQUENCES_TO_ADD] ??= []).push(sequence);\n\n // Mark the view for traversal to ensure we eventually schedule the afterNextRender.\n markAncestorsForTraversal(view);\n view[FLAGS] |= LViewFlags.HasChildViewsToRefresh;\n } else if (!this.executing) {\n this.addSequence(sequence);\n } else {\n this.deferredRegistrations.add(sequence);\n }\n }\n\n addSequence(sequence: AfterRenderSequence): void {\n this.sequences.add(sequence);\n // Trigger an `ApplicationRef.tick()` if one is not already pending/running, because we have a\n // new render hook that needs to run.\n this.scheduler.notify(NotificationSource.RenderHook);\n }\n\n unregister(sequence: AfterRenderSequence): void {\n if (this.executing && this.sequences.has(sequence)) {\n // We can't remove an `AfterRenderSequence` in the middle of iteration.\n // Instead, mark it as destroyed so it doesn't run any more, and mark it as one-shot so it'll\n // be removed at the end of the current execution.\n sequence.erroredOrDestroyed = true;\n sequence.pipelinedValue = undefined;\n sequence.once = true;\n } else {\n // It's safe to directly remove this sequence.\n this.sequences.delete(sequence);\n this.deferredRegistrations.delete(sequence);\n }\n }\n\n protected maybeTrace<T>(fn: () => T, snapshot: TracingSnapshot | null): T {\n // Only trace the execution if the snapshot is defined.\n return snapshot ? snapshot.run(TracingAction.AFTER_NEXT_RENDER, fn) : fn();\n }\n\n /** @nocollapse */\n static ɵprov = /** @pureOrBreakMyCode */ /* @__PURE__ */ ɵɵdefineInjectable({\n token: AfterRenderImpl,\n providedIn: 'root',\n factory: () => new AfterRenderImpl(),\n });\n}\n\nexport type AfterRenderHook = (value?: unknown) => unknown;\nexport type AfterRenderHooks = [\n /* EarlyRead */ AfterRenderHook | undefined,\n /* Write */ AfterRenderHook | undefined,\n /* MixedReadWrite */ AfterRenderHook | undefined,\n /* Read */ AfterRenderHook | undefined,\n];\n\nexport class AfterRenderSequence implements AfterRenderRef {\n /**\n * Whether this sequence errored or was destroyed during this execution, and hooks should no\n * longer run for it.\n */\n erroredOrDestroyed: boolean = false;\n\n /**\n * The value returned by the last hook execution (if any), ready to be pipelined into the next\n * one.\n */\n pipelinedValue: unknown = undefined;\n\n private unregisterOnDestroy: (() => void) | undefined;\n\n constructor(\n readonly impl: AfterRenderImpl,\n readonly hooks: AfterRenderHooks,\n readonly view: LView | undefined,\n public once: boolean,\n destroyRef: DestroyRef | null,\n public snapshot: TracingSnapshot | null = null,\n ) {\n this.unregisterOnDestroy = destroyRef?.onDestroy(() => this.destroy());\n }\n\n afterRun(): void {\n this.erroredOrDestroyed = false;\n this.pipelinedValue = undefined;\n\n // Clear the tracing snapshot after the initial run. This snapshot only\n // associates the initial run of the hook with the context that created it.\n // Follow-up runs are independent of that initial context and have different\n // triggers.\n this.snapshot?.dispose();\n this.snapshot = null;\n }\n\n destroy(): void {\n this.impl.unregister(this);\n this.unregisterOnDestroy?.();\n const scheduled = this.view?.[AFTER_RENDER_SEQUENCES_TO_ADD];\n if (scheduled) {\n this.view[AFTER_RENDER_SEQUENCES_TO_ADD] = scheduled.filter((s) => s !== this);\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {TracingService} from '../../application/tracing';\nimport {assertInInjectionContext} from '../../di';\nimport {Injector} from '../../di/injector';\nimport {inject} from '../../di/injector_compatibility';\nimport {DestroyRef} from '../../linker/destroy_ref';\nimport {performanceMarkFeature} from '../../util/performance';\nimport {assertNotInReactiveContext} from '../reactivity/asserts';\nimport {ViewContext} from '../view_context';\nimport {AfterRenderPhase, AfterRenderRef} from './api';\nimport {\n AfterRenderHooks,\n AfterRenderImpl,\n AfterRenderManager,\n AfterRenderSequence,\n} from './manager';\n\n/**\n * An argument list containing the first non-never type in the given type array, or an empty\n * argument list if there are no non-never types in the type array.\n */\nexport type ɵFirstAvailable<T extends unknown[]> = T extends [infer H, ...infer R]\n ? [H] extends [never]\n ? ɵFirstAvailable<R>\n : [H]\n : [];\n\n/**\n * Options passed to `afterRender` and `afterNextRender`.\n *\n * @developerPreview\n */\nexport interface AfterRenderOptions {\n /**\n * The `Injector` to use during creation.\n *\n * If this is not provided, the current injection context will be used instead (via `inject`).\n */\n injector?: Injector;\n\n /**\n * Whether the hook should require manual cleanup.\n *\n * If this is `false` (the default) the hook will automatically register itself to be cleaned up\n * with the current `DestroyRef`.\n */\n manualCleanup?: boolean;\n\n /**\n * The phase the callback should be invoked in.\n *\n * <div class=\"docs-alert docs-alert-critical\">\n *\n * Defaults to `AfterRenderPhase.MixedReadWrite`. You should choose a more specific\n * phase instead. See `AfterRenderPhase` for more information.\n *\n * </div>\n *\n * @deprecated Specify the phase for your callback to run in by passing a spec-object as the first\n * parameter to `afterRender` or `afterNextRender` instead of a function.\n */\n phase?: AfterRenderPhase;\n}\n\n/**\n * Register callbacks to be invoked each time the application finishes rendering, during the\n * specified phases. The available phases are:\n * - `earlyRead`\n * Use this phase to **read** from the DOM before a subsequent `write` callback, for example to\n * perform custom layout that the browser doesn't natively support. Prefer the `read` phase if\n * reading can wait until after the write phase. **Never** write to the DOM in this phase.\n * - `write`\n * Use this phase to **write** to the DOM. **Never** read from the DOM in this phase.\n * - `mixedReadWrite`\n * Use this phase to read from and write to the DOM simultaneously. **Never** use this phase if\n * it is possible to divide the work among the other phases instead.\n * - `read`\n * Use this phase to **read** from the DOM. **Never** write to the DOM in this phase.\n *\n * <div class=\"docs-alert docs-alert-critical\">\n *\n * You should prefer using the `read` and `write` phases over the `earlyRead` and `mixedReadWrite`\n * phases when possible, to avoid performance degradation.\n *\n * </div>\n *\n * Note that:\n * - Callbacks run in the following phase order *after each render*:\n * 1. `earlyRead`\n * 2. `write`\n * 3. `mixedReadWrite`\n * 4. `read`\n * - Callbacks in the same phase run in the order they are registered.\n * - Callbacks run on browser platforms only, they will not run on the server.\n *\n * The first phase callback to run as part of this spec will receive no parameters. Each\n * subsequent phase callback in this spec will receive the return value of the previously run\n * phase callback as a parameter. This can be used to coordinate work across multiple phases.\n *\n * Angular is unable to verify or enforce that phases are used correctly, and instead\n * relies on each developer to follow the guidelines documented for each value and\n * carefully choose the appropriate one, refactoring their code if necessary. By doing\n * so, Angular is better able to minimize the performance degradation associated with\n * manual DOM access, ensuring the best experience for the end users of your application\n * or library.\n *\n * <div class=\"docs-alert docs-alert-important\">\n *\n * Components are not guaranteed to be [hydrated](guide/hydration) before the callback runs.\n * You must use caution when directly reading or writing the DOM and layout.\n *\n * </div>\n *\n * @param spec The callback functions to register\n * @param options Options to control the behavior of the callback\n *\n * @usageNotes\n *\n * Use `afterRender` to read or write the DOM after each render.\n *\n * ### Example\n * ```angular-ts\n * @Component({\n * selector: 'my-cmp',\n * template: `<span #content>{{ ... }}</span>`,\n * })\n * export class MyComponent {\n * @ViewChild('content') contentRef: ElementRef;\n *\n * constructor() {\n * afterRender({\n * read: () => {\n * console.log('content height: ' + this.contentRef.nativeElement.scrollHeight);\n * }\n * });\n * }\n * }\n * ```\n *\n * @developerPreview\n */\nexport function afterRender<E = never, W = never, M = never>(\n spec: {\n earlyRead?: () => E;\n write?: (...args: ɵFirstAvailable<[E]>) => W;\n mixedReadWrite?: (...args: ɵFirstAvailable<[W, E]>) => M;\n read?: (...args: ɵFirstAvailable<[M, W, E]>) => void;\n },\n options?: Omit<AfterRenderOptions, 'phase'>,\n): AfterRenderRef;\n\n/**\n * Register a callback to be invoked each time the application finishes rendering, during the\n * `mixedReadWrite` phase.\n *\n * <div class=\"docs-alert docs-alert-critical\">\n *\n * You should prefer specifying an explicit phase for the callback instead, or you risk significant\n * performance degradation.\n *\n * </div>\n *\n * Note that the callback will run\n * - in the order it was registered\n * - once per render\n * - on browser platforms only\n * - during the `mixedReadWrite` phase\n *\n * <div class=\"docs-alert docs-alert-important\">\n *\n * Components are not guaranteed to be [hydrated](guide/hydration) before the callback runs.\n * You must use caution when directly reading or writing the DOM and layout.\n *\n * </div>\n *\n * @param callback A callback function to register\n * @param options Options to control the behavior of the callback\n *\n * @usageNotes\n *\n * Use `afterRender` to read or write the DOM after each render.\n *\n * ### Example\n * ```angular-ts\n * @Component({\n * selector: 'my-cmp',\n * template: `<span #content>{{ ... }}</span>`,\n * })\n * export class MyComponent {\n * @ViewChild('content') contentRef: ElementRef;\n *\n * constructor() {\n * afterRender({\n * read: () => {\n * console.log('content height: ' + this.contentRef.nativeElement.scrollHeight);\n * }\n * });\n * }\n * }\n * ```\n *\n * @developerPreview\n */\nexport function afterRender(callback: VoidFunction, options?: AfterRenderOptions): AfterRenderRef;\n\nexport function afterRender(\n callbackOrSpec:\n | VoidFunction\n | {\n earlyRead?: () => unknown;\n write?: (r?: unknown) => unknown;\n mixedReadWrite?: (r?: unknown) => unknown;\n read?: (r?: unknown) => void;\n },\n options?: AfterRenderOptions,\n): AfterRenderRef {\n ngDevMode &&\n assertNotInReactiveContext(\n afterRender,\n 'Call `afterRender` outside of a reactive context. For example, schedule the render ' +\n 'callback inside the component constructor`.',\n );\n\n !options?.injector && assertInInjectionContext(afterRender);\n const injector = options?.injector ?? inject(Injector);\n\n if (typeof ngServerMode !== 'undefined' && ngServerMode) {\n return NOOP_AFTER_RENDER_REF;\n }\n\n performanceMarkFeature('NgAfterRender');\n\n return afterRenderImpl(callbackOrSpec, injector, options, /* once */ false);\n}\n\n/**\n * Register callbacks to be invoked the next time the application finishes rendering, during the\n * specified phases. The available phases are:\n * - `earlyRead`\n * Use this phase to **read** from the DOM before a subsequent `write` callback, for example to\n * perform custom layout that the browser doesn't natively support. Prefer the `read` phase if\n * reading can wait until after the write phase. **Never** write to the DOM in this phase.\n * - `write`\n * Use this phase to **write** to the DOM. **Never** read from the DOM in this phase.\n * - `mixedReadWrite`\n * Use this phase to read from and write to the DOM simultaneously. **Never** use this phase if\n * it is possible to divide the work among the other phases instead.\n * - `read`\n * Use this phase to **read** from the DOM. **Never** write to the DOM in this phase.\n *\n * <div class=\"docs-alert docs-alert-critical\">\n *\n * You should prefer using the `read` and `write` phases over the `earlyRead` and `mixedReadWrite`\n * phases when possible, to avoid performance degradation.\n *\n * </div>\n *\n * Note that:\n * - Callbacks run in the following phase order *once, after the next render*:\n * 1. `earlyRead`\n * 2. `write`\n * 3. `mixedReadWrite`\n * 4. `read`\n * - Callbacks in the same phase run in the order they are registered.\n * - Callbacks run on browser platforms only, they will not run on the server.\n *\n * The first phase callback to run as part of this spec will receive no parameters. Each\n * subsequent phase callback in this spec will receive the return value of the previously run\n * phase callback as a parameter. This can be used to coordinate work across multiple phases.\n *\n * Angular is unable to verify or enforce that phases are used correctly, and instead\n * relies on each developer to follow the guidelines documented for each value and\n * carefully choose the appropriate one, refactoring their code if necessary. By doing\n * so, Angular is better able to minimize the performance degradation associated with\n * manual DOM access, ensuring the best experience for the end users of your application\n * or library.\n *\n * <div class=\"docs-alert docs-alert-important\">\n *\n * Components are not guaranteed to be [hydrated](guide/hydration) before the callback runs.\n * You must use caution when directly reading or writing the DOM and layout.\n *\n * </div>\n *\n * @param spec The callback functions to register\n * @param options Options to control the behavior of the callback\n *\n * @usageNotes\n *\n * Use `afterNextRender` to read or write the DOM once,\n * for example to initialize a non-Angular library.\n *\n * ### Example\n * ```angular-ts\n * @Component({\n * selector: 'my-chart-cmp',\n * template: `<div #chart>{{ ... }}</div>`,\n * })\n * export class MyChartCmp {\n * @ViewChild('chart') chartRef: ElementRef;\n * chart: MyChart|null;\n *\n * constructor() {\n * afterNextRender({\n * write: () => {\n * this.chart = new MyChart(this.chartRef.nativeElement);\n * }\n * });\n * }\n * }\n * ```\n *\n * @developerPreview\n */\nexport function afterNextRender<E = never, W = never, M = never>(\n spec: {\n earlyRead?: () => E;\n write?: (...args: ɵFirstAvailable<[E]>) => W;\n mixedReadWrite?: (...args: ɵFirstAvailable<[W, E]>) => M;\n read?: (...args: ɵFirstAvailable<[M, W, E]>) => void;\n },\n options?: Omit<AfterRenderOptions, 'phase'>,\n): AfterRenderRef;\n\n/**\n * Register a callback to be invoked the next time the application finishes rendering, during the\n * `mixedReadWrite` phase.\n *\n * <div class=\"docs-alert docs-alert-critical\">\n *\n * You should prefer specifying an explicit phase for the callback instead, or you risk significant\n * performance degradation.\n *\n * </div>\n *\n * Note that the callback will run\n * - in the order it was registered\n * - on browser platforms only\n * - during the `mixedReadWrite` phase\n *\n * <div class=\"docs-alert docs-alert-important\">\n *\n * Components are not guaranteed to be [hydrated](guide/hydration) before the callback runs.\n * You must use caution when directly reading or writing the DOM and layout.\n *\n * </div>\n *\n * @param callback A callback function to register\n * @param options Options to control the behavior of the callback\n *\n * @usageNotes\n *\n * Use `afterNextRender` to read or write the DOM once,\n * for example to initialize a non-Angular library.\n *\n * ### Example\n * ```angular-ts\n * @Component({\n * selector: 'my-chart-cmp',\n * template: `<div #chart>{{ ... }}</div>`,\n * })\n * export class MyChartCmp {\n * @ViewChild('chart') chartRef: ElementRef;\n * chart: MyChart|null;\n *\n * constructor() {\n * afterNextRender({\n * write: () => {\n * this.chart = new MyChart(this.chartRef.nativeElement);\n * }\n * });\n * }\n * }\n * ```\n *\n * @developerPreview\n */\nexport function afterNextRender(\n callback: VoidFunction,\n options?: AfterRenderOptions,\n): AfterRenderRef;\n\nexport function afterNextRender(\n callbackOrSpec:\n | VoidFunction\n | {\n earlyRead?: () => unknown;\n write?: (r?: unknown) => unknown;\n mixedReadWrite?: (r?: unknown) => unknown;\n read?: (r?: unknown) => void;\n },\n options?: AfterRenderOptions,\n): AfterRenderRef {\n !options?.injector && assertInInjectionContext(afterNextRender);\n const injector = options?.injector ?? inject(Injector);\n\n if (typeof ngServerMode !== 'undefined' && ngServerMode) {\n return NOOP_AFTER_RENDER_REF;\n }\n\n performanceMarkFeature('NgAfterNextRender');\n\n return afterRenderImpl(callbackOrSpec, injector, options, /* once */ true);\n}\n\nfunction getHooks(\n callbackOrSpec:\n | VoidFunction\n | {\n earlyRead?: () => unknown;\n write?: (r?: unknown) => unknown;\n mixedReadWrite?: (r?: unknown) => unknown;\n read?: (r?: unknown) => void;\n },\n phase: AfterRenderPhase,\n): AfterRenderHooks {\n if (callbackOrSpec instanceof Function) {\n const hooks: AfterRenderHooks = [undefined, undefined, undefined, undefined];\n hooks[phase] = callbackOrSpec;\n return hooks;\n } else {\n return [\n callbackOrSpec.earlyRead,\n callbackOrSpec.write,\n callbackOrSpec.mixedReadWrite,\n callbackOrSpec.read,\n ];\n }\n}\n\n/**\n * Shared implementation for `afterRender` and `afterNextRender`.\n */\nfunction afterRenderImpl(\n callbackOrSpec:\n | VoidFunction\n | {\n earlyRead?: () => unknown;\n write?: (r?: unknown) => unknown;\n mixedReadWrite?: (r?: unknown) => unknown;\n read?: (r?: unknown) => void;\n },\n injector: Injector,\n options: AfterRenderOptions | undefined,\n once: boolean,\n): AfterRenderRef {\n const manager = injector.get(AfterRenderManager);\n // Lazily initialize the handler implementation, if necessary. This is so that it can be\n // tree-shaken if `afterRender` and `afterNextRender` aren't used.\n manager.impl ??= injector.get(AfterRenderImpl);\n\n const tracing = injector.get(TracingService, null, {optional: true});\n\n const hooks = options?.phase ?? AfterRenderPhase.MixedReadWrite;\n const destroyRef = options?.manualCleanup !== true ? injector.get(DestroyRef) : null;\n const viewContext = injector.get(ViewContext, null, {optional: true});\n const sequence = new AfterRenderSequence(\n manager.impl,\n getHooks(callbackOrSpec, hooks),\n viewContext?.view,\n once,\n destroyRef,\n tracing?.snapshot(null),\n );\n manager.impl.register(sequence);\n return sequence;\n}\n\n/** `AfterRenderRef` that does nothing. */\nexport const NOOP_AFTER_RENDER_REF: AfterRenderRef = {\n destroy() {},\n};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport type {Provider} from '../di/interface/provider';\nimport type {LContainer} from '../render3/interfaces/container';\nimport type {DependencyType} from '../render3/interfaces/definition';\nimport type {TNode} from '../render3/interfaces/node';\nimport type {LView} from '../render3/interfaces/view';\n\n/**\n * Basic set of data structures used for identifying a defer block\n * and triggering defer blocks\n */\nexport interface DehydratedDeferBlock {\n lView: LView;\n tNode: TNode;\n lContainer: LContainer;\n}\n\n/**\n * Describes the shape of a function generated by the compiler\n * to download dependencies that can be defer-loaded.\n */\nexport type DependencyResolverFn = () => Array<Promise<DependencyType>>;\n\n/**\n * Defines types of defer block triggers.\n */\nexport const enum TriggerType {\n /**\n * Represents regular triggers (e.g. `@defer (on idle) { ... }`).\n */\n Regular,\n\n /**\n * Represents prefetch triggers (e.g. `@defer (prefetch on idle) { ... }`).\n */\n Prefetch,\n\n /**\n * Represents hydrate triggers (e.g. `@defer (hydrate on idle) { ... }`).\n */\n Hydrate,\n}\n\n/**\n * Describes the state of defer block dependency loading.\n */\nexport enum DeferDependenciesLoadingState {\n /** Initial state, dependency loading is not yet triggered */\n NOT_STARTED,\n\n /** Dependency loading is in progress */\n IN_PROGRESS,\n\n /** Dependency loading has completed successfully */\n COMPLETE,\n\n /** Dependency loading has failed */\n FAILED,\n}\n\n/** Slot index where `minimum` parameter value is stored. */\nexport const MINIMUM_SLOT = 0;\n\n/** Slot index where `after` parameter value is stored. */\nexport const LOADING_AFTER_SLOT = 1;\n\n/** Configuration object for a loading block as it is stored in the component constants. */\nexport type DeferredLoadingBlockConfig = [minimumTime: number | null, afterTime: number | null];\n\n/** Configuration object for a placeholder block as it is stored in the component constants. */\nexport type DeferredPlaceholderBlockConfig = [minimumTime: number | null];\n\n/**\n * Describes the data shared across all instances of a defer block.\n */\nexport interface TDeferBlockDetails {\n /**\n * Index in an LView and TData arrays where a template for the primary content\n * can be found.\n */\n primaryTmplIndex: number;\n\n /**\n * Index in an LView and TData arrays where a template for the loading block can be found.\n */\n loadingTmplIndex: number | null;\n\n /**\n * Extra configuration parameters (such as `after` and `minimum`) for the loading block.\n */\n loadingBlockConfig: DeferredLoadingBlockConfig | null;\n\n /**\n * Index in an LView and TData arrays where a template for the placeholder block can be found.\n */\n placeholderTmplIndex: number | null;\n\n /**\n * Extra configuration parameters (such as `after` and `minimum`) for the placeholder block.\n */\n placeholderBlockConfig: DeferredPlaceholderBlockConfig | null;\n\n /**\n * Index in an LView and TData arrays where a template for the error block can be found.\n */\n errorTmplIndex: number | null;\n\n /**\n * Compiler-generated function that loads all dependencies for a defer block.\n */\n dependencyResolverFn: DependencyResolverFn | null;\n\n /**\n * Keeps track of the current loading state of defer block dependencies.\n */\n loadingState: DeferDependenciesLoadingState;\n\n /**\n * Dependency loading Promise. This Promise is helpful for cases when there\n * are multiple instances of a defer block (e.g. if it was used inside of an *ngFor),\n * which all await the same set of dependencies.\n */\n loadingPromise: Promise<unknown> | null;\n\n /**\n * List of providers collected from all NgModules that were imported by\n * standalone components used within this defer block.\n */\n providers: Provider[] | null;\n\n /**\n * List of hydrate triggers for a given block\n */\n hydrateTriggers: Map<DeferBlockTrigger, HydrateTriggerDetails | null> | null;\n\n /**\n * Defer block flags, which should be used for all\n * instances of a given defer block (the flags that should be\n * placed into the `TDeferDetails` at runtime).\n */\n flags: TDeferDetailsFlags;\n\n /**\n * Tracks debugging information about the deferred block.\n */\n debug: {\n /** Text representations of the block's triggers. */\n triggers?: Set<string>;\n } | null;\n}\n\n/**\n * Specifies defer block flags, which should be used for all\n * instances of a given defer block (the flags that should be\n * placed into the `TDeferDetails` at runtime).\n */\nexport const enum TDeferDetailsFlags {\n Default = 0,\n\n /**\n * Whether or not the defer block has hydrate triggers.\n */\n HasHydrateTriggers = 1 << 0,\n}\n\n/**\n * Describes the current state of this defer block instance.\n *\n * @publicApi\n */\nexport enum DeferBlockState {\n /** The placeholder block content is rendered */\n Placeholder = 0,\n\n /** The loading block content is rendered */\n Loading = 1,\n\n /** The main content block content is rendered */\n Complete = 2,\n\n /** The error block content is rendered */\n Error = 3,\n}\n\n/**\n * Represents defer trigger types.\n */\nexport const enum DeferBlockTrigger {\n Idle,\n Immediate,\n Viewport,\n Interaction,\n Hover,\n Timer,\n When,\n Never,\n}\n\n/** * Describes specified delay (in ms) in the `hydrate on timer()` trigger. */\nexport interface HydrateTimerTriggerDetails {\n delay: number;\n}\n\n/** * Describes all possible hydration trigger details specified in a template. */\nexport type HydrateTriggerDetails = HydrateTimerTriggerDetails;\n\n/**\n * Describes the initial state of this defer block instance.\n *\n * Note: this state is internal only and *must* be represented\n * with a number lower than any value in the `DeferBlockState` enum.\n */\nexport enum DeferBlockInternalState {\n /** Initial state. Nothing is rendered yet. */\n Initial = -1,\n}\n\nexport const NEXT_DEFER_BLOCK_STATE = 0;\n// Note: it's *important* to keep the state in this slot, because this slot\n// is used by runtime logic to differentiate between LViews, LContainers and\n// other types (see `isLView` and `isLContainer` functions). In case of defer\n// blocks, this slot would always be a number.\nexport const DEFER_BLOCK_STATE = 1;\nexport const STATE_IS_FROZEN_UNTIL = 2;\nexport const LOADING_AFTER_CLEANUP_FN = 3;\nexport const TRIGGER_CLEANUP_FNS = 4;\nexport const PREFETCH_TRIGGER_CLEANUP_FNS = 5;\nexport const SSR_UNIQUE_ID = 6;\nexport const SSR_BLOCK_STATE = 7;\nexport const ON_COMPLETE_FNS = 8;\nexport const HYDRATE_TRIGGER_CLEANUP_FNS = 9;\n\n/**\n * Describes instance-specific defer block data.\n *\n * Note: currently there is only the `state` slot, but more slots\n * would be added later to keep track of `after` and `maximum` features\n * (which would require per-instance state).\n */\nexport interface LDeferBlockDetails extends Array<unknown> {\n /**\n * Currently rendered block state.\n */\n [DEFER_BLOCK_STATE]: DeferBlockState | DeferBlockInternalState;\n\n /**\n * Block state that was requested when another state was rendered.\n */\n [NEXT_DEFER_BLOCK_STATE]: DeferBlockState | null;\n\n /**\n * Timestamp indicating when the current state can be switched to\n * the next one, in case teh current state has `minimum` parameter.\n */\n [STATE_IS_FROZEN_UNTIL]: number | null;\n\n /**\n * Contains a reference to a cleanup function which cancels a timeout\n * when Angular waits before rendering loading state. This is used when\n * the loading block has the `after` parameter configured.\n */\n [LOADING_AFTER_CLEANUP_FN]: VoidFunction | null;\n\n /**\n * List of cleanup functions for regular triggers.\n */\n [TRIGGER_CLEANUP_FNS]: VoidFunction[] | null;\n\n /**\n * List of cleanup functions for prefetch triggers.\n */\n [PREFETCH_TRIGGER_CLEANUP_FNS]: VoidFunction[] | null;\n\n /**\n * Unique id of this defer block assigned during SSR.\n */\n [SSR_UNIQUE_ID]: string | null;\n\n /**\n * Defer block state after SSR.\n */\n [SSR_BLOCK_STATE]: number | null;\n\n /**\n * A set of callbacks to be invoked once the main content is rendered.\n */\n [ON_COMPLETE_FNS]: VoidFunction[] | null;\n\n /**\n * List of cleanup functions for hydrate triggers.\n */\n [HYDRATE_TRIGGER_CLEANUP_FNS]: VoidFunction[] | null;\n}\n\n/**\n * Internal structure used for configuration of defer block behavior.\n * */\nexport interface DeferBlockConfig {\n behavior: DeferBlockBehavior;\n}\n\n/**\n * Options for configuring defer blocks behavior.\n * @publicApi\n */\nexport enum DeferBlockBehavior {\n /**\n * Manual triggering mode for defer blocks. Provides control over when defer blocks render\n * and which state they render.\n */\n Manual,\n\n /**\n * Playthrough mode for defer blocks. This mode behaves like defer blocks would in a browser.\n * This is the default behavior in test environments.\n */\n Playthrough,\n}\n\n/**\n * **INTERNAL**, avoid referencing it in application code.\n *\n * Describes a helper class that allows to intercept a call to retrieve current\n * dependency loading function and replace it with a different implementation.\n * This interceptor class is needed to allow testing blocks in different states\n * by simulating loading response.\n */\nexport interface DeferBlockDependencyInterceptor {\n /**\n * Invoked for each defer block when dependency loading function is accessed.\n */\n intercept(dependencyFn: DependencyResolverFn | null): DependencyResolverFn | null;\n\n /**\n * Allows to configure an interceptor function.\n */\n setInterceptor(interceptorFn: (current: DependencyResolverFn) => DependencyResolverFn): void;\n}\n","/*!\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n HYDRATE_TRIGGER_CLEANUP_FNS,\n LDeferBlockDetails,\n PREFETCH_TRIGGER_CLEANUP_FNS,\n TRIGGER_CLEANUP_FNS,\n TriggerType,\n} from './interfaces';\n\n/**\n * Registers a cleanup function associated with a prefetching trigger\n * or a regular trigger of a defer block.\n */\nexport function storeTriggerCleanupFn(\n type: TriggerType,\n lDetails: LDeferBlockDetails,\n cleanupFn: VoidFunction,\n) {\n const key = getCleanupFnKeyByType(type);\n if (lDetails[key] === null) {\n lDetails[key] = [];\n }\n (lDetails[key]! as VoidFunction[]).push(cleanupFn);\n}\n\n/**\n * Invokes registered cleanup functions either for prefetch or for regular triggers.\n */\nexport function invokeTriggerCleanupFns(type: TriggerType, lDetails: LDeferBlockDetails) {\n const key = getCleanupFnKeyByType(type);\n const cleanupFns = lDetails[key] as VoidFunction[];\n if (cleanupFns !== null) {\n for (const cleanupFn of cleanupFns) {\n cleanupFn();\n }\n lDetails[key] = null;\n }\n}\n\n/**\n * Invokes registered cleanup functions for prefetch, hydrate, and regular triggers.\n */\nexport function invokeAllTriggerCleanupFns(lDetails: LDeferBlockDetails) {\n invokeTriggerCleanupFns(TriggerType.Prefetch, lDetails);\n invokeTriggerCleanupFns(TriggerType.Regular, lDetails);\n invokeTriggerCleanupFns(TriggerType.Hydrate, lDetails);\n}\n\nfunction getCleanupFnKeyByType(type: TriggerType): number {\n let key = TRIGGER_CLEANUP_FNS;\n if (type === TriggerType.Prefetch) {\n key = PREFETCH_TRIGGER_CLEANUP_FNS;\n } else if (type === TriggerType.Hydrate) {\n key = HYDRATE_TRIGGER_CLEANUP_FNS;\n }\n return key;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {assertIndexInDeclRange} from '../render3/assert';\nimport {DependencyDef} from '../render3/interfaces/definition';\nimport {TContainerNode, TNode} from '../render3/interfaces/node';\nimport {HEADER_OFFSET, LView, TVIEW, TView} from '../render3/interfaces/view';\nimport {getTNode} from '../render3/util/view_utils';\nimport {assertEqual, throwError} from '../util/assert';\n\nimport {\n DeferBlockState,\n DeferDependenciesLoadingState,\n LDeferBlockDetails,\n LOADING_AFTER_SLOT,\n MINIMUM_SLOT,\n TDeferBlockDetails,\n} from './interfaces';\n\n/**\n * Calculates a data slot index for defer block info (either static or\n * instance-specific), given an index of a defer instruction.\n */\nexport function getDeferBlockDataIndex(deferBlockIndex: number) {\n // Instance state is located at the *next* position\n // after the defer block slot in an LView or TView.data.\n return deferBlockIndex + 1;\n}\n\n/** Retrieves a defer block state from an LView, given a TNode that represents a block. */\nexport function getLDeferBlockDetails(lView: LView, tNode: TNode): LDeferBlockDetails {\n const tView = lView[TVIEW];\n const slotIndex = getDeferBlockDataIndex(tNode.index);\n ngDevMode && assertIndexInDeclRange(tView, slotIndex);\n return lView[slotIndex];\n}\n\n/** Stores a defer block instance state in LView. */\nexport function setLDeferBlockDetails(\n lView: LView,\n deferBlockIndex: number,\n lDetails: LDeferBlockDetails,\n) {\n const tView = lView[TVIEW];\n const slotIndex = getDeferBlockDataIndex(deferBlockIndex);\n ngDevMode && assertIndexInDeclRange(tView, slotIndex);\n lView[slotIndex] = lDetails;\n}\n\n/** Retrieves static info about a defer block, given a TView and a TNode that represents a block. */\nexport function getTDeferBlockDetails(tView: TView, tNode: TNode): TDeferBlockDetails {\n const slotIndex = getDeferBlockDataIndex(tNode.index);\n ngDevMode && assertIndexInDeclRange(tView, slotIndex);\n return tView.data[slotIndex] as TDeferBlockDetails;\n}\n\n/** Stores a defer block static info in `TView.data`. */\nexport function setTDeferBlockDetails(\n tView: TView,\n deferBlockIndex: number,\n deferBlockConfig: TDeferBlockDetails,\n) {\n const slotIndex = getDeferBlockDataIndex(deferBlockIndex);\n ngDevMode && assertIndexInDeclRange(tView, slotIndex);\n tView.data[slotIndex] = deferBlockConfig;\n}\n\nexport function getTemplateIndexForState(\n newState: DeferBlockState,\n hostLView: LView,\n tNode: TNode,\n): number | null {\n const tView = hostLView[TVIEW];\n const tDetails = getTDeferBlockDetails(tView, tNode);\n\n switch (newState) {\n case DeferBlockState.Complete:\n return tDetails.primaryTmplIndex;\n case DeferBlockState.Loading:\n return tDetails.loadingTmplIndex;\n case DeferBlockState.Error:\n return tDetails.errorTmplIndex;\n case DeferBlockState.Placeholder:\n return tDetails.placeholderTmplIndex;\n default:\n ngDevMode && throwError(`Unexpected defer block state: ${newState}`);\n return null;\n }\n}\n\n/**\n * Returns a minimum amount of time that a given state should be rendered for,\n * taking into account `minimum` parameter value. If the `minimum` value is\n * not specified - returns `null`.\n */\nexport function getMinimumDurationForState(\n tDetails: TDeferBlockDetails,\n currentState: DeferBlockState,\n): number | null {\n if (currentState === DeferBlockState.Placeholder) {\n return tDetails.placeholderBlockConfig?.[MINIMUM_SLOT] ?? null;\n } else if (currentState === DeferBlockState.Loading) {\n return tDetails.loadingBlockConfig?.[MINIMUM_SLOT] ?? null;\n }\n return null;\n}\n\n/** Retrieves the value of the `after` parameter on the @loading block. */\nexport function getLoadingBlockAfter(tDetails: TDeferBlockDetails): number | null {\n return tDetails.loadingBlockConfig?.[LOADING_AFTER_SLOT] ?? null;\n}\n\n/**\n * Adds downloaded dependencies into a directive or a pipe registry,\n * making sure that a dependency doesn't yet exist in the registry.\n */\nexport function addDepsToRegistry<T extends DependencyDef[]>(currentDeps: T | null, newDeps: T): T {\n if (!currentDeps || currentDeps.length === 0) {\n return newDeps;\n }\n\n const currentDepSet = new Set(currentDeps);\n for (const dep of newDeps) {\n currentDepSet.add(dep);\n }\n\n // If `currentDeps` is the same length, there were no new deps and can\n // return the original array.\n return currentDeps.length === currentDepSet.size ? currentDeps : (Array.from(currentDepSet) as T);\n}\n\n/** Retrieves a TNode that represents main content of a defer block. */\nexport function getPrimaryBlockTNode(tView: TView, tDetails: TDeferBlockDetails): TContainerNode {\n const adjustedIndex = tDetails.primaryTmplIndex + HEADER_OFFSET;\n return getTNode(tView, adjustedIndex) as TContainerNode;\n}\n\n/**\n * Asserts whether all dependencies for a defer block are loaded.\n * Always run this function (in dev mode) before rendering a defer\n * block in completed state.\n */\nexport function assertDeferredDependenciesLoaded(tDetails: TDeferBlockDetails) {\n assertEqual(\n tDetails.loadingState,\n DeferDependenciesLoadingState.COMPLETE,\n 'Expecting all deferred dependencies to be loaded.',\n );\n}\n\n/**\n * Determines if a given value matches the expected structure of a defer block\n *\n * We can safely rely on the primaryTmplIndex because every defer block requires\n * that a primary template exists. All the other template options are optional.\n */\nexport function isTDeferBlockDetails(value: unknown): value is TDeferBlockDetails {\n return (\n value !== null &&\n typeof value === 'object' &&\n typeof (value as TDeferBlockDetails).primaryTmplIndex === 'number'\n );\n}\n\n/**\n * Whether a given TNode represents a defer block.\n */\nexport function isDeferBlock(tView: TView, tNode: TNode): boolean {\n let tDetails: TDeferBlockDetails | null = null;\n const slotIndex = getDeferBlockDataIndex(tNode.index);\n // Check if a slot index is in the reasonable range.\n // Note: we do `-1` on the right border, since defer block details are stored\n // in the `n+1` slot, see `getDeferBlockDataIndex` for more info.\n if (HEADER_OFFSET < slotIndex && slotIndex < tView.bindingStartIndex) {\n tDetails = getTDeferBlockDetails(tView, tNode);\n }\n return !!tDetails && isTDeferBlockDetails(tDetails);\n}\n\n/**\n * Tracks debugging information about a trigger.\n * @param tView TView in which the trigger is declared.\n * @param tNode TNode on which the trigger is declared.\n * @param textRepresentation Text representation of the trigger to be used for debugging purposes.\n */\nexport function trackTriggerForDebugging(tView: TView, tNode: TNode, textRepresentation: string) {\n const tDetails = getTDeferBlockDetails(tView, tNode);\n tDetails.debug ??= {};\n tDetails.debug.triggers ??= new Set();\n tDetails.debug.triggers.add(textRepresentation);\n}\n","/*!\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport type {Injector} from '../di';\nimport {AfterRenderRef} from '../render3/after_render/api';\nimport {afterRender} from '../render3/after_render/hooks';\nimport {assertLContainer, assertLView} from '../render3/assert';\nimport {CONTAINER_HEADER_OFFSET} from '../render3/interfaces/container';\nimport {TNode} from '../render3/interfaces/node';\nimport {isDestroyed} from '../render3/interfaces/type_checks';\nimport {HEADER_OFFSET, INJECTOR, LView} from '../render3/interfaces/view';\nimport {\n getNativeByIndex,\n removeLViewOnDestroy,\n storeLViewOnDestroy,\n walkUpViews,\n} from '../render3/util/view_utils';\nimport {assertElement, assertEqual} from '../util/assert';\nimport {NgZone} from '../zone';\nimport {storeTriggerCleanupFn} from './cleanup';\n\nimport {\n DEFER_BLOCK_STATE,\n DeferBlockInternalState,\n DeferBlockState,\n TriggerType,\n} from './interfaces';\nimport {getLDeferBlockDetails} from './utils';\n\n/** Configuration object used to register passive and capturing events. */\nconst eventListenerOptions: AddEventListenerOptions = {\n passive: true,\n capture: true,\n};\n\n/** Keeps track of the currently-registered `on hover` triggers. */\nconst hoverTriggers = new WeakMap<Element, DeferEventEntry>();\n\n/** Keeps track of the currently-registered `on interaction` triggers. */\nconst interactionTriggers = new WeakMap<Element, DeferEventEntry>();\n\n/** Currently-registered `viewport` triggers. */\nconst viewportTriggers = new WeakMap<Element, DeferEventEntry>();\n\n/** Names of the events considered as interaction events. */\nexport const interactionEventNames = ['click', 'keydown'] as const;\n\n/** Names of the events considered as hover events. */\nexport const hoverEventNames = ['mouseenter', 'mouseover', 'focusin'] as const;\n\n/** `IntersectionObserver` used to observe `viewport` triggers. */\nlet intersectionObserver: IntersectionObserver | null = null;\n\n/** Number of elements currently observed with `viewport` triggers. */\nlet observedViewportElements = 0;\n\n/** Object keeping track of registered callbacks for a deferred block trigger. */\nclass DeferEventEntry {\n callbacks = new Set<VoidFunction>();\n\n listener = () => {\n for (const callback of this.callbacks) {\n callback();\n }\n };\n}\n\n/**\n * Registers an interaction trigger.\n * @param trigger Element that is the trigger.\n * @param callback Callback to be invoked when the trigger is interacted with.\n */\nexport function onInteraction(trigger: Element, callback: VoidFunction): VoidFunction {\n let entry = interactionTriggers.get(trigger);\n\n // If this is the first entry for this element, add the listeners.\n if (!entry) {\n // Note that managing events centrally like this lends itself well to using global\n // event delegation. It currently does delegation at the element level, rather than the\n // document level, because:\n // 1. Global delegation is the most effective when there are a lot of events being registered\n // at the same time. Deferred blocks are unlikely to be used in such a way.\n // 2. Matching events to their target isn't free. For each `click` and `keydown` event we\n // would have look through all the triggers and check if the target either is the element\n // itself or it's contained within the element. Given that `click` and `keydown` are some\n // of the most common events, this may end up introducing a lot of runtime overhead.\n // 3. We're still registering only two events per element, no matter how many deferred blocks\n // are referencing it.\n entry = new DeferEventEntry();\n interactionTriggers.set(trigger, entry);\n\n for (const name of interactionEventNames) {\n trigger.addEventListener(name, entry!.listener, eventListenerOptions);\n }\n }\n\n entry.callbacks.add(callback);\n\n return () => {\n const {callbacks, listener} = entry!;\n callbacks.delete(callback);\n\n if (callbacks.size === 0) {\n interactionTriggers.delete(trigger);\n\n for (const name of interactionEventNames) {\n trigger.removeEventListener(name, listener, eventListenerOptions);\n }\n }\n };\n}\n\n/**\n * Registers a hover trigger.\n * @param trigger Element that is the trigger.\n * @param callback Callback to be invoked when the trigger is hovered over.\n */\nexport function onHover(trigger: Element, callback: VoidFunction): VoidFunction {\n let entry = hoverTriggers.get(trigger);\n\n // If this is the first entry for this element, add the listener.\n if (!entry) {\n entry = new DeferEventEntry();\n hoverTriggers.set(trigger, entry);\n\n for (const name of hoverEventNames) {\n trigger.addEventListener(name, entry!.listener, eventListenerOptions);\n }\n }\n\n entry.callbacks.add(callback);\n\n return () => {\n const {callbacks, listener} = entry!;\n callbacks.delete(callback);\n\n if (callbacks.size === 0) {\n for (const name of hoverEventNames) {\n trigger.removeEventListener(name, listener, eventListenerOptions);\n }\n hoverTriggers.delete(trigger);\n }\n };\n}\n\n/**\n * Registers a viewport trigger.\n * @param trigger Element that is the trigger.\n * @param callback Callback to be invoked when the trigger comes into the viewport.\n * @param injector Injector that can be used by the trigger to resolve DI tokens.\n */\nexport function onViewport(\n trigger: Element,\n callback: VoidFunction,\n injector: Injector,\n): VoidFunction {\n const ngZone = injector.get(NgZone);\n let entry = viewportTriggers.get(trigger);\n\n intersectionObserver =\n intersectionObserver ||\n ngZone.runOutsideAngular(() => {\n return new IntersectionObserver((entries) => {\n for (const current of entries) {\n // Only invoke the callbacks if the specific element is intersecting.\n if (current.isIntersecting && viewportTriggers.has(current.target)) {\n ngZone.run(viewportTriggers.get(current.target)!.listener);\n }\n }\n });\n });\n\n if (!entry) {\n entry = new DeferEventEntry();\n ngZone.runOutsideAngular(() => intersectionObserver!.observe(trigger));\n viewportTriggers.set(trigger, entry);\n observedViewportElements++;\n }\n\n entry.callbacks.add(callback);\n\n return () => {\n // It's possible that a different cleanup callback fully removed this element already.\n if (!viewportTriggers.has(trigger)) {\n return;\n }\n\n entry!.callbacks.delete(callback);\n\n if (entry!.callbacks.size === 0) {\n intersectionObserver?.unobserve(trigger);\n viewportTriggers.delete(trigger);\n observedViewportElements--;\n }\n\n if (observedViewportElements === 0) {\n intersectionObserver?.disconnect();\n intersectionObserver = null;\n }\n };\n}\n\n/**\n * Helper function to get the LView in which a deferred block's trigger is rendered.\n * @param deferredHostLView LView in which the deferred block is defined.\n * @param deferredTNode TNode defining the deferred block.\n * @param walkUpTimes Number of times to go up in the view hierarchy to find the trigger's view.\n * A negative value means that the trigger is inside the block's placeholder, while an undefined\n * value means that the trigger is in the same LView as the deferred block.\n */\nexport function getTriggerLView(\n deferredHostLView: LView,\n deferredTNode: TNode,\n walkUpTimes: number | undefined,\n): LView | null {\n // The trigger is in the same view, we don't need to traverse.\n if (walkUpTimes == null) {\n return deferredHostLView;\n }\n\n // A positive value or zero means that the trigger is in a parent view.\n if (walkUpTimes >= 0) {\n return walkUpViews(walkUpTimes, deferredHostLView);\n }\n\n // If the value is negative, it means that the trigger is inside the placeholder.\n const deferredContainer = deferredHostLView[deferredTNode.index];\n ngDevMode && assertLContainer(deferredContainer);\n const triggerLView = deferredContainer[CONTAINER_HEADER_OFFSET] ?? null;\n\n // We need to null check, because the placeholder might not have been rendered yet.\n if (ngDevMode && triggerLView !== null) {\n const lDetails = getLDeferBlockDetails(deferredHostLView, deferredTNode);\n const renderedState = lDetails[DEFER_BLOCK_STATE];\n assertEqual(\n renderedState,\n DeferBlockState.Placeholder,\n 'Expected a placeholder to be rendered in this defer block.',\n );\n assertLView(triggerLView);\n }\n\n return triggerLView;\n}\n\n/**\n * Gets the element that a deferred block's trigger is pointing to.\n * @param triggerLView LView in which the trigger is defined.\n * @param triggerIndex Index at which the trigger element should've been rendered.\n */\nexport function getTriggerElement(triggerLView: LView, triggerIndex: number): Element {\n const element = getNativeByIndex(HEADER_OFFSET + triggerIndex, triggerLView);\n ngDevMode && assertElement(element);\n return element as Element;\n}\n\n/**\n * Registers a DOM-node based trigger.\n * @param initialLView LView in which the defer block is rendered.\n * @param tNode TNode representing the defer block.\n * @param triggerIndex Index at which to find the trigger element.\n * @param walkUpTimes Number of times to go up/down in the view hierarchy to find the trigger.\n * @param registerFn Function that will register the DOM events.\n * @param callback Callback to be invoked when the trigger receives the event that should render\n * the deferred block.\n * @param type Trigger type to distinguish between regular and prefetch triggers.\n */\nexport function registerDomTrigger(\n initialLView: LView,\n tNode: TNode,\n triggerIndex: number,\n walkUpTimes: number | undefined,\n registerFn: (element: Element, callback: VoidFunction, injector: Injector) => VoidFunction,\n callback: VoidFunction,\n type: TriggerType,\n) {\n const injector = initialLView[INJECTOR];\n const zone = injector.get(NgZone);\n let poll: AfterRenderRef;\n function pollDomTrigger() {\n // If the initial view was destroyed, we don't need to do anything.\n if (isDestroyed(initialLView)) {\n poll.destroy();\n return;\n }\n\n const lDetails = getLDeferBlockDetails(initialLView, tNode);\n const renderedState = lDetails[DEFER_BLOCK_STATE];\n\n // If the block was loaded before the trigger was resolved, we don't need to do anything.\n if (\n renderedState !== DeferBlockInternalState.Initial &&\n renderedState !== DeferBlockState.Placeholder\n ) {\n poll.destroy();\n return;\n }\n\n const triggerLView = getTriggerLView(initialLView, tNode, walkUpTimes);\n\n // Keep polling until we resolve the trigger's LView.\n if (!triggerLView) {\n // Keep polling.\n return;\n }\n\n poll.destroy();\n\n // It's possible that the trigger's view was destroyed before we resolved the trigger element.\n if (isDestroyed(triggerLView)) {\n return;\n }\n\n const element = getTriggerElement(triggerLView, triggerIndex);\n const cleanup = registerFn(\n element,\n () => {\n // `pollDomTrigger` runs outside the zone (because of `afterNextRender`) and registers its\n // listeners outside the zone, so we jump back into the zone prior to running the callback.\n zone.run(() => {\n if (initialLView !== triggerLView) {\n removeLViewOnDestroy(triggerLView, cleanup);\n }\n callback();\n });\n },\n injector,\n );\n\n // The trigger and deferred block might be in different LViews.\n // For the main LView the cleanup would happen as a part of\n // `storeTriggerCleanupFn` logic. For trigger LView we register\n // a cleanup function there to remove event handlers in case an\n // LView gets destroyed before a trigger is invoked.\n if (initialLView !== triggerLView) {\n storeLViewOnDestroy(triggerLView, cleanup);\n }\n\n storeTriggerCleanupFn(type, lDetails, cleanup);\n }\n\n // Begin polling for the trigger.\n poll = afterRender({read: pollDomTrigger}, {injector});\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n// tslint:disable:no-duplicate-imports\nimport type {EventContract} from '../primitives/event-dispatch';\nimport {Attribute} from '../primitives/event-dispatch';\nimport {APP_ID} from './application/application_tokens';\nimport {InjectionToken} from './di';\nimport type {RElement, RNode} from './render3/interfaces/renderer_dom';\nimport {INJECTOR, type LView} from './render3/interfaces/view';\n\nexport const DEFER_BLOCK_SSR_ID_ATTRIBUTE = 'ngb';\n\ndeclare global {\n interface Element {\n __jsaction_fns: Map<string, Function[]> | undefined;\n }\n}\n\nexport function setJSActionAttributes(\n nativeElement: Element,\n eventTypes: string[],\n parentDeferBlockId: string | null = null,\n) {\n // jsaction attributes specifically should be applied to elements and not comment nodes.\n // Comment nodes also have no setAttribute function. So this avoids errors.\n if (eventTypes.length === 0 || nativeElement.nodeType !== Node.ELEMENT_NODE) {\n return;\n }\n const existingAttr = nativeElement.getAttribute(Attribute.JSACTION);\n // we dedupe cases where hydrate triggers are used as it's possible that\n // someone may have added an event binding to the root node that matches what the\n // hydrate trigger adds.\n const parts = eventTypes.reduce((prev, curr) => {\n // if there is no existing attribute OR it's not in the existing one, we need to add it\n return (existingAttr?.indexOf(curr) ?? -1) === -1 ? prev + curr + ':;' : prev;\n }, '');\n // This is required to be a module accessor to appease security tests on setAttribute.\n nativeElement.setAttribute(Attribute.JSACTION, `${existingAttr ?? ''}${parts}`);\n\n const blockName = parentDeferBlockId ?? '';\n if (blockName !== '' && parts.length > 0) {\n nativeElement.setAttribute(DEFER_BLOCK_SSR_ID_ATTRIBUTE, blockName);\n }\n}\n\nexport const sharedStashFunction = (rEl: RElement, eventType: string, listenerFn: Function) => {\n const el = rEl as unknown as Element;\n const eventListenerMap = el.__jsaction_fns ?? new Map();\n const eventListeners = eventListenerMap.get(eventType) ?? [];\n eventListeners.push(listenerFn);\n eventListenerMap.set(eventType, eventListeners);\n el.__jsaction_fns = eventListenerMap;\n};\n\nexport const sharedMapFunction = (rEl: RElement, jsActionMap: Map<string, Set<Element>>) => {\n const el = rEl as unknown as Element;\n let blockName = el.getAttribute(DEFER_BLOCK_SSR_ID_ATTRIBUTE) ?? '';\n const blockSet = jsActionMap.get(blockName) ?? new Set<Element>();\n if (!blockSet.has(el)) {\n blockSet.add(el);\n }\n jsActionMap.set(blockName, blockSet);\n};\n\nexport function removeListenersFromBlocks(\n blockNames: string[],\n jsActionMap: Map<string, Set<Element>>,\n) {\n if (blockNames.length > 0) {\n let blockList: Element[] = [];\n for (let blockName of blockNames) {\n if (jsActionMap.has(blockName)) {\n blockList = [...blockList, ...jsActionMap.get(blockName)!];\n }\n }\n const replayList = new Set(blockList);\n replayList.forEach(removeListeners);\n }\n}\n\nexport const removeListeners = (el: Element) => {\n el.removeAttribute(Attribute.JSACTION);\n el.removeAttribute(DEFER_BLOCK_SSR_ID_ATTRIBUTE);\n el.__jsaction_fns = undefined;\n};\n\nexport interface EventContractDetails {\n instance?: EventContract;\n}\n\nexport const JSACTION_EVENT_CONTRACT = new InjectionToken<EventContractDetails>(\n ngDevMode ? 'EVENT_CONTRACT_DETAILS' : '',\n {\n providedIn: 'root',\n factory: () => ({}),\n },\n);\n\nexport function invokeListeners(event: Event, currentTarget: Element | null) {\n const handlerFns = currentTarget?.__jsaction_fns?.get(event.type);\n if (!handlerFns || !currentTarget?.isConnected) {\n return;\n }\n for (const handler of handlerFns) {\n handler(event);\n }\n}\n\n/** Shorthand for an event listener callback function to reduce duplication. */\ntype EventCallback = (event?: any) => any;\n\n/**\n * Represents a signature of a function that disables event replay feature\n * for server-side rendered applications. This function is overridden with\n * an actual implementation when the event replay feature is enabled via\n * `withEventReplay()` call.\n */\ntype StashEventListener = (el: RNode, eventName: string, listenerFn: EventCallback) => void;\n\nconst stashEventListeners = new Map<string, StashEventListener>();\n\n/**\n * Registers a stashing function for a specific application ID.\n *\n * @param appId The unique identifier for the application instance.\n * @param fn The stashing function to associate with this app ID.\n * @returns A cleanup function that removes the stashing function when called.\n */\nexport function setStashFn(appId: string, fn: StashEventListener) {\n stashEventListeners.set(appId, fn);\n return () => stashEventListeners.delete(appId);\n}\n\n/**\n * Indicates whether the stashing code was added, prevents adding it multiple times.\n */\nlet isStashEventListenerImplEnabled = false;\n\nlet _stashEventListenerImpl = (\n lView: LView,\n target: RElement | EventTarget,\n eventName: string,\n listenerFn: EventCallback,\n) => {};\n\n/**\n * Optionally stashes an event listener for later replay during hydration.\n *\n * This function delegates to an internal `_stashEventListenerImpl`, which may\n * be a no-op unless the event replay feature is enabled. When active, this\n * allows capturing event listener metadata before hydration completes, so that\n * user interactions during SSR can be replayed.\n *\n * @param lView The logical view (LView) where the listener is being registered.\n * @param target The DOM element or event target the listener is attached to.\n * @param eventName The name of the event being listened for (e.g., 'click').\n * @param listenerFn The event handler that was registered.\n */\nexport function stashEventListenerImpl(\n lView: LView,\n target: RElement | EventTarget,\n eventName: string,\n listenerFn: EventCallback,\n): void {\n _stashEventListenerImpl(lView, target, eventName, listenerFn);\n}\n\n/**\n * Enables the event listener stashing logic in a tree-shakable way.\n *\n * This function lazily sets the implementation of `_stashEventListenerImpl`\n * so that it becomes active only when `withEventReplay` is invoked. This ensures\n * that the stashing logic is excluded from production builds unless needed.\n */\nexport function enableStashEventListenerImpl(): void {\n if (!isStashEventListenerImplEnabled) {\n _stashEventListenerImpl = (\n lView: LView,\n target: RElement | EventTarget,\n eventName: string,\n listenerFn: EventCallback,\n ) => {\n const appId = lView[INJECTOR].get(APP_ID);\n const stashEventListener = stashEventListeners.get(appId);\n stashEventListener?.(target as RElement, eventName, listenerFn);\n };\n\n isStashEventListenerImplEnabled = true;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport {inject} from '../di';\nimport {InjectionToken} from '../di/injection_token';\nimport {ɵɵdefineInjectable} from '../di/interface/defs';\nimport {\n EventContractDetails,\n JSACTION_EVENT_CONTRACT,\n removeListenersFromBlocks,\n} from '../event_delegation_utils';\nimport {JSACTION_BLOCK_ELEMENT_MAP} from '../hydration/tokens';\nimport {DehydratedDeferBlock} from './interfaces';\nimport type {PromiseWithResolvers} from '../util/promise_with_resolvers';\n\n/**\n * An internal injection token to reference `DehydratedBlockRegistry` implementation\n * in a tree-shakable way.\n */\nexport const DEHYDRATED_BLOCK_REGISTRY = new InjectionToken<DehydratedBlockRegistry>(\n ngDevMode ? 'DEHYDRATED_BLOCK_REGISTRY' : '',\n);\n\n/**\n * The DehydratedBlockRegistry is used for incremental hydration purposes. It keeps\n * track of the Defer Blocks that need hydration so we can effectively\n * navigate up to the top dehydrated defer block and fire appropriate cleanup\n * functions post hydration.\n */\nexport class DehydratedBlockRegistry {\n private registry = new Map<string, DehydratedDeferBlock>();\n private cleanupFns = new Map<string, Function[]>();\n private jsActionMap: Map<string, Set<Element>> = inject(JSACTION_BLOCK_ELEMENT_MAP);\n private contract: EventContractDetails = inject(JSACTION_EVENT_CONTRACT);\n\n add(blockId: string, info: DehydratedDeferBlock) {\n this.registry.set(blockId, info);\n // It's possible that hydration is queued that's waiting for the\n // resolution of a lazy loaded route. In this case, we ensure\n // the callback function is called to continue the hydration process\n // for the queued block set.\n if (this.awaitingCallbacks.has(blockId)) {\n const awaitingCallbacks = this.awaitingCallbacks.get(blockId)!;\n for (const cb of awaitingCallbacks) {\n cb();\n }\n }\n }\n\n get(blockId: string): DehydratedDeferBlock | null {\n return this.registry.get(blockId) ?? null;\n }\n\n has(blockId: string): boolean {\n return this.registry.has(blockId);\n }\n\n cleanup(hydratedBlocks: string[]) {\n removeListenersFromBlocks(hydratedBlocks, this.jsActionMap);\n for (let blockId of hydratedBlocks) {\n this.registry.delete(blockId);\n this.jsActionMap.delete(blockId);\n this.invokeTriggerCleanupFns(blockId);\n this.hydrating.delete(blockId);\n this.awaitingCallbacks.delete(blockId);\n }\n if (this.size === 0) {\n this.contract.instance?.cleanUp();\n }\n }\n\n get size(): number {\n return this.registry.size;\n }\n\n // we have to leave the lowest block Id in the registry\n // unless that block has no children\n addCleanupFn(blockId: string, fn: Function) {\n let cleanupFunctions: Function[] = [];\n if (this.cleanupFns.has(blockId)) {\n cleanupFunctions = this.cleanupFns.get(blockId)!;\n }\n cleanupFunctions.push(fn);\n this.cleanupFns.set(blockId, cleanupFunctions);\n }\n\n invokeTriggerCleanupFns(blockId: string) {\n const fns = this.cleanupFns.get(blockId) ?? [];\n for (let fn of fns) {\n fn();\n }\n this.cleanupFns.delete(blockId);\n }\n\n // Blocks that are being hydrated.\n hydrating = new Map<string, PromiseWithResolvers<void>>();\n\n // Blocks that are awaiting a defer instruction finish.\n private awaitingCallbacks = new Map<string, Function[]>();\n\n awaitParentBlock(topmostParentBlock: string, callback: Function) {\n const parentBlockAwaitCallbacks = this.awaitingCallbacks.get(topmostParentBlock) ?? [];\n parentBlockAwaitCallbacks.push(callback);\n this.awaitingCallbacks.set(topmostParentBlock, parentBlockAwaitCallbacks);\n }\n\n /** @nocollapse */\n static ɵprov = /** @pureOrBreakMyCode */ /* @__PURE__ */ ɵɵdefineInjectable({\n token: DehydratedBlockRegistry,\n providedIn: null,\n factory: () => new DehydratedBlockRegistry(),\n });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Injector} from '../di/injector';\nimport type {ViewRef} from '../linker/view_ref';\nimport {getComponent} from '../render3/util/discovery_utils';\nimport {LContainer} from '../render3/interfaces/container';\nimport {getDocument} from '../render3/interfaces/document';\nimport {RElement, RNode} from '../render3/interfaces/renderer_dom';\nimport {isRootView} from '../render3/interfaces/type_checks';\nimport {HEADER_OFFSET, LView, TVIEW, TViewType} from '../render3/interfaces/view';\nimport {makeStateKey, StateKey, TransferState} from '../transfer_state';\nimport {assertDefined, assertEqual} from '../util/assert';\nimport type {HydrationContext} from './annotate';\n\nimport {\n BlockSummary,\n CONTAINERS,\n DEFER_HYDRATE_TRIGGERS,\n DEFER_PARENT_BLOCK_ID,\n DehydratedView,\n DISCONNECTED_NODES,\n ELEMENT_CONTAINERS,\n MULTIPLIER,\n NUM_ROOT_NODES,\n SerializedContainerView,\n SerializedDeferBlock,\n SerializedTriggerDetails,\n SerializedView,\n} from './interfaces';\nimport {IS_INCREMENTAL_HYDRATION_ENABLED, JSACTION_BLOCK_ELEMENT_MAP} from './tokens';\nimport {RuntimeError, RuntimeErrorCode} from '../errors';\nimport {DeferBlockTrigger, HydrateTriggerDetails} from '../defer/interfaces';\nimport {hoverEventNames, interactionEventNames} from '../defer/dom_triggers';\nimport {DEHYDRATED_BLOCK_REGISTRY} from '../defer/registry';\nimport {sharedMapFunction} from '../event_delegation_utils';\n\n/**\n * The name of the key used in the TransferState collection,\n * where hydration information is located.\n */\nconst TRANSFER_STATE_TOKEN_ID = '__nghData__';\n\n/**\n * Lookup key used to reference DOM hydration data (ngh) in `TransferState`.\n */\nexport const NGH_DATA_KEY: StateKey<SerializedView[]> =\n makeStateKey<Array<SerializedView>>(TRANSFER_STATE_TOKEN_ID);\n\n/**\n * The name of the key used in the TransferState collection,\n * where serialized defer block information is located.\n */\nexport const TRANSFER_STATE_DEFER_BLOCKS_INFO = '__nghDeferData__';\n\n/**\n * Lookup key used to retrieve defer block datain `TransferState`.\n */\nexport const NGH_DEFER_BLOCKS_KEY: StateKey<{[key: string]: SerializedDeferBlock}> = makeStateKey<{\n [key: string]: SerializedDeferBlock;\n}>(TRANSFER_STATE_DEFER_BLOCKS_INFO);\n\n/**\n * The name of the attribute that would be added to host component\n * nodes and contain a reference to a particular slot in transferred\n * state that contains the necessary hydration info for this component.\n */\nexport const NGH_ATTR_NAME = 'ngh';\n\n/**\n * Marker used in a comment node to ensure hydration content integrity\n */\nexport const SSR_CONTENT_INTEGRITY_MARKER = 'nghm';\n\nexport const enum TextNodeMarker {\n /**\n * The contents of the text comment added to nodes that would otherwise be\n * empty when serialized by the server and passed to the client. The empty\n * node is lost when the browser parses it otherwise. This comment node will\n * be replaced during hydration in the client to restore the lost empty text\n * node.\n */\n EmptyNode = 'ngetn',\n\n /**\n * The contents of the text comment added in the case of adjacent text nodes.\n * When adjacent text nodes are serialized by the server and sent to the\n * client, the browser loses reference to the amount of nodes and assumes\n * just one text node. This separator is replaced during hydration to restore\n * the proper separation and amount of text nodes that should be present.\n */\n Separator = 'ngtns',\n}\n\n/**\n * Reference to a function that reads `ngh` attribute value from a given RNode\n * and retrieves hydration information from the TransferState using that value\n * as an index. Returns `null` by default, when hydration is not enabled.\n *\n * @param rNode Component's host element.\n * @param injector Injector that this component has access to.\n * @param isRootView Specifies whether we trying to read hydration info for the root view.\n */\nlet _retrieveHydrationInfoImpl: typeof retrieveHydrationInfoImpl = () => null;\n\nexport function retrieveHydrationInfoImpl(\n rNode: RElement,\n injector: Injector,\n isRootView = false,\n): DehydratedView | null {\n let nghAttrValue = rNode.getAttribute(NGH_ATTR_NAME);\n if (nghAttrValue == null) return null;\n\n // For cases when a root component also acts as an anchor node for a ViewContainerRef\n // (for example, when ViewContainerRef is injected in a root component), there is a need\n // to serialize information about the component itself, as well as an LContainer that\n // represents this ViewContainerRef. Effectively, we need to serialize 2 pieces of info:\n // (1) hydration info for the root component itself and (2) hydration info for the\n // ViewContainerRef instance (an LContainer). Each piece of information is included into\n // the hydration data (in the TransferState object) separately, thus we end up with 2 ids.\n // Since we only have 1 root element, we encode both bits of info into a single string:\n // ids are separated by the `|` char (e.g. `10|25`, where `10` is the ngh for a component view\n // and 25 is the `ngh` for a root view which holds LContainer).\n const [componentViewNgh, rootViewNgh] = nghAttrValue.split('|');\n nghAttrValue = isRootView ? rootViewNgh : componentViewNgh;\n if (!nghAttrValue) return null;\n\n // We've read one of the ngh ids, keep the remaining one, so that\n // we can set it back on the DOM element.\n const rootNgh = rootViewNgh ? `|${rootViewNgh}` : '';\n const remainingNgh = isRootView ? componentViewNgh : rootNgh;\n\n let data: SerializedView = {};\n // An element might have an empty `ngh` attribute value (e.g. `<comp ngh=\"\" />`),\n // which means that no special annotations are required. Do not attempt to read\n // from the TransferState in this case.\n if (nghAttrValue !== '') {\n const transferState = injector.get(TransferState, null, {optional: true});\n if (transferState !== null) {\n const nghData = transferState.get(NGH_DATA_KEY, []);\n\n // The nghAttrValue is always a number referencing an index\n // in the hydration TransferState data.\n data = nghData[Number(nghAttrValue)];\n\n // If the `ngh` attribute exists and has a non-empty value,\n // the hydration info *must* be present in the TransferState.\n // If there is no data for some reasons, this is an error.\n ngDevMode && assertDefined(data, 'Unable to retrieve hydration info from the TransferState.');\n }\n }\n const dehydratedView: DehydratedView = {\n data,\n firstChild: rNode.firstChild ?? null,\n };\n\n if (isRootView) {\n // If there is hydration info present for the root view, it means that there was\n // a ViewContainerRef injected in the root component. The root component host element\n // acted as an anchor node in this scenario. As a result, the DOM nodes that represent\n // embedded views in this ViewContainerRef are located as siblings to the host node,\n // i.e. `<app-root /><#VIEW1><#VIEW2>...<!--container-->`. In this case, the current\n // node becomes the first child of this root view and the next sibling is the first\n // element in the DOM segment.\n dehydratedView.firstChild = rNode;\n\n // We use `0` here, since this is the slot (right after the HEADER_OFFSET)\n // where a component LView or an LContainer is located in a root LView.\n setSegmentHead(dehydratedView, 0, rNode.nextSibling);\n }\n\n if (remainingNgh) {\n // If we have only used one of the ngh ids, store the remaining one\n // back on this RNode.\n rNode.setAttribute(NGH_ATTR_NAME, remainingNgh);\n } else {\n // The `ngh` attribute is cleared from the DOM node now\n // that the data has been retrieved for all indices.\n rNode.removeAttribute(NGH_ATTR_NAME);\n }\n\n // Note: don't check whether this node was claimed for hydration,\n // because this node might've been previously claimed while processing\n // template instructions.\n ngDevMode && markRNodeAsClaimedByHydration(rNode, /* checkIfAlreadyClaimed */ false);\n ngDevMode && ngDevMode.hydratedComponents++;\n\n return dehydratedView;\n}\n\n/**\n * Sets the implementation for the `retrieveHydrationInfo` function.\n */\nexport function enableRetrieveHydrationInfoImpl() {\n _retrieveHydrationInfoImpl = retrieveHydrationInfoImpl;\n}\n\n/**\n * Retrieves hydration info by reading the value from the `ngh` attribute\n * and accessing a corresponding slot in TransferState storage.\n */\nexport function retrieveHydrationInfo(\n rNode: RElement,\n injector: Injector,\n isRootView = false,\n): DehydratedView | null {\n return _retrieveHydrationInfoImpl(rNode, injector, isRootView);\n}\n\n/**\n * Retrieves the necessary object from a given ViewRef to serialize:\n * - an LView for component views\n * - an LContainer for cases when component acts as a ViewContainerRef anchor\n * - `null` in case of an embedded view\n */\nexport function getLNodeForHydration(viewRef: ViewRef): LView | LContainer | null {\n // Reading an internal field from `ViewRef` instance.\n let lView = (viewRef as any)._lView as LView;\n const tView = lView[TVIEW];\n // A registered ViewRef might represent an instance of an\n // embedded view, in which case we do not need to annotate it.\n if (tView.type === TViewType.Embedded) {\n return null;\n }\n // Check if it's a root view and if so, retrieve component's\n // LView from the first slot after the header.\n if (isRootView(lView)) {\n lView = lView[HEADER_OFFSET];\n }\n\n return lView;\n}\n\nfunction getTextNodeContent(node: Node): string | undefined {\n return node.textContent?.replace(/\\s/gm, '');\n}\n\n/**\n * Restores text nodes and separators into the DOM that were lost during SSR\n * serialization. The hydration process replaces empty text nodes and text\n * nodes that are immediately adjacent to other text nodes with comment nodes\n * that this method filters on to restore those missing nodes that the\n * hydration process is expecting to be present.\n *\n * @param node The app's root HTML Element\n */\nexport function processTextNodeMarkersBeforeHydration(node: HTMLElement) {\n const doc = getDocument();\n const commentNodesIterator = doc.createNodeIterator(node, NodeFilter.SHOW_COMMENT, {\n acceptNode(node) {\n const content = getTextNodeContent(node);\n const isTextNodeMarker =\n content === TextNodeMarker.EmptyNode || content === TextNodeMarker.Separator;\n return isTextNodeMarker ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_REJECT;\n },\n });\n let currentNode: Comment;\n // We cannot modify the DOM while using the commentIterator,\n // because it throws off the iterator state.\n // So we collect all marker nodes first and then follow up with\n // applying the changes to the DOM: either inserting an empty node\n // or just removing the marker if it was used as a separator.\n const nodes = [];\n while ((currentNode = commentNodesIterator.nextNode() as Comment)) {\n nodes.push(currentNode);\n }\n for (const node of nodes) {\n if (node.textContent === TextNodeMarker.EmptyNode) {\n node.replaceWith(doc.createTextNode(''));\n } else {\n node.remove();\n }\n }\n}\n\n/**\n * Internal type that represents a claimed node.\n * Only used in dev mode.\n */\nexport enum HydrationStatus {\n Hydrated = 'hydrated',\n Skipped = 'skipped',\n Mismatched = 'mismatched',\n}\n\nexport type HydrationInfo =\n | {\n status: HydrationStatus.Hydrated | HydrationStatus.Skipped;\n }\n | {\n status: HydrationStatus.Mismatched;\n actualNodeDetails: string | null;\n expectedNodeDetails: string | null;\n };\n\nconst HYDRATION_INFO_KEY = '__ngDebugHydrationInfo__';\n\nexport type HydratedNode = {\n [HYDRATION_INFO_KEY]?: HydrationInfo;\n};\n\nfunction patchHydrationInfo(node: RNode, info: HydrationInfo) {\n (node as HydratedNode)[HYDRATION_INFO_KEY] = info;\n}\n\nexport function readHydrationInfo(node: RNode): HydrationInfo | null {\n return (node as HydratedNode)[HYDRATION_INFO_KEY] ?? null;\n}\n\n/**\n * Marks a node as \"claimed\" by hydration process.\n * This is needed to make assessments in tests whether\n * the hydration process handled all nodes.\n */\nexport function markRNodeAsClaimedByHydration(node: RNode, checkIfAlreadyClaimed = true) {\n if (!ngDevMode) {\n throw new Error(\n 'Calling `markRNodeAsClaimedByHydration` in prod mode ' +\n 'is not supported and likely a mistake.',\n );\n }\n if (checkIfAlreadyClaimed && isRNodeClaimedForHydration(node)) {\n throw new Error('Trying to claim a node, which was claimed already.');\n }\n patchHydrationInfo(node, {status: HydrationStatus.Hydrated});\n ngDevMode.hydratedNodes++;\n}\n\nexport function markRNodeAsSkippedByHydration(node: RNode) {\n if (!ngDevMode) {\n throw new Error(\n 'Calling `markRNodeAsSkippedByHydration` in prod mode ' +\n 'is not supported and likely a mistake.',\n );\n }\n patchHydrationInfo(node, {status: HydrationStatus.Skipped});\n ngDevMode.componentsSkippedHydration++;\n}\n\nexport function countBlocksSkippedByHydration(injector: Injector) {\n const transferState = injector.get(TransferState);\n const nghDeferData = transferState.get(NGH_DEFER_BLOCKS_KEY, {});\n if (ngDevMode) {\n ngDevMode.deferBlocksWithIncrementalHydration = Object.keys(nghDeferData).length;\n }\n}\n\nexport function markRNodeAsHavingHydrationMismatch(\n node: RNode,\n expectedNodeDetails: string | null = null,\n actualNodeDetails: string | null = null,\n) {\n if (!ngDevMode) {\n throw new Error(\n 'Calling `markRNodeAsMismatchedByHydration` in prod mode ' +\n 'is not supported and likely a mistake.',\n );\n }\n\n // The RNode can be a standard HTMLElement (not an Angular component or directive)\n // The devtools component tree only displays Angular components & directives\n // Therefore we attach the debug info to the closest component/directive\n while (node && !getComponent(node as Element)) {\n node = node?.parentNode as RNode;\n }\n\n if (node) {\n patchHydrationInfo(node, {\n status: HydrationStatus.Mismatched,\n expectedNodeDetails,\n actualNodeDetails,\n });\n }\n}\n\nexport function isRNodeClaimedForHydration(node: RNode): boolean {\n return readHydrationInfo(node)?.status === HydrationStatus.Hydrated;\n}\n\nexport function setSegmentHead(\n hydrationInfo: DehydratedView,\n index: number,\n node: RNode | null,\n): void {\n hydrationInfo.segmentHeads ??= {};\n hydrationInfo.segmentHeads[index] = node;\n}\n\nexport function getSegmentHead(hydrationInfo: DehydratedView, index: number): RNode | null {\n return hydrationInfo.segmentHeads?.[index] ?? null;\n}\n\nexport function isIncrementalHydrationEnabled(injector: Injector): boolean {\n return injector.get(IS_INCREMENTAL_HYDRATION_ENABLED, false, {\n optional: true,\n });\n}\n\n/** Throws an error if the incremental hydration is not enabled */\nexport function assertIncrementalHydrationIsConfigured(injector: Injector) {\n if (!isIncrementalHydrationEnabled(injector)) {\n throw new RuntimeError(\n RuntimeErrorCode.MISCONFIGURED_INCREMENTAL_HYDRATION,\n 'Angular has detected that some `@defer` blocks use `hydrate` triggers, ' +\n 'but incremental hydration was not enabled. Please ensure that the `withIncrementalHydration()` ' +\n 'call is added as an argument for the `provideClientHydration()` function call ' +\n 'in your application config.',\n );\n }\n}\n\n/** Throws an error if the ssrUniqueId on the LDeferBlockDetails is not present */\nexport function assertSsrIdDefined(ssrUniqueId: unknown) {\n assertDefined(\n ssrUniqueId,\n 'Internal error: expecting an SSR id for a defer block that should be hydrated, but the id is not present',\n );\n}\n\n/**\n * Returns the size of an <ng-container>, using either the information\n * serialized in `ELEMENT_CONTAINERS` (element container size) or by\n * computing the sum of root nodes in all dehydrated views in a given\n * container (in case this `<ng-container>` was also used as a view\n * container host node, e.g. <ng-container *ngIf>).\n */\nexport function getNgContainerSize(hydrationInfo: DehydratedView, index: number): number | null {\n const data = hydrationInfo.data;\n let size = data[ELEMENT_CONTAINERS]?.[index] ?? null;\n // If there is no serialized information available in the `ELEMENT_CONTAINERS` slot,\n // check if we have info about view containers at this location (e.g.\n // `<ng-container *ngIf>`) and use container size as a number of root nodes in this\n // element container.\n if (size === null && data[CONTAINERS]?.[index]) {\n size = calcSerializedContainerSize(hydrationInfo, index);\n }\n return size;\n}\n\nexport function isSerializedElementContainer(\n hydrationInfo: DehydratedView,\n index: number,\n): boolean {\n return hydrationInfo.data[ELEMENT_CONTAINERS]?.[index] !== undefined;\n}\n\nexport function getSerializedContainerViews(\n hydrationInfo: DehydratedView,\n index: number,\n): SerializedContainerView[] | null {\n return hydrationInfo.data[CONTAINERS]?.[index] ?? null;\n}\n\n/**\n * Computes the size of a serialized container (the number of root nodes)\n * by calculating the sum of root nodes in all dehydrated views in this container.\n */\nexport function calcSerializedContainerSize(hydrationInfo: DehydratedView, index: number): number {\n const views = getSerializedContainerViews(hydrationInfo, index) ?? [];\n let numNodes = 0;\n for (let view of views) {\n numNodes += view[NUM_ROOT_NODES] * (view[MULTIPLIER] ?? 1);\n }\n return numNodes;\n}\n\n/**\n * Attempt to initialize the `disconnectedNodes` field of the given\n * `DehydratedView`. Returns the initialized value.\n */\nexport function initDisconnectedNodes(hydrationInfo: DehydratedView): Set<number> | null {\n // Check if we are processing disconnected info for the first time.\n if (typeof hydrationInfo.disconnectedNodes === 'undefined') {\n const nodeIds = hydrationInfo.data[DISCONNECTED_NODES];\n hydrationInfo.disconnectedNodes = nodeIds ? new Set(nodeIds) : null;\n }\n return hydrationInfo.disconnectedNodes;\n}\n\n/**\n * Checks whether a node is annotated as \"disconnected\", i.e. not present\n * in the DOM at serialization time. We should not attempt hydration for\n * such nodes and instead, use a regular \"creation mode\".\n */\nexport function isDisconnectedNode(hydrationInfo: DehydratedView, index: number): boolean {\n // Check if we are processing disconnected info for the first time.\n if (typeof hydrationInfo.disconnectedNodes === 'undefined') {\n const nodeIds = hydrationInfo.data[DISCONNECTED_NODES];\n hydrationInfo.disconnectedNodes = nodeIds ? new Set(nodeIds) : null;\n }\n return !!initDisconnectedNodes(hydrationInfo)?.has(index);\n}\n\n/**\n * Helper function to prepare text nodes for serialization by ensuring\n * that seperate logical text blocks in the DOM remain separate after\n * serialization.\n */\nexport function processTextNodeBeforeSerialization(context: HydrationContext, node: RNode) {\n // Handle cases where text nodes can be lost after DOM serialization:\n // 1. When there is an *empty text node* in DOM: in this case, this\n // node would not make it into the serialized string and as a result,\n // this node wouldn't be created in a browser. This would result in\n // a mismatch during the hydration, where the runtime logic would expect\n // a text node to be present in live DOM, but no text node would exist.\n // Example: `<span>{{ name }}</span>` when the `name` is an empty string.\n // This would result in `<span></span>` string after serialization and\n // in a browser only the `span` element would be created. To resolve that,\n // an extra comment node is appended in place of an empty text node and\n // that special comment node is replaced with an empty text node *before*\n // hydration.\n // 2. When there are 2 consecutive text nodes present in the DOM.\n // Example: `<div>Hello <ng-container *ngIf=\"true\">world</ng-container></div>`.\n // In this scenario, the live DOM would look like this:\n // <div>#text('Hello ') #text('world') #comment('container')</div>\n // Serialized string would look like this: `<div>Hello world<!--container--></div>`.\n // The live DOM in a browser after that would be:\n // <div>#text('Hello world') #comment('container')</div>\n // Notice how 2 text nodes are now \"merged\" into one. This would cause hydration\n // logic to fail, since it'd expect 2 text nodes being present, not one.\n // To fix this, we insert a special comment node in between those text nodes, so\n // serialized representation is: `<div>Hello <!--ngtns-->world<!--container--></div>`.\n // This forces browser to create 2 text nodes separated by a comment node.\n // Before running a hydration process, this special comment node is removed, so the\n // live DOM has exactly the same state as it was before serialization.\n\n // Collect this node as required special annotation only when its\n // contents is empty. Otherwise, such text node would be present on\n // the client after server-side rendering and no special handling needed.\n const el = node as HTMLElement;\n const corruptedTextNodes = context.corruptedTextNodes;\n if (el.textContent === '') {\n corruptedTextNodes.set(el, TextNodeMarker.EmptyNode);\n } else if (el.nextSibling?.nodeType === Node.TEXT_NODE) {\n corruptedTextNodes.set(el, TextNodeMarker.Separator);\n }\n}\n\nexport function convertHydrateTriggersToJsAction(\n triggers: Map<DeferBlockTrigger, HydrateTriggerDetails | null> | null,\n): string[] {\n let actionList: string[] = [];\n if (triggers !== null) {\n if (triggers.has(DeferBlockTrigger.Hover)) {\n actionList.push(...hoverEventNames);\n }\n if (triggers.has(DeferBlockTrigger.Interaction)) {\n actionList.push(...interactionEventNames);\n }\n }\n return actionList;\n}\n\n/**\n * Builds a queue of blocks that need to be hydrated, looking up the\n * tree to the topmost defer block that exists in the tree that hasn't\n * been hydrated, but exists in the registry. This queue is in top down\n * hierarchical order as a list of defer block ids.\n * Note: This is utilizing serialized information to navigate up the tree\n */\nexport function getParentBlockHydrationQueue(\n deferBlockId: string,\n injector: Injector,\n): {parentBlockPromise: Promise<void> | null; hydrationQueue: string[]} {\n const dehydratedBlockRegistry = injector.get(DEHYDRATED_BLOCK_REGISTRY);\n const transferState = injector.get(TransferState);\n const deferBlockParents = transferState.get(NGH_DEFER_BLOCKS_KEY, {});\n\n let isTopMostDeferBlock = false;\n let currentBlockId: string | undefined = deferBlockId;\n let parentBlockPromise: Promise<void> | null = null;\n const hydrationQueue: string[] = [];\n\n while (!isTopMostDeferBlock && currentBlockId) {\n ngDevMode &&\n assertEqual(\n hydrationQueue.indexOf(currentBlockId),\n -1,\n 'Internal error: defer block hierarchy has a cycle.',\n );\n\n isTopMostDeferBlock = dehydratedBlockRegistry.has(currentBlockId);\n const hydratingParentBlock = dehydratedBlockRegistry.hydrating.get(currentBlockId);\n if (parentBlockPromise === null && hydratingParentBlock != null) {\n parentBlockPromise = hydratingParentBlock.promise;\n break;\n }\n hydrationQueue.unshift(currentBlockId);\n currentBlockId = deferBlockParents[currentBlockId][DEFER_PARENT_BLOCK_ID];\n }\n return {parentBlockPromise, hydrationQueue};\n}\n\nfunction gatherDeferBlocksByJSActionAttribute(doc: Document): Set<HTMLElement> {\n const jsactionNodes = doc.body.querySelectorAll('[jsaction]');\n const blockMap = new Set<HTMLElement>();\n const eventTypes = [hoverEventNames.join(':;'), interactionEventNames.join(':;')].join('|');\n for (let node of jsactionNodes) {\n const attr = node.getAttribute('jsaction');\n const blockId = node.getAttribute('ngb');\n if (attr?.match(eventTypes) && blockId !== null) {\n blockMap.add(node as HTMLElement);\n }\n }\n return blockMap;\n}\n\nexport function appendDeferBlocksToJSActionMap(doc: Document, injector: Injector) {\n const blockMap = gatherDeferBlocksByJSActionAttribute(doc);\n const jsActionMap = injector.get(JSACTION_BLOCK_ELEMENT_MAP);\n for (let rNode of blockMap) {\n sharedMapFunction(rNode, jsActionMap);\n }\n}\n\n/**\n * Retrieves defer block hydration information from the TransferState.\n *\n * @param injector Injector that this component has access to.\n */\nlet _retrieveDeferBlockDataImpl: typeof retrieveDeferBlockDataImpl = () => {\n return {};\n};\n\nexport function retrieveDeferBlockDataImpl(injector: Injector): {\n [key: string]: SerializedDeferBlock;\n} {\n const transferState = injector.get(TransferState, null, {optional: true});\n if (transferState !== null) {\n const nghDeferData = transferState.get(NGH_DEFER_BLOCKS_KEY, {});\n\n ngDevMode &&\n assertDefined(nghDeferData, 'Unable to retrieve defer block info from the TransferState.');\n return nghDeferData;\n }\n\n return {};\n}\n\n/**\n * Sets the implementation for the `retrieveDeferBlockData` function.\n */\nexport function enableRetrieveDeferBlockDataImpl() {\n _retrieveDeferBlockDataImpl = retrieveDeferBlockDataImpl;\n}\n\n/**\n * Retrieves defer block data from TransferState storage\n */\nexport function retrieveDeferBlockData(injector: Injector): {[key: string]: SerializedDeferBlock} {\n return _retrieveDeferBlockDataImpl(injector);\n}\n\nfunction isTimerTrigger(triggerInfo: DeferBlockTrigger | SerializedTriggerDetails): boolean {\n return typeof triggerInfo === 'object' && triggerInfo.trigger === DeferBlockTrigger.Timer;\n}\n\nfunction getHydrateTimerTrigger(blockData: SerializedDeferBlock): number | null {\n const trigger = blockData[DEFER_HYDRATE_TRIGGERS]?.find((t) => isTimerTrigger(t));\n return (trigger as SerializedTriggerDetails)?.delay ?? null;\n}\n\nfunction hasHydrateTrigger(blockData: SerializedDeferBlock, trigger: DeferBlockTrigger): boolean {\n return blockData[DEFER_HYDRATE_TRIGGERS]?.includes(trigger) ?? false;\n}\n\n/**\n * Creates a summary of the given serialized defer block, which is used later to properly initialize\n * specific triggers.\n */\nfunction createBlockSummary(blockInfo: SerializedDeferBlock): BlockSummary {\n return {\n data: blockInfo,\n hydrate: {\n idle: hasHydrateTrigger(blockInfo, DeferBlockTrigger.Idle),\n immediate: hasHydrateTrigger(blockInfo, DeferBlockTrigger.Immediate),\n timer: getHydrateTimerTrigger(blockInfo),\n viewport: hasHydrateTrigger(blockInfo, DeferBlockTrigger.Viewport),\n },\n };\n}\n\n/**\n * Processes all of the defer block data in the transfer state and creates a map of the summaries\n */\nexport function processBlockData(injector: Injector): Map<string, BlockSummary> {\n const blockData = retrieveDeferBlockData(injector);\n let blockDetails = new Map<string, BlockSummary>();\n for (let blockId in blockData) {\n blockDetails.set(blockId, createBlockSummary(blockData[blockId]));\n }\n return blockDetails;\n}\n\nfunction isSsrContentsIntegrity(node: ChildNode | null): boolean {\n return (\n !!node &&\n node.nodeType === Node.COMMENT_NODE &&\n node.textContent?.trim() === SSR_CONTENT_INTEGRITY_MARKER\n );\n}\n\nfunction skipTextNodes(node: ChildNode | null): ChildNode | null {\n // Ignore whitespace. Before the <body>, we shouldn't find text nodes that aren't whitespace.\n while (node && node.nodeType === Node.TEXT_NODE) {\n node = node.previousSibling;\n }\n return node;\n}\n\n/**\n * Verifies whether the DOM contains a special marker added during SSR time to make sure\n * there is no SSR'ed contents transformations happen after SSR is completed. Typically that\n * happens either by CDN or during the build process as an optimization to remove comment nodes.\n * Hydration process requires comment nodes produced by Angular to locate correct DOM segments.\n * When this special marker is *not* present - throw an error and do not proceed with hydration,\n * since it will not be able to function correctly.\n *\n * Note: this function is invoked only on the client, so it's safe to use DOM APIs.\n */\nexport function verifySsrContentsIntegrity(doc: Document): void {\n for (const node of doc.body.childNodes) {\n if (isSsrContentsIntegrity(node)) {\n return;\n }\n }\n\n // Check if the HTML parser may have moved the marker to just before the <body> tag,\n // e.g. because the body tag was implicit and not present in the markup. An implicit body\n // tag is unlikely to interfer with whitespace/comments inside of the app's root element.\n\n // Case 1: Implicit body. Example:\n // <!doctype html><head><title>Hi</title></head><!--nghm--><app-root></app-root>\n const beforeBody = skipTextNodes(doc.body.previousSibling);\n if (isSsrContentsIntegrity(beforeBody)) {\n return;\n }\n\n // Case 2: Implicit body & head. Example:\n // <!doctype html><head><title>Hi</title><!--nghm--><app-root></app-root>\n let endOfHead = skipTextNodes(doc.head.lastChild);\n if (isSsrContentsIntegrity(endOfHead)) {\n return;\n }\n\n throw new RuntimeError(\n RuntimeErrorCode.MISSING_SSR_CONTENT_INTEGRITY_MARKER,\n typeof ngDevMode !== 'undefined' &&\n ngDevMode &&\n 'Angular hydration logic detected that HTML content of this page was modified after it ' +\n 'was produced during server side rendering. Make sure that there are no optimizations ' +\n 'that remove comment nodes from HTML enabled on your CDN. Angular hydration ' +\n 'relies on HTML produced by the server, including whitespaces and comment nodes.',\n );\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {setActiveConsumer} from '../../../primitives/signals';\nimport {LView, TView} from '../interfaces/view';\nimport {DirectiveDef, RenderFlags, ViewQueriesFunction} from '../interfaces/definition';\nimport {assertDefined} from '../../util/assert';\nimport {setCurrentQueryIndex} from '../state';\nimport {TNode} from '../interfaces/node';\nimport {isContentQueryHost} from '../interfaces/type_checks';\n\n/** Refreshes all content queries declared by directives in a given view */\nexport function refreshContentQueries(tView: TView, lView: LView): void {\n const contentQueries = tView.contentQueries;\n if (contentQueries !== null) {\n const prevConsumer = setActiveConsumer(null);\n try {\n for (let i = 0; i < contentQueries.length; i += 2) {\n const queryStartIdx = contentQueries[i];\n const directiveDefIdx = contentQueries[i + 1];\n if (directiveDefIdx !== -1) {\n const directiveDef = tView.data[directiveDefIdx] as DirectiveDef<any>;\n ngDevMode && assertDefined(directiveDef, 'DirectiveDef not found.');\n ngDevMode &&\n assertDefined(directiveDef.contentQueries, 'contentQueries function should be defined');\n setCurrentQueryIndex(queryStartIdx);\n directiveDef.contentQueries!(RenderFlags.Update, lView[directiveDefIdx], directiveDefIdx);\n }\n }\n } finally {\n setActiveConsumer(prevConsumer);\n }\n }\n}\n\nexport function executeViewQueryFn<T>(\n flags: RenderFlags,\n viewQueryFn: ViewQueriesFunction<T>,\n component: T,\n): void {\n ngDevMode && assertDefined(viewQueryFn, 'View queries function to execute must be defined.');\n setCurrentQueryIndex(0);\n const prevConsumer = setActiveConsumer(null);\n try {\n viewQueryFn(flags, component);\n } finally {\n setActiveConsumer(prevConsumer);\n }\n}\n\nexport function executeContentQueries(tView: TView, tNode: TNode, lView: LView) {\n if (isContentQueryHost(tNode)) {\n const prevConsumer = setActiveConsumer(null);\n try {\n const start = tNode.directiveStart;\n const end = tNode.directiveEnd;\n for (let directiveIndex = start; directiveIndex < end; directiveIndex++) {\n const def = tView.data[directiveIndex] as DirectiveDef<any>;\n if (def.contentQueries) {\n const directiveInstance = lView[directiveIndex];\n ngDevMode &&\n assertDefined(\n directiveIndex,\n 'Incorrect reference to a directive defining a content query',\n );\n def.contentQueries(RenderFlags.Create, directiveInstance, directiveIndex);\n }\n }\n } finally {\n setActiveConsumer(prevConsumer);\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/**\n * Defines the CSS styles encapsulation policies for the {@link /api/core/Component Component} decorator's\n * `encapsulation` option.\n *\n * See {@link Component#encapsulation encapsulation}.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/ts/metadata/encapsulation.ts region='longform'}\n *\n * @publicApi\n */\nexport enum ViewEncapsulation {\n // TODO: consider making `ViewEncapsulation` a `const enum` instead. See\n // https://github.com/angular/angular/issues/44119 for additional information.\n\n /**\n * Emulates a native Shadow DOM encapsulation behavior by adding a specific attribute to the\n * component's host element and applying the same attribute to all the CSS selectors provided\n * via {@link Component#styles styles} or {@link Component#styleUrls styleUrls}.\n *\n * This is the default option.\n */\n Emulated = 0,\n\n // Historically the 1 value was for `Native` encapsulation which has been removed as of v11.\n\n /**\n * Doesn't provide any sort of CSS style encapsulation, meaning that all the styles provided\n * via {@link Component#styles styles} or {@link Component#styleUrls styleUrls} are applicable\n * to any HTML element of the application regardless of their host Component.\n */\n None = 2,\n\n /**\n * Uses the browser's native Shadow DOM API to encapsulate CSS styles, meaning that it creates\n * a ShadowRoot for the component's host element which is then used to encapsulate\n * all the Component's styling.\n */\n ShadowDom = 3,\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/**\n * @fileoverview\n * A module to facilitate use of a Trusted Types policy internally within\n * Angular. It lazily constructs the Trusted Types policy, providing helper\n * utilities for promoting strings to Trusted Types. When Trusted Types are not\n * available, strings are used as a fallback.\n * @security All use of this module is security-sensitive and should go through\n * security review.\n */\n\nimport {global} from '../global';\n\nimport {\n TrustedHTML,\n TrustedScript,\n TrustedScriptURL,\n TrustedTypePolicy,\n TrustedTypePolicyFactory,\n} from './trusted_type_defs';\n\n/**\n * The Trusted Types policy, or null if Trusted Types are not\n * enabled/supported, or undefined if the policy has not been created yet.\n */\nlet policy: TrustedTypePolicy | null | undefined;\n\n/**\n * Returns the Trusted Types policy, or null if Trusted Types are not\n * enabled/supported. The first call to this function will create the policy.\n */\nfunction getPolicy(): TrustedTypePolicy | null {\n if (policy === undefined) {\n policy = null;\n if (global.trustedTypes) {\n try {\n policy = (global.trustedTypes as TrustedTypePolicyFactory).createPolicy('angular', {\n createHTML: (s: string) => s,\n createScript: (s: string) => s,\n createScriptURL: (s: string) => s,\n });\n } catch {\n // trustedTypes.createPolicy throws if called with a name that is\n // already registered, even in report-only mode. Until the API changes,\n // catch the error not to break the applications functionally. In such\n // cases, the code will fall back to using strings.\n }\n }\n }\n return policy;\n}\n\n/**\n * Unsafely promote a string to a TrustedHTML, falling back to strings when\n * Trusted Types are not available.\n * @security This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that the\n * provided string will never cause an XSS vulnerability if used in a context\n * that will be interpreted as HTML by a browser, e.g. when assigning to\n * element.innerHTML.\n */\nexport function trustedHTMLFromString(html: string): TrustedHTML | string {\n return getPolicy()?.createHTML(html) || html;\n}\n\n/**\n * Unsafely promote a string to a TrustedScript, falling back to strings when\n * Trusted Types are not available.\n * @security In particular, it must be assured that the provided string will\n * never cause an XSS vulnerability if used in a context that will be\n * interpreted and executed as a script by a browser, e.g. when calling eval.\n */\nexport function trustedScriptFromString(script: string): TrustedScript | string {\n return getPolicy()?.createScript(script) || script;\n}\n\n/**\n * Unsafely promote a string to a TrustedScriptURL, falling back to strings\n * when Trusted Types are not available.\n * @security This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that the\n * provided string will never cause an XSS vulnerability if used in a context\n * that will cause a browser to load and execute a resource, e.g. when\n * assigning to script.src.\n */\nexport function trustedScriptURLFromString(url: string): TrustedScriptURL | string {\n return getPolicy()?.createScriptURL(url) || url;\n}\n\n/**\n * Unsafely call the Function constructor with the given string arguments. It\n * is only available in development mode, and should be stripped out of\n * production code.\n * @security This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that it\n * is only called from development code, as use in production code can lead to\n * XSS vulnerabilities.\n */\nexport function newTrustedFunctionForDev(...args: string[]): Function {\n if (typeof ngDevMode === 'undefined') {\n throw new Error('newTrustedFunctionForDev should never be called in production');\n }\n if (!global.trustedTypes) {\n // In environments that don't support Trusted Types, fall back to the most\n // straightforward implementation:\n return new Function(...args);\n }\n\n // Chrome currently does not support passing TrustedScript to the Function\n // constructor. The following implements the workaround proposed on the page\n // below, where the Chromium bug is also referenced:\n // https://github.com/w3c/webappsec-trusted-types/wiki/Trusted-Types-for-function-constructor\n const fnArgs = args.slice(0, -1).join(',');\n const fnBody = args[args.length - 1];\n const body = `(function anonymous(${fnArgs}\n) { ${fnBody}\n})`;\n\n // Using eval directly confuses the compiler and prevents this module from\n // being stripped out of JS binaries even if not used. The global['eval']\n // indirection fixes that.\n const fn = global['eval'](trustedScriptFromString(body)) as Function;\n if (fn.bind === undefined) {\n // Workaround for a browser bug that only exists in Chrome 83, where passing\n // a TrustedScript to eval just returns the TrustedScript back without\n // evaluating it. In that case, fall back to the most straightforward\n // implementation:\n return new Function(...args);\n }\n\n // To completely mimic the behavior of calling \"new Function\", two more\n // things need to happen:\n // 1. Stringifying the resulting function should return its source code\n fn.toString = () => body;\n // 2. When calling the resulting function, `this` should refer to `global`\n return fn.bind(global);\n\n // When Trusted Types support in Function constructors is widely available,\n // the implementation of this function can be simplified to:\n // return new Function(...args.map(a => trustedScriptFromString(a)));\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/**\n * @fileoverview\n * A module to facilitate use of a Trusted Types policy internally within\n * Angular specifically for bypassSecurityTrust* and custom sanitizers. It\n * lazily constructs the Trusted Types policy, providing helper utilities for\n * promoting strings to Trusted Types. When Trusted Types are not available,\n * strings are used as a fallback.\n * @security All use of this module is security-sensitive and should go through\n * security review.\n */\n\nimport {global} from '../global';\nimport {\n TrustedHTML,\n TrustedScript,\n TrustedScriptURL,\n TrustedTypePolicy,\n TrustedTypePolicyFactory,\n} from './trusted_type_defs';\n\n/**\n * The Trusted Types policy, or null if Trusted Types are not\n * enabled/supported, or undefined if the policy has not been created yet.\n */\nlet policy: TrustedTypePolicy | null | undefined;\n\n/**\n * Returns the Trusted Types policy, or null if Trusted Types are not\n * enabled/supported. The first call to this function will create the policy.\n */\nfunction getPolicy(): TrustedTypePolicy | null {\n if (policy === undefined) {\n policy = null;\n if (global.trustedTypes) {\n try {\n policy = (global.trustedTypes as TrustedTypePolicyFactory).createPolicy(\n 'angular#unsafe-bypass',\n {\n createHTML: (s: string) => s,\n createScript: (s: string) => s,\n createScriptURL: (s: string) => s,\n },\n );\n } catch {\n // trustedTypes.createPolicy throws if called with a name that is\n // already registered, even in report-only mode. Until the API changes,\n // catch the error not to break the applications functionally. In such\n // cases, the code will fall back to using strings.\n }\n }\n }\n return policy;\n}\n\n/**\n * Unsafely promote a string to a TrustedHTML, falling back to strings when\n * Trusted Types are not available.\n * @security This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that it\n * is only passed strings that come directly from custom sanitizers or the\n * bypassSecurityTrust* functions.\n */\nexport function trustedHTMLFromStringBypass(html: string): TrustedHTML | string {\n return getPolicy()?.createHTML(html) || html;\n}\n\n/**\n * Unsafely promote a string to a TrustedScript, falling back to strings when\n * Trusted Types are not available.\n * @security This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that it\n * is only passed strings that come directly from custom sanitizers or the\n * bypassSecurityTrust* functions.\n */\nexport function trustedScriptFromStringBypass(script: string): TrustedScript | string {\n return getPolicy()?.createScript(script) || script;\n}\n\n/**\n * Unsafely promote a string to a TrustedScriptURL, falling back to strings\n * when Trusted Types are not available.\n * @security This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that it\n * is only passed strings that come directly from custom sanitizers or the\n * bypassSecurityTrust* functions.\n */\nexport function trustedScriptURLFromStringBypass(url: string): TrustedScriptURL | string {\n return getPolicy()?.createScriptURL(url) || url;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {XSS_SECURITY_URL} from '../error_details_base_url';\n\nexport const enum BypassType {\n Url = 'URL',\n Html = 'HTML',\n ResourceUrl = 'ResourceURL',\n Script = 'Script',\n Style = 'Style',\n}\n\n/**\n * Marker interface for a value that's safe to use in a particular context.\n *\n * @publicApi\n */\nexport interface SafeValue {}\n\n/**\n * Marker interface for a value that's safe to use as HTML.\n *\n * @publicApi\n */\nexport interface SafeHtml extends SafeValue {}\n\n/**\n * Marker interface for a value that's safe to use as style (CSS).\n *\n * @publicApi\n */\nexport interface SafeStyle extends SafeValue {}\n\n/**\n * Marker interface for a value that's safe to use as JavaScript.\n *\n * @publicApi\n */\nexport interface SafeScript extends SafeValue {}\n\n/**\n * Marker interface for a value that's safe to use as a URL linking to a document.\n *\n * @publicApi\n */\nexport interface SafeUrl extends SafeValue {}\n\n/**\n * Marker interface for a value that's safe to use as a URL to load executable code from.\n *\n * @publicApi\n */\nexport interface SafeResourceUrl extends SafeValue {}\n\nabstract class SafeValueImpl implements SafeValue {\n constructor(public changingThisBreaksApplicationSecurity: string) {}\n\n abstract getTypeName(): string;\n\n toString() {\n return (\n `SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity}` +\n ` (see ${XSS_SECURITY_URL})`\n );\n }\n}\n\nclass SafeHtmlImpl extends SafeValueImpl implements SafeHtml {\n override getTypeName() {\n return BypassType.Html;\n }\n}\nclass SafeStyleImpl extends SafeValueImpl implements SafeStyle {\n override getTypeName() {\n return BypassType.Style;\n }\n}\nclass SafeScriptImpl extends SafeValueImpl implements SafeScript {\n override getTypeName() {\n return BypassType.Script;\n }\n}\nclass SafeUrlImpl extends SafeValueImpl implements SafeUrl {\n override getTypeName() {\n return BypassType.Url;\n }\n}\nclass SafeResourceUrlImpl extends SafeValueImpl implements SafeResourceUrl {\n override getTypeName() {\n return BypassType.ResourceUrl;\n }\n}\n\nexport function unwrapSafeValue(value: SafeValue): string;\nexport function unwrapSafeValue<T>(value: T): T;\nexport function unwrapSafeValue<T>(value: T | SafeValue): T {\n return value instanceof SafeValueImpl\n ? (value.changingThisBreaksApplicationSecurity as any as T)\n : (value as any as T);\n}\n\nexport function allowSanitizationBypassAndThrow(\n value: any,\n type: BypassType.Html,\n): value is SafeHtml;\nexport function allowSanitizationBypassAndThrow(\n value: any,\n type: BypassType.ResourceUrl,\n): value is SafeResourceUrl;\nexport function allowSanitizationBypassAndThrow(\n value: any,\n type: BypassType.Script,\n): value is SafeScript;\nexport function allowSanitizationBypassAndThrow(\n value: any,\n type: BypassType.Style,\n): value is SafeStyle;\nexport function allowSanitizationBypassAndThrow(value: any, type: BypassType.Url): value is SafeUrl;\nexport function allowSanitizationBypassAndThrow(value: any, type: BypassType): boolean;\nexport function allowSanitizationBypassAndThrow(value: any, type: BypassType): boolean {\n const actualType = getSanitizationBypassType(value);\n if (actualType != null && actualType !== type) {\n // Allow ResourceURLs in URL contexts, they are strictly more trusted.\n if (actualType === BypassType.ResourceUrl && type === BypassType.Url) return true;\n throw new Error(`Required a safe ${type}, got a ${actualType} (see ${XSS_SECURITY_URL})`);\n }\n return actualType === type;\n}\n\nexport function getSanitizationBypassType(value: any): BypassType | null {\n return (value instanceof SafeValueImpl && (value.getTypeName() as BypassType)) || null;\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` which has been branded to be implicitly trusted.\n */\nexport function bypassSanitizationTrustHtml(trustedHtml: string): SafeHtml {\n return new SafeHtmlImpl(trustedHtml);\n}\n/**\n * Mark `style` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link styleSanitizer} to be trusted implicitly.\n *\n * @param trustedStyle `style` string which needs to be implicitly trusted.\n * @returns a `style` hich has been branded to be implicitly trusted.\n */\nexport function bypassSanitizationTrustStyle(trustedStyle: string): SafeStyle {\n return new SafeStyleImpl(trustedStyle);\n}\n/**\n * Mark `script` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link scriptSanitizer} to be trusted implicitly.\n *\n * @param trustedScript `script` string which needs to be implicitly trusted.\n * @returns a `script` which has been branded to be implicitly trusted.\n */\nexport function bypassSanitizationTrustScript(trustedScript: string): SafeScript {\n return new SafeScriptImpl(trustedScript);\n}\n/**\n * Mark `url` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link urlSanitizer} to be trusted implicitly.\n *\n * @param trustedUrl `url` string which needs to be implicitly trusted.\n * @returns a `url` which has been branded to be implicitly trusted.\n */\nexport function bypassSanitizationTrustUrl(trustedUrl: string): SafeUrl {\n return new SafeUrlImpl(trustedUrl);\n}\n/**\n * Mark `url` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link resourceUrlSanitizer} to be trusted implicitly.\n *\n * @param trustedResourceUrl `url` string which needs to be implicitly trusted.\n * @returns a `url` which has been branded to be implicitly trusted.\n */\nexport function bypassSanitizationTrustResourceUrl(trustedResourceUrl: string): SafeResourceUrl {\n return new SafeResourceUrlImpl(trustedResourceUrl);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {trustedHTMLFromString} from '../util/security/trusted_types';\n\n/**\n * This helper is used to get hold of an inert tree of DOM elements containing dirty HTML\n * that needs sanitizing.\n * Depending upon browser support we use one of two strategies for doing this.\n * Default: DOMParser strategy\n * Fallback: InertDocument strategy\n */\nexport function getInertBodyHelper(defaultDoc: Document): InertBodyHelper {\n const inertDocumentHelper = new InertDocumentHelper(defaultDoc);\n return isDOMParserAvailable() ? new DOMParserHelper(inertDocumentHelper) : inertDocumentHelper;\n}\n\nexport interface InertBodyHelper {\n /**\n * Get an inert DOM element containing DOM created from the dirty HTML string provided.\n */\n getInertBodyElement: (html: string) => HTMLElement | null;\n}\n\n/**\n * Uses DOMParser to create and fill an inert body element.\n * This is the default strategy used in browsers that support it.\n */\nclass DOMParserHelper implements InertBodyHelper {\n constructor(private inertDocumentHelper: InertBodyHelper) {}\n\n getInertBodyElement(html: string): HTMLElement | null {\n // We add these extra elements to ensure that the rest of the content is parsed as expected\n // e.g. leading whitespace is maintained and tags like `<meta>` do not get hoisted to the\n // `<head>` tag. Note that the `<body>` tag is closed implicitly to prevent unclosed tags\n // in `html` from consuming the otherwise explicit `</body>` tag.\n html = '<body><remove></remove>' + html;\n try {\n const body = new window.DOMParser().parseFromString(\n trustedHTMLFromString(html) as string,\n 'text/html',\n ).body as HTMLBodyElement;\n if (body === null) {\n // In some browsers (e.g. Mozilla/5.0 iPad AppleWebKit Mobile) the `body` property only\n // becomes available in the following tick of the JS engine. In that case we fall back to\n // the `inertDocumentHelper` instead.\n return this.inertDocumentHelper.getInertBodyElement(html);\n }\n body.firstChild?.remove();\n return body;\n } catch {\n return null;\n }\n }\n}\n\n/**\n * Use an HTML5 `template` element to create and fill an inert DOM element.\n * This is the fallback strategy if the browser does not support DOMParser.\n */\nclass InertDocumentHelper implements InertBodyHelper {\n private inertDocument: Document;\n\n constructor(private defaultDoc: Document) {\n this.inertDocument = this.defaultDoc.implementation.createHTMLDocument('sanitization-inert');\n }\n\n getInertBodyElement(html: string): HTMLElement | null {\n const templateEl = this.inertDocument.createElement('template');\n templateEl.innerHTML = trustedHTMLFromString(html) as string;\n return templateEl;\n }\n}\n\n/**\n * We need to determine whether the DOMParser exists in the global context and\n * supports parsing HTML; HTML parsing support is not as wide as other formats, see\n * https://developer.mozilla.org/en-US/docs/Web/API/DOMParser#Browser_compatibility.\n *\n * @suppress {uselessCode}\n */\nexport function isDOMParserAvailable() {\n try {\n return !!new window.DOMParser().parseFromString(\n trustedHTMLFromString('') as string,\n 'text/html',\n );\n } catch {\n return false;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {XSS_SECURITY_URL} from '../error_details_base_url';\n\n/**\n * A pattern that recognizes URLs that are safe wrt. XSS in URL navigation\n * contexts.\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:\n * (1) Either a protocol that is not javascript:, and that has valid characters\n * (alphanumeric or [+-.]).\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 */\nconst SAFE_URL_PATTERN = /^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\\/?#]*(?:[\\/?#]|$))/i;\nexport function _sanitizeUrl(url: string): string {\n url = String(url);\n if (url.match(SAFE_URL_PATTERN)) return url;\n\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n console.warn(`WARNING: sanitizing unsafe URL value ${url} (see ${XSS_SECURITY_URL})`);\n }\n\n return 'unsafe:' + url;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {XSS_SECURITY_URL} from '../error_details_base_url';\nimport {TrustedHTML} from '../util/security/trusted_type_defs';\nimport {trustedHTMLFromString} from '../util/security/trusted_types';\n\nimport {getInertBodyHelper, InertBodyHelper} from './inert_body';\nimport {_sanitizeUrl} from './url_sanitizer';\n\nfunction tagSet(tags: string): {[k: string]: boolean} {\n const res: {[k: string]: boolean} = {};\n for (const t of tags.split(',')) res[t] = true;\n return res;\n}\n\nfunction merge(...sets: {[k: string]: boolean}[]): {[k: string]: boolean} {\n const res: {[k: string]: boolean} = {};\n for (const s of sets) {\n for (const v in s) {\n if (s.hasOwnProperty(v)) res[v] = true;\n }\n }\n return res;\n}\n\n// Good source of info about elements and attributes\n// https://html.spec.whatwg.org/#semantics\n// https://simon.html5.org/html-elements\n\n// Safe Void Elements - HTML5\n// https://html.spec.whatwg.org/#void-elements\nconst VOID_ELEMENTS = tagSet('area,br,col,hr,img,wbr');\n\n// Elements that you can, intentionally, leave open (and which close themselves)\n// https://html.spec.whatwg.org/#optional-tags\nconst OPTIONAL_END_TAG_BLOCK_ELEMENTS = tagSet('colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr');\nconst OPTIONAL_END_TAG_INLINE_ELEMENTS = tagSet('rp,rt');\nconst OPTIONAL_END_TAG_ELEMENTS = merge(\n OPTIONAL_END_TAG_INLINE_ELEMENTS,\n OPTIONAL_END_TAG_BLOCK_ELEMENTS,\n);\n\n// Safe Block Elements - HTML5\nconst BLOCK_ELEMENTS = merge(\n OPTIONAL_END_TAG_BLOCK_ELEMENTS,\n tagSet(\n '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 ),\n);\n\n// Inline Elements - HTML5\nconst INLINE_ELEMENTS = merge(\n OPTIONAL_END_TAG_INLINE_ELEMENTS,\n tagSet(\n 'a,abbr,acronym,audio,b,' +\n 'bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,' +\n 'samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video',\n ),\n);\n\nexport const VALID_ELEMENTS: {[k: string]: boolean} = merge(\n VOID_ELEMENTS,\n BLOCK_ELEMENTS,\n INLINE_ELEMENTS,\n OPTIONAL_END_TAG_ELEMENTS,\n);\n\n// Attributes that have href and hence need to be sanitized\nexport const URI_ATTRS: {[k: string]: boolean} = tagSet(\n 'background,cite,href,itemtype,longdesc,poster,src,xlink:href',\n);\n\nconst HTML_ATTRS = tagSet(\n '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,srcset,start,summary,tabindex,target,title,translate,type,usemap,' +\n 'valign,value,vspace,width',\n);\n\n// Accessibility attributes as per WAI-ARIA 1.1 (W3C Working Draft 14 December 2018)\nconst ARIA_ATTRS = tagSet(\n 'aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,' +\n 'aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,' +\n 'aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,' +\n 'aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,' +\n 'aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,' +\n 'aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,' +\n 'aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext',\n);\n\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\n// NB: Sanitization does not allow <form> elements or other active elements (<button> etc). Those\n// can be sanitized, but they increase security surface area without a legitimate use case, so they\n// are left out here.\n\nexport const VALID_ATTRS: {[k: string]: boolean} = merge(URI_ATTRS, HTML_ATTRS, ARIA_ATTRS);\n\n// Elements whose content should not be traversed/preserved, if the elements themselves are invalid.\n//\n// Typically, `<invalid>Some content</invalid>` would traverse (and in this case preserve)\n// `Some content`, but strip `invalid-element` opening/closing tags. For some elements, though, we\n// don't want to preserve the content, if the elements themselves are going to be removed.\nconst SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS = tagSet('script,style,template');\n\n/**\n * SanitizingHtmlSerializer serializes a DOM fragment, stripping out any unsafe elements and unsafe\n * attributes.\n */\nclass SanitizingHtmlSerializer {\n // Explicitly track if something was stripped, to avoid accidentally warning of sanitization just\n // because characters were re-encoded.\n public sanitizedSomething = false;\n private buf: string[] = [];\n\n sanitizeChildren(el: Element): string {\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 let current: Node = el.firstChild!;\n let traverseContent = true;\n let parentNodes = [];\n while (current) {\n if (current.nodeType === Node.ELEMENT_NODE) {\n traverseContent = this.startElement(current as Element);\n } else if (current.nodeType === Node.TEXT_NODE) {\n this.chars(current.nodeValue!);\n } else {\n // Strip non-element, non-text nodes.\n this.sanitizedSomething = true;\n }\n if (traverseContent && current.firstChild) {\n // Push current node to the parent stack before entering its content.\n parentNodes.push(current);\n current = getFirstChild(current)!;\n continue;\n }\n while (current) {\n // Leaving the element.\n // Walk up and to the right, closing tags as we go.\n if (current.nodeType === Node.ELEMENT_NODE) {\n this.endElement(current as Element);\n }\n\n let next = getNextSibling(current)!;\n\n if (next) {\n current = next;\n break;\n }\n\n // There was no next sibling, walk up to the parent node (extract it from the stack).\n current = parentNodes.pop()!;\n }\n }\n return this.buf.join('');\n }\n\n /**\n * Sanitizes an opening element tag (if valid) and returns whether the element's contents should\n * be traversed. Element content must always be traversed (even if the element itself is not\n * valid/safe), unless the element is one of `SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS`.\n *\n * @param element The element to sanitize.\n * @return True if the element's contents should be traversed.\n */\n private startElement(element: Element): boolean {\n const tagName = getNodeName(element).toLowerCase();\n if (!VALID_ELEMENTS.hasOwnProperty(tagName)) {\n this.sanitizedSomething = true;\n return !SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS.hasOwnProperty(tagName);\n }\n this.buf.push('<');\n this.buf.push(tagName);\n const elAttrs = element.attributes;\n for (let i = 0; i < elAttrs.length; i++) {\n const elAttr = elAttrs.item(i);\n const attrName = elAttr!.name;\n const lower = attrName.toLowerCase();\n if (!VALID_ATTRS.hasOwnProperty(lower)) {\n this.sanitizedSomething = true;\n continue;\n }\n let value = elAttr!.value;\n // TODO(martinprobst): Special case image URIs for data:image/...\n if (URI_ATTRS[lower]) value = _sanitizeUrl(value);\n this.buf.push(' ', attrName, '=\"', encodeEntities(value), '\"');\n }\n this.buf.push('>');\n return true;\n }\n\n private endElement(current: Element) {\n const tagName = getNodeName(current).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\n private chars(chars: string) {\n this.buf.push(encodeEntities(chars));\n }\n}\n\n/**\n * Verifies whether a given child node is a descendant of a given parent node.\n * It may not be the case when properties like `.firstChild` are clobbered and\n * accessing `.firstChild` results in an unexpected node returned.\n */\nfunction isClobberedElement(parentNode: Node, childNode: Node): boolean {\n return (\n (parentNode.compareDocumentPosition(childNode) & Node.DOCUMENT_POSITION_CONTAINED_BY) !==\n Node.DOCUMENT_POSITION_CONTAINED_BY\n );\n}\n\n/**\n * Retrieves next sibling node and makes sure that there is no\n * clobbering of the `nextSibling` property happening.\n */\nfunction getNextSibling(node: Node): Node | null {\n const nextSibling = node.nextSibling;\n // Make sure there is no `nextSibling` clobbering: navigating to\n // the next sibling and going back to the previous one should result\n // in the original node.\n if (nextSibling && node !== nextSibling.previousSibling) {\n throw clobberedElementError(nextSibling);\n }\n return nextSibling;\n}\n\n/**\n * Retrieves first child node and makes sure that there is no\n * clobbering of the `firstChild` property happening.\n */\nfunction getFirstChild(node: Node): Node | null {\n const firstChild = node.firstChild;\n if (firstChild && isClobberedElement(node, firstChild)) {\n throw clobberedElementError(firstChild);\n }\n return firstChild;\n}\n\n/** Gets a reasonable nodeName, even for clobbered nodes. */\nexport function getNodeName(node: Node): string {\n const nodeName = node.nodeName;\n // If the property is clobbered, assume it is an `HTMLFormElement`.\n return typeof nodeName === 'string' ? nodeName : 'FORM';\n}\n\nfunction clobberedElementError(node: Node) {\n return new Error(\n `Failed to sanitize html because the element is clobbered: ${(node as Element).outerHTML}`,\n );\n}\n\n// Regular Expressions for parsing tags and attributes\nconst SURROGATE_PAIR_REGEXP = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g;\n// ! to ~ is the ASCII range.\nconst NON_ALPHANUMERIC_REGEXP = /([^\\#-~ |!])/g;\n\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: string) {\n return value\n .replace(/&/g, '&amp;')\n .replace(SURROGATE_PAIR_REGEXP, function (match: string) {\n const hi = match.charCodeAt(0);\n const low = match.charCodeAt(1);\n return '&#' + ((hi - 0xd800) * 0x400 + (low - 0xdc00) + 0x10000) + ';';\n })\n .replace(NON_ALPHANUMERIC_REGEXP, function (match: string) {\n return '&#' + match.charCodeAt(0) + ';';\n })\n .replace(/</g, '&lt;')\n .replace(/>/g, '&gt;');\n}\n\nlet inertBodyHelper: InertBodyHelper;\n\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 */\nexport function _sanitizeHtml(defaultDoc: any, unsafeHtmlInput: string): TrustedHTML | string {\n let inertBodyElement: HTMLElement | null = null;\n try {\n inertBodyHelper = inertBodyHelper || getInertBodyHelper(defaultDoc);\n // Make sure unsafeHtml is actually a string (TypeScript types are not enforced at runtime).\n let unsafeHtml = unsafeHtmlInput ? String(unsafeHtmlInput) : '';\n inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeHtml);\n\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 let mXSSAttempts = 5;\n let parsedHtml = unsafeHtml;\n\n do {\n if (mXSSAttempts === 0) {\n throw new Error('Failed to sanitize html because the input is unstable');\n }\n mXSSAttempts--;\n\n unsafeHtml = parsedHtml;\n parsedHtml = inertBodyElement!.innerHTML;\n inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeHtml);\n } while (unsafeHtml !== parsedHtml);\n\n const sanitizer = new SanitizingHtmlSerializer();\n const safeHtml = sanitizer.sanitizeChildren(\n (getTemplateContent(inertBodyElement!) as Element) || inertBodyElement,\n );\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && sanitizer.sanitizedSomething) {\n console.warn(`WARNING: sanitizing HTML stripped some content, see ${XSS_SECURITY_URL}`);\n }\n\n return trustedHTMLFromString(safeHtml);\n } finally {\n // In case anything goes wrong, clear out inertElement to reset the entire DOM structure.\n if (inertBodyElement) {\n const parent = getTemplateContent(inertBodyElement) || inertBodyElement;\n while (parent.firstChild) {\n parent.firstChild.remove();\n }\n }\n }\n}\n\nexport function getTemplateContent(el: Node): Node | null {\n return 'content' in (el as any) /** Microsoft/TypeScript#21517 */ && isTemplateElement(el)\n ? el.content\n : null;\n}\nfunction isTemplateElement(el: Node): el is HTMLTemplateElement {\n return el.nodeType === Node.ELEMENT_NODE && el.nodeName === 'TEMPLATE';\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\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 * @publicApi\n */\nexport enum SecurityContext {\n NONE = 0,\n HTML = 1,\n STYLE = 2,\n SCRIPT = 3,\n URL = 4,\n RESOURCE_URL = 5,\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {XSS_SECURITY_URL} from '../error_details_base_url';\nimport {RuntimeError, RuntimeErrorCode} from '../errors';\nimport {getDocument} from '../render3/interfaces/document';\nimport {ENVIRONMENT} from '../render3/interfaces/view';\nimport {getLView} from '../render3/state';\nimport {renderStringify} from '../render3/util/stringify_utils';\nimport {TrustedHTML, TrustedScript, TrustedScriptURL} from '../util/security/trusted_type_defs';\nimport {trustedHTMLFromString, trustedScriptURLFromString} from '../util/security/trusted_types';\nimport {\n trustedHTMLFromStringBypass,\n trustedScriptFromStringBypass,\n trustedScriptURLFromStringBypass,\n} from '../util/security/trusted_types_bypass';\n\nimport {allowSanitizationBypassAndThrow, BypassType, unwrapSafeValue} from './bypass';\nimport {_sanitizeHtml as _sanitizeHtml} from './html_sanitizer';\nimport {Sanitizer} from './sanitizer';\nimport {SecurityContext} from './security';\nimport {_sanitizeUrl as _sanitizeUrl} from './url_sanitizer';\n\n/**\n * An `html` sanitizer which converts untrusted `html` **string** into trusted string by removing\n * dangerous content.\n *\n * This method parses the `html` and locates potentially dangerous content (such as urls and\n * javascript) and removes it.\n *\n * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustHtml}.\n *\n * @param unsafeHtml untrusted `html`, typically from the user.\n * @returns `html` string which is safe to display to user, because all of the dangerous javascript\n * and urls have been removed.\n *\n * @codeGenApi\n */\nexport function ɵɵsanitizeHtml(unsafeHtml: any): TrustedHTML | string {\n const sanitizer = getSanitizer();\n if (sanitizer) {\n return trustedHTMLFromStringBypass(sanitizer.sanitize(SecurityContext.HTML, unsafeHtml) || '');\n }\n if (allowSanitizationBypassAndThrow(unsafeHtml, BypassType.Html)) {\n return trustedHTMLFromStringBypass(unwrapSafeValue(unsafeHtml));\n }\n return _sanitizeHtml(getDocument(), renderStringify(unsafeHtml));\n}\n\n/**\n * A `style` sanitizer which converts untrusted `style` **string** into trusted string by removing\n * dangerous content.\n *\n * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustStyle}.\n *\n * @param unsafeStyle untrusted `style`, typically from the user.\n * @returns `style` string which is safe to bind to the `style` properties.\n *\n * @codeGenApi\n */\nexport function ɵɵsanitizeStyle(unsafeStyle: any): string {\n const sanitizer = getSanitizer();\n if (sanitizer) {\n return sanitizer.sanitize(SecurityContext.STYLE, unsafeStyle) || '';\n }\n if (allowSanitizationBypassAndThrow(unsafeStyle, BypassType.Style)) {\n return unwrapSafeValue(unsafeStyle);\n }\n return renderStringify(unsafeStyle);\n}\n\n/**\n * A `url` sanitizer which converts untrusted `url` **string** into trusted string by removing\n * dangerous\n * content.\n *\n * This method parses the `url` and locates potentially dangerous content (such as javascript) and\n * removes it.\n *\n * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustUrl}.\n *\n * @param unsafeUrl untrusted `url`, typically from the user.\n * @returns `url` string which is safe to bind to the `src` properties such as `<img src>`, because\n * all of the dangerous javascript has been removed.\n *\n * @codeGenApi\n */\nexport function ɵɵsanitizeUrl(unsafeUrl: any): string {\n const sanitizer = getSanitizer();\n if (sanitizer) {\n return sanitizer.sanitize(SecurityContext.URL, unsafeUrl) || '';\n }\n if (allowSanitizationBypassAndThrow(unsafeUrl, BypassType.Url)) {\n return unwrapSafeValue(unsafeUrl);\n }\n return _sanitizeUrl(renderStringify(unsafeUrl));\n}\n\n/**\n * A `url` sanitizer which only lets trusted `url`s through.\n *\n * This passes only `url`s marked trusted by calling {@link bypassSanitizationTrustResourceUrl}.\n *\n * @param unsafeResourceUrl untrusted `url`, typically from the user.\n * @returns `url` string which is safe to bind to the `src` properties such as `<img src>`, because\n * only trusted `url`s have been allowed to pass.\n *\n * @codeGenApi\n */\nexport function ɵɵsanitizeResourceUrl(unsafeResourceUrl: any): TrustedScriptURL | string {\n const sanitizer = getSanitizer();\n if (sanitizer) {\n return trustedScriptURLFromStringBypass(\n sanitizer.sanitize(SecurityContext.RESOURCE_URL, unsafeResourceUrl) || '',\n );\n }\n if (allowSanitizationBypassAndThrow(unsafeResourceUrl, BypassType.ResourceUrl)) {\n return trustedScriptURLFromStringBypass(unwrapSafeValue(unsafeResourceUrl));\n }\n throw new RuntimeError(\n RuntimeErrorCode.UNSAFE_VALUE_IN_RESOURCE_URL,\n ngDevMode && `unsafe value used in a resource URL context (see ${XSS_SECURITY_URL})`,\n );\n}\n\n/**\n * A `script` sanitizer which only lets trusted javascript through.\n *\n * This passes only `script`s marked trusted by calling {@link\n * bypassSanitizationTrustScript}.\n *\n * @param unsafeScript untrusted `script`, typically from the user.\n * @returns `url` string which is safe to bind to the `<script>` element such as `<img src>`,\n * because only trusted `scripts` have been allowed to pass.\n *\n * @codeGenApi\n */\nexport function ɵɵsanitizeScript(unsafeScript: any): TrustedScript | string {\n const sanitizer = getSanitizer();\n if (sanitizer) {\n return trustedScriptFromStringBypass(\n sanitizer.sanitize(SecurityContext.SCRIPT, unsafeScript) || '',\n );\n }\n if (allowSanitizationBypassAndThrow(unsafeScript, BypassType.Script)) {\n return trustedScriptFromStringBypass(unwrapSafeValue(unsafeScript));\n }\n throw new RuntimeError(\n RuntimeErrorCode.UNSAFE_VALUE_IN_SCRIPT,\n ngDevMode && 'unsafe value used in a script context',\n );\n}\n\n/**\n * A template tag function for promoting the associated constant literal to a\n * TrustedHTML. Interpolation is explicitly not allowed.\n *\n * @param html constant template literal containing trusted HTML.\n * @returns TrustedHTML wrapping `html`.\n *\n * @security This is a security-sensitive function and should only be used to\n * convert constant values of attributes and properties found in\n * application-provided Angular templates to TrustedHTML.\n *\n * @codeGenApi\n */\nexport function ɵɵtrustConstantHtml(html: TemplateStringsArray): TrustedHTML | string {\n // The following runtime check ensures that the function was called as a\n // template tag (e.g. ɵɵtrustConstantHtml`content`), without any interpolation\n // (e.g. not ɵɵtrustConstantHtml`content ${variable}`). A TemplateStringsArray\n // is an array with a `raw` property that is also an array. The associated\n // template literal has no interpolation if and only if the length of the\n // TemplateStringsArray is 1.\n if (ngDevMode && (!Array.isArray(html) || !Array.isArray(html.raw) || html.length !== 1)) {\n throw new Error(`Unexpected interpolation in trusted HTML constant: ${html.join('?')}`);\n }\n return trustedHTMLFromString(html[0]);\n}\n\n/**\n * A template tag function for promoting the associated constant literal to a\n * TrustedScriptURL. Interpolation is explicitly not allowed.\n *\n * @param url constant template literal containing a trusted script URL.\n * @returns TrustedScriptURL wrapping `url`.\n *\n * @security This is a security-sensitive function and should only be used to\n * convert constant values of attributes and properties found in\n * application-provided Angular templates to TrustedScriptURL.\n *\n * @codeGenApi\n */\nexport function ɵɵtrustConstantResourceUrl(url: TemplateStringsArray): TrustedScriptURL | string {\n // The following runtime check ensures that the function was called as a\n // template tag (e.g. ɵɵtrustConstantResourceUrl`content`), without any\n // interpolation (e.g. not ɵɵtrustConstantResourceUrl`content ${variable}`). A\n // TemplateStringsArray is an array with a `raw` property that is also an\n // array. The associated template literal has no interpolation if and only if\n // the length of the TemplateStringsArray is 1.\n if (ngDevMode && (!Array.isArray(url) || !Array.isArray(url.raw) || url.length !== 1)) {\n throw new Error(`Unexpected interpolation in trusted URL constant: ${url.join('?')}`);\n }\n return trustedScriptURLFromString(url[0]);\n}\n\n/**\n * Detects which sanitizer to use for URL property, based on tag name and prop name.\n *\n * The rules are based on the RESOURCE_URL context config from\n * `packages/compiler/src/schema/dom_security_schema.ts`.\n * If tag and prop names don't match Resource URL schema, use URL sanitizer.\n */\nexport function getUrlSanitizer(tag: string, prop: string) {\n if (\n (prop === 'src' &&\n (tag === 'embed' ||\n tag === 'frame' ||\n tag === 'iframe' ||\n tag === 'media' ||\n tag === 'script')) ||\n (prop === 'href' && (tag === 'base' || tag === 'link'))\n ) {\n return ɵɵsanitizeResourceUrl;\n }\n return ɵɵsanitizeUrl;\n}\n\n/**\n * Sanitizes URL, selecting sanitizer function based on tag and property names.\n *\n * This function is used in case we can't define security context at compile time, when only prop\n * name is available. This happens when we generate host bindings for Directives/Components. The\n * host element is unknown at compile time, so we defer calculation of specific sanitizer to\n * runtime.\n *\n * @param unsafeUrl untrusted `url`, typically from the user.\n * @param tag target element tag name.\n * @param prop name of the property that contains the value.\n * @returns `url` string which is safe to bind.\n *\n * @codeGenApi\n */\nexport function ɵɵsanitizeUrlOrResourceUrl(unsafeUrl: any, tag: string, prop: string): any {\n return getUrlSanitizer(tag, prop)(unsafeUrl);\n}\n\nexport function validateAgainstEventProperties(name: string) {\n if (name.toLowerCase().startsWith('on')) {\n const errorMessage =\n `Binding to event property '${name}' is disallowed for security reasons, ` +\n `please use (${name.slice(2)})=...` +\n `\\nIf '${name}' is a directive input, make sure the directive is imported by the` +\n ` current module.`;\n throw new RuntimeError(RuntimeErrorCode.INVALID_EVENT_BINDING, errorMessage);\n }\n}\n\nexport function validateAgainstEventAttributes(name: string) {\n if (name.toLowerCase().startsWith('on')) {\n const errorMessage =\n `Binding to event attribute '${name}' is disallowed for security reasons, ` +\n `please use (${name.slice(2)})=...`;\n throw new RuntimeError(RuntimeErrorCode.INVALID_EVENT_BINDING, errorMessage);\n }\n}\n\nfunction getSanitizer(): Sanitizer | null {\n const lView = getLView();\n return lView && lView[ENVIRONMENT].sanitizer;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/**\n * Disallowed strings in the comment.\n *\n * see: https://html.spec.whatwg.org/multipage/syntax.html#comments\n */\nconst COMMENT_DISALLOWED = /^>|^->|<!--|-->|--!>|<!-$/g;\n/**\n * Delimiter in the disallowed strings which needs to be wrapped with zero with character.\n */\nconst COMMENT_DELIMITER = /(<|>)/g;\nconst COMMENT_DELIMITER_ESCAPED = '\\u200B$1\\u200B';\n\n/**\n * Escape the content of comment strings so that it can be safely inserted into a comment node.\n *\n * The issue is that HTML does not specify any way to escape comment end text inside the comment.\n * Consider: `<!-- The way you close a comment is with \">\", and \"->\" at the beginning or by \"-->\" or\n * \"--!>\" at the end. -->`. Above the `\"-->\"` is meant to be text not an end to the comment. This\n * can be created programmatically through DOM APIs. (`<!--` are also disallowed.)\n *\n * see: https://html.spec.whatwg.org/multipage/syntax.html#comments\n *\n * ```ts\n * div.innerHTML = div.innerHTML\n * ```\n *\n * One would expect that the above code would be safe to do, but it turns out that because comment\n * text is not escaped, the comment may contain text which will prematurely close the comment\n * opening up the application for XSS attack. (In SSR we programmatically create comment nodes which\n * may contain such text and expect them to be safe.)\n *\n * This function escapes the comment text by looking for comment delimiters (`<` and `>`) and\n * surrounding them with `_>_` where the `_` is a zero width space `\\u200B`. The result is that if a\n * comment contains any of the comment start/end delimiters (such as `<!--`, `-->` or `--!>`) the\n * text it will render normally but it will not cause the HTML parser to close/open the comment.\n *\n * @param value text to make safe for comment node by escaping the comment open/close character\n * sequence.\n */\nexport function escapeCommentText(value: string): string {\n return value.replace(COMMENT_DISALLOWED, (text) =>\n text.replace(COMMENT_DELIMITER, COMMENT_DELIMITER_ESCAPED),\n );\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nexport function normalizeDebugBindingName(name: string) {\n // Attribute names with `$` (eg `x-y$`) are valid per spec, but unsupported by some browsers\n name = camelCaseToDashCase(name.replace(/[$@]/g, '_'));\n return `ng-reflect-${name}`;\n}\n\nconst CAMEL_CASE_REGEXP = /([A-Z])/g;\n\nfunction camelCaseToDashCase(input: string): string {\n return input.replace(CAMEL_CASE_REGEXP, (...m: any[]) => '-' + m[1].toLowerCase());\n}\n\nexport function normalizeDebugBindingValue(value: any): string {\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 } catch (e) {\n return '[ERROR] Exception while trying to serialize the value';\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/**\n * A schema definition associated with a component or an NgModule.\n *\n * @see {@link NgModule}\n * @see {@link CUSTOM_ELEMENTS_SCHEMA}\n * @see {@link NO_ERRORS_SCHEMA}\n *\n * @param name The name of a defined schema.\n *\n * @publicApi\n */\nexport interface SchemaMetadata {\n name: string;\n}\n\n/**\n * Defines a schema that allows an NgModule to contain the following:\n * - Non-Angular elements named with dash case (`-`).\n * - Element properties named with dash case (`-`).\n * Dash case is the naming convention for custom elements.\n *\n * @publicApi\n */\nexport const CUSTOM_ELEMENTS_SCHEMA: SchemaMetadata = {\n name: 'custom-elements',\n};\n\n/**\n * Defines a schema that allows any property on any element.\n *\n * This schema allows you to ignore the errors related to any unknown elements or properties in a\n * template. The usage of this schema is generally discouraged because it prevents useful validation\n * and may hide real errors in your template. Consider using the `CUSTOM_ELEMENTS_SCHEMA` instead.\n *\n * @publicApi\n */\nexport const NO_ERRORS_SCHEMA: SchemaMetadata = {\n name: 'no-errors-schema',\n};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {formatRuntimeError, RuntimeError, RuntimeErrorCode} from '../../errors';\nimport {Type} from '../../interface/type';\nimport {CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA, SchemaMetadata} from '../../metadata/schema';\nimport {throwError} from '../../util/assert';\nimport {getComponentDef} from '../def_getters';\nimport {ComponentDef} from '../interfaces/definition';\nimport {TNodeType} from '../interfaces/node';\nimport {RComment, RElement} from '../interfaces/renderer_dom';\nimport {CONTEXT, DECLARATION_COMPONENT_VIEW, LView} from '../interfaces/view';\nimport {isAnimationProp} from '../util/attrs_utils';\n\nlet shouldThrowErrorOnUnknownElement = false;\n\n/**\n * Sets a strict mode for JIT-compiled components to throw an error on unknown elements,\n * instead of just logging the error.\n * (for AOT-compiled ones this check happens at build time).\n */\nexport function ɵsetUnknownElementStrictMode(shouldThrow: boolean) {\n shouldThrowErrorOnUnknownElement = shouldThrow;\n}\n\n/**\n * Gets the current value of the strict mode.\n */\nexport function ɵgetUnknownElementStrictMode() {\n return shouldThrowErrorOnUnknownElement;\n}\n\nlet shouldThrowErrorOnUnknownProperty = false;\n\n/**\n * Sets a strict mode for JIT-compiled components to throw an error on unknown properties,\n * instead of just logging the error.\n * (for AOT-compiled ones this check happens at build time).\n */\nexport function ɵsetUnknownPropertyStrictMode(shouldThrow: boolean) {\n shouldThrowErrorOnUnknownProperty = shouldThrow;\n}\n\n/**\n * Gets the current value of the strict mode.\n */\nexport function ɵgetUnknownPropertyStrictMode() {\n return shouldThrowErrorOnUnknownProperty;\n}\n\n/**\n * Validates that the element is known at runtime and produces\n * an error if it's not the case.\n * This check is relevant for JIT-compiled components (for AOT-compiled\n * ones this check happens at build time).\n *\n * The element is considered known if either:\n * - it's a known HTML element\n * - it's a known custom element\n * - the element matches any directive\n * - the element is allowed by one of the schemas\n *\n * @param element Element to validate\n * @param lView An `LView` that represents a current component that is being rendered\n * @param tagName Name of the tag to check\n * @param schemas Array of schemas\n * @param hasDirectives Boolean indicating that the element matches any directive\n */\nexport function validateElementIsKnown(\n element: RElement,\n lView: LView,\n tagName: string | null,\n schemas: SchemaMetadata[] | null,\n hasDirectives: boolean,\n): void {\n // If `schemas` is set to `null`, that's an indication that this Component was compiled in AOT\n // mode where this check happens at compile time. In JIT mode, `schemas` is always present and\n // defined as an array (as an empty array in case `schemas` field is not defined) and we should\n // execute the check below.\n if (schemas === null) return;\n\n // If the element matches any directive, it's considered as valid.\n if (!hasDirectives && tagName !== null) {\n // The element is unknown if it's an instance of HTMLUnknownElement, or it isn't registered\n // as a custom element. Note that unknown elements with a dash in their name won't be instances\n // of HTMLUnknownElement in browsers that support web components.\n const isUnknown =\n // Note that we can't check for `typeof HTMLUnknownElement === 'function'` because\n // Domino doesn't expose HTMLUnknownElement globally.\n (typeof HTMLUnknownElement !== 'undefined' &&\n HTMLUnknownElement &&\n element instanceof HTMLUnknownElement) ||\n (typeof customElements !== 'undefined' &&\n tagName.indexOf('-') > -1 &&\n !customElements.get(tagName));\n\n if (isUnknown && !matchingSchemas(schemas, tagName)) {\n const isHostStandalone = isHostComponentStandalone(lView);\n const templateLocation = getTemplateLocationDetails(lView);\n const schemas = `'${isHostStandalone ? '@Component' : '@NgModule'}.schemas'`;\n\n let message = `'${tagName}' is not a known element${templateLocation}:\\n`;\n message += `1. If '${tagName}' is an Angular component, then verify that it is ${\n isHostStandalone\n ? \"included in the '@Component.imports' of this component\"\n : 'a part of an @NgModule where this component is declared'\n }.\\n`;\n if (tagName && tagName.indexOf('-') > -1) {\n message += `2. If '${tagName}' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the ${schemas} of this component to suppress this message.`;\n } else {\n message += `2. To allow any element add 'NO_ERRORS_SCHEMA' to the ${schemas} of this component.`;\n }\n if (shouldThrowErrorOnUnknownElement) {\n throw new RuntimeError(RuntimeErrorCode.UNKNOWN_ELEMENT, message);\n } else {\n console.error(formatRuntimeError(RuntimeErrorCode.UNKNOWN_ELEMENT, message));\n }\n }\n }\n}\n\n/**\n * Validates that the property of the element is known at runtime and returns\n * false if it's not the case.\n * This check is relevant for JIT-compiled components (for AOT-compiled\n * ones this check happens at build time).\n *\n * The property is considered known if either:\n * - it's a known property of the element\n * - the element is allowed by one of the schemas\n * - the property is used for animations\n *\n * @param element Element to validate\n * @param propName Name of the property to check\n * @param tagName Name of the tag hosting the property\n * @param schemas Array of schemas\n */\nexport function isPropertyValid(\n element: RElement | RComment,\n propName: string,\n tagName: string | null,\n schemas: SchemaMetadata[] | null,\n): boolean {\n // If `schemas` is set to `null`, that's an indication that this Component was compiled in AOT\n // mode where this check happens at compile time. In JIT mode, `schemas` is always present and\n // defined as an array (as an empty array in case `schemas` field is not defined) and we should\n // execute the check below.\n if (schemas === null) return true;\n\n // The property is considered valid if the element matches the schema, it exists on the element,\n // or it is synthetic.\n if (matchingSchemas(schemas, tagName) || propName in element || isAnimationProp(propName)) {\n return true;\n }\n\n // Note: `typeof Node` returns 'function' in most browsers, but is undefined with domino.\n return typeof Node === 'undefined' || Node === null || !(element instanceof Node);\n}\n\n/**\n * Logs or throws an error that a property is not supported on an element.\n *\n * @param propName Name of the invalid property\n * @param tagName Name of the tag hosting the property\n * @param nodeType Type of the node hosting the property\n * @param lView An `LView` that represents a current component\n */\nexport function handleUnknownPropertyError(\n propName: string,\n tagName: string | null,\n nodeType: TNodeType,\n lView: LView,\n): void {\n // Special-case a situation when a structural directive is applied to\n // an `<ng-template>` element, for example: `<ng-template *ngIf=\"true\">`.\n // In this case the compiler generates the `ɵɵtemplate` instruction with\n // the `null` as the tagName. The directive matching logic at runtime relies\n // on this effect (see `isInlineTemplate`), thus using the 'ng-template' as\n // a default value of the `tNode.value` is not feasible at this moment.\n if (!tagName && nodeType === TNodeType.Container) {\n tagName = 'ng-template';\n }\n\n const isHostStandalone = isHostComponentStandalone(lView);\n const templateLocation = getTemplateLocationDetails(lView);\n\n let message = `Can't bind to '${propName}' since it isn't a known property of '${tagName}'${templateLocation}.`;\n\n const schemas = `'${isHostStandalone ? '@Component' : '@NgModule'}.schemas'`;\n const importLocation = isHostStandalone\n ? \"included in the '@Component.imports' of this component\"\n : 'a part of an @NgModule where this component is declared';\n if (KNOWN_CONTROL_FLOW_DIRECTIVES.has(propName)) {\n // Most likely this is a control flow directive (such as `*ngIf`) used in\n // a template, but the directive or the `CommonModule` is not imported.\n const correspondingImport = KNOWN_CONTROL_FLOW_DIRECTIVES.get(propName);\n message +=\n `\\nIf the '${propName}' is an Angular control flow directive, ` +\n `please make sure that either the '${correspondingImport}' directive or the 'CommonModule' is ${importLocation}.`;\n } else {\n // May be an Angular component, which is not imported/declared?\n message +=\n `\\n1. If '${tagName}' is an Angular component and it has the ` +\n `'${propName}' input, then verify that it is ${importLocation}.`;\n // May be a Web Component?\n if (tagName && tagName.indexOf('-') > -1) {\n message +=\n `\\n2. If '${tagName}' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' ` +\n `to the ${schemas} of this component to suppress this message.`;\n message +=\n `\\n3. To allow any property add 'NO_ERRORS_SCHEMA' to ` +\n `the ${schemas} of this component.`;\n } else {\n // If it's expected, the error can be suppressed by the `NO_ERRORS_SCHEMA` schema.\n message +=\n `\\n2. To allow any property add 'NO_ERRORS_SCHEMA' to ` +\n `the ${schemas} of this component.`;\n }\n }\n\n reportUnknownPropertyError(message);\n}\n\nexport function reportUnknownPropertyError(message: string) {\n if (shouldThrowErrorOnUnknownProperty) {\n throw new RuntimeError(RuntimeErrorCode.UNKNOWN_BINDING, message);\n } else {\n console.error(formatRuntimeError(RuntimeErrorCode.UNKNOWN_BINDING, message));\n }\n}\n\n/**\n * WARNING: this is a **dev-mode only** function (thus should always be guarded by the `ngDevMode`)\n * and must **not** be used in production bundles. The function makes megamorphic reads, which might\n * be too slow for production mode and also it relies on the constructor function being available.\n *\n * Gets a reference to the host component def (where a current component is declared).\n *\n * @param lView An `LView` that represents a current component that is being rendered.\n */\nexport function getDeclarationComponentDef(lView: LView): ComponentDef<unknown> | null {\n !ngDevMode && throwError('Must never be called in production mode');\n\n const declarationLView = lView[DECLARATION_COMPONENT_VIEW] as LView<Type<unknown>>;\n const context = declarationLView[CONTEXT];\n\n // Unable to obtain a context.\n if (!context) return null;\n\n return context.constructor ? getComponentDef(context.constructor) : null;\n}\n\n/**\n * WARNING: this is a **dev-mode only** function (thus should always be guarded by the `ngDevMode`)\n * and must **not** be used in production bundles. The function makes megamorphic reads, which might\n * be too slow for production mode.\n *\n * Checks if the current component is declared inside of a standalone component template.\n *\n * @param lView An `LView` that represents a current component that is being rendered.\n */\nexport function isHostComponentStandalone(lView: LView): boolean {\n !ngDevMode && throwError('Must never be called in production mode');\n\n const componentDef = getDeclarationComponentDef(lView);\n // Treat host component as non-standalone if we can't obtain the def.\n return !!componentDef?.standalone;\n}\n\n/**\n * WARNING: this is a **dev-mode only** function (thus should always be guarded by the `ngDevMode`)\n * and must **not** be used in production bundles. The function makes megamorphic reads, which might\n * be too slow for production mode.\n *\n * Constructs a string describing the location of the host component template. The function is used\n * in dev mode to produce error messages.\n *\n * @param lView An `LView` that represents a current component that is being rendered.\n */\nexport function getTemplateLocationDetails(lView: LView): string {\n !ngDevMode && throwError('Must never be called in production mode');\n\n const hostComponentDef = getDeclarationComponentDef(lView);\n const componentClassName = hostComponentDef?.type?.name;\n return componentClassName ? ` (used in the '${componentClassName}' component template)` : '';\n}\n\n/**\n * The set of known control flow directives and their corresponding imports.\n * We use this set to produce a more precises error message with a note\n * that the `CommonModule` should also be included.\n */\nexport const KNOWN_CONTROL_FLOW_DIRECTIVES = new Map([\n ['ngIf', 'NgIf'],\n ['ngFor', 'NgFor'],\n ['ngSwitchCase', 'NgSwitchCase'],\n ['ngSwitchDefault', 'NgSwitchDefault'],\n]);\n/**\n * Returns true if the tag name is allowed by specified schemas.\n * @param schemas Array of schemas\n * @param tagName Name of the tag\n */\nexport function matchingSchemas(schemas: SchemaMetadata[] | null, tagName: string | null): boolean {\n if (schemas !== null) {\n for (let i = 0; i < schemas.length; i++) {\n const schema = schemas[i];\n if (\n schema === NO_ERRORS_SCHEMA ||\n (schema === CUSTOM_ELEMENTS_SCHEMA && tagName && tagName.indexOf('-') > -1)\n ) {\n return true;\n }\n }\n }\n\n return false;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {RElement} from '../interfaces/renderer_dom';\n\n/**\n *\n * @codeGenApi\n */\nexport function ɵɵresolveWindow(element: RElement & {ownerDocument: Document}) {\n return element.ownerDocument.defaultView;\n}\n\n/**\n *\n * @codeGenApi\n */\nexport function ɵɵresolveDocument(element: RElement & {ownerDocument: Document}) {\n return element.ownerDocument;\n}\n\n/**\n *\n * @codeGenApi\n */\nexport function ɵɵresolveBody(element: RElement & {ownerDocument: Document}) {\n return element.ownerDocument.body;\n}\n\n/**\n * The special delimiter we use to separate property names, prefixes, and suffixes\n * in property binding metadata. See storeBindingMetadata().\n *\n * We intentionally use the Unicode \"REPLACEMENT CHARACTER\" (U+FFFD) as a delimiter\n * because it is a very uncommon character that is unlikely to be part of a user's\n * property names or interpolation strings. If it is in fact used in a property\n * binding, DebugElement.properties will not return the correct value for that\n * binding. However, there should be no runtime effect for real applications.\n *\n * This character is typically rendered as a question mark inside of a diamond.\n * See https://en.wikipedia.org/wiki/Specials_(Unicode_block)\n *\n */\nexport const INTERPOLATION_DELIMITER = `�`;\n\n/**\n * Unwrap a value which might be behind a closure (for forward declaration reasons).\n */\nexport function maybeUnwrapFn<T>(value: T | (() => T)): T {\n if (value instanceof Function) {\n return value();\n } else {\n return value;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {RuntimeError, RuntimeErrorCode} from '../errors';\nimport {Type} from '../interface/type';\n\nimport {getComponentDef} from './def_getters';\nimport {getDeclarationComponentDef} from './instructions/element_validation';\nimport {TNode} from './interfaces/node';\nimport {LView, TVIEW} from './interfaces/view';\nimport {INTERPOLATION_DELIMITER} from './util/misc_utils';\nimport {stringifyForError} from './util/stringify_utils';\n\n/**\n * The max length of the string representation of a value in an error message\n */\nconst VALUE_STRING_LENGTH_LIMIT = 200;\n\n/** Verifies that a given type is a Standalone Component. */\nexport function assertStandaloneComponentType(type: Type<unknown>) {\n assertComponentDef(type);\n const componentDef = getComponentDef(type)!;\n if (!componentDef.standalone) {\n throw new RuntimeError(\n RuntimeErrorCode.TYPE_IS_NOT_STANDALONE,\n `The ${stringifyForError(type)} component is not marked as standalone, ` +\n `but Angular expects to have a standalone component here. ` +\n `Please make sure the ${stringifyForError(type)} component has ` +\n `the \\`standalone: true\\` flag in the decorator.`,\n );\n }\n}\n\n/** Verifies whether a given type is a component */\nexport function assertComponentDef(type: Type<unknown>) {\n if (!getComponentDef(type)) {\n throw new RuntimeError(\n RuntimeErrorCode.MISSING_GENERATED_DEF,\n `The ${stringifyForError(type)} is not an Angular component, ` +\n `make sure it has the \\`@Component\\` decorator.`,\n );\n }\n}\n\n/** Called when there are multiple component selectors that match a given node */\nexport function throwMultipleComponentError(\n tNode: TNode,\n first: Type<unknown>,\n second: Type<unknown>,\n): never {\n throw new RuntimeError(\n RuntimeErrorCode.MULTIPLE_COMPONENTS_MATCH,\n `Multiple components match node with tagname ${tNode.value}: ` +\n `${stringifyForError(first)} and ` +\n `${stringifyForError(second)}`,\n );\n}\n\n/** Throws an ExpressionChangedAfterChecked error if checkNoChanges mode is on. */\nexport function throwErrorIfNoChangesMode(\n creationMode: boolean,\n oldValue: any,\n currValue: any,\n propName: string | undefined,\n lView: LView,\n): never {\n const hostComponentDef = getDeclarationComponentDef(lView);\n const componentClassName = hostComponentDef?.type?.name;\n const field = propName ? ` for '${propName}'` : '';\n let msg = `ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value${field}: '${formatValue(\n oldValue,\n )}'. Current value: '${formatValue(currValue)}'.${\n componentClassName ? ` Expression location: ${componentClassName} component` : ''\n }`;\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 throw new RuntimeError(RuntimeErrorCode.EXPRESSION_CHANGED_AFTER_CHECKED, msg);\n}\n\nfunction formatValue(value: unknown): string {\n let strValue: string = String(value);\n\n // JSON.stringify will throw on circular references\n try {\n if (Array.isArray(value) || strValue === '[object Object]') {\n strValue = JSON.stringify(value);\n }\n } catch (error) {}\n return strValue.length > VALUE_STRING_LENGTH_LIMIT\n ? strValue.substring(0, VALUE_STRING_LENGTH_LIMIT) + '…'\n : strValue;\n}\n\nfunction constructDetailsForInterpolation(\n lView: LView,\n rootIndex: number,\n expressionIndex: number,\n meta: string,\n changedValue: any,\n) {\n const [propName, prefix, ...chunks] = meta.split(INTERPOLATION_DELIMITER);\n let oldValue = prefix,\n newValue = prefix;\n for (let i = 0; i < chunks.length; i++) {\n const slotIdx = rootIndex + i;\n oldValue += `${lView[slotIdx]}${chunks[i]}`;\n newValue += `${slotIdx === expressionIndex ? changedValue : lView[slotIdx]}${chunks[i]}`;\n }\n return {propName, oldValue, newValue};\n}\n\n/**\n * Constructs an object that contains details for the ExpressionChangedAfterItHasBeenCheckedError:\n * - property name (for property bindings or interpolations)\n * - old and new values, enriched using information from metadata\n *\n * More information on the metadata storage format can be found in `storePropertyBindingMetadata`\n * function description.\n */\nexport function getExpressionChangedErrorDetails(\n lView: LView,\n bindingIndex: number,\n oldValue: any,\n newValue: any,\n): {propName?: string; oldValue: any; newValue: any} {\n const tData = lView[TVIEW].data;\n const metadata = tData[bindingIndex];\n\n if (typeof metadata === 'string') {\n // metadata for property interpolation\n if (metadata.indexOf(INTERPOLATION_DELIMITER) > -1) {\n return constructDetailsForInterpolation(\n lView,\n bindingIndex,\n bindingIndex,\n metadata,\n newValue,\n );\n }\n // metadata for property binding\n return {propName: metadata, oldValue, newValue};\n }\n\n // metadata is not available for this expression, check if this expression is a part of the\n // property interpolation by going from the current binding index left and look for a string that\n // contains INTERPOLATION_DELIMITER, the layout in tView.data for this case will look like this:\n // [..., 'id�Prefix � and � suffix', null, null, null, ...]\n if (metadata === null) {\n let idx = bindingIndex - 1;\n while (typeof tData[idx] !== 'string' && tData[idx + 1] === null) {\n idx--;\n }\n const meta = tData[idx];\n if (typeof meta === 'string') {\n const matches = meta.match(new RegExp(INTERPOLATION_DELIMITER, 'g'));\n // first interpolation delimiter separates property name from interpolation parts (in case of\n // property interpolations), so we subtract one from total number of found delimiters\n if (matches && matches.length - 1 > bindingIndex - idx) {\n return constructDetailsForInterpolation(lView, idx, bindingIndex, meta, newValue);\n }\n }\n }\n return {propName: undefined, oldValue, newValue};\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {assertNotEqual} from '../../util/assert';\nimport {CharCode} from '../../util/char_code';\n\n/**\n * Returns an index of `classToSearch` in `className` taking token boundaries into account.\n *\n * `classIndexOf('AB A', 'A', 0)` will be 3 (not 0 since `AB!==A`)\n *\n * @param className A string containing classes (whitespace separated)\n * @param classToSearch A class name to locate\n * @param startingIndex Starting location of search\n * @returns an index of the located class (or -1 if not found)\n */\nexport function classIndexOf(\n className: string,\n classToSearch: string,\n startingIndex: number,\n): number {\n ngDevMode && assertNotEqual(classToSearch, '', 'can not look for \"\" string.');\n let end = className.length;\n while (true) {\n const foundIndex = className.indexOf(classToSearch, startingIndex);\n if (foundIndex === -1) return foundIndex;\n if (foundIndex === 0 || className.charCodeAt(foundIndex - 1) <= CharCode.SPACE) {\n // Ensure that it has leading whitespace\n const length = classToSearch.length;\n if (\n foundIndex + length === end ||\n className.charCodeAt(foundIndex + length) <= CharCode.SPACE\n ) {\n // Ensure that it has trailing whitespace\n return foundIndex;\n }\n }\n // False positive, keep searching from where we left off.\n startingIndex = foundIndex + 1;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport '../util/ng_dev_mode';\n\nimport {assertDefined, assertEqual, assertNotEqual} from '../util/assert';\n\nimport {AttributeMarker} from './interfaces/attribute_marker';\nimport {TAttributes, TNode, TNodeType} from './interfaces/node';\nimport {CssSelector, CssSelectorList, SelectorFlags} from './interfaces/projection';\nimport {classIndexOf} from './styling/class_differ';\nimport {isNameOnlyAttributeMarker} from './util/attrs_utils';\n\nconst NG_TEMPLATE_SELECTOR = 'ng-template';\n\n/**\n * Search the `TAttributes` to see if it contains `cssClassToMatch` (case insensitive)\n *\n * @param tNode static data of the node to match\n * @param attrs `TAttributes` to search through.\n * @param cssClassToMatch class to match (lowercase)\n * @param isProjectionMode Whether or not class matching should look into the attribute `class` in\n * addition to the `AttributeMarker.Classes`.\n */\nfunction isCssClassMatching(\n tNode: TNode,\n attrs: TAttributes,\n cssClassToMatch: string,\n isProjectionMode: boolean,\n): boolean {\n ngDevMode &&\n assertEqual(\n cssClassToMatch,\n cssClassToMatch.toLowerCase(),\n 'Class name expected to be lowercase.',\n );\n let i = 0;\n if (isProjectionMode) {\n for (; i < attrs.length && typeof attrs[i] === 'string'; i += 2) {\n // Search for an implicit `class` attribute and check if its value matches `cssClassToMatch`.\n if (\n attrs[i] === 'class' &&\n classIndexOf((attrs[i + 1] as string).toLowerCase(), cssClassToMatch, 0) !== -1\n ) {\n return true;\n }\n }\n } else if (isInlineTemplate(tNode)) {\n // Matching directives (i.e. when not matching for projection mode) should not consider the\n // class bindings that are present on inline templates, as those class bindings only target\n // the root node of the template, not the template itself.\n return false;\n }\n\n // Resume the search for classes after the `Classes` marker.\n i = attrs.indexOf(AttributeMarker.Classes, i);\n if (i > -1) {\n // We found the classes section. Start searching for the class.\n let item: TAttributes[number];\n while (++i < attrs.length && typeof (item = attrs[i]) === 'string') {\n if (item.toLowerCase() === cssClassToMatch) {\n return true;\n }\n }\n }\n return false;\n}\n\n/**\n * Checks whether the `tNode` represents an inline template (e.g. `*ngFor`).\n *\n * @param tNode current TNode\n */\nexport function isInlineTemplate(tNode: TNode): boolean {\n return tNode.type === TNodeType.Container && tNode.value !== NG_TEMPLATE_SELECTOR;\n}\n\n/**\n * Function that checks whether a given tNode matches tag-based selector and has a valid type.\n *\n * Matching can be performed in 2 modes: projection mode (when we project nodes) and regular\n * directive matching mode:\n * - in the \"directive matching\" mode we do _not_ take TContainer's tagName into account if it is\n * different from NG_TEMPLATE_SELECTOR (value different from NG_TEMPLATE_SELECTOR indicates that a\n * tag name was extracted from * syntax so we would match the same directive twice);\n * - in the \"projection\" mode, we use a tag name potentially extracted from the * syntax processing\n * (applicable to TNodeType.Container only).\n */\nfunction hasTagAndTypeMatch(\n tNode: TNode,\n currentSelector: string,\n isProjectionMode: boolean,\n): boolean {\n const tagNameToCompare =\n tNode.type === TNodeType.Container && !isProjectionMode ? NG_TEMPLATE_SELECTOR : tNode.value;\n return currentSelector === tagNameToCompare;\n}\n\n/**\n * A utility function to match an Ivy node static data against a simple CSS selector\n *\n * @param tNode static data of the node to match\n * @param selector The selector to try matching against the node.\n * @param isProjectionMode if `true` we are matching for content projection, otherwise we are doing\n * directive matching.\n * @returns true if node matches the selector.\n */\nexport function isNodeMatchingSelector(\n tNode: TNode,\n selector: CssSelector,\n isProjectionMode: boolean,\n): boolean {\n ngDevMode && assertDefined(selector[0], 'Selector should have a tag name');\n let mode: SelectorFlags = SelectorFlags.ELEMENT;\n const nodeAttrs = tNode.attrs;\n\n // Find the index of first attribute that has no value, only a name.\n const nameOnlyMarkerIdx = nodeAttrs !== null ? getNameOnlyMarkerIndex(nodeAttrs) : 0;\n\n // When processing \":not\" selectors, we skip to the next \":not\" if the\n // current one doesn't match\n let skipToNextSelector = false;\n\n for (let i = 0; i < selector.length; i++) {\n const current = selector[i];\n if (typeof current === 'number') {\n // If we finish processing a :not selector and it hasn't failed, return false\n if (!skipToNextSelector && !isPositive(mode) && !isPositive(current)) {\n return false;\n }\n // If we are skipping to the next :not() and this mode flag is positive,\n // it's a part of the current :not() selector, and we should keep skipping\n if (skipToNextSelector && isPositive(current)) continue;\n skipToNextSelector = false;\n mode = (current as number) | (mode & SelectorFlags.NOT);\n continue;\n }\n\n if (skipToNextSelector) continue;\n\n if (mode & SelectorFlags.ELEMENT) {\n mode = SelectorFlags.ATTRIBUTE | (mode & SelectorFlags.NOT);\n if (\n (current !== '' && !hasTagAndTypeMatch(tNode, current, isProjectionMode)) ||\n (current === '' && selector.length === 1)\n ) {\n if (isPositive(mode)) return false;\n skipToNextSelector = true;\n }\n } else if (mode & SelectorFlags.CLASS) {\n if (nodeAttrs === null || !isCssClassMatching(tNode, nodeAttrs, current, isProjectionMode)) {\n if (isPositive(mode)) return false;\n skipToNextSelector = true;\n }\n } else {\n const selectorAttrValue = selector[++i];\n const attrIndexInNode = findAttrIndexInNode(\n current,\n nodeAttrs,\n isInlineTemplate(tNode),\n isProjectionMode,\n );\n\n if (attrIndexInNode === -1) {\n if (isPositive(mode)) return false;\n skipToNextSelector = true;\n continue;\n }\n\n if (selectorAttrValue !== '') {\n let nodeAttrValue: string;\n if (attrIndexInNode > nameOnlyMarkerIdx) {\n nodeAttrValue = '';\n } else {\n ngDevMode &&\n assertNotEqual(\n nodeAttrs![attrIndexInNode],\n AttributeMarker.NamespaceURI,\n 'We do not match directives on namespaced attributes',\n );\n // we lowercase the attribute value to be able to match\n // selectors without case-sensitivity\n // (selectors are already in lowercase when generated)\n nodeAttrValue = (nodeAttrs![attrIndexInNode + 1] as string).toLowerCase();\n }\n\n if (mode & SelectorFlags.ATTRIBUTE && selectorAttrValue !== nodeAttrValue) {\n if (isPositive(mode)) return false;\n skipToNextSelector = true;\n }\n }\n }\n }\n\n return isPositive(mode) || skipToNextSelector;\n}\n\nfunction isPositive(mode: SelectorFlags): boolean {\n return (mode & SelectorFlags.NOT) === 0;\n}\n\n/**\n * Examines the attribute's definition array for a node to find the index of the\n * attribute that matches the given `name`.\n *\n * NOTE: This will not match namespaced attributes.\n *\n * Attribute matching depends upon `isInlineTemplate` and `isProjectionMode`.\n * The following table summarizes which types of attributes we attempt to match:\n *\n * ===========================================================================================================\n * Modes | Normal Attributes | Bindings Attributes | Template Attributes | I18n\n * Attributes\n * ===========================================================================================================\n * Inline + Projection | YES | YES | NO | YES\n * -----------------------------------------------------------------------------------------------------------\n * Inline + Directive | NO | NO | YES | NO\n * -----------------------------------------------------------------------------------------------------------\n * Non-inline + Projection | YES | YES | NO | YES\n * -----------------------------------------------------------------------------------------------------------\n * Non-inline + Directive | YES | YES | NO | YES\n * ===========================================================================================================\n *\n * @param name the name of the attribute to find\n * @param attrs the attribute array to examine\n * @param isInlineTemplate true if the node being matched is an inline template (e.g. `*ngFor`)\n * rather than a manually expanded template node (e.g `<ng-template>`).\n * @param isProjectionMode true if we are matching against content projection otherwise we are\n * matching against directives.\n */\nfunction findAttrIndexInNode(\n name: string,\n attrs: TAttributes | null,\n isInlineTemplate: boolean,\n isProjectionMode: boolean,\n): number {\n if (attrs === null) return -1;\n\n let i = 0;\n\n if (isProjectionMode || !isInlineTemplate) {\n let bindingsMode = false;\n while (i < attrs.length) {\n const maybeAttrName = attrs[i];\n if (maybeAttrName === name) {\n return i;\n } else if (\n maybeAttrName === AttributeMarker.Bindings ||\n maybeAttrName === AttributeMarker.I18n\n ) {\n bindingsMode = true;\n } else if (\n maybeAttrName === AttributeMarker.Classes ||\n maybeAttrName === AttributeMarker.Styles\n ) {\n let value = attrs[++i];\n // We should skip classes here because we have a separate mechanism for\n // matching classes in projection mode.\n while (typeof value === 'string') {\n value = attrs[++i];\n }\n continue;\n } else if (maybeAttrName === AttributeMarker.Template) {\n // We do not care about Template attributes in this scenario.\n break;\n } else if (maybeAttrName === AttributeMarker.NamespaceURI) {\n // Skip the whole namespaced attribute and value. This is by design.\n i += 4;\n continue;\n }\n // In binding mode there are only names, rather than name-value pairs.\n i += bindingsMode ? 1 : 2;\n }\n // We did not match the attribute\n return -1;\n } else {\n return matchTemplateAttribute(attrs, name);\n }\n}\n\nexport function isNodeMatchingSelectorList(\n tNode: TNode,\n selector: CssSelectorList,\n isProjectionMode: boolean = false,\n): boolean {\n for (let i = 0; i < selector.length; i++) {\n if (isNodeMatchingSelector(tNode, selector[i], isProjectionMode)) {\n return true;\n }\n }\n\n return false;\n}\n\nexport function getProjectAsAttrValue(tNode: TNode): CssSelector | null {\n const nodeAttrs = tNode.attrs;\n if (nodeAttrs != null) {\n const ngProjectAsAttrIdx = nodeAttrs.indexOf(AttributeMarker.ProjectAs);\n // only check for ngProjectAs in attribute names, don't accidentally match attribute's value\n // (attribute names are stored at even indexes)\n if ((ngProjectAsAttrIdx & 1) === 0) {\n return nodeAttrs[ngProjectAsAttrIdx + 1] as CssSelector;\n }\n }\n return null;\n}\n\nfunction getNameOnlyMarkerIndex(nodeAttrs: TAttributes) {\n for (let i = 0; i < nodeAttrs.length; i++) {\n const nodeAttr = nodeAttrs[i];\n if (isNameOnlyAttributeMarker(nodeAttr)) {\n return i;\n }\n }\n return nodeAttrs.length;\n}\n\nfunction matchTemplateAttribute(attrs: TAttributes, name: string): number {\n let i = attrs.indexOf(AttributeMarker.Template);\n if (i > -1) {\n i++;\n while (i < attrs.length) {\n const attr = attrs[i];\n // Return in case we checked all template attrs and are switching to the next section in the\n // attrs array (that starts with a number that represents an attribute marker).\n if (typeof attr === 'number') return -1;\n if (attr === name) return i;\n i++;\n }\n }\n return -1;\n}\n\n/**\n * Checks whether a selector is inside a CssSelectorList\n * @param selector Selector to be checked.\n * @param list List in which to look for the selector.\n */\nexport function isSelectorInSelectorList(selector: CssSelector, list: CssSelectorList): boolean {\n selectorListLoop: for (let i = 0; i < list.length; i++) {\n const currentSelectorInList = list[i];\n if (selector.length !== currentSelectorInList.length) {\n continue;\n }\n for (let j = 0; j < selector.length; j++) {\n if (selector[j] !== currentSelectorInList[j]) {\n continue selectorListLoop;\n }\n }\n return true;\n }\n return false;\n}\n\nfunction maybeWrapInNotSelector(isNegativeMode: boolean, chunk: string): string {\n return isNegativeMode ? ':not(' + chunk.trim() + ')' : chunk;\n}\n\nfunction stringifyCSSSelector(selector: CssSelector): string {\n let result = selector[0] as string;\n let i = 1;\n let mode = SelectorFlags.ATTRIBUTE;\n let currentChunk = '';\n let isNegativeMode = false;\n while (i < selector.length) {\n let valueOrMarker = selector[i];\n if (typeof valueOrMarker === 'string') {\n if (mode & SelectorFlags.ATTRIBUTE) {\n const attrValue = selector[++i] as string;\n currentChunk +=\n '[' + valueOrMarker + (attrValue.length > 0 ? '=\"' + attrValue + '\"' : '') + ']';\n } else if (mode & SelectorFlags.CLASS) {\n currentChunk += '.' + valueOrMarker;\n } else if (mode & SelectorFlags.ELEMENT) {\n currentChunk += ' ' + valueOrMarker;\n }\n } else {\n //\n // Append current chunk to the final result in case we come across SelectorFlag, which\n // indicates that the previous section of a selector is over. We need to accumulate content\n // between flags to make sure we wrap the chunk later in :not() selector if needed, e.g.\n // ```\n // ['', Flags.CLASS, '.classA', Flags.CLASS | Flags.NOT, '.classB', '.classC']\n // ```\n // should be transformed to `.classA :not(.classB .classC)`.\n //\n // Note: for negative selector part, we accumulate content between flags until we find the\n // next negative flag. This is needed to support a case where `:not()` rule contains more than\n // one chunk, e.g. the following selector:\n // ```\n // ['', Flags.ELEMENT | Flags.NOT, 'p', Flags.CLASS, 'foo', Flags.CLASS | Flags.NOT, 'bar']\n // ```\n // should be stringified to `:not(p.foo) :not(.bar)`\n //\n if (currentChunk !== '' && !isPositive(valueOrMarker)) {\n result += maybeWrapInNotSelector(isNegativeMode, currentChunk);\n currentChunk = '';\n }\n mode = valueOrMarker;\n // According to CssSelector spec, once we come across `SelectorFlags.NOT` flag, the negative\n // mode is maintained for remaining chunks of a selector.\n isNegativeMode = isNegativeMode || !isPositive(mode);\n }\n i++;\n }\n if (currentChunk !== '') {\n result += maybeWrapInNotSelector(isNegativeMode, currentChunk);\n }\n return result;\n}\n\n/**\n * Generates string representation of CSS selector in parsed form.\n *\n * ComponentDef and DirectiveDef are generated with the selector in parsed form to avoid doing\n * additional parsing at runtime (for example, for directive matching). However in some cases (for\n * example, while bootstrapping a component), a string version of the selector is required to query\n * for the host element on the page. This function takes the parsed form of a selector and returns\n * its string representation.\n *\n * @param selectorList selector in parsed form\n * @returns string representation of a given selector\n */\nexport function stringifyCSSSelectorList(selectorList: CssSelectorList): string {\n return selectorList.map(stringifyCSSSelector).join(',');\n}\n\n/**\n * Extracts attributes and classes information from a given CSS selector.\n *\n * This function is used while creating a component dynamically. In this case, the host element\n * (that is created dynamically) should contain attributes and classes specified in component's CSS\n * selector.\n *\n * @param selector CSS selector in parsed form (in a form of array)\n * @returns object with `attrs` and `classes` fields that contain extracted information\n */\nexport function extractAttrsAndClassesFromSelector(selector: CssSelector): TAttributes {\n const attrs: TAttributes = [];\n const classes: string[] = [];\n let i = 1;\n let mode = SelectorFlags.ATTRIBUTE;\n while (i < selector.length) {\n let valueOrMarker = selector[i];\n if (typeof valueOrMarker === 'string') {\n if (mode === SelectorFlags.ATTRIBUTE) {\n if (valueOrMarker !== '') {\n attrs.push(valueOrMarker, selector[++i] as string);\n }\n } else if (mode === SelectorFlags.CLASS) {\n classes.push(valueOrMarker);\n }\n } else {\n // According to CssSelector spec, once we come across `SelectorFlags.NOT` flag, the negative\n // mode is maintained for remaining chunks of a selector. Since attributes and classes are\n // extracted only for \"positive\" part of the selector, we can stop here.\n if (!isPositive(mode)) break;\n mode = valueOrMarker;\n }\n i++;\n }\n if (classes.length) {\n attrs.push(AttributeMarker.Classes, ...classes);\n }\n\n return attrs;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nexport interface NO_CHANGE {\n // This is a brand that ensures that this type can never match anything else\n __brand__: 'NO_CHANGE';\n}\n\n/** A special value which designates that a value has not changed. */\nexport const NO_CHANGE: NO_CHANGE =\n typeof ngDevMode === 'undefined' || ngDevMode ? {__brand__: 'NO_CHANGE'} : ({} as NO_CHANGE);\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Renderer} from './interfaces/renderer';\nimport {RComment, RElement, RNode, RText} from './interfaces/renderer_dom';\nimport {escapeCommentText} from '../util/dom';\nimport {assertDefined, assertString} from '../util/assert';\nimport {setUpAttributes} from './util/attrs_utils';\nimport {TNode} from './interfaces/node';\n\nexport function createTextNode(renderer: Renderer, value: string): RText {\n ngDevMode && ngDevMode.rendererCreateTextNode++;\n ngDevMode && ngDevMode.rendererSetText++;\n return renderer.createText(value);\n}\n\nexport function updateTextNode(renderer: Renderer, rNode: RText, value: string): void {\n ngDevMode && ngDevMode.rendererSetText++;\n renderer.setValue(rNode, value);\n}\n\nexport function createCommentNode(renderer: Renderer, value: string): RComment {\n ngDevMode && ngDevMode.rendererCreateComment++;\n return renderer.createComment(escapeCommentText(value));\n}\n\n/**\n * Creates a native element from a tag name, using a renderer.\n * @param renderer A renderer to use\n * @param name the tag name\n * @param namespace Optional namespace for element.\n * @returns the element created\n */\nexport function createElementNode(\n renderer: Renderer,\n name: string,\n namespace: string | null,\n): RElement {\n ngDevMode && ngDevMode.rendererCreateElement++;\n return renderer.createElement(name, namespace);\n}\n\n/**\n * Inserts a native node before another native node for a given parent.\n * This is a utility function that can be used when native nodes were determined.\n */\nexport function nativeInsertBefore(\n renderer: Renderer,\n parent: RElement,\n child: RNode,\n beforeNode: RNode | null,\n isMove: boolean,\n): void {\n ngDevMode && ngDevMode.rendererInsertBefore++;\n renderer.insertBefore(parent, child, beforeNode, isMove);\n}\n\nexport function nativeAppendChild(renderer: Renderer, parent: RElement, child: RNode): void {\n ngDevMode && ngDevMode.rendererAppendChild++;\n ngDevMode && assertDefined(parent, 'parent node must be defined');\n renderer.appendChild(parent, child);\n}\n\nexport function nativeAppendOrInsertBefore(\n renderer: Renderer,\n parent: RElement,\n child: RNode,\n beforeNode: RNode | null,\n isMove: boolean,\n) {\n if (beforeNode !== null) {\n nativeInsertBefore(renderer, parent, child, beforeNode, isMove);\n } else {\n nativeAppendChild(renderer, parent, child);\n }\n}\n\n/**\n * Removes a native node itself using a given renderer. To remove the node we are looking up its\n * parent from the native tree as not all platforms / browsers support the equivalent of\n * node.remove().\n *\n * @param renderer A renderer to be used\n * @param rNode The native node that should be removed\n * @param isHostElement A flag indicating if a node to be removed is a host of a component.\n */\nexport function nativeRemoveNode(renderer: Renderer, rNode: RNode, isHostElement?: boolean): void {\n ngDevMode && ngDevMode.rendererRemoveNode++;\n renderer.removeChild(null, rNode, isHostElement);\n}\n\n/**\n * Clears the contents of a given RElement.\n *\n * @param rElement the native RElement to be cleared\n */\nexport function clearElementContents(rElement: RElement): void {\n rElement.textContent = '';\n}\n\n/**\n * Write `cssText` to `RElement`.\n *\n * This function does direct write without any reconciliation. Used for writing initial values, so\n * that static styling values do not pull in the style parser.\n *\n * @param renderer Renderer to use\n * @param element The element which needs to be updated.\n * @param newValue The new class list to write.\n */\nfunction writeDirectStyle(renderer: Renderer, element: RElement, newValue: string) {\n ngDevMode && assertString(newValue, \"'newValue' should be a string\");\n renderer.setAttribute(element, 'style', newValue);\n ngDevMode && ngDevMode.rendererSetStyle++;\n}\n\n/**\n * Write `className` to `RElement`.\n *\n * This function does direct write without any reconciliation. Used for writing initial values, so\n * that static styling values do not pull in the style parser.\n *\n * @param renderer Renderer to use\n * @param element The element which needs to be updated.\n * @param newValue The new class list to write.\n */\nfunction writeDirectClass(renderer: Renderer, element: RElement, newValue: string) {\n ngDevMode && assertString(newValue, \"'newValue' should be a string\");\n if (newValue === '') {\n // There are tests in `google3` which expect `element.getAttribute('class')` to be `null`.\n renderer.removeAttribute(element, 'class');\n } else {\n renderer.setAttribute(element, 'class', newValue);\n }\n ngDevMode && ngDevMode.rendererSetClassName++;\n}\n\n/** Sets up the static DOM attributes on an `RNode`. */\nexport function setupStaticAttributes(renderer: Renderer, element: RElement, tNode: TNode) {\n const {mergedAttrs, classes, styles} = tNode;\n\n if (mergedAttrs !== null) {\n setUpAttributes(renderer, element, mergedAttrs);\n }\n\n if (classes !== null) {\n writeDirectClass(renderer, element, classes);\n }\n\n if (styles !== null) {\n writeDirectStyle(renderer, element, styles);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n TView,\n TVIEW,\n LViewFlags,\n LViewEnvironment,\n HOST,\n FLAGS,\n DECLARATION_VIEW,\n PARENT,\n CONTEXT,\n ENVIRONMENT,\n RENDERER,\n INJECTOR,\n T_HOST,\n ID,\n HYDRATION,\n EMBEDDED_VIEW_INJECTOR,\n TViewType,\n DECLARATION_COMPONENT_VIEW,\n HEADER_OFFSET,\n CHILD_HEAD,\n CHILD_TAIL,\n NEXT,\n LView,\n} from '../interfaces/view';\nimport {assertFirstCreatePass, assertFirstUpdatePass, assertTNodeForLView} from '../assert';\nimport {assertSame, assertEqual, assertDefined} from '../../util/assert';\nimport {RElement} from '../interfaces/renderer_dom';\nimport {TConstantsOrFactory, TElementNode, TNode} from '../interfaces/node';\nimport {Renderer} from '../interfaces/renderer';\nimport {Injector} from '../../di';\nimport {DehydratedView} from '../../hydration/interfaces';\nimport {getNativeByTNode, resetPreOrderHookFlags} from '../util/view_utils';\nimport {getUniqueLViewId} from '../interfaces/lview_tracking';\nimport {NO_CHANGE} from '../tokens';\nimport {\n ComponentDef,\n ComponentTemplate,\n DirectiveDefListOrFactory,\n PipeDefListOrFactory,\n ViewQueriesFunction,\n} from '../interfaces/definition';\nimport {SchemaMetadata} from '../../metadata/schema';\nimport {LContainer} from '../interfaces/container';\n\n/**\n * Creates a TView instance\n *\n * @param type Type of `TView`.\n * @param declTNode Declaration location of this `TView`.\n * @param templateFn Template function\n * @param decls The number of nodes, local refs, and pipes in this template\n * @param directives Registry of directives for this view\n * @param pipes Registry of pipes for this view\n * @param viewQuery View queries for this view\n * @param schemas Schemas for this view\n * @param consts Constants for this view\n */\nexport function createTView(\n type: TViewType,\n declTNode: TNode | null,\n templateFn: ComponentTemplate<any> | null,\n decls: number,\n vars: number,\n directives: DirectiveDefListOrFactory | null,\n pipes: PipeDefListOrFactory | null,\n viewQuery: ViewQueriesFunction<any> | null,\n schemas: SchemaMetadata[] | null,\n constsOrFactory: TConstantsOrFactory | null,\n ssrId: string | null,\n): TView {\n ngDevMode && ngDevMode.tView++;\n const bindingStartIndex = HEADER_OFFSET + decls;\n // This length does not yet contain host bindings from child directives because at this point,\n // we don't know which directives are active on this template. As soon as a directive is matched\n // that has a host binding, we will update the blueprint with that def's hostVars count.\n const initialViewLength = bindingStartIndex + vars;\n const blueprint = createViewBlueprint(bindingStartIndex, initialViewLength);\n const consts = typeof constsOrFactory === 'function' ? constsOrFactory() : constsOrFactory;\n const tView = (blueprint[TVIEW as any] = {\n type: type,\n blueprint: blueprint,\n template: templateFn,\n queries: null,\n viewQuery: viewQuery,\n declTNode: declTNode,\n data: blueprint.slice().fill(null, bindingStartIndex),\n bindingStartIndex: bindingStartIndex,\n expandoStartIndex: initialViewLength,\n hostBindingOpCodes: null,\n firstCreatePass: true,\n firstUpdatePass: true,\n staticViewQueries: false,\n staticContentQueries: false,\n preOrderHooks: null,\n preOrderCheckHooks: null,\n contentHooks: null,\n contentCheckHooks: null,\n viewHooks: null,\n viewCheckHooks: null,\n destroyHooks: null,\n cleanup: null,\n contentQueries: null,\n components: null,\n directiveRegistry: typeof directives === 'function' ? directives() : directives,\n pipeRegistry: typeof pipes === 'function' ? pipes() : pipes,\n firstChild: null,\n schemas: schemas,\n consts: consts,\n incompleteFirstPass: false,\n ssrId,\n });\n if (ngDevMode) {\n // For performance reasons it is important that the tView retains the same shape during runtime.\n // (To make sure that all of the code is monomorphic.) For this reason we seal the object to\n // prevent class transitions.\n Object.seal(tView);\n }\n return tView;\n}\n\nfunction createViewBlueprint(bindingStartIndex: number, initialViewLength: number): LView {\n const blueprint = [];\n\n for (let i = 0; i < initialViewLength; i++) {\n blueprint.push(i < bindingStartIndex ? null : NO_CHANGE);\n }\n\n return blueprint as LView;\n}\n\n/**\n * Gets TView from a template function or creates a new TView\n * if it doesn't already exist.\n *\n * @param def ComponentDef\n * @returns TView\n */\nexport function getOrCreateComponentTView(def: ComponentDef<any>): TView {\n const tView = def.tView;\n\n // Create a TView if there isn't one, or recreate it if the first create pass didn't\n // complete successfully since we can't know for sure whether it's in a usable shape.\n if (tView === null || tView.incompleteFirstPass) {\n // Declaration node here is null since this function is called when we dynamically create a\n // component and hence there is no declaration.\n const declTNode = null;\n return (def.tView = createTView(\n TViewType.Component,\n declTNode,\n def.template,\n def.decls,\n def.vars,\n def.directiveDefs,\n def.pipeDefs,\n def.viewQuery,\n def.schemas,\n def.consts,\n def.id,\n ));\n }\n\n return tView;\n}\n\nexport function createLView<T>(\n parentLView: LView | null,\n tView: TView,\n context: T | null,\n flags: LViewFlags,\n host: RElement | null,\n tHostNode: TNode | null,\n environment: LViewEnvironment | null,\n renderer: Renderer | null,\n injector: Injector | null,\n embeddedViewInjector: Injector | null,\n hydrationInfo: DehydratedView | null,\n): LView<T> {\n const lView = tView.blueprint.slice() as LView;\n lView[HOST] = host;\n lView[FLAGS] =\n flags |\n LViewFlags.CreationMode |\n LViewFlags.Attached |\n LViewFlags.FirstLViewPass |\n LViewFlags.Dirty |\n LViewFlags.RefreshView;\n if (\n embeddedViewInjector !== null ||\n (parentLView && parentLView[FLAGS] & LViewFlags.HasEmbeddedViewInjector)\n ) {\n lView[FLAGS] |= LViewFlags.HasEmbeddedViewInjector;\n }\n resetPreOrderHookFlags(lView);\n ngDevMode && tView.declTNode && parentLView && assertTNodeForLView(tView.declTNode, parentLView);\n lView[PARENT] = lView[DECLARATION_VIEW] = parentLView;\n lView[CONTEXT] = context;\n lView[ENVIRONMENT] = (environment || (parentLView && parentLView[ENVIRONMENT]))!;\n ngDevMode && assertDefined(lView[ENVIRONMENT], 'LViewEnvironment is required');\n lView[RENDERER] = (renderer || (parentLView && parentLView[RENDERER]))!;\n ngDevMode && assertDefined(lView[RENDERER], 'Renderer is required');\n lView[INJECTOR as any] = injector || (parentLView && parentLView[INJECTOR]) || null;\n lView[T_HOST] = tHostNode;\n lView[ID] = getUniqueLViewId();\n lView[HYDRATION] = hydrationInfo;\n lView[EMBEDDED_VIEW_INJECTOR as any] = embeddedViewInjector;\n\n ngDevMode &&\n assertEqual(\n tView.type == TViewType.Embedded ? parentLView !== null : true,\n true,\n 'Embedded views must have parentLView',\n );\n lView[DECLARATION_COMPONENT_VIEW] =\n tView.type == TViewType.Embedded ? parentLView![DECLARATION_COMPONENT_VIEW] : lView;\n return lView as LView<T>;\n}\n\nexport function createComponentLView<T>(\n lView: LView,\n hostTNode: TElementNode,\n def: ComponentDef<T>,\n): LView {\n const native = getNativeByTNode(hostTNode, lView) as RElement;\n const tView = getOrCreateComponentTView(def);\n\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 const rendererFactory = lView[ENVIRONMENT].rendererFactory;\n const componentView = addToEndOfViewTree(\n lView,\n createLView(\n lView,\n tView,\n null,\n getInitialLViewFlagsFromDef(def),\n native,\n hostTNode as TElementNode,\n null,\n rendererFactory.createRenderer(native, def),\n null,\n null,\n null,\n ),\n );\n\n // Component view will always be created before any injected LContainers,\n // so this is a regular element, wrap it with the component view\n return (lView[hostTNode.index] = componentView);\n}\n\n/**\n * Gets the initial set of LView flags based on the component definition that the LView represents.\n * @param def Component definition from which to determine the flags.\n */\nexport function getInitialLViewFlagsFromDef(def: ComponentDef<unknown>): LViewFlags {\n let flags = LViewFlags.CheckAlways;\n if (def.signals) {\n flags = LViewFlags.SignalView;\n } else if (def.onPush) {\n flags = LViewFlags.Dirty;\n }\n return flags;\n}\n\n/**\n * When elements are created dynamically after a view blueprint is created (e.g. through\n * i18nApply()), we need to adjust the blueprint for future template passes.\n *\n * @param tView `TView` associated with `LView`\n * @param lView The `LView` containing the blueprint to adjust\n * @param numSlotsToAlloc The number of slots to alloc in the LView, should be >0\n * @param initialValue Initial value to store in blueprint\n */\nexport function allocExpando(\n tView: TView,\n lView: LView,\n numSlotsToAlloc: number,\n initialValue: unknown,\n): number {\n if (numSlotsToAlloc === 0) return -1;\n if (ngDevMode) {\n assertFirstCreatePass(tView);\n assertSame(tView, lView[TVIEW], '`LView` must be associated with `TView`!');\n assertEqual(tView.data.length, lView.length, 'Expecting LView to be same size as TView');\n assertEqual(\n tView.data.length,\n tView.blueprint.length,\n 'Expecting Blueprint to be same size as TView',\n );\n assertFirstUpdatePass(tView);\n }\n const allocIdx = lView.length;\n for (let i = 0; i < numSlotsToAlloc; i++) {\n lView.push(initialValue);\n tView.blueprint.push(initialValue);\n tView.data.push(null);\n }\n return allocIdx;\n}\n\n/**\n * Adds LView or LContainer to the end of the current view tree.\n *\n * This structure will be used to traverse through nested views to remove listeners\n * and call onDestroy callbacks.\n *\n * @param lView The view where LView or LContainer should be added\n * @param adjustedHostIndex Index of the view's host node in LView[], adjusted for header\n * @param lViewOrLContainer The LView or LContainer to add to the view tree\n * @returns The state passed in\n */\nexport function addToEndOfViewTree<T extends LView | LContainer>(\n lView: LView,\n lViewOrLContainer: T,\n): T {\n // TODO(benlesh/misko): This implementation is incorrect, because it always adds the LContainer\n // to the end of the queue, which means if the developer retrieves the LContainers from RNodes out\n // of order, the change detection will run out of order, as the act of retrieving the the\n // LContainer from the RNode is what adds it to the queue.\n if (lView[CHILD_HEAD]) {\n lView[CHILD_TAIL]![NEXT] = lViewOrLContainer;\n } else {\n lView[CHILD_HEAD] = lViewOrLContainer;\n }\n lView[CHILD_TAIL] = lViewOrLContainer;\n return lViewOrLContainer;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport {assertGreaterThan} from '../../util/assert';\nimport {assertIndexInDeclRange} from '../assert';\nimport {executeCheckHooks, executeInitAndCheckHooks} from '../hooks';\nimport {FLAGS, InitPhaseState, LView, LViewFlags, TVIEW, TView} from '../interfaces/view';\nimport {\n getLView,\n getSelectedIndex,\n getTView,\n isInCheckNoChangesMode,\n setSelectedIndex,\n} from '../state';\n\n/**\n * Advances to an element for later binding instructions.\n *\n * Used in conjunction with instructions like {@link property} to act on elements with specified\n * indices, for example those created with {@link element} or {@link elementStart}.\n *\n * ```ts\n * (rf: RenderFlags, ctx: any) => {\n * if (rf & 1) {\n * text(0, 'Hello');\n * text(1, 'Goodbye')\n * element(2, 'div');\n * }\n * if (rf & 2) {\n * advance(2); // Advance twice to the <div>.\n * property('title', 'test');\n * }\n * }\n * ```\n * @param delta Number of elements to advance forwards by.\n *\n * @codeGenApi\n */\nexport function ɵɵadvance(delta: number = 1): void {\n ngDevMode && assertGreaterThan(delta, 0, 'Can only advance forward');\n selectIndexInternal(\n getTView(),\n getLView(),\n getSelectedIndex() + delta,\n !!ngDevMode && isInCheckNoChangesMode(),\n );\n}\n\nexport function selectIndexInternal(\n tView: TView,\n lView: LView,\n index: number,\n checkNoChangesMode: boolean,\n) {\n ngDevMode && assertIndexInDeclRange(lView[TVIEW], index);\n\n // Flush the initial hooks for elements in the view that have been added up to this point.\n // PERF WARNING: do NOT extract this to a separate function without running benchmarks\n if (!checkNoChangesMode) {\n const hooksInitPhaseCompleted =\n (lView[FLAGS] & LViewFlags.InitPhaseStateMask) === InitPhaseState.InitPhaseCompleted;\n if (hooksInitPhaseCompleted) {\n const preOrderCheckHooks = tView.preOrderCheckHooks;\n if (preOrderCheckHooks !== null) {\n executeCheckHooks(lView, preOrderCheckHooks, index);\n }\n } else {\n const preOrderHooks = tView.preOrderHooks;\n if (preOrderHooks !== null) {\n executeInitAndCheckHooks(lView, preOrderHooks, InitPhaseState.OnInitHooksToBeRun, index);\n }\n }\n }\n\n // We must set the selected index *after* running the hooks, because hooks may have side-effects\n // that cause other template functions to run, thus updating the selected index, which is global\n // state. If we run `setSelectedIndex` *before* we run the hooks, in some cases the selected index\n // will be altered by the time we leave the `ɵɵadvance` instruction.\n setSelectedIndex(index);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/** Flags describing an input for a directive. */\nexport enum InputFlags {\n None = 0,\n SignalBased = 1 << 0,\n HasDecoratorInputTransform = 1 << 1,\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {setActiveConsumer, SIGNAL} from '../../../primitives/signals';\n\nimport {InputSignalWithTransform} from '../../authoring/input/input_signal';\nimport {InputSignalNode} from '../../authoring/input/input_signal_node';\nimport {applyValueToInputField} from '../apply_value_input_field';\nimport {DirectiveDef} from '../interfaces/definition';\nimport {InputFlags} from '../interfaces/input_flags';\nimport {NodeInjectorFactory} from '../interfaces/injector';\n\nexport function writeToDirectiveInput<T>(\n def: DirectiveDef<T>,\n instance: T,\n publicName: string,\n value: unknown,\n) {\n const prevConsumer = setActiveConsumer(null);\n try {\n if (ngDevMode) {\n if (!def.inputs.hasOwnProperty(publicName)) {\n throw new Error(\n `ASSERTION ERROR: Directive ${def.type.name} does not have an input with a public name of \"${publicName}\"`,\n );\n }\n\n // Usually we resolve the directive instance using `LView[someIndex]` before writing to an\n // input, however if the read happens to early, the `LView[someIndex]` might actually be a\n // `NodeInjectorFactory`. Check for this specific case here since it can break in subtle ways.\n if (instance instanceof NodeInjectorFactory) {\n throw new Error(\n `ASSERTION ERROR: Cannot write input to factory for type ${def.type.name}. Directive has not been created yet.`,\n );\n }\n }\n\n const [privateName, flags, transform] = def.inputs[publicName];\n\n // If we know we are dealing with a signal input, we cache its reference\n // in a tree-shakable way. The input signal node can then be used for\n // value transform execution or actual value updates without introducing\n // additional megamorphic accesses for accessing the instance field.\n let inputSignalNode: InputSignalNode<unknown, unknown> | null = null;\n if ((flags & InputFlags.SignalBased) !== 0) {\n const field = (instance as any)[privateName] as InputSignalWithTransform<unknown, unknown>;\n inputSignalNode = field[SIGNAL];\n }\n\n // If there is a signal node and a transform, run it before potentially\n // delegating to features like `NgOnChanges`.\n if (inputSignalNode !== null && inputSignalNode.transformFn !== undefined) {\n value = inputSignalNode.transformFn(value);\n } else if (transform !== null) {\n // If there is a decorator input transform, run it.\n value = transform.call(instance, value);\n }\n\n if (def.setInput !== null) {\n def.setInput(instance, inputSignalNode, value, publicName, privateName);\n } else {\n applyValueToInputField(instance, inputSignalNode, privateName, value);\n }\n } finally {\n setActiveConsumer(prevConsumer);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Injector} from '../../di/injector';\nimport {hasSkipHydrationAttrOnRElement} from '../../hydration/skip_hydration';\nimport {PRESERVE_HOST_CONTENT, PRESERVE_HOST_CONTENT_DEFAULT} from '../../hydration/tokens';\nimport {processTextNodeMarkersBeforeHydration} from '../../hydration/utils';\nimport {ViewEncapsulation} from '../../metadata/view';\nimport {\n validateAgainstEventAttributes,\n validateAgainstEventProperties,\n} from '../../sanitization/sanitization';\nimport {assertIndexInRange, assertNotSame} from '../../util/assert';\nimport {escapeCommentText} from '../../util/dom';\nimport {normalizeDebugBindingName, normalizeDebugBindingValue} from '../../util/ng_reflect';\nimport {stringify} from '../../util/stringify';\nimport {assertFirstCreatePass, assertLView} from '../assert';\nimport {attachPatchData} from '../context_discovery';\nimport {getNodeInjectable, getOrCreateNodeInjectorForNode} from '../di';\nimport {throwMultipleComponentError} from '../errors';\nimport {ComponentDef, ComponentTemplate, DirectiveDef, RenderFlags} from '../interfaces/definition';\nimport {\n InitialInputData,\n InitialInputs,\n LocalRefExtractor,\n TContainerNode,\n TDirectiveHostNode,\n TElementContainerNode,\n TElementNode,\n TNode,\n TNodeFlags,\n TNodeType,\n} from '../interfaces/node';\nimport {Renderer} from '../interfaces/renderer';\nimport {RComment, RElement} from '../interfaces/renderer_dom';\nimport {SanitizerFn} from '../interfaces/sanitization';\nimport {isComponentDef, isComponentHost} from '../interfaces/type_checks';\nimport {\n CONTEXT,\n FLAGS,\n HEADER_OFFSET,\n INJECTOR,\n LView,\n LViewFlags,\n RENDERER,\n TData,\n TView,\n} from '../interfaces/view';\nimport {assertTNodeType} from '../node_assert';\nimport {isNodeMatchingSelectorList} from '../node_selector_matcher';\nimport {profiler} from '../profiler';\nimport {ProfilerEvent} from '../profiler_types';\nimport {\n getCurrentDirectiveIndex,\n getSelectedIndex,\n isInCheckNoChangesMode,\n setCurrentDirectiveIndex,\n setSelectedIndex,\n} from '../state';\nimport {NO_CHANGE} from '../tokens';\nimport {INTERPOLATION_DELIMITER} from '../util/misc_utils';\nimport {renderStringify} from '../util/stringify_utils';\nimport {getComponentLViewByIndex, getNativeByTNode, unwrapLView} from '../util/view_utils';\n\nimport {clearElementContents} from '../dom_node_manipulation';\nimport {createComponentLView} from '../view/construction';\nimport {selectIndexInternal} from './advance';\nimport {handleUnknownPropertyError, isPropertyValid, matchingSchemas} from './element_validation';\nimport {writeToDirectiveInput} from './write_to_directive_input';\nimport {ErrorHandler} from '../../error_handler';\n\nexport function executeTemplate<T>(\n tView: TView,\n lView: LView<T>,\n templateFn: ComponentTemplate<T>,\n rf: RenderFlags,\n context: T,\n) {\n const prevSelectedIndex = getSelectedIndex();\n const isUpdatePhase = rf & RenderFlags.Update;\n try {\n setSelectedIndex(-1);\n if (isUpdatePhase && lView.length > HEADER_OFFSET) {\n // When we're updating, inherently select 0 so we don't\n // have to generate that instruction for most update blocks.\n selectIndexInternal(tView, lView, HEADER_OFFSET, !!ngDevMode && isInCheckNoChangesMode());\n }\n\n const preHookType = isUpdatePhase\n ? ProfilerEvent.TemplateUpdateStart\n : ProfilerEvent.TemplateCreateStart;\n profiler(preHookType, context as unknown as {});\n templateFn(rf, context);\n } finally {\n setSelectedIndex(prevSelectedIndex);\n\n const postHookType = isUpdatePhase\n ? ProfilerEvent.TemplateUpdateEnd\n : ProfilerEvent.TemplateCreateEnd;\n profiler(postHookType, context as unknown as {});\n }\n}\n\n/**\n * Creates directive instances.\n */\nexport function createDirectivesInstances(tView: TView, lView: LView, tNode: TDirectiveHostNode) {\n instantiateAllDirectives(tView, lView, tNode);\n if ((tNode.flags & TNodeFlags.hasHostBindings) === TNodeFlags.hasHostBindings) {\n invokeDirectivesHostBindings(tView, lView, tNode);\n }\n}\n\n/**\n * Takes a list of local names and indices and pushes the resolved local variable values\n * to LView in the same order as they are loaded in the template with load().\n */\nexport function saveResolvedLocalsInData(\n viewData: LView,\n tNode: TDirectiveHostNode,\n localRefExtractor: LocalRefExtractor = getNativeByTNode,\n): void {\n const localNames = tNode.localNames;\n if (localNames !== null) {\n let localIndex = tNode.index + 1;\n for (let i = 0; i < localNames.length; i += 2) {\n const index = localNames[i + 1] as number;\n const value =\n index === -1\n ? localRefExtractor(\n tNode as TElementNode | TContainerNode | TElementContainerNode,\n viewData,\n )\n : viewData[index];\n viewData[localIndex++] = value;\n }\n }\n}\n\n/**\n * Locates the host native element, used for bootstrapping existing nodes into rendering pipeline.\n *\n * @param renderer the renderer used to locate the element.\n * @param elementOrSelector Render element or CSS selector to locate the element.\n * @param encapsulation View Encapsulation defined for component that requests host element.\n * @param injector Root view injector instance.\n */\nexport function locateHostElement(\n renderer: Renderer,\n elementOrSelector: RElement | string,\n encapsulation: ViewEncapsulation,\n injector: Injector,\n): RElement {\n // Note: we use default value for the `PRESERVE_HOST_CONTENT` here even though it's a\n // tree-shakable one (providedIn:'root'). This code path can be triggered during dynamic\n // component creation (after calling ViewContainerRef.createComponent) when an injector\n // instance can be provided. The injector instance might be disconnected from the main DI\n // tree, thus the `PRESERVE_HOST_CONTENT` would not be able to instantiate. In this case, the\n // default value will be used.\n const preserveHostContent = injector.get(PRESERVE_HOST_CONTENT, PRESERVE_HOST_CONTENT_DEFAULT);\n\n // When using native Shadow DOM, do not clear host element to allow native slot\n // projection.\n const preserveContent = preserveHostContent || encapsulation === ViewEncapsulation.ShadowDom;\n const rootElement = renderer.selectRootElement(elementOrSelector, preserveContent);\n applyRootElementTransform(rootElement as HTMLElement);\n return rootElement;\n}\n\n/**\n * Applies any root element transformations that are needed. If hydration is enabled,\n * this will process corrupted text nodes.\n *\n * @param rootElement the app root HTML Element\n */\nexport function applyRootElementTransform(rootElement: HTMLElement) {\n _applyRootElementTransformImpl(rootElement as HTMLElement);\n}\n\n/**\n * Reference to a function that applies transformations to the root HTML element\n * of an app. When hydration is enabled, this processes any corrupt text nodes\n * so they are properly hydratable on the client.\n *\n * @param rootElement the app root HTML Element\n */\nlet _applyRootElementTransformImpl: typeof applyRootElementTransformImpl = () => null;\n\n/**\n * Processes text node markers before hydration begins. This replaces any special comment\n * nodes that were added prior to serialization are swapped out to restore proper text\n * nodes before hydration.\n *\n * @param rootElement the app root HTML Element\n */\nexport function applyRootElementTransformImpl(rootElement: HTMLElement) {\n if (hasSkipHydrationAttrOnRElement(rootElement)) {\n // Handle a situation when the `ngSkipHydration` attribute is applied\n // to the root node of an application. In this case, we should clear\n // the contents and render everything from scratch.\n clearElementContents(rootElement as RElement);\n } else {\n processTextNodeMarkersBeforeHydration(rootElement);\n }\n}\n\n/**\n * Sets the implementation for the `applyRootElementTransform` function.\n */\nexport function enableApplyRootElementTransformImpl() {\n _applyRootElementTransformImpl = applyRootElementTransformImpl;\n}\n\n/**\n * Mapping between attributes names that don't correspond to their element property names.\n *\n * Performance note: this function is written as a series of if checks (instead of, say, a property\n * object lookup) for performance reasons - the series of `if` checks seems to be the fastest way of\n * mapping property names. Do NOT change without benchmarking.\n *\n * Note: this mapping has to be kept in sync with the equally named mapping in the template\n * type-checking machinery of ngtsc.\n */\nfunction mapPropName(name: string): string {\n if (name === 'class') return 'className';\n if (name === 'for') return 'htmlFor';\n if (name === 'formaction') return 'formAction';\n if (name === 'innerHtml') return 'innerHTML';\n if (name === 'readonly') return 'readOnly';\n if (name === 'tabindex') return 'tabIndex';\n return name;\n}\n\nexport function elementPropertyInternal<T>(\n tView: TView,\n tNode: TNode,\n lView: LView,\n propName: string,\n value: T,\n renderer: Renderer,\n sanitizer: SanitizerFn | null | undefined,\n nativeOnly: boolean,\n): void {\n ngDevMode && assertNotSame(value, NO_CHANGE as any, 'Incoming value should never be NO_CHANGE.');\n\n if (!nativeOnly) {\n const hasSetInput = setAllInputsForProperty(tNode, tView, lView, propName, value);\n\n if (hasSetInput) {\n isComponentHost(tNode) && markDirtyIfOnPush(lView, tNode.index);\n ngDevMode && setNgReflectProperties(lView, tView, tNode, propName, value);\n return; // Stop propcessing if we've matched at least one input.\n }\n }\n\n if (tNode.type & TNodeType.AnyRNode) {\n const element = getNativeByTNode(tNode, lView) as RElement | RComment;\n propName = mapPropName(propName);\n\n if (ngDevMode) {\n validateAgainstEventProperties(propName);\n if (!isPropertyValid(element, propName, tNode.value, tView.schemas)) {\n handleUnknownPropertyError(propName, tNode.value, tNode.type, lView);\n }\n ngDevMode.rendererSetProperty++;\n }\n\n // It is assumed that the sanitizer is only added when the compiler determines that the\n // property is risky, so sanitization can be done without further checks.\n value = sanitizer != null ? (sanitizer(value, tNode.value || '', propName) as any) : value;\n renderer.setProperty(element as RElement, propName, value);\n } else if (tNode.type & TNodeType.AnyContainer) {\n // If the node is a container and the property didn't\n // match any of the inputs or schemas we should throw.\n if (ngDevMode && !matchingSchemas(tView.schemas, tNode.value)) {\n handleUnknownPropertyError(propName, tNode.value, tNode.type, lView);\n }\n }\n}\n\n/** If node is an OnPush component, marks its LView dirty. */\nexport function markDirtyIfOnPush(lView: LView, viewIndex: number): void {\n ngDevMode && assertLView(lView);\n const childComponentLView = getComponentLViewByIndex(viewIndex, lView);\n if (!(childComponentLView[FLAGS] & LViewFlags.CheckAlways)) {\n childComponentLView[FLAGS] |= LViewFlags.Dirty;\n }\n}\n\nfunction setNgReflectProperty(lView: LView, tNode: TNode, attrName: string, value: any) {\n const element = getNativeByTNode(tNode, lView) as RElement | RComment;\n const renderer = lView[RENDERER];\n attrName = normalizeDebugBindingName(attrName);\n const debugValue = normalizeDebugBindingValue(value);\n if (tNode.type & TNodeType.AnyRNode) {\n if (value == null) {\n renderer.removeAttribute(element as RElement, attrName);\n } else {\n renderer.setAttribute(element as RElement, attrName, debugValue);\n }\n } else {\n const textContent = escapeCommentText(\n `bindings=${JSON.stringify({[attrName]: debugValue}, null, 2)}`,\n );\n renderer.setValue(element as RComment, textContent);\n }\n}\n\nfunction setNgReflectProperties(\n lView: LView,\n tView: TView,\n tNode: TNode,\n publicName: string,\n value: any,\n) {\n if (!(tNode.type & (TNodeType.AnyRNode | TNodeType.Container))) {\n return;\n }\n\n const inputConfig = tNode.inputs?.[publicName];\n const hostInputConfig = tNode.hostDirectiveInputs?.[publicName];\n\n if (hostInputConfig) {\n for (let i = 0; i < hostInputConfig.length; i += 2) {\n const index = hostInputConfig[i] as number;\n const publicName = hostInputConfig[i + 1] as string;\n const def = tView.data[index] as DirectiveDef<unknown>;\n setNgReflectProperty(lView, tNode, def.inputs[publicName][0], value);\n }\n }\n\n // Note: we set the private name of the input as the reflected property, not the public one.\n if (inputConfig) {\n for (const index of inputConfig) {\n const def = tView.data[index] as DirectiveDef<unknown>;\n setNgReflectProperty(lView, tNode, def.inputs[publicName][0], value);\n }\n }\n}\n\n/**\n * Instantiate all the directives that were previously resolved on the current node.\n */\nfunction instantiateAllDirectives(tView: TView, lView: LView, tNode: TDirectiveHostNode) {\n const start = tNode.directiveStart;\n const end = tNode.directiveEnd;\n\n // The component view needs to be created before creating the node injector\n // since it is used to inject some special symbols like `ChangeDetectorRef`.\n if (isComponentHost(tNode)) {\n ngDevMode && assertTNodeType(tNode, TNodeType.AnyRNode);\n createComponentLView(\n lView,\n tNode as TElementNode,\n tView.data[start + tNode.componentOffset] as ComponentDef<unknown>,\n );\n }\n\n if (!tView.firstCreatePass) {\n getOrCreateNodeInjectorForNode(tNode, lView);\n }\n\n const initialInputs = tNode.initialInputs;\n for (let i = start; i < end; i++) {\n const def = tView.data[i] as DirectiveDef<any>;\n const directive = getNodeInjectable(lView, tView, i, tNode);\n attachPatchData(directive, lView);\n\n if (initialInputs !== null) {\n setInputsFromAttrs(lView, i - start, directive, def, tNode, initialInputs!);\n }\n\n if (isComponentDef(def)) {\n const componentView = getComponentLViewByIndex(tNode.index, lView);\n componentView[CONTEXT] = getNodeInjectable(lView, tView, i, tNode);\n }\n }\n}\n\nexport function invokeDirectivesHostBindings(tView: TView, lView: LView, tNode: TNode) {\n const start = tNode.directiveStart;\n const end = tNode.directiveEnd;\n const elementIndex = tNode.index;\n const currentDirectiveIndex = getCurrentDirectiveIndex();\n try {\n setSelectedIndex(elementIndex);\n for (let dirIndex = start; dirIndex < end; dirIndex++) {\n const def = tView.data[dirIndex] as DirectiveDef<unknown>;\n const directive = lView[dirIndex];\n setCurrentDirectiveIndex(dirIndex);\n if (def.hostBindings !== null || def.hostVars !== 0 || def.hostAttrs !== null) {\n invokeHostBindingsInCreationMode(def, directive);\n }\n }\n } finally {\n setSelectedIndex(-1);\n setCurrentDirectiveIndex(currentDirectiveIndex);\n }\n}\n\n/**\n * Invoke the host bindings in creation mode.\n *\n * @param def `DirectiveDef` which may contain the `hostBindings` function.\n * @param directive Instance of directive.\n */\nexport function invokeHostBindingsInCreationMode(def: DirectiveDef<any>, directive: any) {\n if (def.hostBindings !== null) {\n def.hostBindings!(RenderFlags.Create, directive);\n }\n}\n\n/**\n * Matches the current node against all available selectors.\n * If a component is matched (at most one), it is returned in first position in the array.\n */\nexport function findDirectiveDefMatches(\n tView: TView,\n tNode: TElementNode | TContainerNode | TElementContainerNode,\n): DirectiveDef<unknown>[] | null {\n ngDevMode && assertFirstCreatePass(tView);\n ngDevMode && assertTNodeType(tNode, TNodeType.AnyRNode | TNodeType.AnyContainer);\n\n const registry = tView.directiveRegistry;\n let matches: DirectiveDef<unknown>[] | null = null;\n if (registry) {\n for (let i = 0; i < registry.length; i++) {\n const def = registry[i] as ComponentDef<any> | DirectiveDef<any>;\n if (isNodeMatchingSelectorList(tNode, def.selectors!, /* isProjectionMode */ false)) {\n matches ??= [];\n\n if (isComponentDef(def)) {\n if (ngDevMode) {\n assertTNodeType(\n tNode,\n TNodeType.Element,\n `\"${tNode.value}\" tags cannot be used as component hosts. ` +\n `Please use a different tag to activate the ${stringify(def.type)} component.`,\n );\n\n if (matches.length && isComponentDef(matches[0])) {\n throwMultipleComponentError(tNode, matches.find(isComponentDef)!.type, def.type);\n }\n }\n\n matches.unshift(def);\n } else {\n matches.push(def);\n }\n }\n }\n }\n\n return matches;\n}\n\nexport function elementAttributeInternal(\n tNode: TNode,\n lView: LView,\n name: string,\n value: any,\n sanitizer: SanitizerFn | null | undefined,\n namespace: string | null | undefined,\n) {\n if (ngDevMode) {\n assertNotSame(value, NO_CHANGE as any, 'Incoming value should never be NO_CHANGE.');\n validateAgainstEventAttributes(name);\n assertTNodeType(\n tNode,\n TNodeType.Element,\n `Attempted to set attribute \\`${name}\\` on a container node. ` +\n `Host bindings are not valid on ng-container or ng-template.`,\n );\n }\n const element = getNativeByTNode(tNode, lView) as RElement;\n setElementAttribute(lView[RENDERER], element, namespace, tNode.value, name, value, sanitizer);\n}\n\nexport function setElementAttribute(\n renderer: Renderer,\n element: RElement,\n namespace: string | null | undefined,\n tagName: string | null,\n name: string,\n value: any,\n sanitizer: SanitizerFn | null | undefined,\n) {\n if (value == null) {\n ngDevMode && ngDevMode.rendererRemoveAttribute++;\n renderer.removeAttribute(element, name, namespace);\n } else {\n ngDevMode && ngDevMode.rendererSetAttribute++;\n const strValue =\n sanitizer == null ? renderStringify(value) : sanitizer(value, tagName || '', name);\n\n renderer.setAttribute(element, name, strValue as string, namespace);\n }\n}\n\n/**\n * Sets initial input properties on directive instances from attribute data\n *\n * @param lView Current LView that is being processed.\n * @param directiveIndex Index of the directive in directives array\n * @param instance Instance of the directive on which to set the initial inputs\n * @param def The directive def that contains the list of inputs\n * @param tNode The static data for this node\n */\nfunction setInputsFromAttrs<T>(\n lView: LView,\n directiveIndex: number,\n instance: T,\n def: DirectiveDef<T>,\n tNode: TNode,\n initialInputData: InitialInputData,\n): void {\n const initialInputs: InitialInputs | null = initialInputData![directiveIndex];\n if (initialInputs !== null) {\n for (let i = 0; i < initialInputs.length; i += 2) {\n const lookupName = initialInputs[i];\n const value = initialInputs[i + 1];\n\n writeToDirectiveInput<T>(def, instance, lookupName, value);\n\n if (ngDevMode) {\n setNgReflectProperty(lView, tNode, def.inputs[lookupName][0], value);\n }\n }\n }\n}\n\n///////////////////////////////\n//// Bindings & interpolations\n///////////////////////////////\n\n/**\n * Stores meta-data for a property binding to be used by TestBed's `DebugElement.properties`.\n *\n * In order to support TestBed's `DebugElement.properties` we need to save, for each binding:\n * - a bound property name;\n * - a static parts of interpolated strings;\n *\n * A given property metadata is saved at the binding's index in the `TView.data` (in other words, a\n * property binding metadata will be stored in `TView.data` at the same index as a bound value in\n * `LView`). Metadata are represented as `INTERPOLATION_DELIMITER`-delimited string with the\n * following format:\n * - `propertyName` for bound properties;\n * - `propertyName�prefix�interpolation_static_part1�..interpolation_static_partN�suffix` for\n * interpolated properties.\n *\n * @param tData `TData` where meta-data will be saved;\n * @param tNode `TNode` that is a target of the binding;\n * @param propertyName bound property name;\n * @param bindingIndex binding index in `LView`\n * @param interpolationParts static interpolation parts (for property interpolations)\n */\nexport function storePropertyBindingMetadata(\n tData: TData,\n tNode: TNode,\n propertyName: string,\n bindingIndex: number,\n ...interpolationParts: string[]\n) {\n // Binding meta-data are stored only the first time a given property instruction is processed.\n // Since we don't have a concept of the \"first update pass\" we need to check for presence of the\n // binding meta-data to decide if one should be stored (or if was stored already).\n if (tData[bindingIndex] === null) {\n if (!tNode.inputs?.[propertyName] && !tNode.hostDirectiveInputs?.[propertyName]) {\n const propBindingIdxs = tNode.propertyBindings || (tNode.propertyBindings = []);\n propBindingIdxs.push(bindingIndex);\n let bindingMetadata = propertyName;\n if (interpolationParts.length > 0) {\n bindingMetadata +=\n INTERPOLATION_DELIMITER + interpolationParts.join(INTERPOLATION_DELIMITER);\n }\n tData[bindingIndex] = bindingMetadata;\n }\n }\n}\n\n/**\n * There are cases where the sub component's renderer needs to be included\n * instead of the current renderer (see the componentSyntheticHost* instructions).\n */\nexport function loadComponentRenderer(\n currentDef: DirectiveDef<any> | null,\n tNode: TNode,\n lView: LView,\n): Renderer {\n // TODO(FW-2043): the `currentDef` is null when host bindings are invoked while creating root\n // component (see packages/core/src/render3/component.ts). This is not consistent with the process\n // of creating inner components, when current directive index is available in the state. In order\n // to avoid relying on current def being `null` (thus special-casing root component creation), the\n // process of creating root component should be unified with the process of creating inner\n // components.\n if (currentDef === null || isComponentDef(currentDef)) {\n lView = unwrapLView(lView[tNode.index])!;\n }\n return lView[RENDERER];\n}\n\n/** Handles an error thrown in an LView. */\nexport function handleError(lView: LView, error: any): void {\n const injector = lView[INJECTOR];\n const errorHandler = injector ? injector.get(ErrorHandler, null) : null;\n errorHandler && errorHandler.handleError(error);\n}\n\n/**\n * Set all directive inputs with the specific public name on the node.\n *\n * @param tNode TNode on which the input is being set.\n * @param tView Current TView\n * @param lView `LView` which contains the directives.\n * @param publicName Public name of the input being set.\n * @param value Value to set.\n */\nexport function setAllInputsForProperty(\n tNode: TNode,\n tView: TView,\n lView: LView,\n publicName: string,\n value: unknown,\n): boolean {\n const inputs = tNode.inputs?.[publicName];\n const hostDirectiveInputs = tNode.hostDirectiveInputs?.[publicName];\n let hasMatch = false;\n\n if (hostDirectiveInputs) {\n for (let i = 0; i < hostDirectiveInputs.length; i += 2) {\n const index = hostDirectiveInputs[i] as number;\n ngDevMode && assertIndexInRange(lView, index);\n const publicName = hostDirectiveInputs[i + 1] as string;\n const def = tView.data[index] as DirectiveDef<unknown>;\n writeToDirectiveInput(def, lView[index], publicName, value);\n hasMatch = true;\n }\n }\n\n if (inputs) {\n for (const index of inputs) {\n ngDevMode && assertIndexInRange(lView, index);\n const instance = lView[index];\n const def = tView.data[index] as DirectiveDef<any>;\n writeToDirectiveInput(def, instance, publicName, value);\n hasMatch = true;\n }\n }\n\n return hasMatch;\n}\n\n/**\n * Sets an input value only on a specific directive and its host directives.\n * @param tNode TNode on which the input is being set.\n * @param tView Current TView\n * @param lView `LView` which contains the directives.\n * @param target Directive on which to set the input.\n * @param publicName Public name of the input being set.\n * @param value Value to set.\n */\nexport function setDirectiveInput(\n tNode: TNode,\n tView: TView,\n lView: LView,\n target: DirectiveDef<unknown>,\n publicName: string,\n value: string,\n): boolean {\n let hostIndex: number | null = null;\n let hostDirectivesStart: number | null = null;\n let hostDirectivesEnd: number | null = null;\n let hasSet = false;\n\n if (ngDevMode && !tNode.directiveToIndex?.has(target.type)) {\n throw new Error(`Node does not have a directive with type ${target.type.name}`);\n }\n\n const data = tNode.directiveToIndex!.get(target.type)!;\n\n if (typeof data === 'number') {\n hostIndex = data;\n } else {\n [hostIndex, hostDirectivesStart, hostDirectivesEnd] = data;\n }\n\n if (\n hostDirectivesStart !== null &&\n hostDirectivesEnd !== null &&\n tNode.hostDirectiveInputs?.hasOwnProperty(publicName)\n ) {\n const hostDirectiveInputs = tNode.hostDirectiveInputs[publicName];\n\n for (let i = 0; i < hostDirectiveInputs.length; i += 2) {\n const index = hostDirectiveInputs[i] as number;\n\n if (index >= hostDirectivesStart && index <= hostDirectivesEnd) {\n ngDevMode && assertIndexInRange(lView, index);\n const def = tView.data[index] as DirectiveDef<unknown>;\n const hostDirectivePublicName = hostDirectiveInputs[i + 1] as string;\n writeToDirectiveInput(def, lView[index], hostDirectivePublicName, value);\n hasSet = true;\n } else if (index > hostDirectivesEnd) {\n // Directives here are in ascending order so we can stop looking once we're past the range.\n break;\n }\n }\n }\n\n if (hostIndex !== null) {\n ngDevMode && assertIndexInRange(lView, hostIndex);\n writeToDirectiveInput(target, lView[hostIndex], publicName, value);\n hasSet = true;\n }\n\n return hasSet;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {retrieveHydrationInfo} from '../../hydration/utils';\nimport {assertEqual, assertNotReactive} from '../../util/assert';\nimport {RenderFlags} from '../interfaces/definition';\nimport {\n CONTEXT,\n FLAGS,\n HOST,\n HYDRATION,\n INJECTOR,\n LView,\n LViewFlags,\n QUERIES,\n TVIEW,\n TView,\n} from '../interfaces/view';\nimport {profiler} from '../profiler';\nimport {ProfilerEvent} from '../profiler_types';\nimport {executeViewQueryFn, refreshContentQueries} from '../queries/query_execution';\nimport {enterView, leaveView} from '../state';\nimport {getComponentLViewByIndex, isCreationMode} from '../util/view_utils';\n\nimport {executeTemplate} from './shared';\n\nexport function renderComponent(hostLView: LView, componentHostIdx: number) {\n ngDevMode && assertEqual(isCreationMode(hostLView), true, 'Should be run in creation mode');\n const componentView = getComponentLViewByIndex(componentHostIdx, hostLView);\n const componentTView = componentView[TVIEW];\n syncViewWithBlueprint(componentTView, componentView);\n\n const hostRNode = componentView[HOST];\n // Populate an LView with hydration info retrieved from the DOM via TransferState.\n if (hostRNode !== null && componentView[HYDRATION] === null) {\n componentView[HYDRATION] = retrieveHydrationInfo(hostRNode, componentView[INJECTOR]);\n }\n\n profiler(ProfilerEvent.ComponentStart);\n\n renderView(componentTView, componentView, componentView[CONTEXT]);\n\n profiler(ProfilerEvent.ComponentEnd, componentView[CONTEXT] as any as {});\n}\n\n/**\n * Syncs an LView instance with its blueprint if they have gotten out of sync.\n *\n * Typically, blueprints and their view instances should always be in sync, so the loop here\n * will be skipped. However, consider this case of two components side-by-side:\n *\n * App template:\n * ```html\n * <comp></comp>\n * <comp></comp>\n * ```\n *\n * The following will happen:\n * 1. App template begins processing.\n * 2. First <comp> is matched as a component and its LView is created.\n * 3. Second <comp> is matched as a component and its LView is created.\n * 4. App template completes processing, so it's time to check child templates.\n * 5. First <comp> template is checked. It has a directive, so its def is pushed to blueprint.\n * 6. Second <comp> template is checked. Its blueprint has been updated by the first\n * <comp> template, but its LView was created before this update, so it is out of sync.\n *\n * Note that embedded views inside ngFor loops will never be out of sync because these views\n * are processed as soon as they are created.\n *\n * @param tView The `TView` that contains the blueprint for syncing\n * @param lView The view to sync\n */\nexport function syncViewWithBlueprint(tView: TView, lView: LView) {\n for (let i = lView.length; i < tView.blueprint.length; i++) {\n lView.push(tView.blueprint[i]);\n }\n}\n\n/**\n * Processes a view in the creation mode. This includes a number of steps in a specific order:\n * - creating view query functions (if any);\n * - executing a template function in the creation mode;\n * - updating static queries (if any);\n * - creating child components defined in a given view.\n */\nexport function renderView<T>(tView: TView, lView: LView<T>, context: T): void {\n ngDevMode && assertEqual(isCreationMode(lView), true, 'Should be run in creation mode');\n ngDevMode && assertNotReactive(renderView.name);\n enterView(lView);\n try {\n const viewQuery = tView.viewQuery;\n if (viewQuery !== null) {\n executeViewQueryFn<T>(RenderFlags.Create, viewQuery, context);\n }\n\n // Execute a template associated with this view, if it exists. A template function might not be\n // defined for the root component views.\n const templateFn = tView.template;\n if (templateFn !== null) {\n executeTemplate<T>(tView, lView, templateFn, RenderFlags.Create, context);\n }\n\n // This needs to be set before children are processed to support recursive components.\n // This must be set to false immediately after the first creation run because in an\n // ngFor loop, all the views will be created together before update mode runs and turns\n // off firstCreatePass. If we don't set it here, instances will perform directive\n // matching, etc again and again.\n if (tView.firstCreatePass) {\n tView.firstCreatePass = false;\n }\n\n // Mark all queries active in this view as dirty. This is necessary for signal-based queries to\n // have a clear marking point where we can read query results atomically (for a given view).\n lView[QUERIES]?.finishViewCreation(tView);\n\n // We resolve content queries specifically marked as `static` in creation mode. Dynamic\n // content queries are resolved during change detection (i.e. update mode), after embedded\n // views are refreshed (see block above).\n if (tView.staticContentQueries) {\n refreshContentQueries(tView, lView);\n }\n\n // We must materialize query results before child components are processed\n // in case a child component has projected a container. The LContainer needs\n // to exist so the embedded views are properly attached by the container.\n if (tView.staticViewQueries) {\n executeViewQueryFn<T>(RenderFlags.Update, tView.viewQuery!, context);\n }\n\n // Render child component views.\n const components = tView.components;\n if (components !== null) {\n renderChildComponents(lView, components);\n }\n } catch (error) {\n // If we didn't manage to get past the first template pass due to\n // an error, mark the view as corrupted so we can try to recover.\n if (tView.firstCreatePass) {\n tView.incompleteFirstPass = true;\n tView.firstCreatePass = false;\n }\n\n throw error;\n } finally {\n lView[FLAGS] &= ~LViewFlags.CreationMode;\n leaveView();\n }\n}\n\n/** Renders child components in the current view (creation mode). */\nfunction renderChildComponents(hostLView: LView, components: number[]): void {\n for (let i = 0; i < components.length; i++) {\n renderComponent(hostLView, components[i]);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {setActiveConsumer} from '../../primitives/signals';\n\nimport {Injector} from '../di/injector';\nimport {DehydratedContainerView} from '../hydration/interfaces';\nimport {hasInSkipHydrationBlockFlag} from '../hydration/skip_hydration';\nimport {assertDefined} from '../util/assert';\n\nimport {assertLContainer, assertTNodeForLView} from './assert';\nimport {renderView} from './instructions/render';\nimport {TNode} from './interfaces/node';\nimport {DECLARATION_LCONTAINER, FLAGS, LView, LViewFlags, QUERIES} from './interfaces/view';\nimport {createLView} from './view/construction';\n\nexport function createAndRenderEmbeddedLView<T>(\n declarationLView: LView<unknown>,\n templateTNode: TNode,\n context: T,\n options?: {\n injector?: Injector;\n embeddedViewInjector?: Injector;\n dehydratedView?: DehydratedContainerView | null;\n },\n): LView<T> {\n const prevConsumer = setActiveConsumer(null);\n try {\n const embeddedTView = templateTNode.tView!;\n ngDevMode && assertDefined(embeddedTView, 'TView must be defined for a template node.');\n ngDevMode && assertTNodeForLView(templateTNode, declarationLView);\n\n // Embedded views follow the change detection strategy of the view they're declared in.\n const isSignalView = declarationLView[FLAGS] & LViewFlags.SignalView;\n const viewFlags = isSignalView ? LViewFlags.SignalView : LViewFlags.CheckAlways;\n const embeddedLView = createLView<T>(\n declarationLView,\n embeddedTView,\n context,\n viewFlags,\n null,\n templateTNode,\n null,\n null,\n options?.injector ?? null,\n options?.embeddedViewInjector ?? null,\n options?.dehydratedView ?? null,\n );\n\n const declarationLContainer = declarationLView[templateTNode.index];\n ngDevMode && assertLContainer(declarationLContainer);\n embeddedLView[DECLARATION_LCONTAINER] = declarationLContainer;\n\n const declarationViewLQueries = declarationLView[QUERIES];\n if (declarationViewLQueries !== null) {\n embeddedLView[QUERIES] = declarationViewLQueries.createEmbeddedView(embeddedTView);\n }\n\n // execute creation mode of a view\n renderView(embeddedTView, embeddedLView, context);\n\n return embeddedLView;\n } finally {\n setActiveConsumer(prevConsumer);\n }\n}\n\n/**\n * Returns whether an elements that belong to a view should be\n * inserted into the DOM. For client-only cases, DOM elements are\n * always inserted. For hydration cases, we check whether serialized\n * info is available for a view and the view is not in a \"skip hydration\"\n * block (in which case view contents was re-created, thus needing insertion).\n */\nexport function shouldAddViewToDom(\n tNode: TNode,\n dehydratedView?: DehydratedContainerView | null,\n): boolean {\n return (\n !dehydratedView || dehydratedView.firstChild === null || hasInSkipHydrationBlockFlag(tNode)\n );\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/**\n * @fileoverview\n *\n * This file provides mechanism by which code relevant to the `TIcuContainerNode` is only loaded if\n * ICU is present in the template.\n */\n\nimport {TIcuContainerNode} from '../interfaces/node';\nimport {RNode} from '../interfaces/renderer_dom';\nimport {LView} from '../interfaces/view';\n\nlet _icuContainerIterate: (\n tIcuContainerNode: TIcuContainerNode,\n lView: LView,\n) => () => RNode | null;\n\n/**\n * Iterator which provides ability to visit all of the `TIcuContainerNode` root `RNode`s.\n */\nexport function icuContainerIterate(\n tIcuContainerNode: TIcuContainerNode,\n lView: LView,\n): () => RNode | null {\n return _icuContainerIterate(tIcuContainerNode, lView);\n}\n\n/**\n * Ensures that `IcuContainerVisitor`'s implementation is present.\n *\n * This function is invoked when i18n instruction comes across an ICU. The purpose is to allow the\n * bundler to tree shake ICU logic and only load it if ICU instruction is executed.\n */\nexport function ensureIcuContainerVisitorLoaded(\n loader: () => (tIcuContainerNode: TIcuContainerNode, lView: LView) => () => RNode | null,\n) {\n if (_icuContainerIterate === undefined) {\n // Do not inline this function. We want to keep `ensureIcuContainerVisitorLoaded` light, so it\n // can be inlined into call-site.\n _icuContainerIterate = loader();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ViewEncapsulation} from '../metadata/view';\n\n/**\n * Used by `RendererFactory2` to associate custom rendering data and styles\n * with a rendering implementation.\n * @publicApi\n */\nexport interface RendererType2 {\n /**\n * A unique identifying string for the new renderer, used when creating\n * unique styles for encapsulation.\n */\n id: string;\n /**\n * The view encapsulation type, which determines how styles are applied to\n * DOM elements. One of\n * - `Emulated` (default): Emulate native scoping of styles.\n * - `Native`: Use the native encapsulation mechanism of the renderer.\n * - `ShadowDom`: Use modern [Shadow\n * DOM](https://w3c.github.io/webcomponents/spec/shadow/) and\n * create a ShadowRoot for component's host element.\n * - `None`: Do not provide any template or style encapsulation.\n */\n encapsulation: ViewEncapsulation;\n /**\n * Defines CSS styles to be stored on a renderer instance.\n */\n styles: string[];\n /**\n * Defines arbitrary developer-defined data to be stored on a renderer instance.\n * This is useful for renderers that delegate to other renderers.\n */\n data: {[kind: string]: any};\n\n /**\n * A function used by the framework to create the list of external runtime style URLs.\n */\n getExternalStyles?: ((encapsulationId?: string) => string[]) | null;\n}\n\n/**\n * Flags for renderer-specific style modifiers.\n * @publicApi\n */\nexport enum RendererStyleFlags2 {\n // TODO(misko): This needs to be refactored into a separate file so that it can be imported from\n // `node_manipulation.ts` Currently doing the import cause resolution order to change and fails\n // the tests. The work around is to have hard coded value in `node_manipulation.ts` for now.\n /**\n * Marks a style as important.\n */\n Important = 1 << 0,\n /**\n * Marks a style as using dash case naming (this-is-dash-case).\n */\n DashCase = 1 << 1,\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {TNode, TNodeFlags} from '../render3/interfaces/node';\n\n/**\n * Checks whether a TNode is considered detached, i.e. not present in the\n * translated i18n template. We should not attempt hydration for such nodes\n * and instead, use a regular \"creation mode\".\n */\nexport function isDetachedByI18n(tNode: TNode) {\n return (tNode.flags & TNodeFlags.isDetached) === TNodeFlags.isDetached;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {consumerDestroy, setActiveConsumer} from '../../primitives/signals';\n\nimport {NotificationSource} from '../change_detection/scheduling/zoneless_scheduling';\nimport {hasInSkipHydrationBlockFlag} from '../hydration/skip_hydration';\nimport {ViewEncapsulation} from '../metadata/view';\nimport {RendererStyleFlags2} from '../render/api_flags';\nimport {\n assertDefined,\n assertEqual,\n assertFunction,\n assertNotReactive,\n assertNumber,\n} from '../util/assert';\n\nimport {isDetachedByI18n} from '../i18n/utils';\nimport {\n assertLContainer,\n assertParentView,\n assertProjectionSlots,\n assertTNodeForLView,\n} from './assert';\nimport {attachPatchData} from './context_discovery';\nimport {\n nativeAppendChild,\n nativeAppendOrInsertBefore,\n nativeInsertBefore,\n nativeRemoveNode,\n} from './dom_node_manipulation';\nimport {icuContainerIterate} from './i18n/i18n_tree_shaking';\nimport {CONTAINER_HEADER_OFFSET, LContainer, MOVED_VIEWS, NATIVE} from './interfaces/container';\nimport {ComponentDef} from './interfaces/definition';\nimport {NodeInjectorFactory} from './interfaces/injector';\nimport {unregisterLView} from './interfaces/lview_tracking';\nimport {\n TElementNode,\n TIcuContainerNode,\n TNode,\n TNodeFlags,\n TNodeType,\n TProjectionNode,\n} from './interfaces/node';\nimport {Renderer} from './interfaces/renderer';\nimport {RElement, RNode} from './interfaces/renderer_dom';\nimport {isComponentHost, isDestroyed, isLContainer, isLView} from './interfaces/type_checks';\nimport {\n CHILD_HEAD,\n CLEANUP,\n DECLARATION_COMPONENT_VIEW,\n DECLARATION_LCONTAINER,\n DestroyHookData,\n EFFECTS,\n ENVIRONMENT,\n FLAGS,\n HookData,\n HookFn,\n HOST,\n LView,\n LViewFlags,\n NEXT,\n ON_DESTROY_HOOKS,\n PARENT,\n QUERIES,\n REACTIVE_TEMPLATE_CONSUMER,\n RENDERER,\n T_HOST,\n TVIEW,\n TView,\n TViewType,\n} from './interfaces/view';\nimport {assertTNodeType} from './node_assert';\nimport {profiler} from './profiler';\nimport {ProfilerEvent} from './profiler_types';\nimport {getLViewParent, getNativeByTNode, unwrapRNode} from './util/view_utils';\n\nconst enum WalkTNodeTreeAction {\n /** node create in the native environment. Run on initial creation. */\n Create = 0,\n\n /**\n * node insert in the native environment.\n * Run when existing node has been detached and needs to be re-attached.\n */\n Insert = 1,\n\n /** node detach from the native environment */\n Detach = 2,\n\n /** node destruction using the renderer's API */\n Destroy = 3,\n}\n\n/**\n * NOTE: for performance reasons, the possible actions are inlined within the function instead of\n * being passed as an argument.\n */\nfunction applyToElementOrContainer(\n action: WalkTNodeTreeAction,\n renderer: Renderer,\n parent: RElement | null,\n lNodeToHandle: RNode | LContainer | LView,\n beforeNode?: RNode | null,\n) {\n // If this slot was allocated for a text node dynamically created by i18n, the text node itself\n // won't be created until i18nApply() in the update block, so this node should be skipped.\n // For more info, see \"ICU expressions should work inside an ngTemplateOutlet inside an ngFor\"\n // in `i18n_spec.ts`.\n if (lNodeToHandle != null) {\n let lContainer: LContainer | undefined;\n let isComponent = false;\n // We are expecting an RNode, but in the case of a component or LContainer the `RNode` is\n // wrapped in an array which needs to be unwrapped. We need to know if it is a component and if\n // it has LContainer so that we can process all of those cases appropriately.\n if (isLContainer(lNodeToHandle)) {\n lContainer = lNodeToHandle;\n } else if (isLView(lNodeToHandle)) {\n isComponent = true;\n ngDevMode && assertDefined(lNodeToHandle[HOST], 'HOST must be defined for a component LView');\n lNodeToHandle = lNodeToHandle[HOST]!;\n }\n const rNode: RNode = unwrapRNode(lNodeToHandle);\n\n if (action === WalkTNodeTreeAction.Create && parent !== null) {\n if (beforeNode == null) {\n nativeAppendChild(renderer, parent, rNode);\n } else {\n nativeInsertBefore(renderer, parent, rNode, beforeNode || null, true);\n }\n } else if (action === WalkTNodeTreeAction.Insert && parent !== null) {\n nativeInsertBefore(renderer, parent, rNode, beforeNode || null, true);\n } else if (action === WalkTNodeTreeAction.Detach) {\n nativeRemoveNode(renderer, rNode, isComponent);\n } else if (action === WalkTNodeTreeAction.Destroy) {\n ngDevMode && ngDevMode.rendererDestroyNode++;\n renderer.destroyNode!(rNode);\n }\n if (lContainer != null) {\n applyContainer(renderer, action, lContainer, parent, beforeNode);\n }\n }\n}\n\n/**\n * Removes all DOM elements associated with a view.\n *\n * Because some root nodes of the view may be containers, we sometimes need\n * to propagate deeply into the nested containers to remove all elements in the\n * views beneath it.\n *\n * @param tView The `TView' of the `LView` from which elements should be added or removed\n * @param lView The view from which elements should be added or removed\n */\nexport function removeViewFromDOM(tView: TView, lView: LView): void {\n detachViewFromDOM(tView, lView);\n lView[HOST] = null;\n lView[T_HOST] = null;\n}\n\n/**\n * Adds all DOM elements associated with a view.\n *\n * Because some root nodes of the view may be containers, we sometimes need\n * to propagate deeply into the nested containers to add all elements in the\n * views beneath it.\n *\n * @param tView The `TView' of the `LView` from which elements should be added or removed\n * @param parentTNode The `TNode` where the `LView` should be attached to.\n * @param renderer Current renderer to use for DOM manipulations.\n * @param lView The view from which elements should be added or removed\n * @param parentNativeNode The parent `RElement` where it should be inserted into.\n * @param beforeNode The node before which elements should be added, if insert mode\n */\nexport function addViewToDOM(\n tView: TView,\n parentTNode: TNode,\n renderer: Renderer,\n lView: LView,\n parentNativeNode: RElement,\n beforeNode: RNode | null,\n): void {\n lView[HOST] = parentNativeNode;\n lView[T_HOST] = parentTNode;\n applyView(tView, lView, renderer, WalkTNodeTreeAction.Insert, parentNativeNode, beforeNode);\n}\n\n/**\n * Detach a `LView` from the DOM by detaching its nodes.\n *\n * @param tView The `TView' of the `LView` to be detached\n * @param lView the `LView` to be detached.\n */\nexport function detachViewFromDOM(tView: TView, lView: LView) {\n // When we remove a view from the DOM, we need to rerun afterRender hooks\n // We don't necessarily needs to run change detection. DOM removal only requires\n // change detection if animations are enabled (this notification is handled by animations).\n lView[ENVIRONMENT].changeDetectionScheduler?.notify(NotificationSource.ViewDetachedFromDOM);\n applyView(tView, lView, lView[RENDERER], WalkTNodeTreeAction.Detach, null, null);\n}\n\n/**\n * Traverses down and up the tree of views and containers to remove listeners and\n * call onDestroy callbacks.\n *\n * Notes:\n * - Because it's used for onDestroy calls, it needs to be bottom-up.\n * - Must process containers instead of their views to avoid splicing\n * when views are destroyed and re-added.\n * - Using a while loop because it's faster than recursion\n * - Destroy only called on movement to sibling or movement to parent (laterally or up)\n *\n * @param rootView The view to destroy\n */\nexport function destroyViewTree(rootView: LView): void {\n // If the view has no children, we can clean it up and return early.\n let lViewOrLContainer = rootView[CHILD_HEAD];\n if (!lViewOrLContainer) {\n return cleanUpView(rootView[TVIEW], rootView);\n }\n\n while (lViewOrLContainer) {\n let next: LView | LContainer | null = null;\n\n if (isLView(lViewOrLContainer)) {\n // If LView, traverse down to child.\n next = lViewOrLContainer[CHILD_HEAD];\n } else {\n ngDevMode && assertLContainer(lViewOrLContainer);\n // If container, traverse down to its first LView.\n const firstView: LView | undefined = lViewOrLContainer[CONTAINER_HEADER_OFFSET];\n if (firstView) next = firstView;\n }\n\n if (!next) {\n // Only clean up view when moving to the side or up, as destroy hooks\n // should be called in order from the bottom up.\n while (lViewOrLContainer && !lViewOrLContainer![NEXT] && lViewOrLContainer !== rootView) {\n if (isLView(lViewOrLContainer)) {\n cleanUpView(lViewOrLContainer[TVIEW], lViewOrLContainer);\n }\n lViewOrLContainer = lViewOrLContainer[PARENT];\n }\n if (lViewOrLContainer === null) lViewOrLContainer = rootView;\n if (isLView(lViewOrLContainer)) {\n cleanUpView(lViewOrLContainer[TVIEW], lViewOrLContainer);\n }\n next = lViewOrLContainer && lViewOrLContainer![NEXT];\n }\n lViewOrLContainer = next;\n }\n}\n\nexport function detachMovedView(declarationContainer: LContainer, lView: LView) {\n ngDevMode && assertLContainer(declarationContainer);\n ngDevMode &&\n assertDefined(\n declarationContainer[MOVED_VIEWS],\n 'A projected view should belong to a non-empty projected views collection',\n );\n const movedViews = declarationContainer[MOVED_VIEWS]!;\n const declarationViewIndex = movedViews.indexOf(lView);\n movedViews.splice(declarationViewIndex, 1);\n}\n\n/**\n * A standalone function which destroys an LView,\n * conducting clean up (e.g. removing listeners, calling onDestroys).\n *\n * @param tView The `TView' of the `LView` to be destroyed\n * @param lView The view to be destroyed.\n */\nexport function destroyLView(tView: TView, lView: LView) {\n if (isDestroyed(lView)) {\n return;\n }\n\n const renderer = lView[RENDERER];\n\n if (renderer.destroyNode) {\n applyView(tView, lView, renderer, WalkTNodeTreeAction.Destroy, null, null);\n }\n\n destroyViewTree(lView);\n}\n\n/**\n * Calls onDestroys hooks for all directives and pipes in a given view and then removes all\n * listeners. Listeners are removed as the last step so events delivered in the onDestroys hooks\n * can be propagated to @Output listeners.\n *\n * @param tView `TView` for the `LView` to clean up.\n * @param lView The LView to clean up\n */\nfunction cleanUpView(tView: TView, lView: LView): void {\n if (isDestroyed(lView)) {\n return;\n }\n\n const prevConsumer = setActiveConsumer(null);\n try {\n // Usually the Attached flag is removed when the view is detached from its parent, however\n // if it's a root view, the flag won't be unset hence why we're also removing on destroy.\n lView[FLAGS] &= ~LViewFlags.Attached;\n\n // Mark the LView as destroyed *before* executing the onDestroy hooks. An onDestroy hook\n // runs arbitrary user code, which could include its own `viewRef.destroy()` (or similar). If\n // We don't flag the view as destroyed before the hooks, this could lead to an infinite loop.\n // This also aligns with the ViewEngine behavior. It also means that the onDestroy hook is\n // really more of an \"afterDestroy\" hook if you think about it.\n lView[FLAGS] |= LViewFlags.Destroyed;\n\n lView[REACTIVE_TEMPLATE_CONSUMER] && consumerDestroy(lView[REACTIVE_TEMPLATE_CONSUMER]);\n\n executeOnDestroys(tView, lView);\n processCleanups(tView, lView);\n // For component views only, the local renderer is destroyed at clean up time.\n if (lView[TVIEW].type === TViewType.Component) {\n ngDevMode && ngDevMode.rendererDestroy++;\n lView[RENDERER].destroy();\n }\n\n const declarationContainer = lView[DECLARATION_LCONTAINER];\n // we are dealing with an embedded view that is still inserted into a container\n if (declarationContainer !== null && isLContainer(lView[PARENT])) {\n // and this is a projected view\n if (declarationContainer !== lView[PARENT]) {\n detachMovedView(declarationContainer, lView);\n }\n\n // For embedded views still attached to a container: remove query result from this view.\n const lQueries = lView[QUERIES];\n if (lQueries !== null) {\n lQueries.detachView(tView);\n }\n }\n\n // Unregister the view once everything else has been cleaned up.\n unregisterLView(lView);\n } finally {\n setActiveConsumer(prevConsumer);\n }\n}\n\n/** Removes listeners and unsubscribes from output subscriptions */\nfunction processCleanups(tView: TView, lView: LView): void {\n ngDevMode && assertNotReactive(processCleanups.name);\n const tCleanup = tView.cleanup;\n const lCleanup = lView[CLEANUP]!;\n if (tCleanup !== null) {\n for (let i = 0; i < tCleanup.length - 1; i += 2) {\n if (typeof tCleanup[i] === 'string') {\n // This is a native DOM listener. It will occupy 4 entries in the TCleanup array (hence i +=\n // 2 at the end of this block).\n const targetIdx = tCleanup[i + 3];\n ngDevMode && assertNumber(targetIdx, 'cleanup target must be a number');\n if (targetIdx >= 0) {\n // Destroy anything whose teardown is a function call (e.g. QueryList, ModelSignal).\n lCleanup[targetIdx]();\n } else {\n // Subscription\n lCleanup[-targetIdx].unsubscribe();\n }\n i += 2;\n } else {\n // This is a cleanup function that is grouped with the index of its context\n const context = lCleanup[tCleanup[i + 1]];\n tCleanup[i].call(context);\n }\n }\n }\n if (lCleanup !== null) {\n lView[CLEANUP] = null;\n }\n const destroyHooks = lView[ON_DESTROY_HOOKS];\n if (destroyHooks !== null) {\n // Reset the ON_DESTROY_HOOKS array before iterating over it to prevent hooks that unregister\n // themselves from mutating the array during iteration.\n lView[ON_DESTROY_HOOKS] = null;\n for (let i = 0; i < destroyHooks.length; i++) {\n const destroyHooksFn = destroyHooks[i];\n ngDevMode && assertFunction(destroyHooksFn, 'Expecting destroy hook to be a function.');\n destroyHooksFn();\n }\n }\n\n // Destroy effects registered to the view. Many of these will have been processed above.\n const effects = lView[EFFECTS];\n if (effects !== null) {\n lView[EFFECTS] = null;\n for (const effect of effects) {\n effect.destroy();\n }\n }\n}\n\n/** Calls onDestroy hooks for this view */\nfunction executeOnDestroys(tView: TView, lView: LView): void {\n ngDevMode && assertNotReactive(executeOnDestroys.name);\n let destroyHooks: DestroyHookData | null;\n\n if (tView != null && (destroyHooks = tView.destroyHooks) != null) {\n for (let i = 0; i < destroyHooks.length; i += 2) {\n const context = lView[destroyHooks[i] as number];\n\n // Only call the destroy hook if the context has been requested.\n if (!(context instanceof NodeInjectorFactory)) {\n const toCall = destroyHooks[i + 1] as HookFn | HookData;\n\n if (Array.isArray(toCall)) {\n for (let j = 0; j < toCall.length; j += 2) {\n const callContext = context[toCall[j] as number];\n const hook = toCall[j + 1] as HookFn;\n profiler(ProfilerEvent.LifecycleHookStart, callContext, hook);\n try {\n hook.call(callContext);\n } finally {\n profiler(ProfilerEvent.LifecycleHookEnd, callContext, hook);\n }\n }\n } else {\n profiler(ProfilerEvent.LifecycleHookStart, context, toCall);\n try {\n toCall.call(context);\n } finally {\n profiler(ProfilerEvent.LifecycleHookEnd, context, toCall);\n }\n }\n }\n }\n }\n}\n\n/**\n * Returns a native element if a node can be inserted into the given parent.\n *\n * There are two reasons why we may not be able to insert a element immediately.\n * - Projection: When creating a child content element of a component, we have to skip the\n * insertion because the content of a component will be projected.\n * `<component><content>delayed due to projection</content></component>`\n * - Parent container is disconnected: This can happen when we are inserting a view into\n * parent container, which itself is disconnected. For example the parent container is part\n * of a View which has not be inserted or is made for projection but has not been inserted\n * into destination.\n *\n * @param tView: Current `TView`.\n * @param tNode: `TNode` for which we wish to retrieve render parent.\n * @param lView: Current `LView`.\n */\nexport function getParentRElement(tView: TView, tNode: TNode, lView: LView): RElement | null {\n return getClosestRElement(tView, tNode.parent, lView);\n}\n\n/**\n * Get closest `RElement` or `null` if it can't be found.\n *\n * If `TNode` is `TNodeType.Element` => return `RElement` at `LView[tNode.index]` location.\n * If `TNode` is `TNodeType.ElementContainer|IcuContain` => return the parent (recursively).\n * If `TNode` is `null` then return host `RElement`:\n * - return `null` if projection\n * - return `null` if parent container is disconnected (we have no parent.)\n *\n * @param tView: Current `TView`.\n * @param tNode: `TNode` for which we wish to retrieve `RElement` (or `null` if host element is\n * needed).\n * @param lView: Current `LView`.\n * @returns `null` if the `RElement` can't be determined at this time (no parent / projection)\n */\nexport function getClosestRElement(\n tView: TView,\n tNode: TNode | null,\n lView: LView,\n): RElement | null {\n let parentTNode: TNode | null = tNode;\n // Skip over element and ICU containers as those are represented by a comment node and\n // can't be used as a render parent. Also skip let declarations since they don't have a\n // corresponding DOM node at all.\n while (\n parentTNode !== null &&\n parentTNode.type & (TNodeType.ElementContainer | TNodeType.Icu | TNodeType.LetDeclaration)\n ) {\n tNode = parentTNode;\n parentTNode = tNode.parent;\n }\n\n // If the parent tNode is null, then we are inserting across views: either into an embedded view\n // or a component view.\n if (parentTNode === null) {\n // We are inserting a root element of the component view into the component host element and\n // it should always be eager.\n return lView[HOST];\n } else {\n ngDevMode && assertTNodeType(parentTNode, TNodeType.AnyRNode | TNodeType.Container);\n if (isComponentHost(parentTNode)) {\n ngDevMode && assertTNodeForLView(parentTNode, lView);\n const {encapsulation} = tView.data[\n parentTNode.directiveStart + parentTNode.componentOffset\n ] as ComponentDef<unknown>;\n // We've got a parent which is an element in the current view. We just need to verify if the\n // parent element is not a component. Component's content nodes are not inserted immediately\n // because they will be projected, and so doing insert at this point would be wasteful.\n // Since the projection would then move it to its final destination. Note that we can't\n // make this assumption when using the Shadow DOM, because the native projection placeholders\n // (<content> or <slot>) have to be in place as elements are being inserted.\n if (\n encapsulation === ViewEncapsulation.None ||\n encapsulation === ViewEncapsulation.Emulated\n ) {\n return null;\n }\n }\n\n return getNativeByTNode(parentTNode, lView) as RElement;\n }\n}\n\n/**\n * Find a node in front of which `currentTNode` should be inserted.\n *\n * This method determines the `RNode` in front of which we should insert the `currentRNode`. This\n * takes `TNode.insertBeforeIndex` into account if i18n code has been invoked.\n *\n * @param parentTNode parent `TNode`\n * @param currentTNode current `TNode` (The node which we would like to insert into the DOM)\n * @param lView current `LView`\n */\nfunction getInsertInFrontOfRNode(\n parentTNode: TNode,\n currentTNode: TNode,\n lView: LView,\n): RNode | null {\n return _getInsertInFrontOfRNodeWithI18n(parentTNode, currentTNode, lView);\n}\n\n/**\n * Find a node in front of which `currentTNode` should be inserted. (Does not take i18n into\n * account)\n *\n * This method determines the `RNode` in front of which we should insert the `currentRNode`. This\n * does not take `TNode.insertBeforeIndex` into account.\n *\n * @param parentTNode parent `TNode`\n * @param currentTNode current `TNode` (The node which we would like to insert into the DOM)\n * @param lView current `LView`\n */\nexport function getInsertInFrontOfRNodeWithNoI18n(\n parentTNode: TNode,\n currentTNode: TNode,\n lView: LView,\n): RNode | null {\n if (parentTNode.type & (TNodeType.ElementContainer | TNodeType.Icu)) {\n return getNativeByTNode(parentTNode, lView);\n }\n return null;\n}\n\n/**\n * Tree shakable boundary for `getInsertInFrontOfRNodeWithI18n` function.\n *\n * This function will only be set if i18n code runs.\n */\nlet _getInsertInFrontOfRNodeWithI18n: (\n parentTNode: TNode,\n currentTNode: TNode,\n lView: LView,\n) => RNode | null = getInsertInFrontOfRNodeWithNoI18n;\n\n/**\n * Tree shakable boundary for `processI18nInsertBefore` function.\n *\n * This function will only be set if i18n code runs.\n */\nlet _processI18nInsertBefore: (\n renderer: Renderer,\n childTNode: TNode,\n lView: LView,\n childRNode: RNode | RNode[],\n parentRElement: RElement | null,\n) => void;\n\nexport function setI18nHandling(\n getInsertInFrontOfRNodeWithI18n: (\n parentTNode: TNode,\n currentTNode: TNode,\n lView: LView,\n ) => RNode | null,\n processI18nInsertBefore: (\n renderer: Renderer,\n childTNode: TNode,\n lView: LView,\n childRNode: RNode | RNode[],\n parentRElement: RElement | null,\n ) => void,\n) {\n _getInsertInFrontOfRNodeWithI18n = getInsertInFrontOfRNodeWithI18n;\n _processI18nInsertBefore = processI18nInsertBefore;\n}\n\n/**\n * Appends the `child` native node (or a collection of nodes) to the `parent`.\n *\n * @param tView The `TView' to be appended\n * @param lView The current LView\n * @param childRNode The native child (or children) that should be appended\n * @param childTNode The TNode of the child element\n */\nexport function appendChild(\n tView: TView,\n lView: LView,\n childRNode: RNode | RNode[],\n childTNode: TNode,\n): void {\n const parentRNode = getParentRElement(tView, childTNode, lView);\n const renderer = lView[RENDERER];\n const parentTNode: TNode = childTNode.parent || lView[T_HOST]!;\n const anchorNode = getInsertInFrontOfRNode(parentTNode, childTNode, lView);\n if (parentRNode != null) {\n if (Array.isArray(childRNode)) {\n for (let i = 0; i < childRNode.length; i++) {\n nativeAppendOrInsertBefore(renderer, parentRNode, childRNode[i], anchorNode, false);\n }\n } else {\n nativeAppendOrInsertBefore(renderer, parentRNode, childRNode, anchorNode, false);\n }\n }\n\n _processI18nInsertBefore !== undefined &&\n _processI18nInsertBefore(renderer, childTNode, lView, childRNode, parentRNode);\n}\n\n/**\n * Returns the first native node for a given LView, starting from the provided TNode.\n *\n * Native nodes are returned in the order in which those appear in the native tree (DOM).\n */\nexport function getFirstNativeNode(lView: LView, tNode: TNode | null): RNode | null {\n if (tNode !== null) {\n ngDevMode &&\n assertTNodeType(\n tNode,\n TNodeType.AnyRNode |\n TNodeType.AnyContainer |\n TNodeType.Icu |\n TNodeType.Projection |\n TNodeType.LetDeclaration,\n );\n\n const tNodeType = tNode.type;\n if (tNodeType & TNodeType.AnyRNode) {\n return getNativeByTNode(tNode, lView);\n } else if (tNodeType & TNodeType.Container) {\n return getBeforeNodeForView(-1, lView[tNode.index]);\n } else if (tNodeType & TNodeType.ElementContainer) {\n const elIcuContainerChild = tNode.child;\n if (elIcuContainerChild !== null) {\n return getFirstNativeNode(lView, elIcuContainerChild);\n } else {\n const rNodeOrLContainer = lView[tNode.index];\n if (isLContainer(rNodeOrLContainer)) {\n return getBeforeNodeForView(-1, rNodeOrLContainer);\n } else {\n return unwrapRNode(rNodeOrLContainer);\n }\n }\n } else if (tNodeType & TNodeType.LetDeclaration) {\n return getFirstNativeNode(lView, tNode.next);\n } else if (tNodeType & TNodeType.Icu) {\n let nextRNode = icuContainerIterate(tNode as TIcuContainerNode, lView);\n let rNode: RNode | null = nextRNode();\n // If the ICU container has no nodes, than we use the ICU anchor as the node.\n return rNode || unwrapRNode(lView[tNode.index]);\n } else {\n const projectionNodes = getProjectionNodes(lView, tNode);\n if (projectionNodes !== null) {\n if (Array.isArray(projectionNodes)) {\n return projectionNodes[0];\n }\n const parentView = getLViewParent(lView[DECLARATION_COMPONENT_VIEW]);\n ngDevMode && assertParentView(parentView);\n return getFirstNativeNode(parentView!, projectionNodes);\n } else {\n return getFirstNativeNode(lView, tNode.next);\n }\n }\n }\n\n return null;\n}\n\nexport function getProjectionNodes(lView: LView, tNode: TNode | null): TNode | RNode[] | null {\n if (tNode !== null) {\n const componentView = lView[DECLARATION_COMPONENT_VIEW];\n const componentHost = componentView[T_HOST] as TElementNode;\n const slotIdx = tNode.projection as number;\n ngDevMode && assertProjectionSlots(lView);\n return componentHost.projection![slotIdx];\n }\n return null;\n}\n\nexport function getBeforeNodeForView(\n viewIndexInContainer: number,\n lContainer: LContainer,\n): RNode | null {\n const nextViewIndex = CONTAINER_HEADER_OFFSET + viewIndexInContainer + 1;\n if (nextViewIndex < lContainer.length) {\n const lView = lContainer[nextViewIndex] as LView;\n const firstTNodeOfView = lView[TVIEW].firstChild;\n if (firstTNodeOfView !== null) {\n return getFirstNativeNode(lView, firstTNodeOfView);\n }\n }\n\n return lContainer[NATIVE];\n}\n\n/**\n * Performs the operation of `action` on the node. Typically this involves inserting or removing\n * nodes on the LView or projection boundary.\n */\nfunction applyNodes(\n renderer: Renderer,\n action: WalkTNodeTreeAction,\n tNode: TNode | null,\n lView: LView,\n parentRElement: RElement | null,\n beforeNode: RNode | null,\n isProjection: boolean,\n) {\n while (tNode != null) {\n ngDevMode && assertTNodeForLView(tNode, lView);\n\n // Let declarations don't have corresponding DOM nodes so we skip over them.\n if (tNode.type === TNodeType.LetDeclaration) {\n tNode = tNode.next;\n continue;\n }\n\n ngDevMode &&\n assertTNodeType(\n tNode,\n TNodeType.AnyRNode | TNodeType.AnyContainer | TNodeType.Projection | TNodeType.Icu,\n );\n const rawSlotValue = lView[tNode.index];\n const tNodeType = tNode.type;\n if (isProjection) {\n if (action === WalkTNodeTreeAction.Create) {\n rawSlotValue && attachPatchData(unwrapRNode(rawSlotValue), lView);\n tNode.flags |= TNodeFlags.isProjected;\n }\n }\n if (!isDetachedByI18n(tNode)) {\n if (tNodeType & TNodeType.ElementContainer) {\n applyNodes(renderer, action, tNode.child, lView, parentRElement, beforeNode, false);\n applyToElementOrContainer(action, renderer, parentRElement, rawSlotValue, beforeNode);\n } else if (tNodeType & TNodeType.Icu) {\n const nextRNode = icuContainerIterate(tNode as TIcuContainerNode, lView);\n let rNode: RNode | null;\n while ((rNode = nextRNode())) {\n applyToElementOrContainer(action, renderer, parentRElement, rNode, beforeNode);\n }\n applyToElementOrContainer(action, renderer, parentRElement, rawSlotValue, beforeNode);\n } else if (tNodeType & TNodeType.Projection) {\n applyProjectionRecursive(\n renderer,\n action,\n lView,\n tNode as TProjectionNode,\n parentRElement,\n beforeNode,\n );\n } else {\n ngDevMode && assertTNodeType(tNode, TNodeType.AnyRNode | TNodeType.Container);\n applyToElementOrContainer(action, renderer, parentRElement, rawSlotValue, beforeNode);\n }\n }\n tNode = isProjection ? tNode.projectionNext : tNode.next;\n }\n}\n\n/**\n * `applyView` performs operation on the view as specified in `action` (insert, detach, destroy)\n *\n * Inserting a view without projection or containers at top level is simple. Just iterate over the\n * root nodes of the View, and for each node perform the `action`.\n *\n * Things get more complicated with containers and projections. That is because coming across:\n * - Container: implies that we have to insert/remove/destroy the views of that container as well\n * which in turn can have their own Containers at the View roots.\n * - Projection: implies that we have to insert/remove/destroy the nodes of the projection. The\n * complication is that the nodes we are projecting can themselves have Containers\n * or other Projections.\n *\n * As you can see this is a very recursive problem. Yes recursion is not most efficient but the\n * code is complicated enough that trying to implemented with recursion becomes unmaintainable.\n *\n * @param tView The `TView' which needs to be inserted, detached, destroyed\n * @param lView The LView which needs to be inserted, detached, destroyed.\n * @param renderer Renderer to use\n * @param action action to perform (insert, detach, destroy)\n * @param parentRElement parent DOM element for insertion (Removal does not need it).\n * @param beforeNode Before which node the insertions should happen.\n */\nfunction applyView(\n tView: TView,\n lView: LView,\n renderer: Renderer,\n action: WalkTNodeTreeAction.Destroy,\n parentRElement: null,\n beforeNode: null,\n): void;\nfunction applyView(\n tView: TView,\n lView: LView,\n renderer: Renderer,\n action: WalkTNodeTreeAction,\n parentRElement: RElement | null,\n beforeNode: RNode | null,\n): void;\nfunction applyView(\n tView: TView,\n lView: LView,\n renderer: Renderer,\n action: WalkTNodeTreeAction,\n parentRElement: RElement | null,\n beforeNode: RNode | null,\n): void {\n applyNodes(renderer, action, tView.firstChild, lView, parentRElement, beforeNode, false);\n}\n\n/**\n * `applyProjection` performs operation on the projection.\n *\n * Inserting a projection requires us to locate the projected nodes from the parent component. The\n * complication is that those nodes themselves could be re-projected from their parent component.\n *\n * @param tView The `TView` of `LView` which needs to be inserted, detached, destroyed\n * @param lView The `LView` which needs to be inserted, detached, destroyed.\n * @param tProjectionNode node to project\n */\nexport function applyProjection(tView: TView, lView: LView, tProjectionNode: TProjectionNode) {\n const renderer = lView[RENDERER];\n const parentRNode = getParentRElement(tView, tProjectionNode, lView);\n const parentTNode = tProjectionNode.parent || lView[T_HOST]!;\n let beforeNode = getInsertInFrontOfRNode(parentTNode, tProjectionNode, lView);\n applyProjectionRecursive(\n renderer,\n WalkTNodeTreeAction.Create,\n lView,\n tProjectionNode,\n parentRNode,\n beforeNode,\n );\n}\n\n/**\n * `applyProjectionRecursive` performs operation on the projection specified by `action` (insert,\n * detach, destroy)\n *\n * Inserting a projection requires us to locate the projected nodes from the parent component. The\n * complication is that those nodes themselves could be re-projected from their parent component.\n *\n * @param renderer Render to use\n * @param action action to perform (insert, detach, destroy)\n * @param lView The LView which needs to be inserted, detached, destroyed.\n * @param tProjectionNode node to project\n * @param parentRElement parent DOM element for insertion/removal.\n * @param beforeNode Before which node the insertions should happen.\n */\nfunction applyProjectionRecursive(\n renderer: Renderer,\n action: WalkTNodeTreeAction,\n lView: LView,\n tProjectionNode: TProjectionNode,\n parentRElement: RElement | null,\n beforeNode: RNode | null,\n) {\n const componentLView = lView[DECLARATION_COMPONENT_VIEW];\n const componentNode = componentLView[T_HOST] as TElementNode;\n ngDevMode &&\n assertEqual(typeof tProjectionNode.projection, 'number', 'expecting projection index');\n const nodeToProjectOrRNodes = componentNode.projection![tProjectionNode.projection]!;\n if (Array.isArray(nodeToProjectOrRNodes)) {\n // This should not exist, it is a bit of a hack. When we bootstrap a top level node and we\n // need to support passing projectable nodes, so we cheat and put them in the TNode\n // of the Host TView. (Yes we put instance info at the T Level). We can get away with it\n // because we know that TView is not shared and therefore it will not be a problem.\n // This should be refactored and cleaned up.\n for (let i = 0; i < nodeToProjectOrRNodes.length; i++) {\n const rNode = nodeToProjectOrRNodes[i];\n applyToElementOrContainer(action, renderer, parentRElement, rNode, beforeNode);\n }\n } else {\n let nodeToProject: TNode | null = nodeToProjectOrRNodes;\n const projectedComponentLView = componentLView[PARENT] as LView;\n // If a parent <ng-content> is located within a skip hydration block,\n // annotate an actual node that is being projected with the same flag too.\n if (hasInSkipHydrationBlockFlag(tProjectionNode)) {\n nodeToProject.flags |= TNodeFlags.inSkipHydrationBlock;\n }\n applyNodes(\n renderer,\n action,\n nodeToProject,\n projectedComponentLView,\n parentRElement,\n beforeNode,\n true,\n );\n }\n}\n\n/**\n * `applyContainer` performs an operation on the container and its views as specified by\n * `action` (insert, detach, destroy)\n *\n * Inserting a Container is complicated by the fact that the container may have Views which\n * themselves have containers or projections.\n *\n * @param renderer Renderer to use\n * @param action action to perform (insert, detach, destroy)\n * @param lContainer The LContainer which needs to be inserted, detached, destroyed.\n * @param parentRElement parent DOM element for insertion/removal.\n * @param beforeNode Before which node the insertions should happen.\n */\nfunction applyContainer(\n renderer: Renderer,\n action: WalkTNodeTreeAction,\n lContainer: LContainer,\n parentRElement: RElement | null,\n beforeNode: RNode | null | undefined,\n) {\n ngDevMode && assertLContainer(lContainer);\n const anchor = lContainer[NATIVE]; // LContainer has its own before node.\n const native = unwrapRNode(lContainer);\n // An LContainer can be created dynamically on any node by injecting ViewContainerRef.\n // Asking for a ViewContainerRef on an element will result in a creation of a separate anchor\n // node (comment in the DOM) that will be different from the LContainer's host node. In this\n // particular case we need to execute action on 2 nodes:\n // - container's host node (this is done in the executeActionOnElementOrContainer)\n // - container's host node (this is done here)\n if (anchor !== native) {\n // This is very strange to me (Misko). I would expect that the native is same as anchor. I\n // don't see a reason why they should be different, but they are.\n //\n // If they are we need to process the second anchor as well.\n applyToElementOrContainer(action, renderer, parentRElement, anchor, beforeNode);\n }\n for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n const lView = lContainer[i] as LView;\n applyView(lView[TVIEW], lView, renderer, action, parentRElement, anchor);\n }\n}\n\n/**\n * Writes class/style to element.\n *\n * @param renderer Renderer to use.\n * @param isClassBased `true` if it should be written to `class` (`false` to write to `style`)\n * @param rNode The Node to write to.\n * @param prop Property to write to. This would be the class/style name.\n * @param value Value to write. If `null`/`undefined`/`false` this is considered a remove (set/add\n * otherwise).\n */\nexport function applyStyling(\n renderer: Renderer,\n isClassBased: boolean,\n rNode: RElement,\n prop: string,\n value: any,\n) {\n if (isClassBased) {\n // We actually want JS true/false here because any truthy value should add the class\n if (!value) {\n ngDevMode && ngDevMode.rendererRemoveClass++;\n renderer.removeClass(rNode, prop);\n } else {\n ngDevMode && ngDevMode.rendererAddClass++;\n renderer.addClass(rNode, prop);\n }\n } else {\n let flags = prop.indexOf('-') === -1 ? undefined : (RendererStyleFlags2.DashCase as number);\n if (value == null /** || value === undefined */) {\n ngDevMode && ngDevMode.rendererRemoveStyle++;\n renderer.removeStyle(rNode, prop, flags);\n } else {\n // A value is important if it ends with `!important`. The style\n // parser strips any semicolons at the end of the value.\n const isImportant = typeof value === 'string' ? value.endsWith('!important') : false;\n\n if (isImportant) {\n // !important has to be stripped from the value for it to be valid.\n value = value.slice(0, -10);\n flags! |= RendererStyleFlags2.Important;\n }\n\n ngDevMode && ngDevMode.rendererSetStyle++;\n renderer.setStyle(rNode, prop, value, flags);\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {assertParentView} from './assert';\nimport {icuContainerIterate} from './i18n/i18n_tree_shaking';\nimport {CONTAINER_HEADER_OFFSET, LContainer, NATIVE} from './interfaces/container';\nimport {TIcuContainerNode, TNode, TNodeType} from './interfaces/node';\nimport {RNode} from './interfaces/renderer_dom';\nimport {isLContainer} from './interfaces/type_checks';\nimport {DECLARATION_COMPONENT_VIEW, HOST, LView, TVIEW, TView} from './interfaces/view';\nimport {assertTNodeType} from './node_assert';\nimport {getProjectionNodes} from './node_manipulation';\nimport {getLViewParent, unwrapRNode} from './util/view_utils';\n\nexport function collectNativeNodes(\n tView: TView,\n lView: LView,\n tNode: TNode | null,\n result: any[],\n isProjection: boolean = false,\n): any[] {\n while (tNode !== null) {\n // Let declarations don't have corresponding DOM nodes so we skip over them.\n if (tNode.type === TNodeType.LetDeclaration) {\n tNode = isProjection ? tNode.projectionNext : tNode.next;\n continue;\n }\n\n ngDevMode &&\n assertTNodeType(\n tNode,\n TNodeType.AnyRNode | TNodeType.AnyContainer | TNodeType.Projection | TNodeType.Icu,\n );\n\n const lNode = lView[tNode.index];\n if (lNode !== null) {\n result.push(unwrapRNode(lNode));\n }\n\n // A given lNode can represent either a native node or a LContainer (when it is a host of a\n // ViewContainerRef). When we find a LContainer we need to descend into it to collect root nodes\n // from the views in this container.\n if (isLContainer(lNode)) {\n collectNativeNodesInLContainer(lNode, result);\n }\n\n const tNodeType = tNode.type;\n if (tNodeType & TNodeType.ElementContainer) {\n collectNativeNodes(tView, lView, tNode.child, result);\n } else if (tNodeType & TNodeType.Icu) {\n const nextRNode = icuContainerIterate(tNode as TIcuContainerNode, lView);\n let rNode: RNode | null;\n while ((rNode = nextRNode())) {\n result.push(rNode);\n }\n } else if (tNodeType & TNodeType.Projection) {\n const nodesInSlot = getProjectionNodes(lView, tNode);\n if (Array.isArray(nodesInSlot)) {\n result.push(...nodesInSlot);\n } else {\n const parentView = getLViewParent(lView[DECLARATION_COMPONENT_VIEW])!;\n ngDevMode && assertParentView(parentView);\n collectNativeNodes(parentView[TVIEW], parentView, nodesInSlot, result, true);\n }\n }\n tNode = isProjection ? tNode.projectionNext : tNode.next;\n }\n\n return result;\n}\n\n/**\n * Collects all root nodes in all views in a given LContainer.\n */\nexport function collectNativeNodesInLContainer(lContainer: LContainer, result: any[]) {\n for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n const lViewInAContainer = lContainer[i];\n const lViewFirstChildTNode = lViewInAContainer[TVIEW].firstChild;\n if (lViewFirstChildTNode !== null) {\n collectNativeNodes(lViewInAContainer[TVIEW], lViewInAContainer, lViewFirstChildTNode, result);\n }\n }\n\n // When an LContainer is created, the anchor (comment) node is:\n // - (1) either reused in case of an ElementContainer (<ng-container>)\n // - (2) or a new comment node is created\n // In the first case, the anchor comment node would be added to the final\n // list by the code in the `collectNativeNodes` function\n // (see the `result.push(unwrapRNode(lNode))` line), but the second\n // case requires extra handling: the anchor node needs to be added to the\n // final list manually. See additional information in the `createAnchorNode`\n // function in the `view_container_ref.ts`.\n //\n // In the first case, the same reference would be stored in the `NATIVE`\n // and `HOST` slots in an LContainer. Otherwise, this is the second case and\n // we should add an element to the final list.\n if (lContainer[NATIVE] !== lContainer[HOST]) {\n result.push(lContainer[NATIVE]);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {AFTER_RENDER_SEQUENCES_TO_ADD, LView} from '../interfaces/view';\n\nexport function addAfterRenderSequencesForView(lView: LView) {\n if (lView[AFTER_RENDER_SEQUENCES_TO_ADD] !== null) {\n for (const sequence of lView[AFTER_RENDER_SEQUENCES_TO_ADD]) {\n sequence.impl.addSequence(sequence);\n }\n lView[AFTER_RENDER_SEQUENCES_TO_ADD].length = 0;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {REACTIVE_NODE, ReactiveNode} from '../../primitives/signals';\n\nimport {\n LView,\n PARENT,\n REACTIVE_TEMPLATE_CONSUMER,\n TVIEW,\n TView,\n TViewType,\n} from './interfaces/view';\nimport {getLViewParent, markAncestorsForTraversal, markViewForRefresh} from './util/view_utils';\nimport {assertDefined} from '../util/assert';\n\nlet freeConsumers: ReactiveNode[] = [];\nexport interface ReactiveLViewConsumer extends ReactiveNode {\n lView: LView | null;\n}\n\n/**\n * Create a new template consumer pointing at the specified LView.\n * Sometimes, a previously created consumer may be reused, in order to save on allocations. In that\n * case, the LView will be updated.\n */\nexport function getOrBorrowReactiveLViewConsumer(lView: LView): ReactiveLViewConsumer {\n return lView[REACTIVE_TEMPLATE_CONSUMER] ?? borrowReactiveLViewConsumer(lView);\n}\n\nfunction borrowReactiveLViewConsumer(lView: LView): ReactiveLViewConsumer {\n const consumer = freeConsumers.pop() ?? Object.create(REACTIVE_LVIEW_CONSUMER_NODE);\n consumer.lView = lView;\n return consumer;\n}\n\nexport function maybeReturnReactiveLViewConsumer(consumer: ReactiveLViewConsumer): void {\n if (consumer.lView![REACTIVE_TEMPLATE_CONSUMER] === consumer) {\n // The consumer got committed.\n return;\n }\n consumer.lView = null;\n freeConsumers.push(consumer);\n}\n\nexport const REACTIVE_LVIEW_CONSUMER_NODE: Omit<ReactiveLViewConsumer, 'lView'> = {\n ...REACTIVE_NODE,\n consumerIsAlwaysLive: true,\n kind: 'template',\n consumerMarkedDirty: (node: ReactiveLViewConsumer) => {\n markAncestorsForTraversal(node.lView!);\n },\n consumerOnSignalRead(this: ReactiveLViewConsumer): void {\n this.lView![REACTIVE_TEMPLATE_CONSUMER] = this;\n },\n};\n\n/**\n * Creates a temporary consumer for use with `LView`s that should not have consumers.\n * If the LView already has a consumer, returns the existing one instead.\n *\n * This is necessary because some APIs may cause change detection directly on an LView\n * that we do not want to have a consumer (Embedded views today). As a result, there\n * would be no active consumer from running change detection on its host component\n * and any signals in the LView template would be untracked. Instead, we create\n * this temporary consumer that marks the first parent that _should_ have a consumer\n * for refresh. Once change detection runs as part of that refresh, we throw away\n * this consumer because its signals will then be tracked by the parent's consumer.\n */\nexport function getOrCreateTemporaryConsumer(lView: LView): ReactiveLViewConsumer {\n const consumer = lView[REACTIVE_TEMPLATE_CONSUMER] ?? Object.create(TEMPORARY_CONSUMER_NODE);\n consumer.lView = lView;\n return consumer;\n}\n\nexport const TEMPORARY_CONSUMER_NODE = {\n ...REACTIVE_NODE,\n consumerIsAlwaysLive: true,\n kind: 'template',\n consumerMarkedDirty: (node: ReactiveLViewConsumer) => {\n let parent = getLViewParent(node.lView!);\n while (parent && !viewShouldHaveReactiveConsumer(parent[TVIEW])) {\n parent = getLViewParent(parent);\n }\n if (!parent) {\n // If we can't find an appropriate parent that should have a consumer, we\n // don't have a way of appropriately refreshing this LView as part of application synchronization.\n return;\n }\n\n markViewForRefresh(parent);\n },\n consumerOnSignalRead(this: ReactiveLViewConsumer): void {\n this.lView![REACTIVE_TEMPLATE_CONSUMER] = this;\n },\n};\n\n/**\n * Indicates if the view should get its own reactive consumer node.\n *\n * In the current design, all embedded views share a consumer with the component view. This allows\n * us to refresh at the component level rather than at a per-view level. In addition, root views get\n * their own reactive node because root component will have a host view that executes the\n * component's host bindings. This needs to be tracked in a consumer as well.\n *\n * To get a more granular change detection than per-component, all we would just need to update the\n * condition here so that a given view gets a reactive consumer which can become dirty independently\n * from its parent component. For example embedded views for signal components could be created with\n * a new type \"SignalEmbeddedView\" and the condition here wouldn't even need updating in order to\n * get granular per-view change detection for signal components.\n */\nexport function viewShouldHaveReactiveConsumer(tView: TView) {\n return tView.type !== TViewType.Embedded;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {EFFECTS, FLAGS, type LView, LViewFlags} from '../interfaces/view';\n\nexport function runEffectsInView(view: LView): void {\n if (view[EFFECTS] === null) {\n return;\n }\n\n // Since effects can make other effects dirty, we flush them in a loop until there are no more to\n // flush.\n let tryFlushEffects = true;\n\n while (tryFlushEffects) {\n let foundDirtyEffect = false;\n for (const effect of view[EFFECTS]) {\n if (!effect.dirty) {\n continue;\n }\n foundDirtyEffect = true;\n\n // `runEffectsInView` is called during change detection, and therefore runs\n // in the Angular zone if it's available.\n if (effect.zone === null || Zone.current === effect.zone) {\n effect.run();\n } else {\n effect.zone.run(() => effect.run());\n }\n }\n\n // Check if we need to continue flushing. If we didn't find any dirty effects, then there's\n // no need to loop back. Otherwise, check the view to see if it was marked for traversal\n // again. If so, there's a chance that one of the effects we ran caused another effect to\n // become dirty.\n tryFlushEffects = foundDirtyEffect && !!(view[FLAGS] & LViewFlags.HasChildViewsToRefresh);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n consumerAfterComputation,\n consumerBeforeComputation,\n consumerDestroy,\n consumerPollProducersForChange,\n getActiveConsumer,\n ReactiveNode,\n} from '../../../primitives/signals';\n\nimport {RuntimeError, RuntimeErrorCode} from '../../errors';\nimport {assertDefined, assertEqual} from '../../util/assert';\nimport {addAfterRenderSequencesForView} from '../after_render/view';\nimport {executeCheckHooks, executeInitAndCheckHooks, incrementInitPhaseFlags} from '../hooks';\nimport {CONTAINER_HEADER_OFFSET, LContainerFlags, MOVED_VIEWS} from '../interfaces/container';\nimport {ComponentTemplate, HostBindingsFunction, RenderFlags} from '../interfaces/definition';\nimport {\n CONTEXT,\n EFFECTS_TO_SCHEDULE,\n ENVIRONMENT,\n FLAGS,\n InitPhaseState,\n LView,\n LViewFlags,\n REACTIVE_TEMPLATE_CONSUMER,\n TVIEW,\n TView,\n} from '../interfaces/view';\nimport {\n getOrBorrowReactiveLViewConsumer,\n getOrCreateTemporaryConsumer,\n maybeReturnReactiveLViewConsumer,\n ReactiveLViewConsumer,\n viewShouldHaveReactiveConsumer,\n} from '../reactive_lview_consumer';\nimport {\n CheckNoChangesMode,\n enterView,\n isExhaustiveCheckNoChanges,\n isInCheckNoChangesMode,\n isRefreshingViews,\n leaveView,\n setBindingIndex,\n setBindingRootForHostBindings,\n setIsInCheckNoChangesMode,\n setIsRefreshingViews,\n setSelectedIndex,\n} from '../state';\nimport {getFirstLContainer, getNextLContainer} from '../util/view_traversal_utils';\nimport {\n getComponentLViewByIndex,\n isCreationMode,\n markAncestorsForTraversal,\n markViewForRefresh,\n requiresRefreshOrTraversal,\n resetPreOrderHookFlags,\n viewAttachedToChangeDetector,\n} from '../util/view_utils';\n\nimport {isDestroyed} from '../interfaces/type_checks';\nimport {profiler} from '../profiler';\nimport {ProfilerEvent} from '../profiler_types';\nimport {executeViewQueryFn, refreshContentQueries} from '../queries/query_execution';\nimport {runEffectsInView} from '../reactivity/view_effect_runner';\nimport {executeTemplate, handleError} from './shared';\n\n/**\n * The maximum number of times the change detection traversal will rerun before throwing an error.\n */\nexport const MAXIMUM_REFRESH_RERUNS = 100;\n\nexport function detectChangesInternal(\n lView: LView,\n notifyErrorHandler = true,\n mode = ChangeDetectionMode.Global,\n) {\n const environment = lView[ENVIRONMENT];\n const rendererFactory = environment.rendererFactory;\n\n // Check no changes mode is a dev only mode used to verify that bindings have not changed\n // since they were assigned. We do not want to invoke renderer factory functions in that mode\n // to avoid any possible side-effects.\n const checkNoChangesMode = !!ngDevMode && isInCheckNoChangesMode();\n\n if (!checkNoChangesMode) {\n rendererFactory.begin?.();\n }\n\n try {\n detectChangesInViewWhileDirty(lView, mode);\n } catch (error) {\n if (notifyErrorHandler) {\n handleError(lView, error);\n }\n throw error;\n } finally {\n if (!checkNoChangesMode) {\n rendererFactory.end?.();\n }\n }\n}\n\nfunction detectChangesInViewWhileDirty(lView: LView, mode: ChangeDetectionMode) {\n const lastIsRefreshingViewsValue = isRefreshingViews();\n try {\n setIsRefreshingViews(true);\n detectChangesInView(lView, mode);\n\n // We don't need or want to do any looping when in exhaustive checkNoChanges because we\n // already traverse all the views and nothing should change so we shouldn't have to do\n // another pass to pick up new changes.\n if (ngDevMode && isExhaustiveCheckNoChanges()) {\n return;\n }\n\n let retries = 0;\n // If after running change detection, this view still needs to be refreshed or there are\n // descendants views that need to be refreshed due to re-dirtying during the change detection\n // run, detect changes on the view again. We run change detection in `Targeted` mode to only\n // refresh views with the `RefreshView` flag.\n while (requiresRefreshOrTraversal(lView)) {\n if (retries === MAXIMUM_REFRESH_RERUNS) {\n throw new RuntimeError(\n RuntimeErrorCode.INFINITE_CHANGE_DETECTION,\n ngDevMode &&\n 'Infinite change detection while trying to refresh views. ' +\n 'There may be components which each cause the other to require a refresh, ' +\n 'causing an infinite loop.',\n );\n }\n retries++;\n // Even if this view is detached, we still detect changes in targeted mode because this was\n // the root of the change detection run.\n detectChangesInView(lView, ChangeDetectionMode.Targeted);\n }\n } finally {\n // restore state to what it was before entering this change detection loop\n setIsRefreshingViews(lastIsRefreshingViewsValue);\n }\n}\n\nexport function checkNoChangesInternal(\n lView: LView,\n mode: CheckNoChangesMode,\n notifyErrorHandler = true,\n) {\n setIsInCheckNoChangesMode(mode);\n try {\n detectChangesInternal(lView, notifyErrorHandler);\n } finally {\n setIsInCheckNoChangesMode(CheckNoChangesMode.Off);\n }\n}\n\n/**\n * Different modes of traversing the logical view tree during change detection.\n *\n *\n * The change detection traversal algorithm switches between these modes based on various\n * conditions.\n */\nexport const enum ChangeDetectionMode {\n /**\n * In `Global` mode, `Dirty` and `CheckAlways` views are refreshed as well as views with the\n * `RefreshView` flag.\n */\n Global,\n /**\n * In `Targeted` mode, only views with the `RefreshView` flag or updated signals are refreshed.\n */\n Targeted,\n}\n\n/**\n * Processes a view in update mode. This includes a number of steps in a specific order:\n * - executing a template function in update mode;\n * - executing hooks;\n * - refreshing queries;\n * - setting host bindings;\n * - refreshing child (embedded and component) views.\n */\n\nexport function refreshView<T>(\n tView: TView,\n lView: LView,\n templateFn: ComponentTemplate<{}> | null,\n context: T,\n) {\n ngDevMode && assertEqual(isCreationMode(lView), false, 'Should be run in update mode');\n\n if (isDestroyed(lView)) return;\n\n const flags = lView[FLAGS];\n\n // Check no changes mode is a dev only mode used to verify that bindings have not changed\n // since they were assigned. We do not want to execute lifecycle hooks in that mode.\n const isInCheckNoChangesPass = ngDevMode && isInCheckNoChangesMode();\n const isInExhaustiveCheckNoChangesPass = ngDevMode && isExhaustiveCheckNoChanges();\n\n // Start component reactive context\n // - We might already be in a reactive context if this is an embedded view of the host.\n // - We might be descending into a view that needs a consumer.\n enterView(lView);\n let returnConsumerToPool = true;\n let prevConsumer: ReactiveNode | null = null;\n let currentConsumer: ReactiveLViewConsumer | null = null;\n if (!isInCheckNoChangesPass) {\n if (viewShouldHaveReactiveConsumer(tView)) {\n currentConsumer = getOrBorrowReactiveLViewConsumer(lView);\n prevConsumer = consumerBeforeComputation(currentConsumer);\n } else if (getActiveConsumer() === null) {\n // If the current view should not have a reactive consumer but we don't have an active consumer,\n // we still need to create a temporary consumer to track any signal reads in this template.\n // This is a rare case that can happen with `viewContainerRef.createEmbeddedView(...).detectChanges()`.\n // This temporary consumer marks the first parent that _should_ have a consumer for refresh.\n // Once that refresh happens, the signals will be tracked in the parent consumer and we can destroy\n // the temporary one.\n returnConsumerToPool = false;\n currentConsumer = getOrCreateTemporaryConsumer(lView);\n prevConsumer = consumerBeforeComputation(currentConsumer);\n } else if (lView[REACTIVE_TEMPLATE_CONSUMER]) {\n consumerDestroy(lView[REACTIVE_TEMPLATE_CONSUMER]);\n lView[REACTIVE_TEMPLATE_CONSUMER] = null;\n }\n }\n\n try {\n resetPreOrderHookFlags(lView);\n\n setBindingIndex(tView.bindingStartIndex);\n if (templateFn !== null) {\n executeTemplate(tView, lView, templateFn, RenderFlags.Update, context);\n }\n\n const hooksInitPhaseCompleted =\n (flags & LViewFlags.InitPhaseStateMask) === InitPhaseState.InitPhaseCompleted;\n\n // execute pre-order hooks (OnInit, OnChanges, DoCheck)\n // PERF WARNING: do NOT extract this to a separate function without running benchmarks\n if (!isInCheckNoChangesPass) {\n if (hooksInitPhaseCompleted) {\n const preOrderCheckHooks = tView.preOrderCheckHooks;\n if (preOrderCheckHooks !== null) {\n executeCheckHooks(lView, preOrderCheckHooks, null);\n }\n } else {\n const preOrderHooks = tView.preOrderHooks;\n if (preOrderHooks !== null) {\n executeInitAndCheckHooks(lView, preOrderHooks, InitPhaseState.OnInitHooksToBeRun, null);\n }\n incrementInitPhaseFlags(lView, InitPhaseState.OnInitHooksToBeRun);\n }\n }\n\n // We do not need to mark transplanted views for refresh when doing exhaustive checks\n // because all views will be reached anyways during the traversal.\n if (!isInExhaustiveCheckNoChangesPass) {\n // First mark transplanted views that are declared in this lView as needing a refresh at their\n // insertion points. This is needed to avoid the situation where the template is defined in this\n // `LView` but its declaration appears after the insertion component.\n markTransplantedViewsForRefresh(lView);\n }\n runEffectsInView(lView);\n detectChangesInEmbeddedViews(lView, ChangeDetectionMode.Global);\n\n // Content query results must be refreshed before content hooks are called.\n if (tView.contentQueries !== null) {\n refreshContentQueries(tView, lView);\n }\n\n // execute content hooks (AfterContentInit, AfterContentChecked)\n // PERF WARNING: do NOT extract this to a separate function without running benchmarks\n if (!isInCheckNoChangesPass) {\n if (hooksInitPhaseCompleted) {\n const contentCheckHooks = tView.contentCheckHooks;\n if (contentCheckHooks !== null) {\n executeCheckHooks(lView, contentCheckHooks);\n }\n } else {\n const contentHooks = tView.contentHooks;\n if (contentHooks !== null) {\n executeInitAndCheckHooks(\n lView,\n contentHooks,\n InitPhaseState.AfterContentInitHooksToBeRun,\n );\n }\n incrementInitPhaseFlags(lView, InitPhaseState.AfterContentInitHooksToBeRun);\n }\n }\n\n processHostBindingOpCodes(tView, lView);\n\n // Refresh child component views.\n const components = tView.components;\n if (components !== null) {\n detectChangesInChildComponents(lView, components, ChangeDetectionMode.Global);\n }\n\n // View queries must execute after refreshing child components because a template in this view\n // could be inserted in a child component. If the view query executes before child component\n // refresh, the template might not yet be inserted.\n const viewQuery = tView.viewQuery;\n if (viewQuery !== null) {\n executeViewQueryFn<T>(RenderFlags.Update, viewQuery, context);\n }\n\n // execute view hooks (AfterViewInit, AfterViewChecked)\n // PERF WARNING: do NOT extract this to a separate function without running benchmarks\n if (!isInCheckNoChangesPass) {\n if (hooksInitPhaseCompleted) {\n const viewCheckHooks = tView.viewCheckHooks;\n if (viewCheckHooks !== null) {\n executeCheckHooks(lView, viewCheckHooks);\n }\n } else {\n const viewHooks = tView.viewHooks;\n if (viewHooks !== null) {\n executeInitAndCheckHooks(lView, viewHooks, InitPhaseState.AfterViewInitHooksToBeRun);\n }\n incrementInitPhaseFlags(lView, InitPhaseState.AfterViewInitHooksToBeRun);\n }\n }\n if (tView.firstUpdatePass === true) {\n // We need to make sure that we only flip the flag on successful `refreshView` only\n // Don't do this in `finally` block.\n // If we did this in `finally` block then an exception could block the execution of styling\n // instructions which in turn would be unable to insert themselves into the styling linked\n // list. The result of this would be that if the exception would not be throw on subsequent CD\n // the styling would be unable to process it data and reflect to the DOM.\n tView.firstUpdatePass = false;\n }\n\n // Schedule any effects that are waiting on the update pass of this view.\n if (lView[EFFECTS_TO_SCHEDULE]) {\n for (const notifyEffect of lView[EFFECTS_TO_SCHEDULE]) {\n notifyEffect();\n }\n\n // Once they've been run, we can drop the array.\n lView[EFFECTS_TO_SCHEDULE] = null;\n }\n\n // Do not reset the dirty state when running in check no changes mode. We don't want components\n // to behave differently depending on whether check no changes is enabled or not. For example:\n // Marking an OnPush component as dirty from within the `ngAfterViewInit` hook in order to\n // refresh a `NgClass` binding should work. If we would reset the dirty state in the check\n // no changes cycle, the component would be not be dirty for the next update pass. This would\n // be different in production mode where the component dirty state is not reset.\n if (!isInCheckNoChangesPass) {\n addAfterRenderSequencesForView(lView);\n\n lView[FLAGS] &= ~(LViewFlags.Dirty | LViewFlags.FirstLViewPass);\n }\n } catch (e) {\n if (!isInCheckNoChangesPass) {\n // If refreshing a view causes an error, we need to remark the ancestors as needing traversal\n // because the error might have caused a situation where views below the current location are\n // dirty but will be unreachable because the \"has dirty children\" flag in the ancestors has been\n // cleared during change detection and we failed to run to completion.\n markAncestorsForTraversal(lView);\n }\n throw e;\n } finally {\n if (currentConsumer !== null) {\n consumerAfterComputation(currentConsumer, prevConsumer);\n if (returnConsumerToPool) {\n maybeReturnReactiveLViewConsumer(currentConsumer);\n }\n }\n leaveView();\n }\n}\n\n/**\n * Goes over embedded views (ones created through ViewContainerRef APIs) and refreshes\n * them by executing an associated template function.\n */\nfunction detectChangesInEmbeddedViews(lView: LView, mode: ChangeDetectionMode) {\n for (\n let lContainer = getFirstLContainer(lView);\n lContainer !== null;\n lContainer = getNextLContainer(lContainer)\n ) {\n for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n const embeddedLView = lContainer[i];\n detectChangesInViewIfAttached(embeddedLView, mode);\n }\n }\n}\n\n/**\n * Mark transplanted views as needing to be refreshed at their attachment points.\n *\n * @param lView The `LView` that may have transplanted views.\n */\nfunction markTransplantedViewsForRefresh(lView: LView) {\n for (\n let lContainer = getFirstLContainer(lView);\n lContainer !== null;\n lContainer = getNextLContainer(lContainer)\n ) {\n if (!(lContainer[FLAGS] & LContainerFlags.HasTransplantedViews)) continue;\n\n const movedViews = lContainer[MOVED_VIEWS]!;\n ngDevMode && assertDefined(movedViews, 'Transplanted View flags set but missing MOVED_VIEWS');\n for (let i = 0; i < movedViews.length; i++) {\n const movedLView = movedViews[i]!;\n markViewForRefresh(movedLView);\n }\n }\n}\n\n/**\n * Detects changes in a component by entering the component view and processing its bindings,\n * queries, etc. if it is CheckAlways, OnPush and Dirty, etc.\n *\n * @param componentHostIdx Element index in LView[] (adjusted for HEADER_OFFSET)\n */\nfunction detectChangesInComponent(\n hostLView: LView,\n componentHostIdx: number,\n mode: ChangeDetectionMode,\n): void {\n ngDevMode && assertEqual(isCreationMode(hostLView), false, 'Should be run in update mode');\n profiler(ProfilerEvent.ComponentStart);\n\n const componentView = getComponentLViewByIndex(componentHostIdx, hostLView);\n detectChangesInViewIfAttached(componentView, mode);\n\n profiler(ProfilerEvent.ComponentEnd, componentView[CONTEXT] as any as {});\n}\n\n/**\n * Visits a view as part of change detection traversal.\n *\n * If the view is detached, no additional traversal happens.\n */\nfunction detectChangesInViewIfAttached(lView: LView, mode: ChangeDetectionMode) {\n if (!viewAttachedToChangeDetector(lView)) {\n return;\n }\n detectChangesInView(lView, mode);\n}\n\n/**\n * Visits a view as part of change detection traversal.\n *\n * The view is refreshed if:\n * - If the view is CheckAlways or Dirty and ChangeDetectionMode is `Global`\n * - If the view has the `RefreshView` flag\n *\n * The view is not refreshed, but descendants are traversed in `ChangeDetectionMode.Targeted` if the\n * view HasChildViewsToRefresh flag is set.\n */\nfunction detectChangesInView(lView: LView, mode: ChangeDetectionMode) {\n const isInCheckNoChangesPass = ngDevMode && isInCheckNoChangesMode();\n const tView = lView[TVIEW];\n const flags = lView[FLAGS];\n const consumer = lView[REACTIVE_TEMPLATE_CONSUMER];\n\n // Refresh CheckAlways views in Global mode.\n let shouldRefreshView: boolean = !!(\n mode === ChangeDetectionMode.Global && flags & LViewFlags.CheckAlways\n );\n\n // Refresh Dirty views in Global mode, as long as we're not in checkNoChanges.\n // CheckNoChanges never worked with `OnPush` components because the `Dirty` flag was\n // cleared before checkNoChanges ran. Because there is now a loop for to check for\n // backwards views, it gives an opportunity for `OnPush` components to be marked `Dirty`\n // before the CheckNoChanges pass. We don't want existing errors that are hidden by the\n // current CheckNoChanges bug to surface when making unrelated changes.\n shouldRefreshView ||= !!(\n flags & LViewFlags.Dirty &&\n mode === ChangeDetectionMode.Global &&\n !isInCheckNoChangesPass\n );\n\n // Always refresh views marked for refresh, regardless of mode.\n shouldRefreshView ||= !!(flags & LViewFlags.RefreshView);\n\n // Refresh views when they have a dirty reactive consumer, regardless of mode.\n shouldRefreshView ||= !!(consumer?.dirty && consumerPollProducersForChange(consumer));\n\n shouldRefreshView ||= !!(ngDevMode && isExhaustiveCheckNoChanges());\n\n // Mark the Flags and `ReactiveNode` as not dirty before refreshing the component, so that they\n // can be re-dirtied during the refresh process.\n if (consumer) {\n consumer.dirty = false;\n }\n lView[FLAGS] &= ~(LViewFlags.HasChildViewsToRefresh | LViewFlags.RefreshView);\n\n if (shouldRefreshView) {\n refreshView(tView, lView, tView.template, lView[CONTEXT]);\n } else if (flags & LViewFlags.HasChildViewsToRefresh) {\n if (!isInCheckNoChangesPass) {\n runEffectsInView(lView);\n }\n detectChangesInEmbeddedViews(lView, ChangeDetectionMode.Targeted);\n const components = tView.components;\n if (components !== null) {\n detectChangesInChildComponents(lView, components, ChangeDetectionMode.Targeted);\n }\n if (!isInCheckNoChangesPass) {\n addAfterRenderSequencesForView(lView);\n }\n }\n}\n\n/** Refreshes child components in the current view (update mode). */\nfunction detectChangesInChildComponents(\n hostLView: LView,\n components: number[],\n mode: ChangeDetectionMode,\n): void {\n for (let i = 0; i < components.length; i++) {\n detectChangesInComponent(hostLView, components[i], mode);\n }\n}\n\n/**\n * Invoke `HostBindingsFunction`s for view.\n *\n * This methods executes `TView.hostBindingOpCodes`. It is used to execute the\n * `HostBindingsFunction`s associated with the current `LView`.\n *\n * @param tView Current `TView`.\n * @param lView Current `LView`.\n */\nfunction processHostBindingOpCodes(tView: TView, lView: LView): void {\n const hostBindingOpCodes = tView.hostBindingOpCodes;\n if (hostBindingOpCodes === null) return;\n try {\n for (let i = 0; i < hostBindingOpCodes.length; i++) {\n const opCode = hostBindingOpCodes[i] as number;\n if (opCode < 0) {\n // Negative numbers are element indexes.\n setSelectedIndex(~opCode);\n } else {\n // Positive numbers are NumberTuple which store bindingRootIndex and directiveIndex.\n const directiveIdx = opCode;\n const bindingRootIndx = hostBindingOpCodes[++i] as number;\n const hostBindingFn = hostBindingOpCodes[++i] as HostBindingsFunction<any>;\n setBindingRootForHostBindings(bindingRootIndx, directiveIdx);\n const context = lView[directiveIdx];\n profiler(ProfilerEvent.HostBindingsUpdateStart, context);\n hostBindingFn(RenderFlags.Update, context);\n profiler(ProfilerEvent.HostBindingsUpdateEnd, context);\n }\n }\n } finally {\n setSelectedIndex(-1);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {NotificationSource} from '../../change_detection/scheduling/zoneless_scheduling';\nimport {isRootView} from '../interfaces/type_checks';\nimport {ENVIRONMENT, FLAGS, LView, LViewFlags} from '../interfaces/view';\nimport {isRefreshingViews} from '../state';\nimport {getLViewParent} from '../util/view_utils';\n\n/**\n * Marks current view and all ancestors dirty.\n *\n * Returns the root view because it is found as a byproduct of marking the view tree\n * dirty, and can be used by methods that consume markViewDirty() to easily schedule\n * change detection. Otherwise, such methods would need to traverse up the view tree\n * an additional time to get the root view and schedule a tick on it.\n *\n * @param lView The starting LView to mark dirty\n * @returns the root LView\n */\nexport function markViewDirty(lView: LView, source: NotificationSource): LView | null {\n const dirtyBitsToUse = isRefreshingViews()\n ? // When we are actively refreshing views, we only use the `Dirty` bit to mark a view\n // for check. This bit is ignored in ChangeDetectionMode.Targeted, which is used to\n // synchronously rerun change detection on a specific set of views (those which have\n // the `RefreshView` flag and those with dirty signal consumers). `LViewFlags.Dirty`\n // does not support re-entrant change detection on its own.\n LViewFlags.Dirty\n : // When we are not actively refreshing a view tree, it is absolutely\n // valid to update state and mark views dirty. We use the `RefreshView` flag in this\n // case to allow synchronously rerunning change detection. This applies today to\n // afterRender hooks as well as animation listeners which execute after detecting\n // changes in a view when the render factory flushes.\n LViewFlags.RefreshView | LViewFlags.Dirty;\n lView[ENVIRONMENT].changeDetectionScheduler?.notify(source);\n while (lView) {\n lView[FLAGS] |= dirtyBitsToUse;\n const parent = getLViewParent(lView);\n // Stop traversing up as soon as you find a root view that wasn't attached to any container\n if (isRootView(lView) && !parent) {\n return lView;\n }\n // continue otherwise\n lView = parent!;\n }\n return null;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {addToArray, removeFromArray} from '../../util/array_utils';\nimport {assertDefined, assertEqual} from '../../util/assert';\nimport {assertLContainer, assertLView} from '../assert';\nimport {\n CONTAINER_HEADER_OFFSET,\n LContainer,\n LContainerFlags,\n MOVED_VIEWS,\n NATIVE,\n} from '../interfaces/container';\nimport {TNode} from '../interfaces/node';\nimport {RComment, RElement} from '../interfaces/renderer_dom';\nimport {isLView} from '../interfaces/type_checks';\nimport {\n DECLARATION_COMPONENT_VIEW,\n DECLARATION_LCONTAINER,\n FLAGS,\n HYDRATION,\n LView,\n LViewFlags,\n NEXT,\n PARENT,\n QUERIES,\n RENDERER,\n T_HOST,\n TView,\n TVIEW,\n} from '../interfaces/view';\nimport {\n addViewToDOM,\n destroyLView,\n detachMovedView,\n getBeforeNodeForView,\n removeViewFromDOM,\n} from '../node_manipulation';\nimport {updateAncestorTraversalFlagsOnAttach} from '../util/view_utils';\n\n/**\n * Creates a LContainer, either from a container instruction, or for a ViewContainerRef.\n *\n * @param hostNative The host element for the LContainer\n * @param hostTNode The host TNode for the LContainer\n * @param currentView The parent view of the LContainer\n * @param native The native comment element\n * @param isForViewContainerRef Optional a flag indicating the ViewContainerRef case\n * @returns LContainer\n */\nexport function createLContainer(\n hostNative: RElement | RComment | LView,\n currentView: LView,\n native: RComment,\n tNode: TNode,\n): LContainer {\n ngDevMode && assertLView(currentView);\n const lContainer: LContainer = [\n hostNative, // host native\n true, // Boolean `true` in this position signifies that this is an `LContainer`\n 0, // flags\n currentView, // parent\n null, // next\n tNode, // t_host\n null, // dehydrated views\n native, // native,\n null, // view refs\n null, // moved views\n ];\n ngDevMode &&\n assertEqual(\n lContainer.length,\n CONTAINER_HEADER_OFFSET,\n 'Should allocate correct number of slots for LContainer header.',\n );\n return lContainer;\n}\n\nexport function getLViewFromLContainer<T>(\n lContainer: LContainer,\n index: number,\n): LView<T> | undefined {\n const adjustedIndex = CONTAINER_HEADER_OFFSET + index;\n // avoid reading past the array boundaries\n if (adjustedIndex < lContainer.length) {\n const lView = lContainer[adjustedIndex];\n ngDevMode && assertLView(lView);\n return lView as LView<T>;\n }\n return undefined;\n}\n\nexport function addLViewToLContainer(\n lContainer: LContainer,\n lView: LView<unknown>,\n index: number,\n addToDOM = true,\n): void {\n const tView = lView[TVIEW];\n\n // Insert into the view tree so the new view can be change-detected\n insertView(tView, lView, lContainer, index);\n\n // Insert elements that belong to this view into the DOM tree\n if (addToDOM) {\n const beforeNode = getBeforeNodeForView(index, lContainer);\n const renderer = lView[RENDERER];\n const parentRNode = renderer.parentNode(lContainer[NATIVE] as RElement | RComment);\n if (parentRNode !== null) {\n addViewToDOM(tView, lContainer[T_HOST], renderer, lView, parentRNode, beforeNode);\n }\n }\n\n // When in hydration mode, reset the pointer to the first child in\n // the dehydrated view. This indicates that the view was hydrated and\n // further attaching/detaching should work with this view as normal.\n const hydrationInfo = lView[HYDRATION];\n if (hydrationInfo !== null && hydrationInfo.firstChild !== null) {\n hydrationInfo.firstChild = null;\n }\n}\n\nexport function removeLViewFromLContainer(\n lContainer: LContainer,\n index: number,\n): LView<unknown> | undefined {\n const lView = detachView(lContainer, index);\n if (lView !== undefined) {\n destroyLView(lView[TVIEW], lView);\n }\n return lView;\n}\n\n/**\n * Detaches a view from a container.\n *\n * This method removes the view from the container's array of active views. It also\n * removes the view's elements from the DOM.\n *\n * @param lContainer The container from which to detach a view\n * @param removeIndex The index of the view to detach\n * @returns Detached LView instance.\n */\nexport function detachView(lContainer: LContainer, removeIndex: number): LView | undefined {\n if (lContainer.length <= CONTAINER_HEADER_OFFSET) return;\n\n const indexInContainer = CONTAINER_HEADER_OFFSET + removeIndex;\n const viewToDetach = lContainer[indexInContainer];\n\n if (viewToDetach) {\n const declarationLContainer = viewToDetach[DECLARATION_LCONTAINER];\n if (declarationLContainer !== null && declarationLContainer !== lContainer) {\n detachMovedView(declarationLContainer, viewToDetach);\n }\n\n if (removeIndex > 0) {\n lContainer[indexInContainer - 1][NEXT] = viewToDetach[NEXT] as LView;\n }\n const removedLView = removeFromArray(lContainer, CONTAINER_HEADER_OFFSET + removeIndex);\n removeViewFromDOM(viewToDetach[TVIEW], viewToDetach);\n\n // notify query that a view has been removed\n const lQueries = removedLView[QUERIES];\n if (lQueries !== null) {\n lQueries.detachView(removedLView[TVIEW]);\n }\n\n viewToDetach[PARENT] = null;\n viewToDetach[NEXT] = null;\n // Unsets the attached flag\n viewToDetach[FLAGS] &= ~LViewFlags.Attached;\n }\n return viewToDetach;\n}\n\n/**\n * Inserts a view into a container.\n *\n * This adds the view to the container's array of active views in the correct\n * position. It also adds the view's elements to the DOM if the container isn't a\n * root node of another view (in that case, the view's elements will be added when\n * the container's parent view is added later).\n *\n * @param tView The `TView' of the `LView` to insert\n * @param lView The view to insert\n * @param lContainer The container into which the view should be inserted\n * @param index Which index in the container to insert the child view into\n */\nfunction insertView(tView: TView, lView: LView, lContainer: LContainer, index: number) {\n ngDevMode && assertLView(lView);\n ngDevMode && assertLContainer(lContainer);\n const indexInContainer = CONTAINER_HEADER_OFFSET + index;\n const containerLength = lContainer.length;\n\n if (index > 0) {\n // This is a new view, we need to add it to the children.\n lContainer[indexInContainer - 1][NEXT] = lView;\n }\n if (index < containerLength - CONTAINER_HEADER_OFFSET) {\n lView[NEXT] = lContainer[indexInContainer];\n addToArray(lContainer, CONTAINER_HEADER_OFFSET + index, lView);\n } else {\n lContainer.push(lView);\n lView[NEXT] = null;\n }\n\n lView[PARENT] = lContainer;\n\n // track views where declaration and insertion points are different\n const declarationLContainer = lView[DECLARATION_LCONTAINER];\n if (declarationLContainer !== null && lContainer !== declarationLContainer) {\n trackMovedView(declarationLContainer, lView);\n }\n\n // notify query that a new view has been added\n const lQueries = lView[QUERIES];\n if (lQueries !== null) {\n lQueries.insertView(tView);\n }\n\n updateAncestorTraversalFlagsOnAttach(lView);\n // Sets the attached flag\n lView[FLAGS] |= LViewFlags.Attached;\n}\n\n/**\n * Track views created from the declaration container (TemplateRef) and inserted into a\n * different LContainer or attached directly to ApplicationRef.\n */\nexport function trackMovedView(declarationContainer: LContainer, lView: LView) {\n ngDevMode && assertDefined(lView, 'LView required');\n ngDevMode && assertLContainer(declarationContainer);\n const movedViews = declarationContainer[MOVED_VIEWS];\n const parent = lView[PARENT]!;\n ngDevMode && assertDefined(parent, 'missing parent');\n if (isLView(parent)) {\n declarationContainer[FLAGS] |= LContainerFlags.HasTransplantedViews;\n } else {\n const insertedComponentLView = parent[PARENT]![DECLARATION_COMPONENT_VIEW];\n ngDevMode && assertDefined(insertedComponentLView, 'Missing insertedComponentLView');\n const declaredComponentLView = lView[DECLARATION_COMPONENT_VIEW];\n ngDevMode && assertDefined(declaredComponentLView, 'Missing declaredComponentLView');\n if (declaredComponentLView !== insertedComponentLView) {\n // At this point the declaration-component is not same as insertion-component; this means that\n // this is a transplanted view. Mark the declared lView as having transplanted views so that\n // those views can participate in CD.\n declarationContainer[FLAGS] |= LContainerFlags.HasTransplantedViews;\n }\n }\n if (movedViews === null) {\n declarationContainer[MOVED_VIEWS] = [lView];\n } else {\n movedViews.push(lView);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport type {ChangeDetectorRef} from '../change_detection/change_detector_ref';\nimport {NotificationSource} from '../change_detection/scheduling/zoneless_scheduling';\nimport type {ApplicationRef} from '../core';\nimport {RuntimeError, RuntimeErrorCode} from '../errors';\nimport type {EmbeddedViewRef} from '../linker/view_ref';\nimport {removeFromArray} from '../util/array_utils';\nimport {assertEqual} from '../util/assert';\n\nimport {collectNativeNodes} from './collect_native_nodes';\nimport {checkNoChangesInternal, detectChangesInternal} from './instructions/change_detection';\nimport {markViewDirty} from './instructions/mark_view_dirty';\nimport {CONTAINER_HEADER_OFFSET, VIEW_REFS} from './interfaces/container';\nimport {isDestroyed, isLContainer, isRootView} from './interfaces/type_checks';\nimport {\n CONTEXT,\n DECLARATION_LCONTAINER,\n FLAGS,\n LView,\n LViewFlags,\n PARENT,\n TVIEW,\n} from './interfaces/view';\nimport {destroyLView, detachMovedView, detachViewFromDOM} from './node_manipulation';\nimport {CheckNoChangesMode} from './state';\nimport {\n markViewForRefresh,\n storeLViewOnDestroy,\n updateAncestorTraversalFlagsOnAttach,\n requiresRefreshOrTraversal,\n} from './util/view_utils';\nimport {detachView, trackMovedView} from './view/container';\n\n// Needed due to tsickle downleveling where multiple `implements` with classes creates\n// multiple @extends in Closure annotations, which is illegal. This workaround fixes\n// the multiple @extends by making the annotation @implements instead\ninterface ChangeDetectorRefInterface extends ChangeDetectorRef {}\n\nexport class ViewRef<T> implements EmbeddedViewRef<T>, ChangeDetectorRefInterface {\n private _appRef: ApplicationRef | null = null;\n private _attachedToViewContainer = false;\n\n get rootNodes(): any[] {\n const lView = this._lView;\n const tView = lView[TVIEW];\n return collectNativeNodes(tView, lView, tView.firstChild, []);\n }\n\n constructor(\n /**\n * This represents `LView` associated with the component when ViewRef is a ChangeDetectorRef.\n *\n * When ViewRef is created for a dynamic component, this also represents the `LView` for the\n * component.\n *\n * For a \"regular\" ViewRef created for an embedded view, this is the `LView` for the embedded\n * view.\n *\n * @internal\n */\n public _lView: LView,\n\n /**\n * This represents the `LView` associated with the point where `ChangeDetectorRef` was\n * requested.\n *\n * This may be different from `_lView` if the `_cdRefInjectingView` is an embedded view.\n */\n private _cdRefInjectingView?: LView,\n readonly notifyErrorHandler = true,\n ) {}\n\n get context(): T {\n return this._lView[CONTEXT] as unknown as T;\n }\n\n /**\n * @deprecated Replacing the full context object is not supported. Modify the context\n * directly, or consider using a `Proxy` if you need to replace the full object.\n * // TODO(devversion): Remove this.\n */\n set context(value: T) {\n if (ngDevMode) {\n // Note: We have a warning message here because the `@deprecated` JSDoc will not be picked\n // up for assignments on the setter. We want to let users know about the deprecated usage.\n console.warn(\n 'Angular: Replacing the `context` object of an `EmbeddedViewRef` is deprecated.',\n );\n }\n\n this._lView[CONTEXT] = value as unknown as {};\n }\n\n get destroyed(): boolean {\n return isDestroyed(this._lView);\n }\n\n destroy(): void {\n if (this._appRef) {\n this._appRef.detachView(this);\n } else if (this._attachedToViewContainer) {\n const parent = this._lView[PARENT];\n if (isLContainer(parent)) {\n const viewRefs = parent[VIEW_REFS] as ViewRef<unknown>[] | null;\n const index = viewRefs ? viewRefs.indexOf(this) : -1;\n if (index > -1) {\n ngDevMode &&\n assertEqual(\n index,\n parent.indexOf(this._lView) - CONTAINER_HEADER_OFFSET,\n 'An attached view should be in the same position within its container as its ViewRef in the VIEW_REFS array.',\n );\n detachView(parent, index);\n removeFromArray(viewRefs!, index);\n }\n }\n this._attachedToViewContainer = false;\n }\n destroyLView(this._lView[TVIEW], this._lView);\n }\n\n onDestroy(callback: Function) {\n storeLViewOnDestroy(this._lView, callback as () => void);\n }\n\n /**\n * Marks a view and all of its ancestors dirty.\n *\n * This can be used to ensure an {@link ChangeDetectionStrategy#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 * ```ts\n * @Component({\n * selector: 'app-root',\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 markForCheck(): void {\n markViewDirty(this._cdRefInjectingView || this._lView, NotificationSource.MarkForCheck);\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} 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 * ```ts\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 detach(): void {\n this._lView[FLAGS] &= ~LViewFlags.Attached;\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}. 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 * ```ts\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: 'app-root',\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 reattach(): void {\n updateAncestorTraversalFlagsOnAttach(this._lView);\n this._lView[FLAGS] |= LViewFlags.Attached;\n }\n\n /**\n * Checks the view and its children.\n *\n * This can also be used in combination with {@link ChangeDetectorRef#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} for more information.\n */\n detectChanges(): void {\n // Add `RefreshView` flag to ensure this view is refreshed if not already dirty.\n // `RefreshView` flag is used intentionally over `Dirty` because it gets cleared before\n // executing any of the actual refresh code while the `Dirty` flag doesn't get cleared\n // until the end of the refresh. Using `RefreshView` prevents creating a potential difference\n // in the state of the LViewFlags during template execution.\n this._lView[FLAGS] |= LViewFlags.RefreshView;\n detectChangesInternal(this._lView, this.notifyErrorHandler);\n }\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 checkNoChanges(): void {\n if (ngDevMode) {\n checkNoChangesInternal(\n this._lView,\n CheckNoChangesMode.OnlyDirtyViews,\n this.notifyErrorHandler,\n );\n }\n }\n\n attachToViewContainerRef() {\n if (this._appRef) {\n throw new RuntimeError(\n RuntimeErrorCode.VIEW_ALREADY_ATTACHED,\n ngDevMode && 'This view is already attached directly to the ApplicationRef!',\n );\n }\n this._attachedToViewContainer = true;\n }\n\n detachFromAppRef() {\n this._appRef = null;\n const isRoot = isRootView(this._lView);\n const declarationContainer = this._lView[DECLARATION_LCONTAINER];\n if (declarationContainer !== null && !isRoot) {\n detachMovedView(declarationContainer, this._lView);\n }\n detachViewFromDOM(this._lView[TVIEW], this._lView);\n }\n\n attachToAppRef(appRef: ApplicationRef) {\n if (this._attachedToViewContainer) {\n throw new RuntimeError(\n RuntimeErrorCode.VIEW_ALREADY_ATTACHED,\n ngDevMode && 'This view is already attached to a ViewContainer!',\n );\n }\n this._appRef = appRef;\n const isRoot = isRootView(this._lView);\n const declarationContainer = this._lView[DECLARATION_LCONTAINER];\n if (declarationContainer !== null && !isRoot) {\n trackMovedView(declarationContainer, this._lView);\n }\n updateAncestorTraversalFlagsOnAttach(this._lView);\n }\n}\n\n/**\n * Reports whether the given view is considered dirty according to the different marking mechanisms.\n */\nexport function isViewDirty(view: ViewRef<unknown>): boolean {\n return requiresRefreshOrTraversal(view._lView) || !!(view._lView[FLAGS] & LViewFlags.Dirty);\n}\n\nexport function markForRefresh(view: ViewRef<unknown>): void {\n markViewForRefresh(view['_cdRefInjectingView'] || view._lView);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Injector} from '../di/injector';\nimport {DehydratedContainerView} from '../hydration/interfaces';\nimport {TContainerNode, TNode, TNodeType} from '../render3/interfaces/node';\nimport {LView} from '../render3/interfaces/view';\nimport {getCurrentTNode, getLView} from '../render3/state';\nimport {createAndRenderEmbeddedLView} from '../render3/view_manipulation';\nimport {ViewRef as R3_ViewRef} from '../render3/view_ref';\nimport {assertDefined} from '../util/assert';\n\nimport {createElementRef, ElementRef} from './element_ref';\nimport {EmbeddedViewRef} from './view_ref';\n\n/**\n * Represents an embedded template that can be used to instantiate embedded views.\n * To instantiate embedded views based on a template, use the `ViewContainerRef`\n * method `createEmbeddedView()`.\n *\n * Access a `TemplateRef` instance by placing a directive on an `<ng-template>`\n * element (or directive prefixed with `*`). The `TemplateRef` for the embedded view\n * is injected into the constructor of the directive,\n * using the `TemplateRef` token.\n *\n * You can also use a `Query` to find a `TemplateRef` associated with\n * a component or a directive.\n *\n * @see {@link ViewContainerRef}\n *\n * @publicApi\n */\nexport abstract class TemplateRef<C> {\n /**\n * The anchor element in the parent view for this embedded view.\n *\n * The data-binding and [injection contexts](guide/di/dependency-injection-context) of embedded\n * views created from this `TemplateRef` inherit from the contexts of this location.\n *\n * Typically new embedded views are attached to the view container of this location, but in\n * advanced use-cases, the view can be attached to a different container while keeping the\n * data-binding and injection context from the original location.\n *\n */\n // TODO(i): rename to anchor or location\n abstract readonly elementRef: ElementRef;\n\n /**\n * Instantiates an unattached embedded view based on this template.\n * @param context The data-binding context of the embedded view, as declared\n * in the `<ng-template>` usage.\n * @param injector Injector to be used within the embedded view.\n * @returns The new embedded view object.\n */\n abstract createEmbeddedView(context: C, injector?: Injector): EmbeddedViewRef<C>;\n\n /**\n * Implementation of the `createEmbeddedView` function.\n *\n * This implementation is internal and allows framework code\n * to invoke it with extra parameters (e.g. for hydration) without\n * affecting public API.\n *\n * @internal\n */\n abstract createEmbeddedViewImpl(\n context: C,\n injector?: Injector,\n dehydratedView?: DehydratedContainerView | null,\n ): EmbeddedViewRef<C>;\n\n /**\n * Returns an `ssrId` associated with a TView, which was used to\n * create this instance of the `TemplateRef`.\n *\n * @internal\n */\n abstract get ssrId(): string | null;\n\n /**\n * @internal\n * @nocollapse\n */\n static __NG_ELEMENT_ID__: () => TemplateRef<any> | null = injectTemplateRef;\n}\n\nconst ViewEngineTemplateRef = TemplateRef;\n\n// TODO(alxhub): combine interface and implementation. Currently this is challenging since something\n// in g3 depends on them being separate.\nconst R3TemplateRef = class TemplateRef<T> extends ViewEngineTemplateRef<T> {\n constructor(\n private _declarationLView: LView,\n private _declarationTContainer: TContainerNode,\n public override elementRef: ElementRef,\n ) {\n super();\n }\n\n /**\n * Returns an `ssrId` associated with a TView, which was used to\n * create this instance of the `TemplateRef`.\n *\n * @internal\n */\n override get ssrId(): string | null {\n return this._declarationTContainer.tView?.ssrId || null;\n }\n\n override createEmbeddedView(context: T, injector?: Injector): EmbeddedViewRef<T> {\n return this.createEmbeddedViewImpl(context, injector);\n }\n\n /**\n * @internal\n */\n override createEmbeddedViewImpl(\n context: T,\n injector?: Injector,\n dehydratedView?: DehydratedContainerView,\n ): EmbeddedViewRef<T> {\n const embeddedLView = createAndRenderEmbeddedLView(\n this._declarationLView,\n this._declarationTContainer,\n context,\n {embeddedViewInjector: injector, dehydratedView},\n );\n return new R3_ViewRef<T>(embeddedLView);\n }\n};\n\n/**\n * Creates a TemplateRef given a node.\n *\n * @returns The TemplateRef instance to use\n */\nexport function injectTemplateRef<T>(): TemplateRef<T> | null {\n return createTemplateRef<T>(getCurrentTNode()!, getLView());\n}\n\n/**\n * Creates a TemplateRef and stores it on the injector.\n *\n * @param hostTNode The node on which a TemplateRef is requested\n * @param hostLView The `LView` to which the node belongs\n * @returns The TemplateRef instance or null if we can't create a TemplateRef on a given node type\n */\nexport function createTemplateRef<T>(hostTNode: TNode, hostLView: LView): TemplateRef<T> | null {\n if (hostTNode.type & TNodeType.Container) {\n ngDevMode && assertDefined(hostTNode.tView, 'TView must be allocated');\n return new R3TemplateRef(\n hostLView,\n hostTNode as TContainerNode,\n createElementRef(hostTNode, hostLView),\n );\n }\n return null;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {RuntimeError, RuntimeErrorCode} from '../errors';\nimport {getDeclarationComponentDef} from '../render3/instructions/element_validation';\nimport {TNode, TNodeType} from '../render3/interfaces/node';\nimport {RNode} from '../render3/interfaces/renderer_dom';\nimport {HOST, LView, TVIEW} from '../render3/interfaces/view';\nimport {getParentRElement} from '../render3/node_manipulation';\nimport {unwrapRNode} from '../render3/util/view_utils';\n\nimport {markRNodeAsHavingHydrationMismatch} from './utils';\n\nconst AT_THIS_LOCATION = '<-- AT THIS LOCATION';\n\n/**\n * Retrieves a user friendly string for a given TNodeType for use in\n * friendly error messages\n *\n * @param tNodeType\n * @returns\n */\nfunction getFriendlyStringFromTNodeType(tNodeType: TNodeType): string {\n switch (tNodeType) {\n case TNodeType.Container:\n return 'view container';\n case TNodeType.Element:\n return 'element';\n case TNodeType.ElementContainer:\n return 'ng-container';\n case TNodeType.Icu:\n return 'icu';\n case TNodeType.Placeholder:\n return 'i18n';\n case TNodeType.Projection:\n return 'projection';\n case TNodeType.Text:\n return 'text';\n case TNodeType.LetDeclaration:\n return '@let';\n default:\n // This should not happen as we cover all possible TNode types above.\n return '<unknown>';\n }\n}\n\n/**\n * Validates that provided nodes match during the hydration process.\n */\nexport function validateMatchingNode(\n node: RNode | null,\n nodeType: number,\n tagName: string | null,\n lView: LView,\n tNode: TNode,\n isViewContainerAnchor = false,\n): void {\n if (\n !node ||\n (node as Node).nodeType !== nodeType ||\n ((node as Node).nodeType === Node.ELEMENT_NODE &&\n (node as HTMLElement).tagName.toLowerCase() !== tagName?.toLowerCase())\n ) {\n const expectedNode = shortRNodeDescription(nodeType, tagName, null);\n let header = `During hydration Angular expected ${expectedNode} but `;\n\n const hostComponentDef = getDeclarationComponentDef(lView);\n const componentClassName = hostComponentDef?.type?.name;\n\n const expectedDom = describeExpectedDom(lView, tNode, isViewContainerAnchor);\n const expected = `Angular expected this DOM:\\n\\n${expectedDom}\\n\\n`;\n\n let actual = '';\n const componentHostElement = unwrapRNode(lView[HOST]!);\n if (!node) {\n // No node found during hydration.\n header += `the node was not found.\\n\\n`;\n\n // Since the node is missing, we use the closest node to attach the error to\n markRNodeAsHavingHydrationMismatch(componentHostElement, expectedDom);\n } else {\n const actualNode = shortRNodeDescription(\n (node as Node).nodeType,\n (node as HTMLElement).tagName ?? null,\n (node as HTMLElement).textContent ?? null,\n );\n\n header += `found ${actualNode}.\\n\\n`;\n const actualDom = describeDomFromNode(node);\n actual = `Actual DOM is:\\n\\n${actualDom}\\n\\n`;\n\n // DevTools only report hydration issues on the component level, so we attach extra debug\n // info to a component host element to make it available to DevTools.\n markRNodeAsHavingHydrationMismatch(componentHostElement, expectedDom, actualDom);\n }\n\n const footer = getHydrationErrorFooter(componentClassName);\n const message = header + expected + actual + getHydrationAttributeNote() + footer;\n throw new RuntimeError(RuntimeErrorCode.HYDRATION_NODE_MISMATCH, message);\n }\n}\n\n/**\n * Validates that a given node has sibling nodes\n */\nexport function validateSiblingNodeExists(node: RNode | null): void {\n validateNodeExists(node);\n if (!node!.nextSibling) {\n const header = 'During hydration Angular expected more sibling nodes to be present.\\n\\n';\n const actual = `Actual DOM is:\\n\\n${describeDomFromNode(node!)}\\n\\n`;\n const footer = getHydrationErrorFooter();\n\n const message = header + actual + footer;\n\n markRNodeAsHavingHydrationMismatch(node!, '', actual);\n throw new RuntimeError(RuntimeErrorCode.HYDRATION_MISSING_SIBLINGS, message);\n }\n}\n\n/**\n * Validates that a node exists or throws\n */\nexport function validateNodeExists(\n node: RNode | null,\n lView: LView | null = null,\n tNode: TNode | null = null,\n): void {\n if (!node) {\n const header =\n 'During hydration, Angular expected an element to be present at this location.\\n\\n';\n let expected = '';\n let footer = '';\n if (lView !== null && tNode !== null) {\n expected = describeExpectedDom(lView, tNode, false);\n footer = getHydrationErrorFooter();\n\n // Since the node is missing, we use the closest node to attach the error to\n markRNodeAsHavingHydrationMismatch(unwrapRNode(lView[HOST]!), expected, '');\n }\n\n throw new RuntimeError(\n RuntimeErrorCode.HYDRATION_MISSING_NODE,\n `${header}${expected}\\n\\n${footer}`,\n );\n }\n}\n\n/**\n * Builds the hydration error message when a node is not found\n *\n * @param lView the LView where the node exists\n * @param tNode the TNode\n */\nexport function nodeNotFoundError(lView: LView, tNode: TNode): Error {\n const header = 'During serialization, Angular was unable to find an element in the DOM:\\n\\n';\n const expected = `${describeExpectedDom(lView, tNode, false)}\\n\\n`;\n const footer = getHydrationErrorFooter();\n\n throw new RuntimeError(RuntimeErrorCode.HYDRATION_MISSING_NODE, header + expected + footer);\n}\n\n/**\n * Builds a hydration error message when a node is not found at a path location\n *\n * @param host the Host Node\n * @param path the path to the node\n */\nexport function nodeNotFoundAtPathError(host: Node, path: string): Error {\n const header =\n `During hydration Angular was unable to locate a node ` +\n `using the \"${path}\" path, starting from the ${describeRNode(host)} node.\\n\\n`;\n const footer = getHydrationErrorFooter();\n\n markRNodeAsHavingHydrationMismatch(host);\n throw new RuntimeError(RuntimeErrorCode.HYDRATION_MISSING_NODE, header + footer);\n}\n\n/**\n * Builds the hydration error message in the case that dom nodes are created outside of\n * the Angular context and are being used as projected nodes\n *\n * @param lView the LView\n * @param tNode the TNode\n * @returns an error\n */\nexport function unsupportedProjectionOfDomNodes(rNode: RNode): Error {\n const header =\n 'During serialization, Angular detected DOM nodes ' +\n 'that were created outside of Angular context and provided as projectable nodes ' +\n '(likely via `ViewContainerRef.createComponent` or `createComponent` APIs). ' +\n 'Hydration is not supported for such cases, consider refactoring the code to avoid ' +\n 'this pattern or using `ngSkipHydration` on the host element of the component.\\n\\n';\n const actual = `${describeDomFromNode(rNode)}\\n\\n`;\n const message = header + actual + getHydrationAttributeNote();\n return new RuntimeError(RuntimeErrorCode.UNSUPPORTED_PROJECTION_DOM_NODES, message);\n}\n\n/**\n * Builds the hydration error message in the case that ngSkipHydration was used on a\n * node that is not a component host element or host binding\n *\n * @param rNode the HTML Element\n * @returns an error\n */\nexport function invalidSkipHydrationHost(rNode: RNode): Error {\n const header =\n 'The `ngSkipHydration` flag is applied on a node ' +\n \"that doesn't act as a component host. Hydration can be \" +\n 'skipped only on per-component basis.\\n\\n';\n const actual = `${describeDomFromNode(rNode)}\\n\\n`;\n const footer = 'Please move the `ngSkipHydration` attribute to the component host element.\\n\\n';\n const message = header + actual + footer;\n return new RuntimeError(RuntimeErrorCode.INVALID_SKIP_HYDRATION_HOST, message);\n}\n\n// Stringification methods\n\n/**\n * Stringifies a given TNode's attributes\n *\n * @param tNode a provided TNode\n * @returns string\n */\nfunction stringifyTNodeAttrs(tNode: TNode): string {\n const results = [];\n if (tNode.attrs) {\n for (let i = 0; i < tNode.attrs.length; ) {\n const attrName = tNode.attrs[i++];\n // Once we reach the first flag, we know that the list of\n // attributes is over.\n if (typeof attrName == 'number') {\n break;\n }\n const attrValue = tNode.attrs[i++];\n results.push(`${attrName}=\"${shorten(attrValue as string)}\"`);\n }\n }\n return results.join(' ');\n}\n\n/**\n * The list of internal attributes that should be filtered out while\n * producing an error message.\n */\nconst internalAttrs = new Set(['ngh', 'ng-version', 'ng-server-context']);\n\n/**\n * Stringifies an HTML Element's attributes\n *\n * @param rNode an HTML Element\n * @returns string\n */\nfunction stringifyRNodeAttrs(rNode: HTMLElement): string {\n const results = [];\n for (let i = 0; i < rNode.attributes.length; i++) {\n const attr = rNode.attributes[i];\n if (internalAttrs.has(attr.name)) continue;\n results.push(`${attr.name}=\"${shorten(attr.value)}\"`);\n }\n return results.join(' ');\n}\n\n// Methods for Describing the DOM\n\n/**\n * Converts a tNode to a helpful readable string value for use in error messages\n *\n * @param tNode a given TNode\n * @param innerContent the content of the node\n * @returns string\n */\nfunction describeTNode(tNode: TNode, innerContent: string = '…'): string {\n switch (tNode.type) {\n case TNodeType.Text:\n const content = tNode.value ? `(${tNode.value})` : '';\n return `#text${content}`;\n case TNodeType.Element:\n const attrs = stringifyTNodeAttrs(tNode);\n const tag = tNode.value.toLowerCase();\n return `<${tag}${attrs ? ' ' + attrs : ''}>${innerContent}</${tag}>`;\n case TNodeType.ElementContainer:\n return '<!-- ng-container -->';\n case TNodeType.Container:\n return '<!-- container -->';\n default:\n const typeAsString = getFriendlyStringFromTNodeType(tNode.type);\n return `#node(${typeAsString})`;\n }\n}\n\n/**\n * Converts an RNode to a helpful readable string value for use in error messages\n *\n * @param rNode a given RNode\n * @param innerContent the content of the node\n * @returns string\n */\nfunction describeRNode(rNode: RNode, innerContent: string = '…'): string {\n const node = rNode as HTMLElement;\n switch (node.nodeType) {\n case Node.ELEMENT_NODE:\n const tag = node.tagName!.toLowerCase();\n const attrs = stringifyRNodeAttrs(node);\n return `<${tag}${attrs ? ' ' + attrs : ''}>${innerContent}</${tag}>`;\n case Node.TEXT_NODE:\n const content = node.textContent ? shorten(node.textContent) : '';\n return `#text${content ? `(${content})` : ''}`;\n case Node.COMMENT_NODE:\n return `<!-- ${shorten(node.textContent ?? '')} -->`;\n default:\n return `#node(${node.nodeType})`;\n }\n}\n\n/**\n * Builds the string containing the expected DOM present given the LView and TNode\n * values for a readable error message\n *\n * @param lView the lView containing the DOM\n * @param tNode the tNode\n * @param isViewContainerAnchor boolean\n * @returns string\n */\nfunction describeExpectedDom(lView: LView, tNode: TNode, isViewContainerAnchor: boolean): string {\n const spacer = ' ';\n let content = '';\n if (tNode.prev) {\n content += spacer + '…\\n';\n content += spacer + describeTNode(tNode.prev) + '\\n';\n } else if (tNode.type && tNode.type & TNodeType.AnyContainer) {\n content += spacer + '…\\n';\n }\n if (isViewContainerAnchor) {\n content += spacer + describeTNode(tNode) + '\\n';\n content += spacer + `<!-- container --> ${AT_THIS_LOCATION}\\n`;\n } else {\n content += spacer + describeTNode(tNode) + ` ${AT_THIS_LOCATION}\\n`;\n }\n content += spacer + '…\\n';\n\n const parentRNode = tNode.type ? getParentRElement(lView[TVIEW], tNode, lView) : null;\n if (parentRNode) {\n content = describeRNode(parentRNode as unknown as Node, '\\n' + content);\n }\n return content;\n}\n\n/**\n * Builds the string containing the DOM present around a given RNode for a\n * readable error message\n *\n * @param node the RNode\n * @returns string\n */\nfunction describeDomFromNode(node: RNode): string {\n const spacer = ' ';\n let content = '';\n const currentNode = node as HTMLElement;\n if (currentNode.previousSibling) {\n content += spacer + '…\\n';\n content += spacer + describeRNode(currentNode.previousSibling) + '\\n';\n }\n content += spacer + describeRNode(currentNode) + ` ${AT_THIS_LOCATION}\\n`;\n if (node.nextSibling) {\n content += spacer + '…\\n';\n }\n if (node.parentNode) {\n content = describeRNode(currentNode.parentNode as Node, '\\n' + content);\n }\n return content;\n}\n\n/**\n * Shortens the description of a given RNode by its type for readability\n *\n * @param nodeType the type of node\n * @param tagName the node tag name\n * @param textContent the text content in the node\n * @returns string\n */\nfunction shortRNodeDescription(\n nodeType: number,\n tagName: string | null,\n textContent: string | null,\n): string {\n switch (nodeType) {\n case Node.ELEMENT_NODE:\n return `<${tagName!.toLowerCase()}>`;\n case Node.TEXT_NODE:\n const content = textContent ? ` (with the \"${shorten(textContent)}\" content)` : '';\n return `a text node${content}`;\n case Node.COMMENT_NODE:\n return 'a comment node';\n default:\n return `#node(nodeType=${nodeType})`;\n }\n}\n\n/**\n * Builds the footer hydration error message\n *\n * @param componentClassName the name of the component class\n * @returns string\n */\nfunction getHydrationErrorFooter(componentClassName?: string): string {\n const componentInfo = componentClassName ? `the \"${componentClassName}\"` : 'corresponding';\n return (\n `To fix this problem:\\n` +\n ` * check ${componentInfo} component for hydration-related issues\\n` +\n ` * check to see if your template has valid HTML structure\\n` +\n ` * or skip hydration by adding the \\`ngSkipHydration\\` attribute ` +\n `to its host node in a template\\n\\n`\n );\n}\n\n/**\n * An attribute related note for hydration errors\n */\nfunction getHydrationAttributeNote(): string {\n return (\n 'Note: attributes are only displayed to better represent the DOM' +\n ' but have no effect on hydration mismatches.\\n\\n'\n );\n}\n\n// Node string utility functions\n\n/**\n * Strips all newlines out of a given string\n *\n * @param input a string to be cleared of new line characters\n * @returns\n */\nfunction stripNewlines(input: string): string {\n return input.replace(/\\s+/gm, '');\n}\n\n/**\n * Reduces a string down to a maximum length of characters with ellipsis for readability\n *\n * @param input a string input\n * @param maxLength a maximum length in characters\n * @returns string\n */\nfunction shorten(input: string | null, maxLength = 50): string {\n if (!input) {\n return '';\n }\n input = stripNewlines(input);\n return input.length > maxLength ? `${input.substring(0, maxLength - 1)}…` : input;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {assertDomNode, assertIndexInRange} from '../util/assert';\n\nimport {TNode, TNodeType} from './interfaces/node';\nimport {Renderer} from './interfaces/renderer';\nimport {RElement, RNode} from './interfaces/renderer_dom';\nimport {LView} from './interfaces/view';\nimport {getInsertInFrontOfRNodeWithNoI18n} from './node_manipulation';\nimport {nativeInsertBefore} from './dom_node_manipulation';\nimport {unwrapRNode} from './util/view_utils';\n\n/**\n * Find a node in front of which `currentTNode` should be inserted (takes i18n into account).\n *\n * This method determines the `RNode` in front of which we should insert the `currentRNode`. This\n * takes `TNode.insertBeforeIndex` into account.\n *\n * @param parentTNode parent `TNode`\n * @param currentTNode current `TNode` (The node which we would like to insert into the DOM)\n * @param lView current `LView`\n */\nexport function getInsertInFrontOfRNodeWithI18n(\n parentTNode: TNode,\n currentTNode: TNode,\n lView: LView,\n): RNode | null {\n const tNodeInsertBeforeIndex = currentTNode.insertBeforeIndex;\n const insertBeforeIndex = Array.isArray(tNodeInsertBeforeIndex)\n ? tNodeInsertBeforeIndex[0]\n : tNodeInsertBeforeIndex;\n if (insertBeforeIndex === null) {\n return getInsertInFrontOfRNodeWithNoI18n(parentTNode, currentTNode, lView);\n } else {\n ngDevMode && assertIndexInRange(lView, insertBeforeIndex);\n return unwrapRNode(lView[insertBeforeIndex]);\n }\n}\n\n/**\n * Process `TNode.insertBeforeIndex` by adding i18n text nodes.\n *\n * See `TNode.insertBeforeIndex`\n */\nexport function processI18nInsertBefore(\n renderer: Renderer,\n childTNode: TNode,\n lView: LView,\n childRNode: RNode | RNode[],\n parentRElement: RElement | null,\n): void {\n const tNodeInsertBeforeIndex = childTNode.insertBeforeIndex;\n if (Array.isArray(tNodeInsertBeforeIndex)) {\n // An array indicates that there are i18n nodes that need to be added as children of this\n // `childRNode`. These i18n nodes were created before this `childRNode` was available and so\n // only now can be added. The first element of the array is the normal index where we should\n // insert the `childRNode`. Additional elements are the extra nodes to be added as children of\n // `childRNode`.\n ngDevMode && assertDomNode(childRNode);\n let i18nParent: RElement | null = childRNode as RElement;\n let anchorRNode: RNode | null = null;\n if (!(childTNode.type & TNodeType.AnyRNode)) {\n anchorRNode = i18nParent;\n i18nParent = parentRElement;\n }\n if (i18nParent !== null && childTNode.componentOffset === -1) {\n for (let i = 1; i < tNodeInsertBeforeIndex.length; i++) {\n // No need to `unwrapRNode` because all of the indexes point to i18n text nodes.\n // see `assertDomNode` below.\n const i18nChild = lView[tNodeInsertBeforeIndex[i]];\n nativeInsertBefore(renderer, i18nParent, i18nChild, anchorRNode, false);\n }\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {assertEqual, assertGreaterThanOrEqual, assertNotSame} from '../util/assert';\nimport {assertTNodeForTView} from './assert';\nimport {\n TAttributes,\n TContainerNode,\n TElementContainerNode,\n TElementNode,\n TIcuContainerNode,\n TLetDeclarationNode,\n TNode,\n TNodeFlags,\n TNodeType,\n TProjectionNode,\n} from './interfaces/node';\nimport {TStylingRange} from './interfaces/styling';\nimport {HEADER_OFFSET, TView} from './interfaces/view';\nimport {assertPureTNodeType} from './node_assert';\nimport {\n getCurrentParentTNode,\n getCurrentTNodePlaceholderOk,\n isCurrentTNodeParent,\n isInI18nBlock,\n isInSkipHydrationBlock,\n setCurrentTNode,\n} from './state';\n\n/**\n * Create and stores the TNode, and hooks it up to the tree.\n *\n * @param tView The current `TView`.\n * @param index The index at which the TNode should be saved (null if view, since they are not\n * saved).\n * @param type The type of TNode to create\n * @param native The native element for this node, if applicable\n * @param name The tag name of the associated native element, if applicable\n * @param attrs Any attrs for the native element, if applicable\n */\nexport function getOrCreateTNode(\n tView: TView,\n index: number,\n type: TNodeType.Element | TNodeType.Text,\n name: string | null,\n attrs: TAttributes | null,\n): TElementNode;\nexport function getOrCreateTNode(\n tView: TView,\n index: number,\n type: TNodeType.Container,\n name: string | null,\n attrs: TAttributes | null,\n): TContainerNode;\nexport function getOrCreateTNode(\n tView: TView,\n index: number,\n type: TNodeType.Projection,\n name: null,\n attrs: TAttributes | null,\n): TProjectionNode;\nexport function getOrCreateTNode(\n tView: TView,\n index: number,\n type: TNodeType.ElementContainer,\n name: string | null,\n attrs: TAttributes | null,\n): TElementContainerNode;\nexport function getOrCreateTNode(\n tView: TView,\n index: number,\n type: TNodeType.Icu,\n name: null,\n attrs: TAttributes | null,\n): TElementContainerNode;\nexport function getOrCreateTNode(\n tView: TView,\n index: number,\n type: TNodeType.LetDeclaration,\n name: null,\n attrs: null,\n): TLetDeclarationNode;\nexport function getOrCreateTNode(\n tView: TView,\n index: number,\n type: TNodeType,\n name: string | null,\n attrs: TAttributes | null,\n): TElementNode &\n TContainerNode &\n TElementContainerNode &\n TProjectionNode &\n TIcuContainerNode &\n TLetDeclarationNode {\n ngDevMode &&\n index !== 0 && // 0 are bogus nodes and they are OK. See `createContainerRef` in\n // `view_engine_compatibility` for additional context.\n assertGreaterThanOrEqual(index, HEADER_OFFSET, \"TNodes can't be in the LView header.\");\n // Keep this function short, so that the VM will inline it.\n ngDevMode && assertPureTNodeType(type);\n let tNode = tView.data[index] as TNode;\n if (tNode === null) {\n tNode = createTNodeAtIndex(tView, index, type, name, attrs);\n if (isInI18nBlock()) {\n // If we are in i18n block then all elements should be pre declared through `Placeholder`\n // See `TNodeType.Placeholder` and `LFrame.inI18n` for more context.\n // If the `TNode` was not pre-declared than it means it was not mentioned which means it was\n // removed, so we mark it as detached.\n tNode.flags |= TNodeFlags.isDetached;\n }\n } else if (tNode.type & TNodeType.Placeholder) {\n tNode.type = type;\n tNode.value = name;\n tNode.attrs = attrs;\n const parent = getCurrentParentTNode();\n tNode.injectorIndex = parent === null ? -1 : parent.injectorIndex;\n ngDevMode && assertTNodeForTView(tNode, tView);\n ngDevMode && assertEqual(index, tNode.index, 'Expecting same index');\n }\n setCurrentTNode(tNode, true);\n return tNode as TElementNode &\n TContainerNode &\n TElementContainerNode &\n TProjectionNode &\n TIcuContainerNode;\n}\n\nexport function createTNodeAtIndex(\n tView: TView,\n index: number,\n type: TNodeType,\n name: string | null,\n attrs: TAttributes | null,\n) {\n const currentTNode = getCurrentTNodePlaceholderOk();\n const isParent = isCurrentTNodeParent();\n const parent = isParent ? currentTNode : currentTNode && currentTNode.parent;\n\n // Parents cannot cross component boundaries because components will be used in multiple places.\n const tNode = (tView.data[index] = createTNode(\n tView,\n parent as TElementNode | TContainerNode,\n type,\n index,\n name,\n attrs,\n ));\n\n // Assign a pointer to the first child node of a given view. The first node is not always the one\n // at index 0, in case of i18n, index 0 can be the instruction `i18nStart` and the first node has\n // the index 1 or more, so we can't just check node index.\n linkTNodeInTView(tView, tNode, currentTNode, isParent);\n\n return tNode;\n}\n\nfunction linkTNodeInTView(\n tView: TView,\n tNode: TNode,\n currentTNode: TNode | null,\n isParent: boolean,\n) {\n if (tView.firstChild === null) {\n tView.firstChild = tNode;\n }\n if (currentTNode !== null) {\n if (isParent) {\n // FIXME(misko): This logic looks unnecessarily complicated. Could we simplify?\n if (currentTNode.child == null && tNode.parent !== null) {\n // We are in the same view, which means we are adding content node to the parent view.\n currentTNode.child = tNode;\n }\n } else {\n if (currentTNode.next === null) {\n // In the case of i18n the `currentTNode` may already be linked, in which case we don't want\n // to break the links which i18n created.\n currentTNode.next = tNode;\n tNode.prev = currentTNode;\n }\n }\n }\n}\n\n/**\n * Constructs a TNode object from the arguments.\n *\n * @param tView `TView` to which this `TNode` belongs\n * @param tParent Parent `TNode`\n * @param type The type of the node\n * @param index The index of the TNode in TView.data, adjusted for HEADER_OFFSET\n * @param tagName The tag name of the node\n * @param attrs The attributes defined on this node\n * @returns the TNode object\n */\nexport function createTNode(\n tView: TView,\n tParent: TElementNode | TContainerNode | null,\n type: TNodeType.Container,\n index: number,\n tagName: string | null,\n attrs: TAttributes | null,\n): TContainerNode;\nexport function createTNode(\n tView: TView,\n tParent: TElementNode | TContainerNode | null,\n type: TNodeType.Element | TNodeType.Text,\n index: number,\n tagName: string | null,\n attrs: TAttributes | null,\n): TElementNode;\nexport function createTNode(\n tView: TView,\n tParent: TElementNode | TContainerNode | null,\n type: TNodeType.ElementContainer,\n index: number,\n tagName: string | null,\n attrs: TAttributes | null,\n): TElementContainerNode;\nexport function createTNode(\n tView: TView,\n tParent: TElementNode | TContainerNode | null,\n type: TNodeType.Icu,\n index: number,\n tagName: string | null,\n attrs: TAttributes | null,\n): TIcuContainerNode;\nexport function createTNode(\n tView: TView,\n tParent: TElementNode | TContainerNode | null,\n type: TNodeType.Projection,\n index: number,\n tagName: string | null,\n attrs: TAttributes | null,\n): TProjectionNode;\nexport function createTNode(\n tView: TView,\n tParent: TElementNode | TContainerNode | null,\n type: TNodeType.LetDeclaration,\n index: number,\n tagName: null,\n attrs: null,\n): TLetDeclarationNode;\nexport function createTNode(\n tView: TView,\n tParent: TElementNode | TContainerNode | null,\n type: TNodeType,\n index: number,\n tagName: string | null,\n attrs: TAttributes | null,\n): TNode;\nexport function createTNode(\n tView: TView,\n tParent: TElementNode | TContainerNode | null,\n type: TNodeType,\n index: number,\n value: string | null,\n attrs: TAttributes | null,\n): TNode {\n ngDevMode &&\n index !== 0 && // 0 are bogus nodes and they are OK. See `createContainerRef` in\n // `view_engine_compatibility` for additional context.\n assertGreaterThanOrEqual(index, HEADER_OFFSET, \"TNodes can't be in the LView header.\");\n ngDevMode && assertNotSame(attrs, undefined, \"'undefined' is not valid value for 'attrs'\");\n ngDevMode && ngDevMode.tNode++;\n ngDevMode && tParent && assertTNodeForTView(tParent, tView);\n let injectorIndex = tParent ? tParent.injectorIndex : -1;\n let flags = 0;\n if (isInSkipHydrationBlock()) {\n flags |= TNodeFlags.inSkipHydrationBlock;\n }\n\n // TODO: would it be helpful to use a prototypal inheritance here, similar to the way we do so with signals?\n const tNode = {\n type,\n index,\n insertBeforeIndex: null,\n injectorIndex,\n directiveStart: -1,\n directiveEnd: -1,\n directiveStylingLast: -1,\n componentOffset: -1,\n propertyBindings: null,\n flags,\n providerIndexes: 0,\n value: value,\n attrs: attrs,\n mergedAttrs: null,\n localNames: null,\n initialInputs: null,\n inputs: null,\n hostDirectiveInputs: null,\n outputs: null,\n hostDirectiveOutputs: null,\n directiveToIndex: null,\n tView: null,\n next: null,\n prev: null,\n projectionNext: null,\n child: null,\n parent: tParent,\n projection: null,\n styles: null,\n stylesWithoutHost: null,\n residualStyles: undefined,\n classes: null,\n classesWithoutHost: null,\n residualClasses: undefined,\n classBindings: 0 as TStylingRange,\n styleBindings: 0 as TStylingRange,\n };\n\n if (ngDevMode) {\n // For performance reasons it is important that the tNode retains the same shape during runtime.\n // (To make sure that all of the code is monomorphic.) For this reason we seal the object to\n // prevent class transitions.\n Object.seal(tNode);\n }\n\n return tNode;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {assertEqual} from '../../util/assert';\nimport {TNode, TNodeType} from '../interfaces/node';\nimport {setI18nHandling} from '../node_manipulation';\nimport {getInsertInFrontOfRNodeWithI18n, processI18nInsertBefore} from '../node_manipulation_i18n';\n\n/**\n * Add `tNode` to `previousTNodes` list and update relevant `TNode`s in `previousTNodes` list\n * `tNode.insertBeforeIndex`.\n *\n * Things to keep in mind:\n * 1. All i18n text nodes are encoded as `TNodeType.Element` and are created eagerly by the\n * `ɵɵi18nStart` instruction.\n * 2. All `TNodeType.Placeholder` `TNodes` are elements which will be created later by\n * `ɵɵelementStart` instruction.\n * 3. `ɵɵelementStart` instruction will create `TNode`s in the ascending `TNode.index` order. (So a\n * smaller index `TNode` is guaranteed to be created before a larger one)\n *\n * We use the above three invariants to determine `TNode.insertBeforeIndex`.\n *\n * In an ideal world `TNode.insertBeforeIndex` would always be `TNode.next.index`. However,\n * this will not work because `TNode.next.index` may be larger than `TNode.index` which means that\n * the next node is not yet created and therefore we can't insert in front of it.\n *\n * Rule1: `TNode.insertBeforeIndex = null` if `TNode.next === null` (Initial condition, as we don't\n * know if there will be further `TNode`s inserted after.)\n * Rule2: If `previousTNode` is created after the `tNode` being inserted, then\n * `previousTNode.insertBeforeNode = tNode.index` (So when a new `tNode` is added we check\n * previous to see if we can update its `insertBeforeTNode`)\n *\n * See `TNode.insertBeforeIndex` for more context.\n *\n * @param previousTNodes A list of previous TNodes so that we can easily traverse `TNode`s in\n * reverse order. (If `TNode` would have `previous` this would not be necessary.)\n * @param newTNode A TNode to add to the `previousTNodes` list.\n */\nexport function addTNodeAndUpdateInsertBeforeIndex(previousTNodes: TNode[], newTNode: TNode) {\n // Start with Rule1\n ngDevMode &&\n assertEqual(newTNode.insertBeforeIndex, null, 'We expect that insertBeforeIndex is not set');\n\n previousTNodes.push(newTNode);\n if (previousTNodes.length > 1) {\n for (let i = previousTNodes.length - 2; i >= 0; i--) {\n const existingTNode = previousTNodes[i];\n // Text nodes are created eagerly and so they don't need their `indexBeforeIndex` updated.\n // It is safe to ignore them.\n if (!isI18nText(existingTNode)) {\n if (\n isNewTNodeCreatedBefore(existingTNode, newTNode) &&\n getInsertBeforeIndex(existingTNode) === null\n ) {\n // If it was created before us in time, (and it does not yet have `insertBeforeIndex`)\n // then add the `insertBeforeIndex`.\n setInsertBeforeIndex(existingTNode, newTNode.index);\n }\n }\n }\n }\n}\n\nfunction isI18nText(tNode: TNode): boolean {\n return !(tNode.type & TNodeType.Placeholder);\n}\n\nfunction isNewTNodeCreatedBefore(existingTNode: TNode, newTNode: TNode): boolean {\n return isI18nText(newTNode) || existingTNode.index > newTNode.index;\n}\n\nfunction getInsertBeforeIndex(tNode: TNode): number | null {\n const index = tNode.insertBeforeIndex;\n return Array.isArray(index) ? index[0] : index;\n}\n\nfunction setInsertBeforeIndex(tNode: TNode, value: number): void {\n const index = tNode.insertBeforeIndex;\n if (Array.isArray(index)) {\n // Array is stored if we have to insert child nodes. See `TNode.insertBeforeIndex`\n index[0] = value;\n } else {\n setI18nHandling(getInsertInFrontOfRNodeWithI18n, processI18nInsertBefore);\n tNode.insertBeforeIndex = value;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n assertEqual,\n assertGreaterThan,\n assertGreaterThanOrEqual,\n throwError,\n} from '../../util/assert';\nimport {assertTIcu, assertTNode} from '../assert';\nimport {IcuCreateOpCode, TIcu} from '../interfaces/i18n';\nimport {TIcuContainerNode, TNode, TNodeType} from '../interfaces/node';\nimport {LView, TView} from '../interfaces/view';\nimport {assertTNodeType} from '../node_assert';\nimport {setI18nHandling} from '../node_manipulation';\nimport {getInsertInFrontOfRNodeWithI18n, processI18nInsertBefore} from '../node_manipulation_i18n';\nimport {createTNodeAtIndex} from '../tnode_manipulation';\n\nimport {addTNodeAndUpdateInsertBeforeIndex} from './i18n_insert_before_index';\n\n/**\n * Retrieve `TIcu` at a given `index`.\n *\n * The `TIcu` can be stored either directly (if it is nested ICU) OR\n * it is stored inside tho `TIcuContainer` if it is top level ICU.\n *\n * The reason for this is that the top level ICU need a `TNode` so that they are part of the render\n * tree, but nested ICU's have no TNode, because we don't know ahead of time if the nested ICU is\n * expressed (parent ICU may have selected a case which does not contain it.)\n *\n * @param tView Current `TView`.\n * @param index Index where the value should be read from.\n */\nexport function getTIcu(tView: TView, index: number): TIcu | null {\n const value = tView.data[index] as null | TIcu | TIcuContainerNode | string;\n if (value === null || typeof value === 'string') return null;\n if (\n ngDevMode &&\n !(value.hasOwnProperty('tView') || value.hasOwnProperty('currentCaseLViewIndex'))\n ) {\n throwError(\"We expect to get 'null'|'TIcu'|'TIcuContainer', but got: \" + value);\n }\n // Here the `value.hasOwnProperty('currentCaseLViewIndex')` is a polymorphic read as it can be\n // either TIcu or TIcuContainerNode. This is not ideal, but we still think it is OK because it\n // will be just two cases which fits into the browser inline cache (inline cache can take up to\n // 4)\n const tIcu = value.hasOwnProperty('currentCaseLViewIndex')\n ? (value as TIcu)\n : (value as TIcuContainerNode).value;\n ngDevMode && assertTIcu(tIcu);\n return tIcu;\n}\n\n/**\n * Store `TIcu` at a give `index`.\n *\n * The `TIcu` can be stored either directly (if it is nested ICU) OR\n * it is stored inside tho `TIcuContainer` if it is top level ICU.\n *\n * The reason for this is that the top level ICU need a `TNode` so that they are part of the render\n * tree, but nested ICU's have no TNode, because we don't know ahead of time if the nested ICU is\n * expressed (parent ICU may have selected a case which does not contain it.)\n *\n * @param tView Current `TView`.\n * @param index Index where the value should be stored at in `Tview.data`\n * @param tIcu The TIcu to store.\n */\nexport function setTIcu(tView: TView, index: number, tIcu: TIcu): void {\n const tNode = tView.data[index] as null | TIcuContainerNode;\n ngDevMode &&\n assertEqual(\n tNode === null || tNode.hasOwnProperty('tView'),\n true,\n \"We expect to get 'null'|'TIcuContainer'\",\n );\n if (tNode === null) {\n tView.data[index] = tIcu;\n } else {\n ngDevMode && assertTNodeType(tNode, TNodeType.Icu);\n tNode.value = tIcu;\n }\n}\n\n/**\n * Set `TNode.insertBeforeIndex` taking the `Array` into account.\n *\n * See `TNode.insertBeforeIndex`\n */\nexport function setTNodeInsertBeforeIndex(tNode: TNode, index: number) {\n ngDevMode && assertTNode(tNode);\n let insertBeforeIndex = tNode.insertBeforeIndex;\n if (insertBeforeIndex === null) {\n setI18nHandling(getInsertInFrontOfRNodeWithI18n, processI18nInsertBefore);\n insertBeforeIndex = tNode.insertBeforeIndex = [\n null! /* may be updated to number later */,\n index,\n ];\n } else {\n assertEqual(Array.isArray(insertBeforeIndex), true, 'Expecting array here');\n (insertBeforeIndex as number[]).push(index);\n }\n}\n\n/**\n * Create `TNode.type=TNodeType.Placeholder` node.\n *\n * See `TNodeType.Placeholder` for more information.\n */\nexport function createTNodePlaceholder(\n tView: TView,\n previousTNodes: TNode[],\n index: number,\n): TNode {\n const tNode = createTNodeAtIndex(tView, index, TNodeType.Placeholder, null, null);\n addTNodeAndUpdateInsertBeforeIndex(previousTNodes, tNode);\n return tNode;\n}\n\n/**\n * Returns current ICU case.\n *\n * ICU cases are stored as index into the `TIcu.cases`.\n * At times it is necessary to communicate that the ICU case just switched and that next ICU update\n * should update all bindings regardless of the mask. In such a case the we store negative numbers\n * for cases which have just been switched. This function removes the negative flag.\n */\nexport function getCurrentICUCaseIndex(tIcu: TIcu, lView: LView) {\n const currentCase: number | null = lView[tIcu.currentCaseLViewIndex];\n return currentCase === null ? currentCase : currentCase < 0 ? ~currentCase : currentCase;\n}\n\nexport function getParentFromIcuCreateOpCode(mergedCode: number): number {\n return mergedCode >>> IcuCreateOpCode.SHIFT_PARENT;\n}\n\nexport function getRefFromIcuCreateOpCode(mergedCode: number): number {\n return (mergedCode & IcuCreateOpCode.MASK_REF) >>> IcuCreateOpCode.SHIFT_REF;\n}\n\nexport function getInstructionFromIcuCreateOpCode(mergedCode: number): number {\n return mergedCode & IcuCreateOpCode.MASK_INSTRUCTION;\n}\n\nexport function icuCreateOpCode(opCode: IcuCreateOpCode, parentIdx: number, refIdx: number) {\n ngDevMode && assertGreaterThanOrEqual(parentIdx, 0, 'Missing parent index');\n ngDevMode && assertGreaterThan(refIdx, 0, 'Missing ref index');\n return (\n opCode | (parentIdx << IcuCreateOpCode.SHIFT_PARENT) | (refIdx << IcuCreateOpCode.SHIFT_REF)\n );\n}\n\n// Returns whether the given value corresponds to a root template message,\n// or a sub-template.\nexport function isRootTemplateMessage(subTemplateIndex: number): subTemplateIndex is -1 {\n return subTemplateIndex === -1;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {assertDomNode, assertNumber, assertNumberInRange} from '../../util/assert';\nimport {EMPTY_ARRAY} from '../../util/empty';\nimport {assertTIcu, assertTNodeForLView} from '../assert';\nimport {getCurrentICUCaseIndex} from './i18n_util';\nimport {I18nRemoveOpCodes, TIcu} from '../interfaces/i18n';\nimport {TIcuContainerNode} from '../interfaces/node';\nimport {RNode} from '../interfaces/renderer_dom';\nimport {LView, TVIEW} from '../interfaces/view';\n\ninterface IcuIteratorState {\n stack: any[];\n index: number;\n lView?: LView;\n removes?: I18nRemoveOpCodes;\n}\n\ntype IcuIterator = () => RNode | null;\n\nfunction enterIcu(state: IcuIteratorState, tIcu: TIcu, lView: LView) {\n state.index = 0;\n const currentCase = getCurrentICUCaseIndex(tIcu, lView);\n if (currentCase !== null) {\n ngDevMode && assertNumberInRange(currentCase, 0, tIcu.cases.length - 1);\n state.removes = tIcu.remove[currentCase];\n } else {\n state.removes = EMPTY_ARRAY as any;\n }\n}\n\nfunction icuContainerIteratorNext(state: IcuIteratorState): RNode | null {\n if (state.index < state.removes!.length) {\n const removeOpCode = state.removes![state.index++] as number;\n ngDevMode && assertNumber(removeOpCode, 'Expecting OpCode number');\n if (removeOpCode > 0) {\n const rNode = state.lView![removeOpCode];\n ngDevMode && assertDomNode(rNode);\n return rNode;\n } else {\n state.stack.push(state.index, state.removes);\n // ICUs are represented by negative indices\n const tIcuIndex = ~removeOpCode;\n const tIcu = state.lView![TVIEW].data[tIcuIndex] as TIcu;\n ngDevMode && assertTIcu(tIcu);\n enterIcu(state, tIcu, state.lView!);\n return icuContainerIteratorNext(state);\n }\n } else {\n if (state.stack.length === 0) {\n return null;\n } else {\n state.removes = state.stack.pop();\n state.index = state.stack.pop();\n return icuContainerIteratorNext(state);\n }\n }\n}\n\nexport function loadIcuContainerVisitor() {\n const _state: IcuIteratorState = {\n stack: [],\n index: -1,\n };\n\n /**\n * Retrieves a set of root nodes from `TIcu.remove`. Used by `TNodeType.ICUContainer`\n * to determine which root belong to the ICU.\n *\n * Example of usage.\n * ```ts\n * const nextRNode = icuContainerIteratorStart(tIcuContainerNode, lView);\n * let rNode: RNode|null;\n * while(rNode = nextRNode()) {\n * console.log(rNode);\n * }\n * ```\n *\n * @param tIcuContainerNode Current `TIcuContainerNode`\n * @param lView `LView` where the `RNode`s should be looked up.\n */\n function icuContainerIteratorStart(\n tIcuContainerNode: TIcuContainerNode,\n lView: LView,\n ): IcuIterator {\n _state.lView = lView;\n while (_state.stack.length) _state.stack.pop();\n ngDevMode && assertTNodeForLView(tIcuContainerNode, lView);\n enterIcu(_state, tIcuContainerNode.value, lView);\n return icuContainerIteratorNext.bind(null, _state);\n }\n\n return icuContainerIteratorStart;\n}\n\nexport function createIcuIterator(tIcu: TIcu, lView: LView): IcuIterator {\n const state: IcuIteratorState = {\n stack: [],\n index: -1,\n lView,\n };\n ngDevMode && assertTIcu(tIcu);\n enterIcu(state, tIcu, lView);\n return icuContainerIteratorNext.bind(null, state);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {NodeNavigationStep, REFERENCE_NODE_BODY, REFERENCE_NODE_HOST} from './interfaces';\n\n/**\n * Regexp that extracts a reference node information from the compressed node location.\n * The reference node is represented as either:\n * - a number which points to an LView slot\n * - the `b` char which indicates that the lookup should start from the `document.body`\n * - the `h` char to start lookup from the component host node (`lView[HOST]`)\n */\nconst REF_EXTRACTOR_REGEXP = /* @__PURE__ */ new RegExp(\n `^(\\\\d+)*(${REFERENCE_NODE_BODY}|${REFERENCE_NODE_HOST})*(.*)`,\n);\n\n/**\n * Helper function that takes a reference node location and a set of navigation steps\n * (from the reference node) to a target node and outputs a string that represents\n * a location.\n *\n * For example, given: referenceNode = 'b' (body) and path = ['firstChild', 'firstChild',\n * 'nextSibling'], the function returns: `bf2n`.\n */\nexport function compressNodeLocation(referenceNode: string, path: NodeNavigationStep[]): string {\n const result: Array<string | number> = [referenceNode];\n for (const segment of path) {\n const lastIdx = result.length - 1;\n if (lastIdx > 0 && result[lastIdx - 1] === segment) {\n // An empty string in a count slot represents 1 occurrence of an instruction.\n const value = (result[lastIdx] || 1) as number;\n result[lastIdx] = value + 1;\n } else {\n // Adding a new segment to the path.\n // Using an empty string in a counter field to avoid encoding `1`s\n // into the path, since they are implicit (e.g. `f1n1` vs `fn`), so\n // it's enough to have a single char in this case.\n result.push(segment, '');\n }\n }\n return result.join('');\n}\n\n/**\n * Helper function that reverts the `compressNodeLocation` and transforms a given\n * string into an array where at 0th position there is a reference node info and\n * after that it contains information (in pairs) about a navigation step and the\n * number of repetitions.\n *\n * For example, the path like 'bf2n' will be transformed to:\n * ['b', 'firstChild', 2, 'nextSibling', 1].\n *\n * This information is later consumed by the code that navigates the DOM to find\n * a given node by its location.\n */\nexport function decompressNodeLocation(\n path: string,\n): [string | number, ...(number | NodeNavigationStep)[]] {\n const matches = path.match(REF_EXTRACTOR_REGEXP)!;\n const [_, refNodeId, refNodeName, rest] = matches;\n // If a reference node is represented by an index, transform it to a number.\n const ref = refNodeId ? parseInt(refNodeId, 10) : refNodeName;\n const steps: (number | NodeNavigationStep)[] = [];\n // Match all segments in a path.\n for (const [_, step, count] of rest.matchAll(/(f|n)(\\d*)/g)) {\n const repeat = parseInt(count, 10) || 1;\n steps.push(step as NodeNavigationStep, repeat);\n }\n return [ref, ...steps];\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {TNode, TNodeType} from '../render3/interfaces/node';\nimport {RElement, RNode} from '../render3/interfaces/renderer_dom';\nimport {\n DECLARATION_COMPONENT_VIEW,\n HEADER_OFFSET,\n HOST,\n LView,\n TView,\n} from '../render3/interfaces/view';\nimport {getFirstNativeNode} from '../render3/node_manipulation';\nimport {ɵɵresolveBody} from '../render3/util/misc_utils';\nimport {renderStringify} from '../render3/util/stringify_utils';\nimport {getNativeByTNode, unwrapRNode} from '../render3/util/view_utils';\nimport {assertDefined, assertEqual} from '../util/assert';\n\nimport {compressNodeLocation, decompressNodeLocation} from './compression';\nimport {\n nodeNotFoundAtPathError,\n nodeNotFoundError,\n validateSiblingNodeExists,\n} from './error_handling';\nimport {\n DehydratedView,\n NODE_NAVIGATION_STEP_FIRST_CHILD,\n NODE_NAVIGATION_STEP_NEXT_SIBLING,\n NodeNavigationStep,\n NODES,\n REFERENCE_NODE_BODY,\n REFERENCE_NODE_HOST,\n} from './interfaces';\nimport {calcSerializedContainerSize, getSegmentHead} from './utils';\n\n/** Whether current TNode is a first node in an <ng-container>. */\nfunction isFirstElementInNgContainer(tNode: TNode): boolean {\n return !tNode.prev && tNode.parent?.type === TNodeType.ElementContainer;\n}\n\n/** Returns an instruction index (subtracting HEADER_OFFSET). */\nfunction getNoOffsetIndex(tNode: TNode): number {\n return tNode.index - HEADER_OFFSET;\n}\n\n/**\n * Check whether a given node exists, but is disconnected from the DOM.\n */\nexport function isDisconnectedNode(tNode: TNode, lView: LView) {\n return (\n !(tNode.type & (TNodeType.Projection | TNodeType.LetDeclaration)) &&\n !!lView[tNode.index] &&\n isDisconnectedRNode(unwrapRNode(lView[tNode.index]))\n );\n}\n\n/**\n * Check whether the given node exists, but is disconnected from the DOM.\n *\n * Note: we leverage the fact that we have this information available in the DOM emulation\n * layer (in Domino) for now. Longer-term solution should not rely on the DOM emulation and\n * only use internal data structures and state to compute this information.\n */\nexport function isDisconnectedRNode(rNode: RNode | null) {\n return !!rNode && !(rNode as Node).isConnected;\n}\n\n/**\n * Locate a node in an i18n tree that corresponds to a given instruction index.\n *\n * @param hydrationInfo The hydration annotation data\n * @param noOffsetIndex the instruction index\n * @returns an RNode that corresponds to the instruction index\n */\nexport function locateI18nRNodeByIndex<T extends RNode>(\n hydrationInfo: DehydratedView,\n noOffsetIndex: number,\n): T | null | undefined {\n const i18nNodes = hydrationInfo.i18nNodes;\n if (i18nNodes) {\n return i18nNodes.get(noOffsetIndex) as T | null | undefined;\n }\n return undefined;\n}\n\n/**\n * Attempt to locate an RNode by a path, if it exists.\n *\n * @param hydrationInfo The hydration annotation data\n * @param lView the current lView\n * @param noOffsetIndex the instruction index\n * @returns an RNode that corresponds to the instruction index or null if no path exists\n */\nexport function tryLocateRNodeByPath(\n hydrationInfo: DehydratedView,\n lView: LView<unknown>,\n noOffsetIndex: number,\n): RNode | null {\n const nodes = hydrationInfo.data[NODES];\n const path = nodes?.[noOffsetIndex];\n return path ? locateRNodeByPath(path, lView) : null;\n}\n\n/**\n * Locate a node in DOM tree that corresponds to a given TNode.\n *\n * @param hydrationInfo The hydration annotation data\n * @param tView the current tView\n * @param lView the current lView\n * @param tNode the current tNode\n * @returns an RNode that represents a given tNode\n */\nexport function locateNextRNode<T extends RNode>(\n hydrationInfo: DehydratedView,\n tView: TView,\n lView: LView<unknown>,\n tNode: TNode,\n): T | null {\n const noOffsetIndex = getNoOffsetIndex(tNode);\n let native = locateI18nRNodeByIndex(hydrationInfo, noOffsetIndex);\n\n if (native === undefined) {\n const nodes = hydrationInfo.data[NODES];\n if (nodes?.[noOffsetIndex]) {\n // We know the exact location of the node.\n native = locateRNodeByPath(nodes[noOffsetIndex], lView);\n } else if (tView.firstChild === tNode) {\n // We create a first node in this view, so we use a reference\n // to the first child in this DOM segment.\n native = hydrationInfo.firstChild;\n } else {\n // Locate a node based on a previous sibling or a parent node.\n const previousTNodeParent = tNode.prev === null;\n const previousTNode = (tNode.prev ?? tNode.parent)!;\n ngDevMode &&\n assertDefined(\n previousTNode,\n 'Unexpected state: current TNode does not have a connection ' +\n 'to the previous node or a parent node.',\n );\n if (isFirstElementInNgContainer(tNode)) {\n const noOffsetParentIndex = getNoOffsetIndex(tNode.parent!);\n native = getSegmentHead(hydrationInfo, noOffsetParentIndex);\n } else {\n let previousRElement = getNativeByTNode(previousTNode, lView);\n if (previousTNodeParent) {\n native = (previousRElement as RElement).firstChild;\n } else {\n // If the previous node is an element, but it also has container info,\n // this means that we are processing a node like `<div #vcrTarget>`, which is\n // represented in the DOM as `<div></div>...<!--container-->`.\n // In this case, there are nodes *after* this element and we need to skip\n // all of them to reach an element that we are looking for.\n const noOffsetPrevSiblingIndex = getNoOffsetIndex(previousTNode);\n const segmentHead = getSegmentHead(hydrationInfo, noOffsetPrevSiblingIndex);\n if (previousTNode.type === TNodeType.Element && segmentHead) {\n const numRootNodesToSkip = calcSerializedContainerSize(\n hydrationInfo,\n noOffsetPrevSiblingIndex,\n );\n // `+1` stands for an anchor comment node after all the views in this container.\n const nodesToSkip = numRootNodesToSkip + 1;\n // First node after this segment.\n native = siblingAfter(nodesToSkip, segmentHead);\n } else {\n native = previousRElement.nextSibling;\n }\n }\n }\n }\n }\n return native as T;\n}\n\n/**\n * Skips over a specified number of nodes and returns the next sibling node after that.\n */\nexport function siblingAfter<T extends RNode>(skip: number, from: RNode): T | null {\n let currentNode = from;\n for (let i = 0; i < skip; i++) {\n ngDevMode && validateSiblingNodeExists(currentNode);\n currentNode = currentNode.nextSibling!;\n }\n return currentNode as T;\n}\n\n/**\n * Helper function to produce a string representation of the navigation steps\n * (in terms of `nextSibling` and `firstChild` navigations). Used in error\n * messages in dev mode.\n */\nfunction stringifyNavigationInstructions(instructions: (number | NodeNavigationStep)[]): string {\n const container = [];\n for (let i = 0; i < instructions.length; i += 2) {\n const step = instructions[i];\n const repeat = instructions[i + 1] as number;\n for (let r = 0; r < repeat; r++) {\n container.push(step === NODE_NAVIGATION_STEP_FIRST_CHILD ? 'firstChild' : 'nextSibling');\n }\n }\n return container.join('.');\n}\n\n/**\n * Helper function that navigates from a starting point node (the `from` node)\n * using provided set of navigation instructions (within `path` argument).\n */\nfunction navigateToNode(from: Node, instructions: (number | NodeNavigationStep)[]): RNode {\n let node = from;\n for (let i = 0; i < instructions.length; i += 2) {\n const step = instructions[i];\n const repeat = instructions[i + 1] as number;\n for (let r = 0; r < repeat; r++) {\n if (ngDevMode && !node) {\n throw nodeNotFoundAtPathError(from, stringifyNavigationInstructions(instructions));\n }\n switch (step) {\n case NODE_NAVIGATION_STEP_FIRST_CHILD:\n node = node.firstChild!;\n break;\n case NODE_NAVIGATION_STEP_NEXT_SIBLING:\n node = node.nextSibling!;\n break;\n }\n }\n }\n if (ngDevMode && !node) {\n throw nodeNotFoundAtPathError(from, stringifyNavigationInstructions(instructions));\n }\n return node as RNode;\n}\n\n/**\n * Locates an RNode given a set of navigation instructions (which also contains\n * a starting point node info).\n */\nfunction locateRNodeByPath(path: string, lView: LView): RNode {\n const [referenceNode, ...navigationInstructions] = decompressNodeLocation(path);\n let ref: Element;\n if (referenceNode === REFERENCE_NODE_HOST) {\n ref = lView[DECLARATION_COMPONENT_VIEW][HOST] as unknown as Element;\n } else if (referenceNode === REFERENCE_NODE_BODY) {\n ref = ɵɵresolveBody(\n lView[DECLARATION_COMPONENT_VIEW][HOST] as RElement & {ownerDocument: Document},\n );\n } else {\n const parentElementId = Number(referenceNode);\n ref = unwrapRNode((lView as any)[parentElementId + HEADER_OFFSET]) as Element;\n }\n return navigateToNode(ref, navigationInstructions);\n}\n\n/**\n * Generate a list of DOM navigation operations to get from node `start` to node `finish`.\n *\n * Note: assumes that node `start` occurs before node `finish` in an in-order traversal of the DOM\n * tree. That is, we should be able to get from `start` to `finish` purely by using `.firstChild`\n * and `.nextSibling` operations.\n */\nexport function navigateBetween(start: Node, finish: Node): NodeNavigationStep[] | null {\n if (start === finish) {\n return [];\n } else if (start.parentElement == null || finish.parentElement == null) {\n return null;\n } else if (start.parentElement === finish.parentElement) {\n return navigateBetweenSiblings(start, finish);\n } else {\n // `finish` is a child of its parent, so the parent will always have a child.\n const parent = finish.parentElement!;\n\n const parentPath = navigateBetween(start, parent);\n const childPath = navigateBetween(parent.firstChild!, finish);\n if (!parentPath || !childPath) return null;\n\n return [\n // First navigate to `finish`'s parent\n ...parentPath,\n // Then to its first child.\n NODE_NAVIGATION_STEP_FIRST_CHILD,\n // And finally from that node to `finish` (maybe a no-op if we're already there).\n ...childPath,\n ];\n }\n}\n\n/**\n * Calculates a path between 2 sibling nodes (generates a number of `NextSibling` navigations).\n * Returns `null` if no such path exists between the given nodes.\n */\nfunction navigateBetweenSiblings(start: Node, finish: Node): NodeNavigationStep[] | null {\n const nav: NodeNavigationStep[] = [];\n let node: Node | null = null;\n for (node = start; node != null && node !== finish; node = node.nextSibling) {\n nav.push(NODE_NAVIGATION_STEP_NEXT_SIBLING);\n }\n // If the `node` becomes `null` or `undefined` at the end, that means that we\n // didn't find the `end` node, thus return `null` (which would trigger serialization\n // error to be produced).\n return node == null ? null : nav;\n}\n\n/**\n * Calculates a path between 2 nodes in terms of `nextSibling` and `firstChild`\n * navigations:\n * - the `from` node is a known node, used as an starting point for the lookup\n * (the `fromNodeName` argument is a string representation of the node).\n * - the `to` node is a node that the runtime logic would be looking up,\n * using the path generated by this function.\n */\nexport function calcPathBetween(from: Node, to: Node, fromNodeName: string): string | null {\n const path = navigateBetween(from, to);\n return path === null ? null : compressNodeLocation(fromNodeName, path);\n}\n\n/**\n * Invoked at serialization time (on the server) when a set of navigation\n * instructions needs to be generated for a TNode.\n */\nexport function calcPathForNode(\n tNode: TNode,\n lView: LView,\n excludedParentNodes: Set<number> | null,\n): string {\n let parentTNode = tNode.parent;\n let parentIndex: number | string;\n let parentRNode: RNode;\n let referenceNodeName: string;\n\n // Skip over all parent nodes that are disconnected from the DOM, such nodes\n // can not be used as anchors.\n //\n // This might happen in certain content projection-based use-cases, where\n // a content of an element is projected and used, when a parent element\n // itself remains detached from DOM. In this scenario we try to find a parent\n // element that is attached to DOM and can act as an anchor instead.\n //\n // It can also happen that the parent node should be excluded, for example,\n // because it belongs to an i18n block, which requires paths which aren't\n // relative to other views in an i18n block.\n while (\n parentTNode !== null &&\n (isDisconnectedNode(parentTNode, lView) || excludedParentNodes?.has(parentTNode.index))\n ) {\n parentTNode = parentTNode.parent;\n }\n\n if (parentTNode === null || !(parentTNode.type & TNodeType.AnyRNode)) {\n // If there is no parent TNode or a parent TNode does not represent an RNode\n // (i.e. not a DOM node), use component host element as a reference node.\n parentIndex = referenceNodeName = REFERENCE_NODE_HOST;\n parentRNode = lView[DECLARATION_COMPONENT_VIEW][HOST]!;\n } else {\n // Use parent TNode as a reference node.\n parentIndex = parentTNode.index;\n parentRNode = unwrapRNode(lView[parentIndex]);\n referenceNodeName = renderStringify(parentIndex - HEADER_OFFSET);\n }\n let rNode = unwrapRNode(lView[tNode.index]);\n if (tNode.type & (TNodeType.AnyContainer | TNodeType.Icu)) {\n // For <ng-container> nodes, instead of serializing a reference\n // to the anchor comment node, serialize a location of the first\n // DOM element. Paired with the container size (serialized as a part\n // of `ngh.containers`), it should give enough information for runtime\n // to hydrate nodes in this container.\n const firstRNode = getFirstNativeNode(lView, tNode);\n\n // If container is not empty, use a reference to the first element,\n // otherwise, rNode would point to an anchor comment node.\n if (firstRNode) {\n rNode = firstRNode;\n }\n }\n let path: string | null = calcPathBetween(parentRNode as Node, rNode as Node, referenceNodeName);\n if (path === null && parentRNode !== rNode) {\n // Searching for a path between elements within a host node failed.\n // Trying to find a path to an element starting from the `document.body` instead.\n //\n // Important note: this type of reference is relatively unstable, since Angular\n // may not be able to control parts of the page that the runtime logic navigates\n // through. This is mostly needed to cover \"portals\" use-case (like menus, dialog boxes,\n // etc), where nodes are content-projected (including direct DOM manipulations) outside\n // of the host node. The better solution is to provide APIs to work with \"portals\",\n // at which point this code path would not be needed.\n const body = (parentRNode as Node).ownerDocument!.body as Node;\n path = calcPathBetween(body, rNode as Node, REFERENCE_NODE_BODY);\n\n if (path === null) {\n // If the path is still empty, it's likely that this node is detached and\n // won't be found during hydration.\n throw nodeNotFoundError(lView, tNode);\n }\n }\n return path!;\n}\n\n/**\n * Retrieves all comments nodes that contain ngh comments referring to a defer block\n */\nexport function gatherDeferBlocksCommentNodes(\n doc: Document,\n node: HTMLElement,\n): Map<string, Comment> {\n const commentNodesIterator = doc.createNodeIterator(node, NodeFilter.SHOW_COMMENT, {acceptNode});\n let currentNode: Comment;\n\n const nodesByBlockId = new Map<string, Comment>();\n while ((currentNode = commentNodesIterator.nextNode() as Comment)) {\n const nghPattern = 'ngh=';\n const content = currentNode?.textContent;\n const nghIdx = content?.indexOf(nghPattern) ?? -1;\n if (nghIdx > -1) {\n const nghValue = content!.substring(nghIdx + nghPattern.length).trim();\n // Make sure the value has an expected format.\n ngDevMode &&\n assertEqual(\n nghValue.startsWith('d'),\n true,\n 'Invalid defer block id found in a comment node.',\n );\n nodesByBlockId.set(nghValue, currentNode);\n }\n }\n return nodesByBlockId;\n}\n\nfunction acceptNode(node: HTMLElement) {\n return node.textContent?.trimStart().startsWith('ngh=')\n ? NodeFilter.FILTER_ACCEPT\n : NodeFilter.FILTER_REJECT;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {inject, Injector} from '../di';\nimport {isRootTemplateMessage} from '../render3/i18n/i18n_util';\nimport {createIcuIterator} from '../render3/i18n/i18n_icu_container_visitor';\nimport {I18nNode, I18nNodeKind, I18nPlaceholderType, TI18n, TIcu} from '../render3/interfaces/i18n';\nimport {isTNodeShape, TNode, TNodeType} from '../render3/interfaces/node';\nimport type {Renderer} from '../render3/interfaces/renderer';\nimport type {RNode} from '../render3/interfaces/renderer_dom';\nimport {HEADER_OFFSET, HYDRATION, LView, RENDERER, TView, TVIEW} from '../render3/interfaces/view';\nimport {getFirstNativeNode} from '../render3/node_manipulation';\nimport {nativeRemoveNode} from '../render3/dom_node_manipulation';\nimport {unwrapRNode} from '../render3/util/view_utils';\nimport {assertDefined, assertNotEqual} from '../util/assert';\n\nimport type {HydrationContext} from './annotate';\nimport {DehydratedIcuData, DehydratedView, I18N_DATA} from './interfaces';\nimport {isDisconnectedRNode, locateNextRNode, tryLocateRNodeByPath} from './node_lookup_utils';\nimport {isI18nInSkipHydrationBlock} from './skip_hydration';\nimport {IS_I18N_HYDRATION_ENABLED} from './tokens';\nimport {\n getNgContainerSize,\n initDisconnectedNodes,\n isDisconnectedNode,\n isSerializedElementContainer,\n processTextNodeBeforeSerialization,\n} from './utils';\n\nlet _isI18nHydrationSupportEnabled = false;\n\nlet _prepareI18nBlockForHydrationImpl: typeof prepareI18nBlockForHydrationImpl = () => {\n // noop unless `enablePrepareI18nBlockForHydrationImpl` is invoked.\n};\n\nexport function setIsI18nHydrationSupportEnabled(enabled: boolean) {\n _isI18nHydrationSupportEnabled = enabled;\n}\n\nexport function isI18nHydrationSupportEnabled() {\n return _isI18nHydrationSupportEnabled;\n}\n\n/**\n * Prepares an i18n block and its children, located at the given\n * view and instruction index, for hydration.\n *\n * @param lView lView with the i18n block\n * @param index index of the i18n block in the lView\n * @param parentTNode TNode of the parent of the i18n block\n * @param subTemplateIndex sub-template index, or -1 for the main template\n */\nexport function prepareI18nBlockForHydration(\n lView: LView,\n index: number,\n parentTNode: TNode | null,\n subTemplateIndex: number,\n): void {\n _prepareI18nBlockForHydrationImpl(lView, index, parentTNode, subTemplateIndex);\n}\n\nexport function enablePrepareI18nBlockForHydrationImpl() {\n _prepareI18nBlockForHydrationImpl = prepareI18nBlockForHydrationImpl;\n}\n\nexport function isI18nHydrationEnabled(injector?: Injector) {\n injector = injector ?? inject(Injector);\n return injector.get(IS_I18N_HYDRATION_ENABLED, false);\n}\n\n/**\n * Collects, if not already cached, all of the indices in the\n * given TView which are children of an i18n block.\n *\n * Since i18n blocks don't introduce a parent TNode, this is necessary\n * in order to determine which indices in a LView are translated.\n */\nexport function getOrComputeI18nChildren(\n tView: TView,\n context: HydrationContext,\n): Set<number> | null {\n let i18nChildren = context.i18nChildren.get(tView);\n if (i18nChildren === undefined) {\n i18nChildren = collectI18nChildren(tView);\n context.i18nChildren.set(tView, i18nChildren);\n }\n return i18nChildren;\n}\n\nfunction collectI18nChildren(tView: TView): Set<number> | null {\n const children = new Set<number>();\n\n function collectI18nViews(node: I18nNode) {\n children.add(node.index);\n\n switch (node.kind) {\n case I18nNodeKind.ELEMENT:\n case I18nNodeKind.PLACEHOLDER: {\n for (const childNode of node.children) {\n collectI18nViews(childNode);\n }\n break;\n }\n\n case I18nNodeKind.ICU: {\n for (const caseNodes of node.cases) {\n for (const caseNode of caseNodes) {\n collectI18nViews(caseNode);\n }\n }\n break;\n }\n }\n }\n\n // Traverse through the AST of each i18n block in the LView,\n // and collect every instruction index.\n for (let i = HEADER_OFFSET; i < tView.bindingStartIndex; i++) {\n const tI18n = tView.data[i] as TI18n | undefined;\n if (!tI18n || !tI18n.ast) {\n continue;\n }\n\n for (const node of tI18n.ast) {\n collectI18nViews(node);\n }\n }\n\n return children.size === 0 ? null : children;\n}\n\n/**\n * Resulting data from serializing an i18n block.\n */\nexport interface SerializedI18nBlock {\n /**\n * A queue of active ICU cases from a depth-first traversal\n * of the i18n AST. This is serialized to the client in order\n * to correctly associate DOM nodes with i18n nodes during\n * hydration.\n */\n caseQueue: Array<number>;\n\n /**\n * A set of indices in the lView of the block for nodes\n * that are disconnected from the DOM. In i18n, this can\n * happen when using content projection but some nodes are\n * not selected by an <ng-content />.\n */\n disconnectedNodes: Set<number>;\n\n /**\n * A set of indices in the lView of the block for nodes\n * considered \"disjoint\", indicating that we need to serialize\n * a path to the node in order to hydrate it.\n *\n * A node is considered disjoint when its RNode does not\n * directly follow the RNode of the previous i18n node, for\n * example, because of content projection.\n */\n disjointNodes: Set<number>;\n}\n\n/**\n * Attempts to serialize i18n data for an i18n block, located at\n * the given view and instruction index.\n *\n * @param lView lView with the i18n block\n * @param index index of the i18n block in the lView\n * @param context the hydration context\n * @returns the i18n data, or null if there is no relevant data\n */\nexport function trySerializeI18nBlock(\n lView: LView,\n index: number,\n context: HydrationContext,\n): SerializedI18nBlock | null {\n if (!context.isI18nHydrationEnabled) {\n return null;\n }\n\n const tView = lView[TVIEW];\n const tI18n = tView.data[index] as TI18n | undefined;\n if (!tI18n || !tI18n.ast) {\n return null;\n }\n\n const parentTNode = tView.data[tI18n.parentTNodeIndex] as TNode;\n if (parentTNode && isI18nInSkipHydrationBlock(parentTNode)) {\n return null;\n }\n\n const serializedI18nBlock: SerializedI18nBlock = {\n caseQueue: [],\n disconnectedNodes: new Set(),\n disjointNodes: new Set(),\n };\n serializeI18nBlock(lView, serializedI18nBlock, context, tI18n.ast);\n\n return serializedI18nBlock.caseQueue.length === 0 &&\n serializedI18nBlock.disconnectedNodes.size === 0 &&\n serializedI18nBlock.disjointNodes.size === 0\n ? null\n : serializedI18nBlock;\n}\n\nfunction serializeI18nBlock(\n lView: LView,\n serializedI18nBlock: SerializedI18nBlock,\n context: HydrationContext,\n nodes: I18nNode[],\n): Node | null {\n let prevRNode = null;\n for (const node of nodes) {\n const nextRNode = serializeI18nNode(lView, serializedI18nBlock, context, node);\n if (nextRNode) {\n if (isDisjointNode(prevRNode, nextRNode)) {\n serializedI18nBlock.disjointNodes.add(node.index - HEADER_OFFSET);\n }\n prevRNode = nextRNode;\n }\n }\n return prevRNode;\n}\n\n/**\n * Helper to determine whether the given nodes are \"disjoint\".\n *\n * The i18n hydration process walks through the DOM and i18n nodes\n * at the same time. It expects the sibling DOM node of the previous\n * i18n node to be the first node of the next i18n node.\n *\n * In cases of content projection, this won't always be the case. So\n * when we detect that, we mark the node as \"disjoint\", ensuring that\n * we will serialize the path to the node. This way, when we hydrate the\n * i18n node, we will be able to find the correct place to start.\n */\nfunction isDisjointNode(prevNode: Node | null, nextNode: Node) {\n return prevNode && prevNode.nextSibling !== nextNode;\n}\n\n/**\n * Process the given i18n node for serialization.\n * Returns the first RNode for the i18n node to begin hydration.\n */\nfunction serializeI18nNode(\n lView: LView,\n serializedI18nBlock: SerializedI18nBlock,\n context: HydrationContext,\n node: I18nNode,\n): Node | null {\n const maybeRNode = unwrapRNode(lView[node.index]!);\n if (!maybeRNode || isDisconnectedRNode(maybeRNode)) {\n serializedI18nBlock.disconnectedNodes.add(node.index - HEADER_OFFSET);\n return null;\n }\n\n const rNode = maybeRNode as Node;\n switch (node.kind) {\n case I18nNodeKind.TEXT: {\n processTextNodeBeforeSerialization(context, rNode);\n break;\n }\n\n case I18nNodeKind.ELEMENT:\n case I18nNodeKind.PLACEHOLDER: {\n serializeI18nBlock(lView, serializedI18nBlock, context, node.children);\n break;\n }\n\n case I18nNodeKind.ICU: {\n const currentCase = lView[node.currentCaseLViewIndex] as number | null;\n if (currentCase != null) {\n // i18n uses a negative value to signal a change to a new case, so we\n // need to invert it to get the proper value.\n const caseIdx = currentCase < 0 ? ~currentCase : currentCase;\n serializedI18nBlock.caseQueue.push(caseIdx);\n serializeI18nBlock(lView, serializedI18nBlock, context, node.cases[caseIdx]);\n }\n break;\n }\n }\n\n return getFirstNativeNodeForI18nNode(lView, node) as Node | null;\n}\n\n/**\n * Helper function to get the first native node to begin hydrating\n * the given i18n node.\n */\nfunction getFirstNativeNodeForI18nNode(lView: LView, node: I18nNode) {\n const tView = lView[TVIEW];\n const maybeTNode = tView.data[node.index];\n\n if (isTNodeShape(maybeTNode)) {\n // If the node is backed by an actual TNode, we can simply delegate.\n return getFirstNativeNode(lView, maybeTNode);\n } else if (node.kind === I18nNodeKind.ICU) {\n // A nested ICU container won't have an actual TNode. In that case, we can use\n // an iterator to find the first child.\n const icuIterator = createIcuIterator(maybeTNode as TIcu, lView);\n let rNode: RNode | null = icuIterator();\n\n // If the ICU container has no nodes, then we use the ICU anchor as the node.\n return rNode ?? unwrapRNode(lView[node.index]);\n } else {\n // Otherwise, the node is a text or trivial element in an ICU container,\n // and we can just use the RNode directly.\n return unwrapRNode(lView[node.index]) ?? null;\n }\n}\n\n/**\n * Describes shared data available during the hydration process.\n */\ninterface I18nHydrationContext {\n hydrationInfo: DehydratedView;\n lView: LView;\n i18nNodes: Map<number, RNode | null>;\n disconnectedNodes: Set<number>;\n caseQueue: number[];\n dehydratedIcuData: Map<number, DehydratedIcuData>;\n}\n\n/**\n * Describes current hydration state.\n */\ninterface I18nHydrationState {\n // The current node\n currentNode: Node | null;\n\n /**\n * Whether the tree should be connected.\n *\n * During hydration, it can happen that we expect to have a\n * current RNode, but we don't. In such cases, we still need\n * to propagate the expectation to the corresponding LViews,\n * so that the proper downstream error handling can provide\n * the correct context for the error.\n */\n isConnected: boolean;\n}\n\nfunction setCurrentNode(state: I18nHydrationState, node: Node | null) {\n state.currentNode = node;\n}\n\n/**\n * Marks the current RNode as the hydration root for the given\n * AST node.\n */\nfunction appendI18nNodeToCollection(\n context: I18nHydrationContext,\n state: I18nHydrationState,\n astNode: I18nNode,\n) {\n const noOffsetIndex = astNode.index - HEADER_OFFSET;\n const {disconnectedNodes} = context;\n const currentNode = state.currentNode;\n\n if (state.isConnected) {\n context.i18nNodes.set(noOffsetIndex, currentNode);\n\n // We expect the node to be connected, so ensure that it\n // is not in the set, regardless of whether we found it,\n // so that the downstream error handling can provide the\n // proper context.\n disconnectedNodes.delete(noOffsetIndex);\n } else {\n disconnectedNodes.add(noOffsetIndex);\n }\n\n return currentNode;\n}\n\n/**\n * Skip over some sibling nodes during hydration.\n *\n * Note: we use this instead of `siblingAfter` as it's expected that\n * sometimes we might encounter null nodes. In those cases, we want to\n * defer to downstream error handling to provide proper context.\n */\nfunction skipSiblingNodes(state: I18nHydrationState, skip: number) {\n let currentNode = state.currentNode;\n for (let i = 0; i < skip; i++) {\n if (!currentNode) {\n break;\n }\n currentNode = currentNode?.nextSibling ?? null;\n }\n return currentNode;\n}\n\n/**\n * Fork the given state into a new state for hydrating children.\n */\nfunction forkHydrationState(state: I18nHydrationState, nextNode: Node | null) {\n return {currentNode: nextNode, isConnected: state.isConnected};\n}\n\nfunction prepareI18nBlockForHydrationImpl(\n lView: LView,\n index: number,\n parentTNode: TNode | null,\n subTemplateIndex: number,\n) {\n const hydrationInfo = lView[HYDRATION];\n if (!hydrationInfo) {\n return;\n }\n\n if (\n !isI18nHydrationSupportEnabled() ||\n (parentTNode &&\n (isI18nInSkipHydrationBlock(parentTNode) ||\n isDisconnectedNode(hydrationInfo, parentTNode.index - HEADER_OFFSET)))\n ) {\n return;\n }\n\n const tView = lView[TVIEW];\n const tI18n = tView.data[index] as TI18n;\n ngDevMode &&\n assertDefined(tI18n, 'Expected i18n data to be present in a given TView slot during hydration');\n\n function findHydrationRoot() {\n if (isRootTemplateMessage(subTemplateIndex)) {\n // This is the root of an i18n block. In this case, our hydration root will\n // depend on where our parent TNode (i.e. the block with i18n applied) is\n // in the DOM.\n ngDevMode && assertDefined(parentTNode, 'Expected parent TNode while hydrating i18n root');\n const rootNode = locateNextRNode(hydrationInfo!, tView, lView, parentTNode!) as Node;\n\n // If this i18n block is attached to an <ng-container>, then we want to begin\n // hydrating directly with the RNode. Otherwise, for a TNode with a physical DOM\n // element, we want to recurse into the first child and begin there.\n return parentTNode!.type & TNodeType.ElementContainer ? rootNode : rootNode.firstChild;\n }\n\n // This is a nested template in an i18n block. In this case, the entire view\n // is translated, and part of a dehydrated view in a container. This means that\n // we can simply begin hydration with the first dehydrated child.\n return hydrationInfo?.firstChild as Node;\n }\n\n const currentNode = findHydrationRoot();\n ngDevMode && assertDefined(currentNode, 'Expected root i18n node during hydration');\n\n const disconnectedNodes = initDisconnectedNodes(hydrationInfo) ?? new Set();\n const i18nNodes = (hydrationInfo.i18nNodes ??= new Map<number, RNode | null>());\n const caseQueue = hydrationInfo.data[I18N_DATA]?.[index - HEADER_OFFSET] ?? [];\n const dehydratedIcuData = (hydrationInfo.dehydratedIcuData ??= new Map<\n number,\n DehydratedIcuData\n >());\n\n collectI18nNodesFromDom(\n {hydrationInfo, lView, i18nNodes, disconnectedNodes, caseQueue, dehydratedIcuData},\n {currentNode, isConnected: true},\n tI18n.ast,\n );\n\n // Nodes from inactive ICU cases should be considered disconnected. We track them above\n // because they aren't (and shouldn't be) serialized. Since we may mutate or create a\n // new set, we need to be sure to write the expected value back to the DehydratedView.\n hydrationInfo.disconnectedNodes = disconnectedNodes.size === 0 ? null : disconnectedNodes;\n}\n\nfunction collectI18nNodesFromDom(\n context: I18nHydrationContext,\n state: I18nHydrationState,\n nodeOrNodes: I18nNode | I18nNode[],\n) {\n if (Array.isArray(nodeOrNodes)) {\n let nextState = state;\n for (const node of nodeOrNodes) {\n // Whenever a node doesn't directly follow the previous RNode, it\n // is given a path. We need to resume collecting nodes from that location\n // until and unless we find another disjoint node.\n const targetNode = tryLocateRNodeByPath(\n context.hydrationInfo,\n context.lView,\n node.index - HEADER_OFFSET,\n );\n if (targetNode) {\n nextState = forkHydrationState(state, targetNode as Node);\n }\n collectI18nNodesFromDom(context, nextState, node);\n }\n } else {\n if (context.disconnectedNodes.has(nodeOrNodes.index - HEADER_OFFSET)) {\n // i18n nodes can be considered disconnected if e.g. they were projected.\n // In that case, we have to make sure to skip over them.\n return;\n }\n\n switch (nodeOrNodes.kind) {\n case I18nNodeKind.TEXT: {\n // Claim a text node for hydration\n const currentNode = appendI18nNodeToCollection(context, state, nodeOrNodes);\n setCurrentNode(state, currentNode?.nextSibling ?? null);\n break;\n }\n\n case I18nNodeKind.ELEMENT: {\n // Recurse into the current element's children...\n collectI18nNodesFromDom(\n context,\n forkHydrationState(state, state.currentNode?.firstChild ?? null),\n nodeOrNodes.children,\n );\n\n // And claim the parent element itself.\n const currentNode = appendI18nNodeToCollection(context, state, nodeOrNodes);\n setCurrentNode(state, currentNode?.nextSibling ?? null);\n break;\n }\n\n case I18nNodeKind.PLACEHOLDER: {\n const noOffsetIndex = nodeOrNodes.index - HEADER_OFFSET;\n const {hydrationInfo} = context;\n const containerSize = getNgContainerSize(hydrationInfo, noOffsetIndex);\n\n switch (nodeOrNodes.type) {\n case I18nPlaceholderType.ELEMENT: {\n // Hydration expects to find the head of the element.\n const currentNode = appendI18nNodeToCollection(context, state, nodeOrNodes);\n\n // A TNode for the node may not yet if we're hydrating during the first pass,\n // so use the serialized data to determine if this is an <ng-container>.\n if (isSerializedElementContainer(hydrationInfo, noOffsetIndex)) {\n // An <ng-container> doesn't have a physical DOM node, so we need to\n // continue hydrating from siblings.\n collectI18nNodesFromDom(context, state, nodeOrNodes.children);\n\n // Skip over the anchor element. It will be claimed by the\n // downstream container hydration.\n const nextNode = skipSiblingNodes(state, 1);\n setCurrentNode(state, nextNode);\n } else {\n // Non-container elements represent an actual node in the DOM, so we\n // need to continue hydration with the children, and claim the node.\n collectI18nNodesFromDom(\n context,\n forkHydrationState(state, state.currentNode?.firstChild ?? null),\n nodeOrNodes.children,\n );\n setCurrentNode(state, currentNode?.nextSibling ?? null);\n\n // Elements can also be the anchor of a view container, so there may\n // be elements after this node that we need to skip.\n if (containerSize !== null) {\n // `+1` stands for an anchor node after all of the views in the container.\n const nextNode = skipSiblingNodes(state, containerSize + 1);\n setCurrentNode(state, nextNode);\n }\n }\n break;\n }\n\n case I18nPlaceholderType.SUBTEMPLATE: {\n ngDevMode &&\n assertNotEqual(\n containerSize,\n null,\n 'Expected a container size while hydrating i18n subtemplate',\n );\n\n // Hydration expects to find the head of the template.\n appendI18nNodeToCollection(context, state, nodeOrNodes);\n\n // Skip over all of the template children, as well as the anchor\n // node, since the template itself will handle them instead.\n const nextNode = skipSiblingNodes(state, containerSize! + 1);\n setCurrentNode(state, nextNode);\n break;\n }\n }\n break;\n }\n\n case I18nNodeKind.ICU: {\n // If the current node is connected, we need to pop the next case from the\n // queue, so that the active case is also considered connected.\n const selectedCase = state.isConnected ? context.caseQueue.shift()! : null;\n const childState = {currentNode: null, isConnected: false};\n\n // We traverse through each case, even if it's not active,\n // so that we correctly populate disconnected nodes.\n for (let i = 0; i < nodeOrNodes.cases.length; i++) {\n collectI18nNodesFromDom(\n context,\n i === selectedCase ? state : childState,\n nodeOrNodes.cases[i],\n );\n }\n\n if (selectedCase !== null) {\n // ICUs represent a branching state, and the selected case could be different\n // than what it was on the server. In that case, we need to be able to clean\n // up the nodes from the original case. To do that, we store the selected case.\n context.dehydratedIcuData.set(nodeOrNodes.index, {case: selectedCase, node: nodeOrNodes});\n }\n\n // Hydration expects to find the ICU anchor element.\n const currentNode = appendI18nNodeToCollection(context, state, nodeOrNodes);\n setCurrentNode(state, currentNode?.nextSibling ?? null);\n break;\n }\n }\n }\n}\n\nlet _claimDehydratedIcuCaseImpl: typeof claimDehydratedIcuCaseImpl = () => {\n // noop unless `enableClaimDehydratedIcuCaseImpl` is invoked\n};\n\n/**\n * Mark the case for the ICU node at the given index in the view as claimed,\n * allowing its nodes to be hydrated and not cleaned up.\n */\nexport function claimDehydratedIcuCase(lView: LView, icuIndex: number, caseIndex: number) {\n _claimDehydratedIcuCaseImpl(lView, icuIndex, caseIndex);\n}\n\nexport function enableClaimDehydratedIcuCaseImpl() {\n _claimDehydratedIcuCaseImpl = claimDehydratedIcuCaseImpl;\n}\n\nfunction claimDehydratedIcuCaseImpl(lView: LView, icuIndex: number, caseIndex: number) {\n const dehydratedIcuDataMap = lView[HYDRATION]?.dehydratedIcuData;\n if (dehydratedIcuDataMap) {\n const dehydratedIcuData = dehydratedIcuDataMap.get(icuIndex);\n if (dehydratedIcuData?.case === caseIndex) {\n // If the case we're attempting to claim matches the dehydrated one,\n // we remove it from the map to mark it as \"claimed.\"\n dehydratedIcuDataMap.delete(icuIndex);\n }\n }\n}\n\n/**\n * Clean up all i18n hydration data associated with the given view.\n */\nexport function cleanupI18nHydrationData(lView: LView) {\n const hydrationInfo = lView[HYDRATION];\n if (hydrationInfo) {\n const {i18nNodes, dehydratedIcuData: dehydratedIcuDataMap} = hydrationInfo;\n if (i18nNodes && dehydratedIcuDataMap) {\n const renderer = lView[RENDERER];\n for (const dehydratedIcuData of dehydratedIcuDataMap.values()) {\n cleanupDehydratedIcuData(renderer, i18nNodes, dehydratedIcuData);\n }\n }\n\n hydrationInfo.i18nNodes = undefined;\n hydrationInfo.dehydratedIcuData = undefined;\n }\n}\n\nfunction cleanupDehydratedIcuData(\n renderer: Renderer,\n i18nNodes: Map<number, RNode | null>,\n dehydratedIcuData: DehydratedIcuData,\n) {\n for (const node of dehydratedIcuData.node.cases[dehydratedIcuData.case]) {\n const rNode = i18nNodes.get(node.index - HEADER_OFFSET);\n if (rNode) {\n nativeRemoveNode(renderer, rNode, false);\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ApplicationRef} from '../application/application_ref';\nimport {DehydratedDeferBlock} from '../defer/interfaces';\nimport {DehydratedBlockRegistry} from '../defer/registry';\nimport {\n CONTAINER_HEADER_OFFSET,\n DEHYDRATED_VIEWS,\n LContainer,\n} from '../render3/interfaces/container';\nimport {Renderer} from '../render3/interfaces/renderer';\nimport {RNode} from '../render3/interfaces/renderer_dom';\nimport {isLContainer, isLView} from '../render3/interfaces/type_checks';\nimport {HEADER_OFFSET, HOST, LView, PARENT, RENDERER, TVIEW} from '../render3/interfaces/view';\nimport {nativeRemoveNode} from '../render3/dom_node_manipulation';\n\nimport {validateSiblingNodeExists} from './error_handling';\nimport {cleanupI18nHydrationData} from './i18n';\nimport {DEFER_BLOCK_ID, DehydratedContainerView, NUM_ROOT_NODES} from './interfaces';\nimport {getLNodeForHydration} from './utils';\n\n/**\n * Removes all dehydrated views from a given LContainer:\n * both in internal data structure, as well as removing\n * corresponding DOM nodes that belong to that dehydrated view.\n */\nexport function removeDehydratedViews(lContainer: LContainer) {\n const views = lContainer[DEHYDRATED_VIEWS] ?? [];\n const parentLView = lContainer[PARENT];\n const renderer = parentLView[RENDERER];\n const retainedViews = [];\n for (const view of views) {\n // Do not clean up contents of `@defer` blocks.\n // The cleanup for this content would happen once a given block\n // is triggered and hydrated.\n if (view.data[DEFER_BLOCK_ID] !== undefined) {\n retainedViews.push(view);\n } else {\n removeDehydratedView(view, renderer);\n ngDevMode && ngDevMode.dehydratedViewsRemoved++;\n }\n }\n // Reset the value to an array to indicate that no\n // further processing of dehydrated views is needed for\n // this view container (i.e. do not trigger the lookup process\n // once again in case a `ViewContainerRef` is created later).\n lContainer[DEHYDRATED_VIEWS] = retainedViews;\n}\n\nexport function removeDehydratedViewList(deferBlock: DehydratedDeferBlock) {\n const {lContainer} = deferBlock;\n const dehydratedViews = lContainer[DEHYDRATED_VIEWS];\n if (dehydratedViews === null) return;\n const parentLView = lContainer[PARENT];\n const renderer = parentLView[RENDERER];\n for (const view of dehydratedViews) {\n removeDehydratedView(view, renderer);\n ngDevMode && ngDevMode.dehydratedViewsRemoved++;\n }\n}\n\n/**\n * Helper function to remove all nodes from a dehydrated view.\n */\nfunction removeDehydratedView(dehydratedView: DehydratedContainerView, renderer: Renderer) {\n let nodesRemoved = 0;\n let currentRNode = dehydratedView.firstChild;\n if (currentRNode) {\n const numNodes = dehydratedView.data[NUM_ROOT_NODES];\n while (nodesRemoved < numNodes) {\n ngDevMode && validateSiblingNodeExists(currentRNode);\n const nextSibling: RNode = currentRNode.nextSibling!;\n nativeRemoveNode(renderer, currentRNode, false);\n currentRNode = nextSibling;\n nodesRemoved++;\n }\n }\n}\n\n/**\n * Walks over all views within this LContainer invokes dehydrated views\n * cleanup function for each one.\n */\nexport function cleanupLContainer(lContainer: LContainer) {\n removeDehydratedViews(lContainer);\n\n // The host could be an LView if this container is on a component node.\n // In this case, descend into host LView for further cleanup. See also\n // LContainer[HOST] docs for additional information.\n const hostLView = lContainer[HOST];\n if (isLView(hostLView)) {\n cleanupLView(hostLView);\n }\n\n for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n cleanupLView(lContainer[i] as LView);\n }\n}\n\n/**\n * Walks over `LContainer`s and components registered within\n * this LView and invokes dehydrated views cleanup function for each one.\n */\nfunction cleanupLView(lView: LView) {\n cleanupI18nHydrationData(lView);\n\n const tView = lView[TVIEW];\n for (let i = HEADER_OFFSET; i < tView.bindingStartIndex; i++) {\n if (isLContainer(lView[i])) {\n const lContainer = lView[i];\n cleanupLContainer(lContainer);\n } else if (isLView(lView[i])) {\n // This is a component, enter the `cleanupLView` recursively.\n cleanupLView(lView[i]);\n }\n }\n}\n\n/**\n * Walks over all views registered within the ApplicationRef and removes\n * all dehydrated views from all `LContainer`s along the way.\n */\nexport function cleanupDehydratedViews(appRef: ApplicationRef) {\n const viewRefs = appRef._views;\n for (const viewRef of viewRefs) {\n const lNode = getLNodeForHydration(viewRef);\n // An `lView` might be `null` if a `ViewRef` represents\n // an embedded view (not a component view).\n if (lNode !== null && lNode[HOST] !== null) {\n if (isLView(lNode)) {\n cleanupLView(lNode);\n } else {\n // Cleanup in all views within this view container\n cleanupLContainer(lNode);\n }\n ngDevMode && ngDevMode.dehydratedViewsCleanupRuns++;\n }\n }\n}\n\n/**\n * post hydration cleanup handling for defer blocks that were incrementally\n * hydrated. This removes all the jsaction attributes, timers, observers,\n * dehydrated views and containers\n */\nexport function cleanupHydratedDeferBlocks(\n deferBlock: DehydratedDeferBlock | null,\n hydratedBlocks: string[],\n registry: DehydratedBlockRegistry,\n appRef: ApplicationRef,\n): void {\n if (deferBlock !== null) {\n registry.cleanup(hydratedBlocks);\n cleanupLContainer(deferBlock.lContainer);\n cleanupDehydratedViews(appRef);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {DEHYDRATED_VIEWS, LContainer} from '../render3/interfaces/container';\nimport {RNode} from '../render3/interfaces/renderer_dom';\n\nimport {removeDehydratedViews} from './cleanup';\nimport {\n DehydratedContainerView,\n MULTIPLIER,\n NUM_ROOT_NODES,\n SerializedContainerView,\n TEMPLATE_ID,\n} from './interfaces';\nimport {siblingAfter} from './node_lookup_utils';\n\n/**\n * Given a current DOM node and a serialized information about the views\n * in a container, walks over the DOM structure, collecting the list of\n * dehydrated views.\n */\nexport function locateDehydratedViewsInContainer(\n currentRNode: RNode,\n serializedViews: SerializedContainerView[],\n): [RNode, DehydratedContainerView[]] {\n const dehydratedViews: DehydratedContainerView[] = [];\n for (const serializedView of serializedViews) {\n // Repeats a view multiple times as needed, based on the serialized information\n // (for example, for *ngFor-produced views).\n for (let i = 0; i < (serializedView[MULTIPLIER] ?? 1); i++) {\n const view: DehydratedContainerView = {\n data: serializedView,\n firstChild: null,\n };\n if (serializedView[NUM_ROOT_NODES] > 0) {\n // Keep reference to the first node in this view,\n // so it can be accessed while invoking template instructions.\n view.firstChild = currentRNode as HTMLElement;\n\n // Move over to the next node after this view, which can\n // either be a first node of the next view or an anchor comment\n // node after the last view in a container.\n currentRNode = siblingAfter(serializedView[NUM_ROOT_NODES], currentRNode)!;\n }\n dehydratedViews.push(view);\n }\n }\n\n return [currentRNode, dehydratedViews];\n}\n\n/**\n * Reference to a function that searches for a matching dehydrated views\n * stored on a given lContainer.\n * Returns `null` by default, when hydration is not enabled.\n */\nlet _findMatchingDehydratedViewImpl: typeof findMatchingDehydratedViewImpl = () => null;\n\n/**\n * Retrieves the next dehydrated view from the LContainer and verifies that\n * it matches a given template id (from the TView that was used to create this\n * instance of a view). If the id doesn't match, that means that we are in an\n * unexpected state and can not complete the reconciliation process. Thus,\n * all dehydrated views from this LContainer are removed (including corresponding\n * DOM nodes) and the rendering is performed as if there were no dehydrated views\n * in this container.\n */\nfunction findMatchingDehydratedViewImpl(\n lContainer: LContainer,\n template: string | null,\n): DehydratedContainerView | null {\n const views = lContainer[DEHYDRATED_VIEWS];\n if (!template || views === null || views.length === 0) {\n return null;\n }\n const view = views[0];\n // Verify whether the first dehydrated view in the container matches\n // the template id passed to this function (that originated from a TView\n // that was used to create an instance of an embedded or component views.\n if (view.data[TEMPLATE_ID] === template) {\n // If the template id matches - extract the first view and return it.\n return views.shift()!;\n } else {\n // Otherwise, we are at the state when reconciliation can not be completed,\n // thus we remove all dehydrated views within this container (remove them\n // from internal data structures as well as delete associated elements from\n // the DOM tree).\n removeDehydratedViews(lContainer);\n return null;\n }\n}\n\nexport function enableFindMatchingDehydratedViewImpl() {\n _findMatchingDehydratedViewImpl = findMatchingDehydratedViewImpl;\n}\n\nexport function findMatchingDehydratedView(\n lContainer: LContainer,\n template: string | null,\n): DehydratedContainerView | null {\n return _findMatchingDehydratedViewImpl(lContainer, template);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport type {ChangeDetectorRef} from '../change_detection/change_detection';\nimport type {Injector} from '../di/injector';\nimport type {EnvironmentInjector} from '../di/r3_injector';\nimport {Type} from '../interface/type';\n\nimport type {ElementRef} from './element_ref';\nimport type {NgModuleRef} from './ng_module_factory';\nimport type {ViewRef} from './view_ref';\n\n/**\n * Represents a component created by a `ComponentFactory`.\n * Provides access to the component instance and related objects,\n * and provides the means of destroying the instance.\n *\n * @publicApi\n */\nexport abstract class ComponentRef<C> {\n /**\n * Updates a specified input name to a new value. Using this method will properly mark for check\n * component using the `OnPush` change detection strategy. It will also assure that the\n * `OnChanges` lifecycle hook runs when a dynamically created component is change-detected.\n *\n * @param name The name of an input.\n * @param value The new value of an input.\n */\n abstract setInput(name: string, value: unknown): void;\n\n /**\n * The host or anchor element for this component instance.\n */\n abstract get location(): ElementRef;\n\n /**\n * The dependency injector for this component instance.\n */\n abstract get injector(): Injector;\n\n /**\n * This component instance.\n */\n abstract get instance(): C;\n\n /**\n * The host view defined by the template\n * for this component instance.\n */\n abstract get hostView(): ViewRef;\n\n /**\n * The change detector for this component instance.\n */\n abstract get changeDetectorRef(): ChangeDetectorRef;\n\n /**\n * The type of this component (as created by a `ComponentFactory` class).\n */\n abstract get componentType(): Type<any>;\n\n /**\n * Destroys the component instance and all of the data structures associated with it.\n */\n abstract destroy(): void;\n\n /**\n * A lifecycle hook that provides additional developer-defined cleanup\n * functionality for the component.\n * @param callback A handler function that cleans up developer-defined data\n * associated with this component. Called when the `destroy()` method is invoked.\n */\n abstract onDestroy(callback: Function): void;\n}\n\n/**\n * Base class for a factory that can create a component dynamically.\n * Instantiate a factory for a given type of component with `resolveComponentFactory()`.\n * Use the resulting `ComponentFactory.create()` method to create a component of that type.\n *\n * @publicApi\n *\n * @deprecated Angular no longer requires Component factories. Please use other APIs where\n * Component class can be used directly.\n */\nexport abstract class ComponentFactory<C> {\n /**\n * The component's HTML selector.\n */\n abstract get selector(): string;\n /**\n * The type of component the factory will create.\n */\n abstract get componentType(): Type<any>;\n /**\n * Selector for all <ng-content> elements in the component.\n */\n abstract get ngContentSelectors(): string[];\n /**\n * The inputs of the component.\n */\n abstract get inputs(): {\n propName: string;\n templateName: string;\n transform?: (value: any) => any;\n isSignal: boolean;\n }[];\n /**\n * The outputs of the component.\n */\n abstract get outputs(): {propName: string; templateName: string}[];\n /**\n * Creates a new component.\n */\n abstract create(\n injector: Injector,\n projectableNodes?: any[][],\n rootSelectorOrNode?: string | any,\n environmentInjector?: EnvironmentInjector | NgModuleRef<any>,\n ): ComponentRef<C>;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Type} from '../interface/type';\nimport {stringify} from '../util/stringify';\n\nimport type {ComponentFactory} from './component_factory';\n\nclass _NullComponentFactoryResolver implements ComponentFactoryResolver {\n resolveComponentFactory<T>(component: {new (...args: any[]): T}): ComponentFactory<T> {\n throw Error(`No component factory found for ${stringify(component)}.`);\n }\n}\n\n/**\n * A simple registry that maps `Components` to generated `ComponentFactory` classes\n * that can be used to create instances of components.\n * Use to obtain the factory for a given component type,\n * then use the factory's `create()` method to create a component of that type.\n *\n * Note: since v13, dynamic component creation via\n * [`ViewContainerRef.createComponent`](api/core/ViewContainerRef#createComponent)\n * does **not** require resolving component factory: component class can be used directly.\n *\n * @publicApi\n *\n * @deprecated Angular no longer requires Component factories. Please use other APIs where\n * Component class can be used directly.\n */\nexport abstract class ComponentFactoryResolver {\n static NULL: ComponentFactoryResolver = /* @__PURE__ */ new _NullComponentFactoryResolver();\n /**\n * Retrieves the factory object that creates a component of the given type.\n * @param component The component type.\n */\n abstract resolveComponentFactory<T>(component: Type<T>): ComponentFactory<T>;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {isLView} from '../render3/interfaces/type_checks';\nimport {RENDERER} from '../render3/interfaces/view';\nimport {getCurrentTNode, getLView} from '../render3/state';\nimport {getComponentLViewByIndex} from '../render3/util/view_utils';\n\nimport {RendererStyleFlags2, RendererType2} from './api_flags';\n\n/**\n * Creates and initializes a custom renderer that implements the `Renderer2` base class.\n *\n * @publicApi\n */\nexport abstract class RendererFactory2 {\n /**\n * Creates and initializes a custom renderer for a host DOM element.\n * @param hostElement The element to render.\n * @param type The base class to implement.\n * @returns The new custom renderer instance.\n */\n abstract createRenderer(hostElement: any, type: RendererType2 | null): Renderer2;\n /**\n * A callback invoked when rendering has begun.\n */\n abstract begin?(): void;\n /**\n * A callback invoked when rendering has completed.\n */\n abstract end?(): void;\n /**\n * Use with animations test-only mode. Notifies the test when rendering has completed.\n * @returns The asynchronous result of the developer-defined function.\n */\n abstract whenRenderingDone?(): Promise<any>;\n}\n\n/**\n * Extend this base class to implement custom rendering. By default, Angular\n * renders a template into DOM. You can use custom rendering to intercept\n * rendering calls, or to render to something other than DOM.\n *\n * <div class=\"docs-alert docs-alert-important\">\n * <p>\n * Please be aware that usage of `Renderer2`, in context of accessing DOM elements, provides no\n * extra security which makes it equivalent to\n * {@link /best-practices/security#direct-use-of-the-dom-apis-and-explicit-sanitization-calls Security vulnerabilities}.\n * </p>\n * </div>\n *\n * Create your custom renderer using `RendererFactory2`.\n *\n * Use a custom renderer to bypass Angular's templating and\n * make custom UI changes that can't be expressed declaratively.\n * For example if you need to set a property or an attribute whose name is\n * not statically known, use the `setProperty()` or\n * `setAttribute()` method.\n *\n * @publicApi\n */\nexport abstract class Renderer2 {\n /**\n * Use to store arbitrary developer-defined data on a renderer instance,\n * as an object containing key-value pairs.\n * This is useful for renderers that delegate to other renderers.\n */\n abstract get data(): {[key: string]: any};\n\n /**\n * Implement this callback to destroy the renderer or the host element.\n */\n abstract destroy(): void;\n /**\n * Implement this callback to create an instance of the host element.\n * @param name An identifying name for the new element, unique within the namespace.\n * @param namespace The namespace for the new element.\n * @returns The new element.\n */\n abstract createElement(name: string, namespace?: string | null): any;\n /**\n * Implement this callback to add a comment to the DOM of the host element.\n * @param value The comment text.\n * @returns The modified element.\n */\n abstract createComment(value: string): any;\n\n /**\n * Implement this callback to add text to the DOM of the host element.\n * @param value The text string.\n * @returns The modified element.\n */\n abstract createText(value: string): any;\n /**\n * If null or undefined, the view engine won't call it.\n * This is used as a performance optimization for production mode.\n */\n destroyNode: ((node: any) => void) | null = null;\n /**\n * Appends a child to a given parent node in the host element DOM.\n * @param parent The parent node.\n * @param newChild The new child node.\n */\n abstract appendChild(parent: any, newChild: any): void;\n /**\n * Implement this callback to insert a child node at a given position in a parent node\n * in the host element DOM.\n * @param parent The parent node.\n * @param newChild The new child nodes.\n * @param refChild The existing child node before which `newChild` is inserted.\n * @param isMove Optional argument which signifies if the current `insertBefore` is a result of a\n * move. Animation uses this information to trigger move animations. In the past the Animation\n * would always assume that any `insertBefore` is a move. This is not strictly true because\n * with runtime i18n it is possible to invoke `insertBefore` as a result of i18n and it should\n * not trigger an animation move.\n */\n abstract insertBefore(parent: any, newChild: any, refChild: any, isMove?: boolean): void;\n /**\n * Implement this callback to remove a child node from the host element's DOM.\n * @param parent The parent node.\n * @param oldChild The child node to remove.\n * @param isHostElement Optionally signal to the renderer whether this element is a host element\n * or not\n */\n abstract removeChild(parent: any, oldChild: any, isHostElement?: boolean): void;\n /**\n * Implement this callback to prepare an element to be bootstrapped\n * as a root element, and return the element instance.\n * @param selectorOrNode The DOM element.\n * @param preserveContent Whether the contents of the root element\n * should be preserved, or cleared upon bootstrap (default behavior).\n * Use with `ViewEncapsulation.ShadowDom` to allow simple native\n * content projection via `<slot>` elements.\n * @returns The root element.\n */\n abstract selectRootElement(selectorOrNode: string | any, preserveContent?: boolean): any;\n /**\n * Implement this callback to get the parent of a given node\n * in the host element's DOM.\n * @param node The child node to query.\n * @returns The parent node, or null if there is no parent.\n * This is because the check is synchronous,\n * and the caller can't rely on checking for null.\n */\n abstract parentNode(node: any): any;\n /**\n * Implement this callback to get the next sibling node of a given node\n * in the host element's DOM.\n * @returns The sibling node, or null if there is no sibling.\n * This is because the check is synchronous,\n * and the caller can't rely on checking for null.\n */\n abstract nextSibling(node: any): any;\n /**\n * Implement this callback to set an attribute value for an element in the DOM.\n * @param el The element.\n * @param name The attribute name.\n * @param value The new value.\n * @param namespace The namespace.\n */\n abstract setAttribute(el: any, name: string, value: string, namespace?: string | null): void;\n\n /**\n * Implement this callback to remove an attribute from an element in the DOM.\n * @param el The element.\n * @param name The attribute name.\n * @param namespace The namespace.\n */\n abstract removeAttribute(el: any, name: string, namespace?: string | null): void;\n /**\n * Implement this callback to add a class to an element in the DOM.\n * @param el The element.\n * @param name The class name.\n */\n abstract addClass(el: any, name: string): void;\n\n /**\n * Implement this callback to remove a class from an element in the DOM.\n * @param el The element.\n * @param name The class name.\n */\n abstract removeClass(el: any, name: string): void;\n\n /**\n * Implement this callback to set a CSS style for an element in the DOM.\n * @param el The element.\n * @param style The name of the style.\n * @param value The new value.\n * @param flags Flags for style variations. No flags are set by default.\n */\n abstract setStyle(el: any, style: string, value: any, flags?: RendererStyleFlags2): void;\n\n /**\n * Implement this callback to remove the value from a CSS style for an element in the DOM.\n * @param el The element.\n * @param style The name of the style.\n * @param flags Flags for style variations to remove, if set. ???\n */\n abstract removeStyle(el: any, style: string, flags?: RendererStyleFlags2): void;\n\n /**\n * Implement this callback to set the value of a property of an element in the DOM.\n * @param el The element.\n * @param name The property name.\n * @param value The new value.\n */\n abstract setProperty(el: any, name: string, value: any): void;\n\n /**\n * Implement this callback to set the value of a node in the host element.\n * @param node The node.\n * @param value The new value.\n */\n abstract setValue(node: any, value: string): void;\n\n /**\n * Implement this callback to start an event listener.\n * @param target The context in which to listen for events. Can be\n * the entire window or document, the body of the document, or a specific\n * DOM element.\n * @param eventName The event to listen for.\n * @param callback A handler function to invoke when the event occurs.\n * @param options Options that configure how the event listener is bound.\n * @returns An \"unlisten\" function for disposing of this handler.\n */\n abstract listen(\n target: 'window' | 'document' | 'body' | any,\n eventName: string,\n callback: (event: any) => boolean | void,\n options?: ListenerOptions,\n ): () => void;\n\n /**\n * @internal\n * @nocollapse\n */\n static __NG_ELEMENT_ID__: () => Renderer2 = () => injectRenderer2();\n}\n\n/** Injects a Renderer2 for the current component. */\nexport function injectRenderer2(): Renderer2 {\n // We need the Renderer to be based on the component that it's being injected into, however since\n // DI happens before we've entered its view, `getLView` will return the parent view instead.\n const lView = getLView();\n const tNode = getCurrentTNode()!;\n const nodeAtIndex = getComponentLViewByIndex(tNode.index, lView);\n return (isLView(nodeAtIndex) ? nodeAtIndex : lView)[RENDERER] as Renderer2;\n}\n\n/**\n * This enum is meant to be used by `ɵtype` properties of the different renderers implemented\n * by the framework\n *\n * We choose to not add `ɵtype` to `Renderer2` to no expose it to the public API.\n */\nexport const enum AnimationRendererType {\n Regular = 0,\n Delegated = 1,\n}\n\n/**\n * Options that can be used to configure an event listener.\n * @publicApi\n */\nexport interface ListenerOptions {\n capture?: boolean;\n once?: boolean;\n passive?: boolean;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ɵɵdefineInjectable} from '../di/interface/defs';\nimport {SecurityContext} from './security';\n\n/**\n * Sanitizer is used by the views to sanitize potentially dangerous values.\n *\n * @publicApi\n */\nexport abstract class Sanitizer {\n abstract sanitize(context: SecurityContext, value: {} | string | null): string | null;\n /** @nocollapse */\n static ɵprov = /** @pureOrBreakMyCode */ /* @__PURE__ */ ɵɵdefineInjectable({\n token: Sanitizer,\n providedIn: 'root',\n factory: () => null,\n });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {isForwardRef, resolveForwardRef} from '../../di/forward_ref';\nimport {ModuleWithProviders} from '../../di/interface/provider';\nimport {Type} from '../../interface/type';\nimport {NgModuleDef} from '../../metadata/ng_module_def';\nimport {getComponentDef, getDirectiveDef, getPipeDef, getNgModuleDef} from '../def_getters';\nimport type {ComponentType, DirectiveType, PipeType} from '../interfaces/definition';\nimport {stringifyForError} from '../util/stringify_utils';\n\nexport function isModuleWithProviders(value: any): value is ModuleWithProviders<{}> {\n return (value as {ngModule?: any}).ngModule !== undefined;\n}\n\nexport function isNgModule<T>(value: Type<T>): value is Type<T> & {ɵmod: NgModuleDef<T>} {\n return !!getNgModuleDef(value);\n}\n\nexport function isPipe<T>(value: Type<T>): value is PipeType<T> {\n return !!getPipeDef(value);\n}\n\nexport function isDirective<T>(value: Type<T>): value is DirectiveType<T> {\n return !!getDirectiveDef(value);\n}\n\nexport function isComponent<T>(value: Type<T>): value is ComponentType<T> {\n return !!getComponentDef(value);\n}\n\nfunction getDependencyTypeForError(type: Type<any>) {\n if (getComponentDef(type)) return 'component';\n if (getDirectiveDef(type)) return 'directive';\n if (getPipeDef(type)) return 'pipe';\n return 'type';\n}\n\nexport function verifyStandaloneImport(depType: Type<unknown>, importingType: Type<unknown>) {\n if (isForwardRef(depType)) {\n depType = resolveForwardRef(depType);\n if (!depType) {\n throw new Error(\n `Expected forwardRef function, imported from \"${stringifyForError(\n importingType,\n )}\", to return a standalone entity or NgModule but got \"${\n stringifyForError(depType) || depType\n }\".`,\n );\n }\n }\n\n if (getNgModuleDef(depType) == null) {\n const def = getComponentDef(depType) || getDirectiveDef(depType) || getPipeDef(depType);\n if (def != null) {\n // if a component, directive or pipe is imported make sure that it is standalone\n if (!def.standalone) {\n throw new Error(\n `The \"${stringifyForError(depType)}\" ${getDependencyTypeForError(\n depType,\n )}, imported from \"${stringifyForError(\n importingType,\n )}\", is not standalone. Did you forget to add the standalone: true flag?`,\n );\n }\n } else {\n // it can be either a module with provider or an unknown (not annotated) type\n if (isModuleWithProviders(depType)) {\n throw new Error(\n `A module with providers was imported from \"${stringifyForError(\n importingType,\n )}\". Modules with providers are not supported in standalone components imports.`,\n );\n } else {\n throw new Error(\n `The \"${stringifyForError(depType)}\" type, imported from \"${stringifyForError(\n importingType,\n )}\", must be a standalone component / directive / pipe or an NgModule. Did you forget to add the required @Component / @Directive / @Pipe or @NgModule annotation?`,\n );\n }\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {resolveForwardRef} from '../../di';\nimport {RuntimeError, RuntimeErrorCode} from '../../errors';\nimport {Type} from '../../interface/type';\nimport {NgModuleType} from '../../metadata/ng_module_def';\nimport {flatten} from '../../util/array_utils';\nimport type {\n ComponentType,\n NgModuleScopeInfoFromDecorator,\n RawScopeInfoFromDecorator,\n} from '../interfaces/definition';\nimport {isComponent, isDirective, isNgModule, isPipe, verifyStandaloneImport} from '../jit/util';\nimport {getComponentDef, getNgModuleDef, isStandalone} from '../def_getters';\nimport {maybeUnwrapFn} from '../util/misc_utils';\n\nimport {\n ComponentDependencies,\n DepsTrackerApi,\n NgModuleScope,\n StandaloneComponentScope,\n} from './api';\n\n/**\n * Indicates whether to use the runtime dependency tracker for scope calculation in JIT compilation.\n * The value \"false\" means the old code path based on patching scope info into the types will be\n * used.\n *\n * @deprecated For migration purposes only, to be removed soon.\n */\nexport const USE_RUNTIME_DEPS_TRACKER_FOR_JIT = true;\n\n/**\n * An implementation of DepsTrackerApi which will be used for JIT and local compilation.\n */\nclass DepsTracker implements DepsTrackerApi {\n private ownerNgModule = new Map<ComponentType<any>, NgModuleType<any>>();\n private ngModulesWithSomeUnresolvedDecls = new Set<NgModuleType<any>>();\n private ngModulesScopeCache = new Map<NgModuleType<any>, NgModuleScope>();\n private standaloneComponentsScopeCache = new Map<ComponentType<any>, StandaloneComponentScope>();\n\n /**\n * Attempts to resolve ng module's forward ref declarations as much as possible and add them to\n * the `ownerNgModule` map. This method normally should be called after the initial parsing when\n * all the forward refs are resolved (e.g., when trying to render a component)\n */\n private resolveNgModulesDecls(): void {\n if (this.ngModulesWithSomeUnresolvedDecls.size === 0) {\n return;\n }\n\n for (const moduleType of this.ngModulesWithSomeUnresolvedDecls) {\n const def = getNgModuleDef(moduleType);\n if (def?.declarations) {\n for (const decl of maybeUnwrapFn(def.declarations)) {\n if (isComponent(decl)) {\n this.ownerNgModule.set(decl, moduleType);\n }\n }\n }\n }\n\n this.ngModulesWithSomeUnresolvedDecls.clear();\n }\n\n /** @override */\n getComponentDependencies(\n type: ComponentType<any>,\n rawImports?: RawScopeInfoFromDecorator[],\n ): ComponentDependencies {\n this.resolveNgModulesDecls();\n\n const def = getComponentDef(type);\n if (def === null) {\n throw new Error(\n `Attempting to get component dependencies for a type that is not a component: ${type}`,\n );\n }\n\n if (def.standalone) {\n const scope = this.getStandaloneComponentScope(type, rawImports);\n\n if (scope.compilation.isPoisoned) {\n return {dependencies: []};\n }\n\n return {\n dependencies: [\n ...scope.compilation.directives,\n ...scope.compilation.pipes,\n ...scope.compilation.ngModules,\n ],\n };\n } else {\n if (!this.ownerNgModule.has(type)) {\n // This component is orphan! No need to handle the error since the component rendering\n // pipeline (e.g., view_container_ref) will check for this error based on configs.\n return {dependencies: []};\n }\n\n const scope = this.getNgModuleScope(this.ownerNgModule.get(type)!);\n\n if (scope.compilation.isPoisoned) {\n return {dependencies: []};\n }\n\n return {\n dependencies: [...scope.compilation.directives, ...scope.compilation.pipes],\n };\n }\n }\n\n /**\n * @override\n * This implementation does not make use of param scopeInfo since it assumes the scope info is\n * already added to the type itself through methods like {@link ɵɵsetNgModuleScope}\n */\n registerNgModule(type: Type<any>, scopeInfo: NgModuleScopeInfoFromDecorator): void {\n if (!isNgModule(type)) {\n throw new Error(`Attempting to register a Type which is not NgModule as NgModule: ${type}`);\n }\n\n // Lazily process the NgModules later when needed.\n this.ngModulesWithSomeUnresolvedDecls.add(type);\n }\n\n /** @override */\n clearScopeCacheFor(type: Type<any>): void {\n this.ngModulesScopeCache.delete(type as NgModuleType);\n this.standaloneComponentsScopeCache.delete(type as ComponentType<any>);\n }\n\n /** @override */\n getNgModuleScope(type: NgModuleType<any>): NgModuleScope {\n if (this.ngModulesScopeCache.has(type)) {\n return this.ngModulesScopeCache.get(type)!;\n }\n\n const scope = this.computeNgModuleScope(type);\n this.ngModulesScopeCache.set(type, scope);\n\n return scope;\n }\n\n /** Compute NgModule scope afresh. */\n private computeNgModuleScope(type: NgModuleType<any>): NgModuleScope {\n const def = getNgModuleDef(type, true);\n const scope: NgModuleScope = {\n exported: {directives: new Set(), pipes: new Set()},\n compilation: {directives: new Set(), pipes: new Set()},\n };\n\n // Analyzing imports\n for (const imported of maybeUnwrapFn(def.imports)) {\n if (isNgModule(imported)) {\n const importedScope = this.getNgModuleScope(imported);\n\n // When this module imports another, the imported module's exported directives and pipes\n // are added to the compilation scope of this module.\n addSet(importedScope.exported.directives, scope.compilation.directives);\n addSet(importedScope.exported.pipes, scope.compilation.pipes);\n } else if (isStandalone(imported)) {\n if (isDirective(imported) || isComponent(imported)) {\n scope.compilation.directives.add(imported);\n } else if (isPipe(imported)) {\n scope.compilation.pipes.add(imported);\n } else {\n // The standalone thing is neither a component nor a directive nor a pipe ... (what?)\n throw new RuntimeError(\n RuntimeErrorCode.RUNTIME_DEPS_INVALID_IMPORTED_TYPE,\n 'The standalone imported type is neither a component nor a directive nor a pipe',\n );\n }\n } else {\n // The import is neither a module nor a module-with-providers nor a standalone thing. This\n // is going to be an error. So we short circuit.\n scope.compilation.isPoisoned = true;\n break;\n }\n }\n\n // Analyzing declarations\n if (!scope.compilation.isPoisoned) {\n for (const decl of maybeUnwrapFn(def.declarations)) {\n // Cannot declare another NgModule or a standalone thing\n if (isNgModule(decl) || isStandalone(decl)) {\n scope.compilation.isPoisoned = true;\n break;\n }\n\n if (isPipe(decl)) {\n scope.compilation.pipes.add(decl);\n } else {\n // decl is either a directive or a component. The component may not yet have the ɵcmp due\n // to async compilation.\n scope.compilation.directives.add(decl);\n }\n }\n }\n\n // Analyzing exports\n for (const exported of maybeUnwrapFn(def.exports)) {\n if (isNgModule(exported)) {\n // When this module exports another, the exported module's exported directives and pipes\n // are added to both the compilation and exported scopes of this module.\n const exportedScope = this.getNgModuleScope(exported);\n\n // Based on the current logic there is no way to have poisoned exported scope. So no need to\n // check for it.\n addSet(exportedScope.exported.directives, scope.exported.directives);\n addSet(exportedScope.exported.pipes, scope.exported.pipes);\n\n // Some test toolings which run in JIT mode depend on this behavior that the exported scope\n // should also be present in the compilation scope, even though AoT does not support this\n // and it is also in odds with NgModule metadata definitions. Without this some tests in\n // Google will fail.\n addSet(exportedScope.exported.directives, scope.compilation.directives);\n addSet(exportedScope.exported.pipes, scope.compilation.pipes);\n } else if (isPipe(exported)) {\n scope.exported.pipes.add(exported);\n } else {\n scope.exported.directives.add(exported);\n }\n }\n\n return scope;\n }\n\n /** @override */\n getStandaloneComponentScope(\n type: ComponentType<any>,\n rawImports?: RawScopeInfoFromDecorator[],\n ): StandaloneComponentScope {\n if (this.standaloneComponentsScopeCache.has(type)) {\n return this.standaloneComponentsScopeCache.get(type)!;\n }\n\n const ans = this.computeStandaloneComponentScope(type, rawImports);\n this.standaloneComponentsScopeCache.set(type, ans);\n\n return ans;\n }\n\n private computeStandaloneComponentScope(\n type: ComponentType<any>,\n rawImports?: RawScopeInfoFromDecorator[],\n ): StandaloneComponentScope {\n const ans: StandaloneComponentScope = {\n compilation: {\n // Standalone components are always able to self-reference.\n directives: new Set([type]),\n pipes: new Set(),\n ngModules: new Set(),\n },\n };\n\n for (const rawImport of flatten(rawImports ?? [])) {\n const imported = resolveForwardRef(rawImport) as Type<any>;\n\n try {\n verifyStandaloneImport(imported, type);\n } catch (e) {\n // Short-circuit if an import is not valid\n ans.compilation.isPoisoned = true;\n return ans;\n }\n\n if (isNgModule(imported)) {\n ans.compilation.ngModules.add(imported);\n const importedScope = this.getNgModuleScope(imported);\n\n // Short-circuit if an imported NgModule has corrupted exported scope.\n if (importedScope.exported.isPoisoned) {\n ans.compilation.isPoisoned = true;\n return ans;\n }\n\n addSet(importedScope.exported.directives, ans.compilation.directives);\n addSet(importedScope.exported.pipes, ans.compilation.pipes);\n } else if (isPipe(imported)) {\n ans.compilation.pipes.add(imported);\n } else if (isDirective(imported) || isComponent(imported)) {\n ans.compilation.directives.add(imported);\n } else {\n // The imported thing is not module/pipe/directive/component, so we error and short-circuit\n // here\n ans.compilation.isPoisoned = true;\n return ans;\n }\n }\n\n return ans;\n }\n\n /** @override */\n isOrphanComponent(cmp: Type<any>): boolean {\n const def = getComponentDef(cmp);\n\n if (!def || def.standalone) {\n return false;\n }\n\n this.resolveNgModulesDecls();\n\n return !this.ownerNgModule.has(cmp as ComponentType<any>);\n }\n}\n\nfunction addSet<T>(sourceSet: Set<T>, targetSet: Set<T>): void {\n for (const m of sourceSet) {\n targetSet.add(m);\n }\n}\n\n/** The deps tracker to be used in the current Angular app in dev mode. */\nexport const depsTracker = new DepsTracker();\n\nexport const TEST_ONLY = {DepsTracker};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\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)\nexport const NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR = {};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Injector} from '../di/injector';\nimport {convertToBitFlags} from '../di/injector_compatibility';\nimport {InjectFlags, InjectOptions} from '../di/interface/injector';\nimport {ProviderToken} from '../di/provider_token';\nimport {NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR} from '../view/provider_flags';\n\n/**\n * Injector that looks up a value using a specific injector, before falling back to the module\n * injector. Used primarily when creating components or embedded views dynamically.\n */\nexport class ChainedInjector implements Injector {\n constructor(\n public injector: Injector,\n public parentInjector: Injector,\n ) {}\n\n get<T>(token: ProviderToken<T>, notFoundValue?: T, flags?: InjectFlags | InjectOptions): T {\n flags = convertToBitFlags(flags);\n const value = this.injector.get<T | typeof NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR>(\n token,\n NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR,\n flags,\n );\n\n if (\n value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR ||\n notFoundValue === (NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR as unknown as T)\n ) {\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 as T;\n }\n\n return this.parentInjector.get(token, notFoundValue, flags);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {concatStringsWithSpace} from '../../util/stringify';\nimport {assertFirstCreatePass} from '../assert';\nimport {AttributeMarker} from '../interfaces/attribute_marker';\nimport {TAttributes, TNode} from '../interfaces/node';\nimport {getTView} from '../state';\n\n/**\n * Compute the static styling (class/style) from `TAttributes`.\n *\n * This function should be called during `firstCreatePass` only.\n *\n * @param tNode The `TNode` into which the styling information should be loaded.\n * @param attrs `TAttributes` containing the styling information.\n * @param writeToHost Where should the resulting static styles be written?\n * - `false` Write to `TNode.stylesWithoutHost` / `TNode.classesWithoutHost`\n * - `true` Write to `TNode.styles` / `TNode.classes`\n */\nexport function computeStaticStyling(\n tNode: TNode,\n attrs: TAttributes | null,\n writeToHost: boolean,\n): void {\n ngDevMode &&\n assertFirstCreatePass(getTView(), 'Expecting to be called in first template pass only');\n let styles: string | null = writeToHost ? tNode.styles : null;\n let classes: string | null = writeToHost ? tNode.classes : null;\n let mode: AttributeMarker | 0 = 0;\n if (attrs !== null) {\n for (let i = 0; i < attrs.length; i++) {\n const value = attrs[i];\n if (typeof value === 'number') {\n mode = value;\n } else if (mode == AttributeMarker.Classes) {\n classes = concatStringsWithSpace(classes, value as string);\n } else if (mode == AttributeMarker.Styles) {\n const style = value as string;\n const styleValue = attrs[++i] as string;\n styles = concatStringsWithSpace(styles, style + ': ' + styleValue + ';');\n }\n }\n }\n writeToHost ? (tNode.styles = styles) : (tNode.stylesWithoutHost = styles);\n writeToHost ? (tNode.classes = classes) : (tNode.classesWithoutHost = classes);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport {InjectFlags, resolveForwardRef} from '../../di';\nimport {assertInjectImplementationNotEqual} from '../../di/inject_switch';\nimport {ɵɵinject} from '../../di/injector_compatibility';\nimport {ProviderToken} from '../../di/provider_token';\nimport {Type} from '../../interface/type';\nimport {emitInjectEvent} from '../debug/injector_profiler';\nimport {getOrCreateInjectable} from '../di';\nimport {TDirectiveHostNode} from '../interfaces/node';\nimport {getCurrentTNode, getLView} from '../state';\n\n/**\n * Returns the value associated to the given token from the injectors.\n *\n * `directiveInject` is intended to be used for directive, component and pipe factories.\n * All other injection use `inject` which does not walk the node injector tree.\n *\n * Usage example (in factory function):\n *\n * ```ts\n * class SomeDirective {\n * constructor(directive: DirectiveA) {}\n *\n * static ɵdir = ɵɵdefineDirective({\n * type: SomeDirective,\n * factory: () => new SomeDirective(ɵɵdirectiveInject(DirectiveA))\n * });\n * }\n * ```\n * @param token the type or token to inject\n * @param flags Injection flags\n * @returns the value from the injector or `null` when not found\n *\n * @codeGenApi\n */\nexport function ɵɵdirectiveInject<T>(token: ProviderToken<T>): T;\nexport function ɵɵdirectiveInject<T>(token: ProviderToken<T>, flags: InjectFlags): T;\nexport function ɵɵdirectiveInject<T>(\n token: ProviderToken<T>,\n flags = InjectFlags.Default,\n): T | null {\n const lView = getLView();\n // Fall back to inject() if view hasn't been created. This situation can happen in tests\n // if inject utilities are used before bootstrapping.\n if (lView === null) {\n // Verify that we will not get into infinite loop.\n ngDevMode && assertInjectImplementationNotEqual(ɵɵdirectiveInject);\n return ɵɵinject(token, flags);\n }\n const tNode = getCurrentTNode();\n const value = getOrCreateInjectable<T>(\n tNode as TDirectiveHostNode,\n lView,\n resolveForwardRef(token),\n flags,\n );\n ngDevMode && emitInjectEvent(token as Type<unknown>, value, flags);\n return value;\n}\n\n/**\n * Throws an error indicating that a factory function could not be generated by the compiler for a\n * particular class.\n *\n * This instruction allows the actual error message to be optimized away when ngDevMode is turned\n * off, saving bytes of generated code while still providing a good experience in dev mode.\n *\n * The name of the class is not mentioned here, but will be in the generated factory function name\n * and thus in the stack trace.\n *\n * @codeGenApi\n */\nexport function ɵɵinvalidFactory(): never {\n const msg = ngDevMode\n ? `This constructor was not compatible with Dependency Injection.`\n : 'invalid';\n throw new Error(msg);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {RuntimeError, RuntimeErrorCode} from '../../errors';\nimport {Writable} from '../../interface/type';\nimport {DoCheck, OnChanges, OnInit} from '../../interface/lifecycle_hooks';\nimport {\n assertDefined,\n assertGreaterThan,\n assertGreaterThanOrEqual,\n assertNotEqual,\n assertSame,\n} from '../../util/assert';\nimport {assertFirstCreatePass} from '../assert';\nimport {getFactoryDef} from '../definition_factory';\nimport {diPublicInInjector, getOrCreateNodeInjectorForNode} from '../di';\nimport {ɵɵdirectiveInject} from '../instructions/di';\nimport {AttributeMarker} from '../interfaces/attribute_marker';\nimport type {\n ComponentDef,\n DirectiveDef,\n HostDirectiveDef,\n HostDirectiveDefs,\n} from '../interfaces/definition';\nimport {NodeInjectorFactory} from '../interfaces/injector';\nimport {\n HostDirectiveInputs,\n HostDirectiveOutputs,\n InitialInputs,\n NodeInputBindings,\n NodeOutputBindings,\n TNodeFlags,\n type TContainerNode,\n type TElementContainerNode,\n type TElementNode,\n type TNode,\n} from '../interfaces/node';\nimport {isComponentDef} from '../interfaces/type_checks';\nimport {HEADER_OFFSET, HostBindingOpCodes, type LView, type TView} from '../interfaces/view';\nimport {isInlineTemplate} from '../node_selector_matcher';\nimport {NO_CHANGE} from '../tokens';\nimport {mergeHostAttrs} from '../util/attrs_utils';\nimport {allocExpando} from './construction';\n\nexport type DirectiveMatcherStrategy = (\n tView: TView,\n tNode: TElementNode | TContainerNode | TElementContainerNode,\n) => DirectiveDef<unknown>[] | null;\n\n/** Data produced after host directives are resolved for a node. */\ntype HostDirectiveResolution = [\n matches: DirectiveDef<unknown>[],\n hostDirectiveDefs: HostDirectiveDefs | null,\n hostDirectiveRanges: HostDirectiveRanges | null,\n];\n\n/**\n * Map that tracks a selector-matched directive to the range within which its host directives\n * are declared. Host directives for a specific directive are always contiguous within the runtime.\n * Note that both the start and end are inclusive and they're both **after** `tNode.directiveStart`.\n */\ntype HostDirectiveRanges = Map<DirectiveDef<unknown>, [start: number, end: number]>;\n\n/**\n * Resolve the matched directives on a node.\n */\nexport function resolveDirectives(\n tView: TView,\n lView: LView,\n tNode: TElementNode | TContainerNode | TElementContainerNode,\n localRefs: string[] | null,\n directiveMatcher: DirectiveMatcherStrategy,\n): void {\n // Please make sure to have explicit type for `exportsMap`. Inferred type triggers bug in tsickle.\n ngDevMode && assertFirstCreatePass(tView);\n\n const exportsMap: Record<string, number> | null = localRefs === null ? null : {'': -1};\n const matchedDirectiveDefs = directiveMatcher(tView, tNode);\n\n if (matchedDirectiveDefs !== null) {\n let directiveDefs: DirectiveDef<unknown>[];\n let hostDirectiveDefs: HostDirectiveDefs | null = null;\n let hostDirectiveRanges: HostDirectiveRanges | null = null;\n const hostDirectiveResolution = resolveHostDirectives(matchedDirectiveDefs);\n\n if (hostDirectiveResolution === null) {\n directiveDefs = matchedDirectiveDefs;\n } else {\n [directiveDefs, hostDirectiveDefs, hostDirectiveRanges] = hostDirectiveResolution;\n }\n\n initializeDirectives(\n tView,\n lView,\n tNode,\n directiveDefs,\n exportsMap,\n hostDirectiveDefs,\n hostDirectiveRanges,\n );\n }\n if (exportsMap !== null && localRefs !== null) {\n cacheMatchingLocalNames(tNode, localRefs, exportsMap);\n }\n}\n\n/** Caches local names and their matching directive indices for query and template lookups. */\nfunction cacheMatchingLocalNames(\n tNode: TNode,\n localRefs: string[],\n exportsMap: {[key: string]: number},\n): void {\n const localNames: (string | number)[] = (tNode.localNames = []);\n\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 (let i = 0; i < localRefs.length; i += 2) {\n const index = exportsMap[localRefs[i + 1]];\n if (index == null)\n throw new RuntimeError(\n RuntimeErrorCode.EXPORT_NOT_FOUND,\n ngDevMode && `Export of name '${localRefs[i + 1]}' not found!`,\n );\n localNames.push(localRefs[i], index);\n }\n}\n\nfunction resolveHostDirectives(matches: DirectiveDef<unknown>[]): HostDirectiveResolution | null {\n let componentDef: ComponentDef<unknown> | null = null;\n let hasHostDirectives = false;\n\n for (let i = 0; i < matches.length; i++) {\n const def = matches[i];\n\n if (i === 0 && isComponentDef(def)) {\n componentDef = def;\n }\n\n if (def.findHostDirectiveDefs !== null) {\n hasHostDirectives = true;\n break;\n }\n }\n\n if (!hasHostDirectives) {\n return null;\n }\n\n let allDirectiveDefs: DirectiveDef<unknown>[] | null = null;\n let hostDirectiveDefs: HostDirectiveDefs | null = null;\n let hostDirectiveRanges: HostDirectiveRanges | null = null;\n\n // Components are inserted at the front of the matches array so that their lifecycle\n // hooks run before any directive lifecycle hooks. This appears to be for ViewEngine\n // compatibility. This logic doesn't make sense with host directives, because it\n // would allow the host directives to undo any overrides the host may have made.\n // To handle this case, the host directives of components are inserted at the beginning\n // of the array, followed by the component. As such, the insertion order is as follows:\n // 1. Host directives belonging to the selector-matched component.\n // 2. Selector-matched component.\n // 3. Host directives belonging to selector-matched directives.\n // 4. Selector-matched dir\n for (const def of matches) {\n if (def.findHostDirectiveDefs !== null) {\n allDirectiveDefs ??= [];\n hostDirectiveDefs ??= new Map();\n hostDirectiveRanges ??= new Map();\n resolveHostDirectivesForDef(def, allDirectiveDefs, hostDirectiveRanges, hostDirectiveDefs);\n }\n\n // Component definition needs to be pushed early to maintain the correct ordering.\n if (def === componentDef) {\n allDirectiveDefs ??= [];\n allDirectiveDefs.push(def);\n }\n }\n\n if (allDirectiveDefs !== null) {\n allDirectiveDefs.push(...(componentDef === null ? matches : matches.slice(1)));\n ngDevMode && assertNoDuplicateDirectives(allDirectiveDefs);\n return [allDirectiveDefs, hostDirectiveDefs, hostDirectiveRanges];\n }\n\n return null;\n}\n\nfunction resolveHostDirectivesForDef(\n def: DirectiveDef<unknown>,\n allDirectiveDefs: DirectiveDef<unknown>[],\n hostDirectiveRanges: HostDirectiveRanges,\n hostDirectiveDefs: HostDirectiveDefs,\n) {\n ngDevMode && assertDefined(def.findHostDirectiveDefs, 'Expected host directive resolve function');\n const start = allDirectiveDefs.length;\n // TODO(pk): probably could return matches instead of taking in an array to fill in?\n def.findHostDirectiveDefs!(def, allDirectiveDefs, hostDirectiveDefs);\n\n // Note that these indexes are within the offset by `directiveStart`. We can't do the\n // offsetting here, because `directiveStart` hasn't been initialized on the TNode yet.\n hostDirectiveRanges.set(def, [start, allDirectiveDefs.length - 1]);\n}\n\n/**\n * Marks a given TNode as a component's host. This consists of:\n * - setting the component offset on the TNode.\n * - storing index of component's host element so it will be queued for view refresh during CD.\n */\nfunction markAsComponentHost(tView: TView, hostTNode: TNode, componentOffset: number): void {\n ngDevMode && assertFirstCreatePass(tView);\n ngDevMode && assertGreaterThan(componentOffset, -1, 'componentOffset must be great than -1');\n hostTNode.componentOffset = componentOffset;\n (tView.components ??= []).push(hostTNode.index);\n}\n\n/** Initializes the data structures necessary for a list of directives to be instantiated. */\nfunction initializeDirectives(\n tView: TView,\n lView: LView<unknown>,\n tNode: TElementNode | TContainerNode | TElementContainerNode,\n directives: DirectiveDef<unknown>[],\n exportsMap: {[key: string]: number} | null,\n hostDirectiveDefs: HostDirectiveDefs | null,\n hostDirectiveRanges: HostDirectiveRanges | null,\n) {\n ngDevMode && assertFirstCreatePass(tView);\n\n const directivesLength = directives.length;\n let hasSeenComponent = false;\n\n // Publishes the directive types to DI so they can be injected. Needs to\n // happen in a separate pass before the TNode flags have been initialized.\n for (let i = 0; i < directivesLength; i++) {\n const def = directives[i];\n if (!hasSeenComponent && isComponentDef(def)) {\n hasSeenComponent = true;\n markAsComponentHost(tView, tNode, i);\n }\n diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, lView), tView, def.type);\n }\n\n initTNodeFlags(tNode, tView.data.length, directivesLength);\n\n // When the same token is provided by several directives on the same node, some rules apply in\n // the viewEngine:\n // - viewProviders have priority over providers\n // - the last directive in NgModule.declarations has priority over the previous one\n // So to match these rules, the order in which providers are added in the arrays is very\n // important.\n for (let i = 0; i < directivesLength; i++) {\n const def = directives[i];\n if (def.providersResolver) def.providersResolver(def);\n }\n let preOrderHooksFound = false;\n let preOrderCheckHooksFound = false;\n let directiveIdx = allocExpando(tView, lView, directivesLength, null);\n ngDevMode &&\n assertSame(\n directiveIdx,\n tNode.directiveStart,\n 'TNode.directiveStart should point to just allocated space',\n );\n\n // If there's at least one directive, we'll have to track it so initialize the map.\n if (directivesLength > 0) {\n tNode.directiveToIndex = new Map();\n }\n\n for (let i = 0; i < directivesLength; i++) {\n const def = directives[i];\n // Merge the attrs in the order of matches. This assumes that the first directive is the\n // component itself, so that the component has the least priority.\n tNode.mergedAttrs = mergeHostAttrs(tNode.mergedAttrs, def.hostAttrs);\n\n configureViewWithDirective(tView, tNode, lView, directiveIdx, def);\n saveNameToExportMap(directiveIdx, def, exportsMap);\n\n // If a directive has host directives, we need to track both its index and the range within\n // the host directives are declared. Host directives are not tracked, but should be resolved\n // by looking up the host and getting its indexes from there.\n if (hostDirectiveRanges !== null && hostDirectiveRanges.has(def)) {\n const [start, end] = hostDirectiveRanges.get(def)!;\n tNode.directiveToIndex!.set(def.type, [\n directiveIdx,\n start + tNode.directiveStart,\n end + tNode.directiveStart,\n ]);\n } else if (hostDirectiveDefs === null || !hostDirectiveDefs.has(def)) {\n tNode.directiveToIndex!.set(def.type, directiveIdx);\n }\n\n if (def.contentQueries !== null) tNode.flags |= TNodeFlags.hasContentQuery;\n if (def.hostBindings !== null || def.hostAttrs !== null || def.hostVars !== 0)\n tNode.flags |= TNodeFlags.hasHostBindings;\n\n const lifeCycleHooks: Partial<OnChanges & OnInit & DoCheck> = def.type.prototype;\n // Only push a node index into the preOrderHooks array if this is the first\n // pre-order hook found on this node.\n if (\n !preOrderHooksFound &&\n (lifeCycleHooks.ngOnChanges || lifeCycleHooks.ngOnInit || lifeCycleHooks.ngDoCheck)\n ) {\n // We will push the actual hook function into this array later during dir instantiation.\n // We cannot do it now because we must ensure hooks are registered in the same\n // order that directives are created (i.e. injection order).\n (tView.preOrderHooks ??= []).push(tNode.index);\n preOrderHooksFound = true;\n }\n\n if (!preOrderCheckHooksFound && (lifeCycleHooks.ngOnChanges || lifeCycleHooks.ngDoCheck)) {\n (tView.preOrderCheckHooks ??= []).push(tNode.index);\n preOrderCheckHooksFound = true;\n }\n\n directiveIdx++;\n }\n\n initializeInputAndOutputAliases(tView, tNode, hostDirectiveDefs);\n}\n\n/**\n * Initializes data structures required to work with directive inputs and outputs.\n * Initialization is done for all directives matched on a given TNode.\n */\nfunction initializeInputAndOutputAliases(\n tView: TView,\n tNode: TNode,\n hostDirectiveDefs: HostDirectiveDefs | null,\n): void {\n ngDevMode && assertFirstCreatePass(tView);\n\n for (let index = tNode.directiveStart; index < tNode.directiveEnd; index++) {\n const directiveDef = tView.data[index] as DirectiveDef<any>;\n\n if (hostDirectiveDefs === null || !hostDirectiveDefs.has(directiveDef)) {\n setupSelectorMatchedInputsOrOutputs(BindingType.Inputs, tNode, directiveDef, index);\n setupSelectorMatchedInputsOrOutputs(BindingType.Outputs, tNode, directiveDef, index);\n setupInitialInputs(tNode, index, false);\n } else {\n const hostDirectiveDef = hostDirectiveDefs.get(directiveDef)!;\n setupHostDirectiveInputsOrOutputs(BindingType.Inputs, tNode, hostDirectiveDef, index);\n setupHostDirectiveInputsOrOutputs(BindingType.Outputs, tNode, hostDirectiveDef, index);\n setupInitialInputs(tNode, index, true);\n }\n }\n}\n\n/** Types of bindings that can be exposed by a directive. */\nconst enum BindingType {\n Inputs,\n Outputs,\n}\n\n/**\n * Sets up the input/output bindings for a directive that was matched in the template through its\n * selector. This method is called repeatedly to build up all of the available inputs on a node.\n *\n * @param mode Whether inputs or outputs are being contructed.\n * @param tNode Node on which the bindings are being set up.\n * @param def Directive definition for which the bindings are being set up.\n * @param directiveIndex Index at which the directive instance will be stored in the LView.\n */\nfunction setupSelectorMatchedInputsOrOutputs<T>(\n mode: BindingType,\n tNode: TNode,\n def: DirectiveDef<T>,\n directiveIndex: number,\n): void {\n const aliasMap = mode === BindingType.Inputs ? def.inputs : def.outputs;\n\n for (const publicName in aliasMap) {\n if (aliasMap.hasOwnProperty(publicName)) {\n let bindings: NodeInputBindings | NodeOutputBindings;\n if (mode === BindingType.Inputs) {\n bindings = tNode.inputs ??= {};\n } else {\n bindings = tNode.outputs ??= {};\n }\n bindings[publicName] ??= [];\n bindings[publicName].push(directiveIndex);\n setShadowStylingInputFlags(tNode, publicName);\n }\n }\n}\n\n/**\n * Sets up input/output bindings that were defined through host directives on a specific node.\n * @param mode Whether inputs or outputs are being contructed.\n * @param tNode Node on which the bindings are being set up.\n * @param config Host directive definition that is being set up.\n * @param directiveIndex Index at which the directive instance will be stored in the LView.\n */\nfunction setupHostDirectiveInputsOrOutputs(\n mode: BindingType,\n tNode: TNode,\n config: HostDirectiveDef,\n directiveIndex: number,\n): void {\n const aliasMap = mode === BindingType.Inputs ? config.inputs : config.outputs;\n\n for (const initialName in aliasMap) {\n if (aliasMap.hasOwnProperty(initialName)) {\n const publicName = aliasMap[initialName];\n let bindings: HostDirectiveInputs | HostDirectiveOutputs;\n if (mode === BindingType.Inputs) {\n bindings = tNode.hostDirectiveInputs ??= {};\n } else {\n bindings = tNode.hostDirectiveOutputs ??= {};\n }\n bindings[publicName] ??= [];\n bindings[publicName].push(directiveIndex, initialName);\n setShadowStylingInputFlags(tNode, publicName);\n }\n }\n}\n\nfunction setShadowStylingInputFlags(tNode: TNode, publicName: string): void {\n if (publicName === 'class') {\n tNode.flags |= TNodeFlags.hasClassInput;\n } else if (publicName === 'style') {\n tNode.flags |= TNodeFlags.hasStyleInput;\n }\n}\n\n/**\n * Sets up the 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 tNode TNode on which to set up the initial inputs.\n * @param directiveIndex Index of the directive that is currently being processed.\n */\nfunction setupInitialInputs(tNode: TNode, directiveIndex: number, isHostDirective: boolean): void {\n const {attrs, inputs, hostDirectiveInputs} = tNode;\n\n if (\n attrs === null ||\n (!isHostDirective && inputs === null) ||\n (isHostDirective && hostDirectiveInputs === null) ||\n // Do not use unbound attributes as inputs to structural directives, since structural\n // directive inputs can only be set using microsyntax (e.g. `<div *dir=\"exp\">`).\n isInlineTemplate(tNode)\n ) {\n tNode.initialInputs ??= [];\n tNode.initialInputs.push(null);\n return;\n }\n\n let inputsToStore: InitialInputs | null = null;\n let i = 0;\n while (i < attrs.length) {\n const attrName = attrs[i];\n if (attrName === AttributeMarker.NamespaceURI) {\n // We do not allow inputs on namespaced attributes.\n i += 4;\n continue;\n } else if (attrName === AttributeMarker.ProjectAs) {\n // Skip over the `ngProjectAs` value.\n i += 2;\n continue;\n } else if (typeof attrName === 'number') {\n // If we hit any other attribute markers, we're done anyway. None of those are valid inputs.\n break;\n }\n\n if (!isHostDirective && inputs!.hasOwnProperty(attrName as string)) {\n // Find the input's public name from the input store. Note that we can be found easier\n // through the directive def, but we want to do it using the inputs store so that it can\n // account for host directive aliases.\n const inputConfig = inputs![attrName as string];\n\n for (const index of inputConfig) {\n if (index === directiveIndex) {\n inputsToStore ??= [];\n inputsToStore.push(attrName as string, attrs[i + 1] as string);\n // A directive can't have multiple inputs with the same name so we can break here.\n break;\n }\n }\n } else if (isHostDirective && hostDirectiveInputs!.hasOwnProperty(attrName as string)) {\n const config = hostDirectiveInputs![attrName as string];\n for (let j = 0; j < config.length; j += 2) {\n if (config[j] === directiveIndex) {\n inputsToStore ??= [];\n inputsToStore.push(config[j + 1] as string, attrs[i + 1] as string);\n break;\n }\n }\n }\n\n i += 2;\n }\n\n tNode.initialInputs ??= [];\n tNode.initialInputs.push(inputsToStore);\n}\n\n/**\n * Setup directive for instantiation.\n *\n * We need to create a `NodeInjectorFactory` which is then inserted in both the `Blueprint` as well\n * as `LView`. `TView` gets the `DirectiveDef`.\n *\n * @param tView `TView`\n * @param tNode `TNode`\n * @param lView `LView`\n * @param directiveIndex Index where the directive will be stored in the Expando.\n * @param def `DirectiveDef`\n */\nfunction configureViewWithDirective<T>(\n tView: TView,\n tNode: TNode,\n lView: LView,\n directiveIndex: number,\n def: DirectiveDef<T>,\n): void {\n ngDevMode &&\n assertGreaterThanOrEqual(directiveIndex, HEADER_OFFSET, 'Must be in Expando section');\n tView.data[directiveIndex] = def;\n const directiveFactory =\n def.factory || ((def as Writable<DirectiveDef<T>>).factory = getFactoryDef(def.type, true));\n // Even though `directiveFactory` will already be using `ɵɵdirectiveInject` in its generated code,\n // we also want to support `inject()` directly from the directive constructor context so we set\n // `ɵɵdirectiveInject` as the inject implementation here too.\n const nodeInjectorFactory = new NodeInjectorFactory(\n directiveFactory,\n isComponentDef(def),\n ɵɵdirectiveInject,\n );\n tView.blueprint[directiveIndex] = nodeInjectorFactory;\n lView[directiveIndex] = nodeInjectorFactory;\n\n registerHostBindingOpCodes(\n tView,\n tNode,\n directiveIndex,\n allocExpando(tView, lView, def.hostVars, NO_CHANGE),\n def,\n );\n}\n\n/**\n * Add `hostBindings` to the `TView.hostBindingOpCodes`.\n *\n * @param tView `TView` to which the `hostBindings` should be added.\n * @param tNode `TNode` the element which contains the directive\n * @param directiveIdx Directive index in view.\n * @param directiveVarsIdx Where will the directive's vars be stored\n * @param def `ComponentDef`/`DirectiveDef`, which contains the `hostVars`/`hostBindings` to add.\n */\nexport function registerHostBindingOpCodes(\n tView: TView,\n tNode: TNode,\n directiveIdx: number,\n directiveVarsIdx: number,\n def: ComponentDef<any> | DirectiveDef<any>,\n): void {\n ngDevMode && assertFirstCreatePass(tView);\n\n const hostBindings = def.hostBindings;\n if (hostBindings) {\n let hostBindingOpCodes = tView.hostBindingOpCodes;\n if (hostBindingOpCodes === null) {\n hostBindingOpCodes = tView.hostBindingOpCodes = [] as any as HostBindingOpCodes;\n }\n const elementIndx = ~tNode.index;\n if (lastSelectedElementIdx(hostBindingOpCodes) != elementIndx) {\n // Conditionally add select element so that we are more efficient in execution.\n // NOTE: this is strictly not necessary and it trades code size for runtime perf.\n // (We could just always add it.)\n hostBindingOpCodes.push(elementIndx);\n }\n hostBindingOpCodes.push(directiveIdx, directiveVarsIdx, hostBindings);\n }\n}\n\n/**\n * Returns the last selected element index in the `HostBindingOpCodes`\n *\n * For perf reasons we don't need to update the selected element index in `HostBindingOpCodes` only\n * if it changes. This method returns the last index (or '0' if not found.)\n *\n * Selected element index are only the ones which are negative.\n */\nfunction lastSelectedElementIdx(hostBindingOpCodes: HostBindingOpCodes): number {\n let i = hostBindingOpCodes.length;\n while (i > 0) {\n const value = hostBindingOpCodes[--i];\n if (typeof value === 'number' && value < 0) {\n return value;\n }\n }\n return 0;\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(\n directiveIdx: number,\n def: DirectiveDef<any> | ComponentDef<any>,\n exportsMap: {[key: string]: number} | null,\n) {\n if (exportsMap) {\n if (def.exportAs) {\n for (let i = 0; i < def.exportAs.length; i++) {\n exportsMap[def.exportAs[i]] = directiveIdx;\n }\n }\n if (isComponentDef(def)) exportsMap[''] = directiveIdx;\n }\n}\n\n/**\n * Initializes the flags on the current node, setting all indices to the initial index,\n * the directive count to 0, and adding the isComponent flag.\n * @param index the initial index\n */\nfunction initTNodeFlags(tNode: TNode, index: number, numberOfDirectives: number) {\n ngDevMode &&\n assertNotEqual(\n numberOfDirectives,\n tNode.directiveEnd - tNode.directiveStart,\n 'Reached the max number of directives',\n );\n tNode.flags |= TNodeFlags.isDirectiveHost;\n // When the first directive is created on a node, save the index\n tNode.directiveStart = index;\n tNode.directiveEnd = index + numberOfDirectives;\n tNode.providerIndexes = index;\n}\n\nexport function assertNoDuplicateDirectives(directives: DirectiveDef<unknown>[]): void {\n // The array needs at least two elements in order to have duplicates.\n if (directives.length < 2) {\n return;\n }\n\n const seenDirectives = new Set<DirectiveDef<unknown>>();\n\n for (const current of directives) {\n if (seenDirectives.has(current)) {\n throw new RuntimeError(\n RuntimeErrorCode.DUPLICATE_DIRECTIVE,\n `Directive ${current.type.name} matches multiple times on the same element. ` +\n `Directives can only match an element once.`,\n );\n }\n seenDirectives.add(current);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {assertFirstCreatePass} from '../assert';\nimport {registerPostOrderHooks} from '../hooks';\nimport {TAttributes, TNode, TNodeType, type TElementNode} from '../interfaces/node';\nimport {isContentQueryHost} from '../interfaces/type_checks';\nimport type {LView, TView} from '../interfaces/view';\nimport {computeStaticStyling} from '../styling/static_styling';\nimport {getOrCreateTNode} from '../tnode_manipulation';\nimport {mergeHostAttrs} from '../util/attrs_utils';\nimport {getConstant} from '../util/view_utils';\nimport {resolveDirectives, type DirectiveMatcherStrategy} from './directives';\n\nexport function elementStartFirstCreatePass(\n index: number,\n tView: TView,\n lView: LView,\n name: string,\n directiveMatcher: DirectiveMatcherStrategy,\n bindingsEnabled: boolean,\n attrsIndex?: number | null,\n localRefsIndex?: number,\n): TElementNode {\n ngDevMode && assertFirstCreatePass(tView);\n ngDevMode && ngDevMode.firstCreatePass++;\n\n const tViewConsts = tView.consts;\n const attrs = getConstant<TAttributes>(tViewConsts, attrsIndex);\n const tNode = getOrCreateTNode(tView, index, TNodeType.Element, name, attrs);\n\n if (bindingsEnabled) {\n resolveDirectives(\n tView,\n lView,\n tNode,\n getConstant<string[]>(tViewConsts, localRefsIndex),\n directiveMatcher,\n );\n }\n\n // Merge the template attrs last so that they have the highest priority.\n tNode.mergedAttrs = mergeHostAttrs(tNode.mergedAttrs, tNode.attrs);\n\n if (tNode.attrs !== null) {\n computeStaticStyling(tNode, tNode.attrs, false);\n }\n\n if (tNode.mergedAttrs !== null) {\n computeStaticStyling(tNode, tNode.mergedAttrs, true);\n }\n\n if (tView.queries !== null) {\n tView.queries.elementStart(tView, tNode);\n }\n\n return tNode;\n}\n\nexport function elementEndFirstCreatePass(tView: TView, tNode: TNode) {\n ngDevMode && assertFirstCreatePass(tView);\n registerPostOrderHooks(tView, tNode);\n if (isContentQueryHost(tNode)) {\n tView.queries!.elementEnd(tNode);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {setActiveConsumer} from '../../primitives/signals';\n\nimport {ChangeDetectorRef} from '../change_detection/change_detector_ref';\nimport {\n ChangeDetectionScheduler,\n NotificationSource,\n} from '../change_detection/scheduling/zoneless_scheduling';\nimport {Injector} from '../di/injector';\nimport {EnvironmentInjector} from '../di/r3_injector';\nimport {RuntimeError, RuntimeErrorCode} from '../errors';\nimport {Type} from '../interface/type';\nimport {\n ComponentFactory as AbstractComponentFactory,\n ComponentRef as AbstractComponentRef,\n} from '../linker/component_factory';\nimport {ComponentFactoryResolver as AbstractComponentFactoryResolver} from '../linker/component_factory_resolver';\nimport {createElementRef, ElementRef} from '../linker/element_ref';\nimport {NgModuleRef} from '../linker/ng_module_factory';\nimport {RendererFactory2} from '../render/api';\nimport {Sanitizer} from '../sanitization/sanitizer';\n\nimport {assertComponentType} from './assert';\nimport {attachPatchData} from './context_discovery';\nimport {getComponentDef} from './def_getters';\nimport {depsTracker} from './deps_tracker/deps_tracker';\nimport {NodeInjector} from './di';\nimport {reportUnknownPropertyError} from './instructions/element_validation';\nimport {markViewDirty} from './instructions/mark_view_dirty';\nimport {renderView} from './instructions/render';\nimport {\n createDirectivesInstances,\n locateHostElement,\n setAllInputsForProperty,\n} from './instructions/shared';\nimport {ComponentDef, DirectiveDef} from './interfaces/definition';\nimport {InputFlags} from './interfaces/input_flags';\nimport {TContainerNode, TElementContainerNode, TElementNode, TNode} from './interfaces/node';\nimport {RElement, RNode} from './interfaces/renderer_dom';\nimport {\n CONTEXT,\n HEADER_OFFSET,\n LView,\n LViewEnvironment,\n LViewFlags,\n TVIEW,\n TViewType,\n} from './interfaces/view';\nimport {MATH_ML_NAMESPACE, SVG_NAMESPACE} from './namespaces';\n\nimport {retrieveHydrationInfo} from '../hydration/utils';\nimport {ChainedInjector} from './chained_injector';\nimport {createElementNode, setupStaticAttributes} from './dom_node_manipulation';\nimport {unregisterLView} from './interfaces/lview_tracking';\nimport {Renderer} from './interfaces/renderer';\nimport {\n extractAttrsAndClassesFromSelector,\n stringifyCSSSelectorList,\n} from './node_selector_matcher';\nimport {profiler} from './profiler';\nimport {ProfilerEvent} from './profiler_types';\nimport {executeContentQueries} from './queries/query_execution';\nimport {enterView, leaveView} from './state';\nimport {debugStringifyTypeForError, stringifyForError} from './util/stringify_utils';\nimport {getComponentLViewByIndex, getTNode} from './util/view_utils';\nimport {elementEndFirstCreatePass, elementStartFirstCreatePass} from './view/elements';\nimport {ViewRef} from './view_ref';\nimport {createLView, createTView, getInitialLViewFlagsFromDef} from './view/construction';\n\nexport class ComponentFactoryResolver extends AbstractComponentFactoryResolver {\n /**\n * @param ngModule The NgModuleRef to which all resolved factories are bound.\n */\n constructor(private ngModule?: NgModuleRef<any>) {\n super();\n }\n\n override resolveComponentFactory<T>(component: Type<T>): AbstractComponentFactory<T> {\n ngDevMode && assertComponentType(component);\n const componentDef = getComponentDef(component)!;\n return new ComponentFactory(componentDef, this.ngModule);\n }\n}\n\nfunction toInputRefArray<T>(map: DirectiveDef<T>['inputs']): ComponentFactory<T>['inputs'] {\n return Object.keys(map).map((name) => {\n const [propName, flags, transform] = map[name];\n const inputData: ComponentFactory<T>['inputs'][0] = {\n propName: propName,\n templateName: name,\n isSignal: (flags & InputFlags.SignalBased) !== 0,\n };\n if (transform) {\n inputData.transform = transform;\n }\n return inputData;\n });\n}\n\nfunction toOutputRefArray<T>(map: DirectiveDef<T>['outputs']): ComponentFactory<T>['outputs'] {\n return Object.keys(map).map((name) => ({propName: map[name], templateName: name}));\n}\n\nfunction verifyNotAnOrphanComponent(componentDef: ComponentDef<unknown>) {\n // TODO(pk): create assert that verifies ngDevMode\n if (\n (typeof ngJitMode === 'undefined' || ngJitMode) &&\n componentDef.debugInfo?.forbidOrphanRendering\n ) {\n if (depsTracker.isOrphanComponent(componentDef.type)) {\n throw new RuntimeError(\n RuntimeErrorCode.RUNTIME_DEPS_ORPHAN_COMPONENT,\n `Orphan component found! Trying to render the component ${debugStringifyTypeForError(\n componentDef.type,\n )} without first loading the NgModule that declares it. It is recommended to make this component standalone in order to avoid this error. If this is not possible now, import the component's NgModule in the appropriate NgModule, or the standalone component in which you are trying to render this component. If this is a lazy import, load the NgModule lazily as well and use its module injector.`,\n );\n }\n }\n}\n\nfunction createRootViewInjector(\n componentDef: ComponentDef<unknown>,\n environmentInjector: EnvironmentInjector | NgModuleRef<any> | undefined,\n injector: Injector,\n): Injector {\n let realEnvironmentInjector =\n environmentInjector instanceof EnvironmentInjector\n ? environmentInjector\n : environmentInjector?.injector;\n\n if (realEnvironmentInjector && componentDef.getStandaloneInjector !== null) {\n realEnvironmentInjector =\n componentDef.getStandaloneInjector(realEnvironmentInjector) || realEnvironmentInjector;\n }\n\n const rootViewInjector = realEnvironmentInjector\n ? new ChainedInjector(injector, realEnvironmentInjector)\n : injector;\n return rootViewInjector;\n}\n\nfunction createRootLViewEnvironment(rootLViewInjector: Injector): LViewEnvironment {\n const rendererFactory = rootLViewInjector.get(RendererFactory2, null);\n if (rendererFactory === null) {\n throw new RuntimeError(\n RuntimeErrorCode.RENDERER_NOT_FOUND,\n ngDevMode &&\n 'Angular was not able to inject a renderer (RendererFactory2). ' +\n 'Likely this is due to a broken DI hierarchy. ' +\n 'Make sure that any injector used to create this component has a correct parent.',\n );\n }\n\n const sanitizer = rootLViewInjector.get(Sanitizer, null);\n const changeDetectionScheduler = rootLViewInjector.get(ChangeDetectionScheduler, null);\n\n return {\n rendererFactory,\n sanitizer,\n changeDetectionScheduler,\n };\n}\n\nfunction createHostElement(componentDef: ComponentDef<unknown>, render: Renderer): RElement {\n // Determine a tag name used for creating host elements when this component is created\n // dynamically. Default to 'div' if this component did not specify any tag name in its\n // selector.\n const tagName = ((componentDef.selectors[0][0] as string) || 'div').toLowerCase();\n const namespace =\n tagName === 'svg' ? SVG_NAMESPACE : tagName === 'math' ? MATH_ML_NAMESPACE : null;\n return createElementNode(render, tagName, namespace);\n}\n\n/**\n * ComponentFactory interface implementation.\n */\nexport class ComponentFactory<T> extends AbstractComponentFactory<T> {\n override selector: string;\n override componentType: Type<any>;\n override ngContentSelectors: string[];\n isBoundToModule: boolean;\n private cachedInputs:\n | {\n propName: string;\n templateName: string;\n isSignal: boolean;\n transform?: (value: any) => any;\n }[]\n | null = null;\n private cachedOutputs: {propName: string; templateName: string}[] | null = null;\n\n override get inputs(): {\n propName: string;\n templateName: string;\n isSignal: boolean;\n transform?: (value: any) => any;\n }[] {\n this.cachedInputs ??= toInputRefArray(this.componentDef.inputs);\n return this.cachedInputs;\n }\n\n override get outputs(): {propName: string; templateName: string}[] {\n this.cachedOutputs ??= toOutputRefArray(this.componentDef.outputs);\n return this.cachedOutputs;\n }\n\n /**\n * @param componentDef The component definition.\n * @param ngModule The NgModuleRef to which the factory is bound.\n */\n constructor(\n private componentDef: ComponentDef<any>,\n private ngModule?: NgModuleRef<any>,\n ) {\n super();\n this.componentType = componentDef.type;\n this.selector = stringifyCSSSelectorList(componentDef.selectors);\n this.ngContentSelectors = componentDef.ngContentSelectors ?? [];\n this.isBoundToModule = !!ngModule;\n }\n\n override create(\n injector: Injector,\n projectableNodes?: any[][] | undefined,\n rootSelectorOrNode?: any,\n environmentInjector?: NgModuleRef<any> | EnvironmentInjector | undefined,\n ): AbstractComponentRef<T> {\n profiler(ProfilerEvent.DynamicComponentStart);\n\n const prevConsumer = setActiveConsumer(null);\n try {\n const cmpDef = this.componentDef;\n ngDevMode && verifyNotAnOrphanComponent(cmpDef);\n\n const tAttributes = rootSelectorOrNode\n ? ['ng-version', '19.2.13']\n : // Extract attributes and classes from the first selector only to match VE behavior.\n extractAttrsAndClassesFromSelector(this.componentDef.selectors[0]);\n // Create the root view. Uses empty TView and ContentTemplate.\n const rootTView = createTView(\n TViewType.Root,\n null,\n null,\n 1,\n 0,\n null,\n null,\n null,\n null,\n [tAttributes],\n null,\n );\n\n const rootViewInjector = createRootViewInjector(\n cmpDef,\n environmentInjector || this.ngModule,\n injector,\n );\n\n const environment = createRootLViewEnvironment(rootViewInjector);\n const hostRenderer = environment.rendererFactory.createRenderer(null, cmpDef);\n const hostElement = rootSelectorOrNode\n ? locateHostElement(\n hostRenderer,\n rootSelectorOrNode,\n cmpDef.encapsulation,\n rootViewInjector,\n )\n : createHostElement(cmpDef, hostRenderer);\n\n const rootLView = createLView<T>(\n null,\n rootTView,\n null,\n LViewFlags.IsRoot | getInitialLViewFlagsFromDef(cmpDef),\n null,\n null,\n environment,\n hostRenderer,\n rootViewInjector,\n null,\n retrieveHydrationInfo(hostElement, rootViewInjector, true /* isRootView */),\n );\n\n rootLView[HEADER_OFFSET] = hostElement;\n\n // rootView is the parent when bootstrapping\n // TODO(misko): it looks like we are entering view here but we don't really need to as\n // `renderView` does that. However as the code is written it is needed because\n // `createRootComponentView` and `createRootComponent` both read global state. Fixing those\n // issues would allow us to drop this.\n enterView(rootLView);\n\n let componentView: LView | null = null;\n\n try {\n const hostTNode = elementStartFirstCreatePass(\n HEADER_OFFSET,\n rootTView,\n rootLView,\n '#host',\n () => [this.componentDef],\n true,\n 0,\n );\n\n // ---- element instruction\n\n // TODO(crisbeto): in practice `hostRNode` should always be defined, but there are some\n // tests where the renderer is mocked out and `undefined` is returned. We should update the\n // tests so that this check can be removed.\n if (hostElement) {\n setupStaticAttributes(hostRenderer, hostElement, hostTNode);\n attachPatchData(hostElement, rootLView);\n }\n\n // TODO(pk): this logic is similar to the instruction code where a node can have directives\n createDirectivesInstances(rootTView, rootLView, hostTNode);\n executeContentQueries(rootTView, hostTNode, rootLView);\n\n elementEndFirstCreatePass(rootTView, hostTNode);\n\n if (projectableNodes !== undefined) {\n projectNodes(hostTNode, this.ngContentSelectors, projectableNodes);\n }\n\n componentView = getComponentLViewByIndex(hostTNode.index, rootLView);\n\n // TODO(pk): why do we need this logic?\n rootLView[CONTEXT] = componentView[CONTEXT] as T;\n\n renderView(rootTView, rootLView, null);\n } catch (e) {\n // Stop tracking the views if creation failed since\n // the consumer won't have a way to dereference them.\n if (componentView !== null) {\n unregisterLView(componentView);\n }\n unregisterLView(rootLView);\n throw e;\n } finally {\n profiler(ProfilerEvent.DynamicComponentEnd);\n leaveView();\n }\n\n return new ComponentRef(this.componentType, rootLView);\n } finally {\n setActiveConsumer(prevConsumer);\n }\n }\n}\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 */\nexport class ComponentRef<T> extends AbstractComponentRef<T> {\n override instance: T;\n override hostView: ViewRef<T>;\n override changeDetectorRef: ChangeDetectorRef;\n override componentType: Type<T>;\n override location: ElementRef;\n private previousInputValues: Map<string, unknown> | null = null;\n private _tNode: TElementNode | TContainerNode | TElementContainerNode;\n\n constructor(\n componentType: Type<T>,\n private _rootLView: LView,\n ) {\n super();\n this._tNode = getTNode(_rootLView[TVIEW], HEADER_OFFSET) as TElementNode;\n this.location = createElementRef(this._tNode, _rootLView);\n this.instance = getComponentLViewByIndex(this._tNode.index, _rootLView)[CONTEXT] as T;\n this.hostView = this.changeDetectorRef = new ViewRef<T>(\n _rootLView,\n undefined /* _cdRefInjectingView */,\n false /* notifyErrorHandler */,\n );\n this.componentType = componentType;\n }\n\n override setInput(name: string, value: unknown): void {\n const tNode = this._tNode;\n this.previousInputValues ??= new Map();\n // Do not set the input if it is the same as the last value\n // This behavior matches `bindingUpdated` when binding inputs in templates.\n if (\n this.previousInputValues.has(name) &&\n Object.is(this.previousInputValues.get(name), value)\n ) {\n return;\n }\n\n const lView = this._rootLView;\n const hasSetInput = setAllInputsForProperty(tNode, lView[TVIEW], lView, name, value);\n this.previousInputValues.set(name, value);\n const childComponentLView = getComponentLViewByIndex(tNode.index, lView);\n markViewDirty(childComponentLView, NotificationSource.SetInput);\n\n if (ngDevMode && !hasSetInput) {\n const cmpNameForError = stringifyForError(this.componentType);\n let message = `Can't set value of the '${name}' input on the '${cmpNameForError}' component. `;\n message += `Make sure that the '${name}' property is annotated with @Input() or a mapped @Input('${name}') exists.`;\n reportUnknownPropertyError(message);\n }\n }\n\n override get injector(): Injector {\n return new NodeInjector(this._tNode, this._rootLView);\n }\n\n override destroy(): void {\n this.hostView.destroy();\n }\n\n override onDestroy(callback: () => void): void {\n this.hostView.onDestroy(callback);\n }\n}\n\n/** Projects the `projectableNodes` that were specified when creating a root component. */\nfunction projectNodes(\n tNode: TElementNode,\n ngContentSelectors: string[],\n projectableNodes: any[][],\n) {\n const projection: (TNode | RNode[] | null)[] = (tNode.projection = []);\n for (let i = 0; i < ngContentSelectors.length; i++) {\n const nodesforSlot = projectableNodes[i];\n // Projectable nodes can be passed as array of arrays or an array of iterables (ngUpgrade\n // case). Here we do normalize passed data structure to be an array of arrays to avoid\n // complex checks down the line.\n // We also normalize the length of the passed in projectable nodes (to match the number of\n // <ng-container> slots defined by a component).\n projection.push(nodesforSlot != null && nodesforSlot.length ? Array.from(nodesforSlot) : null);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Injector} from '../di/injector';\nimport {EnvironmentInjector} from '../di/r3_injector';\nimport {validateMatchingNode} from '../hydration/error_handling';\nimport {CONTAINERS} from '../hydration/interfaces';\nimport {isInSkipHydrationBlock} from '../hydration/skip_hydration';\nimport {\n getSegmentHead,\n isDisconnectedNode,\n markRNodeAsClaimedByHydration,\n} from '../hydration/utils';\nimport {findMatchingDehydratedView, locateDehydratedViewsInContainer} from '../hydration/views';\nimport {isType, Type} from '../interface/type';\nimport {assertNodeInjector} from '../render3/assert';\nimport {ComponentFactory as R3ComponentFactory} from '../render3/component_ref';\nimport {getComponentDef} from '../render3/def_getters';\nimport {getParentInjectorLocation, NodeInjector} from '../render3/di';\nimport {\n CONTAINER_HEADER_OFFSET,\n DEHYDRATED_VIEWS,\n LContainer,\n NATIVE,\n VIEW_REFS,\n} from '../render3/interfaces/container';\nimport {NodeInjectorOffset} from '../render3/interfaces/injector';\nimport {\n TContainerNode,\n TDirectiveHostNode,\n TElementContainerNode,\n TElementNode,\n TNode,\n TNodeType,\n} from '../render3/interfaces/node';\nimport {RComment, RNode} from '../render3/interfaces/renderer_dom';\nimport {isLContainer} from '../render3/interfaces/type_checks';\nimport {\n HEADER_OFFSET,\n HYDRATION,\n LView,\n PARENT,\n RENDERER,\n T_HOST,\n TVIEW,\n} from '../render3/interfaces/view';\nimport {assertTNodeType} from '../render3/node_assert';\nimport {destroyLView} from '../render3/node_manipulation';\nimport {nativeInsertBefore} from '../render3/dom_node_manipulation';\nimport {getCurrentTNode, getLView} from '../render3/state';\nimport {\n getParentInjectorIndex,\n getParentInjectorView,\n hasParentInjector,\n} from '../render3/util/injector_utils';\nimport {getNativeByTNode, unwrapRNode, viewAttachedToContainer} from '../render3/util/view_utils';\nimport {shouldAddViewToDom} from '../render3/view_manipulation';\nimport {ViewRef as R3ViewRef} from '../render3/view_ref';\nimport {addToArray, removeFromArray} from '../util/array_utils';\nimport {\n assertDefined,\n assertEqual,\n assertGreaterThan,\n assertLessThan,\n throwError,\n} from '../util/assert';\n\nimport {ComponentFactory, ComponentRef} from './component_factory';\nimport {createElementRef, ElementRef} from './element_ref';\nimport {NgModuleRef} from './ng_module_factory';\nimport {TemplateRef} from './template_ref';\nimport {EmbeddedViewRef, ViewRef} from './view_ref';\nimport {addLViewToLContainer, createLContainer, detachView} from '../render3/view/container';\nimport {addToEndOfViewTree} from '../render3/view/construction';\n\n/**\n * Represents a container where one or more views can be attached to a component.\n *\n * Can contain *host views* (created by instantiating a\n * component with the `createComponent()` method), and *embedded views*\n * (created by instantiating a `TemplateRef` with the `createEmbeddedView()` method).\n *\n * A view container instance can contain other view containers,\n * creating a view hierarchy.\n *\n * @usageNotes\n *\n * The example below demonstrates how the `createComponent` function can be used\n * to create an instance of a ComponentRef dynamically and attach it to an ApplicationRef,\n * so that it gets included into change detection cycles.\n *\n * Note: the example uses standalone components, but the function can also be used for\n * non-standalone components (declared in an NgModule) as well.\n *\n * ```angular-ts\n * @Component({\n * standalone: true,\n * selector: 'dynamic',\n * template: `<span>This is a content of a dynamic component.</span>`,\n * })\n * class DynamicComponent {\n * vcr = inject(ViewContainerRef);\n * }\n *\n * @Component({\n * standalone: true,\n * selector: 'app',\n * template: `<main>Hi! This is the main content.</main>`,\n * })\n * class AppComponent {\n * vcr = inject(ViewContainerRef);\n *\n * ngAfterViewInit() {\n * const compRef = this.vcr.createComponent(DynamicComponent);\n * compRef.changeDetectorRef.detectChanges();\n * }\n * }\n * ```\n *\n * @see {@link ComponentRef}\n * @see {@link EmbeddedViewRef}\n *\n * @publicApi\n */\nexport abstract class ViewContainerRef {\n /**\n * Anchor element that specifies the location of this container in the containing view.\n * Each view container can have only one anchor element, and each anchor element\n * can have only 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 * Access the `ViewContainerRef` of an element by placing a `Directive` injected\n * with `ViewContainerRef` on the element, or use a `ViewChild` query.\n *\n * <!-- TODO: rename to anchorElement -->\n */\n abstract get element(): ElementRef;\n\n /**\n * The dependency injector for this view container.\n */\n abstract get injector(): Injector;\n\n /** @deprecated No replacement */\n abstract get parentInjector(): Injector;\n\n /**\n * Destroys all views in this container.\n */\n abstract clear(): void;\n\n /**\n * Retrieves a view from this container.\n * @param index The 0-based index of the view to retrieve.\n * @returns The `ViewRef` instance, or null if the index is out of range.\n */\n abstract get(index: number): ViewRef | null;\n\n /**\n * Reports how many views are currently attached to this container.\n * @returns The number of views.\n */\n abstract get length(): number;\n\n /**\n * Instantiates an embedded view and inserts it\n * into this container.\n * @param templateRef The HTML template that defines the view.\n * @param context The data-binding context of the embedded view, as declared\n * in the `<ng-template>` usage.\n * @param options Extra configuration for the created view. Includes:\n * * index: The 0-based index at which to insert the new view into this container.\n * If not specified, appends the new view as the last entry.\n * * injector: Injector to be used within the embedded view.\n *\n * @returns The `ViewRef` instance for the newly created view.\n */\n abstract createEmbeddedView<C>(\n templateRef: TemplateRef<C>,\n context?: C,\n options?: {\n index?: number;\n injector?: Injector;\n },\n ): EmbeddedViewRef<C>;\n\n /**\n * Instantiates an embedded view and inserts it\n * into this container.\n * @param templateRef The HTML template that defines the view.\n * @param context The data-binding context of the embedded view, as declared\n * in the `<ng-template>` usage.\n * @param index The 0-based index at which to insert the new view into this container.\n * If not specified, appends the new view as the last entry.\n *\n * @returns The `ViewRef` instance for the newly created view.\n */\n abstract createEmbeddedView<C>(\n templateRef: TemplateRef<C>,\n context?: C,\n index?: number,\n ): EmbeddedViewRef<C>;\n\n /**\n * Instantiates a component and inserts its host view into this view container.\n *\n * @param componentType Component Type to use.\n * @param options An object that contains extra parameters:\n * * index: the index at which to insert the new component's host view into this container.\n * If not specified, appends the new view as the last entry.\n * * injector: the injector to use as the parent for the new component.\n * * ngModuleRef: an NgModuleRef of the component's NgModule, you should almost always provide\n * this to ensure that all expected providers are available for the component\n * instantiation.\n * * environmentInjector: an EnvironmentInjector which will provide the component's environment.\n * you should almost always provide this to ensure that all expected providers\n * are available for the component instantiation. This option is intended to\n * replace the `ngModuleRef` parameter.\n * * projectableNodes: list of DOM nodes that should be projected through\n * [`<ng-content>`](api/core/ng-content) of the new component instance.\n *\n * @returns The new `ComponentRef` which contains the component instance and the host view.\n */\n abstract createComponent<C>(\n componentType: Type<C>,\n options?: {\n index?: number;\n injector?: Injector;\n ngModuleRef?: NgModuleRef<unknown>;\n environmentInjector?: EnvironmentInjector | NgModuleRef<unknown>;\n projectableNodes?: Node[][];\n },\n ): ComponentRef<C>;\n\n /**\n * Instantiates a single component and inserts its host view into this container.\n *\n * @param componentFactory Component factory to use.\n * @param index The index at which to insert the new component's host view into this container.\n * If not specified, appends the new view as the last entry.\n * @param injector The injector to use as the parent for the new component.\n * @param projectableNodes List of DOM nodes that should be projected through\n * [`<ng-content>`](api/core/ng-content) of the new component instance.\n * @param ngModuleRef An instance of the NgModuleRef that represent an NgModule.\n * This information is used to retrieve corresponding NgModule injector.\n *\n * @returns The new `ComponentRef` which contains the component instance and the host view.\n *\n * @deprecated Angular no longer requires component factories to dynamically create components.\n * Use different signature of the `createComponent` method, which allows passing\n * Component class directly.\n */\n abstract createComponent<C>(\n componentFactory: ComponentFactory<C>,\n index?: number,\n injector?: Injector,\n projectableNodes?: any[][],\n environmentInjector?: EnvironmentInjector | NgModuleRef<any>,\n ): ComponentRef<C>;\n\n /**\n * Inserts a view into this container.\n * @param viewRef The view to insert.\n * @param index The 0-based index at which to insert the view.\n * If not specified, appends the new view as the last entry.\n * @returns The inserted `ViewRef` instance.\n *\n */\n abstract insert(viewRef: ViewRef, index?: number): ViewRef;\n\n /**\n * Moves a view to a new location in this container.\n * @param viewRef The view to move.\n * @param index The 0-based index of the new location.\n * @returns The moved `ViewRef` instance.\n */\n abstract move(viewRef: ViewRef, currentIndex: number): ViewRef;\n\n /**\n * Returns the index of a view within the current container.\n * @param viewRef The view to query.\n * @returns The 0-based index of the view's position in this container,\n * or `-1` if this container doesn't contain the view.\n */\n abstract indexOf(viewRef: ViewRef): number;\n\n /**\n * Destroys a view attached to this container\n * @param index The 0-based index of the view to destroy.\n * If not specified, the last view in the container is removed.\n */\n abstract remove(index?: number): void;\n\n /**\n * Detaches a view from this container without destroying it.\n * Use along with `insert()` to move a view within the current container.\n * @param index The 0-based index of the view to detach.\n * If not specified, the last view in the container is detached.\n */\n abstract detach(index?: number): ViewRef | null;\n\n /**\n * @internal\n * @nocollapse\n */\n static __NG_ELEMENT_ID__: () => ViewContainerRef = injectViewContainerRef;\n}\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 */\nexport function injectViewContainerRef(): ViewContainerRef {\n const previousTNode = getCurrentTNode() as TElementNode | TElementContainerNode | TContainerNode;\n return createContainerRef(previousTNode, getLView());\n}\n\nconst VE_ViewContainerRef = ViewContainerRef;\n\n// TODO(alxhub): cleaning up this indirection triggers a subtle bug in Closure in g3. Once the fix\n// for that lands, this can be cleaned up.\nconst R3ViewContainerRef = class ViewContainerRef extends VE_ViewContainerRef {\n constructor(\n private _lContainer: LContainer,\n private _hostTNode: TElementNode | TContainerNode | TElementContainerNode,\n private _hostLView: LView,\n ) {\n super();\n }\n\n override get element(): ElementRef {\n return createElementRef(this._hostTNode, this._hostLView);\n }\n\n override get injector(): Injector {\n return new NodeInjector(this._hostTNode, this._hostLView);\n }\n\n /** @deprecated No replacement */\n override get parentInjector(): Injector {\n const parentLocation = getParentInjectorLocation(this._hostTNode, this._hostLView);\n if (hasParentInjector(parentLocation)) {\n const parentView = getParentInjectorView(parentLocation, this._hostLView);\n const injectorIndex = getParentInjectorIndex(parentLocation);\n ngDevMode && assertNodeInjector(parentView, injectorIndex);\n const parentTNode = parentView[TVIEW].data[\n injectorIndex + NodeInjectorOffset.TNODE\n ] as TElementNode;\n return new NodeInjector(parentTNode, parentView);\n } else {\n return new NodeInjector(null, this._hostLView);\n }\n }\n\n override clear(): void {\n while (this.length > 0) {\n this.remove(this.length - 1);\n }\n }\n\n override get(index: number): ViewRef | null {\n const viewRefs = getViewRefs(this._lContainer);\n return (viewRefs !== null && viewRefs[index]) || null;\n }\n\n override get length(): number {\n return this._lContainer.length - CONTAINER_HEADER_OFFSET;\n }\n\n override createEmbeddedView<C>(\n templateRef: TemplateRef<C>,\n context?: C,\n options?: {\n index?: number;\n injector?: Injector;\n },\n ): EmbeddedViewRef<C>;\n override createEmbeddedView<C>(\n templateRef: TemplateRef<C>,\n context?: C,\n index?: number,\n ): EmbeddedViewRef<C>;\n override createEmbeddedView<C>(\n templateRef: TemplateRef<C>,\n context?: C,\n indexOrOptions?:\n | number\n | {\n index?: number;\n injector?: Injector;\n },\n ): EmbeddedViewRef<C> {\n let index: number | undefined;\n let injector: Injector | undefined;\n\n if (typeof indexOrOptions === 'number') {\n index = indexOrOptions;\n } else if (indexOrOptions != null) {\n index = indexOrOptions.index;\n injector = indexOrOptions.injector;\n }\n\n const dehydratedView = findMatchingDehydratedView(this._lContainer, templateRef.ssrId);\n const viewRef = templateRef.createEmbeddedViewImpl(\n context || <any>{},\n injector,\n dehydratedView,\n );\n this.insertImpl(viewRef, index, shouldAddViewToDom(this._hostTNode, dehydratedView));\n return viewRef;\n }\n\n override createComponent<C>(\n componentType: Type<C>,\n options?: {\n index?: number;\n injector?: Injector;\n projectableNodes?: Node[][];\n ngModuleRef?: NgModuleRef<unknown>;\n },\n ): ComponentRef<C>;\n /**\n * @deprecated Angular no longer requires component factories to dynamically create components.\n * Use different signature of the `createComponent` method, which allows passing\n * Component class directly.\n */\n override createComponent<C>(\n componentFactory: ComponentFactory<C>,\n index?: number | undefined,\n injector?: Injector | undefined,\n projectableNodes?: any[][] | undefined,\n environmentInjector?: EnvironmentInjector | NgModuleRef<any> | undefined,\n ): ComponentRef<C>;\n override createComponent<C>(\n componentFactoryOrType: ComponentFactory<C> | Type<C>,\n indexOrOptions?:\n | number\n | undefined\n | {\n index?: number;\n injector?: Injector;\n ngModuleRef?: NgModuleRef<unknown>;\n environmentInjector?: EnvironmentInjector | NgModuleRef<unknown>;\n projectableNodes?: Node[][];\n },\n injector?: Injector | undefined,\n projectableNodes?: any[][] | undefined,\n environmentInjector?: EnvironmentInjector | NgModuleRef<any> | undefined,\n ): ComponentRef<C> {\n const isComponentFactory = componentFactoryOrType && !isType(componentFactoryOrType);\n let index: number | undefined;\n\n // This function supports 2 signatures and we need to handle options correctly for both:\n // 1. When first argument is a Component type. This signature also requires extra\n // options to be provided as object (more ergonomic option).\n // 2. First argument is a Component factory. In this case extra options are represented as\n // positional arguments. This signature is less ergonomic and will be deprecated.\n if (isComponentFactory) {\n if (ngDevMode) {\n assertEqual(\n typeof indexOrOptions !== 'object',\n true,\n 'It looks like Component factory was provided as the first argument ' +\n 'and an options object as the second argument. This combination of arguments ' +\n 'is incompatible. You can either change the first argument to provide Component ' +\n 'type or change the second argument to be a number (representing an index at ' +\n \"which to insert the new component's host view into this container)\",\n );\n }\n index = indexOrOptions as number | undefined;\n } else {\n if (ngDevMode) {\n assertDefined(\n getComponentDef(componentFactoryOrType),\n `Provided Component class doesn't contain Component definition. ` +\n `Please check whether provided class has @Component decorator.`,\n );\n assertEqual(\n typeof indexOrOptions !== 'number',\n true,\n 'It looks like Component type was provided as the first argument ' +\n \"and a number (representing an index at which to insert the new component's \" +\n 'host view into this container as the second argument. This combination of arguments ' +\n 'is incompatible. Please use an object as the second argument instead.',\n );\n }\n const options = (indexOrOptions || {}) as {\n index?: number;\n injector?: Injector;\n ngModuleRef?: NgModuleRef<unknown>;\n environmentInjector?: EnvironmentInjector | NgModuleRef<unknown>;\n projectableNodes?: Node[][];\n };\n if (ngDevMode && options.environmentInjector && options.ngModuleRef) {\n throwError(\n `Cannot pass both environmentInjector and ngModuleRef options to createComponent().`,\n );\n }\n index = options.index;\n injector = options.injector;\n projectableNodes = options.projectableNodes;\n environmentInjector = options.environmentInjector || options.ngModuleRef;\n }\n\n const componentFactory: ComponentFactory<C> = isComponentFactory\n ? (componentFactoryOrType as ComponentFactory<C>)\n : new R3ComponentFactory(getComponentDef(componentFactoryOrType)!);\n const contextInjector = injector || this.parentInjector;\n\n // If an `NgModuleRef` is not provided explicitly, try retrieving it from the DI tree.\n if (!environmentInjector && (componentFactory as any).ngModule == null) {\n // For the `ComponentFactory` case, entering this logic is very unlikely, since we expect that\n // an instance of a `ComponentFactory`, resolved via `ComponentFactoryResolver` would have an\n // `ngModule` field. This is possible in some test scenarios and potentially in some JIT-based\n // use-cases. For the `ComponentFactory` case we preserve backwards-compatibility and try\n // using a provided injector first, then fall back to the parent injector of this\n // `ViewContainerRef` instance.\n //\n // For the factory-less case, it's critical to establish a connection with the module\n // injector tree (by retrieving an instance of an `NgModuleRef` and accessing its injector),\n // so that a component can use DI tokens provided in MgModules. For this reason, we can not\n // rely on the provided injector, since it might be detached from the DI tree (for example, if\n // it was created via `Injector.create` without specifying a parent injector, or if an\n // injector is retrieved from an `NgModuleRef` created via `createNgModule` using an\n // NgModule outside of a module tree). Instead, we always use `ViewContainerRef`'s parent\n // injector, which is normally connected to the DI tree, which includes module injector\n // subtree.\n const _injector = isComponentFactory ? contextInjector : this.parentInjector;\n\n // DO NOT REFACTOR. The code here used to have a `injector.get(NgModuleRef, null) ||\n // undefined` expression which seems to cause internal google apps to fail. This is documented\n // in the following internal bug issue: go/b/142967802\n const result = _injector.get(EnvironmentInjector, null);\n if (result) {\n environmentInjector = result;\n }\n }\n\n const componentDef = getComponentDef(componentFactory.componentType ?? {});\n const dehydratedView = findMatchingDehydratedView(this._lContainer, componentDef?.id ?? null);\n const rNode = dehydratedView?.firstChild ?? null;\n const componentRef = componentFactory.create(\n contextInjector,\n projectableNodes,\n rNode,\n environmentInjector,\n );\n this.insertImpl(\n componentRef.hostView,\n index,\n shouldAddViewToDom(this._hostTNode, dehydratedView),\n );\n return componentRef;\n }\n\n override insert(viewRef: ViewRef, index?: number): ViewRef {\n return this.insertImpl(viewRef, index, true);\n }\n\n private insertImpl(viewRef: ViewRef, index?: number, addToDOM?: boolean): ViewRef {\n const lView = (viewRef as R3ViewRef<any>)._lView!;\n\n if (ngDevMode && viewRef.destroyed) {\n throw new Error('Cannot insert a destroyed View in a ViewContainer!');\n }\n\n if (viewAttachedToContainer(lView)) {\n // If view is already attached, detach it first so we clean up references appropriately.\n\n const prevIdx = this.indexOf(viewRef);\n\n // A view might be attached either to this or a different container. The `prevIdx` for\n // those cases will be:\n // equal to -1 for views attached to this ViewContainerRef\n // >= 0 for views attached to a different ViewContainerRef\n if (prevIdx !== -1) {\n this.detach(prevIdx);\n } else {\n const prevLContainer = lView[PARENT] as LContainer;\n ngDevMode &&\n assertEqual(\n isLContainer(prevLContainer),\n true,\n 'An attached view should have its PARENT point to a container.',\n );\n\n // We need to re-create a R3ViewContainerRef instance since those are not stored on\n // LView (nor anywhere else).\n const prevVCRef = new R3ViewContainerRef(\n prevLContainer,\n prevLContainer[T_HOST] as TDirectiveHostNode,\n prevLContainer[PARENT],\n );\n\n prevVCRef.detach(prevVCRef.indexOf(viewRef));\n }\n }\n\n // Logical operation of adding `LView` to `LContainer`\n const adjustedIdx = this._adjustIndex(index);\n const lContainer = this._lContainer;\n\n addLViewToLContainer(lContainer, lView, adjustedIdx, addToDOM);\n\n (viewRef as R3ViewRef<any>).attachToViewContainerRef();\n addToArray(getOrCreateViewRefs(lContainer), adjustedIdx, viewRef);\n\n return viewRef;\n }\n\n override move(viewRef: ViewRef, newIndex: number): ViewRef {\n if (ngDevMode && viewRef.destroyed) {\n throw new Error('Cannot move a destroyed View in a ViewContainer!');\n }\n return this.insert(viewRef, newIndex);\n }\n\n override indexOf(viewRef: ViewRef): number {\n const viewRefsArr = getViewRefs(this._lContainer);\n return viewRefsArr !== null ? viewRefsArr.indexOf(viewRef) : -1;\n }\n\n override remove(index?: number): void {\n const adjustedIdx = this._adjustIndex(index, -1);\n const detachedView = detachView(this._lContainer, adjustedIdx);\n\n if (detachedView) {\n // Before destroying the view, remove it from the container's array of `ViewRef`s.\n // This ensures the view container length is updated before calling\n // `destroyLView`, which could recursively call view container methods that\n // rely on an accurate container length.\n // (e.g. a method on this view container being called by a child directive's OnDestroy\n // lifecycle hook)\n removeFromArray(getOrCreateViewRefs(this._lContainer), adjustedIdx);\n destroyLView(detachedView[TVIEW], detachedView);\n }\n }\n\n override detach(index?: number): ViewRef | null {\n const adjustedIdx = this._adjustIndex(index, -1);\n const view = detachView(this._lContainer, adjustedIdx);\n\n const wasDetached =\n view && removeFromArray(getOrCreateViewRefs(this._lContainer), adjustedIdx) != null;\n return wasDetached ? new R3ViewRef(view!) : null;\n }\n\n private _adjustIndex(index?: number, shift: number = 0) {\n if (index == null) {\n return this.length + shift;\n }\n if (ngDevMode) {\n assertGreaterThan(index, -1, `ViewRef index must be positive, got ${index}`);\n // +1 because it's legal to insert at the end.\n assertLessThan(index, this.length + 1 + shift, 'index');\n }\n return index;\n }\n};\n\nfunction getViewRefs(lContainer: LContainer): ViewRef[] | null {\n return lContainer[VIEW_REFS] as ViewRef[];\n}\n\nfunction getOrCreateViewRefs(lContainer: LContainer): ViewRef[] {\n return (lContainer[VIEW_REFS] || (lContainer[VIEW_REFS] = [])) as ViewRef[];\n}\n\n/**\n * Creates a ViewContainerRef and stores it on the injector.\n *\n * @param hostTNode The node that is requesting a ViewContainerRef\n * @param hostLView The view to which the node belongs\n * @returns The ViewContainerRef instance to use\n */\nexport function createContainerRef(\n hostTNode: TElementNode | TContainerNode | TElementContainerNode,\n hostLView: LView,\n): ViewContainerRef {\n ngDevMode && assertTNodeType(hostTNode, TNodeType.AnyContainer | TNodeType.AnyRNode);\n\n let lContainer: LContainer;\n const slotValue = hostLView[hostTNode.index];\n if (isLContainer(slotValue)) {\n // If the host is a container, we don't need to create a new LContainer\n lContainer = slotValue;\n } else {\n // An LContainer anchor can not be `null`, but we set it here temporarily\n // and update to the actual value later in this function (see\n // `_locateOrCreateAnchorNode`).\n lContainer = createLContainer(slotValue, hostLView, null!, hostTNode);\n hostLView[hostTNode.index] = lContainer;\n addToEndOfViewTree(hostLView, lContainer);\n }\n _locateOrCreateAnchorNode(lContainer, hostLView, hostTNode, slotValue);\n\n return new R3ViewContainerRef(lContainer, hostTNode, hostLView);\n}\n\n/**\n * Creates and inserts a comment node that acts as an anchor for a view container.\n *\n * If the host is a regular element, we have to insert a comment node manually which will\n * be used as an anchor when inserting elements. In this specific case we use low-level DOM\n * manipulation to insert it.\n */\nfunction insertAnchorNode(hostLView: LView, hostTNode: TNode): RComment {\n const renderer = hostLView[RENDERER];\n ngDevMode && ngDevMode.rendererCreateComment++;\n const commentNode = renderer.createComment(ngDevMode ? 'container' : '');\n\n const hostNative = getNativeByTNode(hostTNode, hostLView)!;\n const parentOfHostNative = renderer.parentNode(hostNative);\n nativeInsertBefore(\n renderer,\n parentOfHostNative!,\n commentNode,\n renderer.nextSibling(hostNative),\n false,\n );\n return commentNode;\n}\n\nlet _locateOrCreateAnchorNode = createAnchorNode;\nlet _populateDehydratedViewsInLContainer: typeof populateDehydratedViewsInLContainerImpl = () =>\n false; // noop by default\n\n/**\n * Looks up dehydrated views that belong to a given LContainer and populates\n * this information into the `LContainer[DEHYDRATED_VIEWS]` slot. When running\n * in client-only mode, this function is a noop.\n *\n * @param lContainer LContainer that should be populated.\n * @param tNode Corresponding TNode.\n * @param hostLView LView that hosts LContainer.\n * @returns a boolean flag that indicates whether a populating operation\n * was successful. The operation might be unsuccessful in case is has completed\n * previously, we are rendering in client-only mode or this content is located\n * in a skip hydration section.\n */\nexport function populateDehydratedViewsInLContainer(\n lContainer: LContainer,\n tNode: TNode,\n hostLView: LView,\n): boolean {\n return _populateDehydratedViewsInLContainer(lContainer, tNode, hostLView);\n}\n\n/**\n * Regular creation mode: an anchor is created and\n * assigned to the `lContainer[NATIVE]` slot.\n */\nfunction createAnchorNode(\n lContainer: LContainer,\n hostLView: LView,\n hostTNode: TNode,\n slotValue: any,\n) {\n // We already have a native element (anchor) set, return.\n if (lContainer[NATIVE]) return;\n\n let commentNode: RComment;\n // If the host is an element container, the native host element is guaranteed to be a\n // comment and we can reuse that comment as anchor element for the new LContainer.\n // The comment node in question is already part of the DOM structure so we don't need to append\n // it again.\n if (hostTNode.type & TNodeType.ElementContainer) {\n commentNode = unwrapRNode(slotValue) as RComment;\n } else {\n commentNode = insertAnchorNode(hostLView, hostTNode);\n }\n lContainer[NATIVE] = commentNode;\n}\n\n/**\n * Hydration logic that looks up all dehydrated views in this container\n * and puts them into `lContainer[DEHYDRATED_VIEWS]` slot.\n *\n * @returns a boolean flag that indicates whether a populating operation\n * was successful. The operation might be unsuccessful in case is has completed\n * previously, we are rendering in client-only mode or this content is located\n * in a skip hydration section.\n */\nfunction populateDehydratedViewsInLContainerImpl(\n lContainer: LContainer,\n tNode: TNode,\n hostLView: LView,\n): boolean {\n // We already have a native element (anchor) set and the process\n // of finding dehydrated views happened (so the `lContainer[DEHYDRATED_VIEWS]`\n // is not null), exit early.\n if (lContainer[NATIVE] && lContainer[DEHYDRATED_VIEWS]) {\n return true;\n }\n\n const hydrationInfo = hostLView[HYDRATION];\n const noOffsetIndex = tNode.index - HEADER_OFFSET;\n const isNodeCreationMode =\n !hydrationInfo ||\n isInSkipHydrationBlock(tNode) ||\n isDisconnectedNode(hydrationInfo, noOffsetIndex);\n\n // Regular creation mode.\n if (isNodeCreationMode) {\n return false;\n }\n\n // Hydration mode, looking up an anchor node and dehydrated views in DOM.\n const currentRNode: RNode | null = getSegmentHead(hydrationInfo, noOffsetIndex);\n\n const serializedViews = hydrationInfo.data[CONTAINERS]?.[noOffsetIndex];\n ngDevMode &&\n assertDefined(\n serializedViews,\n 'Unexpected state: no hydration info available for a given TNode, ' +\n 'which represents a view container.',\n );\n\n const [commentNode, dehydratedViews] = locateDehydratedViewsInContainer(\n currentRNode!,\n serializedViews!,\n );\n\n if (ngDevMode) {\n validateMatchingNode(commentNode, Node.COMMENT_NODE, null, hostLView, tNode, true);\n // Do not throw in case this node is already claimed (thus `false` as a second\n // argument). If this container is created based on an `<ng-template>`, the comment\n // node would be already claimed from the `template` instruction. If an element acts\n // as an anchor (e.g. <div #vcRef>), a separate comment node would be created/located,\n // so we need to claim it here.\n markRNodeAsClaimedByHydration(commentNode, false);\n }\n\n lContainer[NATIVE] = commentNode as RComment;\n lContainer[DEHYDRATED_VIEWS] = dehydratedViews;\n\n return true;\n}\n\nfunction locateOrCreateAnchorNode(\n lContainer: LContainer,\n hostLView: LView,\n hostTNode: TNode,\n slotValue: any,\n): void {\n if (!_populateDehydratedViewsInLContainer(lContainer, hostTNode, hostLView)) {\n // Populating dehydrated views operation returned `false`, which indicates\n // that the logic was running in client-only mode, this an anchor comment\n // node should be created for this container.\n createAnchorNode(lContainer, hostLView, hostTNode, slotValue);\n }\n}\n\nexport function enableLocateOrCreateContainerRefImpl() {\n _locateOrCreateAnchorNode = locateOrCreateAnchorNode;\n _populateDehydratedViewsInLContainer = populateDehydratedViewsInLContainerImpl;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n// We are temporarily importing the existing viewEngine_from core so we can be sure we are\n// correctly implementing its interfaces for backwards compatibility.\n\nimport {ProviderToken} from '../../di/provider_token';\nimport {createElementRef, ElementRef as ViewEngine_ElementRef} from '../../linker/element_ref';\nimport {QueryList} from '../../linker/query_list';\nimport {createTemplateRef, TemplateRef as ViewEngine_TemplateRef} from '../../linker/template_ref';\nimport {createContainerRef, ViewContainerRef} from '../../linker/view_container_ref';\nimport {assertDefined, assertIndexInRange, assertNumber, throwError} from '../../util/assert';\nimport {stringify} from '../../util/stringify';\n\nimport {assertFirstCreatePass, assertLContainer} from '../assert';\nimport {getNodeInjectable, locateDirectiveOrProvider} from '../di';\nimport {CONTAINER_HEADER_OFFSET, LContainer, MOVED_VIEWS} from '../interfaces/container';\nimport {\n TContainerNode,\n TElementContainerNode,\n TElementNode,\n TNode,\n TNodeType,\n} from '../interfaces/node';\nimport {LQueries, LQuery, QueryFlags, TQueries, TQuery, TQueryMetadata} from '../interfaces/query';\nimport {DECLARATION_LCONTAINER, LView, PARENT, QUERIES, TVIEW, TView} from '../interfaces/view';\nimport {assertTNodeType} from '../node_assert';\nimport {getCurrentTNode, getLView, getTView} from '../state';\nimport {storeCleanupWithContext} from '../util/view_utils';\n\nclass LQuery_<T> implements LQuery<T> {\n matches: (T | null)[] | null = null;\n constructor(public queryList: QueryList<T>) {}\n clone(): LQuery<T> {\n return new LQuery_(this.queryList);\n }\n setDirty(): void {\n this.queryList.setDirty();\n }\n}\n\nclass LQueries_ implements LQueries {\n constructor(public queries: LQuery<any>[] = []) {}\n\n createEmbeddedView(tView: TView): LQueries | null {\n const tQueries = tView.queries;\n if (tQueries !== null) {\n const noOfInheritedQueries =\n tView.contentQueries !== null ? tView.contentQueries[0] : tQueries.length;\n const viewLQueries: LQuery<any>[] = [];\n\n // An embedded view has queries propagated from a declaration view at the beginning of the\n // TQueries collection and up until a first content query declared in the embedded view. Only\n // propagated LQueries are created at this point (LQuery corresponding to declared content\n // queries will be instantiated from the content query instructions for each directive).\n for (let i = 0; i < noOfInheritedQueries; i++) {\n const tQuery = tQueries.getByIndex(i);\n const parentLQuery = this.queries[tQuery.indexInDeclarationView];\n viewLQueries.push(parentLQuery.clone());\n }\n\n return new LQueries_(viewLQueries);\n }\n\n return null;\n }\n\n insertView(tView: TView): void {\n this.dirtyQueriesWithMatches(tView);\n }\n\n detachView(tView: TView): void {\n this.dirtyQueriesWithMatches(tView);\n }\n\n finishViewCreation(tView: TView): void {\n this.dirtyQueriesWithMatches(tView);\n }\n\n private dirtyQueriesWithMatches(tView: TView) {\n for (let i = 0; i < this.queries.length; i++) {\n if (getTQuery(tView, i).matches !== null) {\n this.queries[i].setDirty();\n }\n }\n }\n}\n\nexport class TQueryMetadata_ implements TQueryMetadata {\n public predicate: ProviderToken<unknown> | string[];\n constructor(\n predicate: ProviderToken<unknown> | string[] | string,\n public flags: QueryFlags,\n public read: any = null,\n ) {\n // Compiler might not be able to pre-optimize and split multiple selectors.\n if (typeof predicate === 'string') {\n this.predicate = splitQueryMultiSelectors(predicate);\n } else {\n this.predicate = predicate;\n }\n }\n}\n\nclass TQueries_ implements TQueries {\n constructor(private queries: TQuery[] = []) {}\n\n elementStart(tView: TView, tNode: TNode): void {\n ngDevMode &&\n assertFirstCreatePass(\n tView,\n 'Queries should collect results on the first template pass only',\n );\n for (let i = 0; i < this.queries.length; i++) {\n this.queries[i].elementStart(tView, tNode);\n }\n }\n elementEnd(tNode: TNode): void {\n for (let i = 0; i < this.queries.length; i++) {\n this.queries[i].elementEnd(tNode);\n }\n }\n embeddedTView(tNode: TNode): TQueries | null {\n let queriesForTemplateRef: TQuery[] | null = null;\n\n for (let i = 0; i < this.length; i++) {\n const childQueryIndex = queriesForTemplateRef !== null ? queriesForTemplateRef.length : 0;\n const tqueryClone = this.getByIndex(i).embeddedTView(tNode, childQueryIndex);\n\n if (tqueryClone) {\n tqueryClone.indexInDeclarationView = i;\n if (queriesForTemplateRef !== null) {\n queriesForTemplateRef.push(tqueryClone);\n } else {\n queriesForTemplateRef = [tqueryClone];\n }\n }\n }\n\n return queriesForTemplateRef !== null ? new TQueries_(queriesForTemplateRef) : null;\n }\n\n template(tView: TView, tNode: TNode): void {\n ngDevMode &&\n assertFirstCreatePass(\n tView,\n 'Queries should collect results on the first template pass only',\n );\n for (let i = 0; i < this.queries.length; i++) {\n this.queries[i].template(tView, tNode);\n }\n }\n\n getByIndex(index: number): TQuery {\n ngDevMode && assertIndexInRange(this.queries, index);\n return this.queries[index];\n }\n\n get length(): number {\n return this.queries.length;\n }\n\n track(tquery: TQuery): void {\n this.queries.push(tquery);\n }\n}\n\nclass TQuery_ implements TQuery {\n matches: number[] | null = null;\n indexInDeclarationView = -1;\n crossesNgTemplate = false;\n\n /**\n * A node index on which a query was declared (-1 for view queries and ones inherited from the\n * declaration template). We use this index (alongside with _appliesToNextNode flag) to know\n * when to apply content queries to elements in a template.\n */\n private _declarationNodeIndex: number;\n\n /**\n * A flag indicating if a given query still applies to nodes it is crossing. We use this flag\n * (alongside with _declarationNodeIndex) to know when to stop applying content queries to\n * elements in a template.\n */\n private _appliesToNextNode = true;\n\n constructor(\n public metadata: TQueryMetadata,\n nodeIndex: number = -1,\n ) {\n this._declarationNodeIndex = nodeIndex;\n }\n\n elementStart(tView: TView, tNode: TNode): void {\n if (this.isApplyingToNode(tNode)) {\n this.matchTNode(tView, tNode);\n }\n }\n\n elementEnd(tNode: TNode): void {\n if (this._declarationNodeIndex === tNode.index) {\n this._appliesToNextNode = false;\n }\n }\n\n template(tView: TView, tNode: TNode): void {\n this.elementStart(tView, tNode);\n }\n\n embeddedTView(tNode: TNode, childQueryIndex: number): TQuery | null {\n if (this.isApplyingToNode(tNode)) {\n this.crossesNgTemplate = true;\n // A marker indicating a `<ng-template>` element (a placeholder for query results from\n // embedded views created based on this `<ng-template>`).\n this.addMatch(-tNode.index, childQueryIndex);\n return new TQuery_(this.metadata);\n }\n return null;\n }\n\n private isApplyingToNode(tNode: TNode): boolean {\n if (\n this._appliesToNextNode &&\n (this.metadata.flags & QueryFlags.descendants) !== QueryFlags.descendants\n ) {\n const declarationNodeIdx = this._declarationNodeIndex;\n let parent = tNode.parent;\n // Determine if a given TNode is a \"direct\" child of a node on which a content query was\n // declared (only direct children of query's host node can match with the descendants: false\n // option). There are 3 main use-case / conditions to consider here:\n // - <needs-target><i #target></i></needs-target>: here <i #target> parent node is a query\n // host node;\n // - <needs-target><ng-template [ngIf]=\"true\"><i #target></i></ng-template></needs-target>:\n // here <i #target> parent node is null;\n // - <needs-target><ng-container><i #target></i></ng-container></needs-target>: here we need\n // to go past `<ng-container>` to determine <i #target> parent node (but we shouldn't traverse\n // up past the query's host node!).\n while (\n parent !== null &&\n parent.type & TNodeType.ElementContainer &&\n parent.index !== declarationNodeIdx\n ) {\n parent = parent.parent;\n }\n return declarationNodeIdx === (parent !== null ? parent.index : -1);\n }\n return this._appliesToNextNode;\n }\n\n private matchTNode(tView: TView, tNode: TNode): void {\n const predicate = this.metadata.predicate;\n if (Array.isArray(predicate)) {\n for (let i = 0; i < predicate.length; i++) {\n const name = predicate[i];\n this.matchTNodeWithReadOption(tView, tNode, getIdxOfMatchingSelector(tNode, name));\n // Also try matching the name to a provider since strings can be used as DI tokens too.\n this.matchTNodeWithReadOption(\n tView,\n tNode,\n locateDirectiveOrProvider(tNode, tView, name, false, false),\n );\n }\n } else {\n if ((predicate as any) === ViewEngine_TemplateRef) {\n if (tNode.type & TNodeType.Container) {\n this.matchTNodeWithReadOption(tView, tNode, -1);\n }\n } else {\n this.matchTNodeWithReadOption(\n tView,\n tNode,\n locateDirectiveOrProvider(tNode, tView, predicate, false, false),\n );\n }\n }\n }\n\n private matchTNodeWithReadOption(tView: TView, tNode: TNode, nodeMatchIdx: number | null): void {\n if (nodeMatchIdx !== null) {\n const read = this.metadata.read;\n if (read !== null) {\n if (\n read === ViewEngine_ElementRef ||\n read === ViewContainerRef ||\n (read === ViewEngine_TemplateRef && tNode.type & TNodeType.Container)\n ) {\n this.addMatch(tNode.index, -2);\n } else {\n const directiveOrProviderIdx = locateDirectiveOrProvider(\n tNode,\n tView,\n read,\n false,\n false,\n );\n if (directiveOrProviderIdx !== null) {\n this.addMatch(tNode.index, directiveOrProviderIdx);\n }\n }\n } else {\n this.addMatch(tNode.index, nodeMatchIdx);\n }\n }\n }\n\n private addMatch(tNodeIdx: number, matchIdx: number) {\n if (this.matches === null) {\n this.matches = [tNodeIdx, matchIdx];\n } else {\n this.matches.push(tNodeIdx, matchIdx);\n }\n }\n}\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: TNode, selector: string): number | null {\n const localNames = tNode.localNames;\n if (localNames !== null) {\n for (let i = 0; i < localNames.length; i += 2) {\n if (localNames[i] === selector) {\n return localNames[i + 1] as number;\n }\n }\n }\n return null;\n}\n\nfunction createResultByTNodeType(tNode: TNode, currentView: LView): any {\n if (tNode.type & (TNodeType.AnyRNode | TNodeType.ElementContainer)) {\n return createElementRef(tNode, currentView);\n } else if (tNode.type & TNodeType.Container) {\n return createTemplateRef(tNode, currentView);\n }\n return null;\n}\n\nfunction createResultForNode(lView: LView, tNode: TNode, matchingIdx: number, read: any): any {\n if (matchingIdx === -1) {\n // if read token and / or strategy is not specified, detect it using appropriate tNode type\n return createResultByTNodeType(tNode, lView);\n } else if (matchingIdx === -2) {\n // read a special token from a node injector\n return createSpecialToken(lView, tNode, read);\n } else {\n // read a token\n return getNodeInjectable(lView, lView[TVIEW], matchingIdx, tNode as TElementNode);\n }\n}\n\nfunction createSpecialToken(lView: LView, tNode: TNode, read: any): any {\n if (read === ViewEngine_ElementRef) {\n return createElementRef(tNode, lView);\n } else if (read === ViewEngine_TemplateRef) {\n return createTemplateRef(tNode, lView);\n } else if (read === ViewContainerRef) {\n ngDevMode && assertTNodeType(tNode, TNodeType.AnyRNode | TNodeType.AnyContainer);\n return createContainerRef(\n tNode as TElementNode | TContainerNode | TElementContainerNode,\n lView,\n );\n } else {\n ngDevMode &&\n throwError(\n `Special token to read should be one of ElementRef, TemplateRef or ViewContainerRef but got ${stringify(\n read,\n )}.`,\n );\n }\n}\n\n/**\n * A helper function that creates query results for a given view. This function is meant to do the\n * processing once and only once for a given view instance (a set of results for a given view\n * doesn't change).\n */\nfunction materializeViewResults<T>(\n tView: TView,\n lView: LView,\n tQuery: TQuery,\n queryIndex: number,\n): T[] {\n const lQuery = lView[QUERIES]!.queries![queryIndex];\n if (lQuery.matches === null) {\n const tViewData = tView.data;\n const tQueryMatches = tQuery.matches;\n const result: Array<T | null> = [];\n for (let i = 0; tQueryMatches !== null && i < tQueryMatches.length; i += 2) {\n const matchedNodeIdx = tQueryMatches[i];\n if (matchedNodeIdx < 0) {\n // we at the <ng-template> marker which might have results in views created based on this\n // <ng-template> - those results will be in separate views though, so here we just leave\n // null as a placeholder\n result.push(null);\n } else {\n ngDevMode && assertIndexInRange(tViewData, matchedNodeIdx);\n const tNode = tViewData[matchedNodeIdx] as TNode;\n result.push(createResultForNode(lView, tNode, tQueryMatches[i + 1], tQuery.metadata.read));\n }\n }\n lQuery.matches = result;\n }\n\n return lQuery.matches;\n}\n\n/**\n * A helper function that collects (already materialized) query results from a tree of views,\n * starting with a provided LView.\n */\nfunction collectQueryResults<T>(tView: TView, lView: LView, queryIndex: number, result: T[]): T[] {\n const tQuery = tView.queries!.getByIndex(queryIndex);\n const tQueryMatches = tQuery.matches;\n if (tQueryMatches !== null) {\n const lViewResults = materializeViewResults<T>(tView, lView, tQuery, queryIndex);\n\n for (let i = 0; i < tQueryMatches.length; i += 2) {\n const tNodeIdx = tQueryMatches[i];\n if (tNodeIdx > 0) {\n result.push(lViewResults[i / 2] as T);\n } else {\n const childQueryIndex = tQueryMatches[i + 1];\n\n const declarationLContainer = lView[-tNodeIdx] as LContainer;\n ngDevMode && assertLContainer(declarationLContainer);\n\n // collect matches for views inserted in this container\n for (let i = CONTAINER_HEADER_OFFSET; i < declarationLContainer.length; i++) {\n const embeddedLView = declarationLContainer[i];\n if (embeddedLView[DECLARATION_LCONTAINER] === embeddedLView[PARENT]) {\n collectQueryResults(embeddedLView[TVIEW], embeddedLView, childQueryIndex, result);\n }\n }\n\n // collect matches for views created from this declaration container and inserted into\n // different containers\n if (declarationLContainer[MOVED_VIEWS] !== null) {\n const embeddedLViews = declarationLContainer[MOVED_VIEWS]!;\n for (let i = 0; i < embeddedLViews.length; i++) {\n const embeddedLView = embeddedLViews[i];\n collectQueryResults(embeddedLView[TVIEW], embeddedLView, childQueryIndex, result);\n }\n }\n }\n }\n }\n return result;\n}\n\nexport function loadQueryInternal<T>(lView: LView, queryIndex: number): QueryList<T> {\n ngDevMode &&\n assertDefined(lView[QUERIES], 'LQueries should be defined when trying to load a query');\n ngDevMode && assertIndexInRange(lView[QUERIES]!.queries, queryIndex);\n return lView[QUERIES]!.queries[queryIndex].queryList;\n}\n\n/**\n * Creates a new instance of LQuery and returns its index in the collection of LQuery objects.\n *\n * @returns index in the collection of LQuery objects\n */\nfunction createLQuery<T>(tView: TView, lView: LView, flags: QueryFlags): number {\n const queryList = new QueryList<T>(\n (flags & QueryFlags.emitDistinctChangesOnly) === QueryFlags.emitDistinctChangesOnly,\n );\n\n storeCleanupWithContext(tView, lView, queryList, queryList.destroy);\n\n const lQueries = (lView[QUERIES] ??= new LQueries_()).queries;\n return lQueries.push(new LQuery_(queryList)) - 1;\n}\n\nexport function createViewQuery<T>(\n predicate: ProviderToken<unknown> | string[] | string,\n flags: QueryFlags,\n read?: any,\n): number {\n ngDevMode && assertNumber(flags, 'Expecting flags');\n const tView = getTView();\n if (tView.firstCreatePass) {\n createTQuery(tView, new TQueryMetadata_(predicate, flags, read), -1);\n if ((flags & QueryFlags.isStatic) === QueryFlags.isStatic) {\n tView.staticViewQueries = true;\n }\n }\n\n return createLQuery<T>(tView, getLView(), flags);\n}\n\nexport function createContentQuery<T>(\n directiveIndex: number,\n predicate: ProviderToken<unknown> | string[] | string,\n flags: QueryFlags,\n read?: ProviderToken<T>,\n): number {\n ngDevMode && assertNumber(flags, 'Expecting flags');\n const tView = getTView();\n if (tView.firstCreatePass) {\n const tNode = getCurrentTNode()!;\n createTQuery(tView, new TQueryMetadata_(predicate, flags, read), tNode.index);\n saveContentQueryAndDirectiveIndex(tView, directiveIndex);\n if ((flags & QueryFlags.isStatic) === QueryFlags.isStatic) {\n tView.staticContentQueries = true;\n }\n }\n\n return createLQuery<T>(tView, getLView(), flags);\n}\n\n/** Splits multiple selectors in the locator. */\nfunction splitQueryMultiSelectors(locator: string): string[] {\n return locator.split(',').map((s) => s.trim());\n}\n\nexport function createTQuery(tView: TView, metadata: TQueryMetadata, nodeIndex: number): void {\n if (tView.queries === null) tView.queries = new TQueries_();\n tView.queries.track(new TQuery_(metadata, nodeIndex));\n}\n\nexport function saveContentQueryAndDirectiveIndex(tView: TView, directiveIndex: number) {\n const tViewContentQueries = tView.contentQueries || (tView.contentQueries = []);\n const lastSavedDirectiveIndex = tViewContentQueries.length\n ? tViewContentQueries[tViewContentQueries.length - 1]\n : -1;\n if (directiveIndex !== lastSavedDirectiveIndex) {\n tViewContentQueries.push(tView.queries!.length - 1, directiveIndex);\n }\n}\n\nexport function getTQuery(tView: TView, index: number): TQuery {\n ngDevMode && assertDefined(tView.queries, 'TQueries must be defined to retrieve a TQuery');\n return tView.queries!.getByIndex(index);\n}\n\n/**\n * A helper function collecting results from all the views where a given query was active.\n * @param lView\n * @param queryIndex\n */\nexport function getQueryResults<V>(lView: LView, queryIndex: number): V[] {\n const tView = lView[TVIEW];\n const tQuery = getTQuery(tView, queryIndex);\n return tQuery.crossesNgTemplate\n ? collectQueryResults<V>(tView, lView, queryIndex, [])\n : materializeViewResults<V>(tView, lView, tQuery, queryIndex);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ComputedNode, createComputed, SIGNAL} from '../../../primitives/signals';\n\nimport {RuntimeError, RuntimeErrorCode} from '../../errors';\nimport {unwrapElementRef} from '../../linker/element_ref';\nimport {QueryList} from '../../linker/query_list';\nimport {EMPTY_ARRAY} from '../../util/empty';\n\nimport {FLAGS, LView, LViewFlags} from '../interfaces/view';\nimport {Signal} from '../reactivity/api';\nimport {signal, WritableSignal} from '../reactivity/signal';\nimport {getLView} from '../state';\nimport {getQueryResults, loadQueryInternal} from './query';\n\ninterface QuerySignalNode<T> extends ComputedNode<T | ReadonlyArray<T>> {\n _lView?: LView;\n _queryIndex?: number;\n _queryList?: QueryList<T>;\n _dirtyCounter: WritableSignal<number>;\n /**\n * Stores the last seen, flattened results for a query. This is to avoid marking the signal result\n * computed as dirty when there was view manipulation that didn't impact final results.\n */\n _flatValue?: T | ReadonlyArray<T>;\n}\n\n/**\n * A signal factory function in charge of creating a new computed signal capturing query\n * results. This centralized creation function is used by all types of queries (child / children,\n * required / optional).\n *\n * @param firstOnly indicates if all or only the first result should be returned\n * @param required indicates if at least one result is required\n * @returns a read-only signal with query results\n */\nfunction createQuerySignalFn<V>(\n firstOnly: boolean,\n required: boolean,\n opts?: {debugName?: string},\n) {\n let node: QuerySignalNode<V>;\n const signalFn = createComputed(() => {\n // A dedicated signal that increments its value every time a query changes its dirty status. By\n // using this signal we can implement a query as computed and avoid creation of a specialized\n // reactive node type. Please note that a query gets marked dirty under the following\n // circumstances:\n // - a view (where a query is active) finished its first creation pass;\n // - a new view is inserted / deleted and it impacts query results.\n node._dirtyCounter();\n\n const value = refreshSignalQuery<V>(node, firstOnly);\n\n if (required && value === undefined) {\n throw new RuntimeError(\n RuntimeErrorCode.REQUIRED_QUERY_NO_VALUE,\n ngDevMode && 'Child query result is required but no value is available.',\n );\n }\n\n return value;\n });\n node = signalFn[SIGNAL] as QuerySignalNode<V>;\n node._dirtyCounter = signal(0);\n node._flatValue = undefined;\n\n if (ngDevMode) {\n signalFn.toString = () => `[Query Signal]`;\n node.debugName = opts?.debugName;\n }\n\n return signalFn;\n}\n\nexport function createSingleResultOptionalQuerySignalFn<ReadT>(opts?: {\n debugName?: string;\n}): Signal<ReadT | undefined> {\n return createQuerySignalFn(/* firstOnly */ true, /* required */ false, opts) as Signal<\n ReadT | undefined\n >;\n}\n\nexport function createSingleResultRequiredQuerySignalFn<ReadT>(opts?: {\n debugName?: string;\n}): Signal<ReadT> {\n return createQuerySignalFn(/* firstOnly */ true, /* required */ true, opts) as Signal<ReadT>;\n}\n\nexport function createMultiResultQuerySignalFn<ReadT>(opts?: {\n debugName?: string;\n}): Signal<ReadonlyArray<ReadT>> {\n return createQuerySignalFn(/* firstOnly */ false, /* required */ false, opts) as Signal<\n ReadonlyArray<ReadT>\n >;\n}\n\nexport function bindQueryToSignal(target: Signal<unknown>, queryIndex: number): void {\n const node = target[SIGNAL] as QuerySignalNode<unknown>;\n node._lView = getLView();\n node._queryIndex = queryIndex;\n node._queryList = loadQueryInternal(node._lView, queryIndex);\n node._queryList.onDirty(() => node._dirtyCounter.update((v) => v + 1));\n}\n\nfunction refreshSignalQuery<V>(node: QuerySignalNode<V>, firstOnly: boolean): V | ReadonlyArray<V> {\n const lView = node._lView;\n const queryIndex = node._queryIndex;\n\n // There are 2 conditions under which we want to return \"empty\" results instead of the ones\n // collected by a query:\n //\n // 1) a given query wasn't created yet (this is a period of time between the directive creation\n // and execution of the query creation function) - in this case a query doesn't exist yet and we\n // don't have any results to return.\n //\n // 2) we are in the process of constructing a view (the first\n // creation pass didn't finish) and a query might have partial results, but we don't want to\n // return those - instead we do delay results collection until all nodes had a chance of matching\n // and we can present consistent, \"atomic\" (on a view level) results.\n if (lView === undefined || queryIndex === undefined || lView[FLAGS] & LViewFlags.CreationMode) {\n return (firstOnly ? undefined : EMPTY_ARRAY) as V;\n }\n\n const queryList = loadQueryInternal<V>(lView, queryIndex);\n const results = getQueryResults<V>(lView, queryIndex);\n\n queryList.reset(results, unwrapElementRef);\n\n if (firstOnly) {\n return queryList.first;\n } else {\n // TODO: remove access to the private _changesDetected field by abstracting / removing usage of\n // QueryList in the signal-based queries (perf follow-up)\n const resultChanged = (queryList as any as {_changesDetected: boolean})._changesDetected;\n if (resultChanged || node._flatValue === undefined) {\n return (node._flatValue = queryList.toArray());\n }\n return node._flatValue;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {assertInInjectionContext} from '../di';\nimport {ProviderToken} from '../di/provider_token';\nimport {\n createMultiResultQuerySignalFn,\n createSingleResultOptionalQuerySignalFn,\n createSingleResultRequiredQuerySignalFn,\n} from '../render3/queries/query_reactive';\nimport {Signal} from '../render3/reactivity/api';\n\nfunction viewChildFn<LocatorT, ReadT>(\n locator: ProviderToken<LocatorT> | string,\n opts?: {read?: ProviderToken<ReadT>; debugName?: string},\n): Signal<ReadT | undefined> {\n ngDevMode && assertInInjectionContext(viewChild);\n return createSingleResultOptionalQuerySignalFn<ReadT>(opts);\n}\n\nfunction viewChildRequiredFn<LocatorT, ReadT>(\n locator: ProviderToken<LocatorT> | string,\n opts?: {read?: ProviderToken<ReadT>; debugName?: string},\n): Signal<ReadT> {\n ngDevMode && assertInInjectionContext(viewChild);\n return createSingleResultRequiredQuerySignalFn<ReadT>(opts);\n}\n\n/**\n * Type of the `viewChild` function. The viewChild function creates a singular view query.\n *\n * It is a special function that also provides access to required query results via the `.required`\n * property.\n *\n * @publicAPI\n * @docsPrivate Ignored because `viewChild` is the canonical API entry.\n */\nexport interface ViewChildFunction {\n /**\n * Initializes a view child query. Consider using `viewChild.required` for queries that should\n * always match.\n *\n * @publicAPI\n */\n\n <LocatorT, ReadT>(\n locator: ProviderToken<LocatorT> | string,\n opts: {\n read: ProviderToken<ReadT>;\n debugName?: string;\n },\n ): Signal<ReadT | undefined>;\n\n <LocatorT>(\n locator: ProviderToken<LocatorT> | string,\n opts?: {\n debugName?: string;\n },\n ): Signal<LocatorT | undefined>;\n\n /**\n * Initializes a view child query that is expected to always match an element.\n *\n * @publicAPI\n */\n required: {\n <LocatorT>(\n locator: ProviderToken<LocatorT> | string,\n opts?: {\n debugName?: string;\n },\n ): Signal<LocatorT>;\n\n <LocatorT, ReadT>(\n locator: ProviderToken<LocatorT> | string,\n opts: {\n read: ProviderToken<ReadT>;\n debugName?: string;\n },\n ): Signal<ReadT>;\n };\n}\n\n/**\n * Initializes a view child query.\n *\n * Consider using `viewChild.required` for queries that should always match.\n *\n * @usageNotes\n * Create a child query in your component by declaring a\n * class field and initializing it with the `viewChild()` function.\n *\n * ```angular-ts\n * @Component({template: '<div #el></div><my-component #cmp />'})\n * export class TestComponent {\n * divEl = viewChild<ElementRef>('el'); // Signal<ElementRef|undefined>\n * divElRequired = viewChild.required<ElementRef>('el'); // Signal<ElementRef>\n * cmp = viewChild(MyComponent); // Signal<MyComponent|undefined>\n * cmpRequired = viewChild.required(MyComponent); // Signal<MyComponent>\n * }\n * ```\n *\n * @publicAPI\n * @initializerApiFunction\n */\nexport const viewChild: ViewChildFunction = (() => {\n // Note: This may be considered a side-effect, but nothing will depend on\n // this assignment, unless this `viewChild` constant export is accessed. It's a\n // self-contained side effect that is local to the user facing `viewChild` export.\n (viewChildFn as any).required = viewChildRequiredFn;\n return viewChildFn as typeof viewChildFn & {required: typeof viewChildRequiredFn};\n})();\n\nexport function viewChildren<LocatorT>(\n locator: ProviderToken<LocatorT> | string,\n opts?: {debugName?: string},\n): Signal<ReadonlyArray<LocatorT>>;\nexport function viewChildren<LocatorT, ReadT>(\n locator: ProviderToken<LocatorT> | string,\n opts: {\n read: ProviderToken<ReadT>;\n debugName?: string;\n },\n): Signal<ReadonlyArray<ReadT>>;\n\n/**\n * Initializes a view children query.\n *\n * Query results are represented as a signal of a read-only collection containing all matched\n * elements.\n *\n * @usageNotes\n * Create a children query in your component by declaring a\n * class field and initializing it with the `viewChildren()` function.\n *\n * ```ts\n * @Component({...})\n * export class TestComponent {\n * divEls = viewChildren<ElementRef>('el'); // Signal<ReadonlyArray<ElementRef>>\n * }\n * ```\n *\n * @initializerApiFunction\n * @publicAPI\n */\nexport function viewChildren<LocatorT, ReadT>(\n locator: ProviderToken<LocatorT> | string,\n opts?: {\n read?: ProviderToken<ReadT>;\n debugName?: string;\n },\n): Signal<ReadonlyArray<ReadT>> {\n ngDevMode && assertInInjectionContext(viewChildren);\n return createMultiResultQuerySignalFn<ReadT>(opts);\n}\n\nexport function contentChildFn<LocatorT, ReadT>(\n locator: ProviderToken<LocatorT> | string,\n opts?: {\n descendants?: boolean;\n read?: ProviderToken<ReadT>;\n debugName?: string;\n },\n): Signal<ReadT | undefined> {\n ngDevMode && assertInInjectionContext(contentChild);\n return createSingleResultOptionalQuerySignalFn<ReadT>(opts);\n}\n\nfunction contentChildRequiredFn<LocatorT, ReadT>(\n locator: ProviderToken<LocatorT> | string,\n opts?: {\n descendants?: boolean;\n read?: ProviderToken<ReadT>;\n debugName?: string;\n },\n): Signal<ReadT> {\n ngDevMode && assertInInjectionContext(contentChildren);\n return createSingleResultRequiredQuerySignalFn<ReadT>(opts);\n}\n\n/**\n * Type of the `contentChild` function.\n *\n * The contentChild function creates a singular content query. It is a special function that also\n * provides access to required query results via the `.required` property.\n *\n * @publicAPI\n * @docsPrivate Ignored because `contentChild` is the canonical API entry.\n */\nexport interface ContentChildFunction {\n /**\n * Initializes a content child query.\n *\n * Consider using `contentChild.required` for queries that should always match.\n * @publicAPI\n */\n <LocatorT>(\n locator: ProviderToken<LocatorT> | string,\n opts?: {\n descendants?: boolean;\n read?: undefined;\n debugName?: string;\n },\n ): Signal<LocatorT | undefined>;\n\n <LocatorT, ReadT>(\n locator: ProviderToken<LocatorT> | string,\n opts: {\n descendants?: boolean;\n read: ProviderToken<ReadT>;\n debugName?: string;\n },\n ): Signal<ReadT | undefined>;\n\n /**\n * Initializes a content child query that is always expected to match.\n */\n required: {\n <LocatorT>(\n locator: ProviderToken<LocatorT> | string,\n opts?: {\n descendants?: boolean;\n read?: undefined;\n debugName?: string;\n },\n ): Signal<LocatorT>;\n\n <LocatorT, ReadT>(\n locator: ProviderToken<LocatorT> | string,\n opts: {\n descendants?: boolean;\n read: ProviderToken<ReadT>;\n debugName?: string;\n },\n ): Signal<ReadT>;\n };\n}\n\n/**\n * Initializes a content child query. Consider using `contentChild.required` for queries that should\n * always match.\n *\n * @usageNotes\n * Create a child query in your component by declaring a\n * class field and initializing it with the `contentChild()` function.\n *\n * ```ts\n * @Component({...})\n * export class TestComponent {\n * headerEl = contentChild<ElementRef>('h'); // Signal<ElementRef|undefined>\n * headerElElRequired = contentChild.required<ElementRef>('h'); // Signal<ElementRef>\n * header = contentChild(MyHeader); // Signal<MyHeader|undefined>\n * headerRequired = contentChild.required(MyHeader); // Signal<MyHeader>\n * }\n * ```\n *\n * @initializerApiFunction\n * @publicAPI\n */\nexport const contentChild: ContentChildFunction = (() => {\n // Note: This may be considered a side-effect, but nothing will depend on\n // this assignment, unless this `viewChild` constant export is accessed. It's a\n // self-contained side effect that is local to the user facing `viewChild` export.\n (contentChildFn as any).required = contentChildRequiredFn;\n return contentChildFn as typeof contentChildFn & {required: typeof contentChildRequiredFn};\n})();\n\nexport function contentChildren<LocatorT>(\n locator: ProviderToken<LocatorT> | string,\n opts?: {\n descendants?: boolean;\n read?: undefined;\n debugName?: string;\n },\n): Signal<ReadonlyArray<LocatorT>>;\nexport function contentChildren<LocatorT, ReadT>(\n locator: ProviderToken<LocatorT> | string,\n opts: {\n descendants?: boolean;\n read: ProviderToken<ReadT>;\n debugName?: string;\n },\n): Signal<ReadonlyArray<ReadT>>;\n\n/**\n * Initializes a content children query.\n *\n * Query results are represented as a signal of a read-only collection containing all matched\n * elements.\n *\n * @usageNotes\n * Create a children query in your component by declaring a\n * class field and initializing it with the `contentChildren()` function.\n *\n * ```ts\n * @Component({...})\n * export class TestComponent {\n * headerEl = contentChildren<ElementRef>('h'); // Signal<ReadonlyArray<ElementRef>>\n * }\n * ```\n *\n * @initializerApiFunction\n * @publicAPI\n */\nexport function contentChildren<LocatorT, ReadT>(\n locator: ProviderToken<LocatorT> | string,\n opts?: {\n descendants?: boolean;\n read?: ProviderToken<ReadT>;\n debugName?: string;\n },\n): Signal<ReadonlyArray<ReadT>> {\n return createMultiResultQuerySignalFn<ReadT>(opts);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {producerAccessed, SIGNAL, signalSetFn} from '../../../primitives/signals';\n\nimport {RuntimeError, RuntimeErrorCode} from '../../errors';\nimport {Signal} from '../../render3/reactivity/api';\nimport {\n signalAsReadonlyFn,\n WritableSignal,\n ɵWRITABLE_SIGNAL,\n} from '../../render3/reactivity/signal';\nimport {\n InputSignal,\n ɵINPUT_SIGNAL_BRAND_READ_TYPE,\n ɵINPUT_SIGNAL_BRAND_WRITE_TYPE,\n} from '../input/input_signal';\nimport {INPUT_SIGNAL_NODE, InputSignalNode, REQUIRED_UNSET_VALUE} from '../input/input_signal_node';\nimport {OutputEmitterRef} from '../output/output_emitter_ref';\nimport {OutputRef} from '../output/output_ref';\n\n/**\n * @publicAPI\n *\n * Options for model signals.\n */\nexport interface ModelOptions {\n /**\n * Optional public name of the input side of the model. The output side will have the same\n * name as the input, but suffixed with `Change`. By default, the class field name is used.\n */\n alias?: string;\n\n /**\n * A debug name for the model signal. Used in Angular DevTools to identify the signal.\n */\n debugName?: string;\n}\n\n/**\n * `ModelSignal` represents a special `Signal` for a directive/component model field.\n *\n * A model signal is a writeable signal that can be exposed as an output.\n * Whenever its value is updated, it emits to the output.\n *\n * @publicAPI\n */\nexport interface ModelSignal<T> extends WritableSignal<T>, InputSignal<T>, OutputRef<T> {\n [SIGNAL]: InputSignalNode<T, T>;\n}\n\n/**\n * Creates a model signal.\n *\n * @param initialValue The initial value.\n * Can be set to {@link REQUIRED_UNSET_VALUE} for required model signals.\n * @param options Additional options for the model.\n */\nexport function createModelSignal<T>(initialValue: T, opts?: ModelOptions): ModelSignal<T> {\n const node: InputSignalNode<T, T> = Object.create(INPUT_SIGNAL_NODE);\n const emitterRef = new OutputEmitterRef<T>();\n\n node.value = initialValue;\n\n function getter(): T {\n producerAccessed(node);\n assertModelSet(node.value);\n return node.value;\n }\n\n getter[SIGNAL] = node;\n getter.asReadonly = signalAsReadonlyFn.bind(getter as any) as () => Signal<T>;\n\n // TODO: Should we throw an error when updating a destroyed model?\n getter.set = (newValue: T) => {\n if (!node.equal(node.value, newValue)) {\n signalSetFn(node, newValue);\n emitterRef.emit(newValue);\n }\n };\n\n getter.update = (updateFn: (value: T) => T) => {\n assertModelSet(node.value);\n getter.set(updateFn(node.value));\n };\n\n getter.subscribe = emitterRef.subscribe.bind(emitterRef);\n getter.destroyRef = emitterRef.destroyRef;\n\n if (ngDevMode) {\n getter.toString = () => `[Model Signal: ${getter()}]`;\n node.debugName = opts?.debugName;\n }\n\n return getter as typeof getter &\n Pick<\n ModelSignal<T>,\n | typeof ɵINPUT_SIGNAL_BRAND_READ_TYPE\n | typeof ɵINPUT_SIGNAL_BRAND_WRITE_TYPE\n | typeof ɵWRITABLE_SIGNAL\n >;\n}\n\n/** Asserts that a model's value is set. */\nfunction assertModelSet(value: unknown): void {\n if (value === REQUIRED_UNSET_VALUE) {\n throw new RuntimeError(\n RuntimeErrorCode.REQUIRED_MODEL_NO_VALUE,\n ngDevMode && 'Model is required but no value is available yet.',\n );\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {assertInInjectionContext} from '../../di';\nimport {REQUIRED_UNSET_VALUE} from '../input/input_signal_node';\n\nimport {createModelSignal, ModelOptions, ModelSignal} from './model_signal';\n\nexport function modelFunction<T>(\n initialValue?: T,\n opts?: ModelOptions,\n): ModelSignal<T | undefined> {\n ngDevMode && assertInInjectionContext(model);\n\n return createModelSignal(initialValue, opts);\n}\n\nexport function modelRequiredFunction<T>(opts?: ModelOptions): ModelSignal<T> {\n ngDevMode && assertInInjectionContext(model);\n\n return createModelSignal(REQUIRED_UNSET_VALUE as T, opts);\n}\n\n/**\n * `model` declares a writeable signal that is exposed as an input/output pair on the containing\n * directive. The input name is taken either from the class member or from the `alias` option.\n * The output name is generated by taking the input name and appending `Change`.\n *\n * The function exposes an API for also declaring required models via the\n * `model.required` function.\n *\n * @publicAPI\n * @docsPrivate Ignored because `model` is the canonical API entry.\n */\nexport interface ModelFunction {\n /**\n * Initializes a model of type `T` with an initial value of `undefined`.\n * Angular will implicitly use `undefined` as initial value.\n */\n <T>(): ModelSignal<T | undefined>;\n /** Initializes a model of type `T` with the given initial value. */\n <T>(initialValue: T, opts?: ModelOptions): ModelSignal<T>;\n\n required: {\n /**\n * Initializes a required model.\n *\n * Users of your directive/component need to bind to the input side of the model.\n * If unset, a compile time error will be reported.\n */\n <T>(opts?: ModelOptions): ModelSignal<T>;\n };\n}\n\n/**\n * `model` declares a writeable signal that is exposed as an input/output\n * pair on the containing directive.\n *\n * The input name is taken either from the class member or from the `alias` option.\n * The output name is generated by taking the input name and appending `Change`.\n *\n * @usageNotes\n *\n * To use `model()`, import the function from `@angular/core`.\n *\n * ```ts\n * import {model} from '@angular/core`;\n * ```\n *\n * Inside your component, introduce a new class member and initialize\n * it with a call to `model` or `model.required`.\n *\n * ```ts\n * @Directive({\n * ...\n * })\n * export class MyDir {\n * firstName = model<string>(); // ModelSignal<string|undefined>\n * lastName = model.required<string>(); // ModelSignal<string>\n * age = model(0); // ModelSignal<number>\n * }\n * ```\n *\n * Inside your component template, you can display the value of a `model`\n * by calling the signal.\n *\n * ```html\n * <span>{{firstName()}}</span>\n * ```\n *\n * Updating the `model` is equivalent to updating a writable signal.\n *\n * ```ts\n * updateName(newFirstName: string): void {\n * this.firstName.set(newFirstName);\n * }\n * ```\n *\n * @publicAPI\n * @initializerApiFunction\n */\nexport const model: ModelFunction = (() => {\n // Note: This may be considered a side-effect, but nothing will depend on\n // this assignment, unless this `model` constant export is accessed. It's a\n // self-contained side effect that is local to the user facing `model` export.\n (modelFunction as any).required = modelRequiredFunction;\n return modelFunction as typeof modelFunction & {required: typeof modelRequiredFunction};\n})();\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ProviderToken} from '../di/provider_token';\nimport {makePropDecorator} from '../util/decorators';\n\n/**\n * Type of the `Attribute` decorator / constructor function.\n *\n * @publicApi\n */\nexport interface AttributeDecorator {\n /**\n * Specifies that a constant attribute value should be injected.\n *\n * The directive can inject constant string literals of host element attributes.\n *\n * @usageNotes\n *\n * Suppose we have an `<input>` element and want to know its `type`.\n *\n * ```html\n * <input type=\"text\">\n * ```\n *\n * A decorator can inject string literal `text` as in the following example.\n *\n * {@example core/ts/metadata/metadata.ts region='attributeMetadata'}\n *\n * @publicApi\n */\n (name: string): any;\n new (name: string): Attribute;\n}\n\n/**\n * Type of the Attribute metadata.\n *\n * @publicApi\n */\nexport interface Attribute {\n /**\n * The name of the attribute to be injected into the constructor.\n */\n attributeName?: string;\n}\n\n/**\n * Type of the Query metadata.\n *\n * @publicApi\n */\nexport interface Query {\n descendants: boolean;\n emitDistinctChangesOnly: boolean;\n first: boolean;\n read: any;\n isViewQuery: boolean;\n selector: any;\n static?: boolean;\n\n /**\n * @internal\n *\n * Whether the query is a signal query.\n *\n * This option exists for JIT compatibility. Users are not expected to use this.\n * Angular needs a way to capture queries from classes so that the internal query\n * functions can be generated. This needs to happen before the component is instantiated.\n * Due to this, for JIT compilation, signal queries need an additional decorator\n * declaring the query. Angular provides a TS transformer to automatically handle this\n * for JIT usage (e.g. in tests).\n */\n isSignal?: boolean;\n}\n\n// Stores the default value of `emitDistinctChangesOnly` when the `emitDistinctChangesOnly` is not\n// explicitly set.\nexport const emitDistinctChangesOnlyDefaultValue = true;\n\n/**\n * Base class for query metadata.\n *\n * @see {@link ContentChildren}\n * @see {@link ContentChild}\n * @see {@link ViewChildren}\n * @see {@link ViewChild}\n *\n * @publicApi\n */\nexport abstract class Query {}\n\n/**\n * Type of the ContentChildren decorator / constructor function.\n *\n * @see {@link ContentChildren}\n * @publicApi\n */\nexport interface ContentChildrenDecorator {\n /**\n * @description\n * Property decorator that configures a content query.\n *\n * Use to get the `QueryList` of elements or directives from the content DOM.\n * Any time a child element is added, removed, or moved, the query list will be\n * updated, and the changes observable of the query list will emit a new value.\n *\n * Content queries are set before the `ngAfterContentInit` callback is called.\n *\n * Does not retrieve elements or directives that are in other components' templates,\n * since a component's template is always a black box to its ancestors.\n *\n * **Metadata Properties**:\n *\n * * **selector** - The directive type or the name used for querying.\n * * **descendants** - If `true` include all descendants of the element. If `false` then only\n * query direct children of the element.\n * * **emitDistinctChangesOnly** - The ` QueryList#changes` observable will emit new values only\n * if the QueryList result has changed. When `false` the `changes` observable might emit even\n * if the QueryList has not changed.\n * ** Note: *** This config option is **deprecated**, it will be permanently set to `true` and\n * removed in future versions of Angular.\n * * **read** - Used to read a different token from the queried elements.\n *\n * The following selectors are supported.\n * * Any class with the `@Component` or `@Directive` decorator\n * * A template reference variable as a string (e.g. query `<my-component #cmp></my-component>`\n * with `@ContentChildren('cmp')`)\n * * Any provider defined in the child component tree of the current component (e.g.\n * `@ContentChildren(SomeService) someService: SomeService`)\n * * Any provider defined through a string token (e.g. `@ContentChildren('someToken')\n * someTokenVal: any`)\n * * A `TemplateRef` (e.g. query `<ng-template></ng-template>` with\n * `@ContentChildren(TemplateRef) template;`)\n *\n * In addition, multiple string selectors can be separated with a comma (e.g.\n * `@ContentChildren('cmp1,cmp2')`)\n *\n * The following values are supported by `read`:\n * * Any class with the `@Component` or `@Directive` decorator\n * * Any provider defined on the injector of the component that is matched by the `selector` of\n * this query\n * * Any provider defined through a string token (e.g. `{provide: 'token', useValue: 'val'}`)\n * * `TemplateRef`, `ElementRef`, and `ViewContainerRef`\n *\n * @usageNotes\n *\n * Here is a simple demonstration of how the `ContentChildren` decorator can be used.\n *\n * {@example core/di/ts/contentChildren/content_children_howto.ts region='HowTo'}\n *\n * ### Tab-pane example\n *\n * Here is a slightly more realistic example that shows how `ContentChildren` decorators\n * can be used to implement a tab pane component.\n *\n * {@example core/di/ts/contentChildren/content_children_example.ts region='Component'}\n *\n * @Annotation\n */\n (\n selector: ProviderToken<unknown> | Function | string,\n opts?: {\n descendants?: boolean;\n emitDistinctChangesOnly?: boolean;\n read?: any;\n },\n ): any;\n new (\n selector: ProviderToken<unknown> | Function | string,\n opts?: {descendants?: boolean; emitDistinctChangesOnly?: boolean; read?: any},\n ): Query;\n}\n\n/**\n * Type of the ContentChildren metadata.\n *\n *\n * @Annotation\n * @publicApi\n */\nexport type ContentChildren = Query;\n\n/**\n * ContentChildren decorator and metadata.\n *\n *\n * @Annotation\n * @publicApi\n */\nexport const ContentChildren: ContentChildrenDecorator = makePropDecorator(\n 'ContentChildren',\n (selector?: any, opts: any = {}) => ({\n selector,\n first: false,\n isViewQuery: false,\n descendants: false,\n emitDistinctChangesOnly: emitDistinctChangesOnlyDefaultValue,\n ...opts,\n }),\n Query,\n);\n\n/**\n * Type of the ContentChild decorator / constructor function.\n *\n * @publicApi\n */\nexport interface ContentChildDecorator {\n /**\n * @description\n * Property decorator that configures a content query.\n *\n * Use to get the first element or the directive matching the selector from the content DOM.\n * If the content DOM changes, and a new child matches the selector,\n * the property will be updated.\n *\n * Does not retrieve elements or directives that are in other components' templates,\n * since a component's template is always a black box to its ancestors.\n *\n * **Metadata Properties**:\n *\n * * **selector** - The directive type or the name used for querying.\n * * **descendants** - If `true` (default) include all descendants of the element. If `false` then\n * only query direct children of the element.\n * * **read** - Used to read a different token from the queried element.\n * * **static** - True to resolve query results before change detection runs,\n * false to resolve after change detection. Defaults to false.\n *\n * The following selectors are supported.\n * * Any class with the `@Component` or `@Directive` decorator\n * * A template reference variable as a string (e.g. query `<my-component #cmp></my-component>`\n * with `@ContentChild('cmp')`)\n * * Any provider defined in the child component tree of the current component (e.g.\n * `@ContentChild(SomeService) someService: SomeService`)\n * * Any provider defined through a string token (e.g. `@ContentChild('someToken') someTokenVal:\n * any`)\n * * A `TemplateRef` (e.g. query `<ng-template></ng-template>` with `@ContentChild(TemplateRef)\n * template;`)\n *\n * The following values are supported by `read`:\n * * Any class with the `@Component` or `@Directive` decorator\n * * Any provider defined on the injector of the component that is matched by the `selector` of\n * this query\n * * Any provider defined through a string token (e.g. `{provide: 'token', useValue: 'val'}`)\n * * `TemplateRef`, `ElementRef`, and `ViewContainerRef`\n *\n * Difference between dynamic and static queries:\n *\n * | Queries | Details |\n * |:--- |:--- |\n * | Dynamic queries \\(`static: false`\\) | The query resolves before the `ngAfterContentInit()`\n * callback is called. The result will be updated for changes to your view, such as changes to\n * `ngIf` and `ngFor` blocks. | | Static queries \\(`static: true`\\) | The query resolves once\n * the view has been created, but before change detection runs (before the `ngOnInit()` callback\n * is called). The result, though, will never be updated to reflect changes to your view, such as\n * changes to `ngIf` and `ngFor` blocks. |\n *\n * @usageNotes\n *\n * {@example core/di/ts/contentChild/content_child_howto.ts region='HowTo'}\n *\n * ### Example\n *\n * {@example core/di/ts/contentChild/content_child_example.ts region='Component'}\n *\n * @Annotation\n */\n (\n selector: ProviderToken<unknown> | Function | string,\n opts?: {descendants?: boolean; read?: any; static?: boolean},\n ): any;\n new (\n selector: ProviderToken<unknown> | Function | string,\n opts?: {descendants?: boolean; read?: any; static?: boolean},\n ): ContentChild;\n}\n\n/**\n * Type of the ContentChild metadata.\n *\n * @publicApi\n */\nexport type ContentChild = Query;\n\n/**\n * ContentChild decorator and metadata.\n *\n *\n * @Annotation\n *\n * @publicApi\n */\nexport const ContentChild: ContentChildDecorator = makePropDecorator(\n 'ContentChild',\n (selector?: any, opts: any = {}) => ({\n selector,\n first: true,\n isViewQuery: false,\n descendants: true,\n ...opts,\n }),\n Query,\n);\n\n/**\n * Type of the ViewChildren decorator / constructor function.\n *\n * @see {@link ViewChildren}\n *\n * @publicApi\n */\nexport interface ViewChildrenDecorator {\n /**\n * @description\n * Property decorator that configures a view query.\n *\n * Use to get the `QueryList` of elements or directives from the view DOM.\n * Any time a child element is added, removed, or moved, the query list will be updated,\n * and the changes observable of the query list will emit a new value.\n *\n * View queries are set before the `ngAfterViewInit` callback is called.\n *\n * **Metadata Properties**:\n *\n * * **selector** - The directive type or the name used for querying.\n * * **read** - Used to read a different token from the queried elements.\n * * **emitDistinctChangesOnly** - The ` QueryList#changes` observable will emit new values only\n * if the QueryList result has changed. When `false` the `changes` observable might emit even\n * if the QueryList has not changed.\n * ** Note: *** This config option is **deprecated**, it will be permanently set to `true` and\n * removed in future versions of Angular.\n *\n * The following selectors are supported.\n * * Any class with the `@Component` or `@Directive` decorator\n * * A template reference variable as a string (e.g. query `<my-component #cmp></my-component>`\n * with `@ViewChildren('cmp')`)\n * * Any provider defined in the child component tree of the current component (e.g.\n * `@ViewChildren(SomeService) someService!: SomeService`)\n * * Any provider defined through a string token (e.g. `@ViewChildren('someToken')\n * someTokenVal!: any`)\n * * A `TemplateRef` (e.g. query `<ng-template></ng-template>` with `@ViewChildren(TemplateRef)\n * template;`)\n *\n * In addition, multiple string selectors can be separated with a comma (e.g.\n * `@ViewChildren('cmp1,cmp2')`)\n *\n * The following values are supported by `read`:\n * * Any class with the `@Component` or `@Directive` decorator\n * * Any provider defined on the injector of the component that is matched by the `selector` of\n * this query\n * * Any provider defined through a string token (e.g. `{provide: 'token', useValue: 'val'}`)\n * * `TemplateRef`, `ElementRef`, and `ViewContainerRef`\n *\n * @usageNotes\n *\n * {@example core/di/ts/viewChildren/view_children_howto.ts region='HowTo'}\n *\n * ### Another example\n *\n * {@example core/di/ts/viewChildren/view_children_example.ts region='Component'}\n *\n * @Annotation\n */\n (\n selector: ProviderToken<unknown> | Function | string,\n opts?: {read?: any; emitDistinctChangesOnly?: boolean},\n ): any;\n new (\n selector: ProviderToken<unknown> | Function | string,\n opts?: {read?: any; emitDistinctChangesOnly?: boolean},\n ): ViewChildren;\n}\n\n/**\n * Type of the ViewChildren metadata.\n *\n * @publicApi\n */\nexport type ViewChildren = Query;\n\n/**\n * ViewChildren decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const ViewChildren: ViewChildrenDecorator = makePropDecorator(\n 'ViewChildren',\n (selector?: any, opts: any = {}) => ({\n selector,\n first: false,\n isViewQuery: true,\n descendants: true,\n emitDistinctChangesOnly: emitDistinctChangesOnlyDefaultValue,\n ...opts,\n }),\n Query,\n);\n\n/**\n * Type of the ViewChild decorator / constructor function.\n *\n * @see {@link ViewChild}\n * @publicApi\n */\nexport interface ViewChildDecorator {\n /**\n * @description\n * Property decorator that configures a view query.\n * The change detector looks for the first element or the directive matching the selector\n * in the view DOM. If the view DOM changes, and a new child matches the selector,\n * the property is updated.\n *\n * **Metadata Properties**:\n *\n * * **selector** - The directive type or the name used for querying.\n * * **read** - Used to read a different token from the queried elements.\n * * **static** - `true` to resolve query results before change detection runs,\n * `false` to resolve after change detection. Defaults to `false`.\n *\n *\n * The following selectors are supported.\n * * Any class with the `@Component` or `@Directive` decorator\n * * A template reference variable as a string (e.g. query `<my-component #cmp></my-component>`\n * with `@ViewChild('cmp')`)\n * * Any provider defined in the child component tree of the current component (e.g.\n * `@ViewChild(SomeService) someService: SomeService`)\n * * Any provider defined through a string token (e.g. `@ViewChild('someToken') someTokenVal:\n * any`)\n * * A `TemplateRef` (e.g. query `<ng-template></ng-template>` with `@ViewChild(TemplateRef)\n * template;`)\n *\n * The following values are supported by `read`:\n * * Any class with the `@Component` or `@Directive` decorator\n * * Any provider defined on the injector of the component that is matched by the `selector` of\n * this query\n * * Any provider defined through a string token (e.g. `{provide: 'token', useValue: 'val'}`)\n * * `TemplateRef`, `ElementRef`, and `ViewContainerRef`\n *\n * Difference between dynamic and static queries:\n * * Dynamic queries \\(`static: false`\\) - The query resolves before the `ngAfterViewInit()`\n * callback is called. The result will be updated for changes to your view, such as changes to\n * `ngIf` and `ngFor` blocks.\n * * Static queries \\(`static: true`\\) - The query resolves once\n * the view has been created, but before change detection runs (before the `ngOnInit()` callback\n * is called). The result, though, will never be updated to reflect changes to your view, such as\n * changes to `ngIf` and `ngFor` blocks.\n *\n * @usageNotes\n *\n * ### Example 1\n *\n * {@example core/di/ts/viewChild/view_child_example.ts region='Component'}\n *\n * ### Example 2\n *\n * {@example core/di/ts/viewChild/view_child_howto.ts region='HowTo'}\n *\n * @Annotation\n */\n (\n selector: ProviderToken<unknown> | Function | string,\n opts?: {read?: any; static?: boolean},\n ): any;\n new (\n selector: ProviderToken<unknown> | Function | string,\n opts?: {read?: any; static?: boolean},\n ): ViewChild;\n}\n\n/**\n * Type of the ViewChild metadata.\n *\n * @publicApi\n */\nexport type ViewChild = Query;\n\n/**\n * ViewChild decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const ViewChild: ViewChildDecorator = makePropDecorator(\n 'ViewChild',\n (selector: any, opts: any) => ({\n selector,\n first: true,\n isViewQuery: true,\n descendants: true,\n ...opts,\n }),\n Query,\n);\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Type} from '../interface/type';\n\nimport type {Component} from './directives';\n\n/**\n * Used to resolve resource URLs on `@Component` when used with JIT compilation.\n *\n * Example:\n * ```ts\n * @Component({\n * selector: 'my-comp',\n * templateUrl: 'my-comp.html', // This requires asynchronous resolution\n * })\n * class MyComponent{\n * }\n *\n * // Calling `renderComponent` will fail because `renderComponent` is a synchronous process\n * // and `MyComponent`'s `@Component.templateUrl` needs to be resolved asynchronously.\n *\n * // Calling `resolveComponentResources()` will resolve `@Component.templateUrl` into\n * // `@Component.template`, which allows `renderComponent` to proceed in a synchronous manner.\n *\n * // Use browser's `fetch()` function as the default resource resolution strategy.\n * resolveComponentResources(fetch).then(() => {\n * // After resolution all URLs have been converted into `template` strings.\n * renderComponent(MyComponent);\n * });\n *\n * ```\n *\n * NOTE: In AOT the resolution happens during compilation, and so there should be no need\n * to call this method outside JIT mode.\n *\n * @param resourceResolver a function which is responsible for returning a `Promise` to the\n * contents of the resolved URL. Browser's `fetch()` method is a good default implementation.\n */\nexport function resolveComponentResources(\n resourceResolver: (url: string) => Promise<string | {text(): Promise<string>}>,\n): Promise<void> {\n // Store all promises which are fetching the resources.\n const componentResolved: Promise<void>[] = [];\n\n // Cache so that we don't fetch the same resource more than once.\n const urlMap = new Map<string, Promise<string>>();\n function cachedResourceResolve(url: string): Promise<string> {\n let promise = urlMap.get(url);\n if (!promise) {\n const resp = resourceResolver(url);\n urlMap.set(url, (promise = resp.then(unwrapResponse)));\n }\n return promise;\n }\n\n componentResourceResolutionQueue.forEach((component: Component, type: Type<any>) => {\n const promises: Promise<void>[] = [];\n if (component.templateUrl) {\n promises.push(\n cachedResourceResolve(component.templateUrl).then((template) => {\n component.template = template;\n }),\n );\n }\n const styles =\n typeof component.styles === 'string' ? [component.styles] : component.styles || [];\n component.styles = styles;\n\n if (component.styleUrl && component.styleUrls?.length) {\n throw new Error(\n '@Component cannot define both `styleUrl` and `styleUrls`. ' +\n 'Use `styleUrl` if the component has one stylesheet, or `styleUrls` if it has multiple',\n );\n } else if (component.styleUrls?.length) {\n const styleOffset = component.styles.length;\n const styleUrls = component.styleUrls;\n component.styleUrls.forEach((styleUrl, index) => {\n styles.push(''); // pre-allocate array.\n promises.push(\n cachedResourceResolve(styleUrl).then((style) => {\n styles[styleOffset + index] = style;\n styleUrls.splice(styleUrls.indexOf(styleUrl), 1);\n if (styleUrls.length == 0) {\n component.styleUrls = undefined;\n }\n }),\n );\n });\n } else if (component.styleUrl) {\n promises.push(\n cachedResourceResolve(component.styleUrl).then((style) => {\n styles.push(style);\n component.styleUrl = undefined;\n }),\n );\n }\n\n const fullyResolved = Promise.all(promises).then(() => componentDefResolved(type));\n componentResolved.push(fullyResolved);\n });\n clearResolutionOfComponentResourcesQueue();\n return Promise.all(componentResolved).then(() => undefined);\n}\n\nlet componentResourceResolutionQueue = new Map<Type<any>, Component>();\n\n// Track when existing ɵcmp for a Type is waiting on resources.\nconst componentDefPendingResolution = new Set<Type<any>>();\n\nexport function maybeQueueResolutionOfComponentResources(type: Type<any>, metadata: Component) {\n if (componentNeedsResolution(metadata)) {\n componentResourceResolutionQueue.set(type, metadata);\n componentDefPendingResolution.add(type);\n }\n}\n\nexport function isComponentDefPendingResolution(type: Type<any>): boolean {\n return componentDefPendingResolution.has(type);\n}\n\nexport function componentNeedsResolution(component: Component): boolean {\n return !!(\n (component.templateUrl && !component.hasOwnProperty('template')) ||\n (component.styleUrls && component.styleUrls.length) ||\n component.styleUrl\n );\n}\nexport function clearResolutionOfComponentResourcesQueue(): Map<Type<any>, Component> {\n const old = componentResourceResolutionQueue;\n componentResourceResolutionQueue = new Map();\n return old;\n}\n\nexport function restoreComponentResolutionQueue(queue: Map<Type<any>, Component>): void {\n componentDefPendingResolution.clear();\n queue.forEach((_, type) => componentDefPendingResolution.add(type));\n componentResourceResolutionQueue = queue;\n}\n\nexport function isComponentResourceResolutionQueueEmpty() {\n return componentResourceResolutionQueue.size === 0;\n}\n\nfunction unwrapResponse(response: string | {text(): Promise<string>}): string | Promise<string> {\n return typeof response == 'string' ? response : response.text();\n}\n\nfunction componentDefResolved(type: Type<any>): void {\n componentDefPendingResolution.delete(type);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Type} from '../interface/type';\nimport {NgModuleType} from '../metadata/ng_module_def';\nimport {stringify} from '../util/stringify';\n\n/**\n * Map of module-id to the corresponding NgModule.\n */\nconst modules = new Map<string, NgModuleType>();\n\n/**\n * Whether to check for duplicate NgModule registrations.\n *\n * This can be disabled for testing.\n */\nlet checkForDuplicateNgModules = true;\n\nfunction assertSameOrNotExisting(id: string, type: Type<any> | null, incoming: Type<any>): void {\n if (type && type !== incoming && checkForDuplicateNgModules) {\n throw new Error(\n `Duplicate module registered for ${id} - ${stringify(type)} vs ${stringify(type.name)}`,\n );\n }\n}\n\n/**\n * Adds the given NgModule type to Angular's NgModule registry.\n *\n * This is generated as a side-effect of NgModule compilation. Note that the `id` is passed in\n * explicitly and not read from the NgModule definition. This is for two reasons: it avoids a\n * megamorphic read, and in JIT there's a chicken-and-egg problem where the NgModule may not be\n * fully resolved when it's registered.\n *\n * @codeGenApi\n */\nexport function registerNgModuleType(ngModuleType: NgModuleType, id: string): void {\n const existing = modules.get(id) || null;\n assertSameOrNotExisting(id, existing, ngModuleType);\n modules.set(id, ngModuleType);\n}\n\nexport function clearModulesForTest(): void {\n modules.clear();\n}\n\nexport function getRegisteredNgModuleType(id: string): NgModuleType | undefined {\n return modules.get(id);\n}\n\n/**\n * Control whether the NgModule registration system enforces that each NgModule type registered has\n * a unique id.\n *\n * This is useful for testing as the NgModule registry cannot be properly reset between tests with\n * Angular's current API.\n */\nexport function setAllowDuplicateNgModuleIdsForTest(allowDuplicates: boolean): void {\n checkForDuplicateNgModules = !allowDuplicates;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {RuntimeError, RuntimeErrorCode} from '../errors';\nimport {getTemplateLocationDetails} from '../render3/instructions/element_validation';\nimport {TNodeType} from '../render3/interfaces/node';\nimport {RComment, RElement} from '../render3/interfaces/renderer_dom';\nimport {RENDERER} from '../render3/interfaces/view';\nimport {nativeRemoveNode} from '../render3/dom_node_manipulation';\nimport {getLView, getSelectedTNode} from '../render3/state';\nimport {getNativeByTNode} from '../render3/util/view_utils';\nimport {trustedHTMLFromString} from '../util/security/trusted_types';\n\n/**\n * Validation function invoked at runtime for each binding that might potentially\n * represent a security-sensitive attribute of an <iframe>.\n * See `IFRAME_SECURITY_SENSITIVE_ATTRS` in the\n * `packages/compiler/src/schema/dom_security_schema.ts` script for the full list\n * of such attributes.\n *\n * @codeGenApi\n */\nexport function ɵɵvalidateIframeAttribute(attrValue: any, tagName: string, attrName: string) {\n const lView = getLView();\n const tNode = getSelectedTNode()!;\n const element = getNativeByTNode(tNode, lView) as RElement | RComment;\n\n // Restrict any dynamic bindings of security-sensitive attributes/properties\n // on an <iframe> for security reasons.\n if (tNode.type === TNodeType.Element && tagName.toLowerCase() === 'iframe') {\n const iframe = element as HTMLIFrameElement;\n\n // Unset previously applied `src` and `srcdoc` if we come across a situation when\n // a security-sensitive attribute is set later via an attribute/property binding.\n iframe.src = '';\n iframe.srcdoc = trustedHTMLFromString('') as unknown as string;\n\n // Also remove the <iframe> from the document.\n nativeRemoveNode(lView[RENDERER], iframe);\n\n const errorMessage =\n ngDevMode &&\n `Angular has detected that the \\`${attrName}\\` was applied ` +\n `as a binding to an <iframe>${getTemplateLocationDetails(lView)}. ` +\n `For security reasons, the \\`${attrName}\\` can be set on an <iframe> ` +\n `as a static attribute only. \\n` +\n `To fix this, switch the \\`${attrName}\\` binding to a static attribute ` +\n `in a template or in host bindings section.`;\n throw new RuntimeError(RuntimeErrorCode.UNSAFE_IFRAME_ATTRS, errorMessage);\n }\n return attrValue;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Injector} from '../di/injector';\nimport {EnvironmentInjector, R3Injector} from '../di/r3_injector';\nimport {Type} from '../interface/type';\n\nimport {ComponentFactoryResolver} from './component_factory_resolver';\n\n/**\n * Represents an instance of an `NgModule` created by an `NgModuleFactory`.\n * Provides access to the `NgModule` instance and related objects.\n *\n * @publicApi\n */\nexport abstract class NgModuleRef<T> {\n /**\n * The injector that contains all of the providers of the `NgModule`.\n */\n abstract get injector(): EnvironmentInjector;\n\n /**\n * The resolver that can retrieve component factories in a context of this module.\n *\n * Note: since v13, dynamic component creation via\n * [`ViewContainerRef.createComponent`](api/core/ViewContainerRef#createComponent)\n * does **not** require resolving component factory: component class can be used directly.\n *\n * @deprecated Angular no longer requires Component factories. Please use other APIs where\n * Component class can be used directly.\n */\n abstract get componentFactoryResolver(): ComponentFactoryResolver;\n\n /**\n * The `NgModule` instance.\n */\n abstract get instance(): T;\n\n /**\n * Destroys the module instance and all of the data structures associated with it.\n */\n abstract destroy(): void;\n\n /**\n * Registers a callback to be executed when the module is destroyed.\n */\n abstract onDestroy(callback: () => void): void;\n}\n\nexport interface InternalNgModuleRef<T> extends NgModuleRef<T> {\n // Note: we are using the prefix _ as NgModuleData is an NgModuleRef and therefore directly\n // exposed to the user.\n _bootstrapComponents: Type<any>[];\n resolveInjectorInitializers(): void;\n}\n\n/**\n * @publicApi\n *\n * @deprecated\n * This class was mostly used as a part of ViewEngine-based JIT API and is no longer needed in Ivy\n * JIT mode. Angular provides APIs that accept NgModule classes directly (such as\n * [PlatformRef.bootstrapModule](api/core/PlatformRef#bootstrapModule) and\n * [createNgModule](api/core/createNgModule)), consider switching to those APIs instead of\n * using factory-based ones.\n */\nexport abstract class NgModuleFactory<T> {\n abstract get moduleType(): Type<T>;\n abstract create(parentInjector: Injector | null): NgModuleRef<T>;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {createInjectorWithoutInjectorInstances} from '../di/create_injector';\nimport {Injector} from '../di/injector';\nimport {EnvironmentProviders, Provider, StaticProvider} from '../di/interface/provider';\nimport {EnvironmentInjector, getNullInjector, R3Injector} from '../di/r3_injector';\nimport {Type} from '../interface/type';\nimport {ComponentFactoryResolver as viewEngine_ComponentFactoryResolver} from '../linker/component_factory_resolver';\nimport {\n InternalNgModuleRef,\n NgModuleFactory as viewEngine_NgModuleFactory,\n NgModuleRef as viewEngine_NgModuleRef,\n} from '../linker/ng_module_factory';\nimport {assertDefined} from '../util/assert';\nimport {stringify} from '../util/stringify';\n\nimport {ComponentFactoryResolver} from './component_ref';\nimport {getNgModuleDef} from './def_getters';\nimport {maybeUnwrapFn} from './util/misc_utils';\n\n/**\n * Returns a new NgModuleRef instance based on the NgModule class and parent injector provided.\n *\n * @param ngModule NgModule class.\n * @param parentInjector Optional injector instance to use as a parent for the module injector. If\n * not provided, `NullInjector` will be used instead.\n * @returns NgModuleRef that represents an NgModule instance.\n *\n * @publicApi\n */\nexport function createNgModule<T>(\n ngModule: Type<T>,\n parentInjector?: Injector,\n): viewEngine_NgModuleRef<T> {\n return new NgModuleRef<T>(ngModule, parentInjector ?? null, []);\n}\n\n/**\n * The `createNgModule` function alias for backwards-compatibility.\n * Please avoid using it directly and use `createNgModule` instead.\n *\n * @deprecated Use `createNgModule` instead.\n */\nexport const createNgModuleRef = createNgModule;\nexport class NgModuleRef<T> extends viewEngine_NgModuleRef<T> implements InternalNgModuleRef<T> {\n // tslint:disable-next-line:require-internal-with-underscore\n _bootstrapComponents: Type<any>[] = [];\n private readonly _r3Injector: R3Injector;\n override instance!: T;\n destroyCbs: (() => void)[] | null = [];\n\n // When bootstrapping a module we have a dependency graph that looks like this:\n // ApplicationRef -> ComponentFactoryResolver -> NgModuleRef. The problem is that if the\n // module being resolved tries to inject the ComponentFactoryResolver, it'll create a\n // circular dependency which will result in a runtime error, because the injector doesn't\n // exist yet. We work around the issue by creating the ComponentFactoryResolver ourselves\n // and providing it, rather than letting the injector resolve it.\n override readonly componentFactoryResolver: ComponentFactoryResolver =\n new ComponentFactoryResolver(this);\n\n constructor(\n private readonly ngModuleType: Type<T>,\n public _parent: Injector | null,\n additionalProviders: StaticProvider[],\n runInjectorInitializers = true,\n ) {\n super();\n const ngModuleDef = getNgModuleDef(ngModuleType);\n ngDevMode &&\n assertDefined(\n ngModuleDef,\n `NgModule '${stringify(ngModuleType)}' is not a subtype of 'NgModuleType'.`,\n );\n\n this._bootstrapComponents = maybeUnwrapFn(ngModuleDef!.bootstrap);\n this._r3Injector = createInjectorWithoutInjectorInstances(\n ngModuleType,\n _parent,\n [\n {provide: viewEngine_NgModuleRef, useValue: this},\n {\n provide: viewEngine_ComponentFactoryResolver,\n useValue: this.componentFactoryResolver,\n },\n ...additionalProviders,\n ],\n stringify(ngModuleType),\n new Set(['environment']),\n ) as R3Injector;\n\n // We need to resolve the injector types separately from the injector creation, because\n // the module might be trying to use this ref in its constructor for DI which will cause a\n // circular error that will eventually error out, because the injector isn't created yet.\n if (runInjectorInitializers) {\n this.resolveInjectorInitializers();\n }\n }\n\n resolveInjectorInitializers() {\n this._r3Injector.resolveInjectorInitializers();\n this.instance = this._r3Injector.get(this.ngModuleType);\n }\n\n override get injector(): EnvironmentInjector {\n return this._r3Injector;\n }\n\n override destroy(): void {\n ngDevMode && assertDefined(this.destroyCbs, 'NgModule already destroyed');\n const injector = this._r3Injector;\n !injector.destroyed && injector.destroy();\n this.destroyCbs!.forEach((fn) => fn());\n this.destroyCbs = null;\n }\n override onDestroy(callback: () => void): void {\n ngDevMode && assertDefined(this.destroyCbs, 'NgModule already destroyed');\n this.destroyCbs!.push(callback);\n }\n}\n\nexport class NgModuleFactory<T> extends viewEngine_NgModuleFactory<T> {\n constructor(public moduleType: Type<T>) {\n super();\n }\n\n override create(parentInjector: Injector | null): viewEngine_NgModuleRef<T> {\n return new NgModuleRef(this.moduleType, parentInjector, []);\n }\n}\n\nexport function createNgModuleRefWithProviders<T>(\n moduleType: Type<T>,\n parentInjector: Injector | null,\n additionalProviders: StaticProvider[],\n): InternalNgModuleRef<T> {\n return new NgModuleRef(moduleType, parentInjector, additionalProviders, false);\n}\n\nexport class EnvironmentNgModuleRefAdapter extends viewEngine_NgModuleRef<null> {\n override readonly injector: R3Injector;\n override readonly componentFactoryResolver: ComponentFactoryResolver =\n new ComponentFactoryResolver(this);\n override readonly instance = null;\n\n constructor(config: {\n providers: Array<Provider | EnvironmentProviders>;\n parent: EnvironmentInjector | null;\n debugName: string | null;\n runEnvironmentInitializers: boolean;\n }) {\n super();\n const injector = new R3Injector(\n [\n ...config.providers,\n {provide: viewEngine_NgModuleRef, useValue: this},\n {provide: viewEngine_ComponentFactoryResolver, useValue: this.componentFactoryResolver},\n ],\n config.parent || getNullInjector(),\n config.debugName,\n new Set(['environment']),\n );\n this.injector = injector;\n if (config.runEnvironmentInitializers) {\n injector.resolveInjectorInitializers();\n }\n }\n\n override destroy(): void {\n this.injector.destroy();\n }\n\n override onDestroy(callback: () => void): void {\n this.injector.onDestroy(callback);\n }\n}\n\n/**\n * Create a new environment injector.\n *\n * @param providers An array of providers.\n * @param parent A parent environment injector.\n * @param debugName An optional name for this injector instance, which will be used in error\n * messages.\n *\n * @publicApi\n */\nexport function createEnvironmentInjector(\n providers: Array<Provider | EnvironmentProviders>,\n parent: EnvironmentInjector,\n debugName: string | null = null,\n): EnvironmentInjector {\n const adapter = new EnvironmentNgModuleRefAdapter({\n providers,\n parent,\n debugName,\n runEnvironmentInitializers: true,\n });\n return adapter.injector;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport {ɵɵinject as inject} from '../di/injector_compatibility';\nimport {ɵɵdefineInjectable as defineInjectable} from '../di/interface/defs';\nimport {internalImportProvidersFrom} from '../di/provider_collection';\nimport {EnvironmentInjector} from '../di/r3_injector';\nimport {OnDestroy} from '../interface/lifecycle_hooks';\nimport {ComponentDef} from './interfaces/definition';\nimport {createEnvironmentInjector} from './ng_module_ref';\n\n/**\n * A service used by the framework to create instances of standalone injectors. Those injectors are\n * created on demand in case of dynamic component instantiation and contain ambient providers\n * collected from the imports graph rooted at a given standalone component.\n */\nexport class StandaloneService implements OnDestroy {\n cachedInjectors = new Map<ComponentDef<unknown>, EnvironmentInjector | null>();\n\n constructor(private _injector: EnvironmentInjector) {}\n\n getOrCreateStandaloneInjector(componentDef: ComponentDef<unknown>): EnvironmentInjector | null {\n if (!componentDef.standalone) {\n return null;\n }\n\n if (!this.cachedInjectors.has(componentDef)) {\n const providers = internalImportProvidersFrom(false, componentDef.type);\n const standaloneInjector =\n providers.length > 0\n ? createEnvironmentInjector(\n [providers],\n this._injector,\n `Standalone[${componentDef.type.name}]`,\n )\n : null;\n this.cachedInjectors.set(componentDef, standaloneInjector);\n }\n\n return this.cachedInjectors.get(componentDef)!;\n }\n\n ngOnDestroy() {\n try {\n for (const injector of this.cachedInjectors.values()) {\n if (injector !== null) {\n injector.destroy();\n }\n }\n } finally {\n this.cachedInjectors.clear();\n }\n }\n\n /** @nocollapse */\n static ɵprov = /** @pureOrBreakMyCode */ /* @__PURE__ */ defineInjectable({\n token: StandaloneService,\n providedIn: 'environment',\n factory: () => new StandaloneService(inject(EnvironmentInjector)),\n });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ChangeDetectionStrategy} from '../change_detection/constants';\nimport {EnvironmentInjector} from '../di/r3_injector';\nimport {formatRuntimeError, RuntimeErrorCode} from '../errors';\nimport {Type, Writable} from '../interface/type';\nimport {NgModuleDef} from '../metadata/ng_module_def';\nimport {SchemaMetadata} from '../metadata/schema';\nimport {ViewEncapsulation} from '../metadata/view';\nimport {assertNotEqual} from '../util/assert';\nimport {noSideEffects} from '../util/closure';\nimport {EMPTY_ARRAY, EMPTY_OBJ} from '../util/empty';\nimport {initNgDevMode} from '../util/ng_dev_mode';\nimport {performanceMarkFeature} from '../util/performance';\nimport {getComponentDef, getDirectiveDef, getPipeDef} from './def_getters';\n\nimport type {\n ComponentDef,\n ComponentDefFeature,\n ComponentTemplate,\n ContentQueriesFunction,\n DependencyTypeList,\n DirectiveDef,\n DirectiveDefFeature,\n DirectiveDefListOrFactory,\n HostBindingsFunction,\n InputTransformFunction,\n PipeDef,\n PipeDefListOrFactory,\n TypeOrFactory,\n ViewQueriesFunction,\n} from './interfaces/definition';\nimport {InputFlags} from './interfaces/input_flags';\nimport type {TAttributes, TConstantsOrFactory} from './interfaces/node';\nimport {CssSelectorList} from './interfaces/projection';\nimport {stringifyCSSSelectorList} from './node_selector_matcher';\nimport {StandaloneService} from './standalone_service';\n\n/**\n * Map of inputs for a given directive/component.\n *\n * Given:\n * ```ts\n * class MyComponent {\n * @Input()\n * publicInput1: string;\n *\n * @Input('publicInput2')\n * declaredInput2: string;\n *\n * @Input({transform: (value: boolean) => value ? 1 : 0})\n * transformedInput3: number;\n *\n * signalInput = input(3);\n * }\n * ```\n *\n * is described as:\n * ```ts\n * {\n * publicInput1: 'publicInput1',\n * declaredInput2: [InputFlags.None, 'declaredInput2', 'publicInput2'],\n * transformedInput3: [\n * InputFlags.None,\n * 'transformedInput3',\n * 'transformedInput3',\n * (value: boolean) => value ? 1 : 0\n * ],\n * signalInput: [InputFlags.SignalBased, \"signalInput\"],\n * }\n * ```\n *\n * Which the minifier may translate to:\n * ```ts\n * {\n * minifiedPublicInput1: 'publicInput1',\n * minifiedDeclaredInput2: [InputFlags.None, 'publicInput2', 'declaredInput2'],\n * minifiedTransformedInput3: [\n * InputFlags.None,\n * 'transformedInput3',\n * 'transformedInput3',\n * (value: boolean) => value ? 1 : 0\n * ],\n * minifiedSignalInput: [InputFlags.SignalBased, \"signalInput\"],\n * }\n * ```\n *\n * This allows the render to re-construct the minified, public, and declared names\n * of properties.\n *\n * NOTE:\n * - Because declared and public name are usually same we only generate the array\n * `['declared', 'public']` format when they differ, or there is a transform.\n * - The reason why this API and `outputs` API is not the same is that `NgOnChanges` has\n * inconsistent behavior in that it uses declared names rather than minified or public.\n */\ntype DirectiveInputs<T> = {\n [P in keyof T]?: // Basic case. Mapping minified name to public name.\n | string\n // Complex input when there are flags, or differing public name and declared name, or there\n // is a transform. Such inputs are not as common, so the array form is only generated then.\n | [\n flags: InputFlags,\n publicName: string,\n declaredName?: string,\n transform?: InputTransformFunction,\n ];\n};\n\ninterface DirectiveDefinition<T> {\n /**\n * Directive type, needed to configure the injector.\n */\n type: Type<T>;\n\n /** The selectors that will be used to match nodes to this directive. */\n selectors?: CssSelectorList;\n\n /**\n * A map of input names.\n */\n inputs?: DirectiveInputs<T>;\n\n /**\n * A map of output names.\n *\n * The format is in: `{[actualPropertyName: string]:string}`.\n *\n * Which the minifier may translate to: `{[minifiedPropertyName: string]:string}`.\n *\n * This allows the render to re-construct the minified and non-minified names\n * of properties.\n */\n outputs?: {[P in keyof T]?: string};\n\n /**\n * A list of optional features to apply.\n *\n * See: {@link NgOnChangesFeature}, {@link ProvidersFeature}, {@link InheritDefinitionFeature}\n */\n features?: DirectiveDefFeature[];\n\n /**\n * Function executed by the parent template to allow child directive to apply host bindings.\n */\n hostBindings?: HostBindingsFunction<T>;\n\n /**\n * The number of bindings in this directive `hostBindings` (including pure fn bindings).\n *\n * Used to calculate the length of the component's LView array, so we\n * can pre-fill the array and set the host binding start index.\n */\n hostVars?: number;\n\n /**\n * Assign static attribute values to a host element.\n *\n * This property will assign static attribute values as well as class and style\n * values to a host element. Since attribute values can consist of different types of values,\n * the `hostAttrs` array must include the values in the following format:\n *\n * attrs = [\n * // static attributes (like `title`, `name`, `id`...)\n * attr1, value1, attr2, value,\n *\n * // a single namespace value (like `x:id`)\n * NAMESPACE_MARKER, namespaceUri1, name1, value1,\n *\n * // another single namespace value (like `x:name`)\n * NAMESPACE_MARKER, namespaceUri2, name2, value2,\n *\n * // a series of CSS classes that will be applied to the element (no spaces)\n * CLASSES_MARKER, class1, class2, class3,\n *\n * // a series of CSS styles (property + value) that will be applied to the element\n * STYLES_MARKER, prop1, value1, prop2, value2\n * ]\n *\n * All non-class and non-style attributes must be defined at the start of the list\n * first before all class and style values are set. When there is a change in value\n * type (like when classes and styles are introduced) a marker must be used to separate\n * the entries. The marker values themselves are set via entries found in the\n * [AttributeMarker] enum.\n */\n hostAttrs?: TAttributes;\n\n /**\n * Function to create instances of content queries associated with a given directive.\n */\n contentQueries?: ContentQueriesFunction<T>;\n\n /**\n * Additional set of instructions specific to view query processing. This could be seen as a\n * set of instructions to be inserted into the template function.\n */\n viewQuery?: ViewQueriesFunction<T> | null;\n\n /**\n * Defines the name that can be used in the template to assign this directive to a variable.\n *\n * See: {@link Directive.exportAs}\n */\n exportAs?: string[];\n\n /**\n * Whether this directive/component is standalone.\n */\n standalone?: boolean;\n\n /**\n * Whether this directive/component is signal-based.\n */\n signals?: boolean;\n}\n\ninterface ComponentDefinition<T> extends Omit<DirectiveDefinition<T>, 'features'> {\n /**\n * The number of nodes, local refs, and pipes in this component template.\n *\n * Used to calculate the length of this component's LView array, so we\n * can pre-fill the array and set the binding start index.\n */\n decls: number;\n\n /**\n * The number of bindings in this component template (including pure fn bindings).\n *\n * Used to calculate the length of this component's LView array, so we\n * can pre-fill the array and set the host binding start index.\n */\n vars: number;\n\n /**\n * Template function use for rendering DOM.\n *\n * This function has following structure.\n *\n * ```ts\n * function Template<T>(ctx:T, creationMode: boolean) {\n * if (creationMode) {\n * // Contains creation mode instructions.\n * }\n * // Contains binding update instructions\n * }\n * ```\n *\n * Common instructions are:\n * Creation mode instructions:\n * - `elementStart`, `elementEnd`\n * - `text`\n * - `container`\n * - `listener`\n *\n * Binding update instructions:\n * - `bind`\n * - `elementAttribute`\n * - `elementProperty`\n * - `elementClass`\n * - `elementStyle`\n *\n */\n template: ComponentTemplate<T>;\n\n /**\n * Constants for the nodes in the component's view.\n * Includes attribute arrays, local definition arrays etc.\n */\n consts?: TConstantsOrFactory;\n\n /**\n * An array of `ngContent[selector]` values that were found in the template.\n */\n ngContentSelectors?: string[];\n /**\n * A list of optional features to apply.\n *\n * See: {@link NgOnChangesFeature}, {@link ProvidersFeature}\n */\n features?: ComponentDefFeature[];\n\n /**\n * Defines template and style encapsulation options available for Component's {@link /api/core/Component Component}.\n */\n encapsulation?: ViewEncapsulation;\n\n /**\n * Defines arbitrary developer-defined data to be stored on a renderer instance.\n * This is useful for renderers that delegate to other renderers.\n *\n * see: animation\n */\n data?: {[kind: string]: any};\n\n /**\n * A set of styles that the component needs to be present for component to render correctly.\n */\n styles?: string[];\n\n /**\n * The strategy that the default change detector uses to detect changes.\n * When set, takes effect the next time change detection is triggered.\n */\n changeDetection?: ChangeDetectionStrategy;\n\n /**\n * Registry of directives, components, and pipes that may be found in this component's view.\n *\n * This property is either an array of types or a function that returns the array of types. This\n * function may be necessary to support forward declarations.\n */\n dependencies?: TypeOrFactory<DependencyTypeList>;\n\n /**\n * The set of schemas that declare elements to be allowed in the component's template.\n */\n schemas?: SchemaMetadata[] | null;\n}\n\n/**\n * Create a component definition object.\n *\n *\n * # Example\n * ```ts\n * class MyComponent {\n * // Generated by Angular Template Compiler\n * // [Symbol] syntax will not be supported by TypeScript until v2.7\n * static ɵcmp = defineComponent({\n * ...\n * });\n * }\n * ```\n * @codeGenApi\n */\nexport function ɵɵdefineComponent<T>(\n componentDefinition: ComponentDefinition<T>,\n): ComponentDef<any> {\n return noSideEffects(() => {\n // Initialize ngDevMode. This must be the first statement in ɵɵdefineComponent.\n // See the `initNgDevMode` docstring for more information.\n (typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode();\n\n const baseDef = getNgDirectiveDef(componentDefinition as DirectiveDefinition<T>);\n const def: Writable<ComponentDef<T>> = {\n ...baseDef,\n decls: componentDefinition.decls,\n vars: componentDefinition.vars,\n template: componentDefinition.template,\n consts: componentDefinition.consts || null,\n ngContentSelectors: componentDefinition.ngContentSelectors,\n onPush: componentDefinition.changeDetection === ChangeDetectionStrategy.OnPush,\n directiveDefs: null!, // assigned in noSideEffects\n pipeDefs: null!, // assigned in noSideEffects\n dependencies: (baseDef.standalone && componentDefinition.dependencies) || null,\n getStandaloneInjector: baseDef.standalone\n ? (parentInjector: EnvironmentInjector) => {\n return parentInjector.get(StandaloneService).getOrCreateStandaloneInjector(def);\n }\n : null,\n getExternalStyles: null,\n signals: componentDefinition.signals ?? false,\n data: componentDefinition.data || {},\n encapsulation: componentDefinition.encapsulation || ViewEncapsulation.Emulated,\n styles: componentDefinition.styles || EMPTY_ARRAY,\n _: null,\n schemas: componentDefinition.schemas || null,\n tView: null,\n id: '',\n };\n\n // TODO: Do we still need/want this ?\n if (baseDef.standalone) {\n performanceMarkFeature('NgStandalone');\n }\n\n initFeatures(def);\n const dependencies = componentDefinition.dependencies;\n def.directiveDefs = extractDefListOrFactory(dependencies, /* pipeDef */ false);\n def.pipeDefs = extractDefListOrFactory(dependencies, /* pipeDef */ true);\n def.id = getComponentId(def);\n\n return def;\n });\n}\n\nexport function extractDirectiveDef(type: Type<any>): DirectiveDef<any> | ComponentDef<any> | null {\n return getComponentDef(type) || getDirectiveDef(type);\n}\n\nfunction nonNull<T>(value: T | null): value is T {\n return value !== null;\n}\n\n/**\n * @codeGenApi\n */\nexport function ɵɵdefineNgModule<T>(def: {\n /** Token representing the module. Used by DI. */\n type: T;\n\n /** List of components to bootstrap. */\n bootstrap?: Type<any>[] | (() => Type<any>[]);\n\n /** List of components, directives, and pipes declared by this module. */\n declarations?: Type<any>[] | (() => Type<any>[]);\n\n /** List of modules or `ModuleWithProviders` imported by this module. */\n imports?: Type<any>[] | (() => Type<any>[]);\n\n /**\n * List of modules, `ModuleWithProviders`, components, directives, or pipes exported by this\n * module.\n */\n exports?: Type<any>[] | (() => Type<any>[]);\n\n /** The set of schemas that declare elements to be allowed in the NgModule. */\n schemas?: SchemaMetadata[] | null;\n\n /** Unique ID for the module that is used with `getModuleFactory`. */\n id?: string | null;\n}): unknown {\n return noSideEffects(() => {\n const res: NgModuleDef<T> = {\n type: def.type,\n bootstrap: def.bootstrap || EMPTY_ARRAY,\n declarations: def.declarations || EMPTY_ARRAY,\n imports: def.imports || EMPTY_ARRAY,\n exports: def.exports || EMPTY_ARRAY,\n transitiveCompileScopes: null,\n schemas: def.schemas || null,\n id: def.id || null,\n };\n return res;\n });\n}\n\n/**\n * Converts binding objects from the `DirectiveDefinition` into more efficient\n * lookup dictionaries that are optimized for the framework runtime.\n *\n * This function converts inputs or output directive information into new objects\n * where the public name conveniently maps to the minified internal field name.\n *\n * For inputs, the input flags are additionally persisted into the new data structure,\n * so that those can be quickly retrieved when needed.\n *\n * e.g. for\n *\n * ```ts\n * class Comp {\n * @Input()\n * propName1: string;\n *\n * @Input('publicName2')\n * declaredPropName2: number;\n *\n * inputSignal = input(3);\n * }\n * ```\n *\n * will be serialized as\n *\n * ```ts\n * {\n * propName1: 'propName1',\n * declaredPropName2: ['publicName2', 'declaredPropName2'],\n * inputSignal: [InputFlags.SignalBased, 'inputSignal'],\n * }\n * ```\n *\n * which is than translated by the minifier as:\n *\n * ```ts\n * {\n * minifiedPropName1: 'propName1',\n * minifiedPropName2: ['publicName2', 'declaredPropName2'],\n * minifiedInputSignal: [InputFlags.SignalBased, 'inputSignal'],\n * }\n * ```\n *\n * becomes: (public name => minifiedName + isSignal if needed)\n *\n * ```ts\n * {\n * 'propName1': 'minifiedPropName1',\n * 'publicName2': 'minifiedPropName2',\n * 'inputSignal': ['minifiedInputSignal', InputFlags.SignalBased],\n * }\n * ```\n *\n * Optionally the function can take `declaredInputs` which will result\n * in: (public name => declared name)\n *\n * ```ts\n * {\n * 'propName1': 'propName1',\n * 'publicName2': 'declaredPropName2',\n * 'inputSignal': 'inputSignal',\n * }\n * ```\n *\n\n */\nfunction parseAndConvertInputsForDefinition<T>(\n obj: DirectiveDefinition<T>['inputs'],\n declaredInputs: Record<string, string>,\n) {\n if (obj == null) return EMPTY_OBJ as any;\n const newLookup: Record<\n string,\n [minifiedName: string, flags: InputFlags, transform: InputTransformFunction | null]\n > = {};\n for (const minifiedKey in obj) {\n if (obj.hasOwnProperty(minifiedKey)) {\n const value = obj[minifiedKey]!;\n let publicName: string;\n let declaredName: string;\n let inputFlags: InputFlags;\n let transform: InputTransformFunction | null;\n\n if (Array.isArray(value)) {\n inputFlags = value[0];\n publicName = value[1];\n declaredName = value[2] ?? publicName; // declared name might not be set to save bytes.\n transform = value[3] || null;\n } else {\n publicName = value;\n declaredName = value;\n inputFlags = InputFlags.None;\n transform = null;\n }\n\n newLookup[publicName] = [minifiedKey, inputFlags, transform];\n declaredInputs[publicName] = declaredName as string;\n }\n }\n return newLookup;\n}\n\nfunction parseAndConvertOutputsForDefinition<T>(\n obj: DirectiveDefinition<T>['outputs'],\n): Record<keyof T, string> {\n if (obj == null) return EMPTY_OBJ as any;\n const newLookup: any = {};\n for (const minifiedKey in obj) {\n if (obj.hasOwnProperty(minifiedKey)) {\n newLookup[obj[minifiedKey]!] = minifiedKey;\n }\n }\n return newLookup;\n}\n\n/**\n * Create a directive definition object.\n *\n * # Example\n * ```ts\n * class MyDirective {\n * // Generated by Angular Template Compiler\n * // [Symbol] syntax will not be supported by TypeScript until v2.7\n * static ɵdir = ɵɵdefineDirective({\n * ...\n * });\n * }\n * ```\n *\n * @codeGenApi\n */\nexport function ɵɵdefineDirective<T>(\n directiveDefinition: DirectiveDefinition<T>,\n): DirectiveDef<any> {\n return noSideEffects(() => {\n const def = getNgDirectiveDef(directiveDefinition);\n initFeatures(def);\n\n return def;\n });\n}\n\n/**\n * Create a pipe definition object.\n *\n * # Example\n * ```ts\n * class MyPipe implements PipeTransform {\n * // Generated by Angular Template Compiler\n * static ɵpipe = definePipe({\n * ...\n * });\n * }\n * ```\n * @param pipeDef Pipe definition generated by the compiler\n *\n * @codeGenApi\n */\nexport function ɵɵdefinePipe<T>(pipeDef: {\n /** Name of the pipe. Used for matching pipes in template to pipe defs. */\n name: string;\n\n /** Pipe class reference. Needed to extract pipe lifecycle hooks. */\n type: Type<T>;\n\n /** Whether the pipe is pure. */\n pure?: boolean;\n\n /**\n * Whether the pipe is standalone.\n */\n standalone?: boolean;\n}): unknown {\n return <PipeDef<T>>{\n type: pipeDef.type,\n name: pipeDef.name,\n factory: null,\n pure: pipeDef.pure !== false,\n standalone: pipeDef.standalone ?? true,\n onDestroy: pipeDef.type.prototype.ngOnDestroy || null,\n };\n}\n\nfunction getNgDirectiveDef<T>(directiveDefinition: DirectiveDefinition<T>): DirectiveDef<T> {\n const declaredInputs: Record<string, string> = {};\n\n return {\n type: directiveDefinition.type,\n providersResolver: null,\n factory: null,\n hostBindings: directiveDefinition.hostBindings || null,\n hostVars: directiveDefinition.hostVars || 0,\n hostAttrs: directiveDefinition.hostAttrs || null,\n contentQueries: directiveDefinition.contentQueries || null,\n declaredInputs: declaredInputs,\n inputConfig: directiveDefinition.inputs || EMPTY_OBJ,\n exportAs: directiveDefinition.exportAs || null,\n standalone: directiveDefinition.standalone ?? true,\n signals: directiveDefinition.signals === true,\n selectors: directiveDefinition.selectors || EMPTY_ARRAY,\n viewQuery: directiveDefinition.viewQuery || null,\n features: directiveDefinition.features || null,\n setInput: null,\n findHostDirectiveDefs: null,\n hostDirectives: null,\n inputs: parseAndConvertInputsForDefinition(directiveDefinition.inputs, declaredInputs),\n outputs: parseAndConvertOutputsForDefinition(directiveDefinition.outputs),\n debugInfo: null,\n };\n}\n\nfunction initFeatures<T>(definition: DirectiveDef<T> | ComponentDef<T>): void {\n definition.features?.forEach((fn) => fn(definition));\n}\n\nexport function extractDefListOrFactory(\n dependencies: TypeOrFactory<DependencyTypeList> | undefined,\n pipeDef: false,\n): DirectiveDefListOrFactory | null;\nexport function extractDefListOrFactory(\n dependencies: TypeOrFactory<DependencyTypeList> | undefined,\n pipeDef: true,\n): PipeDefListOrFactory | null;\nexport function extractDefListOrFactory(\n dependencies: TypeOrFactory<DependencyTypeList> | undefined,\n pipeDef: boolean,\n): unknown {\n if (!dependencies) {\n return null;\n }\n\n const defExtractor = pipeDef ? getPipeDef : extractDirectiveDef;\n\n return () =>\n (typeof dependencies === 'function' ? dependencies() : dependencies)\n .map((dep) => defExtractor(dep))\n .filter(nonNull);\n}\n\n/**\n * A map that contains the generated component IDs and type.\n */\nexport const GENERATED_COMP_IDS = new Map<string, Type<unknown>>();\n\n/**\n * A method can returns a component ID from the component definition using a variant of DJB2 hash\n * algorithm.\n */\nfunction getComponentId<T>(componentDef: ComponentDef<T>): string {\n let hash = 0;\n\n // For components with i18n in templates, the `consts` array is generated by the compiler\n // as a function. If client and server bundles were produced with different minification\n // configurations, the serializable contents of the function body would be different on\n // the client and on the server. This might result in different ids generated. To avoid this\n // issue, we do not take the `consts` contents into account if it's a function.\n // See https://github.com/angular/angular/issues/58713.\n const componentDefConsts = typeof componentDef.consts === 'function' ? '' : componentDef.consts;\n\n // We cannot rely solely on the component selector as the same selector can be used in different\n // modules.\n //\n // `componentDef.style` is not used, due to it causing inconsistencies. Ex: when server\n // component styles has no sourcemaps and browsers do.\n //\n // Example:\n // https://github.com/angular/components/blob/d9f82c8f95309e77a6d82fd574c65871e91354c2/src/material/core/option/option.ts#L248\n // https://github.com/angular/components/blob/285f46dc2b4c5b127d356cb7c4714b221f03ce50/src/material/legacy-core/option/option.ts#L32\n const hashSelectors = [\n componentDef.selectors,\n componentDef.ngContentSelectors,\n componentDef.hostVars,\n componentDef.hostAttrs,\n componentDefConsts,\n componentDef.vars,\n componentDef.decls,\n componentDef.encapsulation,\n componentDef.standalone,\n componentDef.signals,\n componentDef.exportAs,\n JSON.stringify(componentDef.inputs),\n JSON.stringify(componentDef.outputs),\n // We cannot use 'componentDef.type.name' as the name of the symbol will change and will not\n // match in the server and browser bundles.\n Object.getOwnPropertyNames(componentDef.type.prototype),\n !!componentDef.contentQueries,\n !!componentDef.viewQuery,\n ];\n\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n // If client and server bundles were produced with different minification configurations,\n // the serializable contents of the function body would be different on the client and on\n // the server. Ensure that we do not accidentally use functions in component id computation.\n for (const item of hashSelectors) {\n assertNotEqual(\n typeof item,\n 'function',\n 'Internal error: attempting to use a function in component id computation logic.',\n );\n }\n }\n\n for (const char of hashSelectors.join('|')) {\n hash = (Math.imul(31, hash) + char.charCodeAt(0)) << 0;\n }\n\n // Force positive number hash.\n // 2147483647 = equivalent of Integer.MAX_VALUE.\n hash += 2147483647 + 1;\n\n const compId = 'c' + hash;\n\n if (\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n // Skip the check on the server since we can't guarantee the same component instance between\n // requests. Note that we can't use DI to check if we're on the server, because the component\n // hasn't been instantiated yet.\n (typeof ngServerMode === 'undefined' || !ngServerMode)\n ) {\n if (GENERATED_COMP_IDS.has(compId)) {\n const previousCompDefType = GENERATED_COMP_IDS.get(compId)!;\n if (previousCompDefType !== componentDef.type) {\n console.warn(\n formatRuntimeError(\n RuntimeErrorCode.COMPONENT_ID_COLLISION,\n `Component ID generation collision detected. Components '${\n previousCompDefType.name\n }' and '${componentDef.type.name}' with selector '${stringifyCSSSelectorList(\n componentDef.selectors,\n )}' generated the same component ID. To fix this, you can change the selector of one of those components or add an extra host attribute to force a different ID.`,\n ),\n );\n }\n } else {\n GENERATED_COMP_IDS.set(compId, componentDef.type);\n }\n }\n\n return compId;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {RuntimeError, RuntimeErrorCode} from '../../errors';\nimport {Type, Writable} from '../../interface/type';\nimport {EMPTY_ARRAY, EMPTY_OBJ} from '../../util/empty';\nimport {fillProperties} from '../../util/property';\nimport {\n ComponentDef,\n ContentQueriesFunction,\n DirectiveDef,\n DirectiveDefFeature,\n HostBindingsFunction,\n RenderFlags,\n ViewQueriesFunction,\n} from '../interfaces/definition';\nimport {TAttributes} from '../interfaces/node';\nimport {isComponentDef} from '../interfaces/type_checks';\nimport {mergeHostAttrs} from '../util/attrs_utils';\nimport {stringifyForError} from '../util/stringify_utils';\n\nexport function getSuperType(\n type: Type<any>,\n): Type<any> & {ɵcmp?: ComponentDef<any>; ɵdir?: DirectiveDef<any>} {\n return Object.getPrototypeOf(type.prototype).constructor;\n}\n\ntype WritableDef = Writable<DirectiveDef<any> | ComponentDef<any>>;\n\n/**\n * Merges the definition from a super class to a sub class.\n * @param definition The definition that is a SubClass of another directive of component\n *\n * @codeGenApi\n */\nexport function ɵɵInheritDefinitionFeature(\n definition: DirectiveDef<any> | ComponentDef<any>,\n): void {\n let superType = getSuperType(definition.type);\n let shouldInheritFields = true;\n const inheritanceChain: WritableDef[] = [definition];\n\n while (superType) {\n let superDef: DirectiveDef<any> | ComponentDef<any> | undefined = undefined;\n if (isComponentDef(definition)) {\n // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance.\n superDef = superType.ɵcmp || superType.ɵdir;\n } else {\n if (superType.ɵcmp) {\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_INHERITANCE,\n ngDevMode &&\n `Directives cannot inherit Components. Directive ${stringifyForError(\n definition.type,\n )} is attempting to extend component ${stringifyForError(superType)}`,\n );\n }\n // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance.\n superDef = superType.ɵdir;\n }\n\n if (superDef) {\n if (shouldInheritFields) {\n inheritanceChain.push(superDef);\n // Some fields in the definition may be empty, if there were no values to put in them that\n // would've justified object creation. Unwrap them if necessary.\n const writeableDef = definition as WritableDef;\n writeableDef.inputs = maybeUnwrapEmpty(definition.inputs);\n writeableDef.declaredInputs = maybeUnwrapEmpty(definition.declaredInputs);\n writeableDef.outputs = maybeUnwrapEmpty(definition.outputs);\n\n // Merge hostBindings\n const superHostBindings = superDef.hostBindings;\n superHostBindings && inheritHostBindings(definition, superHostBindings);\n\n // Merge queries\n const superViewQuery = superDef.viewQuery;\n const superContentQueries = superDef.contentQueries;\n superViewQuery && inheritViewQuery(definition, superViewQuery);\n superContentQueries && inheritContentQueries(definition, superContentQueries);\n\n // Merge inputs and outputs\n mergeInputsWithTransforms(definition, superDef);\n fillProperties(definition.outputs, superDef.outputs);\n\n // Merge animations metadata.\n // If `superDef` is a Component, the `data` field is present (defaults to an empty object).\n if (isComponentDef(superDef) && superDef.data.animation) {\n // If super def is a Component, the `definition` is also a Component, since Directives can\n // not inherit Components (we throw an error above and cannot reach this code).\n const defData = (definition as ComponentDef<any>).data;\n defData.animation = (defData.animation || []).concat(superDef.data.animation);\n }\n }\n\n // Run parent features\n const features = superDef.features;\n if (features) {\n for (let i = 0; i < features.length; i++) {\n const feature = features[i];\n if (feature && feature.ngInherit) {\n (feature as DirectiveDefFeature)(definition);\n }\n // If `InheritDefinitionFeature` is a part of the current `superDef`, it means that this\n // def already has all the necessary information inherited from its super class(es), so we\n // can stop merging fields from super classes. However we need to iterate through the\n // prototype chain to look for classes that might contain other \"features\" (like\n // NgOnChanges), which we should invoke for the original `definition`. We set the\n // `shouldInheritFields` flag to indicate that, essentially skipping fields inheritance\n // logic and only invoking functions from the \"features\" list.\n if (feature === ɵɵInheritDefinitionFeature) {\n shouldInheritFields = false;\n }\n }\n }\n }\n\n superType = Object.getPrototypeOf(superType);\n }\n mergeHostAttrsAcrossInheritance(inheritanceChain);\n}\n\nfunction mergeInputsWithTransforms<T>(target: WritableDef, source: DirectiveDef<any>) {\n for (const key in source.inputs) {\n if (!source.inputs.hasOwnProperty(key)) {\n continue;\n }\n if (target.inputs.hasOwnProperty(key)) {\n continue;\n }\n\n const value = source.inputs[key];\n\n if (value !== undefined) {\n target.inputs[key] = value;\n target.declaredInputs[key] = source.declaredInputs[key];\n }\n }\n}\n\n/**\n * Merge the `hostAttrs` and `hostVars` from the inherited parent to the base class.\n *\n * @param inheritanceChain A list of `WritableDefs` starting at the top most type and listing\n * sub-types in order. For each type take the `hostAttrs` and `hostVars` and merge it with the child\n * type.\n */\nfunction mergeHostAttrsAcrossInheritance(inheritanceChain: WritableDef[]) {\n let hostVars: number = 0;\n let hostAttrs: TAttributes | null = null;\n // We process the inheritance order from the base to the leaves here.\n for (let i = inheritanceChain.length - 1; i >= 0; i--) {\n const def = inheritanceChain[i];\n // For each `hostVars`, we need to add the superclass amount.\n def.hostVars = hostVars += def.hostVars;\n // for each `hostAttrs` we need to merge it with superclass.\n def.hostAttrs = mergeHostAttrs(\n def.hostAttrs,\n (hostAttrs = mergeHostAttrs(hostAttrs, def.hostAttrs)),\n );\n }\n}\n\nfunction maybeUnwrapEmpty<T>(value: T[]): T[];\nfunction maybeUnwrapEmpty<T>(value: T): T;\nfunction maybeUnwrapEmpty(value: any): any {\n if (value === EMPTY_OBJ) {\n return {};\n } else if (value === EMPTY_ARRAY) {\n return [];\n } else {\n return value;\n }\n}\n\nfunction inheritViewQuery(definition: WritableDef, superViewQuery: ViewQueriesFunction<any>) {\n const prevViewQuery = definition.viewQuery;\n if (prevViewQuery) {\n definition.viewQuery = (rf, ctx) => {\n superViewQuery(rf, ctx);\n prevViewQuery(rf, ctx);\n };\n } else {\n definition.viewQuery = superViewQuery;\n }\n}\n\nfunction inheritContentQueries(\n definition: WritableDef,\n superContentQueries: ContentQueriesFunction<any>,\n) {\n const prevContentQueries = definition.contentQueries;\n if (prevContentQueries) {\n definition.contentQueries = (rf, ctx, directiveIndex) => {\n superContentQueries(rf, ctx, directiveIndex);\n prevContentQueries(rf, ctx, directiveIndex);\n };\n } else {\n definition.contentQueries = superContentQueries;\n }\n}\n\nfunction inheritHostBindings(\n definition: WritableDef,\n superHostBindings: HostBindingsFunction<any>,\n) {\n const prevHostBindings = definition.hostBindings;\n if (prevHostBindings) {\n definition.hostBindings = (rf: RenderFlags, ctx: any) => {\n superHostBindings(rf, ctx);\n prevHostBindings(rf, ctx);\n };\n } else {\n definition.hostBindings = superHostBindings;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ComponentDef, DirectiveDef} from '../interfaces/definition';\nimport {isComponentDef} from '../interfaces/type_checks';\n\nimport {getSuperType} from './inherit_definition_feature';\n\n/**\n * Fields which exist on either directive or component definitions, and need to be copied from\n * parent to child classes by the `ɵɵCopyDefinitionFeature`.\n */\nconst COPY_DIRECTIVE_FIELDS: (keyof DirectiveDef<unknown>)[] = [\n // The child class should use the providers of its parent.\n 'providersResolver',\n\n // Not listed here are any fields which are handled by the `ɵɵInheritDefinitionFeature`, such\n // as inputs, outputs, and host binding functions.\n];\n\n/**\n * Fields which exist only on component definitions, and need to be copied from parent to child\n * classes by the `ɵɵCopyDefinitionFeature`.\n *\n * The type here allows any field of `ComponentDef` which is not also a property of `DirectiveDef`,\n * since those should go in `COPY_DIRECTIVE_FIELDS` above.\n */\nconst COPY_COMPONENT_FIELDS: Exclude<keyof ComponentDef<unknown>, keyof DirectiveDef<unknown>>[] = [\n // The child class should use the template function of its parent, including all template\n // semantics.\n 'template',\n 'decls',\n 'consts',\n 'vars',\n 'onPush',\n 'ngContentSelectors',\n\n // The child class should use the CSS styles of its parent, including all styling semantics.\n 'styles',\n 'encapsulation',\n\n // The child class should be checked by the runtime in the same way as its parent.\n 'schemas',\n];\n\n/**\n * Copies the fields not handled by the `ɵɵInheritDefinitionFeature` from the supertype of a\n * definition.\n *\n * This exists primarily to support ngcc migration of an existing View Engine pattern, where an\n * entire decorator is inherited from a parent to a child class. When ngcc detects this case, it\n * generates a skeleton definition on the child class, and applies this feature.\n *\n * The `ɵɵCopyDefinitionFeature` then copies any needed fields from the parent class' definition,\n * including things like the component template function.\n *\n * @param definition The definition of a child class which inherits from a parent class with its\n * own definition.\n *\n * @codeGenApi\n */\nexport function ɵɵCopyDefinitionFeature(definition: DirectiveDef<any> | ComponentDef<any>): void {\n let superType = getSuperType(definition.type)!;\n\n let superDef: DirectiveDef<any> | ComponentDef<any> | undefined = undefined;\n if (isComponentDef(definition)) {\n // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance.\n superDef = superType.ɵcmp!;\n } else {\n // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance.\n superDef = superType.ɵdir!;\n }\n\n // Needed because `definition` fields are readonly.\n const defAny = definition as any;\n\n // Copy over any fields that apply to either directives or components.\n for (const field of COPY_DIRECTIVE_FIELDS) {\n defAny[field] = superDef[field];\n }\n\n if (isComponentDef(superDef)) {\n // Copy over any component-specific fields.\n for (const field of COPY_COMPONENT_FIELDS) {\n defAny[field] = superDef[field];\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport {resolveForwardRef} from '../../di';\nimport {RuntimeError, RuntimeErrorCode} from '../../errors';\nimport {assertEqual} from '../../util/assert';\nimport {EMPTY_OBJ} from '../../util/empty';\nimport {getComponentDef, getDirectiveDef} from '../def_getters';\nimport type {\n DirectiveDef,\n DirectiveDefFeature,\n HostDirectiveBindingMap,\n HostDirectiveConfig,\n HostDirectiveDef,\n HostDirectiveDefs,\n} from '../interfaces/definition';\n\n/**\n * This feature adds the host directives behavior to a directive definition by patching a\n * function onto it. The expectation is that the runtime will invoke the function during\n * directive matching.\n *\n * For example:\n * ```ts\n * class ComponentWithHostDirective {\n * static ɵcmp = defineComponent({\n * type: ComponentWithHostDirective,\n * features: [ɵɵHostDirectivesFeature([\n * SimpleHostDirective,\n * {directive: AdvancedHostDirective, inputs: ['foo: alias'], outputs: ['bar']},\n * ])]\n * });\n * }\n * ```\n *\n * @codeGenApi\n */\nexport function ɵɵHostDirectivesFeature(\n rawHostDirectives: HostDirectiveConfig[] | (() => HostDirectiveConfig[]),\n) {\n const feature: DirectiveDefFeature = (definition: DirectiveDef<unknown>) => {\n const isEager = Array.isArray(rawHostDirectives);\n\n if (definition.hostDirectives === null) {\n definition.findHostDirectiveDefs = findHostDirectiveDefs;\n definition.hostDirectives = isEager\n ? rawHostDirectives.map(createHostDirectiveDef)\n : [rawHostDirectives];\n } else if (isEager) {\n definition.hostDirectives.unshift(...rawHostDirectives.map(createHostDirectiveDef));\n } else {\n definition.hostDirectives.unshift(rawHostDirectives);\n }\n };\n feature.ngInherit = true;\n return feature;\n}\n\nfunction findHostDirectiveDefs(\n currentDef: DirectiveDef<unknown>,\n matchedDefs: DirectiveDef<unknown>[],\n hostDirectiveDefs: HostDirectiveDefs,\n): void {\n if (currentDef.hostDirectives !== null) {\n for (const configOrFn of currentDef.hostDirectives) {\n if (typeof configOrFn === 'function') {\n const resolved = configOrFn();\n for (const config of resolved) {\n trackHostDirectiveDef(createHostDirectiveDef(config), matchedDefs, hostDirectiveDefs);\n }\n } else {\n trackHostDirectiveDef(configOrFn, matchedDefs, hostDirectiveDefs);\n }\n }\n }\n}\n\n/** Tracks a single host directive during directive matching. */\nfunction trackHostDirectiveDef(\n def: HostDirectiveDef,\n matchedDefs: DirectiveDef<unknown>[],\n hostDirectiveDefs: HostDirectiveDefs,\n) {\n const hostDirectiveDef = getDirectiveDef(def.directive)!;\n\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n validateHostDirective(def, hostDirectiveDef);\n }\n\n // We need to patch the `declaredInputs` so that\n // `ngOnChanges` can map the properties correctly.\n patchDeclaredInputs(hostDirectiveDef.declaredInputs, def.inputs);\n\n // Host directives execute before the host so that its host bindings can be overwritten.\n findHostDirectiveDefs(hostDirectiveDef, matchedDefs, hostDirectiveDefs);\n hostDirectiveDefs.set(hostDirectiveDef, def);\n matchedDefs.push(hostDirectiveDef);\n}\n\n/** Creates a `HostDirectiveDef` from a used-defined host directive configuration. */\nfunction createHostDirectiveDef(config: HostDirectiveConfig): HostDirectiveDef {\n return typeof config === 'function'\n ? {directive: resolveForwardRef(config), inputs: EMPTY_OBJ, outputs: EMPTY_OBJ}\n : {\n directive: resolveForwardRef(config.directive),\n inputs: bindingArrayToMap(config.inputs),\n outputs: bindingArrayToMap(config.outputs),\n };\n}\n\n/**\n * Converts an array in the form of `['publicName', 'alias', 'otherPublicName', 'otherAlias']` into\n * a map in the form of `{publicName: 'alias', otherPublicName: 'otherAlias'}`.\n */\nfunction bindingArrayToMap(bindings: string[] | undefined): HostDirectiveBindingMap {\n if (bindings === undefined || bindings.length === 0) {\n return EMPTY_OBJ;\n }\n\n const result: HostDirectiveBindingMap = {};\n\n for (let i = 0; i < bindings.length; i += 2) {\n result[bindings[i]] = bindings[i + 1];\n }\n\n return result;\n}\n\n/**\n * `ngOnChanges` has some leftover legacy ViewEngine behavior where the keys inside the\n * `SimpleChanges` event refer to the *declared* name of the input, not its public name or its\n * minified name. E.g. in `@Input('alias') foo: string`, the name in the `SimpleChanges` object\n * will always be `foo`, and not `alias` or the minified name of `foo` in apps using property\n * minification.\n *\n * This is achieved through the `DirectiveDef.declaredInputs` map that is constructed when the\n * definition is declared. When a property is written to the directive instance, the\n * `NgOnChangesFeature` will try to remap the property name being written to using the\n * `declaredInputs`.\n *\n * Since the host directive input remapping happens during directive matching, `declaredInputs`\n * won't contain the new alias that the input is available under. This function addresses the\n * issue by patching the host directive aliases to the `declaredInputs`. There is *not* a risk of\n * this patching accidentally introducing new inputs to the host directive, because `declaredInputs`\n * is used *only* by the `NgOnChangesFeature` when determining what name is used in the\n * `SimpleChanges` object which won't be reached if an input doesn't exist.\n */\nfunction patchDeclaredInputs(\n declaredInputs: Record<string, string>,\n exposedInputs: HostDirectiveBindingMap,\n): void {\n for (const publicName in exposedInputs) {\n if (exposedInputs.hasOwnProperty(publicName)) {\n const remappedPublicName = exposedInputs[publicName];\n const privateName = declaredInputs[publicName];\n\n // We *technically* shouldn't be able to hit this case because we can't have multiple\n // inputs on the same property and we have validations against conflicting aliases in\n // `validateMappings`. If we somehow did, it would lead to `ngOnChanges` being invoked\n // with the wrong name so we have a non-user-friendly assertion here just in case.\n if (\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n declaredInputs.hasOwnProperty(remappedPublicName)\n ) {\n assertEqual(\n declaredInputs[remappedPublicName],\n declaredInputs[publicName],\n `Conflicting host directive input alias ${publicName}.`,\n );\n }\n\n declaredInputs[remappedPublicName] = privateName;\n }\n }\n}\n\n/**\n * Verifies that the host directive has been configured correctly.\n * @param hostDirectiveConfig Host directive configuration object.\n * @param directiveDef Directive definition of the host directive.\n */\nfunction validateHostDirective(\n hostDirectiveConfig: HostDirectiveDef<unknown>,\n directiveDef: DirectiveDef<any> | null,\n): asserts directiveDef is DirectiveDef<unknown> {\n const type = hostDirectiveConfig.directive;\n\n if (directiveDef === null) {\n if (getComponentDef(type) !== null) {\n throw new RuntimeError(\n RuntimeErrorCode.HOST_DIRECTIVE_COMPONENT,\n `Host directive ${type.name} cannot be a component.`,\n );\n }\n\n throw new RuntimeError(\n RuntimeErrorCode.HOST_DIRECTIVE_UNRESOLVABLE,\n `Could not resolve metadata for host directive ${type.name}. ` +\n `Make sure that the ${type.name} class is annotated with an @Directive decorator.`,\n );\n }\n\n if (!directiveDef.standalone) {\n throw new RuntimeError(\n RuntimeErrorCode.HOST_DIRECTIVE_NOT_STANDALONE,\n `Host directive ${directiveDef.type.name} must be standalone.`,\n );\n }\n\n validateMappings('input', directiveDef, hostDirectiveConfig.inputs);\n validateMappings('output', directiveDef, hostDirectiveConfig.outputs);\n}\n\n/**\n * Checks that the host directive inputs/outputs configuration is valid.\n * @param bindingType Kind of binding that is being validated. Used in the error message.\n * @param def Definition of the host directive that is being validated against.\n * @param hostDirectiveBindings Host directive mapping object that shold be validated.\n */\nfunction validateMappings<T>(\n bindingType: 'input' | 'output',\n def: DirectiveDef<T>,\n hostDirectiveBindings: HostDirectiveBindingMap,\n) {\n const className = def.type.name;\n const bindings = bindingType === 'input' ? def.inputs : def.outputs;\n\n for (const publicName in hostDirectiveBindings) {\n if (hostDirectiveBindings.hasOwnProperty(publicName)) {\n if (!bindings.hasOwnProperty(publicName)) {\n throw new RuntimeError(\n RuntimeErrorCode.HOST_DIRECTIVE_UNDEFINED_BINDING,\n `Directive ${className} does not have an ${bindingType} with a public name of ${publicName}.`,\n );\n }\n\n const remappedPublicName = hostDirectiveBindings[publicName];\n\n if (bindings.hasOwnProperty(remappedPublicName) && remappedPublicName !== publicName) {\n throw new RuntimeError(\n RuntimeErrorCode.HOST_DIRECTIVE_CONFLICTING_ALIAS,\n `Cannot alias ${bindingType} ${publicName} of host directive ${className} to ${remappedPublicName}, because it already has a different ${bindingType} with the same public name.`,\n );\n }\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nexport function isIterable(obj: any): obj is Iterable<any> {\n return obj !== null && typeof obj === 'object' && obj[Symbol.iterator] !== undefined;\n}\n\nexport function isListLikeIterable(obj: any): boolean {\n if (!isJsObject(obj)) return false;\n return (\n Array.isArray(obj) ||\n (!(obj instanceof Map) && // JS Map are iterables but return entries as [k, v]\n Symbol.iterator in obj)\n ); // JS Iterable have a Symbol.iterator prop\n}\n\nexport function areIterablesEqual<T>(\n a: Iterable<T>,\n b: Iterable<T>,\n comparator: (a: T, b: T) => boolean,\n): boolean {\n const iterator1 = a[Symbol.iterator]();\n const iterator2 = b[Symbol.iterator]();\n\n while (true) {\n const item1 = iterator1.next();\n const item2 = iterator2.next();\n if (item1.done && item2.done) return true;\n if (item1.done || item2.done) return false;\n if (!comparator(item1.value, item2.value)) return false;\n }\n}\n\nexport function iterateListLike<T>(obj: Iterable<T>, fn: (p: T) => void) {\n if (Array.isArray(obj)) {\n for (let i = 0; i < obj.length; i++) {\n fn(obj[i]);\n }\n } else {\n const iterator = obj[Symbol.iterator]();\n let item: IteratorResult<T, any>;\n while (!(item = iterator.next()).done) {\n fn(item.value);\n }\n }\n}\n\nexport function isJsObject(o: any): boolean {\n return o !== null && (typeof o === 'function' || typeof o === 'object');\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {areIterablesEqual, isListLikeIterable} from './iterable';\n\nexport function devModeEqual(a: any, b: any): boolean {\n const isListLikeIterableA = isListLikeIterable(a);\n const isListLikeIterableB = isListLikeIterable(b);\n if (isListLikeIterableA && isListLikeIterableB) {\n return areIterablesEqual(a, b, devModeEqual);\n } else {\n const isAObject = a && (typeof a === 'object' || typeof a === 'function');\n const isBObject = b && (typeof b === 'object' || typeof b === 'function');\n if (!isListLikeIterableA && isAObject && !isListLikeIterableB && isBObject) {\n return true;\n } else {\n return Object.is(a, b);\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {assertIndexInRange, assertLessThan, assertNotSame} from '../util/assert';\nimport {devModeEqual} from '../util/comparison';\n\nimport {getExpressionChangedErrorDetails, throwErrorIfNoChangesMode} from './errors';\nimport {LView} from './interfaces/view';\nimport {isInCheckNoChangesMode} from './state';\nimport {NO_CHANGE} from './tokens';\n\n// TODO(misko): consider inlining\n/** Updates binding and returns the value. */\nexport function updateBinding(lView: LView, bindingIndex: number, value: any): any {\n return (lView[bindingIndex] = value);\n}\n\n/** Gets the current binding value. */\nexport function getBinding(lView: LView, bindingIndex: number): any {\n ngDevMode && assertIndexInRange(lView, bindingIndex);\n ngDevMode &&\n assertNotSame(lView[bindingIndex], NO_CHANGE, 'Stored value should never be NO_CHANGE.');\n return lView[bindingIndex];\n}\n\n/**\n * Updates binding if changed, then returns whether it was updated.\n *\n * This function also checks the `CheckNoChangesMode` and throws if changes are made.\n * Some changes (Objects/iterables) during `CheckNoChangesMode` are exempt to comply with VE\n * behavior.\n *\n * @param lView current `LView`\n * @param bindingIndex The binding in the `LView` to check\n * @param value New value to check against `lView[bindingIndex]`\n * @returns `true` if the bindings has changed. (Throws if binding has changed during\n * `CheckNoChangesMode`)\n */\nexport function bindingUpdated(lView: LView, bindingIndex: number, value: any): boolean {\n ngDevMode && assertNotSame(value, NO_CHANGE, 'Incoming value should never be NO_CHANGE.');\n ngDevMode &&\n assertLessThan(bindingIndex, lView.length, `Slot should have been initialized to NO_CHANGE`);\n const oldValue = lView[bindingIndex];\n\n if (Object.is(oldValue, value)) {\n return false;\n } else {\n if (ngDevMode && isInCheckNoChangesMode()) {\n // View engine didn't report undefined values as changed on the first checkNoChanges pass\n // (before the change detection was run).\n const oldValueToCompare = oldValue !== NO_CHANGE ? oldValue : undefined;\n if (!devModeEqual(oldValueToCompare, value)) {\n const details = getExpressionChangedErrorDetails(\n lView,\n bindingIndex,\n oldValueToCompare,\n value,\n );\n throwErrorIfNoChangesMode(\n oldValue === NO_CHANGE,\n details.oldValue,\n details.newValue,\n details.propName,\n lView,\n );\n }\n // There was a change, but the `devModeEqual` decided that the change is exempt from an error.\n // For this reason we exit as if no change. The early exit is needed to prevent the changed\n // value to be written into `LView` (If we would write the new value that we would not see it\n // as change on next CD.)\n return false;\n }\n lView[bindingIndex] = value;\n return true;\n }\n}\n\n/** Updates 2 bindings if changed, then returns whether either was updated. */\nexport function bindingUpdated2(lView: LView, bindingIndex: number, exp1: any, exp2: any): boolean {\n const different = bindingUpdated(lView, bindingIndex, exp1);\n return bindingUpdated(lView, bindingIndex + 1, exp2) || different;\n}\n\n/** Updates 3 bindings if changed, then returns whether any was updated. */\nexport function bindingUpdated3(\n lView: LView,\n bindingIndex: number,\n exp1: any,\n exp2: any,\n exp3: any,\n): boolean {\n const different = bindingUpdated2(lView, bindingIndex, exp1, exp2);\n return bindingUpdated(lView, bindingIndex + 2, exp3) || different;\n}\n\n/** Updates 4 bindings if changed, then returns whether any was updated. */\nexport function bindingUpdated4(\n lView: LView,\n bindingIndex: number,\n exp1: any,\n exp2: any,\n exp3: any,\n exp4: any,\n): boolean {\n const different = bindingUpdated2(lView, bindingIndex, exp1, exp2);\n return bindingUpdated2(lView, bindingIndex + 2, exp3, exp4) || different;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport {validateMatchingNode, validateNodeExists} from '../../hydration/error_handling';\nimport {TEMPLATES} from '../../hydration/interfaces';\nimport {locateNextRNode, siblingAfter} from '../../hydration/node_lookup_utils';\nimport {\n calcSerializedContainerSize,\n isDisconnectedNode,\n markRNodeAsClaimedByHydration,\n setSegmentHead,\n} from '../../hydration/utils';\nimport {isDetachedByI18n} from '../../i18n/utils';\nimport {populateDehydratedViewsInLContainer} from '../../linker/view_container_ref';\nimport {assertEqual} from '../../util/assert';\nimport {assertFirstCreatePass} from '../assert';\nimport {attachPatchData} from '../context_discovery';\nimport {registerPostOrderHooks} from '../hooks';\nimport {ComponentTemplate} from '../interfaces/definition';\nimport {LocalRefExtractor, TAttributes, TContainerNode, TNode, TNodeType} from '../interfaces/node';\nimport {RComment} from '../interfaces/renderer_dom';\nimport {isDirectiveHost} from '../interfaces/type_checks';\nimport {HEADER_OFFSET, HYDRATION, LView, RENDERER, TView, TViewType} from '../interfaces/view';\nimport {appendChild} from '../node_manipulation';\nimport {\n getBindingsEnabled,\n getLView,\n getTView,\n isInSkipHydrationBlock,\n lastNodeWasCreated,\n setCurrentTNode,\n wasLastNodeCreated,\n} from '../state';\nimport {getOrCreateTNode} from '../tnode_manipulation';\nimport {mergeHostAttrs} from '../util/attrs_utils';\nimport {getConstant} from '../util/view_utils';\nimport {addToEndOfViewTree, createTView} from '../view/construction';\nimport {createLContainer} from '../view/container';\nimport {resolveDirectives} from '../view/directives';\n\nimport {\n createDirectivesInstances,\n findDirectiveDefMatches,\n saveResolvedLocalsInData,\n} from './shared';\n\nfunction templateFirstCreatePass(\n index: number,\n tView: TView,\n lView: LView,\n templateFn: ComponentTemplate<any> | null,\n decls: number,\n vars: number,\n tagName?: string | null,\n attrs?: TAttributes | null,\n localRefsIndex?: number | null,\n): TContainerNode {\n ngDevMode && assertFirstCreatePass(tView);\n ngDevMode && ngDevMode.firstCreatePass++;\n const tViewConsts = tView.consts;\n\n // TODO(pk): refactor getOrCreateTNode to have the \"create\" only version\n const tNode = getOrCreateTNode(tView, index, TNodeType.Container, tagName || null, attrs || null);\n\n if (getBindingsEnabled()) {\n resolveDirectives(\n tView,\n lView,\n tNode,\n getConstant<string[]>(tViewConsts, localRefsIndex),\n findDirectiveDefMatches,\n );\n }\n\n // Merge the template attrs last so that they have the highest priority.\n tNode.mergedAttrs = mergeHostAttrs(tNode.mergedAttrs, tNode.attrs);\n\n registerPostOrderHooks(tView, tNode);\n\n const embeddedTView = (tNode.tView = createTView(\n TViewType.Embedded,\n tNode,\n templateFn,\n decls,\n vars,\n tView.directiveRegistry,\n tView.pipeRegistry,\n null,\n tView.schemas,\n tViewConsts,\n null /* ssrId */,\n ));\n\n if (tView.queries !== null) {\n tView.queries.template(tView, tNode);\n embeddedTView.queries = tView.queries.embeddedTView(tNode);\n }\n\n return tNode;\n}\n\n/**\n * Creates an LContainer for an embedded view.\n *\n * @param declarationLView LView in which the template was declared.\n * @param declarationTView TView in which the template wa declared.\n * @param index The index of the container in the data array\n * @param templateFn Inline template\n * @param decls The number of nodes, local refs, and pipes for this template\n * @param vars The number of bindings for this template\n * @param tagName The name of the container element, if applicable\n * @param attrsIndex Index of template attributes in the `consts` array.\n * @param localRefs Index of the local references in the `consts` array.\n * @param localRefExtractor A function which extracts local-refs values from the template.\n * Defaults to the current element associated with the local-ref.\n */\nexport function declareTemplate(\n declarationLView: LView,\n declarationTView: TView,\n index: number,\n templateFn: ComponentTemplate<any> | null,\n decls: number,\n vars: number,\n tagName?: string | null,\n attrs?: TAttributes | null,\n localRefsIndex?: number | null,\n localRefExtractor?: LocalRefExtractor,\n): TNode {\n const adjustedIndex = index + HEADER_OFFSET;\n const tNode = declarationTView.firstCreatePass\n ? templateFirstCreatePass(\n adjustedIndex,\n declarationTView,\n declarationLView,\n templateFn,\n decls,\n vars,\n tagName,\n attrs,\n localRefsIndex,\n )\n : (declarationTView.data[adjustedIndex] as TContainerNode);\n setCurrentTNode(tNode, false);\n\n const comment = _locateOrCreateContainerAnchor(\n declarationTView,\n declarationLView,\n tNode,\n index,\n ) as RComment;\n\n if (wasLastNodeCreated()) {\n appendChild(declarationTView, declarationLView, comment, tNode);\n }\n attachPatchData(comment, declarationLView);\n\n const lContainer = createLContainer(comment, declarationLView, comment, tNode);\n declarationLView[adjustedIndex] = lContainer;\n addToEndOfViewTree(declarationLView, lContainer);\n\n // If hydration is enabled, looks up dehydrated views in the DOM\n // using hydration annotation info and stores those views on LContainer.\n // In client-only mode, this function is a noop.\n populateDehydratedViewsInLContainer(lContainer, tNode, declarationLView);\n\n if (isDirectiveHost(tNode)) {\n createDirectivesInstances(declarationTView, declarationLView, tNode);\n }\n\n if (localRefsIndex != null) {\n saveResolvedLocalsInData(declarationLView, tNode, localRefExtractor);\n }\n\n return tNode;\n}\n\n/**\n * Creates an LContainer for an ng-template (dynamically-inserted view), e.g.\n *\n * <ng-template #foo>\n * <div></div>\n * </ng-template>\n *\n * @param index The index of the container in the data array\n * @param templateFn Inline template\n * @param decls The number of nodes, local refs, and pipes for this template\n * @param vars The number of bindings for this template\n * @param tagName The name of the container element, if applicable\n * @param attrsIndex Index of template attributes in the `consts` array.\n * @param localRefs Index of the local references in the `consts` array.\n * @param localRefExtractor A function which extracts local-refs values from the template.\n * Defaults to the current element associated with the local-ref.\n *\n * @codeGenApi\n */\nexport function ɵɵtemplate(\n index: number,\n templateFn: ComponentTemplate<any> | null,\n decls: number,\n vars: number,\n tagName?: string | null,\n attrsIndex?: number | null,\n localRefsIndex?: number | null,\n localRefExtractor?: LocalRefExtractor,\n): typeof ɵɵtemplate {\n const lView = getLView();\n const tView = getTView();\n const attrs = getConstant<TAttributes>(tView.consts, attrsIndex);\n declareTemplate(\n lView,\n tView,\n index,\n templateFn,\n decls,\n vars,\n tagName,\n attrs,\n localRefsIndex,\n localRefExtractor,\n );\n return ɵɵtemplate;\n}\n\nlet _locateOrCreateContainerAnchor = createContainerAnchorImpl;\n\n/**\n * Regular creation mode for LContainers and their anchor (comment) nodes.\n */\nfunction createContainerAnchorImpl(\n tView: TView,\n lView: LView,\n tNode: TNode,\n index: number,\n): RComment {\n lastNodeWasCreated(true);\n return lView[RENDERER].createComment(ngDevMode ? 'container' : '');\n}\n\n/**\n * Enables hydration code path (to lookup existing elements in DOM)\n * in addition to the regular creation mode for LContainers and their\n * anchor (comment) nodes.\n */\nfunction locateOrCreateContainerAnchorImpl(\n tView: TView,\n lView: LView,\n tNode: TNode,\n index: number,\n): RComment {\n const hydrationInfo = lView[HYDRATION];\n const isNodeCreationMode =\n !hydrationInfo ||\n isInSkipHydrationBlock() ||\n isDetachedByI18n(tNode) ||\n isDisconnectedNode(hydrationInfo, index);\n lastNodeWasCreated(isNodeCreationMode);\n\n // Regular creation mode.\n if (isNodeCreationMode) {\n return createContainerAnchorImpl(tView, lView, tNode, index);\n }\n\n const ssrId = hydrationInfo.data[TEMPLATES]?.[index] ?? null;\n\n // Apply `ssrId` value to the underlying TView if it was not previously set.\n //\n // There might be situations when the same component is present in a template\n // multiple times and some instances are opted-out of using hydration via\n // `ngSkipHydration` attribute. In this scenario, at the time a TView is created,\n // the `ssrId` might be `null` (if the first component is opted-out of hydration).\n // The code below makes sure that the `ssrId` is applied to the TView if it's still\n // `null` and verifies we never try to override it with a different value.\n if (ssrId !== null && tNode.tView !== null) {\n if (tNode.tView.ssrId === null) {\n tNode.tView.ssrId = ssrId;\n } else {\n ngDevMode &&\n assertEqual(tNode.tView.ssrId, ssrId, 'Unexpected value of the `ssrId` for this TView');\n }\n }\n\n // Hydration mode, looking up existing elements in DOM.\n const currentRNode = locateNextRNode(hydrationInfo, tView, lView, tNode)!;\n ngDevMode && validateNodeExists(currentRNode, lView, tNode);\n\n setSegmentHead(hydrationInfo, index, currentRNode);\n const viewContainerSize = calcSerializedContainerSize(hydrationInfo, index);\n const comment = siblingAfter<RComment>(viewContainerSize, currentRNode)!;\n\n if (ngDevMode) {\n validateMatchingNode(comment, Node.COMMENT_NODE, null, lView, tNode);\n markRNodeAsClaimedByHydration(comment);\n }\n\n return comment;\n}\n\nexport function enableLocateOrCreateContainerAnchorImpl() {\n _locateOrCreateContainerAnchor = locateOrCreateContainerAnchorImpl;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Injector, inject, ɵɵdefineInjectable} from '../di';\nimport {NgZone} from '../zone';\n\n/**\n * Helper function to schedule a callback to be invoked when a browser becomes idle.\n *\n * @param callback A function to be invoked when a browser becomes idle.\n * @param injector injector for the app\n */\nexport function onIdle(callback: VoidFunction, injector: Injector) {\n const scheduler = injector.get(IdleScheduler);\n const cleanupFn = () => scheduler.remove(callback);\n scheduler.add(callback);\n return cleanupFn;\n}\n\n/**\n * Use shims for the `requestIdleCallback` and `cancelIdleCallback` functions for\n * environments where those functions are not available (e.g. Node.js and Safari).\n *\n * Note: we wrap the `requestIdleCallback` call into a function, so that it can be\n * overridden/mocked in test environment and picked up by the runtime code.\n */\nconst _requestIdleCallback = () =>\n typeof requestIdleCallback !== 'undefined' ? requestIdleCallback : setTimeout;\nconst _cancelIdleCallback = () =>\n typeof requestIdleCallback !== 'undefined' ? cancelIdleCallback : clearTimeout;\n\n/**\n * Helper service to schedule `requestIdleCallback`s for batches of defer blocks,\n * to avoid calling `requestIdleCallback` for each defer block (e.g. if\n * defer blocks are defined inside a for loop).\n */\nexport class IdleScheduler {\n // Indicates whether current callbacks are being invoked.\n executingCallbacks = false;\n\n // Currently scheduled idle callback id.\n idleId: number | null = null;\n\n // Set of callbacks to be invoked next.\n current = new Set<VoidFunction>();\n\n // Set of callbacks collected while invoking current set of callbacks.\n // Those callbacks are scheduled for the next idle period.\n deferred = new Set<VoidFunction>();\n\n ngZone = inject(NgZone);\n\n requestIdleCallbackFn = _requestIdleCallback().bind(globalThis);\n cancelIdleCallbackFn = _cancelIdleCallback().bind(globalThis);\n\n add(callback: VoidFunction) {\n const target = this.executingCallbacks ? this.deferred : this.current;\n target.add(callback);\n if (this.idleId === null) {\n this.scheduleIdleCallback();\n }\n }\n\n remove(callback: VoidFunction) {\n const {current, deferred} = this;\n\n current.delete(callback);\n deferred.delete(callback);\n\n // If the last callback was removed and there is a pending\n // idle callback - cancel it.\n if (current.size === 0 && deferred.size === 0) {\n this.cancelIdleCallback();\n }\n }\n\n private scheduleIdleCallback() {\n const callback = () => {\n this.cancelIdleCallback();\n\n this.executingCallbacks = true;\n\n for (const callback of this.current) {\n callback();\n }\n this.current.clear();\n\n this.executingCallbacks = false;\n\n // If there are any callbacks added during an invocation\n // of the current ones - make them \"current\" and schedule\n // a new idle callback.\n if (this.deferred.size > 0) {\n for (const callback of this.deferred) {\n this.current.add(callback);\n }\n this.deferred.clear();\n this.scheduleIdleCallback();\n }\n };\n // Ensure that the callback runs in the NgZone since\n // the `requestIdleCallback` is not currently patched by Zone.js.\n this.idleId = this.requestIdleCallbackFn(() => this.ngZone.run(callback)) as number;\n }\n\n private cancelIdleCallback() {\n if (this.idleId !== null) {\n this.cancelIdleCallbackFn(this.idleId);\n this.idleId = null;\n }\n }\n\n ngOnDestroy() {\n this.cancelIdleCallback();\n this.current.clear();\n this.deferred.clear();\n }\n\n /** @nocollapse */\n static ɵprov = /** @pureOrBreakMyCode */ /* @__PURE__ */ ɵɵdefineInjectable({\n token: IdleScheduler,\n providedIn: 'root',\n factory: () => new IdleScheduler(),\n });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Injector, ɵɵdefineInjectable} from '../di';\nimport {arrayInsert2, arraySplice} from '../util/array_utils';\nimport {NgZone} from '../zone';\n\n/**\n * Returns a function that captures a provided delay.\n * Invoking the returned function schedules a trigger.\n */\nexport function onTimer(delay: number) {\n return (callback: VoidFunction, injector: Injector) =>\n scheduleTimerTrigger(delay, callback, injector);\n}\n\n/**\n * Schedules a callback to be invoked after a given timeout.\n *\n * @param delay A number of ms to wait until firing a callback.\n * @param callback A function to be invoked after a timeout.\n * @param injector injector for the app.\n */\nexport function scheduleTimerTrigger(delay: number, callback: VoidFunction, injector: Injector) {\n const scheduler = injector.get(TimerScheduler);\n const ngZone = injector.get(NgZone);\n const cleanupFn = () => scheduler.remove(callback);\n scheduler.add(delay, callback, ngZone);\n return cleanupFn;\n}\n\n/**\n * Helper service to schedule `setTimeout`s for batches of defer blocks,\n * to avoid calling `setTimeout` for each defer block (e.g. if defer blocks\n * are created inside a for loop).\n */\nexport class TimerScheduler {\n // Indicates whether current callbacks are being invoked.\n executingCallbacks = false;\n\n // Currently scheduled `setTimeout` id.\n timeoutId: number | null = null;\n\n // When currently scheduled timer would fire.\n invokeTimerAt: number | null = null;\n\n // List of callbacks to be invoked.\n // For each callback we also store a timestamp on when the callback\n // should be invoked. We store timestamps and callback functions\n // in a flat array to avoid creating new objects for each entry.\n // [timestamp1, callback1, timestamp2, callback2, ...]\n current: Array<number | VoidFunction> = [];\n\n // List of callbacks collected while invoking current set of callbacks.\n // Those callbacks are added to the \"current\" queue at the end of\n // the current callback invocation. The shape of this list is the same\n // as the shape of the `current` list.\n deferred: Array<number | VoidFunction> = [];\n\n add(delay: number, callback: VoidFunction, ngZone: NgZone) {\n const target = this.executingCallbacks ? this.deferred : this.current;\n this.addToQueue(target, Date.now() + delay, callback);\n this.scheduleTimer(ngZone);\n }\n\n remove(callback: VoidFunction) {\n const {current, deferred} = this;\n const callbackIndex = this.removeFromQueue(current, callback);\n if (callbackIndex === -1) {\n // Try cleaning up deferred queue only in case\n // we didn't find a callback in the \"current\" queue.\n this.removeFromQueue(deferred, callback);\n }\n // If the last callback was removed and there is a pending timeout - cancel it.\n if (current.length === 0 && deferred.length === 0) {\n this.clearTimeout();\n }\n }\n\n private addToQueue(\n target: Array<number | VoidFunction>,\n invokeAt: number,\n callback: VoidFunction,\n ) {\n let insertAtIndex = target.length;\n for (let i = 0; i < target.length; i += 2) {\n const invokeQueuedCallbackAt = target[i] as number;\n if (invokeQueuedCallbackAt > invokeAt) {\n // We've reached a first timer that is scheduled\n // for a later time than what we are trying to insert.\n // This is the location at which we need to insert,\n // no need to iterate further.\n insertAtIndex = i;\n break;\n }\n }\n arrayInsert2(target, insertAtIndex, invokeAt, callback);\n }\n\n private removeFromQueue(target: Array<number | VoidFunction>, callback: VoidFunction) {\n let index = -1;\n for (let i = 0; i < target.length; i += 2) {\n const queuedCallback = target[i + 1];\n if (queuedCallback === callback) {\n index = i;\n break;\n }\n }\n if (index > -1) {\n // Remove 2 elements: a timestamp slot and\n // the following slot with a callback function.\n arraySplice(target, index, 2);\n }\n return index;\n }\n\n private scheduleTimer(ngZone: NgZone) {\n const callback = () => {\n this.clearTimeout();\n\n this.executingCallbacks = true;\n\n // Clone the current state of the queue, since it might be altered\n // as we invoke callbacks.\n const current = [...this.current];\n\n // Invoke callbacks that were scheduled to run before the current time.\n const now = Date.now();\n for (let i = 0; i < current.length; i += 2) {\n const invokeAt = current[i] as number;\n const callback = current[i + 1] as VoidFunction;\n if (invokeAt <= now) {\n callback();\n } else {\n // We've reached a timer that should not be invoked yet.\n break;\n }\n }\n // The state of the queue might've changed after callbacks invocation,\n // run the cleanup logic based on the *current* state of the queue.\n let lastCallbackIndex = -1;\n for (let i = 0; i < this.current.length; i += 2) {\n const invokeAt = this.current[i] as number;\n if (invokeAt <= now) {\n // Add +1 to account for a callback function that\n // goes after the timestamp in events array.\n lastCallbackIndex = i + 1;\n } else {\n // We've reached a timer that should not be invoked yet.\n break;\n }\n }\n if (lastCallbackIndex >= 0) {\n arraySplice(this.current, 0, lastCallbackIndex + 1);\n }\n\n this.executingCallbacks = false;\n\n // If there are any callbacks added during an invocation\n // of the current ones - move them over to the \"current\"\n // queue.\n if (this.deferred.length > 0) {\n for (let i = 0; i < this.deferred.length; i += 2) {\n const invokeAt = this.deferred[i] as number;\n const callback = this.deferred[i + 1] as VoidFunction;\n this.addToQueue(this.current, invokeAt, callback);\n }\n this.deferred.length = 0;\n }\n this.scheduleTimer(ngZone);\n };\n\n // Avoid running timer callbacks more than once per\n // average frame duration. This is needed for better\n // batching and to avoid kicking off excessive change\n // detection cycles.\n const FRAME_DURATION_MS = 16; // 1000ms / 60fps\n\n if (this.current.length > 0) {\n const now = Date.now();\n // First element in the queue points at the timestamp\n // of the first (earliest) event.\n const invokeAt = this.current[0] as number;\n if (\n this.timeoutId === null ||\n // Reschedule a timer in case a queue contains an item with\n // an earlier timestamp and the delta is more than an average\n // frame duration.\n (this.invokeTimerAt && this.invokeTimerAt - invokeAt > FRAME_DURATION_MS)\n ) {\n // There was a timeout already, but an earlier event was added\n // into the queue. In this case we drop an old timer and setup\n // a new one with an updated (smaller) timeout.\n this.clearTimeout();\n\n const timeout = Math.max(invokeAt - now, FRAME_DURATION_MS);\n this.invokeTimerAt = invokeAt;\n this.timeoutId = ngZone.runOutsideAngular(() => {\n return setTimeout(() => ngZone.run(callback), timeout) as unknown as number;\n });\n }\n }\n }\n\n private clearTimeout() {\n if (this.timeoutId !== null) {\n clearTimeout(this.timeoutId);\n this.timeoutId = null;\n }\n }\n\n ngOnDestroy() {\n this.clearTimeout();\n this.current.length = 0;\n this.deferred.length = 0;\n }\n\n /** @nocollapse */\n static ɵprov = /** @pureOrBreakMyCode */ /* @__PURE__ */ ɵɵdefineInjectable({\n token: TimerScheduler,\n providedIn: 'root',\n factory: () => new TimerScheduler(),\n });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ɵɵdefineInjectable as defineInjectable} from './di/interface/defs';\nimport {Provider} from './di/interface/provider';\nimport {EnvironmentInjector} from './di/r3_injector';\nimport {OnDestroy} from './interface/lifecycle_hooks';\nimport {createEnvironmentInjector} from './render3/ng_module_ref';\n\n/**\n * A service used by the framework to create and cache injector instances.\n *\n * This service is used to create a single injector instance for each defer\n * block definition, to avoid creating an injector for each defer block instance\n * of a certain type.\n */\nexport class CachedInjectorService implements OnDestroy {\n private cachedInjectors = new Map<unknown, EnvironmentInjector | null>();\n\n getOrCreateInjector(\n key: unknown,\n parentInjector: EnvironmentInjector,\n providers: Provider[],\n debugName?: string,\n ) {\n if (!this.cachedInjectors.has(key)) {\n const injector =\n providers.length > 0\n ? createEnvironmentInjector(providers, parentInjector, debugName)\n : null;\n this.cachedInjectors.set(key, injector);\n }\n return this.cachedInjectors.get(key)!;\n }\n\n ngOnDestroy() {\n try {\n for (const injector of this.cachedInjectors.values()) {\n if (injector !== null) {\n injector.destroy();\n }\n }\n } finally {\n this.cachedInjectors.clear();\n }\n }\n\n /** @nocollapse */\n static ɵprov = /** @pureOrBreakMyCode */ /* @__PURE__ */ defineInjectable({\n token: CachedInjectorService,\n providedIn: 'environment',\n factory: () => new CachedInjectorService(),\n });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {CachedInjectorService} from '../cached_injector_service';\nimport {NotificationSource} from '../change_detection/scheduling/zoneless_scheduling';\nimport {EnvironmentInjector, InjectionToken, Injector, Provider} from '../di';\nimport {\n DehydratedContainerView,\n DEFER_BLOCK_STATE as SERIALIZED_DEFER_BLOCK_STATE,\n} from '../hydration/interfaces';\nimport {assertLContainer, assertTNodeForLView} from '../render3/assert';\nimport {ChainedInjector} from '../render3/chained_injector';\nimport {markViewDirty} from '../render3/instructions/mark_view_dirty';\nimport {handleError} from '../render3/instructions/shared';\nimport {DEHYDRATED_VIEWS, LContainer} from '../render3/interfaces/container';\nimport {TContainerNode, TNode} from '../render3/interfaces/node';\nimport {isDestroyed} from '../render3/interfaces/type_checks';\nimport {HEADER_OFFSET, INJECTOR, LView, PARENT, TVIEW, TView} from '../render3/interfaces/view';\nimport {getConstant, getTNode} from '../render3/util/view_utils';\nimport {createAndRenderEmbeddedLView, shouldAddViewToDom} from '../render3/view_manipulation';\nimport {assertDefined} from '../util/assert';\n\nimport {\n DEFER_BLOCK_STATE,\n DeferBlockConfig,\n DeferBlockDependencyInterceptor,\n DeferBlockInternalState,\n DeferBlockState,\n DeferDependenciesLoadingState,\n DeferredLoadingBlockConfig,\n DeferredPlaceholderBlockConfig,\n LDeferBlockDetails,\n LOADING_AFTER_CLEANUP_FN,\n NEXT_DEFER_BLOCK_STATE,\n ON_COMPLETE_FNS,\n SSR_BLOCK_STATE,\n STATE_IS_FROZEN_UNTIL,\n TDeferBlockDetails,\n} from './interfaces';\nimport {scheduleTimerTrigger} from './timer_scheduler';\nimport {\n assertDeferredDependenciesLoaded,\n getLDeferBlockDetails,\n getLoadingBlockAfter,\n getMinimumDurationForState,\n getTDeferBlockDetails,\n getTemplateIndexForState,\n} from './utils';\nimport {profiler} from '../render3/profiler';\nimport {ProfilerEvent} from '../render3/profiler_types';\nimport {addLViewToLContainer, removeLViewFromLContainer} from '../render3/view/container';\n\n/**\n * **INTERNAL**, avoid referencing it in application code.\n * *\n * Injector token that allows to provide `DeferBlockDependencyInterceptor` class\n * implementation.\n *\n * This token is only injected in devMode\n */\nexport const DEFER_BLOCK_DEPENDENCY_INTERCEPTOR =\n /* @__PURE__ */ new InjectionToken<DeferBlockDependencyInterceptor>(\n 'DEFER_BLOCK_DEPENDENCY_INTERCEPTOR',\n );\n\n/**\n * **INTERNAL**, token used for configuring defer block behavior.\n */\nexport const DEFER_BLOCK_CONFIG = new InjectionToken<DeferBlockConfig>(\n ngDevMode ? 'DEFER_BLOCK_CONFIG' : '',\n);\n\n/**\n * Checks whether there is a cached injector associated with a given defer block\n * declaration and returns if it exists. If there is no cached injector present -\n * creates a new injector and stores in the cache.\n */\nfunction getOrCreateEnvironmentInjector(\n parentInjector: Injector,\n tDetails: TDeferBlockDetails,\n providers: Provider[],\n) {\n return parentInjector\n .get(CachedInjectorService)\n .getOrCreateInjector(\n tDetails,\n parentInjector as EnvironmentInjector,\n providers,\n ngDevMode ? 'DeferBlock Injector' : '',\n );\n}\n\n/** Injector Helpers */\n\n/**\n * Creates a new injector, which contains providers collected from dependencies (NgModules) of\n * defer-loaded components. This function detects different types of parent injectors and creates\n * a new injector based on that.\n */\nfunction createDeferBlockInjector(\n parentInjector: Injector,\n tDetails: TDeferBlockDetails,\n providers: Provider[],\n) {\n // Check if the parent injector is an instance of a `ChainedInjector`.\n //\n // In this case, we retain the shape of the injector and use a newly created\n // `EnvironmentInjector` as a parent in the `ChainedInjector`. That is needed to\n // make sure that the primary injector gets consulted first (since it's typically\n // a NodeInjector) and `EnvironmentInjector` tree is consulted after that.\n if (parentInjector instanceof ChainedInjector) {\n const origInjector = parentInjector.injector;\n // Guaranteed to be an environment injector\n const parentEnvInjector = parentInjector.parentInjector;\n\n const envInjector = getOrCreateEnvironmentInjector(parentEnvInjector, tDetails, providers);\n return new ChainedInjector(origInjector, envInjector);\n }\n\n const parentEnvInjector = parentInjector.get(EnvironmentInjector);\n\n // If the `parentInjector` is *not* an `EnvironmentInjector` - we need to create\n // a new `ChainedInjector` with the following setup:\n //\n // - the provided `parentInjector` becomes a primary injector\n // - an existing (real) `EnvironmentInjector` becomes a parent injector for\n // a newly-created one, which contains extra providers\n //\n // So the final order in which injectors would be consulted in this case would look like this:\n //\n // 1. Provided `parentInjector`\n // 2. Newly-created `EnvironmentInjector` with extra providers\n // 3. `EnvironmentInjector` from the `parentInjector`\n if (parentEnvInjector !== parentInjector) {\n const envInjector = getOrCreateEnvironmentInjector(parentEnvInjector, tDetails, providers);\n return new ChainedInjector(parentInjector, envInjector);\n }\n\n // The `parentInjector` is an instance of an `EnvironmentInjector`.\n // No need for special handling, we can use `parentInjector` as a\n // parent injector directly.\n return getOrCreateEnvironmentInjector(parentInjector, tDetails, providers);\n}\n\n/** Rendering Helpers */\n\n/**\n * Transitions a defer block to the new state. Updates the necessary\n * data structures and renders corresponding block.\n *\n * @param newState New state that should be applied to the defer block.\n * @param tNode TNode that represents a defer block.\n * @param lContainer Represents an instance of a defer block.\n * @param skipTimerScheduling Indicates that `@loading` and `@placeholder` block\n * should be rendered immediately, even if they have `after` or `minimum` config\n * options setup. This flag to needed for testing APIs to transition defer block\n * between states via `DeferFixture.render` method.\n */\nexport function renderDeferBlockState(\n newState: DeferBlockState,\n tNode: TNode,\n lContainer: LContainer,\n skipTimerScheduling = false,\n): void {\n const hostLView = lContainer[PARENT];\n const hostTView = hostLView[TVIEW];\n\n // Check if this view is not destroyed. Since the loading process was async,\n // the view might end up being destroyed by the time rendering happens.\n if (isDestroyed(hostLView)) return;\n\n // Make sure this TNode belongs to TView that represents host LView.\n ngDevMode && assertTNodeForLView(tNode, hostLView);\n\n const lDetails = getLDeferBlockDetails(hostLView, tNode);\n\n ngDevMode && assertDefined(lDetails, 'Expected a defer block state defined');\n\n const currentState = lDetails[DEFER_BLOCK_STATE];\n\n const ssrState = lDetails[SSR_BLOCK_STATE];\n if (ssrState !== null && newState < ssrState) {\n return; // trying to render a previous state, exit\n }\n\n if (\n isValidStateChange(currentState, newState) &&\n isValidStateChange(lDetails[NEXT_DEFER_BLOCK_STATE] ?? -1, newState)\n ) {\n const tDetails = getTDeferBlockDetails(hostTView, tNode);\n // Skips scheduling on the server since it can delay the server response.\n const needsScheduling =\n !skipTimerScheduling &&\n (typeof ngServerMode === 'undefined' || !ngServerMode) &&\n (getLoadingBlockAfter(tDetails) !== null ||\n getMinimumDurationForState(tDetails, DeferBlockState.Loading) !== null ||\n getMinimumDurationForState(tDetails, DeferBlockState.Placeholder));\n\n if (ngDevMode && needsScheduling) {\n assertDefined(\n applyDeferBlockStateWithSchedulingImpl,\n 'Expected scheduling function to be defined',\n );\n }\n\n const applyStateFn = needsScheduling\n ? applyDeferBlockStateWithSchedulingImpl!\n : applyDeferBlockState;\n try {\n applyStateFn(newState, lDetails, lContainer, tNode, hostLView);\n } catch (error: unknown) {\n handleError(hostLView, error);\n }\n }\n}\n\nfunction findMatchingDehydratedViewForDeferBlock(\n lContainer: LContainer,\n lDetails: LDeferBlockDetails,\n): {dehydratedView: DehydratedContainerView | null; dehydratedViewIx: number} {\n const dehydratedViewIx =\n lContainer[DEHYDRATED_VIEWS]?.findIndex(\n (view: any) => view.data[SERIALIZED_DEFER_BLOCK_STATE] === lDetails[DEFER_BLOCK_STATE],\n ) ?? -1;\n const dehydratedView =\n dehydratedViewIx > -1 ? lContainer[DEHYDRATED_VIEWS]![dehydratedViewIx] : null;\n return {dehydratedView, dehydratedViewIx};\n}\n\n/**\n * Applies changes to the DOM to reflect a given state.\n */\nfunction applyDeferBlockState(\n newState: DeferBlockState,\n lDetails: LDeferBlockDetails,\n lContainer: LContainer,\n tNode: TNode,\n hostLView: LView<unknown>,\n) {\n profiler(ProfilerEvent.DeferBlockStateStart);\n\n const stateTmplIndex = getTemplateIndexForState(newState, hostLView, tNode);\n\n if (stateTmplIndex !== null) {\n lDetails[DEFER_BLOCK_STATE] = newState;\n const hostTView = hostLView[TVIEW];\n const adjustedIndex = stateTmplIndex + HEADER_OFFSET;\n\n // The TNode that represents a template that will activated in the defer block\n const activeBlockTNode = getTNode(hostTView, adjustedIndex) as TContainerNode;\n\n // There is only 1 view that can be present in an LContainer that\n // represents a defer block, so always refer to the first one.\n const viewIndex = 0;\n\n removeLViewFromLContainer(lContainer, viewIndex);\n\n let injector: Injector | undefined;\n if (newState === DeferBlockState.Complete) {\n // When we render a defer block in completed state, there might be\n // newly loaded standalone components used within the block, which may\n // import NgModules with providers. In order to make those providers\n // available for components declared in that NgModule, we create an instance\n // of an environment injector to host those providers and pass this injector\n // to the logic that creates a view.\n const tDetails = getTDeferBlockDetails(hostTView, tNode);\n const providers = tDetails.providers;\n if (providers && providers.length > 0) {\n injector = createDeferBlockInjector(hostLView[INJECTOR], tDetails, providers);\n }\n }\n const {dehydratedView, dehydratedViewIx} = findMatchingDehydratedViewForDeferBlock(\n lContainer,\n lDetails,\n );\n\n const embeddedLView = createAndRenderEmbeddedLView(hostLView, activeBlockTNode, null, {\n injector,\n dehydratedView,\n });\n addLViewToLContainer(\n lContainer,\n embeddedLView,\n viewIndex,\n shouldAddViewToDom(activeBlockTNode, dehydratedView),\n );\n markViewDirty(embeddedLView, NotificationSource.DeferBlockStateUpdate);\n\n if (dehydratedViewIx > -1) {\n // Erase dehydrated view info in a given LContainer, so that the view is not\n // removed later by post-hydration cleanup process (which iterates over all\n // dehydrated views in component tree). This clears only the dehydrated view\n // that was found for this render, which in most cases will be the only view.\n // In the case that there was control flow that changed, there may be either\n // more than one or the views would not match up due to the server rendered\n // content being a different branch of the control flow.\n lContainer[DEHYDRATED_VIEWS]?.splice(dehydratedViewIx, 1);\n }\n\n if (\n (newState === DeferBlockState.Complete || newState === DeferBlockState.Error) &&\n Array.isArray(lDetails[ON_COMPLETE_FNS])\n ) {\n for (const callback of lDetails[ON_COMPLETE_FNS]) {\n callback();\n }\n lDetails[ON_COMPLETE_FNS] = null;\n }\n }\n\n profiler(ProfilerEvent.DeferBlockStateEnd);\n}\n\n/**\n * Extends the `applyDeferBlockState` with timer-based scheduling.\n * This function becomes available on a page if there are defer blocks\n * that use `after` or `minimum` parameters in the `@loading` or\n * `@placeholder` blocks.\n */\nfunction applyDeferBlockStateWithScheduling(\n newState: DeferBlockState,\n lDetails: LDeferBlockDetails,\n lContainer: LContainer,\n tNode: TNode,\n hostLView: LView<unknown>,\n) {\n const now = Date.now();\n const hostTView = hostLView[TVIEW];\n const tDetails = getTDeferBlockDetails(hostTView, tNode);\n\n if (lDetails[STATE_IS_FROZEN_UNTIL] === null || lDetails[STATE_IS_FROZEN_UNTIL] <= now) {\n lDetails[STATE_IS_FROZEN_UNTIL] = null;\n\n const loadingAfter = getLoadingBlockAfter(tDetails);\n const inLoadingAfterPhase = lDetails[LOADING_AFTER_CLEANUP_FN] !== null;\n if (newState === DeferBlockState.Loading && loadingAfter !== null && !inLoadingAfterPhase) {\n // Trying to render loading, but it has an `after` config,\n // so schedule an update action after a timeout.\n lDetails[NEXT_DEFER_BLOCK_STATE] = newState;\n const cleanupFn = scheduleDeferBlockUpdate(\n loadingAfter,\n lDetails,\n tNode,\n lContainer,\n hostLView,\n );\n lDetails[LOADING_AFTER_CLEANUP_FN] = cleanupFn;\n } else {\n // If we transition to a complete or an error state and there is a pending\n // operation to render loading after a timeout - invoke a cleanup operation,\n // which stops the timer.\n if (newState > DeferBlockState.Loading && inLoadingAfterPhase) {\n lDetails[LOADING_AFTER_CLEANUP_FN]!();\n lDetails[LOADING_AFTER_CLEANUP_FN] = null;\n lDetails[NEXT_DEFER_BLOCK_STATE] = null;\n }\n\n applyDeferBlockState(newState, lDetails, lContainer, tNode, hostLView);\n\n const duration = getMinimumDurationForState(tDetails, newState);\n if (duration !== null) {\n lDetails[STATE_IS_FROZEN_UNTIL] = now + duration;\n scheduleDeferBlockUpdate(duration, lDetails, tNode, lContainer, hostLView);\n }\n }\n } else {\n // We are still rendering the previous state.\n // Update the `NEXT_DEFER_BLOCK_STATE`, which would be\n // picked up once it's time to transition to the next state.\n lDetails[NEXT_DEFER_BLOCK_STATE] = newState;\n }\n}\n\n/**\n * Schedules an update operation after a specified timeout.\n */\nfunction scheduleDeferBlockUpdate(\n timeout: number,\n lDetails: LDeferBlockDetails,\n tNode: TNode,\n lContainer: LContainer,\n hostLView: LView<unknown>,\n): VoidFunction {\n const callback = () => {\n const nextState = lDetails[NEXT_DEFER_BLOCK_STATE];\n lDetails[STATE_IS_FROZEN_UNTIL] = null;\n lDetails[NEXT_DEFER_BLOCK_STATE] = null;\n if (nextState !== null) {\n renderDeferBlockState(nextState, tNode, lContainer);\n }\n };\n return scheduleTimerTrigger(timeout, callback, hostLView[INJECTOR]);\n}\n\n/**\n * Checks whether we can transition to the next state.\n *\n * We transition to the next state if the previous state was represented\n * with a number that is less than the next state. For example, if the current\n * state is \"loading\" (represented as `1`), we should not show a placeholder\n * (represented as `0`), but we can show a completed state (represented as `2`)\n * or an error state (represented as `3`).\n */\nfunction isValidStateChange(\n currentState: DeferBlockState | DeferBlockInternalState,\n newState: DeferBlockState,\n): boolean {\n return currentState < newState;\n}\n\n/** Utility function to render placeholder content (if present) */\nexport function renderPlaceholder(lView: LView, tNode: TNode) {\n const lContainer = lView[tNode.index];\n ngDevMode && assertLContainer(lContainer);\n\n renderDeferBlockState(DeferBlockState.Placeholder, tNode, lContainer);\n}\n\n/**\n * Subscribes to the \"loading\" Promise and renders corresponding defer sub-block,\n * based on the loading results.\n *\n * @param lContainer Represents an instance of a defer block.\n * @param tNode Represents defer block info shared across all instances.\n */\nexport function renderDeferStateAfterResourceLoading(\n tDetails: TDeferBlockDetails,\n tNode: TNode,\n lContainer: LContainer,\n) {\n ngDevMode &&\n assertDefined(tDetails.loadingPromise, 'Expected loading Promise to exist on this defer block');\n\n tDetails.loadingPromise!.then(() => {\n if (tDetails.loadingState === DeferDependenciesLoadingState.COMPLETE) {\n ngDevMode && assertDeferredDependenciesLoaded(tDetails);\n\n // Everything is loaded, show the primary block content\n renderDeferBlockState(DeferBlockState.Complete, tNode, lContainer);\n } else if (tDetails.loadingState === DeferDependenciesLoadingState.FAILED) {\n renderDeferBlockState(DeferBlockState.Error, tNode, lContainer);\n }\n });\n}\n\n/**\n * Reference to the timer-based scheduler implementation of defer block state\n * rendering method. It's used to make timer-based scheduling tree-shakable.\n * If `minimum` or `after` parameters are used, compiler generates an extra\n * argument for the `ɵɵdefer` instruction, which references a timer-based\n * implementation.\n */\nlet applyDeferBlockStateWithSchedulingImpl: typeof applyDeferBlockState | null = null;\n\n/**\n * Enables timer-related scheduling if `after` or `minimum` parameters are setup\n * on the `@loading` or `@placeholder` blocks.\n */\nexport function ɵɵdeferEnableTimerScheduling(\n tView: TView,\n tDetails: TDeferBlockDetails,\n placeholderConfigIndex?: number | null,\n loadingConfigIndex?: number | null,\n) {\n const tViewConsts = tView.consts;\n if (placeholderConfigIndex != null) {\n tDetails.placeholderBlockConfig = getConstant<DeferredPlaceholderBlockConfig>(\n tViewConsts,\n placeholderConfigIndex,\n );\n }\n if (loadingConfigIndex != null) {\n tDetails.loadingBlockConfig = getConstant<DeferredLoadingBlockConfig>(\n tViewConsts,\n loadingConfigIndex,\n );\n }\n\n // Enable implementation that supports timer-based scheduling.\n if (applyDeferBlockStateWithSchedulingImpl === null) {\n applyDeferBlockStateWithSchedulingImpl = applyDeferBlockStateWithScheduling;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Type} from '../interface/type';\nimport {noSideEffects} from '../util/closure';\n\ninterface TypeWithMetadata extends Type<any> {\n decorators?: any[];\n ctorParameters?: () => any[];\n propDecorators?: {[field: string]: any};\n}\n\n/**\n * The name of a field that Angular monkey-patches onto a component\n * class to store a function that loads defer-loadable dependencies\n * and applies metadata to a class.\n */\nconst ASYNC_COMPONENT_METADATA_FN = '__ngAsyncComponentMetadataFn__';\n\n/**\n * If a given component has unresolved async metadata - returns a reference\n * to a function that applies component metadata after resolving defer-loadable\n * dependencies. Otherwise - this function returns `null`.\n */\nexport function getAsyncClassMetadataFn(\n type: Type<unknown>,\n): (() => Promise<Array<Type<unknown>>>) | null {\n const componentClass = type as any; // cast to `any`, so that we can read a monkey-patched field\n return componentClass[ASYNC_COMPONENT_METADATA_FN] ?? null;\n}\n\n/**\n * Handles the process of applying metadata info to a component class in case\n * component template has defer blocks (thus some dependencies became deferrable).\n *\n * @param type Component class where metadata should be added\n * @param dependencyLoaderFn Function that loads dependencies\n * @param metadataSetterFn Function that forms a scope in which the `setClassMetadata` is invoked\n */\nexport function setClassMetadataAsync(\n type: Type<any>,\n dependencyLoaderFn: () => Array<Promise<Type<unknown>>>,\n metadataSetterFn: (...types: Type<unknown>[]) => void,\n): () => Promise<Array<Type<unknown>>> {\n const componentClass = type as any; // cast to `any`, so that we can monkey-patch it\n componentClass[ASYNC_COMPONENT_METADATA_FN] = () =>\n Promise.all(dependencyLoaderFn()).then((dependencies) => {\n metadataSetterFn(...dependencies);\n // Metadata is now set, reset field value to indicate that this component\n // can by used/compiled synchronously.\n componentClass[ASYNC_COMPONENT_METADATA_FN] = null;\n\n return dependencies;\n });\n return componentClass[ASYNC_COMPONENT_METADATA_FN];\n}\n\n/**\n * Adds decorator, constructor, and property metadata to a given type via static metadata fields\n * on the type.\n *\n * These metadata fields can later be read with Angular's `ReflectionCapabilities` API.\n *\n * Calls to `setClassMetadata` can be guarded by ngDevMode, resulting in the metadata assignments\n * being tree-shaken away during production builds.\n */\nexport function setClassMetadata(\n type: Type<any>,\n decorators: any[] | null,\n ctorParameters: (() => any[]) | null,\n propDecorators: {[field: string]: any} | null,\n): void {\n return noSideEffects(() => {\n const clazz = type as TypeWithMetadata;\n\n if (decorators !== null) {\n if (clazz.hasOwnProperty('decorators') && clazz.decorators !== undefined) {\n clazz.decorators.push(...decorators);\n } else {\n clazz.decorators = decorators;\n }\n }\n if (ctorParameters !== null) {\n // Rather than merging, clobber the existing parameters. If other projects exist which\n // use tsickle-style annotations and reflect over them in the same way, this could\n // cause issues, but that is vanishingly unlikely.\n clazz.ctorParameters = ctorParameters;\n }\n if (propDecorators !== null) {\n // The property decorator objects are merged as it is possible different fields have\n // different decorator types. Decorators on individual fields are not merged, as it's\n // also incredibly unlikely that a field will be decorated both with an Angular\n // decorator and a non-Angular decorator that's also been downleveled.\n if (clazz.hasOwnProperty('propDecorators') && clazz.propDecorators !== undefined) {\n clazz.propDecorators = {...clazz.propDecorators, ...propDecorators};\n } else {\n clazz.propDecorators = propDecorators;\n }\n }\n }) as never;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Injectable} from './di';\n\n@Injectable({providedIn: 'platform'})\nexport class Console {\n log(message: string): void {\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 warn(message: string): void {\n console.warn(message);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Injector} from '../../di/injector';\nimport {EnvironmentInjector} from '../../di/r3_injector';\nimport {Type} from '../../interface/type';\nimport {assertDefined, throwError} from '../../util/assert';\nimport {assertTNode, assertTNodeForLView} from '../assert';\nimport {getComponentDef} from '../def_getters';\nimport {getNodeInjectorLView, getNodeInjectorTNode, NodeInjector} from '../di';\nimport {TNode} from '../interfaces/node';\nimport {LView} from '../interfaces/view';\nimport {EffectRef} from '../reactivity/effect';\n\nimport {\n InjectedService,\n InjectorCreatedInstance,\n InjectorProfilerContext,\n InjectorProfilerEvent,\n InjectorProfilerEventType,\n ProviderRecord,\n setInjectorProfiler,\n} from './injector_profiler';\n\n/**\n * These are the data structures that our framework injector profiler will fill with data in order\n * to support DI debugging APIs.\n *\n * resolverToTokenToDependencies: Maps an injector to a Map of tokens to an Array of\n * dependencies. Injector -> Token -> Dependencies This is used to support the\n * getDependenciesFromInjectable API, which takes in an injector and a token and returns it's\n * dependencies.\n *\n * resolverToProviders: Maps a DI resolver (an Injector or a TNode) to the providers configured\n * within it This is used to support the getInjectorProviders API, which takes in an injector and\n * returns the providers that it was configured with. Note that for the element injector case we\n * use the TNode instead of the LView as the DI resolver. This is because the registration of\n * providers happens only once per type of TNode. If an injector is created with an identical TNode,\n * the providers for that injector will not be reconfigured.\n *\n * standaloneInjectorToComponent: Maps the injector of a standalone component to the standalone\n * component that it is associated with. Used in the getInjectorProviders API, specificially in the\n * discovery of import paths for each provider. This is necessary because the imports array of a\n * standalone component is processed and configured in its standalone injector, but exists within\n * the component's definition. Because getInjectorProviders takes in an injector, if that injector\n * is the injector of a standalone component, we need to be able to discover the place where the\n * imports array is located (the component) in order to flatten the imports array within it to\n * discover all of it's providers.\n *\n *\n * All of these data structures are instantiated with WeakMaps. This will ensure that the presence\n * of any object in the keys of these maps does not prevent the garbage collector from collecting\n * those objects. Because of this property of WeakMaps, these data structures will never be the\n * source of a memory leak.\n *\n * An example of this advantage: When components are destroyed, we don't need to do\n * any additional work to remove that component from our mappings.\n *\n */\nclass DIDebugData {\n resolverToTokenToDependencies = new WeakMap<\n Injector | LView,\n WeakMap<Type<unknown>, InjectedService[]>\n >();\n resolverToProviders = new WeakMap<Injector | TNode, ProviderRecord[]>();\n resolverToEffects = new WeakMap<Injector | LView, EffectRef[]>();\n standaloneInjectorToComponent = new WeakMap<Injector, Type<unknown>>();\n\n reset() {\n this.resolverToTokenToDependencies = new WeakMap<\n Injector | LView,\n WeakMap<Type<unknown>, InjectedService[]>\n >();\n this.resolverToProviders = new WeakMap<Injector | TNode, ProviderRecord[]>();\n this.standaloneInjectorToComponent = new WeakMap<Injector, Type<unknown>>();\n }\n}\n\nlet frameworkDIDebugData = new DIDebugData();\n\nexport function getFrameworkDIDebugData(): DIDebugData {\n return frameworkDIDebugData;\n}\n\n/**\n * Initalize default handling of injector events. This handling parses events\n * as they are emitted and constructs the data structures necessary to support\n * some of debug APIs.\n *\n * See handleInjectEvent, handleCreateEvent and handleProviderConfiguredEvent\n * for descriptions of each handler\n *\n * Supported APIs:\n * - getDependenciesFromInjectable\n * - getInjectorProviders\n */\nexport function setupFrameworkInjectorProfiler(): void {\n frameworkDIDebugData.reset();\n setInjectorProfiler((injectorProfilerEvent) =>\n handleInjectorProfilerEvent(injectorProfilerEvent),\n );\n}\n\nfunction handleInjectorProfilerEvent(injectorProfilerEvent: InjectorProfilerEvent): void {\n const {context, type} = injectorProfilerEvent;\n\n if (type === InjectorProfilerEventType.Inject) {\n handleInjectEvent(context, injectorProfilerEvent.service);\n } else if (type === InjectorProfilerEventType.InstanceCreatedByInjector) {\n handleInstanceCreatedByInjectorEvent(context, injectorProfilerEvent.instance);\n } else if (type === InjectorProfilerEventType.ProviderConfigured) {\n handleProviderConfiguredEvent(context, injectorProfilerEvent.providerRecord);\n } else if (type === InjectorProfilerEventType.EffectCreated) {\n handleEffectCreatedEvent(context, injectorProfilerEvent.effect);\n }\n}\n\nfunction handleEffectCreatedEvent(context: InjectorProfilerContext, effect: EffectRef): void {\n const diResolver = getDIResolver(context.injector);\n if (diResolver === null) {\n throwError('An EffectCreated event must be run within an injection context.');\n }\n\n const {resolverToEffects} = frameworkDIDebugData;\n\n if (!resolverToEffects.has(diResolver)) {\n resolverToEffects.set(diResolver, []);\n }\n\n resolverToEffects.get(diResolver)!.push(effect);\n}\n\n/**\n *\n * Stores the injected service in frameworkDIDebugData.resolverToTokenToDependencies\n * based on it's injector and token.\n *\n * @param context InjectorProfilerContext the injection context that this event occurred in.\n * @param data InjectedService the service associated with this inject event.\n *\n */\nfunction handleInjectEvent(context: InjectorProfilerContext, data: InjectedService) {\n const diResolver = getDIResolver(context.injector);\n if (diResolver === null) {\n throwError('An Inject event must be run within an injection context.');\n }\n\n const diResolverToInstantiatedToken = frameworkDIDebugData.resolverToTokenToDependencies;\n\n if (!diResolverToInstantiatedToken.has(diResolver)) {\n diResolverToInstantiatedToken.set(diResolver, new WeakMap<Type<unknown>, InjectedService[]>());\n }\n\n // if token is a primitive type, ignore this event. We do this because we cannot keep track of\n // non-primitive tokens in WeakMaps since they are not garbage collectable.\n if (!canBeHeldWeakly(context.token)) {\n return;\n }\n\n const instantiatedTokenToDependencies = diResolverToInstantiatedToken.get(diResolver)!;\n if (!instantiatedTokenToDependencies.has(context.token!)) {\n instantiatedTokenToDependencies.set(context.token!, []);\n }\n\n const {token, value, flags} = data;\n\n assertDefined(context.token, 'Injector profiler context token is undefined.');\n\n const dependencies = instantiatedTokenToDependencies.get(context.token);\n assertDefined(dependencies, 'Could not resolve dependencies for token.');\n\n if (context.injector instanceof NodeInjector) {\n dependencies.push({token, value, flags, injectedIn: getNodeInjectorContext(context.injector)});\n } else {\n dependencies.push({token, value, flags});\n }\n}\n\n/**\n *\n * Returns the LView and TNode associated with a NodeInjector. Returns undefined if the injector\n * is not a NodeInjector.\n *\n * @param injector\n * @returns {lView: LView, tNode: TNode}|undefined\n */\nfunction getNodeInjectorContext(injector: Injector): {lView: LView; tNode: TNode} | undefined {\n if (!(injector instanceof NodeInjector)) {\n throwError('getNodeInjectorContext must be called with a NodeInjector');\n }\n\n const lView = getNodeInjectorLView(injector);\n const tNode = getNodeInjectorTNode(injector);\n if (tNode === null) {\n return;\n }\n\n assertTNodeForLView(tNode, lView);\n\n return {lView, tNode};\n}\n\n/**\n *\n * If the created instance is an instance of a standalone component, maps the injector to that\n * standalone component in frameworkDIDebugData.standaloneInjectorToComponent\n *\n * @param context InjectorProfilerContext the injection context that this event occurred in.\n * @param data InjectorCreatedInstance an object containing the instance that was just created\n *\n */\nfunction handleInstanceCreatedByInjectorEvent(\n context: InjectorProfilerContext,\n data: InjectorCreatedInstance,\n): void {\n const {value} = data;\n\n if (getDIResolver(context.injector) === null) {\n throwError('An InjectorCreatedInstance event must be run within an injection context.');\n }\n\n // if our value is an instance of a standalone component, map the injector of that standalone\n // component to the component class. Otherwise, this event is a noop.\n let standaloneComponent: Type<unknown> | undefined | null = undefined;\n if (typeof value === 'object') {\n standaloneComponent = value?.constructor as Type<unknown> | undefined | null;\n }\n\n // We want to also cover if `standaloneComponent === null` in addition to `undefined`\n if (standaloneComponent == undefined || !isStandaloneComponent(standaloneComponent)) {\n return;\n }\n\n const environmentInjector: EnvironmentInjector | null = context.injector.get(\n EnvironmentInjector,\n null,\n {optional: true},\n );\n // Standalone components should have an environment injector. If one cannot be\n // found we may be in a test case for low level functionality that did not explicitly\n // setup this injector. In those cases, we simply ignore this event.\n if (environmentInjector === null) {\n return;\n }\n\n const {standaloneInjectorToComponent} = frameworkDIDebugData;\n\n // If our injector has already been mapped, as is the case\n // when a standalone component imports another standalone component,\n // we consider the original component (the component doing the importing)\n // as the component connected to our injector.\n if (standaloneInjectorToComponent.has(environmentInjector)) {\n return;\n }\n // If our injector hasn't been mapped, then we map it to the standalone component\n standaloneInjectorToComponent.set(environmentInjector, standaloneComponent);\n}\n\nfunction isStandaloneComponent(value: Type<unknown>): boolean {\n const def = getComponentDef(value);\n return !!def?.standalone;\n}\n\n/**\n *\n * Stores the emitted ProviderRecords from the InjectorProfilerEventType.ProviderConfigured\n * event in frameworkDIDebugData.resolverToProviders\n *\n * @param context InjectorProfilerContext the injection context that this event occurred in.\n * @param data ProviderRecord an object containing the instance that was just created\n *\n */\nfunction handleProviderConfiguredEvent(\n context: InjectorProfilerContext,\n data: ProviderRecord,\n): void {\n const {resolverToProviders} = frameworkDIDebugData;\n\n let diResolver: Injector | TNode;\n if (context?.injector instanceof NodeInjector) {\n diResolver = getNodeInjectorTNode(context.injector) as TNode;\n } else {\n diResolver = context.injector;\n }\n\n if (diResolver === null) {\n throwError('A ProviderConfigured event must be run within an injection context.');\n }\n\n if (!resolverToProviders.has(diResolver)) {\n resolverToProviders.set(diResolver, []);\n }\n\n resolverToProviders.get(diResolver)!.push(data);\n}\n\nfunction getDIResolver(injector: Injector | undefined): Injector | LView | null {\n let diResolver: Injector | LView | null = null;\n\n if (injector === undefined) {\n return diResolver;\n }\n\n // We use the LView as the diResolver for NodeInjectors because they\n // do not persist anywhere in the framework. They are simply wrappers around an LView and a TNode\n // that do persist. Because of this, we rely on the LView of the NodeInjector in order to use\n // as a concrete key to represent this injector. If we get the same LView back later, we know\n // we're looking at the same injector.\n if (injector instanceof NodeInjector) {\n diResolver = getNodeInjectorLView(injector);\n }\n // Other injectors can be used a keys for a map because their instances\n // persist\n else {\n diResolver = injector;\n }\n\n return diResolver;\n}\n\n// inspired by\n// https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#sec-canbeheldweakly\nfunction canBeHeldWeakly(value: any): boolean {\n // we check for value !== null here because typeof null === 'object\n return (\n value !== null &&\n (typeof value === 'object' || typeof value === 'function' || typeof value === 'symbol')\n );\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {NotificationSource} from '../../change_detection/scheduling/zoneless_scheduling';\nimport {assertDefined} from '../../util/assert';\nimport {getComponentViewByInstance} from '../context_discovery';\nimport {detectChangesInternal} from '../instructions/change_detection';\nimport {markViewDirty} from '../instructions/mark_view_dirty';\nimport {FLAGS, LViewFlags} from '../interfaces/view';\n\nimport {getRootComponents} from './discovery_utils';\n\n/**\n * Marks a component for check (in case of OnPush components) and synchronously\n * performs change detection on the application this component belongs to.\n *\n * @param component Component to {@link /api/core/ChangeDetectorRef#markForCheck mark for check}\n *\n * @publicApi\n */\nexport function applyChanges(component: {}): void {\n ngDevMode && assertDefined(component, 'component');\n markViewDirty(getComponentViewByInstance(component), NotificationSource.DebugApplyChanges);\n getRootComponents(component).forEach((rootComponent) => detectChanges(rootComponent));\n}\n\n/**\n * Synchronously perform change detection on a component (and possibly its sub-components).\n *\n * This function triggers change detection in a synchronous way on a component.\n *\n * @param component The component which the change detection should be performed on.\n */\nfunction detectChanges(component: {}): void {\n const view = getComponentViewByInstance(component);\n view[FLAGS] |= LViewFlags.RefreshView;\n detectChangesInternal(view);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {CONTAINER_HEADER_OFFSET} from '../render3/interfaces/container';\nimport {TNode} from '../render3/interfaces/node';\nimport {isLContainer, isLView} from '../render3/interfaces/type_checks';\nimport {HEADER_OFFSET, LView, TVIEW} from '../render3/interfaces/view';\n\nimport {DehydratedDeferBlock, TDeferBlockDetails} from './interfaces';\nimport {getTDeferBlockDetails, isTDeferBlockDetails} from './utils';\n\n/**\n * Defer block instance for testing.\n */\nexport interface DeferBlockDetails extends DehydratedDeferBlock {\n tDetails: TDeferBlockDetails;\n}\n\n/**\n * Retrieves all defer blocks in a given LView.\n *\n * @param lView lView with defer blocks\n * @param deferBlocks defer block aggregator array\n */\nexport function getDeferBlocks(lView: LView, deferBlocks: DeferBlockDetails[]) {\n const tView = lView[TVIEW];\n for (let i = HEADER_OFFSET; i < tView.bindingStartIndex; i++) {\n if (isLContainer(lView[i])) {\n const lContainer = lView[i];\n // An LContainer may represent an instance of a defer block, in which case\n // we store it as a result. Otherwise, keep iterating over LContainer views and\n // look for defer blocks.\n const isLast = i === tView.bindingStartIndex - 1;\n if (!isLast) {\n const tNode = tView.data[i] as TNode;\n const tDetails = getTDeferBlockDetails(tView, tNode);\n if (isTDeferBlockDetails(tDetails)) {\n deferBlocks.push({lContainer, lView, tNode, tDetails});\n // This LContainer represents a defer block, so we exit\n // this iteration and don't inspect views in this LContainer.\n continue;\n }\n }\n for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n getDeferBlocks(lContainer[i] as LView, deferBlocks);\n }\n } else if (isLView(lView[i])) {\n // This is a component, enter the `getDeferBlocks` recursively.\n getDeferBlocks(lView[i], deferBlocks);\n }\n }\n}\n","/*!\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {DeferBlockDetails, getDeferBlocks as getDeferBlocksInternal} from '../../defer/discovery';\nimport {\n DEFER_BLOCK_STATE,\n DeferBlockInternalState,\n DeferBlockState,\n DeferBlockTrigger,\n LDeferBlockDetails,\n LOADING_AFTER_SLOT,\n MINIMUM_SLOT,\n SSR_UNIQUE_ID,\n TDeferBlockDetails,\n} from '../../defer/interfaces';\nimport {DEHYDRATED_BLOCK_REGISTRY, DehydratedBlockRegistry} from '../../defer/registry';\nimport {getLDeferBlockDetails} from '../../defer/utils';\nimport {assertLView} from '../assert';\nimport {collectNativeNodes} from '../collect_native_nodes';\nimport {getLContext} from '../context_discovery';\nimport {CONTAINER_HEADER_OFFSET} from '../interfaces/container';\nimport {INJECTOR, LView, TVIEW} from '../interfaces/view';\nimport {getNativeByTNode} from './view_utils';\n\n/** Retrieved information about a `@defer` block. */\ninterface DeferBlockData {\n /** Current state of the block. */\n state: 'placeholder' | 'loading' | 'complete' | 'error' | 'initial';\n\n /** Hydration state of the block. */\n incrementalHydrationState: 'not-configured' | 'hydrated' | 'dehydrated';\n\n /** Wherther the block has a connected `@error` block. */\n hasErrorBlock: boolean;\n\n /** Information about the connected `@loading` block. */\n loadingBlock: {\n /** Whether the block is defined. */\n exists: boolean;\n\n /** Minimum amount of milliseconds that the block should be shown. */\n minimumTime: number | null;\n\n /** Amount of time after which the block should be shown. */\n afterTime: number | null;\n };\n\n /** Information about the connected `@placeholder` block. */\n placeholderBlock: {\n /** Whether the block is defined. */\n exists: boolean;\n\n /** Minimum amount of time that block should be shown. */\n minimumTime: number | null;\n };\n\n /** Stringified version of the block's triggers. */\n triggers: string[];\n\n /** Element root nodes that are currently being shown in the block. */\n rootNodes: Node[];\n}\n\n/**\n * Gets all of the `@defer` blocks that are present inside the specified DOM node.\n * @param node Node in which to look for `@defer` blocks.\n *\n * @publicApi\n */\nexport function getDeferBlocks(node: Node): DeferBlockData[] {\n const results: DeferBlockData[] = [];\n const lView = getLContext(node)?.lView;\n\n if (lView) {\n findDeferBlocks(node, lView, results);\n }\n\n return results;\n}\n\n/**\n * Finds all the `@defer` blocks inside a specific node and view.\n * @param node Node in which to search for blocks.\n * @param lView View within the node in which to search for blocks.\n * @param results Array to which to add blocks once they're found.\n */\nfunction findDeferBlocks(node: Node, lView: LView, results: DeferBlockData[]) {\n const registry = lView[INJECTOR].get(DEHYDRATED_BLOCK_REGISTRY, null, {optional: true});\n const blocks: DeferBlockDetails[] = [];\n getDeferBlocksInternal(lView, blocks);\n\n for (const details of blocks) {\n const native = getNativeByTNode(details.tNode, details.lView);\n const lDetails = getLDeferBlockDetails(details.lView, details.tNode);\n\n // The LView from `getLContext` might be the view the element is placed in.\n // Filter out defer blocks that aren't inside the specified root node.\n if (!node.contains(native as Node)) {\n continue;\n }\n\n const tDetails = details.tDetails;\n const renderedLView = getRendererLView(details);\n const rootNodes: Node[] = [];\n\n if (renderedLView !== null) {\n collectNativeNodes(\n renderedLView[TVIEW],\n renderedLView,\n renderedLView[TVIEW].firstChild,\n rootNodes,\n );\n }\n\n const data: DeferBlockData = {\n state: stringifyState(lDetails[DEFER_BLOCK_STATE]),\n incrementalHydrationState: inferHydrationState(tDetails, lDetails, registry),\n hasErrorBlock: tDetails.errorTmplIndex !== null,\n loadingBlock: {\n exists: tDetails.loadingTmplIndex !== null,\n minimumTime: tDetails.loadingBlockConfig?.[MINIMUM_SLOT] ?? null,\n afterTime: tDetails.loadingBlockConfig?.[LOADING_AFTER_SLOT] ?? null,\n },\n placeholderBlock: {\n exists: tDetails.placeholderTmplIndex !== null,\n minimumTime: tDetails.placeholderBlockConfig?.[MINIMUM_SLOT] ?? null,\n },\n triggers: tDetails.debug?.triggers ? Array.from(tDetails.debug.triggers).sort() : [],\n rootNodes,\n };\n\n results.push(data);\n\n // `getDeferBlocks` does not resolve nested defer blocks so we have to recurse manually.\n if (renderedLView !== null) {\n findDeferBlocks(node, renderedLView, results);\n }\n }\n}\n\n/**\n * Turns the `DeferBlockState` into a string which is more readable than the enum form.\n *\n * @param lDetails Information about the\n * @returns\n */\nfunction stringifyState(state: DeferBlockState | DeferBlockInternalState): DeferBlockData['state'] {\n switch (state) {\n case DeferBlockState.Complete:\n return 'complete';\n case DeferBlockState.Loading:\n return 'loading';\n case DeferBlockState.Placeholder:\n return 'placeholder';\n case DeferBlockState.Error:\n return 'error';\n case DeferBlockInternalState.Initial:\n return 'initial';\n default:\n throw new Error(`Unrecognized state ${state}`);\n }\n}\n\n/**\n * Infers the hydration state of a specific defer block.\n * @param tDetails Static defer block information.\n * @param lDetails Instance defer block information.\n * @param registry Registry coordinating the hydration of defer blocks.\n */\nfunction inferHydrationState(\n tDetails: TDeferBlockDetails,\n lDetails: LDeferBlockDetails,\n registry: DehydratedBlockRegistry | null,\n): DeferBlockData['incrementalHydrationState'] {\n if (\n registry === null ||\n lDetails[SSR_UNIQUE_ID] === null ||\n tDetails.hydrateTriggers === null ||\n tDetails.hydrateTriggers.has(DeferBlockTrigger.Never)\n ) {\n return 'not-configured';\n }\n return registry.has(lDetails[SSR_UNIQUE_ID]) ? 'dehydrated' : 'hydrated';\n}\n\n/**\n * Gets the current LView that is rendered out in a defer block.\n * @param details Instance information about the block.\n */\nfunction getRendererLView(details: DeferBlockDetails): LView | null {\n // Defer block containers can only ever contain one view.\n // If they're empty, it means that nothing is rendered.\n if (details.lContainer.length <= CONTAINER_HEADER_OFFSET) {\n return null;\n }\n\n const lView = details.lContainer[CONTAINER_HEADER_OFFSET];\n ngDevMode && assertLView(lView);\n return lView;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ENVIRONMENT_INITIALIZER} from '../../di/initializer_token';\nimport {InjectionToken} from '../../di/injection_token';\nimport {Injector} from '../../di/injector';\nimport {getInjectorDef, InjectorType} from '../../di/interface/defs';\nimport {InternalInjectFlags} from '../../di/interface/injector';\nimport {ValueProvider} from '../../di/interface/provider';\nimport {INJECTOR_DEF_TYPES} from '../../di/internal_tokens';\nimport {NullInjector} from '../../di/null_injector';\nimport {SingleProvider, walkProviderTree} from '../../di/provider_collection';\nimport {EnvironmentInjector, R3Injector} from '../../di/r3_injector';\nimport {Type} from '../../interface/type';\nimport {NgModuleRef as viewEngine_NgModuleRef} from '../../linker/ng_module_factory';\nimport {deepForEach} from '../../util/array_utils';\nimport {throwError} from '../../util/assert';\nimport {assertTNode, assertTNodeForLView} from '../assert';\nimport {ChainedInjector} from '../chained_injector';\nimport {getFrameworkDIDebugData} from '../debug/framework_injector_profiler';\nimport {InjectedService, ProviderRecord} from '../debug/injector_profiler';\nimport {getComponentDef} from '../def_getters';\nimport {\n getNodeInjectorLView,\n getNodeInjectorTNode,\n getParentInjectorLocation,\n NodeInjector,\n} from '../di';\nimport {NodeInjectorOffset} from '../interfaces/injector';\nimport {TContainerNode, TElementContainerNode, TElementNode, TNode} from '../interfaces/node';\nimport {RElement} from '../interfaces/renderer_dom';\nimport {INJECTOR, LView, TVIEW} from '../interfaces/view';\n\nimport {getParentInjectorIndex, getParentInjectorView, hasParentInjector} from './injector_utils';\nimport {getNativeByTNode} from './view_utils';\n\n/**\n * Discovers the dependencies of an injectable instance. Provides DI information about each\n * dependency that the injectable was instantiated with, including where they were provided from.\n *\n * @param injector An injector instance\n * @param token a DI token that was constructed by the given injector instance\n * @returns an object that contains the created instance of token as well as all of the dependencies\n * that it was instantiated with OR undefined if the token was not created within the given\n * injector.\n */\nexport function getDependenciesFromInjectable<T>(\n injector: Injector,\n token: Type<T> | InjectionToken<T>,\n): {instance: T; dependencies: Omit<InjectedService, 'injectedIn'>[]} | undefined {\n // First we check to see if the token given maps to an actual instance in the injector given.\n // We use `self: true` because we only want to look at the injector we were given.\n // We use `optional: true` because it's possible that the token we were given was never\n // constructed by the injector we were given.\n const instance = injector.get(token, null, {self: true, optional: true});\n if (instance === null) {\n throw new Error(`Unable to determine instance of ${token} in given injector`);\n }\n\n const unformattedDependencies = getDependenciesForTokenInInjector(token, injector);\n const resolutionPath = getInjectorResolutionPath(injector);\n\n const dependencies = unformattedDependencies.map((dep) => {\n // injectedIn contains private fields, so we omit it from the response\n const formattedDependency: Omit<InjectedService, 'injectedIn'> = {\n value: dep.value,\n };\n\n // convert injection flags to booleans\n const flags = dep.flags as InternalInjectFlags;\n formattedDependency.flags = {\n optional: (InternalInjectFlags.Optional & flags) === InternalInjectFlags.Optional,\n host: (InternalInjectFlags.Host & flags) === InternalInjectFlags.Host,\n self: (InternalInjectFlags.Self & flags) === InternalInjectFlags.Self,\n skipSelf: (InternalInjectFlags.SkipSelf & flags) === InternalInjectFlags.SkipSelf,\n };\n\n // find the injector that provided the dependency\n for (let i = 0; i < resolutionPath.length; i++) {\n const injectorToCheck = resolutionPath[i];\n\n // if skipSelf is true we skip the first injector\n if (i === 0 && formattedDependency.flags.skipSelf) {\n continue;\n }\n\n // host only applies to NodeInjectors\n if (formattedDependency.flags.host && injectorToCheck instanceof EnvironmentInjector) {\n break;\n }\n\n const instance = injectorToCheck.get(dep.token as Type<unknown>, null, {\n self: true,\n optional: true,\n });\n\n if (instance !== null) {\n // if host flag is true we double check that we can get the service from the first element\n // in the resolution path by using the host flag. This is done to make sure that we've found\n // the correct providing injector, and not a node injector that is connected to our path via\n // a router outlet.\n if (formattedDependency.flags.host) {\n const firstInjector = resolutionPath[0];\n const lookupFromFirstInjector = firstInjector.get(dep.token as Type<unknown>, null, {\n ...formattedDependency.flags,\n optional: true,\n });\n\n if (lookupFromFirstInjector !== null) {\n formattedDependency.providedIn = injectorToCheck;\n }\n\n break;\n }\n\n formattedDependency.providedIn = injectorToCheck;\n break;\n }\n\n // if self is true we stop after the first injector\n if (i === 0 && formattedDependency.flags.self) {\n break;\n }\n }\n\n if (dep.token) formattedDependency.token = dep.token;\n\n return formattedDependency;\n });\n\n return {instance, dependencies};\n}\n\nfunction getDependenciesForTokenInInjector<T>(\n token: Type<T> | InjectionToken<T>,\n injector: Injector,\n): InjectedService[] {\n const {resolverToTokenToDependencies} = getFrameworkDIDebugData();\n\n if (!(injector instanceof NodeInjector)) {\n return resolverToTokenToDependencies.get(injector)?.get?.(token as Type<T>) ?? [];\n }\n\n const lView = getNodeInjectorLView(injector);\n const tokenDependencyMap = resolverToTokenToDependencies.get(lView);\n const dependencies = tokenDependencyMap?.get(token as Type<T>) ?? [];\n\n // In the NodeInjector case, all injections for every node are stored in the same lView.\n // We use the injectedIn field of the dependency to filter out the dependencies that\n // do not come from the same node as the instance we're looking at.\n return dependencies.filter((dependency) => {\n const dependencyNode = dependency.injectedIn?.tNode;\n if (dependencyNode === undefined) {\n return false;\n }\n\n const instanceNode = getNodeInjectorTNode(injector);\n assertTNode(dependencyNode);\n assertTNode(instanceNode!);\n\n return dependencyNode === instanceNode;\n });\n}\n\n/**\n * Gets the class associated with an injector that contains a provider `imports` array in it's\n * definition\n *\n * For Module Injectors this returns the NgModule constructor.\n *\n * For Standalone injectors this returns the standalone component constructor.\n *\n * @param injector Injector an injector instance\n * @returns the constructor where the `imports` array that configures this injector is located\n */\nfunction getProviderImportsContainer(injector: Injector): Type<unknown> | null {\n const {standaloneInjectorToComponent} = getFrameworkDIDebugData();\n\n // standalone components configure providers through a component def, so we have to\n // use the standalone component associated with this injector if Injector represents\n // a standalone components EnvironmentInjector\n if (standaloneInjectorToComponent.has(injector)) {\n return standaloneInjectorToComponent.get(injector)!;\n }\n\n // Module injectors configure providers through their NgModule def, so we use the\n // injector to lookup its NgModuleRef and through that grab its instance\n const defTypeRef = injector.get(viewEngine_NgModuleRef, null, {self: true, optional: true})!;\n\n // If we can't find an associated imports container, return null.\n // This could be the case if this function is called with an R3Injector that does not represent\n // a standalone component or NgModule.\n if (defTypeRef === null) {\n return null;\n }\n\n // In standalone applications, the root environment injector created by bootstrapApplication\n // may have no associated \"instance\".\n if (defTypeRef.instance === null) {\n return null;\n }\n\n return defTypeRef.instance.constructor;\n}\n\n/**\n * Gets the providers configured on a NodeInjector\n *\n * @param injector A NodeInjector instance\n * @returns ProviderRecord[] an array of objects representing the providers configured on this\n * injector\n */\nfunction getNodeInjectorProviders(injector: NodeInjector): ProviderRecord[] {\n const diResolver = getNodeInjectorTNode(injector);\n const {resolverToProviders} = getFrameworkDIDebugData();\n return resolverToProviders.get(diResolver as TNode) ?? [];\n}\n\n/**\n * Gets a mapping of providers configured on an injector to their import paths\n *\n * ModuleA -> imports ModuleB\n * ModuleB -> imports ModuleC\n * ModuleB -> provides MyServiceA\n * ModuleC -> provides MyServiceB\n *\n * getProviderImportPaths(ModuleA)\n * > Map(2) {\n * MyServiceA => [ModuleA, ModuleB]\n * MyServiceB => [ModuleA, ModuleB, ModuleC]\n * }\n *\n * @param providerImportsContainer constructor of class that contains an `imports` array in it's\n * definition\n * @returns A Map object that maps providers to an array of constructors representing it's import\n * path\n *\n */\nfunction getProviderImportPaths(\n providerImportsContainer: Type<unknown>,\n): Map<SingleProvider, (Type<unknown> | InjectorType<unknown>)[]> {\n const providerToPath = new Map<SingleProvider, (Type<unknown> | InjectorType<unknown>)[]>();\n const visitedContainers = new Set<Type<unknown>>();\n const visitor = walkProviderTreeToDiscoverImportPaths(providerToPath, visitedContainers);\n\n walkProviderTree(providerImportsContainer, visitor, [], new Set());\n\n return providerToPath;\n}\n\n/**\n *\n * Higher order function that returns a visitor for WalkProviderTree\n *\n * Takes in a Map and Set to keep track of the providers and containers\n * visited, so that we can discover the import paths of these providers\n * during the traversal.\n *\n * This visitor takes advantage of the fact that walkProviderTree performs a\n * postorder traversal of the provider tree for the passed in container. Because postorder\n * traversal recursively processes subtrees from leaf nodes until the traversal reaches the root,\n * we write a visitor that constructs provider import paths in reverse.\n *\n *\n * We use the visitedContainers set defined outside this visitor\n * because we want to run some logic only once for\n * each container in the tree. That logic can be described as:\n *\n *\n * 1. for each discovered_provider and discovered_path in the incomplete provider paths we've\n * already discovered\n * 2. get the first container in discovered_path\n * 3. if that first container is in the imports array of the container we're visiting\n * Then the container we're visiting is also in the import path of discovered_provider, so we\n * unshift discovered_path with the container we're currently visiting\n *\n *\n * Example Run:\n * ```\n * ┌──────────┐\n * │containerA│\n * ┌─imports-─┤ ├──imports─┐\n * │ │ provA │ │\n * │ │ provB │ │\n * │ └──────────┘ │\n * │ │\n * ┌▼─────────┐ ┌────────▼─┐\n * │containerB│ │containerC│\n * │ │ │ │\n * │ provD │ │ provF │\n * │ provE │ │ provG │\n * └──────────┘ └──────────┘\n * ```\n *\n * Each step of the traversal,\n *\n * ```\n * visitor(provD, containerB)\n * providerToPath === Map { provD => [containerB] }\n * visitedContainers === Set { containerB }\n *\n * visitor(provE, containerB)\n * providerToPath === Map { provD => [containerB], provE => [containerB] }\n * visitedContainers === Set { containerB }\n *\n * visitor(provF, containerC)\n * providerToPath === Map { provD => [containerB], provE => [containerB], provF => [containerC] }\n * visitedContainers === Set { containerB, containerC }\n *\n * visitor(provG, containerC)\n * providerToPath === Map {\n * provD => [containerB], provE => [containerB], provF => [containerC], provG => [containerC]\n * }\n * visitedContainers === Set { containerB, containerC }\n *\n * visitor(provA, containerA)\n * providerToPath === Map {\n * provD => [containerA, containerB],\n * provE => [containerA, containerB],\n * provF => [containerA, containerC],\n * provG => [containerA, containerC],\n * provA => [containerA]\n * }\n * visitedContainers === Set { containerB, containerC, containerA }\n *\n * visitor(provB, containerA)\n * providerToPath === Map {\n * provD => [containerA, containerB],\n * provE => [containerA, containerB],\n * provF => [containerA, containerC],\n * provG => [containerA, containerC],\n * provA => [containerA]\n * provB => [containerA]\n * }\n * visitedContainers === Set { containerB, containerC, containerA }\n * ```\n *\n * @param providerToPath Map map of providers to paths that this function fills\n * @param visitedContainers Set a set to keep track of the containers we've already visited\n * @return function(provider SingleProvider, container: Type<unknown> | InjectorType<unknown>) =>\n * void\n */\nfunction walkProviderTreeToDiscoverImportPaths(\n providerToPath: Map<SingleProvider, (Type<unknown> | InjectorType<unknown>)[]>,\n visitedContainers: Set<Type<unknown>>,\n): (provider: SingleProvider, container: Type<unknown> | InjectorType<unknown>) => void {\n return (provider: SingleProvider, container: Type<unknown> | InjectorType<unknown>) => {\n // If the provider is not already in the providerToPath map,\n // add an entry with the provider as the key and an array containing the current container as\n // the value\n if (!providerToPath.has(provider)) {\n providerToPath.set(provider, [container]);\n }\n\n // This block will run exactly once for each container in the import tree.\n // This is where we run the logic to check the imports array of the current\n // container to see if it's the next container in the path for our currently\n // discovered providers.\n if (!visitedContainers.has(container)) {\n // Iterate through the providers we've already seen\n for (const prov of providerToPath.keys()) {\n const existingImportPath = providerToPath.get(prov)!;\n\n let containerDef = getInjectorDef(container);\n if (!containerDef) {\n const ngModule: Type<unknown> | undefined = (container as any).ngModule as\n | Type<unknown>\n | undefined;\n containerDef = getInjectorDef(ngModule);\n }\n\n if (!containerDef) {\n return;\n }\n\n const lastContainerAddedToPath = existingImportPath[0];\n\n let isNextStepInPath = false;\n deepForEach(containerDef.imports, (moduleImport) => {\n if (isNextStepInPath) {\n return;\n }\n\n isNextStepInPath =\n (moduleImport as any).ngModule === lastContainerAddedToPath ||\n moduleImport === lastContainerAddedToPath;\n\n if (isNextStepInPath) {\n providerToPath.get(prov)?.unshift(container);\n }\n });\n }\n }\n\n visitedContainers.add(container);\n };\n}\n\n/**\n * Gets the providers configured on an EnvironmentInjector\n *\n * @param injector EnvironmentInjector\n * @returns an array of objects representing the providers of the given injector\n */\nfunction getEnvironmentInjectorProviders(injector: EnvironmentInjector): ProviderRecord[] {\n const providerRecordsWithoutImportPaths =\n getFrameworkDIDebugData().resolverToProviders.get(injector) ?? [];\n\n // platform injector has no provider imports container so can we skip trying to\n // find import paths\n if (isPlatformInjector(injector)) {\n return providerRecordsWithoutImportPaths;\n }\n\n const providerImportsContainer = getProviderImportsContainer(injector);\n if (providerImportsContainer === null) {\n // We assume that if an environment injector exists without an associated provider imports\n // container, it was created without such a container. Some examples cases where this could\n // happen:\n // - The root injector of a standalone application\n // - A router injector created by using the providers array in a lazy loaded route\n // - A manually created injector that is attached to the injector tree\n // Since each of these cases has no provider container, there is no concept of import paths,\n // so we can simply return the provider records.\n return providerRecordsWithoutImportPaths;\n }\n\n const providerToPath = getProviderImportPaths(providerImportsContainer);\n const providerRecords = [];\n\n for (const providerRecord of providerRecordsWithoutImportPaths) {\n const provider = providerRecord.provider;\n // Ignore these special providers for now until we have a cleaner way of\n // determing when they are provided by the framework vs provided by the user.\n const token = (provider as ValueProvider).provide;\n if (token === ENVIRONMENT_INITIALIZER || token === INJECTOR_DEF_TYPES) {\n continue;\n }\n\n let importPath = providerToPath.get(provider) ?? [];\n\n const def = getComponentDef(providerImportsContainer);\n const isStandaloneComponent = !!def?.standalone;\n // We prepend the component constructor in the standalone case\n // because walkProviderTree does not visit this constructor during it's traversal\n if (isStandaloneComponent) {\n importPath = [providerImportsContainer, ...importPath];\n }\n\n providerRecords.push({...providerRecord, importPath});\n }\n return providerRecords;\n}\n\nfunction isPlatformInjector(injector: Injector) {\n return injector instanceof R3Injector && injector.scopes.has('platform');\n}\n\n/**\n * Gets the providers configured on an injector.\n *\n * @param injector the injector to lookup the providers of\n * @returns ProviderRecord[] an array of objects representing the providers of the given injector\n */\nexport function getInjectorProviders(injector: Injector): ProviderRecord[] {\n if (injector instanceof NodeInjector) {\n return getNodeInjectorProviders(injector);\n } else if (injector instanceof EnvironmentInjector) {\n return getEnvironmentInjectorProviders(injector as EnvironmentInjector);\n }\n\n throwError('getInjectorProviders only supports NodeInjector and EnvironmentInjector');\n}\n\n/**\n *\n * Given an injector, this function will return\n * an object containing the type and source of the injector.\n *\n * | | type | source |\n * |--------------|-------------|-------------------------------------------------------------|\n * | NodeInjector | element | DOM element that created this injector |\n * | R3Injector | environment | `injector.source` |\n * | NullInjector | null | null |\n *\n * @param injector the Injector to get metadata for\n * @returns an object containing the type and source of the given injector. If the injector metadata\n * cannot be determined, returns null.\n */\nexport function getInjectorMetadata(\n injector: Injector,\n):\n | {type: 'element'; source: RElement}\n | {type: 'environment'; source: string | null}\n | {type: 'null'; source: null}\n | null {\n if (injector instanceof NodeInjector) {\n const lView = getNodeInjectorLView(injector);\n const tNode = getNodeInjectorTNode(injector)!;\n assertTNodeForLView(tNode, lView);\n\n return {type: 'element', source: getNativeByTNode(tNode, lView) as RElement};\n }\n\n if (injector instanceof R3Injector) {\n return {type: 'environment', source: injector.source ?? null};\n }\n\n if (injector instanceof NullInjector) {\n return {type: 'null', source: null};\n }\n\n return null;\n}\n\nexport function getInjectorResolutionPath(injector: Injector): Injector[] {\n const resolutionPath: Injector[] = [injector];\n getInjectorResolutionPathHelper(injector, resolutionPath);\n return resolutionPath;\n}\n\nfunction getInjectorResolutionPathHelper(\n injector: Injector,\n resolutionPath: Injector[],\n): Injector[] {\n const parent = getInjectorParent(injector);\n\n // if getInjectorParent can't find a parent, then we've either reached the end\n // of the path, or we need to move from the Element Injector tree to the\n // module injector tree using the first injector in our path as the connection point.\n if (parent === null) {\n if (injector instanceof NodeInjector) {\n const firstInjector = resolutionPath[0];\n if (firstInjector instanceof NodeInjector) {\n const moduleInjector = getModuleInjectorOfNodeInjector(firstInjector);\n if (moduleInjector === null) {\n throwError('NodeInjector must have some connection to the module injector tree');\n }\n\n resolutionPath.push(moduleInjector);\n getInjectorResolutionPathHelper(moduleInjector, resolutionPath);\n }\n\n return resolutionPath;\n }\n } else {\n resolutionPath.push(parent);\n getInjectorResolutionPathHelper(parent, resolutionPath);\n }\n\n return resolutionPath;\n}\n\n/**\n * Gets the parent of an injector.\n *\n * This function is not able to make the jump from the Element Injector Tree to the Module\n * injector tree. This is because the \"parent\" (the next step in the reoslution path)\n * of a root NodeInjector is dependent on which NodeInjector ancestor initiated\n * the DI lookup. See getInjectorResolutionPath for a function that can make this jump.\n *\n * In the below diagram:\n * ```ts\n * getInjectorParent(NodeInjectorB)\n * > NodeInjectorA\n * getInjectorParent(NodeInjectorA) // or getInjectorParent(getInjectorParent(NodeInjectorB))\n * > null // cannot jump to ModuleInjector tree\n * ```\n *\n * ```\n * ┌───────┐ ┌───────────────────┐\n * ┌───────────┤ModuleA├───Injector────►│EnvironmentInjector│\n * │ └───┬───┘ └───────────────────┘\n * │ │\n * │ bootstraps\n * │ │\n * │ │\n * │ ┌────▼─────┐ ┌─────────────┐\n * declares │ComponentA├────Injector────►│NodeInjectorA│\n * │ └────┬─────┘ └─────▲───────┘\n * │ │ │\n * │ renders parent\n * │ │ │\n * │ ┌────▼─────┐ ┌─────┴───────┐\n * └─────────►│ComponentB├────Injector────►│NodeInjectorB│\n * └──────────┘ └─────────────┘\n *```\n *\n * @param injector an Injector to get the parent of\n * @returns Injector the parent of the given injector\n */\nfunction getInjectorParent(injector: Injector): Injector | null {\n if (injector instanceof R3Injector) {\n return injector.parent;\n }\n\n let tNode: TElementNode | TContainerNode | TElementContainerNode | null;\n let lView: LView<unknown>;\n if (injector instanceof NodeInjector) {\n tNode = getNodeInjectorTNode(injector);\n lView = getNodeInjectorLView(injector);\n } else if (injector instanceof NullInjector) {\n return null;\n } else if (injector instanceof ChainedInjector) {\n return injector.parentInjector;\n } else {\n throwError(\n 'getInjectorParent only support injectors of type R3Injector, NodeInjector, NullInjector',\n );\n }\n\n const parentLocation = getParentInjectorLocation(\n tNode as TElementNode | TContainerNode | TElementContainerNode,\n lView,\n );\n\n if (hasParentInjector(parentLocation)) {\n const parentInjectorIndex = getParentInjectorIndex(parentLocation);\n const parentLView = getParentInjectorView(parentLocation, lView);\n const parentTView = parentLView[TVIEW];\n const parentTNode = parentTView.data[parentInjectorIndex + NodeInjectorOffset.TNODE] as TNode;\n return new NodeInjector(\n parentTNode as TElementNode | TContainerNode | TElementContainerNode,\n parentLView,\n );\n } else {\n const chainedInjector = lView[INJECTOR] as ChainedInjector;\n\n // Case where chainedInjector.injector is an OutletInjector and chainedInjector.injector.parent\n // is a NodeInjector.\n // todo(aleksanderbodurri): ideally nothing in packages/core should deal\n // directly with router concerns. Refactor this so that we can make the jump from\n // NodeInjector -> OutletInjector -> NodeInjector\n // without explicitly relying on types contracts from packages/router\n const injectorParent = (chainedInjector.injector as any)?.parent as Injector;\n\n if (injectorParent instanceof NodeInjector) {\n return injectorParent;\n }\n }\n\n return null;\n}\n\n/**\n * Gets the module injector of a NodeInjector.\n *\n * @param injector NodeInjector to get module injector of\n * @returns Injector representing module injector of the given NodeInjector\n */\nfunction getModuleInjectorOfNodeInjector(injector: NodeInjector): Injector {\n let lView: LView<unknown>;\n if (injector instanceof NodeInjector) {\n lView = getNodeInjectorLView(injector);\n } else {\n throwError('getModuleInjectorOfNodeInjector must be called with a NodeInjector');\n }\n\n const inj = lView[INJECTOR] as R3Injector | ChainedInjector;\n const moduleInjector = inj instanceof ChainedInjector ? inj.parentInjector : inj.parent;\n if (!moduleInjector) {\n throwError('NodeInjector must have some connection to the module injector tree');\n }\n\n return moduleInjector;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport {\n REACTIVE_LVIEW_CONSUMER_NODE,\n ReactiveLViewConsumer,\n TEMPORARY_CONSUMER_NODE,\n} from '../reactive_lview_consumer';\nimport {assertTNode, assertLView} from '../assert';\nimport {getFrameworkDIDebugData} from '../debug/framework_injector_profiler';\nimport {NodeInjector, getNodeInjectorTNode, getNodeInjectorLView} from '../di';\nimport {REACTIVE_TEMPLATE_CONSUMER, HOST, LView} from '../interfaces/view';\nimport {EffectNode, EffectRefImpl, ROOT_EFFECT_NODE, VIEW_EFFECT_NODE} from '../reactivity/effect';\nimport {Injector} from '../../di/injector';\nimport {R3Injector} from '../../di/r3_injector';\nimport {throwError} from '../../util/assert';\nimport {\n ComputedNode,\n ReactiveNode,\n SIGNAL,\n SIGNAL_NODE,\n SignalNode,\n} from '../../../primitives/signals';\n\nexport interface DebugSignalGraphNode {\n kind: string;\n label?: string;\n value?: unknown;\n}\n\nexport interface DebugSignalGraphEdge {\n /**\n * Index of a signal node in the `nodes` array that is a consumer of the signal produced by the producer node.\n */\n consumer: number;\n\n /**\n * Index of a signal node in the `nodes` array that is a producer of the signal consumed by the consumer node.\n */\n producer: number;\n}\n\n/**\n * A debug representation of the signal graph.\n */\nexport interface DebugSignalGraph {\n nodes: DebugSignalGraphNode[];\n edges: DebugSignalGraphEdge[];\n}\n\nfunction isComputedNode(node: ReactiveNode): node is ComputedNode<unknown> {\n return node.kind === 'computed';\n}\n\nfunction isTemplateEffectNode(node: ReactiveNode): node is ReactiveLViewConsumer {\n return node.kind === 'template';\n}\n\nfunction isEffectNode(node: ReactiveNode): node is EffectNode {\n return node.kind === 'effect';\n}\n\nfunction isSignalNode(node: ReactiveNode): node is SignalNode<unknown> {\n return node.kind === 'signal';\n}\n\n/**\n *\n * @param injector\n * @returns Template consumer of given NodeInjector\n */\nfunction getTemplateConsumer(injector: NodeInjector): ReactiveLViewConsumer | null {\n const tNode = getNodeInjectorTNode(injector)!;\n assertTNode(tNode);\n const lView = getNodeInjectorLView(injector)!;\n assertLView(lView);\n const templateLView = lView[tNode.index]!;\n assertLView(templateLView);\n\n return templateLView[REACTIVE_TEMPLATE_CONSUMER];\n}\n\nfunction getNodesAndEdgesFromSignalMap(signalMap: ReadonlyMap<ReactiveNode, ReactiveNode[]>): {\n nodes: DebugSignalGraphNode[];\n edges: DebugSignalGraphEdge[];\n} {\n const nodes = Array.from(signalMap.keys());\n const debugSignalGraphNodes: DebugSignalGraphNode[] = [];\n const edges: DebugSignalGraphEdge[] = [];\n\n for (const [consumer, producers] of signalMap.entries()) {\n const consumerIndex = nodes.indexOf(consumer);\n\n // collect node\n if (isComputedNode(consumer) || isSignalNode(consumer)) {\n debugSignalGraphNodes.push({\n label: consumer.debugName,\n value: consumer.value,\n kind: consumer.kind,\n });\n } else if (isTemplateEffectNode(consumer)) {\n debugSignalGraphNodes.push({\n label: consumer.debugName ?? consumer.lView?.[HOST]?.tagName?.toLowerCase?.(),\n kind: consumer.kind,\n });\n } else if (isEffectNode(consumer)) {\n debugSignalGraphNodes.push({\n label: consumer.debugName,\n kind: consumer.kind,\n });\n } else {\n debugSignalGraphNodes.push({\n label: consumer.debugName,\n kind: consumer.kind,\n });\n }\n\n // collect edges for node\n for (const producer of producers) {\n edges.push({consumer: consumerIndex, producer: nodes.indexOf(producer)});\n }\n }\n\n return {nodes: debugSignalGraphNodes, edges};\n}\n\nfunction extractEffectsFromInjector(injector: Injector): ReactiveNode[] {\n let diResolver: Injector | LView<unknown> = injector;\n if (injector instanceof NodeInjector) {\n const lView = getNodeInjectorLView(injector)!;\n diResolver = lView;\n }\n\n const resolverToEffects = getFrameworkDIDebugData().resolverToEffects as Map<\n Injector | LView<unknown>,\n EffectRefImpl[]\n >;\n const effects = resolverToEffects.get(diResolver) ?? [];\n\n return effects.map((effect: EffectRefImpl) => effect[SIGNAL]);\n}\n\nfunction extractSignalNodesAndEdgesFromRoots(\n nodes: ReactiveNode[],\n signalDependenciesMap: Map<ReactiveNode, ReactiveNode[]> = new Map(),\n): Map<ReactiveNode, ReactiveNode[]> {\n for (const node of nodes) {\n if (signalDependenciesMap.has(node)) {\n continue;\n }\n\n const producerNodes = (node.producerNode ?? []) as ReactiveNode[];\n signalDependenciesMap.set(node, producerNodes);\n extractSignalNodesAndEdgesFromRoots(producerNodes, signalDependenciesMap);\n }\n\n return signalDependenciesMap;\n}\n\n/**\n * Returns a debug representation of the signal graph for the given injector.\n *\n * Currently only supports element injectors. Starts by discovering the consumer nodes\n * and then traverses their producer nodes to build the signal graph.\n *\n * @param injector The injector to get the signal graph for.\n * @returns A debug representation of the signal graph.\n * @throws If the injector is an environment injector.\n */\nexport function getSignalGraph(injector: Injector): DebugSignalGraph {\n let templateConsumer: ReactiveLViewConsumer | null = null;\n\n if (!(injector instanceof NodeInjector) && !(injector instanceof R3Injector)) {\n return throwError('getSignalGraph must be called with a NodeInjector or R3Injector');\n }\n\n if (injector instanceof NodeInjector) {\n templateConsumer = getTemplateConsumer(injector as NodeInjector);\n }\n\n const nonTemplateEffectNodes = extractEffectsFromInjector(injector);\n\n const signalNodes = templateConsumer\n ? [templateConsumer, ...nonTemplateEffectNodes]\n : nonTemplateEffectNodes;\n\n const signalDependenciesMap = extractSignalNodesAndEdgesFromRoots(signalNodes);\n\n return getNodesAndEdgesFromSignalMap(signalDependenciesMap);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/// <reference path=\"../../../../goog.d.ts\" />\n\nimport {assertDefined} from '../../util/assert';\nimport {global} from '../../util/global';\nimport {setupFrameworkInjectorProfiler} from '../debug/framework_injector_profiler';\nimport {setProfiler} from '../profiler';\nimport {isSignal} from '../reactivity/api';\n\nimport {applyChanges} from './change_detection_utils';\nimport {getDeferBlocks} from './defer';\nimport {\n getComponent,\n getContext,\n getDirectiveMetadata,\n getDirectives,\n getHostElement,\n getInjector,\n getListeners,\n getOwningComponent,\n getRootComponents,\n} from './discovery_utils';\nimport {\n getDependenciesFromInjectable,\n getInjectorMetadata,\n getInjectorProviders,\n getInjectorResolutionPath,\n} from './injector_discovery_utils';\nimport {getSignalGraph} from './signal_debug';\n\n/**\n * This file introduces series of globally accessible debug tools\n * to allow for the Angular debugging story to function.\n *\n * To see this in action run the following command:\n *\n * bazel run //packages/core/test/bundling/todo:devserver\n *\n * Then load `localhost:5432` and start using the console tools.\n */\n\n/**\n * This value reflects the property on the window where the dev\n * tools are patched (window.ng).\n * */\nexport const GLOBAL_PUBLISH_EXPANDO_KEY = 'ng';\n\n// Typing for externally published global util functions\n// Ideally we should be able to use `NgGlobalPublishUtils` using declaration merging but that doesn't work with API extractor yet.\n// Have included the typings to have type safety when working with editors that support it (VSCode).\ninterface NgGlobalPublishUtils {\n ɵgetLoadedRoutes(route: any): any;\n}\n\nconst globalUtilsFunctions = {\n /**\n * Warning: functions that start with `ɵ` are considered *INTERNAL* and should not be relied upon\n * in application's code. The contract of those functions might be changed in any release and/or a\n * function can be removed completely.\n */\n 'ɵgetDependenciesFromInjectable': getDependenciesFromInjectable,\n 'ɵgetInjectorProviders': getInjectorProviders,\n 'ɵgetInjectorResolutionPath': getInjectorResolutionPath,\n 'ɵgetInjectorMetadata': getInjectorMetadata,\n 'ɵsetProfiler': setProfiler,\n 'ɵgetSignalGraph': getSignalGraph,\n 'ɵgetDeferBlocks': getDeferBlocks,\n\n 'getDirectiveMetadata': getDirectiveMetadata,\n 'getComponent': getComponent,\n 'getContext': getContext,\n 'getListeners': getListeners,\n 'getOwningComponent': getOwningComponent,\n 'getHostElement': getHostElement,\n 'getInjector': getInjector,\n 'getRootComponents': getRootComponents,\n 'getDirectives': getDirectives,\n 'applyChanges': applyChanges,\n 'isSignal': isSignal,\n};\ntype CoreGlobalUtilsFunctions = keyof typeof globalUtilsFunctions;\ntype ExternalGlobalUtilsFunctions = keyof NgGlobalPublishUtils;\n\nlet _published = false;\n/**\n * Publishes a collection of default debug tools onto`window.ng`.\n *\n * These functions are available globally when Angular is in development\n * mode and are automatically stripped away from prod mode is on.\n */\nexport function publishDefaultGlobalUtils() {\n if (!_published) {\n _published = true;\n\n if (typeof window !== 'undefined') {\n // Only configure the injector profiler when running in the browser.\n setupFrameworkInjectorProfiler();\n }\n\n for (const [methodName, method] of Object.entries(globalUtilsFunctions)) {\n publishGlobalUtil(methodName as CoreGlobalUtilsFunctions, method);\n }\n }\n}\n\n/**\n * Default debug tools available under `window.ng`.\n */\nexport type GlobalDevModeUtils = {\n [GLOBAL_PUBLISH_EXPANDO_KEY]: typeof globalUtilsFunctions;\n};\n\n/**\n * Publishes the given function to `window.ng` so that it can be\n * used from the browser console when an application is not in production.\n */\nexport function publishGlobalUtil<K extends CoreGlobalUtilsFunctions>(\n name: K,\n fn: (typeof globalUtilsFunctions)[K],\n): void {\n publishUtil(name, fn);\n}\n\n/**\n * Publishes the given function to `window.ng` from package other than @angular/core\n * So that it can be used from the browser console when an application is not in production.\n */\nexport function publishExternalGlobalUtil<K extends ExternalGlobalUtilsFunctions>(\n name: K,\n fn: NgGlobalPublishUtils[K],\n): void {\n publishUtil(name, fn);\n}\n\nfunction publishUtil(name: string, fn: Function) {\n if (typeof COMPILED === 'undefined' || !COMPILED) {\n // Note: we can't export `ng` when using closure enhanced optimization as:\n // - closure declares globals itself for minified names, which sometimes clobber our `ng` global\n // - we can't declare a closure extern as the namespace `ng` is already used within Google\n // for typings for AngularJS (via `goog.provide('ng....')`).\n const w = global;\n ngDevMode && assertDefined(fn, 'function not defined');\n\n w[GLOBAL_PUBLISH_EXPANDO_KEY] ??= {} as any;\n w[GLOBAL_PUBLISH_EXPANDO_KEY][name] = fn;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {inject, Inject, Injectable, InjectionToken} from '../di';\nimport {isInInjectionContext} from '../di/contextual';\nimport {DestroyRef} from '../linker/destroy_ref';\nimport {NgZone} from '../zone/ng_zone';\n\n/**\n * Testability API.\n * `declare` keyword causes tsickle to generate externs, so these methods are\n * not renamed by Closure Compiler.\n * @publicApi\n */\nexport declare interface PublicTestability {\n isStable(): boolean;\n whenStable(callback: Function, timeout?: number, updateCallback?: Function): void;\n findProviders(using: any, provider: string, exactMatch: boolean): any[];\n}\n\n// Angular internal, not intended for public API.\nexport interface PendingMacrotask {\n source: string;\n creationLocation: Error;\n runCount?: number;\n data?: TaskData;\n}\n\nexport interface TaskData {\n target?: XMLHttpRequest;\n delay?: number;\n isPeriodic?: boolean;\n}\n\ninterface WaitCallback {\n // Needs to be 'any' - setTimeout returns a number according to ES6, but\n // on NodeJS it returns a Timer.\n timeoutId: any;\n doneCb: Function;\n updateCb?: Function;\n}\n\n/**\n * Internal injection token that can used to access an instance of a Testability class.\n *\n * This token acts as a bridge between the core bootstrap code and the `Testability` class. This is\n * needed to ensure that there are no direct references to the `Testability` class, so it can be\n * tree-shaken away (if not referenced). For the environments/setups when the `Testability` class\n * should be available, this token is used to add a provider that references the `Testability`\n * class. Otherwise, only this token is retained in a bundle, but the `Testability` class is not.\n */\nexport const TESTABILITY = new InjectionToken<Testability>('');\n\n/**\n * Internal injection token to retrieve Testability getter class instance.\n */\nexport const TESTABILITY_GETTER = new InjectionToken<GetTestability>('');\n\n/**\n * The Testability service provides testing hooks that can be accessed from\n * the browser.\n *\n * Angular applications bootstrapped using an NgModule (via `@NgModule.bootstrap` field) will also\n * instantiate Testability by default (in both development and production modes).\n *\n * For applications bootstrapped using the `bootstrapApplication` function, Testability is not\n * included by default. You can include it into your applications by getting the list of necessary\n * providers using the `provideProtractorTestingSupport()` function and adding them into the\n * `options.providers` array. Example:\n *\n * ```ts\n * import {provideProtractorTestingSupport} from '@angular/platform-browser';\n *\n * await bootstrapApplication(RootComponent, providers: [provideProtractorTestingSupport()]);\n * ```\n *\n * @publicApi\n */\n@Injectable()\nexport class Testability implements PublicTestability {\n private _isZoneStable: boolean = true;\n private _callbacks: WaitCallback[] = [];\n\n private _taskTrackingZone: {macroTasks: Task[]} | null = null;\n\n private _destroyRef?: DestroyRef;\n\n constructor(\n private _ngZone: NgZone,\n private registry: TestabilityRegistry,\n @Inject(TESTABILITY_GETTER) testabilityGetter: GetTestability,\n ) {\n // Attempt to retrieve a `DestroyRef` optionally.\n // For backwards compatibility reasons, this cannot be required.\n if (isInInjectionContext()) {\n this._destroyRef = inject(DestroyRef, {optional: true}) ?? undefined;\n }\n\n // If there was no Testability logic registered in the global scope\n // before, register the current testability getter as a global one.\n if (!_testabilityGetter) {\n setTestabilityGetter(testabilityGetter);\n testabilityGetter.addToWindow(registry);\n }\n this._watchAngularEvents();\n _ngZone.run(() => {\n this._taskTrackingZone =\n typeof Zone == 'undefined' ? null : Zone.current.get('TaskTrackingZone');\n });\n }\n\n private _watchAngularEvents(): void {\n const onUnstableSubscription = this._ngZone.onUnstable.subscribe({\n next: () => {\n this._isZoneStable = false;\n },\n });\n\n const onStableSubscription = this._ngZone.runOutsideAngular(() =>\n this._ngZone.onStable.subscribe({\n next: () => {\n NgZone.assertNotInAngularZone();\n queueMicrotask(() => {\n this._isZoneStable = true;\n this._runCallbacksIfReady();\n });\n },\n }),\n );\n\n this._destroyRef?.onDestroy(() => {\n onUnstableSubscription.unsubscribe();\n onStableSubscription.unsubscribe();\n });\n }\n\n /**\n * Whether an associated application is stable\n */\n isStable(): boolean {\n return this._isZoneStable && !this._ngZone.hasPendingMacrotasks;\n }\n\n private _runCallbacksIfReady(): void {\n if (this.isStable()) {\n // Schedules the call backs in a new frame so that it is always async.\n queueMicrotask(() => {\n while (this._callbacks.length !== 0) {\n let cb = this._callbacks.pop()!;\n clearTimeout(cb.timeoutId);\n cb.doneCb();\n }\n });\n } else {\n // Still not stable, send updates.\n let pending = this.getPendingTasks();\n this._callbacks = this._callbacks.filter((cb) => {\n if (cb.updateCb && cb.updateCb(pending)) {\n clearTimeout(cb.timeoutId);\n return false;\n }\n\n return true;\n });\n }\n }\n\n private getPendingTasks(): PendingMacrotask[] {\n if (!this._taskTrackingZone) {\n return [];\n }\n\n // Copy the tasks data so that we don't leak tasks.\n return this._taskTrackingZone.macroTasks.map((t: Task) => {\n return {\n source: t.source,\n // From TaskTrackingZone:\n // https://github.com/angular/zone.js/blob/master/lib/zone-spec/task-tracking.ts#L40\n creationLocation: (t as any).creationLocation as Error,\n data: t.data,\n };\n });\n }\n\n private addCallback(cb: Function, timeout?: number, updateCb?: Function) {\n let timeoutId: any = -1;\n if (timeout && timeout > 0) {\n timeoutId = setTimeout(() => {\n this._callbacks = this._callbacks.filter((cb) => cb.timeoutId !== timeoutId);\n cb();\n }, timeout);\n }\n this._callbacks.push(<WaitCallback>{doneCb: cb, timeoutId: timeoutId, updateCb: updateCb});\n }\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 whenStable(doneCb: Function, timeout?: number, updateCb?: Function): void {\n if (updateCb && !this._taskTrackingZone) {\n throw new Error(\n 'Task tracking zone is required when passing an update callback to ' +\n 'whenStable(). Is \"zone.js/plugins/task-tracking\" loaded?',\n );\n }\n this.addCallback(doneCb, timeout, updateCb);\n this._runCallbacksIfReady();\n }\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 *\n * @internal\n */\n registerApplication(token: any) {\n this.registry.registerApplication(token, this);\n }\n\n /**\n * Unregisters an application.\n * @param token token of application, root element\n *\n * @internal\n */\n unregisterApplication(token: any) {\n this.registry.unregisterApplication(token);\n }\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 findProviders(using: any, provider: string, exactMatch: boolean): any[] {\n // TODO(juliemr): implement.\n return [];\n }\n}\n\n/**\n * A global registry of {@link Testability} instances for specific elements.\n * @publicApi\n */\n@Injectable({providedIn: 'platform'})\nexport class TestabilityRegistry {\n /** @internal */\n _applications = new Map<any, Testability>();\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 registerApplication(token: any, testability: Testability) {\n this._applications.set(token, testability);\n }\n\n /**\n * Unregisters an application.\n * @param token token of application, root element\n */\n unregisterApplication(token: any) {\n this._applications.delete(token);\n }\n\n /**\n * Unregisters all applications\n */\n unregisterAllApplications() {\n this._applications.clear();\n }\n\n /**\n * Get a testability hook associated with the application\n * @param elem root element\n */\n getTestability(elem: any): Testability | null {\n return this._applications.get(elem) || null;\n }\n\n /**\n * Get all registered testabilities\n */\n getAllTestabilities(): Testability[] {\n return Array.from(this._applications.values());\n }\n\n /**\n * Get all registered applications(root elements)\n */\n getAllRootElements(): any[] {\n return Array.from(this._applications.keys());\n }\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 findTestabilityInTree(elem: Node, findInAncestors: boolean = true): Testability | null {\n return _testabilityGetter?.findTestabilityInTree(this, elem, findInAncestors) ?? null;\n }\n}\n\n/**\n * Adapter interface for retrieving the `Testability` service associated for a\n * particular context.\n *\n * @publicApi\n */\nexport interface GetTestability {\n addToWindow(registry: TestabilityRegistry): void;\n findTestabilityInTree(\n registry: TestabilityRegistry,\n elem: any,\n findInAncestors: boolean,\n ): Testability | null;\n}\n\n/**\n * Set the {@link GetTestability} implementation used by the Angular testing framework.\n * @publicApi\n */\nexport function setTestabilityGetter(getter: GetTestability): void {\n _testabilityGetter = getter;\n}\n\nlet _testabilityGetter: GetTestability | undefined;\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ɵɵdefineInjectable} from '../../di/interface/defs';\n\n/**\n * Abstraction that encompasses any kind of effect that can be scheduled.\n */\nexport interface SchedulableEffect {\n run(): void;\n zone: {\n run<T>(fn: () => T): T;\n } | null;\n}\n\n/**\n * A scheduler which manages the execution of effects.\n */\nexport abstract class EffectScheduler {\n /**\n * Schedule the given effect to be executed at a later time.\n *\n * It is an error to attempt to execute any effects synchronously during a scheduling operation.\n */\n abstract schedule(e: SchedulableEffect): void;\n\n /**\n * Run any scheduled effects.\n */\n abstract flush(): void;\n\n /** Remove a scheduled effect */\n abstract remove(e: SchedulableEffect): void;\n\n /** @nocollapse */\n static ɵprov = /** @pureOrBreakMyCode */ /* @__PURE__ */ ɵɵdefineInjectable({\n token: EffectScheduler,\n providedIn: 'root',\n factory: () => new ZoneAwareEffectScheduler(),\n });\n}\n\n/**\n * A wrapper around `ZoneAwareQueueingScheduler` that schedules flushing via the microtask queue\n * when.\n */\nexport class ZoneAwareEffectScheduler implements EffectScheduler {\n private queuedEffectCount = 0;\n private queues = new Map<Zone | null, Set<SchedulableEffect>>();\n\n schedule(handle: SchedulableEffect): void {\n this.enqueue(handle);\n }\n\n remove(handle: SchedulableEffect): void {\n const zone = handle.zone as Zone | null;\n const queue = this.queues.get(zone)!;\n if (!queue.has(handle)) {\n return;\n }\n\n queue.delete(handle);\n this.queuedEffectCount--;\n }\n\n private enqueue(handle: SchedulableEffect): void {\n const zone = handle.zone as Zone | null;\n if (!this.queues.has(zone)) {\n this.queues.set(zone, new Set());\n }\n\n const queue = this.queues.get(zone)!;\n if (queue.has(handle)) {\n return;\n }\n this.queuedEffectCount++;\n queue.add(handle);\n }\n\n /**\n * Run all scheduled effects.\n *\n * Execution order of effects within the same zone is guaranteed to be FIFO, but there is no\n * ordering guarantee between effects scheduled in different zones.\n */\n flush(): void {\n while (this.queuedEffectCount > 0) {\n for (const [zone, queue] of this.queues) {\n // `zone` here must be defined.\n if (zone === null) {\n this.flushQueue(queue);\n } else {\n zone.run(() => this.flushQueue(queue));\n }\n }\n }\n }\n\n private flushQueue(queue: Set<SchedulableEffect>): void {\n for (const handle of queue) {\n queue.delete(handle);\n this.queuedEffectCount--;\n\n // TODO: what happens if this throws an error?\n handle.run();\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Subscribable} from 'rxjs';\n\n/**\n * Determine if the argument is shaped like a Promise\n */\nexport function isPromise<T = any>(obj: any): obj is Promise<T> {\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/**\n * Determine if the argument is a Subscribable\n */\nexport function isSubscribable<T>(obj: any | Subscribable<T>): obj is Subscribable<T> {\n return !!obj && typeof obj.subscribe === 'function';\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Observable} from 'rxjs';\n\nimport {\n EnvironmentProviders,\n inject,\n Injectable,\n InjectionToken,\n Injector,\n makeEnvironmentProviders,\n runInInjectionContext,\n} from '../di';\nimport {RuntimeError, RuntimeErrorCode} from '../errors';\nimport {isPromise, isSubscribable} from '../util/lang';\n\n/**\n * A DI token that you can use to provide\n * one or more initialization functions.\n *\n * The provided functions are injected at application startup and executed during\n * app initialization. If any of these functions returns a Promise or an Observable, initialization\n * does not complete until the Promise is resolved or the Observable is completed.\n *\n * You can, for example, create a factory function that loads language data\n * or an external configuration, and provide that function to the `APP_INITIALIZER` token.\n * The function is executed during the application bootstrap process,\n * and the needed data is available on startup.\n *\n * Note that the provided initializer is run in the injection context.\n *\n * @deprecated from v19.0.0, use provideAppInitializer instead\n *\n * @see {@link ApplicationInitStatus}\n * @see {@link provideAppInitializer}\n *\n * @usageNotes\n *\n * The following example illustrates how to configure a multi-provider using `APP_INITIALIZER` token\n * and a function returning a promise.\n * ### Example with NgModule-based application\n * ```ts\n * function initializeApp(): Promise<any> {\n * const http = inject(HttpClient);\n * return firstValueFrom(\n * http\n * .get(\"https://someUrl.com/api/user\")\n * .pipe(tap(user => { ... }))\n * );\n * }\n *\n * @NgModule({\n * imports: [BrowserModule],\n * declarations: [AppComponent],\n * bootstrap: [AppComponent],\n * providers: [{\n * provide: APP_INITIALIZER,\n * useValue: initializeApp,\n * multi: true,\n * }]\n * })\n * export class AppModule {}\n * ```\n *\n * ### Example with standalone application\n * ```ts\n * function initializeApp() {\n * const http = inject(HttpClient);\n * return firstValueFrom(\n * http\n * .get(\"https://someUrl.com/api/user\")\n * .pipe(tap(user => { ... }))\n * );\n * }\n *\n * bootstrapApplication(App, {\n * providers: [\n * provideHttpClient(),\n * {\n * provide: APP_INITIALIZER,\n * useValue: initializeApp,\n * multi: true,\n * },\n * ],\n * });\n\n * ```\n *\n *\n * It's also possible to configure a multi-provider using `APP_INITIALIZER` token and a function\n * returning an observable, see an example below. Note: the `HttpClient` in this example is used for\n * demo purposes to illustrate how the factory function can work with other providers available\n * through DI.\n *\n * ### Example with NgModule-based application\n * ```ts\n * function initializeApp() {\n * const http = inject(HttpClient);\n * return firstValueFrom(\n * http\n * .get(\"https://someUrl.com/api/user\")\n * .pipe(tap(user => { ... }))\n * );\n * }\n *\n * @NgModule({\n * imports: [BrowserModule, HttpClientModule],\n * declarations: [AppComponent],\n * bootstrap: [AppComponent],\n * providers: [{\n * provide: APP_INITIALIZER,\n * useValue: initializeApp,\n * multi: true,\n * }]\n * })\n * export class AppModule {}\n * ```\n *\n * ### Example with standalone application\n * ```ts\n * function initializeApp() {\n * const http = inject(HttpClient);\n * return firstValueFrom(\n * http\n * .get(\"https://someUrl.com/api/user\")\n * .pipe(tap(user => { ... }))\n * );\n * }\n *\n * bootstrapApplication(App, {\n * providers: [\n * provideHttpClient(),\n * {\n * provide: APP_INITIALIZER,\n * useValue: initializeApp,\n * multi: true,\n * },\n * ],\n * });\n * ```\n *\n * @publicApi\n */\nexport const APP_INITIALIZER = new InjectionToken<\n ReadonlyArray<() => Observable<unknown> | Promise<unknown> | void>\n>(ngDevMode ? 'Application Initializer' : '');\n\n/**\n * @description\n * The provided function is injected at application startup and executed during\n * app initialization. If the function returns a Promise or an Observable, initialization\n * does not complete until the Promise is resolved or the Observable is completed.\n *\n * You can, for example, create a function that loads language data\n * or an external configuration, and provide that function using `provideAppInitializer()`.\n * The function is executed during the application bootstrap process,\n * and the needed data is available on startup.\n *\n * Note that the provided initializer is run in the injection context.\n *\n * Previously, this was achieved using the `APP_INITIALIZER` token which is now deprecated.\n *\n * @see {@link APP_INITIALIZER}\n *\n * @usageNotes\n * The following example illustrates how to configure an initialization function using\n * `provideAppInitializer()`\n * ```ts\n * bootstrapApplication(App, {\n * providers: [\n * provideAppInitializer(() => {\n * const http = inject(HttpClient);\n * return firstValueFrom(\n * http\n * .get(\"https://someUrl.com/api/user\")\n * .pipe(tap(user => { ... }))\n * );\n * }),\n * provideHttpClient(),\n * ],\n * });\n * ```\n *\n * @publicApi\n */\nexport function provideAppInitializer(\n initializerFn: () => Observable<unknown> | Promise<unknown> | void,\n): EnvironmentProviders {\n return makeEnvironmentProviders([\n {\n provide: APP_INITIALIZER,\n multi: true,\n useValue: initializerFn,\n },\n ]);\n}\n\n/**\n * A class that reflects the state of running {@link APP_INITIALIZER} functions.\n *\n * @publicApi\n */\n@Injectable({providedIn: 'root'})\nexport class ApplicationInitStatus {\n // Using non null assertion, these fields are defined below\n // within the `new Promise` callback (synchronously).\n private resolve!: (...args: any[]) => void;\n private reject!: (...args: any[]) => void;\n\n private initialized = false;\n public readonly done = false;\n public readonly donePromise: Promise<any> = new Promise((res, rej) => {\n this.resolve = res;\n this.reject = rej;\n });\n\n private readonly appInits = inject(APP_INITIALIZER, {optional: true}) ?? [];\n private readonly injector = inject(Injector);\n\n constructor() {\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && !Array.isArray(this.appInits)) {\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_MULTI_PROVIDER,\n 'Unexpected type of the `APP_INITIALIZER` token value ' +\n `(expected an array, but got ${typeof this.appInits}). ` +\n 'Please check that the `APP_INITIALIZER` token is configured as a ' +\n '`multi: true` provider.',\n );\n }\n }\n\n /** @internal */\n runInitializers() {\n if (this.initialized) {\n return;\n }\n\n const asyncInitPromises = [];\n for (const appInits of this.appInits) {\n const initResult = runInInjectionContext(this.injector, appInits);\n if (isPromise(initResult)) {\n asyncInitPromises.push(initResult);\n } else if (isSubscribable(initResult)) {\n const observableAsPromise = new Promise<void>((resolve, reject) => {\n initResult.subscribe({complete: resolve, error: reject});\n });\n asyncInitPromises.push(observableAsPromise);\n }\n }\n\n const complete = () => {\n // @ts-expect-error overwriting a readonly\n this.done = true;\n this.resolve();\n };\n\n Promise.all(asyncInitPromises)\n .then(() => {\n complete();\n })\n .catch((e) => {\n this.reject(e);\n });\n\n if (asyncInitPromises.length === 0) {\n complete();\n }\n this.initialized = true;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport '../util/ng_hmr_mode';\nimport '../util/ng_jit_mode';\nimport '../util/ng_server_mode';\n\nimport {setActiveConsumer, setThrowInvalidWriteToSignalError} from '../../primitives/signals';\nimport {Observable, Subject, Subscription} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {ZONELESS_ENABLED} from '../change_detection/scheduling/zoneless_scheduling';\nimport {Console} from '../console';\nimport {inject} from '../di';\nimport {Injectable} from '../di/injectable';\nimport {InjectionToken} from '../di/injection_token';\nimport {Injector} from '../di/injector';\nimport {EnvironmentInjector, type R3Injector} from '../di/r3_injector';\nimport {ErrorHandler, INTERNAL_APPLICATION_ERROR_HANDLER} from '../error_handler';\nimport {formatRuntimeError, RuntimeError, RuntimeErrorCode} from '../errors';\nimport {Type} from '../interface/type';\nimport {ComponentFactory, ComponentRef} from '../linker/component_factory';\nimport {ComponentFactoryResolver} from '../linker/component_factory_resolver';\nimport {NgModuleRef} from '../linker/ng_module_factory';\nimport {ViewRef} from '../linker/view_ref';\nimport {PendingTasksInternal} from '../pending_tasks';\nimport {RendererFactory2} from '../render/api';\nimport {AfterRenderManager} from '../render3/after_render/manager';\nimport {ComponentFactory as R3ComponentFactory} from '../render3/component_ref';\nimport {isStandalone} from '../render3/def_getters';\nimport {ChangeDetectionMode, detectChangesInternal} from '../render3/instructions/change_detection';\nimport {LView} from '../render3/interfaces/view';\nimport {publishDefaultGlobalUtils as _publishDefaultGlobalUtils} from '../render3/util/global_utils';\nimport {requiresRefreshOrTraversal} from '../render3/util/view_utils';\nimport {ViewRef as InternalViewRef} from '../render3/view_ref';\nimport {TESTABILITY} from '../testability/testability';\nimport {NgZone} from '../zone/ng_zone';\n\nimport {profiler} from '../render3/profiler';\nimport {ProfilerEvent} from '../render3/profiler_types';\nimport {EffectScheduler} from '../render3/reactivity/root_effect_scheduler';\nimport {ApplicationInitStatus} from './application_init';\nimport {TracingAction, TracingService, TracingSnapshot} from './tracing';\n\n/**\n * A DI token that provides a set of callbacks to\n * be called for every component that is bootstrapped.\n *\n * Each callback must take a `ComponentRef` instance and return nothing.\n *\n * `(componentRef: ComponentRef) => void`\n *\n * @publicApi\n */\nexport const APP_BOOTSTRAP_LISTENER = new InjectionToken<\n ReadonlyArray<(compRef: ComponentRef<any>) => void>\n>(ngDevMode ? 'appBootstrapListener' : '');\n\nexport function publishDefaultGlobalUtils() {\n ngDevMode && _publishDefaultGlobalUtils();\n}\n\n/**\n * Sets the error for an invalid write to a signal to be an Angular `RuntimeError`.\n */\nexport function publishSignalConfiguration(): void {\n setThrowInvalidWriteToSignalError(() => {\n throw new RuntimeError(\n RuntimeErrorCode.SIGNAL_WRITE_FROM_ILLEGAL_CONTEXT,\n ngDevMode && 'Writing to signals is not allowed in a `computed`.',\n );\n });\n}\n\nexport function isBoundToModule<C>(cf: ComponentFactory<C>): boolean {\n return (cf as R3ComponentFactory<C>).isBoundToModule;\n}\n\n/**\n * A token for third-party components that can register themselves with NgProbe.\n *\n * @deprecated\n * @publicApi\n */\nexport class NgProbeToken {\n constructor(\n public name: string,\n public token: any,\n ) {}\n}\n\n/**\n * Provides additional options to the bootstrapping process.\n *\n * @publicApi\n */\nexport interface BootstrapOptions {\n /**\n * Optionally specify which `NgZone` should be used when not configured in the providers.\n *\n * - Provide your own `NgZone` instance.\n * - `zone.js` - Use default `NgZone` which requires `Zone.js`.\n * - `noop` - Use `NoopNgZone` which does nothing.\n */\n ngZone?: NgZone | 'zone.js' | 'noop';\n\n /**\n * Optionally specify coalescing event change detections or not.\n * Consider the following case.\n *\n * ```html\n * <div (click)=\"doSomething()\">\n * <button (click)=\"doSomethingElse()\"></button>\n * </div>\n * ```\n *\n * When button is clicked, because of the event bubbling, both\n * event handlers will be called and 2 change detections will be\n * triggered. We can coalesce such kind of events to only trigger\n * change detection only once.\n *\n * By default, this option will be false. So the events will not be\n * coalesced and the change detection will be triggered multiple times.\n * And if this option be set to true, the change detection will be\n * triggered async by scheduling a animation frame. So in the case above,\n * the change detection will only be triggered once.\n */\n ngZoneEventCoalescing?: boolean;\n\n /**\n * Optionally specify if `NgZone#run()` method invocations should be coalesced\n * into a single change detection.\n *\n * Consider the following case.\n * ```ts\n * for (let i = 0; i < 10; i ++) {\n * ngZone.run(() => {\n * // do something\n * });\n * }\n * ```\n *\n * This case triggers the change detection multiple times.\n * With ngZoneRunCoalescing options, all change detections in an event loop trigger only once.\n * In addition, the change detection executes in requestAnimation.\n *\n */\n ngZoneRunCoalescing?: boolean;\n\n /**\n * When false, change detection is scheduled when Angular receives\n * a clear indication that templates need to be refreshed. This includes:\n *\n * - calling `ChangeDetectorRef.markForCheck`\n * - calling `ComponentRef.setInput`\n * - updating a signal that is read in a template\n * - attaching a view that is marked dirty\n * - removing a view\n * - registering a render hook (templates are only refreshed if render hooks do one of the above)\n *\n * @deprecated This option was introduced out of caution as a way for developers to opt out of the\n * new behavior in v18 which schedule change detection for the above events when they occur\n * outside the Zone. After monitoring the results post-release, we have determined that this\n * feature is working as desired and do not believe it should ever be disabled by setting\n * this option to `true`.\n */\n ignoreChangesOutsideZone?: boolean;\n}\n\n/** Maximum number of times ApplicationRef will refresh all attached views in a single tick. */\nconst MAXIMUM_REFRESH_RERUNS = 10;\n\nexport function optionsReducer<T extends Object>(dst: T, objs: T | T[]): T {\n if (Array.isArray(objs)) {\n return objs.reduce(optionsReducer, dst);\n }\n return {...dst, ...objs};\n}\n\n/**\n * A reference to an Angular application running on a page.\n *\n * @usageNotes\n * ### isStable examples and caveats\n *\n * Note two important points about `isStable`, demonstrated in the examples below:\n * - the application will never be stable if you start any kind\n * of recurrent asynchronous task when the application starts\n * (for example for a polling process, started with a `setInterval`, a `setTimeout`\n * or using RxJS operators like `interval`);\n * - the `isStable` Observable runs outside of the Angular zone.\n *\n * Let's imagine that you start a recurrent task\n * (here incrementing a counter, using RxJS `interval`),\n * and at the same time subscribe to `isStable`.\n *\n * ```ts\n * constructor(appRef: ApplicationRef) {\n * appRef.isStable.pipe(\n * filter(stable => stable)\n * ).subscribe(() => console.log('App is stable now');\n * interval(1000).subscribe(counter => console.log(counter));\n * }\n * ```\n * In this example, `isStable` will never emit `true`,\n * and the trace \"App is stable now\" will never get logged.\n *\n * If you want to execute something when the app is stable,\n * you have to wait for the application to be stable\n * before starting your polling process.\n *\n * ```ts\n * constructor(appRef: ApplicationRef) {\n * appRef.isStable.pipe(\n * first(stable => stable),\n * tap(stable => console.log('App is stable now')),\n * switchMap(() => interval(1000))\n * ).subscribe(counter => console.log(counter));\n * }\n * ```\n * In this example, the trace \"App is stable now\" will be logged\n * and then the counter starts incrementing every second.\n *\n * Note also that this Observable runs outside of the Angular zone,\n * which means that the code in the subscription\n * to this Observable will not trigger the change detection.\n *\n * Let's imagine that instead of logging the counter value,\n * you update a field of your component\n * and display it in its template.\n *\n * ```ts\n * constructor(appRef: ApplicationRef) {\n * appRef.isStable.pipe(\n * first(stable => stable),\n * switchMap(() => interval(1000))\n * ).subscribe(counter => this.value = counter);\n * }\n * ```\n * As the `isStable` Observable runs outside the zone,\n * the `value` field will be updated properly,\n * but the template will not be refreshed!\n *\n * You'll have to manually trigger the change detection to update the template.\n *\n * ```ts\n * constructor(appRef: ApplicationRef, cd: ChangeDetectorRef) {\n * appRef.isStable.pipe(\n * first(stable => stable),\n * switchMap(() => interval(1000))\n * ).subscribe(counter => {\n * this.value = counter;\n * cd.detectChanges();\n * });\n * }\n * ```\n *\n * Or make the subscription callback run inside the zone.\n *\n * ```ts\n * constructor(appRef: ApplicationRef, zone: NgZone) {\n * appRef.isStable.pipe(\n * first(stable => stable),\n * switchMap(() => interval(1000))\n * ).subscribe(counter => zone.run(() => this.value = counter));\n * }\n * ```\n *\n * @publicApi\n */\n@Injectable({providedIn: 'root'})\nexport class ApplicationRef {\n /** @internal */\n _runningTick: boolean = false;\n private _destroyed = false;\n private _destroyListeners: Array<() => void> = [];\n /** @internal */\n _views: InternalViewRef<unknown>[] = [];\n private readonly internalErrorHandler = inject(INTERNAL_APPLICATION_ERROR_HANDLER);\n private readonly afterRenderManager = inject(AfterRenderManager);\n private readonly zonelessEnabled = inject(ZONELESS_ENABLED);\n private readonly rootEffectScheduler = inject(EffectScheduler);\n\n /**\n * Current dirty state of the application across a number of dimensions (views, afterRender hooks,\n * etc).\n *\n * A flag set here means that `tick()` will attempt to resolve the dirtiness when executed.\n *\n * @internal\n */\n dirtyFlags = ApplicationRefDirtyFlags.None;\n\n /**\n * Most recent snapshot from the `TracingService`, if any.\n *\n * This snapshot attempts to capture the context when `tick()` was first\n * scheduled. It then runs wrapped in this context.\n *\n * @internal\n */\n tracingSnapshot: TracingSnapshot | null = null;\n\n // Needed for ComponentFixture temporarily during migration of autoDetect behavior\n // Eventually the hostView of the fixture should just attach to ApplicationRef.\n private externalTestViews: Set<InternalViewRef<unknown>> = new Set();\n /** @internal */\n afterTick = new Subject<void>();\n /** @internal */\n get allViews(): Array<InternalViewRef<unknown>> {\n return [...this.externalTestViews.keys(), ...this._views];\n }\n\n /**\n * Indicates whether this instance was destroyed.\n */\n get destroyed() {\n return this._destroyed;\n }\n\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 public readonly componentTypes: Type<any>[] = [];\n\n /**\n * Get a list of components registered to this application.\n */\n public readonly components: ComponentRef<any>[] = [];\n\n /**\n * Returns an Observable that indicates when the application is stable or unstable.\n */\n public readonly isStable: Observable<boolean> = inject(PendingTasksInternal).hasPendingTasks.pipe(\n map((pending) => !pending),\n );\n\n constructor() {\n // Inject the tracing service to initialize it.\n inject(TracingService, {optional: true});\n }\n\n /**\n * @returns A promise that resolves when the application becomes stable\n */\n whenStable(): Promise<void> {\n let subscription: Subscription;\n return new Promise<void>((resolve) => {\n subscription = this.isStable.subscribe({\n next: (stable) => {\n if (stable) {\n resolve();\n }\n },\n });\n }).finally(() => {\n subscription.unsubscribe();\n });\n }\n\n private readonly _injector = inject(EnvironmentInjector);\n private _rendererFactory: RendererFactory2 | null = null;\n\n /**\n * The `EnvironmentInjector` used to create this application.\n */\n get injector(): EnvironmentInjector {\n return this._injector;\n }\n\n /**\n * Bootstrap a component onto the element identified by its selector or, optionally, to a\n * specified element.\n *\n * @usageNotes\n * ### Bootstrap process\n *\n * When bootstrapping a component, Angular mounts it onto a target DOM element\n * and kicks off automatic change detection. The target DOM element can be\n * provided using the `rootSelectorOrNode` argument.\n *\n * If the target DOM element is not provided, Angular tries to find one on a page\n * using the `selector` of the component that is being bootstrapped\n * (first matched element is used).\n *\n * ### Example\n *\n * Generally, we define the component to bootstrap in the `bootstrap` array of `NgModule`,\n * but it requires us to know the component while writing the application code.\n *\n * Imagine a situation where we have to wait for an API call to decide about the component to\n * bootstrap. We can use the `ngDoBootstrap` hook of the `NgModule` and call this method to\n * dynamically bootstrap a component.\n *\n * {@example core/ts/platform/platform.ts region='componentSelector'}\n *\n * Optionally, a component can be mounted onto a DOM element that does not match the\n * selector of the bootstrapped component.\n *\n * In the following example, we are providing a CSS selector to match the target element.\n *\n * {@example core/ts/platform/platform.ts region='cssSelector'}\n *\n * While in this example, we are providing reference to a DOM node.\n *\n * {@example core/ts/platform/platform.ts region='domNode'}\n */\n bootstrap<C>(component: Type<C>, rootSelectorOrNode?: string | any): ComponentRef<C>;\n\n /**\n * Bootstrap a component onto the element identified by its selector or, optionally, to a\n * specified element.\n *\n * @usageNotes\n * ### Bootstrap process\n *\n * When bootstrapping a component, Angular mounts it onto a target DOM element\n * and kicks off automatic change detection. The target DOM element can be\n * provided using the `rootSelectorOrNode` argument.\n *\n * If the target DOM element is not provided, Angular tries to find one on a page\n * using the `selector` of the component that is being bootstrapped\n * (first matched element is used).\n *\n * ### Example\n *\n * Generally, we define the component to bootstrap in the `bootstrap` array of `NgModule`,\n * but it requires us to know the component while writing the application code.\n *\n * Imagine a situation where we have to wait for an API call to decide about the component to\n * bootstrap. We can use the `ngDoBootstrap` hook of the `NgModule` and call this method to\n * dynamically bootstrap a component.\n *\n * {@example core/ts/platform/platform.ts region='componentSelector'}\n *\n * Optionally, a component can be mounted onto a DOM element that does not match the\n * selector of the bootstrapped component.\n *\n * In the following example, we are providing a CSS selector to match the target element.\n *\n * {@example core/ts/platform/platform.ts region='cssSelector'}\n *\n * While in this example, we are providing reference to a DOM node.\n *\n * {@example core/ts/platform/platform.ts region='domNode'}\n *\n * @deprecated Passing Component factories as the `Application.bootstrap` function argument is\n * deprecated. Pass Component Types instead.\n */\n bootstrap<C>(\n componentFactory: ComponentFactory<C>,\n rootSelectorOrNode?: string | any,\n ): ComponentRef<C>;\n\n /**\n * Bootstrap a component onto the element identified by its selector or, optionally, to a\n * specified element.\n *\n * @usageNotes\n * ### Bootstrap process\n *\n * When bootstrapping a component, Angular mounts it onto a target DOM element\n * and kicks off automatic change detection. The target DOM element can be\n * provided using the `rootSelectorOrNode` argument.\n *\n * If the target DOM element is not provided, Angular tries to find one on a page\n * using the `selector` of the component that is being bootstrapped\n * (first matched element is used).\n *\n * ### Example\n *\n * Generally, we define the component to bootstrap in the `bootstrap` array of `NgModule`,\n * but it requires us to know the component while writing the application code.\n *\n * Imagine a situation where we have to wait for an API call to decide about the component to\n * bootstrap. We can use the `ngDoBootstrap` hook of the `NgModule` and call this method to\n * dynamically bootstrap a component.\n *\n * {@example core/ts/platform/platform.ts region='componentSelector'}\n *\n * Optionally, a component can be mounted onto a DOM element that does not match the\n * selector of the bootstrapped component.\n *\n * In the following example, we are providing a CSS selector to match the target element.\n *\n * {@example core/ts/platform/platform.ts region='cssSelector'}\n *\n * While in this example, we are providing reference to a DOM node.\n *\n * {@example core/ts/platform/platform.ts region='domNode'}\n */\n bootstrap<C>(\n componentOrFactory: ComponentFactory<C> | Type<C>,\n rootSelectorOrNode?: string | any,\n ): ComponentRef<C> {\n return this.bootstrapImpl(componentOrFactory, rootSelectorOrNode);\n }\n\n private bootstrapImpl<C>(\n componentOrFactory: ComponentFactory<C> | Type<C>,\n rootSelectorOrNode?: string | any,\n injector: Injector = Injector.NULL,\n ): ComponentRef<C> {\n profiler(ProfilerEvent.BootstrapComponentStart);\n\n (typeof ngDevMode === 'undefined' || ngDevMode) && warnIfDestroyed(this._destroyed);\n const isComponentFactory = componentOrFactory instanceof ComponentFactory;\n const initStatus = this._injector.get(ApplicationInitStatus);\n\n if (!initStatus.done) {\n let errorMessage = '';\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n const standalone = !isComponentFactory && isStandalone(componentOrFactory);\n errorMessage =\n 'Cannot bootstrap as there are still asynchronous initializers running.' +\n (standalone\n ? ''\n : ' Bootstrap components in the `ngDoBootstrap` method of the root module.');\n }\n throw new RuntimeError(RuntimeErrorCode.ASYNC_INITIALIZERS_STILL_RUNNING, errorMessage);\n }\n\n let componentFactory: ComponentFactory<C>;\n if (isComponentFactory) {\n componentFactory = componentOrFactory;\n } else {\n const resolver = this._injector.get(ComponentFactoryResolver);\n componentFactory = resolver.resolveComponentFactory(componentOrFactory)!;\n }\n this.componentTypes.push(componentFactory.componentType);\n\n // Create a factory associated with the current module if it's not bound to some other\n const ngModule = isBoundToModule(componentFactory)\n ? undefined\n : this._injector.get(NgModuleRef);\n const selectorOrNode = rootSelectorOrNode || componentFactory.selector;\n const compRef = componentFactory.create(injector, [], selectorOrNode, ngModule);\n const nativeElement = compRef.location.nativeElement;\n const testability = compRef.injector.get(TESTABILITY, null);\n testability?.registerApplication(nativeElement);\n\n compRef.onDestroy(() => {\n this.detachView(compRef.hostView);\n remove(this.components, compRef);\n testability?.unregisterApplication(nativeElement);\n });\n\n this._loadComponent(compRef);\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n const _console = this._injector.get(Console);\n _console.log(`Angular is running in development mode.`);\n }\n\n profiler(ProfilerEvent.BootstrapComponentEnd, compRef);\n\n return compRef;\n }\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 tick(): void {\n if (!this.zonelessEnabled) {\n this.dirtyFlags |= ApplicationRefDirtyFlags.ViewTreeGlobal;\n }\n this._tick();\n }\n\n /** @internal */\n _tick(): void {\n profiler(ProfilerEvent.ChangeDetectionStart);\n\n if (this.tracingSnapshot !== null) {\n // Ensure we always run `tickImpl()` in the context of the most recent snapshot,\n // if one exists. Snapshots may be reference counted by the implementation so\n // we want to ensure that if we request a snapshot that we use it.\n this.tracingSnapshot.run(TracingAction.CHANGE_DETECTION, this.tickImpl);\n } else {\n this.tickImpl();\n }\n }\n\n private tickImpl = (): void => {\n (typeof ngDevMode === 'undefined' || ngDevMode) && warnIfDestroyed(this._destroyed);\n if (this._runningTick) {\n throw new RuntimeError(\n RuntimeErrorCode.RECURSIVE_APPLICATION_REF_TICK,\n ngDevMode && 'ApplicationRef.tick is called recursively',\n );\n }\n\n const prevConsumer = setActiveConsumer(null);\n try {\n this._runningTick = true;\n this.synchronize();\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n for (let view of this.allViews) {\n view.checkNoChanges();\n }\n }\n } catch (e) {\n // Attention: Don't rethrow as it could cancel subscriptions to Observables!\n this.internalErrorHandler(e);\n } finally {\n this._runningTick = false;\n this.tracingSnapshot?.dispose();\n this.tracingSnapshot = null;\n setActiveConsumer(prevConsumer);\n this.afterTick.next();\n\n profiler(ProfilerEvent.ChangeDetectionEnd);\n }\n };\n\n /**\n * Performs the core work of synchronizing the application state with the UI, resolving any\n * pending dirtiness (potentially in a loop).\n */\n private synchronize(): void {\n if (this._rendererFactory === null && !(this._injector as R3Injector).destroyed) {\n this._rendererFactory = this._injector.get(RendererFactory2, null, {optional: true});\n }\n\n let runs = 0;\n while (this.dirtyFlags !== ApplicationRefDirtyFlags.None && runs++ < MAXIMUM_REFRESH_RERUNS) {\n profiler(ProfilerEvent.ChangeDetectionSyncStart);\n this.synchronizeOnce();\n profiler(ProfilerEvent.ChangeDetectionSyncEnd);\n }\n\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && runs >= MAXIMUM_REFRESH_RERUNS) {\n throw new RuntimeError(\n RuntimeErrorCode.INFINITE_CHANGE_DETECTION,\n ngDevMode &&\n 'Infinite change detection while refreshing application views. ' +\n 'Ensure views are not calling `markForCheck` on every template execution or ' +\n 'that afterRender hooks always mark views for check.',\n );\n }\n }\n\n /**\n * Perform a single synchronization pass.\n */\n private synchronizeOnce(): void {\n // First, process any dirty root effects.\n if (this.dirtyFlags & ApplicationRefDirtyFlags.RootEffects) {\n this.dirtyFlags &= ~ApplicationRefDirtyFlags.RootEffects;\n this.rootEffectScheduler.flush();\n }\n\n // First check dirty views, if there are any.\n if (this.dirtyFlags & ApplicationRefDirtyFlags.ViewTreeAny) {\n // Change detection on views starts in targeted mode (only check components if they're\n // marked as dirty) unless global checking is specifically requested via APIs like\n // `ApplicationRef.tick()` and the `NgZone` integration.\n const useGlobalCheck = Boolean(this.dirtyFlags & ApplicationRefDirtyFlags.ViewTreeGlobal);\n\n // Clear the view-related dirty flags.\n this.dirtyFlags &= ~ApplicationRefDirtyFlags.ViewTreeAny;\n\n // Set the AfterRender bit, as we're checking views and will need to run afterRender hooks.\n this.dirtyFlags |= ApplicationRefDirtyFlags.AfterRender;\n\n // Check all potentially dirty views.\n for (let {_lView, notifyErrorHandler} of this.allViews) {\n detectChangesInViewIfRequired(\n _lView,\n notifyErrorHandler,\n useGlobalCheck,\n this.zonelessEnabled,\n );\n }\n\n // If `markForCheck()` was called during view checking, it will have set the `ViewTreeCheck`\n // flag. We clear the flag here because, for backwards compatibility, `markForCheck()`\n // during view checking doesn't cause the view to be re-checked.\n this.dirtyFlags &= ~ApplicationRefDirtyFlags.ViewTreeCheck;\n\n // Check if any views are still dirty after checking and we need to loop back.\n this.syncDirtyFlagsWithViews();\n if (\n this.dirtyFlags &\n (ApplicationRefDirtyFlags.ViewTreeAny | ApplicationRefDirtyFlags.RootEffects)\n ) {\n // If any views or effects are still dirty after checking, loop back before running render\n // hooks.\n return;\n }\n } else {\n // If we skipped refreshing views above, there might still be unflushed animations\n // because we never called `detectChangesInternal` on the views.\n this._rendererFactory?.begin?.();\n this._rendererFactory?.end?.();\n }\n\n // Even if there were no dirty views, afterRender hooks might still be dirty.\n if (this.dirtyFlags & ApplicationRefDirtyFlags.AfterRender) {\n this.dirtyFlags &= ~ApplicationRefDirtyFlags.AfterRender;\n this.afterRenderManager.execute();\n\n // afterRender hooks might influence dirty flags.\n }\n this.syncDirtyFlagsWithViews();\n }\n\n /**\n * Checks `allViews` for views which require refresh/traversal, and updates `dirtyFlags`\n * accordingly, with two potential behaviors:\n *\n * 1. If any of our views require updating, then this adds the `ViewTreeTraversal` dirty flag.\n * This _should_ be a no-op, since the scheduler should've added the flag at the same time the\n * view was marked as needing updating.\n *\n * TODO(alxhub): figure out if this behavior is still needed for edge cases.\n *\n * 2. If none of our views require updating, then clear the view-related `dirtyFlag`s. This\n * happens when the scheduler is notified of a view becoming dirty, but the view itself isn't\n * reachable through traversal from our roots (e.g. it's detached from the CD tree).\n */\n private syncDirtyFlagsWithViews(): void {\n if (this.allViews.some(({_lView}) => requiresRefreshOrTraversal(_lView))) {\n // If after running all afterRender callbacks new views are dirty, ensure we loop back.\n this.dirtyFlags |= ApplicationRefDirtyFlags.ViewTreeTraversal;\n return;\n } else {\n // Even though this flag may be set, none of _our_ views require traversal, and so the\n // `ApplicationRef` doesn't require any repeated checking.\n this.dirtyFlags &= ~ApplicationRefDirtyFlags.ViewTreeAny;\n }\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 attachView(viewRef: ViewRef): void {\n (typeof ngDevMode === 'undefined' || ngDevMode) && warnIfDestroyed(this._destroyed);\n const view = viewRef as InternalViewRef<unknown>;\n this._views.push(view);\n view.attachToAppRef(this);\n }\n\n /**\n * Detaches a view from dirty checking again.\n */\n detachView(viewRef: ViewRef): void {\n (typeof ngDevMode === 'undefined' || ngDevMode) && warnIfDestroyed(this._destroyed);\n const view = viewRef as InternalViewRef<unknown>;\n remove(this._views, view);\n view.detachFromAppRef();\n }\n\n private _loadComponent(componentRef: ComponentRef<any>): void {\n this.attachView(componentRef.hostView);\n this.tick();\n this.components.push(componentRef);\n // Get the listeners lazily to prevent DI cycles.\n const listeners = this._injector.get(APP_BOOTSTRAP_LISTENER, []);\n if (ngDevMode && !Array.isArray(listeners)) {\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_MULTI_PROVIDER,\n 'Unexpected type of the `APP_BOOTSTRAP_LISTENER` token value ' +\n `(expected an array, but got ${typeof listeners}). ` +\n 'Please check that the `APP_BOOTSTRAP_LISTENER` token is configured as a ' +\n '`multi: true` provider.',\n );\n }\n listeners.forEach((listener) => listener(componentRef));\n }\n\n /** @internal */\n ngOnDestroy() {\n if (this._destroyed) return;\n\n try {\n // Call all the lifecycle hooks.\n this._destroyListeners.forEach((listener) => listener());\n\n // Destroy all registered views.\n this._views.slice().forEach((view) => view.destroy());\n } finally {\n // Indicate that this instance is destroyed.\n this._destroyed = true;\n\n // Release all references.\n this._views = [];\n this._destroyListeners = [];\n }\n }\n\n /**\n * Registers a listener to be called when an instance is destroyed.\n *\n * @param callback A callback function to add as a listener.\n * @returns A function which unregisters a listener.\n */\n onDestroy(callback: () => void): VoidFunction {\n (typeof ngDevMode === 'undefined' || ngDevMode) && warnIfDestroyed(this._destroyed);\n this._destroyListeners.push(callback);\n return () => remove(this._destroyListeners, callback);\n }\n\n /**\n * Destroys an Angular application represented by this `ApplicationRef`. Calling this function\n * will destroy the associated environment injectors as well as all the bootstrapped components\n * with their views.\n */\n destroy(): void {\n if (this._destroyed) {\n throw new RuntimeError(\n RuntimeErrorCode.APPLICATION_REF_ALREADY_DESTROYED,\n ngDevMode && 'This instance of the `ApplicationRef` has already been destroyed.',\n );\n }\n\n const injector = this._injector as R3Injector;\n\n // Check that this injector instance supports destroy operation.\n if (injector.destroy && !injector.destroyed) {\n // Destroying an underlying injector will trigger the `ngOnDestroy` lifecycle\n // hook, which invokes the remaining cleanup actions.\n injector.destroy();\n }\n }\n\n /**\n * Returns the number of attached views.\n */\n get viewCount() {\n return this._views.length;\n }\n}\n\nfunction warnIfDestroyed(destroyed: boolean): void {\n if (destroyed) {\n console.warn(\n formatRuntimeError(\n RuntimeErrorCode.APPLICATION_REF_ALREADY_DESTROYED,\n 'This instance of the `ApplicationRef` has already been destroyed.',\n ),\n );\n }\n}\n\nexport function remove<T>(list: T[], el: T): void {\n const index = list.indexOf(el);\n if (index > -1) {\n list.splice(index, 1);\n }\n}\n\nexport const enum ApplicationRefDirtyFlags {\n None = 0,\n\n /**\n * A global change detection round has been requested.\n */\n ViewTreeGlobal = 0b00000001,\n\n /**\n * Part of the view tree is marked for traversal.\n */\n ViewTreeTraversal = 0b00000010,\n\n /**\n * Part of the view tree is marked to be checked (dirty).\n */\n ViewTreeCheck = 0b00000100,\n\n /**\n * Helper for any view tree bit being set.\n */\n ViewTreeAny = ViewTreeGlobal | ViewTreeTraversal | ViewTreeCheck,\n\n /**\n * After render hooks need to run.\n */\n AfterRender = 0b00001000,\n\n /**\n * Effects at the `ApplicationRef` level.\n */\n RootEffects = 0b00010000,\n}\n\nexport function detectChangesInViewIfRequired(\n lView: LView,\n notifyErrorHandler: boolean,\n isFirstPass: boolean,\n zonelessEnabled: boolean,\n) {\n // When re-checking, only check views which actually need it.\n if (!isFirstPass && !requiresRefreshOrTraversal(lView)) {\n return;\n }\n\n const mode =\n isFirstPass && !zonelessEnabled\n ? // The first pass is always in Global mode, which includes `CheckAlways` views.\n // When using zoneless, all root views must be explicitly marked for refresh, even if they are\n // `CheckAlways`.\n ChangeDetectionMode.Global\n : // Only refresh views with the `RefreshView` flag or views is a changed signal\n ChangeDetectionMode.Targeted;\n detectChangesInternal(lView, notifyErrorHandler, mode);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {afterNextRender} from '../render3/after_render/hooks';\nimport {Injector} from '../di';\nimport {internalImportProvidersFrom} from '../di/provider_collection';\nimport {RuntimeError, RuntimeErrorCode} from '../errors';\nimport {\n cleanupHydratedDeferBlocks,\n cleanupLContainer,\n removeDehydratedViewList,\n} from '../hydration/cleanup';\nimport {BlockSummary, ElementTrigger, NUM_ROOT_NODES} from '../hydration/interfaces';\nimport {\n assertSsrIdDefined,\n getParentBlockHydrationQueue,\n isIncrementalHydrationEnabled,\n} from '../hydration/utils';\nimport {PendingTasks, PendingTasksInternal} from '../pending_tasks';\nimport {assertLContainer} from '../render3/assert';\nimport {getComponentDef, getDirectiveDef, getPipeDef} from '../render3/def_getters';\nimport {getTemplateLocationDetails} from '../render3/instructions/element_validation';\nimport {handleError} from '../render3/instructions/shared';\nimport {DirectiveDefList, PipeDefList} from '../render3/interfaces/definition';\nimport {TNode} from '../render3/interfaces/node';\nimport {INJECTOR, LView, TView, TVIEW} from '../render3/interfaces/view';\nimport {getCurrentTNode, getLView} from '../render3/state';\nimport {throwError} from '../util/assert';\nimport {\n invokeAllTriggerCleanupFns,\n invokeTriggerCleanupFns,\n storeTriggerCleanupFn,\n} from './cleanup';\nimport {onViewport} from './dom_triggers';\nimport {onIdle} from './idle_scheduler';\nimport {\n DEFER_BLOCK_STATE,\n DeferBlockBehavior,\n DeferBlockState,\n DeferBlockTrigger,\n DeferDependenciesLoadingState,\n DehydratedDeferBlock,\n HydrateTriggerDetails,\n LDeferBlockDetails,\n ON_COMPLETE_FNS,\n SSR_UNIQUE_ID,\n TDeferBlockDetails,\n TDeferDetailsFlags,\n TriggerType,\n} from './interfaces';\nimport {DEHYDRATED_BLOCK_REGISTRY, DehydratedBlockRegistry} from './registry';\nimport {\n DEFER_BLOCK_CONFIG,\n DEFER_BLOCK_DEPENDENCY_INTERCEPTOR,\n renderDeferBlockState,\n renderDeferStateAfterResourceLoading,\n renderPlaceholder,\n} from './rendering';\nimport {onTimer} from './timer_scheduler';\nimport {\n addDepsToRegistry,\n assertDeferredDependenciesLoaded,\n getLDeferBlockDetails,\n getPrimaryBlockTNode,\n getTDeferBlockDetails,\n} from './utils';\nimport {ApplicationRef} from '../application/application_ref';\nimport type {PromiseConstructor} from '../util/promise_with_resolvers';\n\n/**\n * Schedules triggering of a defer block for `on idle` and `on timer` conditions.\n */\nexport function scheduleDelayedTrigger(\n scheduleFn: (callback: VoidFunction, injector: Injector) => VoidFunction,\n) {\n const lView = getLView();\n const tNode = getCurrentTNode()!;\n\n renderPlaceholder(lView, tNode);\n\n // Exit early to avoid invoking `scheduleFn`, which would\n // add `setTimeout` call and potentially delay serialization\n // on the server unnecessarily.\n if (!shouldTriggerDeferBlock(TriggerType.Regular, lView)) return;\n\n const injector = lView[INJECTOR];\n const lDetails = getLDeferBlockDetails(lView, tNode);\n\n const cleanupFn = scheduleFn(\n () => triggerDeferBlock(TriggerType.Regular, lView, tNode),\n injector,\n );\n storeTriggerCleanupFn(TriggerType.Regular, lDetails, cleanupFn);\n}\n\n/**\n * Schedules prefetching for `on idle` and `on timer` triggers.\n *\n * @param scheduleFn A function that does the scheduling.\n */\nexport function scheduleDelayedPrefetching(\n scheduleFn: (callback: VoidFunction, injector: Injector) => VoidFunction,\n trigger: DeferBlockTrigger,\n) {\n if (typeof ngServerMode !== 'undefined' && ngServerMode) return;\n\n const lView = getLView();\n const injector = lView[INJECTOR];\n\n // Only trigger the scheduled trigger on the browser\n // since we don't want to delay the server response.\n const tNode = getCurrentTNode()!;\n const tView = lView[TVIEW];\n const tDetails = getTDeferBlockDetails(tView, tNode);\n\n if (tDetails.loadingState === DeferDependenciesLoadingState.NOT_STARTED) {\n const lDetails = getLDeferBlockDetails(lView, tNode);\n const prefetch = () => triggerPrefetching(tDetails, lView, tNode);\n const cleanupFn = scheduleFn(prefetch, injector);\n storeTriggerCleanupFn(TriggerType.Prefetch, lDetails, cleanupFn);\n }\n}\n\n/**\n * Schedules hydration triggering of a defer block for `on idle` and `on timer` conditions.\n */\nexport function scheduleDelayedHydrating(\n scheduleFn: (callback: VoidFunction, injector: Injector) => VoidFunction,\n lView: LView,\n tNode: TNode,\n) {\n if (typeof ngServerMode !== 'undefined' && ngServerMode) return;\n\n // Only trigger the scheduled trigger on the browser\n // since we don't want to delay the server response.\n const injector = lView[INJECTOR];\n const lDetails = getLDeferBlockDetails(lView, tNode);\n const ssrUniqueId = lDetails[SSR_UNIQUE_ID]!;\n ngDevMode && assertSsrIdDefined(ssrUniqueId);\n\n const cleanupFn = scheduleFn(\n () => triggerHydrationFromBlockName(injector, ssrUniqueId),\n injector,\n );\n storeTriggerCleanupFn(TriggerType.Hydrate, lDetails, cleanupFn);\n}\n\n/**\n * Trigger prefetching of dependencies for a defer block.\n *\n * @param tDetails Static information about this defer block.\n * @param lView LView of a host view.\n * @param tNode TNode that represents a defer block.\n */\nexport function triggerPrefetching(tDetails: TDeferBlockDetails, lView: LView, tNode: TNode) {\n triggerResourceLoading(tDetails, lView, tNode);\n}\n\n/**\n * Trigger loading of defer block dependencies if the process hasn't started yet.\n *\n * @param tDetails Static information about this defer block.\n * @param lView LView of a host view.\n */\nexport function triggerResourceLoading(\n tDetails: TDeferBlockDetails,\n lView: LView,\n tNode: TNode,\n): Promise<unknown> {\n const injector = lView[INJECTOR];\n const tView = lView[TVIEW];\n\n if (tDetails.loadingState !== DeferDependenciesLoadingState.NOT_STARTED) {\n // If the loading status is different from initial one, it means that\n // the loading of dependencies is in progress and there is nothing to do\n // in this function. All details can be obtained from the `tDetails` object.\n return tDetails.loadingPromise ?? Promise.resolve();\n }\n\n const lDetails = getLDeferBlockDetails(lView, tNode);\n const primaryBlockTNode = getPrimaryBlockTNode(tView, tDetails);\n\n // Switch from NOT_STARTED -> IN_PROGRESS state.\n tDetails.loadingState = DeferDependenciesLoadingState.IN_PROGRESS;\n\n // Prefetching is triggered, cleanup all registered prefetch triggers.\n invokeTriggerCleanupFns(TriggerType.Prefetch, lDetails);\n\n let dependenciesFn = tDetails.dependencyResolverFn;\n\n if (ngDevMode) {\n // Check if dependency function interceptor is configured.\n const deferDependencyInterceptor = injector.get(DEFER_BLOCK_DEPENDENCY_INTERCEPTOR, null, {\n optional: true,\n });\n\n if (deferDependencyInterceptor) {\n dependenciesFn = deferDependencyInterceptor.intercept(dependenciesFn);\n }\n }\n\n // Indicate that an application is not stable and has a pending task.\n const removeTask = injector.get(PendingTasks).add();\n\n // The `dependenciesFn` might be `null` when all dependencies within\n // a given defer block were eagerly referenced elsewhere in a file,\n // thus no dynamic `import()`s were produced.\n if (!dependenciesFn) {\n tDetails.loadingPromise = Promise.resolve().then(() => {\n tDetails.loadingPromise = null;\n tDetails.loadingState = DeferDependenciesLoadingState.COMPLETE;\n removeTask();\n });\n return tDetails.loadingPromise;\n }\n\n // Start downloading of defer block dependencies.\n tDetails.loadingPromise = Promise.allSettled(dependenciesFn()).then((results) => {\n let failed = false;\n const directiveDefs: DirectiveDefList = [];\n const pipeDefs: PipeDefList = [];\n\n for (const result of results) {\n if (result.status === 'fulfilled') {\n const dependency = result.value;\n const directiveDef = getComponentDef(dependency) || getDirectiveDef(dependency);\n if (directiveDef) {\n directiveDefs.push(directiveDef);\n } else {\n const pipeDef = getPipeDef(dependency);\n if (pipeDef) {\n pipeDefs.push(pipeDef);\n }\n }\n } else {\n failed = true;\n break;\n }\n }\n\n if (failed) {\n tDetails.loadingState = DeferDependenciesLoadingState.FAILED;\n\n if (tDetails.errorTmplIndex === null) {\n const templateLocation = ngDevMode ? getTemplateLocationDetails(lView) : '';\n const error = new RuntimeError(\n RuntimeErrorCode.DEFER_LOADING_FAILED,\n ngDevMode &&\n 'Loading dependencies for `@defer` block failed, ' +\n `but no \\`@error\\` block was configured${templateLocation}. ` +\n 'Consider using the `@error` block to render an error state.',\n );\n handleError(lView, error);\n }\n } else {\n tDetails.loadingState = DeferDependenciesLoadingState.COMPLETE;\n\n // Update directive and pipe registries to add newly downloaded dependencies.\n const primaryBlockTView = primaryBlockTNode.tView!;\n if (directiveDefs.length > 0) {\n primaryBlockTView.directiveRegistry = addDepsToRegistry<DirectiveDefList>(\n primaryBlockTView.directiveRegistry,\n directiveDefs,\n );\n\n // Extract providers from all NgModules imported by standalone components\n // used within this defer block.\n const directiveTypes = directiveDefs.map((def) => def.type);\n const providers = internalImportProvidersFrom(false, ...directiveTypes);\n tDetails.providers = providers;\n }\n if (pipeDefs.length > 0) {\n primaryBlockTView.pipeRegistry = addDepsToRegistry<PipeDefList>(\n primaryBlockTView.pipeRegistry,\n pipeDefs,\n );\n }\n }\n });\n\n return tDetails.loadingPromise.finally(() => {\n // Loading is completed, we no longer need the loading Promise\n // and a pending task should also be removed.\n tDetails.loadingPromise = null;\n removeTask();\n });\n}\n\n/**\n * Defines whether we should proceed with triggering a given defer block.\n */\nfunction shouldTriggerDeferBlock(triggerType: TriggerType, lView: LView): boolean {\n // prevents triggering regular triggers when on the server.\n if (triggerType === TriggerType.Regular && typeof ngServerMode !== 'undefined' && ngServerMode) {\n return false;\n }\n\n // prevents triggering in the case of a test run with manual defer block configuration.\n const injector = lView[INJECTOR];\n const config = injector.get(DEFER_BLOCK_CONFIG, null, {optional: true});\n if (config?.behavior === DeferBlockBehavior.Manual) {\n return false;\n }\n return true;\n}\n\n/**\n * Attempts to trigger loading of defer block dependencies.\n * If the block is already in a loading, completed or an error state -\n * no additional actions are taken.\n */\nexport function triggerDeferBlock(triggerType: TriggerType, lView: LView, tNode: TNode) {\n const tView = lView[TVIEW];\n const lContainer = lView[tNode.index];\n ngDevMode && assertLContainer(lContainer);\n\n if (!shouldTriggerDeferBlock(triggerType, lView)) return;\n\n const lDetails = getLDeferBlockDetails(lView, tNode);\n const tDetails = getTDeferBlockDetails(tView, tNode);\n\n // Defer block is triggered, cleanup all registered trigger functions.\n invokeAllTriggerCleanupFns(lDetails);\n\n switch (tDetails.loadingState) {\n case DeferDependenciesLoadingState.NOT_STARTED:\n renderDeferBlockState(DeferBlockState.Loading, tNode, lContainer);\n triggerResourceLoading(tDetails, lView, tNode);\n\n // The `loadingState` might have changed to \"loading\".\n if (\n (tDetails.loadingState as DeferDependenciesLoadingState) ===\n DeferDependenciesLoadingState.IN_PROGRESS\n ) {\n renderDeferStateAfterResourceLoading(tDetails, tNode, lContainer);\n }\n break;\n case DeferDependenciesLoadingState.IN_PROGRESS:\n renderDeferBlockState(DeferBlockState.Loading, tNode, lContainer);\n renderDeferStateAfterResourceLoading(tDetails, tNode, lContainer);\n break;\n case DeferDependenciesLoadingState.COMPLETE:\n ngDevMode && assertDeferredDependenciesLoaded(tDetails);\n renderDeferBlockState(DeferBlockState.Complete, tNode, lContainer);\n break;\n case DeferDependenciesLoadingState.FAILED:\n renderDeferBlockState(DeferBlockState.Error, tNode, lContainer);\n break;\n default:\n if (ngDevMode) {\n throwError('Unknown defer block state');\n }\n }\n}\n\n/**\n * The core mechanism for incremental hydration. This triggers or\n * queues hydration for all the blocks in the tree that need to be hydrated\n * and keeps track of all those blocks that were hydrated along the way.\n *\n * Note: the `replayQueuedEventsFn` is only provided when hydration is invoked\n * as a result of an event replay (via JsAction). When hydration is invoked from\n * an instruction set (e.g. `deferOnImmediate`) - there is no need to replay any\n * events.\n */\nexport async function triggerHydrationFromBlockName(\n injector: Injector,\n blockName: string,\n replayQueuedEventsFn?: Function,\n) {\n const dehydratedBlockRegistry = injector.get(DEHYDRATED_BLOCK_REGISTRY);\n const blocksBeingHydrated = dehydratedBlockRegistry.hydrating;\n\n // Make sure we don't hydrate/trigger the same thing multiple times\n if (blocksBeingHydrated.has(blockName)) {\n return;\n }\n\n // Trigger resource loading and hydration for the blocks in the queue in the order of highest block\n // to lowest block. Once a block has finished resource loading, after next render fires after hydration\n // finishes. The new block will have its defer instruction called and will be in the registry.\n // Due to timing related to potential nested control flow, this has to be scheduled after the next render.\n const {parentBlockPromise, hydrationQueue} = getParentBlockHydrationQueue(blockName, injector);\n if (hydrationQueue.length === 0) return;\n\n // It's possible that the hydrationQueue topmost item is actually in the process of hydrating and has\n // a promise already. In that case, we don't want to destroy that promise and queue it again.\n if (parentBlockPromise !== null) {\n hydrationQueue.shift();\n }\n\n // The hydrating map in the registry prevents re-triggering hydration for a block that's already in\n // the hydration queue. Here we generate promises for each of the blocks about to be hydrated\n populateHydratingStateForQueue(dehydratedBlockRegistry, hydrationQueue);\n\n // We await this after populating the hydration state so we can prevent re-triggering hydration for\n // the same blocks while this promise is being awaited.\n if (parentBlockPromise !== null) {\n await parentBlockPromise;\n }\n\n const topmostParentBlock = hydrationQueue[0];\n if (dehydratedBlockRegistry.has(topmostParentBlock)) {\n // the topmost parent block is already in the registry and we can proceed\n // with hydration.\n await triggerHydrationForBlockQueue(injector, hydrationQueue, replayQueuedEventsFn);\n } else {\n // the topmost parent block is not yet in the registry, which may mean\n // a lazy loaded route, a control flow branch was taken, a route has\n // been navigated, etc. So we need to queue up the hydration process\n // so that it can be finished after the top block has had its defer\n // instruction executed.\n dehydratedBlockRegistry.awaitParentBlock(\n topmostParentBlock,\n async () =>\n await triggerHydrationForBlockQueue(injector, hydrationQueue, replayQueuedEventsFn),\n );\n }\n}\n\n/**\n * The core mechanism for incremental hydration. This triggers\n * hydration for all the blocks in the tree that need to be hydrated\n * and keeps track of all those blocks that were hydrated along the way.\n *\n * Note: the `replayQueuedEventsFn` is only provided when hydration is invoked\n * as a result of an event replay (via JsAction). When hydration is invoked from\n * an instruction set (e.g. `deferOnImmediate`) - there is no need to replay any\n * events.\n */\nexport async function triggerHydrationForBlockQueue(\n injector: Injector,\n hydrationQueue: string[],\n replayQueuedEventsFn?: Function,\n): Promise<void> {\n const dehydratedBlockRegistry = injector.get(DEHYDRATED_BLOCK_REGISTRY);\n const blocksBeingHydrated = dehydratedBlockRegistry.hydrating;\n\n // Indicate that we have some pending async work.\n const pendingTasks = injector.get(PendingTasksInternal);\n const taskId = pendingTasks.add();\n\n // Actually do the triggering and hydration of the queue of blocks\n for (let blockQueueIdx = 0; blockQueueIdx < hydrationQueue.length; blockQueueIdx++) {\n const dehydratedBlockId = hydrationQueue[blockQueueIdx];\n const dehydratedDeferBlock = dehydratedBlockRegistry.get(dehydratedBlockId);\n\n if (dehydratedDeferBlock != null) {\n // trigger the block resources and await next render for hydration. This should result\n // in the next block ɵɵdefer instruction being called and that block being added to the dehydrated registry.\n await triggerResourceLoadingForHydration(dehydratedDeferBlock);\n await nextRender(injector);\n\n // if the content has changed since server rendering, we need to check for the expected block\n // being in the registry or if errors occurred. In that case, we need to clean up the remaining expected\n // content that won't be rendered or fetched.\n if (deferBlockHasErrored(dehydratedDeferBlock)) {\n // Either the expected block has not yet had its ɵɵdefer instruction called or the block errored out when fetching\n // resources. In the former case, either we're hydrating too soon or the client and server differ. In both cases,\n // we need to clean up child content and promises.\n removeDehydratedViewList(dehydratedDeferBlock);\n cleanupRemainingHydrationQueue(\n hydrationQueue.slice(blockQueueIdx),\n dehydratedBlockRegistry,\n );\n break;\n }\n // The defer block has not errored and we've finished fetching resources and rendering.\n // At this point it is safe to resolve the hydration promise.\n blocksBeingHydrated.get(dehydratedBlockId)!.resolve();\n } else {\n // The expected block has not yet had its ɵɵdefer instruction called. This is likely due to content changing between\n // client and server. We need to clean up the dehydrated DOM in the container since it no longer is valid.\n cleanupParentContainer(blockQueueIdx, hydrationQueue, dehydratedBlockRegistry);\n cleanupRemainingHydrationQueue(hydrationQueue.slice(blockQueueIdx), dehydratedBlockRegistry);\n break;\n }\n }\n\n const lastBlockName = hydrationQueue[hydrationQueue.length - 1];\n\n // Await hydration completion for the last block.\n await blocksBeingHydrated.get(lastBlockName)?.promise;\n\n // All async work is done, remove the taskId from the registry.\n pendingTasks.remove(taskId);\n\n // Replay any queued events, if any exist and the replay operation was requested.\n if (replayQueuedEventsFn) {\n replayQueuedEventsFn(hydrationQueue);\n }\n\n // Cleanup after hydration of all affected defer blocks.\n cleanupHydratedDeferBlocks(\n dehydratedBlockRegistry.get(lastBlockName),\n hydrationQueue,\n dehydratedBlockRegistry,\n injector.get(ApplicationRef),\n );\n}\n\nexport function deferBlockHasErrored(deferBlock: DehydratedDeferBlock): boolean {\n return (\n getLDeferBlockDetails(deferBlock.lView, deferBlock.tNode)[DEFER_BLOCK_STATE] ===\n DeferBlockState.Error\n );\n}\n\n/**\n * Clean up the parent container of a block where content changed between server and client.\n * The parent of a block going through `triggerHydrationFromBlockName` will contain the\n * dehydrated content that needs to be cleaned up. So we have to do the clean up from that location\n * in the tree.\n */\nfunction cleanupParentContainer(\n currentBlockIdx: number,\n hydrationQueue: string[],\n dehydratedBlockRegistry: DehydratedBlockRegistry,\n) {\n // If a parent block exists, it's in the hydration queue in front of the current block.\n const parentDeferBlockIdx = currentBlockIdx - 1;\n const parentDeferBlock =\n parentDeferBlockIdx > -1\n ? dehydratedBlockRegistry.get(hydrationQueue[parentDeferBlockIdx])\n : null;\n if (parentDeferBlock) {\n cleanupLContainer(parentDeferBlock.lContainer);\n }\n}\n\nfunction cleanupRemainingHydrationQueue(\n hydrationQueue: string[],\n dehydratedBlockRegistry: DehydratedBlockRegistry,\n) {\n const blocksBeingHydrated = dehydratedBlockRegistry.hydrating;\n for (const dehydratedBlockId in hydrationQueue) {\n blocksBeingHydrated.get(dehydratedBlockId)?.reject();\n }\n dehydratedBlockRegistry.cleanup(hydrationQueue);\n}\n\n/**\n * Generates a new promise for every defer block in the hydrating queue\n */\nfunction populateHydratingStateForQueue(registry: DehydratedBlockRegistry, queue: string[]) {\n for (let blockId of queue) {\n registry.hydrating.set(blockId, (Promise as unknown as PromiseConstructor).withResolvers());\n }\n}\n\n// Waits for the next render cycle to complete\nfunction nextRender(injector: Injector): Promise<void> {\n return new Promise<void>((resolveFn) => afterNextRender(resolveFn, {injector}));\n}\n\nasync function triggerResourceLoadingForHydration(\n dehydratedBlock: DehydratedDeferBlock,\n): Promise<void> {\n const {tNode, lView} = dehydratedBlock;\n const lDetails = getLDeferBlockDetails(lView, tNode);\n\n return new Promise<void>((resolve) => {\n onDeferBlockCompletion(lDetails, resolve);\n triggerDeferBlock(TriggerType.Hydrate, lView, tNode);\n });\n}\n\n/**\n * Registers cleanup functions for a defer block when the block has finished\n * fetching and rendering\n */\nfunction onDeferBlockCompletion(lDetails: LDeferBlockDetails, callback: VoidFunction) {\n if (!Array.isArray(lDetails[ON_COMPLETE_FNS])) {\n lDetails[ON_COMPLETE_FNS] = [];\n }\n lDetails[ON_COMPLETE_FNS].push(callback);\n}\n\n/**\n * Determines whether specific trigger types should be attached during an instruction firing\n * to ensure the proper triggers for a given type are used.\n */\nexport function shouldAttachTrigger(triggerType: TriggerType, lView: LView, tNode: TNode): boolean {\n if (triggerType === TriggerType.Regular) {\n return shouldAttachRegularTrigger(lView, tNode);\n } else if (triggerType === TriggerType.Hydrate) {\n return !shouldAttachRegularTrigger(lView, tNode);\n }\n // TriggerType.Prefetch is active only on the client\n return !(typeof ngServerMode !== 'undefined' && ngServerMode);\n}\n\n/**\n * Defines whether a regular trigger logic (e.g. \"on viewport\") should be attached\n * to a defer block. This function defines a condition, which mutually excludes\n * `deferOn*` and `deferHydrateOn*` triggers, to make sure only one of the trigger\n * types is active for a block with the current state.\n */\nfunction shouldAttachRegularTrigger(lView: LView, tNode: TNode): boolean {\n const injector = lView[INJECTOR];\n\n const tDetails = getTDeferBlockDetails(lView[TVIEW], tNode);\n const incrementalHydrationEnabled = isIncrementalHydrationEnabled(injector);\n const hasHydrateTriggers =\n tDetails.flags !== null &&\n (tDetails.flags & TDeferDetailsFlags.HasHydrateTriggers) ===\n TDeferDetailsFlags.HasHydrateTriggers;\n\n // On the server:\n if (typeof ngServerMode !== 'undefined' && ngServerMode) {\n // Regular triggers are activated on the server when:\n // - Either Incremental Hydration is *not* enabled\n // - Or Incremental Hydration is enabled, but a given block doesn't have \"hydrate\" triggers\n return !incrementalHydrationEnabled || !hasHydrateTriggers;\n }\n\n // On the client:\n const lDetails = getLDeferBlockDetails(lView, tNode);\n const wasServerSideRendered = lDetails[SSR_UNIQUE_ID] !== null;\n\n if (hasHydrateTriggers && wasServerSideRendered && incrementalHydrationEnabled) {\n return false;\n }\n return true;\n}\n\n/**\n * Retrives a Defer Block's list of hydration triggers\n */\nexport function getHydrateTriggers(\n tView: TView,\n tNode: TNode,\n): Map<DeferBlockTrigger, HydrateTriggerDetails | null> {\n const tDetails = getTDeferBlockDetails(tView, tNode);\n return (tDetails.hydrateTriggers ??= new Map());\n}\n\n/**\n * Loops through all defer block summaries and ensures all the blocks triggers are\n * properly initialized\n */\nexport function processAndInitTriggers(\n injector: Injector,\n blockData: Map<string, BlockSummary>,\n nodes: Map<string, Comment>,\n) {\n const idleElements: ElementTrigger[] = [];\n const timerElements: ElementTrigger[] = [];\n const viewportElements: ElementTrigger[] = [];\n const immediateElements: ElementTrigger[] = [];\n for (let [blockId, blockSummary] of blockData) {\n const commentNode = nodes.get(blockId);\n if (commentNode !== undefined) {\n const numRootNodes = blockSummary.data[NUM_ROOT_NODES];\n let currentNode: Comment | HTMLElement = commentNode;\n for (let i = 0; i < numRootNodes; i++) {\n currentNode = currentNode.previousSibling as HTMLElement;\n if (currentNode.nodeType !== Node.ELEMENT_NODE) {\n continue;\n }\n const elementTrigger: ElementTrigger = {el: currentNode, blockName: blockId};\n // hydrate\n if (blockSummary.hydrate.idle) {\n idleElements.push(elementTrigger);\n }\n if (blockSummary.hydrate.immediate) {\n immediateElements.push(elementTrigger);\n }\n if (blockSummary.hydrate.timer !== null) {\n elementTrigger.delay = blockSummary.hydrate.timer;\n timerElements.push(elementTrigger);\n }\n if (blockSummary.hydrate.viewport) {\n viewportElements.push(elementTrigger);\n }\n }\n }\n }\n\n setIdleTriggers(injector, idleElements);\n setImmediateTriggers(injector, immediateElements);\n setViewportTriggers(injector, viewportElements);\n setTimerTriggers(injector, timerElements);\n}\n\nfunction setIdleTriggers(injector: Injector, elementTriggers: ElementTrigger[]) {\n for (const elementTrigger of elementTriggers) {\n const registry = injector.get(DEHYDRATED_BLOCK_REGISTRY);\n const onInvoke = () => triggerHydrationFromBlockName(injector, elementTrigger.blockName);\n const cleanupFn = onIdle(onInvoke, injector);\n registry.addCleanupFn(elementTrigger.blockName, cleanupFn);\n }\n}\n\nfunction setViewportTriggers(injector: Injector, elementTriggers: ElementTrigger[]) {\n if (elementTriggers.length > 0) {\n const registry = injector.get(DEHYDRATED_BLOCK_REGISTRY);\n for (let elementTrigger of elementTriggers) {\n const cleanupFn = onViewport(\n elementTrigger.el,\n () => triggerHydrationFromBlockName(injector, elementTrigger.blockName),\n injector,\n );\n registry.addCleanupFn(elementTrigger.blockName, cleanupFn);\n }\n }\n}\n\nfunction setTimerTriggers(injector: Injector, elementTriggers: ElementTrigger[]) {\n for (const elementTrigger of elementTriggers) {\n const registry = injector.get(DEHYDRATED_BLOCK_REGISTRY);\n const onInvoke = () => triggerHydrationFromBlockName(injector, elementTrigger.blockName);\n const timerFn = onTimer(elementTrigger.delay!);\n const cleanupFn = timerFn(onInvoke, injector);\n registry.addCleanupFn(elementTrigger.blockName, cleanupFn);\n }\n}\n\nfunction setImmediateTriggers(injector: Injector, elementTriggers: ElementTrigger[]) {\n for (const elementTrigger of elementTriggers) {\n // Note: we intentionally avoid awaiting each call and instead kick off\n // the hydration process simultaneously for all defer blocks with this trigger;\n triggerHydrationFromBlockName(injector, elementTrigger.blockName);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {setActiveConsumer} from '../../primitives/signals';\n\nimport {\n DEFER_BLOCK_ID,\n DEFER_BLOCK_STATE as SERIALIZED_DEFER_BLOCK_STATE,\n} from '../hydration/interfaces';\nimport {populateDehydratedViewsInLContainer} from '../linker/view_container_ref';\nimport {bindingUpdated} from '../render3/bindings';\nimport {declareTemplate} from '../render3/instructions/template';\nimport {DEHYDRATED_VIEWS} from '../render3/interfaces/container';\nimport {HEADER_OFFSET, INJECTOR, TVIEW} from '../render3/interfaces/view';\nimport {\n getCurrentTNode,\n getLView,\n getSelectedTNode,\n getTView,\n nextBindingIndex,\n} from '../render3/state';\nimport {removeLViewOnDestroy, storeLViewOnDestroy} from '../render3/util/view_utils';\nimport {performanceMarkFeature} from '../util/performance';\nimport {invokeAllTriggerCleanupFns, storeTriggerCleanupFn} from './cleanup';\nimport {onHover, onInteraction, onViewport, registerDomTrigger} from './dom_triggers';\nimport {onIdle} from './idle_scheduler';\nimport {\n DEFER_BLOCK_STATE,\n DeferBlockInternalState,\n DeferBlockState,\n DeferDependenciesLoadingState,\n DependencyResolverFn,\n DeferBlockTrigger,\n LDeferBlockDetails,\n TDeferBlockDetails,\n TriggerType,\n SSR_UNIQUE_ID,\n TDeferDetailsFlags,\n} from './interfaces';\nimport {onTimer} from './timer_scheduler';\nimport {\n getLDeferBlockDetails,\n getTDeferBlockDetails,\n setLDeferBlockDetails,\n setTDeferBlockDetails,\n trackTriggerForDebugging,\n} from './utils';\nimport {DEHYDRATED_BLOCK_REGISTRY, DehydratedBlockRegistry} from './registry';\nimport {assertIncrementalHydrationIsConfigured, assertSsrIdDefined} from '../hydration/utils';\nimport {ɵɵdeferEnableTimerScheduling, renderPlaceholder} from './rendering';\n\nimport {\n getHydrateTriggers,\n triggerHydrationFromBlockName,\n scheduleDelayedHydrating,\n scheduleDelayedPrefetching,\n scheduleDelayedTrigger,\n triggerDeferBlock,\n triggerPrefetching,\n triggerResourceLoading,\n shouldAttachTrigger,\n} from './triggering';\nimport {formatRuntimeError, RuntimeErrorCode} from '../errors';\nimport {Console} from '../console';\nimport {Injector} from '../di';\n\n/**\n * Indicates whether we've already produced a warning,\n * prevents the logic from producing it multiple times.\n */\nlet _hmrWarningProduced = false;\n\n/**\n * Logs a message into the console to indicate that `@defer` block\n * dependencies are loaded eagerly when the HMR mode is enabled.\n */\nfunction logHmrWarning(injector: Injector) {\n if (!_hmrWarningProduced) {\n _hmrWarningProduced = true;\n const console = injector.get(Console);\n // tslint:disable-next-line:no-console\n console.log(\n formatRuntimeError(\n RuntimeErrorCode.DEFER_IN_HMR_MODE,\n 'Angular has detected that this application contains `@defer` blocks ' +\n 'and the hot module replacement (HMR) mode is enabled. All `@defer` ' +\n 'block dependencies will be loaded eagerly.',\n ),\n );\n }\n}\n\n/**\n * Creates runtime data structures for defer blocks.\n *\n * @param index Index of the `defer` instruction.\n * @param primaryTmplIndex Index of the template with the primary block content.\n * @param dependencyResolverFn Function that contains dependencies for this defer block.\n * @param loadingTmplIndex Index of the template with the loading block content.\n * @param placeholderTmplIndex Index of the template with the placeholder block content.\n * @param errorTmplIndex Index of the template with the error block content.\n * @param loadingConfigIndex Index in the constants array of the configuration of the loading.\n * block.\n * @param placeholderConfigIndex Index in the constants array of the configuration of the\n * placeholder block.\n * @param enableTimerScheduling Function that enables timer-related scheduling if `after`\n * or `minimum` parameters are setup on the `@loading` or `@placeholder` blocks.\n * @param flags A set of flags to define a particular behavior (e.g. to indicate that\n * hydrate triggers are present and regular triggers should be deactivated\n * in certain scenarios).\n *\n * @codeGenApi\n */\nexport function ɵɵdefer(\n index: number,\n primaryTmplIndex: number,\n dependencyResolverFn?: DependencyResolverFn | null,\n loadingTmplIndex?: number | null,\n placeholderTmplIndex?: number | null,\n errorTmplIndex?: number | null,\n loadingConfigIndex?: number | null,\n placeholderConfigIndex?: number | null,\n enableTimerScheduling?: typeof ɵɵdeferEnableTimerScheduling,\n flags?: TDeferDetailsFlags | null,\n) {\n const lView = getLView();\n const tView = getTView();\n const adjustedIndex = index + HEADER_OFFSET;\n const tNode = declareTemplate(lView, tView, index, null, 0, 0);\n const injector = lView[INJECTOR];\n\n if (tView.firstCreatePass) {\n performanceMarkFeature('NgDefer');\n\n if (ngDevMode && typeof ngHmrMode !== 'undefined' && ngHmrMode) {\n logHmrWarning(injector);\n }\n\n const tDetails: TDeferBlockDetails = {\n primaryTmplIndex,\n loadingTmplIndex: loadingTmplIndex ?? null,\n placeholderTmplIndex: placeholderTmplIndex ?? null,\n errorTmplIndex: errorTmplIndex ?? null,\n placeholderBlockConfig: null,\n loadingBlockConfig: null,\n dependencyResolverFn: dependencyResolverFn ?? null,\n loadingState: DeferDependenciesLoadingState.NOT_STARTED,\n loadingPromise: null,\n providers: null,\n hydrateTriggers: null,\n debug: null,\n flags: flags ?? TDeferDetailsFlags.Default,\n };\n enableTimerScheduling?.(tView, tDetails, placeholderConfigIndex, loadingConfigIndex);\n setTDeferBlockDetails(tView, adjustedIndex, tDetails);\n }\n\n const lContainer = lView[adjustedIndex];\n\n // If hydration is enabled, looks up dehydrated views in the DOM\n // using hydration annotation info and stores those views on LContainer.\n // In client-only mode, this function is a noop.\n populateDehydratedViewsInLContainer(lContainer, tNode, lView);\n\n let ssrBlockState = null;\n let ssrUniqueId: string | null = null;\n if (lContainer[DEHYDRATED_VIEWS]?.length > 0) {\n const info = lContainer[DEHYDRATED_VIEWS][0].data;\n ssrUniqueId = info[DEFER_BLOCK_ID] ?? null;\n ssrBlockState = info[SERIALIZED_DEFER_BLOCK_STATE];\n }\n\n // Init instance-specific defer details and store it.\n const lDetails: LDeferBlockDetails = [\n null, // NEXT_DEFER_BLOCK_STATE\n DeferBlockInternalState.Initial, // DEFER_BLOCK_STATE\n null, // STATE_IS_FROZEN_UNTIL\n null, // LOADING_AFTER_CLEANUP_FN\n null, // TRIGGER_CLEANUP_FNS\n null, // PREFETCH_TRIGGER_CLEANUP_FNS\n ssrUniqueId, // SSR_UNIQUE_ID\n ssrBlockState, // SSR_BLOCK_STATE\n null, // ON_COMPLETE_FNS\n null, // HYDRATE_TRIGGER_CLEANUP_FNS\n ];\n setLDeferBlockDetails(lView, adjustedIndex, lDetails);\n\n let registry: DehydratedBlockRegistry | null = null;\n if (ssrUniqueId !== null) {\n ngDevMode && assertIncrementalHydrationIsConfigured(injector);\n\n // Store this defer block in the registry, to have an access to\n // internal data structures from hydration runtime code.\n registry = injector.get(DEHYDRATED_BLOCK_REGISTRY);\n registry.add(ssrUniqueId, {lView, tNode, lContainer});\n }\n\n const onLViewDestroy = () => {\n invokeAllTriggerCleanupFns(lDetails);\n if (ssrUniqueId !== null) {\n registry?.cleanup([ssrUniqueId]);\n }\n };\n\n // When defer block is triggered - unsubscribe from LView destroy cleanup.\n storeTriggerCleanupFn(TriggerType.Regular, lDetails, () =>\n removeLViewOnDestroy(lView, onLViewDestroy),\n );\n storeLViewOnDestroy(lView, onLViewDestroy);\n}\n\n/**\n * Loads defer block dependencies when a trigger value becomes truthy.\n * @codeGenApi\n */\nexport function ɵɵdeferWhen(rawValue: unknown) {\n const lView = getLView();\n const tNode = getSelectedTNode();\n\n if (ngDevMode) {\n trackTriggerForDebugging(lView[TVIEW], tNode, 'when <expression>');\n }\n\n if (!shouldAttachTrigger(TriggerType.Regular, lView, tNode)) return;\n\n const bindingIndex = nextBindingIndex();\n if (bindingUpdated(lView, bindingIndex, rawValue)) {\n const prevConsumer = setActiveConsumer(null);\n try {\n const value = Boolean(rawValue); // handle truthy or falsy values\n const lDetails = getLDeferBlockDetails(lView, tNode);\n const renderedState = lDetails[DEFER_BLOCK_STATE];\n if (value === false && renderedState === DeferBlockInternalState.Initial) {\n // If nothing is rendered yet, render a placeholder (if defined).\n renderPlaceholder(lView, tNode);\n } else if (\n value === true &&\n (renderedState === DeferBlockInternalState.Initial ||\n renderedState === DeferBlockState.Placeholder)\n ) {\n triggerDeferBlock(TriggerType.Regular, lView, tNode);\n }\n } finally {\n setActiveConsumer(prevConsumer);\n }\n }\n}\n\n/**\n * Prefetches the deferred content when a value becomes truthy.\n * @codeGenApi\n */\nexport function ɵɵdeferPrefetchWhen(rawValue: unknown) {\n const lView = getLView();\n const tNode = getSelectedTNode();\n\n if (ngDevMode) {\n trackTriggerForDebugging(lView[TVIEW], tNode, 'prefetch when <expression>');\n }\n\n if (!shouldAttachTrigger(TriggerType.Prefetch, lView, tNode)) return;\n\n const bindingIndex = nextBindingIndex();\n\n if (bindingUpdated(lView, bindingIndex, rawValue)) {\n const prevConsumer = setActiveConsumer(null);\n try {\n const value = Boolean(rawValue); // handle truthy or falsy values\n const tView = lView[TVIEW];\n const tNode = getSelectedTNode();\n const tDetails = getTDeferBlockDetails(tView, tNode);\n if (value === true && tDetails.loadingState === DeferDependenciesLoadingState.NOT_STARTED) {\n // If loading has not been started yet, trigger it now.\n triggerPrefetching(tDetails, lView, tNode);\n }\n } finally {\n setActiveConsumer(prevConsumer);\n }\n }\n}\n\n/**\n * Hydrates the deferred content when a value becomes truthy.\n * @codeGenApi\n */\nexport function ɵɵdeferHydrateWhen(rawValue: unknown) {\n const lView = getLView();\n const tNode = getSelectedTNode();\n\n if (ngDevMode) {\n trackTriggerForDebugging(lView[TVIEW], tNode, 'hydrate when <expression>');\n }\n\n if (!shouldAttachTrigger(TriggerType.Hydrate, lView, tNode)) return;\n\n // TODO(incremental-hydration): audit all defer instructions to reduce unnecessary work by\n // moving function calls inside their relevant control flow blocks\n const bindingIndex = nextBindingIndex();\n const tView = getTView();\n const hydrateTriggers = getHydrateTriggers(tView, tNode);\n hydrateTriggers.set(DeferBlockTrigger.When, null);\n\n if (bindingUpdated(lView, bindingIndex, rawValue)) {\n if (typeof ngServerMode !== 'undefined' && ngServerMode) {\n // We are on the server and SSR for defer blocks is enabled.\n triggerDeferBlock(TriggerType.Hydrate, lView, tNode);\n } else {\n const injector = lView[INJECTOR];\n const prevConsumer = setActiveConsumer(null);\n try {\n const value = Boolean(rawValue); // handle truthy or falsy values\n if (value === true) {\n // The `when` condition has changed to `true`, trigger defer block loading\n // if the block is either in initial (nothing is rendered) or a placeholder\n // state.\n const lDetails = getLDeferBlockDetails(lView, tNode);\n const ssrUniqueId = lDetails[SSR_UNIQUE_ID]!;\n ngDevMode && assertSsrIdDefined(ssrUniqueId);\n triggerHydrationFromBlockName(injector, ssrUniqueId);\n }\n } finally {\n setActiveConsumer(prevConsumer);\n }\n }\n }\n}\n\n/**\n * Specifies that hydration never occurs.\n * @codeGenApi\n */\nexport function ɵɵdeferHydrateNever() {\n const lView = getLView();\n const tNode = getCurrentTNode()!;\n\n if (ngDevMode) {\n trackTriggerForDebugging(lView[TVIEW], tNode, 'hydrate never');\n }\n\n if (!shouldAttachTrigger(TriggerType.Hydrate, lView, tNode)) return;\n\n const hydrateTriggers = getHydrateTriggers(getTView(), tNode);\n hydrateTriggers.set(DeferBlockTrigger.Never, null);\n\n if (typeof ngServerMode !== 'undefined' && ngServerMode) {\n // We are on the server and SSR for defer blocks is enabled.\n triggerDeferBlock(TriggerType.Hydrate, lView, tNode);\n }\n}\n\n/**\n * Sets up logic to handle the `on idle` deferred trigger.\n * @codeGenApi\n */\nexport function ɵɵdeferOnIdle() {\n const lView = getLView();\n const tNode = getCurrentTNode()!;\n\n if (ngDevMode) {\n trackTriggerForDebugging(lView[TVIEW], tNode, 'on idle');\n }\n\n if (!shouldAttachTrigger(TriggerType.Regular, lView, tNode)) return;\n\n scheduleDelayedTrigger(onIdle);\n}\n\n/**\n * Sets up logic to handle the `prefetch on idle` deferred trigger.\n * @codeGenApi\n */\nexport function ɵɵdeferPrefetchOnIdle() {\n const lView = getLView();\n const tNode = getCurrentTNode()!;\n\n if (ngDevMode) {\n trackTriggerForDebugging(lView[TVIEW], tNode, 'prefetch on idle');\n }\n\n if (!shouldAttachTrigger(TriggerType.Prefetch, lView, tNode)) return;\n\n scheduleDelayedPrefetching(onIdle, DeferBlockTrigger.Idle);\n}\n\n/**\n * Sets up logic to handle the `on idle` deferred trigger.\n * @codeGenApi\n */\nexport function ɵɵdeferHydrateOnIdle() {\n const lView = getLView();\n const tNode = getCurrentTNode()!;\n\n if (ngDevMode) {\n trackTriggerForDebugging(lView[TVIEW], tNode, 'hydrate on idle');\n }\n\n if (!shouldAttachTrigger(TriggerType.Hydrate, lView, tNode)) return;\n\n const hydrateTriggers = getHydrateTriggers(getTView(), tNode);\n hydrateTriggers.set(DeferBlockTrigger.Idle, null);\n\n if (typeof ngServerMode !== 'undefined' && ngServerMode) {\n // We are on the server and SSR for defer blocks is enabled.\n triggerDeferBlock(TriggerType.Hydrate, lView, tNode);\n } else {\n scheduleDelayedHydrating(onIdle, lView, tNode);\n }\n}\n\n/**\n * Sets up logic to handle the `on immediate` deferred trigger.\n * @codeGenApi\n */\nexport function ɵɵdeferOnImmediate() {\n const lView = getLView();\n const tNode = getCurrentTNode()!;\n\n if (ngDevMode) {\n trackTriggerForDebugging(lView[TVIEW], tNode, 'on immediate');\n }\n\n if (!shouldAttachTrigger(TriggerType.Regular, lView, tNode)) return;\n\n // Render placeholder block only if loading template is not present and we're on\n // the client to avoid content flickering, since it would be immediately replaced\n // by the loading block.\n const tDetails = getTDeferBlockDetails(lView[TVIEW], tNode);\n if (tDetails.loadingTmplIndex === null) {\n renderPlaceholder(lView, tNode);\n }\n triggerDeferBlock(TriggerType.Regular, lView, tNode);\n}\n\n/**\n * Sets up logic to handle the `prefetch on immediate` deferred trigger.\n * @codeGenApi\n */\nexport function ɵɵdeferPrefetchOnImmediate() {\n const lView = getLView();\n const tNode = getCurrentTNode()!;\n\n if (ngDevMode) {\n trackTriggerForDebugging(lView[TVIEW], tNode, 'prefetch on immediate');\n }\n\n if (!shouldAttachTrigger(TriggerType.Prefetch, lView, tNode)) return;\n\n const tView = lView[TVIEW];\n const tDetails = getTDeferBlockDetails(tView, tNode);\n\n if (tDetails.loadingState === DeferDependenciesLoadingState.NOT_STARTED) {\n triggerResourceLoading(tDetails, lView, tNode);\n }\n}\n\n/**\n * Sets up logic to handle the `on immediate` hydrate trigger.\n * @codeGenApi\n */\nexport function ɵɵdeferHydrateOnImmediate() {\n const lView = getLView();\n const tNode = getCurrentTNode()!;\n\n if (ngDevMode) {\n trackTriggerForDebugging(lView[TVIEW], tNode, 'hydrate on immediate');\n }\n\n if (!shouldAttachTrigger(TriggerType.Hydrate, lView, tNode)) return;\n\n const hydrateTriggers = getHydrateTriggers(getTView(), tNode);\n hydrateTriggers.set(DeferBlockTrigger.Immediate, null);\n\n if (typeof ngServerMode !== 'undefined' && ngServerMode) {\n triggerDeferBlock(TriggerType.Hydrate, lView, tNode);\n } else {\n const injector = lView[INJECTOR];\n const lDetails = getLDeferBlockDetails(lView, tNode);\n const ssrUniqueId = lDetails[SSR_UNIQUE_ID]!;\n ngDevMode && assertSsrIdDefined(ssrUniqueId);\n triggerHydrationFromBlockName(injector, ssrUniqueId);\n }\n}\n/**\n * Creates runtime data structures for the `on timer` deferred trigger.\n * @param delay Amount of time to wait before loading the content.\n * @codeGenApi\n */\nexport function ɵɵdeferOnTimer(delay: number) {\n const lView = getLView();\n const tNode = getCurrentTNode()!;\n\n if (ngDevMode) {\n trackTriggerForDebugging(lView[TVIEW], tNode, `on timer(${delay}ms)`);\n }\n\n if (!shouldAttachTrigger(TriggerType.Regular, lView, tNode)) return;\n\n scheduleDelayedTrigger(onTimer(delay));\n}\n\n/**\n * Creates runtime data structures for the `prefetch on timer` deferred trigger.\n * @param delay Amount of time to wait before prefetching the content.\n * @codeGenApi\n */\nexport function ɵɵdeferPrefetchOnTimer(delay: number) {\n const lView = getLView();\n const tNode = getCurrentTNode()!;\n\n if (ngDevMode) {\n trackTriggerForDebugging(lView[TVIEW], tNode, `prefetch on timer(${delay}ms)`);\n }\n\n if (!shouldAttachTrigger(TriggerType.Prefetch, lView, tNode)) return;\n\n scheduleDelayedPrefetching(onTimer(delay), DeferBlockTrigger.Timer);\n}\n\n/**\n * Creates runtime data structures for the `on timer` hydrate trigger.\n * @param delay Amount of time to wait before loading the content.\n * @codeGenApi\n */\nexport function ɵɵdeferHydrateOnTimer(delay: number) {\n const lView = getLView();\n const tNode = getCurrentTNode()!;\n\n if (ngDevMode) {\n trackTriggerForDebugging(lView[TVIEW], tNode, `hydrate on timer(${delay}ms)`);\n }\n\n if (!shouldAttachTrigger(TriggerType.Hydrate, lView, tNode)) return;\n\n const hydrateTriggers = getHydrateTriggers(getTView(), tNode);\n hydrateTriggers.set(DeferBlockTrigger.Timer, {delay});\n\n if (typeof ngServerMode !== 'undefined' && ngServerMode) {\n // We are on the server and SSR for defer blocks is enabled.\n triggerDeferBlock(TriggerType.Hydrate, lView, tNode);\n } else {\n scheduleDelayedHydrating(onTimer(delay), lView, tNode);\n }\n}\n\n/**\n * Creates runtime data structures for the `on hover` deferred trigger.\n * @param triggerIndex Index at which to find the trigger element.\n * @param walkUpTimes Number of times to walk up/down the tree hierarchy to find the trigger.\n * @codeGenApi\n */\nexport function ɵɵdeferOnHover(triggerIndex: number, walkUpTimes?: number) {\n const lView = getLView();\n const tNode = getCurrentTNode()!;\n\n if (ngDevMode) {\n trackTriggerForDebugging(\n lView[TVIEW],\n tNode,\n `on hover${walkUpTimes === -1 ? '' : '(<target>)'}`,\n );\n }\n\n if (!shouldAttachTrigger(TriggerType.Regular, lView, tNode)) return;\n\n renderPlaceholder(lView, tNode);\n\n // Avoid adding event listeners when this instruction is invoked on the server.\n if (!(typeof ngServerMode !== 'undefined' && ngServerMode)) {\n registerDomTrigger(\n lView,\n tNode,\n triggerIndex,\n walkUpTimes,\n onHover,\n () => triggerDeferBlock(TriggerType.Regular, lView, tNode),\n TriggerType.Regular,\n );\n }\n}\n\n/**\n * Creates runtime data structures for the `prefetch on hover` deferred trigger.\n * @param triggerIndex Index at which to find the trigger element.\n * @param walkUpTimes Number of times to walk up/down the tree hierarchy to find the trigger.\n * @codeGenApi\n */\nexport function ɵɵdeferPrefetchOnHover(triggerIndex: number, walkUpTimes?: number) {\n const lView = getLView();\n const tNode = getCurrentTNode()!;\n\n if (ngDevMode) {\n trackTriggerForDebugging(\n lView[TVIEW],\n tNode,\n `prefetch on hover${walkUpTimes === -1 ? '' : '(<target>)'}`,\n );\n }\n\n if (!shouldAttachTrigger(TriggerType.Prefetch, lView, tNode)) return;\n\n const tView = lView[TVIEW];\n const tDetails = getTDeferBlockDetails(tView, tNode);\n\n if (tDetails.loadingState === DeferDependenciesLoadingState.NOT_STARTED) {\n registerDomTrigger(\n lView,\n tNode,\n triggerIndex,\n walkUpTimes,\n onHover,\n () => triggerPrefetching(tDetails, lView, tNode),\n TriggerType.Prefetch,\n );\n }\n}\n\n/**\n * Creates runtime data structures for the `on hover` hydrate trigger.\n * @codeGenApi\n */\nexport function ɵɵdeferHydrateOnHover() {\n const lView = getLView();\n const tNode = getCurrentTNode()!;\n\n if (ngDevMode) {\n trackTriggerForDebugging(lView[TVIEW], tNode, 'hydrate on hover');\n }\n\n if (!shouldAttachTrigger(TriggerType.Hydrate, lView, tNode)) return;\n\n const hydrateTriggers = getHydrateTriggers(getTView(), tNode);\n hydrateTriggers.set(DeferBlockTrigger.Hover, null);\n\n if (typeof ngServerMode !== 'undefined' && ngServerMode) {\n // We are on the server and SSR for defer blocks is enabled.\n triggerDeferBlock(TriggerType.Hydrate, lView, tNode);\n }\n // The actual triggering of hydration on hover is handled by JSAction in\n // event_replay.ts.\n}\n\n/**\n * Creates runtime data structures for the `on interaction` deferred trigger.\n * @param triggerIndex Index at which to find the trigger element.\n * @param walkUpTimes Number of times to walk up/down the tree hierarchy to find the trigger.\n * @codeGenApi\n */\nexport function ɵɵdeferOnInteraction(triggerIndex: number, walkUpTimes?: number) {\n const lView = getLView();\n const tNode = getCurrentTNode()!;\n\n if (ngDevMode) {\n trackTriggerForDebugging(\n lView[TVIEW],\n tNode,\n `on interaction${walkUpTimes === -1 ? '' : '(<target>)'}`,\n );\n }\n\n if (!shouldAttachTrigger(TriggerType.Regular, lView, tNode)) return;\n\n renderPlaceholder(lView, tNode);\n\n // Avoid adding event listeners when this instruction is invoked on the server.\n if (!(typeof ngServerMode !== 'undefined' && ngServerMode)) {\n registerDomTrigger(\n lView,\n tNode,\n triggerIndex,\n walkUpTimes,\n onInteraction,\n () => triggerDeferBlock(TriggerType.Regular, lView, tNode),\n TriggerType.Regular,\n );\n }\n}\n\n/**\n * Creates runtime data structures for the `prefetch on interaction` deferred trigger.\n * @param triggerIndex Index at which to find the trigger element.\n * @param walkUpTimes Number of times to walk up/down the tree hierarchy to find the trigger.\n * @codeGenApi\n */\nexport function ɵɵdeferPrefetchOnInteraction(triggerIndex: number, walkUpTimes?: number) {\n const lView = getLView();\n const tNode = getCurrentTNode()!;\n\n if (ngDevMode) {\n trackTriggerForDebugging(\n lView[TVIEW],\n tNode,\n `prefetch on interaction${walkUpTimes === -1 ? '' : '(<target>)'}`,\n );\n }\n\n if (!shouldAttachTrigger(TriggerType.Prefetch, lView, tNode)) return;\n\n const tView = lView[TVIEW];\n const tDetails = getTDeferBlockDetails(tView, tNode);\n\n if (tDetails.loadingState === DeferDependenciesLoadingState.NOT_STARTED) {\n registerDomTrigger(\n lView,\n tNode,\n triggerIndex,\n walkUpTimes,\n onInteraction,\n () => triggerPrefetching(tDetails, lView, tNode),\n TriggerType.Prefetch,\n );\n }\n}\n\n/**\n * Creates runtime data structures for the `on interaction` hydrate trigger.\n * @codeGenApi\n */\nexport function ɵɵdeferHydrateOnInteraction() {\n const lView = getLView();\n const tNode = getCurrentTNode()!;\n\n if (ngDevMode) {\n trackTriggerForDebugging(lView[TVIEW], tNode, 'hydrate on interaction');\n }\n\n if (!shouldAttachTrigger(TriggerType.Hydrate, lView, tNode)) return;\n\n const hydrateTriggers = getHydrateTriggers(getTView(), tNode);\n hydrateTriggers.set(DeferBlockTrigger.Interaction, null);\n\n if (typeof ngServerMode !== 'undefined' && ngServerMode) {\n // We are on the server and SSR for defer blocks is enabled.\n triggerDeferBlock(TriggerType.Hydrate, lView, tNode);\n }\n // The actual triggering of hydration on interaction is handled by JSAction in\n // event_replay.ts.\n}\n\n/**\n * Creates runtime data structures for the `on viewport` deferred trigger.\n * @param triggerIndex Index at which to find the trigger element.\n * @param walkUpTimes Number of times to walk up/down the tree hierarchy to find the trigger.\n * @codeGenApi\n */\nexport function ɵɵdeferOnViewport(triggerIndex: number, walkUpTimes?: number) {\n const lView = getLView();\n const tNode = getCurrentTNode()!;\n\n if (ngDevMode) {\n trackTriggerForDebugging(\n lView[TVIEW],\n tNode,\n `on viewport${walkUpTimes === -1 ? '' : '(<target>)'}`,\n );\n }\n\n if (!shouldAttachTrigger(TriggerType.Regular, lView, tNode)) return;\n\n renderPlaceholder(lView, tNode);\n\n // Avoid adding event listeners when this instruction is invoked on the server.\n if (!(typeof ngServerMode !== 'undefined' && ngServerMode)) {\n registerDomTrigger(\n lView,\n tNode,\n triggerIndex,\n walkUpTimes,\n onViewport,\n () => triggerDeferBlock(TriggerType.Regular, lView, tNode),\n TriggerType.Regular,\n );\n }\n}\n\n/**\n * Creates runtime data structures for the `prefetch on viewport` deferred trigger.\n * @param triggerIndex Index at which to find the trigger element.\n * @param walkUpTimes Number of times to walk up/down the tree hierarchy to find the trigger.\n * @codeGenApi\n */\nexport function ɵɵdeferPrefetchOnViewport(triggerIndex: number, walkUpTimes?: number) {\n const lView = getLView();\n const tNode = getCurrentTNode()!;\n\n if (ngDevMode) {\n trackTriggerForDebugging(\n lView[TVIEW],\n tNode,\n `prefetch on viewport${walkUpTimes === -1 ? '' : '(<target>)'}`,\n );\n }\n\n if (!shouldAttachTrigger(TriggerType.Prefetch, lView, tNode)) return;\n\n const tView = lView[TVIEW];\n const tDetails = getTDeferBlockDetails(tView, tNode);\n\n if (tDetails.loadingState === DeferDependenciesLoadingState.NOT_STARTED) {\n registerDomTrigger(\n lView,\n tNode,\n triggerIndex,\n walkUpTimes,\n onViewport,\n () => triggerPrefetching(tDetails, lView, tNode),\n TriggerType.Prefetch,\n );\n }\n}\n\n/**\n * Creates runtime data structures for the `on viewport` hydrate trigger.\n * @codeGenApi\n */\nexport function ɵɵdeferHydrateOnViewport() {\n const lView = getLView();\n const tNode = getCurrentTNode()!;\n\n if (ngDevMode) {\n trackTriggerForDebugging(lView[TVIEW], tNode, 'hydrate on viewport');\n }\n\n if (!shouldAttachTrigger(TriggerType.Hydrate, lView, tNode)) return;\n\n const hydrateTriggers = getHydrateTriggers(getTView(), tNode);\n hydrateTriggers.set(DeferBlockTrigger.Viewport, null);\n\n if (typeof ngServerMode !== 'undefined' && ngServerMode) {\n // We are on the server and SSR for defer blocks is enabled.\n triggerDeferBlock(TriggerType.Hydrate, lView, tNode);\n }\n // The actual triggering of hydration on viewport happens in triggering.ts,\n // since these instructions won't exist for dehydrated content.\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport {bindingUpdated} from '../bindings';\nimport {SanitizerFn} from '../interfaces/sanitization';\nimport {getLView, getSelectedTNode, getTView, nextBindingIndex} from '../state';\nimport {elementAttributeInternal, storePropertyBindingMetadata} from './shared';\n\n/**\n * Updates the value of or removes a bound attribute on an Element.\n *\n * Used in the case of `[attr.title]=\"value\"`\n *\n * @param name name The name of the attribute.\n * @param value value The attribute is removed when value is `null` or `undefined`.\n * Otherwise the attribute value is set to the stringified value.\n * @param sanitizer An optional function used to sanitize the value.\n * @param namespace Optional namespace to use when setting the attribute.\n *\n * @codeGenApi\n */\nexport function ɵɵattribute(\n name: string,\n value: any,\n sanitizer?: SanitizerFn | null,\n namespace?: string,\n): typeof ɵɵattribute {\n const lView = getLView();\n const bindingIndex = nextBindingIndex();\n if (bindingUpdated(lView, bindingIndex, value)) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, name, value, sanitizer, namespace);\n ngDevMode && storePropertyBindingMetadata(tView.data, tNode, 'attr.' + name, bindingIndex);\n }\n return ɵɵattribute;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {assertEqual, assertLessThan} from '../../util/assert';\nimport {bindingUpdated, bindingUpdated2, bindingUpdated3, bindingUpdated4} from '../bindings';\nimport {LView} from '../interfaces/view';\nimport {getBindingIndex, incrementBindingIndex, nextBindingIndex, setBindingIndex} from '../state';\nimport {NO_CHANGE} from '../tokens';\nimport {renderStringify} from '../util/stringify_utils';\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 */\nexport function interpolationV(lView: LView, values: any[]): string | NO_CHANGE {\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 let isBindingUpdated = false;\n let bindingIndex = getBindingIndex();\n\n for (let i = 1; i < values.length; i += 2) {\n // Check if bindings (odd indexes) have changed\n isBindingUpdated = bindingUpdated(lView, bindingIndex++, values[i]) || isBindingUpdated;\n }\n setBindingIndex(bindingIndex);\n\n if (!isBindingUpdated) {\n return NO_CHANGE;\n }\n\n // Build the updated content\n let content = values[0];\n for (let i = 1; i < values.length; i += 2) {\n content += renderStringify(values[i]) + values[i + 1];\n }\n\n return content;\n}\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 */\nexport function interpolation1(\n lView: LView,\n prefix: string,\n v0: any,\n suffix: string,\n): string | NO_CHANGE {\n const different = bindingUpdated(lView, nextBindingIndex(), v0);\n return different ? prefix + renderStringify(v0) + suffix : NO_CHANGE;\n}\n\n/**\n * Creates an interpolation binding with 2 expressions.\n */\nexport function interpolation2(\n lView: LView,\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n suffix: string,\n): string | NO_CHANGE {\n const bindingIndex = getBindingIndex();\n const different = bindingUpdated2(lView, bindingIndex, v0, v1);\n incrementBindingIndex(2);\n\n return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + suffix : NO_CHANGE;\n}\n\n/**\n * Creates an interpolation binding with 3 expressions.\n */\nexport function interpolation3(\n lView: LView,\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n suffix: string,\n): string | NO_CHANGE {\n const bindingIndex = getBindingIndex();\n const different = bindingUpdated3(lView, bindingIndex, v0, v1, v2);\n incrementBindingIndex(3);\n\n return different\n ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + suffix\n : NO_CHANGE;\n}\n\n/**\n * Create an interpolation binding with 4 expressions.\n */\nexport function interpolation4(\n lView: LView,\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n i2: string,\n v3: any,\n suffix: string,\n): string | NO_CHANGE {\n const bindingIndex = getBindingIndex();\n const different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n incrementBindingIndex(4);\n\n return different\n ? prefix +\n renderStringify(v0) +\n i0 +\n renderStringify(v1) +\n i1 +\n renderStringify(v2) +\n i2 +\n renderStringify(v3) +\n suffix\n : NO_CHANGE;\n}\n\n/**\n * Creates an interpolation binding with 5 expressions.\n */\nexport function interpolation5(\n lView: LView,\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n i2: string,\n v3: any,\n i3: string,\n v4: any,\n suffix: string,\n): string | NO_CHANGE {\n const bindingIndex = getBindingIndex();\n let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n different = bindingUpdated(lView, bindingIndex + 4, v4) || different;\n incrementBindingIndex(5);\n\n return different\n ? prefix +\n renderStringify(v0) +\n i0 +\n renderStringify(v1) +\n i1 +\n renderStringify(v2) +\n i2 +\n renderStringify(v3) +\n i3 +\n renderStringify(v4) +\n suffix\n : NO_CHANGE;\n}\n\n/**\n * Creates an interpolation binding with 6 expressions.\n */\nexport function interpolation6(\n lView: LView,\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n i2: string,\n v3: any,\n i3: string,\n v4: any,\n i4: string,\n v5: any,\n suffix: string,\n): string | NO_CHANGE {\n const bindingIndex = getBindingIndex();\n let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n different = bindingUpdated2(lView, bindingIndex + 4, v4, v5) || different;\n incrementBindingIndex(6);\n\n return different\n ? prefix +\n renderStringify(v0) +\n i0 +\n renderStringify(v1) +\n i1 +\n renderStringify(v2) +\n i2 +\n renderStringify(v3) +\n i3 +\n renderStringify(v4) +\n i4 +\n renderStringify(v5) +\n suffix\n : NO_CHANGE;\n}\n\n/**\n * Creates an interpolation binding with 7 expressions.\n */\nexport function interpolation7(\n lView: LView,\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n i2: string,\n v3: any,\n i3: string,\n v4: any,\n i4: string,\n v5: any,\n i5: string,\n v6: any,\n suffix: string,\n): string | NO_CHANGE {\n const bindingIndex = getBindingIndex();\n let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n different = bindingUpdated3(lView, bindingIndex + 4, v4, v5, v6) || different;\n incrementBindingIndex(7);\n\n return different\n ? prefix +\n renderStringify(v0) +\n i0 +\n renderStringify(v1) +\n i1 +\n renderStringify(v2) +\n i2 +\n renderStringify(v3) +\n i3 +\n renderStringify(v4) +\n i4 +\n renderStringify(v5) +\n i5 +\n renderStringify(v6) +\n suffix\n : NO_CHANGE;\n}\n\n/**\n * Creates an interpolation binding with 8 expressions.\n */\nexport function interpolation8(\n lView: LView,\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n i2: string,\n v3: any,\n i3: string,\n v4: any,\n i4: string,\n v5: any,\n i5: string,\n v6: any,\n i6: string,\n v7: any,\n suffix: string,\n): string | NO_CHANGE {\n const bindingIndex = getBindingIndex();\n let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n different = bindingUpdated4(lView, bindingIndex + 4, v4, v5, v6, v7) || different;\n incrementBindingIndex(8);\n\n return different\n ? prefix +\n renderStringify(v0) +\n i0 +\n renderStringify(v1) +\n i1 +\n renderStringify(v2) +\n i2 +\n renderStringify(v3) +\n i3 +\n renderStringify(v4) +\n i4 +\n renderStringify(v5) +\n i5 +\n renderStringify(v6) +\n i6 +\n renderStringify(v7) +\n suffix\n : NO_CHANGE;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport {SanitizerFn} from '../interfaces/sanitization';\nimport {getBindingIndex, getLView, getSelectedTNode, getTView} from '../state';\nimport {NO_CHANGE} from '../tokens';\nimport {\n interpolation1,\n interpolation2,\n interpolation3,\n interpolation4,\n interpolation5,\n interpolation6,\n interpolation7,\n interpolation8,\n interpolationV,\n} from './interpolation';\nimport {elementAttributeInternal, storePropertyBindingMetadata} from './shared';\n\n/**\n *\n * Update an interpolated attribute on an element with single bound value surrounded by text.\n *\n * Used when the value passed to a property has 1 interpolated value in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate1('title', 'prefix', v0, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵattributeInterpolate1(\n attrName: string,\n prefix: string,\n v0: any,\n suffix: string,\n sanitizer?: SanitizerFn,\n namespace?: string,\n): typeof ɵɵattributeInterpolate1 {\n const lView = getLView();\n const interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n ngDevMode &&\n storePropertyBindingMetadata(\n getTView().data,\n tNode,\n 'attr.' + attrName,\n getBindingIndex() - 1,\n prefix,\n suffix,\n );\n }\n return ɵɵattributeInterpolate1;\n}\n\n/**\n *\n * Update an interpolated attribute on an element with 2 bound values surrounded by text.\n *\n * Used when the value passed to a property has 2 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate2('title', 'prefix', v0, '-', v1, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵattributeInterpolate2(\n attrName: string,\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n suffix: string,\n sanitizer?: SanitizerFn,\n namespace?: string,\n): typeof ɵɵattributeInterpolate2 {\n const lView = getLView();\n const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n ngDevMode &&\n storePropertyBindingMetadata(\n getTView().data,\n tNode,\n 'attr.' + attrName,\n getBindingIndex() - 2,\n prefix,\n i0,\n suffix,\n );\n }\n return ɵɵattributeInterpolate2;\n}\n\n/**\n *\n * Update an interpolated attribute on an element with 3 bound values surrounded by text.\n *\n * Used when the value passed to a property has 3 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate3(\n * 'title', 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵattributeInterpolate3(\n attrName: string,\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n suffix: string,\n sanitizer?: SanitizerFn,\n namespace?: string,\n): typeof ɵɵattributeInterpolate3 {\n const lView = getLView();\n const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n ngDevMode &&\n storePropertyBindingMetadata(\n getTView().data,\n tNode,\n 'attr.' + attrName,\n getBindingIndex() - 3,\n prefix,\n i0,\n i1,\n suffix,\n );\n }\n return ɵɵattributeInterpolate3;\n}\n\n/**\n *\n * Update an interpolated attribute on an element with 4 bound values surrounded by text.\n *\n * Used when the value passed to a property has 4 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate4(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵattributeInterpolate4(\n attrName: string,\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n i2: string,\n v3: any,\n suffix: string,\n sanitizer?: SanitizerFn,\n namespace?: string,\n): typeof ɵɵattributeInterpolate4 {\n const lView = getLView();\n const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n ngDevMode &&\n storePropertyBindingMetadata(\n getTView().data,\n tNode,\n 'attr.' + attrName,\n getBindingIndex() - 4,\n prefix,\n i0,\n i1,\n i2,\n suffix,\n );\n }\n return ɵɵattributeInterpolate4;\n}\n\n/**\n *\n * Update an interpolated attribute on an element with 5 bound values surrounded by text.\n *\n * Used when the value passed to a property has 5 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate5(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵattributeInterpolate5(\n attrName: string,\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n i2: string,\n v3: any,\n i3: string,\n v4: any,\n suffix: string,\n sanitizer?: SanitizerFn,\n namespace?: string,\n): typeof ɵɵattributeInterpolate5 {\n const lView = getLView();\n const interpolatedValue = interpolation5(\n lView,\n prefix,\n v0,\n i0,\n v1,\n i1,\n v2,\n i2,\n v3,\n i3,\n v4,\n suffix,\n );\n if (interpolatedValue !== NO_CHANGE) {\n const tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n ngDevMode &&\n storePropertyBindingMetadata(\n getTView().data,\n tNode,\n 'attr.' + attrName,\n getBindingIndex() - 5,\n prefix,\n i0,\n i1,\n i2,\n i3,\n suffix,\n );\n }\n return ɵɵattributeInterpolate5;\n}\n\n/**\n *\n * Update an interpolated attribute on an element with 6 bound values surrounded by text.\n *\n * Used when the value passed to a property has 6 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate6(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵattributeInterpolate6(\n attrName: string,\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n i2: string,\n v3: any,\n i3: string,\n v4: any,\n i4: string,\n v5: any,\n suffix: string,\n sanitizer?: SanitizerFn,\n namespace?: string,\n): typeof ɵɵattributeInterpolate6 {\n const lView = getLView();\n const interpolatedValue = interpolation6(\n lView,\n prefix,\n v0,\n i0,\n v1,\n i1,\n v2,\n i2,\n v3,\n i3,\n v4,\n i4,\n v5,\n suffix,\n );\n if (interpolatedValue !== NO_CHANGE) {\n const tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n ngDevMode &&\n storePropertyBindingMetadata(\n getTView().data,\n tNode,\n 'attr.' + attrName,\n getBindingIndex() - 6,\n prefix,\n i0,\n i1,\n i2,\n i3,\n i4,\n suffix,\n );\n }\n return ɵɵattributeInterpolate6;\n}\n\n/**\n *\n * Update an interpolated attribute on an element with 7 bound values surrounded by text.\n *\n * Used when the value passed to a property has 7 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate7(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵattributeInterpolate7(\n attrName: string,\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n i2: string,\n v3: any,\n i3: string,\n v4: any,\n i4: string,\n v5: any,\n i5: string,\n v6: any,\n suffix: string,\n sanitizer?: SanitizerFn,\n namespace?: string,\n): typeof ɵɵattributeInterpolate7 {\n const lView = getLView();\n const interpolatedValue = interpolation7(\n lView,\n prefix,\n v0,\n i0,\n v1,\n i1,\n v2,\n i2,\n v3,\n i3,\n v4,\n i4,\n v5,\n i5,\n v6,\n suffix,\n );\n if (interpolatedValue !== NO_CHANGE) {\n const tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n ngDevMode &&\n storePropertyBindingMetadata(\n getTView().data,\n tNode,\n 'attr.' + attrName,\n getBindingIndex() - 7,\n prefix,\n i0,\n i1,\n i2,\n i3,\n i4,\n i5,\n suffix,\n );\n }\n return ɵɵattributeInterpolate7;\n}\n\n/**\n *\n * Update an interpolated attribute on an element with 8 bound values surrounded by text.\n *\n * Used when the value passed to a property has 8 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate8(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param i6 Static value used for concatenation only.\n * @param v7 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵattributeInterpolate8(\n attrName: string,\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n i2: string,\n v3: any,\n i3: string,\n v4: any,\n i4: string,\n v5: any,\n i5: string,\n v6: any,\n i6: string,\n v7: any,\n suffix: string,\n sanitizer?: SanitizerFn,\n namespace?: string,\n): typeof ɵɵattributeInterpolate8 {\n const lView = getLView();\n const interpolatedValue = interpolation8(\n lView,\n prefix,\n v0,\n i0,\n v1,\n i1,\n v2,\n i2,\n v3,\n i3,\n v4,\n i4,\n v5,\n i5,\n v6,\n i6,\n v7,\n suffix,\n );\n if (interpolatedValue !== NO_CHANGE) {\n const tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n ngDevMode &&\n storePropertyBindingMetadata(\n getTView().data,\n tNode,\n 'attr.' + attrName,\n getBindingIndex() - 8,\n prefix,\n i0,\n i1,\n i2,\n i3,\n i4,\n i5,\n i6,\n suffix,\n );\n }\n return ɵɵattributeInterpolate8;\n}\n\n/**\n * Update an interpolated attribute on an element with 9 or more bound values surrounded by text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div\n * title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolateV(\n * 'title', ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n * 'suffix']);\n * ```\n *\n * @param attrName The name of the attribute to update.\n * @param values The collection of values and the strings in-between those values, beginning with\n * a string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵattributeInterpolateV(\n attrName: string,\n values: any[],\n sanitizer?: SanitizerFn,\n namespace?: string,\n): typeof ɵɵattributeInterpolateV {\n const lView = getLView();\n const interpolated = interpolationV(lView, values);\n if (interpolated !== NO_CHANGE) {\n const tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolated, sanitizer, namespace);\n if (ngDevMode) {\n const interpolationInBetween = [values[0]]; // prefix\n for (let i = 2; i < values.length; i += 2) {\n interpolationInBetween.push(values[i]);\n }\n storePropertyBindingMetadata(\n getTView().data,\n tNode,\n 'attr.' + attrName,\n getBindingIndex() - interpolationInBetween.length + 1,\n ...interpolationInBetween,\n );\n }\n }\n return ɵɵattributeInterpolateV;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {KeyValueArray} from '../../util/array_utils';\nimport {assertNumber, assertNumberInRange} from '../../util/assert';\n\n/**\n * Value stored in the `TData` which is needed to re-concatenate the styling.\n *\n * See: `TStylingKeyPrimitive` and `TStylingStatic`\n */\nexport type TStylingKey = TStylingKeyPrimitive | TStylingStatic;\n\n/**\n * The primitive portion (`TStylingStatic` removed) of the value stored in the `TData` which is\n * needed to re-concatenate the styling.\n *\n * - `string`: Stores the property name. Used with `ɵɵstyleProp`/`ɵɵclassProp` instruction.\n * - `null`: Represents map, so there is no name. Used with `ɵɵstyleMap`/`ɵɵclassMap`.\n * - `false`: Represents an ignore case. This happens when `ɵɵstyleProp`/`ɵɵclassProp` instruction\n * is combined with directive which shadows its input `@Input('class')`. That way the binding\n * should not participate in the styling resolution.\n */\nexport type TStylingKeyPrimitive = string | null | false;\n\n/**\n * Store the static values for the styling binding.\n *\n * The `TStylingStatic` is just `KeyValueArray` where key `\"\"` (stored at location 0) contains the\n * `TStylingKey` (stored at location 1). In other words this wraps the `TStylingKey` such that the\n * `\"\"` contains the wrapped value.\n *\n * When instructions are resolving styling they may need to look forward or backwards in the linked\n * list to resolve the value. For this reason we have to make sure that he linked list also contains\n * the static values. However the list only has space for one item per styling instruction. For this\n * reason we store the static values here as part of the `TStylingKey`. This means that the\n * resolution function when looking for a value needs to first look at the binding value, and than\n * at `TStylingKey` (if it exists).\n *\n * Imagine we have:\n *\n * ```angular-ts\n * <div class=\"TEMPLATE\" my-dir>\n *\n * @Directive({\n * host: {\n * class: 'DIR',\n * '[class.dynamic]': 'exp' // ɵɵclassProp('dynamic', ctx.exp);\n * }\n * })\n * ```\n *\n * In the above case the linked list will contain one item:\n *\n * ```ts\n * // assume binding location: 10 for `ɵɵclassProp('dynamic', ctx.exp);`\n * tData[10] = <TStylingStatic>[\n * '': 'dynamic', // This is the wrapped value of `TStylingKey`\n * 'DIR': true, // This is the default static value of directive binding.\n * ];\n * tData[10 + 1] = 0; // We don't have prev/next.\n *\n * lView[10] = undefined; // assume `ctx.exp` is `undefined`\n * lView[10 + 1] = undefined; // Just normalized `lView[10]`\n * ```\n *\n * So when the function is resolving styling value, it first needs to look into the linked list\n * (there is none) and than into the static `TStylingStatic` too see if there is a default value for\n * `dynamic` (there is not). Therefore it is safe to remove it.\n *\n * If setting `true` case:\n * ```ts\n * lView[10] = true; // assume `ctx.exp` is `true`\n * lView[10 + 1] = true; // Just normalized `lView[10]`\n * ```\n * So when the function is resolving styling value, it first needs to look into the linked list\n * (there is none) and than into `TNode.residualClass` (TNode.residualStyle) which contains\n * ```ts\n * tNode.residualClass = [\n * 'TEMPLATE': true,\n * ];\n * ```\n *\n * This means that it is safe to add class.\n */\nexport interface TStylingStatic extends KeyValueArray<any> {}\n\n/**\n * This is a branded number which contains previous and next index.\n *\n * When we come across styling instructions we need to store the `TStylingKey` in the correct\n * order so that we can re-concatenate the styling value in the desired priority.\n *\n * The insertion can happen either at the:\n * - end of template as in the case of coming across additional styling instruction in the template\n * - in front of the template in the case of coming across additional instruction in the\n * `hostBindings`.\n *\n * We use `TStylingRange` to store the previous and next index into the `TData` where the template\n * bindings can be found.\n *\n * - bit 0 is used to mark that the previous index has a duplicate for current value.\n * - bit 1 is used to mark that the next index has a duplicate for the current value.\n * - bits 2-16 are used to encode the next/tail of the template.\n * - bits 17-32 are used to encode the previous/head of template.\n *\n * NODE: *duplicate* false implies that it is statically known that this binding will not collide\n * with other bindings and therefore there is no need to check other bindings. For example the\n * bindings in `<div [style.color]=\"exp\" [style.width]=\"exp\">` will never collide and will have\n * their bits set accordingly. Previous duplicate means that we may need to check previous if the\n * current binding is `null`. Next duplicate means that we may need to check next bindings if the\n * current binding is not `null`.\n *\n * NOTE: `0` has special significance and represents `null` as in no additional pointer.\n */\nexport type TStylingRange = number & {\n __brand__: 'TStylingRange';\n};\n\n/**\n * Shift and masks constants for encoding two numbers into and duplicate info into a single number.\n */\nexport const enum StylingRange {\n /// Number of bits to shift for the previous pointer\n PREV_SHIFT = 17,\n /// Previous pointer mask.\n PREV_MASK = 0xfffe0000,\n\n /// Number of bits to shift for the next pointer\n NEXT_SHIFT = 2,\n /// Next pointer mask.\n NEXT_MASK = 0x001fffc,\n\n // Mask to remove negative bit. (interpret number as positive)\n UNSIGNED_MASK = 0x7fff,\n\n /**\n * This bit is set if the previous bindings contains a binding which could possibly cause a\n * duplicate. For example: `<div [style]=\"map\" [style.width]=\"width\">`, the `width` binding will\n * have previous duplicate set. The implication is that if `width` binding becomes `null`, it is\n * necessary to defer the value to `map.width`. (Because `width` overwrites `map.width`.)\n */\n PREV_DUPLICATE = 0x02,\n\n /**\n * This bit is set to if the next binding contains a binding which could possibly cause a\n * duplicate. For example: `<div [style]=\"map\" [style.width]=\"width\">`, the `map` binding will\n * have next duplicate set. The implication is that if `map.width` binding becomes not `null`, it\n * is necessary to defer the value to `width`. (Because `width` overwrites `map.width`.)\n */\n NEXT_DUPLICATE = 0x01,\n}\n\nexport function toTStylingRange(prev: number, next: number): TStylingRange {\n ngDevMode && assertNumberInRange(prev, 0, StylingRange.UNSIGNED_MASK);\n ngDevMode && assertNumberInRange(next, 0, StylingRange.UNSIGNED_MASK);\n return ((prev << StylingRange.PREV_SHIFT) | (next << StylingRange.NEXT_SHIFT)) as TStylingRange;\n}\n\nexport function getTStylingRangePrev(tStylingRange: TStylingRange): number {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n return (tStylingRange >> StylingRange.PREV_SHIFT) & StylingRange.UNSIGNED_MASK;\n}\n\nexport function getTStylingRangePrevDuplicate(tStylingRange: TStylingRange): boolean {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n return (tStylingRange & StylingRange.PREV_DUPLICATE) == StylingRange.PREV_DUPLICATE;\n}\n\nexport function setTStylingRangePrev(\n tStylingRange: TStylingRange,\n previous: number,\n): TStylingRange {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n ngDevMode && assertNumberInRange(previous, 0, StylingRange.UNSIGNED_MASK);\n return ((tStylingRange & ~StylingRange.PREV_MASK) |\n (previous << StylingRange.PREV_SHIFT)) as TStylingRange;\n}\n\nexport function setTStylingRangePrevDuplicate(tStylingRange: TStylingRange): TStylingRange {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n return (tStylingRange | StylingRange.PREV_DUPLICATE) as TStylingRange;\n}\n\nexport function getTStylingRangeNext(tStylingRange: TStylingRange): number {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n return (tStylingRange & StylingRange.NEXT_MASK) >> StylingRange.NEXT_SHIFT;\n}\n\nexport function setTStylingRangeNext(tStylingRange: TStylingRange, next: number): TStylingRange {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n ngDevMode && assertNumberInRange(next, 0, StylingRange.UNSIGNED_MASK);\n return ((tStylingRange & ~StylingRange.NEXT_MASK) | //\n (next << StylingRange.NEXT_SHIFT)) as TStylingRange;\n}\n\nexport function getTStylingRangeNextDuplicate(tStylingRange: TStylingRange): boolean {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n return (tStylingRange & StylingRange.NEXT_DUPLICATE) === StylingRange.NEXT_DUPLICATE;\n}\n\nexport function setTStylingRangeNextDuplicate(tStylingRange: TStylingRange): TStylingRange {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n return (tStylingRange | StylingRange.NEXT_DUPLICATE) as TStylingRange;\n}\n\nexport function getTStylingRangeTail(tStylingRange: TStylingRange): number {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n const next = getTStylingRangeNext(tStylingRange);\n return next === 0 ? getTStylingRangePrev(tStylingRange) : next;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {KeyValueArray, keyValueArrayIndexOf} from '../../util/array_utils';\nimport {assertEqual, assertIndexInRange, assertNotEqual} from '../../util/assert';\nimport {assertFirstUpdatePass} from '../assert';\nimport {TNode} from '../interfaces/node';\nimport {\n getTStylingRangeNext,\n getTStylingRangePrev,\n setTStylingRangeNext,\n setTStylingRangeNextDuplicate,\n setTStylingRangePrev,\n setTStylingRangePrevDuplicate,\n toTStylingRange,\n TStylingKey,\n TStylingKeyPrimitive,\n TStylingRange,\n} from '../interfaces/styling';\nimport {TData} from '../interfaces/view';\nimport {getTView} from '../state';\n\n/**\n * NOTE: The word `styling` is used interchangeably as style or class styling.\n *\n * This file contains code to link styling instructions together so that they can be replayed in\n * priority order. The file exists because Ivy styling instruction execution order does not match\n * that of the priority order. The purpose of this code is to create a linked list so that the\n * instructions can be traversed in priority order when computing the styles.\n *\n * Assume we are dealing with the following code:\n * ```angular-ts\n * @Component({\n * template: `\n * <my-cmp [style]=\" {color: '#001'} \"\n * [style.color]=\" #002 \"\n * dir-style-color-1\n * dir-style-color-2> `\n * })\n * class ExampleComponent {\n * static ngComp = ... {\n * ...\n * // Compiler ensures that `ɵɵstyleProp` is after `ɵɵstyleMap`\n * ɵɵstyleMap({color: '#001'});\n * ɵɵstyleProp('color', '#002');\n * ...\n * }\n * }\n *\n * @Directive({\n * selector: `[dir-style-color-1]',\n * })\n * class Style1Directive {\n * @HostBinding('style') style = {color: '#005'};\n * @HostBinding('style.color') color = '#006';\n *\n * static ngDir = ... {\n * ...\n * // Compiler ensures that `ɵɵstyleProp` is after `ɵɵstyleMap`\n * ɵɵstyleMap({color: '#005'});\n * ɵɵstyleProp('color', '#006');\n * ...\n * }\n * }\n *\n * @Directive({\n * selector: `[dir-style-color-2]',\n * })\n * class Style2Directive {\n * @HostBinding('style') style = {color: '#007'};\n * @HostBinding('style.color') color = '#008';\n *\n * static ngDir = ... {\n * ...\n * // Compiler ensures that `ɵɵstyleProp` is after `ɵɵstyleMap`\n * ɵɵstyleMap({color: '#007'});\n * ɵɵstyleProp('color', '#008');\n * ...\n * }\n * }\n *\n * @Directive({\n * selector: `my-cmp',\n * })\n * class MyComponent {\n * @HostBinding('style') style = {color: '#003'};\n * @HostBinding('style.color') color = '#004';\n *\n * static ngComp = ... {\n * ...\n * // Compiler ensures that `ɵɵstyleProp` is after `ɵɵstyleMap`\n * ɵɵstyleMap({color: '#003'});\n * ɵɵstyleProp('color', '#004');\n * ...\n * }\n * }\n * ```\n *\n * The Order of instruction execution is:\n *\n * NOTE: the comment binding location is for illustrative purposes only.\n *\n * ```ts\n * // Template: (ExampleComponent)\n * ɵɵstyleMap({color: '#001'}); // Binding index: 10\n * ɵɵstyleProp('color', '#002'); // Binding index: 12\n * // MyComponent\n * ɵɵstyleMap({color: '#003'}); // Binding index: 20\n * ɵɵstyleProp('color', '#004'); // Binding index: 22\n * // Style1Directive\n * ɵɵstyleMap({color: '#005'}); // Binding index: 24\n * ɵɵstyleProp('color', '#006'); // Binding index: 26\n * // Style2Directive\n * ɵɵstyleMap({color: '#007'}); // Binding index: 28\n * ɵɵstyleProp('color', '#008'); // Binding index: 30\n * ```\n *\n * The correct priority order of concatenation is:\n *\n * ```ts\n * // MyComponent\n * ɵɵstyleMap({color: '#003'}); // Binding index: 20\n * ɵɵstyleProp('color', '#004'); // Binding index: 22\n * // Style1Directive\n * ɵɵstyleMap({color: '#005'}); // Binding index: 24\n * ɵɵstyleProp('color', '#006'); // Binding index: 26\n * // Style2Directive\n * ɵɵstyleMap({color: '#007'}); // Binding index: 28\n * ɵɵstyleProp('color', '#008'); // Binding index: 30\n * // Template: (ExampleComponent)\n * ɵɵstyleMap({color: '#001'}); // Binding index: 10\n * ɵɵstyleProp('color', '#002'); // Binding index: 12\n * ```\n *\n * What color should be rendered?\n *\n * Once the items are correctly sorted in the list, the answer is simply the last item in the\n * concatenation list which is `#002`.\n *\n * To do so we keep a linked list of all of the bindings which pertain to this element.\n * Notice that the bindings are inserted in the order of execution, but the `TView.data` allows\n * us to traverse them in the order of priority.\n *\n * |Idx|`TView.data`|`LView` | Notes\n * |---|------------|-----------------|--------------\n * |...| | |\n * |10 |`null` |`{color: '#001'}`| `ɵɵstyleMap('color', {color: '#001'})`\n * |11 |`30 | 12` | ... |\n * |12 |`color` |`'#002'` | `ɵɵstyleProp('color', '#002')`\n * |13 |`10 | 0` | ... |\n * |...| | |\n * |20 |`null` |`{color: '#003'}`| `ɵɵstyleMap('color', {color: '#003'})`\n * |21 |`0 | 22` | ... |\n * |22 |`color` |`'#004'` | `ɵɵstyleProp('color', '#004')`\n * |23 |`20 | 24` | ... |\n * |24 |`null` |`{color: '#005'}`| `ɵɵstyleMap('color', {color: '#005'})`\n * |25 |`22 | 26` | ... |\n * |26 |`color` |`'#006'` | `ɵɵstyleProp('color', '#006')`\n * |27 |`24 | 28` | ... |\n * |28 |`null` |`{color: '#007'}`| `ɵɵstyleMap('color', {color: '#007'})`\n * |29 |`26 | 30` | ... |\n * |30 |`color` |`'#008'` | `ɵɵstyleProp('color', '#008')`\n * |31 |`28 | 10` | ... |\n *\n * The above data structure allows us to re-concatenate the styling no matter which data binding\n * changes.\n *\n * NOTE: in addition to keeping track of next/previous index the `TView.data` also stores prev/next\n * duplicate bit. The duplicate bit if true says there either is a binding with the same name or\n * there is a map (which may contain the name). This information is useful in knowing if other\n * styles with higher priority need to be searched for overwrites.\n *\n * NOTE: See `should support example in 'tnode_linked_list.ts' documentation` in\n * `tnode_linked_list_spec.ts` for working example.\n */\nlet __unused_const_as_closure_does_not_like_standalone_comment_blocks__: undefined;\n\n/**\n * Insert new `tStyleValue` at `TData` and link existing style bindings such that we maintain linked\n * list of styles and compute the duplicate flag.\n *\n * Note: this function is executed during `firstUpdatePass` only to populate the `TView.data`.\n *\n * The function works by keeping track of `tStylingRange` which contains two pointers pointing to\n * the head/tail of the template portion of the styles.\n * - if `isHost === false` (we are template) then insertion is at tail of `TStylingRange`\n * - if `isHost === true` (we are host binding) then insertion is at head of `TStylingRange`\n *\n * @param tData The `TData` to insert into.\n * @param tNode `TNode` associated with the styling element.\n * @param tStylingKey See `TStylingKey`.\n * @param index location of where `tStyleValue` should be stored (and linked into list.)\n * @param isHostBinding `true` if the insertion is for a `hostBinding`. (insertion is in front of\n * template.)\n * @param isClassBinding True if the associated `tStylingKey` as a `class` styling.\n * `tNode.classBindings` should be used (or `tNode.styleBindings` otherwise.)\n */\nexport function insertTStylingBinding(\n tData: TData,\n tNode: TNode,\n tStylingKeyWithStatic: TStylingKey,\n index: number,\n isHostBinding: boolean,\n isClassBinding: boolean,\n): void {\n ngDevMode && assertFirstUpdatePass(getTView());\n let tBindings = isClassBinding ? tNode.classBindings : tNode.styleBindings;\n let tmplHead = getTStylingRangePrev(tBindings);\n let tmplTail = getTStylingRangeNext(tBindings);\n\n tData[index] = tStylingKeyWithStatic;\n let isKeyDuplicateOfStatic = false;\n let tStylingKey: TStylingKeyPrimitive;\n if (Array.isArray(tStylingKeyWithStatic)) {\n // We are case when the `TStylingKey` contains static fields as well.\n const staticKeyValueArray = tStylingKeyWithStatic as KeyValueArray<any>;\n tStylingKey = staticKeyValueArray[1]; // unwrap.\n // We need to check if our key is present in the static so that we can mark it as duplicate.\n if (\n tStylingKey === null ||\n keyValueArrayIndexOf(staticKeyValueArray, tStylingKey as string) > 0\n ) {\n // tStylingKey is present in the statics, need to mark it as duplicate.\n isKeyDuplicateOfStatic = true;\n }\n } else {\n tStylingKey = tStylingKeyWithStatic;\n }\n if (isHostBinding) {\n // We are inserting host bindings\n\n // If we don't have template bindings then `tail` is 0.\n const hasTemplateBindings = tmplTail !== 0;\n // This is important to know because that means that the `head` can't point to the first\n // template bindings (there are none.) Instead the head points to the tail of the template.\n if (hasTemplateBindings) {\n // template head's \"prev\" will point to last host binding or to 0 if no host bindings yet\n const previousNode = getTStylingRangePrev(tData[tmplHead + 1] as TStylingRange);\n tData[index + 1] = toTStylingRange(previousNode, tmplHead);\n // if a host binding has already been registered, we need to update the next of that host\n // binding to point to this one\n if (previousNode !== 0) {\n // We need to update the template-tail value to point to us.\n tData[previousNode + 1] = setTStylingRangeNext(\n tData[previousNode + 1] as TStylingRange,\n index,\n );\n }\n // The \"previous\" of the template binding head should point to this host binding\n tData[tmplHead + 1] = setTStylingRangePrev(tData[tmplHead + 1] as TStylingRange, index);\n } else {\n tData[index + 1] = toTStylingRange(tmplHead, 0);\n // if a host binding has already been registered, we need to update the next of that host\n // binding to point to this one\n if (tmplHead !== 0) {\n // We need to update the template-tail value to point to us.\n tData[tmplHead + 1] = setTStylingRangeNext(tData[tmplHead + 1] as TStylingRange, index);\n }\n // if we don't have template, the head points to template-tail, and needs to be advanced.\n tmplHead = index;\n }\n } else {\n // We are inserting in template section.\n // We need to set this binding's \"previous\" to the current template tail\n tData[index + 1] = toTStylingRange(tmplTail, 0);\n ngDevMode &&\n assertEqual(\n tmplHead !== 0 && tmplTail === 0,\n false,\n 'Adding template bindings after hostBindings is not allowed.',\n );\n if (tmplHead === 0) {\n tmplHead = index;\n } else {\n // We need to update the previous value \"next\" to point to this binding\n tData[tmplTail + 1] = setTStylingRangeNext(tData[tmplTail + 1] as TStylingRange, index);\n }\n tmplTail = index;\n }\n\n // Now we need to update / compute the duplicates.\n // Starting with our location search towards head (least priority)\n if (isKeyDuplicateOfStatic) {\n tData[index + 1] = setTStylingRangePrevDuplicate(tData[index + 1] as TStylingRange);\n }\n markDuplicates(tData, tStylingKey, index, true);\n markDuplicates(tData, tStylingKey, index, false);\n markDuplicateOfResidualStyling(tNode, tStylingKey, tData, index, isClassBinding);\n\n tBindings = toTStylingRange(tmplHead, tmplTail);\n if (isClassBinding) {\n tNode.classBindings = tBindings;\n } else {\n tNode.styleBindings = tBindings;\n }\n}\n\n/**\n * Look into the residual styling to see if the current `tStylingKey` is duplicate of residual.\n *\n * @param tNode `TNode` where the residual is stored.\n * @param tStylingKey `TStylingKey` to store.\n * @param tData `TData` associated with the current `LView`.\n * @param index location of where `tStyleValue` should be stored (and linked into list.)\n * @param isClassBinding True if the associated `tStylingKey` as a `class` styling.\n * `tNode.classBindings` should be used (or `tNode.styleBindings` otherwise.)\n */\nfunction markDuplicateOfResidualStyling(\n tNode: TNode,\n tStylingKey: TStylingKey,\n tData: TData,\n index: number,\n isClassBinding: boolean,\n) {\n const residual = isClassBinding ? tNode.residualClasses : tNode.residualStyles;\n if (\n residual != null /* or undefined */ &&\n typeof tStylingKey == 'string' &&\n keyValueArrayIndexOf(residual, tStylingKey) >= 0\n ) {\n // We have duplicate in the residual so mark ourselves as duplicate.\n tData[index + 1] = setTStylingRangeNextDuplicate(tData[index + 1] as TStylingRange);\n }\n}\n\n/**\n * Marks `TStyleValue`s as duplicates if another style binding in the list has the same\n * `TStyleValue`.\n *\n * NOTE: this function is intended to be called twice once with `isPrevDir` set to `true` and once\n * with it set to `false` to search both the previous as well as next items in the list.\n *\n * No duplicate case\n * ```\n * [style.color]\n * [style.width.px] <<- index\n * [style.height.px]\n * ```\n *\n * In the above case adding `[style.width.px]` to the existing `[style.color]` produces no\n * duplicates because `width` is not found in any other part of the linked list.\n *\n * Duplicate case\n * ```\n * [style.color]\n * [style.width.em]\n * [style.width.px] <<- index\n * ```\n * In the above case adding `[style.width.px]` will produce a duplicate with `[style.width.em]`\n * because `width` is found in the chain.\n *\n * Map case 1\n * ```\n * [style.width.px]\n * [style.color]\n * [style] <<- index\n * ```\n * In the above case adding `[style]` will produce a duplicate with any other bindings because\n * `[style]` is a Map and as such is fully dynamic and could produce `color` or `width`.\n *\n * Map case 2\n * ```\n * [style]\n * [style.width.px]\n * [style.color] <<- index\n * ```\n * In the above case adding `[style.color]` will produce a duplicate because there is already a\n * `[style]` binding which is a Map and as such is fully dynamic and could produce `color` or\n * `width`.\n *\n * NOTE: Once `[style]` (Map) is added into the system all things are mapped as duplicates.\n * NOTE: We use `style` as example, but same logic is applied to `class`es as well.\n *\n * @param tData `TData` where the linked list is stored.\n * @param tStylingKey `TStylingKeyPrimitive` which contains the value to compare to other keys in\n * the linked list.\n * @param index Starting location in the linked list to search from\n * @param isPrevDir Direction.\n * - `true` for previous (lower priority);\n * - `false` for next (higher priority).\n */\nfunction markDuplicates(\n tData: TData,\n tStylingKey: TStylingKeyPrimitive,\n index: number,\n isPrevDir: boolean,\n) {\n const tStylingAtIndex = tData[index + 1] as TStylingRange;\n const isMap = tStylingKey === null;\n let cursor = isPrevDir\n ? getTStylingRangePrev(tStylingAtIndex)\n : getTStylingRangeNext(tStylingAtIndex);\n let foundDuplicate = false;\n // We keep iterating as long as we have a cursor\n // AND either:\n // - we found what we are looking for, OR\n // - we are a map in which case we have to continue searching even after we find what we were\n // looking for since we are a wild card and everything needs to be flipped to duplicate.\n while (cursor !== 0 && (foundDuplicate === false || isMap)) {\n ngDevMode && assertIndexInRange(tData, cursor);\n const tStylingValueAtCursor = tData[cursor] as TStylingKey;\n const tStyleRangeAtCursor = tData[cursor + 1] as TStylingRange;\n if (isStylingMatch(tStylingValueAtCursor, tStylingKey)) {\n foundDuplicate = true;\n tData[cursor + 1] = isPrevDir\n ? setTStylingRangeNextDuplicate(tStyleRangeAtCursor)\n : setTStylingRangePrevDuplicate(tStyleRangeAtCursor);\n }\n cursor = isPrevDir\n ? getTStylingRangePrev(tStyleRangeAtCursor)\n : getTStylingRangeNext(tStyleRangeAtCursor);\n }\n if (foundDuplicate) {\n // if we found a duplicate, than mark ourselves.\n tData[index + 1] = isPrevDir\n ? setTStylingRangePrevDuplicate(tStylingAtIndex)\n : setTStylingRangeNextDuplicate(tStylingAtIndex);\n }\n}\n\n/**\n * Determines if two `TStylingKey`s are a match.\n *\n * When computing whether a binding contains a duplicate, we need to compare if the instruction\n * `TStylingKey` has a match.\n *\n * Here are examples of `TStylingKey`s which match given `tStylingKeyCursor` is:\n * - `color`\n * - `color` // Match another color\n * - `null` // That means that `tStylingKey` is a `classMap`/`styleMap` instruction\n * - `['', 'color', 'other', true]` // wrapped `color` so match\n * - `['', null, 'other', true]` // wrapped `null` so match\n * - `['', 'width', 'color', 'value']` // wrapped static value contains a match on `'color'`\n * - `null` // `tStylingKeyCursor` always match as it is `classMap`/`styleMap` instruction\n *\n * @param tStylingKeyCursor\n * @param tStylingKey\n */\nfunction isStylingMatch(tStylingKeyCursor: TStylingKey, tStylingKey: TStylingKeyPrimitive) {\n ngDevMode &&\n assertNotEqual(\n Array.isArray(tStylingKey),\n true,\n \"Expected that 'tStylingKey' has been unwrapped\",\n );\n if (\n tStylingKeyCursor === null || // If the cursor is `null` it means that we have map at that\n // location so we must assume that we have a match.\n tStylingKey == null || // If `tStylingKey` is `null` then it is a map therefor assume that it\n // contains a match.\n (Array.isArray(tStylingKeyCursor) ? tStylingKeyCursor[1] : tStylingKeyCursor) === tStylingKey // If the keys match explicitly than we are a match.\n ) {\n return true;\n } else if (Array.isArray(tStylingKeyCursor) && typeof tStylingKey === 'string') {\n // if we did not find a match, but `tStylingKeyCursor` is `KeyValueArray` that means cursor has\n // statics and we need to check those as well.\n return keyValueArrayIndexOf(tStylingKeyCursor, tStylingKey) >= 0; // see if we are matching the key\n }\n return false;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {assertEqual, throwError} from '../../util/assert';\nimport {CharCode} from '../../util/char_code';\n\n/**\n * Stores the locations of key/value indexes while parsing styling.\n *\n * In case of `cssText` parsing the indexes are like so:\n * ```\n * \"key1: value1; key2: value2; key3: value3\"\n * ^ ^ ^ ^ ^\n * | | | | +-- textEnd\n * | | | +---------------- valueEnd\n * | | +---------------------- value\n * | +------------------------ keyEnd\n * +---------------------------- key\n * ```\n *\n * In case of `className` parsing the indexes are like so:\n * ```\n * \"key1 key2 key3\"\n * ^ ^ ^\n * | | +-- textEnd\n * | +------------------------ keyEnd\n * +---------------------------- key\n * ```\n * NOTE: `value` and `valueEnd` are used only for styles, not classes.\n */\ninterface ParserState {\n textEnd: number;\n key: number;\n keyEnd: number;\n value: number;\n valueEnd: number;\n}\n// Global state of the parser. (This makes parser non-reentrant, but that is not an issue)\nconst parserState: ParserState = {\n textEnd: 0,\n key: 0,\n keyEnd: 0,\n value: 0,\n valueEnd: 0,\n};\n\n/**\n * Retrieves the last parsed `key` of style.\n * @param text the text to substring the key from.\n */\nexport function getLastParsedKey(text: string): string {\n return text.substring(parserState.key, parserState.keyEnd);\n}\n\n/**\n * Retrieves the last parsed `value` of style.\n * @param text the text to substring the key from.\n */\nexport function getLastParsedValue(text: string): string {\n return text.substring(parserState.value, parserState.valueEnd);\n}\n\n/**\n * Initializes `className` string for parsing and parses the first token.\n *\n * This function is intended to be used in this format:\n * ```ts\n * for (let i = parseClassName(text); i >= 0; i = parseClassNameNext(text, i)) {\n * const key = getLastParsedKey();\n * ...\n * }\n * ```\n * @param text `className` to parse\n * @returns index where the next invocation of `parseClassNameNext` should resume.\n */\nexport function parseClassName(text: string): number {\n resetParserState(text);\n return parseClassNameNext(text, consumeWhitespace(text, 0, parserState.textEnd));\n}\n\n/**\n * Parses next `className` token.\n *\n * This function is intended to be used in this format:\n * ```ts\n * for (let i = parseClassName(text); i >= 0; i = parseClassNameNext(text, i)) {\n * const key = getLastParsedKey();\n * ...\n * }\n * ```\n *\n * @param text `className` to parse\n * @param index where the parsing should resume.\n * @returns index where the next invocation of `parseClassNameNext` should resume.\n */\nexport function parseClassNameNext(text: string, index: number): number {\n const end = parserState.textEnd;\n if (end === index) {\n return -1;\n }\n index = parserState.keyEnd = consumeClassToken(text, (parserState.key = index), end);\n return consumeWhitespace(text, index, end);\n}\n\n/**\n * Initializes `cssText` string for parsing and parses the first key/values.\n *\n * This function is intended to be used in this format:\n * ```ts\n * for (let i = parseStyle(text); i >= 0; i = parseStyleNext(text, i))) {\n * const key = getLastParsedKey();\n * const value = getLastParsedValue();\n * ...\n * }\n * ```\n * @param text `cssText` to parse\n * @returns index where the next invocation of `parseStyleNext` should resume.\n */\nexport function parseStyle(text: string): number {\n resetParserState(text);\n return parseStyleNext(text, consumeWhitespace(text, 0, parserState.textEnd));\n}\n\n/**\n * Parses the next `cssText` key/values.\n *\n * This function is intended to be used in this format:\n * ```ts\n * for (let i = parseStyle(text); i >= 0; i = parseStyleNext(text, i))) {\n * const key = getLastParsedKey();\n * const value = getLastParsedValue();\n * ...\n * }\n *\n * @param text `cssText` to parse\n * @param index where the parsing should resume.\n * @returns index where the next invocation of `parseStyleNext` should resume.\n */\nexport function parseStyleNext(text: string, startIndex: number): number {\n const end = parserState.textEnd;\n let index = (parserState.key = consumeWhitespace(text, startIndex, end));\n if (end === index) {\n // we reached an end so just quit\n return -1;\n }\n index = parserState.keyEnd = consumeStyleKey(text, index, end);\n index = consumeSeparator(text, index, end, CharCode.COLON);\n index = parserState.value = consumeWhitespace(text, index, end);\n index = parserState.valueEnd = consumeStyleValue(text, index, end);\n return consumeSeparator(text, index, end, CharCode.SEMI_COLON);\n}\n\n/**\n * Reset the global state of the styling parser.\n * @param text The styling text to parse.\n */\nexport function resetParserState(text: string): void {\n parserState.key = 0;\n parserState.keyEnd = 0;\n parserState.value = 0;\n parserState.valueEnd = 0;\n parserState.textEnd = text.length;\n}\n\n/**\n * Returns index of next non-whitespace character.\n *\n * @param text Text to scan\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index of next non-whitespace character (May be the same as `start` if no whitespace at\n * that location.)\n */\nexport function consumeWhitespace(text: string, startIndex: number, endIndex: number): number {\n while (startIndex < endIndex && text.charCodeAt(startIndex) <= CharCode.SPACE) {\n startIndex++;\n }\n return startIndex;\n}\n\n/**\n * Returns index of last char in class token.\n *\n * @param text Text to scan\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index after last char in class token.\n */\nexport function consumeClassToken(text: string, startIndex: number, endIndex: number): number {\n while (startIndex < endIndex && text.charCodeAt(startIndex) > CharCode.SPACE) {\n startIndex++;\n }\n return startIndex;\n}\n\n/**\n * Consumes all of the characters belonging to style key and token.\n *\n * @param text Text to scan\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index after last style key character.\n */\nexport function consumeStyleKey(text: string, startIndex: number, endIndex: number): number {\n let ch: number;\n while (\n startIndex < endIndex &&\n ((ch = text.charCodeAt(startIndex)) === CharCode.DASH ||\n ch === CharCode.UNDERSCORE ||\n ((ch & CharCode.UPPER_CASE) >= CharCode.A && (ch & CharCode.UPPER_CASE) <= CharCode.Z) ||\n (ch >= CharCode.ZERO && ch <= CharCode.NINE))\n ) {\n startIndex++;\n }\n return startIndex;\n}\n\n/**\n * Consumes all whitespace and the separator `:` after the style key.\n *\n * @param text Text to scan\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index after separator and surrounding whitespace.\n */\nexport function consumeSeparator(\n text: string,\n startIndex: number,\n endIndex: number,\n separator: number,\n): number {\n startIndex = consumeWhitespace(text, startIndex, endIndex);\n if (startIndex < endIndex) {\n if (ngDevMode && text.charCodeAt(startIndex) !== separator) {\n malformedStyleError(text, String.fromCharCode(separator), startIndex);\n }\n startIndex++;\n }\n return startIndex;\n}\n\n/**\n * Consumes style value honoring `url()` and `\"\"` text.\n *\n * @param text Text to scan\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index after last style value character.\n */\nexport function consumeStyleValue(text: string, startIndex: number, endIndex: number): number {\n let ch1 = -1; // 1st previous character\n let ch2 = -1; // 2nd previous character\n let ch3 = -1; // 3rd previous character\n let i = startIndex;\n let lastChIndex = i;\n while (i < endIndex) {\n const ch: number = text.charCodeAt(i++);\n if (ch === CharCode.SEMI_COLON) {\n return lastChIndex;\n } else if (ch === CharCode.DOUBLE_QUOTE || ch === CharCode.SINGLE_QUOTE) {\n lastChIndex = i = consumeQuotedText(text, ch, i, endIndex);\n } else if (\n startIndex === i - 4 && // We have seen only 4 characters so far \"URL(\" (Ignore \"foo_URL()\")\n ch3 === CharCode.U &&\n ch2 === CharCode.R &&\n ch1 === CharCode.L &&\n ch === CharCode.OPEN_PAREN\n ) {\n lastChIndex = i = consumeQuotedText(text, CharCode.CLOSE_PAREN, i, endIndex);\n } else if (ch > CharCode.SPACE) {\n // if we have a non-whitespace character then capture its location\n lastChIndex = i;\n }\n ch3 = ch2;\n ch2 = ch1;\n ch1 = ch & CharCode.UPPER_CASE;\n }\n return lastChIndex;\n}\n\n/**\n * Consumes all of the quoted characters.\n *\n * @param text Text to scan\n * @param quoteCharCode CharCode of either `\"` or `'` quote or `)` for `url(...)`.\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index after quoted characters.\n */\nexport function consumeQuotedText(\n text: string,\n quoteCharCode: number,\n startIndex: number,\n endIndex: number,\n): number {\n let ch1 = -1; // 1st previous character\n let index = startIndex;\n while (index < endIndex) {\n const ch = text.charCodeAt(index++);\n if (ch == quoteCharCode && ch1 !== CharCode.BACK_SLASH) {\n return index;\n }\n if (ch == CharCode.BACK_SLASH && ch1 === CharCode.BACK_SLASH) {\n // two back slashes cancel each other out. For example `\"\\\\\"` should properly end the\n // quotation. (It should not assume that the last `\"` is escaped.)\n ch1 = 0;\n } else {\n ch1 = ch;\n }\n }\n throw ngDevMode\n ? malformedStyleError(text, String.fromCharCode(quoteCharCode), endIndex)\n : new Error();\n}\n\nfunction malformedStyleError(text: string, expecting: string, index: number): never {\n ngDevMode && assertEqual(typeof text === 'string', true, 'String expected here');\n throw throwError(\n `Malformed style at location ${index} in string '` +\n text.substring(0, index) +\n '[>>' +\n text.substring(index, index + 1) +\n '<<]' +\n text.slice(index + 1) +\n `'. Expecting '${expecting}'.`,\n );\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport {bindingUpdated} from '../bindings';\nimport {TNode} from '../interfaces/node';\nimport {SanitizerFn} from '../interfaces/sanitization';\nimport {LView, RENDERER, TView} from '../interfaces/view';\nimport {getLView, getSelectedTNode, getTView, nextBindingIndex} from '../state';\n\nimport {\n elementPropertyInternal,\n setAllInputsForProperty,\n storePropertyBindingMetadata,\n} from './shared';\n\n/**\n * Update a property on a selected element.\n *\n * Operates on the element selected by index via the {@link select} instruction.\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled\n *\n * @param propName Name of property. Because it is going to DOM, this is not subject to\n * renaming as part of minification.\n * @param value New value to write.\n * @param sanitizer An optional function used to sanitize the value.\n * @returns This function returns itself so that it may be chained\n * (e.g. `property('name', ctx.name)('title', ctx.title)`)\n *\n * @codeGenApi\n */\nexport function ɵɵproperty<T>(\n propName: string,\n value: T,\n sanitizer?: SanitizerFn | null,\n): typeof ɵɵproperty {\n const lView = getLView();\n const bindingIndex = nextBindingIndex();\n if (bindingUpdated(lView, bindingIndex, value)) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(\n tView,\n tNode,\n lView,\n propName,\n value,\n lView[RENDERER],\n sanitizer,\n false,\n );\n ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, bindingIndex);\n }\n return ɵɵproperty;\n}\n\n/**\n * Given `<div style=\"...\" my-dir>` and `MyDir` with `@Input('style')` we need to write to\n * directive input.\n */\nexport function setDirectiveInputsWhichShadowsStyling(\n tView: TView,\n tNode: TNode,\n lView: LView,\n value: any,\n isClassBased: boolean,\n) {\n // We support both 'class' and `className` hence the fallback.\n setAllInputsForProperty(tNode, tView, lView, isClassBased ? 'class' : 'style', value);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {SafeValue, unwrapSafeValue} from '../../sanitization/bypass';\nimport {KeyValueArray, keyValueArrayGet, keyValueArraySet} from '../../util/array_utils';\nimport {\n assertDefined,\n assertEqual,\n assertLessThan,\n assertNotEqual,\n throwError,\n} from '../../util/assert';\nimport {EMPTY_ARRAY} from '../../util/empty';\nimport {concatStringsWithSpace, stringify} from '../../util/stringify';\nimport {assertFirstUpdatePass} from '../assert';\nimport {bindingUpdated} from '../bindings';\nimport {AttributeMarker} from '../interfaces/attribute_marker';\nimport {DirectiveDef} from '../interfaces/definition';\nimport {TAttributes, TNode, TNodeFlags, TNodeType} from '../interfaces/node';\nimport {Renderer} from '../interfaces/renderer';\nimport {RElement} from '../interfaces/renderer_dom';\nimport {\n getTStylingRangeNext,\n getTStylingRangeNextDuplicate,\n getTStylingRangePrev,\n getTStylingRangePrevDuplicate,\n TStylingKey,\n TStylingRange,\n} from '../interfaces/styling';\nimport {LView, RENDERER, TData, TView} from '../interfaces/view';\nimport {applyStyling} from '../node_manipulation';\nimport {\n getCurrentDirectiveDef,\n getLView,\n getSelectedIndex,\n getTView,\n incrementBindingIndex,\n} from '../state';\nimport {insertTStylingBinding} from '../styling/style_binding_list';\nimport {\n getLastParsedKey,\n getLastParsedValue,\n parseClassName,\n parseClassNameNext,\n parseStyle,\n parseStyleNext,\n} from '../styling/styling_parser';\nimport {NO_CHANGE} from '../tokens';\nimport {getNativeByIndex} from '../util/view_utils';\n\nimport {setDirectiveInputsWhichShadowsStyling} from './property';\n\n/**\n * Update a style binding on an element with the provided value.\n *\n * If the style value is falsy then it will be removed from the element\n * (or assigned a different value depending if there are any styles placed\n * on the element with `styleMap` or any static styles that are\n * present from when the element was created with `styling`).\n *\n * Note that the styling element is updated as part of `stylingApply`.\n *\n * @param prop A valid CSS property.\n * @param value New value to write (`null` or an empty string to remove).\n * @param suffix Optional suffix. Used with scalar values to add unit such as `px`.\n *\n * Note that this will apply the provided style value to the host element if this function is called\n * within a host binding function.\n *\n * @codeGenApi\n */\nexport function ɵɵstyleProp(\n prop: string,\n value: string | number | SafeValue | undefined | null,\n suffix?: string | null,\n): typeof ɵɵstyleProp {\n checkStylingProperty(prop, value, suffix, false);\n return ɵɵstyleProp;\n}\n\n/**\n * Update a class binding on an element with the provided value.\n *\n * This instruction is meant to handle the `[class.foo]=\"exp\"` case and,\n * therefore, the class binding itself must already be allocated using\n * `styling` within the creation block.\n *\n * @param prop A valid CSS class (only one).\n * @param value A true/false value which will turn the class on or off.\n *\n * Note that this will apply the provided class value to the host element if this function\n * is called within a host binding function.\n *\n * @codeGenApi\n */\nexport function ɵɵclassProp(\n className: string,\n value: boolean | undefined | null,\n): typeof ɵɵclassProp {\n checkStylingProperty(className, value, null, true);\n return ɵɵclassProp;\n}\n\n/**\n * Update style bindings using an object literal on an element.\n *\n * This instruction is meant to apply styling via the `[style]=\"exp\"` template bindings.\n * When styles are applied to the element they will then be updated with respect to\n * any styles/classes set via `styleProp`. If any styles are set to falsy\n * then they will be removed from the element.\n *\n * Note that the styling instruction will not be applied until `stylingApply` is called.\n *\n * @param styles A key/value style map of the styles that will be applied to the given element.\n * Any missing styles (that have already been applied to the element beforehand) will be\n * removed (unset) from the element's styling.\n *\n * Note that this will apply the provided styleMap value to the host element if this function\n * is called within a host binding.\n *\n * @codeGenApi\n */\nexport function ɵɵstyleMap(styles: {[styleName: string]: any} | string | undefined | null): void {\n checkStylingMap(styleKeyValueArraySet, styleStringParser, styles, false);\n}\n\n/**\n * Parse text as style and add values to KeyValueArray.\n *\n * This code is pulled out to a separate function so that it can be tree shaken away if it is not\n * needed. It is only referenced from `ɵɵstyleMap`.\n *\n * @param keyValueArray KeyValueArray to add parsed values to.\n * @param text text to parse.\n */\nexport function styleStringParser(keyValueArray: KeyValueArray<any>, text: string): void {\n for (let i = parseStyle(text); i >= 0; i = parseStyleNext(text, i)) {\n styleKeyValueArraySet(keyValueArray, getLastParsedKey(text), getLastParsedValue(text));\n }\n}\n\n/**\n * Update class bindings using an object literal or class-string on an element.\n *\n * This instruction is meant to apply styling via the `[class]=\"exp\"` template bindings.\n * When classes are applied to the element they will then be updated with\n * respect to any styles/classes set via `classProp`. If any\n * classes are set to falsy then they will be removed from the element.\n *\n * Note that the styling instruction will not be applied until `stylingApply` is called.\n * Note that this will the provided classMap value to the host element if this function is called\n * within a host binding.\n *\n * @param classes A key/value map or string of CSS classes that will be added to the\n * given element. Any missing classes (that have already been applied to the element\n * beforehand) will be removed (unset) from the element's list of CSS classes.\n *\n * @codeGenApi\n */\nexport function ɵɵclassMap(\n classes: {[className: string]: boolean | undefined | null} | string | undefined | null,\n): void {\n checkStylingMap(classKeyValueArraySet, classStringParser, classes, true);\n}\n\n/**\n * Parse text as class and add values to KeyValueArray.\n *\n * This code is pulled out to a separate function so that it can be tree shaken away if it is not\n * needed. It is only referenced from `ɵɵclassMap`.\n *\n * @param keyValueArray KeyValueArray to add parsed values to.\n * @param text text to parse.\n */\nexport function classStringParser(keyValueArray: KeyValueArray<any>, text: string): void {\n for (let i = parseClassName(text); i >= 0; i = parseClassNameNext(text, i)) {\n keyValueArraySet(keyValueArray, getLastParsedKey(text), true);\n }\n}\n\n/**\n * Common code between `ɵɵclassProp` and `ɵɵstyleProp`.\n *\n * @param prop property name.\n * @param value binding value.\n * @param suffix suffix for the property (e.g. `em` or `px`)\n * @param isClassBased `true` if `class` change (`false` if `style`)\n */\nexport function checkStylingProperty(\n prop: string,\n value: any | NO_CHANGE,\n suffix: string | undefined | null,\n isClassBased: boolean,\n): void {\n const lView = getLView();\n const tView = getTView();\n // Styling instructions use 2 slots per binding.\n // 1. one for the value / TStylingKey\n // 2. one for the intermittent-value / TStylingRange\n const bindingIndex = incrementBindingIndex(2);\n if (tView.firstUpdatePass) {\n stylingFirstUpdatePass(tView, prop, bindingIndex, isClassBased);\n }\n if (value !== NO_CHANGE && bindingUpdated(lView, bindingIndex, value)) {\n const tNode = tView.data[getSelectedIndex()] as TNode;\n updateStyling(\n tView,\n tNode,\n lView,\n lView[RENDERER],\n prop,\n (lView[bindingIndex + 1] = normalizeSuffix(value, suffix)),\n isClassBased,\n bindingIndex,\n );\n }\n}\n\n/**\n * Common code between `ɵɵclassMap` and `ɵɵstyleMap`.\n *\n * @param keyValueArraySet (See `keyValueArraySet` in \"util/array_utils\") Gets passed in as a\n * function so that `style` can be processed. This is done for tree shaking purposes.\n * @param stringParser Parser used to parse `value` if `string`. (Passed in as `style` and `class`\n * have different parsers.)\n * @param value bound value from application\n * @param isClassBased `true` if `class` change (`false` if `style`)\n */\nexport function checkStylingMap(\n keyValueArraySet: (keyValueArray: KeyValueArray<any>, key: string, value: any) => void,\n stringParser: (styleKeyValueArray: KeyValueArray<any>, text: string) => void,\n value: any | NO_CHANGE,\n isClassBased: boolean,\n): void {\n const tView = getTView();\n const bindingIndex = incrementBindingIndex(2);\n if (tView.firstUpdatePass) {\n stylingFirstUpdatePass(tView, null, bindingIndex, isClassBased);\n }\n const lView = getLView();\n if (value !== NO_CHANGE && bindingUpdated(lView, bindingIndex, value)) {\n // `getSelectedIndex()` should be here (rather than in instruction) so that it is guarded by the\n // if so as not to read unnecessarily.\n const tNode = tView.data[getSelectedIndex()] as TNode;\n if (hasStylingInputShadow(tNode, isClassBased) && !isInHostBindings(tView, bindingIndex)) {\n if (ngDevMode) {\n // verify that if we are shadowing then `TData` is appropriately marked so that we skip\n // processing this binding in styling resolution.\n const tStylingKey = tView.data[bindingIndex];\n assertEqual(\n Array.isArray(tStylingKey) ? tStylingKey[1] : tStylingKey,\n false,\n \"Styling linked list shadow input should be marked as 'false'\",\n );\n }\n // VE does not concatenate the static portion like we are doing here.\n // Instead VE just ignores the static completely if dynamic binding is present.\n // Because of locality we have already set the static portion because we don't know if there\n // is a dynamic portion until later. If we would ignore the static portion it would look like\n // the binding has removed it. This would confuse `[ngStyle]`/`[ngClass]` to do the wrong\n // thing as it would think that the static portion was removed. For this reason we\n // concatenate it so that `[ngStyle]`/`[ngClass]` can continue to work on changed.\n let staticPrefix = isClassBased ? tNode.classesWithoutHost : tNode.stylesWithoutHost;\n ngDevMode &&\n isClassBased === false &&\n staticPrefix !== null &&\n assertEqual(staticPrefix.endsWith(';'), true, \"Expecting static portion to end with ';'\");\n if (staticPrefix !== null) {\n // We want to make sure that falsy values of `value` become empty strings.\n value = concatStringsWithSpace(staticPrefix, value ? value : '');\n }\n // Given `<div [style] my-dir>` such that `my-dir` has `@Input('style')`.\n // This takes over the `[style]` binding. (Same for `[class]`)\n setDirectiveInputsWhichShadowsStyling(tView, tNode, lView, value, isClassBased);\n } else {\n updateStylingMap(\n tView,\n tNode,\n lView,\n lView[RENDERER],\n lView[bindingIndex + 1],\n (lView[bindingIndex + 1] = toStylingKeyValueArray(keyValueArraySet, stringParser, value)),\n isClassBased,\n bindingIndex,\n );\n }\n }\n}\n\n/**\n * Determines when the binding is in `hostBindings` section\n *\n * @param tView Current `TView`\n * @param bindingIndex index of binding which we would like if it is in `hostBindings`\n */\nfunction isInHostBindings(tView: TView, bindingIndex: number): boolean {\n // All host bindings are placed after the expando section.\n return bindingIndex >= tView.expandoStartIndex;\n}\n\n/**\n * Collects the necessary information to insert the binding into a linked list of style bindings\n * using `insertTStylingBinding`.\n *\n * @param tView `TView` where the binding linked list will be stored.\n * @param tStylingKey Property/key of the binding.\n * @param bindingIndex Index of binding associated with the `prop`\n * @param isClassBased `true` if `class` change (`false` if `style`)\n */\nfunction stylingFirstUpdatePass(\n tView: TView,\n tStylingKey: TStylingKey,\n bindingIndex: number,\n isClassBased: boolean,\n): void {\n ngDevMode && assertFirstUpdatePass(tView);\n const tData = tView.data;\n if (tData[bindingIndex + 1] === null) {\n // The above check is necessary because we don't clear first update pass until first successful\n // (no exception) template execution. This prevents the styling instruction from double adding\n // itself to the list.\n // `getSelectedIndex()` should be here (rather than in instruction) so that it is guarded by the\n // if so as not to read unnecessarily.\n const tNode = tData[getSelectedIndex()] as TNode;\n ngDevMode && assertDefined(tNode, 'TNode expected');\n const isHostBindings = isInHostBindings(tView, bindingIndex);\n if (hasStylingInputShadow(tNode, isClassBased) && tStylingKey === null && !isHostBindings) {\n // `tStylingKey === null` implies that we are either `[style]` or `[class]` binding.\n // If there is a directive which uses `@Input('style')` or `@Input('class')` than\n // we need to neutralize this binding since that directive is shadowing it.\n // We turn this into a noop by setting the key to `false`\n tStylingKey = false;\n }\n tStylingKey = wrapInStaticStylingKey(tData, tNode, tStylingKey, isClassBased);\n insertTStylingBinding(tData, tNode, tStylingKey, bindingIndex, isHostBindings, isClassBased);\n }\n}\n\n/**\n * Adds static styling information to the binding if applicable.\n *\n * The linked list of styles not only stores the list and keys, but also stores static styling\n * information on some of the keys. This function determines if the key should contain the styling\n * information and computes it.\n *\n * See `TStylingStatic` for more details.\n *\n * @param tData `TData` where the linked list is stored.\n * @param tNode `TNode` for which the styling is being computed.\n * @param stylingKey `TStylingKeyPrimitive` which may need to be wrapped into `TStylingKey`\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nexport function wrapInStaticStylingKey(\n tData: TData,\n tNode: TNode,\n stylingKey: TStylingKey,\n isClassBased: boolean,\n): TStylingKey {\n const hostDirectiveDef = getCurrentDirectiveDef(tData);\n let residual = isClassBased ? tNode.residualClasses : tNode.residualStyles;\n if (hostDirectiveDef === null) {\n // We are in template node.\n // If template node already had styling instruction then it has already collected the static\n // styling and there is no need to collect them again. We know that we are the first styling\n // instruction because the `TNode.*Bindings` points to 0 (nothing has been inserted yet).\n const isFirstStylingInstructionInTemplate =\n ((isClassBased ? tNode.classBindings : tNode.styleBindings) as any as number) === 0;\n if (isFirstStylingInstructionInTemplate) {\n // It would be nice to be able to get the statics from `mergeAttrs`, however, at this point\n // they are already merged and it would not be possible to figure which property belongs where\n // in the priority.\n stylingKey = collectStylingFromDirectives(null, tData, tNode, stylingKey, isClassBased);\n stylingKey = collectStylingFromTAttrs(stylingKey, tNode.attrs, isClassBased);\n // We know that if we have styling binding in template we can't have residual.\n residual = null;\n }\n } else {\n // We are in host binding node and there was no binding instruction in template node.\n // This means that we need to compute the residual.\n const directiveStylingLast = tNode.directiveStylingLast;\n const isFirstStylingInstructionInHostBinding =\n directiveStylingLast === -1 || tData[directiveStylingLast] !== hostDirectiveDef;\n if (isFirstStylingInstructionInHostBinding) {\n stylingKey = collectStylingFromDirectives(\n hostDirectiveDef,\n tData,\n tNode,\n stylingKey,\n isClassBased,\n );\n if (residual === null) {\n // - If `null` than either:\n // - Template styling instruction already ran and it has consumed the static\n // styling into its `TStylingKey` and so there is no need to update residual. Instead\n // we need to update the `TStylingKey` associated with the first template node\n // instruction. OR\n // - Some other styling instruction ran and determined that there are no residuals\n let templateStylingKey = getTemplateHeadTStylingKey(tData, tNode, isClassBased);\n if (templateStylingKey !== undefined && Array.isArray(templateStylingKey)) {\n // Only recompute if `templateStylingKey` had static values. (If no static value found\n // then there is nothing to do since this operation can only produce less static keys, not\n // more.)\n templateStylingKey = collectStylingFromDirectives(\n null,\n tData,\n tNode,\n templateStylingKey[1] /* unwrap previous statics */,\n isClassBased,\n );\n templateStylingKey = collectStylingFromTAttrs(\n templateStylingKey,\n tNode.attrs,\n isClassBased,\n );\n setTemplateHeadTStylingKey(tData, tNode, isClassBased, templateStylingKey);\n }\n } else {\n // We only need to recompute residual if it is not `null`.\n // - If existing residual (implies there was no template styling). This means that some of\n // the statics may have moved from the residual to the `stylingKey` and so we have to\n // recompute.\n // - If `undefined` this is the first time we are running.\n residual = collectResidual(tData, tNode, isClassBased);\n }\n }\n }\n if (residual !== undefined) {\n isClassBased ? (tNode.residualClasses = residual) : (tNode.residualStyles = residual);\n }\n return stylingKey;\n}\n\n/**\n * Retrieve the `TStylingKey` for the template styling instruction.\n *\n * This is needed since `hostBinding` styling instructions are inserted after the template\n * instruction. While the template instruction needs to update the residual in `TNode` the\n * `hostBinding` instructions need to update the `TStylingKey` of the template instruction because\n * the template instruction is downstream from the `hostBindings` instructions.\n *\n * @param tData `TData` where the linked list is stored.\n * @param tNode `TNode` for which the styling is being computed.\n * @param isClassBased `true` if `class` (`false` if `style`)\n * @return `TStylingKey` if found or `undefined` if not found.\n */\nfunction getTemplateHeadTStylingKey(\n tData: TData,\n tNode: TNode,\n isClassBased: boolean,\n): TStylingKey | undefined {\n const bindings = isClassBased ? tNode.classBindings : tNode.styleBindings;\n if (getTStylingRangeNext(bindings) === 0) {\n // There does not seem to be a styling instruction in the `template`.\n return undefined;\n }\n return tData[getTStylingRangePrev(bindings)] as TStylingKey;\n}\n\n/**\n * Update the `TStylingKey` of the first template instruction in `TNode`.\n *\n * Logically `hostBindings` styling instructions are of lower priority than that of the template.\n * However, they execute after the template styling instructions. This means that they get inserted\n * in front of the template styling instructions.\n *\n * If we have a template styling instruction and a new `hostBindings` styling instruction is\n * executed it means that it may need to steal static fields from the template instruction. This\n * method allows us to update the first template instruction `TStylingKey` with a new value.\n *\n * Assume:\n * ```angular-ts\n * <div my-dir style=\"color: red\" [style.color]=\"tmplExp\"></div>\n *\n * @Directive({\n * host: {\n * 'style': 'width: 100px',\n * '[style.color]': 'dirExp',\n * }\n * })\n * class MyDir {}\n * ```\n *\n * when `[style.color]=\"tmplExp\"` executes it creates this data structure.\n * ```ts\n * ['', 'color', 'color', 'red', 'width', '100px'],\n * ```\n *\n * The reason for this is that the template instruction does not know if there are styling\n * instructions and must assume that there are none and must collect all of the static styling.\n * (both\n * `color' and 'width`)\n *\n * When `'[style.color]': 'dirExp',` executes we need to insert a new data into the linked list.\n * ```ts\n * ['', 'color', 'width', '100px'], // newly inserted\n * ['', 'color', 'color', 'red', 'width', '100px'], // this is wrong\n * ```\n *\n * Notice that the template statics is now wrong as it incorrectly contains `width` so we need to\n * update it like so:\n * ```ts\n * ['', 'color', 'width', '100px'],\n * ['', 'color', 'color', 'red'], // UPDATE\n * ```\n *\n * @param tData `TData` where the linked list is stored.\n * @param tNode `TNode` for which the styling is being computed.\n * @param isClassBased `true` if `class` (`false` if `style`)\n * @param tStylingKey New `TStylingKey` which is replacing the old one.\n */\nfunction setTemplateHeadTStylingKey(\n tData: TData,\n tNode: TNode,\n isClassBased: boolean,\n tStylingKey: TStylingKey,\n): void {\n const bindings = isClassBased ? tNode.classBindings : tNode.styleBindings;\n ngDevMode &&\n assertNotEqual(\n getTStylingRangeNext(bindings),\n 0,\n 'Expecting to have at least one template styling binding.',\n );\n tData[getTStylingRangePrev(bindings)] = tStylingKey;\n}\n\n/**\n * Collect all static values after the current `TNode.directiveStylingLast` index.\n *\n * Collect the remaining styling information which has not yet been collected by an existing\n * styling instruction.\n *\n * @param tData `TData` where the `DirectiveDefs` are stored.\n * @param tNode `TNode` which contains the directive range.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nfunction collectResidual(\n tData: TData,\n tNode: TNode,\n isClassBased: boolean,\n): KeyValueArray<any> | null {\n let residual: KeyValueArray<any> | null | undefined = undefined;\n const directiveEnd = tNode.directiveEnd;\n ngDevMode &&\n assertNotEqual(\n tNode.directiveStylingLast,\n -1,\n 'By the time this function gets called at least one hostBindings-node styling instruction must have executed.',\n );\n // We add `1 + tNode.directiveStart` because we need to skip the current directive (as we are\n // collecting things after the last `hostBindings` directive which had a styling instruction.)\n for (let i = 1 + tNode.directiveStylingLast; i < directiveEnd; i++) {\n const attrs = (tData[i] as DirectiveDef<any>).hostAttrs;\n residual = collectStylingFromTAttrs(residual, attrs, isClassBased) as KeyValueArray<any> | null;\n }\n return collectStylingFromTAttrs(residual, tNode.attrs, isClassBased) as KeyValueArray<any> | null;\n}\n\n/**\n * Collect the static styling information with lower priority than `hostDirectiveDef`.\n *\n * (This is opposite of residual styling.)\n *\n * @param hostDirectiveDef `DirectiveDef` for which we want to collect lower priority static\n * styling. (Or `null` if template styling)\n * @param tData `TData` where the linked list is stored.\n * @param tNode `TNode` for which the styling is being computed.\n * @param stylingKey Existing `TStylingKey` to update or wrap.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nfunction collectStylingFromDirectives(\n hostDirectiveDef: DirectiveDef<any> | null,\n tData: TData,\n tNode: TNode,\n stylingKey: TStylingKey,\n isClassBased: boolean,\n): TStylingKey {\n // We need to loop because there can be directives which have `hostAttrs` but don't have\n // `hostBindings` so this loop catches up to the current directive..\n let currentDirective: DirectiveDef<any> | null = null;\n const directiveEnd = tNode.directiveEnd;\n let directiveStylingLast = tNode.directiveStylingLast;\n if (directiveStylingLast === -1) {\n directiveStylingLast = tNode.directiveStart;\n } else {\n directiveStylingLast++;\n }\n while (directiveStylingLast < directiveEnd) {\n currentDirective = tData[directiveStylingLast] as DirectiveDef<any>;\n ngDevMode && assertDefined(currentDirective, 'expected to be defined');\n stylingKey = collectStylingFromTAttrs(stylingKey, currentDirective.hostAttrs, isClassBased);\n if (currentDirective === hostDirectiveDef) break;\n directiveStylingLast++;\n }\n if (hostDirectiveDef !== null) {\n // we only advance the styling cursor if we are collecting data from host bindings.\n // Template executes before host bindings and so if we would update the index,\n // host bindings would not get their statics.\n tNode.directiveStylingLast = directiveStylingLast;\n }\n return stylingKey;\n}\n\n/**\n * Convert `TAttrs` into `TStylingStatic`.\n *\n * @param stylingKey existing `TStylingKey` to update or wrap.\n * @param attrs `TAttributes` to process.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nfunction collectStylingFromTAttrs(\n stylingKey: TStylingKey | undefined,\n attrs: TAttributes | null,\n isClassBased: boolean,\n): TStylingKey {\n const desiredMarker = isClassBased ? AttributeMarker.Classes : AttributeMarker.Styles;\n let currentMarker = AttributeMarker.ImplicitAttributes;\n if (attrs !== null) {\n for (let i = 0; i < attrs.length; i++) {\n const item = attrs[i] as number | string;\n if (typeof item === 'number') {\n currentMarker = item;\n } else {\n if (currentMarker === desiredMarker) {\n if (!Array.isArray(stylingKey)) {\n stylingKey = stylingKey === undefined ? [] : (['', stylingKey] as any);\n }\n keyValueArraySet(\n stylingKey as KeyValueArray<any>,\n item,\n isClassBased ? true : attrs[++i],\n );\n }\n }\n }\n }\n return stylingKey === undefined ? null : stylingKey;\n}\n\n/**\n * Convert user input to `KeyValueArray`.\n *\n * This function takes user input which could be `string`, Object literal, or iterable and converts\n * it into a consistent representation. The output of this is `KeyValueArray` (which is an array\n * where\n * even indexes contain keys and odd indexes contain values for those keys).\n *\n * The advantage of converting to `KeyValueArray` is that we can perform diff in an input\n * independent\n * way.\n * (ie we can compare `foo bar` to `['bar', 'baz'] and determine a set of changes which need to be\n * applied)\n *\n * The fact that `KeyValueArray` is sorted is very important because it allows us to compute the\n * difference in linear fashion without the need to allocate any additional data.\n *\n * For example if we kept this as a `Map` we would have to iterate over previous `Map` to determine\n * which values need to be deleted, over the new `Map` to determine additions, and we would have to\n * keep additional `Map` to keep track of duplicates or items which have not yet been visited.\n *\n * @param keyValueArraySet (See `keyValueArraySet` in \"util/array_utils\") Gets passed in as a\n * function so that `style` can be processed. This is done\n * for tree shaking purposes.\n * @param stringParser The parser is passed in so that it will be tree shakable. See\n * `styleStringParser` and `classStringParser`\n * @param value The value to parse/convert to `KeyValueArray`\n */\nexport function toStylingKeyValueArray(\n keyValueArraySet: (keyValueArray: KeyValueArray<any>, key: string, value: any) => void,\n stringParser: (styleKeyValueArray: KeyValueArray<any>, text: string) => void,\n value: string | string[] | {[key: string]: any} | SafeValue | null | undefined,\n): KeyValueArray<any> {\n if (value == null /*|| value === undefined */ || value === '') return EMPTY_ARRAY as any;\n const styleKeyValueArray: KeyValueArray<any> = [] as any;\n const unwrappedValue = unwrapSafeValue(value) as string | string[] | {[key: string]: any};\n if (Array.isArray(unwrappedValue)) {\n for (let i = 0; i < unwrappedValue.length; i++) {\n keyValueArraySet(styleKeyValueArray, unwrappedValue[i], true);\n }\n } else if (typeof unwrappedValue === 'object') {\n for (const key in unwrappedValue) {\n if (unwrappedValue.hasOwnProperty(key)) {\n keyValueArraySet(styleKeyValueArray, key, unwrappedValue[key]);\n }\n }\n } else if (typeof unwrappedValue === 'string') {\n stringParser(styleKeyValueArray, unwrappedValue);\n } else {\n ngDevMode &&\n throwError(\n 'Unsupported styling type: ' + typeof unwrappedValue + ' (' + unwrappedValue + ')',\n );\n }\n return styleKeyValueArray;\n}\n\n/**\n * Set a `value` for a `key`.\n *\n * See: `keyValueArraySet` for details\n *\n * @param keyValueArray KeyValueArray to add to.\n * @param key Style key to add.\n * @param value The value to set.\n */\nexport function styleKeyValueArraySet(keyValueArray: KeyValueArray<any>, key: string, value: any) {\n keyValueArraySet(keyValueArray, key, unwrapSafeValue(value));\n}\n\n/**\n * Class-binding-specific function for setting the `value` for a `key`.\n *\n * See: `keyValueArraySet` for details\n *\n * @param keyValueArray KeyValueArray to add to.\n * @param key Style key to add.\n * @param value The value to set.\n */\nexport function classKeyValueArraySet(keyValueArray: KeyValueArray<any>, key: unknown, value: any) {\n // We use `classList.add` to eventually add the CSS classes to the DOM node. Any value passed into\n // `add` is stringified and added to the `class` attribute, e.g. even null, undefined or numbers\n // will be added. Stringify the key here so that our internal data structure matches the value in\n // the DOM. The only exceptions are empty strings and strings that contain spaces for which\n // the browser throws an error. We ignore such values, because the error is somewhat cryptic.\n const stringKey = String(key);\n if (stringKey !== '' && !stringKey.includes(' ')) {\n keyValueArraySet(keyValueArray, stringKey, value);\n }\n}\n\n/**\n * Update map based styling.\n *\n * Map based styling could be anything which contains more than one binding. For example `string`,\n * or object literal. Dealing with all of these types would complicate the logic so\n * instead this function expects that the complex input is first converted into normalized\n * `KeyValueArray`. The advantage of normalization is that we get the values sorted, which makes it\n * very cheap to compute deltas between the previous and current value.\n *\n * @param tView Associated `TView.data` contains the linked list of binding priorities.\n * @param tNode `TNode` where the binding is located.\n * @param lView `LView` contains the values associated with other styling binding at this `TNode`.\n * @param renderer Renderer to use if any updates.\n * @param oldKeyValueArray Previous value represented as `KeyValueArray`\n * @param newKeyValueArray Current value represented as `KeyValueArray`\n * @param isClassBased `true` if `class` (`false` if `style`)\n * @param bindingIndex Binding index of the binding.\n */\nfunction updateStylingMap(\n tView: TView,\n tNode: TNode,\n lView: LView,\n renderer: Renderer,\n oldKeyValueArray: KeyValueArray<any>,\n newKeyValueArray: KeyValueArray<any>,\n isClassBased: boolean,\n bindingIndex: number,\n) {\n if ((oldKeyValueArray as KeyValueArray<any> | NO_CHANGE) === NO_CHANGE) {\n // On first execution the oldKeyValueArray is NO_CHANGE => treat it as empty KeyValueArray.\n oldKeyValueArray = EMPTY_ARRAY as any;\n }\n let oldIndex = 0;\n let newIndex = 0;\n let oldKey: string | null = 0 < oldKeyValueArray.length ? oldKeyValueArray[0] : null;\n let newKey: string | null = 0 < newKeyValueArray.length ? newKeyValueArray[0] : null;\n while (oldKey !== null || newKey !== null) {\n ngDevMode && assertLessThan(oldIndex, 999, 'Are we stuck in infinite loop?');\n ngDevMode && assertLessThan(newIndex, 999, 'Are we stuck in infinite loop?');\n const oldValue =\n oldIndex < oldKeyValueArray.length ? oldKeyValueArray[oldIndex + 1] : undefined;\n const newValue =\n newIndex < newKeyValueArray.length ? newKeyValueArray[newIndex + 1] : undefined;\n let setKey: string | null = null;\n let setValue: any = undefined;\n if (oldKey === newKey) {\n // UPDATE: Keys are equal => new value is overwriting old value.\n oldIndex += 2;\n newIndex += 2;\n if (oldValue !== newValue) {\n setKey = newKey;\n setValue = newValue;\n }\n } else if (newKey === null || (oldKey !== null && oldKey < newKey!)) {\n // DELETE: oldKey key is missing or we did not find the oldKey in the newValue\n // (because the keyValueArray is sorted and `newKey` is found later alphabetically).\n // `\"background\" < \"color\"` so we need to delete `\"background\"` because it is not found in the\n // new array.\n oldIndex += 2;\n setKey = oldKey;\n } else {\n // CREATE: newKey's is earlier alphabetically than oldKey's (or no oldKey) => we have new key.\n // `\"color\" > \"background\"` so we need to add `color` because it is in new array but not in\n // old array.\n ngDevMode && assertDefined(newKey, 'Expecting to have a valid key');\n newIndex += 2;\n setKey = newKey;\n setValue = newValue;\n }\n if (setKey !== null) {\n updateStyling(tView, tNode, lView, renderer, setKey, setValue, isClassBased, bindingIndex);\n }\n oldKey = oldIndex < oldKeyValueArray.length ? oldKeyValueArray[oldIndex] : null;\n newKey = newIndex < newKeyValueArray.length ? newKeyValueArray[newIndex] : null;\n }\n}\n\n/**\n * Update a simple (property name) styling.\n *\n * This function takes `prop` and updates the DOM to that value. The function takes the binding\n * value as well as binding priority into consideration to determine which value should be written\n * to DOM. (For example it may be determined that there is a higher priority overwrite which blocks\n * the DOM write, or if the value goes to `undefined` a lower priority overwrite may be consulted.)\n *\n * @param tView Associated `TView.data` contains the linked list of binding priorities.\n * @param tNode `TNode` where the binding is located.\n * @param lView `LView` contains the values associated with other styling binding at this `TNode`.\n * @param renderer Renderer to use if any updates.\n * @param prop Either style property name or a class name.\n * @param value Either style value for `prop` or `true`/`false` if `prop` is class.\n * @param isClassBased `true` if `class` (`false` if `style`)\n * @param bindingIndex Binding index of the binding.\n */\nfunction updateStyling(\n tView: TView,\n tNode: TNode,\n lView: LView,\n renderer: Renderer,\n prop: string,\n value: string | undefined | null | boolean,\n isClassBased: boolean,\n bindingIndex: number,\n) {\n if (!(tNode.type & TNodeType.AnyRNode)) {\n // It is possible to have styling on non-elements (such as ng-container).\n // This is rare, but it does happen. In such a case, just ignore the binding.\n return;\n }\n const tData = tView.data;\n const tRange = tData[bindingIndex + 1] as TStylingRange;\n const higherPriorityValue = getTStylingRangeNextDuplicate(tRange)\n ? findStylingValue(tData, tNode, lView, prop, getTStylingRangeNext(tRange), isClassBased)\n : undefined;\n if (!isStylingValuePresent(higherPriorityValue)) {\n // We don't have a next duplicate, or we did not find a duplicate value.\n if (!isStylingValuePresent(value)) {\n // We should delete current value or restore to lower priority value.\n if (getTStylingRangePrevDuplicate(tRange)) {\n // We have a possible prev duplicate, let's retrieve it.\n value = findStylingValue(tData, null, lView, prop, bindingIndex, isClassBased);\n }\n }\n const rNode = getNativeByIndex(getSelectedIndex(), lView) as RElement;\n applyStyling(renderer, isClassBased, rNode, prop, value);\n }\n}\n\n/**\n * Search for styling value with higher priority which is overwriting current value, or a\n * value of lower priority to which we should fall back if the value is `undefined`.\n *\n * When value is being applied at a location, related values need to be consulted.\n * - If there is a higher priority binding, we should be using that one instead.\n * For example `<div [style]=\"{color:exp1}\" [style.color]=\"exp2\">` change to `exp1`\n * requires that we check `exp2` to see if it is set to value other than `undefined`.\n * - If there is a lower priority binding and we are changing to `undefined`\n * For example `<div [style]=\"{color:exp1}\" [style.color]=\"exp2\">` change to `exp2` to\n * `undefined` requires that we check `exp1` (and static values) and use that as new value.\n *\n * NOTE: The styling stores two values.\n * 1. The raw value which came from the application is stored at `index + 0` location. (This value\n * is used for dirty checking).\n * 2. The normalized value is stored at `index + 1`.\n *\n * @param tData `TData` used for traversing the priority.\n * @param tNode `TNode` to use for resolving static styling. Also controls search direction.\n * - `TNode` search next and quit as soon as `isStylingValuePresent(value)` is true.\n * If no value found consult `tNode.residualStyle`/`tNode.residualClass` for default value.\n * - `null` search prev and go all the way to end. Return last value where\n * `isStylingValuePresent(value)` is true.\n * @param lView `LView` used for retrieving the actual values.\n * @param prop Property which we are interested in.\n * @param index Starting index in the linked list of styling bindings where the search should start.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nfunction findStylingValue(\n tData: TData,\n tNode: TNode | null,\n lView: LView,\n prop: string,\n index: number,\n isClassBased: boolean,\n): any {\n // `TNode` to use for resolving static styling. Also controls search direction.\n // - `TNode` search next and quit as soon as `isStylingValuePresent(value)` is true.\n // If no value found consult `tNode.residualStyle`/`tNode.residualClass` for default value.\n // - `null` search prev and go all the way to end. Return last value where\n // `isStylingValuePresent(value)` is true.\n const isPrevDirection = tNode === null;\n let value: any = undefined;\n while (index > 0) {\n const rawKey = tData[index] as TStylingKey;\n const containsStatics = Array.isArray(rawKey);\n // Unwrap the key if we contain static values.\n const key = containsStatics ? (rawKey as string[])[1] : rawKey;\n const isStylingMap = key === null;\n let valueAtLViewIndex = lView[index + 1];\n if (valueAtLViewIndex === NO_CHANGE) {\n // In firstUpdatePass the styling instructions create a linked list of styling.\n // On subsequent passes it is possible for a styling instruction to try to read a binding\n // which\n // has not yet executed. In that case we will find `NO_CHANGE` and we should assume that\n // we have `undefined` (or empty array in case of styling-map instruction) instead. This\n // allows the resolution to apply the value (which may later be overwritten when the\n // binding actually executes.)\n valueAtLViewIndex = isStylingMap ? EMPTY_ARRAY : undefined;\n }\n let currentValue = isStylingMap\n ? keyValueArrayGet(valueAtLViewIndex, prop)\n : key === prop\n ? valueAtLViewIndex\n : undefined;\n if (containsStatics && !isStylingValuePresent(currentValue)) {\n currentValue = keyValueArrayGet(rawKey as KeyValueArray<any>, prop);\n }\n if (isStylingValuePresent(currentValue)) {\n value = currentValue;\n if (isPrevDirection) {\n return value;\n }\n }\n const tRange = tData[index + 1] as TStylingRange;\n index = isPrevDirection ? getTStylingRangePrev(tRange) : getTStylingRangeNext(tRange);\n }\n if (tNode !== null) {\n // in case where we are going in next direction AND we did not find anything, we need to\n // consult residual styling\n let residual = isClassBased ? tNode.residualClasses : tNode.residualStyles;\n if (residual != null /** OR residual !=== undefined */) {\n value = keyValueArrayGet(residual!, prop);\n }\n }\n return value;\n}\n\n/**\n * Determines if the binding value should be used (or if the value is 'undefined' and hence priority\n * resolution should be used.)\n *\n * @param value Binding style value.\n */\nfunction isStylingValuePresent(value: any): boolean {\n // Currently only `undefined` value is considered non-binding. That is `undefined` says I don't\n // have an opinion as to what this binding should be and you should consult other bindings by\n // priority to determine the valid value.\n // This is extracted into a single function so that we have a single place to control this.\n return value !== undefined;\n}\n\n/**\n * Normalizes and/or adds a suffix to the value.\n *\n * If value is `null`/`undefined` no suffix is added\n * @param value\n * @param suffix\n */\nfunction normalizeSuffix(\n value: any,\n suffix: string | undefined | null,\n): string | null | undefined | boolean {\n if (value == null || value === '') {\n // do nothing\n // Do not add the suffix if the value is going to be empty.\n // As it produce invalid CSS, which the browsers will automatically omit but Domino will not.\n // Example: `\"left\": \"px;\"` instead of `\"left\": \"\"`.\n } else if (typeof suffix === 'string') {\n value = value + suffix;\n } else if (typeof value === 'object') {\n value = stringify(unwrapSafeValue(value));\n }\n return value;\n}\n\n/**\n * Tests if the `TNode` has input shadow.\n *\n * An input shadow is when a directive steals (shadows) the input by using `@Input('style')` or\n * `@Input('class')` as input.\n *\n * @param tNode `TNode` which we would like to see if it has shadow.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nexport function hasStylingInputShadow(tNode: TNode, isClassBased: boolean) {\n return (tNode.flags & (isClassBased ? TNodeFlags.hasClassInput : TNodeFlags.hasStyleInput)) !== 0;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {keyValueArraySet} from '../../util/array_utils';\nimport {getLView} from '../state';\nimport {\n interpolation1,\n interpolation2,\n interpolation3,\n interpolation4,\n interpolation5,\n interpolation6,\n interpolation7,\n interpolation8,\n interpolationV,\n} from './interpolation';\nimport {checkStylingMap, classStringParser} from './styling';\n\n/**\n *\n * Update an interpolated class on an element with single bound value surrounded by text.\n *\n * Used when the value passed to a property has 1 interpolated value in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate1('prefix', v0, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ɵɵclassMapInterpolate1(prefix: string, v0: any, suffix: string): void {\n const lView = getLView();\n const interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n\n/**\n *\n * Update an interpolated class on an element with 2 bound values surrounded by text.\n *\n * Used when the value passed to a property has 2 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate2('prefix', v0, '-', v1, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ɵɵclassMapInterpolate2(\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n suffix: string,\n): void {\n const lView = getLView();\n const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n\n/**\n *\n * Update an interpolated class on an element with 3 bound values surrounded by text.\n *\n * Used when the value passed to a property has 3 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate3(\n * 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ɵɵclassMapInterpolate3(\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n suffix: string,\n): void {\n const lView = getLView();\n const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n\n/**\n *\n * Update an interpolated class on an element with 4 bound values surrounded by text.\n *\n * Used when the value passed to a property has 4 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate4(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ɵɵclassMapInterpolate4(\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n i2: string,\n v3: any,\n suffix: string,\n): void {\n const lView = getLView();\n const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n\n/**\n *\n * Update an interpolated class on an element with 5 bound values surrounded by text.\n *\n * Used when the value passed to a property has 5 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate5(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ɵɵclassMapInterpolate5(\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n i2: string,\n v3: any,\n i3: string,\n v4: any,\n suffix: string,\n): void {\n const lView = getLView();\n const interpolatedValue = interpolation5(\n lView,\n prefix,\n v0,\n i0,\n v1,\n i1,\n v2,\n i2,\n v3,\n i3,\n v4,\n suffix,\n );\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n\n/**\n *\n * Update an interpolated class on an element with 6 bound values surrounded by text.\n *\n * Used when the value passed to a property has 6 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate6(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ɵɵclassMapInterpolate6(\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n i2: string,\n v3: any,\n i3: string,\n v4: any,\n i4: string,\n v5: any,\n suffix: string,\n): void {\n const lView = getLView();\n const interpolatedValue = interpolation6(\n lView,\n prefix,\n v0,\n i0,\n v1,\n i1,\n v2,\n i2,\n v3,\n i3,\n v4,\n i4,\n v5,\n suffix,\n );\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n\n/**\n *\n * Update an interpolated class on an element with 7 bound values surrounded by text.\n *\n * Used when the value passed to a property has 7 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate7(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ɵɵclassMapInterpolate7(\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n i2: string,\n v3: any,\n i3: string,\n v4: any,\n i4: string,\n v5: any,\n i5: string,\n v6: any,\n suffix: string,\n): void {\n const lView = getLView();\n const interpolatedValue = interpolation7(\n lView,\n prefix,\n v0,\n i0,\n v1,\n i1,\n v2,\n i2,\n v3,\n i3,\n v4,\n i4,\n v5,\n i5,\n v6,\n suffix,\n );\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n\n/**\n *\n * Update an interpolated class on an element with 8 bound values surrounded by text.\n *\n * Used when the value passed to a property has 8 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate8(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param i6 Static value used for concatenation only.\n * @param v7 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ɵɵclassMapInterpolate8(\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n i2: string,\n v3: any,\n i3: string,\n v4: any,\n i4: string,\n v5: any,\n i5: string,\n v6: any,\n i6: string,\n v7: any,\n suffix: string,\n): void {\n const lView = getLView();\n const interpolatedValue = interpolation8(\n lView,\n prefix,\n v0,\n i0,\n v1,\n i1,\n v2,\n i2,\n v3,\n i3,\n v4,\n i4,\n v5,\n i5,\n v6,\n i6,\n v7,\n suffix,\n );\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n\n/**\n * Update an interpolated class on an element with 9 or more bound values surrounded by text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div\n * class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolateV(\n * ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n * 'suffix']);\n * ```\n *.\n * @param values The collection of values and the strings in-between those values, beginning with\n * a string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n * @codeGenApi\n */\nexport function ɵɵclassMapInterpolateV(values: any[]): void {\n const lView = getLView();\n const interpolatedValue = interpolationV(lView, values);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n","/*!\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {assertDefined} from '../../util/assert';\nimport {CONTEXT, DECLARATION_COMPONENT_VIEW} from '../interfaces/view';\nimport {getLView} from '../state';\n\n/**\n * Instruction that returns the component instance in which the current instruction is executing.\n * This is a constant-time version of `nextContent` for the case where we know that we need the\n * component instance specifically, rather than the context of a particular template.\n *\n * @codeGenApi\n */\nexport function ɵɵcomponentInstance(): unknown {\n const instance = getLView()[DECLARATION_COMPONENT_VIEW][CONTEXT];\n ngDevMode && assertDefined(instance, 'Expected component instance to be defined');\n return instance;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {TrackByFunction} from '../change_detection';\nimport {formatRuntimeError, RuntimeErrorCode} from '../errors';\n\nimport {stringifyForError} from './util/stringify_utils';\n\n/**\n * A type representing the live collection to be reconciled with any new (incoming) collection. This\n * is an adapter class that makes it possible to work with different internal data structures,\n * regardless of the actual values of the incoming collection.\n */\nexport abstract class LiveCollection<T, V> {\n abstract get length(): number;\n abstract at(index: number): V;\n abstract attach(index: number, item: T): void;\n abstract detach(index: number): T;\n abstract create(index: number, value: V): T;\n destroy(item: T): void {\n // noop by default\n }\n updateValue(index: number, value: V): void {\n // noop by default\n }\n\n // operations below could be implemented on top of the operations defined so far, but having\n // them explicitly allow clear expression of intent and potentially more performant\n // implementations\n swap(index1: number, index2: number): void {\n const startIdx = Math.min(index1, index2);\n const endIdx = Math.max(index1, index2);\n const endItem = this.detach(endIdx);\n if (endIdx - startIdx > 1) {\n const startItem = this.detach(startIdx);\n this.attach(startIdx, endItem);\n this.attach(endIdx, startItem);\n } else {\n this.attach(startIdx, endItem);\n }\n }\n move(prevIndex: number, newIdx: number): void {\n this.attach(newIdx, this.detach(prevIndex));\n }\n}\n\nfunction valuesMatching<V>(\n liveIdx: number,\n liveValue: V,\n newIdx: number,\n newValue: V,\n trackBy: TrackByFunction<V>,\n): number {\n if (liveIdx === newIdx && Object.is(liveValue, newValue)) {\n // matching and no value identity to update\n return 1;\n } else if (Object.is(trackBy(liveIdx, liveValue), trackBy(newIdx, newValue))) {\n // matching but requires value identity update\n return -1;\n }\n\n return 0;\n}\n\nfunction recordDuplicateKeys(keyToIdx: Map<unknown, Set<number>>, key: unknown, idx: number): void {\n const idxSoFar = keyToIdx.get(key);\n\n if (idxSoFar !== undefined) {\n idxSoFar.add(idx);\n } else {\n keyToIdx.set(key, new Set([idx]));\n }\n}\n\n/**\n * The live collection reconciliation algorithm that perform various in-place operations, so it\n * reflects the content of the new (incoming) collection.\n *\n * The reconciliation algorithm has 2 code paths:\n * - \"fast\" path that don't require any memory allocation;\n * - \"slow\" path that requires additional memory allocation for intermediate data structures used to\n * collect additional information about the live collection.\n * It might happen that the algorithm switches between the two modes in question in a single\n * reconciliation path - generally it tries to stay on the \"fast\" path as much as possible.\n *\n * The overall complexity of the algorithm is O(n + m) for speed and O(n) for memory (where n is the\n * length of the live collection and m is the length of the incoming collection). Given the problem\n * at hand the complexity / performance constraints makes it impossible to perform the absolute\n * minimum of operation to reconcile the 2 collections. The algorithm makes different tradeoffs to\n * stay within reasonable performance bounds and may apply sub-optimal number of operations in\n * certain situations.\n *\n * @param liveCollection the current, live collection;\n * @param newCollection the new, incoming collection;\n * @param trackByFn key generation function that determines equality between items in the life and\n * incoming collection;\n */\nexport function reconcile<T, V>(\n liveCollection: LiveCollection<T, V>,\n newCollection: Iterable<V> | undefined | null,\n trackByFn: TrackByFunction<V>,\n): void {\n let detachedItems: UniqueValueMultiKeyMap<unknown, T> | undefined = undefined;\n let liveKeysInTheFuture: Set<unknown> | undefined = undefined;\n\n let liveStartIdx = 0;\n let liveEndIdx = liveCollection.length - 1;\n\n const duplicateKeys = ngDevMode ? new Map<unknown, Set<number>>() : undefined;\n\n if (Array.isArray(newCollection)) {\n let newEndIdx = newCollection.length - 1;\n\n while (liveStartIdx <= liveEndIdx && liveStartIdx <= newEndIdx) {\n // compare from the beginning\n const liveStartValue = liveCollection.at(liveStartIdx);\n const newStartValue = newCollection[liveStartIdx];\n\n if (ngDevMode) {\n recordDuplicateKeys(duplicateKeys!, trackByFn(liveStartIdx, newStartValue), liveStartIdx);\n }\n\n const isStartMatching = valuesMatching(\n liveStartIdx,\n liveStartValue,\n liveStartIdx,\n newStartValue,\n trackByFn,\n );\n if (isStartMatching !== 0) {\n if (isStartMatching < 0) {\n liveCollection.updateValue(liveStartIdx, newStartValue);\n }\n liveStartIdx++;\n continue;\n }\n\n // compare from the end\n // TODO(perf): do _all_ the matching from the end\n const liveEndValue = liveCollection.at(liveEndIdx);\n const newEndValue = newCollection[newEndIdx];\n\n if (ngDevMode) {\n recordDuplicateKeys(duplicateKeys!, trackByFn(newEndIdx, newEndValue), newEndIdx);\n }\n\n const isEndMatching = valuesMatching(\n liveEndIdx,\n liveEndValue,\n newEndIdx,\n newEndValue,\n trackByFn,\n );\n if (isEndMatching !== 0) {\n if (isEndMatching < 0) {\n liveCollection.updateValue(liveEndIdx, newEndValue);\n }\n liveEndIdx--;\n newEndIdx--;\n continue;\n }\n\n // Detect swap and moves:\n const liveStartKey = trackByFn(liveStartIdx, liveStartValue);\n const liveEndKey = trackByFn(liveEndIdx, liveEndValue);\n const newStartKey = trackByFn(liveStartIdx, newStartValue);\n if (Object.is(newStartKey, liveEndKey)) {\n const newEndKey = trackByFn(newEndIdx, newEndValue);\n // detect swap on both ends;\n if (Object.is(newEndKey, liveStartKey)) {\n liveCollection.swap(liveStartIdx, liveEndIdx);\n liveCollection.updateValue(liveEndIdx, newEndValue);\n newEndIdx--;\n liveEndIdx--;\n } else {\n // the new item is the same as the live item with the end pointer - this is a move forward\n // to an earlier index;\n liveCollection.move(liveEndIdx, liveStartIdx);\n }\n liveCollection.updateValue(liveStartIdx, newStartValue);\n liveStartIdx++;\n continue;\n }\n\n // Fallback to the slow path: we need to learn more about the content of the live and new\n // collections.\n detachedItems ??= new UniqueValueMultiKeyMap();\n liveKeysInTheFuture ??= initLiveItemsInTheFuture(\n liveCollection,\n liveStartIdx,\n liveEndIdx,\n trackByFn,\n );\n\n // Check if I'm inserting a previously detached item: if so, attach it here\n if (attachPreviouslyDetached(liveCollection, detachedItems, liveStartIdx, newStartKey)) {\n liveCollection.updateValue(liveStartIdx, newStartValue);\n liveStartIdx++;\n liveEndIdx++;\n } else if (!liveKeysInTheFuture.has(newStartKey)) {\n // Check if we seen a new item that doesn't exist in the old collection and must be INSERTED\n const newItem = liveCollection.create(liveStartIdx, newCollection[liveStartIdx]);\n liveCollection.attach(liveStartIdx, newItem);\n liveStartIdx++;\n liveEndIdx++;\n } else {\n // We know that the new item exists later on in old collection but we don't know its index\n // and as the consequence can't move it (don't know where to find it). Detach the old item,\n // hoping that it unlocks the fast path again.\n detachedItems.set(liveStartKey, liveCollection.detach(liveStartIdx));\n liveEndIdx--;\n }\n }\n\n // Final cleanup steps:\n // - more items in the new collection => insert\n while (liveStartIdx <= newEndIdx) {\n createOrAttach(\n liveCollection,\n detachedItems,\n trackByFn,\n liveStartIdx,\n newCollection[liveStartIdx],\n );\n liveStartIdx++;\n }\n } else if (newCollection != null) {\n // iterable - immediately fallback to the slow path\n const newCollectionIterator = newCollection[Symbol.iterator]();\n let newIterationResult = newCollectionIterator.next();\n while (!newIterationResult.done && liveStartIdx <= liveEndIdx) {\n const liveValue = liveCollection.at(liveStartIdx);\n const newValue = newIterationResult.value;\n\n if (ngDevMode) {\n recordDuplicateKeys(duplicateKeys!, trackByFn(liveStartIdx, newValue), liveStartIdx);\n }\n\n const isStartMatching = valuesMatching(\n liveStartIdx,\n liveValue,\n liveStartIdx,\n newValue,\n trackByFn,\n );\n if (isStartMatching !== 0) {\n // found a match - move on, but update value\n if (isStartMatching < 0) {\n liveCollection.updateValue(liveStartIdx, newValue);\n }\n liveStartIdx++;\n newIterationResult = newCollectionIterator.next();\n } else {\n detachedItems ??= new UniqueValueMultiKeyMap();\n liveKeysInTheFuture ??= initLiveItemsInTheFuture(\n liveCollection,\n liveStartIdx,\n liveEndIdx,\n trackByFn,\n );\n\n // Check if I'm inserting a previously detached item: if so, attach it here\n const newKey = trackByFn(liveStartIdx, newValue);\n if (attachPreviouslyDetached(liveCollection, detachedItems, liveStartIdx, newKey)) {\n liveCollection.updateValue(liveStartIdx, newValue);\n liveStartIdx++;\n liveEndIdx++;\n newIterationResult = newCollectionIterator.next();\n } else if (!liveKeysInTheFuture.has(newKey)) {\n liveCollection.attach(liveStartIdx, liveCollection.create(liveStartIdx, newValue));\n liveStartIdx++;\n liveEndIdx++;\n newIterationResult = newCollectionIterator.next();\n } else {\n // it is a move forward - detach the current item without advancing in collections\n const liveKey = trackByFn(liveStartIdx, liveValue);\n detachedItems.set(liveKey, liveCollection.detach(liveStartIdx));\n liveEndIdx--;\n }\n }\n }\n\n // this is a new item as we run out of the items in the old collection - create or attach a\n // previously detached one\n while (!newIterationResult.done) {\n createOrAttach(\n liveCollection,\n detachedItems,\n trackByFn,\n liveCollection.length,\n newIterationResult.value,\n );\n newIterationResult = newCollectionIterator.next();\n }\n }\n\n // Cleanups common to the array and iterable:\n // - more items in the live collection => delete starting from the end;\n while (liveStartIdx <= liveEndIdx) {\n liveCollection.destroy(liveCollection.detach(liveEndIdx--));\n }\n\n // - destroy items that were detached but never attached again.\n detachedItems?.forEach((item) => {\n liveCollection.destroy(item);\n });\n\n // report duplicate keys (dev mode only)\n if (ngDevMode) {\n let duplicatedKeysMsg = [];\n for (const [key, idxSet] of duplicateKeys!) {\n if (idxSet.size > 1) {\n const idx = [...idxSet].sort((a, b) => a - b);\n for (let i = 1; i < idx.length; i++) {\n duplicatedKeysMsg.push(\n `key \"${stringifyForError(key)}\" at index \"${idx[i - 1]}\" and \"${idx[i]}\"`,\n );\n }\n }\n }\n\n if (duplicatedKeysMsg.length > 0) {\n const message = formatRuntimeError(\n RuntimeErrorCode.LOOP_TRACK_DUPLICATE_KEYS,\n 'The provided track expression resulted in duplicated keys for a given collection. ' +\n 'Adjust the tracking expression such that it uniquely identifies all the items in the collection. ' +\n 'Duplicated keys were: \\n' +\n duplicatedKeysMsg.join(', \\n') +\n '.',\n );\n\n console.warn(message);\n }\n }\n}\n\nfunction attachPreviouslyDetached<T, V>(\n prevCollection: LiveCollection<T, V>,\n detachedItems: UniqueValueMultiKeyMap<unknown, T> | undefined,\n index: number,\n key: unknown,\n): boolean {\n if (detachedItems !== undefined && detachedItems.has(key)) {\n prevCollection.attach(index, detachedItems.get(key)!);\n detachedItems.delete(key);\n return true;\n }\n return false;\n}\n\nfunction createOrAttach<T, V>(\n liveCollection: LiveCollection<T, V>,\n detachedItems: UniqueValueMultiKeyMap<unknown, T> | undefined,\n trackByFn: TrackByFunction<unknown>,\n index: number,\n value: V,\n) {\n if (!attachPreviouslyDetached(liveCollection, detachedItems, index, trackByFn(index, value))) {\n const newItem = liveCollection.create(index, value);\n liveCollection.attach(index, newItem);\n } else {\n liveCollection.updateValue(index, value);\n }\n}\n\nfunction initLiveItemsInTheFuture<T>(\n liveCollection: LiveCollection<unknown, unknown>,\n start: number,\n end: number,\n trackByFn: TrackByFunction<unknown>,\n): Set<unknown> {\n const keys = new Set();\n for (let i = start; i <= end; i++) {\n keys.add(trackByFn(i, liveCollection.at(i)));\n }\n return keys;\n}\n\n/**\n * A specific, partial implementation of the Map interface with the following characteristics:\n * - allows multiple values for a given key;\n * - maintain FIFO order for multiple values corresponding to a given key;\n * - assumes that all values are unique.\n *\n * The implementation aims at having the minimal overhead for cases where keys are _not_ duplicated\n * (the most common case in the list reconciliation algorithm). To achieve this, the first value for\n * a given key is stored in a regular map. Then, when more values are set for a given key, we\n * maintain a form of linked list in a separate map. To maintain this linked list we assume that all\n * values (in the entire collection) are unique.\n */\nexport class UniqueValueMultiKeyMap<K, V> {\n // A map from a key to the first value corresponding to this key.\n private kvMap = new Map<K, V>();\n // A map that acts as a linked list of values - each value maps to the next value in this \"linked\n // list\" (this only works if values are unique). Allocated lazily to avoid memory consumption when\n // there are no duplicated values.\n private _vMap: Map<V, V> | undefined = undefined;\n\n has(key: K): boolean {\n return this.kvMap.has(key);\n }\n\n delete(key: K): boolean {\n if (!this.has(key)) return false;\n\n const value = this.kvMap.get(key)!;\n if (this._vMap !== undefined && this._vMap.has(value)) {\n this.kvMap.set(key, this._vMap.get(value)!);\n this._vMap.delete(value);\n } else {\n this.kvMap.delete(key);\n }\n\n return true;\n }\n\n get(key: K): V | undefined {\n return this.kvMap.get(key);\n }\n\n set(key: K, value: V): void {\n if (this.kvMap.has(key)) {\n let prevValue = this.kvMap.get(key)!;\n\n // Note: we don't use `assertNotSame`, because the value needs to be stringified even if\n // there is no error which can freeze the browser for large values (see #58509).\n if (ngDevMode && prevValue === value) {\n throw new Error(`Detected a duplicated value ${value} for the key ${key}`);\n }\n\n if (this._vMap === undefined) {\n this._vMap = new Map();\n }\n\n const vMap = this._vMap;\n while (vMap.has(prevValue)) {\n prevValue = vMap.get(prevValue)!;\n }\n vMap.set(prevValue, value);\n } else {\n this.kvMap.set(key, value);\n }\n }\n\n forEach(cb: (v: V, k: K) => void) {\n for (let [key, value] of this.kvMap) {\n cb(value, key);\n if (this._vMap !== undefined) {\n const vMap = this._vMap;\n while (vMap.has(value)) {\n value = vMap.get(value)!;\n cb(value, key);\n }\n }\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {setActiveConsumer} from '../../../primitives/signals';\n\nimport {TrackByFunction} from '../../change_detection';\nimport {formatRuntimeError, RuntimeErrorCode} from '../../errors';\nimport {DehydratedContainerView} from '../../hydration/interfaces';\nimport {findMatchingDehydratedView} from '../../hydration/views';\nimport {assertDefined, assertFunction} from '../../util/assert';\nimport {performanceMarkFeature} from '../../util/performance';\nimport {assertLContainer, assertLView, assertTNode} from '../assert';\nimport {bindingUpdated} from '../bindings';\nimport {CONTAINER_HEADER_OFFSET, LContainer} from '../interfaces/container';\nimport {ComponentTemplate} from '../interfaces/definition';\nimport {TNode} from '../interfaces/node';\nimport {\n CONTEXT,\n DECLARATION_COMPONENT_VIEW,\n HEADER_OFFSET,\n HYDRATION,\n LView,\n TVIEW,\n TView,\n} from '../interfaces/view';\nimport {LiveCollection, reconcile} from '../list_reconciliation';\nimport {destroyLView} from '../node_manipulation';\nimport {getLView, getSelectedIndex, getTView, nextBindingIndex} from '../state';\nimport {NO_CHANGE} from '../tokens';\nimport {getConstant, getTNode} from '../util/view_utils';\nimport {createAndRenderEmbeddedLView, shouldAddViewToDom} from '../view_manipulation';\n\nimport {declareTemplate} from './template';\nimport {\n addLViewToLContainer,\n detachView,\n getLViewFromLContainer,\n removeLViewFromLContainer,\n} from '../view/container';\n\n/**\n * The conditional instruction represents the basic building block on the runtime side to support\n * built-in \"if\" and \"switch\". On the high level this instruction is responsible for adding and\n * removing views selected by a conditional expression.\n *\n * @param matchingTemplateIndex Index of a template TNode representing a conditional view to be\n * inserted; -1 represents a special case when there is no view to insert.\n * @param contextValue Value that should be exposed as the context of the conditional.\n * @codeGenApi\n */\nexport function ɵɵconditional<T>(matchingTemplateIndex: number, contextValue?: T) {\n performanceMarkFeature('NgControlFlow');\n\n const hostLView = getLView();\n const bindingIndex = nextBindingIndex();\n const prevMatchingTemplateIndex: number =\n hostLView[bindingIndex] !== NO_CHANGE ? hostLView[bindingIndex] : -1;\n const prevContainer =\n prevMatchingTemplateIndex !== -1\n ? getLContainer(hostLView, HEADER_OFFSET + prevMatchingTemplateIndex)\n : undefined;\n const viewInContainerIdx = 0;\n\n if (bindingUpdated(hostLView, bindingIndex, matchingTemplateIndex)) {\n const prevConsumer = setActiveConsumer(null);\n try {\n // The index of the view to show changed - remove the previously displayed one\n // (it is a noop if there are no active views in a container).\n if (prevContainer !== undefined) {\n removeLViewFromLContainer(prevContainer, viewInContainerIdx);\n }\n\n // Index -1 is a special case where none of the conditions evaluates to\n // a truthy value and as the consequence we've got no view to show.\n if (matchingTemplateIndex !== -1) {\n const nextLContainerIndex = HEADER_OFFSET + matchingTemplateIndex;\n const nextContainer = getLContainer(hostLView, nextLContainerIndex);\n const templateTNode = getExistingTNode(hostLView[TVIEW], nextLContainerIndex);\n\n const dehydratedView = findMatchingDehydratedView(\n nextContainer,\n templateTNode.tView!.ssrId,\n );\n const embeddedLView = createAndRenderEmbeddedLView(hostLView, templateTNode, contextValue, {\n dehydratedView,\n });\n\n addLViewToLContainer(\n nextContainer,\n embeddedLView,\n viewInContainerIdx,\n shouldAddViewToDom(templateTNode, dehydratedView),\n );\n }\n } finally {\n setActiveConsumer(prevConsumer);\n }\n } else if (prevContainer !== undefined) {\n // We might keep displaying the same template but the actual value of the expression could have\n // changed - re-bind in context.\n const lView = getLViewFromLContainer<T | undefined>(prevContainer, viewInContainerIdx);\n if (lView !== undefined) {\n lView[CONTEXT] = contextValue;\n }\n }\n}\n\nexport class RepeaterContext<T> {\n constructor(\n private lContainer: LContainer,\n public $implicit: T,\n public $index: number,\n ) {}\n\n get $count(): number {\n return this.lContainer.length - CONTAINER_HEADER_OFFSET;\n }\n}\n\n/**\n * A built-in trackBy function used for situations where users specified collection index as a\n * tracking expression. Having this function body in the runtime avoids unnecessary code generation.\n *\n * @param index\n * @returns\n */\nexport function ɵɵrepeaterTrackByIndex(index: number) {\n return index;\n}\n\n/**\n * A built-in trackBy function used for situations where users specified collection item reference\n * as a tracking expression. Having this function body in the runtime avoids unnecessary code\n * generation.\n *\n * @param index\n * @returns\n */\nexport function ɵɵrepeaterTrackByIdentity<T>(_: number, value: T) {\n return value;\n}\n\nclass RepeaterMetadata {\n constructor(\n public hasEmptyBlock: boolean,\n public trackByFn: TrackByFunction<unknown>,\n public liveCollection?: LiveCollectionLContainerImpl,\n ) {}\n}\n\n/**\n * The repeaterCreate instruction runs in the creation part of the template pass and initializes\n * internal data structures required by the update pass of the built-in repeater logic. Repeater\n * metadata are allocated in the data part of LView with the following layout:\n * - LView[HEADER_OFFSET + index] - metadata\n * - LView[HEADER_OFFSET + index + 1] - reference to a template function rendering an item\n * - LView[HEADER_OFFSET + index + 2] - optional reference to a template function rendering an empty\n * block\n *\n * @param index Index at which to store the metadata of the repeater.\n * @param templateFn Reference to the template of the main repeater block.\n * @param decls The number of nodes, local refs, and pipes for the main block.\n * @param vars The number of bindings for the main block.\n * @param tagName The name of the container element, if applicable\n * @param attrsIndex Index of template attributes in the `consts` array.\n * @param trackByFn Reference to the tracking function.\n * @param trackByUsesComponentInstance Whether the tracking function has any references to the\n * component instance. If it doesn't, we can avoid rebinding it.\n * @param emptyTemplateFn Reference to the template function of the empty block.\n * @param emptyDecls The number of nodes, local refs, and pipes for the empty block.\n * @param emptyVars The number of bindings for the empty block.\n * @param emptyTagName The name of the empty block container element, if applicable\n * @param emptyAttrsIndex Index of the empty block template attributes in the `consts` array.\n *\n * @codeGenApi\n */\nexport function ɵɵrepeaterCreate(\n index: number,\n templateFn: ComponentTemplate<unknown>,\n decls: number,\n vars: number,\n tagName: string | null,\n attrsIndex: number | null,\n trackByFn: TrackByFunction<unknown>,\n trackByUsesComponentInstance?: boolean,\n emptyTemplateFn?: ComponentTemplate<unknown>,\n emptyDecls?: number,\n emptyVars?: number,\n emptyTagName?: string | null,\n emptyAttrsIndex?: number | null,\n): void {\n performanceMarkFeature('NgControlFlow');\n\n ngDevMode &&\n assertFunction(\n trackByFn,\n `A track expression must be a function, was ${typeof trackByFn} instead.`,\n );\n\n const lView = getLView();\n const tView = getTView();\n const hasEmptyBlock = emptyTemplateFn !== undefined;\n const hostLView = getLView();\n const boundTrackBy = trackByUsesComponentInstance\n ? // We only want to bind when necessary, because it produces a\n // new function. For pure functions it's not necessary.\n trackByFn.bind(hostLView[DECLARATION_COMPONENT_VIEW][CONTEXT])\n : trackByFn;\n const metadata = new RepeaterMetadata(hasEmptyBlock, boundTrackBy);\n hostLView[HEADER_OFFSET + index] = metadata;\n\n declareTemplate(\n lView,\n tView,\n index + 1,\n templateFn,\n decls,\n vars,\n tagName,\n getConstant(tView.consts, attrsIndex),\n );\n\n if (hasEmptyBlock) {\n ngDevMode &&\n assertDefined(emptyDecls, 'Missing number of declarations for the empty repeater block.');\n ngDevMode &&\n assertDefined(emptyVars, 'Missing number of bindings for the empty repeater block.');\n\n declareTemplate(\n lView,\n tView,\n index + 2,\n emptyTemplateFn,\n emptyDecls!,\n emptyVars!,\n emptyTagName,\n getConstant(tView.consts, emptyAttrsIndex),\n );\n }\n}\n\nfunction isViewExpensiveToRecreate(lView: LView): boolean {\n // assumption: anything more than a text node with a binding is considered \"expensive\"\n return lView.length - HEADER_OFFSET > 2;\n}\n\nclass OperationsCounter {\n created = 0;\n destroyed = 0;\n\n reset() {\n this.created = 0;\n this.destroyed = 0;\n }\n\n recordCreate() {\n this.created++;\n }\n\n recordDestroy() {\n this.destroyed++;\n }\n\n /**\n * A method indicating if the entire collection was re-created as part of the reconciliation pass.\n * Used to warn developers about the usage of a tracking function that might result in excessive\n * amount of view creation / destroy operations.\n *\n * @returns boolean value indicating if a live collection was re-created\n */\n wasReCreated(collectionLen: number): boolean {\n return collectionLen > 0 && this.created === this.destroyed && this.created === collectionLen;\n }\n}\n\nclass LiveCollectionLContainerImpl extends LiveCollection<\n LView<RepeaterContext<unknown>>,\n unknown\n> {\n operationsCounter = ngDevMode ? new OperationsCounter() : undefined;\n\n /**\n Property indicating if indexes in the repeater context need to be updated following the live\n collection changes. Index updates are necessary if and only if views are inserted / removed in\n the middle of LContainer. Adds and removals at the end don't require index updates.\n */\n private needsIndexUpdate = false;\n constructor(\n private lContainer: LContainer,\n private hostLView: LView,\n private templateTNode: TNode,\n ) {\n super();\n }\n\n override get length(): number {\n return this.lContainer.length - CONTAINER_HEADER_OFFSET;\n }\n override at(index: number): unknown {\n return this.getLView(index)[CONTEXT].$implicit;\n }\n override attach(index: number, lView: LView<RepeaterContext<unknown>>): void {\n const dehydratedView = lView[HYDRATION] as DehydratedContainerView;\n this.needsIndexUpdate ||= index !== this.length;\n addLViewToLContainer(\n this.lContainer,\n lView,\n index,\n shouldAddViewToDom(this.templateTNode, dehydratedView),\n );\n }\n override detach(index: number): LView<RepeaterContext<unknown>> {\n this.needsIndexUpdate ||= index !== this.length - 1;\n return detachExistingView<RepeaterContext<unknown>>(this.lContainer, index);\n }\n override create(index: number, value: unknown): LView<RepeaterContext<unknown>> {\n const dehydratedView = findMatchingDehydratedView(\n this.lContainer,\n this.templateTNode.tView!.ssrId,\n );\n const embeddedLView = createAndRenderEmbeddedLView(\n this.hostLView,\n this.templateTNode,\n new RepeaterContext(this.lContainer, value, index),\n {dehydratedView},\n );\n this.operationsCounter?.recordCreate();\n\n return embeddedLView;\n }\n override destroy(lView: LView<RepeaterContext<unknown>>): void {\n destroyLView(lView[TVIEW], lView);\n this.operationsCounter?.recordDestroy();\n }\n override updateValue(index: number, value: unknown): void {\n this.getLView(index)[CONTEXT].$implicit = value;\n }\n\n reset(): void {\n this.needsIndexUpdate = false;\n this.operationsCounter?.reset();\n }\n\n updateIndexes(): void {\n if (this.needsIndexUpdate) {\n for (let i = 0; i < this.length; i++) {\n this.getLView(i)[CONTEXT].$index = i;\n }\n }\n }\n\n private getLView(index: number): LView<RepeaterContext<unknown>> {\n return getExistingLViewFromLContainer(this.lContainer, index);\n }\n}\n\n/**\n * The repeater instruction does update-time diffing of a provided collection (against the\n * collection seen previously) and maps changes in the collection to views structure (by adding,\n * removing or moving views as needed).\n * @param collection - the collection instance to be checked for changes\n * @codeGenApi\n */\nexport function ɵɵrepeater(collection: Iterable<unknown> | undefined | null): void {\n const prevConsumer = setActiveConsumer(null);\n const metadataSlotIdx = getSelectedIndex();\n try {\n const hostLView = getLView();\n const hostTView = hostLView[TVIEW];\n const metadata = hostLView[metadataSlotIdx] as RepeaterMetadata;\n const containerIndex = metadataSlotIdx + 1;\n const lContainer = getLContainer(hostLView, containerIndex);\n\n if (metadata.liveCollection === undefined) {\n const itemTemplateTNode = getExistingTNode(hostTView, containerIndex);\n metadata.liveCollection = new LiveCollectionLContainerImpl(\n lContainer,\n hostLView,\n itemTemplateTNode,\n );\n } else {\n metadata.liveCollection.reset();\n }\n\n const liveCollection = metadata.liveCollection;\n reconcile(liveCollection, collection, metadata.trackByFn);\n\n // Warn developers about situations where the entire collection was re-created as part of the\n // reconciliation pass. Note that this warning might be \"overreacting\" and report cases where\n // the collection re-creation is the intended behavior. Still, the assumption is that most of\n // the time it is undesired.\n if (\n ngDevMode &&\n metadata.trackByFn === ɵɵrepeaterTrackByIdentity &&\n liveCollection.operationsCounter?.wasReCreated(liveCollection.length) &&\n isViewExpensiveToRecreate(getExistingLViewFromLContainer(lContainer, 0))\n ) {\n const message = formatRuntimeError(\n RuntimeErrorCode.LOOP_TRACK_RECREATE,\n `The configured tracking expression (track by identity) caused re-creation of the entire collection of size ${liveCollection.length}. ` +\n 'This is an expensive operation requiring destruction and subsequent creation of DOM nodes, directives, components etc. ' +\n 'Please review the \"track expression\" and make sure that it uniquely identifies items in a collection.',\n );\n console.warn(message);\n }\n\n // moves in the container might caused context's index to get out of order, re-adjust if needed\n liveCollection.updateIndexes();\n\n // handle empty blocks\n if (metadata.hasEmptyBlock) {\n const bindingIndex = nextBindingIndex();\n const isCollectionEmpty = liveCollection.length === 0;\n if (bindingUpdated(hostLView, bindingIndex, isCollectionEmpty)) {\n const emptyTemplateIndex = metadataSlotIdx + 2;\n const lContainerForEmpty = getLContainer(hostLView, emptyTemplateIndex);\n if (isCollectionEmpty) {\n const emptyTemplateTNode = getExistingTNode(hostTView, emptyTemplateIndex);\n const dehydratedView = findMatchingDehydratedView(\n lContainerForEmpty,\n emptyTemplateTNode.tView!.ssrId,\n );\n const embeddedLView = createAndRenderEmbeddedLView(\n hostLView,\n emptyTemplateTNode,\n undefined,\n {dehydratedView},\n );\n addLViewToLContainer(\n lContainerForEmpty,\n embeddedLView,\n 0,\n shouldAddViewToDom(emptyTemplateTNode, dehydratedView),\n );\n } else {\n removeLViewFromLContainer(lContainerForEmpty, 0);\n }\n }\n }\n } finally {\n setActiveConsumer(prevConsumer);\n }\n}\n\nfunction getLContainer(lView: LView, index: number): LContainer {\n const lContainer = lView[index];\n ngDevMode && assertLContainer(lContainer);\n\n return lContainer;\n}\n\nfunction detachExistingView<T>(lContainer: LContainer, index: number): LView<T> {\n const existingLView = detachView(lContainer, index);\n ngDevMode && assertLView(existingLView);\n\n return existingLView as LView<T>;\n}\n\nfunction getExistingLViewFromLContainer<T>(lContainer: LContainer, index: number): LView<T> {\n const existingLView = getLViewFromLContainer<T>(lContainer, index);\n ngDevMode && assertLView(existingLView);\n\n return existingLView!;\n}\n\nfunction getExistingTNode(tView: TView, index: number): TNode {\n const tNode = getTNode(tView, index);\n ngDevMode && assertTNode(tNode);\n\n return tNode;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n invalidSkipHydrationHost,\n validateMatchingNode,\n validateNodeExists,\n} from '../../hydration/error_handling';\nimport {locateNextRNode} from '../../hydration/node_lookup_utils';\nimport {\n hasSkipHydrationAttrOnRElement,\n hasSkipHydrationAttrOnTNode,\n} from '../../hydration/skip_hydration';\nimport {\n getSerializedContainerViews,\n isDisconnectedNode,\n markRNodeAsClaimedByHydration,\n markRNodeAsSkippedByHydration,\n setSegmentHead,\n} from '../../hydration/utils';\nimport {isDetachedByI18n} from '../../i18n/utils';\nimport {assertDefined, assertEqual, assertIndexInRange} from '../../util/assert';\nimport {assertHasParent} from '../assert';\nimport {attachPatchData} from '../context_discovery';\nimport {\n clearElementContents,\n createElementNode,\n setupStaticAttributes,\n} from '../dom_node_manipulation';\nimport {hasClassInput, hasStyleInput, TElementNode, TNode, TNodeType} from '../interfaces/node';\nimport {Renderer} from '../interfaces/renderer';\nimport {RElement} from '../interfaces/renderer_dom';\nimport {isComponentHost, isDirectiveHost} from '../interfaces/type_checks';\nimport {HEADER_OFFSET, HYDRATION, LView, RENDERER, TView} from '../interfaces/view';\nimport {assertTNodeType} from '../node_assert';\nimport {appendChild} from '../node_manipulation';\nimport {executeContentQueries} from '../queries/query_execution';\nimport {\n decreaseElementDepthCount,\n enterSkipHydrationBlock,\n getBindingIndex,\n getBindingsEnabled,\n getCurrentTNode,\n getElementDepthCount,\n getLView,\n getNamespace,\n getTView,\n increaseElementDepthCount,\n isCurrentTNodeParent,\n isInSkipHydrationBlock,\n isSkipHydrationRootTNode,\n lastNodeWasCreated,\n leaveSkipHydrationBlock,\n setCurrentTNode,\n setCurrentTNodeAsNotParent,\n wasLastNodeCreated,\n} from '../state';\nimport {elementEndFirstCreatePass, elementStartFirstCreatePass} from '../view/elements';\n\nimport {validateElementIsKnown} from './element_validation';\nimport {setDirectiveInputsWhichShadowsStyling} from './property';\nimport {\n createDirectivesInstances,\n findDirectiveDefMatches,\n saveResolvedLocalsInData,\n} from './shared';\n\n/**\n * Create DOM element. The instruction must later be followed by `elementEnd()` call.\n *\n * @param index Index of the element in the LView array\n * @param name Name of the DOM Node\n * @param attrsIndex Index of the element's attributes in the `consts` array.\n * @param localRefsIndex Index of the element's local references in the `consts` array.\n * @returns This function returns itself so that it may be chained.\n *\n * Attributes and localRefs are passed as an array of strings where elements with an even index\n * hold an attribute name and elements with an odd index hold an attribute value, ex.:\n * ['id', 'warning5', 'class', 'alert']\n *\n * @codeGenApi\n */\nexport function ɵɵelementStart(\n index: number,\n name: string,\n attrsIndex?: number | null,\n localRefsIndex?: number,\n): typeof ɵɵelementStart {\n const lView = getLView();\n const tView = getTView();\n const adjustedIndex = HEADER_OFFSET + index;\n\n ngDevMode &&\n assertEqual(\n getBindingIndex(),\n tView.bindingStartIndex,\n 'elements should be created before any bindings',\n );\n ngDevMode && assertIndexInRange(lView, adjustedIndex);\n\n const renderer = lView[RENDERER];\n const tNode = tView.firstCreatePass\n ? elementStartFirstCreatePass(\n adjustedIndex,\n tView,\n lView,\n name,\n findDirectiveDefMatches,\n getBindingsEnabled(),\n attrsIndex,\n localRefsIndex,\n )\n : (tView.data[adjustedIndex] as TElementNode);\n\n const native = _locateOrCreateElementNode(tView, lView, tNode, renderer, name, index);\n lView[adjustedIndex] = native;\n\n const hasDirectives = isDirectiveHost(tNode);\n\n if (ngDevMode && tView.firstCreatePass) {\n validateElementIsKnown(native, lView, tNode.value, tView.schemas, hasDirectives);\n }\n\n setCurrentTNode(tNode, true);\n setupStaticAttributes(renderer, native, tNode);\n\n if (!isDetachedByI18n(tNode) && wasLastNodeCreated()) {\n // In the i18n case, the translation may have removed this element, so only add it if it is not\n // detached. See `TNodeType.Placeholder` and `LFrame.inI18n` for more context.\n appendChild(tView, lView, native, tNode);\n }\n\n // any immediate children of a component or template container must be pre-emptively\n // monkey-patched with the component view data so that the element can be inspected\n // later on using any element discovery utility methods (see `element_discovery.ts`)\n if (getElementDepthCount() === 0 || hasDirectives) {\n attachPatchData(native, lView);\n }\n increaseElementDepthCount();\n\n if (hasDirectives) {\n createDirectivesInstances(tView, lView, tNode);\n executeContentQueries(tView, tNode, lView);\n }\n if (localRefsIndex !== null) {\n saveResolvedLocalsInData(lView, tNode);\n }\n return ɵɵelementStart;\n}\n\n/**\n * Mark the end of the element.\n * @returns This function returns itself so that it may be chained.\n *\n * @codeGenApi\n */\nexport function ɵɵelementEnd(): typeof ɵɵelementEnd {\n let currentTNode = getCurrentTNode()!;\n ngDevMode && assertDefined(currentTNode, 'No parent node to close.');\n if (isCurrentTNodeParent()) {\n setCurrentTNodeAsNotParent();\n } else {\n ngDevMode && assertHasParent(getCurrentTNode());\n currentTNode = currentTNode.parent!;\n setCurrentTNode(currentTNode, false);\n }\n\n const tNode = currentTNode;\n ngDevMode && assertTNodeType(tNode, TNodeType.AnyRNode);\n\n if (isSkipHydrationRootTNode(tNode)) {\n leaveSkipHydrationBlock();\n }\n\n decreaseElementDepthCount();\n\n const tView = getTView();\n if (tView.firstCreatePass) {\n elementEndFirstCreatePass(tView, tNode);\n }\n\n if (tNode.classesWithoutHost != null && hasClassInput(tNode)) {\n setDirectiveInputsWhichShadowsStyling(tView, tNode, getLView(), tNode.classesWithoutHost, true);\n }\n\n if (tNode.stylesWithoutHost != null && hasStyleInput(tNode)) {\n setDirectiveInputsWhichShadowsStyling(tView, tNode, getLView(), tNode.stylesWithoutHost, false);\n }\n return ɵɵelementEnd;\n}\n\n/**\n * Creates an empty element using {@link elementStart} and {@link elementEnd}\n *\n * @param index Index of the element in the data array\n * @param name Name of the DOM Node\n * @param attrsIndex Index of the element's attributes in the `consts` array.\n * @param localRefsIndex Index of the element's local references in the `consts` array.\n * @returns This function returns itself so that it may be chained.\n *\n * @codeGenApi\n */\nexport function ɵɵelement(\n index: number,\n name: string,\n attrsIndex?: number | null,\n localRefsIndex?: number,\n): typeof ɵɵelement {\n ɵɵelementStart(index, name, attrsIndex, localRefsIndex);\n ɵɵelementEnd();\n return ɵɵelement;\n}\n\nlet _locateOrCreateElementNode: typeof locateOrCreateElementNodeImpl = (\n tView: TView,\n lView: LView,\n tNode: TNode,\n renderer: Renderer,\n name: string,\n index: number,\n) => {\n lastNodeWasCreated(true);\n return createElementNode(renderer, name, getNamespace());\n};\n\n/**\n * Enables hydration code path (to lookup existing elements in DOM)\n * in addition to the regular creation mode of element nodes.\n */\nfunction locateOrCreateElementNodeImpl(\n tView: TView,\n lView: LView,\n tNode: TNode,\n renderer: Renderer,\n name: string,\n index: number,\n): RElement {\n const hydrationInfo = lView[HYDRATION];\n const isNodeCreationMode =\n !hydrationInfo ||\n isInSkipHydrationBlock() ||\n isDetachedByI18n(tNode) ||\n isDisconnectedNode(hydrationInfo, index);\n lastNodeWasCreated(isNodeCreationMode);\n\n // Regular creation mode.\n if (isNodeCreationMode) {\n return createElementNode(renderer, name, getNamespace());\n }\n\n // Hydration mode, looking up an existing element in DOM.\n const native = locateNextRNode<RElement>(hydrationInfo, tView, lView, tNode)!;\n ngDevMode && validateMatchingNode(native, Node.ELEMENT_NODE, name, lView, tNode);\n ngDevMode && markRNodeAsClaimedByHydration(native);\n\n // This element might also be an anchor of a view container.\n if (getSerializedContainerViews(hydrationInfo, index)) {\n // Important note: this element acts as an anchor, but it's **not** a part\n // of the embedded view, so we start the segment **after** this element, taking\n // a reference to the next sibling. For example, the following template:\n // `<div #vcrTarget>` is represented in the DOM as `<div></div>...<!--container-->`,\n // so while processing a `<div>` instruction, point to the next sibling as a\n // start of a segment.\n ngDevMode && validateNodeExists(native.nextSibling, lView, tNode);\n setSegmentHead(hydrationInfo, index, native.nextSibling);\n }\n\n // Checks if the skip hydration attribute is present during hydration so we know to\n // skip attempting to hydrate this block. We check both TNode and RElement for an\n // attribute: the RElement case is needed for i18n cases, when we add it to host\n // elements during the annotation phase (after all internal data structures are setup).\n if (\n hydrationInfo &&\n (hasSkipHydrationAttrOnTNode(tNode) || hasSkipHydrationAttrOnRElement(native))\n ) {\n if (isComponentHost(tNode)) {\n enterSkipHydrationBlock(tNode);\n\n // Since this isn't hydratable, we need to empty the node\n // so there's no duplicate content after render\n clearElementContents(native);\n\n ngDevMode && markRNodeAsSkippedByHydration(native);\n } else if (ngDevMode) {\n // If this is not a component host, throw an error.\n // Hydration can be skipped on per-component basis only.\n throw invalidSkipHydrationHost(native);\n }\n }\n return native;\n}\n\nexport function enableLocateOrCreateElementNodeImpl() {\n _locateOrCreateElementNode = locateOrCreateElementNodeImpl;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport {validateMatchingNode, validateNodeExists} from '../../hydration/error_handling';\nimport {locateNextRNode, siblingAfter} from '../../hydration/node_lookup_utils';\nimport {\n getNgContainerSize,\n isDisconnectedNode,\n markRNodeAsClaimedByHydration,\n setSegmentHead,\n} from '../../hydration/utils';\nimport {isDetachedByI18n} from '../../i18n/utils';\nimport {assertEqual, assertIndexInRange, assertNumber} from '../../util/assert';\nimport {assertHasParent} from '../assert';\nimport {attachPatchData} from '../context_discovery';\nimport {createCommentNode} from '../dom_node_manipulation';\nimport {registerPostOrderHooks} from '../hooks';\nimport {TAttributes, TElementContainerNode, TNode, TNodeType} from '../interfaces/node';\nimport {RComment} from '../interfaces/renderer_dom';\nimport {isContentQueryHost, isDirectiveHost} from '../interfaces/type_checks';\nimport {HEADER_OFFSET, HYDRATION, LView, RENDERER, TView} from '../interfaces/view';\nimport {assertTNodeType} from '../node_assert';\nimport {appendChild} from '../node_manipulation';\nimport {executeContentQueries} from '../queries/query_execution';\nimport {\n getBindingIndex,\n getBindingsEnabled,\n getCurrentTNode,\n getLView,\n getTView,\n isCurrentTNodeParent,\n isInSkipHydrationBlock,\n lastNodeWasCreated,\n setCurrentTNode,\n setCurrentTNodeAsNotParent,\n wasLastNodeCreated,\n} from '../state';\nimport {computeStaticStyling} from '../styling/static_styling';\nimport {mergeHostAttrs} from '../util/attrs_utils';\nimport {getConstant} from '../util/view_utils';\n\nimport {getOrCreateTNode} from '../tnode_manipulation';\nimport {resolveDirectives} from '../view/directives';\nimport {\n createDirectivesInstances,\n findDirectiveDefMatches,\n saveResolvedLocalsInData,\n} from './shared';\n\nfunction elementContainerStartFirstCreatePass(\n index: number,\n tView: TView,\n lView: LView,\n attrsIndex?: number | null,\n localRefsIndex?: number,\n): TElementContainerNode {\n ngDevMode && ngDevMode.firstCreatePass++;\n\n const tViewConsts = tView.consts;\n const attrs = getConstant<TAttributes>(tViewConsts, attrsIndex);\n const tNode = getOrCreateTNode(tView, index, TNodeType.ElementContainer, 'ng-container', attrs);\n\n // While ng-container doesn't necessarily support styling, we use the style context to identify\n // and execute directives on the ng-container.\n if (attrs !== null) {\n computeStaticStyling(tNode, attrs, true);\n }\n\n const localRefs = getConstant<string[]>(tViewConsts, localRefsIndex);\n if (getBindingsEnabled()) {\n resolveDirectives(tView, lView, tNode, localRefs, findDirectiveDefMatches);\n }\n\n // Merge the template attrs last so that they have the highest priority.\n tNode.mergedAttrs = mergeHostAttrs(tNode.mergedAttrs, tNode.attrs);\n\n if (tView.queries !== null) {\n tView.queries.elementStart(tView, tNode);\n }\n\n return tNode;\n}\n\n/**\n * Creates a logical container for other nodes (<ng-container>) backed by a comment node in the DOM.\n * The instruction must later be followed by `elementContainerEnd()` call.\n *\n * @param index Index of the element in the LView array\n * @param attrsIndex Index of the container attributes in the `consts` array.\n * @param localRefsIndex Index of the container's local references in the `consts` array.\n * @returns This function returns itself so that it may be chained.\n *\n * Even if this instruction accepts a set of attributes no actual attribute values are propagated to\n * the DOM (as a comment node can't have attributes). Attributes are here only for directive\n * matching purposes and setting initial inputs of directives.\n *\n * @codeGenApi\n */\nexport function ɵɵelementContainerStart(\n index: number,\n attrsIndex?: number | null,\n localRefsIndex?: number,\n): typeof ɵɵelementContainerStart {\n const lView = getLView();\n const tView = getTView();\n const adjustedIndex = index + HEADER_OFFSET;\n\n ngDevMode && assertIndexInRange(lView, adjustedIndex);\n ngDevMode &&\n assertEqual(\n getBindingIndex(),\n tView.bindingStartIndex,\n 'element containers should be created before any bindings',\n );\n\n const tNode = tView.firstCreatePass\n ? elementContainerStartFirstCreatePass(adjustedIndex, tView, lView, attrsIndex, localRefsIndex)\n : (tView.data[adjustedIndex] as TElementContainerNode);\n setCurrentTNode(tNode, true);\n\n const comment = _locateOrCreateElementContainerNode(tView, lView, tNode, index);\n lView[adjustedIndex] = comment;\n\n if (wasLastNodeCreated()) {\n appendChild(tView, lView, comment, tNode);\n }\n attachPatchData(comment, lView);\n\n if (isDirectiveHost(tNode)) {\n createDirectivesInstances(tView, lView, tNode);\n executeContentQueries(tView, tNode, lView);\n }\n\n if (localRefsIndex != null) {\n saveResolvedLocalsInData(lView, tNode);\n }\n\n return ɵɵelementContainerStart;\n}\n\n/**\n * Mark the end of the <ng-container>.\n * @returns This function returns itself so that it may be chained.\n *\n * @codeGenApi\n */\nexport function ɵɵelementContainerEnd(): typeof ɵɵelementContainerEnd {\n let currentTNode = getCurrentTNode()!;\n const tView = getTView();\n if (isCurrentTNodeParent()) {\n setCurrentTNodeAsNotParent();\n } else {\n ngDevMode && assertHasParent(currentTNode);\n currentTNode = currentTNode.parent!;\n setCurrentTNode(currentTNode, false);\n }\n\n ngDevMode && assertTNodeType(currentTNode, TNodeType.ElementContainer);\n\n if (tView.firstCreatePass) {\n registerPostOrderHooks(tView, currentTNode);\n if (isContentQueryHost(currentTNode)) {\n tView.queries!.elementEnd(currentTNode);\n }\n }\n return ɵɵelementContainerEnd;\n}\n\n/**\n * Creates an empty logical container using {@link elementContainerStart}\n * and {@link elementContainerEnd}\n *\n * @param index Index of the element in the LView array\n * @param attrsIndex Index of the container attributes in the `consts` array.\n * @param localRefsIndex Index of the container's local references in the `consts` array.\n * @returns This function returns itself so that it may be chained.\n *\n * @codeGenApi\n */\nexport function ɵɵelementContainer(\n index: number,\n attrsIndex?: number | null,\n localRefsIndex?: number,\n): typeof ɵɵelementContainer {\n ɵɵelementContainerStart(index, attrsIndex, localRefsIndex);\n ɵɵelementContainerEnd();\n return ɵɵelementContainer;\n}\n\nlet _locateOrCreateElementContainerNode: typeof locateOrCreateElementContainerNode = (\n tView: TView,\n lView: LView,\n tNode: TNode,\n index: number,\n) => {\n lastNodeWasCreated(true);\n return createCommentNode(lView[RENDERER], ngDevMode ? 'ng-container' : '');\n};\n\n/**\n * Enables hydration code path (to lookup existing elements in DOM)\n * in addition to the regular creation mode of comment nodes that\n * represent <ng-container>'s anchor.\n */\nfunction locateOrCreateElementContainerNode(\n tView: TView,\n lView: LView,\n tNode: TNode,\n index: number,\n): RComment {\n let comment: RComment;\n const hydrationInfo = lView[HYDRATION];\n const isNodeCreationMode =\n !hydrationInfo ||\n isInSkipHydrationBlock() ||\n isDisconnectedNode(hydrationInfo, index) ||\n isDetachedByI18n(tNode);\n\n lastNodeWasCreated(isNodeCreationMode);\n\n // Regular creation mode.\n if (isNodeCreationMode) {\n return createCommentNode(lView[RENDERER], ngDevMode ? 'ng-container' : '');\n }\n\n // Hydration mode, looking up existing elements in DOM.\n const currentRNode = locateNextRNode(hydrationInfo, tView, lView, tNode)!;\n ngDevMode && validateNodeExists(currentRNode, lView, tNode);\n\n const ngContainerSize = getNgContainerSize(hydrationInfo, index) as number;\n ngDevMode &&\n assertNumber(\n ngContainerSize,\n 'Unexpected state: hydrating an <ng-container>, ' + 'but no hydration info is available.',\n );\n\n setSegmentHead(hydrationInfo, index, currentRNode);\n comment = siblingAfter<RComment>(ngContainerSize, currentRNode)!;\n\n if (ngDevMode) {\n validateMatchingNode(comment, Node.COMMENT_NODE, null, lView, tNode);\n markRNodeAsClaimedByHydration(comment);\n }\n\n return comment;\n}\n\nexport function enableLocateOrCreateElementContainerNodeImpl() {\n _locateOrCreateElementContainerNode = locateOrCreateElementContainerNode;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport {OpaqueViewState} from '../interfaces/view';\nimport {getLView} from '../state';\n\n/**\n * Returns the current OpaqueViewState instance.\n *\n * Used in conjunction with the restoreView() instruction to save a snapshot\n * of the current view and restore it when listeners are invoked. This allows\n * walking the declaration view tree in listeners to get vars from parent views.\n *\n * @codeGenApi\n */\nexport function ɵɵgetCurrentView(): OpaqueViewState {\n return getLView() as any as OpaqueViewState;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport {bindingUpdated} from '../bindings';\nimport {SanitizerFn} from '../interfaces/sanitization';\nimport {RENDERER} from '../interfaces/view';\nimport {\n getCurrentDirectiveDef,\n getLView,\n getSelectedTNode,\n getTView,\n nextBindingIndex,\n} from '../state';\nimport {NO_CHANGE} from '../tokens';\n\nimport {\n elementPropertyInternal,\n loadComponentRenderer,\n storePropertyBindingMetadata,\n} from './shared';\n\n/**\n * Update a property on a host element. Only applies to native node properties, not inputs.\n *\n * Operates on the element selected by index via the {@link select} instruction.\n *\n * @param propName Name of property. Because it is going to DOM, this is not subject to\n * renaming as part of minification.\n * @param value New value to write.\n * @param sanitizer An optional function used to sanitize the value.\n * @returns This function returns itself so that it may be chained\n * (e.g. `property('name', ctx.name)('title', ctx.title)`)\n *\n * @codeGenApi\n */\nexport function ɵɵhostProperty<T>(\n propName: string,\n value: T,\n sanitizer?: SanitizerFn | null,\n): typeof ɵɵhostProperty {\n const lView = getLView();\n const bindingIndex = nextBindingIndex();\n if (bindingUpdated(lView, bindingIndex, value)) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(tView, tNode, lView, propName, value, lView[RENDERER], sanitizer, true);\n ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, bindingIndex);\n }\n return ɵɵhostProperty;\n}\n\n/**\n * Updates a synthetic host binding (e.g. `[@foo]`) on a component or directive.\n *\n * This instruction is for compatibility purposes and is designed to ensure that a\n * synthetic host binding (e.g. `@HostBinding('@foo')`) properly gets rendered in\n * the component's renderer. Normally all host bindings are evaluated with the parent\n * component's renderer, but, in the case of animation @triggers, they need to be\n * evaluated with the sub component's renderer (because that's where the animation\n * triggers are defined).\n *\n * Do not use this instruction as a replacement for `elementProperty`. This instruction\n * only exists to ensure compatibility with the ViewEngine's host binding behavior.\n *\n * @param index The index of the element to update in the data array\n * @param propName Name of property. Because it is going to DOM, this is not subject to\n * renaming as part of minification.\n * @param value New value to write.\n * @param sanitizer An optional function used to sanitize the value.\n *\n * @codeGenApi\n */\nexport function ɵɵsyntheticHostProperty<T>(\n propName: string,\n value: T | NO_CHANGE,\n sanitizer?: SanitizerFn | null,\n): typeof ɵɵsyntheticHostProperty {\n const lView = getLView();\n const bindingIndex = nextBindingIndex();\n if (bindingUpdated(lView, bindingIndex, value)) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n const currentDef = getCurrentDirectiveDef(tView.data);\n const renderer = loadComponentRenderer(currentDef, tNode, lView);\n elementPropertyInternal(tView, tNode, lView, propName, value, renderer, sanitizer, true);\n ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, bindingIndex);\n }\n return ɵɵsyntheticHostProperty;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n// THIS CODE IS GENERATED - DO NOT MODIFY.\nconst u = undefined;\n\nfunction plural(val: number): number {\nconst n = val, i = Math.floor(Math.abs(val)), v = val.toString().replace(/^[^.]*\\.?/, '').length;\n\nif (i === 1 && v === 0)\n return 1;\nreturn 5;\n}\n\nexport default [\"en\",[[\"a\",\"p\"],[\"AM\",\"PM\"],u],[[\"AM\",\"PM\"],u,u],[[\"S\",\"M\",\"T\",\"W\",\"T\",\"F\",\"S\"],[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],[\"Su\",\"Mo\",\"Tu\",\"We\",\"Th\",\"Fr\",\"Sa\"]],u,[[\"J\",\"F\",\"M\",\"A\",\"M\",\"J\",\"J\",\"A\",\"S\",\"O\",\"N\",\"D\"],[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"]],u,[[\"B\",\"A\"],[\"BC\",\"AD\"],[\"Before Christ\",\"Anno Domini\"]],0,[6,0],[\"M/d/yy\",\"MMM d, y\",\"MMMM d, y\",\"EEEE, MMMM d, y\"],[\"h:mm a\",\"h:mm:ss a\",\"h:mm:ss a z\",\"h:mm:ss a zzzz\"],[\"{1}, {0}\",u,\"{1} 'at' {0}\",u],[\".\",\",\",\";\",\"%\",\"+\",\"-\",\"E\",\"×\",\"‰\",\"∞\",\"NaN\",\":\"],[\"#,##0.###\",\"#,##0%\",\"¤#,##0.00\",\"#E0\"],\"USD\",\"$\",\"US Dollar\",{},\"ltr\", plural];\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport {RuntimeError, RuntimeErrorCode} from '../errors';\nimport {global} from '../util/global';\n\nimport localeEn from './locale_en';\n\n/**\n * This const is used to store the locale data registered with `registerLocaleData`\n */\nlet LOCALE_DATA: {[localeId: string]: any} = {};\n\n/**\n * Register locale data to be used internally by Angular. See the\n * [\"I18n guide\"](guide/i18n/format-data-locale) to know how to import additional locale\n * data.\n *\n * The signature `registerLocaleData(data: any, extraData?: any)` is deprecated since v5.1\n */\nexport function registerLocaleData(data: any, localeId?: string | any, extraData?: any): void {\n if (typeof localeId !== 'string') {\n extraData = localeId;\n localeId = data[LocaleDataIndex.LocaleId];\n }\n\n localeId = localeId.toLowerCase().replace(/_/g, '-');\n\n LOCALE_DATA[localeId] = data;\n\n if (extraData) {\n LOCALE_DATA[localeId][LocaleDataIndex.ExtraData] = extraData;\n }\n}\n\n/**\n * Finds the locale data for a given locale.\n *\n * @param locale The locale code.\n * @returns The locale data.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n */\nexport function findLocaleData(locale: string): any {\n const normalizedLocale = normalizeLocale(locale);\n\n let match = getLocaleData(normalizedLocale);\n if (match) {\n return match;\n }\n\n // let's try to find a parent locale\n const parentLocale = normalizedLocale.split('-')[0];\n match = getLocaleData(parentLocale);\n if (match) {\n return match;\n }\n\n if (parentLocale === 'en') {\n return localeEn;\n }\n\n throw new RuntimeError(\n RuntimeErrorCode.MISSING_LOCALE_DATA,\n ngDevMode && `Missing locale data for the locale \"${locale}\".`,\n );\n}\n\n/**\n * Retrieves the default currency code for the given locale.\n *\n * The default is defined as the first currency which is still in use.\n *\n * @param locale The code of the locale whose currency code we want.\n * @returns The code of the default currency for the given locale.\n *\n */\nexport function getLocaleCurrencyCode(locale: string): string | null {\n const data = findLocaleData(locale);\n return data[LocaleDataIndex.CurrencyCode] || null;\n}\n\n/**\n * Retrieves the plural function used by ICU expressions to determine the plural case to use\n * for a given locale.\n * @param locale A locale code for the locale format rules to use.\n * @returns The plural function for the locale.\n * @see {@link NgPlural}\n * @see [Internationalization (i18n) Guide](guide/i18n)\n */\nexport function getLocalePluralCase(locale: string): (value: number) => number {\n const data = findLocaleData(locale);\n return data[LocaleDataIndex.PluralCase];\n}\n\n/**\n * Helper function to get the given `normalizedLocale` from `LOCALE_DATA`\n * or from the global `ng.common.locale`.\n */\nexport function getLocaleData(normalizedLocale: string): any {\n if (!(normalizedLocale in LOCALE_DATA)) {\n LOCALE_DATA[normalizedLocale] =\n global.ng &&\n global.ng.common &&\n global.ng.common.locales &&\n global.ng.common.locales[normalizedLocale];\n }\n return LOCALE_DATA[normalizedLocale];\n}\n\n/**\n * Helper function to remove all the locale data from `LOCALE_DATA`.\n */\nexport function unregisterAllLocaleData() {\n LOCALE_DATA = {};\n}\n\n/**\n * Index of each type of locale data from the locale data array\n */\nexport enum LocaleDataIndex {\n LocaleId = 0,\n DayPeriodsFormat,\n DayPeriodsStandalone,\n DaysFormat,\n DaysStandalone,\n MonthsFormat,\n MonthsStandalone,\n Eras,\n FirstDayOfWeek,\n WeekendRange,\n DateFormat,\n TimeFormat,\n DateTimeFormat,\n NumberSymbols,\n NumberFormats,\n CurrencyCode,\n CurrencySymbol,\n CurrencyName,\n Currencies,\n Directionality,\n PluralCase,\n ExtraData,\n}\n\n/**\n * Index of each type of locale data from the extra locale data array\n */\nexport const enum ExtraLocaleDataIndex {\n ExtraDayPeriodFormats = 0,\n ExtraDayPeriodStandalone,\n ExtraDayPeriodsRules,\n}\n\n/**\n * Index of each value in currency data (used to describe CURRENCIES_EN in currencies.ts)\n */\nexport const enum CurrencyIndex {\n Symbol = 0,\n SymbolNarrow,\n NbOfDigits,\n}\n\n/**\n * Returns the canonical form of a locale name - lowercase with `_` replaced with `-`.\n */\nfunction normalizeLocale(locale: string): string {\n return locale.toLowerCase().replace(/_/g, '-');\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {getLocalePluralCase} from './locale_data_api';\n\nconst pluralMapping = ['zero', 'one', 'two', 'few', 'many'];\n\n/**\n * Returns the plural case based on the locale\n */\nexport function getPluralCase(value: string, locale: string): string {\n const plural = getLocalePluralCase(locale)(parseInt(value, 10));\n const result = pluralMapping[plural];\n return result !== undefined ? result : 'other';\n}\n\n/**\n * The locale id that the application is using by default (for translations and ICU expressions).\n */\nexport const DEFAULT_LOCALE_ID = 'en-US';\n\n/**\n * USD currency code that the application uses by default for CurrencyPipe when no\n * DEFAULT_CURRENCY_CODE is provided.\n */\nexport const USD_CURRENCY_CODE = 'USD';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {SanitizerFn} from './sanitization';\n\n/**\n * Stores a list of nodes which need to be removed.\n *\n * Numbers are indexes into the `LView`\n * - index > 0: `removeRNode(lView[0])`\n * - index < 0: `removeICU(~lView[0])`\n */\nexport interface I18nRemoveOpCodes extends Array<number> {\n __brand__: 'I18nRemoveOpCodes';\n}\n\n/**\n * `I18nMutateOpCode` defines OpCodes for `I18nMutateOpCodes` array.\n *\n * OpCodes are efficient operations which can be applied to the DOM to update it. (For example to\n * update to a new ICU case requires that we clean up previous elements and create new ones.)\n *\n * OpCodes contain three parts:\n * 1) Parent node index offset. (p)\n * 2) Reference node index offset. (r)\n * 3) The instruction to execute. (i)\n *\n * pppp pppp pppp pppp rrrr rrrr rrrr riii\n * 3322 2222 2222 1111 1111 1110 0000 0000\n * 1098 7654 3210 9876 5432 1098 7654 3210\n *\n * ```ts\n * var parent = lView[opCode >>> SHIFT_PARENT];\n * var refNode = lView[((opCode & MASK_REF) >>> SHIFT_REF)];\n * var instruction = opCode & MASK_OPCODE;\n * ```\n *\n * See: `I18nCreateOpCodes` for example of usage.\n */\nexport const enum IcuCreateOpCode {\n /**\n * Stores shift amount for bits 17-3 that contain reference index.\n */\n SHIFT_REF = 1,\n /**\n * Stores shift amount for bits 31-17 that contain parent index.\n */\n SHIFT_PARENT = 17,\n /**\n * Mask for OpCode\n */\n MASK_INSTRUCTION = 0b1,\n\n /**\n * Mask for the Reference node (bits 16-3)\n */\n MASK_REF = 0b11111111111111110,\n // 11111110000000000\n // 65432109876543210\n\n /**\n * Instruction to append the current node to `PARENT`.\n */\n AppendChild = 0b0,\n\n /**\n * Instruction to set the attribute of a node.\n */\n Attr = 0b1,\n}\n\n/**\n * Array storing OpCode for dynamically creating `i18n` blocks.\n *\n * Example:\n * ```ts\n * <I18nCreateOpCode>[\n * // For adding text nodes\n * // ---------------------\n * // Equivalent to:\n * // lView[1].appendChild(lView[0] = document.createTextNode('xyz'));\n * 'xyz', 0, 1 << SHIFT_PARENT | 0 << SHIFT_REF | AppendChild,\n *\n * // For adding element nodes\n * // ---------------------\n * // Equivalent to:\n * // lView[1].appendChild(lView[0] = document.createElement('div'));\n * ELEMENT_MARKER, 'div', 0, 1 << SHIFT_PARENT | 0 << SHIFT_REF | AppendChild,\n *\n * // For adding comment nodes\n * // ---------------------\n * // Equivalent to:\n * // lView[1].appendChild(lView[0] = document.createComment(''));\n * ICU_MARKER, '', 0, 1 << SHIFT_PARENT | 0 << SHIFT_REF | AppendChild,\n *\n * // For moving existing nodes to a different location\n * // --------------------------------------------------\n * // Equivalent to:\n * // const node = lView[1];\n * // lView[2].appendChild(node);\n * 1 << SHIFT_REF | Select, 2 << SHIFT_PARENT | 0 << SHIFT_REF | AppendChild,\n *\n * // For removing existing nodes\n * // --------------------------------------------------\n * // const node = lView[1];\n * // removeChild(tView.data(1), node, lView);\n * 1 << SHIFT_REF | Remove,\n *\n * // For writing attributes\n * // --------------------------------------------------\n * // const node = lView[1];\n * // node.setAttribute('attr', 'value');\n * 1 << SHIFT_REF | Attr, 'attr', 'value'\n * ];\n * ```\n */\nexport interface IcuCreateOpCodes\n extends Array<number | string | ELEMENT_MARKER | ICU_MARKER | null>,\n I18nDebug {\n __brand__: 'I18nCreateOpCodes';\n}\n\nexport const enum I18nUpdateOpCode {\n /**\n * Stores shift amount for bits 17-2 that contain reference index.\n */\n SHIFT_REF = 2,\n /**\n * Mask for OpCode\n */\n MASK_OPCODE = 0b11,\n\n /**\n * Instruction to update a text node.\n */\n Text = 0b00,\n /**\n * Instruction to update a attribute of a node.\n */\n Attr = 0b01,\n /**\n * Instruction to switch the current ICU case.\n */\n IcuSwitch = 0b10,\n /**\n * Instruction to update the current ICU case.\n */\n IcuUpdate = 0b11,\n}\n\n/**\n * Marks that the next string is an element name.\n *\n * See `I18nMutateOpCodes` documentation.\n */\nexport const ELEMENT_MARKER: ELEMENT_MARKER = {\n marker: 'element',\n};\nexport interface ELEMENT_MARKER {\n marker: 'element';\n}\n\n/**\n * Marks that the next string is comment text need for ICU.\n *\n * See `I18nMutateOpCodes` documentation.\n */\nexport const ICU_MARKER: ICU_MARKER = {\n marker: 'ICU',\n};\n\nexport interface ICU_MARKER {\n marker: 'ICU';\n}\n\nexport interface I18nDebug {\n /**\n * Human readable representation of the OpCode arrays.\n *\n * NOTE: This property only exists if `ngDevMode` is set to `true` and it is not present in\n * production. Its presence is purely to help debug issue in development, and should not be relied\n * on in production application.\n */\n debug?: string[];\n}\n\n/**\n * Array storing OpCode for dynamically creating `i18n` translation DOM elements.\n *\n * This array creates a sequence of `Text` and `Comment` (as ICU anchor) DOM elements. It consists\n * of a pair of `number` and `string` pairs which encode the operations for the creation of the\n * translated block.\n *\n * The number is shifted and encoded according to `I18nCreateOpCode`\n *\n * Pseudocode:\n * ```ts\n * const i18nCreateOpCodes = [\n * 10 << I18nCreateOpCode.SHIFT, \"Text Node add to DOM\",\n * 11 << I18nCreateOpCode.SHIFT | I18nCreateOpCode.COMMENT, \"Comment Node add to DOM\",\n * 12 << I18nCreateOpCode.SHIFT | I18nCreateOpCode.APPEND_LATER, \"Text Node added later\"\n * ];\n *\n * for(var i=0; i<i18nCreateOpCodes.length; i++) {\n * const opcode = i18NCreateOpCodes[i++];\n * const index = opcode >> I18nCreateOpCode.SHIFT;\n * const text = i18NCreateOpCodes[i];\n * let node: Text|Comment;\n * if (opcode & I18nCreateOpCode.COMMENT === I18nCreateOpCode.COMMENT) {\n * node = lView[~index] = document.createComment(text);\n * } else {\n * node = lView[index] = document.createText(text);\n * }\n * if (opcode & I18nCreateOpCode.APPEND_EAGERLY !== I18nCreateOpCode.APPEND_EAGERLY) {\n * parentNode.appendChild(node);\n * }\n * }\n * ```\n */\nexport interface I18nCreateOpCodes extends Array<number | string>, I18nDebug {\n __brand__: 'I18nCreateOpCodes';\n}\n\n/**\n * See `I18nCreateOpCodes`\n */\nexport enum I18nCreateOpCode {\n /**\n * Number of bits to shift index so that it can be combined with the `APPEND_EAGERLY` and\n * `COMMENT`.\n */\n SHIFT = 2,\n\n /**\n * Should the node be appended to parent immediately after creation.\n */\n APPEND_EAGERLY = 0b01,\n\n /**\n * If set the node should be comment (rather than a text) node.\n */\n COMMENT = 0b10,\n}\n\n/**\n * Stores DOM operations which need to be applied to update DOM render tree due to changes in\n * expressions.\n *\n * The basic idea is that `i18nExp` OpCodes capture expression changes and update a change\n * mask bit. (Bit 1 for expression 1, bit 2 for expression 2 etc..., bit 32 for expression 32 and\n * higher.) The OpCodes then compare its own change mask against the expression change mask to\n * determine if the OpCodes should execute.\n *\n * NOTE: 32nd bit is special as it says 32nd or higher. This way if we have more than 32 bindings\n * the code still works, but with lower efficiency. (it is unlikely that a translation would have\n * more than 32 bindings.)\n *\n * These OpCodes can be used by both the i18n block as well as ICU sub-block.\n *\n * ## Example\n *\n * Assume\n * ```ts\n * if (rf & RenderFlags.Update) {\n * i18nExp(ctx.exp1); // If changed set mask bit 1\n * i18nExp(ctx.exp2); // If changed set mask bit 2\n * i18nExp(ctx.exp3); // If changed set mask bit 3\n * i18nExp(ctx.exp4); // If changed set mask bit 4\n * i18nApply(0); // Apply all changes by executing the OpCodes.\n * }\n * ```\n * We can assume that each call to `i18nExp` sets an internal `changeMask` bit depending on the\n * index of `i18nExp`.\n *\n * ### OpCodes\n * ```ts\n * <I18nUpdateOpCodes>[\n * // The following OpCodes represent: `<div i18n-title=\"pre{{exp1}}in{{exp2}}post\">`\n * // If `changeMask & 0b11`\n * // has changed then execute update OpCodes.\n * // has NOT changed then skip `8` values and start processing next OpCodes.\n * 0b11, 8,\n * // Concatenate `newValue = 'pre'+lView[bindIndex-4]+'in'+lView[bindIndex-3]+'post';`.\n * 'pre', -4, 'in', -3, 'post',\n * // Update attribute: `elementAttribute(1, 'title', sanitizerFn(newValue));`\n * 1 << SHIFT_REF | Attr, 'title', sanitizerFn,\n *\n * // The following OpCodes represent: `<div i18n>Hello {{exp3}}!\">`\n * // If `changeMask & 0b100`\n * // has changed then execute update OpCodes.\n * // has NOT changed then skip `4` values and start processing next OpCodes.\n * 0b100, 4,\n * // Concatenate `newValue = 'Hello ' + lView[bindIndex -2] + '!';`.\n * 'Hello ', -2, '!',\n * // Update text: `lView[1].textContent = newValue;`\n * 1 << SHIFT_REF | Text,\n *\n * // The following OpCodes represent: `<div i18n>{exp4, plural, ... }\">`\n * // If `changeMask & 0b1000`\n * // has changed then execute update OpCodes.\n * // has NOT changed then skip `2` values and start processing next OpCodes.\n * 0b1000, 2,\n * // Concatenate `newValue = lView[bindIndex -1];`.\n * -1,\n * // Switch ICU: `icuSwitchCase(lView[1], 0, newValue);`\n * 0 << SHIFT_ICU | 1 << SHIFT_REF | IcuSwitch,\n *\n * // Note `changeMask & -1` is always true, so the IcuUpdate will always execute.\n * -1, 1,\n * // Update ICU: `icuUpdateCase(lView[1], 0);`\n * 0 << SHIFT_ICU | 1 << SHIFT_REF | IcuUpdate,\n *\n * ];\n * ```\n *\n */\nexport interface I18nUpdateOpCodes extends Array<string | number | SanitizerFn | null>, I18nDebug {\n __brand__: 'I18nUpdateOpCodes';\n}\n\n/**\n * Store information for the i18n translation block.\n */\nexport interface TI18n {\n /**\n * A set of OpCodes which will create the Text Nodes and ICU anchors for the translation blocks.\n *\n * NOTE: The ICU anchors are filled in with ICU Update OpCode.\n */\n create: I18nCreateOpCodes;\n\n /**\n * A set of OpCodes which will be executed on each change detection to determine if any changes to\n * DOM are required.\n */\n update: I18nUpdateOpCodes;\n\n /**\n * An AST representing the translated message. This is used for hydration (and serialization),\n * while the Update and Create OpCodes are used at runtime.\n */\n ast: Array<I18nNode>;\n\n /**\n * Index of a parent TNode, which represents a host node for this i18n block.\n */\n parentTNodeIndex: number;\n}\n\n/**\n * Defines the ICU type of `select` or `plural`\n */\nexport const enum IcuType {\n select = 0,\n plural = 1,\n}\n\nexport interface TIcu {\n /**\n * Defines the ICU type of `select` or `plural`\n */\n type: IcuType;\n\n /**\n * Index in `LView` where the anchor node is stored. `<!-- ICU 0:0 -->`\n */\n anchorIdx: number;\n\n /**\n * Currently selected ICU case pointer.\n *\n * `lView[currentCaseLViewIndex]` stores the currently selected case. This is needed to know how\n * to clean up the current case when transitioning no the new case.\n *\n * If the value stored is:\n * `null`: No current case selected.\n * `<0`: A flag which means that the ICU just switched and that `icuUpdate` must be executed\n * regardless of the `mask`. (After the execution the flag is cleared)\n * `>=0` A currently selected case index.\n */\n currentCaseLViewIndex: number;\n\n /**\n * A list of case values which the current ICU will try to match.\n *\n * The last value is `other`\n */\n cases: any[];\n\n /**\n * A set of OpCodes to apply in order to build up the DOM render tree for the ICU\n */\n create: IcuCreateOpCodes[];\n\n /**\n * A set of OpCodes to apply in order to destroy the DOM render tree for the ICU.\n */\n remove: I18nRemoveOpCodes[];\n\n /**\n * A set of OpCodes to apply in order to update the DOM render tree for the ICU bindings.\n */\n update: I18nUpdateOpCodes[];\n}\n\n/**\n * Parsed ICU expression\n */\nexport interface IcuExpression {\n type: IcuType;\n mainBinding: number;\n cases: string[];\n values: (string | IcuExpression)[][];\n}\n\n// A parsed I18n AST Node\nexport type I18nNode = I18nTextNode | I18nElementNode | I18nICUNode | I18nPlaceholderNode;\n\n/**\n * Represents a block of text in a translation, such as `Hello, {{ name }}!`.\n */\nexport interface I18nTextNode {\n /** The AST node kind */\n kind: I18nNodeKind.TEXT;\n\n /** The LView index */\n index: number;\n}\n\n/**\n * Represents a simple DOM element in a translation, such as `<div>...</div>`\n */\nexport interface I18nElementNode {\n /** The AST node kind */\n kind: I18nNodeKind.ELEMENT;\n\n /** The LView index */\n index: number;\n\n /** The child nodes */\n children: Array<I18nNode>;\n}\n\n/**\n * Represents an ICU in a translation.\n */\nexport interface I18nICUNode {\n /** The AST node kind */\n kind: I18nNodeKind.ICU;\n\n /** The LView index */\n index: number;\n\n /** The branching cases */\n cases: Array<Array<I18nNode>>;\n\n /** The LView index that stores the active case */\n currentCaseLViewIndex: number;\n}\n\n/**\n * Represents special content that is embedded into the translation. This can\n * either be a special built-in element, such as <ng-container> and <ng-content>,\n * or it can be a sub-template, for example, from a structural directive.\n */\nexport interface I18nPlaceholderNode {\n /** The AST node kind */\n kind: I18nNodeKind.PLACEHOLDER;\n\n /** The LView index */\n index: number;\n\n /** The child nodes */\n children: Array<I18nNode>;\n\n /** The placeholder type */\n type: I18nPlaceholderType;\n}\n\nexport const enum I18nPlaceholderType {\n ELEMENT,\n SUBTEMPLATE,\n}\n\nexport const enum I18nNodeKind {\n TEXT,\n ELEMENT,\n PLACEHOLDER,\n ICU,\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {DEFAULT_LOCALE_ID} from '../../i18n/localization';\nimport {assertDefined} from '../../util/assert';\n\n/**\n * The locale id that the application is currently using (for translations and ICU expressions).\n * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine\n * but is now defined as a global value.\n */\nlet LOCALE_ID = DEFAULT_LOCALE_ID;\n\n/**\n * Sets the locale id that will be used for translations and ICU expressions.\n * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine\n * but is now defined as a global value.\n *\n * @param localeId\n */\nexport function setLocaleId(localeId: string) {\n ngDevMode && assertDefined(localeId, `Expected localeId to be defined`);\n if (typeof localeId === 'string') {\n LOCALE_ID = localeId.toLowerCase().replace(/_/g, '-');\n }\n}\n\n/**\n * Gets the locale id that will be used for translations and ICU expressions.\n * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine\n * but is now defined as a global value.\n */\nexport function getLocaleId(): string {\n return LOCALE_ID;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {RuntimeError, RuntimeErrorCode} from '../../errors';\nimport {claimDehydratedIcuCase, isI18nHydrationSupportEnabled} from '../../hydration/i18n';\nimport {locateI18nRNodeByIndex} from '../../hydration/node_lookup_utils';\nimport {isDisconnectedNode, markRNodeAsClaimedByHydration} from '../../hydration/utils';\nimport {getPluralCase} from '../../i18n/localization';\nimport {\n assertDefined,\n assertDomNode,\n assertEqual,\n assertGreaterThan,\n assertIndexInRange,\n throwError,\n} from '../../util/assert';\nimport {assertIndexInExpandoRange, assertTIcu} from '../assert';\nimport {attachPatchData} from '../context_discovery';\nimport {elementPropertyInternal, setElementAttribute} from '../instructions/shared';\nimport {\n ELEMENT_MARKER,\n I18nCreateOpCode,\n I18nCreateOpCodes,\n I18nUpdateOpCode,\n I18nUpdateOpCodes,\n ICU_MARKER,\n IcuCreateOpCode,\n IcuCreateOpCodes,\n IcuType,\n TI18n,\n TIcu,\n} from '../interfaces/i18n';\nimport {TNode} from '../interfaces/node';\nimport {RElement, RNode, RText} from '../interfaces/renderer_dom';\nimport {SanitizerFn} from '../interfaces/sanitization';\nimport {HEADER_OFFSET, HYDRATION, LView, RENDERER, TView} from '../interfaces/view';\nimport {\n createCommentNode,\n createElementNode,\n createTextNode,\n nativeInsertBefore,\n nativeRemoveNode,\n updateTextNode,\n} from '../dom_node_manipulation';\nimport {\n getBindingIndex,\n isInSkipHydrationBlock,\n lastNodeWasCreated,\n wasLastNodeCreated,\n} from '../state';\nimport {renderStringify} from '../util/stringify_utils';\nimport {getNativeByIndex, unwrapRNode} from '../util/view_utils';\n\nimport {getLocaleId} from './i18n_locale_id';\nimport {\n getCurrentICUCaseIndex,\n getParentFromIcuCreateOpCode,\n getRefFromIcuCreateOpCode,\n getTIcu,\n} from './i18n_util';\n\n/**\n * Keep track of which input bindings in `ɵɵi18nExp` have changed.\n *\n * This is used to efficiently update expressions in i18n only when the corresponding input has\n * changed.\n *\n * 1) Each bit represents which of the `ɵɵi18nExp` has changed.\n * 2) There are 32 bits allowed in JS.\n * 3) Bit 32 is special as it is shared for all changes past 32. (In other words if you have more\n * than 32 `ɵɵi18nExp` then all changes past 32nd `ɵɵi18nExp` will be mapped to same bit. This means\n * that we may end up changing more than we need to. But i18n expressions with 32 bindings is rare\n * so in practice it should not be an issue.)\n */\nlet changeMask = 0b0;\n\n/**\n * Keeps track of which bit needs to be updated in `changeMask`\n *\n * This value gets incremented on every call to `ɵɵi18nExp`\n */\nlet changeMaskCounter = 0;\n\n/**\n * Keep track of which input bindings in `ɵɵi18nExp` have changed.\n *\n * `setMaskBit` gets invoked by each call to `ɵɵi18nExp`.\n *\n * @param hasChange did `ɵɵi18nExp` detect a change.\n */\nexport function setMaskBit(hasChange: boolean) {\n if (hasChange) {\n changeMask = changeMask | (1 << Math.min(changeMaskCounter, 31));\n }\n changeMaskCounter++;\n}\n\nexport function applyI18n(tView: TView, lView: LView, index: number) {\n if (changeMaskCounter > 0) {\n ngDevMode && assertDefined(tView, `tView should be defined`);\n const tI18n = tView.data[index] as TI18n | I18nUpdateOpCodes;\n // When `index` points to an `ɵɵi18nAttributes` then we have an array otherwise `TI18n`\n const updateOpCodes: I18nUpdateOpCodes = Array.isArray(tI18n)\n ? (tI18n as I18nUpdateOpCodes)\n : (tI18n as TI18n).update;\n const bindingsStartIndex = getBindingIndex() - changeMaskCounter - 1;\n applyUpdateOpCodes(tView, lView, updateOpCodes, bindingsStartIndex, changeMask);\n }\n // Reset changeMask & maskBit to default for the next update cycle\n changeMask = 0b0;\n changeMaskCounter = 0;\n}\n\nfunction createNodeWithoutHydration(\n lView: LView,\n textOrName: string,\n nodeType: typeof Node.COMMENT_NODE | typeof Node.TEXT_NODE | typeof Node.ELEMENT_NODE,\n) {\n const renderer = lView[RENDERER];\n\n switch (nodeType) {\n case Node.COMMENT_NODE:\n return createCommentNode(renderer, textOrName);\n\n case Node.TEXT_NODE:\n return createTextNode(renderer, textOrName);\n\n case Node.ELEMENT_NODE:\n return createElementNode(renderer, textOrName, null);\n }\n}\n\nlet _locateOrCreateNode: typeof locateOrCreateNodeImpl = (lView, index, textOrName, nodeType) => {\n lastNodeWasCreated(true);\n return createNodeWithoutHydration(lView, textOrName, nodeType);\n};\n\nfunction locateOrCreateNodeImpl(\n lView: LView,\n index: number,\n textOrName: string,\n nodeType: typeof Node.COMMENT_NODE | typeof Node.TEXT_NODE | typeof Node.ELEMENT_NODE,\n) {\n const hydrationInfo = lView[HYDRATION];\n const noOffsetIndex = index - HEADER_OFFSET;\n const isNodeCreationMode =\n !isI18nHydrationSupportEnabled() ||\n !hydrationInfo ||\n isInSkipHydrationBlock() ||\n isDisconnectedNode(hydrationInfo, noOffsetIndex);\n\n lastNodeWasCreated(isNodeCreationMode);\n if (isNodeCreationMode) {\n return createNodeWithoutHydration(lView, textOrName, nodeType);\n }\n\n const native = locateI18nRNodeByIndex(hydrationInfo!, noOffsetIndex) as RNode;\n\n // TODO: Improve error handling\n //\n // Other hydration paths use validateMatchingNode() in order to provide\n // detailed information in development mode about the expected DOM.\n // However, not every node in an i18n block has a TNode. Instead, we\n // need to be able to use the AST to generate a similar message.\n ngDevMode && assertDefined(native, 'expected native element');\n ngDevMode && assertEqual((native as Node).nodeType, nodeType, 'expected matching nodeType');\n ngDevMode &&\n nodeType === Node.ELEMENT_NODE &&\n assertEqual(\n (native as HTMLElement).tagName.toLowerCase(),\n textOrName.toLowerCase(),\n 'expecting matching tagName',\n );\n ngDevMode && markRNodeAsClaimedByHydration(native);\n\n return native;\n}\n\nexport function enableLocateOrCreateI18nNodeImpl() {\n _locateOrCreateNode = locateOrCreateNodeImpl;\n}\n\n/**\n * Apply `I18nCreateOpCodes` op-codes as stored in `TI18n.create`.\n *\n * Creates text (and comment) nodes which are internationalized.\n *\n * @param lView Current lView\n * @param createOpCodes Set of op-codes to apply\n * @param parentRNode Parent node (so that direct children can be added eagerly) or `null` if it is\n * a root node.\n * @param insertInFrontOf DOM node that should be used as an anchor.\n */\nexport function applyCreateOpCodes(\n lView: LView,\n createOpCodes: I18nCreateOpCodes,\n parentRNode: RElement | null,\n insertInFrontOf: RElement | null,\n): void {\n const renderer = lView[RENDERER];\n for (let i = 0; i < createOpCodes.length; i++) {\n const opCode = createOpCodes[i++] as any;\n const text = createOpCodes[i] as string;\n const isComment = (opCode & I18nCreateOpCode.COMMENT) === I18nCreateOpCode.COMMENT;\n const appendNow =\n (opCode & I18nCreateOpCode.APPEND_EAGERLY) === I18nCreateOpCode.APPEND_EAGERLY;\n const index = opCode >>> I18nCreateOpCode.SHIFT;\n let rNode = lView[index];\n let lastNodeWasCreated = false;\n if (rNode === null) {\n // We only create new DOM nodes if they don't already exist: If ICU switches case back to a\n // case which was already instantiated, no need to create new DOM nodes.\n rNode = lView[index] = _locateOrCreateNode(\n lView,\n index,\n text,\n isComment ? Node.COMMENT_NODE : Node.TEXT_NODE,\n );\n lastNodeWasCreated = wasLastNodeCreated();\n }\n if (appendNow && parentRNode !== null && lastNodeWasCreated) {\n nativeInsertBefore(renderer, parentRNode, rNode, insertInFrontOf, false);\n }\n }\n}\n\n/**\n * Apply `I18nMutateOpCodes` OpCodes.\n *\n * @param tView Current `TView`\n * @param mutableOpCodes Mutable OpCodes to process\n * @param lView Current `LView`\n * @param anchorRNode place where the i18n node should be inserted.\n */\nexport function applyMutableOpCodes(\n tView: TView,\n mutableOpCodes: IcuCreateOpCodes,\n lView: LView,\n anchorRNode: RNode,\n): void {\n ngDevMode && assertDomNode(anchorRNode);\n const renderer = lView[RENDERER];\n // `rootIdx` represents the node into which all inserts happen.\n let rootIdx: number | null = null;\n // `rootRNode` represents the real node into which we insert. This can be different from\n // `lView[rootIdx]` if we have projection.\n // - null we don't have a parent (as can be the case in when we are inserting into a root of\n // LView which has no parent.)\n // - `RElement` The element representing the root after taking projection into account.\n let rootRNode!: RElement | null;\n for (let i = 0; i < mutableOpCodes.length; i++) {\n const opCode = mutableOpCodes[i];\n if (typeof opCode == 'string') {\n const textNodeIndex = mutableOpCodes[++i] as number;\n if (lView[textNodeIndex] === null) {\n ngDevMode && ngDevMode.rendererCreateTextNode++;\n ngDevMode && assertIndexInRange(lView, textNodeIndex);\n lView[textNodeIndex] = _locateOrCreateNode(lView, textNodeIndex, opCode, Node.TEXT_NODE);\n }\n } else if (typeof opCode == 'number') {\n switch (opCode & IcuCreateOpCode.MASK_INSTRUCTION) {\n case IcuCreateOpCode.AppendChild:\n const parentIdx = getParentFromIcuCreateOpCode(opCode);\n if (rootIdx === null) {\n // The first operation should save the `rootIdx` because the first operation\n // must insert into the root. (Only subsequent operations can insert into a dynamic\n // parent)\n rootIdx = parentIdx;\n rootRNode = renderer.parentNode(anchorRNode);\n }\n let insertInFrontOf: RNode | null;\n let parentRNode: RElement | null;\n if (parentIdx === rootIdx) {\n insertInFrontOf = anchorRNode;\n parentRNode = rootRNode;\n } else {\n insertInFrontOf = null;\n parentRNode = unwrapRNode(lView[parentIdx]) as RElement;\n }\n // FIXME(misko): Refactor with `processI18nText`\n if (parentRNode !== null) {\n // This can happen if the `LView` we are adding to is not attached to a parent `LView`.\n // In such a case there is no \"root\" we can attach to. This is fine, as we still need to\n // create the elements. When the `LView` gets later added to a parent these \"root\" nodes\n // get picked up and added.\n ngDevMode && assertDomNode(parentRNode);\n const refIdx = getRefFromIcuCreateOpCode(opCode);\n ngDevMode && assertGreaterThan(refIdx, HEADER_OFFSET, 'Missing ref');\n // `unwrapRNode` is not needed here as all of these point to RNodes as part of the i18n\n // which can't have components.\n const child = lView[refIdx] as RElement;\n ngDevMode && assertDomNode(child);\n nativeInsertBefore(renderer, parentRNode, child, insertInFrontOf, false);\n const tIcu = getTIcu(tView, refIdx);\n if (tIcu !== null && typeof tIcu === 'object') {\n // If we just added a comment node which has ICU then that ICU may have already been\n // rendered and therefore we need to re-add it here.\n ngDevMode && assertTIcu(tIcu);\n const caseIndex = getCurrentICUCaseIndex(tIcu, lView);\n if (caseIndex !== null) {\n applyMutableOpCodes(tView, tIcu.create[caseIndex], lView, lView[tIcu.anchorIdx]);\n }\n }\n }\n break;\n case IcuCreateOpCode.Attr:\n const elementNodeIndex = opCode >>> IcuCreateOpCode.SHIFT_REF;\n const attrName = mutableOpCodes[++i] as string;\n const attrValue = mutableOpCodes[++i] as string;\n // This code is used for ICU expressions only, since we don't support\n // directives/components in ICUs, we don't need to worry about inputs here\n setElementAttribute(\n renderer,\n getNativeByIndex(elementNodeIndex, lView) as RElement,\n null,\n null,\n attrName,\n attrValue,\n null,\n );\n break;\n default:\n if (ngDevMode) {\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_I18N_STRUCTURE,\n `Unable to determine the type of mutate operation for \"${opCode}\"`,\n );\n }\n }\n } else {\n switch (opCode) {\n case ICU_MARKER:\n const commentValue = mutableOpCodes[++i] as string;\n const commentNodeIndex = mutableOpCodes[++i] as number;\n if (lView[commentNodeIndex] === null) {\n ngDevMode &&\n assertEqual(\n typeof commentValue,\n 'string',\n `Expected \"${commentValue}\" to be a comment node value`,\n );\n ngDevMode && ngDevMode.rendererCreateComment++;\n ngDevMode && assertIndexInExpandoRange(lView, commentNodeIndex);\n const commentRNode = (lView[commentNodeIndex] = _locateOrCreateNode(\n lView,\n commentNodeIndex,\n commentValue,\n Node.COMMENT_NODE,\n ));\n // FIXME(misko): Attaching patch data is only needed for the root (Also add tests)\n attachPatchData(commentRNode, lView);\n }\n break;\n case ELEMENT_MARKER:\n const tagName = mutableOpCodes[++i] as string;\n const elementNodeIndex = mutableOpCodes[++i] as number;\n if (lView[elementNodeIndex] === null) {\n ngDevMode &&\n assertEqual(\n typeof tagName,\n 'string',\n `Expected \"${tagName}\" to be an element node tag name`,\n );\n\n ngDevMode && ngDevMode.rendererCreateElement++;\n ngDevMode && assertIndexInExpandoRange(lView, elementNodeIndex);\n const elementRNode = (lView[elementNodeIndex] = _locateOrCreateNode(\n lView,\n elementNodeIndex,\n tagName,\n Node.ELEMENT_NODE,\n ));\n // FIXME(misko): Attaching patch data is only needed for the root (Also add tests)\n attachPatchData(elementRNode, lView);\n }\n break;\n default:\n ngDevMode &&\n throwError(`Unable to determine the type of mutate operation for \"${opCode}\"`);\n }\n }\n }\n}\n\n/**\n * Apply `I18nUpdateOpCodes` OpCodes\n *\n * @param tView Current `TView`\n * @param lView Current `LView`\n * @param updateOpCodes OpCodes to process\n * @param bindingsStartIndex Location of the first `ɵɵi18nApply`\n * @param changeMask Each bit corresponds to a `ɵɵi18nExp` (Counting backwards from\n * `bindingsStartIndex`)\n */\nexport function applyUpdateOpCodes(\n tView: TView,\n lView: LView,\n updateOpCodes: I18nUpdateOpCodes,\n bindingsStartIndex: number,\n changeMask: number,\n) {\n for (let i = 0; i < updateOpCodes.length; i++) {\n // bit code to check if we should apply the next update\n const checkBit = updateOpCodes[i] as number;\n // Number of opCodes to skip until next set of update codes\n const skipCodes = updateOpCodes[++i] as number;\n if (checkBit & changeMask) {\n // The value has been updated since last checked\n let value = '';\n for (let j = i + 1; j <= i + skipCodes; j++) {\n const opCode = updateOpCodes[j];\n if (typeof opCode == 'string') {\n value += opCode;\n } else if (typeof opCode == 'number') {\n if (opCode < 0) {\n // Negative opCode represent `i18nExp` values offset.\n value += renderStringify(lView[bindingsStartIndex - opCode]);\n } else {\n const nodeIndex = opCode >>> I18nUpdateOpCode.SHIFT_REF;\n switch (opCode & I18nUpdateOpCode.MASK_OPCODE) {\n case I18nUpdateOpCode.Attr:\n const propName = updateOpCodes[++j] as string;\n const sanitizeFn = updateOpCodes[++j] as SanitizerFn | null;\n const tNodeOrTagName = tView.data[nodeIndex] as TNode | string;\n ngDevMode && assertDefined(tNodeOrTagName, 'Experting TNode or string');\n if (typeof tNodeOrTagName === 'string') {\n // IF we don't have a `TNode`, then we are an element in ICU (as ICU content does\n // not have TNode), in which case we know that there are no directives, and hence\n // we use attribute setting.\n setElementAttribute(\n lView[RENDERER],\n lView[nodeIndex],\n null,\n tNodeOrTagName,\n propName,\n value,\n sanitizeFn,\n );\n } else {\n elementPropertyInternal(\n tView,\n tNodeOrTagName,\n lView,\n propName,\n value,\n lView[RENDERER],\n sanitizeFn,\n false,\n );\n }\n break;\n case I18nUpdateOpCode.Text:\n const rText = lView[nodeIndex] as RText | null;\n rText !== null && updateTextNode(lView[RENDERER], rText, value);\n break;\n case I18nUpdateOpCode.IcuSwitch:\n applyIcuSwitchCase(tView, getTIcu(tView, nodeIndex)!, lView, value);\n break;\n case I18nUpdateOpCode.IcuUpdate:\n applyIcuUpdateCase(tView, getTIcu(tView, nodeIndex)!, bindingsStartIndex, lView);\n break;\n }\n }\n }\n }\n } else {\n const opCode = updateOpCodes[i + 1] as number;\n if (opCode > 0 && (opCode & I18nUpdateOpCode.MASK_OPCODE) === I18nUpdateOpCode.IcuUpdate) {\n // Special case for the `icuUpdateCase`. It could be that the mask did not match, but\n // we still need to execute `icuUpdateCase` because the case has changed recently due to\n // previous `icuSwitchCase` instruction. (`icuSwitchCase` and `icuUpdateCase` always come in\n // pairs.)\n const nodeIndex = opCode >>> I18nUpdateOpCode.SHIFT_REF;\n const tIcu = getTIcu(tView, nodeIndex)!;\n const currentIndex = lView[tIcu.currentCaseLViewIndex];\n if (currentIndex < 0) {\n applyIcuUpdateCase(tView, tIcu, bindingsStartIndex, lView);\n }\n }\n }\n i += skipCodes;\n }\n}\n\n/**\n * Apply OpCodes associated with updating an existing ICU.\n *\n * @param tView Current `TView`\n * @param tIcu Current `TIcu`\n * @param bindingsStartIndex Location of the first `ɵɵi18nApply`\n * @param lView Current `LView`\n */\nfunction applyIcuUpdateCase(tView: TView, tIcu: TIcu, bindingsStartIndex: number, lView: LView) {\n ngDevMode && assertIndexInRange(lView, tIcu.currentCaseLViewIndex);\n let activeCaseIndex = lView[tIcu.currentCaseLViewIndex];\n if (activeCaseIndex !== null) {\n let mask = changeMask;\n if (activeCaseIndex < 0) {\n // Clear the flag.\n // Negative number means that the ICU was freshly created and we need to force the update.\n activeCaseIndex = lView[tIcu.currentCaseLViewIndex] = ~activeCaseIndex;\n // -1 is same as all bits on, which simulates creation since it marks all bits dirty\n mask = -1;\n }\n applyUpdateOpCodes(tView, lView, tIcu.update[activeCaseIndex], bindingsStartIndex, mask);\n }\n}\n\n/**\n * Apply OpCodes associated with switching a case on ICU.\n *\n * This involves tearing down existing case and than building up a new case.\n *\n * @param tView Current `TView`\n * @param tIcu Current `TIcu`\n * @param lView Current `LView`\n * @param value Value of the case to update to.\n */\nfunction applyIcuSwitchCase(tView: TView, tIcu: TIcu, lView: LView, value: string) {\n // Rebuild a new case for this ICU\n const caseIndex = getCaseIndex(tIcu, value);\n let activeCaseIndex = getCurrentICUCaseIndex(tIcu, lView);\n if (activeCaseIndex !== caseIndex) {\n applyIcuSwitchCaseRemove(tView, tIcu, lView);\n lView[tIcu.currentCaseLViewIndex] = caseIndex === null ? null : ~caseIndex;\n if (caseIndex !== null) {\n // Add the nodes for the new case\n const anchorRNode = lView[tIcu.anchorIdx];\n if (anchorRNode) {\n ngDevMode && assertDomNode(anchorRNode);\n applyMutableOpCodes(tView, tIcu.create[caseIndex], lView, anchorRNode);\n }\n claimDehydratedIcuCase(lView, tIcu.anchorIdx, caseIndex);\n }\n }\n}\n\n/**\n * Apply OpCodes associated with tearing ICU case.\n *\n * This involves tearing down existing case and than building up a new case.\n *\n * @param tView Current `TView`\n * @param tIcu Current `TIcu`\n * @param lView Current `LView`\n */\nfunction applyIcuSwitchCaseRemove(tView: TView, tIcu: TIcu, lView: LView) {\n let activeCaseIndex = getCurrentICUCaseIndex(tIcu, lView);\n if (activeCaseIndex !== null) {\n const removeCodes = tIcu.remove[activeCaseIndex];\n for (let i = 0; i < removeCodes.length; i++) {\n const nodeOrIcuIndex = removeCodes[i] as number;\n if (nodeOrIcuIndex > 0) {\n // Positive numbers are `RNode`s.\n const rNode = getNativeByIndex(nodeOrIcuIndex, lView);\n rNode !== null && nativeRemoveNode(lView[RENDERER], rNode);\n } else {\n // Negative numbers are ICUs\n applyIcuSwitchCaseRemove(tView, getTIcu(tView, ~nodeOrIcuIndex)!, lView);\n }\n }\n }\n}\n\n/**\n * Returns the index of the current case of an ICU expression depending on the main binding value\n *\n * @param icuExpression\n * @param bindingValue The value of the main binding used by this ICU expression\n */\nfunction getCaseIndex(icuExpression: TIcu, bindingValue: string): number | null {\n let index = icuExpression.cases.indexOf(bindingValue);\n if (index === -1) {\n switch (icuExpression.type) {\n case IcuType.plural: {\n const resolvedCase = getPluralCase(bindingValue, getLocaleId());\n index = icuExpression.cases.indexOf(resolvedCase);\n if (index === -1 && resolvedCase !== 'other') {\n index = icuExpression.cases.indexOf('other');\n }\n break;\n }\n case IcuType.select: {\n index = icuExpression.cases.indexOf('other');\n break;\n }\n }\n }\n return index === -1 ? null : index;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {assertNumber, assertString} from '../../util/assert';\nimport {\n ELEMENT_MARKER,\n I18nCreateOpCode,\n I18nCreateOpCodes,\n I18nRemoveOpCodes,\n I18nUpdateOpCode,\n I18nUpdateOpCodes,\n ICU_MARKER,\n IcuCreateOpCode,\n IcuCreateOpCodes,\n} from '../interfaces/i18n';\n\nimport {\n getInstructionFromIcuCreateOpCode,\n getParentFromIcuCreateOpCode,\n getRefFromIcuCreateOpCode,\n} from './i18n_util';\n\n/**\n * Converts `I18nCreateOpCodes` array into a human readable format.\n *\n * This function is attached to the `I18nCreateOpCodes.debug` property if `ngDevMode` is enabled.\n * This function provides a human readable view of the opcodes. This is useful when debugging the\n * application as well as writing more readable tests.\n *\n * @param this `I18nCreateOpCodes` if attached as a method.\n * @param opcodes `I18nCreateOpCodes` if invoked as a function.\n */\nexport function i18nCreateOpCodesToString(\n this: I18nCreateOpCodes | void,\n opcodes?: I18nCreateOpCodes,\n): string[] {\n const createOpCodes: I18nCreateOpCodes = opcodes || (Array.isArray(this) ? this : ([] as any));\n let lines: string[] = [];\n for (let i = 0; i < createOpCodes.length; i++) {\n const opCode = createOpCodes[i++] as any;\n const text = createOpCodes[i] as string;\n const isComment = (opCode & I18nCreateOpCode.COMMENT) === I18nCreateOpCode.COMMENT;\n const appendNow =\n (opCode & I18nCreateOpCode.APPEND_EAGERLY) === I18nCreateOpCode.APPEND_EAGERLY;\n const index = opCode >>> I18nCreateOpCode.SHIFT;\n lines.push(\n `lView[${index}] = document.${isComment ? 'createComment' : 'createText'}(${JSON.stringify(\n text,\n )});`,\n );\n if (appendNow) {\n lines.push(`parent.appendChild(lView[${index}]);`);\n }\n }\n return lines;\n}\n\n/**\n * Converts `I18nUpdateOpCodes` array into a human readable format.\n *\n * This function is attached to the `I18nUpdateOpCodes.debug` property if `ngDevMode` is enabled.\n * This function provides a human readable view of the opcodes. This is useful when debugging the\n * application as well as writing more readable tests.\n *\n * @param this `I18nUpdateOpCodes` if attached as a method.\n * @param opcodes `I18nUpdateOpCodes` if invoked as a function.\n */\nexport function i18nUpdateOpCodesToString(\n this: I18nUpdateOpCodes | void,\n opcodes?: I18nUpdateOpCodes,\n): string[] {\n const parser = new OpCodeParser(opcodes || (Array.isArray(this) ? this : []));\n let lines: string[] = [];\n\n function consumeOpCode(value: number): string {\n const ref = value >>> I18nUpdateOpCode.SHIFT_REF;\n const opCode = value & I18nUpdateOpCode.MASK_OPCODE;\n switch (opCode) {\n case I18nUpdateOpCode.Text:\n return `(lView[${ref}] as Text).textContent = $$$`;\n case I18nUpdateOpCode.Attr:\n const attrName = parser.consumeString();\n const sanitizationFn = parser.consumeFunction();\n const value = sanitizationFn ? `(${sanitizationFn})($$$)` : '$$$';\n return `(lView[${ref}] as Element).setAttribute('${attrName}', ${value})`;\n case I18nUpdateOpCode.IcuSwitch:\n return `icuSwitchCase(${ref}, $$$)`;\n case I18nUpdateOpCode.IcuUpdate:\n return `icuUpdateCase(${ref})`;\n }\n throw new Error('unexpected OpCode');\n }\n\n while (parser.hasMore()) {\n let mask = parser.consumeNumber();\n let size = parser.consumeNumber();\n const end = parser.i + size;\n const statements: string[] = [];\n let statement = '';\n while (parser.i < end) {\n let value = parser.consumeNumberOrString();\n if (typeof value === 'string') {\n statement += value;\n } else if (value < 0) {\n // Negative numbers are ref indexes\n // Here `i` refers to current binding index. It is to signify that the value is relative,\n // rather than absolute.\n statement += '${lView[i' + value + ']}';\n } else {\n // Positive numbers are operations.\n const opCodeText = consumeOpCode(value);\n statements.push(opCodeText.replace('$$$', '`' + statement + '`') + ';');\n statement = '';\n }\n }\n lines.push(`if (mask & 0b${mask.toString(2)}) { ${statements.join(' ')} }`);\n }\n return lines;\n}\n\n/**\n * Converts `I18nCreateOpCodes` array into a human readable format.\n *\n * This function is attached to the `I18nCreateOpCodes.debug` if `ngDevMode` is enabled. This\n * function provides a human readable view of the opcodes. This is useful when debugging the\n * application as well as writing more readable tests.\n *\n * @param this `I18nCreateOpCodes` if attached as a method.\n * @param opcodes `I18nCreateOpCodes` if invoked as a function.\n */\nexport function icuCreateOpCodesToString(\n this: IcuCreateOpCodes | void,\n opcodes?: IcuCreateOpCodes,\n): string[] {\n const parser = new OpCodeParser(opcodes || (Array.isArray(this) ? this : []));\n let lines: string[] = [];\n\n function consumeOpCode(opCode: number): string {\n const parent = getParentFromIcuCreateOpCode(opCode);\n const ref = getRefFromIcuCreateOpCode(opCode);\n switch (getInstructionFromIcuCreateOpCode(opCode)) {\n case IcuCreateOpCode.AppendChild:\n return `(lView[${parent}] as Element).appendChild(lView[${lastRef}])`;\n case IcuCreateOpCode.Attr:\n return `(lView[${ref}] as Element).setAttribute(\"${parser.consumeString()}\", \"${parser.consumeString()}\")`;\n }\n throw new Error('Unexpected OpCode: ' + getInstructionFromIcuCreateOpCode(opCode));\n }\n\n let lastRef = -1;\n while (parser.hasMore()) {\n let value = parser.consumeNumberStringOrMarker();\n if (value === ICU_MARKER) {\n const text = parser.consumeString();\n lastRef = parser.consumeNumber();\n lines.push(`lView[${lastRef}] = document.createComment(\"${text}\")`);\n } else if (value === ELEMENT_MARKER) {\n const text = parser.consumeString();\n lastRef = parser.consumeNumber();\n lines.push(`lView[${lastRef}] = document.createElement(\"${text}\")`);\n } else if (typeof value === 'string') {\n lastRef = parser.consumeNumber();\n lines.push(`lView[${lastRef}] = document.createTextNode(\"${value}\")`);\n } else if (typeof value === 'number') {\n const line = consumeOpCode(value);\n line && lines.push(line);\n } else {\n throw new Error('Unexpected value');\n }\n }\n\n return lines;\n}\n\n/**\n * Converts `I18nRemoveOpCodes` array into a human readable format.\n *\n * This function is attached to the `I18nRemoveOpCodes.debug` if `ngDevMode` is enabled. This\n * function provides a human readable view of the opcodes. This is useful when debugging the\n * application as well as writing more readable tests.\n *\n * @param this `I18nRemoveOpCodes` if attached as a method.\n * @param opcodes `I18nRemoveOpCodes` if invoked as a function.\n */\nexport function i18nRemoveOpCodesToString(\n this: I18nRemoveOpCodes | void,\n opcodes?: I18nRemoveOpCodes,\n): string[] {\n const removeCodes = opcodes || (Array.isArray(this) ? this : []);\n let lines: string[] = [];\n\n for (let i = 0; i < removeCodes.length; i++) {\n const nodeOrIcuIndex = removeCodes[i] as number;\n if (nodeOrIcuIndex > 0) {\n // Positive numbers are `RNode`s.\n lines.push(`remove(lView[${nodeOrIcuIndex}])`);\n } else {\n // Negative numbers are ICUs\n lines.push(`removeNestedICU(${~nodeOrIcuIndex})`);\n }\n }\n\n return lines;\n}\n\nclass OpCodeParser {\n i: number = 0;\n codes: any[];\n\n constructor(codes: any[]) {\n this.codes = codes;\n }\n\n hasMore() {\n return this.i < this.codes.length;\n }\n\n consumeNumber(): number {\n let value = this.codes[this.i++];\n assertNumber(value, 'expecting number in OpCode');\n return value;\n }\n\n consumeString(): string {\n let value = this.codes[this.i++];\n assertString(value, 'expecting string in OpCode');\n return value;\n }\n\n consumeFunction(): Function | null {\n let value = this.codes[this.i++];\n if (value === null || typeof value === 'function') {\n return value;\n }\n throw new Error('expecting function in OpCode');\n }\n\n consumeNumberOrString(): number | string {\n let value = this.codes[this.i++];\n if (typeof value === 'string') {\n return value;\n }\n assertNumber(value, 'expecting number or string in OpCode');\n return value;\n }\n\n consumeNumberStringOrMarker(): number | string | ICU_MARKER | ELEMENT_MARKER {\n let value = this.codes[this.i++];\n if (\n typeof value === 'string' ||\n typeof value === 'number' ||\n value == ICU_MARKER ||\n value == ELEMENT_MARKER\n ) {\n return value;\n }\n assertNumber(value, 'expecting number, string, ICU_MARKER or ELEMENT_MARKER in OpCode');\n return value;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport '../../util/ng_dev_mode';\nimport '../../util/ng_i18n_closure_mode';\n\nimport {XSS_SECURITY_URL} from '../../error_details_base_url';\nimport {\n getTemplateContent,\n URI_ATTRS,\n VALID_ATTRS,\n VALID_ELEMENTS,\n} from '../../sanitization/html_sanitizer';\nimport {getInertBodyHelper} from '../../sanitization/inert_body';\nimport {_sanitizeUrl} from '../../sanitization/url_sanitizer';\nimport {\n assertDefined,\n assertEqual,\n assertGreaterThanOrEqual,\n assertOneOf,\n assertString,\n} from '../../util/assert';\nimport {CharCode} from '../../util/char_code';\nimport {loadIcuContainerVisitor} from './i18n_icu_container_visitor';\n\nimport {getDocument} from '../interfaces/document';\nimport {\n ELEMENT_MARKER,\n I18nCreateOpCode,\n I18nCreateOpCodes,\n I18nElementNode,\n I18nNode,\n I18nNodeKind,\n I18nPlaceholderNode,\n I18nPlaceholderType,\n I18nRemoveOpCodes,\n I18nUpdateOpCode,\n I18nUpdateOpCodes,\n ICU_MARKER,\n IcuCreateOpCode,\n IcuCreateOpCodes,\n IcuExpression,\n IcuType,\n TI18n,\n TIcu,\n} from '../interfaces/i18n';\nimport {TNode, TNodeType} from '../interfaces/node';\nimport {SanitizerFn} from '../interfaces/sanitization';\nimport {HEADER_OFFSET, LView, TView} from '../interfaces/view';\nimport {getCurrentParentTNode, getCurrentTNode, setCurrentTNode} from '../state';\n\nimport {\n i18nCreateOpCodesToString,\n i18nRemoveOpCodesToString,\n i18nUpdateOpCodesToString,\n icuCreateOpCodesToString,\n} from './i18n_debug';\nimport {addTNodeAndUpdateInsertBeforeIndex} from './i18n_insert_before_index';\nimport {ensureIcuContainerVisitorLoaded} from './i18n_tree_shaking';\nimport {\n createTNodePlaceholder,\n icuCreateOpCode,\n isRootTemplateMessage,\n setTIcu,\n setTNodeInsertBeforeIndex,\n} from './i18n_util';\nimport {createTNodeAtIndex} from '../tnode_manipulation';\nimport {allocExpando} from '../view/construction';\n\nconst BINDING_REGEXP = /�(\\d+):?\\d*�/gi;\nconst ICU_REGEXP = /({\\s*�\\d+:?\\d*�\\s*,\\s*\\S{6}\\s*,[\\s\\S]*})/gi;\nconst NESTED_ICU = /�(\\d+)�/;\nconst ICU_BLOCK_REGEXP = /^\\s*(�\\d+:?\\d*�)\\s*,\\s*(select|plural)\\s*,/;\n\nconst MARKER = `�`;\nconst SUBTEMPLATE_REGEXP = /�\\/?\\*(\\d+:\\d+)�/gi;\nconst PH_REGEXP = /�(\\/?[#*]\\d+):?\\d*�/gi;\n\n/**\n * Angular uses the special entity &ngsp; as a placeholder for non-removable space.\n * It's replaced by the 0xE500 PUA (Private Use Areas) unicode character and later on replaced by a\n * space.\n * We are re-implementing the same idea since translations might contain this special character.\n */\nconst NGSP_UNICODE_REGEXP = /\\uE500/g;\nfunction replaceNgsp(value: string): string {\n return value.replace(NGSP_UNICODE_REGEXP, ' ');\n}\n\n/**\n * Patch a `debug` property getter on top of the existing object.\n *\n * NOTE: always call this method with `ngDevMode && attachDebugObject(...)`\n *\n * @param obj Object to patch\n * @param debugGetter Getter returning a value to patch\n */\nfunction attachDebugGetter<T>(obj: T, debugGetter: (this: T) => any): void {\n if (ngDevMode) {\n Object.defineProperty(obj, 'debug', {get: debugGetter, enumerable: false});\n } else {\n throw new Error(\n 'This method should be guarded with `ngDevMode` so that it can be tree shaken in production!',\n );\n }\n}\n\n/**\n * Create dynamic nodes from i18n translation block.\n *\n * - Text nodes are created synchronously\n * - TNodes are linked into tree lazily\n *\n * @param tView Current `TView`\n * @parentTNodeIndex index to the parent TNode of this i18n block\n * @param lView Current `LView`\n * @param index Index of `ɵɵi18nStart` instruction.\n * @param message Message to translate.\n * @param subTemplateIndex Index into the sub template of message translation. (ie in case of\n * `ngIf`) (-1 otherwise)\n */\nexport function i18nStartFirstCreatePass(\n tView: TView,\n parentTNodeIndex: number,\n lView: LView,\n index: number,\n message: string,\n subTemplateIndex: number,\n) {\n const rootTNode = getCurrentParentTNode();\n const createOpCodes: I18nCreateOpCodes = [] as any;\n const updateOpCodes: I18nUpdateOpCodes = [] as any;\n const existingTNodeStack: TNode[][] = [[]];\n const astStack: Array<Array<I18nNode>> = [[]];\n if (ngDevMode) {\n attachDebugGetter(createOpCodes, i18nCreateOpCodesToString);\n attachDebugGetter(updateOpCodes, i18nUpdateOpCodesToString);\n }\n\n message = getTranslationForTemplate(message, subTemplateIndex);\n const msgParts = replaceNgsp(message).split(PH_REGEXP);\n for (let i = 0; i < msgParts.length; i++) {\n let value = msgParts[i];\n if ((i & 1) === 0) {\n // Even indexes are text (including bindings & ICU expressions)\n const parts = i18nParseTextIntoPartsAndICU(value);\n for (let j = 0; j < parts.length; j++) {\n let part = parts[j];\n if ((j & 1) === 0) {\n // `j` is odd therefore `part` is string\n const text = part as string;\n ngDevMode && assertString(text, 'Parsed ICU part should be string');\n if (text !== '') {\n i18nStartFirstCreatePassProcessTextNode(\n astStack[0],\n tView,\n rootTNode,\n existingTNodeStack[0],\n createOpCodes,\n updateOpCodes,\n lView,\n text,\n );\n }\n } else {\n // `j` is Even therefor `part` is an `ICUExpression`\n const icuExpression: IcuExpression = part as IcuExpression;\n // Verify that ICU expression has the right shape. Translations might contain invalid\n // constructions (while original messages were correct), so ICU parsing at runtime may\n // not succeed (thus `icuExpression` remains a string).\n // Note: we intentionally retain the error here by not using `ngDevMode`, because\n // the value can change based on the locale and users aren't guaranteed to hit\n // an invalid string while they're developing.\n if (typeof icuExpression !== 'object') {\n throw new Error(`Unable to parse ICU expression in \"${message}\" message.`);\n }\n const icuContainerTNode = createTNodeAndAddOpCode(\n tView,\n rootTNode,\n existingTNodeStack[0],\n lView,\n createOpCodes,\n ngDevMode ? `ICU ${index}:${icuExpression.mainBinding}` : '',\n true,\n );\n const icuNodeIndex = icuContainerTNode.index;\n ngDevMode &&\n assertGreaterThanOrEqual(\n icuNodeIndex,\n HEADER_OFFSET,\n 'Index must be in absolute LView offset',\n );\n icuStart(\n astStack[0],\n tView,\n lView,\n updateOpCodes,\n parentTNodeIndex,\n icuExpression,\n icuNodeIndex,\n );\n }\n }\n } else {\n // Odd indexes are placeholders (elements and sub-templates)\n // At this point value is something like: '/#1:2' (originally coming from '�/#1:2�')\n const isClosing = value.charCodeAt(0) === CharCode.SLASH;\n const type = value.charCodeAt(isClosing ? 1 : 0);\n ngDevMode && assertOneOf(type, CharCode.STAR, CharCode.HASH);\n const index = HEADER_OFFSET + Number.parseInt(value.substring(isClosing ? 2 : 1));\n if (isClosing) {\n existingTNodeStack.shift();\n astStack.shift();\n setCurrentTNode(getCurrentParentTNode()!, false);\n } else {\n const tNode = createTNodePlaceholder(tView, existingTNodeStack[0], index);\n existingTNodeStack.unshift([]);\n setCurrentTNode(tNode, true);\n\n const placeholderNode: I18nPlaceholderNode = {\n kind: I18nNodeKind.PLACEHOLDER,\n index,\n children: [],\n type:\n type === CharCode.HASH ? I18nPlaceholderType.ELEMENT : I18nPlaceholderType.SUBTEMPLATE,\n };\n astStack[0].push(placeholderNode);\n astStack.unshift(placeholderNode.children);\n }\n }\n }\n\n tView.data[index] = <TI18n>{\n create: createOpCodes,\n update: updateOpCodes,\n ast: astStack[0],\n parentTNodeIndex,\n };\n}\n\n/**\n * Allocate space in i18n Range add create OpCode instruction to create a text or comment node.\n *\n * @param tView Current `TView` needed to allocate space in i18n range.\n * @param rootTNode Root `TNode` of the i18n block. This node determines if the new TNode will be\n * added as part of the `i18nStart` instruction or as part of the `TNode.insertBeforeIndex`.\n * @param existingTNodes internal state for `addTNodeAndUpdateInsertBeforeIndex`.\n * @param lView Current `LView` needed to allocate space in i18n range.\n * @param createOpCodes Array storing `I18nCreateOpCodes` where new opCodes will be added.\n * @param text Text to be added when the `Text` or `Comment` node will be created.\n * @param isICU true if a `Comment` node for ICU (instead of `Text`) node should be created.\n */\nfunction createTNodeAndAddOpCode(\n tView: TView,\n rootTNode: TNode | null,\n existingTNodes: TNode[],\n lView: LView,\n createOpCodes: I18nCreateOpCodes,\n text: string | null,\n isICU: boolean,\n): TNode {\n const i18nNodeIdx = allocExpando(tView, lView, 1, null);\n let opCode = i18nNodeIdx << I18nCreateOpCode.SHIFT;\n let parentTNode = getCurrentParentTNode();\n\n if (rootTNode === parentTNode) {\n // FIXME(misko): A null `parentTNode` should represent when we fall of the `LView` boundary.\n // (there is no parent), but in some circumstances (because we are inconsistent about how we set\n // `previousOrParentTNode`) it could point to `rootTNode` So this is a work around.\n parentTNode = null;\n }\n if (parentTNode === null) {\n // If we don't have a parent that means that we can eagerly add nodes.\n // If we have a parent than these nodes can't be added now (as the parent has not been created\n // yet) and instead the `parentTNode` is responsible for adding it. See\n // `TNode.insertBeforeIndex`\n opCode |= I18nCreateOpCode.APPEND_EAGERLY;\n }\n if (isICU) {\n opCode |= I18nCreateOpCode.COMMENT;\n ensureIcuContainerVisitorLoaded(loadIcuContainerVisitor);\n }\n createOpCodes.push(opCode, text === null ? '' : text);\n // We store `{{?}}` so that when looking at debug `TNodeType.template` we can see where the\n // bindings are.\n const tNode = createTNodeAtIndex(\n tView,\n i18nNodeIdx,\n isICU ? TNodeType.Icu : TNodeType.Text,\n text === null ? (ngDevMode ? '{{?}}' : '') : text,\n null,\n );\n addTNodeAndUpdateInsertBeforeIndex(existingTNodes, tNode);\n const tNodeIdx = tNode.index;\n setCurrentTNode(tNode, false /* Text nodes are self closing */);\n if (parentTNode !== null && rootTNode !== parentTNode) {\n // We are a child of deeper node (rather than a direct child of `i18nStart` instruction.)\n // We have to make sure to add ourselves to the parent.\n setTNodeInsertBeforeIndex(parentTNode, tNodeIdx);\n }\n return tNode;\n}\n\n/**\n * Processes text node in i18n block.\n *\n * Text nodes can have:\n * - Create instruction in `createOpCodes` for creating the text node.\n * - Allocate spec for text node in i18n range of `LView`\n * - If contains binding:\n * - bindings => allocate space in i18n range of `LView` to store the binding value.\n * - populate `updateOpCodes` with update instructions.\n *\n * @param tView Current `TView`\n * @param rootTNode Root `TNode` of the i18n block. This node determines if the new TNode will\n * be added as part of the `i18nStart` instruction or as part of the\n * `TNode.insertBeforeIndex`.\n * @param existingTNodes internal state for `addTNodeAndUpdateInsertBeforeIndex`.\n * @param createOpCodes Location where the creation OpCodes will be stored.\n * @param lView Current `LView`\n * @param text The translated text (which may contain binding)\n */\nfunction i18nStartFirstCreatePassProcessTextNode(\n ast: I18nNode[],\n tView: TView,\n rootTNode: TNode | null,\n existingTNodes: TNode[],\n createOpCodes: I18nCreateOpCodes,\n updateOpCodes: I18nUpdateOpCodes,\n lView: LView,\n text: string,\n): void {\n const hasBinding = text.match(BINDING_REGEXP);\n const tNode = createTNodeAndAddOpCode(\n tView,\n rootTNode,\n existingTNodes,\n lView,\n createOpCodes,\n hasBinding ? null : text,\n false,\n );\n const index = tNode.index;\n if (hasBinding) {\n generateBindingUpdateOpCodes(updateOpCodes, text, index, null, 0, null);\n }\n ast.push({kind: I18nNodeKind.TEXT, index});\n}\n\n/**\n * See `i18nAttributes` above.\n */\nexport function i18nAttributesFirstPass(tView: TView, index: number, values: string[]) {\n const previousElement = getCurrentTNode()!;\n const previousElementIndex = previousElement.index;\n const updateOpCodes: I18nUpdateOpCodes = [] as any;\n if (ngDevMode) {\n attachDebugGetter(updateOpCodes, i18nUpdateOpCodesToString);\n }\n if (tView.firstCreatePass && tView.data[index] === null) {\n for (let i = 0; i < values.length; i += 2) {\n const attrName = values[i];\n const message = values[i + 1];\n\n if (message !== '') {\n // Check if attribute value contains an ICU and throw an error if that's the case.\n // ICUs in element attributes are not supported.\n // Note: we intentionally retain the error here by not using `ngDevMode`, because\n // the `value` can change based on the locale and users aren't guaranteed to hit\n // an invalid string while they're developing.\n if (ICU_REGEXP.test(message)) {\n throw new Error(\n `ICU expressions are not supported in attributes. Message: \"${message}\".`,\n );\n }\n\n // i18n attributes that hit this code path are guaranteed to have bindings, because\n // the compiler treats static i18n attributes as regular attribute bindings.\n // Since this may not be the first i18n attribute on this element we need to pass in how\n // many previous bindings there have already been.\n generateBindingUpdateOpCodes(\n updateOpCodes,\n message,\n previousElementIndex,\n attrName,\n countBindings(updateOpCodes),\n null,\n );\n }\n }\n tView.data[index] = updateOpCodes;\n }\n}\n\n/**\n * Generate the OpCodes to update the bindings of a string.\n *\n * @param updateOpCodes Place where the update opcodes will be stored.\n * @param str The string containing the bindings.\n * @param destinationNode Index of the destination node which will receive the binding.\n * @param attrName Name of the attribute, if the string belongs to an attribute.\n * @param sanitizeFn Sanitization function used to sanitize the string after update, if necessary.\n * @param bindingStart The lView index of the next expression that can be bound via an opCode.\n * @returns The mask value for these bindings\n */\nfunction generateBindingUpdateOpCodes(\n updateOpCodes: I18nUpdateOpCodes,\n str: string,\n destinationNode: number,\n attrName: string | null,\n bindingStart: number,\n sanitizeFn: SanitizerFn | null,\n): number {\n ngDevMode &&\n assertGreaterThanOrEqual(\n destinationNode,\n HEADER_OFFSET,\n 'Index must be in absolute LView offset',\n );\n const maskIndex = updateOpCodes.length; // Location of mask\n const sizeIndex = maskIndex + 1; // location of size for skipping\n updateOpCodes.push(null, null); // Alloc space for mask and size\n const startIndex = maskIndex + 2; // location of first allocation.\n if (ngDevMode) {\n attachDebugGetter(updateOpCodes, i18nUpdateOpCodesToString);\n }\n const textParts = str.split(BINDING_REGEXP);\n let mask = 0;\n\n for (let j = 0; j < textParts.length; j++) {\n const textValue = textParts[j];\n\n if (j & 1) {\n // Odd indexes are bindings\n const bindingIndex = bindingStart + parseInt(textValue, 10);\n updateOpCodes.push(-1 - bindingIndex);\n mask = mask | toMaskBit(bindingIndex);\n } else if (textValue !== '') {\n // Even indexes are text\n updateOpCodes.push(textValue);\n }\n }\n\n updateOpCodes.push(\n (destinationNode << I18nUpdateOpCode.SHIFT_REF) |\n (attrName ? I18nUpdateOpCode.Attr : I18nUpdateOpCode.Text),\n );\n if (attrName) {\n updateOpCodes.push(attrName, sanitizeFn);\n }\n updateOpCodes[maskIndex] = mask;\n updateOpCodes[sizeIndex] = updateOpCodes.length - startIndex;\n return mask;\n}\n\n/**\n * Count the number of bindings in the given `opCodes`.\n *\n * It could be possible to speed this up, by passing the number of bindings found back from\n * `generateBindingUpdateOpCodes()` to `i18nAttributesFirstPass()` but this would then require more\n * complexity in the code and/or transient objects to be created.\n *\n * Since this function is only called once when the template is instantiated, is trivial in the\n * first instance (since `opCodes` will be an empty array), and it is not common for elements to\n * contain multiple i18n bound attributes, it seems like this is a reasonable compromise.\n */\nfunction countBindings(opCodes: I18nUpdateOpCodes): number {\n let count = 0;\n for (let i = 0; i < opCodes.length; i++) {\n const opCode = opCodes[i];\n // Bindings are negative numbers.\n if (typeof opCode === 'number' && opCode < 0) {\n count++;\n }\n }\n return count;\n}\n\n/**\n * Convert binding index to mask bit.\n *\n * Each index represents a single bit on the bit-mask. Because bit-mask only has 32 bits, we make\n * the 32nd bit share all masks for all bindings higher than 32. Since it is extremely rare to\n * have more than 32 bindings this will be hit very rarely. The downside of hitting this corner\n * case is that we will execute binding code more often than necessary. (penalty of performance)\n */\nfunction toMaskBit(bindingIndex: number): number {\n return 1 << Math.min(bindingIndex, 31);\n}\n\n/**\n * Removes everything inside the sub-templates of a message.\n */\nfunction removeInnerTemplateTranslation(message: string): string {\n let match;\n let res = '';\n let index = 0;\n let inTemplate = false;\n let tagMatched;\n\n while ((match = SUBTEMPLATE_REGEXP.exec(message)) !== null) {\n if (!inTemplate) {\n res += message.substring(index, match.index + match[0].length);\n tagMatched = match[1];\n inTemplate = true;\n } else {\n if (match[0] === `${MARKER}/*${tagMatched}${MARKER}`) {\n index = match.index;\n inTemplate = false;\n }\n }\n }\n\n ngDevMode &&\n assertEqual(\n inTemplate,\n false,\n `Tag mismatch: unable to find the end of the sub-template in the translation \"${message}\"`,\n );\n\n res += message.slice(index);\n return res;\n}\n\n/**\n * Extracts a part of a message and removes the rest.\n *\n * This method is used for extracting a part of the message associated with a template. A\n * translated message can span multiple templates.\n *\n * Example:\n * ```html\n * <div i18n>Translate <span *ngIf>me</span>!</div>\n * ```\n *\n * @param message The message to crop\n * @param subTemplateIndex Index of the sub-template to extract. If undefined it returns the\n * external template and removes all sub-templates.\n */\nexport function getTranslationForTemplate(message: string, subTemplateIndex: number) {\n if (isRootTemplateMessage(subTemplateIndex)) {\n // We want the root template message, ignore all sub-templates\n return removeInnerTemplateTranslation(message);\n } else {\n // We want a specific sub-template\n const start =\n message.indexOf(`:${subTemplateIndex}${MARKER}`) + 2 + subTemplateIndex.toString().length;\n const end = message.search(new RegExp(`${MARKER}\\\\/\\\\*\\\\d+:${subTemplateIndex}${MARKER}`));\n return removeInnerTemplateTranslation(message.substring(start, end));\n }\n}\n\n/**\n * Generate the OpCodes for ICU expressions.\n *\n * @param icuExpression\n * @param index Index where the anchor is stored and an optional `TIcuContainerNode`\n * - `lView[anchorIdx]` points to a `Comment` node representing the anchor for the ICU.\n * - `tView.data[anchorIdx]` points to the `TIcuContainerNode` if ICU is root (`null` otherwise)\n */\nfunction icuStart(\n ast: I18nNode[],\n tView: TView,\n lView: LView,\n updateOpCodes: I18nUpdateOpCodes,\n parentIdx: number,\n icuExpression: IcuExpression,\n anchorIdx: number,\n) {\n ngDevMode && assertDefined(icuExpression, 'ICU expression must be defined');\n let bindingMask = 0;\n const tIcu: TIcu = {\n type: icuExpression.type,\n currentCaseLViewIndex: allocExpando(tView, lView, 1, null),\n anchorIdx,\n cases: [],\n create: [],\n remove: [],\n update: [],\n };\n addUpdateIcuSwitch(updateOpCodes, icuExpression, anchorIdx);\n setTIcu(tView, anchorIdx, tIcu);\n const values = icuExpression.values;\n const cases: I18nNode[][] = [];\n for (let i = 0; i < values.length; i++) {\n // Each value is an array of strings & other ICU expressions\n const valueArr = values[i];\n const nestedIcus: IcuExpression[] = [];\n for (let j = 0; j < valueArr.length; j++) {\n const value = valueArr[j];\n if (typeof value !== 'string') {\n // It is an nested ICU expression\n const icuIndex = nestedIcus.push(value as IcuExpression) - 1;\n // Replace nested ICU expression by a comment node\n valueArr[j] = `<!--�${icuIndex}�-->`;\n }\n }\n const caseAst: I18nNode[] = [];\n cases.push(caseAst);\n bindingMask =\n parseIcuCase(\n caseAst,\n tView,\n tIcu,\n lView,\n updateOpCodes,\n parentIdx,\n icuExpression.cases[i],\n valueArr.join(''),\n nestedIcus,\n ) | bindingMask;\n }\n if (bindingMask) {\n addUpdateIcuUpdate(updateOpCodes, bindingMask, anchorIdx);\n }\n ast.push({\n kind: I18nNodeKind.ICU,\n index: anchorIdx,\n cases,\n currentCaseLViewIndex: tIcu.currentCaseLViewIndex,\n });\n}\n\n/**\n * Parses text containing an ICU expression and produces a JSON object for it.\n * Original code from closure library, modified for Angular.\n *\n * @param pattern Text containing an ICU expression that needs to be parsed.\n *\n */\nfunction parseICUBlock(pattern: string): IcuExpression {\n const cases = [];\n const values: (string | IcuExpression)[][] = [];\n let icuType = IcuType.plural;\n let mainBinding = 0;\n pattern = pattern.replace(\n ICU_BLOCK_REGEXP,\n function (str: string, binding: string, type: string) {\n if (type === 'select') {\n icuType = IcuType.select;\n } else {\n icuType = IcuType.plural;\n }\n mainBinding = parseInt(binding.slice(1), 10);\n return '';\n },\n );\n\n const parts = i18nParseTextIntoPartsAndICU(pattern) as string[];\n // Looking for (key block)+ sequence. One of the keys has to be \"other\".\n for (let pos = 0; pos < parts.length; ) {\n let key = parts[pos++].trim();\n if (icuType === IcuType.plural) {\n // Key can be \"=x\", we just want \"x\"\n key = key.replace(/\\s*(?:=)?(\\w+)\\s*/, '$1');\n }\n if (key.length) {\n cases.push(key);\n }\n\n const blocks = i18nParseTextIntoPartsAndICU(parts[pos++]) as string[];\n if (cases.length > values.length) {\n values.push(blocks);\n }\n }\n\n // TODO(ocombe): support ICU expressions in attributes, see #21615\n return {type: icuType, mainBinding: mainBinding, cases, values};\n}\n\n/**\n * Breaks pattern into strings and top level {...} blocks.\n * Can be used to break a message into text and ICU expressions, or to break an ICU expression\n * into keys and cases. Original code from closure library, modified for Angular.\n *\n * @param pattern (sub)Pattern to be broken.\n * @returns An `Array<string|IcuExpression>` where:\n * - odd positions: `string` => text between ICU expressions\n * - even positions: `ICUExpression` => ICU expression parsed into `ICUExpression` record.\n */\nfunction i18nParseTextIntoPartsAndICU(pattern: string): (string | IcuExpression)[] {\n if (!pattern) {\n return [];\n }\n\n let prevPos = 0;\n const braceStack = [];\n const results: (string | IcuExpression)[] = [];\n const braces = /[{}]/g;\n // lastIndex doesn't get set to 0 so we have to.\n braces.lastIndex = 0;\n\n let match;\n while ((match = braces.exec(pattern))) {\n const pos = match.index;\n if (match[0] == '}') {\n braceStack.pop();\n\n if (braceStack.length == 0) {\n // End of the block.\n const block = pattern.substring(prevPos, pos);\n if (ICU_BLOCK_REGEXP.test(block)) {\n results.push(parseICUBlock(block));\n } else {\n results.push(block);\n }\n\n prevPos = pos + 1;\n }\n } else {\n if (braceStack.length == 0) {\n const substring = pattern.substring(prevPos, pos);\n results.push(substring);\n prevPos = pos + 1;\n }\n braceStack.push('{');\n }\n }\n\n const substring = pattern.substring(prevPos);\n results.push(substring);\n return results;\n}\n\n/**\n * Parses a node, its children and its siblings, and generates the mutate & update OpCodes.\n *\n */\nfunction parseIcuCase(\n ast: I18nNode[],\n tView: TView,\n tIcu: TIcu,\n lView: LView,\n updateOpCodes: I18nUpdateOpCodes,\n parentIdx: number,\n caseName: string,\n unsafeCaseHtml: string,\n nestedIcus: IcuExpression[],\n): number {\n const create: IcuCreateOpCodes = [] as any;\n const remove: I18nRemoveOpCodes = [] as any;\n const update: I18nUpdateOpCodes = [] as any;\n if (ngDevMode) {\n attachDebugGetter(create, icuCreateOpCodesToString);\n attachDebugGetter(remove, i18nRemoveOpCodesToString);\n attachDebugGetter(update, i18nUpdateOpCodesToString);\n }\n tIcu.cases.push(caseName);\n tIcu.create.push(create);\n tIcu.remove.push(remove);\n tIcu.update.push(update);\n\n const inertBodyHelper = getInertBodyHelper(getDocument());\n const inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeCaseHtml);\n ngDevMode && assertDefined(inertBodyElement, 'Unable to generate inert body element');\n const inertRootNode = (getTemplateContent(inertBodyElement!) as Element) || inertBodyElement;\n if (inertRootNode) {\n return walkIcuTree(\n ast,\n tView,\n tIcu,\n lView,\n updateOpCodes,\n create,\n remove,\n update,\n inertRootNode,\n parentIdx,\n nestedIcus,\n 0,\n );\n } else {\n return 0;\n }\n}\n\nfunction walkIcuTree(\n ast: I18nNode[],\n tView: TView,\n tIcu: TIcu,\n lView: LView,\n sharedUpdateOpCodes: I18nUpdateOpCodes,\n create: IcuCreateOpCodes,\n remove: I18nRemoveOpCodes,\n update: I18nUpdateOpCodes,\n parentNode: Element,\n parentIdx: number,\n nestedIcus: IcuExpression[],\n depth: number,\n): number {\n let bindingMask = 0;\n let currentNode = parentNode.firstChild;\n while (currentNode) {\n const newIndex = allocExpando(tView, lView, 1, null);\n switch (currentNode.nodeType) {\n case Node.ELEMENT_NODE:\n const element = currentNode as Element;\n const tagName = element.tagName.toLowerCase();\n if (VALID_ELEMENTS.hasOwnProperty(tagName)) {\n addCreateNodeAndAppend(create, ELEMENT_MARKER, tagName, parentIdx, newIndex);\n tView.data[newIndex] = tagName;\n const elAttrs = element.attributes;\n for (let i = 0; i < elAttrs.length; i++) {\n const attr = elAttrs.item(i)!;\n const lowerAttrName = attr.name.toLowerCase();\n const hasBinding = !!attr.value.match(BINDING_REGEXP);\n // we assume the input string is safe, unless it's using a binding\n if (hasBinding) {\n if (VALID_ATTRS.hasOwnProperty(lowerAttrName)) {\n if (URI_ATTRS[lowerAttrName]) {\n generateBindingUpdateOpCodes(\n update,\n attr.value,\n newIndex,\n attr.name,\n 0,\n _sanitizeUrl,\n );\n } else {\n generateBindingUpdateOpCodes(update, attr.value, newIndex, attr.name, 0, null);\n }\n } else {\n ngDevMode &&\n console.warn(\n `WARNING: ignoring unsafe attribute value ` +\n `${lowerAttrName} on element ${tagName} ` +\n `(see ${XSS_SECURITY_URL})`,\n );\n }\n } else {\n addCreateAttribute(create, newIndex, attr);\n }\n }\n const elementNode: I18nElementNode = {\n kind: I18nNodeKind.ELEMENT,\n index: newIndex,\n children: [],\n };\n ast.push(elementNode);\n // Parse the children of this node (if any)\n bindingMask =\n walkIcuTree(\n elementNode.children,\n tView,\n tIcu,\n lView,\n sharedUpdateOpCodes,\n create,\n remove,\n update,\n currentNode as Element,\n newIndex,\n nestedIcus,\n depth + 1,\n ) | bindingMask;\n addRemoveNode(remove, newIndex, depth);\n }\n break;\n case Node.TEXT_NODE:\n const value = currentNode.textContent || '';\n const hasBinding = value.match(BINDING_REGEXP);\n addCreateNodeAndAppend(create, null, hasBinding ? '' : value, parentIdx, newIndex);\n addRemoveNode(remove, newIndex, depth);\n if (hasBinding) {\n bindingMask =\n generateBindingUpdateOpCodes(update, value, newIndex, null, 0, null) | bindingMask;\n }\n ast.push({\n kind: I18nNodeKind.TEXT,\n index: newIndex,\n });\n break;\n case Node.COMMENT_NODE:\n // Check if the comment node is a placeholder for a nested ICU\n const isNestedIcu = NESTED_ICU.exec(currentNode.textContent || '');\n if (isNestedIcu) {\n const nestedIcuIndex = parseInt(isNestedIcu[1], 10);\n const icuExpression: IcuExpression = nestedIcus[nestedIcuIndex];\n // Create the comment node that will anchor the ICU expression\n addCreateNodeAndAppend(\n create,\n ICU_MARKER,\n ngDevMode ? `nested ICU ${nestedIcuIndex}` : '',\n parentIdx,\n newIndex,\n );\n icuStart(ast, tView, lView, sharedUpdateOpCodes, parentIdx, icuExpression, newIndex);\n addRemoveNestedIcu(remove, newIndex, depth);\n }\n break;\n }\n currentNode = currentNode.nextSibling;\n }\n return bindingMask;\n}\n\nfunction addRemoveNode(remove: I18nRemoveOpCodes, index: number, depth: number) {\n if (depth === 0) {\n remove.push(index);\n }\n}\n\nfunction addRemoveNestedIcu(remove: I18nRemoveOpCodes, index: number, depth: number) {\n if (depth === 0) {\n remove.push(~index); // remove ICU at `index`\n remove.push(index); // remove ICU comment at `index`\n }\n}\n\nfunction addUpdateIcuSwitch(\n update: I18nUpdateOpCodes,\n icuExpression: IcuExpression,\n index: number,\n) {\n update.push(\n toMaskBit(icuExpression.mainBinding),\n 2,\n -1 - icuExpression.mainBinding,\n (index << I18nUpdateOpCode.SHIFT_REF) | I18nUpdateOpCode.IcuSwitch,\n );\n}\n\nfunction addUpdateIcuUpdate(update: I18nUpdateOpCodes, bindingMask: number, index: number) {\n update.push(bindingMask, 1, (index << I18nUpdateOpCode.SHIFT_REF) | I18nUpdateOpCode.IcuUpdate);\n}\n\nfunction addCreateNodeAndAppend(\n create: IcuCreateOpCodes,\n marker: null | ICU_MARKER | ELEMENT_MARKER,\n text: string,\n appendToParentIdx: number,\n createAtIdx: number,\n) {\n if (marker !== null) {\n create.push(marker);\n }\n create.push(\n text,\n createAtIdx,\n icuCreateOpCode(IcuCreateOpCode.AppendChild, appendToParentIdx, createAtIdx),\n );\n}\n\nfunction addCreateAttribute(create: IcuCreateOpCodes, newIndex: number, attr: Attr) {\n create.push(\n (newIndex << IcuCreateOpCode.SHIFT_REF) | IcuCreateOpCode.Attr,\n attr.name,\n attr.value,\n );\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n// i18nPostprocess consts\nconst ROOT_TEMPLATE_ID = 0;\nconst PP_MULTI_VALUE_PLACEHOLDERS_REGEXP = /\\[(�.+?�?)\\]/;\nconst PP_PLACEHOLDERS_REGEXP = /\\[(�.+?�?)\\]|(�\\/?\\*\\d+:\\d+�)/g;\nconst PP_ICU_VARS_REGEXP = /({\\s*)(VAR_(PLURAL|SELECT)(_\\d+)?)(\\s*,)/g;\nconst PP_ICU_PLACEHOLDERS_REGEXP = /{([A-Z0-9_]+)}/g;\nconst PP_ICUS_REGEXP = /�I18N_EXP_(ICU(_\\d+)?)�/g;\nconst PP_CLOSE_TEMPLATE_REGEXP = /\\/\\*/;\nconst PP_TEMPLATE_ID_REGEXP = /\\d+\\:(\\d+)/;\n\n// Parsed placeholder structure used in postprocessing (within `i18nPostprocess` function)\n// Contains the following fields: [templateId, isCloseTemplateTag, placeholder]\ntype PostprocessPlaceholder = [number, boolean, string];\n\n/**\n * Handles message string post-processing for internationalization.\n *\n * Handles message string post-processing by transforming it from intermediate\n * format (that might contain some markers that we need to replace) to the final\n * form, consumable by i18nStart instruction. Post processing steps include:\n *\n * 1. Resolve all multi-value cases (like [�*1:1��#2:1�|�#4:1�|�5�])\n * 2. Replace all ICU vars (like \"VAR_PLURAL\")\n * 3. Replace all placeholders used inside ICUs in a form of {PLACEHOLDER}\n * 4. Replace all ICU references with corresponding values (like �ICU_EXP_ICU_1�)\n * in case multiple ICUs have the same placeholder name\n *\n * @param message Raw translation string for post processing\n * @param replacements Set of replacements that should be applied\n *\n * @returns Transformed string that can be consumed by i18nStart instruction\n *\n * @codeGenApi\n */\nexport function i18nPostprocess(\n message: string,\n replacements: {[key: string]: string | string[]} = {},\n): string {\n /**\n * Step 1: resolve all multi-value placeholders like [�#5�|�*1:1��#2:1�|�#4:1�]\n *\n * Note: due to the way we process nested templates (BFS), multi-value placeholders are typically\n * grouped by templates, for example: [�#5�|�#6�|�#1:1�|�#3:2�] where �#5� and �#6� belong to root\n * template, �#1:1� belong to nested template with index 1 and �#1:2� - nested template with index\n * 3. However in real templates the order might be different: i.e. �#1:1� and/or �#3:2� may go in\n * front of �#6�. The post processing step restores the right order by keeping track of the\n * template id stack and looks for placeholders that belong to the currently active template.\n */\n let result: string = message;\n if (PP_MULTI_VALUE_PLACEHOLDERS_REGEXP.test(message)) {\n const matches: {[key: string]: PostprocessPlaceholder[]} = {};\n const templateIdsStack: number[] = [ROOT_TEMPLATE_ID];\n result = result.replace(PP_PLACEHOLDERS_REGEXP, (m: any, phs: string, tmpl: string): string => {\n const content = phs || tmpl;\n const placeholders: PostprocessPlaceholder[] = matches[content] || [];\n if (!placeholders.length) {\n content.split('|').forEach((placeholder: string) => {\n const match = placeholder.match(PP_TEMPLATE_ID_REGEXP);\n const templateId = match ? parseInt(match[1], 10) : ROOT_TEMPLATE_ID;\n const isCloseTemplateTag = PP_CLOSE_TEMPLATE_REGEXP.test(placeholder);\n placeholders.push([templateId, isCloseTemplateTag, placeholder]);\n });\n matches[content] = placeholders;\n }\n\n if (!placeholders.length) {\n throw new Error(`i18n postprocess: unmatched placeholder - ${content}`);\n }\n\n const currentTemplateId = templateIdsStack[templateIdsStack.length - 1];\n let idx = 0;\n // find placeholder index that matches current template id\n for (let i = 0; i < placeholders.length; i++) {\n if (placeholders[i][0] === currentTemplateId) {\n idx = i;\n break;\n }\n }\n // update template id stack based on the current tag extracted\n const [templateId, isCloseTemplateTag, placeholder] = placeholders[idx];\n if (isCloseTemplateTag) {\n templateIdsStack.pop();\n } else if (currentTemplateId !== templateId) {\n templateIdsStack.push(templateId);\n }\n // remove processed tag from the list\n placeholders.splice(idx, 1);\n return placeholder;\n });\n }\n\n // return current result if no replacements specified\n if (!Object.keys(replacements).length) {\n return result;\n }\n\n /**\n * Step 2: replace all ICU vars (like \"VAR_PLURAL\")\n */\n result = result.replace(PP_ICU_VARS_REGEXP, (match, start, key, _type, _idx, end): string => {\n return replacements.hasOwnProperty(key) ? `${start}${replacements[key]}${end}` : match;\n });\n\n /**\n * Step 3: replace all placeholders used inside ICUs in a form of {PLACEHOLDER}\n */\n result = result.replace(PP_ICU_PLACEHOLDERS_REGEXP, (match, key): string => {\n return replacements.hasOwnProperty(key) ? (replacements[key] as string) : match;\n });\n\n /**\n * Step 4: replace all ICU references with corresponding values (like �ICU_EXP_ICU_1�) in case\n * multiple ICUs have the same placeholder name\n */\n result = result.replace(PP_ICUS_REGEXP, (match, key): string => {\n if (replacements.hasOwnProperty(key)) {\n const list = replacements[key] as string[];\n if (!list.length) {\n throw new Error(`i18n postprocess: unmatched ICU - ${match} with key: ${key}`);\n }\n return list.shift()!;\n }\n return match;\n });\n\n return result;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport '../../util/ng_dev_mode';\nimport '../../util/ng_i18n_closure_mode';\n\nimport {prepareI18nBlockForHydration} from '../../hydration/i18n';\nimport {assertDefined} from '../../util/assert';\nimport {bindingUpdated} from '../bindings';\nimport {applyCreateOpCodes, applyI18n, setMaskBit} from '../i18n/i18n_apply';\nimport {i18nAttributesFirstPass, i18nStartFirstCreatePass} from '../i18n/i18n_parse';\nimport {i18nPostprocess} from '../i18n/i18n_postprocess';\nimport {TI18n} from '../interfaces/i18n';\nimport {TElementNode, TNodeType} from '../interfaces/node';\nimport {\n DECLARATION_COMPONENT_VIEW,\n FLAGS,\n HEADER_OFFSET,\n LViewFlags,\n T_HOST,\n TViewType,\n} from '../interfaces/view';\nimport {getClosestRElement} from '../node_manipulation';\nimport {\n getCurrentParentTNode,\n getLView,\n getTView,\n nextBindingIndex,\n setInI18nBlock,\n} from '../state';\nimport {getConstant} from '../util/view_utils';\n\n/**\n * Marks a block of text as translatable.\n *\n * The instructions `i18nStart` and `i18nEnd` mark the translation block in the template.\n * The translation `message` is the value which is locale specific. The translation string may\n * contain placeholders which associate inner elements and sub-templates within the translation.\n *\n * The translation `message` placeholders are:\n * - `�{index}(:{block})�`: *Binding Placeholder*: Marks a location where an expression will be\n * interpolated into. The placeholder `index` points to the expression binding index. An optional\n * `block` that matches the sub-template in which it was declared.\n * - `�#{index}(:{block})�`/`�/#{index}(:{block})�`: *Element Placeholder*: Marks the beginning\n * and end of DOM element that were embedded in the original translation block. The placeholder\n * `index` points to the element index in the template instructions set. An optional `block` that\n * matches the sub-template in which it was declared.\n * - `�*{index}:{block}�`/`�/*{index}:{block}�`: *Sub-template Placeholder*: Sub-templates must be\n * split up and translated separately in each angular template function. The `index` points to the\n * `template` instruction index. A `block` that matches the sub-template in which it was declared.\n *\n * @param index A unique index of the translation in the static block.\n * @param messageIndex An index of the translation message from the `def.consts` array.\n * @param subTemplateIndex Optional sub-template index in the `message`.\n *\n * @codeGenApi\n */\nexport function ɵɵi18nStart(\n index: number,\n messageIndex: number,\n subTemplateIndex: number = -1,\n): void {\n const tView = getTView();\n const lView = getLView();\n const adjustedIndex = HEADER_OFFSET + index;\n ngDevMode && assertDefined(tView, `tView should be defined`);\n const message = getConstant<string>(tView.consts, messageIndex)!;\n const parentTNode = getCurrentParentTNode() as TElementNode | null;\n if (tView.firstCreatePass) {\n i18nStartFirstCreatePass(\n tView,\n parentTNode === null ? 0 : parentTNode.index,\n lView,\n adjustedIndex,\n message,\n subTemplateIndex,\n );\n }\n\n // Set a flag that this LView has i18n blocks.\n // The flag is later used to determine whether this component should\n // be hydrated (currently hydration is not supported for i18n blocks).\n if (tView.type === TViewType.Embedded) {\n // Annotate host component's LView (not embedded view's LView),\n // since hydration can be skipped on per-component basis only.\n const componentLView = lView[DECLARATION_COMPONENT_VIEW];\n componentLView[FLAGS] |= LViewFlags.HasI18n;\n } else {\n lView[FLAGS] |= LViewFlags.HasI18n;\n }\n\n const tI18n = tView.data[adjustedIndex] as TI18n;\n const sameViewParentTNode = parentTNode === lView[T_HOST] ? null : parentTNode;\n const parentRNode = getClosestRElement(tView, sameViewParentTNode, lView);\n // If `parentTNode` is an `ElementContainer` than it has `<!--ng-container--->`.\n // When we do inserts we have to make sure to insert in front of `<!--ng-container--->`.\n const insertInFrontOf =\n parentTNode && parentTNode.type & TNodeType.ElementContainer ? lView[parentTNode.index] : null;\n prepareI18nBlockForHydration(lView, adjustedIndex, parentTNode, subTemplateIndex);\n applyCreateOpCodes(lView, tI18n.create, parentRNode, insertInFrontOf);\n setInI18nBlock(true);\n}\n\n/**\n * Translates a translation block marked by `i18nStart` and `i18nEnd`. It inserts the text/ICU nodes\n * into the render tree, moves the placeholder nodes and removes the deleted nodes.\n *\n * @codeGenApi\n */\nexport function ɵɵi18nEnd(): void {\n setInI18nBlock(false);\n}\n\n/**\n *\n * Use this instruction to create a translation block that doesn't contain any placeholder.\n * It calls both {@link i18nStart} and {@link i18nEnd} in one instruction.\n *\n * The translation `message` is the value which is locale specific. The translation string may\n * contain placeholders which associate inner elements and sub-templates within the translation.\n *\n * The translation `message` placeholders are:\n * - `�{index}(:{block})�`: *Binding Placeholder*: Marks a location where an expression will be\n * interpolated into. The placeholder `index` points to the expression binding index. An optional\n * `block` that matches the sub-template in which it was declared.\n * - `�#{index}(:{block})�`/`�/#{index}(:{block})�`: *Element Placeholder*: Marks the beginning\n * and end of DOM element that were embedded in the original translation block. The placeholder\n * `index` points to the element index in the template instructions set. An optional `block` that\n * matches the sub-template in which it was declared.\n * - `�*{index}:{block}�`/`�/*{index}:{block}�`: *Sub-template Placeholder*: Sub-templates must be\n * split up and translated separately in each angular template function. The `index` points to the\n * `template` instruction index. A `block` that matches the sub-template in which it was declared.\n *\n * @param index A unique index of the translation in the static block.\n * @param messageIndex An index of the translation message from the `def.consts` array.\n * @param subTemplateIndex Optional sub-template index in the `message`.\n *\n * @codeGenApi\n */\nexport function ɵɵi18n(index: number, messageIndex: number, subTemplateIndex?: number): void {\n ɵɵi18nStart(index, messageIndex, subTemplateIndex);\n ɵɵi18nEnd();\n}\n\n/**\n * Marks a list of attributes as translatable.\n *\n * @param index A unique index in the static block\n * @param values\n *\n * @codeGenApi\n */\nexport function ɵɵi18nAttributes(index: number, attrsIndex: number): void {\n const tView = getTView();\n ngDevMode && assertDefined(tView, `tView should be defined`);\n const attrs = getConstant<string[]>(tView.consts, attrsIndex)!;\n i18nAttributesFirstPass(tView, index + HEADER_OFFSET, attrs);\n}\n\n/**\n * Stores the values of the bindings during each update cycle in order to determine if we need to\n * update the translated nodes.\n *\n * @param value The binding's value\n * @returns This function returns itself so that it may be chained\n * (e.g. `i18nExp(ctx.name)(ctx.title)`)\n *\n * @codeGenApi\n */\nexport function ɵɵi18nExp<T>(value: T): typeof ɵɵi18nExp {\n const lView = getLView();\n setMaskBit(bindingUpdated(lView, nextBindingIndex(), value));\n return ɵɵi18nExp;\n}\n\n/**\n * Updates a translation block or an i18n attribute when the bindings have changed.\n *\n * @param index Index of either {@link i18nStart} (translation block) or {@link i18nAttributes}\n * (i18n attribute) on which it should update the content.\n *\n * @codeGenApi\n */\nexport function ɵɵi18nApply(index: number) {\n applyI18n(getTView(), getLView(), index + HEADER_OFFSET);\n}\n\n/**\n * Handles message string post-processing for internationalization.\n *\n * Handles message string post-processing by transforming it from intermediate\n * format (that might contain some markers that we need to replace) to the final\n * form, consumable by i18nStart instruction. Post processing steps include:\n *\n * 1. Resolve all multi-value cases (like [�*1:1��#2:1�|�#4:1�|�5�])\n * 2. Replace all ICU vars (like \"VAR_PLURAL\")\n * 3. Replace all placeholders used inside ICUs in a form of {PLACEHOLDER}\n * 4. Replace all ICU references with corresponding values (like �ICU_EXP_ICU_1�)\n * in case multiple ICUs have the same placeholder name\n *\n * @param message Raw translation string for post processing\n * @param replacements Set of replacements that should be applied\n *\n * @returns Transformed string that can be consumed by i18nStart instruction\n *\n * @codeGenApi\n */\nexport function ɵɵi18nPostprocess(\n message: string,\n replacements: {[key: string]: string | string[]} = {},\n): string {\n return i18nPostprocess(message, replacements);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {setActiveConsumer} from '@angular/core/primitives/signals';\n\nimport {NotificationSource} from '../../change_detection/scheduling/zoneless_scheduling';\nimport {TNode} from '../interfaces/node';\nimport {isComponentHost} from '../interfaces/type_checks';\nimport {CONTEXT, INJECTOR, LView} from '../interfaces/view';\nimport {getComponentLViewByIndex} from '../util/view_utils';\nimport {profiler} from '../profiler';\nimport {ProfilerEvent} from '../profiler_types';\nimport {ErrorHandler} from '../../error_handler';\nimport {markViewDirty} from '../instructions/mark_view_dirty';\n\n/**\n * Wraps an event listener with a function that marks ancestors dirty and prevents default behavior,\n * if applicable.\n *\n * @param tNode The TNode associated with this listener\n * @param lView The LView that contains this listener\n * @param listenerFn The listener function to call\n * @param wrapWithPreventDefault Whether or not to prevent default behavior\n * (the procedural renderer does this already, so in those cases, we should skip)\n */\nexport function wrapListener(\n tNode: TNode,\n lView: LView<{} | null>,\n listenerFn: (e?: any) => any,\n): EventListener {\n // Note: we are performing most of the work in the listener function itself\n // to optimize listener registration.\n return function wrapListenerIn_markDirtyAndPreventDefault(e: any) {\n // Ivy uses `Function` as a special token that allows us to unwrap the function\n // so that it can be invoked programmatically by `DebugNode.triggerEventHandler`.\n if (e === Function) {\n return listenerFn;\n }\n\n // In order to be backwards compatible with View Engine, events on component host nodes\n // must also mark the component view itself dirty (i.e. the view that it owns).\n const startView = isComponentHost(tNode) ? getComponentLViewByIndex(tNode.index, lView) : lView;\n markViewDirty(startView, NotificationSource.Listener);\n\n const context = lView[CONTEXT];\n let result = executeListenerWithErrorHandling(lView, context, listenerFn, e);\n // A just-invoked listener function might have coalesced listeners so we need to check for\n // their presence and invoke as needed.\n let nextListenerFn = (<any>wrapListenerIn_markDirtyAndPreventDefault).__ngNextListenerFn__;\n while (nextListenerFn) {\n // We should prevent default if any of the listeners explicitly return false\n result = executeListenerWithErrorHandling(lView, context, nextListenerFn, e) && result;\n nextListenerFn = (<any>nextListenerFn).__ngNextListenerFn__;\n }\n\n return result;\n };\n}\n\nfunction executeListenerWithErrorHandling(\n lView: LView,\n context: {} | null,\n listenerFn: (e?: any) => any,\n e: any,\n): boolean {\n const prevConsumer = setActiveConsumer(null);\n try {\n profiler(ProfilerEvent.OutputStart, context, listenerFn);\n // Only explicitly returning false from a listener should preventDefault\n return listenerFn(e) !== false;\n } catch (error) {\n // TODO(atscott): This should report to the application error handler, not the ErrorHandler on LView injector\n handleError(lView, error);\n return false;\n } finally {\n profiler(ProfilerEvent.OutputEnd, context, listenerFn);\n setActiveConsumer(prevConsumer);\n }\n}\n\n/** Handles an error thrown in an LView. */\nfunction handleError(lView: LView, error: any): void {\n const injector = lView[INJECTOR];\n const errorHandler = injector ? injector.get(ErrorHandler, null) : null;\n errorHandler && errorHandler.handleError(error);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {assertIndexInRange} from '../../util/assert';\nimport {DirectiveDef} from '../interfaces/definition';\nimport {TNode} from '../interfaces/node';\nimport {LView, TVIEW} from '../interfaces/view';\nimport {getOrCreateLViewCleanup, getOrCreateTViewCleanup} from '../util/view_utils';\nimport {wrapListener} from './listeners';\n\n/** Describes a subscribable output field value. */\ninterface SubscribableOutput<T> {\n subscribe(listener: (v: T) => void): {unsubscribe: () => void};\n}\n\nexport function createOutputListener<T = unknown>(\n tNode: TNode,\n lView: LView<{} | null>,\n listenerFn: (e?: any) => any,\n targetDef: DirectiveDef<unknown>,\n eventName: string,\n) {\n // TODO(pk): decouple checks from the actual binding\n const wrappedListener = wrapListener(tNode, lView, listenerFn);\n\n listenToDirectiveOutput(tNode, lView, targetDef, eventName, wrappedListener);\n}\n\n/** Listens to an output on a specific directive. */\nfunction listenToDirectiveOutput(\n tNode: TNode,\n lView: LView,\n target: DirectiveDef<unknown>,\n eventName: string,\n listenerFn: (e?: any) => any,\n): boolean {\n let hostIndex: number | null = null;\n let hostDirectivesStart: number | null = null;\n let hostDirectivesEnd: number | null = null;\n let hasOutput = false;\n\n if (ngDevMode && !tNode.directiveToIndex?.has(target.type)) {\n throw new Error(`Node does not have a directive with type ${target.type.name}`);\n }\n\n const data = tNode.directiveToIndex!.get(target.type)!;\n\n if (typeof data === 'number') {\n hostIndex = data;\n } else {\n [hostIndex, hostDirectivesStart, hostDirectivesEnd] = data;\n }\n\n if (\n hostDirectivesStart !== null &&\n hostDirectivesEnd !== null &&\n tNode.hostDirectiveOutputs?.hasOwnProperty(eventName)\n ) {\n const hostDirectiveOutputs = tNode.hostDirectiveOutputs[eventName];\n\n for (let i = 0; i < hostDirectiveOutputs.length; i += 2) {\n const index = hostDirectiveOutputs[i] as number;\n\n if (index >= hostDirectivesStart && index <= hostDirectivesEnd) {\n ngDevMode && assertIndexInRange(lView, index);\n hasOutput = true;\n listenToOutput(\n tNode,\n lView,\n index,\n hostDirectiveOutputs[i + 1] as string,\n eventName,\n listenerFn,\n );\n } else if (index > hostDirectivesEnd) {\n break;\n }\n }\n }\n\n if (target.outputs.hasOwnProperty(eventName)) {\n ngDevMode && assertIndexInRange(lView, hostIndex);\n hasOutput = true;\n listenToOutput(tNode, lView, hostIndex, eventName, eventName, listenerFn);\n }\n\n return hasOutput;\n}\n\nexport function listenToOutput(\n tNode: TNode,\n lView: LView,\n directiveIndex: number,\n lookupName: string,\n eventName: string,\n listenerFn: (e?: any) => any,\n) {\n ngDevMode && assertIndexInRange(lView, directiveIndex);\n const instance = lView[directiveIndex];\n const tView = lView[TVIEW];\n const def = tView.data[directiveIndex] as DirectiveDef<unknown>;\n const propertyName = def.outputs[lookupName];\n const output = instance[propertyName];\n\n if (ngDevMode && !isOutputSubscribable(output)) {\n throw new Error(`@Output ${propertyName} not initialized in '${instance.constructor.name}'.`);\n }\n\n // TODO(pk): introduce utility to store cleanup or find a different way of sharing code with listener\n const tCleanup = tView.firstCreatePass ? getOrCreateTViewCleanup(tView) : null;\n const lCleanup = getOrCreateLViewCleanup(lView);\n const subscription = (output as SubscribableOutput<unknown>).subscribe(listenerFn);\n const idx = lCleanup.length;\n lCleanup.push(listenerFn, subscription);\n tCleanup && tCleanup.push(eventName, tNode.index, idx, -(idx + 1));\n}\n\n/**\n * Whether the given value represents a subscribable output.\n *\n * For example, an `EventEmitter, a `Subject`, an `Observable` or an\n * `OutputEmitter`.\n */\nfunction isOutputSubscribable(value: unknown): value is SubscribableOutput<unknown> {\n return (\n value != null && typeof (value as Partial<SubscribableOutput<unknown>>).subscribe === 'function'\n );\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {stashEventListenerImpl} from '../../event_delegation_utils';\nimport {TNode, TNodeType} from '../interfaces/node';\nimport {GlobalTargetResolver, Renderer} from '../interfaces/renderer';\nimport {RElement} from '../interfaces/renderer_dom';\nimport {isDirectiveHost} from '../interfaces/type_checks';\nimport {CLEANUP, LView, RENDERER, TView} from '../interfaces/view';\nimport {assertTNodeType} from '../node_assert';\nimport {getCurrentDirectiveDef, getCurrentTNode, getLView, getTView} from '../state';\nimport {\n getNativeByTNode,\n getOrCreateLViewCleanup,\n getOrCreateTViewCleanup,\n unwrapRNode,\n} from '../util/view_utils';\n\nimport {listenToOutput} from '../view/directive_outputs';\nimport {wrapListener} from '../view/listeners';\nimport {loadComponentRenderer} from './shared';\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 - this argument is a reminder\n * from the Renderer3 infrastructure and should be removed from the instruction arguments\n * @param eventTargetResolver Function that returns global target information in case this listener\n * should be attached to a global object like window, document or body\n *\n * @codeGenApi\n */\nexport function ɵɵlistener(\n eventName: string,\n listenerFn: (e?: any) => any,\n useCapture?: boolean,\n eventTargetResolver?: GlobalTargetResolver,\n): typeof ɵɵlistener {\n const lView = getLView<{} | null>();\n const tView = getTView();\n const tNode = getCurrentTNode()!;\n listenerInternal(\n tView,\n lView,\n lView[RENDERER],\n tNode,\n eventName,\n listenerFn,\n eventTargetResolver,\n );\n return ɵɵlistener;\n}\n\n/**\n * Registers a synthetic host listener (e.g. `(@foo.start)`) on a component or directive.\n *\n * This instruction is for compatibility purposes and is designed to ensure that a\n * synthetic host listener (e.g. `@HostListener('@foo.start')`) properly gets rendered\n * in the component's renderer. Normally all host listeners are evaluated with the\n * parent component's renderer, but, in the case of animation @triggers, they need\n * to be evaluated with the sub component's renderer (because that's where the\n * animation triggers are defined).\n *\n * Do not use this instruction as a replacement for `listener`. This instruction\n * only exists to ensure compatibility with the ViewEngine's host binding behavior.\n *\n * @param eventName Name of the event\n * @param listenerFn The function to be called when event emits\n * @param useCapture Whether or not to use capture in event listener\n * @param eventTargetResolver Function that returns global target information in case this listener\n * should be attached to a global object like window, document or body\n *\n * @codeGenApi\n */\nexport function ɵɵsyntheticHostListener(\n eventName: string,\n listenerFn: (e?: any) => any,\n): typeof ɵɵsyntheticHostListener {\n const tNode = getCurrentTNode()!;\n const lView = getLView<{} | null>();\n const tView = getTView();\n const currentDef = getCurrentDirectiveDef(tView.data);\n const renderer = loadComponentRenderer(currentDef, tNode, lView);\n listenerInternal(tView, lView, renderer, tNode, eventName, listenerFn);\n return ɵɵsyntheticHostListener;\n}\n\n/**\n * A utility function that checks if a given element has already an event handler registered for an\n * event with a specified name. The TView.cleanup data structure is used to find out which events\n * are registered for a given element.\n */\nfunction findExistingListener(\n tView: TView,\n lView: LView,\n eventName: string,\n tNodeIdx: number,\n): ((e?: any) => any) | null {\n const tCleanup = tView.cleanup;\n if (tCleanup != null) {\n for (let i = 0; i < tCleanup.length - 1; i += 2) {\n const cleanupEventName = tCleanup[i];\n if (cleanupEventName === eventName && tCleanup[i + 1] === tNodeIdx) {\n // We have found a matching event name on the same node but it might not have been\n // registered yet, so we must explicitly verify entries in the LView cleanup data\n // structures.\n const lCleanup = lView[CLEANUP]!;\n const listenerIdxInLCleanup = tCleanup[i + 2];\n return lCleanup.length > listenerIdxInLCleanup ? lCleanup[listenerIdxInLCleanup] : null;\n }\n // TView.cleanup can have a mix of 4-elements entries (for event handler cleanups) or\n // 2-element entries (for directive and queries destroy hooks). As such we can encounter\n // blocks of 4 or 2 items in the tView.cleanup and this is why we iterate over 2 elements\n // first and jump another 2 elements if we detect listeners cleanup (4 elements). Also check\n // documentation of TView.cleanup for more details of this data structure layout.\n if (typeof cleanupEventName === 'string') {\n i += 2;\n }\n }\n }\n return null;\n}\n\nexport function listenerInternal(\n tView: TView,\n lView: LView<{} | null>,\n renderer: Renderer,\n tNode: TNode,\n eventName: string,\n listenerFn: (e?: any) => any,\n eventTargetResolver?: GlobalTargetResolver,\n): void {\n const isTNodeDirectiveHost = isDirectiveHost(tNode);\n const firstCreatePass = tView.firstCreatePass;\n const tCleanup = firstCreatePass ? getOrCreateTViewCleanup(tView) : null;\n\n // When the ɵɵlistener instruction was generated and is executed we know that there is either a\n // native listener or a directive output on this element. As such we we know that we will have to\n // register a listener and store its cleanup function on LView.\n const lCleanup = getOrCreateLViewCleanup(lView);\n\n ngDevMode && assertTNodeType(tNode, TNodeType.AnyRNode | TNodeType.AnyContainer);\n\n let processOutputs = true;\n\n // Adding a native event listener is applicable when:\n // - The corresponding TNode represents a DOM element.\n // - The event target has a resolver (usually resulting in a global object,\n // such as `window` or `document`).\n if (tNode.type & TNodeType.AnyRNode || eventTargetResolver) {\n const native = getNativeByTNode(tNode, lView) as RElement;\n const target = eventTargetResolver ? eventTargetResolver(native) : native;\n const lCleanupIndex = lCleanup.length;\n const idxOrTargetGetter = eventTargetResolver\n ? (_lView: LView) => eventTargetResolver(unwrapRNode(_lView[tNode.index]))\n : tNode.index;\n\n // In order to match current behavior, native DOM event listeners must be added for all\n // events (including outputs).\n\n // There might be cases where multiple directives on the same element try to register an event\n // handler function for the same event. In this situation we want to avoid registration of\n // several native listeners as each registration would be intercepted by NgZone and\n // trigger change detection. This would mean that a single user action would result in several\n // change detections being invoked. To avoid this situation we want to have only one call to\n // native handler registration (for the same element and same type of event).\n //\n // In order to have just one native event handler in presence of multiple handler functions,\n // we just register a first handler function as a native event listener and then chain\n // (coalesce) other handler functions on top of the first native handler function.\n let existingListener = null;\n // Please note that the coalescing described here doesn't happen for events specifying an\n // alternative target (ex. (document:click)) - this is to keep backward compatibility with the\n // view engine.\n // Also, we don't have to search for existing listeners is there are no directives\n // matching on a given node as we can't register multiple event handlers for the same event in\n // a template (this would mean having duplicate attributes).\n if (!eventTargetResolver && isTNodeDirectiveHost) {\n existingListener = findExistingListener(tView, lView, eventName, tNode.index);\n }\n if (existingListener !== null) {\n // Attach a new listener to coalesced listeners list, maintaining the order in which\n // listeners are registered. For performance reasons, we keep a reference to the last\n // listener in that list (in `__ngLastListenerFn__` field), so we can avoid going through\n // the entire set each time we need to add a new listener.\n const lastListenerFn = (<any>existingListener).__ngLastListenerFn__ || existingListener;\n lastListenerFn.__ngNextListenerFn__ = listenerFn;\n (<any>existingListener).__ngLastListenerFn__ = listenerFn;\n processOutputs = false;\n } else {\n listenerFn = wrapListener(tNode, lView, listenerFn);\n stashEventListenerImpl(lView, target, eventName, listenerFn);\n const cleanupFn = renderer.listen(target as RElement, eventName, listenerFn);\n ngDevMode && ngDevMode.rendererAddEventListener++;\n\n lCleanup.push(listenerFn, cleanupFn);\n tCleanup && tCleanup.push(eventName, idxOrTargetGetter, lCleanupIndex, lCleanupIndex + 1);\n }\n } else {\n // Even if there is no native listener to add, we still need to wrap the listener so that OnPush\n // ancestors are marked dirty when an event occurs.\n listenerFn = wrapListener(tNode, lView, listenerFn);\n }\n\n if (processOutputs) {\n const outputConfig = tNode.outputs?.[eventName];\n const hostDirectiveOutputConfig = tNode.hostDirectiveOutputs?.[eventName];\n\n if (hostDirectiveOutputConfig && hostDirectiveOutputConfig.length) {\n for (let i = 0; i < hostDirectiveOutputConfig.length; i += 2) {\n const index = hostDirectiveOutputConfig[i] as number;\n const lookupName = hostDirectiveOutputConfig[i + 1] as string;\n listenToOutput(tNode, lView, index, lookupName, eventName, listenerFn);\n }\n }\n\n if (outputConfig && outputConfig.length) {\n for (const index of outputConfig) {\n listenToOutput(tNode, lView, index, eventName, eventName, listenerFn);\n }\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport {nextContextImpl} from '../state';\n\n/**\n * Retrieves a context at the level specified and saves it as the global, contextViewData.\n * Will get the next level up if level is not specified.\n *\n * This is used to save contexts of parent views so they can be bound in embedded views, or\n * in conjunction with reference() to bind a ref from a parent view.\n *\n * @param level The relative level of the view from which to grab context compared to contextVewData\n * @returns context\n *\n * @codeGenApi\n */\nexport function ɵɵnextContext<T = any>(level: number = 1): T {\n return nextContextImpl(level);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport {findMatchingDehydratedView} from '../../hydration/views';\nimport {isDetachedByI18n} from '../../i18n/utils';\nimport {newArray} from '../../util/array_utils';\nimport {assertLContainer, assertTNode} from '../assert';\nimport {ComponentTemplate} from '../interfaces/definition';\nimport {TAttributes, TElementNode, TNode, TNodeType} from '../interfaces/node';\nimport {ProjectionSlots} from '../interfaces/projection';\nimport {\n DECLARATION_COMPONENT_VIEW,\n HEADER_OFFSET,\n HYDRATION,\n LView,\n T_HOST,\n TView,\n} from '../interfaces/view';\nimport {applyProjection} from '../node_manipulation';\nimport {\n getProjectAsAttrValue,\n isNodeMatchingSelectorList,\n isSelectorInSelectorList,\n} from '../node_selector_matcher';\nimport {getLView, getTView, isInSkipHydrationBlock, setCurrentTNodeAsNotParent} from '../state';\nimport {getOrCreateTNode} from '../tnode_manipulation';\nimport {addLViewToLContainer} from '../view/container';\nimport {createAndRenderEmbeddedLView, shouldAddViewToDom} from '../view_manipulation';\n\nimport {declareTemplate} from './template';\n\n/**\n * Checks a given node against matching projection slots and returns the\n * determined slot index. Returns \"null\" if no slot matched the given node.\n *\n * This function takes into account the parsed ngProjectAs selector from the\n * node's attributes. If present, it will check whether the ngProjectAs selector\n * matches any of the projection slot selectors.\n */\nexport function matchingProjectionSlotIndex(\n tNode: TNode,\n projectionSlots: ProjectionSlots,\n): number | null {\n let wildcardNgContentIndex = null;\n const ngProjectAsAttrVal = getProjectAsAttrValue(tNode);\n for (let i = 0; i < projectionSlots.length; i++) {\n const slotValue = projectionSlots[i];\n // The last wildcard projection slot should match all nodes which aren't matching\n // any selector. This is necessary to be backwards compatible with view engine.\n if (slotValue === '*') {\n wildcardNgContentIndex = i;\n continue;\n }\n // If we ran into an `ngProjectAs` attribute, we should match its parsed selector\n // to the list of selectors, otherwise we fall back to matching against the node.\n if (\n ngProjectAsAttrVal === null\n ? isNodeMatchingSelectorList(tNode, slotValue, /* isProjectionMode */ true)\n : isSelectorInSelectorList(ngProjectAsAttrVal, slotValue)\n ) {\n return i; // first matching selector \"captures\" a given node\n }\n }\n return wildcardNgContentIndex;\n}\n\n/**\n * Instruction to distribute projectable nodes among <ng-content> occurrences in a given template.\n * It takes all the selectors from the entire component's template and decides where\n * each projected node belongs (it re-distributes nodes among \"buckets\" where each \"bucket\" is\n * backed by a selector).\n *\n * This function requires CSS selectors to be provided in 2 forms: parsed (by a compiler) and text,\n * un-parsed form.\n *\n * The parsed form is needed for efficient matching of a node against a given CSS selector.\n * The un-parsed, textual form is needed for support of the ngProjectAs attribute.\n *\n * Having a CSS selector in 2 different formats is not ideal, but alternatives have even more\n * drawbacks:\n * - having only a textual form would require runtime parsing of CSS selectors;\n * - we can't have only a parsed as we can't re-construct textual form from it (as entered by a\n * template author).\n *\n * @param projectionSlots? A collection of projection slots. A projection slot can be based\n * on a parsed CSS selectors or set to the wildcard selector (\"*\") in order to match\n * all nodes which do not match any selector. If not specified, a single wildcard\n * selector projection slot will be defined.\n *\n * @codeGenApi\n */\nexport function ɵɵprojectionDef(projectionSlots?: ProjectionSlots): void {\n const componentNode = getLView()[DECLARATION_COMPONENT_VIEW][T_HOST] as TElementNode;\n\n if (!componentNode.projection) {\n // If no explicit projection slots are defined, fall back to a single\n // projection slot with the wildcard selector.\n const numProjectionSlots = projectionSlots ? projectionSlots.length : 1;\n const projectionHeads: (TNode | null)[] = (componentNode.projection = newArray(\n numProjectionSlots,\n null! as TNode,\n ));\n const tails: (TNode | null)[] = projectionHeads.slice();\n\n let componentChild: TNode | null = componentNode.child;\n\n while (componentChild !== null) {\n // Do not project let declarations so they don't occupy a slot.\n if (componentChild.type !== TNodeType.LetDeclaration) {\n const slotIndex = projectionSlots\n ? matchingProjectionSlotIndex(componentChild, projectionSlots)\n : 0;\n\n if (slotIndex !== null) {\n if (tails[slotIndex]) {\n tails[slotIndex]!.projectionNext = componentChild;\n } else {\n projectionHeads[slotIndex] = componentChild;\n }\n tails[slotIndex] = componentChild;\n }\n }\n\n componentChild = componentChild.next;\n }\n }\n}\n\n/**\n * Inserts previously re-distributed projected nodes. This instruction must be preceded by a call\n * to the projectionDef instruction.\n *\n * @param nodeIndex Index of the projection node.\n * @param selectorIndex Index of the slot selector.\n * - 0 when the selector is `*` (or unspecified as this is the default value),\n * - 1 based index of the selector from the {@link projectionDef}\n * @param attrs Static attributes set on the `ng-content` node.\n * @param fallbackTemplateFn Template function with fallback content.\n * Will be rendered if the slot is empty at runtime.\n * @param fallbackDecls Number of declarations in the fallback template.\n * @param fallbackVars Number of variables in the fallback template.\n *\n * @codeGenApi\n */\nexport function ɵɵprojection(\n nodeIndex: number,\n selectorIndex: number = 0,\n attrs?: TAttributes,\n fallbackTemplateFn?: ComponentTemplate<unknown>,\n fallbackDecls?: number,\n fallbackVars?: number,\n): void {\n const lView = getLView();\n const tView = getTView();\n const fallbackIndex = fallbackTemplateFn ? nodeIndex + 1 : null;\n\n // Fallback content needs to be declared no matter whether the slot is empty since different\n // instances of the component may or may not insert it. Also it needs to be declare *before*\n // the projection node in order to work correctly with hydration.\n if (fallbackIndex !== null) {\n declareTemplate(\n lView,\n tView,\n fallbackIndex,\n fallbackTemplateFn!,\n fallbackDecls!,\n fallbackVars!,\n null,\n attrs,\n );\n }\n\n const tProjectionNode = getOrCreateTNode(\n tView,\n HEADER_OFFSET + nodeIndex,\n TNodeType.Projection,\n null,\n attrs || null,\n );\n\n // We can't use viewData[HOST_NODE] because projection nodes can be nested in embedded views.\n if (tProjectionNode.projection === null) {\n tProjectionNode.projection = selectorIndex;\n }\n\n // `<ng-content>` has no content. Even if there's fallback\n // content, the fallback is shown next to it.\n setCurrentTNodeAsNotParent();\n\n const hydrationInfo = lView[HYDRATION];\n const isNodeCreationMode = !hydrationInfo || isInSkipHydrationBlock();\n const componentHostNode = lView[DECLARATION_COMPONENT_VIEW][T_HOST] as TElementNode;\n const isEmpty = componentHostNode.projection![tProjectionNode.projection] === null;\n\n if (isEmpty && fallbackIndex !== null) {\n insertFallbackContent(lView, tView, fallbackIndex);\n } else if (isNodeCreationMode && !isDetachedByI18n(tProjectionNode)) {\n // re-distribution of projectable nodes is stored on a component's view level\n applyProjection(tView, lView, tProjectionNode);\n }\n}\n\n/** Inserts the fallback content of a projection slot. Assumes there's no projected content. */\nfunction insertFallbackContent(lView: LView, tView: TView, fallbackIndex: number) {\n const adjustedIndex = HEADER_OFFSET + fallbackIndex;\n const fallbackTNode = tView.data[adjustedIndex] as TNode;\n const fallbackLContainer = lView[adjustedIndex];\n ngDevMode && assertTNode(fallbackTNode);\n ngDevMode && assertLContainer(fallbackLContainer);\n\n const dehydratedView = findMatchingDehydratedView(fallbackLContainer, fallbackTNode.tView!.ssrId);\n const fallbackLView = createAndRenderEmbeddedLView(lView, fallbackTNode, undefined, {\n dehydratedView,\n });\n addLViewToLContainer(\n fallbackLContainer,\n fallbackLView,\n 0,\n shouldAddViewToDom(fallbackTNode, dehydratedView),\n );\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport {SanitizerFn} from '../interfaces/sanitization';\nimport {RENDERER} from '../interfaces/view';\nimport {getBindingIndex, getLView, getSelectedTNode, getTView} from '../state';\nimport {NO_CHANGE} from '../tokens';\n\nimport {\n interpolation1,\n interpolation2,\n interpolation3,\n interpolation4,\n interpolation5,\n interpolation6,\n interpolation7,\n interpolation8,\n interpolationV,\n} from './interpolation';\nimport {elementPropertyInternal, storePropertyBindingMetadata} from './shared';\n\n/**\n *\n * Update an interpolated property on an element with a lone bound value\n *\n * Used when the value passed to a property has 1 interpolated value in it, an no additional text\n * surrounds that interpolated value:\n *\n * ```html\n * <div title=\"{{v0}}\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate('title', v0);\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolate(\n propName: string,\n v0: any,\n sanitizer?: SanitizerFn,\n): typeof ɵɵpropertyInterpolate {\n ɵɵpropertyInterpolate1(propName, '', v0, '', sanitizer);\n return ɵɵpropertyInterpolate;\n}\n\n/**\n *\n * Update an interpolated property on an element with single bound value surrounded by text.\n *\n * Used when the value passed to a property has 1 interpolated value in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate1('title', 'prefix', v0, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolate1(\n propName: string,\n prefix: string,\n v0: any,\n suffix: string,\n sanitizer?: SanitizerFn,\n): typeof ɵɵpropertyInterpolate1 {\n const lView = getLView();\n const interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(\n tView,\n tNode,\n lView,\n propName,\n interpolatedValue,\n lView[RENDERER],\n sanitizer,\n false,\n );\n ngDevMode &&\n storePropertyBindingMetadata(\n tView.data,\n tNode,\n propName,\n getBindingIndex() - 1,\n prefix,\n suffix,\n );\n }\n return ɵɵpropertyInterpolate1;\n}\n\n/**\n *\n * Update an interpolated property on an element with 2 bound values surrounded by text.\n *\n * Used when the value passed to a property has 2 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate2('title', 'prefix', v0, '-', v1, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolate2(\n propName: string,\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n suffix: string,\n sanitizer?: SanitizerFn,\n): typeof ɵɵpropertyInterpolate2 {\n const lView = getLView();\n const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(\n tView,\n tNode,\n lView,\n propName,\n interpolatedValue,\n lView[RENDERER],\n sanitizer,\n false,\n );\n ngDevMode &&\n storePropertyBindingMetadata(\n tView.data,\n tNode,\n propName,\n getBindingIndex() - 2,\n prefix,\n i0,\n suffix,\n );\n }\n return ɵɵpropertyInterpolate2;\n}\n\n/**\n *\n * Update an interpolated property on an element with 3 bound values surrounded by text.\n *\n * Used when the value passed to a property has 3 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate3(\n * 'title', 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolate3(\n propName: string,\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n suffix: string,\n sanitizer?: SanitizerFn,\n): typeof ɵɵpropertyInterpolate3 {\n const lView = getLView();\n const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(\n tView,\n tNode,\n lView,\n propName,\n interpolatedValue,\n lView[RENDERER],\n sanitizer,\n false,\n );\n ngDevMode &&\n storePropertyBindingMetadata(\n tView.data,\n tNode,\n propName,\n getBindingIndex() - 3,\n prefix,\n i0,\n i1,\n suffix,\n );\n }\n return ɵɵpropertyInterpolate3;\n}\n\n/**\n *\n * Update an interpolated property on an element with 4 bound values surrounded by text.\n *\n * Used when the value passed to a property has 4 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate4(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolate4(\n propName: string,\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n i2: string,\n v3: any,\n suffix: string,\n sanitizer?: SanitizerFn,\n): typeof ɵɵpropertyInterpolate4 {\n const lView = getLView();\n const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(\n tView,\n tNode,\n lView,\n propName,\n interpolatedValue,\n lView[RENDERER],\n sanitizer,\n false,\n );\n ngDevMode &&\n storePropertyBindingMetadata(\n tView.data,\n tNode,\n propName,\n getBindingIndex() - 4,\n prefix,\n i0,\n i1,\n i2,\n suffix,\n );\n }\n return ɵɵpropertyInterpolate4;\n}\n\n/**\n *\n * Update an interpolated property on an element with 5 bound values surrounded by text.\n *\n * Used when the value passed to a property has 5 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate5(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolate5(\n propName: string,\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n i2: string,\n v3: any,\n i3: string,\n v4: any,\n suffix: string,\n sanitizer?: SanitizerFn,\n): typeof ɵɵpropertyInterpolate5 {\n const lView = getLView();\n const interpolatedValue = interpolation5(\n lView,\n prefix,\n v0,\n i0,\n v1,\n i1,\n v2,\n i2,\n v3,\n i3,\n v4,\n suffix,\n );\n if (interpolatedValue !== NO_CHANGE) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(\n tView,\n tNode,\n lView,\n propName,\n interpolatedValue,\n lView[RENDERER],\n sanitizer,\n false,\n );\n ngDevMode &&\n storePropertyBindingMetadata(\n tView.data,\n tNode,\n propName,\n getBindingIndex() - 5,\n prefix,\n i0,\n i1,\n i2,\n i3,\n suffix,\n );\n }\n return ɵɵpropertyInterpolate5;\n}\n\n/**\n *\n * Update an interpolated property on an element with 6 bound values surrounded by text.\n *\n * Used when the value passed to a property has 6 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate6(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolate6(\n propName: string,\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n i2: string,\n v3: any,\n i3: string,\n v4: any,\n i4: string,\n v5: any,\n suffix: string,\n sanitizer?: SanitizerFn,\n): typeof ɵɵpropertyInterpolate6 {\n const lView = getLView();\n const interpolatedValue = interpolation6(\n lView,\n prefix,\n v0,\n i0,\n v1,\n i1,\n v2,\n i2,\n v3,\n i3,\n v4,\n i4,\n v5,\n suffix,\n );\n if (interpolatedValue !== NO_CHANGE) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(\n tView,\n tNode,\n lView,\n propName,\n interpolatedValue,\n lView[RENDERER],\n sanitizer,\n false,\n );\n ngDevMode &&\n storePropertyBindingMetadata(\n tView.data,\n tNode,\n propName,\n getBindingIndex() - 6,\n prefix,\n i0,\n i1,\n i2,\n i3,\n i4,\n suffix,\n );\n }\n return ɵɵpropertyInterpolate6;\n}\n\n/**\n *\n * Update an interpolated property on an element with 7 bound values surrounded by text.\n *\n * Used when the value passed to a property has 7 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate7(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolate7(\n propName: string,\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n i2: string,\n v3: any,\n i3: string,\n v4: any,\n i4: string,\n v5: any,\n i5: string,\n v6: any,\n suffix: string,\n sanitizer?: SanitizerFn,\n): typeof ɵɵpropertyInterpolate7 {\n const lView = getLView();\n const interpolatedValue = interpolation7(\n lView,\n prefix,\n v0,\n i0,\n v1,\n i1,\n v2,\n i2,\n v3,\n i3,\n v4,\n i4,\n v5,\n i5,\n v6,\n suffix,\n );\n if (interpolatedValue !== NO_CHANGE) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(\n tView,\n tNode,\n lView,\n propName,\n interpolatedValue,\n lView[RENDERER],\n sanitizer,\n false,\n );\n ngDevMode &&\n storePropertyBindingMetadata(\n tView.data,\n tNode,\n propName,\n getBindingIndex() - 7,\n prefix,\n i0,\n i1,\n i2,\n i3,\n i4,\n i5,\n suffix,\n );\n }\n return ɵɵpropertyInterpolate7;\n}\n\n/**\n *\n * Update an interpolated property on an element with 8 bound values surrounded by text.\n *\n * Used when the value passed to a property has 8 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate8(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param i6 Static value used for concatenation only.\n * @param v7 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolate8(\n propName: string,\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n i2: string,\n v3: any,\n i3: string,\n v4: any,\n i4: string,\n v5: any,\n i5: string,\n v6: any,\n i6: string,\n v7: any,\n suffix: string,\n sanitizer?: SanitizerFn,\n): typeof ɵɵpropertyInterpolate8 {\n const lView = getLView();\n const interpolatedValue = interpolation8(\n lView,\n prefix,\n v0,\n i0,\n v1,\n i1,\n v2,\n i2,\n v3,\n i3,\n v4,\n i4,\n v5,\n i5,\n v6,\n i6,\n v7,\n suffix,\n );\n if (interpolatedValue !== NO_CHANGE) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(\n tView,\n tNode,\n lView,\n propName,\n interpolatedValue,\n lView[RENDERER],\n sanitizer,\n false,\n );\n ngDevMode &&\n storePropertyBindingMetadata(\n tView.data,\n tNode,\n propName,\n getBindingIndex() - 8,\n prefix,\n i0,\n i1,\n i2,\n i3,\n i4,\n i5,\n i6,\n suffix,\n );\n }\n return ɵɵpropertyInterpolate8;\n}\n\n/**\n * Update an interpolated property on an element with 9 or more bound values surrounded by text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div\n * title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolateV(\n * 'title', ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n * 'suffix']);\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update.\n * @param values The collection of values and the strings in between those values, beginning with a\n * string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolateV(\n propName: string,\n values: any[],\n sanitizer?: SanitizerFn,\n): typeof ɵɵpropertyInterpolateV {\n const lView = getLView();\n const interpolatedValue = interpolationV(lView, values);\n if (interpolatedValue !== NO_CHANGE) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(\n tView,\n tNode,\n lView,\n propName,\n interpolatedValue,\n lView[RENDERER],\n sanitizer,\n false,\n );\n if (ngDevMode) {\n const interpolationInBetween = [values[0]]; // prefix\n for (let i = 2; i < values.length; i += 2) {\n interpolationInBetween.push(values[i]);\n }\n storePropertyBindingMetadata(\n tView.data,\n tNode,\n propName,\n getBindingIndex() - interpolationInBetween.length + 1,\n ...interpolationInBetween,\n );\n }\n }\n return ɵɵpropertyInterpolateV;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ProviderToken} from '../../di';\nimport {unwrapElementRef} from '../../linker/element_ref';\nimport {QueryList} from '../../linker/query_list';\nimport {QueryFlags} from '../interfaces/query';\nimport {\n createContentQuery,\n createViewQuery,\n getQueryResults,\n getTQuery,\n loadQueryInternal,\n} from '../queries/query';\nimport {getCurrentQueryIndex, getLView, getTView, setCurrentQueryIndex} from '../state';\nimport {isCreationMode} from '../util/view_utils';\n\n/**\n * Registers a QueryList, associated with a content query, for later refresh (part of a view\n * refresh).\n *\n * @param directiveIndex Current directive index\n * @param predicate The type for which the query will search\n * @param flags Flags associated with the query\n * @param read What to save in the query\n * @returns QueryList<T>\n *\n * @codeGenApi\n */\nexport function ɵɵcontentQuery<T>(\n directiveIndex: number,\n predicate: ProviderToken<unknown> | string | string[],\n flags: QueryFlags,\n read?: any,\n): void {\n createContentQuery<T>(directiveIndex, predicate, flags, read);\n}\n\n/**\n * Creates a new view query by initializing internal data structures.\n *\n * @param predicate The type for which the query will search\n * @param flags Flags associated with the query\n * @param read What to save in the query\n *\n * @codeGenApi\n */\nexport function ɵɵviewQuery<T>(\n predicate: ProviderToken<unknown> | string | string[],\n flags: QueryFlags,\n read?: any,\n): void {\n createViewQuery(predicate, flags, read);\n}\n\n/**\n * Refreshes a query by combining matches from all active views and removing matches from deleted\n * views.\n *\n * @returns `true` if a query got dirty during change detection or if this is a static query\n * resolving in creation mode, `false` otherwise.\n *\n * @codeGenApi\n */\nexport function ɵɵqueryRefresh(queryList: QueryList<any>): boolean {\n const lView = getLView();\n const tView = getTView();\n const queryIndex = getCurrentQueryIndex();\n\n setCurrentQueryIndex(queryIndex + 1);\n\n const tQuery = getTQuery(tView, queryIndex);\n if (\n queryList.dirty &&\n isCreationMode(lView) ===\n ((tQuery.metadata.flags & QueryFlags.isStatic) === QueryFlags.isStatic)\n ) {\n if (tQuery.matches === null) {\n queryList.reset([]);\n } else {\n const result = getQueryResults(lView, queryIndex);\n queryList.reset(result, unwrapElementRef);\n queryList.notifyOnChanges();\n }\n return true;\n }\n\n return false;\n}\n\n/**\n * Loads a QueryList corresponding to the current view or content query.\n *\n * @codeGenApi\n */\nexport function ɵɵloadQuery<T>(): QueryList<T> {\n return loadQueryInternal<T>(getLView(), getCurrentQueryIndex());\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ProviderToken} from '../../di/provider_token';\nimport {QueryFlags} from '../interfaces/query';\nimport {createContentQuery, createViewQuery} from '../queries/query';\nimport {bindQueryToSignal} from '../queries/query_reactive';\nimport {Signal} from '../reactivity/api';\nimport {getCurrentQueryIndex, setCurrentQueryIndex} from '../state';\n\n/**\n * Creates a new content query and binds it to a signal created by an authoring function.\n *\n * @param directiveIndex Current directive index\n * @param target The target signal to which the query should be bound\n * @param predicate The type for which the query will search\n * @param flags Flags associated with the query\n * @param read What to save in the query\n *\n * @codeGenApi\n */\nexport function ɵɵcontentQuerySignal<T>(\n directiveIndex: number,\n target: Signal<T>,\n predicate: ProviderToken<unknown> | string[],\n flags: QueryFlags,\n read?: any,\n): void {\n bindQueryToSignal(target, createContentQuery(directiveIndex, predicate, flags, read));\n}\n\n/**\n * Creates a new view query by initializing internal data structures and binding a new query to the\n * target signal.\n *\n * @param target The target signal to assign the query results to.\n * @param predicate The type or label that should match a given query\n * @param flags Flags associated with the query\n * @param read What to save in the query\n *\n * @codeGenApi\n */\nexport function ɵɵviewQuerySignal(\n target: Signal<unknown>,\n predicate: ProviderToken<unknown> | string[],\n flags: QueryFlags,\n read?: ProviderToken<unknown>,\n): void {\n bindQueryToSignal(target, createViewQuery(predicate, flags, read));\n}\n\n/**\n * Advances the current query index by a specified offset.\n *\n * Adjusting the current query index is necessary in cases where a given directive has a mix of\n * zone-based and signal-based queries. The signal-based queries don't require tracking of the\n * current index (those are refreshed on demand and not during change detection) so this instruction\n * is only necessary for backward-compatibility.\n *\n * @param index offset to apply to the current query index (defaults to 1)\n *\n * @codeGenApi\n */\nexport function ɵɵqueryAdvance(indexOffset: number = 1): void {\n setCurrentQueryIndex(getCurrentQueryIndex() + indexOffset);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport {HEADER_OFFSET, LView, TView} from '../interfaces/view';\nimport {getContextLView} from '../state';\nimport {load} from '../util/view_utils';\n\n/**\n * Retrieves a local reference from the current contextViewData.\n *\n * If the reference to retrieve is in a parent view, this instruction is used in conjunction\n * with a nextContext() call, which walks up the tree and updates the contextViewData instance.\n *\n * @param index The index of the local ref in contextViewData.\n *\n * @codeGenApi\n */\nexport function ɵɵreference<T>(index: number) {\n const contextLView = getContextLView();\n return load<T>(contextLView, HEADER_OFFSET + index);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {getLView} from '../state';\nimport {\n interpolation1,\n interpolation2,\n interpolation3,\n interpolation4,\n interpolation5,\n interpolation6,\n interpolation7,\n interpolation8,\n interpolationV,\n} from './interpolation';\nimport {ɵɵstyleMap} from './styling';\n\n/**\n *\n * Update an interpolated style on an element with single bound value surrounded by text.\n *\n * Used when the value passed to a property has 1 interpolated value in it:\n *\n * ```html\n * <div style=\"key: {{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate1('key: ', v0, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ɵɵstyleMapInterpolate1(prefix: string, v0: any, suffix: string): void {\n const lView = getLView();\n const interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n ɵɵstyleMap(interpolatedValue);\n}\n\n/**\n *\n * Update an interpolated style on an element with 2 bound values surrounded by text.\n *\n * Used when the value passed to a property has 2 interpolated values in it:\n *\n * ```html\n * <div style=\"key: {{v0}}; key1: {{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate2('key: ', v0, '; key1: ', v1, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ɵɵstyleMapInterpolate2(\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n suffix: string,\n): void {\n const lView = getLView();\n const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n ɵɵstyleMap(interpolatedValue);\n}\n\n/**\n *\n * Update an interpolated style on an element with 3 bound values surrounded by text.\n *\n * Used when the value passed to a property has 3 interpolated values in it:\n *\n * ```html\n * <div style=\"key: {{v0}}; key2: {{v1}}; key2: {{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate3(\n * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ɵɵstyleMapInterpolate3(\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n suffix: string,\n): void {\n const lView = getLView();\n const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n ɵɵstyleMap(interpolatedValue);\n}\n\n/**\n *\n * Update an interpolated style on an element with 4 bound values surrounded by text.\n *\n * Used when the value passed to a property has 4 interpolated values in it:\n *\n * ```html\n * <div style=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate4(\n * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ɵɵstyleMapInterpolate4(\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n i2: string,\n v3: any,\n suffix: string,\n): void {\n const lView = getLView();\n const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n ɵɵstyleMap(interpolatedValue);\n}\n\n/**\n *\n * Update an interpolated style on an element with 5 bound values surrounded by text.\n *\n * Used when the value passed to a property has 5 interpolated values in it:\n *\n * ```html\n * <div style=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate5(\n * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ɵɵstyleMapInterpolate5(\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n i2: string,\n v3: any,\n i3: string,\n v4: any,\n suffix: string,\n): void {\n const lView = getLView();\n const interpolatedValue = interpolation5(\n lView,\n prefix,\n v0,\n i0,\n v1,\n i1,\n v2,\n i2,\n v3,\n i3,\n v4,\n suffix,\n );\n ɵɵstyleMap(interpolatedValue);\n}\n\n/**\n *\n * Update an interpolated style on an element with 6 bound values surrounded by text.\n *\n * Used when the value passed to a property has 6 interpolated values in it:\n *\n * ```html\n * <div style=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}};\n * key5: {{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate6(\n * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,\n * 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ɵɵstyleMapInterpolate6(\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n i2: string,\n v3: any,\n i3: string,\n v4: any,\n i4: string,\n v5: any,\n suffix: string,\n): void {\n const lView = getLView();\n const interpolatedValue = interpolation6(\n lView,\n prefix,\n v0,\n i0,\n v1,\n i1,\n v2,\n i2,\n v3,\n i3,\n v4,\n i4,\n v5,\n suffix,\n );\n ɵɵstyleMap(interpolatedValue);\n}\n\n/**\n *\n * Update an interpolated style on an element with 7 bound values surrounded by text.\n *\n * Used when the value passed to a property has 7 interpolated values in it:\n *\n * ```html\n * <div style=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}};\n * key6: {{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate7(\n * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,\n * '; key6: ', v6, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ɵɵstyleMapInterpolate7(\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n i2: string,\n v3: any,\n i3: string,\n v4: any,\n i4: string,\n v5: any,\n i5: string,\n v6: any,\n suffix: string,\n): void {\n const lView = getLView();\n const interpolatedValue = interpolation7(\n lView,\n prefix,\n v0,\n i0,\n v1,\n i1,\n v2,\n i2,\n v3,\n i3,\n v4,\n i4,\n v5,\n i5,\n v6,\n suffix,\n );\n ɵɵstyleMap(interpolatedValue);\n}\n\n/**\n *\n * Update an interpolated style on an element with 8 bound values surrounded by text.\n *\n * Used when the value passed to a property has 8 interpolated values in it:\n *\n * ```html\n * <div style=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}};\n * key6: {{v6}}; key7: {{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate8(\n * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,\n * '; key6: ', v6, '; key7: ', v7, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param i6 Static value used for concatenation only.\n * @param v7 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ɵɵstyleMapInterpolate8(\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n i2: string,\n v3: any,\n i3: string,\n v4: any,\n i4: string,\n v5: any,\n i5: string,\n v6: any,\n i6: string,\n v7: any,\n suffix: string,\n): void {\n const lView = getLView();\n const interpolatedValue = interpolation8(\n lView,\n prefix,\n v0,\n i0,\n v1,\n i1,\n v2,\n i2,\n v3,\n i3,\n v4,\n i4,\n v5,\n i5,\n v6,\n i6,\n v7,\n suffix,\n );\n ɵɵstyleMap(interpolatedValue);\n}\n\n/**\n * Update an interpolated style on an element with 9 or more bound values surrounded by text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div\n * class=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}};\n * key6: {{v6}}; key7: {{v7}}; key8: {{v8}}; key9: {{v9}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolateV(\n * ['key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,\n * '; key6: ', v6, '; key7: ', v7, '; key8: ', v8, '; key9: ', v9, 'suffix']);\n * ```\n *.\n * @param values The collection of values and the strings in-between those values, beginning with\n * a string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '; key2: ', value1, '; key2: ', value2, ..., value99, 'suffix']`)\n * @codeGenApi\n */\nexport function ɵɵstyleMapInterpolateV(values: any[]): void {\n const lView = getLView();\n const interpolatedValue = interpolationV(lView, values);\n ɵɵstyleMap(interpolatedValue);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {getLView} from '../state';\nimport {\n interpolation1,\n interpolation2,\n interpolation3,\n interpolation4,\n interpolation5,\n interpolation6,\n interpolation7,\n interpolation8,\n interpolationV,\n} from './interpolation';\nimport {checkStylingProperty} from './styling';\n\n/**\n *\n * Update an interpolated style property on an element with single bound value surrounded by text.\n *\n * Used when the value passed to a property has 1 interpolated value in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate1(0, 'prefix', v0, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n * index of the style in the style bindings array that was passed into\n * `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵstylePropInterpolate1(\n prop: string,\n prefix: string,\n v0: any,\n suffix: string,\n valueSuffix?: string | null,\n): typeof ɵɵstylePropInterpolate1 {\n const lView = getLView();\n const interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolate1;\n}\n\n/**\n *\n * Update an interpolated style property on an element with 2 bound values surrounded by text.\n *\n * Used when the value passed to a property has 2 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate2(0, 'prefix', v0, '-', v1, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n * index of the style in the style bindings array that was passed into\n * `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵstylePropInterpolate2(\n prop: string,\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n suffix: string,\n valueSuffix?: string | null,\n): typeof ɵɵstylePropInterpolate2 {\n const lView = getLView();\n const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolate2;\n}\n\n/**\n *\n * Update an interpolated style property on an element with 3 bound values surrounded by text.\n *\n * Used when the value passed to a property has 3 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}-{{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate3(0, 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n * index of the style in the style bindings array that was passed into\n * `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵstylePropInterpolate3(\n prop: string,\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n suffix: string,\n valueSuffix?: string | null,\n): typeof ɵɵstylePropInterpolate3 {\n const lView = getLView();\n const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolate3;\n}\n\n/**\n *\n * Update an interpolated style property on an element with 4 bound values surrounded by text.\n *\n * Used when the value passed to a property has 4 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate4(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n * index of the style in the style bindings array that was passed into\n * `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵstylePropInterpolate4(\n prop: string,\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n i2: string,\n v3: any,\n suffix: string,\n valueSuffix?: string | null,\n): typeof ɵɵstylePropInterpolate4 {\n const lView = getLView();\n const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolate4;\n}\n\n/**\n *\n * Update an interpolated style property on an element with 5 bound values surrounded by text.\n *\n * Used when the value passed to a property has 5 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate5(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n * index of the style in the style bindings array that was passed into\n * `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵstylePropInterpolate5(\n prop: string,\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n i2: string,\n v3: any,\n i3: string,\n v4: any,\n suffix: string,\n valueSuffix?: string | null,\n): typeof ɵɵstylePropInterpolate5 {\n const lView = getLView();\n const interpolatedValue = interpolation5(\n lView,\n prefix,\n v0,\n i0,\n v1,\n i1,\n v2,\n i2,\n v3,\n i3,\n v4,\n suffix,\n );\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolate5;\n}\n\n/**\n *\n * Update an interpolated style property on an element with 6 bound values surrounded by text.\n *\n * Used when the value passed to a property has 6 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate6(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n * index of the style in the style bindings array that was passed into\n * `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵstylePropInterpolate6(\n prop: string,\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n i2: string,\n v3: any,\n i3: string,\n v4: any,\n i4: string,\n v5: any,\n suffix: string,\n valueSuffix?: string | null,\n): typeof ɵɵstylePropInterpolate6 {\n const lView = getLView();\n const interpolatedValue = interpolation6(\n lView,\n prefix,\n v0,\n i0,\n v1,\n i1,\n v2,\n i2,\n v3,\n i3,\n v4,\n i4,\n v5,\n suffix,\n );\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolate6;\n}\n\n/**\n *\n * Update an interpolated style property on an element with 7 bound values surrounded by text.\n *\n * Used when the value passed to a property has 7 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate7(\n * 0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n * index of the style in the style bindings array that was passed into\n * `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵstylePropInterpolate7(\n prop: string,\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n i2: string,\n v3: any,\n i3: string,\n v4: any,\n i4: string,\n v5: any,\n i5: string,\n v6: any,\n suffix: string,\n valueSuffix?: string | null,\n): typeof ɵɵstylePropInterpolate7 {\n const lView = getLView();\n const interpolatedValue = interpolation7(\n lView,\n prefix,\n v0,\n i0,\n v1,\n i1,\n v2,\n i2,\n v3,\n i3,\n v4,\n i4,\n v5,\n i5,\n v6,\n suffix,\n );\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolate7;\n}\n\n/**\n *\n * Update an interpolated style property on an element with 8 bound values surrounded by text.\n *\n * Used when the value passed to a property has 8 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate8(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6,\n * '-', v7, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n * index of the style in the style bindings array that was passed into\n * `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param i6 Static value used for concatenation only.\n * @param v7 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵstylePropInterpolate8(\n prop: string,\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n i2: string,\n v3: any,\n i3: string,\n v4: any,\n i4: string,\n v5: any,\n i5: string,\n v6: any,\n i6: string,\n v7: any,\n suffix: string,\n valueSuffix?: string | null,\n): typeof ɵɵstylePropInterpolate8 {\n const lView = getLView();\n const interpolatedValue = interpolation8(\n lView,\n prefix,\n v0,\n i0,\n v1,\n i1,\n v2,\n i2,\n v3,\n i3,\n v4,\n i4,\n v5,\n i5,\n v6,\n i6,\n v7,\n suffix,\n );\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolate8;\n}\n\n/**\n * Update an interpolated style property on an element with 9 or more bound values surrounded by\n * text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div\n * style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix\">\n * </div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolateV(\n * 0, ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n * 'suffix']);\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n * index of the style in the style bindings array that was passed into\n * `styling`..\n * @param values The collection of values and the strings in-between those values, beginning with\n * a string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵstylePropInterpolateV(\n prop: string,\n values: any[],\n valueSuffix?: string | null,\n): typeof ɵɵstylePropInterpolateV {\n const lView = getLView();\n const interpolatedValue = interpolationV(lView, values);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolateV;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport {validateMatchingNode} from '../../hydration/error_handling';\nimport {locateNextRNode} from '../../hydration/node_lookup_utils';\nimport {isDisconnectedNode, markRNodeAsClaimedByHydration} from '../../hydration/utils';\nimport {isDetachedByI18n} from '../../i18n/utils';\nimport {assertEqual, assertIndexInRange} from '../../util/assert';\nimport {TElementNode, TNode, TNodeType} from '../interfaces/node';\nimport {RText} from '../interfaces/renderer_dom';\nimport {HEADER_OFFSET, HYDRATION, LView, RENDERER, TView} from '../interfaces/view';\nimport {appendChild} from '../node_manipulation';\nimport {createTextNode} from '../dom_node_manipulation';\nimport {\n getBindingIndex,\n getLView,\n getTView,\n isInSkipHydrationBlock,\n lastNodeWasCreated,\n setCurrentTNode,\n wasLastNodeCreated,\n} from '../state';\nimport {getOrCreateTNode} from '../tnode_manipulation';\n\n/**\n * Create static text node\n *\n * @param index Index of the node in the data array\n * @param value Static string value to write.\n *\n * @codeGenApi\n */\nexport function ɵɵtext(index: number, value: string = ''): void {\n const lView = getLView();\n const tView = getTView();\n const adjustedIndex = index + HEADER_OFFSET;\n\n ngDevMode &&\n assertEqual(\n getBindingIndex(),\n tView.bindingStartIndex,\n 'text nodes should be created before any bindings',\n );\n ngDevMode && assertIndexInRange(lView, adjustedIndex);\n\n const tNode = tView.firstCreatePass\n ? getOrCreateTNode(tView, adjustedIndex, TNodeType.Text, value, null)\n : (tView.data[adjustedIndex] as TElementNode);\n\n const textNative = _locateOrCreateTextNode(tView, lView, tNode, value, index);\n lView[adjustedIndex] = textNative;\n\n if (wasLastNodeCreated()) {\n appendChild(tView, lView, textNative, tNode);\n }\n\n // Text nodes are self closing.\n setCurrentTNode(tNode, false);\n}\n\nlet _locateOrCreateTextNode: typeof locateOrCreateTextNodeImpl = (\n tView: TView,\n lView: LView,\n tNode: TNode,\n value: string,\n index: number,\n) => {\n lastNodeWasCreated(true);\n return createTextNode(lView[RENDERER], value);\n};\n\n/**\n * Enables hydration code path (to lookup existing elements in DOM)\n * in addition to the regular creation mode of text nodes.\n */\nfunction locateOrCreateTextNodeImpl(\n tView: TView,\n lView: LView,\n tNode: TNode,\n value: string,\n index: number,\n): RText {\n const hydrationInfo = lView[HYDRATION];\n const isNodeCreationMode =\n !hydrationInfo ||\n isInSkipHydrationBlock() ||\n isDetachedByI18n(tNode) ||\n isDisconnectedNode(hydrationInfo, index);\n lastNodeWasCreated(isNodeCreationMode);\n\n // Regular creation mode.\n if (isNodeCreationMode) {\n return createTextNode(lView[RENDERER], value);\n }\n\n // Hydration mode, looking up an existing element in DOM.\n const textNative = locateNextRNode(hydrationInfo, tView, lView, tNode) as RText;\n\n ngDevMode && validateMatchingNode(textNative, Node.TEXT_NODE, null, lView, tNode);\n ngDevMode && markRNodeAsClaimedByHydration(textNative);\n\n return textNative;\n}\n\nexport function enableLocateOrCreateTextNodeImpl() {\n _locateOrCreateTextNode = locateOrCreateTextNodeImpl;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport {assertDefined, assertIndexInRange, assertNotSame, assertString} from '../../util/assert';\nimport {RText} from '../interfaces/renderer_dom';\nimport {LView, RENDERER} from '../interfaces/view';\nimport {updateTextNode} from '../dom_node_manipulation';\nimport {getLView, getSelectedIndex} from '../state';\nimport {NO_CHANGE} from '../tokens';\nimport {getNativeByIndex} from '../util/view_utils';\n\nimport {\n interpolation1,\n interpolation2,\n interpolation3,\n interpolation4,\n interpolation5,\n interpolation6,\n interpolation7,\n interpolation8,\n interpolationV,\n} from './interpolation';\n\n/**\n *\n * Update text content with a lone bound value\n *\n * Used when a text node has 1 interpolated value in it, an no additional text\n * surrounds that interpolated value:\n *\n * ```html\n * <div>{{v0}}</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate(v0);\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nexport function ɵɵtextInterpolate(v0: any): typeof ɵɵtextInterpolate {\n ɵɵtextInterpolate1('', v0, '');\n return ɵɵtextInterpolate;\n}\n\n/**\n *\n * Update text content with single bound value surrounded by other text.\n *\n * Used when a text node has 1 interpolated value in it:\n *\n * ```html\n * <div>prefix{{v0}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate1('prefix', v0, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nexport function ɵɵtextInterpolate1(\n prefix: string,\n v0: any,\n suffix: string,\n): typeof ɵɵtextInterpolate1 {\n const lView = getLView();\n const interpolated = interpolation1(lView, prefix, v0, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), interpolated as string);\n }\n return ɵɵtextInterpolate1;\n}\n\n/**\n *\n * Update text content with 2 bound values surrounded by other text.\n *\n * Used when a text node has 2 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate2('prefix', v0, '-', v1, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nexport function ɵɵtextInterpolate2(\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n suffix: string,\n): typeof ɵɵtextInterpolate2 {\n const lView = getLView();\n const interpolated = interpolation2(lView, prefix, v0, i0, v1, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), interpolated as string);\n }\n return ɵɵtextInterpolate2;\n}\n\n/**\n *\n * Update text content with 3 bound values surrounded by other text.\n *\n * Used when a text node has 3 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate3(\n * 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nexport function ɵɵtextInterpolate3(\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n suffix: string,\n): typeof ɵɵtextInterpolate3 {\n const lView = getLView();\n const interpolated = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), interpolated as string);\n }\n return ɵɵtextInterpolate3;\n}\n\n/**\n *\n * Update text content with 4 bound values surrounded by other text.\n *\n * Used when a text node has 4 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate4(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see ɵɵtextInterpolateV\n * @codeGenApi\n */\nexport function ɵɵtextInterpolate4(\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n i2: string,\n v3: any,\n suffix: string,\n): typeof ɵɵtextInterpolate4 {\n const lView = getLView();\n const interpolated = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), interpolated as string);\n }\n return ɵɵtextInterpolate4;\n}\n\n/**\n *\n * Update text content with 5 bound values surrounded by other text.\n *\n * Used when a text node has 5 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate5(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nexport function ɵɵtextInterpolate5(\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n i2: string,\n v3: any,\n i3: string,\n v4: any,\n suffix: string,\n): typeof ɵɵtextInterpolate5 {\n const lView = getLView();\n const interpolated = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), interpolated as string);\n }\n return ɵɵtextInterpolate5;\n}\n\n/**\n *\n * Update text content with 6 bound values surrounded by other text.\n *\n * Used when a text node has 6 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate6(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change. @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nexport function ɵɵtextInterpolate6(\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n i2: string,\n v3: any,\n i3: string,\n v4: any,\n i4: string,\n v5: any,\n suffix: string,\n): typeof ɵɵtextInterpolate6 {\n const lView = getLView();\n const interpolated = interpolation6(\n lView,\n prefix,\n v0,\n i0,\n v1,\n i1,\n v2,\n i2,\n v3,\n i3,\n v4,\n i4,\n v5,\n suffix,\n );\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), interpolated as string);\n }\n return ɵɵtextInterpolate6;\n}\n\n/**\n *\n * Update text content with 7 bound values surrounded by other text.\n *\n * Used when a text node has 7 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate7(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nexport function ɵɵtextInterpolate7(\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n i2: string,\n v3: any,\n i3: string,\n v4: any,\n i4: string,\n v5: any,\n i5: string,\n v6: any,\n suffix: string,\n): typeof ɵɵtextInterpolate7 {\n const lView = getLView();\n const interpolated = interpolation7(\n lView,\n prefix,\n v0,\n i0,\n v1,\n i1,\n v2,\n i2,\n v3,\n i3,\n v4,\n i4,\n v5,\n i5,\n v6,\n suffix,\n );\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), interpolated as string);\n }\n return ɵɵtextInterpolate7;\n}\n\n/**\n *\n * Update text content with 8 bound values surrounded by other text.\n *\n * Used when a text node has 8 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate8(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nexport function ɵɵtextInterpolate8(\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n i2: string,\n v3: any,\n i3: string,\n v4: any,\n i4: string,\n v5: any,\n i5: string,\n v6: any,\n i6: string,\n v7: any,\n suffix: string,\n): typeof ɵɵtextInterpolate8 {\n const lView = getLView();\n const interpolated = interpolation8(\n lView,\n prefix,\n v0,\n i0,\n v1,\n i1,\n v2,\n i2,\n v3,\n i3,\n v4,\n i4,\n v5,\n i5,\n v6,\n i6,\n v7,\n suffix,\n );\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), interpolated as string);\n }\n return ɵɵtextInterpolate8;\n}\n\n/**\n * Update text content with 9 or more bound values other surrounded by text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolateV(\n * ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n * 'suffix']);\n * ```\n *.\n * @param values The collection of values and the strings in between those values, beginning with\n * a string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n *\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵtextInterpolateV(values: any[]): typeof ɵɵtextInterpolateV {\n const lView = getLView();\n const interpolated = interpolationV(lView, values);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), interpolated as string);\n }\n return ɵɵtextInterpolateV;\n}\n\n/**\n * Updates a text binding at a given index in a given LView.\n */\nfunction textBindingInternal(lView: LView, index: number, value: string): void {\n ngDevMode && assertString(value, 'Value should be a string');\n ngDevMode && assertNotSame(value, NO_CHANGE as any, 'value should not be NO_CHANGE');\n ngDevMode && assertIndexInRange(lView, index);\n const element = getNativeByIndex(index, lView) as any as RText;\n ngDevMode && assertDefined(element, 'native element should exist');\n updateTextNode(lView[RENDERER], element, value);\n}\n","/*!\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {bindingUpdated} from '../bindings';\nimport {SanitizerFn} from '../interfaces/sanitization';\nimport {RENDERER} from '../interfaces/view';\nimport {isWritableSignal, WritableSignal} from '../reactivity/signal';\nimport {getCurrentTNode, getLView, getSelectedTNode, getTView, nextBindingIndex} from '../state';\n\nimport {listenerInternal} from './listener';\nimport {elementPropertyInternal, storePropertyBindingMetadata} from './shared';\n\n/**\n * Update a two-way bound property on a selected element.\n *\n * Operates on the element selected by index via the {@link select} instruction.\n *\n * @param propName Name of property.\n * @param value New value to write.\n * @param sanitizer An optional function used to sanitize the value.\n * @returns This function returns itself so that it may be chained\n * (e.g. `twoWayProperty('name', ctx.name)('title', ctx.title)`)\n *\n * @codeGenApi\n */\nexport function ɵɵtwoWayProperty<T>(\n propName: string,\n value: T | WritableSignal<T>,\n sanitizer?: SanitizerFn | null,\n): typeof ɵɵtwoWayProperty {\n // TODO(crisbeto): perf impact of re-evaluating this on each change detection?\n if (isWritableSignal(value)) {\n value = value();\n }\n\n const lView = getLView();\n const bindingIndex = nextBindingIndex();\n if (bindingUpdated(lView, bindingIndex, value)) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(\n tView,\n tNode,\n lView,\n propName,\n value,\n lView[RENDERER],\n sanitizer,\n false,\n );\n ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, bindingIndex);\n }\n\n return ɵɵtwoWayProperty;\n}\n\n/**\n * Function used inside two-way listeners to conditionally set the value of the bound expression.\n *\n * @param target Field on which to set the value.\n * @param value Value to be set to the field.\n *\n * @codeGenApi\n */\nexport function ɵɵtwoWayBindingSet<T>(target: unknown, value: T): boolean {\n const canWrite = isWritableSignal(target);\n canWrite && target.set(value);\n return canWrite;\n}\n\n/**\n * Adds an event listener that updates a two-way binding to the current node.\n *\n * @param eventName Name of the event.\n * @param listenerFn The function to be called when event emits.\n *\n * @codeGenApi\n */\nexport function ɵɵtwoWayListener(\n eventName: string,\n listenerFn: (e?: any) => any,\n): typeof ɵɵtwoWayListener {\n const lView = getLView<{} | null>();\n const tView = getTView();\n const tNode = getCurrentTNode()!;\n listenerInternal(tView, lView, lView[RENDERER], tNode, eventName, listenerFn);\n return ɵɵtwoWayListener;\n}\n","/*!\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {RuntimeError, RuntimeErrorCode} from '../../errors';\nimport {performanceMarkFeature} from '../../util/performance';\nimport {TNodeType} from '../interfaces/node';\nimport {HEADER_OFFSET} from '../interfaces/view';\nimport {getContextLView, getLView, getSelectedIndex, getTView, setCurrentTNode} from '../state';\nimport {getOrCreateTNode} from '../tnode_manipulation';\nimport {load, store} from '../util/view_utils';\n\n/** Object that indicates the value of a `@let` declaration that hasn't been initialized yet. */\nconst UNINITIALIZED_LET = {};\n\n/**\n * Declares an `@let` at a specific data slot. Returns itself to allow chaining.\n *\n * @param index Index at which to declare the `@let`.\n *\n * @codeGenApi\n */\nexport function ɵɵdeclareLet(index: number): typeof ɵɵdeclareLet {\n const tView = getTView();\n const lView = getLView();\n const adjustedIndex = index + HEADER_OFFSET;\n const tNode = getOrCreateTNode(tView, adjustedIndex, TNodeType.LetDeclaration, null, null);\n setCurrentTNode(tNode, false);\n store(tView, lView, adjustedIndex, UNINITIALIZED_LET);\n return ɵɵdeclareLet;\n}\n\n/**\n * Instruction that stores the value of a `@let` declaration on the current view.\n * Returns the value to allow usage inside variable initializers.\n *\n * @codeGenApi\n */\nexport function ɵɵstoreLet<T>(value: T): T {\n performanceMarkFeature('NgLet');\n const tView = getTView();\n const lView = getLView();\n const index = getSelectedIndex();\n store(tView, lView, index, value);\n return value;\n}\n\n/**\n * Retrieves the value of a `@let` declaration defined in a parent view.\n *\n * @param index Index of the declaration within the view.\n *\n * @codeGenApi\n */\nexport function ɵɵreadContextLet<T>(index: number): T {\n const contextLView = getContextLView();\n const value = load<T>(contextLView, HEADER_OFFSET + index);\n\n if (value === UNINITIALIZED_LET) {\n throw new RuntimeError(\n RuntimeErrorCode.UNINITIALIZED_LET_ACCESS,\n ngDevMode && 'Attempting to access a @let declaration whose value is not available yet',\n );\n }\n\n return value;\n}\n","/*!\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {TNodeType} from '../interfaces/node';\nimport {RElement} from '../interfaces/renderer_dom';\nimport {HEADER_OFFSET, RENDERER} from '../interfaces/view';\nimport {assertTNodeType} from '../node_assert';\nimport {getLView, getTView} from '../state';\nimport {getNativeByIndex, getTNode} from '../util/view_utils';\n\n/**\n * Sets the location within the source template at which\n * each element in the current view was defined.\n *\n * @param index Index at which the DOM node was created.\n * @param templatePath Path to the template at which the node was defined.\n * @param locations Element locations to which to attach the source location.\n *\n * @codeGenApi\n */\nexport function ɵɵattachSourceLocations(\n templatePath: string,\n locations: [index: number, offset: number, line: number, column: number][],\n) {\n const tView = getTView();\n const lView = getLView();\n const renderer = lView[RENDERER];\n const attributeName = 'data-ng-source-location';\n\n for (const [index, offset, line, column] of locations) {\n const tNode = getTNode(tView, index + HEADER_OFFSET);\n // The compiler shouldn't generate the instruction for non-element nodes, but assert just in case.\n ngDevMode && assertTNodeType(tNode, TNodeType.Element);\n const node = getNativeByIndex(index + HEADER_OFFSET, lView) as RElement;\n\n // Set the attribute directly in the DOM so it doesn't participate in directive matching.\n if (!node.hasAttribute(attributeName)) {\n const attributeValue = `${templatePath}@o:${offset},l:${line},c:${column}`;\n renderer.setAttribute(node, attributeName, attributeValue);\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {resolveForwardRef} from '../di/forward_ref';\nimport {InjectFlags, InternalInjectFlags} from '../di/interface/injector';\nimport {ClassProvider, Provider} from '../di/interface/provider';\nimport {isClassProvider, isTypeProvider, SingleProvider} from '../di/provider_collection';\nimport {providerToFactory} from '../di/r3_injector';\nimport {assertDefined} from '../util/assert';\n\nimport {emitProviderConfiguredEvent, runInInjectorProfilerContext} from './debug/injector_profiler';\nimport {\n diPublicInInjector,\n getNodeInjectable,\n getOrCreateNodeInjectorForNode,\n NodeInjector,\n} from './di';\nimport {ɵɵdirectiveInject} from './instructions/all';\nimport {DirectiveDef} from './interfaces/definition';\nimport {NodeInjectorFactory} from './interfaces/injector';\nimport {\n TContainerNode,\n TDirectiveHostNode,\n TElementContainerNode,\n TElementNode,\n TNodeProviderIndexes,\n} from './interfaces/node';\nimport {isComponentDef} from './interfaces/type_checks';\nimport {DestroyHookData, LView, TData, TVIEW, TView} from './interfaces/view';\nimport {getCurrentTNode, getLView, getTView} from './state';\n\n/**\n * Resolves the providers which are defined in the DirectiveDef.\n *\n * When inserting the tokens and the factories in their respective arrays, we can assume that\n * this method is called first for the component (if any), and then for other directives on the same\n * node.\n * As a consequence,the providers are always processed in that order:\n * 1) The view providers of the component\n * 2) The providers of the component\n * 3) The providers of the other directives\n * This matches the structure of the injectables arrays of a view (for each node).\n * So the tokens and the factories can be pushed at the end of the arrays, except\n * in one case for multi providers.\n *\n * @param def the directive definition\n * @param providers: Array of `providers`.\n * @param viewProviders: Array of `viewProviders`.\n */\nexport function providersResolver<T>(\n def: DirectiveDef<T>,\n providers: Provider[],\n viewProviders: Provider[],\n): void {\n const tView = getTView();\n if (tView.firstCreatePass) {\n const isComponent = isComponentDef(def);\n\n // The list of view providers is processed first, and the flags are updated\n resolveProvider(viewProviders, tView.data, tView.blueprint, isComponent, true);\n\n // Then, the list of providers is processed, and the flags are updated\n resolveProvider(providers, tView.data, tView.blueprint, isComponent, false);\n }\n}\n\n/**\n * Resolves a provider and publishes it to the DI system.\n */\nfunction resolveProvider(\n provider: Provider,\n tInjectables: TData,\n lInjectablesBlueprint: NodeInjectorFactory[],\n isComponent: boolean,\n isViewProvider: boolean,\n): void {\n provider = resolveForwardRef(provider);\n if (Array.isArray(provider)) {\n // Recursively call `resolveProvider`\n // Recursion is OK in this case because this code will not be in hot-path once we implement\n // cloning of the initial state.\n for (let i = 0; i < provider.length; i++) {\n resolveProvider(\n provider[i],\n tInjectables,\n lInjectablesBlueprint,\n isComponent,\n isViewProvider,\n );\n }\n } else {\n const tView = getTView();\n const lView = getLView();\n const tNode = getCurrentTNode()!;\n let token: any = isTypeProvider(provider) ? provider : resolveForwardRef(provider.provide);\n\n const providerFactory = providerToFactory(provider);\n if (ngDevMode) {\n const injector = new NodeInjector(\n tNode as TElementNode | TContainerNode | TElementContainerNode,\n lView,\n );\n runInInjectorProfilerContext(injector, token, () => {\n emitProviderConfiguredEvent(provider as SingleProvider, isViewProvider);\n });\n }\n\n const beginIndex = tNode.providerIndexes & TNodeProviderIndexes.ProvidersStartIndexMask;\n const endIndex = tNode.directiveStart;\n const cptViewProvidersCount =\n tNode.providerIndexes >> TNodeProviderIndexes.CptViewProvidersCountShift;\n\n if (isTypeProvider(provider) || !provider.multi) {\n // Single provider case: the factory is created and pushed immediately\n const factory = new NodeInjectorFactory(providerFactory, isViewProvider, ɵɵdirectiveInject);\n const existingFactoryIndex = indexOf(\n token,\n tInjectables,\n isViewProvider ? beginIndex : beginIndex + cptViewProvidersCount,\n endIndex,\n );\n if (existingFactoryIndex === -1) {\n diPublicInInjector(\n getOrCreateNodeInjectorForNode(\n tNode as TElementNode | TContainerNode | TElementContainerNode,\n lView,\n ),\n tView,\n token,\n );\n registerDestroyHooksIfSupported(tView, provider, tInjectables.length);\n tInjectables.push(token);\n tNode.directiveStart++;\n tNode.directiveEnd++;\n if (isViewProvider) {\n tNode.providerIndexes += TNodeProviderIndexes.CptViewProvidersCountShifter;\n }\n lInjectablesBlueprint.push(factory);\n lView.push(factory);\n } else {\n lInjectablesBlueprint[existingFactoryIndex] = factory;\n lView[existingFactoryIndex] = factory;\n }\n } else {\n // Multi provider case:\n // We create a multi factory which is going to aggregate all the values.\n // Since the output of such a factory depends on content or view injection,\n // we create two of them, which are linked together.\n //\n // The first one (for view providers) is always in the first block of the injectables array,\n // and the second one (for providers) is always in the second block.\n // This is important because view providers have higher priority. When a multi token\n // is being looked up, the view providers should be found first.\n // Note that it is not possible to have a multi factory in the third block (directive block).\n //\n // The algorithm to process multi providers is as follows:\n // 1) If the multi provider comes from the `viewProviders` of the component:\n // a) If the special view providers factory doesn't exist, it is created and pushed.\n // b) Else, the multi provider is added to the existing multi factory.\n // 2) If the multi provider comes from the `providers` of the component or of another\n // directive:\n // a) If the multi factory doesn't exist, it is created and provider pushed into it.\n // It is also linked to the multi factory for view providers, if it exists.\n // b) Else, the multi provider is added to the existing multi factory.\n\n const existingProvidersFactoryIndex = indexOf(\n token,\n tInjectables,\n beginIndex + cptViewProvidersCount,\n endIndex,\n );\n const existingViewProvidersFactoryIndex = indexOf(\n token,\n tInjectables,\n beginIndex,\n beginIndex + cptViewProvidersCount,\n );\n const doesProvidersFactoryExist =\n existingProvidersFactoryIndex >= 0 && lInjectablesBlueprint[existingProvidersFactoryIndex];\n const doesViewProvidersFactoryExist =\n existingViewProvidersFactoryIndex >= 0 &&\n lInjectablesBlueprint[existingViewProvidersFactoryIndex];\n\n if (\n (isViewProvider && !doesViewProvidersFactoryExist) ||\n (!isViewProvider && !doesProvidersFactoryExist)\n ) {\n // Cases 1.a and 2.a\n diPublicInInjector(\n getOrCreateNodeInjectorForNode(\n tNode as TElementNode | TContainerNode | TElementContainerNode,\n lView,\n ),\n tView,\n token,\n );\n const factory = multiFactory(\n isViewProvider ? multiViewProvidersFactoryResolver : multiProvidersFactoryResolver,\n lInjectablesBlueprint.length,\n isViewProvider,\n isComponent,\n providerFactory,\n );\n if (!isViewProvider && doesViewProvidersFactoryExist) {\n lInjectablesBlueprint[existingViewProvidersFactoryIndex].providerFactory = factory;\n }\n registerDestroyHooksIfSupported(tView, provider, tInjectables.length, 0);\n tInjectables.push(token);\n tNode.directiveStart++;\n tNode.directiveEnd++;\n if (isViewProvider) {\n tNode.providerIndexes += TNodeProviderIndexes.CptViewProvidersCountShifter;\n }\n lInjectablesBlueprint.push(factory);\n lView.push(factory);\n } else {\n // Cases 1.b and 2.b\n const indexInFactory = multiFactoryAdd(\n lInjectablesBlueprint![\n isViewProvider ? existingViewProvidersFactoryIndex : existingProvidersFactoryIndex\n ],\n providerFactory,\n !isViewProvider && isComponent,\n );\n registerDestroyHooksIfSupported(\n tView,\n provider,\n existingProvidersFactoryIndex > -1\n ? existingProvidersFactoryIndex\n : existingViewProvidersFactoryIndex,\n indexInFactory,\n );\n }\n if (!isViewProvider && isComponent && doesViewProvidersFactoryExist) {\n lInjectablesBlueprint[existingViewProvidersFactoryIndex].componentProviders!++;\n }\n }\n }\n}\n\n/**\n * Registers the `ngOnDestroy` hook of a provider, if the provider supports destroy hooks.\n * @param tView `TView` in which to register the hook.\n * @param provider Provider whose hook should be registered.\n * @param contextIndex Index under which to find the context for the hook when it's being invoked.\n * @param indexInFactory Only required for `multi` providers. Index of the provider in the multi\n * provider factory.\n */\nfunction registerDestroyHooksIfSupported(\n tView: TView,\n provider: Exclude<Provider, any[]>,\n contextIndex: number,\n indexInFactory?: number,\n) {\n const providerIsTypeProvider = isTypeProvider(provider);\n const providerIsClassProvider = isClassProvider(provider);\n\n if (providerIsTypeProvider || providerIsClassProvider) {\n // Resolve forward references as `useClass` can hold a forward reference.\n const classToken = providerIsClassProvider ? resolveForwardRef(provider.useClass) : provider;\n const prototype = classToken.prototype;\n const ngOnDestroy = prototype.ngOnDestroy;\n\n if (ngOnDestroy) {\n const hooks = tView.destroyHooks || (tView.destroyHooks = []);\n\n if (!providerIsTypeProvider && (provider as ClassProvider).multi) {\n ngDevMode &&\n assertDefined(\n indexInFactory,\n 'indexInFactory when registering multi factory destroy hook',\n );\n const existingCallbacksIndex = hooks.indexOf(contextIndex);\n\n if (existingCallbacksIndex === -1) {\n hooks.push(contextIndex, [indexInFactory, ngOnDestroy]);\n } else {\n (hooks[existingCallbacksIndex + 1] as DestroyHookData).push(indexInFactory!, ngOnDestroy);\n }\n } else {\n hooks.push(contextIndex, ngOnDestroy);\n }\n }\n }\n}\n\n/**\n * Add a factory in a multi factory.\n * @returns Index at which the factory was inserted.\n */\nfunction multiFactoryAdd(\n multiFactory: NodeInjectorFactory,\n factory: () => any,\n isComponentProvider: boolean,\n): number {\n if (isComponentProvider) {\n multiFactory.componentProviders!++;\n }\n return multiFactory.multi!.push(factory) - 1;\n}\n\n/**\n * Returns the index of item in the array, but only in the begin to end range.\n */\nfunction indexOf(item: any, arr: any[], begin: number, end: number) {\n for (let i = begin; i < end; i++) {\n if (arr[i] === item) return i;\n }\n return -1;\n}\n\n/**\n * Use this with `multi` `providers`.\n */\nfunction multiProvidersFactoryResolver(\n this: NodeInjectorFactory,\n _: undefined,\n flags: InjectFlags | undefined,\n tData: TData,\n lData: LView,\n tNode: TDirectiveHostNode,\n): any[] {\n return multiResolve(this.multi!, []);\n}\n\n/**\n * Use this with `multi` `viewProviders`.\n *\n * This factory knows how to concatenate itself with the existing `multi` `providers`.\n */\nfunction multiViewProvidersFactoryResolver(\n this: NodeInjectorFactory,\n _: undefined,\n _flags: InjectFlags | undefined,\n _tData: TData,\n lView: LView,\n tNode: TDirectiveHostNode,\n): any[] {\n const factories = this.multi!;\n let result: any[];\n if (this.providerFactory) {\n const componentCount = this.providerFactory.componentProviders!;\n const multiProviders = getNodeInjectable(\n lView,\n lView[TVIEW],\n this.providerFactory!.index!,\n tNode,\n );\n // Copy the section of the array which contains `multi` `providers` from the component\n result = multiProviders.slice(0, componentCount);\n // Insert the `viewProvider` instances.\n multiResolve(factories, result);\n // Copy the section of the array which contains `multi` `providers` from other directives\n for (let i = componentCount; i < multiProviders.length; i++) {\n result.push(multiProviders[i]);\n }\n } else {\n result = [];\n // Insert the `viewProvider` instances.\n multiResolve(factories, result);\n }\n return result;\n}\n\n/**\n * Maps an array of factories into an array of values.\n */\nfunction multiResolve(factories: Array<() => any>, result: any[]): any[] {\n for (let i = 0; i < factories.length; i++) {\n const factory = factories[i]! as () => null;\n result.push(factory());\n }\n return result;\n}\n\n/**\n * Creates a multi factory.\n */\nfunction multiFactory(\n factoryFn: (\n this: NodeInjectorFactory,\n _: undefined,\n flags: InjectFlags | undefined,\n tData: TData,\n lData: LView,\n tNode: TDirectiveHostNode,\n ) => any,\n index: number,\n isViewProvider: boolean,\n isComponent: boolean,\n f: () => any,\n): NodeInjectorFactory {\n const factory = new NodeInjectorFactory(factoryFn, isViewProvider, ɵɵdirectiveInject);\n factory.multi = [];\n factory.index = index;\n factory.componentProviders = 0;\n multiFactoryAdd(factory, f, isComponent && !isViewProvider);\n return factory;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport {ProcessProvidersFunction, Provider} from '../../di/interface/provider';\nimport {providersResolver} from '../di_setup';\nimport {DirectiveDef} from '../interfaces/definition';\n\n/**\n * This feature resolves the providers of a directive (or component),\n * and publish them into the DI system, making it visible to others for injection.\n *\n * For example:\n * ```ts\n * class ComponentWithProviders {\n * constructor(private greeter: GreeterDE) {}\n *\n * static ɵcmp = defineComponent({\n * type: ComponentWithProviders,\n * selectors: [['component-with-providers']],\n * factory: () => new ComponentWithProviders(directiveInject(GreeterDE as any)),\n * decls: 1,\n * vars: 1,\n * template: function(fs: RenderFlags, ctx: ComponentWithProviders) {\n * if (fs & RenderFlags.Create) {\n * ɵɵtext(0);\n * }\n * if (fs & RenderFlags.Update) {\n * ɵɵtextInterpolate(ctx.greeter.greet());\n * }\n * },\n * features: [ɵɵProvidersFeature([GreeterDE])]\n * });\n * }\n * ```\n *\n * @param definition\n *\n * @codeGenApi\n */\nexport function ɵɵProvidersFeature<T>(providers: Provider[], viewProviders: Provider[] = []) {\n return (definition: DirectiveDef<T>) => {\n definition.providersResolver = (\n def: DirectiveDef<T>,\n processProvidersFn?: ProcessProvidersFunction,\n ) => {\n return providersResolver(\n def, //\n processProvidersFn ? processProvidersFn(providers) : providers, //\n viewProviders,\n );\n };\n };\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ComponentDef, ComponentDefFeature} from '../interfaces/definition';\n\n/**\n * A feature that adds support for external runtime styles for a component.\n * An external runtime style is a URL to a CSS stylesheet that contains the styles\n * for a given component. For browsers, this URL will be used in an appended `link` element\n * when the component is rendered. This feature is typically used for Hot Module Replacement\n * (HMR) of component stylesheets by leveraging preexisting global stylesheet HMR available\n * in most development servers.\n *\n * @codeGenApi\n */\nexport function ɵɵExternalStylesFeature(styleUrls: string[]): ComponentDefFeature {\n return (definition: ComponentDef<unknown>) => {\n if (styleUrls.length < 1) {\n return;\n }\n\n definition.getExternalStyles = (encapsulationId) => {\n // Add encapsulation ID search parameter `ngcomp` to support external style encapsulation as well as the encapsulation mode\n // for usage tracking.\n const urls = styleUrls.map(\n (value) =>\n value +\n '?ngcomp' +\n (encapsulationId ? '=' + encodeURIComponent(encapsulationId) : '') +\n '&e=' +\n definition.encapsulation,\n );\n\n return urls;\n };\n };\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {isForwardRef, resolveForwardRef} from '../di/forward_ref';\nimport {Type} from '../interface/type';\nimport {flatten} from '../util/array_utils';\nimport {noSideEffects} from '../util/closure';\nimport {EMPTY_ARRAY} from '../util/empty';\nimport {getNgModuleDef} from './def_getters';\n\nimport {extractDefListOrFactory} from './definition';\nimport {depsTracker} from './deps_tracker/deps_tracker';\nimport {\n ComponentDef,\n ComponentType,\n NgModuleScopeInfoFromDecorator,\n RawScopeInfoFromDecorator,\n} from './interfaces/definition';\nimport {isModuleWithProviders} from './jit/util';\n\n/**\n * Generated next to NgModules to monkey-patch directive and pipe references onto a component's\n * definition, when generating a direct reference in the component file would otherwise create an\n * import cycle.\n *\n * See [this explanation](https://hackmd.io/Odw80D0pR6yfsOjg_7XCJg?view) for more details.\n *\n * @codeGenApi\n */\nexport function ɵɵsetComponentScope(\n type: ComponentType<any>,\n directives: Type<any>[] | (() => Type<any>[]),\n pipes: Type<any>[] | (() => Type<any>[]),\n): void {\n const def = type.ɵcmp as ComponentDef<any>;\n def.directiveDefs = extractDefListOrFactory(directives, /* pipeDef */ false);\n def.pipeDefs = extractDefListOrFactory(pipes, /* pipeDef */ true);\n}\n\n/**\n * Adds the module metadata that is necessary to compute the module's transitive scope to an\n * existing module definition.\n *\n * Scope metadata of modules is not used in production builds, so calls to this function can be\n * marked pure to tree-shake it from the bundle, allowing for all referenced declarations\n * to become eligible for tree-shaking as well.\n *\n * @codeGenApi\n */\nexport function ɵɵsetNgModuleScope(type: any, scope: NgModuleScopeInfoFromDecorator): unknown {\n return noSideEffects(() => {\n const ngModuleDef = getNgModuleDef(type, true);\n ngModuleDef.declarations = convertToTypeArray(scope.declarations || EMPTY_ARRAY);\n ngModuleDef.imports = convertToTypeArray(scope.imports || EMPTY_ARRAY);\n ngModuleDef.exports = convertToTypeArray(scope.exports || EMPTY_ARRAY);\n\n if (scope.bootstrap) {\n // This only happens in local compilation mode.\n ngModuleDef.bootstrap = convertToTypeArray(scope.bootstrap);\n }\n\n depsTracker.registerNgModule(type, scope);\n });\n}\n\nfunction convertToTypeArray(\n values: Type<any>[] | (() => Type<any>[]) | RawScopeInfoFromDecorator[],\n): Type<any>[] | (() => Type<any>[]) {\n if (typeof values === 'function') {\n return values;\n }\n\n const flattenValues = flatten(values);\n\n if (flattenValues.some(isForwardRef)) {\n return () => flattenValues.map(resolveForwardRef).map(maybeUnwrapModuleWithProviders);\n } else {\n return flattenValues.map(maybeUnwrapModuleWithProviders);\n }\n}\n\nfunction maybeUnwrapModuleWithProviders(value: any): Type<any> {\n return isModuleWithProviders(value) ? value.ngModule : (value as Type<any>);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {assertIndexInRange} from '../util/assert';\nimport {\n bindingUpdated,\n bindingUpdated2,\n bindingUpdated3,\n bindingUpdated4,\n getBinding,\n updateBinding,\n} from './bindings';\nimport {LView} from './interfaces/view';\nimport {getBindingRoot, getLView} from './state';\nimport {NO_CHANGE} from './tokens';\n\n/**\n * Bindings for pure functions are stored after regular bindings.\n *\n * |-------decls------|---------vars---------| |----- hostVars (dir1) ------|\n * ------------------------------------------------------------------------------------------\n * | nodes/refs/pipes | bindings | fn slots | injector | dir1 | host bindings | host slots |\n * ------------------------------------------------------------------------------------------\n * ^ ^\n * TView.bindingStartIndex TView.expandoStartIndex\n *\n * Pure function instructions are given an offset from the binding root. Adding the offset to the\n * binding root gives the first index where the bindings are stored. In component views, the binding\n * root is the bindingStartIndex. In host bindings, the binding root is the expandoStartIndex +\n * any directive instances + any hostVars in directives evaluated before it.\n *\n * See VIEW_DATA.md for more information about host binding resolution.\n */\n\n/**\n * If the value hasn't been saved, calls the pure function to store and return the\n * value. If it has been saved, returns the saved value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn Function that returns a value\n * @param thisArg Optional calling context of pureFn\n * @returns value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunction0<T>(slotOffset: number, pureFn: () => T, thisArg?: any): T {\n const bindingIndex = getBindingRoot() + slotOffset;\n const lView = getLView();\n return lView[bindingIndex] === NO_CHANGE\n ? updateBinding(lView, bindingIndex, thisArg ? pureFn.call(thisArg) : pureFn())\n : getBinding(lView, bindingIndex);\n}\n\n/**\n * If the value of the provided exp has changed, calls the pure function to return\n * an updated value. Or if the value has not changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn Function that returns an updated value\n * @param exp Updated expression value\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunction1(\n slotOffset: number,\n pureFn: (v: any) => any,\n exp: any,\n thisArg?: any,\n): any {\n return pureFunction1Internal(getLView(), getBindingRoot(), slotOffset, pureFn, exp, thisArg);\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunction2(\n slotOffset: number,\n pureFn: (v1: any, v2: any) => any,\n exp1: any,\n exp2: any,\n thisArg?: any,\n): any {\n return pureFunction2Internal(\n getLView(),\n getBindingRoot(),\n slotOffset,\n pureFn,\n exp1,\n exp2,\n thisArg,\n );\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunction3(\n slotOffset: number,\n pureFn: (v1: any, v2: any, v3: any) => any,\n exp1: any,\n exp2: any,\n exp3: any,\n thisArg?: any,\n): any {\n return pureFunction3Internal(\n getLView(),\n getBindingRoot(),\n slotOffset,\n pureFn,\n exp1,\n exp2,\n exp3,\n thisArg,\n );\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunction4(\n slotOffset: number,\n pureFn: (v1: any, v2: any, v3: any, v4: any) => any,\n exp1: any,\n exp2: any,\n exp3: any,\n exp4: any,\n thisArg?: any,\n): any {\n return pureFunction4Internal(\n getLView(),\n getBindingRoot(),\n slotOffset,\n pureFn,\n exp1,\n exp2,\n exp3,\n exp4,\n thisArg,\n );\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunction5(\n slotOffset: number,\n pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any) => any,\n exp1: any,\n exp2: any,\n exp3: any,\n exp4: any,\n exp5: any,\n thisArg?: any,\n): any {\n const bindingIndex = getBindingRoot() + slotOffset;\n const lView = getLView();\n const different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n return bindingUpdated(lView, bindingIndex + 4, exp5) || different\n ? updateBinding(\n lView,\n bindingIndex + 5,\n thisArg\n ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5)\n : pureFn(exp1, exp2, exp3, exp4, exp5),\n )\n : getBinding(lView, bindingIndex + 5);\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param exp6\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunction6(\n slotOffset: number,\n pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any, v6: any) => any,\n exp1: any,\n exp2: any,\n exp3: any,\n exp4: any,\n exp5: any,\n exp6: any,\n thisArg?: any,\n): any {\n const bindingIndex = getBindingRoot() + slotOffset;\n const lView = getLView();\n const different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n return bindingUpdated2(lView, bindingIndex + 4, exp5, exp6) || different\n ? updateBinding(\n lView,\n bindingIndex + 6,\n thisArg\n ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6)\n : pureFn(exp1, exp2, exp3, exp4, exp5, exp6),\n )\n : getBinding(lView, bindingIndex + 6);\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param exp6\n * @param exp7\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunction7(\n slotOffset: number,\n pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any, v6: any, v7: any) => any,\n exp1: any,\n exp2: any,\n exp3: any,\n exp4: any,\n exp5: any,\n exp6: any,\n exp7: any,\n thisArg?: any,\n): any {\n const bindingIndex = getBindingRoot() + slotOffset;\n const lView = getLView();\n let different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n return bindingUpdated3(lView, bindingIndex + 4, exp5, exp6, exp7) || different\n ? updateBinding(\n lView,\n bindingIndex + 7,\n thisArg\n ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6, exp7)\n : pureFn(exp1, exp2, exp3, exp4, exp5, exp6, exp7),\n )\n : getBinding(lView, bindingIndex + 7);\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param exp6\n * @param exp7\n * @param exp8\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunction8(\n slotOffset: number,\n pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any, v6: any, v7: any, v8: any) => any,\n exp1: any,\n exp2: any,\n exp3: any,\n exp4: any,\n exp5: any,\n exp6: any,\n exp7: any,\n exp8: any,\n thisArg?: any,\n): any {\n const bindingIndex = getBindingRoot() + slotOffset;\n const lView = getLView();\n const different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n return bindingUpdated4(lView, bindingIndex + 4, exp5, exp6, exp7, exp8) || different\n ? updateBinding(\n lView,\n bindingIndex + 8,\n thisArg\n ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8)\n : pureFn(exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8),\n )\n : getBinding(lView, bindingIndex + 8);\n}\n\n/**\n * pureFunction instruction that can support any number of bindings.\n *\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn A pure function that takes binding values and builds an object or array\n * containing those values.\n * @param exps An array of binding values\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunctionV(\n slotOffset: number,\n pureFn: (...v: any[]) => any,\n exps: any[],\n thisArg?: any,\n): any {\n return pureFunctionVInternal(getLView(), getBindingRoot(), slotOffset, pureFn, exps, thisArg);\n}\n\n/**\n * Results of a pure function invocation are stored in LView in a dedicated slot that is initialized\n * to NO_CHANGE. In rare situations a pure pipe might throw an exception on the very first\n * invocation and not produce any valid results. In this case LView would keep holding the NO_CHANGE\n * value. The NO_CHANGE is not something that we can use in expressions / bindings thus we convert\n * it to `undefined`.\n */\nfunction getPureFunctionReturnValue(lView: LView, returnValueIndex: number) {\n ngDevMode && assertIndexInRange(lView, returnValueIndex);\n const lastReturnValue = lView[returnValueIndex];\n return lastReturnValue === NO_CHANGE ? undefined : lastReturnValue;\n}\n\n/**\n * If the value of the provided exp has changed, calls the pure function to return\n * an updated value. Or if the value has not changed, returns cached value.\n *\n * @param lView LView in which the function is being executed.\n * @param bindingRoot Binding root index.\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn Function that returns an updated value\n * @param exp Updated expression value\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n */\nexport function pureFunction1Internal(\n lView: LView,\n bindingRoot: number,\n slotOffset: number,\n pureFn: (v: any) => any,\n exp: any,\n thisArg?: any,\n): any {\n const bindingIndex = bindingRoot + slotOffset;\n return bindingUpdated(lView, bindingIndex, exp)\n ? updateBinding(lView, bindingIndex + 1, thisArg ? pureFn.call(thisArg, exp) : pureFn(exp))\n : getPureFunctionReturnValue(lView, bindingIndex + 1);\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param lView LView in which the function is being executed.\n * @param bindingRoot Binding root index.\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n */\nexport function pureFunction2Internal(\n lView: LView,\n bindingRoot: number,\n slotOffset: number,\n pureFn: (v1: any, v2: any) => any,\n exp1: any,\n exp2: any,\n thisArg?: any,\n): any {\n const bindingIndex = bindingRoot + slotOffset;\n return bindingUpdated2(lView, bindingIndex, exp1, exp2)\n ? updateBinding(\n lView,\n bindingIndex + 2,\n thisArg ? pureFn.call(thisArg, exp1, exp2) : pureFn(exp1, exp2),\n )\n : getPureFunctionReturnValue(lView, bindingIndex + 2);\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param lView LView in which the function is being executed.\n * @param bindingRoot Binding root index.\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n */\nexport function pureFunction3Internal(\n lView: LView,\n bindingRoot: number,\n slotOffset: number,\n pureFn: (v1: any, v2: any, v3: any) => any,\n exp1: any,\n exp2: any,\n exp3: any,\n thisArg?: any,\n): any {\n const bindingIndex = bindingRoot + slotOffset;\n return bindingUpdated3(lView, bindingIndex, exp1, exp2, exp3)\n ? updateBinding(\n lView,\n bindingIndex + 3,\n thisArg ? pureFn.call(thisArg, exp1, exp2, exp3) : pureFn(exp1, exp2, exp3),\n )\n : getPureFunctionReturnValue(lView, bindingIndex + 3);\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param lView LView in which the function is being executed.\n * @param bindingRoot Binding root index.\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n */\nexport function pureFunction4Internal(\n lView: LView,\n bindingRoot: number,\n slotOffset: number,\n pureFn: (v1: any, v2: any, v3: any, v4: any) => any,\n exp1: any,\n exp2: any,\n exp3: any,\n exp4: any,\n thisArg?: any,\n): any {\n const bindingIndex = bindingRoot + slotOffset;\n return bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4)\n ? updateBinding(\n lView,\n bindingIndex + 4,\n thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4) : pureFn(exp1, exp2, exp3, exp4),\n )\n : getPureFunctionReturnValue(lView, bindingIndex + 4);\n}\n\n/**\n * pureFunction instruction that can support any number of bindings.\n *\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param lView LView in which the function is being executed.\n * @param bindingRoot Binding root index.\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn A pure function that takes binding values and builds an object or array\n * containing those values.\n * @param exps An array of binding values\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n */\nexport function pureFunctionVInternal(\n lView: LView,\n bindingRoot: number,\n slotOffset: number,\n pureFn: (...v: any[]) => any,\n exps: any[],\n thisArg?: any,\n): any {\n let bindingIndex = bindingRoot + slotOffset;\n let different = false;\n for (let i = 0; i < exps.length; i++) {\n bindingUpdated(lView, bindingIndex++, exps[i]) && (different = true);\n }\n return different\n ? updateBinding(lView, bindingIndex, pureFn.apply(thisArg, exps))\n : getPureFunctionReturnValue(lView, bindingIndex);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {PipeTransform} from '../change_detection/pipe_transform';\nimport {setInjectImplementation} from '../di/inject_switch';\nimport {formatRuntimeError, RuntimeError, RuntimeErrorCode} from '../errors';\nimport {Type} from '../interface/type';\n\nimport {InjectorProfilerContext, setInjectorProfilerContext} from './debug/injector_profiler';\nimport {getFactoryDef} from './definition_factory';\nimport {NodeInjector, setIncludeViewProviders} from './di';\nimport {ɵɵdirectiveInject} from './instructions/all';\nimport {isHostComponentStandalone} from './instructions/element_validation';\nimport {PipeDef, PipeDefList} from './interfaces/definition';\nimport {TTextNode} from './interfaces/node';\nimport {CONTEXT, DECLARATION_COMPONENT_VIEW, HEADER_OFFSET, LView, TVIEW} from './interfaces/view';\nimport {\n pureFunction1Internal,\n pureFunction2Internal,\n pureFunction3Internal,\n pureFunction4Internal,\n pureFunctionVInternal,\n} from './pure_function';\nimport {getBindingRoot, getCurrentTNode, getLView, getTView} from './state';\nimport {load, store} from './util/view_utils';\n\n/**\n * Create a pipe.\n *\n * @param index Pipe index where the pipe will be stored.\n * @param pipeName The name of the pipe\n * @returns T the instance of the pipe.\n *\n * @codeGenApi\n */\nexport function ɵɵpipe(index: number, pipeName: string): any {\n const tView = getTView();\n let pipeDef: PipeDef<any>;\n const adjustedIndex = index + HEADER_OFFSET;\n\n if (tView.firstCreatePass) {\n // The `getPipeDef` throws if a pipe with a given name is not found\n // (so we use non-null assertion below).\n pipeDef = getPipeDef(pipeName, tView.pipeRegistry)!;\n tView.data[adjustedIndex] = pipeDef;\n if (pipeDef.onDestroy) {\n (tView.destroyHooks ??= []).push(adjustedIndex, pipeDef.onDestroy);\n }\n } else {\n pipeDef = tView.data[adjustedIndex] as PipeDef<any>;\n }\n\n const pipeFactory = pipeDef.factory || (pipeDef.factory = getFactoryDef(pipeDef.type, true));\n\n let previousInjectorProfilerContext: InjectorProfilerContext;\n if (ngDevMode) {\n previousInjectorProfilerContext = setInjectorProfilerContext({\n injector: new NodeInjector(getCurrentTNode() as TTextNode, getLView()),\n token: pipeDef.type,\n });\n }\n const previousInjectImplementation = setInjectImplementation(ɵɵdirectiveInject);\n try {\n // DI for pipes is supposed to behave like directives when placed on a component\n // host node, which means that we have to disable access to `viewProviders`.\n const previousIncludeViewProviders = setIncludeViewProviders(false);\n const pipeInstance = pipeFactory();\n setIncludeViewProviders(previousIncludeViewProviders);\n store(tView, getLView(), adjustedIndex, pipeInstance);\n return pipeInstance;\n } finally {\n // we have to restore the injector implementation in finally, just in case the creation of the\n // pipe throws an error.\n setInjectImplementation(previousInjectImplementation);\n ngDevMode && setInjectorProfilerContext(previousInjectorProfilerContext!);\n }\n}\n\n/**\n * Searches the pipe registry for a pipe with the given name. If one is found,\n * returns the pipe. Otherwise, an error is thrown because the pipe cannot be resolved.\n *\n * @param name Name of pipe to resolve\n * @param registry Full list of available pipes\n * @returns Matching PipeDef\n */\nfunction getPipeDef(name: string, registry: PipeDefList | null): PipeDef<any> | undefined {\n if (registry) {\n if (ngDevMode) {\n const pipes = registry.filter((pipe) => pipe.name === name);\n // TODO: Throw an error in the next major\n if (pipes.length > 1) {\n console.warn(\n formatRuntimeError(\n RuntimeErrorCode.MULTIPLE_MATCHING_PIPES,\n getMultipleMatchingPipesMessage(name),\n ),\n );\n }\n }\n for (let i = registry.length - 1; i >= 0; i--) {\n const pipeDef = registry[i];\n if (name === pipeDef.name) {\n return pipeDef;\n }\n }\n }\n if (ngDevMode) {\n throw new RuntimeError(RuntimeErrorCode.PIPE_NOT_FOUND, getPipeNotFoundErrorMessage(name));\n }\n return;\n}\n\n/**\n * Generates a helpful error message for the user when multiple pipes match the name.\n *\n * @param name Name of the pipe\n * @returns The error message\n */\nfunction getMultipleMatchingPipesMessage(name: string) {\n const lView = getLView();\n const declarationLView = lView[DECLARATION_COMPONENT_VIEW] as LView<Type<unknown>>;\n const context = declarationLView[CONTEXT];\n const hostIsStandalone = isHostComponentStandalone(lView);\n const componentInfoMessage = context ? ` in the '${context.constructor.name}' component` : '';\n const verifyMessage = `check ${\n hostIsStandalone ? \"'@Component.imports' of this component\" : 'the imports of this module'\n }`;\n const errorMessage = `Multiple pipes match the name \\`${name}\\`${componentInfoMessage}. ${verifyMessage}`;\n return errorMessage;\n}\n\n/**\n * Generates a helpful error message for the user when a pipe is not found.\n *\n * @param name Name of the missing pipe\n * @returns The error message\n */\nfunction getPipeNotFoundErrorMessage(name: string) {\n const lView = getLView();\n const declarationLView = lView[DECLARATION_COMPONENT_VIEW] as LView<Type<unknown>>;\n const context = declarationLView[CONTEXT];\n const hostIsStandalone = isHostComponentStandalone(lView);\n const componentInfoMessage = context ? ` in the '${context.constructor.name}' component` : '';\n const verifyMessage = `Verify that it is ${\n hostIsStandalone\n ? \"included in the '@Component.imports' of this component\"\n : 'declared or imported in this module'\n }`;\n const errorMessage = `The pipe '${name}' could not be found${componentInfoMessage}. ${verifyMessage}`;\n return errorMessage;\n}\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 offset the binding offset\n * @param v1 1st argument to {@link PipeTransform#transform}.\n *\n * @codeGenApi\n */\nexport function ɵɵpipeBind1(index: number, offset: number, v1: any): any {\n const adjustedIndex = index + HEADER_OFFSET;\n const lView = getLView();\n const pipeInstance = load<PipeTransform>(lView, adjustedIndex);\n return isPure(lView, adjustedIndex)\n ? pureFunction1Internal(\n lView,\n getBindingRoot(),\n offset,\n pipeInstance.transform,\n v1,\n pipeInstance,\n )\n : pipeInstance.transform(v1);\n}\n\n/**\n * Invokes a pipe with 2 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param v1 1st argument to {@link PipeTransform#transform}.\n * @param v2 2nd argument to {@link PipeTransform#transform}.\n *\n * @codeGenApi\n */\nexport function ɵɵpipeBind2(index: number, slotOffset: number, v1: any, v2: any): any {\n const adjustedIndex = index + HEADER_OFFSET;\n const lView = getLView();\n const pipeInstance = load<PipeTransform>(lView, adjustedIndex);\n return isPure(lView, adjustedIndex)\n ? pureFunction2Internal(\n lView,\n getBindingRoot(),\n slotOffset,\n pipeInstance.transform,\n v1,\n v2,\n pipeInstance,\n )\n : pipeInstance.transform(v1, v2);\n}\n\n/**\n * Invokes a pipe with 3 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param v1 1st argument to {@link PipeTransform#transform}.\n * @param v2 2nd argument to {@link PipeTransform#transform}.\n * @param v3 4rd argument to {@link PipeTransform#transform}.\n *\n * @codeGenApi\n */\nexport function ɵɵpipeBind3(index: number, slotOffset: number, v1: any, v2: any, v3: any): any {\n const adjustedIndex = index + HEADER_OFFSET;\n const lView = getLView();\n const pipeInstance = load<PipeTransform>(lView, adjustedIndex);\n return isPure(lView, adjustedIndex)\n ? pureFunction3Internal(\n lView,\n getBindingRoot(),\n slotOffset,\n pipeInstance.transform,\n v1,\n v2,\n v3,\n pipeInstance,\n )\n : pipeInstance.transform(v1, v2, v3);\n}\n\n/**\n * Invokes a pipe with 4 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param v1 1st argument to {@link PipeTransform#transform}.\n * @param v2 2nd argument to {@link PipeTransform#transform}.\n * @param v3 3rd argument to {@link PipeTransform#transform}.\n * @param v4 4th argument to {@link PipeTransform#transform}.\n *\n * @codeGenApi\n */\nexport function ɵɵpipeBind4(\n index: number,\n slotOffset: number,\n v1: any,\n v2: any,\n v3: any,\n v4: any,\n): any {\n const adjustedIndex = index + HEADER_OFFSET;\n const lView = getLView();\n const pipeInstance = load<PipeTransform>(lView, adjustedIndex);\n return isPure(lView, adjustedIndex)\n ? pureFunction4Internal(\n lView,\n getBindingRoot(),\n slotOffset,\n pipeInstance.transform,\n v1,\n v2,\n v3,\n v4,\n pipeInstance,\n )\n : pipeInstance.transform(v1, v2, v3, v4);\n}\n\n/**\n * Invokes a pipe with variable number of arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param values Array of arguments to pass to {@link PipeTransform#transform} method.\n *\n * @codeGenApi\n */\nexport function ɵɵpipeBindV(index: number, slotOffset: number, values: [any, ...any[]]): any {\n const adjustedIndex = index + HEADER_OFFSET;\n const lView = getLView();\n const pipeInstance = load<PipeTransform>(lView, adjustedIndex);\n return isPure(lView, adjustedIndex)\n ? pureFunctionVInternal(\n lView,\n getBindingRoot(),\n slotOffset,\n pipeInstance.transform,\n values,\n pipeInstance,\n )\n : pipeInstance.transform.apply(pipeInstance, values);\n}\n\nfunction isPure(lView: LView, index: number): boolean {\n return (<PipeDef<any>>lView[TVIEW].data[index]).pure;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {createTemplateRef, TemplateRef} from '../linker/template_ref';\nimport {TNode} from './interfaces/node';\nimport {LView} from './interfaces/view';\n\n/**\n * Retrieves `TemplateRef` instance from `Injector` when a local reference is placed on the\n * `<ng-template>` element.\n *\n * @codeGenApi\n */\nexport function ɵɵtemplateRefExtractor(tNode: TNode, lView: LView): TemplateRef<any> | null {\n return createTemplateRef(tNode, lView);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {depsTracker} from './deps_tracker/deps_tracker';\nimport {\n ComponentType,\n DependencyTypeList,\n RawScopeInfoFromDecorator,\n} from './interfaces/definition';\n\nexport function ɵɵgetComponentDepsFactory(\n type: ComponentType<any>,\n rawImports?: RawScopeInfoFromDecorator[],\n): () => DependencyTypeList {\n return () => {\n try {\n return depsTracker.getComponentDependencies(type, rawImports).dependencies;\n } catch (e) {\n console.error(\n `Computing dependencies in local compilation mode for the component \"${type.name}\" failed with the exception:`,\n e,\n );\n throw e;\n }\n };\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Type} from '../../interface/type';\nimport {getComponentDef} from '../def_getters';\nimport {ClassDebugInfo} from '../interfaces/definition';\n\n/**\n * Sets the debug info for an Angular class.\n *\n * This runtime is guarded by ngDevMode flag.\n */\nexport function ɵsetClassDebugInfo(type: Type<any>, debugInfo: ClassDebugInfo): void {\n const def = getComponentDef(type);\n if (def !== null) {\n def.debugInfo = debugInfo;\n }\n}\n","/*!\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Type} from '../interface/type';\nimport {assertDefined, assertEqual, assertNotEqual} from '../util/assert';\nimport {assertLView} from './assert';\nimport {getComponentDef} from './def_getters';\nimport {assertComponentDef} from './errors';\nimport {refreshView} from './instructions/change_detection';\nimport {renderView} from './instructions/render';\nimport {CONTAINER_HEADER_OFFSET} from './interfaces/container';\nimport {ComponentDef} from './interfaces/definition';\nimport {getTrackedLViews} from './interfaces/lview_tracking';\nimport {isTNodeShape, TElementNode, TNodeFlags, TNodeType} from './interfaces/node';\nimport {isLContainer, isLView, isRootView} from './interfaces/type_checks';\nimport {\n CHILD_HEAD,\n CHILD_TAIL,\n CONTEXT,\n ENVIRONMENT,\n HEADER_OFFSET,\n HOST,\n INJECTOR,\n LView,\n NEXT,\n PARENT,\n RENDERER,\n T_HOST,\n TVIEW,\n} from './interfaces/view';\nimport {assertTNodeType} from './node_assert';\nimport {destroyLView, removeViewFromDOM} from './node_manipulation';\nimport {RendererFactory} from './interfaces/renderer';\nimport {NgZone} from '../zone';\nimport {ViewEncapsulation} from '../metadata/view';\nimport {NG_COMP_DEF} from './fields';\nimport {\n createLView,\n getInitialLViewFlagsFromDef,\n getOrCreateComponentTView,\n} from './view/construction';\n\n/** Represents `import.meta` plus some information that's not in the built-in types. */\ntype ImportMetaExtended = ImportMeta & {\n hot?: {\n send?: (name: string, payload: unknown) => void;\n };\n};\n\n/**\n * Gets the URL from which the client will fetch a new version of a component's metadata so it\n * can be replaced during hot module reloading.\n * @param id Unique ID for the component, generated during compile time.\n * @param timestamp Time at which the request happened.\n * @param base Base URL against which to resolve relative paths.\n * @codeGenApi\n */\nexport function ɵɵgetReplaceMetadataURL(id: string, timestamp: string, base: string): string {\n const url = `./@ng/component?c=${id}&t=${encodeURIComponent(timestamp)}`;\n return new URL(url, base).href;\n}\n\n/**\n * Replaces the metadata of a component type and re-renders all live instances of the component.\n * @param type Class whose metadata will be replaced.\n * @param applyMetadata Callback that will apply a new set of metadata on the `type` when invoked.\n * @param environment Syntehtic namespace imports that need to be passed along to the callback.\n * @param locals Local symbols from the source location that have to be exposed to the callback.\n * @param importMeta `import.meta` from the call site of the replacement function. Optional since\n * it isn't used internally.\n * @param id ID to the class being replaced. **Not** the same as the component definition ID.\n * Optional since the ID might not be available internally.\n * @codeGenApi\n */\nexport function ɵɵreplaceMetadata(\n type: Type<unknown>,\n applyMetadata: (...args: [Type<unknown>, unknown[], ...unknown[]]) => void,\n namespaces: unknown[],\n locals: unknown[],\n importMeta: ImportMetaExtended | null = null,\n id: string | null = null,\n) {\n ngDevMode && assertComponentDef(type);\n const currentDef = getComponentDef(type)!;\n\n // The reason `applyMetadata` is a callback that is invoked (almost) immediately is because\n // the compiler usually produces more code than just the component definition, e.g. there\n // can be functions for embedded views, the variables for the constant pool and `setClassMetadata`\n // calls. The callback allows us to keep them isolate from the rest of the app and to invoke\n // them at the right time.\n applyMetadata.apply(null, [type, namespaces, ...locals]);\n\n const {newDef, oldDef} = mergeWithExistingDefinition(currentDef, getComponentDef(type)!);\n\n // TODO(crisbeto): the `applyMetadata` call above will replace the definition on the type.\n // Ideally we should adjust the compiler output so the metadata is returned, however that'll\n // require some internal changes. We re-add the metadata here manually.\n (type as any)[NG_COMP_DEF] = newDef;\n\n // If a `tView` hasn't been created yet, it means that this component hasn't been instantianted\n // before. In this case there's nothing left for us to do aside from patching it in.\n if (oldDef.tView) {\n const trackedViews = getTrackedLViews().values();\n for (const root of trackedViews) {\n // Note: we have the additional check, because `IsRoot` can also indicate\n // a component created through something like `createComponent`.\n if (isRootView(root) && root[PARENT] === null) {\n recreateMatchingLViews(importMeta, id, newDef, oldDef, root);\n }\n }\n }\n}\n\n/**\n * Merges two component definitions while preseving the original one in place.\n * @param currentDef Definition that should receive the new metadata.\n * @param newDef Source of the new metadata.\n */\nfunction mergeWithExistingDefinition(\n currentDef: ComponentDef<unknown>,\n newDef: ComponentDef<unknown>,\n) {\n // Clone the current definition since we reference its original data further\n // down in the replacement process (e.g. when destroying the renderer).\n const clone = {...currentDef};\n\n // Assign the new metadata in place while preserving the object literal. It's important to\n // Keep the object in place, because there can be references to it, for example in the\n // `directiveDefs` of another definition.\n const replacement = Object.assign(currentDef, newDef, {\n // We need to keep the existing directive and pipe defs, because they can get patched on\n // by a call to `setComponentScope` from a module file. That call won't make it into the\n // HMR replacement function, because it lives in an entirely different file.\n directiveDefs: clone.directiveDefs,\n pipeDefs: clone.pipeDefs,\n\n // Preserve the old `setInput` function, because it has some state.\n // This is fine, because the component instance is preserved as well.\n setInput: clone.setInput,\n\n // Externally this is redundant since we redeclare the definition using the original type.\n // Internally we may receive a definition with an alternate, but identical, type so we have\n // to ensure that the original one is preserved.\n type: clone.type,\n });\n\n ngDevMode && assertEqual(replacement, currentDef, 'Expected definition to be merged in place');\n return {newDef: replacement, oldDef: clone};\n}\n\n/**\n * Finds all LViews matching a specific component definition and recreates them.\n * @param importMeta `import.meta` information.\n * @param id HMR ID of the component.\n * @param oldDef Component definition to search for.\n * @param rootLView View from which to start the search.\n */\nfunction recreateMatchingLViews(\n importMeta: ImportMetaExtended | null,\n id: string | null,\n newDef: ComponentDef<unknown>,\n oldDef: ComponentDef<unknown>,\n rootLView: LView,\n): void {\n ngDevMode &&\n assertDefined(\n oldDef.tView,\n 'Expected a component definition that has been instantiated at least once',\n );\n\n const tView = rootLView[TVIEW];\n\n // Use `tView` to match the LView since `instanceof` can\n // produce false positives when using inheritance.\n if (tView === oldDef.tView) {\n ngDevMode && assertComponentDef(oldDef.type);\n recreateLView(importMeta, id, newDef, oldDef, rootLView);\n return;\n }\n\n for (let i = HEADER_OFFSET; i < tView.bindingStartIndex; i++) {\n const current = rootLView[i];\n\n if (isLContainer(current)) {\n // The host can be an LView if a component is injecting `ViewContainerRef`.\n if (isLView(current[HOST])) {\n recreateMatchingLViews(importMeta, id, newDef, oldDef, current[HOST]);\n }\n\n for (let j = CONTAINER_HEADER_OFFSET; j < current.length; j++) {\n recreateMatchingLViews(importMeta, id, newDef, oldDef, current[j]);\n }\n } else if (isLView(current)) {\n recreateMatchingLViews(importMeta, id, newDef, oldDef, current);\n }\n }\n}\n\n/**\n * Removes any cached renderers from the factory for the provided type.\n * This is currently used by the HMR logic to ensure Renderers are kept\n * synchronized with any definition metadata updates.\n * @param factory A RendererFactory2 instance.\n * @param def A ComponentDef instance.\n */\nfunction clearRendererCache(factory: RendererFactory, def: ComponentDef<unknown>) {\n // Cast to read a private field.\n // NOTE: This must be kept synchronized with the renderer factory implementation in\n // platform-browser and platform-browser/animations.\n (factory as {componentReplaced?: (id: string) => void}).componentReplaced?.(def.id);\n}\n\n/**\n * Recreates an LView in-place from a new component definition.\n * @param importMeta `import.meta` information.\n * @param id HMR ID for the component.\n * @param newDef Definition from which to recreate the view.\n * @param oldDef Previous component definition being swapped out.\n * @param lView View to be recreated.\n */\nfunction recreateLView(\n importMeta: ImportMetaExtended | null,\n id: string | null,\n newDef: ComponentDef<unknown>,\n oldDef: ComponentDef<unknown>,\n lView: LView<unknown>,\n): void {\n const instance = lView[CONTEXT];\n let host = lView[HOST]! as HTMLElement;\n // In theory the parent can also be an LContainer, but it appears like that's\n // only the case for embedded views which we won't be replacing here.\n const parentLView = lView[PARENT] as LView;\n ngDevMode && assertLView(parentLView);\n const tNode = lView[T_HOST] as TElementNode;\n ngDevMode && assertTNodeType(tNode, TNodeType.Element);\n ngDevMode && assertNotEqual(newDef, oldDef, 'Expected different component definition');\n const zone = lView[INJECTOR].get(NgZone, null);\n const recreate = () => {\n // If we're recreating a component with shadow DOM encapsulation, it will have attached a\n // shadow root. The browser will throw if we attempt to attach another one and there's no way\n // to detach it. Our only option is to make a clone only of the root node, replace the node\n // with the clone and use it for the newly-created LView.\n if (oldDef.encapsulation === ViewEncapsulation.ShadowDom) {\n const newHost = host.cloneNode(false) as HTMLElement;\n host.replaceWith(newHost);\n host = newHost;\n }\n\n // Recreate the TView since the template might've changed.\n const newTView = getOrCreateComponentTView(newDef);\n\n // Create a new LView from the new TView, but reusing the existing TNode and DOM node.\n const newLView = createLView(\n parentLView,\n newTView,\n instance,\n getInitialLViewFlagsFromDef(newDef),\n host,\n tNode,\n null,\n null, // The renderer will be created a bit further down once the old one is destroyed.\n null,\n null,\n null,\n );\n\n // Detach the LView from its current place in the tree so we don't\n // start traversing any siblings and modifying their structure.\n replaceLViewInTree(parentLView, lView, newLView, tNode.index);\n\n // Destroy the detached LView.\n destroyLView(lView[TVIEW], lView);\n\n // Always force the creation of a new renderer to ensure state captured during construction\n // stays consistent with the new component definition by clearing any old ached factories.\n const rendererFactory = lView[ENVIRONMENT].rendererFactory;\n clearRendererCache(rendererFactory, oldDef);\n\n // Patch a brand-new renderer onto the new view only after the old\n // view is destroyed so that the runtime doesn't try to reuse it.\n newLView[RENDERER] = rendererFactory.createRenderer(host, newDef);\n\n // Remove the nodes associated with the destroyed LView. This removes the\n // descendants, but not the host which we want to stay in place.\n removeViewFromDOM(lView[TVIEW], lView);\n\n // Reset the content projection state of the TNode before the first render.\n // Note that this has to happen after the LView has been destroyed or we\n // risk some projected nodes not being removed correctly.\n resetProjectionState(tNode);\n\n // Creation pass for the new view.\n renderView(newTView, newLView, instance);\n\n // Update pass for the new view.\n refreshView(newTView, newLView, newTView.template, instance);\n };\n\n // The callback isn't guaranteed to be inside the Zone so we need to bring it in ourselves.\n if (zone === null) {\n executeWithInvalidateFallback(importMeta, id, recreate);\n } else {\n zone.run(() => executeWithInvalidateFallback(importMeta, id, recreate));\n }\n}\n\n/**\n * Runs an HMR-related function and falls back to\n * invalidating the HMR data if it throws an error.\n */\nfunction executeWithInvalidateFallback(\n importMeta: ImportMetaExtended | null,\n id: string | null,\n callback: () => void,\n) {\n try {\n callback();\n } catch (e) {\n const error = e as {message?: string; stack?: string};\n\n // If we have all the necessary information and APIs to send off the invalidation\n // request, send it before rethrowing so the dev server can decide what to do.\n if (id !== null && error.message) {\n const toLog = error.message + (error.stack ? '\\n' + error.stack : '');\n importMeta?.hot?.send?.('angular:invalidate', {id, message: toLog, error: true});\n }\n\n // Throw the error in case the page doesn't get refreshed.\n throw e;\n }\n}\n\n/**\n * Replaces one LView in the tree with another one.\n * @param parentLView Parent of the LView being replaced.\n * @param oldLView LView being replaced.\n * @param newLView Replacement LView to be inserted.\n * @param index Index at which the LView should be inserted.\n */\nfunction replaceLViewInTree(\n parentLView: LView,\n oldLView: LView,\n newLView: LView,\n index: number,\n): void {\n // Update the sibling whose `NEXT` pointer refers to the old view.\n for (let i = HEADER_OFFSET; i < parentLView[TVIEW].bindingStartIndex; i++) {\n const current = parentLView[i];\n\n if ((isLView(current) || isLContainer(current)) && current[NEXT] === oldLView) {\n current[NEXT] = newLView;\n break;\n }\n }\n\n // Set the new view as the head, if the old view was first.\n if (parentLView[CHILD_HEAD] === oldLView) {\n parentLView[CHILD_HEAD] = newLView;\n }\n\n // Set the new view as the tail, if the old view was last.\n if (parentLView[CHILD_TAIL] === oldLView) {\n parentLView[CHILD_TAIL] = newLView;\n }\n\n // Update the `NEXT` pointer to the same as the old view.\n newLView[NEXT] = oldLView[NEXT];\n\n // Clear out the `NEXT` of the old view.\n oldLView[NEXT] = null;\n\n // Insert the new LView at the correct index.\n parentLView[index] = newLView;\n}\n\n/**\n * Child nodes mutate the `projection` state of their parent node as they're being projected.\n * This function resets the `project` back to its initial state.\n * @param tNode\n */\nfunction resetProjectionState(tNode: TElementNode): void {\n // The `projection` is mutated by child nodes as they're being projected. We need to\n // reset it to the initial state so projection works after the template is swapped out.\n if (tNode.projection !== null) {\n for (const current of tNode.projection) {\n if (isTNodeShape(current)) {\n // Reset `projectionNext` since it can affect the traversal order during projection.\n current.projectionNext = null;\n current.flags &= ~TNodeFlags.isProjected;\n }\n }\n tNode.projection = null;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {forwardRef, resolveForwardRef} from '../../di/forward_ref';\nimport {ɵɵinject, ɵɵinvalidFactoryDep} from '../../di/injector_compatibility';\nimport {ɵɵdefineInjectable, ɵɵdefineInjector} from '../../di/interface/defs';\nimport {registerNgModuleType} from '../../linker/ng_module_registration';\nimport * as iframe_attrs_validation from '../../sanitization/iframe_attrs_validation';\nimport * as sanitization from '../../sanitization/sanitization';\nimport * as r3 from '../index';\n\n/**\n * A mapping of the @angular/core API surface used in generated expressions to the actual symbols.\n *\n * This should be kept up to date with the public exports of @angular/core.\n */\nexport const angularCoreEnv: {[name: string]: unknown} = (() => ({\n 'ɵɵattribute': r3.ɵɵattribute,\n 'ɵɵattributeInterpolate1': r3.ɵɵattributeInterpolate1,\n 'ɵɵattributeInterpolate2': r3.ɵɵattributeInterpolate2,\n 'ɵɵattributeInterpolate3': r3.ɵɵattributeInterpolate3,\n 'ɵɵattributeInterpolate4': r3.ɵɵattributeInterpolate4,\n 'ɵɵattributeInterpolate5': r3.ɵɵattributeInterpolate5,\n 'ɵɵattributeInterpolate6': r3.ɵɵattributeInterpolate6,\n 'ɵɵattributeInterpolate7': r3.ɵɵattributeInterpolate7,\n 'ɵɵattributeInterpolate8': r3.ɵɵattributeInterpolate8,\n 'ɵɵattributeInterpolateV': r3.ɵɵattributeInterpolateV,\n 'ɵɵdefineComponent': r3.ɵɵdefineComponent,\n 'ɵɵdefineDirective': r3.ɵɵdefineDirective,\n 'ɵɵdefineInjectable': ɵɵdefineInjectable,\n 'ɵɵdefineInjector': ɵɵdefineInjector,\n 'ɵɵdefineNgModule': r3.ɵɵdefineNgModule,\n 'ɵɵdefinePipe': r3.ɵɵdefinePipe,\n 'ɵɵdirectiveInject': r3.ɵɵdirectiveInject,\n 'ɵɵgetInheritedFactory': r3.ɵɵgetInheritedFactory,\n 'ɵɵinject': ɵɵinject,\n 'ɵɵinjectAttribute': r3.ɵɵinjectAttribute,\n 'ɵɵinvalidFactory': r3.ɵɵinvalidFactory,\n 'ɵɵinvalidFactoryDep': ɵɵinvalidFactoryDep,\n 'ɵɵtemplateRefExtractor': r3.ɵɵtemplateRefExtractor,\n 'ɵɵresetView': r3.ɵɵresetView,\n 'ɵɵHostDirectivesFeature': r3.ɵɵHostDirectivesFeature,\n 'ɵɵNgOnChangesFeature': r3.ɵɵNgOnChangesFeature,\n 'ɵɵProvidersFeature': r3.ɵɵProvidersFeature,\n 'ɵɵCopyDefinitionFeature': r3.ɵɵCopyDefinitionFeature,\n 'ɵɵInheritDefinitionFeature': r3.ɵɵInheritDefinitionFeature,\n 'ɵɵExternalStylesFeature': r3.ɵɵExternalStylesFeature,\n 'ɵɵnextContext': r3.ɵɵnextContext,\n 'ɵɵnamespaceHTML': r3.ɵɵnamespaceHTML,\n 'ɵɵnamespaceMathML': r3.ɵɵnamespaceMathML,\n 'ɵɵnamespaceSVG': r3.ɵɵnamespaceSVG,\n 'ɵɵenableBindings': r3.ɵɵenableBindings,\n 'ɵɵdisableBindings': r3.ɵɵdisableBindings,\n 'ɵɵelementStart': r3.ɵɵelementStart,\n 'ɵɵelementEnd': r3.ɵɵelementEnd,\n 'ɵɵelement': r3.ɵɵelement,\n 'ɵɵelementContainerStart': r3.ɵɵelementContainerStart,\n 'ɵɵelementContainerEnd': r3.ɵɵelementContainerEnd,\n 'ɵɵelementContainer': r3.ɵɵelementContainer,\n 'ɵɵpureFunction0': r3.ɵɵpureFunction0,\n 'ɵɵpureFunction1': r3.ɵɵpureFunction1,\n 'ɵɵpureFunction2': r3.ɵɵpureFunction2,\n 'ɵɵpureFunction3': r3.ɵɵpureFunction3,\n 'ɵɵpureFunction4': r3.ɵɵpureFunction4,\n 'ɵɵpureFunction5': r3.ɵɵpureFunction5,\n 'ɵɵpureFunction6': r3.ɵɵpureFunction6,\n 'ɵɵpureFunction7': r3.ɵɵpureFunction7,\n 'ɵɵpureFunction8': r3.ɵɵpureFunction8,\n 'ɵɵpureFunctionV': r3.ɵɵpureFunctionV,\n 'ɵɵgetCurrentView': r3.ɵɵgetCurrentView,\n 'ɵɵrestoreView': r3.ɵɵrestoreView,\n 'ɵɵlistener': r3.ɵɵlistener,\n 'ɵɵprojection': r3.ɵɵprojection,\n 'ɵɵsyntheticHostProperty': r3.ɵɵsyntheticHostProperty,\n 'ɵɵsyntheticHostListener': r3.ɵɵsyntheticHostListener,\n 'ɵɵpipeBind1': r3.ɵɵpipeBind1,\n 'ɵɵpipeBind2': r3.ɵɵpipeBind2,\n 'ɵɵpipeBind3': r3.ɵɵpipeBind3,\n 'ɵɵpipeBind4': r3.ɵɵpipeBind4,\n 'ɵɵpipeBindV': r3.ɵɵpipeBindV,\n 'ɵɵprojectionDef': r3.ɵɵprojectionDef,\n 'ɵɵhostProperty': r3.ɵɵhostProperty,\n 'ɵɵproperty': r3.ɵɵproperty,\n 'ɵɵpropertyInterpolate': r3.ɵɵpropertyInterpolate,\n 'ɵɵpropertyInterpolate1': r3.ɵɵpropertyInterpolate1,\n 'ɵɵpropertyInterpolate2': r3.ɵɵpropertyInterpolate2,\n 'ɵɵpropertyInterpolate3': r3.ɵɵpropertyInterpolate3,\n 'ɵɵpropertyInterpolate4': r3.ɵɵpropertyInterpolate4,\n 'ɵɵpropertyInterpolate5': r3.ɵɵpropertyInterpolate5,\n 'ɵɵpropertyInterpolate6': r3.ɵɵpropertyInterpolate6,\n 'ɵɵpropertyInterpolate7': r3.ɵɵpropertyInterpolate7,\n 'ɵɵpropertyInterpolate8': r3.ɵɵpropertyInterpolate8,\n 'ɵɵpropertyInterpolateV': r3.ɵɵpropertyInterpolateV,\n 'ɵɵpipe': r3.ɵɵpipe,\n 'ɵɵqueryRefresh': r3.ɵɵqueryRefresh,\n 'ɵɵqueryAdvance': r3.ɵɵqueryAdvance,\n 'ɵɵviewQuery': r3.ɵɵviewQuery,\n 'ɵɵviewQuerySignal': r3.ɵɵviewQuerySignal,\n 'ɵɵloadQuery': r3.ɵɵloadQuery,\n 'ɵɵcontentQuery': r3.ɵɵcontentQuery,\n 'ɵɵcontentQuerySignal': r3.ɵɵcontentQuerySignal,\n 'ɵɵreference': r3.ɵɵreference,\n 'ɵɵclassMap': r3.ɵɵclassMap,\n 'ɵɵclassMapInterpolate1': r3.ɵɵclassMapInterpolate1,\n 'ɵɵclassMapInterpolate2': r3.ɵɵclassMapInterpolate2,\n 'ɵɵclassMapInterpolate3': r3.ɵɵclassMapInterpolate3,\n 'ɵɵclassMapInterpolate4': r3.ɵɵclassMapInterpolate4,\n 'ɵɵclassMapInterpolate5': r3.ɵɵclassMapInterpolate5,\n 'ɵɵclassMapInterpolate6': r3.ɵɵclassMapInterpolate6,\n 'ɵɵclassMapInterpolate7': r3.ɵɵclassMapInterpolate7,\n 'ɵɵclassMapInterpolate8': r3.ɵɵclassMapInterpolate8,\n 'ɵɵclassMapInterpolateV': r3.ɵɵclassMapInterpolateV,\n 'ɵɵstyleMap': r3.ɵɵstyleMap,\n 'ɵɵstyleMapInterpolate1': r3.ɵɵstyleMapInterpolate1,\n 'ɵɵstyleMapInterpolate2': r3.ɵɵstyleMapInterpolate2,\n 'ɵɵstyleMapInterpolate3': r3.ɵɵstyleMapInterpolate3,\n 'ɵɵstyleMapInterpolate4': r3.ɵɵstyleMapInterpolate4,\n 'ɵɵstyleMapInterpolate5': r3.ɵɵstyleMapInterpolate5,\n 'ɵɵstyleMapInterpolate6': r3.ɵɵstyleMapInterpolate6,\n 'ɵɵstyleMapInterpolate7': r3.ɵɵstyleMapInterpolate7,\n 'ɵɵstyleMapInterpolate8': r3.ɵɵstyleMapInterpolate8,\n 'ɵɵstyleMapInterpolateV': r3.ɵɵstyleMapInterpolateV,\n 'ɵɵstyleProp': r3.ɵɵstyleProp,\n 'ɵɵstylePropInterpolate1': r3.ɵɵstylePropInterpolate1,\n 'ɵɵstylePropInterpolate2': r3.ɵɵstylePropInterpolate2,\n 'ɵɵstylePropInterpolate3': r3.ɵɵstylePropInterpolate3,\n 'ɵɵstylePropInterpolate4': r3.ɵɵstylePropInterpolate4,\n 'ɵɵstylePropInterpolate5': r3.ɵɵstylePropInterpolate5,\n 'ɵɵstylePropInterpolate6': r3.ɵɵstylePropInterpolate6,\n 'ɵɵstylePropInterpolate7': r3.ɵɵstylePropInterpolate7,\n 'ɵɵstylePropInterpolate8': r3.ɵɵstylePropInterpolate8,\n 'ɵɵstylePropInterpolateV': r3.ɵɵstylePropInterpolateV,\n 'ɵɵclassProp': r3.ɵɵclassProp,\n 'ɵɵadvance': r3.ɵɵadvance,\n 'ɵɵtemplate': r3.ɵɵtemplate,\n 'ɵɵconditional': r3.ɵɵconditional,\n 'ɵɵdefer': r3.ɵɵdefer,\n 'ɵɵdeferWhen': r3.ɵɵdeferWhen,\n 'ɵɵdeferOnIdle': r3.ɵɵdeferOnIdle,\n 'ɵɵdeferOnImmediate': r3.ɵɵdeferOnImmediate,\n 'ɵɵdeferOnTimer': r3.ɵɵdeferOnTimer,\n 'ɵɵdeferOnHover': r3.ɵɵdeferOnHover,\n 'ɵɵdeferOnInteraction': r3.ɵɵdeferOnInteraction,\n 'ɵɵdeferOnViewport': r3.ɵɵdeferOnViewport,\n 'ɵɵdeferPrefetchWhen': r3.ɵɵdeferPrefetchWhen,\n 'ɵɵdeferPrefetchOnIdle': r3.ɵɵdeferPrefetchOnIdle,\n 'ɵɵdeferPrefetchOnImmediate': r3.ɵɵdeferPrefetchOnImmediate,\n 'ɵɵdeferPrefetchOnTimer': r3.ɵɵdeferPrefetchOnTimer,\n 'ɵɵdeferPrefetchOnHover': r3.ɵɵdeferPrefetchOnHover,\n 'ɵɵdeferPrefetchOnInteraction': r3.ɵɵdeferPrefetchOnInteraction,\n 'ɵɵdeferPrefetchOnViewport': r3.ɵɵdeferPrefetchOnViewport,\n 'ɵɵdeferHydrateWhen': r3.ɵɵdeferHydrateWhen,\n 'ɵɵdeferHydrateNever': r3.ɵɵdeferHydrateNever,\n 'ɵɵdeferHydrateOnIdle': r3.ɵɵdeferHydrateOnIdle,\n 'ɵɵdeferHydrateOnImmediate': r3.ɵɵdeferHydrateOnImmediate,\n 'ɵɵdeferHydrateOnTimer': r3.ɵɵdeferHydrateOnTimer,\n 'ɵɵdeferHydrateOnHover': r3.ɵɵdeferHydrateOnHover,\n 'ɵɵdeferHydrateOnInteraction': r3.ɵɵdeferHydrateOnInteraction,\n 'ɵɵdeferHydrateOnViewport': r3.ɵɵdeferHydrateOnViewport,\n 'ɵɵdeferEnableTimerScheduling': r3.ɵɵdeferEnableTimerScheduling,\n 'ɵɵrepeater': r3.ɵɵrepeater,\n 'ɵɵrepeaterCreate': r3.ɵɵrepeaterCreate,\n 'ɵɵrepeaterTrackByIndex': r3.ɵɵrepeaterTrackByIndex,\n 'ɵɵrepeaterTrackByIdentity': r3.ɵɵrepeaterTrackByIdentity,\n 'ɵɵcomponentInstance': r3.ɵɵcomponentInstance,\n 'ɵɵtext': r3.ɵɵtext,\n 'ɵɵtextInterpolate': r3.ɵɵtextInterpolate,\n 'ɵɵtextInterpolate1': r3.ɵɵtextInterpolate1,\n 'ɵɵtextInterpolate2': r3.ɵɵtextInterpolate2,\n 'ɵɵtextInterpolate3': r3.ɵɵtextInterpolate3,\n 'ɵɵtextInterpolate4': r3.ɵɵtextInterpolate4,\n 'ɵɵtextInterpolate5': r3.ɵɵtextInterpolate5,\n 'ɵɵtextInterpolate6': r3.ɵɵtextInterpolate6,\n 'ɵɵtextInterpolate7': r3.ɵɵtextInterpolate7,\n 'ɵɵtextInterpolate8': r3.ɵɵtextInterpolate8,\n 'ɵɵtextInterpolateV': r3.ɵɵtextInterpolateV,\n 'ɵɵi18n': r3.ɵɵi18n,\n 'ɵɵi18nAttributes': r3.ɵɵi18nAttributes,\n 'ɵɵi18nExp': r3.ɵɵi18nExp,\n 'ɵɵi18nStart': r3.ɵɵi18nStart,\n 'ɵɵi18nEnd': r3.ɵɵi18nEnd,\n 'ɵɵi18nApply': r3.ɵɵi18nApply,\n 'ɵɵi18nPostprocess': r3.ɵɵi18nPostprocess,\n 'ɵɵresolveWindow': r3.ɵɵresolveWindow,\n 'ɵɵresolveDocument': r3.ɵɵresolveDocument,\n 'ɵɵresolveBody': r3.ɵɵresolveBody,\n 'ɵɵsetComponentScope': r3.ɵɵsetComponentScope,\n 'ɵɵsetNgModuleScope': r3.ɵɵsetNgModuleScope,\n 'ɵɵregisterNgModuleType': registerNgModuleType,\n 'ɵɵgetComponentDepsFactory': r3.ɵɵgetComponentDepsFactory,\n 'ɵsetClassDebugInfo': r3.ɵsetClassDebugInfo,\n 'ɵɵdeclareLet': r3.ɵɵdeclareLet,\n 'ɵɵstoreLet': r3.ɵɵstoreLet,\n 'ɵɵreadContextLet': r3.ɵɵreadContextLet,\n 'ɵɵattachSourceLocations': r3.ɵɵattachSourceLocations,\n\n 'ɵɵsanitizeHtml': sanitization.ɵɵsanitizeHtml,\n 'ɵɵsanitizeStyle': sanitization.ɵɵsanitizeStyle,\n 'ɵɵsanitizeResourceUrl': sanitization.ɵɵsanitizeResourceUrl,\n 'ɵɵsanitizeScript': sanitization.ɵɵsanitizeScript,\n 'ɵɵsanitizeUrl': sanitization.ɵɵsanitizeUrl,\n 'ɵɵsanitizeUrlOrResourceUrl': sanitization.ɵɵsanitizeUrlOrResourceUrl,\n 'ɵɵtrustConstantHtml': sanitization.ɵɵtrustConstantHtml,\n 'ɵɵtrustConstantResourceUrl': sanitization.ɵɵtrustConstantResourceUrl,\n 'ɵɵvalidateIframeAttribute': iframe_attrs_validation.ɵɵvalidateIframeAttribute,\n\n 'forwardRef': forwardRef,\n 'resolveForwardRef': resolveForwardRef,\n\n 'ɵɵtwoWayProperty': r3.ɵɵtwoWayProperty,\n 'ɵɵtwoWayBindingSet': r3.ɵɵtwoWayBindingSet,\n 'ɵɵtwoWayListener': r3.ɵɵtwoWayListener,\n\n 'ɵɵreplaceMetadata': r3.ɵɵreplaceMetadata,\n 'ɵɵgetReplaceMetadataURL': r3.ɵɵgetReplaceMetadataURL,\n}))();\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport {ViewEncapsulation} from '../../metadata/view';\n\nexport interface JitCompilerOptions {\n defaultEncapsulation?: ViewEncapsulation;\n preserveWhitespaces?: boolean;\n}\n\nlet jitOptions: JitCompilerOptions | null = null;\n\nexport function setJitOptions(options: JitCompilerOptions): void {\n if (jitOptions !== null) {\n if (options.defaultEncapsulation !== jitOptions.defaultEncapsulation) {\n ngDevMode &&\n console.error(\n 'Provided value for `defaultEncapsulation` can not be changed once it has been set.',\n );\n return;\n }\n if (options.preserveWhitespaces !== jitOptions.preserveWhitespaces) {\n ngDevMode &&\n console.error(\n 'Provided value for `preserveWhitespaces` can not be changed once it has been set.',\n );\n return;\n }\n }\n jitOptions = options;\n}\n\nexport function getJitOptions(): JitCompilerOptions | null {\n return jitOptions;\n}\n\nexport function resetJitOptions(): void {\n jitOptions = null;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n getCompilerFacade,\n JitCompilerUsage,\n R3InjectorMetadataFacade,\n} from '../../compiler/compiler_facade';\nimport {resolveForwardRef} from '../../di/forward_ref';\nimport {NG_INJ_DEF} from '../../di/interface/defs';\nimport type {ModuleWithProviders} from '../../di/interface/provider';\nimport {reflectDependencies} from '../../di/jit/util';\nimport {Type} from '../../interface/type';\nimport {registerNgModuleType} from '../../linker/ng_module_registration';\nimport type {NgModule} from '../../metadata/ng_module';\nimport type {\n NgModuleDef,\n NgModuleTransitiveScopes,\n NgModuleType,\n} from '../../metadata/ng_module_def';\nimport {deepForEach, flatten} from '../../util/array_utils';\nimport {assertDefined} from '../../util/assert';\nimport {EMPTY_ARRAY} from '../../util/empty';\nimport {GENERATED_COMP_IDS} from '../definition';\nimport {\n getComponentDef,\n getDirectiveDef,\n getNgModuleDef,\n getPipeDef,\n isStandalone,\n} from '../def_getters';\nimport {depsTracker, USE_RUNTIME_DEPS_TRACKER_FOR_JIT} from '../deps_tracker/deps_tracker';\nimport {NG_COMP_DEF, NG_DIR_DEF, NG_FACTORY_DEF, NG_MOD_DEF, NG_PIPE_DEF} from '../fields';\nimport type {ComponentDef} from '../interfaces/definition';\nimport {maybeUnwrapFn} from '../util/misc_utils';\nimport {stringifyForError} from '../util/stringify_utils';\n\nimport {angularCoreEnv} from './environment';\nimport {patchModuleCompilation} from './module_patch';\nimport {isModuleWithProviders, isNgModule} from './util';\n\ninterface ModuleQueueItem {\n moduleType: Type<any>;\n ngModule: NgModule;\n}\n\nconst moduleQueue: ModuleQueueItem[] = [];\n\n/**\n * Enqueues moduleDef to be checked later to see if scope can be set on its\n * component declarations.\n */\nfunction enqueueModuleForDelayedScoping(moduleType: Type<any>, ngModule: NgModule) {\n moduleQueue.push({moduleType, ngModule});\n}\n\nlet flushingModuleQueue = false;\n/**\n * Loops over queued module definitions, if a given module definition has all of its\n * declarations resolved, it dequeues that module definition and sets the scope on\n * its declarations.\n */\nexport function flushModuleScopingQueueAsMuchAsPossible() {\n if (!flushingModuleQueue) {\n flushingModuleQueue = true;\n try {\n for (let i = moduleQueue.length - 1; i >= 0; i--) {\n const {moduleType, ngModule} = moduleQueue[i];\n\n if (ngModule.declarations && ngModule.declarations.every(isResolvedDeclaration)) {\n // dequeue\n moduleQueue.splice(i, 1);\n setScopeOnDeclaredComponents(moduleType, ngModule);\n }\n }\n } finally {\n flushingModuleQueue = false;\n }\n }\n}\n\n/**\n * Returns truthy if a declaration has resolved. If the declaration happens to be\n * an array of declarations, it will recurse to check each declaration in that array\n * (which may also be arrays).\n */\nfunction isResolvedDeclaration(declaration: any[] | Type<any>): boolean {\n if (Array.isArray(declaration)) {\n return declaration.every(isResolvedDeclaration);\n }\n return !!resolveForwardRef(declaration);\n}\n\n/**\n * Compiles a module in JIT mode.\n *\n * This function automatically gets called when a class has a `@NgModule` decorator.\n */\nexport function compileNgModule(moduleType: Type<any>, ngModule: NgModule = {}): void {\n patchModuleCompilation();\n compileNgModuleDefs(moduleType as NgModuleType, ngModule);\n if (ngModule.id !== undefined) {\n registerNgModuleType(moduleType as NgModuleType, ngModule.id);\n }\n\n // Because we don't know if all declarations have resolved yet at the moment the\n // NgModule decorator is executing, we're enqueueing the setting of module scope\n // on its declarations to be run at a later time when all declarations for the module,\n // including forward refs, have resolved.\n enqueueModuleForDelayedScoping(moduleType, ngModule);\n}\n\n/**\n * Compiles and adds the `ɵmod`, `ɵfac` and `ɵinj` properties to the module class.\n *\n * It's possible to compile a module via this API which will allow duplicate declarations in its\n * root.\n */\nexport function compileNgModuleDefs(\n moduleType: NgModuleType,\n ngModule: NgModule,\n allowDuplicateDeclarationsInRoot: boolean = false,\n): void {\n ngDevMode && assertDefined(moduleType, 'Required value moduleType');\n ngDevMode && assertDefined(ngModule, 'Required value ngModule');\n const declarations: Type<any>[] = flatten(ngModule.declarations || EMPTY_ARRAY);\n let ngModuleDef: any = null;\n Object.defineProperty(moduleType, NG_MOD_DEF, {\n configurable: true,\n get: () => {\n if (ngModuleDef === null) {\n if (ngDevMode && ngModule.imports && ngModule.imports.indexOf(moduleType) > -1) {\n // We need to assert this immediately, because allowing it to continue will cause it to\n // go into an infinite loop before we've reached the point where we throw all the errors.\n throw new Error(`'${stringifyForError(moduleType)}' module can't import itself`);\n }\n const compiler = getCompilerFacade({\n usage: JitCompilerUsage.Decorator,\n kind: 'NgModule',\n type: moduleType,\n });\n ngModuleDef = compiler.compileNgModule(angularCoreEnv, `ng:///${moduleType.name}/ɵmod.js`, {\n type: moduleType,\n bootstrap: flatten(ngModule.bootstrap || EMPTY_ARRAY).map(resolveForwardRef),\n declarations: declarations.map(resolveForwardRef),\n imports: flatten(ngModule.imports || EMPTY_ARRAY)\n .map(resolveForwardRef)\n .map(expandModuleWithProviders),\n exports: flatten(ngModule.exports || EMPTY_ARRAY)\n .map(resolveForwardRef)\n .map(expandModuleWithProviders),\n schemas: ngModule.schemas ? flatten(ngModule.schemas) : null,\n id: ngModule.id || null,\n });\n // Set `schemas` on ngModuleDef to an empty array in JIT mode to indicate that runtime\n // should verify that there are no unknown elements in a template. In AOT mode, that check\n // happens at compile time and `schemas` information is not present on Component and Module\n // defs after compilation (so the check doesn't happen the second time at runtime).\n if (!ngModuleDef.schemas) {\n ngModuleDef.schemas = [];\n }\n }\n return ngModuleDef;\n },\n });\n\n let ngFactoryDef: any = null;\n Object.defineProperty(moduleType, NG_FACTORY_DEF, {\n get: () => {\n if (ngFactoryDef === null) {\n const compiler = getCompilerFacade({\n usage: JitCompilerUsage.Decorator,\n kind: 'NgModule',\n type: moduleType,\n });\n ngFactoryDef = compiler.compileFactory(angularCoreEnv, `ng:///${moduleType.name}/ɵfac.js`, {\n name: moduleType.name,\n type: moduleType,\n deps: reflectDependencies(moduleType),\n target: compiler.FactoryTarget.NgModule,\n typeArgumentCount: 0,\n });\n }\n return ngFactoryDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n\n let ngInjectorDef: any = null;\n Object.defineProperty(moduleType, NG_INJ_DEF, {\n get: () => {\n if (ngInjectorDef === null) {\n ngDevMode && verifySemanticsOfNgModuleDef(moduleType, allowDuplicateDeclarationsInRoot);\n const meta: R3InjectorMetadataFacade = {\n name: moduleType.name,\n type: moduleType,\n providers: ngModule.providers || EMPTY_ARRAY,\n imports: [\n (ngModule.imports || EMPTY_ARRAY).map(resolveForwardRef),\n (ngModule.exports || EMPTY_ARRAY).map(resolveForwardRef),\n ],\n };\n const compiler = getCompilerFacade({\n usage: JitCompilerUsage.Decorator,\n kind: 'NgModule',\n type: moduleType,\n });\n ngInjectorDef = compiler.compileInjector(\n angularCoreEnv,\n `ng:///${moduleType.name}/ɵinj.js`,\n meta,\n );\n }\n return ngInjectorDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n}\n\nexport function generateStandaloneInDeclarationsError(type: Type<any>, location: string) {\n const prefix = `Unexpected \"${stringifyForError(type)}\" found in the \"declarations\" array of the`;\n const suffix =\n `\"${stringifyForError(type)}\" is marked as standalone and can't be declared ` +\n 'in any NgModule - did you intend to import it instead (by adding it to the \"imports\" array)?';\n return `${prefix} ${location}, ${suffix}`;\n}\n\nfunction verifySemanticsOfNgModuleDef(\n moduleType: NgModuleType,\n allowDuplicateDeclarationsInRoot: boolean,\n importingModule?: NgModuleType,\n): void {\n if (verifiedNgModule.get(moduleType)) return;\n\n // skip verifications of standalone components, directives, and pipes\n if (isStandalone(moduleType)) return;\n\n verifiedNgModule.set(moduleType, true);\n moduleType = resolveForwardRef(moduleType);\n let ngModuleDef: NgModuleDef<any>;\n if (importingModule) {\n ngModuleDef = getNgModuleDef(moduleType)!;\n if (!ngModuleDef) {\n throw new Error(\n `Unexpected value '${moduleType.name}' imported by the module '${importingModule.name}'. Please add an @NgModule annotation.`,\n );\n }\n } else {\n ngModuleDef = getNgModuleDef(moduleType, true);\n }\n const errors: string[] = [];\n const declarations = maybeUnwrapFn(ngModuleDef.declarations);\n const imports = maybeUnwrapFn(ngModuleDef.imports);\n flatten(imports)\n .map(unwrapModuleWithProvidersImports)\n .forEach((modOrStandaloneCmpt) => {\n verifySemanticsOfNgModuleImport(modOrStandaloneCmpt, moduleType);\n verifySemanticsOfNgModuleDef(modOrStandaloneCmpt, false, moduleType);\n });\n const exports = maybeUnwrapFn(ngModuleDef.exports);\n declarations.forEach(verifyDeclarationsHaveDefinitions);\n declarations.forEach(verifyDirectivesHaveSelector);\n declarations.forEach((declarationType) => verifyNotStandalone(declarationType, moduleType));\n const combinedDeclarations: Type<any>[] = [\n ...declarations.map(resolveForwardRef),\n ...flatten(imports.map(computeCombinedExports)).map(resolveForwardRef),\n ];\n exports.forEach(verifyExportsAreDeclaredOrReExported);\n declarations.forEach((decl) => verifyDeclarationIsUnique(decl, allowDuplicateDeclarationsInRoot));\n\n const ngModule = getAnnotation<NgModule>(moduleType, 'NgModule');\n if (ngModule) {\n ngModule.imports &&\n flatten(ngModule.imports)\n .map(unwrapModuleWithProvidersImports)\n .forEach((mod) => {\n verifySemanticsOfNgModuleImport(mod, moduleType);\n verifySemanticsOfNgModuleDef(mod, false, moduleType);\n });\n ngModule.bootstrap && deepForEach(ngModule.bootstrap, verifyCorrectBootstrapType);\n ngModule.bootstrap && deepForEach(ngModule.bootstrap, verifyComponentIsPartOfNgModule);\n }\n\n // Throw Error if any errors were detected.\n if (errors.length) {\n throw new Error(errors.join('\\n'));\n }\n ////////////////////////////////////////////////////////////////////////////////////////////////\n function verifyDeclarationsHaveDefinitions(type: Type<any>): void {\n type = resolveForwardRef(type);\n const def = getComponentDef(type) || getDirectiveDef(type) || getPipeDef(type);\n if (!def) {\n errors.push(\n `Unexpected value '${stringifyForError(type)}' declared by the module '${stringifyForError(\n moduleType,\n )}'. Please add a @Pipe/@Directive/@Component annotation.`,\n );\n }\n }\n\n function verifyDirectivesHaveSelector(type: Type<any>): void {\n type = resolveForwardRef(type);\n const def = getDirectiveDef(type);\n if (!getComponentDef(type) && def && def.selectors.length == 0) {\n errors.push(`Directive ${stringifyForError(type)} has no selector, please add it!`);\n }\n }\n\n function verifyNotStandalone(type: Type<any>, moduleType: NgModuleType): void {\n type = resolveForwardRef(type);\n const def = getComponentDef(type) || getDirectiveDef(type) || getPipeDef(type);\n if (def?.standalone) {\n const location = `\"${stringifyForError(moduleType)}\" NgModule`;\n errors.push(generateStandaloneInDeclarationsError(type, location));\n }\n }\n\n function verifyExportsAreDeclaredOrReExported(type: Type<any>) {\n type = resolveForwardRef(type);\n const kind =\n (getComponentDef(type) && 'component') ||\n (getDirectiveDef(type) && 'directive') ||\n (getPipeDef(type) && 'pipe');\n if (kind) {\n // only checked if we are declared as Component, Directive, or Pipe\n // Modules don't need to be declared or imported.\n if (combinedDeclarations.lastIndexOf(type) === -1) {\n // We are exporting something which we don't explicitly declare or import.\n errors.push(\n `Can't export ${kind} ${stringifyForError(type)} from ${stringifyForError(\n moduleType,\n )} as it was neither declared nor imported!`,\n );\n }\n }\n }\n\n function verifyDeclarationIsUnique(type: Type<any>, suppressErrors: boolean) {\n type = resolveForwardRef(type);\n const existingModule = ownerNgModule.get(type);\n if (existingModule && existingModule !== moduleType) {\n if (!suppressErrors) {\n const modules = [existingModule, moduleType].map(stringifyForError).sort();\n errors.push(\n `Type ${stringifyForError(type)} is part of the declarations of 2 modules: ${\n modules[0]\n } and ${modules[1]}! ` +\n `Please consider moving ${stringifyForError(type)} to a higher module that imports ${\n modules[0]\n } and ${modules[1]}. ` +\n `You can also create a new NgModule that exports and includes ${stringifyForError(\n type,\n )} then import that NgModule in ${modules[0]} and ${modules[1]}.`,\n );\n }\n } else {\n // Mark type as having owner.\n ownerNgModule.set(type, moduleType);\n }\n }\n\n function verifyComponentIsPartOfNgModule(type: Type<any>) {\n type = resolveForwardRef(type);\n const existingModule = ownerNgModule.get(type);\n if (!existingModule && !isStandalone(type)) {\n errors.push(\n `Component ${stringifyForError(\n type,\n )} is not part of any NgModule or the module has not been imported into your module.`,\n );\n }\n }\n\n function verifyCorrectBootstrapType(type: Type<any>) {\n type = resolveForwardRef(type);\n if (!getComponentDef(type)) {\n errors.push(`${stringifyForError(type)} cannot be used as an entry component.`);\n }\n if (isStandalone(type)) {\n // Note: this error should be the same as the\n // `NGMODULE_BOOTSTRAP_IS_STANDALONE` one in AOT compiler.\n errors.push(\n `The \\`${stringifyForError(type)}\\` class is a standalone component, which can ` +\n `not be used in the \\`@NgModule.bootstrap\\` array. Use the \\`bootstrapApplication\\` ` +\n `function for bootstrap instead.`,\n );\n }\n }\n\n function verifySemanticsOfNgModuleImport(type: Type<any>, importingModule: Type<any>) {\n type = resolveForwardRef(type);\n\n const directiveDef = getComponentDef(type) || getDirectiveDef(type);\n if (directiveDef !== null && !directiveDef.standalone) {\n throw new Error(\n `Unexpected directive '${type.name}' imported by the module '${importingModule.name}'. Please add an @NgModule annotation.`,\n );\n }\n\n const pipeDef = getPipeDef(type);\n if (pipeDef !== null && !pipeDef.standalone) {\n throw new Error(\n `Unexpected pipe '${type.name}' imported by the module '${importingModule.name}'. Please add an @NgModule annotation.`,\n );\n }\n }\n}\n\nfunction unwrapModuleWithProvidersImports(\n typeOrWithProviders: NgModuleType<any> | {ngModule: NgModuleType<any>},\n): NgModuleType<any> {\n typeOrWithProviders = resolveForwardRef(typeOrWithProviders);\n return (typeOrWithProviders as any).ngModule || typeOrWithProviders;\n}\n\nfunction getAnnotation<T>(type: any, name: string): T | null {\n let annotation: T | null = null;\n collect(type.__annotations__);\n collect(type.decorators);\n return annotation;\n\n function collect(annotations: any[] | null) {\n if (annotations) {\n annotations.forEach(readAnnotation);\n }\n }\n\n function readAnnotation(decorator: {\n type: {prototype: {ngMetadataName: string}; args: any[]};\n args: any;\n }): void {\n if (!annotation) {\n const proto = Object.getPrototypeOf(decorator);\n if (proto.ngMetadataName == name) {\n annotation = decorator as any;\n } else if (decorator.type) {\n const proto = Object.getPrototypeOf(decorator.type);\n if (proto.ngMetadataName == name) {\n annotation = decorator.args[0];\n }\n }\n }\n }\n}\n\n/**\n * Keep track of compiled components. This is needed because in tests we often want to compile the\n * same component with more than one NgModule. This would cause an error unless we reset which\n * NgModule the component belongs to. We keep the list of compiled components here so that the\n * TestBed can reset it later.\n */\nlet ownerNgModule = new WeakMap<Type<any>, NgModuleType<any>>();\nlet verifiedNgModule = new WeakMap<NgModuleType<any>, boolean>();\n\nexport function resetCompiledComponents(): void {\n ownerNgModule = new WeakMap<Type<any>, NgModuleType<any>>();\n verifiedNgModule = new WeakMap<NgModuleType<any>, boolean>();\n moduleQueue.length = 0;\n GENERATED_COMP_IDS.clear();\n}\n\n/**\n * Computes the combined declarations of explicit declarations, as well as declarations inherited by\n * traversing the exports of imported modules.\n * @param type\n */\nfunction computeCombinedExports(type: Type<any>): Type<any>[] {\n type = resolveForwardRef(type);\n const ngModuleDef = getNgModuleDef(type);\n\n // a standalone component, directive or pipe\n if (ngModuleDef === null) {\n return [type];\n }\n\n return flatten(\n maybeUnwrapFn(ngModuleDef.exports).map((type) => {\n const ngModuleDef = getNgModuleDef(type);\n if (ngModuleDef) {\n verifySemanticsOfNgModuleDef(type as any as NgModuleType, false);\n return computeCombinedExports(type);\n } else {\n return type;\n }\n }),\n );\n}\n\n/**\n * Some declared components may be compiled asynchronously, and thus may not have their\n * ɵcmp set yet. If this is the case, then a reference to the module is written into\n * the `ngSelectorScope` property of the declared type.\n */\nfunction setScopeOnDeclaredComponents(moduleType: Type<any>, ngModule: NgModule) {\n const declarations: Type<any>[] = flatten(ngModule.declarations || EMPTY_ARRAY);\n\n const transitiveScopes = transitiveScopesFor(moduleType);\n\n declarations.forEach((declaration) => {\n declaration = resolveForwardRef(declaration);\n if (declaration.hasOwnProperty(NG_COMP_DEF)) {\n // A `ɵcmp` field exists - go ahead and patch the component directly.\n const component = declaration as Type<any> & {ɵcmp: ComponentDef<any>};\n const componentDef = getComponentDef(component)!;\n patchComponentDefWithScope(componentDef, transitiveScopes);\n } else if (\n !declaration.hasOwnProperty(NG_DIR_DEF) &&\n !declaration.hasOwnProperty(NG_PIPE_DEF)\n ) {\n // Set `ngSelectorScope` for future reference when the component compilation finishes.\n (declaration as Type<any> & {ngSelectorScope?: any}).ngSelectorScope = moduleType;\n }\n });\n}\n\n/**\n * Patch the definition of a component with directives and pipes from the compilation scope of\n * a given module.\n */\nexport function patchComponentDefWithScope<C>(\n componentDef: ComponentDef<C>,\n transitiveScopes: NgModuleTransitiveScopes,\n) {\n componentDef.directiveDefs = () =>\n Array.from(transitiveScopes.compilation.directives)\n .map((dir) =>\n dir.hasOwnProperty(NG_COMP_DEF) ? getComponentDef(dir)! : getDirectiveDef(dir)!,\n )\n .filter((def) => !!def);\n componentDef.pipeDefs = () =>\n Array.from(transitiveScopes.compilation.pipes).map((pipe) => getPipeDef(pipe)!);\n componentDef.schemas = transitiveScopes.schemas;\n\n // Since we avoid Components/Directives/Pipes recompiling in case there are no overrides, we\n // may face a problem where previously compiled defs available to a given Component/Directive\n // are cached in TView and may become stale (in case any of these defs gets recompiled). In\n // order to avoid this problem, we force fresh TView to be created.\n componentDef.tView = null;\n}\n\n/**\n * Compute the pair of transitive scopes (compilation scope and exported scope) for a given type\n * (either a NgModule or a standalone component / directive / pipe).\n */\nexport function transitiveScopesFor<T>(type: Type<T>): NgModuleTransitiveScopes {\n if (isNgModule(type)) {\n if (USE_RUNTIME_DEPS_TRACKER_FOR_JIT) {\n const scope = depsTracker.getNgModuleScope(type);\n const def = getNgModuleDef(type, true);\n return {\n schemas: def.schemas || null,\n ...scope,\n };\n } else {\n return transitiveScopesForNgModule(type);\n }\n } else if (isStandalone(type)) {\n const directiveDef = getComponentDef(type) || getDirectiveDef(type);\n if (directiveDef !== null) {\n return {\n schemas: null,\n compilation: {\n directives: new Set<any>(),\n pipes: new Set<any>(),\n },\n exported: {\n directives: new Set<any>([type]),\n pipes: new Set<any>(),\n },\n };\n }\n\n const pipeDef = getPipeDef(type);\n if (pipeDef !== null) {\n return {\n schemas: null,\n compilation: {\n directives: new Set<any>(),\n pipes: new Set<any>(),\n },\n exported: {\n directives: new Set<any>(),\n pipes: new Set<any>([type]),\n },\n };\n }\n }\n\n // TODO: change the error message to be more user-facing and take standalone into account\n throw new Error(`${type.name} does not have a module def (ɵmod property)`);\n}\n\n/**\n * Compute the pair of transitive scopes (compilation scope and exported scope) for a given module.\n *\n * This operation is memoized and the result is cached on the module's definition. This function can\n * be called on modules with components that have not fully compiled yet, but the result should not\n * be used until they have.\n *\n * @param moduleType module that transitive scope should be calculated for.\n */\nexport function transitiveScopesForNgModule<T>(moduleType: Type<T>): NgModuleTransitiveScopes {\n const def = getNgModuleDef(moduleType, true);\n\n if (def.transitiveCompileScopes !== null) {\n return def.transitiveCompileScopes;\n }\n\n const scopes: NgModuleTransitiveScopes = {\n schemas: def.schemas || null,\n compilation: {\n directives: new Set<any>(),\n pipes: new Set<any>(),\n },\n exported: {\n directives: new Set<any>(),\n pipes: new Set<any>(),\n },\n };\n\n maybeUnwrapFn(def.imports).forEach(<I>(imported: Type<I>) => {\n // When this module imports another, the imported module's exported directives and pipes are\n // added to the compilation scope of this module.\n const importedScope = transitiveScopesFor(imported);\n importedScope.exported.directives.forEach((entry) => scopes.compilation.directives.add(entry));\n importedScope.exported.pipes.forEach((entry) => scopes.compilation.pipes.add(entry));\n });\n\n maybeUnwrapFn(def.declarations).forEach((declared) => {\n const declaredWithDefs = declared as Type<any> & {\n ɵpipe?: any;\n };\n\n if (getPipeDef(declaredWithDefs)) {\n scopes.compilation.pipes.add(declared);\n } else {\n // Either declared has a ɵcmp or ɵdir, or it's a component which hasn't\n // had its template compiled yet. In either case, it gets added to the compilation's\n // directives.\n scopes.compilation.directives.add(declared);\n }\n });\n\n maybeUnwrapFn(def.exports).forEach(<E>(exported: Type<E>) => {\n const exportedType = exported as Type<E> & {\n // Components, Directives, NgModules, and Pipes can all be exported.\n ɵcmp?: any;\n ɵdir?: any;\n ɵmod?: NgModuleDef<E>;\n ɵpipe?: any;\n };\n\n // Either the type is a module, a pipe, or a component/directive (which may not have a\n // ɵcmp as it might be compiled asynchronously).\n if (isNgModule(exportedType)) {\n // When this module exports another, the exported module's exported directives and pipes are\n // added to both the compilation and exported scopes of this module.\n const exportedScope = transitiveScopesFor(exportedType);\n exportedScope.exported.directives.forEach((entry) => {\n scopes.compilation.directives.add(entry);\n scopes.exported.directives.add(entry);\n });\n exportedScope.exported.pipes.forEach((entry) => {\n scopes.compilation.pipes.add(entry);\n scopes.exported.pipes.add(entry);\n });\n } else if (getPipeDef(exportedType)) {\n scopes.exported.pipes.add(exportedType);\n } else {\n scopes.exported.directives.add(exportedType);\n }\n });\n\n def.transitiveCompileScopes = scopes;\n return scopes;\n}\n\nfunction expandModuleWithProviders(value: Type<any> | ModuleWithProviders<{}>): Type<any> {\n if (isModuleWithProviders(value)) {\n return value.ngModule;\n }\n return value;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n getCompilerFacade,\n JitCompilerUsage,\n R3DirectiveMetadataFacade,\n} from '../../compiler/compiler_facade';\nimport {\n R3ComponentMetadataFacade,\n R3QueryMetadataFacade,\n} from '../../compiler/compiler_facade_interface';\nimport {resolveForwardRef} from '../../di/forward_ref';\nimport {getReflect, reflectDependencies} from '../../di/jit/util';\nimport {Type} from '../../interface/type';\nimport type {Query} from '../../metadata/di';\nimport type {Component, Directive, Input} from '../../metadata/directives';\nimport {\n componentNeedsResolution,\n maybeQueueResolutionOfComponentResources,\n} from '../../metadata/resource_loading';\nimport {ViewEncapsulation} from '../../metadata/view';\nimport {flatten} from '../../util/array_utils';\nimport {EMPTY_ARRAY, EMPTY_OBJ} from '../../util/empty';\nimport {initNgDevMode} from '../../util/ng_dev_mode';\nimport {getComponentDef, getDirectiveDef, getNgModuleDef, getPipeDef} from '../def_getters';\nimport {depsTracker, USE_RUNTIME_DEPS_TRACKER_FOR_JIT} from '../deps_tracker/deps_tracker';\nimport {NG_COMP_DEF, NG_DIR_DEF, NG_FACTORY_DEF} from '../fields';\nimport {ComponentDef, ComponentType, DirectiveDefList, PipeDefList} from '../interfaces/definition';\nimport {stringifyForError} from '../util/stringify_utils';\n\nimport {angularCoreEnv} from './environment';\nimport {getJitOptions} from './jit_options';\nimport {\n flushModuleScopingQueueAsMuchAsPossible,\n patchComponentDefWithScope,\n transitiveScopesFor,\n} from './module';\nimport {isComponent, verifyStandaloneImport} from './util';\n\n/**\n * Keep track of the compilation depth to avoid reentrancy issues during JIT compilation. This\n * matters in the following scenario:\n *\n * Consider a component 'A' that extends component 'B', both declared in module 'M'. During\n * the compilation of 'A' the definition of 'B' is requested to capture the inheritance chain,\n * potentially triggering compilation of 'B'. If this nested compilation were to trigger\n * `flushModuleScopingQueueAsMuchAsPossible` it may happen that module 'M' is still pending in the\n * queue, resulting in 'A' and 'B' to be patched with the NgModule scope. As the compilation of\n * 'A' is still in progress, this would introduce a circular dependency on its compilation. To avoid\n * this issue, the module scope queue is only flushed for compilations at the depth 0, to ensure\n * all compilations have finished.\n */\nlet compilationDepth = 0;\n\n/**\n * Compile an Angular component according to its decorator metadata, and patch the resulting\n * component def (ɵcmp) onto the component type.\n *\n * Compilation may be asynchronous (due to the need to resolve URLs for the component template or\n * other resources, for example). In the event that compilation is not immediate, `compileComponent`\n * will enqueue resource resolution into a global queue and will fail to return the `ɵcmp`\n * until the global queue has been resolved with a call to `resolveComponentResources`.\n */\nexport function compileComponent(type: Type<any>, metadata: Component): void {\n // Initialize ngDevMode. This must be the first statement in compileComponent.\n // See the `initNgDevMode` docstring for more information.\n (typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode();\n\n let ngComponentDef: ComponentDef<unknown> | null = null;\n\n // Metadata may have resources which need to be resolved.\n maybeQueueResolutionOfComponentResources(type, metadata);\n\n // Note that we're using the same function as `Directive`, because that's only subset of metadata\n // that we need to create the ngFactoryDef. We're avoiding using the component metadata\n // because we'd have to resolve the asynchronous templates.\n addDirectiveFactoryDef(type, metadata);\n\n Object.defineProperty(type, NG_COMP_DEF, {\n get: () => {\n if (ngComponentDef === null) {\n const compiler = getCompilerFacade({\n usage: JitCompilerUsage.Decorator,\n kind: 'component',\n type: type,\n });\n\n if (componentNeedsResolution(metadata)) {\n const error = [`Component '${type.name}' is not resolved:`];\n if (metadata.templateUrl) {\n error.push(` - templateUrl: ${metadata.templateUrl}`);\n }\n if (metadata.styleUrls && metadata.styleUrls.length) {\n error.push(` - styleUrls: ${JSON.stringify(metadata.styleUrls)}`);\n }\n if (metadata.styleUrl) {\n error.push(` - styleUrl: ${metadata.styleUrl}`);\n }\n error.push(`Did you run and wait for 'resolveComponentResources()'?`);\n throw new Error(error.join('\\n'));\n }\n\n // This const was called `jitOptions` previously but had to be renamed to `options` because\n // of a bug with Terser that caused optimized JIT builds to throw a `ReferenceError`.\n // This bug was investigated in https://github.com/angular/angular-cli/issues/17264.\n // We should not rename it back until https://github.com/terser/terser/issues/615 is fixed.\n const options = getJitOptions();\n let preserveWhitespaces = metadata.preserveWhitespaces;\n if (preserveWhitespaces === undefined) {\n if (options !== null && options.preserveWhitespaces !== undefined) {\n preserveWhitespaces = options.preserveWhitespaces;\n } else {\n preserveWhitespaces = false;\n }\n }\n let encapsulation = metadata.encapsulation;\n if (encapsulation === undefined) {\n if (options !== null && options.defaultEncapsulation !== undefined) {\n encapsulation = options.defaultEncapsulation;\n } else {\n encapsulation = ViewEncapsulation.Emulated;\n }\n }\n\n const templateUrl = metadata.templateUrl || `ng:///${type.name}/template.html`;\n const meta: R3ComponentMetadataFacade = {\n ...directiveMetadata(type, metadata),\n typeSourceSpan: compiler.createParseSourceSpan('Component', type.name, templateUrl),\n template: metadata.template || '',\n preserveWhitespaces,\n styles:\n typeof metadata.styles === 'string'\n ? [metadata.styles]\n : metadata.styles || EMPTY_ARRAY,\n animations: metadata.animations,\n // JIT components are always compiled against an empty set of `declarations`. Instead, the\n // `directiveDefs` and `pipeDefs` are updated at a later point:\n // * for NgModule-based components, they're set when the NgModule which declares the\n // component resolves in the module scoping queue\n // * for standalone components, they're set just below, after `compileComponent`.\n declarations: [],\n changeDetection: metadata.changeDetection,\n encapsulation,\n interpolation: metadata.interpolation,\n viewProviders: metadata.viewProviders || null,\n };\n\n compilationDepth++;\n try {\n if (meta.usesInheritance) {\n addDirectiveDefToUndecoratedParents(type);\n }\n ngComponentDef = compiler.compileComponent(\n angularCoreEnv,\n templateUrl,\n meta,\n ) as ComponentDef<unknown>;\n\n if (meta.isStandalone) {\n // Patch the component definition for standalone components with `directiveDefs` and\n // `pipeDefs` functions which lazily compute the directives/pipes available in the\n // standalone component. Also set `dependencies` to the lazily resolved list of imports.\n const imports: Type<any>[] = flatten(metadata.imports || EMPTY_ARRAY);\n const {directiveDefs, pipeDefs} = getStandaloneDefFunctions(type, imports);\n ngComponentDef.directiveDefs = directiveDefs;\n ngComponentDef.pipeDefs = pipeDefs;\n ngComponentDef.dependencies = () => imports.map(resolveForwardRef);\n }\n } finally {\n // Ensure that the compilation depth is decremented even when the compilation failed.\n compilationDepth--;\n }\n\n if (compilationDepth === 0) {\n // When NgModule decorator executed, we enqueued the module definition such that\n // it would only dequeue and add itself as module scope to all of its declarations,\n // but only if if all of its declarations had resolved. This call runs the check\n // to see if any modules that are in the queue can be dequeued and add scope to\n // their declarations.\n flushModuleScopingQueueAsMuchAsPossible();\n }\n\n // If component compilation is async, then the @NgModule annotation which declares the\n // component may execute and set an ngSelectorScope property on the component type. This\n // allows the component to patch itself with directiveDefs from the module after it\n // finishes compiling.\n if (hasSelectorScope(type)) {\n const scopes = transitiveScopesFor(type.ngSelectorScope);\n patchComponentDefWithScope(ngComponentDef, scopes);\n }\n\n if (metadata.schemas) {\n if (meta.isStandalone) {\n ngComponentDef.schemas = metadata.schemas;\n } else {\n throw new Error(\n `The 'schemas' was specified for the ${stringifyForError(\n type,\n )} but is only valid on a component that is standalone.`,\n );\n }\n } else if (meta.isStandalone) {\n ngComponentDef.schemas = [];\n }\n }\n return ngComponentDef;\n },\n set: (def: ComponentDef<unknown> | null) => {\n ngComponentDef = def;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n}\n\n/**\n * Build memoized `directiveDefs` and `pipeDefs` functions for the component definition of a\n * standalone component, which process `imports` and filter out directives and pipes. The use of\n * memoized functions here allows for the delayed resolution of any `forwardRef`s present in the\n * component's `imports`.\n */\nfunction getStandaloneDefFunctions(\n type: Type<any>,\n imports: Type<any>[],\n): {\n directiveDefs: () => DirectiveDefList;\n pipeDefs: () => PipeDefList;\n} {\n let cachedDirectiveDefs: DirectiveDefList | null = null;\n let cachedPipeDefs: PipeDefList | null = null;\n const directiveDefs = () => {\n if (!USE_RUNTIME_DEPS_TRACKER_FOR_JIT) {\n if (cachedDirectiveDefs === null) {\n // Standalone components are always able to self-reference, so include the component's own\n // definition in its `directiveDefs`.\n cachedDirectiveDefs = [getComponentDef(type)!];\n const seen = new Set<Type<unknown>>([type]);\n\n for (const rawDep of imports) {\n ngDevMode && verifyStandaloneImport(rawDep, type);\n\n const dep = resolveForwardRef(rawDep);\n if (seen.has(dep)) {\n continue;\n }\n seen.add(dep);\n\n if (!!getNgModuleDef(dep)) {\n const scope = transitiveScopesFor(dep);\n for (const dir of scope.exported.directives) {\n const def = getComponentDef(dir) || getDirectiveDef(dir);\n if (def && !seen.has(dir)) {\n seen.add(dir);\n cachedDirectiveDefs.push(def);\n }\n }\n } else {\n const def = getComponentDef(dep) || getDirectiveDef(dep);\n if (def) {\n cachedDirectiveDefs.push(def);\n }\n }\n }\n }\n return cachedDirectiveDefs;\n } else {\n if (ngDevMode) {\n for (const rawDep of imports) {\n verifyStandaloneImport(rawDep, type);\n }\n }\n\n if (!isComponent(type)) {\n return [];\n }\n\n const scope = depsTracker.getStandaloneComponentScope(type, imports);\n\n return [...scope.compilation.directives]\n .map((p) => (getComponentDef(p) || getDirectiveDef(p))!)\n .filter((d) => d !== null);\n }\n };\n\n const pipeDefs = () => {\n if (!USE_RUNTIME_DEPS_TRACKER_FOR_JIT) {\n if (cachedPipeDefs === null) {\n cachedPipeDefs = [];\n const seen = new Set<Type<unknown>>();\n\n for (const rawDep of imports) {\n const dep = resolveForwardRef(rawDep);\n if (seen.has(dep)) {\n continue;\n }\n seen.add(dep);\n\n if (!!getNgModuleDef(dep)) {\n const scope = transitiveScopesFor(dep);\n for (const pipe of scope.exported.pipes) {\n const def = getPipeDef(pipe);\n if (def && !seen.has(pipe)) {\n seen.add(pipe);\n cachedPipeDefs.push(def);\n }\n }\n } else {\n const def = getPipeDef(dep);\n if (def) {\n cachedPipeDefs.push(def);\n }\n }\n }\n }\n return cachedPipeDefs;\n } else {\n if (ngDevMode) {\n for (const rawDep of imports) {\n verifyStandaloneImport(rawDep, type);\n }\n }\n\n if (!isComponent(type)) {\n return [];\n }\n\n const scope = depsTracker.getStandaloneComponentScope(type, imports);\n\n return [...scope.compilation.pipes].map((p) => getPipeDef(p)!).filter((d) => d !== null);\n }\n };\n\n return {\n directiveDefs,\n pipeDefs,\n };\n}\n\nfunction hasSelectorScope<T>(\n component: Type<T>,\n): component is Type<T> & {ngSelectorScope: Type<any>} {\n return (component as {ngSelectorScope?: any}).ngSelectorScope !== undefined;\n}\n\n/**\n * Compile an Angular directive according to its decorator metadata, and patch the resulting\n * directive def onto the component type.\n *\n * In the event that compilation is not immediate, `compileDirective` will return a `Promise` which\n * will resolve when compilation completes and the directive becomes usable.\n */\nexport function compileDirective(type: Type<any>, directive: Directive | null): void {\n let ngDirectiveDef: any = null;\n\n addDirectiveFactoryDef(type, directive || {});\n\n Object.defineProperty(type, NG_DIR_DEF, {\n get: () => {\n if (ngDirectiveDef === null) {\n // `directive` can be null in the case of abstract directives as a base class\n // that use `@Directive()` with no selector. In that case, pass empty object to the\n // `directiveMetadata` function instead of null.\n const meta = getDirectiveMetadata(type, directive || {});\n const compiler = getCompilerFacade({\n usage: JitCompilerUsage.Decorator,\n kind: 'directive',\n type,\n });\n ngDirectiveDef = compiler.compileDirective(\n angularCoreEnv,\n meta.sourceMapUrl,\n meta.metadata,\n );\n }\n return ngDirectiveDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n}\n\nfunction getDirectiveMetadata(type: Type<any>, metadata: Directive) {\n const name = type && type.name;\n const sourceMapUrl = `ng:///${name}/ɵdir.js`;\n const compiler = getCompilerFacade({usage: JitCompilerUsage.Decorator, kind: 'directive', type});\n const facade = directiveMetadata(type as ComponentType<any>, metadata);\n facade.typeSourceSpan = compiler.createParseSourceSpan('Directive', name, sourceMapUrl);\n if (facade.usesInheritance) {\n addDirectiveDefToUndecoratedParents(type);\n }\n return {metadata: facade, sourceMapUrl};\n}\n\nfunction addDirectiveFactoryDef(type: Type<any>, metadata: Directive | Component) {\n let ngFactoryDef: any = null;\n\n Object.defineProperty(type, NG_FACTORY_DEF, {\n get: () => {\n if (ngFactoryDef === null) {\n const meta = getDirectiveMetadata(type, metadata);\n const compiler = getCompilerFacade({\n usage: JitCompilerUsage.Decorator,\n kind: 'directive',\n type,\n });\n ngFactoryDef = compiler.compileFactory(angularCoreEnv, `ng:///${type.name}/ɵfac.js`, {\n name: meta.metadata.name,\n type: meta.metadata.type,\n typeArgumentCount: 0,\n deps: reflectDependencies(type),\n target: compiler.FactoryTarget.Directive,\n });\n }\n return ngFactoryDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n}\n\nexport function extendsDirectlyFromObject(type: Type<any>): boolean {\n return Object.getPrototypeOf(type.prototype) === Object.prototype;\n}\n\n/**\n * Extract the `R3DirectiveMetadata` for a particular directive (either a `Directive` or a\n * `Component`).\n */\nexport function directiveMetadata(type: Type<any>, metadata: Directive): R3DirectiveMetadataFacade {\n // Reflect inputs and outputs.\n const reflect = getReflect();\n const propMetadata = reflect.ownPropMetadata(type);\n\n return {\n name: type.name,\n type: type,\n selector: metadata.selector !== undefined ? metadata.selector : null,\n host: metadata.host || EMPTY_OBJ,\n propMetadata: propMetadata,\n inputs: metadata.inputs || EMPTY_ARRAY,\n outputs: metadata.outputs || EMPTY_ARRAY,\n queries: extractQueriesMetadata(type, propMetadata, isContentQuery),\n lifecycle: {usesOnChanges: reflect.hasLifecycleHook(type, 'ngOnChanges')},\n typeSourceSpan: null!,\n usesInheritance: !extendsDirectlyFromObject(type),\n exportAs: extractExportAs(metadata.exportAs),\n providers: metadata.providers || null,\n viewQueries: extractQueriesMetadata(type, propMetadata, isViewQuery),\n isStandalone: metadata.standalone === undefined ? true : !!metadata.standalone,\n isSignal: !!metadata.signals,\n hostDirectives:\n metadata.hostDirectives?.map((directive) =>\n typeof directive === 'function' ? {directive} : directive,\n ) || null,\n };\n}\n\n/**\n * Adds a directive definition to all parent classes of a type that don't have an Angular decorator.\n */\nfunction addDirectiveDefToUndecoratedParents(type: Type<any>) {\n const objPrototype = Object.prototype;\n let parent = Object.getPrototypeOf(type.prototype).constructor;\n\n // Go up the prototype until we hit `Object`.\n while (parent && parent !== objPrototype) {\n // Since inheritance works if the class was annotated already, we only need to add\n // the def if there are no annotations and the def hasn't been created already.\n if (\n !getDirectiveDef(parent) &&\n !getComponentDef(parent) &&\n shouldAddAbstractDirective(parent)\n ) {\n compileDirective(parent, null);\n }\n parent = Object.getPrototypeOf(parent);\n }\n}\n\nfunction convertToR3QueryPredicate(selector: any): any | string[] {\n return typeof selector === 'string' ? splitByComma(selector) : resolveForwardRef(selector);\n}\n\nexport function convertToR3QueryMetadata(propertyName: string, ann: Query): R3QueryMetadataFacade {\n return {\n propertyName: propertyName,\n predicate: convertToR3QueryPredicate(ann.selector),\n descendants: ann.descendants,\n first: ann.first,\n read: ann.read ? ann.read : null,\n static: !!ann.static,\n emitDistinctChangesOnly: !!ann.emitDistinctChangesOnly,\n isSignal: !!ann.isSignal,\n };\n}\nfunction extractQueriesMetadata(\n type: Type<any>,\n propMetadata: {[key: string]: any[]},\n isQueryAnn: (ann: any) => ann is Query,\n): R3QueryMetadataFacade[] {\n const queriesMeta: R3QueryMetadataFacade[] = [];\n for (const field in propMetadata) {\n if (propMetadata.hasOwnProperty(field)) {\n const annotations = propMetadata[field];\n annotations.forEach((ann) => {\n if (isQueryAnn(ann)) {\n if (!ann.selector) {\n throw new Error(\n `Can't construct a query for the property \"${field}\" of ` +\n `\"${stringifyForError(type)}\" since the query selector wasn't defined.`,\n );\n }\n if (annotations.some(isInputAnnotation)) {\n throw new Error(`Cannot combine @Input decorators with query decorators`);\n }\n queriesMeta.push(convertToR3QueryMetadata(field, ann));\n }\n });\n }\n }\n return queriesMeta;\n}\n\nfunction extractExportAs(exportAs: string | undefined): string[] | null {\n return exportAs === undefined ? null : splitByComma(exportAs);\n}\n\nfunction isContentQuery(value: any): value is Query {\n const name = value.ngMetadataName;\n return name === 'ContentChild' || name === 'ContentChildren';\n}\n\nfunction isViewQuery(value: any): value is Query {\n const name = value.ngMetadataName;\n return name === 'ViewChild' || name === 'ViewChildren';\n}\n\nfunction isInputAnnotation(value: any): value is Input {\n return value.ngMetadataName === 'Input';\n}\n\nfunction splitByComma(value: string): string[] {\n return value.split(',').map((piece) => piece.trim());\n}\n\nconst LIFECYCLE_HOOKS = [\n 'ngOnChanges',\n 'ngOnInit',\n 'ngOnDestroy',\n 'ngDoCheck',\n 'ngAfterViewInit',\n 'ngAfterViewChecked',\n 'ngAfterContentInit',\n 'ngAfterContentChecked',\n];\n\nfunction shouldAddAbstractDirective(type: Type<any>): boolean {\n const reflect = getReflect();\n\n if (LIFECYCLE_HOOKS.some((hookName) => reflect.hasLifecycleHook(type, hookName))) {\n return true;\n }\n\n const propMetadata = reflect.propMetadata(type);\n\n for (const field in propMetadata) {\n const annotations = propMetadata[field];\n\n for (let i = 0; i < annotations.length; i++) {\n const current = annotations[i];\n const metadataName = current.ngMetadataName;\n\n if (\n isInputAnnotation(current) ||\n isContentQuery(current) ||\n isViewQuery(current) ||\n metadataName === 'Output' ||\n metadataName === 'HostBinding' ||\n metadataName === 'HostListener'\n ) {\n return true;\n }\n }\n }\n\n return false;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n getCompilerFacade,\n JitCompilerUsage,\n R3PipeMetadataFacade,\n} from '../../compiler/compiler_facade';\nimport {reflectDependencies} from '../../di/jit/util';\nimport {Type} from '../../interface/type';\nimport type {Pipe} from '../../metadata/directives';\nimport {NG_FACTORY_DEF, NG_PIPE_DEF} from '../fields';\n\nimport {angularCoreEnv} from './environment';\n\nexport function compilePipe(type: Type<any>, meta: Pipe): void {\n let ngPipeDef: any = null;\n let ngFactoryDef: any = null;\n\n Object.defineProperty(type, NG_FACTORY_DEF, {\n get: () => {\n if (ngFactoryDef === null) {\n const metadata = getPipeMetadata(type, meta);\n const compiler = getCompilerFacade({\n usage: JitCompilerUsage.Decorator,\n kind: 'pipe',\n type: metadata.type,\n });\n ngFactoryDef = compiler.compileFactory(angularCoreEnv, `ng:///${metadata.name}/ɵfac.js`, {\n name: metadata.name,\n type: metadata.type,\n typeArgumentCount: 0,\n deps: reflectDependencies(type),\n target: compiler.FactoryTarget.Pipe,\n });\n }\n return ngFactoryDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n\n Object.defineProperty(type, NG_PIPE_DEF, {\n get: () => {\n if (ngPipeDef === null) {\n const metadata = getPipeMetadata(type, meta);\n const compiler = getCompilerFacade({\n usage: JitCompilerUsage.Decorator,\n kind: 'pipe',\n type: metadata.type,\n });\n ngPipeDef = compiler.compilePipe(\n angularCoreEnv,\n `ng:///${metadata.name}/ɵpipe.js`,\n metadata,\n );\n }\n return ngPipeDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n}\n\nfunction getPipeMetadata(type: Type<any>, meta: Pipe): R3PipeMetadataFacade {\n return {\n type: type,\n name: type.name,\n pipeName: meta.name,\n pure: meta.pure !== undefined ? meta.pure : true,\n isStandalone: meta.standalone === undefined ? true : !!meta.standalone,\n };\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ChangeDetectionStrategy} from '../change_detection/constants';\nimport {Provider} from '../di/interface/provider';\nimport {Type} from '../interface/type';\nimport {compileComponent, compileDirective} from '../render3/jit/directive';\nimport {compilePipe} from '../render3/jit/pipe';\nimport {makeDecorator, makePropDecorator, TypeDecorator} from '../util/decorators';\n\nimport {SchemaMetadata} from './schema';\nimport {ViewEncapsulation} from './view';\n\n/**\n * Type of the Directive decorator / constructor function.\n * @publicApi\n */\nexport interface DirectiveDecorator {\n /**\n * Decorator that marks a class as an Angular directive.\n * You can define your own directives to attach custom behavior to elements in the DOM.\n *\n * The options provide configuration metadata that determines\n * how the directive should be processed, instantiated and used at\n * runtime.\n *\n * Directive classes, like component classes, can implement\n * [life-cycle hooks](guide/components/lifecycle) to influence their configuration and behavior.\n *\n *\n * @usageNotes\n * To define a directive, mark the class with the decorator and provide metadata.\n *\n * ```ts\n * import {Directive} from '@angular/core';\n *\n * @Directive({\n * selector: 'my-directive',\n * })\n * export class MyDirective {\n * ...\n * }\n * ```\n *\n * ### Declaring directives\n *\n * In order to make a directive available to other components in your application, you should do\n * one of the following:\n * - either mark the directive as [standalone](guide/components/importing),\n * - or declare it in an NgModule by adding it to the `declarations` and `exports` fields.\n *\n * ** Marking a directive as standalone **\n *\n * You can add the `standalone: true` flag to the Directive decorator metadata to declare it as\n * [standalone](guide/components/importing):\n *\n * ```ts\n * @Directive({\n * standalone: true,\n * selector: 'my-directive',\n * })\n * class MyDirective {}\n * ```\n *\n * When marking a directive as standalone, please make sure that the directive is not already\n * declared in an NgModule.\n *\n *\n * ** Declaring a directive in an NgModule **\n *\n * Another approach is to declare a directive in an NgModule:\n *\n * ```ts\n * @Directive({\n * selector: 'my-directive',\n * })\n * class MyDirective {}\n *\n * @NgModule({\n * declarations: [MyDirective, SomeComponent],\n * exports: [MyDirective], // making it available outside of this module\n * })\n * class SomeNgModule {}\n * ```\n *\n * When declaring a directive in an NgModule, please make sure that:\n * - the directive is declared in exactly one NgModule.\n * - the directive is not standalone.\n * - you do not re-declare a directive imported from another module.\n * - the directive is included into the `exports` field as well if you want this directive to be\n * accessible for components outside of the NgModule.\n *\n *\n * @Annotation\n */\n (obj?: Directive): TypeDecorator;\n\n /**\n * See the `Directive` decorator.\n */\n new (obj?: Directive): Directive;\n}\n\n/**\n * Directive decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport interface Directive {\n /**\n * The CSS selector that identifies this directive in a template\n * and triggers instantiation of the directive.\n *\n * Declare as one of the following:\n *\n * - `element-name`: Select by element name.\n * - `.class`: Select by class name.\n * - `[attribute]`: Select by attribute name.\n * - `[attribute=value]`: Select by attribute name and value.\n * - `:not(sub_selector)`: Select only if the element does not match the `sub_selector`.\n * - `selector1, selector2`: Select if either `selector1` or `selector2` matches.\n *\n * Angular only allows directives to apply on CSS selectors that do not cross\n * element boundaries.\n *\n * For the following template HTML, a directive with an `input[type=text]` selector,\n * would be instantiated only on the `<input type=\"text\">` element.\n *\n * ```html\n * <form>\n * <input type=\"text\">\n * <input type=\"radio\">\n * <form>\n * ```\n *\n */\n selector?: string;\n\n /**\n * Enumerates the set of data-bound input properties for a directive\n *\n * Angular automatically updates input properties during change detection.\n * The `inputs` property accepts either strings or object literals that configure the directive\n * properties that should be exposed as inputs.\n *\n * When an object literal is passed in, the `name` property indicates which property on the\n * class the input should write to, while the `alias` determines the name under\n * which the input will be available in template bindings. The `required` property indicates that\n * the input is required which will trigger a compile-time error if it isn't passed in when the\n * directive is used.\n *\n * When a string is passed into the `inputs` array, it can have a format of `'name'` or\n * `'name: alias'` where `name` is the property on the class that the directive should write\n * to, while the `alias` determines the name under which the input will be available in\n * template bindings. String-based input definitions are assumed to be optional.\n *\n * @usageNotes\n *\n * The following example creates a component with two data-bound properties.\n *\n * ```ts\n * @Component({\n * selector: 'bank-account',\n * inputs: ['bankName', {name: 'id', alias: 'account-id'}],\n * template: `\n * Bank Name: {{bankName}}\n * Account Id: {{id}}\n * `\n * })\n * class BankAccount {\n * bankName: string;\n * id: string;\n * }\n * ```\n *\n */\n inputs?: (\n | {\n name: string;\n alias?: string;\n required?: boolean;\n transform?: (value: any) => any;\n }\n | string\n )[];\n\n /**\n * Enumerates the set of event-bound output properties.\n *\n * When an output property emits an event, an event handler attached to that event\n * in the template is invoked.\n *\n * The `outputs` property defines a set of `directiveProperty` to `alias`\n * configuration:\n *\n * - `directiveProperty` specifies the component property that emits events.\n * - `alias` specifies the DOM property the event handler is attached to.\n *\n * @usageNotes\n *\n * ```ts\n * @Component({\n * selector: 'child-dir',\n * outputs: [ 'bankNameChange' ],\n * template: `<input (input)=\"bankNameChange.emit($event.target.value)\" />`\n * })\n * class ChildDir {\n * bankNameChange: EventEmitter<string> = new EventEmitter<string>();\n * }\n *\n * @Component({\n * selector: 'main',\n * template: `\n * {{ bankName }} <child-dir (bankNameChange)=\"onBankNameChange($event)\"></child-dir>\n * `\n * })\n * class MainComponent {\n * bankName: string;\n *\n * onBankNameChange(bankName: string) {\n * this.bankName = bankName;\n * }\n * }\n * ```\n *\n */\n outputs?: string[];\n\n /**\n * Configures the injector of this\n * directive or component with a token\n * that maps to a provider of a dependency.\n */\n providers?: Provider[];\n\n /**\n * Defines the name that can be used in the template to assign this directive to a variable.\n *\n * @usageNotes\n *\n * ```ts\n * @Directive({\n * selector: 'child-dir',\n * exportAs: 'child'\n * })\n * class ChildDir {\n * }\n *\n * @Component({\n * selector: 'main',\n * template: `<child-dir #c=\"child\"></child-dir>`\n * })\n * class MainComponent {\n * }\n * ```\n *\n */\n exportAs?: string;\n\n /**\n * Configures the queries that will be injected into the directive.\n *\n * Content queries are set before the `ngAfterContentInit` callback is called.\n * View queries are set before the `ngAfterViewInit` callback is called.\n *\n * @usageNotes\n *\n * The following example shows how queries are defined\n * and when their results are available in lifecycle hooks:\n *\n * ```ts\n * @Component({\n * selector: 'someDir',\n * queries: {\n * contentChildren: new ContentChildren(ChildDirective),\n * viewChildren: new ViewChildren(ChildDirective)\n * },\n * template: '<child-directive></child-directive>'\n * })\n * class SomeDir {\n * contentChildren: QueryList<ChildDirective>,\n * viewChildren: QueryList<ChildDirective>\n *\n * ngAfterContentInit() {\n * // contentChildren is set\n * }\n *\n * ngAfterViewInit() {\n * // viewChildren is set\n * }\n * }\n * ```\n *\n * @Annotation\n */\n queries?: {[key: string]: any};\n\n /**\n * Maps class properties to host element bindings for properties,\n * attributes, and events, using a set of key-value pairs.\n *\n * Angular automatically checks host property bindings during change detection.\n * If a binding changes, Angular updates the directive's host element.\n *\n * When the key is a property of the host element, the property value is\n * propagated to the specified DOM property.\n *\n * When the key is a static attribute in the DOM, the attribute value\n * is propagated to the specified property in the host element.\n *\n * For event handling:\n * - The key is the DOM event that the directive listens to.\n * To listen to global events, add the target to the event name.\n * The target can be `window`, `document` or `body`.\n * - The value is the statement to execute when the event occurs. If the\n * statement evaluates to `false`, then `preventDefault` is applied on the DOM\n * event. A handler method can refer to the `$event` local variable.\n *\n */\n host?: {[key: string]: string};\n\n /**\n * When present, this directive/component is ignored by the AOT compiler.\n * It remains in distributed code, and the JIT compiler attempts to compile it\n * at run time, in the browser.\n * To ensure the correct behavior, the app must import `@angular/compiler`.\n */\n jit?: true;\n\n /**\n * Angular directives marked as `standalone` do not need to be declared in an NgModule. Such\n * directives don't depend on any \"intermediate context\" of an NgModule (ex. configured\n * providers).\n *\n * More information about standalone components, directives, and pipes can be found in [this\n * guide](guide/components/importing).\n */\n standalone?: boolean;\n\n /**\n * // TODO(signals): Remove internal and add public documentation\n *\n * @internal\n */\n signals?: boolean;\n\n /**\n * Standalone directives that should be applied to the host whenever the directive is matched.\n * By default, none of the inputs or outputs of the host directives will be available on the host,\n * unless they are specified in the `inputs` or `outputs` properties.\n *\n * You can additionally alias inputs and outputs by putting a colon and the alias after the\n * original input or output name. For example, if a directive applied via `hostDirectives`\n * defines an input named `menuDisabled`, you can alias this to `disabled` by adding\n * `'menuDisabled: disabled'` as an entry to `inputs`.\n */\n hostDirectives?: (\n | Type<unknown>\n | {\n directive: Type<unknown>;\n inputs?: string[];\n outputs?: string[];\n }\n )[];\n}\n\n/**\n * Type of the Directive metadata.\n *\n * @publicApi\n */\nexport const Directive: DirectiveDecorator = makeDecorator(\n 'Directive',\n (dir: Directive = {}) => dir,\n undefined,\n undefined,\n (type: Type<any>, meta: Directive) => compileDirective(type, meta),\n);\n\n/**\n * Component decorator interface\n *\n * @publicApi\n */\nexport interface ComponentDecorator {\n /**\n * Decorator that marks a class as an Angular component and provides configuration\n * metadata that determines how the component should be processed,\n * instantiated, and used at runtime.\n *\n * Components are the most basic UI building block of an Angular app.\n * An Angular app contains a tree of Angular components.\n *\n * Angular components are a subset of directives, always associated with a template.\n * Unlike other directives, only one component can be instantiated for a given element in a\n * template.\n *\n * Standalone components can be directly imported in any other standalone component or NgModule.\n * NgModule based apps on the other hand require components to belong to an NgModule in\n * order for them to be available to another component or application. To make a component a\n * member of an NgModule, list it in the `declarations` field of the `NgModule` metadata.\n *\n * Note that, in addition to these options for configuring a directive,\n * you can control a component's runtime behavior by implementing\n * life-cycle hooks. For more information, see the\n * [Lifecycle Hooks](guide/components/lifecycle) guide.\n *\n * @usageNotes\n *\n * ### Setting component inputs\n *\n * The following example creates a component with two data-bound properties,\n * specified by the `inputs` value.\n *\n * {@example core/ts/metadata/directives.ts region='component-input'}\n *\n *\n * ### Setting component outputs\n *\n * The following example shows two output function that emit on an interval. One\n * emits an output every second, while the other emits every five seconds.\n *\n * {@example core/ts/metadata/directives.ts region='component-output-interval'}\n *\n * ### Injecting a class with a view provider\n *\n * The following simple example injects a class into a component\n * using the view provider specified in component metadata:\n *\n * ```ts\n * class Greeter {\n * greet(name:string) {\n * return 'Hello ' + name + '!';\n * }\n * }\n *\n * @Directive({\n * selector: 'needs-greeter'\n * })\n * class NeedsGreeter {\n * greeter:Greeter;\n *\n * constructor(greeter:Greeter) {\n * this.greeter = greeter;\n * }\n * }\n *\n * @Component({\n * selector: 'greet',\n * viewProviders: [\n * Greeter\n * ],\n * template: `<needs-greeter></needs-greeter>`\n * })\n * class HelloWorld {\n * }\n *\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, the 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 * By default, the AOT compiler 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 *\n * ```html\n * <button>Action 1</button> <button>Action 2</button>\n * ```\n *\n * becomes:\n *\n * ```html\n * <button>Action 1</button><button>Action 2</button>\n * ```\n *\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>before</a> <a>after</a> -->\n * ```\n *\n * To preserve sequences of whitespace characters, use the\n * `ngPreserveWhitespaces` attribute.\n *\n * @Annotation\n */\n (obj: Component): TypeDecorator;\n /**\n * See the `Component` decorator.\n */\n new (obj: Component): Component;\n}\n\n/**\n * Supplies configuration metadata for an Angular component.\n *\n * @publicApi\n */\nexport interface Component extends Directive {\n /**\n * The change-detection strategy to use for this component.\n *\n * When a component is instantiated, Angular creates a change detector,\n * which is responsible for propagating the component's bindings.\n * The strategy is one of:\n * - `ChangeDetectionStrategy#OnPush` sets the strategy to `CheckOnce` (on demand).\n * - `ChangeDetectionStrategy#Default` sets the strategy to `CheckAlways`.\n */\n changeDetection?: ChangeDetectionStrategy;\n\n /**\n * Defines the set of injectable objects that are visible to its view DOM children.\n * See [example](#injecting-a-class-with-a-view-provider).\n *\n */\n viewProviders?: Provider[];\n\n /**\n * The module ID of the module that contains the component.\n * The component must be able to resolve relative URLs for templates and styles.\n * SystemJS exposes the `__moduleName` variable within each module.\n * In CommonJS, this can be set to `module.id`.\n *\n * @deprecated This option does not have any effect. Will be removed in Angular v17.\n */\n moduleId?: string;\n\n /**\n * The relative path or absolute URL of a template file for an Angular component.\n * If provided, do not supply an inline template using `template`.\n *\n */\n templateUrl?: string;\n\n /**\n * An inline template for an Angular component. If provided,\n * do not supply a template file using `templateUrl`.\n *\n */\n template?: string;\n\n /**\n * One relative path or an absolute URL for file containing a CSS stylesheet to use\n * in this component.\n */\n styleUrl?: string;\n\n /**\n * Relative paths or absolute URLs for files containing CSS stylesheets to use in this component.\n */\n styleUrls?: string[];\n\n /**\n * One or more inline CSS stylesheets to use\n * in this component.\n */\n styles?: string | string[];\n\n /**\n * One or more animation `trigger()` calls, containing\n * [`state()`](api/animations/state) and `transition()` definitions.\n * See the [Animations guide](guide/animations) and animations API documentation.\n *\n */\n animations?: any[];\n\n /**\n * An encapsulation policy for the component's styling.\n * Possible values:\n * - `ViewEncapsulation.Emulated`: Apply modified component styles in order to emulate\n * a native Shadow DOM CSS encapsulation behavior.\n * - `ViewEncapsulation.None`: Apply component styles globally without any sort of encapsulation.\n * - `ViewEncapsulation.ShadowDom`: Use the browser's native Shadow DOM API to encapsulate styles.\n *\n * If not supplied, the value is taken from the `CompilerOptions`\n * which defaults to `ViewEncapsulation.Emulated`.\n *\n * If the policy is `ViewEncapsulation.Emulated` and the component has no\n * {@link Component#styles styles} nor {@link Component#styleUrls styleUrls},\n * the policy is automatically switched to `ViewEncapsulation.None`.\n */\n encapsulation?: ViewEncapsulation;\n\n /**\n * Overrides the default interpolation start and end delimiters (`{{` and `}}`).\n *\n * @deprecated use Angular's default interpolation delimiters instead.\n */\n interpolation?: [string, string];\n\n /**\n * True to preserve or false to remove potentially superfluous whitespace characters\n * from the compiled template. Whitespace characters are those matching the `\\s`\n * character class in JavaScript regular expressions. Default is false, unless\n * overridden in compiler options.\n */\n preserveWhitespaces?: boolean;\n\n /**\n * Angular components marked as `standalone` do not need to be declared in an NgModule. Such\n * components directly manage their own template dependencies (components, directives, and pipes\n * used in a template) via the imports property.\n *\n * More information about standalone components, directives, and pipes can be found in [this\n * guide](guide/components/importing).\n */\n standalone?: boolean;\n\n /**\n * The imports property specifies the standalone component's template dependencies — those\n * directives, components, and pipes that can be used within its template. Standalone components\n * can import other standalone components, directives, and pipes as well as existing NgModules.\n *\n * This property is only available for standalone components - specifying it for components\n * declared in an NgModule generates a compilation error.\n *\n * More information about standalone components, directives, and pipes can be found in [this\n * guide](guide/components/importing).\n */\n imports?: (Type<any> | ReadonlyArray<any>)[];\n\n /**\n * The `deferredImports` property specifies a standalone component's template dependencies,\n * which should be defer-loaded as a part of the `@defer` block. Angular *always* generates\n * dynamic imports for such symbols and removes the regular/eager import. Make sure that imports\n * which bring symbols used in the `deferredImports` don't contain other symbols.\n *\n * Note: this is an internal-only field, use regular `@Component.imports` field instead.\n * @internal\n */\n deferredImports?: (Type<any> | ReadonlyArray<any>)[];\n\n /**\n * The set of schemas that declare elements to be allowed in a standalone component. Elements and\n * properties that are neither Angular components nor directives must be declared in a schema.\n *\n * This property is only available for standalone components - specifying it for components\n * declared in an NgModule generates a compilation error.\n *\n * More information about standalone components, directives, and pipes can be found in [this\n * guide](guide/components/importing).\n */\n schemas?: SchemaMetadata[];\n}\n\n/**\n * Component decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const Component: ComponentDecorator = makeDecorator(\n 'Component',\n (c: Component = {}) => ({changeDetection: ChangeDetectionStrategy.Default, ...c}),\n Directive,\n undefined,\n (type: Type<any>, meta: Component) => compileComponent(type, meta),\n);\n\n/**\n * Type of the Pipe decorator / constructor function.\n *\n * @publicApi\n */\nexport interface PipeDecorator {\n /**\n *\n * Decorator that marks a class as pipe and supplies configuration metadata.\n *\n * A pipe class must implement the `PipeTransform` interface.\n * For example, if the name is \"myPipe\", use a template binding expression\n * such as the following:\n *\n * ```html\n * {{ exp | myPipe }}\n * ```\n *\n * The result of the expression is passed to the pipe's `transform()` method.\n *\n * A pipe must belong to an NgModule in order for it to be available\n * to a template. To make it a member of an NgModule,\n * list it in the `declarations` field of the `NgModule` metadata.\n *\n * @see [Style Guide: Pipe Names](style-guide#02-09)\n *\n */\n (obj: Pipe): TypeDecorator;\n\n /**\n * See the `Pipe` decorator.\n */\n new (obj: Pipe): Pipe;\n}\n\n/**\n * Type of the Pipe metadata.\n *\n * @publicApi\n */\nexport interface Pipe {\n /**\n * The pipe name to use in template bindings.\n * Typically uses lowerCamelCase\n * because the name cannot contain hyphens.\n */\n name: string;\n\n /**\n * When true, the pipe is pure, meaning that the\n * `transform()` method is invoked only when its input arguments\n * change. Pipes are pure by default.\n *\n * If the pipe has internal state (that is, the result\n * depends on state other than its arguments), set `pure` to false.\n * In this case, the pipe is invoked on each change-detection cycle,\n * even if the arguments have not changed.\n */\n pure?: boolean;\n\n /**\n * Angular pipes marked as `standalone` do not need to be declared in an NgModule. Such\n * pipes don't depend on any \"intermediate context\" of an NgModule (ex. configured providers).\n *\n * More information about standalone components, directives, and pipes can be found in [this\n * guide](guide/components/importing).\n */\n standalone?: boolean;\n}\n\n/**\n * @Annotation\n * @publicApi\n */\nexport const Pipe: PipeDecorator = makeDecorator(\n 'Pipe',\n (p: Pipe) => ({pure: true, ...p}),\n undefined,\n undefined,\n (type: Type<any>, meta: Pipe) => compilePipe(type, meta),\n);\n\n/**\n * @publicApi\n */\nexport interface InputDecorator {\n /**\n * Decorator that marks a class field as an input property and supplies configuration metadata.\n * The input property is bound to a DOM property in the template. During change detection,\n * Angular automatically updates the data property with the DOM property's value.\n *\n * @usageNotes\n *\n * You can supply an optional name to use in templates when the\n * component is instantiated, that maps to the\n * name of the bound property. By default, the original\n * name of the bound property is used for input binding.\n *\n * The following example creates a component with two input properties,\n * one of which is given a special binding name.\n *\n * ```ts\n * import { Component, Input, numberAttribute, booleanAttribute } from '@angular/core';\n * @Component({\n * selector: 'bank-account',\n * template: `\n * Bank Name: {{bankName}}\n * Account Id: {{id}}\n * Account Status: {{status ? 'Active' : 'InActive'}}\n * `\n * })\n * class BankAccount {\n * // This property is bound using its original name.\n * // Defining argument required as true inside the Input Decorator\n * // makes this property deceleration as mandatory\n * @Input({ required: true }) bankName!: string;\n * // Argument alias makes this property value is bound to a different property name\n * // when this component is instantiated in a template.\n * // Argument transform convert the input value from string to number\n * @Input({ alias:'account-id', transform: numberAttribute }) id: number;\n * // Argument transform the input value from string to boolean\n * @Input({ transform: booleanAttribute }) status: boolean;\n * // this property is not bound, and is not automatically updated by Angular\n * normalizedBankName: string;\n * }\n *\n * @Component({\n * selector: 'app',\n * template: `\n * <bank-account bankName=\"RBC\" account-id=\"4747\" status=\"true\"></bank-account>\n * `\n * })\n * class App {}\n * ```\n *\n * @see [Input properties](guide/components/inputs)\n * @see [Output properties](guide/components/outputs)\n */\n (arg?: string | Input): any;\n new (arg?: string | Input): any;\n}\n\n/**\n * Type of metadata for an `Input` property.\n *\n * @publicApi\n */\nexport interface Input {\n /**\n * The name of the DOM property to which the input property is bound.\n */\n alias?: string;\n\n /**\n * Whether the input is required for the directive to function.\n */\n required?: boolean;\n\n /**\n * Function with which to transform the input value before assigning it to the directive instance.\n */\n transform?: (value: any) => any;\n\n /**\n * @internal\n *\n * Whether the input is a signal input.\n *\n * This option exists for JIT compatibility. Users are not expected to use this.\n * Angular needs a way to capture inputs from classes so that the internal data\n * structures can be set up. This needs to happen before the component is instantiated.\n * Due to this, for JIT compilation, signal inputs need an additional decorator\n * declaring the input. Angular provides a TS transformer to automatically handle this\n * for JIT usage (e.g. in tests).\n */\n isSignal?: boolean;\n}\n\n/**\n * @Annotation\n * @publicApi\n */\nexport const Input: InputDecorator = makePropDecorator(\n 'Input',\n (arg?: string | {alias?: string; required?: boolean}) => {\n if (!arg) {\n return {};\n }\n return typeof arg === 'string' ? {alias: arg} : arg;\n },\n);\n\n/**\n * Type of the Output decorator / constructor function.\n *\n * @publicApi\n */\nexport interface OutputDecorator {\n /**\n * Decorator that marks a class field as an output property and supplies configuration metadata.\n * The DOM property bound to the output property is automatically updated during change detection.\n *\n * @usageNotes\n *\n * You can supply an optional name to use in templates when the\n * component is instantiated, that maps to the\n * name of the bound property. By default, the original\n * name of the bound property is used for output binding.\n *\n * See `Input` decorator for an example of providing a binding name.\n *\n * @see [Input properties](guide/components/inputs)\n * @see [Output properties](guide/components/outputs)\n *\n */\n (alias?: string): any;\n new (alias?: string): any;\n}\n\n/**\n * Type of the Output metadata.\n *\n * @publicApi\n */\nexport interface Output {\n /**\n * The name of the DOM property to which the output property is bound.\n */\n alias?: string;\n}\n\n/**\n * @Annotation\n * @publicApi\n */\nexport const Output: OutputDecorator = makePropDecorator('Output', (alias?: string) => ({alias}));\n\n/**\n * Type of the HostBinding decorator / constructor function.\n *\n * @publicApi\n */\nexport interface HostBindingDecorator {\n /**\n * Decorator that marks a DOM property or an element class, style or attribute as a host-binding\n * property and supplies configuration metadata. Angular automatically checks host bindings during\n * change detection, and if a binding changes it updates the host element of the directive.\n *\n * @usageNotes\n *\n * The following example creates a directive that sets the `valid` and `invalid`\n * class, a style color, and an id on the DOM element that has an `ngModel` directive on it.\n *\n * ```ts\n * @Directive({selector: '[ngModel]'})\n * class NgModelStatus {\n * constructor(public control: NgModel) {}\n * // class bindings\n * @HostBinding('class.valid') get valid() { return this.control.valid; }\n * @HostBinding('class.invalid') get invalid() { return this.control.invalid; }\n *\n * // style binding\n * @HostBinding('style.color') get color() { return this.control.valid ? 'green': 'red'; }\n *\n * // style binding also supports a style unit extension\n * @HostBinding('style.width.px') @Input() width: number = 500;\n *\n * // attribute binding\n * @HostBinding('attr.aria-required')\n * @Input() required: boolean = false;\n *\n * // property binding\n * @HostBinding('id') get id() { return this.control.value?.length ? 'odd': 'even'; }\n *\n * @Component({\n * selector: 'app',\n * template: `<input [(ngModel)]=\"prop\">`,\n * })\n * class App {\n * prop;\n * }\n * ```\n *\n */\n (hostPropertyName?: string): any;\n new (hostPropertyName?: string): any;\n}\n\n/**\n * Type of the HostBinding metadata.\n *\n * @publicApi\n */\nexport interface HostBinding {\n /**\n * The DOM property that is bound to a data property.\n * This field also accepts:\n * * classes, prefixed by `class.`\n * * styles, prefixed by `style.`\n * * attributes, prefixed by `attr.`\n */\n hostPropertyName?: string;\n}\n\n/**\n * @Annotation\n * @publicApi\n */\nexport const HostBinding: HostBindingDecorator = makePropDecorator(\n 'HostBinding',\n (hostPropertyName?: string) => ({hostPropertyName}),\n);\n\n/**\n * Type of the HostListener decorator / constructor function.\n *\n * @publicApi\n */\nexport interface HostListenerDecorator {\n /**\n * Decorator that declares a DOM event to listen for,\n * and provides a handler method to run when that event occurs.\n *\n * Angular invokes the supplied handler method when the host element emits the specified event,\n * and updates the bound element with the result.\n *\n * If the handler method returns false, applies `preventDefault` on the bound element.\n *\n * @usageNotes\n *\n * The following example declares a directive\n * that attaches a click listener to a button and counts clicks.\n *\n * ```ts\n * @Directive({selector: 'button[counting]'})\n * class CountClicks {\n * numberOfClicks = 0;\n *\n * @HostListener('click', ['$event.target'])\n * onClick(btn) {\n * console.log('button', btn, 'number of clicks:', this.numberOfClicks++);\n * }\n * }\n *\n * @Component({\n * selector: 'app',\n * template: '<button counting>Increment</button>',\n * })\n * class App {}\n * ```\n *\n * The following example registers another DOM event handler that listens for `Enter` key-press\n * events on the global `window`.\n * ```ts\n * import { HostListener, Component } from \"@angular/core\";\n *\n * @Component({\n * selector: 'app',\n * template: `<h1>Hello, you have pressed enter {{counter}} number of times!</h1> Press enter\n * key to increment the counter. <button (click)=\"resetCounter()\">Reset Counter</button>`\n * })\n * class AppComponent {\n * counter = 0;\n * @HostListener('window:keydown.enter', ['$event'])\n * handleKeyDown(event: KeyboardEvent) {\n * this.counter++;\n * }\n * resetCounter() {\n * this.counter = 0;\n * }\n * }\n * ```\n * The list of valid key names for `keydown` and `keyup` events\n * can be found here:\n * https://www.w3.org/TR/DOM-Level-3-Events-key/#named-key-attribute-values\n *\n * Note that keys can also be combined, e.g. `@HostListener('keydown.shift.a')`.\n *\n * The global target names that can be used to prefix an event name are\n * `document:`, `window:` and `body:`.\n *\n */\n (eventName: string, args?: string[]): any;\n new (eventName: string, args?: string[]): any;\n}\n\n/**\n * Type of the HostListener metadata.\n *\n * @publicApi\n */\nexport interface HostListener {\n /**\n * The DOM event to listen for.\n */\n eventName?: string;\n /**\n * A set of arguments to pass to the handler method when the event occurs.\n */\n args?: string[];\n}\n\n/**\n * @Annotation\n * @publicApi\n */\nexport const HostListener: HostListenerDecorator = makePropDecorator(\n 'HostListener',\n (eventName?: string, args?: string[]) => ({eventName, args}),\n);\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {EnvironmentProviders, ModuleWithProviders, Provider} from '../di/interface/provider';\nimport {Type} from '../interface/type';\nimport {SchemaMetadata} from '../metadata/schema';\nimport {compileNgModule} from '../render3/jit/module';\nimport {makeDecorator, TypeDecorator} from '../util/decorators';\n\n/**\n * Type of the NgModule decorator / constructor function.\n *\n * @publicApi\n */\nexport interface NgModuleDecorator {\n /**\n * Decorator that marks a class as an NgModule and supplies configuration metadata.\n */\n (obj?: NgModule): TypeDecorator;\n new (obj?: NgModule): NgModule;\n}\n\n/**\n * Type of the NgModule metadata.\n *\n * @publicApi\n */\nexport interface NgModule {\n /**\n * The set of injectable objects that are available in the injector\n * of this module.\n *\n * @see [Dependency Injection guide](guide/di/dependency-injection\n * @see [NgModule guide](guide/ngmodules/providers)\n *\n * @usageNotes\n *\n * Dependencies whose providers are listed here become available for injection\n * into any component, directive, pipe or service that is a child of this injector.\n * The NgModule used for bootstrapping uses the root injector, and can provide dependencies\n * to any part of the app.\n *\n * A lazy-loaded module has its own injector, typically a child of the app root injector.\n * Lazy-loaded services are scoped to the lazy-loaded module's injector.\n * If a lazy-loaded module also provides the `UserService`, any component created\n * within that module's context (such as by router navigation) gets the local instance\n * of the service, not the instance in the root injector.\n * Components in external modules continue to receive the instance provided by their injectors.\n *\n * ### Example\n *\n * The following example defines a class that is injected in\n * the HelloWorld NgModule:\n *\n * ```ts\n * class Greeter {\n * greet(name:string) {\n * return 'Hello ' + name + '!';\n * }\n * }\n *\n * @NgModule({\n * providers: [\n * Greeter\n * ]\n * })\n * class HelloWorld {\n * greeter:Greeter;\n *\n * constructor(greeter:Greeter) {\n * this.greeter = greeter;\n * }\n * }\n * ```\n */\n providers?: Array<Provider | EnvironmentProviders>;\n\n /**\n * The set of components, directives, and pipes (declarables\n * that belong to this module.\n *\n * @usageNotes\n *\n * The set of selectors that are available to a template include those declared here, and\n * those that are exported from imported NgModules.\n *\n * Declarables must belong to exactly one module.\n * The compiler emits an error if you try to declare the same class in more than one module.\n * Be careful not to declare a class that is imported from another module.\n *\n * ### Example\n *\n * The following example allows the CommonModule to use the `NgFor`\n * directive.\n *\n * ```javascript\n * @NgModule({\n * declarations: [NgFor]\n * })\n * class CommonModule {\n * }\n * ```\n */\n declarations?: Array<Type<any> | any[]>;\n\n /**\n * The set of NgModules whose exported declarables\n * are available to templates in this module.\n *\n * @usageNotes\n *\n * A template can use exported declarables from any\n * imported module, including those from modules that are imported indirectly\n * and re-exported.\n * For example, `ModuleA` imports `ModuleB`, and also exports\n * it, which makes the declarables from `ModuleB` available\n * wherever `ModuleA` is imported.\n *\n * ### Example\n *\n * The following example allows MainModule to use anything exported by\n * `CommonModule`:\n *\n * ```javascript\n * @NgModule({\n * imports: [CommonModule]\n * })\n * class MainModule {\n * }\n * ```\n *\n */\n imports?: Array<Type<any> | ModuleWithProviders<{}> | any[]>;\n\n /**\n * The set of components, directives, and pipes declared in this\n * NgModule that can be used in the template of any component that is part of an\n * NgModule that imports this NgModule. Exported declarations are the module's public API.\n *\n * A declarable belongs to one and only one NgModule.\n * A module can list another module among its exports, in which case all of that module's\n * public declaration are exported.\n *\n * @usageNotes\n *\n * Declarations are private by default.\n * If this ModuleA does not export UserComponent, then only the components within this\n * ModuleA can use UserComponent.\n *\n * ModuleA can import ModuleB and also export it, making exports from ModuleB\n * available to an NgModule that imports ModuleA.\n *\n * ### Example\n *\n * The following example exports the `NgFor` directive from CommonModule.\n *\n * ```javascript\n * @NgModule({\n * exports: [NgFor]\n * })\n * class CommonModule {\n * }\n * ```\n */\n exports?: Array<Type<any> | any[]>;\n\n /**\n * The set of components that are bootstrapped when this module is bootstrapped.\n */\n bootstrap?: Array<Type<any> | any[]>;\n\n /**\n * The set of schemas that declare elements to be allowed in the NgModule.\n * Elements and properties that are neither Angular components nor directives\n * must be declared in a schema.\n *\n * Allowed value are `NO_ERRORS_SCHEMA` and `CUSTOM_ELEMENTS_SCHEMA`.\n *\n * @security When using one of `NO_ERRORS_SCHEMA` or `CUSTOM_ELEMENTS_SCHEMA`\n * you must ensure that allowed elements and properties securely escape inputs.\n */\n schemas?: Array<SchemaMetadata | any[]>;\n\n /**\n * A name or path that uniquely identifies this NgModule in `getNgModuleById`.\n * If left `undefined`, the NgModule is not registered with `getNgModuleById`.\n */\n id?: string;\n\n /**\n * When present, this module is ignored by the AOT compiler.\n * It remains in distributed code, and the JIT compiler attempts to compile it\n * at run time, in the browser.\n * To ensure the correct behavior, the app must import `@angular/compiler`.\n */\n jit?: true;\n}\n\n/**\n * @Annotation\n */\nexport const NgModule: NgModuleDecorator = makeDecorator(\n 'NgModule',\n (ngModule: NgModule) => ngModule,\n undefined,\n undefined,\n /**\n * Decorator that marks the following class as an NgModule, and supplies\n * configuration metadata for it.\n *\n * * The `declarations` option configures the compiler\n * with information about what belongs to the NgModule.\n * * The `providers` options configures the NgModule's injector to provide\n * dependencies the NgModule members.\n * * The `imports` and `exports` options bring in members from other modules, and make\n * this module's members available to others.\n */\n (type: Type<any>, meta: NgModule) => compileNgModule(type, meta),\n);\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/**\n * @description Represents the version of Angular\n *\n * @publicApi\n */\nexport class Version {\n public readonly major: string;\n public readonly minor: string;\n public readonly patch: string;\n\n constructor(public full: string) {\n const parts = full.split('.');\n this.major = parts[0];\n this.minor = parts[1];\n this.patch = parts.slice(2).join('.');\n }\n}\n\n/**\n * @publicApi\n */\nexport const VERSION = new Version('19.2.13');\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Injectable} from '../di/injectable';\nimport {InjectionToken} from '../di/injection_token';\nimport {StaticProvider} from '../di/interface/provider';\nimport {Type} from '../interface/type';\nimport {ViewEncapsulation} from '../metadata/view';\nimport {ComponentFactory as ComponentFactoryR3} from '../render3/component_ref';\nimport {getComponentDef, getNgModuleDef} from '../render3/def_getters';\nimport {NgModuleFactory as NgModuleFactoryR3} from '../render3/ng_module_ref';\nimport {maybeUnwrapFn} from '../render3/util/misc_utils';\n\nimport {ComponentFactory} from './component_factory';\nimport {NgModuleFactory} from './ng_module_factory';\n\n/**\n * Combination of NgModuleFactory and ComponentFactories.\n *\n * @publicApi\n *\n * @deprecated\n * Ivy JIT mode doesn't require accessing this symbol.\n */\nexport class ModuleWithComponentFactories<T> {\n constructor(\n public ngModuleFactory: NgModuleFactory<T>,\n public componentFactories: ComponentFactory<any>[],\n ) {}\n}\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 * @publicApi\n *\n * @deprecated\n * Ivy JIT mode doesn't require accessing this symbol.\n */\n@Injectable({providedIn: 'root'})\nexport class Compiler {\n /**\n * Compiles the given NgModule and all of its components. All templates of the components\n * have to be inlined.\n */\n compileModuleSync<T>(moduleType: Type<T>): NgModuleFactory<T> {\n return new NgModuleFactoryR3(moduleType);\n }\n\n /**\n * Compiles the given NgModule and all of its components\n */\n compileModuleAsync<T>(moduleType: Type<T>): Promise<NgModuleFactory<T>> {\n return Promise.resolve(this.compileModuleSync(moduleType));\n }\n\n /**\n * Same as {@link Compiler#compileModuleSync compileModuleSync} but also creates ComponentFactories for all components.\n */\n compileModuleAndAllComponentsSync<T>(moduleType: Type<T>): ModuleWithComponentFactories<T> {\n const ngModuleFactory = this.compileModuleSync(moduleType);\n const moduleDef = getNgModuleDef(moduleType)!;\n const componentFactories = maybeUnwrapFn(moduleDef.declarations).reduce(\n (factories: ComponentFactory<any>[], declaration: Type<any>) => {\n const componentDef = getComponentDef(declaration);\n componentDef && factories.push(new ComponentFactoryR3(componentDef));\n return factories;\n },\n [] as ComponentFactory<any>[],\n );\n return new ModuleWithComponentFactories(ngModuleFactory, componentFactories);\n }\n\n /**\n * Same as {@link Compiler#compileModuleAsync compileModuleAsync} but also creates ComponentFactories for all components.\n */\n compileModuleAndAllComponentsAsync<T>(\n moduleType: Type<T>,\n ): Promise<ModuleWithComponentFactories<T>> {\n return Promise.resolve(this.compileModuleAndAllComponentsSync(moduleType));\n }\n\n /**\n * Clears all caches.\n */\n clearCache(): void {}\n\n /**\n * Clears the cache for the given component/ngModule.\n */\n clearCacheFor(type: Type<any>) {}\n\n /**\n * Returns the id for a given NgModule, if one is defined and known to the compiler.\n */\n getModuleId(moduleType: Type<any>): string | undefined {\n return undefined;\n }\n}\n\n/**\n * Options for creating a compiler.\n *\n * @publicApi\n */\nexport type CompilerOptions = {\n defaultEncapsulation?: ViewEncapsulation;\n providers?: StaticProvider[];\n preserveWhitespaces?: boolean;\n};\n\n/**\n * Token to provide CompilerOptions in the platform injector.\n *\n * @publicApi\n */\nexport const COMPILER_OPTIONS = new InjectionToken<CompilerOptions[]>(\n ngDevMode ? 'compilerOptions' : '',\n);\n\n/**\n * A factory for creating a Compiler\n *\n * @publicApi\n *\n * @deprecated\n * Ivy JIT mode doesn't require accessing this symbol.\n */\nexport abstract class CompilerFactory {\n abstract createCompiler(options?: CompilerOptions[]): Compiler;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {getCompilerFacade, JitCompilerUsage} from '../compiler/compiler_facade';\nimport {Injector} from '../di/injector';\nimport {Type} from '../interface/type';\nimport {COMPILER_OPTIONS, CompilerOptions} from '../linker/compiler';\nimport {NgModuleFactory} from '../linker/ng_module_factory';\nimport {\n isComponentResourceResolutionQueueEmpty,\n resolveComponentResources,\n} from '../metadata/resource_loading';\nimport {assertNgModuleType} from '../render3/assert';\nimport {setJitOptions} from '../render3/jit/jit_options';\nimport {NgModuleFactory as R3NgModuleFactory} from '../render3/ng_module_ref';\n\nexport function compileNgModuleFactory<M>(\n injector: Injector,\n options: CompilerOptions,\n moduleType: Type<M>,\n): Promise<NgModuleFactory<M>> {\n ngDevMode && assertNgModuleType(moduleType);\n\n const moduleFactory = new R3NgModuleFactory(moduleType);\n\n // All of the logic below is irrelevant for AOT-compiled code.\n if (typeof ngJitMode !== 'undefined' && !ngJitMode) {\n return Promise.resolve(moduleFactory);\n }\n\n const compilerOptions = injector.get(COMPILER_OPTIONS, []).concat(options);\n\n // Configure the compiler to use the provided options. This call may fail when multiple modules\n // are bootstrapped with incompatible options, as a component can only be compiled according to\n // a single set of options.\n setJitOptions({\n defaultEncapsulation: _lastDefined(compilerOptions.map((opts) => opts.defaultEncapsulation)),\n preserveWhitespaces: _lastDefined(compilerOptions.map((opts) => opts.preserveWhitespaces)),\n });\n\n if (isComponentResourceResolutionQueueEmpty()) {\n return Promise.resolve(moduleFactory);\n }\n\n const compilerProviders = compilerOptions.flatMap((option) => option.providers ?? []);\n\n // In case there are no compiler providers, we just return the module factory as\n // there won't be any resource loader. This can happen with Ivy, because AOT compiled\n // modules can be still passed through \"bootstrapModule\". In that case we shouldn't\n // unnecessarily require the JIT compiler.\n if (compilerProviders.length === 0) {\n return Promise.resolve(moduleFactory);\n }\n\n const compiler = getCompilerFacade({\n usage: JitCompilerUsage.Decorator,\n kind: 'NgModule',\n type: moduleType,\n });\n const compilerInjector = Injector.create({providers: compilerProviders});\n const resourceLoader = compilerInjector.get(compiler.ResourceLoader);\n // The resource loader can also return a string while the \"resolveComponentResources\"\n // always expects a promise. Therefore we need to wrap the returned value in a promise.\n return resolveComponentResources((url) => Promise.resolve(resourceLoader.get(url))).then(\n () => moduleFactory,\n );\n}\n\nfunction _lastDefined<T>(args: T[]): T | undefined {\n for (let i = args.length - 1; i >= 0; i--) {\n if (args[i] !== undefined) {\n return args[i];\n }\n }\n return undefined;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Subscription} from 'rxjs';\n\nimport {ApplicationRef} from '../../application/application_ref';\nimport {\n ENVIRONMENT_INITIALIZER,\n EnvironmentProviders,\n inject,\n Injectable,\n InjectionToken,\n makeEnvironmentProviders,\n StaticProvider,\n} from '../../di';\nimport {RuntimeError, RuntimeErrorCode} from '../../errors';\nimport {PendingTasksInternal} from '../../pending_tasks';\nimport {performanceMarkFeature} from '../../util/performance';\nimport {NgZone} from '../../zone';\nimport {InternalNgZoneOptions} from '../../zone/ng_zone';\n\nimport {\n ChangeDetectionScheduler,\n ZONELESS_SCHEDULER_DISABLED,\n ZONELESS_ENABLED,\n SCHEDULE_IN_ROOT_ZONE,\n} from './zoneless_scheduling';\nimport {SCHEDULE_IN_ROOT_ZONE_DEFAULT} from './flags';\n\n@Injectable({providedIn: 'root'})\nexport class NgZoneChangeDetectionScheduler {\n private readonly zone = inject(NgZone);\n private readonly changeDetectionScheduler = inject(ChangeDetectionScheduler);\n private readonly applicationRef = inject(ApplicationRef);\n\n private _onMicrotaskEmptySubscription?: Subscription;\n\n initialize(): void {\n if (this._onMicrotaskEmptySubscription) {\n return;\n }\n\n this._onMicrotaskEmptySubscription = this.zone.onMicrotaskEmpty.subscribe({\n next: () => {\n // `onMicroTaskEmpty` can happen _during_ the zoneless scheduler change detection because\n // zone.run(() => {}) will result in `checkStable` at the end of the `zone.run` closure\n // and emit `onMicrotaskEmpty` synchronously if run coalsecing is false.\n if (this.changeDetectionScheduler.runningTick) {\n return;\n }\n this.zone.run(() => {\n this.applicationRef.tick();\n });\n },\n });\n }\n\n ngOnDestroy() {\n this._onMicrotaskEmptySubscription?.unsubscribe();\n }\n}\n\n/**\n * Internal token used to verify that `provideZoneChangeDetection` is not used\n * with the bootstrapModule API.\n */\nexport const PROVIDED_NG_ZONE = new InjectionToken<boolean>(\n typeof ngDevMode === 'undefined' || ngDevMode ? 'provideZoneChangeDetection token' : '',\n {factory: () => false},\n);\n\nexport function internalProvideZoneChangeDetection({\n ngZoneFactory,\n ignoreChangesOutsideZone,\n scheduleInRootZone,\n}: {\n ngZoneFactory?: () => NgZone;\n ignoreChangesOutsideZone?: boolean;\n scheduleInRootZone?: boolean;\n}): StaticProvider[] {\n ngZoneFactory ??= () =>\n new NgZone({...getNgZoneOptions(), scheduleInRootZone} as InternalNgZoneOptions);\n return [\n {provide: NgZone, useFactory: ngZoneFactory},\n {\n provide: ENVIRONMENT_INITIALIZER,\n multi: true,\n useFactory: () => {\n const ngZoneChangeDetectionScheduler = inject(NgZoneChangeDetectionScheduler, {\n optional: true,\n });\n if (\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n ngZoneChangeDetectionScheduler === null\n ) {\n throw new RuntimeError(\n RuntimeErrorCode.MISSING_REQUIRED_INJECTABLE_IN_BOOTSTRAP,\n `A required Injectable was not found in the dependency injection tree. ` +\n 'If you are bootstrapping an NgModule, make sure that the `BrowserModule` is imported.',\n );\n }\n return () => ngZoneChangeDetectionScheduler!.initialize();\n },\n },\n {\n provide: ENVIRONMENT_INITIALIZER,\n multi: true,\n useFactory: () => {\n const service = inject(ZoneStablePendingTask);\n return () => {\n service.initialize();\n };\n },\n },\n // Always disable scheduler whenever explicitly disabled, even if another place called\n // `provideZoneChangeDetection` without the 'ignore' option.\n ignoreChangesOutsideZone === true ? {provide: ZONELESS_SCHEDULER_DISABLED, useValue: true} : [],\n {\n provide: SCHEDULE_IN_ROOT_ZONE,\n useValue: scheduleInRootZone ?? SCHEDULE_IN_ROOT_ZONE_DEFAULT,\n },\n ];\n}\n\n/**\n * Provides `NgZone`-based change detection for the application bootstrapped using\n * `bootstrapApplication`.\n *\n * `NgZone` is already provided in applications by default. This provider allows you to configure\n * options like `eventCoalescing` in the `NgZone`.\n * This provider is not available for `platformBrowser().bootstrapModule`, which uses\n * `BootstrapOptions` instead.\n *\n * @usageNotes\n * ```ts\n * bootstrapApplication(MyApp, {providers: [\n * provideZoneChangeDetection({eventCoalescing: true}),\n * ]});\n * ```\n *\n * @publicApi\n * @see {@link /api/platform-browser/bootstrapApplication bootstrapApplication}\n * @see {@link NgZoneOptions}\n */\nexport function provideZoneChangeDetection(options?: NgZoneOptions): EnvironmentProviders {\n const ignoreChangesOutsideZone = options?.ignoreChangesOutsideZone;\n const scheduleInRootZone = (options as any)?.scheduleInRootZone;\n const zoneProviders = internalProvideZoneChangeDetection({\n ngZoneFactory: () => {\n const ngZoneOptions = getNgZoneOptions(options);\n ngZoneOptions.scheduleInRootZone = scheduleInRootZone;\n if (ngZoneOptions.shouldCoalesceEventChangeDetection) {\n performanceMarkFeature('NgZone_CoalesceEvent');\n }\n return new NgZone(ngZoneOptions);\n },\n ignoreChangesOutsideZone,\n scheduleInRootZone,\n });\n return makeEnvironmentProviders([\n {provide: PROVIDED_NG_ZONE, useValue: true},\n {provide: ZONELESS_ENABLED, useValue: false},\n zoneProviders,\n ]);\n}\n\n/**\n * Used to configure event and run coalescing with `provideZoneChangeDetection`.\n *\n * @publicApi\n *\n * @see {@link provideZoneChangeDetection}\n */\nexport interface NgZoneOptions {\n /**\n * Optionally specify coalescing event change detections or not.\n * Consider the following case.\n *\n * ```html\n * <div (click)=\"doSomething()\">\n * <button (click)=\"doSomethingElse()\"></button>\n * </div>\n * ```\n *\n * When button is clicked, because of the event bubbling, both\n * event handlers will be called and 2 change detections will be\n * triggered. We can coalesce such kind of events to trigger\n * change detection only once.\n *\n * By default, this option is set to false, meaning events will\n * not be coalesced, and change detection will be triggered multiple times.\n * If this option is set to true, change detection will be triggered\n * once in the scenario described above.\n */\n eventCoalescing?: boolean;\n\n /**\n * Optionally specify if `NgZone#run()` method invocations should be coalesced\n * into a single change detection.\n *\n * Consider the following case.\n * ```ts\n * for (let i = 0; i < 10; i ++) {\n * ngZone.run(() => {\n * // do something\n * });\n * }\n * ```\n *\n * This case triggers the change detection multiple times.\n * With ngZoneRunCoalescing options, all change detections in an event loop trigger only once.\n * In addition, the change detection executes in requestAnimation.\n *\n */\n runCoalescing?: boolean;\n\n /**\n * When false, change detection is scheduled when Angular receives\n * a clear indication that templates need to be refreshed. This includes:\n *\n * - calling `ChangeDetectorRef.markForCheck`\n * - calling `ComponentRef.setInput`\n * - updating a signal that is read in a template\n * - attaching a view that is marked dirty\n * - removing a view\n * - registering a render hook (templates are only refreshed if render hooks do one of the above)\n *\n * @deprecated This option was introduced out of caution as a way for developers to opt out of the\n * new behavior in v18 which schedule change detection for the above events when they occur\n * outside the Zone. After monitoring the results post-release, we have determined that this\n * feature is working as desired and do not believe it should ever be disabled by setting\n * this option to `true`.\n */\n ignoreChangesOutsideZone?: boolean;\n}\n\n// Transforms a set of `BootstrapOptions` (supported by the NgModule-based bootstrap APIs) ->\n// `NgZoneOptions` that are recognized by the NgZone constructor. Passing no options will result in\n// a set of default options returned.\nexport function getNgZoneOptions(options?: NgZoneOptions): InternalNgZoneOptions {\n return {\n enableLongStackTrace: typeof ngDevMode === 'undefined' ? false : !!ngDevMode,\n shouldCoalesceEventChangeDetection: options?.eventCoalescing ?? false,\n shouldCoalesceRunChangeDetection: options?.runCoalescing ?? false,\n };\n}\n\n@Injectable({providedIn: 'root'})\nexport class ZoneStablePendingTask {\n private readonly subscription = new Subscription();\n private initialized = false;\n private readonly zone = inject(NgZone);\n private readonly pendingTasks = inject(PendingTasksInternal);\n\n initialize() {\n if (this.initialized) {\n return;\n }\n this.initialized = true;\n\n let task: number | null = null;\n if (!this.zone.isStable && !this.zone.hasPendingMacrotasks && !this.zone.hasPendingMicrotasks) {\n task = this.pendingTasks.add();\n }\n\n this.zone.runOutsideAngular(() => {\n this.subscription.add(\n this.zone.onStable.subscribe(() => {\n NgZone.assertNotInAngularZone();\n\n // Check whether there are no pending macro/micro tasks in the next tick\n // to allow for NgZone to update the state.\n queueMicrotask(() => {\n if (\n task !== null &&\n !this.zone.hasPendingMacrotasks &&\n !this.zone.hasPendingMicrotasks\n ) {\n this.pendingTasks.remove(task);\n task = null;\n }\n });\n }),\n );\n });\n\n this.subscription.add(\n this.zone.onUnstable.subscribe(() => {\n NgZone.assertInAngularZone();\n task ??= this.pendingTasks.add();\n }),\n );\n }\n\n ngOnDestroy() {\n this.subscription.unsubscribe();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Subscription} from 'rxjs';\n\nimport {ApplicationRef, ApplicationRefDirtyFlags} from '../../application/application_ref';\nimport {Injectable} from '../../di/injectable';\nimport {inject} from '../../di/injector_compatibility';\nimport {EnvironmentProviders} from '../../di/interface/provider';\nimport {makeEnvironmentProviders} from '../../di/provider_collection';\nimport {RuntimeError, RuntimeErrorCode, formatRuntimeError} from '../../errors';\nimport {PendingTasksInternal} from '../../pending_tasks';\nimport {\n scheduleCallbackWithMicrotask,\n scheduleCallbackWithRafRace,\n} from '../../util/callback_scheduler';\nimport {performanceMarkFeature} from '../../util/performance';\nimport {NgZone, NgZonePrivate, NoopNgZone, angularZoneInstanceIdProperty} from '../../zone/ng_zone';\n\nimport {\n ChangeDetectionScheduler,\n NotificationSource,\n PROVIDED_ZONELESS,\n SCHEDULE_IN_ROOT_ZONE,\n ZONELESS_ENABLED,\n ZONELESS_SCHEDULER_DISABLED,\n} from './zoneless_scheduling';\nimport {TracingService} from '../../application/tracing';\n\nconst CONSECUTIVE_MICROTASK_NOTIFICATION_LIMIT = 100;\nlet consecutiveMicrotaskNotifications = 0;\nlet stackFromLastFewNotifications: string[] = [];\n\nfunction trackMicrotaskNotificationForDebugging() {\n consecutiveMicrotaskNotifications++;\n if (CONSECUTIVE_MICROTASK_NOTIFICATION_LIMIT - consecutiveMicrotaskNotifications < 5) {\n const stack = new Error().stack;\n if (stack) {\n stackFromLastFewNotifications.push(stack);\n }\n }\n\n if (consecutiveMicrotaskNotifications === CONSECUTIVE_MICROTASK_NOTIFICATION_LIMIT) {\n throw new RuntimeError(\n RuntimeErrorCode.INFINITE_CHANGE_DETECTION,\n 'Angular could not stabilize because there were endless change notifications within the browser event loop. ' +\n 'The stack from the last several notifications: \\n' +\n stackFromLastFewNotifications.join('\\n'),\n );\n }\n}\n\n@Injectable({providedIn: 'root'})\nexport class ChangeDetectionSchedulerImpl implements ChangeDetectionScheduler {\n private readonly appRef = inject(ApplicationRef);\n private readonly taskService = inject(PendingTasksInternal);\n private readonly ngZone = inject(NgZone);\n private readonly zonelessEnabled = inject(ZONELESS_ENABLED);\n private readonly tracing = inject(TracingService, {optional: true});\n private readonly disableScheduling =\n inject(ZONELESS_SCHEDULER_DISABLED, {optional: true}) ?? false;\n private readonly zoneIsDefined = typeof Zone !== 'undefined' && !!Zone.root.run;\n private readonly schedulerTickApplyArgs = [{data: {'__scheduler_tick__': true}}];\n private readonly subscriptions = new Subscription();\n private readonly angularZoneId = this.zoneIsDefined\n ? (this.ngZone as NgZonePrivate)._inner?.get(angularZoneInstanceIdProperty)\n : null;\n private readonly scheduleInRootZone =\n !this.zonelessEnabled &&\n this.zoneIsDefined &&\n (inject(SCHEDULE_IN_ROOT_ZONE, {optional: true}) ?? false);\n\n private cancelScheduledCallback: null | (() => void) = null;\n private useMicrotaskScheduler = false;\n runningTick = false;\n pendingRenderTaskId: number | null = null;\n\n constructor() {\n this.subscriptions.add(\n this.appRef.afterTick.subscribe(() => {\n // If the scheduler isn't running a tick but the application ticked, that means\n // someone called ApplicationRef.tick manually. In this case, we should cancel\n // any change detections that had been scheduled so we don't run an extra one.\n if (!this.runningTick) {\n this.cleanup();\n }\n }),\n );\n this.subscriptions.add(\n this.ngZone.onUnstable.subscribe(() => {\n // If the zone becomes unstable when we're not running tick (this happens from the zone.run),\n // we should cancel any scheduled change detection here because at this point we\n // know that the zone will stabilize at some point and run change detection itself.\n if (!this.runningTick) {\n this.cleanup();\n }\n }),\n );\n\n // TODO(atscott): These conditions will need to change when zoneless is the default\n // Instead, they should flip to checking if ZoneJS scheduling is provided\n this.disableScheduling ||=\n !this.zonelessEnabled &&\n // NoopNgZone without enabling zoneless means no scheduling whatsoever\n (this.ngZone instanceof NoopNgZone ||\n // The same goes for the lack of Zone without enabling zoneless scheduling\n !this.zoneIsDefined);\n }\n\n notify(source: NotificationSource): void {\n if (!this.zonelessEnabled && source === NotificationSource.Listener) {\n // When the notification comes from a listener, we skip the notification unless the\n // application has enabled zoneless. Ideally, listeners wouldn't notify the scheduler at all\n // automatically. We do not know that a developer made a change in the listener callback that\n // requires an `ApplicationRef.tick` (synchronize templates / run render hooks). We do this\n // only for an easier migration from OnPush components to zoneless. Because listeners are\n // usually executed inside the Angular zone and listeners automatically call `markViewDirty`,\n // developers never needed to manually use `ChangeDetectorRef.markForCheck` or some other API\n // to make listener callbacks work correctly with `OnPush` components.\n return;\n }\n\n let force = false;\n\n switch (source) {\n case NotificationSource.MarkAncestorsForTraversal: {\n this.appRef.dirtyFlags |= ApplicationRefDirtyFlags.ViewTreeTraversal;\n break;\n }\n case NotificationSource.DebugApplyChanges:\n case NotificationSource.DeferBlockStateUpdate:\n case NotificationSource.MarkForCheck:\n case NotificationSource.Listener:\n case NotificationSource.SetInput: {\n this.appRef.dirtyFlags |= ApplicationRefDirtyFlags.ViewTreeCheck;\n break;\n }\n case NotificationSource.CustomElement: {\n // We use `ViewTreeTraversal` to ensure we refresh the element even if this is triggered\n // during CD. In practice this is a no-op since the elements code also calls via a\n // `markForRefresh()` API which sends `NotificationSource.MarkAncestorsForTraversal` anyway.\n this.appRef.dirtyFlags |= ApplicationRefDirtyFlags.ViewTreeTraversal;\n force = true;\n break;\n }\n case NotificationSource.RootEffect: {\n this.appRef.dirtyFlags |= ApplicationRefDirtyFlags.RootEffects;\n // Root effects still force a CD, even if the scheduler is disabled. This ensures that\n // effects always run, even when triggered from outside the zone when the scheduler is\n // otherwise disabled.\n force = true;\n break;\n }\n case NotificationSource.ViewEffect: {\n // This is technically a no-op, since view effects will also send a\n // `MarkAncestorsForTraversal` notification. Still, we set this for logical consistency.\n this.appRef.dirtyFlags |= ApplicationRefDirtyFlags.ViewTreeTraversal;\n // View effects still force a CD, even if the scheduler is disabled. This ensures that\n // effects always run, even when triggered from outside the zone when the scheduler is\n // otherwise disabled.\n force = true;\n break;\n }\n case NotificationSource.PendingTaskRemoved: {\n // Removing a pending task via the public API forces a scheduled tick, ensuring that\n // stability is async and delayed until there was at least an opportunity to run\n // application synchronization. This prevents some footguns when working with the\n // public API for pending tasks where developers attempt to update application state\n // immediately after removing the last task.\n force = true;\n break;\n }\n case NotificationSource.ViewDetachedFromDOM:\n case NotificationSource.ViewAttached:\n case NotificationSource.RenderHook:\n case NotificationSource.AsyncAnimationsLoaded:\n default: {\n // These notifications only schedule a tick but do not change whether we should refresh\n // views. Instead, we only need to run render hooks unless another notification from the\n // other set is also received before `tick` happens.\n this.appRef.dirtyFlags |= ApplicationRefDirtyFlags.AfterRender;\n }\n }\n\n // If not already defined, attempt to capture a tracing snapshot of this\n // notification so that the resulting CD run can be attributed to the\n // context which produced the notification.\n this.appRef.tracingSnapshot = this.tracing?.snapshot(this.appRef.tracingSnapshot) ?? null;\n\n if (!this.shouldScheduleTick(force)) {\n return;\n }\n\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (this.useMicrotaskScheduler) {\n trackMicrotaskNotificationForDebugging();\n } else {\n consecutiveMicrotaskNotifications = 0;\n stackFromLastFewNotifications.length = 0;\n }\n }\n\n const scheduleCallback = this.useMicrotaskScheduler\n ? scheduleCallbackWithMicrotask\n : scheduleCallbackWithRafRace;\n this.pendingRenderTaskId = this.taskService.add();\n if (this.scheduleInRootZone) {\n this.cancelScheduledCallback = Zone.root.run(() => scheduleCallback(() => this.tick()));\n } else {\n this.cancelScheduledCallback = this.ngZone.runOutsideAngular(() =>\n scheduleCallback(() => this.tick()),\n );\n }\n }\n\n private shouldScheduleTick(force: boolean): boolean {\n if ((this.disableScheduling && !force) || this.appRef.destroyed) {\n return false;\n }\n // already scheduled or running\n if (this.pendingRenderTaskId !== null || this.runningTick || this.appRef._runningTick) {\n return false;\n }\n // If we're inside the zone don't bother with scheduler. Zone will stabilize\n // eventually and run change detection.\n if (\n !this.zonelessEnabled &&\n this.zoneIsDefined &&\n Zone.current.get(angularZoneInstanceIdProperty + this.angularZoneId)\n ) {\n return false;\n }\n\n return true;\n }\n\n /**\n * Calls ApplicationRef._tick inside the `NgZone`.\n *\n * Calling `tick` directly runs change detection and cancels any change detection that had been\n * scheduled previously.\n *\n * @param shouldRefreshViews Passed directly to `ApplicationRef._tick` and skips straight to\n * render hooks when `false`.\n */\n private tick(): void {\n // When ngZone.run below exits, onMicrotaskEmpty may emit if the zone is\n // stable. We want to prevent double ticking so we track whether the tick is\n // already running and skip it if so.\n if (this.runningTick || this.appRef.destroyed) {\n return;\n }\n\n // If we reach the tick and there is no work to be done in ApplicationRef.tick,\n // skip it altogether and clean up. There may be no work if, for example, the only\n // event that notified the scheduler was the removal of a pending task.\n if (this.appRef.dirtyFlags === ApplicationRefDirtyFlags.None) {\n this.cleanup();\n return;\n }\n\n // The scheduler used to pass \"whether to check views\" as a boolean flag instead of setting\n // fine-grained dirtiness flags, and global checking was always used on the first pass. This\n // created an interesting edge case: if a notification made a view dirty and then ticked via the\n // scheduler (and not the zone) a global check was still performed.\n //\n // Ideally, this would not be the case, and only zone-based ticks would do global passes.\n // However this is a breaking change and requires fixes in g3. Until this cleanup can be done,\n // we add the `ViewTreeGlobal` flag to request a global check if any views are dirty in a\n // scheduled tick (unless zoneless is enabled, in which case global checks aren't really a\n // thing).\n //\n // TODO(alxhub): clean up and remove this workaround as a breaking change.\n if (!this.zonelessEnabled && this.appRef.dirtyFlags & ApplicationRefDirtyFlags.ViewTreeAny) {\n this.appRef.dirtyFlags |= ApplicationRefDirtyFlags.ViewTreeGlobal;\n }\n\n const task = this.taskService.add();\n try {\n this.ngZone.run(\n () => {\n this.runningTick = true;\n this.appRef._tick();\n },\n undefined,\n this.schedulerTickApplyArgs,\n );\n } catch (e: unknown) {\n this.taskService.remove(task);\n throw e;\n } finally {\n this.cleanup();\n }\n // If we're notified of a change within 1 microtask of running change\n // detection, run another round in the same event loop. This allows code\n // which uses Promise.resolve (see NgModel) to avoid\n // ExpressionChanged...Error to still be reflected in a single browser\n // paint, even if that spans multiple rounds of change detection.\n this.useMicrotaskScheduler = true;\n scheduleCallbackWithMicrotask(() => {\n this.useMicrotaskScheduler = false;\n this.taskService.remove(task);\n });\n }\n\n ngOnDestroy() {\n this.subscriptions.unsubscribe();\n this.cleanup();\n }\n\n private cleanup() {\n this.runningTick = false;\n this.cancelScheduledCallback?.();\n this.cancelScheduledCallback = null;\n // If this is the last task, the service will synchronously emit a stable\n // notification. If there is a subscriber that then acts in a way that\n // tries to notify the scheduler again, we need to be able to respond to\n // schedule a new change detection. Therefore, we should clear the task ID\n // before removing it from the pending tasks (or the tasks service should\n // not synchronously emit stable, similar to how Zone stableness only\n // happens if it's still stable after a microtask).\n if (this.pendingRenderTaskId !== null) {\n const taskId = this.pendingRenderTaskId;\n this.pendingRenderTaskId = null;\n this.taskService.remove(taskId);\n }\n }\n}\n\n/**\n * Provides change detection without ZoneJS for the application bootstrapped using\n * `bootstrapApplication`.\n *\n * This function allows you to configure the application to not use the state/state changes of\n * ZoneJS to schedule change detection in the application. This will work when ZoneJS is not present\n * on the page at all or if it exists because something else is using it (either another Angular\n * application which uses ZoneJS for scheduling or some other library that relies on ZoneJS).\n *\n * This can also be added to the `TestBed` providers to configure the test environment to more\n * closely match production behavior. This will help give higher confidence that components are\n * compatible with zoneless change detection.\n *\n * ZoneJS uses browser events to trigger change detection. When using this provider, Angular will\n * instead use Angular APIs to schedule change detection. These APIs include:\n *\n * - `ChangeDetectorRef.markForCheck`\n * - `ComponentRef.setInput`\n * - updating a signal that is read in a template\n * - when bound host or template listeners are triggered\n * - attaching a view that was marked dirty by one of the above\n * - removing a view\n * - registering a render hook (templates are only refreshed if render hooks do one of the above)\n *\n * @usageNotes\n * ```ts\n * bootstrapApplication(MyApp, {providers: [\n * provideExperimentalZonelessChangeDetection(),\n * ]});\n * ```\n *\n * This API is experimental. Neither the shape, nor the underlying behavior is stable and can change\n * in patch versions. There are known feature gaps and API ergonomic considerations. We will iterate\n * on the exact API based on the feedback and our understanding of the problem and solution space.\n *\n * @publicApi\n * @experimental\n * @see {@link /api/platform-browser/bootstrapApplication bootstrapApplication}\n */\nexport function provideExperimentalZonelessChangeDetection(): EnvironmentProviders {\n performanceMarkFeature('NgZoneless');\n\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && typeof Zone !== 'undefined' && Zone) {\n const message = formatRuntimeError(\n RuntimeErrorCode.UNEXPECTED_ZONEJS_PRESENT_IN_ZONELESS_MODE,\n `The application is using zoneless change detection, but is still loading Zone.js. ` +\n `Consider removing Zone.js to get the full benefits of zoneless. ` +\n `In applications using the Angular CLI, Zone.js is typically included in the \"polyfills\" section of the angular.json file.`,\n );\n console.warn(message);\n }\n\n return makeEnvironmentProviders([\n {provide: ChangeDetectionScheduler, useExisting: ChangeDetectionSchedulerImpl},\n {provide: NgZone, useClass: NoopNgZone},\n {provide: ZONELESS_ENABLED, useValue: true},\n {provide: SCHEDULE_IN_ROOT_ZONE, useValue: false},\n typeof ngDevMode === 'undefined' || ngDevMode\n ? [{provide: PROVIDED_ZONELESS, useValue: true}]\n : [],\n ]);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/// <reference path=\"../../../goog.d.ts\" />\n\nimport {InjectionToken} from '../di/injection_token';\nimport {inject} from '../di/injector_compatibility';\nimport {InjectFlags} from '../di/interface/injector';\n\nimport {DEFAULT_LOCALE_ID, USD_CURRENCY_CODE} from './localization';\n\ndeclare const $localize: {locale?: string};\n\n/**\n * Work out the locale from the potential global properties.\n *\n * * Closure Compiler: use `goog.LOCALE`.\n * * Ivy enabled: use `$localize.locale`\n */\nexport function getGlobalLocale(): string {\n if (\n typeof ngI18nClosureMode !== 'undefined' &&\n ngI18nClosureMode &&\n typeof goog !== 'undefined' &&\n goog.LOCALE !== 'en'\n ) {\n // * The default `goog.LOCALE` value is `en`, while Angular used `en-US`.\n // * In order to preserve backwards compatibility, we use Angular default value over\n // Closure Compiler's one.\n return goog.LOCALE;\n } else {\n // KEEP `typeof $localize !== 'undefined' && $localize.locale` IN SYNC WITH THE LOCALIZE\n // COMPILE-TIME INLINER.\n //\n // * During compile time inlining of translations the expression will be replaced\n // with a string literal that is the current locale. Other forms of this expression are not\n // guaranteed to be replaced.\n //\n // * During runtime translation evaluation, the developer is required to set `$localize.locale`\n // if required, or just to provide their own `LOCALE_ID` provider.\n return (typeof $localize !== 'undefined' && $localize.locale) || DEFAULT_LOCALE_ID;\n }\n}\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/locale-id) for more information.\n *\n * @usageNotes\n * ### Example\n *\n * ```ts\n * import { LOCALE_ID } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n * providers: [{provide: LOCALE_ID, useValue: 'en-US' }]\n * });\n * ```\n *\n * @publicApi\n */\nexport const LOCALE_ID: InjectionToken<string> = new InjectionToken(ngDevMode ? 'LocaleId' : '', {\n providedIn: 'root',\n factory: () =>\n inject(LOCALE_ID, InjectFlags.Optional | InjectFlags.SkipSelf) || getGlobalLocale(),\n});\n\n/**\n * Provide this token to set the default currency code your application uses for\n * CurrencyPipe when there is no currency code passed into it. This is only used by\n * CurrencyPipe and has no relation to locale currency. Defaults to USD if not configured.\n *\n * See the [i18n guide](guide/i18n/locale-id) for more information.\n *\n * <div class=\"docs-alert docs-alert-helpful\">\n *\n * The default currency code is currently always `USD`.\n *\n * If you need the previous behavior then set it by creating a `DEFAULT_CURRENCY_CODE` provider in\n * your application `NgModule`:\n *\n * ```ts\n * {provide: DEFAULT_CURRENCY_CODE, useValue: 'USD'}\n * ```\n *\n * </div>\n *\n * @usageNotes\n * ### Example\n *\n * ```ts\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n * providers: [{provide: DEFAULT_CURRENCY_CODE, useValue: 'EUR' }]\n * });\n * ```\n *\n * @publicApi\n */\nexport const DEFAULT_CURRENCY_CODE = new InjectionToken<string>(\n ngDevMode ? 'DefaultCurrencyCode' : '',\n {\n providedIn: 'root',\n factory: () => USD_CURRENCY_CODE,\n },\n);\n\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 * ```ts\n * import { TRANSLATIONS } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * // content of your translation file\n * const translations = '....';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n * providers: [{provide: TRANSLATIONS, useValue: translations }]\n * });\n * ```\n *\n * @publicApi\n */\nexport const TRANSLATIONS = new InjectionToken<string>(ngDevMode ? 'Translations' : '');\n\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 * ```ts\n * import { TRANSLATIONS_FORMAT } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n * providers: [{provide: TRANSLATIONS_FORMAT, useValue: 'xlf' }]\n * });\n * ```\n *\n * @publicApi\n */\nexport const TRANSLATIONS_FORMAT = new InjectionToken<string>(\n ngDevMode ? 'TranslationsFormat' : '',\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 [i18n guide](guide/i18n/merge#report-missing-translations) for more information.\n *\n * @usageNotes\n * ### Example\n * ```ts\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 * @publicApi\n */\nexport enum MissingTranslationStrategy {\n Error = 0,\n Warning = 1,\n Ignore = 2,\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {IMAGE_CONFIG, ImageConfig} from './application/application_tokens';\nimport {Injectable} from './di';\nimport {inject} from './di/injector_compatibility';\nimport {formatRuntimeError, RuntimeErrorCode} from './errors';\nimport {OnDestroy} from './interface/lifecycle_hooks';\nimport {getDocument} from './render3/interfaces/document';\n\n// A delay in milliseconds before the scan is run after onLoad, to avoid any\n// potential race conditions with other LCP-related functions. This delay\n// happens outside of the main JavaScript execution and will only effect the timing\n// on when the warning becomes visible in the console.\nconst SCAN_DELAY = 200;\n\nconst OVERSIZED_IMAGE_TOLERANCE = 1200;\n\n@Injectable({providedIn: 'root'})\nexport class ImagePerformanceWarning implements OnDestroy {\n // Map of full image URLs -> original `ngSrc` values.\n private window: Window | null = null;\n private observer: PerformanceObserver | null = null;\n private options: ImageConfig = inject(IMAGE_CONFIG);\n private lcpImageUrl?: string;\n\n public start() {\n if (\n (typeof ngServerMode !== 'undefined' && ngServerMode) ||\n typeof PerformanceObserver === 'undefined' ||\n (this.options?.disableImageSizeWarning && this.options?.disableImageLazyLoadWarning)\n ) {\n return;\n }\n this.observer = this.initPerformanceObserver();\n const doc = getDocument();\n const win = doc.defaultView;\n if (win) {\n this.window = win;\n // Wait to avoid race conditions where LCP image triggers\n // load event before it's recorded by the performance observer\n const waitToScan = () => {\n setTimeout(this.scanImages.bind(this), SCAN_DELAY);\n };\n const setup = () => {\n // Consider the case when the application is created and destroyed multiple times.\n // Typically, applications are created instantly once the page is loaded, and the\n // `window.load` listener is always triggered. However, the `window.load` event will never\n // be fired if the page is loaded, and the application is created later. Checking for\n // `readyState` is the easiest way to determine whether the page has been loaded or not.\n if (doc.readyState === 'complete') {\n waitToScan();\n } else {\n this.window?.addEventListener('load', waitToScan, {once: true});\n }\n };\n // Angular doesn't have to run change detection whenever any asynchronous tasks are invoked in\n // the scope of this functionality.\n if (typeof Zone !== 'undefined') {\n Zone.root.run(() => setup());\n } else {\n setup();\n }\n }\n }\n\n ngOnDestroy() {\n this.observer?.disconnect();\n }\n\n private initPerformanceObserver(): PerformanceObserver | null {\n if (typeof PerformanceObserver === 'undefined') {\n return null;\n }\n const observer = new PerformanceObserver((entryList) => {\n const entries = entryList.getEntries();\n if (entries.length === 0) return;\n // We use the latest entry produced by the `PerformanceObserver` as the best\n // signal on which element is actually an LCP one. As an example, the first image to load on\n // a page, by virtue of being the only thing on the page so far, is often a LCP candidate\n // and gets reported by PerformanceObserver, but isn't necessarily the LCP element.\n const lcpElement = entries[entries.length - 1];\n\n // Cast to `any` due to missing `element` on the `LargestContentfulPaint` type of entry.\n // See https://developer.mozilla.org/en-US/docs/Web/API/LargestContentfulPaint\n const imgSrc = (lcpElement as any).element?.src ?? '';\n\n // Exclude `data:` and `blob:` URLs, since they are fetched resources.\n if (imgSrc.startsWith('data:') || imgSrc.startsWith('blob:')) return;\n this.lcpImageUrl = imgSrc;\n });\n observer.observe({type: 'largest-contentful-paint', buffered: true});\n return observer;\n }\n\n private scanImages(): void {\n const images = getDocument().querySelectorAll('img');\n let lcpElementFound,\n lcpElementLoadedCorrectly = false;\n images.forEach((image) => {\n if (!this.options?.disableImageSizeWarning) {\n // Image elements using the NgOptimizedImage directive are excluded,\n // as that directive has its own version of this check.\n if (!image.getAttribute('ng-img') && this.isOversized(image)) {\n logOversizedImageWarning(image.src);\n }\n }\n if (!this.options?.disableImageLazyLoadWarning && this.lcpImageUrl) {\n if (image.src === this.lcpImageUrl) {\n lcpElementFound = true;\n if (image.loading !== 'lazy' || image.getAttribute('ng-img')) {\n // This variable is set to true and never goes back to false to account\n // for the case where multiple images have the same src url, and some\n // have lazy loading while others don't.\n // Also ignore NgOptimizedImage because there's a different warning for that.\n lcpElementLoadedCorrectly = true;\n }\n }\n }\n });\n if (\n lcpElementFound &&\n !lcpElementLoadedCorrectly &&\n this.lcpImageUrl &&\n !this.options?.disableImageLazyLoadWarning\n ) {\n logLazyLCPWarning(this.lcpImageUrl);\n }\n }\n\n private isOversized(image: HTMLImageElement): boolean {\n if (!this.window) {\n return false;\n }\n\n // The `isOversized` check may not be applicable or may require adjustments\n // for several types of image formats or scenarios. Currently, we specify only\n // `svg`, but this may also include `gif` since their quality isn’t tied to\n // dimensions in the same way as raster images.\n const nonOversizedImageExtentions = [\n // SVG images are vector-based, which means they can scale\n // to any size without losing quality.\n '.svg',\n ];\n\n // Convert it to lowercase because this may have uppercase\n // extensions, such as `IMAGE.SVG`.\n // We fallback to an empty string because `src` may be `undefined`\n // if it is explicitly set to `null` by some third-party code\n // (e.g., `image.src = null`).\n const imageSource = (image.src || '').toLowerCase();\n\n if (nonOversizedImageExtentions.some((extension) => imageSource.endsWith(extension))) {\n return false;\n }\n\n const computedStyle = this.window.getComputedStyle(image);\n let renderedWidth = parseFloat(computedStyle.getPropertyValue('width'));\n let renderedHeight = parseFloat(computedStyle.getPropertyValue('height'));\n const boxSizing = computedStyle.getPropertyValue('box-sizing');\n const objectFit = computedStyle.getPropertyValue('object-fit');\n\n if (objectFit === `cover`) {\n // Object fit cover may indicate a use case such as a sprite sheet where\n // this warning does not apply.\n return false;\n }\n\n if (boxSizing === 'border-box') {\n // If the image `box-sizing` is set to `border-box`, we adjust the rendered\n // dimensions by subtracting padding values.\n const paddingTop = computedStyle.getPropertyValue('padding-top');\n const paddingRight = computedStyle.getPropertyValue('padding-right');\n const paddingBottom = computedStyle.getPropertyValue('padding-bottom');\n const paddingLeft = computedStyle.getPropertyValue('padding-left');\n renderedWidth -= parseFloat(paddingRight) + parseFloat(paddingLeft);\n renderedHeight -= parseFloat(paddingTop) + parseFloat(paddingBottom);\n }\n\n const intrinsicWidth = image.naturalWidth;\n const intrinsicHeight = image.naturalHeight;\n\n const recommendedWidth = this.window.devicePixelRatio * renderedWidth;\n const recommendedHeight = this.window.devicePixelRatio * renderedHeight;\n const oversizedWidth = intrinsicWidth - recommendedWidth >= OVERSIZED_IMAGE_TOLERANCE;\n const oversizedHeight = intrinsicHeight - recommendedHeight >= OVERSIZED_IMAGE_TOLERANCE;\n return oversizedWidth || oversizedHeight;\n }\n}\n\nfunction logLazyLCPWarning(src: string) {\n console.warn(\n formatRuntimeError(\n RuntimeErrorCode.IMAGE_PERFORMANCE_WARNING,\n `An image with src ${src} is the Largest Contentful Paint (LCP) element ` +\n `but was given a \"loading\" value of \"lazy\", which can negatively impact ` +\n `application loading performance. This warning can be addressed by ` +\n `changing the loading value of the LCP image to \"eager\", or by using the ` +\n `NgOptimizedImage directive's prioritization utilities. For more ` +\n `information about addressing or disabling this warning, see ` +\n `https://angular.dev/errors/NG0913`,\n ),\n );\n}\n\nfunction logOversizedImageWarning(src: string) {\n console.warn(\n formatRuntimeError(\n RuntimeErrorCode.IMAGE_PERFORMANCE_WARNING,\n `An image with src ${src} has intrinsic file dimensions much larger than its ` +\n `rendered size. This can negatively impact application loading performance. ` +\n `For more information about addressing or disabling this warning, see ` +\n `https://angular.dev/errors/NG0913`,\n ),\n );\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {InjectionToken} from '../di';\n\n/**\n * Internal token that allows to register extra callbacks that should be invoked during the\n * `PlatformRef.destroy` operation. This token is needed to avoid a direct reference to the\n * `PlatformRef` class (i.e. register the callback via `PlatformRef.onDestroy`), thus making the\n * entire class tree-shakeable.\n */\nexport const PLATFORM_DESTROY_LISTENERS = new InjectionToken<Set<VoidFunction>>(\n ngDevMode ? 'PlatformDestroyListeners' : '',\n);\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport {Subscription} from 'rxjs';\n\nimport {PROVIDED_NG_ZONE} from '../change_detection/scheduling/ng_zone_scheduling';\nimport {R3Injector} from '../di/r3_injector';\nimport {ErrorHandler} from '../error_handler';\nimport {RuntimeError, RuntimeErrorCode} from '../errors';\nimport {DEFAULT_LOCALE_ID} from '../i18n/localization';\nimport {LOCALE_ID} from '../i18n/tokens';\nimport {ImagePerformanceWarning} from '../image_performance_warning';\nimport {Type} from '../interface/type';\nimport {PLATFORM_DESTROY_LISTENERS} from './platform_destroy_listeners';\nimport {setLocaleId} from '../render3/i18n/i18n_locale_id';\nimport {NgZone} from '../zone/ng_zone';\n\nimport {ApplicationInitStatus} from '../application/application_init';\nimport {ApplicationRef, remove} from '../application/application_ref';\nimport {PROVIDED_ZONELESS} from '../change_detection/scheduling/zoneless_scheduling';\nimport {InjectionToken, Injector} from '../di';\nimport {InternalNgModuleRef, NgModuleRef} from '../linker/ng_module_factory';\nimport {stringify} from '../util/stringify';\nimport {isPromise} from '../util/lang';\n\n/**\n * InjectionToken to control root component bootstrap behavior.\n *\n * This token is primarily used in Angular's server-side rendering (SSR) scenarios,\n * particularly by the `@angular/ssr` package, to manage whether the root component\n * should be bootstrapped during the application initialization process.\n *\n * ## Purpose:\n * During SSR route extraction, setting this token to `false` prevents Angular from\n * bootstrapping the root component. This avoids unnecessary component rendering,\n * enabling route extraction without requiring additional APIs or triggering\n * component logic.\n *\n * ## Behavior:\n * - **`false`**: Prevents the root component from being bootstrapped.\n * - **`true`** (default): Proceeds with the normal root component bootstrap process.\n *\n * This mechanism ensures SSR can efficiently separate route extraction logic\n * from component rendering.\n */\nexport const ENABLE_ROOT_COMPONENT_BOOTSTRAP = new InjectionToken<boolean>(\n ngDevMode ? 'ENABLE_ROOT_COMPONENT_BOOTSTRAP' : '',\n);\n\nexport interface BootstrapConfig {\n platformInjector: Injector;\n}\n\nexport interface ModuleBootstrapConfig<M> extends BootstrapConfig {\n moduleRef: InternalNgModuleRef<M>;\n allPlatformModules: NgModuleRef<unknown>[];\n}\n\nexport interface ApplicationBootstrapConfig extends BootstrapConfig {\n r3Injector: R3Injector;\n rootComponent: Type<unknown> | undefined;\n}\n\nfunction isApplicationBootstrapConfig(\n config: ApplicationBootstrapConfig | ModuleBootstrapConfig<unknown>,\n): config is ApplicationBootstrapConfig {\n return !(config as ModuleBootstrapConfig<unknown>).moduleRef;\n}\n\nexport function bootstrap<M>(\n moduleBootstrapConfig: ModuleBootstrapConfig<M>,\n): Promise<NgModuleRef<M>>;\nexport function bootstrap(\n applicationBootstrapConfig: ApplicationBootstrapConfig,\n): Promise<ApplicationRef>;\nexport function bootstrap<M>(\n config: ModuleBootstrapConfig<M> | ApplicationBootstrapConfig,\n): Promise<ApplicationRef> | Promise<NgModuleRef<M>> {\n const envInjector = isApplicationBootstrapConfig(config)\n ? config.r3Injector\n : config.moduleRef.injector;\n const ngZone = envInjector.get(NgZone);\n return ngZone.run(() => {\n if (isApplicationBootstrapConfig(config)) {\n config.r3Injector.resolveInjectorInitializers();\n } else {\n config.moduleRef.resolveInjectorInitializers();\n }\n const exceptionHandler = envInjector.get(ErrorHandler, null);\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (exceptionHandler === null) {\n const errorMessage = isApplicationBootstrapConfig(config)\n ? 'No `ErrorHandler` found in the Dependency Injection tree.'\n : 'No ErrorHandler. Is platform module (BrowserModule) included';\n throw new RuntimeError(\n RuntimeErrorCode.MISSING_REQUIRED_INJECTABLE_IN_BOOTSTRAP,\n errorMessage,\n );\n }\n if (envInjector.get(PROVIDED_ZONELESS) && envInjector.get(PROVIDED_NG_ZONE)) {\n throw new RuntimeError(\n RuntimeErrorCode.PROVIDED_BOTH_ZONE_AND_ZONELESS,\n 'Invalid change detection configuration: ' +\n 'provideZoneChangeDetection and provideExperimentalZonelessChangeDetection cannot be used together.',\n );\n }\n }\n\n let onErrorSubscription: Subscription;\n ngZone.runOutsideAngular(() => {\n onErrorSubscription = ngZone.onError.subscribe({\n next: (error: any) => {\n exceptionHandler!.handleError(error);\n },\n });\n });\n\n // If the whole platform is destroyed, invoke the `destroy` method\n // for all bootstrapped applications as well.\n if (isApplicationBootstrapConfig(config)) {\n const destroyListener = () => envInjector.destroy();\n const onPlatformDestroyListeners = config.platformInjector.get(PLATFORM_DESTROY_LISTENERS);\n onPlatformDestroyListeners.add(destroyListener);\n\n envInjector.onDestroy(() => {\n onErrorSubscription.unsubscribe();\n onPlatformDestroyListeners.delete(destroyListener);\n });\n } else {\n const destroyListener = () => config.moduleRef.destroy();\n const onPlatformDestroyListeners = config.platformInjector.get(PLATFORM_DESTROY_LISTENERS);\n onPlatformDestroyListeners.add(destroyListener);\n\n config.moduleRef.onDestroy(() => {\n remove(config.allPlatformModules, config.moduleRef);\n onErrorSubscription.unsubscribe();\n onPlatformDestroyListeners.delete(destroyListener);\n });\n }\n\n return _callAndReportToErrorHandler(exceptionHandler!, ngZone, () => {\n const initStatus = envInjector.get(ApplicationInitStatus);\n initStatus.runInitializers();\n\n return initStatus.donePromise.then(() => {\n // If the `LOCALE_ID` provider is defined at bootstrap then we set the value for ivy\n const localeId = envInjector.get(LOCALE_ID, DEFAULT_LOCALE_ID);\n setLocaleId(localeId || DEFAULT_LOCALE_ID);\n\n const enableRootComponentBoostrap = envInjector.get(ENABLE_ROOT_COMPONENT_BOOTSTRAP, true);\n if (!enableRootComponentBoostrap) {\n if (isApplicationBootstrapConfig(config)) {\n return envInjector.get(ApplicationRef);\n }\n\n config.allPlatformModules.push(config.moduleRef);\n return config.moduleRef;\n }\n\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n const imagePerformanceService = envInjector.get(ImagePerformanceWarning);\n imagePerformanceService.start();\n }\n\n if (isApplicationBootstrapConfig(config)) {\n const appRef = envInjector.get(ApplicationRef);\n if (config.rootComponent !== undefined) {\n appRef.bootstrap(config.rootComponent);\n }\n return appRef;\n } else {\n moduleDoBootstrap(config.moduleRef, config.allPlatformModules);\n return config.moduleRef;\n }\n });\n });\n });\n}\n\nfunction moduleDoBootstrap(\n moduleRef: InternalNgModuleRef<any>,\n allPlatformModules: NgModuleRef<unknown>[],\n): void {\n const appRef = moduleRef.injector.get(ApplicationRef);\n if (moduleRef._bootstrapComponents.length > 0) {\n moduleRef._bootstrapComponents.forEach((f) => appRef.bootstrap(f));\n } else if (moduleRef.instance.ngDoBootstrap) {\n moduleRef.instance.ngDoBootstrap(appRef);\n } else {\n throw new RuntimeError(\n RuntimeErrorCode.BOOTSTRAP_COMPONENTS_NOT_FOUND,\n ngDevMode &&\n `The module ${stringify(moduleRef.instance.constructor)} was bootstrapped, ` +\n `but it does not declare \"@NgModule.bootstrap\" components nor a \"ngDoBootstrap\" method. ` +\n `Please define one of these.`,\n );\n }\n allPlatformModules.push(moduleRef);\n}\n\nfunction _callAndReportToErrorHandler(\n errorHandler: ErrorHandler,\n ngZone: NgZone,\n callback: () => any,\n): any {\n try {\n const result = callback();\n if (isPromise(result)) {\n return result.catch((e: any) => {\n ngZone.runOutsideAngular(() => errorHandler.handleError(e));\n // rethrow as the exception handler might not do it\n throw e;\n });\n }\n\n return result;\n } catch (e) {\n ngZone.runOutsideAngular(() => errorHandler.handleError(e));\n // rethrow as the exception handler might not do it\n throw e;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {compileNgModuleFactory} from '../application/application_ngmodule_factory_compiler';\nimport {BootstrapOptions, optionsReducer} from '../application/application_ref';\nimport {\n getNgZoneOptions,\n internalProvideZoneChangeDetection,\n} from '../change_detection/scheduling/ng_zone_scheduling';\nimport {ChangeDetectionScheduler} from '../change_detection/scheduling/zoneless_scheduling';\nimport {ChangeDetectionSchedulerImpl} from '../change_detection/scheduling/zoneless_scheduling_impl';\nimport {Injectable, Injector} from '../di';\nimport {RuntimeError, RuntimeErrorCode} from '../errors';\nimport {Type} from '../interface/type';\nimport {CompilerOptions} from '../linker';\nimport {NgModuleFactory, NgModuleRef} from '../linker/ng_module_factory';\nimport {createNgModuleRefWithProviders} from '../render3/ng_module_ref';\nimport {getNgZone, NgZone} from '../zone/ng_zone';\nimport {bootstrap} from './bootstrap';\nimport {PLATFORM_DESTROY_LISTENERS} from './platform_destroy_listeners';\n\n/**\n * The Angular platform is the entry point for Angular on a web page.\n * Each page has exactly one platform. Services (such as reflection) which are common\n * to every Angular application running on the page are bound in its scope.\n * A page's platform is initialized implicitly when a platform is created using a platform\n * factory such as `PlatformBrowser`, or explicitly by calling the `createPlatform()` function.\n *\n * @publicApi\n */\n@Injectable({providedIn: 'platform'})\nexport class PlatformRef {\n private _modules: NgModuleRef<any>[] = [];\n private _destroyListeners: Array<() => void> = [];\n private _destroyed: boolean = false;\n\n /** @internal */\n constructor(private _injector: Injector) {}\n\n /**\n * Creates an instance of an `@NgModule` for the given platform.\n *\n * @deprecated Passing NgModule factories as the `PlatformRef.bootstrapModuleFactory` function\n * argument is deprecated. Use the `PlatformRef.bootstrapModule` API instead.\n */\n bootstrapModuleFactory<M>(\n moduleFactory: NgModuleFactory<M>,\n options?: BootstrapOptions,\n ): Promise<NgModuleRef<M>> {\n const scheduleInRootZone = (options as any)?.scheduleInRootZone;\n const ngZoneFactory = () =>\n getNgZone(options?.ngZone, {\n ...getNgZoneOptions({\n eventCoalescing: options?.ngZoneEventCoalescing,\n runCoalescing: options?.ngZoneRunCoalescing,\n }),\n scheduleInRootZone,\n });\n const ignoreChangesOutsideZone = options?.ignoreChangesOutsideZone;\n const allAppProviders = [\n internalProvideZoneChangeDetection({\n ngZoneFactory,\n ignoreChangesOutsideZone,\n }),\n {provide: ChangeDetectionScheduler, useExisting: ChangeDetectionSchedulerImpl},\n ];\n const moduleRef = createNgModuleRefWithProviders(\n moduleFactory.moduleType,\n this.injector,\n allAppProviders,\n );\n\n return bootstrap({\n moduleRef,\n allPlatformModules: this._modules,\n platformInjector: this.injector,\n });\n }\n\n /**\n * Creates an instance of an `@NgModule` for a given platform.\n *\n * @usageNotes\n * ### Simple Example\n *\n * ```ts\n * @NgModule({\n * imports: [BrowserModule]\n * })\n * class MyModule {}\n *\n * let moduleRef = platformBrowser().bootstrapModule(MyModule);\n * ```\n *\n */\n bootstrapModule<M>(\n moduleType: Type<M>,\n compilerOptions:\n | (CompilerOptions & BootstrapOptions)\n | Array<CompilerOptions & BootstrapOptions> = [],\n ): Promise<NgModuleRef<M>> {\n const options = optionsReducer({}, compilerOptions);\n return compileNgModuleFactory(this.injector, options, moduleType).then((moduleFactory) =>\n this.bootstrapModuleFactory(moduleFactory, options),\n );\n }\n\n /**\n * Registers a listener to be called when the platform is destroyed.\n */\n onDestroy(callback: () => void): void {\n this._destroyListeners.push(callback);\n }\n\n /**\n * Retrieves the platform {@link Injector}, which is the parent injector for\n * every Angular application on the page and provides singleton providers.\n */\n get injector(): Injector {\n return this._injector;\n }\n\n /**\n * Destroys the current Angular platform and all Angular applications on the page.\n * Destroys all modules and listeners registered with the platform.\n */\n destroy() {\n if (this._destroyed) {\n throw new RuntimeError(\n RuntimeErrorCode.PLATFORM_ALREADY_DESTROYED,\n ngDevMode && 'The platform has already been destroyed!',\n );\n }\n this._modules.slice().forEach((module) => module.destroy());\n this._destroyListeners.forEach((listener) => listener());\n\n const destroyListeners = this._injector.get(PLATFORM_DESTROY_LISTENERS, null);\n if (destroyListeners) {\n destroyListeners.forEach((listener) => listener());\n destroyListeners.clear();\n }\n\n this._destroyed = true;\n }\n\n /**\n * Indicates whether this instance was destroyed.\n */\n get destroyed() {\n return this._destroyed;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n publishDefaultGlobalUtils,\n publishSignalConfiguration,\n} from '../application/application_ref';\nimport {PLATFORM_INITIALIZER} from '../application/application_tokens';\nimport {\n EnvironmentProviders,\n InjectionToken,\n Injector,\n makeEnvironmentProviders,\n runInInjectionContext,\n StaticProvider,\n} from '../di';\nimport {INJECTOR_SCOPE} from '../di/scope';\nimport {RuntimeError, RuntimeErrorCode} from '../errors';\n\nimport {PlatformRef} from './platform_ref';\nimport {PLATFORM_DESTROY_LISTENERS} from './platform_destroy_listeners';\n\nlet _platformInjector: Injector | null = null;\n\n/**\n * Internal token to indicate whether having multiple bootstrapped platform should be allowed (only\n * one bootstrapped platform is allowed by default). This token helps to support SSR scenarios.\n */\nexport const ALLOW_MULTIPLE_PLATFORMS = new InjectionToken<boolean>(\n ngDevMode ? 'AllowMultipleToken' : '',\n);\n\n/**\n * Creates a platform.\n * Platforms must be created on launch using this function.\n *\n * @publicApi\n */\nexport function createPlatform(injector: Injector): PlatformRef {\n if (_platformInjector && !_platformInjector.get(ALLOW_MULTIPLE_PLATFORMS, false)) {\n throw new RuntimeError(\n RuntimeErrorCode.MULTIPLE_PLATFORMS,\n ngDevMode && 'There can be only one platform. Destroy the previous one to create a new one.',\n );\n }\n publishDefaultGlobalUtils();\n publishSignalConfiguration();\n _platformInjector = injector;\n const platform = injector.get(PlatformRef);\n runPlatformInitializers(injector);\n return platform;\n}\n\n/**\n * Creates a factory for a platform. Can be used to provide or override `Providers` specific to\n * your application's runtime needs, such as `PLATFORM_INITIALIZER` and `PLATFORM_ID`.\n * @param parentPlatformFactory Another platform factory to modify. Allows you to compose factories\n * to build up configurations that might be required by different libraries or parts of the\n * application.\n * @param name Identifies the new platform factory.\n * @param providers A set of dependency providers for platforms created with the new factory.\n *\n * @publicApi\n */\nexport function createPlatformFactory(\n parentPlatformFactory: ((extraProviders?: StaticProvider[]) => PlatformRef) | null,\n name: string,\n providers: StaticProvider[] = [],\n): (extraProviders?: StaticProvider[]) => PlatformRef {\n const desc = `Platform: ${name}`;\n const marker = new InjectionToken(desc);\n return (extraProviders: StaticProvider[] = []) => {\n let platform = getPlatform();\n if (!platform || platform.injector.get(ALLOW_MULTIPLE_PLATFORMS, false)) {\n const platformProviders: StaticProvider[] = [\n ...providers,\n ...extraProviders,\n {provide: marker, useValue: true},\n ];\n if (parentPlatformFactory) {\n parentPlatformFactory(platformProviders);\n } else {\n createPlatform(createPlatformInjector(platformProviders, desc));\n }\n }\n return assertPlatform(marker);\n };\n}\n\n/**\n * Helper function to create an instance of a platform injector (that maintains the 'platform'\n * scope).\n */\nfunction createPlatformInjector(providers: StaticProvider[] = [], name?: string): Injector {\n return Injector.create({\n name,\n providers: [\n {provide: INJECTOR_SCOPE, useValue: 'platform'},\n {provide: PLATFORM_DESTROY_LISTENERS, useValue: new Set([() => (_platformInjector = null)])},\n ...providers,\n ],\n });\n}\n\n/**\n * Checks that there is currently a platform that contains the given token as a provider.\n *\n * @publicApi\n */\nexport function assertPlatform(requiredToken: any): PlatformRef {\n const platform = getPlatform();\n\n if (!platform) {\n throw new RuntimeError(RuntimeErrorCode.PLATFORM_NOT_FOUND, ngDevMode && 'No platform exists!');\n }\n\n if (\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n !platform.injector.get(requiredToken, null)\n ) {\n throw new RuntimeError(\n RuntimeErrorCode.MULTIPLE_PLATFORMS,\n 'A platform with a different configuration has been created. Please destroy it first.',\n );\n }\n\n return platform;\n}\n\n/**\n * Returns the current platform.\n *\n * @publicApi\n */\nexport function getPlatform(): PlatformRef | null {\n return _platformInjector?.get(PlatformRef) ?? null;\n}\n\n/**\n * Destroys the current Angular platform and all Angular applications on the page.\n * Destroys all modules and listeners registered with the platform.\n *\n * @publicApi\n */\nexport function destroyPlatform(): void {\n getPlatform()?.destroy();\n}\n\n/**\n * The goal of this function is to bootstrap a platform injector,\n * but avoid referencing `PlatformRef` class.\n * This function is needed for bootstrapping a Standalone Component.\n */\nexport function createOrReusePlatformInjector(providers: StaticProvider[] = []): Injector {\n // If a platform injector already exists, it means that the platform\n // is already bootstrapped and no additional actions are required.\n if (_platformInjector) return _platformInjector;\n\n publishDefaultGlobalUtils();\n // Otherwise, setup a new platform injector and run platform initializers.\n const injector = createPlatformInjector(providers);\n _platformInjector = injector;\n publishSignalConfiguration();\n runPlatformInitializers(injector);\n return injector;\n}\n\n/**\n * @description\n * This function is used to provide initialization functions that will be executed upon\n * initialization of the platform injector.\n *\n * Note that the provided initializer is run in the injection context.\n *\n * Previously, this was achieved using the `PLATFORM_INITIALIZER` token which is now deprecated.\n *\n * @see {@link PLATFORM_INITIALIZER}\n *\n * @publicApi\n */\nexport function providePlatformInitializer(initializerFn: () => void): EnvironmentProviders {\n return makeEnvironmentProviders([\n {\n provide: PLATFORM_INITIALIZER,\n useValue: initializerFn,\n multi: true,\n },\n ]);\n}\n\nfunction runPlatformInitializers(injector: Injector): void {\n const inits = injector.get(PLATFORM_INITIALIZER, null);\n runInInjectionContext(injector, () => {\n inits?.forEach((init) => init());\n });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ApplicationRef} from '../../application/application_ref';\nimport {ChangeDetectionSchedulerImpl} from './zoneless_scheduling_impl';\nimport {inject} from '../../di/injector_compatibility';\nimport {makeEnvironmentProviders} from '../../di/provider_collection';\nimport {NgZone} from '../../zone/ng_zone';\n\nimport {EnvironmentInjector} from '../../di/r3_injector';\nimport {ENVIRONMENT_INITIALIZER} from '../../di/initializer_token';\nimport {CheckNoChangesMode} from '../../render3/state';\nimport {ErrorHandler} from '../../error_handler';\nimport {checkNoChangesInternal} from '../../render3/instructions/change_detection';\nimport {ZONELESS_ENABLED} from './zoneless_scheduling';\n\n/**\n * Used to periodically verify no expressions have changed after they were checked.\n *\n * @param options Used to configure when the check will execute.\n * - `interval` will periodically run exhaustive `checkNoChanges` on application views\n * - `useNgZoneOnStable` will use ZoneJS to determine when change detection might have run\n * in an application using ZoneJS to drive change detection. When the `NgZone.onStable` would\n * have emitted, all views attached to the `ApplicationRef` are checked for changes.\n * - 'exhaustive' means that all views attached to `ApplicationRef` and all the descendants of those views will be\n * checked for changes (excluding those subtrees which are detached via `ChangeDetectorRef.detach()`).\n * This is useful because the check that runs after regular change detection does not work for components using `ChangeDetectionStrategy.OnPush`.\n * This check is will surface any existing errors hidden by `OnPush` components. By default, this check is exhaustive\n * and will always check all views, regardless of their \"dirty\" state and `ChangeDetectionStrategy`.\n *\n * When the `useNgZoneOnStable` option is `true`, this function will provide its own `NgZone` implementation and needs\n * to come after any other `NgZone` provider, including `provideZoneChangeDetection()` and `provideExperimentalZonelessChangeDetection()`.\n *\n * @experimental\n * @publicApi\n */\nexport function provideExperimentalCheckNoChangesForDebug(options: {\n interval?: number;\n useNgZoneOnStable?: boolean;\n exhaustive?: boolean;\n}) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (options.interval === undefined && !options.useNgZoneOnStable) {\n throw new Error('Must provide one of `useNgZoneOnStable` or `interval`');\n }\n const checkNoChangesMode =\n options?.exhaustive === false\n ? CheckNoChangesMode.OnlyDirtyViews\n : CheckNoChangesMode.Exhaustive;\n return makeEnvironmentProviders([\n options?.useNgZoneOnStable\n ? {provide: NgZone, useFactory: () => new DebugNgZoneForCheckNoChanges(checkNoChangesMode)}\n : [],\n options?.interval !== undefined\n ? exhaustiveCheckNoChangesInterval(options.interval, checkNoChangesMode)\n : [],\n {\n provide: ENVIRONMENT_INITIALIZER,\n multi: true,\n useValue: () => {\n if (\n options?.useNgZoneOnStable &&\n !(inject(NgZone) instanceof DebugNgZoneForCheckNoChanges)\n ) {\n throw new Error(\n '`provideExperimentalCheckNoChangesForDebug` with `useNgZoneOnStable` must be after any other provider for `NgZone`.',\n );\n }\n },\n },\n ]);\n } else {\n return makeEnvironmentProviders([]);\n }\n}\n\nexport class DebugNgZoneForCheckNoChanges extends NgZone {\n private applicationRef?: ApplicationRef;\n private scheduler?: ChangeDetectionSchedulerImpl;\n private errorHandler?: ErrorHandler;\n private readonly injector = inject(EnvironmentInjector);\n\n constructor(private readonly checkNoChangesMode: CheckNoChangesMode) {\n const zonelessEnabled = inject(ZONELESS_ENABLED);\n // Use coalescing to ensure we aren't ever running this check synchronously\n super({\n shouldCoalesceEventChangeDetection: true,\n shouldCoalesceRunChangeDetection: zonelessEnabled,\n });\n\n if (zonelessEnabled) {\n // prevent emits to ensure code doesn't rely on these\n this.onMicrotaskEmpty.emit = () => {};\n this.onStable.emit = () => {\n this.scheduler ||= this.injector.get(ChangeDetectionSchedulerImpl);\n if (this.scheduler.pendingRenderTaskId || this.scheduler.runningTick) {\n return;\n }\n this.checkApplicationViews();\n };\n this.onUnstable.emit = () => {};\n } else {\n this.runOutsideAngular(() => {\n this.onStable.subscribe(() => {\n this.checkApplicationViews();\n });\n });\n }\n }\n\n private checkApplicationViews() {\n this.applicationRef ||= this.injector.get(ApplicationRef);\n for (const view of this.applicationRef.allViews) {\n try {\n checkNoChangesInternal(view._lView, this.checkNoChangesMode, view.notifyErrorHandler);\n } catch (e) {\n this.errorHandler ||= this.injector.get(ErrorHandler);\n this.errorHandler.handleError(e);\n }\n }\n }\n}\n\nfunction exhaustiveCheckNoChangesInterval(\n interval: number,\n checkNoChangesMode: CheckNoChangesMode,\n) {\n return {\n provide: ENVIRONMENT_INITIALIZER,\n multi: true,\n useFactory: () => {\n const applicationRef = inject(ApplicationRef);\n const errorHandler = inject(ErrorHandler);\n const scheduler = inject(ChangeDetectionSchedulerImpl);\n const ngZone = inject(NgZone);\n\n return () => {\n function scheduleCheckNoChanges() {\n ngZone.runOutsideAngular(() => {\n setTimeout(() => {\n if (applicationRef.destroyed) {\n return;\n }\n if (scheduler.pendingRenderTaskId || scheduler.runningTick) {\n scheduleCheckNoChanges();\n return;\n }\n\n for (const view of applicationRef.allViews) {\n try {\n checkNoChangesInternal(view._lView, checkNoChangesMode, view.notifyErrorHandler);\n } catch (e) {\n errorHandler.handleError(e);\n }\n }\n\n scheduleCheckNoChanges();\n }, interval);\n });\n }\n scheduleCheckNoChanges();\n };\n },\n };\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {global} from './global';\n\n/**\n * Returns whether Angular is in development mode.\n *\n * By default, this is true, unless `enableProdMode` is invoked prior to calling this method or the\n * application is built using the Angular CLI with the `optimization` option.\n * @see {@link /cli/build ng build}\n *\n * @publicApi\n */\nexport function isDevMode(): boolean {\n return typeof ngDevMode === 'undefined' || !!ngDevMode;\n}\n\n/**\n * Disable Angular's development mode, which turns off assertions and other\n * checks within the framework.\n *\n * One important assertion this disables verifies that a change detection pass\n * does not result in additional changes to any bindings (also known as\n * unidirectional data flow).\n *\n * Using this method is discouraged as the Angular CLI will set production mode when using the\n * `optimization` option.\n * @see {@link /cli/build ng build}\n *\n * @publicApi\n */\nexport function enableProdMode(): void {\n // The below check is there so when ngDevMode is set via terser\n // `global['ngDevMode'] = false;` is also dropped.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n global['ngDevMode'] = false;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Type} from '../interface/type';\nimport {NgModuleFactory as R3NgModuleFactory} from '../render3/ng_module_ref';\n\nimport {NgModuleFactory} from './ng_module_factory';\nimport {getRegisteredNgModuleType} from './ng_module_registration';\n\n/**\n * Returns the NgModuleFactory with the given id (specified using [@NgModule.id\n * field](api/core/NgModule#id)), if it exists and has been loaded. Factories for NgModules that do\n * not specify an `id` cannot be retrieved. Throws if an NgModule cannot be found.\n * @publicApi\n * @deprecated Use `getNgModuleById` instead.\n */\nexport function getModuleFactory(id: string): NgModuleFactory<any> {\n const type = getRegisteredNgModuleType(id);\n if (!type) throw noModuleError(id);\n return new R3NgModuleFactory(type);\n}\n\n/**\n * Returns the NgModule class with the given id (specified using [@NgModule.id\n * field](api/core/NgModule#id)), if it exists and has been loaded. Classes for NgModules that do\n * not specify an `id` cannot be retrieved. Throws if an NgModule cannot be found.\n * @publicApi\n */\nexport function getNgModuleById<T>(id: string): Type<T> {\n const type = getRegisteredNgModuleType(id);\n if (!type) throw noModuleError(id);\n return type;\n}\n\nfunction noModuleError(id: string): Error {\n return new Error(`No module with ID ${id} loaded`);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {InjectFlags} from '../di';\nimport {InternalInjectFlags} from '../di/interface/injector';\nimport {TNode, TNodeType} from '../render3/interfaces/node';\nimport {isComponentHost} from '../render3/interfaces/type_checks';\nimport {DECLARATION_COMPONENT_VIEW, LView} from '../render3/interfaces/view';\nimport {getCurrentTNode, getLView} from '../render3/state';\nimport {getComponentLViewByIndex} from '../render3/util/view_utils';\nimport {ViewRef} from '../render3/view_ref';\n\n/**\n * Base class that provides change detection functionality.\n * A change-detection tree collects all views that are to be checked for changes.\n * Use the methods to add and remove views from the tree, initiate change-detection,\n * and explicitly mark views as _dirty_, meaning that they have changed and need to be re-rendered.\n *\n * @see [Using change detection hooks](guide/components/lifecycle#using-change-detection-hooks)\n * @see [Defining custom change detection](guide/components/lifecycle#defining-custom-change-detection)\n *\n * @usageNotes\n *\n * The following examples demonstrate how to modify default change-detection behavior\n * to perform explicit detection when needed.\n *\n * ### Use `markForCheck()` with `CheckOnce` strategy\n *\n * The following example sets the `OnPush` change-detection strategy for a component\n * (`CheckOnce`, rather than the default `CheckAlways`), then forces a second check\n * after an interval.\n *\n * {@example core/ts/change_detect/change-detection.ts region='mark-for-check'}\n *\n * ### Detach change detector to limit how often check occurs\n *\n * The following example defines a component with a large list of read-only data\n * that is expected to change constantly, many times per second.\n * To improve performance, we want to check and update the list\n * less often than the changes actually occur. To do that, we detach\n * the component's change detector and perform an explicit local check every five seconds.\n *\n * {@example core/ts/change_detect/change-detection.ts region='detach'}\n *\n *\n * ### Reattaching a detached component\n *\n * The following example creates a component displaying live data.\n * The component detaches its change detector from the main change detector tree\n * when the `live` property is set to false, and reattaches it when the property\n * becomes true.\n *\n * {@example core/ts/change_detect/change-detection.ts region='reattach'}\n *\n * @publicApi\n */\nexport abstract class ChangeDetectorRef {\n /**\n * When a view uses the {@link ChangeDetectionStrategy#OnPush} (checkOnce)\n * change detection strategy, explicitly marks the view as changed so that\n * it can be checked again.\n *\n * Components are normally marked as dirty (in need of rerendering) when inputs\n * have changed or events have fired in the view. Call this method to ensure that\n * a component is checked even if these triggers have not occurred.\n *\n * <!-- TODO: Add a link to a chapter on OnPush components -->\n *\n */\n abstract markForCheck(): void;\n\n /**\n * Detaches this view from the change-detection tree.\n * A detached view is not checked until it is reattached.\n * Use in combination with `detectChanges()` to implement local change detection checks.\n *\n * Detached views are not checked during change detection runs until they are\n * re-attached, even if they are marked as dirty.\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 */\n abstract detach(): void;\n\n /**\n * Checks this view and its children. Use in combination with {@link ChangeDetectorRef#detach}\n * to implement 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 */\n abstract detectChanges(): void;\n\n /**\n * Checks the change detector and its children, and throws if any changes are detected.\n *\n * Use in development mode to verify that running change detection doesn't introduce\n * other changes. Calling it in production mode is a noop.\n *\n * @deprecated This is a test-only API that does not have a place in production interface.\n * `checkNoChanges` is already part of an `ApplicationRef` tick when the app is running in dev\n * mode. For more granular `checkNoChanges` validation, use `ComponentFixture`.\n */\n abstract checkNoChanges(): void;\n\n /**\n * Re-attaches the previously detached view to the change detection tree.\n * Views are attached to the tree by default.\n *\n * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n *\n */\n abstract reattach(): void;\n\n /**\n * @internal\n * @nocollapse\n */\n static __NG_ELEMENT_ID__: (flags: InjectFlags) => ChangeDetectorRef = injectChangeDetectorRef;\n}\n\n/** Returns a ChangeDetectorRef (a.k.a. a ViewRef) */\nexport function injectChangeDetectorRef(flags: InjectFlags): ChangeDetectorRef {\n return createViewRef(\n getCurrentTNode()!,\n getLView(),\n (flags & InternalInjectFlags.ForPipe) === InternalInjectFlags.ForPipe,\n );\n}\n\n/**\n * Creates a ViewRef and stores it on the injector as ChangeDetectorRef (public alias).\n *\n * @param tNode The node that is requesting a ChangeDetectorRef\n * @param lView The view to which the node belongs\n * @param isPipe Whether the view is being injected into a pipe.\n * @returns The ChangeDetectorRef to use\n */\nfunction createViewRef(tNode: TNode, lView: LView, isPipe: boolean): ChangeDetectorRef {\n if (isComponentHost(tNode) && !isPipe) {\n // The LView represents the location where the component is declared.\n // Instead we want the LView for the component View and so we need to look it up.\n const componentView = getComponentLViewByIndex(tNode.index, lView); // look down\n return new ViewRef(componentView, componentView);\n } else if (\n tNode.type &\n (TNodeType.AnyRNode | TNodeType.AnyContainer | TNodeType.Icu | TNodeType.LetDeclaration)\n ) {\n // The LView represents the location where the injection is requested from.\n // We need to locate the containing LView (in case where the `lView` is an embedded view)\n const hostComponentView = lView[DECLARATION_COMPONENT_VIEW]; // look up\n return new ViewRef(hostComponentView, lView);\n }\n return null!;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ChangeDetectorRef} from '../change_detection/change_detector_ref';\n\n/**\n * Represents an Angular view.\n *\n * @see {@link /api/core/ChangeDetectorRef?tab=usage-notes Change detection usage}\n *\n * @publicApi\n */\nexport abstract class ViewRef extends ChangeDetectorRef {\n /**\n * Destroys this view and all of the data structures associated with it.\n */\n abstract destroy(): void;\n\n /**\n * Reports whether this view has been destroyed.\n * @returns True after the `destroy()` method has been called, false otherwise.\n */\n abstract get destroyed(): boolean;\n\n /**\n * A lifecycle hook that provides additional developer-defined cleanup\n * functionality for views.\n * @param callback A handler function that cleans up developer-defined data\n * associated with a view. Called when the `destroy()` method is invoked.\n */\n abstract onDestroy(callback: Function): void;\n}\n\n/**\n * Represents an Angular view in a view container.\n * An embedded view can be referenced from a component\n * other than the hosting component whose template defines it, or it can be defined\n * independently by a `TemplateRef`.\n *\n * Properties of elements in a view can change, but the structure (number and order) of elements in\n * a view cannot. Change the structure of elements by inserting, moving, or\n * removing nested views in a view container.\n *\n * @see {@link ViewContainerRef}\n *\n * @usageNotes\n *\n * The following template breaks down into two separate `TemplateRef` instances,\n * an outer one and an inner one.\n *\n * ```html\n * Count: {{items.length}}\n * <ul>\n * <li *ngFor=\"let item of items\">{{item}}</li>\n * </ul>\n * ```\n *\n * This is the outer `TemplateRef`:\n *\n * ```html\n * Count: {{items.length}}\n * <ul>\n * <ng-template ngFor let-item [ngForOf]=\"items\"></ng-template>\n * </ul>\n * ```\n *\n * This is the inner `TemplateRef`:\n *\n * ```html\n * <li>{{item}}</li>\n * ```\n *\n * The outer and inner `TemplateRef` instances are assembled into views as follows:\n *\n * ```html\n * <!-- ViewRef: outer-0 -->\n * Count: 2\n * <ul>\n * <ng-template view-container-ref></ng-template>\n * <!-- ViewRef: inner-1 --><li>first</li><!-- /ViewRef: inner-1 -->\n * <!-- ViewRef: inner-2 --><li>second</li><!-- /ViewRef: inner-2 -->\n * </ul>\n * <!-- /ViewRef: outer-0 -->\n * ```\n * @publicApi\n */\nexport abstract class EmbeddedViewRef<C> extends ViewRef {\n /**\n * The context for this view, inherited from the anchor element.\n */\n abstract context: C;\n\n /**\n * The root nodes for this embedded view.\n */\n abstract get rootNodes(): any[];\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Injector} from '../di/injector';\nimport {assertTNodeForLView} from '../render3/assert';\nimport {getLContext} from '../render3/context_discovery';\nimport {CONTAINER_HEADER_OFFSET, LContainer, NATIVE} from '../render3/interfaces/container';\nimport {TElementNode, TNode, TNodeFlags, TNodeType} from '../render3/interfaces/node';\nimport {isComponentHost, isLContainer} from '../render3/interfaces/type_checks';\nimport {\n DECLARATION_COMPONENT_VIEW,\n LView,\n PARENT,\n T_HOST,\n TData,\n TVIEW,\n} from '../render3/interfaces/view';\nimport {\n getComponent,\n getContext,\n getInjectionTokens,\n getInjector,\n getListeners,\n getLocalRefs,\n getOwningComponent,\n} from '../render3/util/discovery_utils';\nimport {INTERPOLATION_DELIMITER} from '../render3/util/misc_utils';\nimport {renderStringify} from '../render3/util/stringify_utils';\nimport {getComponentLViewByIndex, getNativeByTNodeOrNull} from '../render3/util/view_utils';\nimport {assertDomNode} from '../util/assert';\n\n/**\n * @publicApi\n */\nexport class DebugEventListener {\n constructor(\n public name: string,\n public callback: Function,\n ) {}\n}\n\n/**\n * @publicApi\n */\nexport function asNativeElements(debugEls: DebugElement[]): any {\n return debugEls.map((el) => el.nativeElement);\n}\n\n/**\n * @publicApi\n */\nexport class DebugNode {\n /**\n * The underlying DOM node.\n */\n readonly nativeNode: any;\n\n constructor(nativeNode: Node) {\n this.nativeNode = nativeNode;\n }\n\n /**\n * The `DebugElement` parent. Will be `null` if this is the root element.\n */\n get parent(): DebugElement | null {\n const parent = this.nativeNode.parentNode as Element;\n return parent ? new DebugElement(parent) : null;\n }\n\n /**\n * The host dependency injector. For example, the root element's component instance injector.\n */\n get injector(): Injector {\n return getInjector(this.nativeNode);\n }\n\n /**\n * The element's own component instance, if it has one.\n */\n get componentInstance(): any {\n const nativeElement = this.nativeNode;\n return (\n nativeElement && (getComponent(nativeElement as Element) || getOwningComponent(nativeElement))\n );\n }\n\n /**\n * An object that provides parent context for this element. Often an ancestor component instance\n * that governs this element.\n *\n * When an element is repeated within *ngFor, the context is an `NgForOf` whose `$implicit`\n * property is the value of the row instance value. For example, the `hero` in `*ngFor=\"let hero\n * of heroes\"`.\n */\n get context(): any {\n return getComponent(this.nativeNode as Element) || getContext(this.nativeNode as Element);\n }\n\n /**\n * The callbacks attached to the component's @Output properties and/or the element's event\n * properties.\n */\n get listeners(): DebugEventListener[] {\n return getListeners(this.nativeNode as Element).filter((listener) => listener.type === 'dom');\n }\n\n /**\n * Dictionary of objects associated with template local variables (e.g. #foo), keyed by the local\n * variable name.\n */\n get references(): {[key: string]: any} {\n return getLocalRefs(this.nativeNode);\n }\n\n /**\n * This component's injector lookup tokens. Includes the component itself plus the tokens that the\n * component lists in its providers metadata.\n */\n get providerTokens(): any[] {\n return getInjectionTokens(this.nativeNode as Element);\n }\n}\n\n/**\n * @publicApi\n *\n * @see [Component testing scenarios](guide/testing/components-scenarios)\n * @see [Basics of testing components](guide/testing/components-basics)\n * @see [Testing utility APIs](guide/testing/utility-apis)\n */\nexport class DebugElement extends DebugNode {\n constructor(nativeNode: Element) {\n ngDevMode && assertDomNode(nativeNode);\n super(nativeNode);\n }\n\n /**\n * The underlying DOM element at the root of the component.\n */\n get nativeElement(): any {\n return this.nativeNode.nodeType == Node.ELEMENT_NODE ? (this.nativeNode as Element) : null;\n }\n\n /**\n * The element tag name, if it is an element.\n */\n get name(): string {\n const context = getLContext(this.nativeNode)!;\n const lView = context ? context.lView : null;\n\n if (lView !== null) {\n const tData = lView[TVIEW].data;\n const tNode = tData[context.nodeIndex] as TNode;\n return tNode.value!;\n } else {\n return this.nativeNode.nodeName;\n }\n }\n\n /**\n * Gets a map of property names to property values for an element.\n *\n * This map includes:\n * - Regular property bindings (e.g. `[id]=\"id\"`)\n * - Host property bindings (e.g. `host: { '[id]': \"id\" }`)\n * - Interpolated property bindings (e.g. `id=\"{{ value }}\")\n *\n * It does not include:\n * - input property bindings (e.g. `[myCustomInput]=\"value\"`)\n * - attribute bindings (e.g. `[attr.role]=\"menu\"`)\n */\n get properties(): {[key: string]: any} {\n const context = getLContext(this.nativeNode)!;\n const lView = context ? context.lView : null;\n\n if (lView === null) {\n return {};\n }\n\n const tData = lView[TVIEW].data;\n const tNode = tData[context.nodeIndex] as TNode;\n\n const properties: {[key: string]: string} = {};\n // Collect properties from the DOM.\n copyDomProperties(this.nativeElement, properties);\n // Collect properties from the bindings. This is needed for animation renderer which has\n // synthetic properties which don't get reflected into the DOM.\n collectPropertyBindings(properties, tNode, lView, tData);\n return properties;\n }\n\n /**\n * A map of attribute names to attribute values for an element.\n */\n // TODO: replace null by undefined in the return type\n get attributes(): {[key: string]: string | null} {\n const attributes: {[key: string]: string | null} = {};\n const element = this.nativeElement as Element | undefined;\n\n if (!element) {\n return attributes;\n }\n\n const context = getLContext(element)!;\n const lView = context ? context.lView : null;\n\n if (lView === null) {\n return {};\n }\n\n const tNodeAttrs = (lView[TVIEW].data[context.nodeIndex] as TNode).attrs;\n const lowercaseTNodeAttrs: string[] = [];\n\n // For debug nodes we take the element's attribute directly from the DOM since it allows us\n // to account for ones that weren't set via bindings (e.g. ViewEngine keeps track of the ones\n // that are set through `Renderer2`). The problem is that the browser will lowercase all names,\n // however since we have the attributes already on the TNode, we can preserve the case by going\n // through them once, adding them to the `attributes` map and putting their lower-cased name\n // into an array. Afterwards when we're going through the native DOM attributes, we can check\n // whether we haven't run into an attribute already through the TNode.\n if (tNodeAttrs) {\n let i = 0;\n while (i < tNodeAttrs.length) {\n const attrName = tNodeAttrs[i];\n\n // Stop as soon as we hit a marker. We only care about the regular attributes. Everything\n // else will be handled below when we read the final attributes off the DOM.\n if (typeof attrName !== 'string') break;\n\n const attrValue = tNodeAttrs[i + 1];\n attributes[attrName] = attrValue as string;\n lowercaseTNodeAttrs.push(attrName.toLowerCase());\n\n i += 2;\n }\n }\n\n for (const attr of element.attributes) {\n // Make sure that we don't assign the same attribute both in its\n // case-sensitive form and the lower-cased one from the browser.\n if (!lowercaseTNodeAttrs.includes(attr.name)) {\n attributes[attr.name] = attr.value;\n }\n }\n\n return attributes;\n }\n\n /**\n * The inline styles of the DOM element.\n */\n // TODO: replace null by undefined in the return type\n get styles(): {[key: string]: string | null} {\n const element = this.nativeElement as HTMLElement | null;\n return (element?.style ?? {}) as {[key: string]: string | null};\n }\n\n /**\n * A map containing the class names on the element as keys.\n *\n * This map is derived from the `className` property of the DOM element.\n *\n * Note: The values of this object will always be `true`. The class key will not appear in the KV\n * object if it does not exist on the element.\n *\n * @see [Element.className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className)\n */\n get classes(): {[key: string]: boolean} {\n const result: {[key: string]: boolean} = {};\n const element = this.nativeElement as HTMLElement | SVGElement;\n\n // SVG elements return an `SVGAnimatedString` instead of a plain string for the `className`.\n const className = element.className as string | SVGAnimatedString;\n const classes =\n typeof className !== 'string' ? className.baseVal.split(' ') : className.split(' ');\n\n classes.forEach((value: string) => (result[value] = true));\n\n return result;\n }\n\n /**\n * The `childNodes` of the DOM element as a `DebugNode` array.\n *\n * @see [Node.childNodes](https://developer.mozilla.org/en-US/docs/Web/API/Node/childNodes)\n */\n get childNodes(): DebugNode[] {\n const childNodes = this.nativeNode.childNodes;\n const children: DebugNode[] = [];\n for (let i = 0; i < childNodes.length; i++) {\n const element = childNodes[i];\n children.push(getDebugNode(element)!);\n }\n return children;\n }\n\n /**\n * The immediate `DebugElement` children. Walk the tree by descending through `children`.\n */\n get children(): DebugElement[] {\n const nativeElement = this.nativeElement;\n if (!nativeElement) return [];\n const childNodes = nativeElement.children;\n const children: DebugElement[] = [];\n for (let i = 0; i < childNodes.length; i++) {\n const element = childNodes[i];\n children.push(getDebugNode(element) as DebugElement);\n }\n return children;\n }\n\n /**\n * @returns the first `DebugElement` that matches the predicate at any depth in the subtree.\n */\n query(predicate: Predicate<DebugElement>): DebugElement {\n const results = this.queryAll(predicate);\n return results[0] || null;\n }\n\n /**\n * @returns All `DebugElement` matches for the predicate at any depth in the subtree.\n */\n queryAll(predicate: Predicate<DebugElement>): DebugElement[] {\n const matches: DebugElement[] = [];\n _queryAll(this, predicate, matches, true);\n return matches;\n }\n\n /**\n * @returns All `DebugNode` matches for the predicate at any depth in the subtree.\n */\n queryAllNodes(predicate: Predicate<DebugNode>): DebugNode[] {\n const matches: DebugNode[] = [];\n _queryAll(this, predicate, matches, false);\n return matches;\n }\n\n /**\n * Triggers the event by its name if there is a corresponding listener in the element's\n * `listeners` collection.\n *\n * If the event lacks a listener or there's some other problem, consider\n * calling `nativeElement.dispatchEvent(eventObject)`.\n *\n * @param eventName The name of the event to trigger\n * @param eventObj The _event object_ expected by the handler\n *\n * @see [Testing components scenarios](guide/testing/components-scenarios#trigger-event-handler)\n */\n triggerEventHandler(eventName: string, eventObj?: any): void {\n const node = this.nativeNode as any;\n const invokedListeners: Function[] = [];\n\n this.listeners.forEach((listener) => {\n if (listener.name === eventName) {\n const callback = listener.callback;\n callback.call(node, eventObj);\n invokedListeners.push(callback);\n }\n });\n\n // We need to check whether `eventListeners` exists, because it's something\n // that Zone.js only adds to `EventTarget` in browser environments.\n if (typeof node.eventListeners === 'function') {\n // Note that in Ivy we wrap event listeners with a call to `event.preventDefault` in some\n // cases. We use '__ngUnwrap__' as a special token that gives us access to the actual event\n // listener.\n node.eventListeners(eventName).forEach((listener: Function) => {\n // In order to ensure that we can detect the special __ngUnwrap__ token described above, we\n // use `toString` on the listener and see if it contains the token. We use this approach to\n // ensure that it still worked with compiled code since it cannot remove or rename string\n // literals. We also considered using a special function name (i.e. if(listener.name ===\n // special)) but that was more cumbersome and we were also concerned the compiled code could\n // strip the name, turning the condition in to (\"\" === \"\") and always returning true.\n if (listener.toString().indexOf('__ngUnwrap__') !== -1) {\n const unwrappedListener = listener('__ngUnwrap__');\n return (\n invokedListeners.indexOf(unwrappedListener) === -1 &&\n unwrappedListener.call(node, eventObj)\n );\n }\n });\n }\n }\n}\n\nfunction copyDomProperties(element: Element | null, properties: {[name: string]: string}): void {\n if (element) {\n // Skip own properties (as those are patched)\n let obj = Object.getPrototypeOf(element);\n const NodePrototype: any = Node.prototype;\n while (obj !== null && obj !== NodePrototype) {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n for (let key in descriptors) {\n if (!key.startsWith('__') && !key.startsWith('on')) {\n // don't include properties starting with `__` and `on`.\n // `__` are patched values which should not be included.\n // `on` are listeners which also should not be included.\n const value = (element as any)[key];\n if (isPrimitiveValue(value)) {\n properties[key] = value;\n }\n }\n }\n obj = Object.getPrototypeOf(obj);\n }\n }\n}\n\nfunction isPrimitiveValue(value: any): boolean {\n return (\n typeof value === 'string' ||\n typeof value === 'boolean' ||\n typeof value === 'number' ||\n value === null\n );\n}\n\n/**\n * Walk the TNode tree to find matches for the predicate.\n *\n * @param parentElement the element from which the walk is started\n * @param predicate the predicate to match\n * @param matches the list of positive matches\n * @param elementsOnly whether only elements should be searched\n */\nfunction _queryAll(\n parentElement: DebugElement,\n predicate: Predicate<DebugElement>,\n matches: DebugElement[],\n elementsOnly: true,\n): void;\nfunction _queryAll(\n parentElement: DebugElement,\n predicate: Predicate<DebugNode>,\n matches: DebugNode[],\n elementsOnly: false,\n): void;\nfunction _queryAll(\n parentElement: DebugElement,\n predicate: Predicate<DebugElement> | Predicate<DebugNode>,\n matches: DebugElement[] | DebugNode[],\n elementsOnly: boolean,\n) {\n const context = getLContext(parentElement.nativeNode)!;\n const lView = context ? context.lView : null;\n if (lView !== null) {\n const parentTNode = lView[TVIEW].data[context.nodeIndex] as TNode;\n _queryNodeChildren(\n parentTNode,\n lView,\n predicate,\n matches,\n elementsOnly,\n parentElement.nativeNode,\n );\n } else {\n // If the context is null, then `parentElement` was either created with Renderer2 or native DOM\n // APIs.\n _queryNativeNodeDescendants(parentElement.nativeNode, predicate, matches, elementsOnly);\n }\n}\n\n/**\n * Recursively match the current TNode against the predicate, and goes on with the next ones.\n *\n * @param tNode the current TNode\n * @param lView the LView of this TNode\n * @param predicate the predicate to match\n * @param matches the list of positive matches\n * @param elementsOnly whether only elements should be searched\n * @param rootNativeNode the root native node on which predicate should not be matched\n */\nfunction _queryNodeChildren(\n tNode: TNode,\n lView: LView,\n predicate: Predicate<DebugElement> | Predicate<DebugNode>,\n matches: DebugElement[] | DebugNode[],\n elementsOnly: boolean,\n rootNativeNode: any,\n) {\n ngDevMode && assertTNodeForLView(tNode, lView);\n const nativeNode = getNativeByTNodeOrNull(tNode, lView);\n // For each type of TNode, specific logic is executed.\n if (tNode.type & (TNodeType.AnyRNode | TNodeType.ElementContainer)) {\n // Case 1: the TNode is an element\n // The native node has to be checked.\n _addQueryMatch(nativeNode, predicate, matches, elementsOnly, rootNativeNode);\n if (isComponentHost(tNode)) {\n // If the element is the host of a component, then all nodes in its view have to be processed.\n // Note: the component's content (tNode.child) will be processed from the insertion points.\n const componentView = getComponentLViewByIndex(tNode.index, lView);\n if (componentView && componentView[TVIEW].firstChild) {\n _queryNodeChildren(\n componentView[TVIEW].firstChild!,\n componentView,\n predicate,\n matches,\n elementsOnly,\n rootNativeNode,\n );\n }\n } else {\n if (tNode.child) {\n // Otherwise, its children have to be processed.\n _queryNodeChildren(tNode.child, lView, predicate, matches, elementsOnly, rootNativeNode);\n }\n\n // We also have to query the DOM directly in order to catch elements inserted through\n // Renderer2. Note that this is __not__ optimal, because we're walking similar trees multiple\n // times. ViewEngine could do it more efficiently, because all the insertions go through\n // Renderer2, however that's not the case in Ivy. This approach is being used because:\n // 1. Matching the ViewEngine behavior would mean potentially introducing a dependency\n // from `Renderer2` to Ivy which could bring Ivy code into ViewEngine.\n // 2. It allows us to capture nodes that were inserted directly via the DOM.\n nativeNode && _queryNativeNodeDescendants(nativeNode, predicate, matches, elementsOnly);\n }\n // In all cases, if a dynamic container exists for this node, each view inside it has to be\n // processed.\n const nodeOrContainer = lView[tNode.index];\n if (isLContainer(nodeOrContainer)) {\n _queryNodeChildrenInContainer(\n nodeOrContainer,\n predicate,\n matches,\n elementsOnly,\n rootNativeNode,\n );\n }\n } else if (tNode.type & TNodeType.Container) {\n // Case 2: the TNode is a container\n // The native node has to be checked.\n const lContainer = lView[tNode.index];\n _addQueryMatch(lContainer[NATIVE], predicate, matches, elementsOnly, rootNativeNode);\n // Each view inside the container has to be processed.\n _queryNodeChildrenInContainer(lContainer, predicate, matches, elementsOnly, rootNativeNode);\n } else if (tNode.type & TNodeType.Projection) {\n // Case 3: the TNode is a projection insertion point (i.e. a <ng-content>).\n // The nodes projected at this location all need to be processed.\n const componentView = lView![DECLARATION_COMPONENT_VIEW];\n const componentHost = componentView[T_HOST] as TElementNode;\n const head: TNode | null = (componentHost.projection as (TNode | null)[])[\n tNode.projection as number\n ];\n\n if (Array.isArray(head)) {\n for (let nativeNode of head) {\n _addQueryMatch(nativeNode, predicate, matches, elementsOnly, rootNativeNode);\n }\n } else if (head) {\n const nextLView = componentView[PARENT]! as LView;\n const nextTNode = nextLView[TVIEW].data[head.index] as TNode;\n _queryNodeChildren(nextTNode, nextLView, predicate, matches, elementsOnly, rootNativeNode);\n }\n } else if (tNode.child) {\n // Case 4: the TNode is a view.\n _queryNodeChildren(tNode.child, lView, predicate, matches, elementsOnly, rootNativeNode);\n }\n\n // We don't want to go to the next sibling of the root node.\n if (rootNativeNode !== nativeNode) {\n // To determine the next node to be processed, we need to use the next or the projectionNext\n // link, depending on whether the current node has been projected.\n const nextTNode = tNode.flags & TNodeFlags.isProjected ? tNode.projectionNext : tNode.next;\n if (nextTNode) {\n _queryNodeChildren(nextTNode, lView, predicate, matches, elementsOnly, rootNativeNode);\n }\n }\n}\n\n/**\n * Process all TNodes in a given container.\n *\n * @param lContainer the container to be processed\n * @param predicate the predicate to match\n * @param matches the list of positive matches\n * @param elementsOnly whether only elements should be searched\n * @param rootNativeNode the root native node on which predicate should not be matched\n */\nfunction _queryNodeChildrenInContainer(\n lContainer: LContainer,\n predicate: Predicate<DebugElement> | Predicate<DebugNode>,\n matches: DebugElement[] | DebugNode[],\n elementsOnly: boolean,\n rootNativeNode: any,\n) {\n for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n const childView = lContainer[i] as LView;\n const firstChild = childView[TVIEW].firstChild;\n if (firstChild) {\n _queryNodeChildren(firstChild, childView, predicate, matches, elementsOnly, rootNativeNode);\n }\n }\n}\n\n/**\n * Match the current native node against the predicate.\n *\n * @param nativeNode the current native node\n * @param predicate the predicate to match\n * @param matches the list of positive matches\n * @param elementsOnly whether only elements should be searched\n * @param rootNativeNode the root native node on which predicate should not be matched\n */\nfunction _addQueryMatch(\n nativeNode: any,\n predicate: Predicate<DebugElement> | Predicate<DebugNode>,\n matches: DebugElement[] | DebugNode[],\n elementsOnly: boolean,\n rootNativeNode: any,\n) {\n if (rootNativeNode !== nativeNode) {\n const debugNode = getDebugNode(nativeNode);\n if (!debugNode) {\n return;\n }\n // Type of the \"predicate and \"matches\" array are set based on the value of\n // the \"elementsOnly\" parameter. TypeScript is not able to properly infer these\n // types with generics, so we manually cast the parameters accordingly.\n if (\n elementsOnly &&\n debugNode instanceof DebugElement &&\n predicate(debugNode) &&\n matches.indexOf(debugNode) === -1\n ) {\n matches.push(debugNode);\n } else if (\n !elementsOnly &&\n (predicate as Predicate<DebugNode>)(debugNode) &&\n (matches as DebugNode[]).indexOf(debugNode) === -1\n ) {\n (matches as DebugNode[]).push(debugNode);\n }\n }\n}\n\n/**\n * Match all the descendants of a DOM node against a predicate.\n *\n * @param nativeNode the current native node\n * @param predicate the predicate to match\n * @param matches the list where matches are stored\n * @param elementsOnly whether only elements should be searched\n */\nfunction _queryNativeNodeDescendants(\n parentNode: any,\n predicate: Predicate<DebugElement> | Predicate<DebugNode>,\n matches: DebugElement[] | DebugNode[],\n elementsOnly: boolean,\n) {\n const nodes = parentNode.childNodes;\n const length = nodes.length;\n\n for (let i = 0; i < length; i++) {\n const node = nodes[i];\n const debugNode = getDebugNode(node);\n\n if (debugNode) {\n if (\n elementsOnly &&\n debugNode instanceof DebugElement &&\n predicate(debugNode) &&\n matches.indexOf(debugNode) === -1\n ) {\n matches.push(debugNode);\n } else if (\n !elementsOnly &&\n (predicate as Predicate<DebugNode>)(debugNode) &&\n (matches as DebugNode[]).indexOf(debugNode) === -1\n ) {\n (matches as DebugNode[]).push(debugNode);\n }\n\n _queryNativeNodeDescendants(node, predicate, matches, elementsOnly);\n }\n }\n}\n\n/**\n * Iterates through the property bindings for a given node and generates\n * a map of property names to values. This map only contains property bindings\n * defined in templates, not in host bindings.\n */\nfunction collectPropertyBindings(\n properties: {[key: string]: string},\n tNode: TNode,\n lView: LView,\n tData: TData,\n): void {\n let bindingIndexes = tNode.propertyBindings;\n\n if (bindingIndexes !== null) {\n for (let i = 0; i < bindingIndexes.length; i++) {\n const bindingIndex = bindingIndexes[i];\n const propMetadata = tData[bindingIndex] as string;\n const metadataParts = propMetadata.split(INTERPOLATION_DELIMITER);\n const propertyName = metadataParts[0];\n if (metadataParts.length > 1) {\n let value = metadataParts[1];\n for (let j = 1; j < metadataParts.length - 1; j++) {\n value += renderStringify(lView[bindingIndex + j - 1]) + metadataParts[j + 1];\n }\n properties[propertyName] = value;\n } else {\n properties[propertyName] = lView[bindingIndex];\n }\n }\n }\n}\n\n// Need to keep the nodes in a global Map so that multiple angular apps are supported.\nconst _nativeNodeToDebugNode = new Map<any, DebugNode>();\n\nconst NG_DEBUG_PROPERTY = '__ng_debug__';\n\n/**\n * @publicApi\n */\nexport function getDebugNode(nativeNode: any): DebugNode | null {\n if (nativeNode instanceof Node) {\n if (!nativeNode.hasOwnProperty(NG_DEBUG_PROPERTY)) {\n (nativeNode as any)[NG_DEBUG_PROPERTY] =\n nativeNode.nodeType == Node.ELEMENT_NODE\n ? new DebugElement(nativeNode as Element)\n : new DebugNode(nativeNode);\n }\n return (nativeNode as any)[NG_DEBUG_PROPERTY];\n }\n return null;\n}\n\nexport function getAllDebugNodes(): DebugNode[] {\n return Array.from(_nativeNodeToDebugNode.values());\n}\n\nexport function indexDebugNode(node: DebugNode) {\n _nativeNodeToDebugNode.set(node.nativeNode, node);\n}\n\nexport function removeDebugNodeFromIndex(node: DebugNode) {\n _nativeNodeToDebugNode.delete(node.nativeNode);\n}\n\n/**\n * A boolean-valued function over a value, possibly including context information\n * regarding that value's position in an array.\n *\n * @publicApi\n */\nexport type Predicate<T> = (value: T) => boolean;\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {RuntimeError, RuntimeErrorCode} from '../../errors';\nimport {Writable} from '../../interface/type';\nimport {isListLikeIterable, iterateListLike} from '../../util/iterable';\nimport {stringify} from '../../util/stringify';\n\nimport type {\n IterableChangeRecord,\n IterableChanges,\n IterableDiffer,\n IterableDifferFactory,\n NgIterable,\n TrackByFunction,\n} from './iterable_differs';\n\nexport class DefaultIterableDifferFactory implements IterableDifferFactory {\n constructor() {}\n supports(obj: Object | null | undefined): boolean {\n return isListLikeIterable(obj);\n }\n\n create<V>(trackByFn?: TrackByFunction<V>): DefaultIterableDiffer<V> {\n return new DefaultIterableDiffer<V>(trackByFn);\n }\n}\n\nconst trackByIdentity = (index: number, item: any) => item;\n\n/**\n * @deprecated v4.0.0 - Should not be part of public API.\n * @publicApi\n */\nexport class DefaultIterableDiffer<V> implements IterableDiffer<V>, IterableChanges<V> {\n public readonly length: number = 0;\n // TODO: confirm the usage of `collection` as it's unused, readonly and on a non public API.\n public readonly collection!: V[] | Iterable<V> | null;\n // Keeps track of the used records at any point in time (during & across `_check()` calls)\n private _linkedRecords: _DuplicateMap<V> | null = null;\n // Keeps track of the removed records at any point in time during `_check()` calls.\n private _unlinkedRecords: _DuplicateMap<V> | null = null;\n private _previousItHead: IterableChangeRecord_<V> | null = null;\n private _itHead: IterableChangeRecord_<V> | null = null;\n private _itTail: IterableChangeRecord_<V> | null = null;\n private _additionsHead: IterableChangeRecord_<V> | null = null;\n private _additionsTail: IterableChangeRecord_<V> | null = null;\n private _movesHead: IterableChangeRecord_<V> | null = null;\n private _movesTail: IterableChangeRecord_<V> | null = null;\n private _removalsHead: IterableChangeRecord_<V> | null = null;\n private _removalsTail: IterableChangeRecord_<V> | null = null;\n // Keeps track of records where custom track by is the same, but item identity has changed\n private _identityChangesHead: IterableChangeRecord_<V> | null = null;\n private _identityChangesTail: IterableChangeRecord_<V> | null = null;\n private _trackByFn: TrackByFunction<V>;\n\n constructor(trackByFn?: TrackByFunction<V>) {\n this._trackByFn = trackByFn || trackByIdentity;\n }\n\n forEachItem(fn: (record: IterableChangeRecord_<V>) => void) {\n let record: IterableChangeRecord_<V> | null;\n for (record = this._itHead; record !== null; record = record._next) {\n fn(record);\n }\n }\n\n forEachOperation(\n fn: (\n item: IterableChangeRecord<V>,\n previousIndex: number | null,\n currentIndex: number | null,\n ) => void,\n ) {\n let nextIt = this._itHead;\n let nextRemove = this._removalsHead;\n let addRemoveOffset = 0;\n let moveOffsets: number[] | null = null;\n while (nextIt || nextRemove) {\n // Figure out which is the next record to process\n // Order: remove, add, move\n const record: IterableChangeRecord<V> =\n !nextRemove ||\n (nextIt &&\n nextIt.currentIndex! < getPreviousIndex(nextRemove, addRemoveOffset, moveOffsets))\n ? nextIt!\n : nextRemove;\n const adjPreviousIndex = getPreviousIndex(record, addRemoveOffset, moveOffsets);\n const currentIndex = record.currentIndex;\n\n // consume the item, and adjust the addRemoveOffset and update moveDistance if necessary\n if (record === nextRemove) {\n addRemoveOffset--;\n nextRemove = nextRemove._nextRemoved;\n } else {\n nextIt = nextIt!._next;\n if (record.previousIndex == null) {\n addRemoveOffset++;\n } else {\n // INVARIANT: currentIndex < previousIndex\n if (!moveOffsets) moveOffsets = [];\n const localMovePreviousIndex = adjPreviousIndex - addRemoveOffset;\n const localCurrentIndex = currentIndex! - addRemoveOffset;\n if (localMovePreviousIndex != localCurrentIndex) {\n for (let i = 0; i < localMovePreviousIndex; i++) {\n const offset = i < moveOffsets.length ? moveOffsets[i] : (moveOffsets[i] = 0);\n const index = offset + i;\n if (localCurrentIndex <= index && index < localMovePreviousIndex) {\n moveOffsets[i] = offset + 1;\n }\n }\n const previousIndex = record.previousIndex;\n moveOffsets[previousIndex] = localCurrentIndex - localMovePreviousIndex;\n }\n }\n }\n\n if (adjPreviousIndex !== currentIndex) {\n fn(record, adjPreviousIndex, currentIndex);\n }\n }\n }\n\n forEachPreviousItem(fn: (record: IterableChangeRecord_<V>) => void) {\n let record: IterableChangeRecord_<V> | null;\n for (record = this._previousItHead; record !== null; record = record._nextPrevious) {\n fn(record);\n }\n }\n\n forEachAddedItem(fn: (record: IterableChangeRecord_<V>) => void) {\n let record: IterableChangeRecord_<V> | null;\n for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n fn(record);\n }\n }\n\n forEachMovedItem(fn: (record: IterableChangeRecord_<V>) => void) {\n let record: IterableChangeRecord_<V> | null;\n for (record = this._movesHead; record !== null; record = record._nextMoved) {\n fn(record);\n }\n }\n\n forEachRemovedItem(fn: (record: IterableChangeRecord_<V>) => void) {\n let record: IterableChangeRecord_<V> | null;\n for (record = this._removalsHead; record !== null; record = record._nextRemoved) {\n fn(record);\n }\n }\n\n forEachIdentityChange(fn: (record: IterableChangeRecord_<V>) => void) {\n let record: IterableChangeRecord_<V> | null;\n for (record = this._identityChangesHead; record !== null; record = record._nextIdentityChange) {\n fn(record);\n }\n }\n\n diff(collection: NgIterable<V> | null | undefined): DefaultIterableDiffer<V> | null {\n if (collection == null) collection = [];\n if (!isListLikeIterable(collection)) {\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_DIFFER_INPUT,\n ngDevMode &&\n `Error trying to diff '${stringify(collection)}'. Only arrays and iterables are allowed`,\n );\n }\n\n if (this.check(collection)) {\n return this;\n } else {\n return null;\n }\n }\n\n onDestroy() {}\n\n check(collection: NgIterable<V>): boolean {\n this._reset();\n\n let record: IterableChangeRecord_<V> | null = this._itHead;\n let mayBeDirty: boolean = false;\n let index: number;\n let item: V;\n let itemTrackBy: any;\n if (Array.isArray(collection)) {\n (this as Writable<this>).length = collection.length;\n\n for (let index = 0; index < this.length; index++) {\n item = collection[index];\n itemTrackBy = this._trackByFn(index, item);\n if (record === null || !Object.is(record.trackById, itemTrackBy)) {\n record = this._mismatch(record, item, itemTrackBy, index);\n mayBeDirty = true;\n } else {\n if (mayBeDirty) {\n // TODO(misko): can we limit this to duplicates only?\n record = this._verifyReinsertion(record, item, itemTrackBy, index);\n }\n if (!Object.is(record.item, item)) this._addIdentityChange(record, item);\n }\n\n record = record._next;\n }\n } else {\n index = 0;\n iterateListLike(collection, (item: V) => {\n itemTrackBy = this._trackByFn(index, item);\n if (record === null || !Object.is(record.trackById, itemTrackBy)) {\n record = this._mismatch(record, item, itemTrackBy, index);\n mayBeDirty = true;\n } else {\n if (mayBeDirty) {\n // TODO(misko): can we limit this to duplicates only?\n record = this._verifyReinsertion(record, item, itemTrackBy, index);\n }\n if (!Object.is(record.item, item)) this._addIdentityChange(record, item);\n }\n record = record._next;\n index++;\n });\n (this as Writable<this>).length = index;\n }\n\n this._truncate(record);\n (this as Writable<this>).collection = collection;\n return this.isDirty;\n }\n\n /* CollectionChanges is considered dirty if it has any additions, moves, removals, or identity\n * changes.\n */\n get isDirty(): boolean {\n return (\n this._additionsHead !== null ||\n this._movesHead !== null ||\n this._removalsHead !== null ||\n this._identityChangesHead !== null\n );\n }\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 _reset() {\n if (this.isDirty) {\n let record: IterableChangeRecord_<V> | null;\n\n for (record = this._previousItHead = this._itHead; record !== null; record = record._next) {\n record._nextPrevious = record._next;\n }\n\n for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n record.previousIndex = record.currentIndex;\n }\n this._additionsHead = this._additionsTail = null;\n\n for (record = this._movesHead; record !== null; record = record._nextMoved) {\n record.previousIndex = record.currentIndex;\n }\n this._movesHead = this._movesTail = null;\n this._removalsHead = this._removalsTail = null;\n this._identityChangesHead = this._identityChangesTail = null;\n\n // TODO(vicb): when assert gets supported\n // assert(!this.isDirty);\n }\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 _mismatch(\n record: IterableChangeRecord_<V> | null,\n item: V,\n itemTrackBy: any,\n index: number,\n ): IterableChangeRecord_<V> {\n // The previous record after which we will append the current one.\n let previousRecord: IterableChangeRecord_<V> | null;\n\n if (record === null) {\n previousRecord = this._itTail;\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\n // See if we have evicted the item, which used to be at some anterior position of _itHead list.\n record = this._unlinkedRecords === null ? null : this._unlinkedRecords.get(itemTrackBy, null);\n if (record !== null) {\n // It is an item which we have evicted earlier: reinsert it back into the list.\n // But first we need to check if identity changed, so we can update in view if necessary.\n if (!Object.is(record.item, item)) this._addIdentityChange(record, item);\n\n this._reinsertAfter(record, previousRecord, index);\n } else {\n // Attempt to see if the item is at some posterior position of _itHead list.\n record = this._linkedRecords === null ? null : this._linkedRecords.get(itemTrackBy, index);\n if (record !== null) {\n // We have the item in _itHead at/after `index` position. We need to move it forward in the\n // collection.\n // But first we need to check if identity changed, so we can update in view if necessary.\n if (!Object.is(record.item, item)) this._addIdentityChange(record, item);\n\n this._moveAfter(record, previousRecord, index);\n } else {\n // It is a new item: add it.\n record = this._addAfter(\n new IterableChangeRecord_<V>(item, itemTrackBy),\n previousRecord,\n index,\n );\n }\n }\n return record;\n }\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 _verifyReinsertion(\n record: IterableChangeRecord_<V>,\n item: V,\n itemTrackBy: any,\n index: number,\n ): IterableChangeRecord_<V> {\n let reinsertRecord: IterableChangeRecord_<V> | null =\n this._unlinkedRecords === null ? null : this._unlinkedRecords.get(itemTrackBy, null);\n if (reinsertRecord !== null) {\n record = this._reinsertAfter(reinsertRecord, record._prev!, index);\n } else if (record.currentIndex != index) {\n record.currentIndex = index;\n this._addToMoves(record, index);\n }\n return record;\n }\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 _truncate(record: IterableChangeRecord_<V> | null) {\n // Anything after that needs to be removed;\n while (record !== null) {\n const nextRecord: IterableChangeRecord_<V> | null = record._next;\n this._addToRemovals(this._unlink(record));\n record = nextRecord;\n }\n if (this._unlinkedRecords !== null) {\n this._unlinkedRecords.clear();\n }\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\n /** @internal */\n _reinsertAfter(\n record: IterableChangeRecord_<V>,\n prevRecord: IterableChangeRecord_<V> | null,\n index: number,\n ): IterableChangeRecord_<V> {\n if (this._unlinkedRecords !== null) {\n this._unlinkedRecords.remove(record);\n }\n const prev = record._prevRemoved;\n const next = record._nextRemoved;\n\n if (prev === null) {\n this._removalsHead = next;\n } else {\n prev._nextRemoved = next;\n }\n if (next === null) {\n this._removalsTail = prev;\n } else {\n next._prevRemoved = prev;\n }\n\n this._insertAfter(record, prevRecord, index);\n this._addToMoves(record, index);\n return record;\n }\n\n /** @internal */\n _moveAfter(\n record: IterableChangeRecord_<V>,\n prevRecord: IterableChangeRecord_<V> | null,\n index: number,\n ): IterableChangeRecord_<V> {\n this._unlink(record);\n this._insertAfter(record, prevRecord, index);\n this._addToMoves(record, index);\n return record;\n }\n\n /** @internal */\n _addAfter(\n record: IterableChangeRecord_<V>,\n prevRecord: IterableChangeRecord_<V> | null,\n index: number,\n ): IterableChangeRecord_<V> {\n this._insertAfter(record, prevRecord, index);\n\n if (this._additionsTail === null) {\n // TODO(vicb):\n // assert(this._additionsHead === null);\n this._additionsTail = this._additionsHead = record;\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\n /** @internal */\n _insertAfter(\n record: IterableChangeRecord_<V>,\n prevRecord: IterableChangeRecord_<V> | null,\n index: number,\n ): IterableChangeRecord_<V> {\n // TODO(vicb):\n // assert(record != prevRecord);\n // assert(record._next === null);\n // assert(record._prev === null);\n\n const next: IterableChangeRecord_<V> | null =\n 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 } else {\n next._prev = record;\n }\n if (prevRecord === null) {\n this._itHead = record;\n } else {\n prevRecord._next = record;\n }\n\n if (this._linkedRecords === null) {\n this._linkedRecords = new _DuplicateMap<V>();\n }\n this._linkedRecords.put(record);\n\n record.currentIndex = index;\n return record;\n }\n\n /** @internal */\n _remove(record: IterableChangeRecord_<V>): IterableChangeRecord_<V> {\n return this._addToRemovals(this._unlink(record));\n }\n\n /** @internal */\n _unlink(record: IterableChangeRecord_<V>): IterableChangeRecord_<V> {\n if (this._linkedRecords !== null) {\n this._linkedRecords.remove(record);\n }\n\n const prev = record._prev;\n const next = record._next;\n\n // TODO(vicb):\n // assert((record._prev = null) === null);\n // assert((record._next = null) === null);\n\n if (prev === null) {\n this._itHead = next;\n } else {\n prev._next = next;\n }\n if (next === null) {\n this._itTail = prev;\n } else {\n next._prev = prev;\n }\n\n return record;\n }\n\n /** @internal */\n _addToMoves(record: IterableChangeRecord_<V>, toIndex: number): IterableChangeRecord_<V> {\n // TODO(vicb):\n // assert(record._nextMoved === null);\n\n if (record.previousIndex === toIndex) {\n return record;\n }\n\n if (this._movesTail === null) {\n // TODO(vicb):\n // assert(_movesHead === null);\n this._movesTail = this._movesHead = record;\n } else {\n // TODO(vicb):\n // assert(_movesTail._nextMoved === null);\n this._movesTail = this._movesTail._nextMoved = record;\n }\n\n return record;\n }\n\n private _addToRemovals(record: IterableChangeRecord_<V>): IterableChangeRecord_<V> {\n if (this._unlinkedRecords === null) {\n this._unlinkedRecords = new _DuplicateMap<V>();\n }\n this._unlinkedRecords.put(record);\n record.currentIndex = null;\n record._nextRemoved = null;\n\n if (this._removalsTail === null) {\n // TODO(vicb):\n // assert(_removalsHead === null);\n this._removalsTail = this._removalsHead = record;\n record._prevRemoved = null;\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\n /** @internal */\n _addIdentityChange(record: IterableChangeRecord_<V>, item: V) {\n record.item = item;\n if (this._identityChangesTail === null) {\n this._identityChangesTail = this._identityChangesHead = record;\n } else {\n this._identityChangesTail = this._identityChangesTail._nextIdentityChange = record;\n }\n return record;\n }\n}\n\nexport class IterableChangeRecord_<V> implements IterableChangeRecord<V> {\n currentIndex: number | null = null;\n previousIndex: number | null = null;\n\n /** @internal */\n _nextPrevious: IterableChangeRecord_<V> | null = null;\n /** @internal */\n _prev: IterableChangeRecord_<V> | null = null;\n /** @internal */\n _next: IterableChangeRecord_<V> | null = null;\n /** @internal */\n _prevDup: IterableChangeRecord_<V> | null = null;\n /** @internal */\n _nextDup: IterableChangeRecord_<V> | null = null;\n /** @internal */\n _prevRemoved: IterableChangeRecord_<V> | null = null;\n /** @internal */\n _nextRemoved: IterableChangeRecord_<V> | null = null;\n /** @internal */\n _nextAdded: IterableChangeRecord_<V> | null = null;\n /** @internal */\n _nextMoved: IterableChangeRecord_<V> | null = null;\n /** @internal */\n _nextIdentityChange: IterableChangeRecord_<V> | null = null;\n\n constructor(\n public item: V,\n public trackById: any,\n ) {}\n}\n\n// A linked list of IterableChangeRecords with the same IterableChangeRecord_.item\nclass _DuplicateItemRecordList<V> {\n /** @internal */\n _head: IterableChangeRecord_<V> | null = null;\n /** @internal */\n _tail: IterableChangeRecord_<V> | null = 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 add(record: IterableChangeRecord_<V>): void {\n if (this._head === null) {\n this._head = this._tail = record;\n record._nextDup = null;\n record._prevDup = null;\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\n // Returns a IterableChangeRecord_ having IterableChangeRecord_.trackById == trackById and\n // IterableChangeRecord_.currentIndex >= atOrAfterIndex\n get(trackById: any, atOrAfterIndex: number | null): IterableChangeRecord_<V> | null {\n let record: IterableChangeRecord_<V> | null;\n for (record = this._head; record !== null; record = record._nextDup) {\n if (\n (atOrAfterIndex === null || atOrAfterIndex <= record.currentIndex!) &&\n Object.is(record.trackById, trackById)\n ) {\n return record;\n }\n }\n return null;\n }\n\n /**\n * Remove one {@link IterableChangeRecord_} from the list of duplicates.\n *\n * Returns whether the list of duplicates is empty.\n */\n remove(record: IterableChangeRecord_<V>): boolean {\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\n const prev: IterableChangeRecord_<V> | null = record._prevDup;\n const next: IterableChangeRecord_<V> | null = record._nextDup;\n if (prev === null) {\n this._head = next;\n } else {\n prev._nextDup = next;\n }\n if (next === null) {\n this._tail = prev;\n } else {\n next._prevDup = prev;\n }\n return this._head === null;\n }\n}\n\nclass _DuplicateMap<V> {\n map = new Map<any, _DuplicateItemRecordList<V>>();\n\n put(record: IterableChangeRecord_<V>) {\n const key = record.trackById;\n\n let duplicates = this.map.get(key);\n if (!duplicates) {\n duplicates = new _DuplicateItemRecordList<V>();\n this.map.set(key, duplicates);\n }\n duplicates.add(record);\n }\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 get(trackById: any, atOrAfterIndex: number | null): IterableChangeRecord_<V> | null {\n const key = trackById;\n const recordList = this.map.get(key);\n return recordList ? recordList.get(trackById, atOrAfterIndex) : null;\n }\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 remove(record: IterableChangeRecord_<V>): IterableChangeRecord_<V> {\n const key = record.trackById;\n const recordList: _DuplicateItemRecordList<V> = 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\n get isEmpty(): boolean {\n return this.map.size === 0;\n }\n\n clear() {\n this.map.clear();\n }\n}\n\nfunction getPreviousIndex(\n item: any,\n addRemoveOffset: number,\n moveOffsets: number[] | null,\n): number {\n const previousIndex = item.previousIndex;\n if (previousIndex === null) return previousIndex;\n let moveOffset = 0;\n if (moveOffsets && previousIndex < moveOffsets.length) {\n moveOffset = moveOffsets[previousIndex];\n }\n return previousIndex + addRemoveOffset + moveOffset;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {RuntimeError, RuntimeErrorCode} from '../../errors';\nimport {isJsObject} from '../../util/iterable';\nimport {stringify} from '../../util/stringify';\n\nimport type {\n KeyValueChangeRecord,\n KeyValueChanges,\n KeyValueDiffer,\n KeyValueDifferFactory,\n} from './keyvalue_differs';\n\nexport class DefaultKeyValueDifferFactory<K, V> implements KeyValueDifferFactory {\n constructor() {}\n supports(obj: any): boolean {\n return obj instanceof Map || isJsObject(obj);\n }\n\n create<K, V>(): KeyValueDiffer<K, V> {\n return new DefaultKeyValueDiffer<K, V>();\n }\n}\n\nexport class DefaultKeyValueDiffer<K, V> implements KeyValueDiffer<K, V>, KeyValueChanges<K, V> {\n private _records = new Map<K, KeyValueChangeRecord_<K, V>>();\n private _mapHead: KeyValueChangeRecord_<K, V> | null = null;\n // _appendAfter is used in the check loop\n private _appendAfter: KeyValueChangeRecord_<K, V> | null = null;\n private _previousMapHead: KeyValueChangeRecord_<K, V> | null = null;\n private _changesHead: KeyValueChangeRecord_<K, V> | null = null;\n private _changesTail: KeyValueChangeRecord_<K, V> | null = null;\n private _additionsHead: KeyValueChangeRecord_<K, V> | null = null;\n private _additionsTail: KeyValueChangeRecord_<K, V> | null = null;\n private _removalsHead: KeyValueChangeRecord_<K, V> | null = null;\n private _removalsTail: KeyValueChangeRecord_<K, V> | null = null;\n\n get isDirty(): boolean {\n return (\n this._additionsHead !== null || this._changesHead !== null || this._removalsHead !== null\n );\n }\n\n forEachItem(fn: (r: KeyValueChangeRecord<K, V>) => void) {\n let record: KeyValueChangeRecord_<K, V> | null;\n for (record = this._mapHead; record !== null; record = record._next) {\n fn(record);\n }\n }\n\n forEachPreviousItem(fn: (r: KeyValueChangeRecord<K, V>) => void) {\n let record: KeyValueChangeRecord_<K, V> | null;\n for (record = this._previousMapHead; record !== null; record = record._nextPrevious) {\n fn(record);\n }\n }\n\n forEachChangedItem(fn: (r: KeyValueChangeRecord<K, V>) => void) {\n let record: KeyValueChangeRecord_<K, V> | null;\n for (record = this._changesHead; record !== null; record = record._nextChanged) {\n fn(record);\n }\n }\n\n forEachAddedItem(fn: (r: KeyValueChangeRecord<K, V>) => void) {\n let record: KeyValueChangeRecord_<K, V> | null;\n for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n fn(record);\n }\n }\n\n forEachRemovedItem(fn: (r: KeyValueChangeRecord<K, V>) => void) {\n let record: KeyValueChangeRecord_<K, V> | null;\n for (record = this._removalsHead; record !== null; record = record._nextRemoved) {\n fn(record);\n }\n }\n\n diff(map?: Map<any, any> | {[k: string]: any} | null): any {\n if (!map) {\n map = new Map();\n } else if (!(map instanceof Map || isJsObject(map))) {\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_DIFFER_INPUT,\n ngDevMode && `Error trying to diff '${stringify(map)}'. Only maps and objects are allowed`,\n );\n }\n\n return this.check(map) ? this : null;\n }\n\n onDestroy() {}\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 check(map: Map<any, any> | {[k: string]: any}): boolean {\n this._reset();\n\n let insertBefore = this._mapHead;\n this._appendAfter = null;\n\n this._forEach(map, (value: any, key: any) => {\n if (insertBefore && insertBefore.key === key) {\n this._maybeAddToChanges(insertBefore, value);\n this._appendAfter = insertBefore;\n insertBefore = insertBefore._next;\n } else {\n const record = this._getOrCreateRecordForKey(key, value);\n insertBefore = this._insertBeforeOrAppend(insertBefore, record);\n }\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\n this._removalsHead = insertBefore;\n\n for (\n let record: KeyValueChangeRecord_<K, V> | null = insertBefore;\n record !== null;\n record = record._nextRemoved\n ) {\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\n // Make sure tails have no next records from previous runs\n if (this._changesTail) this._changesTail._nextChanged = null;\n if (this._additionsTail) this._additionsTail._nextAdded = null;\n\n return this.isDirty;\n }\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 private _insertBeforeOrAppend(\n before: KeyValueChangeRecord_<K, V> | null,\n record: KeyValueChangeRecord_<K, V>,\n ): KeyValueChangeRecord_<K, V> | null {\n if (before) {\n const 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\n this._appendAfter = before;\n return before;\n }\n\n if (this._appendAfter) {\n this._appendAfter._next = record;\n record._prev = this._appendAfter;\n } else {\n this._mapHead = record;\n }\n\n this._appendAfter = record;\n return null;\n }\n\n private _getOrCreateRecordForKey(key: K, value: V): KeyValueChangeRecord_<K, V> {\n if (this._records.has(key)) {\n const record = this._records.get(key)!;\n this._maybeAddToChanges(record, value);\n const prev = record._prev;\n const next = record._next;\n if (prev) {\n prev._next = next;\n }\n if (next) {\n next._prev = prev;\n }\n record._next = null;\n record._prev = null;\n\n return record;\n }\n\n const record = new KeyValueChangeRecord_<K, V>(key);\n this._records.set(key, record);\n record.currentValue = value;\n this._addToAdditions(record);\n return record;\n }\n\n /** @internal */\n _reset() {\n if (this.isDirty) {\n let record: KeyValueChangeRecord_<K, V> | null;\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\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\n this._changesHead = this._changesTail = null;\n this._additionsHead = this._additionsTail = null;\n this._removalsHead = null;\n }\n }\n\n // Add the record or a given key to the list of changes only when the value has actually changed\n private _maybeAddToChanges(record: KeyValueChangeRecord_<K, V>, newValue: any): void {\n if (!Object.is(newValue, record.currentValue)) {\n record.previousValue = record.currentValue;\n record.currentValue = newValue;\n this._addToChanges(record);\n }\n }\n\n private _addToAdditions(record: KeyValueChangeRecord_<K, V>) {\n if (this._additionsHead === null) {\n this._additionsHead = this._additionsTail = record;\n } else {\n this._additionsTail!._nextAdded = record;\n this._additionsTail = record;\n }\n }\n\n private _addToChanges(record: KeyValueChangeRecord_<K, V>) {\n if (this._changesHead === null) {\n this._changesHead = this._changesTail = record;\n } else {\n this._changesTail!._nextChanged = record;\n this._changesTail = record;\n }\n }\n\n /** @internal */\n private _forEach<K, V>(obj: Map<K, V> | {[k: string]: V}, fn: (v: V, k: any) => void) {\n if (obj instanceof Map) {\n obj.forEach(fn);\n } else {\n Object.keys(obj).forEach((k) => fn(obj[k], k));\n }\n }\n}\n\nclass KeyValueChangeRecord_<K, V> implements KeyValueChangeRecord<K, V> {\n previousValue: V | null = null;\n currentValue: V | null = null;\n\n /** @internal */\n _nextPrevious: KeyValueChangeRecord_<K, V> | null = null;\n /** @internal */\n _next: KeyValueChangeRecord_<K, V> | null = null;\n /** @internal */\n _prev: KeyValueChangeRecord_<K, V> | null = null;\n /** @internal */\n _nextAdded: KeyValueChangeRecord_<K, V> | null = null;\n /** @internal */\n _nextRemoved: KeyValueChangeRecord_<K, V> | null = null;\n /** @internal */\n _nextChanged: KeyValueChangeRecord_<K, V> | null = null;\n\n constructor(public key: K) {}\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ɵɵdefineInjectable} from '../../di/interface/defs';\nimport {StaticProvider} from '../../di/interface/provider';\nimport {Optional, SkipSelf} from '../../di/metadata';\nimport {RuntimeError, RuntimeErrorCode} from '../../errors';\nimport {DefaultIterableDifferFactory} from '../differs/default_iterable_differ';\n\n/**\n * A type describing supported iterable types.\n *\n * @publicApi\n */\nexport type NgIterable<T> = Array<T> | Iterable<T>;\n\n/**\n * A strategy for tracking changes over time to an iterable. Used by {@link /api/common/NgForOf NgForOf} to\n * respond to changes in an iterable by effecting equivalent changes in the DOM.\n *\n * @publicApi\n */\nexport interface IterableDiffer<V> {\n /**\n * Compute a difference between the previous state and the new `object` state.\n *\n * @param object containing the new value.\n * @returns an object describing the difference. The return value is only valid until the next\n * `diff()` invocation.\n */\n diff(object: NgIterable<V> | undefined | null): IterableChanges<V> | null;\n}\n\n/**\n * An object describing the changes in the `Iterable` collection since last time\n * `IterableDiffer#diff()` was invoked.\n *\n * @publicApi\n */\nexport interface IterableChanges<V> {\n /**\n * Iterate over all changes. `IterableChangeRecord` will contain information about changes\n * to each item.\n */\n forEachItem(fn: (record: IterableChangeRecord<V>) => void): void;\n\n /**\n * Iterate over a set of operations which when applied to the original `Iterable` will produce the\n * new `Iterable`.\n *\n * NOTE: These are not necessarily the actual operations which were applied to the original\n * `Iterable`, rather these are a set of computed operations which may not be the same as the\n * ones applied.\n *\n * @param record A change which needs to be applied\n * @param previousIndex The `IterableChangeRecord#previousIndex` of the `record` refers to the\n * original `Iterable` location, where as `previousIndex` refers to the transient location\n * of the item, after applying the operations up to this point.\n * @param currentIndex The `IterableChangeRecord#currentIndex` of the `record` refers to the\n * original `Iterable` location, where as `currentIndex` refers to the transient location\n * of the item, after applying the operations up to this point.\n */\n forEachOperation(\n fn: (\n record: IterableChangeRecord<V>,\n previousIndex: number | null,\n currentIndex: number | null,\n ) => void,\n ): void;\n\n /**\n * Iterate over changes in the order of original `Iterable` showing where the original items\n * have moved.\n */\n forEachPreviousItem(fn: (record: IterableChangeRecord<V>) => void): void;\n\n /** Iterate over all added items. */\n forEachAddedItem(fn: (record: IterableChangeRecord<V>) => void): void;\n\n /** Iterate over all moved items. */\n forEachMovedItem(fn: (record: IterableChangeRecord<V>) => void): void;\n\n /** Iterate over all removed items. */\n forEachRemovedItem(fn: (record: IterableChangeRecord<V>) => void): void;\n\n /**\n * Iterate over all items which had their identity (as computed by the `TrackByFunction`)\n * changed.\n */\n forEachIdentityChange(fn: (record: IterableChangeRecord<V>) => void): void;\n}\n\n/**\n * Record representing the item change information.\n *\n * @publicApi\n */\nexport interface IterableChangeRecord<V> {\n /** Current index of the item in `Iterable` or null if removed. */\n readonly currentIndex: number | null;\n\n /** Previous index of the item in `Iterable` or null if added. */\n readonly previousIndex: number | null;\n\n /** The item. */\n readonly item: V;\n\n /** Track by identity as computed by the `TrackByFunction`. */\n readonly trackById: any;\n}\n\n/**\n * A function optionally passed into the `NgForOf` directive to customize how `NgForOf` uniquely\n * identifies items in an iterable.\n *\n * `NgForOf` needs to uniquely identify items in the iterable to correctly perform DOM updates\n * when items in the iterable are reordered, new items are added, or existing items are removed.\n *\n *\n * In all of these scenarios it is usually desirable to only update the DOM elements associated\n * with the items affected by the change. This behavior is important to:\n *\n * - preserve any DOM-specific UI state (like cursor position, focus, text selection) when the\n * iterable is modified\n * - enable animation of item addition, removal, and iterable reordering\n * - preserve the value of the `<select>` element when nested `<option>` elements are dynamically\n * populated using `NgForOf` and the bound iterable is updated\n *\n * A common use for custom `trackBy` functions is when the model that `NgForOf` iterates over\n * contains a property with a unique identifier. For example, given a model:\n *\n * ```ts\n * class User {\n * id: number;\n * name: string;\n * ...\n * }\n * ```\n * a custom `trackBy` function could look like the following:\n * ```ts\n * function userTrackBy(index, user) {\n * return user.id;\n * }\n * ```\n *\n * A custom `trackBy` function must have several properties:\n *\n * - be [idempotent](https://en.wikipedia.org/wiki/Idempotence) (be without side effects, and always\n * return the same value for a given input)\n * - return unique value for all unique inputs\n * - be fast\n *\n * @see [`NgForOf#ngForTrackBy`](api/common/NgForOf#ngForTrackBy)\n * @publicApi\n */\nexport interface TrackByFunction<T> {\n // Note: the type parameter `U` enables more accurate template type checking in case a trackBy\n // function is declared using a base type of the iterated type. The `U` type gives TypeScript\n // additional freedom to infer a narrower type for the `item` parameter type, instead of imposing\n // the trackBy's declared item type as the inferred type for `T`.\n // See https://github.com/angular/angular/issues/40125\n\n /**\n * @param index The index of the item within the iterable.\n * @param item The item in the iterable.\n */\n <U extends T>(index: number, item: T & U): any;\n}\n\n/**\n * Provides a factory for {@link IterableDiffer}.\n *\n * @publicApi\n */\nexport interface IterableDifferFactory {\n supports(objects: any): boolean;\n create<V>(trackByFn?: TrackByFunction<V>): IterableDiffer<V>;\n}\n\nexport function defaultIterableDiffersFactory() {\n return new IterableDiffers([new DefaultIterableDifferFactory()]);\n}\n\n/**\n * A repository of different iterable diffing strategies used by NgFor, NgClass, and others.\n *\n * @publicApi\n */\nexport class IterableDiffers {\n /** @nocollapse */\n static ɵprov = /** @pureOrBreakMyCode */ /* @__PURE__ */ ɵɵdefineInjectable({\n token: IterableDiffers,\n providedIn: 'root',\n factory: defaultIterableDiffersFactory,\n });\n\n constructor(private factories: IterableDifferFactory[]) {}\n\n static create(factories: IterableDifferFactory[], parent?: IterableDiffers): IterableDiffers {\n if (parent != null) {\n const copied = parent.factories.slice();\n factories = factories.concat(copied);\n }\n\n return new IterableDiffers(factories);\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 * @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 * ```ts\n * @Component({\n * viewProviders: [\n * IterableDiffers.extend([new ImmutableListDiffer()])\n * ]\n * })\n * ```\n */\n static extend(factories: IterableDifferFactory[]): StaticProvider {\n return {\n provide: IterableDiffers,\n useFactory: (parent: IterableDiffers | null) => {\n // if parent is null, it means that we are in the root injector and we have just overridden\n // the default injection mechanism for IterableDiffers, in such a case just assume\n // `defaultIterableDiffersFactory`.\n return IterableDiffers.create(factories, parent || defaultIterableDiffersFactory());\n },\n // Dependency technically isn't optional, but we can provide a better error message this way.\n deps: [[IterableDiffers, new SkipSelf(), new Optional()]],\n };\n }\n\n find(iterable: any): IterableDifferFactory {\n const factory = this.factories.find((f) => f.supports(iterable));\n if (factory != null) {\n return factory;\n } else {\n throw new RuntimeError(\n RuntimeErrorCode.NO_SUPPORTING_DIFFER_FACTORY,\n ngDevMode &&\n `Cannot find a differ supporting object '${iterable}' of type '${getTypeNameForDebugging(\n iterable,\n )}'`,\n );\n }\n }\n}\n\nexport function getTypeNameForDebugging(type: any): string {\n return type['name'] || typeof type;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Optional, SkipSelf, StaticProvider, ɵɵdefineInjectable} from '../../di';\nimport {RuntimeError, RuntimeErrorCode} from '../../errors';\n\nimport {DefaultKeyValueDifferFactory} from './default_keyvalue_differ';\n\n/**\n * A differ that tracks changes made to an object over time.\n *\n * @publicApi\n */\nexport interface KeyValueDiffer<K, V> {\n /**\n * Compute a difference between the previous state and the new `object` state.\n *\n * @param object containing the new value.\n * @returns an object describing the difference. The return value is only valid until the next\n * `diff()` invocation.\n */\n diff(object: Map<K, V>): KeyValueChanges<K, V> | null;\n\n /**\n * Compute a difference between the previous state and the new `object` state.\n *\n * @param object containing the new value.\n * @returns an object describing the difference. The return value is only valid until the next\n * `diff()` invocation.\n */\n diff(object: {[key: string]: V}): KeyValueChanges<string, V> | null;\n // TODO(TS2.1): diff<KP extends string>(this: KeyValueDiffer<KP, V>, object: Record<KP, V>):\n // KeyValueDiffer<KP, V>;\n}\n\n/**\n * An object describing the changes in the `Map` or `{[k:string]: string}` since last time\n * `KeyValueDiffer#diff()` was invoked.\n *\n * @publicApi\n */\nexport interface KeyValueChanges<K, V> {\n /**\n * Iterate over all changes. `KeyValueChangeRecord` will contain information about changes\n * to each item.\n */\n forEachItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;\n\n /**\n * Iterate over changes in the order of original Map showing where the original items\n * have moved.\n */\n forEachPreviousItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;\n\n /**\n * Iterate over all keys for which values have changed.\n */\n forEachChangedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;\n\n /**\n * Iterate over all added items.\n */\n forEachAddedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;\n\n /**\n * Iterate over all removed items.\n */\n forEachRemovedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;\n}\n\n/**\n * Record representing the item change information.\n *\n * @publicApi\n */\nexport interface KeyValueChangeRecord<K, V> {\n /**\n * Current key in the Map.\n */\n readonly key: K;\n\n /**\n * Current value for the key or `null` if removed.\n */\n readonly currentValue: V | null;\n\n /**\n * Previous value for the key or `null` if added.\n */\n readonly previousValue: V | null;\n}\n\n/**\n * Provides a factory for {@link KeyValueDiffer}.\n *\n * @publicApi\n */\nexport interface KeyValueDifferFactory {\n /**\n * Test to see if the differ knows how to diff this kind of object.\n */\n supports(objects: any): boolean;\n\n /**\n * Create a `KeyValueDiffer`.\n */\n create<K, V>(): KeyValueDiffer<K, V>;\n}\n\nexport function defaultKeyValueDiffersFactory() {\n return new KeyValueDiffers([new DefaultKeyValueDifferFactory()]);\n}\n\n/**\n * A repository of different Map diffing strategies used by NgClass, NgStyle, and others.\n *\n * @publicApi\n */\nexport class KeyValueDiffers {\n /** @nocollapse */\n static ɵprov = /** @pureOrBreakMyCode */ /* @__PURE__ */ ɵɵdefineInjectable({\n token: KeyValueDiffers,\n providedIn: 'root',\n factory: defaultKeyValueDiffersFactory,\n });\n\n private readonly factories: KeyValueDifferFactory[];\n\n constructor(factories: KeyValueDifferFactory[]) {\n this.factories = factories;\n }\n\n static create<S>(factories: KeyValueDifferFactory[], parent?: KeyValueDiffers): KeyValueDiffers {\n if (parent) {\n const copied = parent.factories.slice();\n factories = factories.concat(copied);\n }\n return new KeyValueDiffers(factories);\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 * @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 * ```ts\n * @Component({\n * viewProviders: [\n * KeyValueDiffers.extend([new ImmutableMapDiffer()])\n * ]\n * })\n * ```\n */\n static extend<S>(factories: KeyValueDifferFactory[]): StaticProvider {\n return {\n provide: KeyValueDiffers,\n useFactory: (parent: KeyValueDiffers) => {\n // if parent is null, it means that we are in the root injector and we have just overridden\n // the default injection mechanism for KeyValueDiffers, in such a case just assume\n // `defaultKeyValueDiffersFactory`.\n return KeyValueDiffers.create(factories, parent || defaultKeyValueDiffersFactory());\n },\n // Dependency technically isn't optional, but we can provide a better error message this way.\n deps: [[KeyValueDiffers, new SkipSelf(), new Optional()]],\n };\n }\n\n find(kv: any): KeyValueDifferFactory {\n const factory = this.factories.find((f) => f.supports(kv));\n if (factory) {\n return factory;\n }\n throw new RuntimeError(\n RuntimeErrorCode.NO_SUPPORTING_DIFFER_FACTORY,\n ngDevMode && `Cannot find a differ supporting object '${kv}'`,\n );\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {DefaultIterableDifferFactory} from './differs/default_iterable_differ';\nimport {DefaultKeyValueDifferFactory} from './differs/default_keyvalue_differ';\nimport {IterableDifferFactory, IterableDiffers} from './differs/iterable_differs';\nimport {KeyValueDifferFactory, KeyValueDiffers} from './differs/keyvalue_differs';\n\nexport {SimpleChange, SimpleChanges} from '../interface/simple_change';\nexport {devModeEqual} from '../util/comparison';\nexport {ChangeDetectorRef} from './change_detector_ref';\nexport {ChangeDetectionStrategy} from './constants';\nexport {\n DefaultIterableDiffer,\n DefaultIterableDifferFactory,\n} from './differs/default_iterable_differ';\nexport {DefaultKeyValueDifferFactory} from './differs/default_keyvalue_differ';\nexport {\n IterableChangeRecord,\n IterableChanges,\n IterableDiffer,\n IterableDifferFactory,\n IterableDiffers,\n NgIterable,\n TrackByFunction,\n} from './differs/iterable_differs';\nexport {\n KeyValueChangeRecord,\n KeyValueChanges,\n KeyValueDiffer,\n KeyValueDifferFactory,\n KeyValueDiffers,\n} from './differs/keyvalue_differs';\nexport {PipeTransform} from './pipe_transform';\n\n/**\n * Structural diffing for `Object`s and `Map`s.\n */\nconst keyValDiff: KeyValueDifferFactory[] = [new DefaultKeyValueDifferFactory()];\n\n/**\n * Structural diffing for `Iterable` types such as `Array`s.\n */\nconst iterableDiff: IterableDifferFactory[] = [new DefaultIterableDifferFactory()];\n\nexport const defaultIterableDiffers = new IterableDiffers(iterableDiff);\n\nexport const defaultKeyValueDiffers = new KeyValueDiffers(keyValDiff);\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {StaticProvider} from '../di';\n\nimport {createPlatformFactory} from './platform';\nimport {PlatformRef} from './platform_ref';\n\n/**\n * This platform has to be included in any other platform\n *\n * @publicApi\n */\nexport const platformCore: (extraProviders?: StaticProvider[] | undefined) => PlatformRef =\n createPlatformFactory(null, 'core', []);\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {NgModule} from '../metadata';\n\nimport {ApplicationRef} from './application_ref';\n\n/**\n * Re-exported by `BrowserModule`, which is included automatically in the root\n * `AppModule` when you create a new app with the CLI `new` command. Eagerly injects\n * `ApplicationRef` to instantiate it.\n *\n * @publicApi\n */\n@NgModule()\nexport class ApplicationModule {\n // Inject ApplicationRef to make it eager...\n constructor(appRef: ApplicationRef) {}\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {internalProvideZoneChangeDetection} from '../change_detection/scheduling/ng_zone_scheduling';\nimport {EnvironmentProviders, Provider, StaticProvider} from '../di/interface/provider';\nimport {EnvironmentInjector} from '../di/r3_injector';\nimport {Type} from '../interface/type';\nimport {createOrReusePlatformInjector} from '../platform/platform';\nimport {assertStandaloneComponentType} from '../render3/errors';\nimport {EnvironmentNgModuleRefAdapter} from '../render3/ng_module_ref';\n\nimport {ApplicationRef} from './application_ref';\nimport {ChangeDetectionScheduler} from '../change_detection/scheduling/zoneless_scheduling';\nimport {ChangeDetectionSchedulerImpl} from '../change_detection/scheduling/zoneless_scheduling_impl';\nimport {bootstrap} from '../platform/bootstrap';\nimport {profiler} from '../render3/profiler';\nimport {ProfilerEvent} from '../render3/profiler_types';\n\n/**\n * Internal create application API that implements the core application creation logic and optional\n * bootstrap logic.\n *\n * Platforms (such as `platform-browser`) may require different set of application and platform\n * providers for an application to function correctly. As a result, platforms may use this function\n * internally and supply the necessary providers during the bootstrap, while exposing\n * platform-specific APIs as a part of their public API.\n *\n * @returns A promise that returns an `ApplicationRef` instance once resolved.\n */\n\nexport function internalCreateApplication(config: {\n rootComponent?: Type<unknown>;\n appProviders?: Array<Provider | EnvironmentProviders>;\n platformProviders?: Provider[];\n}): Promise<ApplicationRef> {\n profiler(ProfilerEvent.BootstrapApplicationStart);\n try {\n const {rootComponent, appProviders, platformProviders} = config;\n\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && rootComponent !== undefined) {\n assertStandaloneComponentType(rootComponent);\n }\n\n const platformInjector = createOrReusePlatformInjector(platformProviders as StaticProvider[]);\n\n // Create root application injector based on a set of providers configured at the platform\n // bootstrap level as well as providers passed to the bootstrap call by a user.\n const allAppProviders = [\n internalProvideZoneChangeDetection({}),\n {provide: ChangeDetectionScheduler, useExisting: ChangeDetectionSchedulerImpl},\n ...(appProviders || []),\n ];\n const adapter = new EnvironmentNgModuleRefAdapter({\n providers: allAppProviders,\n parent: platformInjector as EnvironmentInjector,\n debugName: typeof ngDevMode === 'undefined' || ngDevMode ? 'Environment Injector' : '',\n // We skip environment initializers because we need to run them inside the NgZone, which\n // happens after we get the NgZone instance from the Injector.\n runEnvironmentInitializers: false,\n });\n\n return bootstrap({\n r3Injector: adapter.injector,\n platformInjector,\n rootComponent,\n });\n } catch (e) {\n return Promise.reject(e);\n } finally {\n profiler(ProfilerEvent.BootstrapApplicationEnd);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n isEarlyEventType,\n isCaptureEventType,\n EventContractContainer,\n EventContract,\n EventDispatcher,\n registerDispatcher,\n getAppScopedQueuedEventInfos,\n clearAppScopedEarlyEventContract,\n EventPhase,\n} from '../../primitives/event-dispatch';\n\nimport {APP_BOOTSTRAP_LISTENER, ApplicationRef} from '../application/application_ref';\nimport {ENVIRONMENT_INITIALIZER, Injector} from '../di';\nimport {inject} from '../di/injector_compatibility';\nimport {Provider} from '../di/interface/provider';\nimport {RElement, RNode} from '../render3/interfaces/renderer_dom';\nimport {CLEANUP, LView, TView} from '../render3/interfaces/view';\nimport {unwrapRNode} from '../render3/util/view_utils';\n\nimport {\n JSACTION_BLOCK_ELEMENT_MAP,\n EVENT_REPLAY_ENABLED_DEFAULT,\n IS_EVENT_REPLAY_ENABLED,\n} from './tokens';\nimport {\n sharedStashFunction,\n sharedMapFunction,\n DEFER_BLOCK_SSR_ID_ATTRIBUTE,\n EventContractDetails,\n JSACTION_EVENT_CONTRACT,\n invokeListeners,\n removeListeners,\n setStashFn,\n enableStashEventListenerImpl,\n} from '../event_delegation_utils';\nimport {APP_ID} from '../application/application_tokens';\nimport {performanceMarkFeature} from '../util/performance';\nimport {triggerHydrationFromBlockName} from '../defer/triggering';\nimport {isIncrementalHydrationEnabled} from './utils';\n\n/** Apps in which we've enabled event replay.\n * This is to prevent initializing event replay more than once per app.\n */\nconst appsWithEventReplay = new WeakSet<ApplicationRef>();\n\n/**\n * The key that represents all replayable elements that are not in defer blocks.\n */\nconst EAGER_CONTENT_LISTENERS_KEY = '';\n\n/**\n * A list of block events that need to be replayed\n */\nlet blockEventQueue: {event: Event; currentTarget: Element}[] = [];\n\n/**\n * Determines whether Event Replay feature should be activated on the client.\n */\nfunction shouldEnableEventReplay(injector: Injector) {\n return injector.get(IS_EVENT_REPLAY_ENABLED, EVENT_REPLAY_ENABLED_DEFAULT);\n}\n\n/**\n * Returns a set of providers required to setup support for event replay.\n * Requires hydration to be enabled separately.\n */\nexport function withEventReplay(): Provider[] {\n const providers: Provider[] = [\n {\n provide: IS_EVENT_REPLAY_ENABLED,\n useFactory: () => {\n let isEnabled = true;\n if (typeof ngServerMode === 'undefined' || !ngServerMode) {\n // Note: globalThis[CONTRACT_PROPERTY] may be undefined in case Event Replay feature\n // is enabled, but there are no events configured in this application, in which case\n // we don't activate this feature, since there are no events to replay.\n const appId = inject(APP_ID);\n isEnabled = !!window._ejsas?.[appId];\n }\n if (isEnabled) {\n performanceMarkFeature('NgEventReplay');\n }\n return isEnabled;\n },\n },\n ];\n\n if (typeof ngServerMode === 'undefined' || !ngServerMode) {\n providers.push(\n {\n provide: ENVIRONMENT_INITIALIZER,\n useValue: () => {\n const appRef = inject(ApplicationRef);\n const {injector} = appRef;\n // We have to check for the appRef here due to the possibility of multiple apps\n // being present on the same page. We only want to enable event replay for the\n // apps that actually want it.\n if (!appsWithEventReplay.has(appRef)) {\n const jsActionMap = inject(JSACTION_BLOCK_ELEMENT_MAP);\n if (shouldEnableEventReplay(injector)) {\n enableStashEventListenerImpl();\n const appId = injector.get(APP_ID);\n const clearStashFn = setStashFn(\n appId,\n (rEl: RNode, eventName: string, listenerFn: VoidFunction) => {\n // If a user binds to a ng-container and uses a directive that binds using a host listener,\n // this element could be a comment node. So we need to ensure we have an actual element\n // node before stashing anything.\n if ((rEl as Node).nodeType !== Node.ELEMENT_NODE) return;\n sharedStashFunction(rEl as RElement, eventName, listenerFn);\n sharedMapFunction(rEl as RElement, jsActionMap);\n },\n );\n // Clean up the reference to the function set by the environment initializer,\n // as the function closure may capture injected elements and prevent them\n // from being properly garbage collected.\n appRef.onDestroy(clearStashFn);\n }\n }\n },\n multi: true,\n },\n {\n provide: APP_BOOTSTRAP_LISTENER,\n useFactory: () => {\n const appRef = inject(ApplicationRef);\n const {injector} = appRef;\n\n return () => {\n // We have to check for the appRef here due to the possibility of multiple apps\n // being present on the same page. We only want to enable event replay for the\n // apps that actually want it.\n if (!shouldEnableEventReplay(injector) || appsWithEventReplay.has(appRef)) {\n return;\n }\n\n appsWithEventReplay.add(appRef);\n\n appRef.onDestroy(() => {\n appsWithEventReplay.delete(appRef);\n // Ensure that we're always safe calling this in the browser.\n if (typeof ngServerMode !== 'undefined' && !ngServerMode) {\n const appId = injector.get(APP_ID);\n // `_ejsa` should be deleted when the app is destroyed, ensuring that\n // no elements are still captured in the global list and are not prevented\n // from being garbage collected.\n clearAppScopedEarlyEventContract(appId);\n }\n });\n\n // Kick off event replay logic once hydration for the initial part\n // of the application is completed. This timing is similar to the unclaimed\n // dehydrated views cleanup timing.\n appRef.whenStable().then(() => {\n // Note: we have to check whether the application is destroyed before\n // performing other operations with the `injector`.\n // The application may be destroyed **before** it becomes stable, so when\n // the `whenStable` resolves, the injector might already be in\n // a destroyed state. Thus, calling `injector.get` would throw an error\n // indicating that the injector has already been destroyed.\n if (appRef.destroyed) {\n return;\n }\n\n const eventContractDetails = injector.get(JSACTION_EVENT_CONTRACT);\n initEventReplay(eventContractDetails, injector);\n const jsActionMap = injector.get(JSACTION_BLOCK_ELEMENT_MAP);\n jsActionMap.get(EAGER_CONTENT_LISTENERS_KEY)?.forEach(removeListeners);\n jsActionMap.delete(EAGER_CONTENT_LISTENERS_KEY);\n\n const eventContract = eventContractDetails.instance!;\n // This removes event listeners registered through the container manager,\n // as listeners registered on `document.body` might never be removed if we\n // don't clean up the contract.\n if (isIncrementalHydrationEnabled(injector)) {\n // When incremental hydration is enabled, we cannot clean up the event\n // contract immediately because we're unaware if there are any deferred\n // blocks to hydrate. We can only schedule a contract cleanup when the\n // app is destroyed.\n appRef.onDestroy(() => eventContract.cleanUp());\n } else {\n eventContract.cleanUp();\n }\n });\n };\n },\n multi: true,\n },\n );\n }\n\n return providers;\n}\n\nconst initEventReplay = (eventDelegation: EventContractDetails, injector: Injector) => {\n const appId = injector.get(APP_ID);\n // This is set in packages/platform-server/src/utils.ts\n const earlyJsactionData = window._ejsas![appId]!;\n const eventContract = (eventDelegation.instance = new EventContract(\n new EventContractContainer(earlyJsactionData.c),\n ));\n for (const et of earlyJsactionData.et) {\n eventContract.addEvent(et);\n }\n for (const et of earlyJsactionData.etc) {\n eventContract.addEvent(et);\n }\n const eventInfos = getAppScopedQueuedEventInfos(appId);\n eventContract.replayEarlyEventInfos(eventInfos);\n clearAppScopedEarlyEventContract(appId);\n const dispatcher = new EventDispatcher((event) => {\n invokeRegisteredReplayListeners(injector, event, event.currentTarget as Element);\n });\n registerDispatcher(eventContract, dispatcher);\n};\n\n/**\n * Extracts information about all DOM events (added in a template) registered on elements in a give\n * LView. Maps collected events to a corresponding DOM element (an element is used as a key).\n */\nexport function collectDomEventsInfo(\n tView: TView,\n lView: LView,\n eventTypesToReplay: {regular: Set<string>; capture: Set<string>},\n): Map<Element, string[]> {\n const domEventsInfo = new Map<Element, string[]>();\n const lCleanup = lView[CLEANUP];\n const tCleanup = tView.cleanup;\n if (!tCleanup || !lCleanup) {\n return domEventsInfo;\n }\n for (let i = 0; i < tCleanup.length; ) {\n const firstParam = tCleanup[i++];\n const secondParam = tCleanup[i++];\n if (typeof firstParam !== 'string') {\n continue;\n }\n const eventType = firstParam;\n if (!isEarlyEventType(eventType)) {\n continue;\n }\n if (isCaptureEventType(eventType)) {\n eventTypesToReplay.capture.add(eventType);\n } else {\n eventTypesToReplay.regular.add(eventType);\n }\n const listenerElement = unwrapRNode(lView[secondParam]) as any as Element;\n i++; // move the cursor to the next position (location of the listener idx)\n const useCaptureOrIndx = tCleanup[i++];\n // if useCaptureOrIndx is boolean then report it as is.\n // if useCaptureOrIndx is positive number then it in unsubscribe method\n // if useCaptureOrIndx is negative number then it is a Subscription\n const isDomEvent = typeof useCaptureOrIndx === 'boolean' || useCaptureOrIndx >= 0;\n if (!isDomEvent) {\n continue;\n }\n if (!domEventsInfo.has(listenerElement)) {\n domEventsInfo.set(listenerElement, [eventType]);\n } else {\n domEventsInfo.get(listenerElement)!.push(eventType);\n }\n }\n return domEventsInfo;\n}\n\nexport function invokeRegisteredReplayListeners(\n injector: Injector,\n event: Event,\n currentTarget: Element | null,\n) {\n const blockName =\n (currentTarget && currentTarget.getAttribute(DEFER_BLOCK_SSR_ID_ATTRIBUTE)) ?? '';\n if (/d\\d+/.test(blockName)) {\n hydrateAndInvokeBlockListeners(blockName, injector, event, currentTarget!);\n } else if (event.eventPhase === EventPhase.REPLAY) {\n invokeListeners(event, currentTarget);\n }\n}\n\nfunction hydrateAndInvokeBlockListeners(\n blockName: string,\n injector: Injector,\n event: Event,\n currentTarget: Element,\n) {\n blockEventQueue.push({event, currentTarget});\n triggerHydrationFromBlockName(injector, blockName, replayQueuedBlockEvents);\n}\n\nfunction replayQueuedBlockEvents(hydratedBlocks: string[]) {\n // clone the queue\n const queue = [...blockEventQueue];\n const hydrated = new Set<string>(hydratedBlocks);\n // empty it\n blockEventQueue = [];\n for (let {event, currentTarget} of queue) {\n const blockName = currentTarget.getAttribute(DEFER_BLOCK_SSR_ID_ATTRIBUTE)!;\n if (hydrated.has(blockName)) {\n invokeListeners(event, currentTarget);\n } else {\n // requeue events that weren't yet hydrated\n blockEventQueue.push({event, currentTarget});\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ApplicationRef} from '../application/application_ref';\nimport {APP_ID} from '../application/application_tokens';\nimport {\n DEFER_BLOCK_STATE as CURRENT_DEFER_BLOCK_STATE,\n DeferBlockTrigger,\n HydrateTriggerDetails,\n TDeferBlockDetails,\n} from '../defer/interfaces';\nimport {getLDeferBlockDetails, getTDeferBlockDetails, isDeferBlock} from '../defer/utils';\nimport {isDetachedByI18n} from '../i18n/utils';\nimport {ViewEncapsulation} from '../metadata';\nimport {Renderer2} from '../render';\nimport {assertTNode} from '../render3/assert';\nimport {collectNativeNodes, collectNativeNodesInLContainer} from '../render3/collect_native_nodes';\nimport {getComponentDef} from '../render3/def_getters';\nimport {CONTAINER_HEADER_OFFSET, LContainer} from '../render3/interfaces/container';\nimport {isLetDeclaration, isTNodeShape, TNode, TNodeType} from '../render3/interfaces/node';\nimport {RComment, RElement} from '../render3/interfaces/renderer_dom';\nimport {\n hasI18n,\n isComponentHost,\n isLContainer,\n isProjectionTNode,\n isRootView,\n} from '../render3/interfaces/type_checks';\nimport {\n CONTEXT,\n HEADER_OFFSET,\n HOST,\n INJECTOR,\n LView,\n PARENT,\n RENDERER,\n TView,\n TVIEW,\n TViewType,\n} from '../render3/interfaces/view';\nimport {unwrapLView, unwrapRNode} from '../render3/util/view_utils';\nimport {TransferState} from '../transfer_state';\n\nimport {\n unsupportedProjectionOfDomNodes,\n validateMatchingNode,\n validateNodeExists,\n} from './error_handling';\nimport {collectDomEventsInfo} from './event_replay';\nimport {setJSActionAttributes} from '../event_delegation_utils';\nimport {\n getOrComputeI18nChildren,\n isI18nHydrationEnabled,\n isI18nHydrationSupportEnabled,\n trySerializeI18nBlock,\n} from './i18n';\nimport {\n CONTAINERS,\n DEFER_BLOCK_ID,\n DEFER_BLOCK_STATE,\n DEFER_HYDRATE_TRIGGERS,\n DEFER_PARENT_BLOCK_ID,\n DISCONNECTED_NODES,\n ELEMENT_CONTAINERS,\n I18N_DATA,\n MULTIPLIER,\n NODES,\n NUM_ROOT_NODES,\n SerializedContainerView,\n SerializedDeferBlock,\n SerializedTriggerDetails,\n SerializedView,\n TEMPLATE_ID,\n TEMPLATES,\n} from './interfaces';\nimport {calcPathForNode, isDisconnectedNode} from './node_lookup_utils';\nimport {isInSkipHydrationBlock, SKIP_HYDRATION_ATTR_NAME} from './skip_hydration';\nimport {EVENT_REPLAY_ENABLED_DEFAULT, IS_EVENT_REPLAY_ENABLED} from './tokens';\nimport {\n convertHydrateTriggersToJsAction,\n getLNodeForHydration,\n isIncrementalHydrationEnabled,\n NGH_ATTR_NAME,\n NGH_DATA_KEY,\n NGH_DEFER_BLOCKS_KEY,\n processTextNodeBeforeSerialization,\n TextNodeMarker,\n} from './utils';\nimport {Injector} from '../di';\n\n/**\n * A collection that tracks all serialized views (`ngh` DOM annotations)\n * to avoid duplication. An attempt to add a duplicate view results in the\n * collection returning the index of the previously collected serialized view.\n * This reduces the number of annotations needed for a given page.\n */\nclass SerializedViewCollection {\n private views: SerializedView[] = [];\n private indexByContent = new Map<string, number>();\n\n add(serializedView: SerializedView): number {\n const viewAsString = JSON.stringify(serializedView);\n if (!this.indexByContent.has(viewAsString)) {\n const index = this.views.length;\n this.views.push(serializedView);\n this.indexByContent.set(viewAsString, index);\n return index;\n }\n return this.indexByContent.get(viewAsString)!;\n }\n\n getAll(): SerializedView[] {\n return this.views;\n }\n}\n\n/**\n * Global counter that is used to generate a unique id for TViews\n * during the serialization process.\n */\nlet tViewSsrId = 0;\n\n/**\n * Generates a unique id for a given TView and returns this id.\n * The id is also stored on this instance of a TView and reused in\n * subsequent calls.\n *\n * This id is needed to uniquely identify and pick up dehydrated views\n * at runtime.\n */\nfunction getSsrId(tView: TView): string {\n if (!tView.ssrId) {\n tView.ssrId = `t${tViewSsrId++}`;\n }\n return tView.ssrId;\n}\n\n/**\n * Describes a context available during the serialization\n * process. The context is used to share and collect information\n * during the serialization.\n */\nexport interface HydrationContext {\n serializedViewCollection: SerializedViewCollection;\n corruptedTextNodes: Map<HTMLElement, TextNodeMarker>;\n isI18nHydrationEnabled: boolean;\n isIncrementalHydrationEnabled: boolean;\n i18nChildren: Map<TView, Set<number> | null>;\n eventTypesToReplay: {regular: Set<string>; capture: Set<string>};\n shouldReplayEvents: boolean;\n appId: string; // the value of `APP_ID`\n deferBlocks: Map<string /* defer block id, e.g. `d0` */, SerializedDeferBlock>;\n}\n\n/**\n * Computes the number of root nodes in a given view\n * (or child nodes in a given container if a tNode is provided).\n */\nfunction calcNumRootNodes(tView: TView, lView: LView, tNode: TNode | null): number {\n const rootNodes: unknown[] = [];\n collectNativeNodes(tView, lView, tNode, rootNodes);\n return rootNodes.length;\n}\n\n/**\n * Computes the number of root nodes in all views in a given LContainer.\n */\nfunction calcNumRootNodesInLContainer(lContainer: LContainer): number {\n const rootNodes: unknown[] = [];\n collectNativeNodesInLContainer(lContainer, rootNodes);\n return rootNodes.length;\n}\n\n/**\n * Annotates root level component's LView for hydration,\n * see `annotateHostElementForHydration` for additional information.\n */\nfunction annotateComponentLViewForHydration(\n lView: LView,\n context: HydrationContext,\n injector: Injector,\n): number | null {\n const hostElement = lView[HOST];\n // Root elements might also be annotated with the `ngSkipHydration` attribute,\n // check if it's present before starting the serialization process.\n if (hostElement && !(hostElement as HTMLElement).hasAttribute(SKIP_HYDRATION_ATTR_NAME)) {\n return annotateHostElementForHydration(hostElement as HTMLElement, lView, null, context);\n }\n return null;\n}\n\n/**\n * Annotates root level LContainer for hydration. This happens when a root component\n * injects ViewContainerRef, thus making the component an anchor for a view container.\n * This function serializes the component itself as well as all views from the view\n * container.\n */\nfunction annotateLContainerForHydration(\n lContainer: LContainer,\n context: HydrationContext,\n injector: Injector,\n) {\n const componentLView = unwrapLView(lContainer[HOST]) as LView<unknown>;\n\n // Serialize the root component itself.\n const componentLViewNghIndex = annotateComponentLViewForHydration(\n componentLView,\n context,\n injector,\n );\n\n if (componentLViewNghIndex === null) {\n // Component was not serialized (for example, if hydration was skipped by adding\n // the `ngSkipHydration` attribute or this component uses i18n blocks in the template,\n // but `withI18nSupport()` was not added), avoid annotating host element with the `ngh`\n // attribute.\n return;\n }\n\n const hostElement = unwrapRNode(componentLView[HOST]!) as HTMLElement;\n\n // Serialize all views within this view container.\n const rootLView = lContainer[PARENT];\n const rootLViewNghIndex = annotateHostElementForHydration(hostElement, rootLView, null, context);\n\n const renderer = componentLView[RENDERER] as Renderer2;\n\n // For cases when a root component also acts as an anchor node for a ViewContainerRef\n // (for example, when ViewContainerRef is injected in a root component), there is a need\n // to serialize information about the component itself, as well as an LContainer that\n // represents this ViewContainerRef. Effectively, we need to serialize 2 pieces of info:\n // (1) hydration info for the root component itself and (2) hydration info for the\n // ViewContainerRef instance (an LContainer). Each piece of information is included into\n // the hydration data (in the TransferState object) separately, thus we end up with 2 ids.\n // Since we only have 1 root element, we encode both bits of info into a single string:\n // ids are separated by the `|` char (e.g. `10|25`, where `10` is the ngh for a component view\n // and 25 is the `ngh` for a root view which holds LContainer).\n const finalIndex = `${componentLViewNghIndex}|${rootLViewNghIndex}`;\n renderer.setAttribute(hostElement, NGH_ATTR_NAME, finalIndex);\n}\n\n/**\n * Annotates all components bootstrapped in a given ApplicationRef\n * with info needed for hydration.\n *\n * @param appRef An instance of an ApplicationRef.\n * @param doc A reference to the current Document instance.\n * @return event types that need to be replayed\n */\nexport function annotateForHydration(appRef: ApplicationRef, doc: Document) {\n const injector = appRef.injector;\n const isI18nHydrationEnabledVal = isI18nHydrationEnabled(injector);\n const isIncrementalHydrationEnabledVal = isIncrementalHydrationEnabled(injector);\n const serializedViewCollection = new SerializedViewCollection();\n const corruptedTextNodes = new Map<HTMLElement, TextNodeMarker>();\n const viewRefs = appRef._views;\n const shouldReplayEvents = injector.get(IS_EVENT_REPLAY_ENABLED, EVENT_REPLAY_ENABLED_DEFAULT);\n const eventTypesToReplay = {\n regular: new Set<string>(),\n capture: new Set<string>(),\n };\n const deferBlocks = new Map<string, SerializedDeferBlock>();\n const appId = appRef.injector.get(APP_ID);\n for (const viewRef of viewRefs) {\n const lNode = getLNodeForHydration(viewRef);\n\n // An `lView` might be `null` if a `ViewRef` represents\n // an embedded view (not a component view).\n if (lNode !== null) {\n const context: HydrationContext = {\n serializedViewCollection,\n corruptedTextNodes,\n isI18nHydrationEnabled: isI18nHydrationEnabledVal,\n isIncrementalHydrationEnabled: isIncrementalHydrationEnabledVal,\n i18nChildren: new Map(),\n eventTypesToReplay,\n shouldReplayEvents,\n appId,\n deferBlocks,\n };\n if (isLContainer(lNode)) {\n annotateLContainerForHydration(lNode, context, injector);\n } else {\n annotateComponentLViewForHydration(lNode, context, injector);\n }\n insertCorruptedTextNodeMarkers(corruptedTextNodes, doc);\n }\n }\n\n // Note: we *always* include hydration info key and a corresponding value\n // into the TransferState, even if the list of serialized views is empty.\n // This is needed as a signal to the client that the server part of the\n // hydration logic was setup and enabled correctly. Otherwise, if a client\n // hydration doesn't find a key in the transfer state - an error is produced.\n const serializedViews = serializedViewCollection.getAll();\n const transferState = injector.get(TransferState);\n transferState.set(NGH_DATA_KEY, serializedViews);\n\n if (deferBlocks.size > 0) {\n const blocks: {[key: string]: SerializedDeferBlock} = {};\n for (const [id, info] of deferBlocks.entries()) {\n blocks[id] = info;\n }\n transferState.set(NGH_DEFER_BLOCKS_KEY, blocks);\n }\n\n return eventTypesToReplay;\n}\n\n/**\n * Serializes the lContainer data into a list of SerializedView objects,\n * that represent views within this lContainer.\n *\n * @param lContainer the lContainer we are serializing\n * @param tNode the TNode that contains info about this LContainer\n * @param lView that hosts this LContainer\n * @param parentDeferBlockId the defer block id of the parent if it exists\n * @param context the hydration context\n * @returns an array of the `SerializedView` objects\n */\nfunction serializeLContainer(\n lContainer: LContainer,\n tNode: TNode,\n lView: LView,\n parentDeferBlockId: string | null,\n context: HydrationContext,\n): SerializedContainerView[] {\n const views: SerializedContainerView[] = [];\n let lastViewAsString = '';\n\n for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n let childLView = lContainer[i] as LView;\n\n let template: string;\n let numRootNodes: number;\n let serializedView: SerializedContainerView | undefined;\n\n if (isRootView(childLView)) {\n // If this is a root view, get an LView for the underlying component,\n // because it contains information about the view to serialize.\n childLView = childLView[HEADER_OFFSET];\n\n // If we have an LContainer at this position, this indicates that the\n // host element was used as a ViewContainerRef anchor (e.g. a `ViewContainerRef`\n // was injected within the component class). This case requires special handling.\n if (isLContainer(childLView)) {\n // Calculate the number of root nodes in all views in a given container\n // and increment by one to account for an anchor node itself, i.e. in this\n // scenario we'll have a layout that would look like this:\n // `<app-root /><#VIEW1><#VIEW2>...<!--container-->`\n // The `+1` is to capture the `<app-root />` element.\n numRootNodes = calcNumRootNodesInLContainer(childLView) + 1;\n\n annotateLContainerForHydration(childLView, context, lView[INJECTOR]);\n\n const componentLView = unwrapLView(childLView[HOST]) as LView<unknown>;\n\n serializedView = {\n [TEMPLATE_ID]: componentLView[TVIEW].ssrId!,\n [NUM_ROOT_NODES]: numRootNodes,\n };\n }\n }\n\n if (!serializedView) {\n const childTView = childLView[TVIEW];\n\n if (childTView.type === TViewType.Component) {\n template = childTView.ssrId!;\n\n // This is a component view, thus it has only 1 root node: the component\n // host node itself (other nodes would be inside that host node).\n numRootNodes = 1;\n } else {\n template = getSsrId(childTView);\n numRootNodes = calcNumRootNodes(childTView, childLView, childTView.firstChild);\n }\n\n serializedView = {\n [TEMPLATE_ID]: template,\n [NUM_ROOT_NODES]: numRootNodes,\n };\n\n let isHydrateNeverBlock = false;\n\n // If this is a defer block, serialize extra info.\n if (isDeferBlock(lView[TVIEW], tNode)) {\n const lDetails = getLDeferBlockDetails(lView, tNode);\n const tDetails = getTDeferBlockDetails(lView[TVIEW], tNode);\n\n if (context.isIncrementalHydrationEnabled && tDetails.hydrateTriggers !== null) {\n const deferBlockId = `d${context.deferBlocks.size}`;\n\n if (tDetails.hydrateTriggers.has(DeferBlockTrigger.Never)) {\n isHydrateNeverBlock = true;\n }\n\n let rootNodes: any[] = [];\n collectNativeNodesInLContainer(lContainer, rootNodes);\n\n // Add defer block into info context.deferBlocks\n const deferBlockInfo: SerializedDeferBlock = {\n [NUM_ROOT_NODES]: rootNodes.length,\n [DEFER_BLOCK_STATE]: lDetails[CURRENT_DEFER_BLOCK_STATE],\n };\n\n const serializedTriggers = serializeHydrateTriggers(tDetails.hydrateTriggers);\n if (serializedTriggers.length > 0) {\n deferBlockInfo[DEFER_HYDRATE_TRIGGERS] = serializedTriggers;\n }\n\n if (parentDeferBlockId !== null) {\n // Serialize parent id only when it's present.\n deferBlockInfo[DEFER_PARENT_BLOCK_ID] = parentDeferBlockId;\n }\n\n context.deferBlocks.set(deferBlockId, deferBlockInfo);\n\n const node = unwrapRNode(lContainer);\n if (node !== undefined) {\n if ((node as Node).nodeType === Node.COMMENT_NODE) {\n annotateDeferBlockAnchorForHydration(node as RComment, deferBlockId);\n }\n } else {\n ngDevMode && validateNodeExists(node, childLView, tNode);\n ngDevMode &&\n validateMatchingNode(node, Node.COMMENT_NODE, null, childLView, tNode, true);\n\n annotateDeferBlockAnchorForHydration(node as RComment, deferBlockId);\n }\n\n if (!isHydrateNeverBlock) {\n // Add JSAction attributes for root nodes that use some hydration triggers\n annotateDeferBlockRootNodesWithJsAction(tDetails, rootNodes, deferBlockId, context);\n }\n\n // Use current block id as parent for nested routes.\n parentDeferBlockId = deferBlockId;\n\n // Serialize extra info into the view object.\n // TODO(incremental-hydration): this should be serialized and included at a different level\n // (not at the view level).\n serializedView[DEFER_BLOCK_ID] = deferBlockId;\n }\n // DEFER_BLOCK_STATE is used for reconciliation in hydration, both regular and incremental.\n // We need to know which template is rendered when hydrating. So we serialize this state\n // regardless of hydration type.\n serializedView[DEFER_BLOCK_STATE] = lDetails[CURRENT_DEFER_BLOCK_STATE];\n }\n\n if (!isHydrateNeverBlock) {\n Object.assign(\n serializedView,\n serializeLView(lContainer[i] as LView, parentDeferBlockId, context),\n );\n }\n }\n\n // Check if the previous view has the same shape (for example, it was\n // produced by the *ngFor), in which case bump the counter on the previous\n // view instead of including the same information again.\n const currentViewAsString = JSON.stringify(serializedView);\n if (views.length > 0 && currentViewAsString === lastViewAsString) {\n const previousView = views[views.length - 1];\n previousView[MULTIPLIER] ??= 1;\n previousView[MULTIPLIER]++;\n } else {\n // Record this view as most recently added.\n lastViewAsString = currentViewAsString;\n views.push(serializedView);\n }\n }\n return views;\n}\n\nfunction serializeHydrateTriggers(\n triggerMap: Map<DeferBlockTrigger, HydrateTriggerDetails | null>,\n): (DeferBlockTrigger | SerializedTriggerDetails)[] {\n const serializableDeferBlockTrigger = new Set<DeferBlockTrigger>([\n DeferBlockTrigger.Idle,\n DeferBlockTrigger.Immediate,\n DeferBlockTrigger.Viewport,\n DeferBlockTrigger.Timer,\n ]);\n let triggers: (DeferBlockTrigger | SerializedTriggerDetails)[] = [];\n for (let [trigger, details] of triggerMap) {\n if (serializableDeferBlockTrigger.has(trigger)) {\n if (details === null) {\n triggers.push(trigger);\n } else {\n triggers.push({trigger, delay: details.delay});\n }\n }\n }\n return triggers;\n}\n\n/**\n * Helper function to produce a node path (which navigation steps runtime logic\n * needs to take to locate a node) and stores it in the `NODES` section of the\n * current serialized view.\n */\nfunction appendSerializedNodePath(\n ngh: SerializedView,\n tNode: TNode,\n lView: LView,\n excludedParentNodes: Set<number> | null,\n) {\n const noOffsetIndex = tNode.index - HEADER_OFFSET;\n ngh[NODES] ??= {};\n // Ensure we don't calculate the path multiple times.\n ngh[NODES][noOffsetIndex] ??= calcPathForNode(tNode, lView, excludedParentNodes);\n}\n\n/**\n * Helper function to append information about a disconnected node.\n * This info is needed at runtime to avoid DOM lookups for this element\n * and instead, the element would be created from scratch.\n */\nfunction appendDisconnectedNodeIndex(ngh: SerializedView, tNodeOrNoOffsetIndex: TNode | number) {\n const noOffsetIndex =\n typeof tNodeOrNoOffsetIndex === 'number'\n ? tNodeOrNoOffsetIndex\n : tNodeOrNoOffsetIndex.index - HEADER_OFFSET;\n ngh[DISCONNECTED_NODES] ??= [];\n if (!ngh[DISCONNECTED_NODES].includes(noOffsetIndex)) {\n ngh[DISCONNECTED_NODES].push(noOffsetIndex);\n }\n}\n\n/**\n * Serializes the lView data into a SerializedView object that will later be added\n * to the TransferState storage and referenced using the `ngh` attribute on a host\n * element.\n *\n * @param lView the lView we are serializing\n * @param context the hydration context\n * @returns the `SerializedView` object containing the data to be added to the host node\n */\nfunction serializeLView(\n lView: LView,\n parentDeferBlockId: string | null = null,\n context: HydrationContext,\n): SerializedView {\n const ngh: SerializedView = {};\n const tView = lView[TVIEW];\n const i18nChildren = getOrComputeI18nChildren(tView, context);\n const nativeElementsToEventTypes = context.shouldReplayEvents\n ? collectDomEventsInfo(tView, lView, context.eventTypesToReplay)\n : null;\n // Iterate over DOM element references in an LView.\n for (let i = HEADER_OFFSET; i < tView.bindingStartIndex; i++) {\n const tNode = tView.data[i];\n const noOffsetIndex = i - HEADER_OFFSET;\n\n // Attempt to serialize any i18n data for the given slot. We do this first, as i18n\n // has its own process for serialization.\n const i18nData = trySerializeI18nBlock(lView, i, context);\n if (i18nData) {\n ngh[I18N_DATA] ??= {};\n ngh[I18N_DATA][noOffsetIndex] = i18nData.caseQueue;\n\n for (const nodeNoOffsetIndex of i18nData.disconnectedNodes) {\n appendDisconnectedNodeIndex(ngh, nodeNoOffsetIndex);\n }\n\n for (const nodeNoOffsetIndex of i18nData.disjointNodes) {\n const tNode = tView.data[nodeNoOffsetIndex + HEADER_OFFSET] as TNode;\n ngDevMode && assertTNode(tNode);\n appendSerializedNodePath(ngh, tNode, lView, i18nChildren);\n }\n\n continue;\n }\n\n // Skip processing of a given slot in the following cases:\n // - Local refs (e.g. <div #localRef>) take up an extra slot in LViews\n // to store the same element. In this case, there is no information in\n // a corresponding slot in TNode data structure.\n // - When a slot contains something other than a TNode. For example, there\n // might be some metadata information about a defer block or a control flow block.\n if (!isTNodeShape(tNode)) {\n continue;\n }\n\n // Skip any nodes that are in an i18n block but are considered detached (i.e. not\n // present in the template). These nodes are disconnected from the DOM tree, and\n // so we don't want to serialize any information about them.\n if (isDetachedByI18n(tNode)) {\n continue;\n }\n\n // Check if a native node that represents a given TNode is disconnected from the DOM tree.\n // Such nodes must be excluded from the hydration (since the hydration won't be able to\n // find them), so the TNode ids are collected and used at runtime to skip the hydration.\n //\n // This situation may happen during the content projection, when some nodes don't make it\n // into one of the content projection slots (for example, when there is no default\n // <ng-content /> slot in projector component's template).\n if (isDisconnectedNode(tNode, lView) && isContentProjectedNode(tNode)) {\n appendDisconnectedNodeIndex(ngh, tNode);\n continue;\n }\n\n if (Array.isArray(tNode.projection)) {\n for (const projectionHeadTNode of tNode.projection) {\n // We may have `null`s in slots with no projected content.\n if (!projectionHeadTNode) continue;\n\n if (!Array.isArray(projectionHeadTNode)) {\n // If we process re-projected content (i.e. `<ng-content>`\n // appears at projection location), skip annotations for this content\n // since all DOM nodes in this projection were handled while processing\n // a parent lView, which contains those nodes.\n if (\n !isProjectionTNode(projectionHeadTNode) &&\n !isInSkipHydrationBlock(projectionHeadTNode)\n ) {\n if (isDisconnectedNode(projectionHeadTNode, lView)) {\n // Check whether this node is connected, since we may have a TNode\n // in the data structure as a projection segment head, but the\n // content projection slot might be disabled (e.g.\n // <ng-content *ngIf=\"false\" />).\n appendDisconnectedNodeIndex(ngh, projectionHeadTNode);\n } else {\n appendSerializedNodePath(ngh, projectionHeadTNode, lView, i18nChildren);\n }\n }\n } else {\n // If a value is an array, it means that we are processing a projection\n // where projectable nodes were passed in as DOM nodes (for example, when\n // calling `ViewContainerRef.createComponent(CmpA, {projectableNodes: [...]})`).\n //\n // In this scenario, nodes can come from anywhere (either created manually,\n // accessed via `document.querySelector`, etc) and may be in any state\n // (attached or detached from the DOM tree). As a result, we can not reliably\n // restore the state for such cases during hydration.\n\n throw unsupportedProjectionOfDomNodes(unwrapRNode(lView[i]));\n }\n }\n }\n\n conditionallyAnnotateNodePath(ngh, tNode, lView, i18nChildren);\n if (isLContainer(lView[i])) {\n // Serialize information about a template.\n const embeddedTView = tNode.tView;\n if (embeddedTView !== null) {\n ngh[TEMPLATES] ??= {};\n ngh[TEMPLATES][noOffsetIndex] = getSsrId(embeddedTView);\n }\n\n // Serialize views within this LContainer.\n const hostNode = lView[i][HOST]!; // host node of this container\n\n // LView[i][HOST] can be of 2 different types:\n // - either a DOM node\n // - or an array that represents an LView of a component\n if (Array.isArray(hostNode)) {\n // This is a component, serialize info about it.\n const targetNode = unwrapRNode(hostNode as LView) as RElement;\n if (!(targetNode as HTMLElement).hasAttribute(SKIP_HYDRATION_ATTR_NAME)) {\n annotateHostElementForHydration(\n targetNode,\n hostNode as LView,\n parentDeferBlockId,\n context,\n );\n }\n }\n\n ngh[CONTAINERS] ??= {};\n ngh[CONTAINERS][noOffsetIndex] = serializeLContainer(\n lView[i],\n tNode,\n lView,\n parentDeferBlockId,\n context,\n );\n } else if (Array.isArray(lView[i]) && !isLetDeclaration(tNode)) {\n // This is a component, annotate the host node with an `ngh` attribute.\n // Note: Let declarations that return an array are also storing an array in the LView,\n // we need to exclude them.\n const targetNode = unwrapRNode(lView[i][HOST]!);\n if (!(targetNode as HTMLElement).hasAttribute(SKIP_HYDRATION_ATTR_NAME)) {\n annotateHostElementForHydration(\n targetNode as RElement,\n lView[i],\n parentDeferBlockId,\n context,\n );\n }\n } else {\n // <ng-container> case\n if (tNode.type & TNodeType.ElementContainer) {\n // An <ng-container> is represented by the number of\n // top-level nodes. This information is needed to skip over\n // those nodes to reach a corresponding anchor node (comment node).\n ngh[ELEMENT_CONTAINERS] ??= {};\n ngh[ELEMENT_CONTAINERS][noOffsetIndex] = calcNumRootNodes(tView, lView, tNode.child);\n } else if (tNode.type & (TNodeType.Projection | TNodeType.LetDeclaration)) {\n // Current TNode represents an `<ng-content>` slot or `@let` declaration,\n // thus it has no DOM elements associated with it, so the **next sibling**\n // node would not be able to find an anchor. In this case, use full path instead.\n let nextTNode = tNode.next;\n // Skip over all `<ng-content>` slots and `@let` declarations in a row.\n while (\n nextTNode !== null &&\n nextTNode.type & (TNodeType.Projection | TNodeType.LetDeclaration)\n ) {\n nextTNode = nextTNode.next;\n }\n if (nextTNode && !isInSkipHydrationBlock(nextTNode)) {\n // Handle a tNode after the `<ng-content>` slot.\n appendSerializedNodePath(ngh, nextTNode, lView, i18nChildren);\n }\n } else if (tNode.type & TNodeType.Text) {\n const rNode = unwrapRNode(lView[i]);\n processTextNodeBeforeSerialization(context, rNode);\n }\n }\n\n // Attach `jsaction` attribute to elements that have registered listeners,\n // thus potentially having a need to do an event replay.\n if (nativeElementsToEventTypes && tNode.type & TNodeType.Element) {\n const nativeElement = unwrapRNode(lView[i]) as Element;\n if (nativeElementsToEventTypes.has(nativeElement)) {\n setJSActionAttributes(\n nativeElement,\n nativeElementsToEventTypes.get(nativeElement)!,\n parentDeferBlockId,\n );\n }\n }\n }\n return ngh;\n}\n\n/**\n * Serializes node location in cases when it's needed, specifically:\n *\n * 1. If `tNode.projectionNext` is different from `tNode.next` - it means that\n * the next `tNode` after projection is different from the one in the original\n * template. Since hydration relies on `tNode.next`, this serialized info\n * is required to help runtime code find the node at the correct location.\n * 2. In certain content projection-based use-cases, it's possible that only\n * a content of a projected element is rendered. In this case, content nodes\n * require an extra annotation, since runtime logic can't rely on parent-child\n * connection to identify the location of a node.\n */\nfunction conditionallyAnnotateNodePath(\n ngh: SerializedView,\n tNode: TNode,\n lView: LView<unknown>,\n excludedParentNodes: Set<number> | null,\n) {\n if (isProjectionTNode(tNode)) {\n // Do not annotate projection nodes (<ng-content />), since\n // they don't have a corresponding DOM node representing them.\n return;\n }\n\n // Handle case #1 described above.\n if (\n tNode.projectionNext &&\n tNode.projectionNext !== tNode.next &&\n !isInSkipHydrationBlock(tNode.projectionNext)\n ) {\n appendSerializedNodePath(ngh, tNode.projectionNext, lView, excludedParentNodes);\n }\n\n // Handle case #2 described above.\n // Note: we only do that for the first node (i.e. when `tNode.prev === null`),\n // the rest of the nodes would rely on the current node location, so no extra\n // annotation is needed.\n if (\n tNode.prev === null &&\n tNode.parent !== null &&\n isDisconnectedNode(tNode.parent, lView) &&\n !isDisconnectedNode(tNode, lView)\n ) {\n appendSerializedNodePath(ngh, tNode, lView, excludedParentNodes);\n }\n}\n\n/**\n * Determines whether a component instance that is represented\n * by a given LView uses `ViewEncapsulation.ShadowDom`.\n */\nfunction componentUsesShadowDomEncapsulation(lView: LView): boolean {\n const instance = lView[CONTEXT];\n return instance?.constructor\n ? getComponentDef(instance.constructor)?.encapsulation === ViewEncapsulation.ShadowDom\n : false;\n}\n\n/**\n * Annotates component host element for hydration:\n * - by either adding the `ngh` attribute and collecting hydration-related info\n * for the serialization and transferring to the client\n * - or by adding the `ngSkipHydration` attribute in case Angular detects that\n * component contents is not compatible with hydration.\n *\n * @param element The Host element to be annotated\n * @param lView The associated LView\n * @param context The hydration context\n * @returns An index of serialized view from the transfer state object\n * or `null` when a given component can not be serialized.\n */\nfunction annotateHostElementForHydration(\n element: RElement,\n lView: LView,\n parentDeferBlockId: string | null,\n context: HydrationContext,\n): number | null {\n const renderer = lView[RENDERER];\n if (\n (hasI18n(lView) && !isI18nHydrationSupportEnabled()) ||\n componentUsesShadowDomEncapsulation(lView)\n ) {\n // Attach the skip hydration attribute if this component:\n // - either has i18n blocks, since hydrating such blocks is not yet supported\n // - or uses ShadowDom view encapsulation, since Domino doesn't support\n // shadow DOM, so we can not guarantee that client and server representations\n // would exactly match\n renderer.setAttribute(element, SKIP_HYDRATION_ATTR_NAME, '');\n return null;\n } else {\n const ngh = serializeLView(lView, parentDeferBlockId, context);\n const index = context.serializedViewCollection.add(ngh);\n renderer.setAttribute(element, NGH_ATTR_NAME, index.toString());\n return index;\n }\n}\n\n/**\n * Annotates defer block comment node for hydration:\n *\n * @param comment The Host element to be annotated\n * @param deferBlockId the id of the target defer block\n */\nfunction annotateDeferBlockAnchorForHydration(comment: RComment, deferBlockId: string): void {\n comment.textContent = `ngh=${deferBlockId}`;\n}\n\n/**\n * Physically inserts the comment nodes to ensure empty text nodes and adjacent\n * text node separators are preserved after server serialization of the DOM.\n * These get swapped back for empty text nodes or separators once hydration happens\n * on the client.\n *\n * @param corruptedTextNodes The Map of text nodes to be replaced with comments\n * @param doc The document\n */\nfunction insertCorruptedTextNodeMarkers(\n corruptedTextNodes: Map<HTMLElement, string>,\n doc: Document,\n) {\n for (const [textNode, marker] of corruptedTextNodes) {\n textNode.after(doc.createComment(marker));\n }\n}\n\n/**\n * Detects whether a given TNode represents a node that\n * is being content projected.\n */\nfunction isContentProjectedNode(tNode: TNode): boolean {\n let currentTNode = tNode;\n while (currentTNode != null) {\n // If we come across a component host node in parent nodes -\n // this TNode is in the content projection section.\n if (isComponentHost(currentTNode)) {\n return true;\n }\n currentTNode = currentTNode.parent as TNode;\n }\n return false;\n}\n\n/**\n * Incremental hydration requires that any defer block root node\n * with interaction or hover triggers have all of their root nodes\n * trigger hydration with those events. So we need to make sure all\n * the root nodes of that block have the proper jsaction attribute\n * to ensure hydration is triggered, since the content is dehydrated\n */\nfunction annotateDeferBlockRootNodesWithJsAction(\n tDetails: TDeferBlockDetails,\n rootNodes: any[],\n parentDeferBlockId: string,\n context: HydrationContext,\n) {\n const actionList = convertHydrateTriggersToJsAction(tDetails.hydrateTriggers);\n for (let et of actionList) {\n context.eventTypesToReplay.regular.add(et);\n }\n\n if (actionList.length > 0) {\n const elementNodes = (rootNodes as HTMLElement[]).filter(\n (rn) => rn.nodeType === Node.ELEMENT_NODE,\n );\n for (let rNode of elementNodes) {\n setJSActionAttributes(rNode, actionList, parentDeferBlockId);\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {APP_BOOTSTRAP_LISTENER, ApplicationRef} from '../application/application_ref';\nimport {Console} from '../console';\nimport {\n ENVIRONMENT_INITIALIZER,\n EnvironmentProviders,\n Injector,\n makeEnvironmentProviders,\n Provider,\n} from '../di';\nimport {inject} from '../di/injector_compatibility';\nimport {formatRuntimeError, RuntimeError, RuntimeErrorCode} from '../errors';\nimport {enableLocateOrCreateContainerRefImpl} from '../linker/view_container_ref';\nimport {enableLocateOrCreateI18nNodeImpl} from '../render3/i18n/i18n_apply';\nimport {enableLocateOrCreateElementNodeImpl} from '../render3/instructions/element';\nimport {enableLocateOrCreateElementContainerNodeImpl} from '../render3/instructions/element_container';\nimport {enableApplyRootElementTransformImpl} from '../render3/instructions/shared';\nimport {enableLocateOrCreateContainerAnchorImpl} from '../render3/instructions/template';\nimport {enableLocateOrCreateTextNodeImpl} from '../render3/instructions/text';\nimport {getDocument} from '../render3/interfaces/document';\nimport {TransferState} from '../transfer_state';\nimport {performanceMarkFeature} from '../util/performance';\nimport {NgZone} from '../zone';\nimport {withEventReplay} from './event_replay';\n\nimport {cleanupDehydratedViews} from './cleanup';\nimport {\n enableClaimDehydratedIcuCaseImpl,\n enablePrepareI18nBlockForHydrationImpl,\n setIsI18nHydrationSupportEnabled,\n} from './i18n';\nimport {\n IS_HYDRATION_DOM_REUSE_ENABLED,\n IS_I18N_HYDRATION_ENABLED,\n IS_INCREMENTAL_HYDRATION_ENABLED,\n PRESERVE_HOST_CONTENT,\n} from './tokens';\nimport {\n appendDeferBlocksToJSActionMap,\n countBlocksSkippedByHydration,\n enableRetrieveDeferBlockDataImpl,\n enableRetrieveHydrationInfoImpl,\n isIncrementalHydrationEnabled,\n NGH_DATA_KEY,\n processBlockData,\n verifySsrContentsIntegrity,\n} from './utils';\nimport {enableFindMatchingDehydratedViewImpl} from './views';\nimport {DEHYDRATED_BLOCK_REGISTRY, DehydratedBlockRegistry} from '../defer/registry';\nimport {gatherDeferBlocksCommentNodes} from './node_lookup_utils';\nimport {processAndInitTriggers} from '../defer/triggering';\n\n/**\n * Indicates whether the hydration-related code was added,\n * prevents adding it multiple times.\n */\nlet isHydrationSupportEnabled = false;\n\n/**\n * Indicates whether the i18n-related code was added,\n * prevents adding it multiple times.\n *\n * Note: This merely controls whether the code is loaded,\n * while `setIsI18nHydrationSupportEnabled` determines\n * whether i18n blocks are serialized or hydrated.\n */\nlet isI18nHydrationRuntimeSupportEnabled = false;\n\n/**\n * Indicates whether the incremental hydration code was added,\n * prevents adding it multiple times.\n */\nlet isIncrementalHydrationRuntimeSupportEnabled = false;\n\n/**\n * Defines a period of time that Angular waits for the `ApplicationRef.isStable` to emit `true`.\n * If there was no event with the `true` value during this time, Angular reports a warning.\n */\nconst APPLICATION_IS_STABLE_TIMEOUT = 10_000;\n\n/**\n * Brings the necessary hydration code in tree-shakable manner.\n * The code is only present when the `provideClientHydration` is\n * invoked. Otherwise, this code is tree-shaken away during the\n * build optimization step.\n *\n * This technique allows us to swap implementations of methods so\n * tree shaking works appropriately when hydration is disabled or\n * enabled. It brings in the appropriate version of the method that\n * supports hydration only when enabled.\n */\nfunction enableHydrationRuntimeSupport() {\n if (!isHydrationSupportEnabled) {\n isHydrationSupportEnabled = true;\n enableRetrieveHydrationInfoImpl();\n enableLocateOrCreateElementNodeImpl();\n enableLocateOrCreateTextNodeImpl();\n enableLocateOrCreateElementContainerNodeImpl();\n enableLocateOrCreateContainerAnchorImpl();\n enableLocateOrCreateContainerRefImpl();\n enableFindMatchingDehydratedViewImpl();\n enableApplyRootElementTransformImpl();\n }\n}\n\n/**\n * Brings the necessary i18n hydration code in tree-shakable manner.\n * Similar to `enableHydrationRuntimeSupport`, the code is only\n * present when `withI18nSupport` is invoked.\n */\nfunction enableI18nHydrationRuntimeSupport() {\n if (!isI18nHydrationRuntimeSupportEnabled) {\n isI18nHydrationRuntimeSupportEnabled = true;\n enableLocateOrCreateI18nNodeImpl();\n enablePrepareI18nBlockForHydrationImpl();\n enableClaimDehydratedIcuCaseImpl();\n }\n}\n\n/**\n * Brings the necessary incremental hydration code in tree-shakable manner.\n * Similar to `enableHydrationRuntimeSupport`, the code is only\n * present when `enableIncrementalHydrationRuntimeSupport` is invoked.\n */\nfunction enableIncrementalHydrationRuntimeSupport() {\n if (!isIncrementalHydrationRuntimeSupportEnabled) {\n isIncrementalHydrationRuntimeSupportEnabled = true;\n enableRetrieveDeferBlockDataImpl();\n }\n}\n\n/**\n * Outputs a message with hydration stats into a console.\n */\nfunction printHydrationStats(injector: Injector) {\n const console = injector.get(Console);\n const message =\n `Angular hydrated ${ngDevMode!.hydratedComponents} component(s) ` +\n `and ${ngDevMode!.hydratedNodes} node(s), ` +\n `${ngDevMode!.componentsSkippedHydration} component(s) were skipped. ` +\n (isIncrementalHydrationEnabled(injector)\n ? `${ngDevMode!.deferBlocksWithIncrementalHydration} defer block(s) were configured to use incremental hydration. `\n : '') +\n `Learn more at https://angular.dev/guide/hydration.`;\n // tslint:disable-next-line:no-console\n console.log(message);\n}\n\n/**\n * Returns a Promise that is resolved when an application becomes stable.\n */\nfunction whenStableWithTimeout(appRef: ApplicationRef): Promise<void> {\n const whenStablePromise = appRef.whenStable();\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n const timeoutTime = APPLICATION_IS_STABLE_TIMEOUT;\n const console = appRef.injector.get(Console);\n const ngZone = appRef.injector.get(NgZone);\n\n // The following call should not and does not prevent the app to become stable\n // We cannot use RxJS timer here because the app would remain unstable.\n // This also avoids an extra change detection cycle.\n const timeoutId = ngZone.runOutsideAngular(() => {\n return setTimeout(() => logWarningOnStableTimedout(timeoutTime, console), timeoutTime);\n });\n\n whenStablePromise.finally(() => clearTimeout(timeoutId));\n }\n\n return whenStablePromise;\n}\n\n/**\n * Defines a name of an attribute that is added to the <body> tag\n * in the `index.html` file in case a given route was configured\n * with `RenderMode.Client`. 'cm' is an abbreviation for \"Client Mode\".\n */\nexport const CLIENT_RENDER_MODE_FLAG = 'ngcm';\n\n/**\n * Checks whether the `RenderMode.Client` was defined for the current route.\n */\nfunction isClientRenderModeEnabled(): boolean {\n const doc = getDocument();\n return (\n (typeof ngServerMode === 'undefined' || !ngServerMode) &&\n doc.body.hasAttribute(CLIENT_RENDER_MODE_FLAG)\n );\n}\n\n/**\n * Returns a set of providers required to setup hydration support\n * for an application that is server side rendered. This function is\n * included into the `provideClientHydration` public API function from\n * the `platform-browser` package.\n *\n * The function sets up an internal flag that would be recognized during\n * the server side rendering time as well, so there is no need to\n * configure or change anything in NgUniversal to enable the feature.\n */\nexport function withDomHydration(): EnvironmentProviders {\n const providers: Provider[] = [\n {\n provide: IS_HYDRATION_DOM_REUSE_ENABLED,\n useFactory: () => {\n let isEnabled = true;\n if (typeof ngServerMode === 'undefined' || !ngServerMode) {\n // On the client, verify that the server response contains\n // hydration annotations. Otherwise, keep hydration disabled.\n const transferState = inject(TransferState, {optional: true});\n isEnabled = !!transferState?.get(NGH_DATA_KEY, null);\n }\n if (isEnabled) {\n performanceMarkFeature('NgHydration');\n }\n return isEnabled;\n },\n },\n {\n provide: ENVIRONMENT_INITIALIZER,\n useValue: () => {\n // i18n support is enabled by calling withI18nSupport(), but there's\n // no way to turn it off (e.g. for tests), so we turn it off by default.\n setIsI18nHydrationSupportEnabled(false);\n\n if (typeof ngServerMode !== 'undefined' && ngServerMode) {\n // Since this function is used across both server and client,\n // make sure that the runtime code is only added when invoked\n // on the client (see the `enableHydrationRuntimeSupport` function\n // call below).\n return;\n }\n\n if (inject(IS_HYDRATION_DOM_REUSE_ENABLED)) {\n verifySsrContentsIntegrity(getDocument());\n enableHydrationRuntimeSupport();\n } else if (typeof ngDevMode !== 'undefined' && ngDevMode && !isClientRenderModeEnabled()) {\n const console = inject(Console);\n const message = formatRuntimeError(\n RuntimeErrorCode.MISSING_HYDRATION_ANNOTATIONS,\n 'Angular hydration was requested on the client, but there was no ' +\n 'serialized information present in the server response, ' +\n 'thus hydration was not enabled. ' +\n 'Make sure the `provideClientHydration()` is included into the list ' +\n 'of providers in the server part of the application configuration.',\n );\n console.warn(message);\n }\n },\n multi: true,\n },\n ];\n\n if (typeof ngServerMode === 'undefined' || !ngServerMode) {\n providers.push(\n {\n provide: PRESERVE_HOST_CONTENT,\n useFactory: () => {\n // Preserve host element content only in a browser\n // environment and when hydration is configured properly.\n // On a server, an application is rendered from scratch,\n // so the host content needs to be empty.\n return inject(IS_HYDRATION_DOM_REUSE_ENABLED);\n },\n },\n {\n provide: APP_BOOTSTRAP_LISTENER,\n useFactory: () => {\n if (inject(IS_HYDRATION_DOM_REUSE_ENABLED)) {\n const appRef = inject(ApplicationRef);\n\n return () => {\n // Wait until an app becomes stable and cleanup all views that\n // were not claimed during the application bootstrap process.\n // The timing is similar to when we start the serialization process\n // on the server.\n //\n // Note: the cleanup task *MUST* be scheduled within the Angular zone in Zone apps\n // to ensure that change detection is properly run afterward.\n whenStableWithTimeout(appRef).then(() => {\n // Note: we have to check whether the application is destroyed before\n // performing other operations with the `injector`.\n // The application may be destroyed **before** it becomes stable, so when\n // the `whenStableWithTimeout` resolves, the injector might already be in\n // a destroyed state. Thus, calling `injector.get` would throw an error\n // indicating that the injector has already been destroyed.\n if (appRef.destroyed) {\n return;\n }\n\n cleanupDehydratedViews(appRef);\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n countBlocksSkippedByHydration(appRef.injector);\n printHydrationStats(appRef.injector);\n }\n });\n };\n }\n return () => {}; // noop\n },\n multi: true,\n },\n );\n }\n\n return makeEnvironmentProviders(providers);\n}\n\n/**\n * Returns a set of providers required to setup support for i18n hydration.\n * Requires hydration to be enabled separately.\n */\nexport function withI18nSupport(): Provider[] {\n return [\n {\n provide: IS_I18N_HYDRATION_ENABLED,\n useFactory: () => inject(IS_HYDRATION_DOM_REUSE_ENABLED),\n },\n {\n provide: ENVIRONMENT_INITIALIZER,\n useValue: () => {\n if (inject(IS_HYDRATION_DOM_REUSE_ENABLED)) {\n enableI18nHydrationRuntimeSupport();\n setIsI18nHydrationSupportEnabled(true);\n performanceMarkFeature('NgI18nHydration');\n }\n },\n multi: true,\n },\n ];\n}\n\n/**\n * Returns a set of providers required to setup support for incremental hydration.\n * Requires hydration to be enabled separately.\n * Enabling incremental hydration also enables event replay for the entire app.\n *\n * @developerPreview\n */\nexport function withIncrementalHydration(): Provider[] {\n const providers: Provider[] = [\n withEventReplay(),\n {\n provide: IS_INCREMENTAL_HYDRATION_ENABLED,\n useValue: true,\n },\n {\n provide: DEHYDRATED_BLOCK_REGISTRY,\n useClass: DehydratedBlockRegistry,\n },\n {\n provide: ENVIRONMENT_INITIALIZER,\n useValue: () => {\n enableIncrementalHydrationRuntimeSupport();\n performanceMarkFeature('NgIncrementalHydration');\n },\n multi: true,\n },\n ];\n\n if (typeof ngServerMode === 'undefined' || !ngServerMode) {\n providers.push({\n provide: APP_BOOTSTRAP_LISTENER,\n useFactory: () => {\n const injector = inject(Injector);\n const doc = getDocument();\n\n return () => {\n const deferBlockData = processBlockData(injector);\n const commentsByBlockId = gatherDeferBlocksCommentNodes(doc, doc.body);\n processAndInitTriggers(injector, deferBlockData, commentsByBlockId);\n appendDeferBlocksToJSActionMap(doc, injector);\n };\n },\n multi: true,\n });\n }\n\n return providers;\n}\n\n/**\n *\n * @param time The time in ms until the stable timedout warning message is logged\n */\nfunction logWarningOnStableTimedout(time: number, console: Console): void {\n const message =\n `Angular hydration expected the ApplicationRef.isStable() to emit \\`true\\`, but it ` +\n `didn't happen within ${time}ms. Angular hydration logic depends on the application becoming stable ` +\n `as a signal to complete hydration process.`;\n\n console.warn(formatRuntimeError(RuntimeErrorCode.HYDRATION_STABLE_TIMEDOUT, message));\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/**\n * Transforms a value (typically a string) to a boolean.\n * Intended to be used as a transform function of an input.\n *\n * @usageNotes\n * ```ts\n * @Input({ transform: booleanAttribute }) status!: boolean;\n * ```\n * @param value Value to be transformed.\n *\n * @publicApi\n */\nexport function booleanAttribute(value: unknown): boolean {\n return typeof value === 'boolean' ? value : value != null && value !== 'false';\n}\n\n/**\n * Transforms a value (typically a string) to a number.\n * Intended to be used as a transform function of an input.\n * @param value Value to be transformed.\n * @param fallbackValue Value to use if the provided value can't be parsed as a number.\n *\n * @usageNotes\n * ```ts\n * @Input({ transform: numberAttribute }) id!: number;\n * ```\n *\n * @publicApi\n */\nexport function numberAttribute(value: unknown, fallbackValue = NaN): number {\n // parseFloat(value) handles most of the cases we're interested in (it treats null, empty string,\n // and other non-number values as NaN, where Number just uses 0) but it considers the string\n // '123hello' to be a valid number. Therefore we also check if Number(value) is NaN.\n const isNumberValue = !isNaN(parseFloat(value as any)) && !isNaN(Number(value));\n return isNumberValue ? Number(value) : fallbackValue;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nexport const PERFORMANCE_MARK_PREFIX = '🅰️';\n\nlet enablePerfLogging = false;\n\n/**\n * Function that will start measuring against the performance API\n * Should be used in pair with stopMeasuring\n */\nexport function startMeasuring<T>(label: string): void {\n if (!enablePerfLogging) {\n return;\n }\n\n const {startLabel} = labels(label);\n /* tslint:disable:ban */\n performance.mark(startLabel);\n /* tslint:enable:ban */\n}\n\n/**\n * Function that will stop measuring against the performance API\n * Should be used in pair with stopMeasuring\n */\nexport function stopMeasuring(label: string): void {\n if (!enablePerfLogging) {\n return;\n }\n\n const {startLabel, labelName, endLabel} = labels(label);\n /* tslint:disable:ban */\n performance.mark(endLabel);\n performance.measure(labelName, startLabel, endLabel);\n performance.clearMarks(startLabel);\n performance.clearMarks(endLabel);\n /* tslint:enable:ban */\n}\n\nexport function labels(label: string) {\n const labelName = `${PERFORMANCE_MARK_PREFIX}:${label}`;\n return {\n labelName,\n startLabel: `start:${labelName}`,\n endLabel: `end:${labelName}`,\n };\n}\n\nlet warningLogged = false;\n/**\n * This enables an internal performance profiler\n *\n * It should not be imported in application code\n */\nexport function enableProfiling() {\n if (\n !warningLogged &&\n (typeof performance === 'undefined' || !performance.mark || !performance.measure)\n ) {\n warningLogged = true;\n console.warn('Performance API is not supported on this platform');\n return;\n }\n\n enablePerfLogging = true;\n}\nexport function disableProfiling() {\n enablePerfLogging = false;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {untracked as untrackedPrimitive} from '../../../primitives/signals';\n\n/**\n * Execute an arbitrary function in a non-reactive (non-tracking) context. The executed function\n * can, optionally, return a value.\n */\nexport function untracked<T>(nonReactiveReadsFn: () => T): T {\n return untrackedPrimitive(nonReactiveReadsFn);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {createComputed, SIGNAL} from '../../../primitives/signals';\n\nimport {Signal, ValueEqualityFn} from './api';\n\n/**\n * Options passed to the `computed` creation function.\n */\nexport interface CreateComputedOptions<T> {\n /**\n * A comparison function which defines equality for computed values.\n */\n equal?: ValueEqualityFn<T>;\n\n /**\n * A debug name for the computed signal. Used in Angular DevTools to identify the signal.\n */\n debugName?: string;\n}\n\n/**\n * Create a computed `Signal` which derives a reactive value from an expression.\n */\nexport function computed<T>(computation: () => T, options?: CreateComputedOptions<T>): Signal<T> {\n const getter = createComputed(computation, options?.equal);\n\n if (ngDevMode) {\n getter.toString = () => `[Computed: ${getter()}]`;\n getter[SIGNAL].debugName = options?.debugName;\n }\n\n return getter;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {createWatch, Watch, WatchCleanupRegisterFn} from '@angular/core/primitives/signals';\n\nimport {ChangeDetectorRef} from '../../change_detection/change_detector_ref';\nimport {Injector} from '../../di/injector';\nimport {inject} from '../../di/injector_compatibility';\nimport {ɵɵdefineInjectable} from '../../di/interface/defs';\nimport {ErrorHandler} from '../../error_handler';\nimport type {ViewRef} from '../view_ref';\nimport {DestroyRef} from '../../linker/destroy_ref';\nimport {FLAGS, LViewFlags, EFFECTS_TO_SCHEDULE} from '../interfaces/view';\n\nimport type {CreateEffectOptions, EffectCleanupRegisterFn, EffectRef} from './effect';\nimport {type SchedulableEffect, ZoneAwareEffectScheduler} from './root_effect_scheduler';\nimport {performanceMarkFeature} from '../../util/performance';\nimport {assertNotInReactiveContext} from './asserts';\nimport {assertInInjectionContext} from '../../di';\nimport {PendingTasksInternal} from '../../pending_tasks';\n\nexport class MicrotaskEffectScheduler extends ZoneAwareEffectScheduler {\n private readonly pendingTasks = inject(PendingTasksInternal);\n private taskId: number | null = null;\n\n override schedule(effect: SchedulableEffect): void {\n // Check whether there are any pending effects _before_ queueing in the base class.\n super.schedule(effect);\n if (this.taskId === null) {\n this.taskId = this.pendingTasks.add();\n queueMicrotask(() => this.flush());\n }\n }\n\n override flush(): void {\n try {\n super.flush();\n } finally {\n if (this.taskId !== null) {\n this.pendingTasks.remove(this.taskId);\n this.taskId = null;\n }\n }\n }\n\n /** @nocollapse */\n static ɵprov = /** @pureOrBreakMyCode */ /* @__PURE__ */ ɵɵdefineInjectable({\n token: MicrotaskEffectScheduler,\n providedIn: 'root',\n factory: () => new MicrotaskEffectScheduler(),\n });\n}\n\n/**\n * Core reactive node for an Angular effect.\n *\n * `EffectHandle` combines the reactive graph's `Watch` base node for effects with the framework's\n * scheduling abstraction (`MicrotaskEffectScheduler`) as well as automatic cleanup via `DestroyRef`\n * if available/requested.\n */\nclass EffectHandle implements EffectRef, SchedulableEffect {\n unregisterOnDestroy: (() => void) | undefined;\n readonly watcher: Watch;\n\n constructor(\n private scheduler: MicrotaskEffectScheduler,\n private effectFn: (onCleanup: EffectCleanupRegisterFn) => void,\n public zone: Zone | null,\n destroyRef: DestroyRef | null,\n private injector: Injector,\n allowSignalWrites: boolean,\n ) {\n this.watcher = createWatch(\n (onCleanup) => this.runEffect(onCleanup),\n () => this.schedule(),\n allowSignalWrites,\n );\n this.unregisterOnDestroy = destroyRef?.onDestroy(() => this.destroy());\n }\n\n private runEffect(onCleanup: WatchCleanupRegisterFn): void {\n try {\n this.effectFn(onCleanup);\n } catch (err) {\n // Inject the `ErrorHandler` here in order to avoid circular DI error\n // if the effect is used inside of a custom `ErrorHandler`.\n const errorHandler = this.injector.get(ErrorHandler, null, {optional: true});\n errorHandler?.handleError(err);\n }\n }\n\n run(): void {\n this.watcher.run();\n }\n\n private schedule(): void {\n this.scheduler.schedule(this);\n }\n\n destroy(): void {\n this.watcher.destroy();\n this.unregisterOnDestroy?.();\n\n // Note: if the effect is currently scheduled, it's not un-scheduled, and so the scheduler will\n // retain a reference to it. Attempting to execute it will be a no-op.\n }\n}\n\n// Just used for the name for the debug error below.\nfunction effect() {}\n\n/**\n * Create a global `Effect` for the given reactive function.\n */\nexport function microtaskEffect(\n effectFn: (onCleanup: EffectCleanupRegisterFn) => void,\n options?: CreateEffectOptions,\n): EffectRef {\n ngDevMode &&\n assertNotInReactiveContext(\n effect,\n 'Call `effect` outside of a reactive context. For example, schedule the ' +\n 'effect inside the component constructor.',\n );\n\n !options?.injector && assertInInjectionContext(effect);\n\n const injector = options?.injector ?? inject(Injector);\n const destroyRef = options?.manualCleanup !== true ? injector.get(DestroyRef) : null;\n\n const handle = new EffectHandle(\n injector.get(MicrotaskEffectScheduler),\n effectFn,\n typeof Zone === 'undefined' ? null : Zone.current,\n destroyRef,\n injector,\n options?.allowSignalWrites ?? false,\n );\n\n // Effects need to be marked dirty manually to trigger their initial run. The timing of this\n // marking matters, because the effects may read signals that track component inputs, which are\n // only available after those components have had their first update pass.\n //\n // We inject `ChangeDetectorRef` optionally, to determine whether this effect is being created in\n // the context of a component or not. If it is, then we check whether the component has already\n // run its update pass, and defer the effect's initial scheduling until the update pass if it\n // hasn't already run.\n const cdr = injector.get(ChangeDetectorRef, null, {optional: true}) as ViewRef<unknown> | null;\n if (!cdr || !(cdr._lView[FLAGS] & LViewFlags.FirstLViewPass)) {\n // This effect is either not running in a view injector, or the view has already\n // undergone its first change detection pass, which is necessary for any required inputs to be\n // set.\n handle.watcher.notify();\n } else {\n // Delay the initialization of the effect until the view is fully initialized.\n (cdr._lView[EFFECTS_TO_SCHEDULE] ??= []).push(handle.watcher.notify);\n }\n\n return handle;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n REACTIVE_NODE,\n ReactiveNode,\n SIGNAL,\n consumerAfterComputation,\n consumerBeforeComputation,\n consumerDestroy,\n consumerPollProducersForChange,\n isInNotificationPhase,\n} from '../../../primitives/signals';\nimport {FLAGS, LViewFlags, LView, EFFECTS} from '../interfaces/view';\nimport {markAncestorsForTraversal} from '../util/view_utils';\nimport {inject} from '../../di/injector_compatibility';\nimport {performanceMarkFeature} from '../../util/performance';\nimport {Injector} from '../../di/injector';\nimport {assertNotInReactiveContext} from './asserts';\nimport {assertInInjectionContext} from '../../di/contextual';\nimport {DestroyRef, NodeInjectorDestroyRef} from '../../linker/destroy_ref';\nimport {ViewContext} from '../view_context';\nimport {noop} from '../../util/noop';\nimport {\n ChangeDetectionScheduler,\n NotificationSource,\n} from '../../change_detection/scheduling/zoneless_scheduling';\nimport {setIsRefreshingViews} from '../state';\nimport {EffectScheduler, SchedulableEffect} from './root_effect_scheduler';\nimport {USE_MICROTASK_EFFECT_BY_DEFAULT} from './patch';\nimport {microtaskEffect} from './microtask_effect';\n\nlet useMicrotaskEffectsByDefault = USE_MICROTASK_EFFECT_BY_DEFAULT;\nimport {emitEffectCreatedEvent, setInjectorProfilerContext} from '../debug/injector_profiler';\n\n/**\n * Toggle the flag on whether to use microtask effects (for testing).\n */\nexport function setUseMicrotaskEffectsByDefault(value: boolean): boolean {\n const prev = useMicrotaskEffectsByDefault;\n useMicrotaskEffectsByDefault = value;\n return prev;\n}\n\n/**\n * A global reactive effect, which can be manually destroyed.\n *\n * @developerPreview\n */\nexport interface EffectRef {\n /**\n * Shut down the effect, removing it from any upcoming scheduled executions.\n */\n destroy(): void;\n}\n\nexport class EffectRefImpl implements EffectRef {\n [SIGNAL]: EffectNode;\n\n constructor(node: EffectNode) {\n this[SIGNAL] = node;\n }\n\n destroy(): void {\n this[SIGNAL].destroy();\n }\n}\n\n/**\n * Options passed to the `effect` function.\n *\n * @developerPreview\n */\nexport interface CreateEffectOptions {\n /**\n * The `Injector` in which to create the effect.\n *\n * If this is not provided, the current [injection context](guide/di/dependency-injection-context)\n * will be used instead (via `inject`).\n */\n injector?: Injector;\n\n /**\n * Whether the `effect` should require manual cleanup.\n *\n * If this is `false` (the default) the effect will automatically register itself to be cleaned up\n * with the current `DestroyRef`.\n */\n manualCleanup?: boolean;\n\n /**\n * Always create a root effect (which is scheduled as a microtask) regardless of whether `effect`\n * is called within a component.\n */\n forceRoot?: true;\n\n /**\n * @deprecated no longer required, signal writes are allowed by default.\n */\n allowSignalWrites?: boolean;\n\n /**\n * A debug name for the effect. Used in Angular DevTools to identify the effect.\n */\n debugName?: string;\n}\n\n/**\n * An effect can, optionally, register a cleanup function. If registered, the cleanup is executed\n * before the next effect run. The cleanup function makes it possible to \"cancel\" any work that the\n * previous effect run might have started.\n *\n * @developerPreview\n */\nexport type EffectCleanupFn = () => void;\n\n/**\n * A callback passed to the effect function that makes it possible to register cleanup logic.\n *\n * @developerPreview\n */\nexport type EffectCleanupRegisterFn = (cleanupFn: EffectCleanupFn) => void;\n\n/**\n * Registers an \"effect\" that will be scheduled & executed whenever the signals that it reads\n * changes.\n *\n * Angular has two different kinds of effect: component effects and root effects. Component effects\n * are created when `effect()` is called from a component, directive, or within a service of a\n * component/directive. Root effects are created when `effect()` is called from outside the\n * component tree, such as in a root service, or when the `forceRoot` option is provided.\n *\n * The two effect types differ in their timing. Component effects run as a component lifecycle\n * event during Angular's synchronization (change detection) process, and can safely read input\n * signals or create/destroy views that depend on component state. Root effects run as microtasks\n * and have no connection to the component tree or change detection.\n *\n * `effect()` must be run in injection context, unless the `injector` option is manually specified.\n *\n * @developerPreview\n */\nexport function effect(\n effectFn: (onCleanup: EffectCleanupRegisterFn) => void,\n options?: CreateEffectOptions,\n): EffectRef {\n if (useMicrotaskEffectsByDefault) {\n if (ngDevMode && options?.forceRoot) {\n throw new Error(`Cannot use 'forceRoot' option with microtask effects on`);\n }\n\n return microtaskEffect(effectFn, options);\n }\n\n ngDevMode &&\n assertNotInReactiveContext(\n effect,\n 'Call `effect` outside of a reactive context. For example, schedule the ' +\n 'effect inside the component constructor.',\n );\n\n !options?.injector && assertInInjectionContext(effect);\n\n if (ngDevMode && options?.allowSignalWrites !== undefined) {\n console.warn(\n `The 'allowSignalWrites' flag is deprecated and no longer impacts effect() (writes are always allowed)`,\n );\n }\n\n const injector = options?.injector ?? inject(Injector);\n let destroyRef = options?.manualCleanup !== true ? injector.get(DestroyRef) : null;\n\n let node: EffectNode;\n\n const viewContext = injector.get(ViewContext, null, {optional: true});\n const notifier = injector.get(ChangeDetectionScheduler);\n if (viewContext !== null && !options?.forceRoot) {\n // This effect was created in the context of a view, and will be associated with the view.\n node = createViewEffect(viewContext.view, notifier, effectFn);\n if (destroyRef instanceof NodeInjectorDestroyRef && destroyRef._lView === viewContext.view) {\n // The effect is being created in the same view as the `DestroyRef` references, so it will be\n // automatically destroyed without the need for an explicit `DestroyRef` registration.\n destroyRef = null;\n }\n } else {\n // This effect was created outside the context of a view, and will be scheduled independently.\n node = createRootEffect(effectFn, injector.get(EffectScheduler), notifier);\n }\n node.injector = injector;\n\n if (destroyRef !== null) {\n // If we need to register for cleanup, do that here.\n node.onDestroyFn = destroyRef.onDestroy(() => node.destroy());\n }\n\n const effectRef = new EffectRefImpl(node);\n\n if (ngDevMode) {\n node.debugName = options?.debugName ?? '';\n const prevInjectorProfilerContext = setInjectorProfilerContext({injector, token: null});\n try {\n emitEffectCreatedEvent(effectRef);\n } finally {\n setInjectorProfilerContext(prevInjectorProfilerContext);\n }\n }\n\n return effectRef;\n}\n\nexport interface EffectNode extends ReactiveNode, SchedulableEffect {\n hasRun: boolean;\n cleanupFns: EffectCleanupFn[] | undefined;\n injector: Injector;\n notifier: ChangeDetectionScheduler;\n\n onDestroyFn: () => void;\n fn: (cleanupFn: EffectCleanupRegisterFn) => void;\n run(): void;\n destroy(): void;\n maybeCleanup(): void;\n}\n\nexport interface ViewEffectNode extends EffectNode {\n view: LView;\n}\n\nexport interface RootEffectNode extends EffectNode {\n scheduler: EffectScheduler;\n}\n\nexport const BASE_EFFECT_NODE: Omit<EffectNode, 'fn' | 'destroy' | 'injector' | 'notifier'> =\n /* @__PURE__ */ (() => ({\n ...REACTIVE_NODE,\n consumerIsAlwaysLive: true,\n consumerAllowSignalWrites: true,\n dirty: true,\n hasRun: false,\n cleanupFns: undefined,\n zone: null,\n kind: 'effect',\n onDestroyFn: noop,\n run(this: EffectNode): void {\n this.dirty = false;\n\n if (ngDevMode && isInNotificationPhase()) {\n throw new Error(`Schedulers cannot synchronously execute watches while scheduling.`);\n }\n\n if (this.hasRun && !consumerPollProducersForChange(this)) {\n return;\n }\n this.hasRun = true;\n\n const registerCleanupFn: EffectCleanupRegisterFn = (cleanupFn) =>\n (this.cleanupFns ??= []).push(cleanupFn);\n\n const prevNode = consumerBeforeComputation(this);\n\n // We clear `setIsRefreshingViews` so that `markForCheck()` within the body of an effect will\n // cause CD to reach the component in question.\n const prevRefreshingViews = setIsRefreshingViews(false);\n try {\n this.maybeCleanup();\n this.fn(registerCleanupFn);\n } finally {\n setIsRefreshingViews(prevRefreshingViews);\n consumerAfterComputation(this, prevNode);\n }\n },\n\n maybeCleanup(this: EffectNode): void {\n if (!this.cleanupFns?.length) {\n return;\n }\n try {\n // Attempt to run the cleanup functions. Regardless of failure or success, we consider\n // cleanup \"completed\" and clear the list for the next run of the effect. Note that an error\n // from the cleanup function will still crash the current run of the effect.\n while (this.cleanupFns.length) {\n this.cleanupFns.pop()!();\n }\n } finally {\n this.cleanupFns = [];\n }\n },\n }))();\n\nexport const ROOT_EFFECT_NODE: Omit<RootEffectNode, 'fn' | 'scheduler' | 'notifier' | 'injector'> =\n /* @__PURE__ */ (() => ({\n ...BASE_EFFECT_NODE,\n consumerMarkedDirty(this: RootEffectNode) {\n this.scheduler.schedule(this);\n this.notifier.notify(NotificationSource.RootEffect);\n },\n destroy(this: RootEffectNode) {\n consumerDestroy(this);\n this.onDestroyFn();\n this.maybeCleanup();\n this.scheduler.remove(this);\n },\n }))();\n\nexport const VIEW_EFFECT_NODE: Omit<ViewEffectNode, 'fn' | 'view' | 'injector' | 'notifier'> =\n /* @__PURE__ */ (() => ({\n ...BASE_EFFECT_NODE,\n consumerMarkedDirty(this: ViewEffectNode): void {\n this.view[FLAGS] |= LViewFlags.HasChildViewsToRefresh;\n markAncestorsForTraversal(this.view);\n this.notifier.notify(NotificationSource.ViewEffect);\n },\n destroy(this: ViewEffectNode): void {\n consumerDestroy(this);\n this.onDestroyFn();\n this.maybeCleanup();\n this.view[EFFECTS]?.delete(this);\n },\n }))();\n\nexport function createViewEffect(\n view: LView,\n notifier: ChangeDetectionScheduler,\n fn: (onCleanup: EffectCleanupRegisterFn) => void,\n): ViewEffectNode {\n const node = Object.create(VIEW_EFFECT_NODE) as ViewEffectNode;\n node.view = view;\n node.zone = typeof Zone !== 'undefined' ? Zone.current : null;\n node.notifier = notifier;\n node.fn = fn;\n\n view[EFFECTS] ??= new Set();\n view[EFFECTS].add(node);\n\n node.consumerMarkedDirty(node);\n return node;\n}\n\nexport function createRootEffect(\n fn: (onCleanup: EffectCleanupRegisterFn) => void,\n scheduler: EffectScheduler,\n notifier: ChangeDetectionScheduler,\n): RootEffectNode {\n const node = Object.create(ROOT_EFFECT_NODE) as RootEffectNode;\n node.fn = fn;\n node.scheduler = scheduler;\n node.notifier = notifier;\n node.zone = typeof Zone !== 'undefined' ? Zone.current : null;\n node.scheduler.schedule(node);\n node.notifier.notify(NotificationSource.RootEffect);\n return node;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Injector} from '../di/injector';\nimport {Signal, ValueEqualityFn} from '../render3/reactivity/api';\nimport {WritableSignal} from '../render3/reactivity/signal';\n\n/**\n * Status of a `Resource`.\n *\n * @experimental\n */\nexport enum ResourceStatus {\n /**\n * The resource has no valid request and will not perform any loading.\n *\n * `value()` will be `undefined`.\n */\n Idle,\n\n /**\n * Loading failed with an error.\n *\n * `value()` will be `undefined`.\n */\n Error,\n\n /**\n * The resource is currently loading a new value as a result of a change in its `request`.\n *\n * `value()` will be `undefined`.\n */\n Loading,\n\n /**\n * The resource is currently reloading a fresh value for the same request.\n *\n * `value()` will continue to return the previously fetched value during the reloading operation.\n */\n Reloading,\n\n /**\n * Loading has completed and the resource has the value returned from the loader.\n */\n Resolved,\n\n /**\n * The resource's value was set locally via `.set()` or `.update()`.\n */\n Local,\n}\n\n/**\n * A Resource is an asynchronous dependency (for example, the results of an API call) that is\n * managed and delivered through signals.\n *\n * The usual way of creating a `Resource` is through the `resource` function, but various other APIs\n * may present `Resource` instances to describe their own concepts.\n *\n * @experimental\n */\nexport interface Resource<T> {\n /**\n * The current value of the `Resource`, or `undefined` if there is no current value.\n */\n readonly value: Signal<T>;\n\n /**\n * The current status of the `Resource`, which describes what the resource is currently doing and\n * what can be expected of its `value`.\n */\n readonly status: Signal<ResourceStatus>;\n\n /**\n * When in the `error` state, this returns the last known error from the `Resource`.\n */\n readonly error: Signal<unknown>;\n\n /**\n * Whether this resource is loading a new value (or reloading the existing one).\n */\n readonly isLoading: Signal<boolean>;\n\n /**\n * Whether this resource has a valid current value.\n *\n * This function is reactive.\n */\n hasValue(): this is Resource<Exclude<T, undefined>>;\n\n /**\n * Instructs the resource to re-load any asynchronous dependency it may have.\n *\n * Note that the resource will not enter its reloading state until the actual backend request is\n * made.\n *\n * @returns true if a reload was initiated, false if a reload was unnecessary or unsupported\n */\n reload(): boolean;\n}\n\n/**\n * A `Resource` with a mutable value.\n *\n * Overwriting the value of a resource sets it to the 'local' state.\n *\n * @experimental\n */\nexport interface WritableResource<T> extends Resource<T> {\n readonly value: WritableSignal<T>;\n hasValue(): this is WritableResource<Exclude<T, undefined>>;\n\n /**\n * Convenience wrapper for `value.set`.\n */\n set(value: T): void;\n\n /**\n * Convenience wrapper for `value.update`.\n */\n update(updater: (value: T) => T): void;\n asReadonly(): Resource<T>;\n}\n\n/**\n * A `WritableResource` created through the `resource` function.\n *\n * @experimental\n */\nexport interface ResourceRef<T> extends WritableResource<T> {\n hasValue(): this is ResourceRef<Exclude<T, undefined>>;\n\n /**\n * Manually destroy the resource, which cancels pending requests and returns it to `idle` state.\n */\n destroy(): void;\n}\n\n/**\n * Parameter to a `ResourceLoader` which gives the request and other options for the current loading\n * operation.\n *\n * @experimental\n */\nexport interface ResourceLoaderParams<R> {\n request: Exclude<NoInfer<R>, undefined>;\n abortSignal: AbortSignal;\n previous: {\n status: ResourceStatus;\n };\n}\n\n/**\n * Loading function for a `Resource`.\n *\n * @experimental\n */\nexport type ResourceLoader<T, R> = (param: ResourceLoaderParams<R>) => PromiseLike<T>;\n\n/**\n * Streaming loader for a `Resource`.\n *\n * @experimental\n */\nexport type ResourceStreamingLoader<T, R> = (\n param: ResourceLoaderParams<R>,\n) => PromiseLike<Signal<ResourceStreamItem<T>>>;\n\n/**\n * Options to the `resource` function, for creating a resource.\n *\n * @experimental\n */\nexport interface BaseResourceOptions<T, R> {\n /**\n * A reactive function which determines the request to be made. Whenever the request changes, the\n * loader will be triggered to fetch a new value for the resource.\n *\n * If a request function isn't provided, the loader won't rerun unless the resource is reloaded.\n */\n request?: () => R;\n\n /**\n * The value which will be returned from the resource when a server value is unavailable, such as\n * when the resource is still loading, or in an error state.\n */\n defaultValue?: NoInfer<T>;\n\n /**\n * Equality function used to compare the return value of the loader.\n */\n equal?: ValueEqualityFn<T>;\n\n /**\n * Overrides the `Injector` used by `resource`.\n */\n injector?: Injector;\n}\n\n/**\n * Options to the `resource` function, for creating a resource.\n *\n * @experimental\n */\nexport interface PromiseResourceOptions<T, R> extends BaseResourceOptions<T, R> {\n /**\n * Loading function which returns a `Promise` of the resource's value for a given request.\n */\n loader: ResourceLoader<T, R>;\n\n /**\n * Cannot specify `stream` and `loader` at the same time.\n */\n stream?: never;\n}\n\n/**\n * Options to the `resource` function, for creating a resource.\n *\n * @experimental\n */\nexport interface StreamingResourceOptions<T, R> extends BaseResourceOptions<T, R> {\n /**\n * Loading function which returns a `Promise` of a signal of the resource's value for a given\n * request, which can change over time as new values are received from a stream.\n */\n stream: ResourceStreamingLoader<T, R>;\n\n /**\n * Cannot specify `stream` and `loader` at the same time.\n */\n loader?: never;\n}\n\n/**\n * @experimental\n */\nexport type ResourceOptions<T, R> = PromiseResourceOptions<T, R> | StreamingResourceOptions<T, R>;\n\n/**\n * @experimental\n */\nexport type ResourceStreamItem<T> = {value: T} | {error: unknown};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n ComputationFn,\n createLinkedSignal,\n LinkedSignalGetter,\n LinkedSignalNode,\n linkedSignalSetFn,\n linkedSignalUpdateFn,\n SIGNAL,\n} from '../../../primitives/signals';\nimport {Signal, ValueEqualityFn} from './api';\nimport {signalAsReadonlyFn, WritableSignal} from './signal';\n\nconst identityFn = <T>(v: T) => v;\n\n/**\n * Creates a writable signal whose value is initialized and reset by the linked, reactive computation.\n *\n * @developerPreview\n */\nexport function linkedSignal<D>(\n computation: () => D,\n options?: {equal?: ValueEqualityFn<NoInfer<D>>},\n): WritableSignal<D>;\n\n/**\n * Creates a writable signal whose value is initialized and reset by the linked, reactive computation.\n * This is an advanced API form where the computation has access to the previous value of the signal and the computation result.\n *\n * Note: The computation is reactive, meaning the linked signal will automatically update whenever any of the signals used within the computation change.\n *\n * @developerPreview\n */\nexport function linkedSignal<S, D>(options: {\n source: () => S;\n computation: (source: NoInfer<S>, previous?: {source: NoInfer<S>; value: NoInfer<D>}) => D;\n equal?: ValueEqualityFn<NoInfer<D>>;\n}): WritableSignal<D>;\n\nexport function linkedSignal<S, D>(\n optionsOrComputation:\n | {\n source: () => S;\n computation: ComputationFn<S, D>;\n equal?: ValueEqualityFn<D>;\n }\n | (() => D),\n options?: {equal?: ValueEqualityFn<D>},\n): WritableSignal<D> {\n if (typeof optionsOrComputation === 'function') {\n const getter = createLinkedSignal<D, D>(\n optionsOrComputation,\n identityFn<D>,\n options?.equal,\n ) as LinkedSignalGetter<D, D> & WritableSignal<D>;\n return upgradeLinkedSignalGetter(getter);\n } else {\n const getter = createLinkedSignal<S, D>(\n optionsOrComputation.source,\n optionsOrComputation.computation,\n optionsOrComputation.equal,\n );\n return upgradeLinkedSignalGetter(getter);\n }\n}\n\nfunction upgradeLinkedSignalGetter<S, D>(getter: LinkedSignalGetter<S, D>): WritableSignal<D> {\n if (ngDevMode) {\n getter.toString = () => `[LinkedSignal: ${getter()}]`;\n }\n\n const node = getter[SIGNAL] as LinkedSignalNode<S, D>;\n const upgradedGetter = getter as LinkedSignalGetter<S, D> & WritableSignal<D>;\n\n upgradedGetter.set = (newValue: D) => linkedSignalSetFn(node, newValue);\n upgradedGetter.update = (updateFn: (value: D) => D) => linkedSignalUpdateFn(node, updateFn);\n upgradedGetter.asReadonly = signalAsReadonlyFn.bind(getter as any) as () => Signal<D>;\n\n return upgradedGetter;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {untracked} from '../render3/reactivity/untracked';\nimport {computed} from '../render3/reactivity/computed';\nimport {signal, signalAsReadonlyFn, WritableSignal} from '../render3/reactivity/signal';\nimport {Signal} from '../render3/reactivity/api';\nimport {effect, EffectRef} from '../render3/reactivity/effect';\nimport {\n ResourceOptions,\n ResourceStatus,\n WritableResource,\n Resource,\n ResourceRef,\n ResourceStreamingLoader,\n StreamingResourceOptions,\n ResourceStreamItem,\n} from './api';\n\nimport {ValueEqualityFn} from '../../primitives/signals';\n\nimport {Injector} from '../di/injector';\nimport {assertInInjectionContext} from '../di/contextual';\nimport {inject} from '../di/injector_compatibility';\nimport {PendingTasks} from '../pending_tasks';\nimport {linkedSignal} from '../render3/reactivity/linked_signal';\nimport {DestroyRef} from '../linker/destroy_ref';\n\n/**\n * Constructs a `Resource` that projects a reactive request to an asynchronous operation defined by\n * a loader function, which exposes the result of the loading operation via signals.\n *\n * Note that `resource` is intended for _read_ operations, not operations which perform mutations.\n * `resource` will cancel in-progress loads via the `AbortSignal` when destroyed or when a new\n * request object becomes available, which could prematurely abort mutations.\n *\n * @experimental\n */\nexport function resource<T, R>(\n options: ResourceOptions<T, R> & {defaultValue: NoInfer<T>},\n): ResourceRef<T>;\n\n/**\n * Constructs a `Resource` that projects a reactive request to an asynchronous operation defined by\n * a loader function, which exposes the result of the loading operation via signals.\n *\n * Note that `resource` is intended for _read_ operations, not operations which perform mutations.\n * `resource` will cancel in-progress loads via the `AbortSignal` when destroyed or when a new\n * request object becomes available, which could prematurely abort mutations.\n *\n * @experimental\n */\nexport function resource<T, R>(options: ResourceOptions<T, R>): ResourceRef<T | undefined>;\nexport function resource<T, R>(options: ResourceOptions<T, R>): ResourceRef<T | undefined> {\n options?.injector || assertInInjectionContext(resource);\n const request = (options.request ?? (() => null)) as () => R;\n return new ResourceImpl<T | undefined, R>(\n request,\n getLoader(options),\n options.defaultValue,\n options.equal ? wrapEqualityFn(options.equal) : undefined,\n options.injector ?? inject(Injector),\n );\n}\n\ntype ResourceInternalStatus =\n | ResourceStatus.Idle\n | ResourceStatus.Loading\n | ResourceStatus.Resolved\n | ResourceStatus.Local;\n\n/**\n * Internal state of a resource.\n */\ninterface ResourceProtoState<T> {\n extRequest: WrappedRequest;\n\n // For simplicity, status is internally tracked as a subset of the public status enum.\n // Reloading and Error statuses are projected from Loading and Resolved based on other state.\n status: ResourceInternalStatus;\n}\n\ninterface ResourceState<T> extends ResourceProtoState<T> {\n previousStatus: ResourceStatus;\n stream: Signal<ResourceStreamItem<T>> | undefined;\n}\n\ntype WrappedRequest = {request: unknown; reload: number};\n\n/**\n * Base class which implements `.value` as a `WritableSignal` by delegating `.set` and `.update`.\n */\nabstract class BaseWritableResource<T> implements WritableResource<T> {\n readonly value: WritableSignal<T>;\n abstract readonly status: Signal<ResourceStatus>;\n abstract readonly error: Signal<unknown>;\n abstract reload(): boolean;\n\n constructor(value: Signal<T>) {\n this.value = value as WritableSignal<T>;\n this.value.set = this.set.bind(this);\n this.value.update = this.update.bind(this);\n this.value.asReadonly = signalAsReadonlyFn;\n }\n\n abstract set(value: T): void;\n\n update(updateFn: (value: T) => T): void {\n this.set(updateFn(untracked(this.value)));\n }\n\n readonly isLoading = computed(\n () => this.status() === ResourceStatus.Loading || this.status() === ResourceStatus.Reloading,\n );\n\n hasValue(): this is ResourceRef<Exclude<T, undefined>> {\n return this.value() !== undefined;\n }\n\n asReadonly(): Resource<T> {\n return this;\n }\n}\n\n/**\n * Implementation for `resource()` which uses a `linkedSignal` to manage the resource's state.\n */\nexport class ResourceImpl<T, R> extends BaseWritableResource<T> implements ResourceRef<T> {\n private readonly pendingTasks: PendingTasks;\n\n /**\n * The current state of the resource. Status, value, and error are derived from this.\n */\n private readonly state: WritableSignal<ResourceState<T>>;\n\n /**\n * Combines the current request with a reload counter which allows the resource to be reloaded on\n * imperative command.\n */\n protected readonly extRequest: WritableSignal<WrappedRequest>;\n private readonly effectRef: EffectRef;\n\n private pendingController: AbortController | undefined;\n private resolvePendingTask: (() => void) | undefined = undefined;\n private destroyed = false;\n\n constructor(\n request: () => R,\n private readonly loaderFn: ResourceStreamingLoader<T, R>,\n private readonly defaultValue: T,\n private readonly equal: ValueEqualityFn<T> | undefined,\n injector: Injector,\n ) {\n super(\n // Feed a computed signal for the value to `BaseWritableResource`, which will upgrade it to a\n // `WritableSignal` that delegates to `ResourceImpl.set`.\n computed(\n () => {\n const streamValue = this.state().stream?.();\n return streamValue && isResolved(streamValue) ? streamValue.value : this.defaultValue;\n },\n {equal},\n ),\n );\n\n // Extend `request()` to include a writable reload signal.\n this.extRequest = linkedSignal({\n source: request,\n computation: (request) => ({request, reload: 0}),\n });\n\n // The main resource state is managed in a `linkedSignal`, which allows the resource to change\n // state instantaneously when the request signal changes.\n this.state = linkedSignal<WrappedRequest, ResourceState<T>>({\n // Whenever the request changes,\n source: this.extRequest,\n // Compute the state of the resource given a change in status.\n computation: (extRequest, previous) => {\n const status =\n extRequest.request === undefined ? ResourceStatus.Idle : ResourceStatus.Loading;\n if (!previous) {\n return {\n extRequest,\n status,\n previousStatus: ResourceStatus.Idle,\n stream: undefined,\n };\n } else {\n return {\n extRequest,\n status,\n previousStatus: projectStatusOfState(previous.value),\n // If the request hasn't changed, keep the previous stream.\n stream:\n previous.value.extRequest.request === extRequest.request\n ? previous.value.stream\n : undefined,\n };\n }\n },\n });\n\n this.effectRef = effect(this.loadEffect.bind(this), {\n injector,\n manualCleanup: true,\n });\n\n this.pendingTasks = injector.get(PendingTasks);\n\n // Cancel any pending request when the resource itself is destroyed.\n injector.get(DestroyRef).onDestroy(() => this.destroy());\n }\n\n override readonly status = computed(() => projectStatusOfState(this.state()));\n\n override readonly error = computed(() => {\n const stream = this.state().stream?.();\n return stream && !isResolved(stream) ? stream.error : undefined;\n });\n\n /**\n * Called either directly via `WritableResource.set` or via `.value.set()`.\n */\n override set(value: T): void {\n if (this.destroyed) {\n return;\n }\n\n const current = untracked(this.value);\n const state = untracked(this.state);\n\n if (\n state.status === ResourceStatus.Local &&\n (this.equal ? this.equal(current, value) : current === value)\n ) {\n return;\n }\n\n // Enter Local state with the user-defined value.\n this.state.set({\n extRequest: state.extRequest,\n status: ResourceStatus.Local,\n previousStatus: ResourceStatus.Local,\n stream: signal({value}),\n });\n\n // We're departing from whatever state the resource was in previously, so cancel any in-progress\n // loading operations.\n this.abortInProgressLoad();\n }\n\n override reload(): boolean {\n // We don't want to restart in-progress loads.\n const {status} = untracked(this.state);\n if (status === ResourceStatus.Idle || status === ResourceStatus.Loading) {\n return false;\n }\n\n // Increment the request reload to trigger the `state` linked signal to switch us to `Reload`\n this.extRequest.update(({request, reload}) => ({request, reload: reload + 1}));\n return true;\n }\n\n destroy(): void {\n this.destroyed = true;\n this.effectRef.destroy();\n this.abortInProgressLoad();\n\n // Destroyed resources enter Idle state.\n this.state.set({\n extRequest: {request: undefined, reload: 0},\n status: ResourceStatus.Idle,\n previousStatus: ResourceStatus.Idle,\n stream: undefined,\n });\n }\n\n private async loadEffect(): Promise<void> {\n const extRequest = this.extRequest();\n\n // Capture the previous status before any state transitions. Note that this is `untracked` since\n // we do not want the effect to depend on the state of the resource, only on the request.\n const {status: currentStatus, previousStatus} = untracked(this.state);\n\n if (extRequest.request === undefined) {\n // Nothing to load (and we should already be in a non-loading state).\n return;\n } else if (currentStatus !== ResourceStatus.Loading) {\n // We're not in a loading or reloading state, so this loading request is stale.\n return;\n }\n\n // Cancel any previous loading attempts.\n this.abortInProgressLoad();\n\n // Capturing _this_ load's pending task in a local variable is important here. We may attempt to\n // resolve it twice:\n //\n // 1. when the loading function promise resolves/rejects\n // 2. when cancelling the loading operation\n //\n // After the loading operation is cancelled, `this.resolvePendingTask` no longer represents this\n // particular task, but this `await` may eventually resolve/reject. Thus, when we cancel in\n // response to (1) below, we need to cancel the locally saved task.\n let resolvePendingTask: (() => void) | undefined = (this.resolvePendingTask =\n this.pendingTasks.add());\n\n const {signal: abortSignal} = (this.pendingController = new AbortController());\n\n try {\n // The actual loading is run through `untracked` - only the request side of `resource` is\n // reactive. This avoids any confusion with signals tracking or not tracking depending on\n // which side of the `await` they are.\n const stream = await untracked(() => {\n return this.loaderFn({\n request: extRequest.request as Exclude<R, undefined>,\n abortSignal,\n previous: {\n status: previousStatus,\n },\n });\n });\n\n // If this request has been aborted, or the current request no longer\n // matches this load, then we should ignore this resolution.\n if (abortSignal.aborted || untracked(this.extRequest) !== extRequest) {\n return;\n }\n\n this.state.set({\n extRequest,\n status: ResourceStatus.Resolved,\n previousStatus: ResourceStatus.Resolved,\n stream,\n });\n } catch (err) {\n if (abortSignal.aborted || untracked(this.extRequest) !== extRequest) {\n return;\n }\n\n this.state.set({\n extRequest,\n status: ResourceStatus.Resolved,\n previousStatus: ResourceStatus.Error,\n stream: signal({error: err}),\n });\n } finally {\n // Resolve the pending task now that the resource has a value.\n resolvePendingTask?.();\n resolvePendingTask = undefined;\n }\n }\n\n private abortInProgressLoad(): void {\n untracked(() => this.pendingController?.abort());\n this.pendingController = undefined;\n\n // Once the load is aborted, we no longer want to block stability on its resolution.\n this.resolvePendingTask?.();\n this.resolvePendingTask = undefined;\n }\n}\n\n/**\n * Wraps an equality function to handle either value being `undefined`.\n */\nfunction wrapEqualityFn<T>(equal: ValueEqualityFn<T>): ValueEqualityFn<T | undefined> {\n return (a, b) => (a === undefined || b === undefined ? a === b : equal(a, b));\n}\n\nfunction getLoader<T, R>(options: ResourceOptions<T, R>): ResourceStreamingLoader<T, R> {\n if (isStreamingResourceOptions(options)) {\n return options.stream;\n }\n\n return async (params) => {\n try {\n return signal({value: await options.loader(params)});\n } catch (err) {\n return signal({error: err});\n }\n };\n}\n\nfunction isStreamingResourceOptions<T, R>(\n options: ResourceOptions<T, R>,\n): options is StreamingResourceOptions<T, R> {\n return !!(options as StreamingResourceOptions<T, R>).stream;\n}\n\n/**\n * Project from a state with `ResourceInternalStatus` to the user-facing `ResourceStatus`\n */\nfunction projectStatusOfState(state: ResourceState<unknown>): ResourceStatus {\n switch (state.status) {\n case ResourceStatus.Loading:\n return state.extRequest.reload === 0 ? ResourceStatus.Loading : ResourceStatus.Reloading;\n case ResourceStatus.Resolved:\n return isResolved(untracked(state.stream!)) ? ResourceStatus.Resolved : ResourceStatus.Error;\n default:\n return state.status;\n }\n}\n\nfunction isResolved<T>(state: ResourceStreamItem<T>): state is {value: T} {\n return (state as {error: unknown}).error === undefined;\n}\n","/*!\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ComponentDef} from '../render3';\nimport {readPatchedLView} from '../render3/context_discovery';\nimport {isComponentHost, isLContainer, isLView} from '../render3/interfaces/type_checks';\nimport {HEADER_OFFSET, HOST, TVIEW} from '../render3/interfaces/view';\nimport {getTNode} from '../render3/util/view_utils';\n\n/**\n * Gets the class name of the closest component to a node.\n * Warning! this function will return minified names if the name of the component is minified. The\n * consumer of the function is responsible for resolving the minified name to its original name.\n * @param node Node from which to start the search.\n */\nexport function getClosestComponentName(node: Node): string | null {\n let currentNode = node as Node | null;\n\n while (currentNode) {\n const lView = readPatchedLView(currentNode);\n\n if (lView !== null) {\n for (let i = HEADER_OFFSET; i < lView.length; i++) {\n const current = lView[i];\n\n if ((!isLView(current) && !isLContainer(current)) || current[HOST] !== currentNode) {\n continue;\n }\n\n const tView = lView[TVIEW];\n const tNode = getTNode(tView, i);\n if (isComponentHost(tNode)) {\n const def = tView.data[tNode.directiveStart + tNode.componentOffset] as ComponentDef<{}>;\n const name = def.debugInfo?.className || def.type.name;\n\n // Note: the name may be an empty string if the class name is\n // dropped due to minification. In such cases keep going up the tree.\n if (name) {\n return name;\n } else {\n break;\n }\n }\n }\n }\n\n currentNode = currentNode.parentNode;\n }\n\n return null;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n FactoryTarget,\n getCompilerFacade,\n JitCompilerUsage,\n R3DeclareComponentFacade,\n R3DeclareDirectiveFacade,\n R3DeclareFactoryFacade,\n R3DeclareInjectableFacade,\n R3DeclareInjectorFacade,\n R3DeclareNgModuleFacade,\n R3DeclarePipeFacade,\n} from '../../compiler/compiler_facade';\nimport {Type} from '../../interface/type';\nimport {setClassMetadata, setClassMetadataAsync} from '../metadata';\n\nimport {angularCoreEnv} from './environment';\n\n/**\n * Compiles a partial directive declaration object into a full directive definition object.\n *\n * @codeGenApi\n */\nexport function ɵɵngDeclareDirective(decl: R3DeclareDirectiveFacade): unknown {\n const compiler = getCompilerFacade({\n usage: JitCompilerUsage.PartialDeclaration,\n kind: 'directive',\n type: decl.type,\n });\n return compiler.compileDirectiveDeclaration(\n angularCoreEnv,\n `ng:///${decl.type.name}/ɵfac.js`,\n decl,\n );\n}\n\n/**\n * Evaluates the class metadata declaration.\n *\n * @codeGenApi\n */\nexport function ɵɵngDeclareClassMetadata(decl: {\n type: Type<any>;\n decorators: any[];\n ctorParameters?: () => any[];\n propDecorators?: {[field: string]: any};\n}): void {\n setClassMetadata(\n decl.type,\n decl.decorators,\n decl.ctorParameters ?? null,\n decl.propDecorators ?? null,\n );\n}\n\n/**\n * Evaluates the class metadata of a component that contains deferred blocks.\n *\n * @codeGenApi\n */\nexport function ɵɵngDeclareClassMetadataAsync(decl: {\n type: Type<any>;\n resolveDeferredDeps: () => Promise<Type<unknown>>[];\n resolveMetadata: (...types: Type<unknown>[]) => {\n decorators: any[];\n ctorParameters: (() => any[]) | null;\n propDecorators: {[field: string]: any} | null;\n };\n}): void {\n setClassMetadataAsync(decl.type, decl.resolveDeferredDeps, (...types: Type<unknown>[]) => {\n const meta = decl.resolveMetadata(...types);\n setClassMetadata(decl.type, meta.decorators, meta.ctorParameters, meta.propDecorators);\n });\n}\n\n/**\n * Compiles a partial component declaration object into a full component definition object.\n *\n * @codeGenApi\n */\nexport function ɵɵngDeclareComponent(decl: R3DeclareComponentFacade): unknown {\n const compiler = getCompilerFacade({\n usage: JitCompilerUsage.PartialDeclaration,\n kind: 'component',\n type: decl.type,\n });\n return compiler.compileComponentDeclaration(\n angularCoreEnv,\n `ng:///${decl.type.name}/ɵcmp.js`,\n decl,\n );\n}\n\n/**\n * Compiles a partial pipe declaration object into a full pipe definition object.\n *\n * @codeGenApi\n */\nexport function ɵɵngDeclareFactory(decl: R3DeclareFactoryFacade): unknown {\n const compiler = getCompilerFacade({\n usage: JitCompilerUsage.PartialDeclaration,\n kind: getFactoryKind(decl.target),\n type: decl.type,\n });\n return compiler.compileFactoryDeclaration(\n angularCoreEnv,\n `ng:///${decl.type.name}/ɵfac.js`,\n decl,\n );\n}\n\nfunction getFactoryKind(target: FactoryTarget) {\n switch (target) {\n case FactoryTarget.Directive:\n return 'directive';\n case FactoryTarget.Component:\n return 'component';\n case FactoryTarget.Injectable:\n return 'injectable';\n case FactoryTarget.Pipe:\n return 'pipe';\n case FactoryTarget.NgModule:\n return 'NgModule';\n }\n}\n\n/**\n * Compiles a partial injectable declaration object into a full injectable definition object.\n *\n * @codeGenApi\n */\nexport function ɵɵngDeclareInjectable(decl: R3DeclareInjectableFacade): unknown {\n const compiler = getCompilerFacade({\n usage: JitCompilerUsage.PartialDeclaration,\n kind: 'injectable',\n type: decl.type,\n });\n return compiler.compileInjectableDeclaration(\n angularCoreEnv,\n `ng:///${decl.type.name}/ɵprov.js`,\n decl,\n );\n}\n\n/**\n * These enums are used in the partial factory declaration calls.\n */\nexport {FactoryTarget} from '../../compiler/compiler_facade';\n\n/**\n * Compiles a partial injector declaration object into a full injector definition object.\n *\n * @codeGenApi\n */\nexport function ɵɵngDeclareInjector(decl: R3DeclareInjectorFacade): unknown {\n const compiler = getCompilerFacade({\n usage: JitCompilerUsage.PartialDeclaration,\n kind: 'NgModule',\n type: decl.type,\n });\n return compiler.compileInjectorDeclaration(\n angularCoreEnv,\n `ng:///${decl.type.name}/ɵinj.js`,\n decl,\n );\n}\n\n/**\n * Compiles a partial NgModule declaration object into a full NgModule definition object.\n *\n * @codeGenApi\n */\nexport function ɵɵngDeclareNgModule(decl: R3DeclareNgModuleFacade): unknown {\n const compiler = getCompilerFacade({\n usage: JitCompilerUsage.PartialDeclaration,\n kind: 'NgModule',\n type: decl.type,\n });\n return compiler.compileNgModuleDeclaration(\n angularCoreEnv,\n `ng:///${decl.type.name}/ɵmod.js`,\n decl,\n );\n}\n\n/**\n * Compiles a partial pipe declaration object into a full pipe definition object.\n *\n * @codeGenApi\n */\nexport function ɵɵngDeclarePipe(decl: R3DeclarePipeFacade): unknown {\n const compiler = getCompilerFacade({\n usage: JitCompilerUsage.PartialDeclaration,\n kind: 'pipe',\n type: decl.type,\n });\n return compiler.compilePipeDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵpipe.js`, decl);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n consumerAfterComputation,\n consumerBeforeComputation,\n consumerPollProducersForChange,\n producerAccessed,\n SIGNAL,\n SIGNAL_NODE,\n type SignalNode,\n} from '../../../primitives/signals';\n\nimport {type Signal} from '../reactivity/api';\nimport {type EffectCleanupFn, type EffectCleanupRegisterFn} from './effect';\n\nimport {TracingService, TracingSnapshot} from '../../application/tracing';\nimport {\n ChangeDetectionScheduler,\n NotificationSource,\n} from '../../change_detection/scheduling/zoneless_scheduling';\nimport {assertInInjectionContext} from '../../di/contextual';\nimport {Injector} from '../../di/injector';\nimport {inject} from '../../di/injector_compatibility';\nimport {DestroyRef} from '../../linker/destroy_ref';\nimport {AfterRenderPhase, type AfterRenderRef} from '../after_render/api';\nimport {NOOP_AFTER_RENDER_REF, type AfterRenderOptions} from '../after_render/hooks';\nimport {\n AFTER_RENDER_PHASES,\n AfterRenderImpl,\n AfterRenderManager,\n AfterRenderSequence,\n} from '../after_render/manager';\nimport {LView} from '../interfaces/view';\nimport {ViewContext} from '../view_context';\nimport {assertNotInReactiveContext} from './asserts';\n\nconst NOT_SET = /* @__PURE__ */ Symbol('NOT_SET');\nconst EMPTY_CLEANUP_SET = /* @__PURE__ */ new Set<() => void>();\n\n/** Callback type for an `afterRenderEffect` phase effect */\ntype AfterRenderPhaseEffectHook = (\n // Either a cleanup function or a pipelined value and a cleanup function\n ...args:\n | [onCleanup: EffectCleanupRegisterFn]\n | [previousPhaseValue: unknown, onCleanup: EffectCleanupRegisterFn]\n) => unknown;\n\n/**\n * Reactive node in the graph for this `afterRenderEffect` phase effect.\n *\n * This node type extends `SignalNode` because `afterRenderEffect` phases effects produce a value\n * which is consumed as a `Signal` by subsequent phases.\n */\ninterface AfterRenderPhaseEffectNode extends SignalNode<unknown> {\n /** The phase of the effect implemented by this node */\n phase: AfterRenderPhase;\n /** The sequence of phases to which this node belongs, used for state of the whole sequence */\n sequence: AfterRenderEffectSequence;\n /** The user's callback function */\n userFn: AfterRenderPhaseEffectHook;\n /** Signal function that retrieves the value of this node, used as the value for the next phase */\n signal: Signal<unknown>;\n /** Registered cleanup functions, or `null` if none have ever been registered */\n cleanup: Set<() => void> | null;\n /** Pre-bound helper function passed to the user's callback which writes to `this.cleanup` */\n registerCleanupFn: EffectCleanupRegisterFn;\n /** Entrypoint to running this effect that's given to the `afterRender` machinery */\n phaseFn(previousValue?: unknown): unknown;\n}\n\nconst AFTER_RENDER_PHASE_EFFECT_NODE = /* @__PURE__ */ (() => ({\n ...SIGNAL_NODE,\n consumerIsAlwaysLive: true,\n consumerAllowSignalWrites: true,\n value: NOT_SET,\n cleanup: null,\n /** Called when the effect becomes dirty */\n consumerMarkedDirty(this: AfterRenderPhaseEffectNode): void {\n if (this.sequence.impl.executing) {\n // If hooks are in the middle of executing, then it matters whether this node has yet been\n // executed within its sequence. If not, then we don't want to notify the scheduler since\n // this node will be reached naturally.\n if (this.sequence.lastPhase === null || this.sequence.lastPhase < this.phase) {\n return;\n }\n\n // If during the execution of a later phase an earlier phase became dirty, then we should not\n // run any further phases until the earlier one reruns.\n this.sequence.erroredOrDestroyed = true;\n }\n\n // Either hooks are not running, or we're marking a node dirty that has already run within its\n // sequence.\n this.sequence.scheduler.notify(NotificationSource.RenderHook);\n },\n phaseFn(this: AfterRenderPhaseEffectNode, previousValue?: unknown): unknown {\n this.sequence.lastPhase = this.phase;\n\n if (!this.dirty) {\n return this.signal;\n }\n\n this.dirty = false;\n if (this.value !== NOT_SET && !consumerPollProducersForChange(this)) {\n // None of our producers report a change since the last time they were read, so no\n // recomputation of our value is necessary.\n return this.signal;\n }\n\n // Run any needed cleanup functions.\n try {\n for (const cleanupFn of this.cleanup ?? EMPTY_CLEANUP_SET) {\n cleanupFn();\n }\n } finally {\n // Even if a cleanup function errors, ensure it's cleared.\n this.cleanup?.clear();\n }\n\n // Prepare to call the user's effect callback. If there was a previous phase, then it gave us\n // its value as a `Signal`, otherwise `previousValue` will be `undefined`.\n const args: unknown[] = [];\n if (previousValue !== undefined) {\n args.push(previousValue);\n }\n args.push(this.registerCleanupFn);\n\n // Call the user's callback in our reactive context.\n const prevConsumer = consumerBeforeComputation(this);\n let newValue;\n try {\n newValue = this.userFn.apply(null, args as any);\n } finally {\n consumerAfterComputation(this, prevConsumer);\n }\n\n if (this.value === NOT_SET || !this.equal(this.value, newValue)) {\n this.value = newValue;\n this.version++;\n }\n\n return this.signal;\n },\n}))();\n\n/**\n * An `AfterRenderSequence` that manages an `afterRenderEffect`'s phase effects.\n */\nclass AfterRenderEffectSequence extends AfterRenderSequence {\n /**\n * While this sequence is executing, this tracks the last phase which was called by the\n * `afterRender` machinery.\n *\n * When a phase effect is marked dirty, this is used to determine whether it's already run or not.\n */\n lastPhase: AfterRenderPhase | null = null;\n\n /**\n * The reactive nodes for each phase, if a phase effect is defined for that phase.\n *\n * These are initialized to `undefined` but set in the constructor.\n */\n private readonly nodes: [\n AfterRenderPhaseEffectNode | undefined,\n AfterRenderPhaseEffectNode | undefined,\n AfterRenderPhaseEffectNode | undefined,\n AfterRenderPhaseEffectNode | undefined,\n ] = [undefined, undefined, undefined, undefined];\n\n constructor(\n impl: AfterRenderImpl,\n effectHooks: Array<AfterRenderPhaseEffectHook | undefined>,\n view: LView | undefined,\n readonly scheduler: ChangeDetectionScheduler,\n destroyRef: DestroyRef,\n snapshot: TracingSnapshot | null = null,\n ) {\n // Note that we also initialize the underlying `AfterRenderSequence` hooks to `undefined` and\n // populate them as we create reactive nodes below.\n super(impl, [undefined, undefined, undefined, undefined], view, false, destroyRef, snapshot);\n\n // Setup a reactive node for each phase.\n for (const phase of AFTER_RENDER_PHASES) {\n const effectHook = effectHooks[phase];\n if (effectHook === undefined) {\n continue;\n }\n\n const node = Object.create(AFTER_RENDER_PHASE_EFFECT_NODE) as AfterRenderPhaseEffectNode;\n node.sequence = this;\n node.phase = phase;\n node.userFn = effectHook;\n node.dirty = true;\n node.signal = (() => {\n producerAccessed(node);\n return node.value;\n }) as Signal<unknown>;\n node.signal[SIGNAL] = node;\n node.registerCleanupFn = (fn: EffectCleanupFn) =>\n (node.cleanup ??= new Set<() => void>()).add(fn);\n\n this.nodes[phase] = node;\n\n // Install the upstream hook which runs the `phaseFn` for this phase.\n this.hooks[phase] = (value) => node.phaseFn(value);\n }\n }\n\n override afterRun(): void {\n super.afterRun();\n // We're done running this sequence, so reset `lastPhase`.\n this.lastPhase = null;\n }\n\n override destroy(): void {\n super.destroy();\n\n // Run the cleanup functions for each node.\n for (const node of this.nodes) {\n for (const fn of node?.cleanup ?? EMPTY_CLEANUP_SET) {\n fn();\n }\n }\n }\n}\n\n/**\n * An argument list containing the first non-never type in the given type array, or an empty\n * argument list if there are no non-never types in the type array.\n */\nexport type ɵFirstAvailableSignal<T extends unknown[]> = T extends [infer H, ...infer R]\n ? [H] extends [never]\n ? ɵFirstAvailableSignal<R>\n : [Signal<H>]\n : [];\n\n/**\n * Register an effect that, when triggered, is invoked when the application finishes rendering, during the\n * `mixedReadWrite` phase.\n *\n * <div class=\"docs-alert docs-alert-critical\">\n *\n * You should prefer specifying an explicit phase for the effect instead, or you risk significant\n * performance degradation.\n *\n * </div>\n *\n * Note that callback-based `afterRenderEffect`s will run\n * - in the order it they are registered\n * - only when dirty\n * - on browser platforms only\n * - during the `mixedReadWrite` phase\n *\n * <div class=\"docs-alert docs-alert-important\">\n *\n * Components are not guaranteed to be [hydrated](guide/hydration) before the callback runs.\n * You must use caution when directly reading or writing the DOM and layout.\n *\n * </div>\n *\n * @param callback An effect callback function to register\n * @param options Options to control the behavior of the callback\n *\n * @experimental\n */\nexport function afterRenderEffect(\n callback: (onCleanup: EffectCleanupRegisterFn) => void,\n options?: Omit<AfterRenderOptions, 'phase'>,\n): AfterRenderRef;\n/**\n * Register effects that, when triggered, are invoked when the application finishes rendering,\n * during the specified phases. The available phases are:\n * - `earlyRead`\n * Use this phase to **read** from the DOM before a subsequent `write` callback, for example to\n * perform custom layout that the browser doesn't natively support. Prefer the `read` phase if\n * reading can wait until after the write phase. **Never** write to the DOM in this phase.\n * - `write`\n * Use this phase to **write** to the DOM. **Never** read from the DOM in this phase.\n * - `mixedReadWrite`\n * Use this phase to read from and write to the DOM simultaneously. **Never** use this phase if\n * it is possible to divide the work among the other phases instead.\n * - `read`\n * Use this phase to **read** from the DOM. **Never** write to the DOM in this phase.\n *\n * <div class=\"docs-alert docs-alert-critical\">\n *\n * You should prefer using the `read` and `write` phases over the `earlyRead` and `mixedReadWrite`\n * phases when possible, to avoid performance degradation.\n *\n * </div>\n *\n * Note that:\n * - Effects run in the following phase order, only when dirty through signal dependencies:\n * 1. `earlyRead`\n * 2. `write`\n * 3. `mixedReadWrite`\n * 4. `read`\n * - `afterRenderEffect`s in the same phase run in the order they are registered.\n * - `afterRenderEffect`s run on browser platforms only, they will not run on the server.\n * - `afterRenderEffect`s will run at least once.\n *\n * The first phase callback to run as part of this spec will receive no parameters. Each\n * subsequent phase callback in this spec will receive the return value of the previously run\n * phase callback as a `Signal`. This can be used to coordinate work across multiple phases.\n *\n * Angular is unable to verify or enforce that phases are used correctly, and instead\n * relies on each developer to follow the guidelines documented for each value and\n * carefully choose the appropriate one, refactoring their code if necessary. By doing\n * so, Angular is better able to minimize the performance degradation associated with\n * manual DOM access, ensuring the best experience for the end users of your application\n * or library.\n *\n * <div class=\"docs-alert docs-alert-important\">\n *\n * Components are not guaranteed to be [hydrated](guide/hydration) before the callback runs.\n * You must use caution when directly reading or writing the DOM and layout.\n *\n * </div>\n *\n * @param spec The effect functions to register\n * @param options Options to control the behavior of the effects\n *\n * @usageNotes\n *\n * Use `afterRenderEffect` to create effects that will read or write from the DOM and thus should\n * run after rendering.\n *\n * @experimental\n */\nexport function afterRenderEffect<E = never, W = never, M = never>(\n spec: {\n earlyRead?: (onCleanup: EffectCleanupRegisterFn) => E;\n write?: (...args: [...ɵFirstAvailableSignal<[E]>, EffectCleanupRegisterFn]) => W;\n mixedReadWrite?: (...args: [...ɵFirstAvailableSignal<[W, E]>, EffectCleanupRegisterFn]) => M;\n read?: (...args: [...ɵFirstAvailableSignal<[M, W, E]>, EffectCleanupRegisterFn]) => void;\n },\n options?: Omit<AfterRenderOptions, 'phase'>,\n): AfterRenderRef;\n\n/**\n * @experimental\n */\nexport function afterRenderEffect<E = never, W = never, M = never>(\n callbackOrSpec:\n | ((onCleanup: EffectCleanupRegisterFn) => void)\n | {\n earlyRead?: (onCleanup: EffectCleanupRegisterFn) => E;\n write?: (...args: [...ɵFirstAvailableSignal<[E]>, EffectCleanupRegisterFn]) => W;\n mixedReadWrite?: (\n ...args: [...ɵFirstAvailableSignal<[W, E]>, EffectCleanupRegisterFn]\n ) => M;\n read?: (...args: [...ɵFirstAvailableSignal<[M, W, E]>, EffectCleanupRegisterFn]) => void;\n },\n options?: Omit<AfterRenderOptions, 'phase'>,\n): AfterRenderRef {\n ngDevMode &&\n assertNotInReactiveContext(\n afterRenderEffect,\n 'Call `afterRenderEffect` outside of a reactive context. For example, create the render ' +\n 'effect inside the component constructor`.',\n );\n\n !options?.injector && assertInInjectionContext(afterRenderEffect);\n\n if (typeof ngServerMode !== 'undefined' && ngServerMode) {\n return NOOP_AFTER_RENDER_REF;\n }\n\n const injector = options?.injector ?? inject(Injector);\n const scheduler = injector.get(ChangeDetectionScheduler);\n const manager = injector.get(AfterRenderManager);\n const tracing = injector.get(TracingService, null, {optional: true});\n manager.impl ??= injector.get(AfterRenderImpl);\n\n let spec = callbackOrSpec;\n if (typeof spec === 'function') {\n spec = {mixedReadWrite: callbackOrSpec as any};\n }\n\n const viewContext = injector.get(ViewContext, null, {optional: true});\n\n const sequence = new AfterRenderEffectSequence(\n manager.impl,\n [spec.earlyRead, spec.write, spec.mixedReadWrite, spec.read] as AfterRenderPhaseEffectHook[],\n viewContext?.view,\n scheduler,\n injector.get(DestroyRef),\n tracing?.snapshot(null),\n );\n manager.impl.register(sequence);\n return sequence;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Injector} from '../di/injector';\nimport {EnvironmentInjector, getNullInjector} from '../di/r3_injector';\nimport {Type} from '../interface/type';\nimport {ComponentRef} from '../linker/component_factory';\n\nimport {ComponentFactory} from './component_ref';\nimport {getComponentDef} from './def_getters';\nimport {assertComponentDef} from './errors';\n\n/**\n * Creates a `ComponentRef` instance based on provided component type and a set of options.\n *\n * @usageNotes\n *\n * The example below demonstrates how the `createComponent` function can be used\n * to create an instance of a ComponentRef dynamically and attach it to an ApplicationRef,\n * so that it gets included into change detection cycles.\n *\n * Note: the example uses standalone components, but the function can also be used for\n * non-standalone components (declared in an NgModule) as well.\n *\n * ```angular-ts\n * @Component({\n * standalone: true,\n * template: `Hello {{ name }}!`\n * })\n * class HelloComponent {\n * name = 'Angular';\n * }\n *\n * @Component({\n * standalone: true,\n * template: `<div id=\"hello-component-host\"></div>`\n * })\n * class RootComponent {}\n *\n * // Bootstrap an application.\n * const applicationRef = await bootstrapApplication(RootComponent);\n *\n * // Locate a DOM node that would be used as a host.\n * const hostElement = document.getElementById('hello-component-host');\n *\n * // Get an `EnvironmentInjector` instance from the `ApplicationRef`.\n * const environmentInjector = applicationRef.injector;\n *\n * // We can now create a `ComponentRef` instance.\n * const componentRef = createComponent(HelloComponent, {hostElement, environmentInjector});\n *\n * // Last step is to register the newly created ref using the `ApplicationRef` instance\n * // to include the component view into change detection cycles.\n * applicationRef.attachView(componentRef.hostView);\n * componentRef.changeDetectorRef.detectChanges();\n * ```\n *\n * @param component Component class reference.\n * @param options Set of options to use:\n * * `environmentInjector`: An `EnvironmentInjector` instance to be used for the component.\n * * `hostElement` (optional): A DOM node that should act as a host node for the component. If not\n * provided, Angular creates one based on the tag name used in the component selector (and falls\n * back to using `div` if selector doesn't have tag name info).\n * * `elementInjector` (optional): An `ElementInjector` instance, see additional info about it\n * [here](guide/di/hierarchical-dependency-injection#elementinjector).\n * * `projectableNodes` (optional): A list of DOM nodes that should be projected through\n * [`<ng-content>`](api/core/ng-content) of the new component instance, e.g.,\n * `[[element1, element2]]`: projects `element1` and `element2` into the same `<ng-content>`.\n * `[[element1, element2], [element3]]`: projects `element1` and `element2` into one `<ng-content>`,\n * and `element3` into a separate `<ng-content>`.\n * @returns ComponentRef instance that represents a given Component.\n *\n * @publicApi\n */\nexport function createComponent<C>(\n component: Type<C>,\n options: {\n environmentInjector: EnvironmentInjector;\n hostElement?: Element;\n elementInjector?: Injector;\n projectableNodes?: Node[][];\n },\n): ComponentRef<C> {\n ngDevMode && assertComponentDef(component);\n const componentDef = getComponentDef(component)!;\n const elementInjector = options.elementInjector || getNullInjector();\n const factory = new ComponentFactory<C>(componentDef);\n return factory.create(\n elementInjector,\n options.projectableNodes,\n options.hostElement,\n options.environmentInjector,\n );\n}\n\n/**\n * An interface that describes the subset of component metadata\n * that can be retrieved using the `reflectComponentType` function.\n *\n * @publicApi\n */\nexport interface ComponentMirror<C> {\n /**\n * The component's HTML selector.\n */\n get selector(): string;\n /**\n * The type of component the factory will create.\n */\n get type(): Type<C>;\n /**\n * The inputs of the component.\n */\n get inputs(): ReadonlyArray<{\n readonly propName: string;\n readonly templateName: string;\n readonly transform?: (value: any) => any;\n readonly isSignal: boolean;\n }>;\n /**\n * The outputs of the component.\n */\n get outputs(): ReadonlyArray<{readonly propName: string; readonly templateName: string}>;\n /**\n * Selector for all <ng-content> elements in the component.\n */\n get ngContentSelectors(): ReadonlyArray<string>;\n /**\n * Whether this component is marked as standalone.\n * Note: an extra flag, not present in `ComponentFactory`.\n */\n get isStandalone(): boolean;\n /**\n * // TODO(signals): Remove internal and add public documentation\n * @internal\n */\n get isSignal(): boolean;\n}\n\n/**\n * Creates an object that allows to retrieve component metadata.\n *\n * @usageNotes\n *\n * The example below demonstrates how to use the function and how the fields\n * of the returned object map to the component metadata.\n *\n * ```angular-ts\n * @Component({\n * standalone: true,\n * selector: 'foo-component',\n * template: `\n * <ng-content></ng-content>\n * <ng-content select=\"content-selector-a\"></ng-content>\n * `,\n * })\n * class FooComponent {\n * @Input('inputName') inputPropName: string;\n * @Output('outputName') outputPropName = new EventEmitter<void>();\n * }\n *\n * const mirror = reflectComponentType(FooComponent);\n * expect(mirror.type).toBe(FooComponent);\n * expect(mirror.selector).toBe('foo-component');\n * expect(mirror.isStandalone).toBe(true);\n * expect(mirror.inputs).toEqual([{propName: 'inputName', templateName: 'inputPropName'}]);\n * expect(mirror.outputs).toEqual([{propName: 'outputName', templateName: 'outputPropName'}]);\n * expect(mirror.ngContentSelectors).toEqual([\n * '*', // first `<ng-content>` in a template, the selector defaults to `*`\n * 'content-selector-a' // second `<ng-content>` in a template\n * ]);\n * ```\n *\n * @param component Component class reference.\n * @returns An object that allows to retrieve component metadata.\n *\n * @publicApi\n */\nexport function reflectComponentType<C>(component: Type<C>): ComponentMirror<C> | null {\n const componentDef = getComponentDef(component);\n if (!componentDef) return null;\n\n const factory = new ComponentFactory<C>(componentDef);\n return {\n get selector(): string {\n return factory.selector;\n },\n get type(): Type<C> {\n return factory.componentType;\n },\n get inputs(): ReadonlyArray<{\n propName: string;\n templateName: string;\n transform?: (value: any) => any;\n isSignal: boolean;\n }> {\n return factory.inputs;\n },\n get outputs(): ReadonlyArray<{propName: string; templateName: string}> {\n return factory.outputs;\n },\n get ngContentSelectors(): ReadonlyArray<string> {\n return factory.ngContentSelectors;\n },\n get isStandalone(): boolean {\n return componentDef.standalone;\n },\n get isSignal(): boolean {\n return componentDef.signals;\n },\n };\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {EnvironmentProviders, Provider} from '../di';\n\n/**\n * Set of config options available during the application bootstrap operation.\n *\n * @publicApi\n */\nexport interface ApplicationConfig {\n /**\n * List of providers that should be available to the root component and all its children.\n */\n providers: Array<Provider | EnvironmentProviders>;\n}\n\n/**\n * Merge multiple application configurations from left to right.\n *\n * @param configs Two or more configurations to be merged.\n * @returns A merged [ApplicationConfig](api/core/ApplicationConfig).\n *\n * @publicApi\n */\nexport function mergeApplicationConfig(...configs: ApplicationConfig[]): ApplicationConfig {\n return configs.reduce(\n (prev, curr) => {\n return Object.assign(prev, curr, {providers: [...prev.providers, ...curr.providers]});\n },\n {providers: []},\n );\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {InjectionToken} from '../di/injection_token';\n\n/**\n * Injection token representing the current HTTP request object.\n *\n * Use this token to access the current request when handling server-side\n * rendering (SSR).\n *\n * @remarks\n * This token may be `null` in the following scenarios:\n *\n * * During the build processes.\n * * When the application is rendered in the browser (client-side rendering).\n * * When performing static site generation (SSG).\n * * During route extraction in development (at the time of the request).\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Request | `Request` on MDN}\n *\n * @developerPreview\n */\nexport const REQUEST = new InjectionToken<Request | null>(\n typeof ngDevMode === 'undefined' || ngDevMode ? 'REQUEST' : '',\n {\n providedIn: 'platform',\n factory: () => null,\n },\n);\n\n/**\n * Injection token for response initialization options.\n *\n * Use this token to provide response options for configuring or initializing\n * HTTP responses in server-side rendering or API endpoints.\n *\n * @remarks\n * This token may be `null` in the following scenarios:\n *\n * * During the build processes.\n * * When the application is rendered in the browser (client-side rendering).\n * * When performing static site generation (SSG).\n * * During route extraction in development (at the time of the request).\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Response/Response | `ResponseInit` on MDN}\n *\n * @developerPreview\n */\nexport const RESPONSE_INIT = new InjectionToken<ResponseInit | null>(\n typeof ngDevMode === 'undefined' || ngDevMode ? 'RESPONSE_INIT' : '',\n {\n providedIn: 'platform',\n factory: () => null,\n },\n);\n\n/**\n * Injection token for additional request context.\n *\n * Use this token to pass custom metadata or context related to the current request in server-side rendering.\n *\n * @remarks\n * This token is only available during server-side rendering and will be `null` in other contexts.\n *\n * @developerPreview\n */\nexport const REQUEST_CONTEXT = new InjectionToken<unknown>(\n typeof ngDevMode === 'undefined' || ngDevMode ? 'REQUEST_CONTEXT' : '',\n {\n providedIn: 'platform',\n factory: () => null,\n },\n);\n"],"names":["global","NOT_FOUND","INJECTOR","getPipeDef","inject","USE_VALUE","ViewEncapsulation","isInSkipHydrationBlock","setActiveConsumer","getDirectiveMetadata","DEFER_BLOCK_STATE","Attribute","isDisconnectedNode","policy","getPolicy","handleError","MAXIMUM_REFRESH_RERUNS","R3_ViewRef","AbstractComponentFactoryResolver","AbstractComponentFactory","AbstractComponentRef","ViewRef","R3ComponentFactory","R3ViewRef","ViewEngine_TemplateRef","ViewEngine_ElementRef","viewEngine_NgModuleRef","viewEngine_ComponentFactoryResolver","viewEngine_NgModuleFactory","defineInjectable","SERIALIZED_DEFER_BLOCK_STATE","getDeferBlocks","getDeferBlocksInternal","publishDefaultGlobalUtils","i0.ɵɵdefineInjectable","_publishDefaultGlobalUtils","ComponentFactory","ComponentFactoryResolver","NgModuleRef","LOCALE_ID","r3.ɵɵattribute","r3.ɵɵattributeInterpolate1","r3.ɵɵattributeInterpolate2","r3.ɵɵattributeInterpolate3","r3.ɵɵattributeInterpolate4","r3.ɵɵattributeInterpolate5","r3.ɵɵattributeInterpolate6","r3.ɵɵattributeInterpolate7","r3.ɵɵattributeInterpolate8","r3.ɵɵattributeInterpolateV","r3.ɵɵdefineComponent","r3.ɵɵdefineDirective","r3.ɵɵdefineNgModule","r3.ɵɵdefinePipe","r3.ɵɵdirectiveInject","r3.ɵɵgetInheritedFactory","r3.ɵɵinjectAttribute","r3.ɵɵinvalidFactory","r3.ɵɵtemplateRefExtractor","r3.ɵɵresetView","r3.ɵɵHostDirectivesFeature","r3.ɵɵNgOnChangesFeature","r3.ɵɵProvidersFeature","r3.ɵɵCopyDefinitionFeature","r3.ɵɵInheritDefinitionFeature","r3.ɵɵExternalStylesFeature","r3.ɵɵnextContext","r3.ɵɵnamespaceHTML","r3.ɵɵnamespaceMathML","r3.ɵɵnamespaceSVG","r3.ɵɵenableBindings","r3.ɵɵdisableBindings","r3.ɵɵelementStart","r3.ɵɵelementEnd","r3.ɵɵelement","r3.ɵɵelementContainerStart","r3.ɵɵelementContainerEnd","r3.ɵɵelementContainer","r3.ɵɵpureFunction0","r3.ɵɵpureFunction1","r3.ɵɵpureFunction2","r3.ɵɵpureFunction3","r3.ɵɵpureFunction4","r3.ɵɵpureFunction5","r3.ɵɵpureFunction6","r3.ɵɵpureFunction7","r3.ɵɵpureFunction8","r3.ɵɵpureFunctionV","r3.ɵɵgetCurrentView","r3.ɵɵrestoreView","r3.ɵɵlistener","r3.ɵɵprojection","r3.ɵɵsyntheticHostProperty","r3.ɵɵsyntheticHostListener","r3.ɵɵpipeBind1","r3.ɵɵpipeBind2","r3.ɵɵpipeBind3","r3.ɵɵpipeBind4","r3.ɵɵpipeBindV","r3.ɵɵprojectionDef","r3.ɵɵhostProperty","r3.ɵɵproperty","r3.ɵɵpropertyInterpolate","r3.ɵɵpropertyInterpolate1","r3.ɵɵpropertyInterpolate2","r3.ɵɵpropertyInterpolate3","r3.ɵɵpropertyInterpolate4","r3.ɵɵpropertyInterpolate5","r3.ɵɵpropertyInterpolate6","r3.ɵɵpropertyInterpolate7","r3.ɵɵpropertyInterpolate8","r3.ɵɵpropertyInterpolateV","r3.ɵɵpipe","r3.ɵɵqueryRefresh","r3.ɵɵqueryAdvance","r3.ɵɵviewQuery","r3.ɵɵviewQuerySignal","r3.ɵɵloadQuery","r3.ɵɵcontentQuery","r3.ɵɵcontentQuerySignal","r3.ɵɵreference","r3.ɵɵclassMap","r3.ɵɵclassMapInterpolate1","r3.ɵɵclassMapInterpolate2","r3.ɵɵclassMapInterpolate3","r3.ɵɵclassMapInterpolate4","r3.ɵɵclassMapInterpolate5","r3.ɵɵclassMapInterpolate6","r3.ɵɵclassMapInterpolate7","r3.ɵɵclassMapInterpolate8","r3.ɵɵclassMapInterpolateV","r3.ɵɵstyleMap","r3.ɵɵstyleMapInterpolate1","r3.ɵɵstyleMapInterpolate2","r3.ɵɵstyleMapInterpolate3","r3.ɵɵstyleMapInterpolate4","r3.ɵɵstyleMapInterpolate5","r3.ɵɵstyleMapInterpolate6","r3.ɵɵstyleMapInterpolate7","r3.ɵɵstyleMapInterpolate8","r3.ɵɵstyleMapInterpolateV","r3.ɵɵstyleProp","r3.ɵɵstylePropInterpolate1","r3.ɵɵstylePropInterpolate2","r3.ɵɵstylePropInterpolate3","r3.ɵɵstylePropInterpolate4","r3.ɵɵstylePropInterpolate5","r3.ɵɵstylePropInterpolate6","r3.ɵɵstylePropInterpolate7","r3.ɵɵstylePropInterpolate8","r3.ɵɵstylePropInterpolateV","r3.ɵɵclassProp","r3.ɵɵadvance","r3.ɵɵtemplate","r3.ɵɵconditional","r3.ɵɵdefer","r3.ɵɵdeferWhen","r3.ɵɵdeferOnIdle","r3.ɵɵdeferOnImmediate","r3.ɵɵdeferOnTimer","r3.ɵɵdeferOnHover","r3.ɵɵdeferOnInteraction","r3.ɵɵdeferOnViewport","r3.ɵɵdeferPrefetchWhen","r3.ɵɵdeferPrefetchOnIdle","r3.ɵɵdeferPrefetchOnImmediate","r3.ɵɵdeferPrefetchOnTimer","r3.ɵɵdeferPrefetchOnHover","r3.ɵɵdeferPrefetchOnInteraction","r3.ɵɵdeferPrefetchOnViewport","r3.ɵɵdeferHydrateWhen","r3.ɵɵdeferHydrateNever","r3.ɵɵdeferHydrateOnIdle","r3.ɵɵdeferHydrateOnImmediate","r3.ɵɵdeferHydrateOnTimer","r3.ɵɵdeferHydrateOnHover","r3.ɵɵdeferHydrateOnInteraction","r3.ɵɵdeferHydrateOnViewport","r3.ɵɵdeferEnableTimerScheduling","r3.ɵɵrepeater","r3.ɵɵrepeaterCreate","r3.ɵɵrepeaterTrackByIndex","r3.ɵɵrepeaterTrackByIdentity","r3.ɵɵcomponentInstance","r3.ɵɵtext","r3.ɵɵtextInterpolate","r3.ɵɵtextInterpolate1","r3.ɵɵtextInterpolate2","r3.ɵɵtextInterpolate3","r3.ɵɵtextInterpolate4","r3.ɵɵtextInterpolate5","r3.ɵɵtextInterpolate6","r3.ɵɵtextInterpolate7","r3.ɵɵtextInterpolate8","r3.ɵɵtextInterpolateV","r3.ɵɵi18n","r3.ɵɵi18nAttributes","r3.ɵɵi18nExp","r3.ɵɵi18nStart","r3.ɵɵi18nEnd","r3.ɵɵi18nApply","r3.ɵɵi18nPostprocess","r3.ɵɵresolveWindow","r3.ɵɵresolveDocument","r3.ɵɵresolveBody","r3.ɵɵsetComponentScope","r3.ɵɵsetNgModuleScope","r3.ɵɵgetComponentDepsFactory","r3.ɵsetClassDebugInfo","r3.ɵɵdeclareLet","r3.ɵɵstoreLet","r3.ɵɵreadContextLet","r3.ɵɵattachSourceLocations","sanitization.ɵɵsanitizeHtml","sanitization.ɵɵsanitizeStyle","sanitization.ɵɵsanitizeResourceUrl","sanitization.ɵɵsanitizeScript","sanitization.ɵɵsanitizeUrl","sanitization.ɵɵsanitizeUrlOrResourceUrl","sanitization.ɵɵtrustConstantHtml","sanitization.ɵɵtrustConstantResourceUrl","iframe_attrs_validation.ɵɵvalidateIframeAttribute","r3.ɵɵtwoWayProperty","r3.ɵɵtwoWayBindingSet","r3.ɵɵtwoWayListener","r3.ɵɵreplaceMetadata","r3.ɵɵgetReplaceMetadataURL","NgModuleFactoryR3","ComponentFactoryR3","R3NgModuleFactory","i0.ɵɵinject","i1.Injector","i1.ApplicationRef","CURRENT_DEFER_BLOCK_STATE","untrackedPrimitive","effect"],"mappings":";;;;;;;;;;;;;;;AAQA;;;;;;AAMG;AACI,MAAM,2BAA2B,GAAG,4BAA4B;AAEvE;;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