@angular/core 21.0.0-next.5 → 21.0.0-next.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/{attribute.mjs → _attribute-chunk.mjs} +2 -2
- package/fesm2022/_attribute-chunk.mjs.map +1 -0
- package/fesm2022/{debug_node.mjs → _debug_node-chunk.mjs} +17 -7
- package/fesm2022/_debug_node-chunk.mjs.map +1 -0
- package/fesm2022/{effect.mjs → _effect-chunk.mjs} +3 -3
- package/fesm2022/_effect-chunk.mjs.map +1 -0
- package/fesm2022/{not_found.mjs → _not_found-chunk.mjs} +2 -2
- package/fesm2022/_not_found-chunk.mjs.map +1 -0
- package/fesm2022/{resource.mjs → _resource-chunk.mjs} +5 -5
- package/fesm2022/_resource-chunk.mjs.map +1 -0
- package/fesm2022/{root_effect_scheduler.mjs → _root_effect_scheduler-chunk.mjs} +5 -5
- package/fesm2022/_root_effect_scheduler-chunk.mjs.map +1 -0
- package/fesm2022/{signal.mjs → _signal-chunk.mjs} +9 -9
- package/fesm2022/_signal-chunk.mjs.map +1 -0
- package/fesm2022/{weak_ref.mjs → _weak_ref-chunk.mjs} +2 -2
- package/fesm2022/_weak_ref-chunk.mjs.map +1 -0
- package/fesm2022/core.mjs +13 -13
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/{primitives/di.mjs → primitives-di.mjs} +3 -3
- package/fesm2022/primitives-di.mjs.map +1 -0
- package/fesm2022/{primitives/event-dispatch.mjs → primitives-event-dispatch.mjs} +3 -3
- package/fesm2022/primitives-event-dispatch.mjs.map +1 -0
- package/fesm2022/primitives-signals.mjs +221 -0
- package/fesm2022/primitives-signals.mjs.map +1 -0
- package/fesm2022/rxjs-interop.mjs +6 -6
- package/fesm2022/rxjs-interop.mjs.map +1 -1
- package/fesm2022/testing.mjs +6 -6
- package/fesm2022/testing.mjs.map +1 -1
- package/package.json +12 -12
- package/schematics/bundles/add-bootstrap-context-to-server-main.cjs +5 -5
- package/schematics/bundles/application-config-core.cjs +5 -5
- package/schematics/bundles/{apply_import_manager-Bx60Uquz.cjs → apply_import_manager-pLtndDki.cjs} +3 -3
- package/schematics/bundles/bootstrap-options-migration.cjs +5 -5
- package/schematics/bundles/cleanup-unused-imports.cjs +5 -5
- package/schematics/bundles/{compiler_host-Aouk-n4F.cjs → compiler_host-BJEh7-L1.cjs} +2 -2
- package/schematics/bundles/control-flow-migration.cjs +4 -4
- package/schematics/bundles/imports-DwPXlGFl.cjs +1 -1
- package/schematics/bundles/{index-Bb6iejCd.cjs → index-DCfgOEYE.cjs} +32 -36
- package/schematics/bundles/{index-BZQb51Qf.cjs → index-bqpULzLD.cjs} +4 -6
- package/schematics/bundles/inject-migration.cjs +3 -3
- package/schematics/bundles/leading_space-D9nQ8UQC.cjs +1 -1
- package/schematics/bundles/{migrate_ts_type_references-By2ZtKls.cjs → migrate_ts_type_references-COE6BA7E.cjs} +5 -5
- package/schematics/bundles/{ng_component_template-B4M8mTyv.cjs → ng_component_template-pDoKlgPP.cjs} +2 -2
- package/schematics/bundles/ng_decorators-BI0uV7KI.cjs +1 -1
- package/schematics/bundles/ngclass-to-class-migration.cjs +7 -7
- package/schematics/bundles/ngstyle-to-style-migration.cjs +7 -7
- package/schematics/bundles/nodes-B16H9JUd.cjs +1 -1
- package/schematics/bundles/output-migration.cjs +6 -6
- package/schematics/bundles/{parse_html-7Wl_HDnw.cjs → parse_html-B6fblY_V.cjs} +2 -2
- package/schematics/bundles/{project_paths-Dr2s3Pq3.cjs → project_paths-i0Wjiiq1.cjs} +3 -3
- package/schematics/bundles/{project_tsconfig_paths-DX9KHLn9.cjs → project_tsconfig_paths-sFatqIE5.cjs} +75 -132
- package/schematics/bundles/property_name-BBwFuqMe.cjs +1 -1
- package/schematics/bundles/route-lazy-loading.cjs +3 -3
- package/schematics/bundles/router-current-navigation.cjs +4 -4
- package/schematics/bundles/router-last-successful-navigation.cjs +4 -4
- package/schematics/bundles/self-closing-tags-migration.cjs +6 -6
- package/schematics/bundles/signal-input-migration.cjs +67 -8
- package/schematics/bundles/signal-queries-migration.cjs +7 -7
- package/schematics/bundles/signals.cjs +7 -7
- package/schematics/bundles/standalone-migration.cjs +60 -40
- package/schematics/bundles/symbol-BObKoqes.cjs +1 -1
- package/schematics/migrations.json +1 -2
- package/{api.d.d.ts → types/_api-chunk.d.ts} +2 -2
- package/{chrome_dev_tools_performance.d.d.ts → types/_chrome_dev_tools_performance-chunk.d.ts} +3 -3
- package/{discovery.d.d.ts → types/_discovery-chunk.d.ts} +5 -5
- package/{effect.d.d.ts → types/_effect-chunk.d.ts} +2 -2
- package/{event_dispatcher.d.d.ts → types/_event_dispatcher-chunk.d.ts} +1 -1
- package/{graph.d.d.ts → types/_formatter-chunk.d.ts} +14 -2
- package/{weak_ref.d.d.ts → types/_weak_ref-chunk.d.ts} +1 -1
- package/{index.d.ts → types/core.d.ts} +13 -13
- package/{primitives/di/index.d.ts → types/primitives-di.d.ts} +1 -1
- package/{primitives/event-dispatch/index.d.ts → types/primitives-event-dispatch.d.ts} +3 -3
- package/{primitives/signals/index.d.ts → types/primitives-signals.d.ts} +6 -6
- package/{rxjs-interop/index.d.ts → types/rxjs-interop.d.ts} +5 -5
- package/{testing/index.d.ts → types/testing.d.ts} +6 -6
- package/fesm2022/attribute.mjs.map +0 -1
- package/fesm2022/debug_node.mjs.map +0 -1
- package/fesm2022/effect.mjs.map +0 -1
- package/fesm2022/not_found.mjs.map +0 -1
- package/fesm2022/primitives/di.mjs.map +0 -1
- package/fesm2022/primitives/event-dispatch.mjs.map +0 -1
- package/fesm2022/primitives/signals.mjs +0 -88
- package/fesm2022/primitives/signals.mjs.map +0 -1
- package/fesm2022/resource.mjs.map +0 -1
- package/fesm2022/root_effect_scheduler.mjs.map +0 -1
- package/fesm2022/signal.mjs.map +0 -1
- package/fesm2022/weak_ref.mjs.map +0 -1
package/fesm2022/effect.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"effect.mjs","sources":["../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/core/primitives/signals/src/linked_signal.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/core/primitives/signals/src/untracked.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/core/primitives/signals/src/effect.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\nimport {COMPUTING, ERRORED, UNSET} from './computed';\nimport {defaultEquals, ValueEqualityFn} from './equality';\nimport {\n consumerAfterComputation,\n consumerBeforeComputation,\n producerAccessed,\n producerMarkClean,\n producerUpdateValueVersion,\n REACTIVE_NODE,\n ReactiveNode,\n runPostProducerCreatedFn,\n SIGNAL,\n} from './graph';\nimport {signalSetFn, signalUpdateFn} from './signal';\n\n// Required as the signals library is in a separate package, so we need to explicitly ensure the\n// global `ngDevMode` type is defined.\ndeclare const ngDevMode: boolean | undefined;\n\nexport type ComputationFn<S, D> = (source: S, previous?: {source: S; value: D}) => D;\n\nexport interface LinkedSignalNode<S, D> extends ReactiveNode {\n /**\n * Value of the source signal that was used to derive the computed value.\n */\n sourceValue: S;\n\n /**\n * Current state value, or one of the sentinel values (`UNSET`, `COMPUTING`,\n * `ERROR`).\n */\n value: D;\n\n /**\n * If `value` is `ERRORED`, the error caught from the last computation attempt which will\n * be re-thrown.\n */\n error: unknown;\n\n /**\n * The source function represents reactive dependency based on which the linked state is reset.\n */\n source: () => S;\n\n /**\n * The computation function which will produce a new value based on the source and, optionally - previous values.\n */\n computation: ComputationFn<S, D>;\n\n equal: ValueEqualityFn<D>;\n}\n\nexport type LinkedSignalGetter<S, D> = (() => D) & {\n [SIGNAL]: LinkedSignalNode<S, D>;\n};\n\nexport function createLinkedSignal<S, D>(\n sourceFn: () => S,\n computationFn: ComputationFn<S, D>,\n equalityFn?: ValueEqualityFn<D>,\n): LinkedSignalGetter<S, D> {\n const node: LinkedSignalNode<S, D> = Object.create(LINKED_SIGNAL_NODE);\n\n node.source = sourceFn;\n node.computation = computationFn;\n if (equalityFn != undefined) {\n node.equal = equalityFn;\n }\n\n const linkedSignalGetter = () => {\n // Check if the value needs updating before returning it.\n producerUpdateValueVersion(node);\n\n // Record that someone looked at this signal.\n producerAccessed(node);\n\n if (node.value === ERRORED) {\n throw node.error;\n }\n\n return node.value;\n };\n\n const getter = linkedSignalGetter as LinkedSignalGetter<S, D>;\n getter[SIGNAL] = node;\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n const debugName = node.debugName ? ' (' + node.debugName + ')' : '';\n getter.toString = () => `[LinkedSignal${debugName}: ${node.value}]`;\n }\n\n runPostProducerCreatedFn(node);\n\n return getter;\n}\n\nexport function linkedSignalSetFn<S, D>(node: LinkedSignalNode<S, D>, newValue: D) {\n producerUpdateValueVersion(node);\n signalSetFn(node, newValue);\n producerMarkClean(node);\n}\n\nexport function linkedSignalUpdateFn<S, D>(\n node: LinkedSignalNode<S, D>,\n updater: (value: D) => D,\n): void {\n producerUpdateValueVersion(node);\n signalUpdateFn(node, updater);\n producerMarkClean(node);\n}\n\n// Note: Using an IIFE here to ensure that the spread assignment is not considered\n// a side-effect, ending up preserving `LINKED_SIGNAL_NODE` and `REACTIVE_NODE`.\n// TODO: remove when https://github.com/evanw/esbuild/issues/3392 is resolved.\nexport const LINKED_SIGNAL_NODE: object = /* @__PURE__ */ (() => {\n return {\n ...REACTIVE_NODE,\n value: UNSET,\n dirty: true,\n error: null,\n equal: defaultEquals,\n kind: 'linkedSignal',\n\n producerMustRecompute(node: LinkedSignalNode<unknown, unknown>): boolean {\n // Force a recomputation if there's no current value, or if the current value is in the\n // process of being calculated (which should throw an error).\n return node.value === UNSET || node.value === COMPUTING;\n },\n\n producerRecomputeValue(node: LinkedSignalNode<unknown, unknown>): void {\n if (node.value === COMPUTING) {\n // Our computation somehow led to a cyclic read of itself.\n throw new Error(\n typeof ngDevMode !== 'undefined' && ngDevMode ? 'Detected cycle in computations.' : '',\n );\n }\n\n const oldValue = node.value;\n node.value = COMPUTING;\n\n const prevConsumer = consumerBeforeComputation(node);\n let newValue: unknown;\n try {\n const newSourceValue = node.source();\n const prev =\n oldValue === UNSET || oldValue === ERRORED\n ? undefined\n : {\n source: node.sourceValue,\n value: oldValue,\n };\n newValue = node.computation(newSourceValue, prev);\n node.sourceValue = newSourceValue;\n } catch (err) {\n newValue = ERRORED;\n node.error = err;\n } finally {\n consumerAfterComputation(node, prevConsumer);\n }\n\n if (oldValue !== UNSET && newValue !== ERRORED && node.equal(oldValue, newValue)) {\n // No change to `valueVersion` - old and new values are\n // semantically equivalent.\n node.value = oldValue;\n return;\n }\n\n node.value = newValue;\n node.version++;\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 './graph';\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 const prevConsumer = setActiveConsumer(null);\n // We are not trying to catch any particular errors here, just making sure that the consumers\n // stack is restored in case of errors.\n try {\n return nonReactiveReadsFn();\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 {\n consumerAfterComputation,\n consumerBeforeComputation,\n consumerPollProducersForChange,\n REACTIVE_NODE,\n ReactiveNode,\n} from './graph';\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 */\nexport type EffectCleanupFn = () => void;\n\n/**\n * A callback passed to the effect function that makes it possible to register cleanup logic.\n */\nexport type EffectCleanupRegisterFn = (cleanupFn: EffectCleanupFn) => void;\n\nexport interface BaseEffectNode extends ReactiveNode {\n fn: () => void;\n destroy(): void;\n cleanup(): void;\n run(): void;\n}\n\nexport const BASE_EFFECT_NODE: Omit<BaseEffectNode, 'fn' | 'destroy' | 'cleanup' | 'run'> =\n /* @__PURE__ */ (() => ({\n ...REACTIVE_NODE,\n consumerIsAlwaysLive: true,\n consumerAllowSignalWrites: true,\n dirty: true,\n kind: 'effect',\n }))();\n\nexport function runEffect(node: BaseEffectNode) {\n node.dirty = false;\n if (node.version > 0 && !consumerPollProducersForChange(node)) {\n return;\n }\n node.version++;\n const prevNode = consumerBeforeComputation(node);\n try {\n node.cleanup();\n node.fn();\n } finally {\n consumerAfterComputation(node, prevNode);\n }\n}\n"],"names":[],"mappings":";;;;;;;;SAgEgB,kBAAkB,CAChC,QAAiB,EACjB,aAAkC,EAClC,UAA+B,EAAA;IAE/B,MAAM,IAAI,GAA2B,MAAM,CAAC,MAAM,CAAC,kBAAkB,CAAC;AAEtE,IAAA,IAAI,CAAC,MAAM,GAAG,QAAQ;AACtB,IAAA,IAAI,CAAC,WAAW,GAAG,aAAa;AAChC,IAAA,IAAI,UAAU,IAAI,SAAS,EAAE;AAC3B,QAAA,IAAI,CAAC,KAAK,GAAG,UAAU;;IAGzB,MAAM,kBAAkB,GAAG,MAAK;;QAE9B,0BAA0B,CAAC,IAAI,CAAC;;QAGhC,gBAAgB,CAAC,IAAI,CAAC;AAEtB,QAAA,IAAI,IAAI,CAAC,KAAK,KAAK,OAAO,EAAE;YAC1B,MAAM,IAAI,CAAC,KAAK;;QAGlB,OAAO,IAAI,CAAC,KAAK;AACnB,KAAC;IAED,MAAM,MAAM,GAAG,kBAA8C;AAC7D,IAAA,MAAM,CAAC,MAAM,CAAC,GAAG,IAAI;AACrB,IAAA,IAAI,OAAO,SAAS,KAAK,WAAW,IAAI,SAAS,EAAE;AACjD,QAAA,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,GAAG,IAAI,GAAG,IAAI,CAAC,SAAS,GA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,EAAE,QAAQ;CACf,CAAC;AAEE,SAAU,SAAS,CAAC,IAAoB,EAAA;AAC5C,IAAA,IAAI,CAAC,KAAK,GAAG,KAAK;AAClB,IAAA,IAAI,IAAI,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,8BAA8B,CAAC,IAAI,CAAC,EAAE;QAC7D;;IAEF,IAAI,CAAC,OAAO,EAAE;AACd,IAAA,MAAM,QAAQ,GAAG,yBAAyB,CAAC,IAAI,CAAC;AAChD,IAAA,IAAI;QACF,IAAI,CAAC,OAAO,EAAE;QACd,IAAI,CAAC,EAAE,EAAE;;YACD;AACR,QAAA,wBAAwB,CAAC,IAAI,EAAE,QAAQ,CAAC;;AAE5C;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"not_found.mjs","sources":["../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/core/primitives/di/src/injector.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/core/primitives/di/src/not_found.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\nimport {Constructor, InjectionToken} from './injection_token';\nimport {NotFound, NOT_FOUND} from './not_found';\n\nexport interface Injector {\n retrieve<T>(token: InjectionToken<T>, options?: unknown): T | NotFound;\n}\n\n/**\n * Current injector value used by `inject`.\n * - `undefined`: it is an error to call `inject`\n * - `null`: `inject` can be called but there is no injector (limp-mode).\n * - Injector instance: Use the injector for resolution.\n */\nlet _currentInjector: Injector | undefined | null = undefined;\n\nexport function getCurrentInjector(): Injector | undefined | null {\n return _currentInjector;\n}\n\nexport function setCurrentInjector(\n injector: Injector | null | undefined,\n): Injector | undefined | null {\n const former = _currentInjector;\n _currentInjector = injector;\n return former;\n}\n\nexport function inject<T>(token: InjectionToken<T> | Constructor<T>): T;\nexport function inject<T>(\n token: InjectionToken<T> | Constructor<T>,\n options?: unknown,\n): T | NotFound {\n const currentInjector = getCurrentInjector();\n if (!currentInjector) {\n throw new Error('Current injector is not set.');\n }\n if (!(token as InjectionToken<T>).ɵprov) {\n throw new Error('Token is not an injectable');\n }\n return currentInjector.retrieve(token as InjectionToken<T>, options);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * Value returned if the key-value pair couldn't be found in the context\n * hierarchy.\n */\nexport const NOT_FOUND: unique symbol = Symbol('NotFound');\n\n/**\n * Error thrown when the key-value pair couldn't be found in the context\n * hierarchy. Context can be attached below.\n */\nexport class NotFoundError extends Error {\n override readonly name: string = 'ɵNotFound';\n constructor(message: string) {\n super(message);\n }\n}\n\n/**\n * Type guard for checking if an unknown value is a NotFound.\n */\nexport function isNotFound(e: unknown): e is NotFound {\n return e === NOT_FOUND || (e as NotFoundError)?.name === 'ɵNotFound';\n}\n\n/**\n * Type union of NotFound and NotFoundError.\n */\nexport type NotFound = typeof NOT_FOUND | NotFoundError;\n"],"names":[],"mappings":";;;;;;AAeA;;;;;AAKG;AACH,IAAI,gBAAgB,GAAgC,SAAS;SAE7C,kBAAkB,GAAA;AAChC,IAAA,OAAO,gBAAgB;AACzB;AAEM,SAAU,kBAAkB,CAChC,QAAqC,EAAA;IAErC,MAAM,MAAM,GAAG,gBAAgB;IAC/B,gBAAgB,GAAG,QAAQ;AAC3B,IAAA,OAAO,MAAM;AACf;AAGgB,SAAA,MAAM,CACpB,KAAyC,EACzC,OAAiB,EAAA;AAEjB,IAAA,MAAM,eAAe,GAAG,kBAAkB,EAAE;IAC5C,IAAI,CAAC,eAAe,EAAE;AACpB,QAAA,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC;;AAEjD,IAAA,IAAI,CAAE,KAA2B,CAAC,KAAK,EAAE;AACvC,QAAA,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC;;IAE/C,OAAO,eAAe,CAAC,QAAQ,CAAC,KAA0B,EAAE,OAAO,CAAC;AACtE;;ACxCA;;;AAGG;MACU,SAAS,GAAkB,MAAM,CAAC,UAAU;AAEzD;;;AAGG;AACG,MAAO,aAAc,SAAQ,KAAK,CAAA;IACpB,IAAI,GAAW,WAAW;AAC5C,IAAA,WAAA,CAAY,OAAe,EAAA;QACzB,KAAK,CAAC,OAAO,CAAC;;AAEjB;AAED;;AAEG;AACG,SAAU,UAAU,CAAC,CAAU,EAAA;IACnC,OAAO,CAAC,KAAK,SAAS,IAAK,CAAmB,EAAE,IAAI,KAAK,WAAW;AACtE;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"di.mjs","sources":["../../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/core/primitives/di/src/injection_token.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\nimport {Type} from './type';\n/**\n * Information about how a type or `InjectionToken` interfaces with the DI\n * system. This describes:\n *\n * 1. *How* the type is provided\n * The declaration must specify only one of the following:\n * - A `value` which is a predefined instance of the type.\n * - A `factory` which defines how to create the given type `T`, possibly\n * requesting injection of other types if necessary.\n * - Neither, in which case the type is expected to already be present in the\n * injector hierarchy. This is used for internal use cases.\n *\n * 2. *Where* the type is stored (if it is stored)\n * - The `providedIn` parameter specifies which injector the type belongs to.\n * - The `token` is used as the key to store the type in the injector.\n */\nexport interface ɵɵInjectableDeclaration<T> {\n /**\n * Specifies that the given type belongs to a particular `Injector`,\n * `NgModule`, or a special scope (e.g. `'root'`).\n *\n * `any` is deprecated and will be removed soon.\n *\n * A value of `null` indicates that the injectable does not belong to any\n * scope, and won't be stored in any injector. For declarations with a\n * factory, this will create a new instance of the type each time it is\n * requested.\n */\n providedIn: Type<any> | 'root' | 'platform' | 'any' | 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;\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 InjectionToken<T> {\n ɵprov: ɵɵInjectableDeclaration<T>;\n}\n\nexport function defineInjectable<T>(opts: {\n token: unknown;\n providedIn?: Type<any> | 'root' | 'platform' | 'any' | 'environment' | null;\n factory: () => T;\n}): ɵɵInjectableDeclaration<T> {\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\nexport type Constructor<T> = Function & {prototype: T};\n\nexport function registerInjectable<T>(\n ctor: unknown,\n declaration: ɵɵInjectableDeclaration<T>,\n): InjectionToken<T> {\n (ctor as unknown as InjectionToken<T>).ɵprov = declaration;\n return ctor as Constructor<T> & InjectionToken<T>;\n}\n"],"names":[],"mappings":";;;;;;;;AAqEM,SAAU,gBAAgB,CAAI,IAInC,EAAA;IACC,OAAO;QACL,KAAK,EAAE,IAAI,CAAC,KAAK;AACjB,QAAA,UAAU,EAAG,IAAI,CAAC,UAAkB,IAAI,IAAI;QAC5C,OAAO,EAAE,IAAI,CAAC,OAAO;AACrB,QAAA,KAAK,EAAE,SAAS;KACa;AACjC;AAIgB,SAAA,kBAAkB,CAChC,IAAa,EACb,WAAuC,EAAA;AAEtC,IAAA,IAAqC,CAAC,KAAK,GAAG,WAAW;AAC1D,IAAA,OAAO,IAA0C;AACnD;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"event-dispatch.mjs","sources":["../../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/core/primitives/event-dispatch/src/property.ts","../../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/core/primitives/event-dispatch/src/cache.ts","../../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/core/primitives/event-dispatch/src/event_type.ts","../../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/core/primitives/event-dispatch/src/event.ts","../../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/core/primitives/event-dispatch/src/event_contract_container.ts","../../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/core/primitives/event-dispatch/src/char.ts","../../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/core/primitives/event-dispatch/src/event_info.ts","../../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/core/primitives/event-dispatch/src/action_resolver.ts","../../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/core/primitives/event-dispatch/src/restriction.ts","../../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/core/primitives/event-dispatch/src/dispatcher.ts","../../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/core/primitives/event-dispatch/src/event_dispatcher.ts","../../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/core/primitives/event-dispatch/src/earlyeventcontract.ts","../../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/core/primitives/event-dispatch/src/event_contract_defines.ts","../../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/core/primitives/event-dispatch/src/eventcontract.ts","../../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/core/primitives/event-dispatch/src/bootstrap_app_scoped.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/** All properties that are used by jsaction. */\nexport const Property = {\n /**\n * The parsed value of the jsaction attribute is stored in this\n * property on the DOM node. The parsed value is an Object. The\n * property names of the object are the events; the values are the\n * names of the actions. This property is attached even on nodes\n * that don't have a jsaction attribute as an optimization, because\n * property lookup is faster than attribute access.\n */\n JSACTION: '__jsaction' as const,\n /**\n * The owner property references an a logical owner for a DOM node. JSAction\n * will follow this reference instead of parentNode when traversing the DOM\n * to find jsaction attributes. This allows overlaying a logical structure\n * over a document where the DOM structure can't reflect that structure.\n */\n OWNER: '__owner' as const,\n};\n\ndeclare global {\n interface Node {\n [Property.JSACTION]?: {[key: string]: string | undefined};\n [Property.OWNER]?: ParentNode;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 {Property} from './property';\n\n/**\n * Map from jsaction annotation to a parsed map from event name to action name.\n */\nconst parseCache: {[key: string]: {[key: string]: string | undefined}} = {};\n\n/**\n * Reads the jsaction parser cache from the given DOM Element.\n */\nexport function get(element: Element): {[key: string]: string | undefined} | undefined {\n return element[Property.JSACTION];\n}\n\n/**\n * Reads the jsaction parser cache for the given DOM element. If no cache is yet present,\n * creates an empty one.\n */\nexport function getDefaulted(element: Element): {[key: string]: string | undefined} {\n const cache = get(element) ?? {};\n set(element, cache);\n return cache;\n}\n\n/**\n * Writes the jsaction parser cache to the given DOM Element.\n */\nexport function set(element: Element, actionMap: {[key: string]: string | undefined}) {\n element[Property.JSACTION] = actionMap;\n}\n\n/**\n * Looks up the parsed action map from the source jsaction attribute value.\n *\n * @param text Unparsed jsaction attribute value.\n * @return Parsed jsaction attribute value, if already present in the cache.\n */\nexport function getParsed(text: string): {[key: string]: string | undefined} | undefined {\n return parseCache[text];\n}\n\n/**\n * Inserts the parse result for the given source jsaction value into the cache.\n *\n * @param text Unparsed jsaction attribute value.\n * @param parsed Attribute value parsed into the action map.\n */\nexport function setParsed(text: string, parsed: {[key: string]: string | undefined}) {\n parseCache[text] = parsed;\n}\n\n/**\n * Clears the jsaction parser cache from the given DOM Element.\n *\n * @param element .\n */\nexport function clear(element: Element) {\n if (Property.JSACTION in element) {\n delete element[Property.JSACTION];\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * Names of events that are special to jsaction. These are not all\n * event types that are legal to use in either HTML or the addEvent()\n * API, but these are the ones that are treated specially. All other\n * DOM events can be used in either addEvent() or in the value of the\n * jsaction attribute. Beware of browser specific events or events\n * that don't bubble though: If they are not mentioned here, then\n * event contract doesn't work around their peculiarities.\n */\nexport const EventType = {\n /**\n * Mouse middle click, introduced in Chrome 55 and not yet supported on\n * other browsers.\n */\n AUXCLICK: 'auxclick',\n\n /**\n * The change event fired by browsers when the `value` attribute of input,\n * select, and textarea elements are changed.\n */\n CHANGE: 'change',\n\n /**\n * The click event. In addEvent() refers to all click events, in the\n * jsaction attribute it refers to the unmodified click and Enter/Space\n * keypress events. In the latter case, a jsaction click will be triggered,\n * for accessibility reasons. See clickmod and clickonly, below.\n */\n CLICK: 'click',\n\n /**\n * Specifies the jsaction for a modified click event (i.e. a mouse\n * click with the modifier key Cmd/Ctrl pressed). This event isn't\n * separately enabled in addEvent(), because in the DOM, it's just a\n * click event.\n */\n CLICKMOD: 'clickmod',\n\n /**\n * Specifies the jsaction for a click-only event. Click-only doesn't take\n * into account the case where an element with focus receives an Enter/Space\n * keypress. This event isn't separately enabled in addEvent().\n */\n CLICKONLY: 'clickonly',\n\n /**\n * The dblclick event.\n */\n DBLCLICK: 'dblclick',\n\n /**\n * Focus doesn't bubble, but you can use it in addEvent() and\n * jsaction anyway. EventContract does the right thing under the\n * hood.\n */\n FOCUS: 'focus',\n\n /**\n * This event only exists in IE. For addEvent() and jsaction, use\n * focus instead; EventContract does the right thing even though\n * focus doesn't bubble.\n */\n FOCUSIN: 'focusin',\n\n /**\n * Analog to focus.\n */\n BLUR: 'blur',\n\n /**\n * Analog to focusin.\n */\n FOCUSOUT: 'focusout',\n\n /**\n * Submit doesn't bubble, so it cannot be used with event\n * contract. However, the browser helpfully fires a click event on\n * the submit button of a form (even if the form is not submitted by\n * a click on the submit button). So you should handle click on the\n * submit button instead.\n */\n SUBMIT: 'submit',\n\n /**\n * The keydown event. In addEvent() and non-click jsaction it represents the\n * regular DOM keydown event. It represents click actions in non-Gecko\n * browsers.\n */\n KEYDOWN: 'keydown',\n\n /**\n * The keypress event. In addEvent() and non-click jsaction it represents the\n * regular DOM keypress event. It represents click actions in Gecko browsers.\n */\n KEYPRESS: 'keypress',\n\n /**\n * The keyup event. In addEvent() and non-click jsaction it represents the\n * regular DOM keyup event. It represents click actions in non-Gecko\n * browsers.\n */\n KEYUP: 'keyup',\n\n /**\n * The mouseup event. Can either be used directly or used implicitly to\n * capture mouseup events. In addEvent(), it represents a regular DOM\n * mouseup event.\n */\n MOUSEUP: 'mouseup',\n\n /**\n * The mousedown event. Can either be used directly or used implicitly to\n * capture mouseenter events. In addEvent(), it represents a regular DOM\n * mouseover event.\n */\n MOUSEDOWN: 'mousedown',\n\n /**\n * The mouseover event. Can either be used directly or used implicitly to\n * capture mouseenter events. In addEvent(), it represents a regular DOM\n * mouseover event.\n */\n MOUSEOVER: 'mouseover',\n\n /**\n * The mouseout event. Can either be used directly or used implicitly to\n * capture mouseover events. In addEvent(), it represents a regular DOM\n * mouseout event.\n */\n MOUSEOUT: 'mouseout',\n\n /**\n * The mouseenter event. Does not bubble and fires individually on each\n * element being entered within a DOM tree.\n */\n MOUSEENTER: 'mouseenter',\n\n /**\n * The mouseleave event. Does not bubble and fires individually on each\n * element being entered within a DOM tree.\n */\n MOUSELEAVE: 'mouseleave',\n\n /**\n * The mousemove event.\n */\n MOUSEMOVE: 'mousemove',\n\n /**\n * The pointerup event. Can either be used directly or used implicitly to\n * capture pointerup events. In addEvent(), it represents a regular DOM\n * pointerup event.\n */\n POINTERUP: 'pointerup',\n\n /**\n * The pointerdown event. Can either be used directly or used implicitly to\n * capture pointerenter events. In addEvent(), it represents a regular DOM\n * mouseover event.\n */\n POINTERDOWN: 'pointerdown',\n\n /**\n * The pointerover event. Can either be used directly or used implicitly to\n * capture pointerenter events. In addEvent(), it represents a regular DOM\n * pointerover event.\n */\n POINTEROVER: 'pointerover',\n\n /**\n * The pointerout event. Can either be used directly or used implicitly to\n * capture pointerover events. In addEvent(), it represents a regular DOM\n * pointerout event.\n */\n POINTEROUT: 'pointerout',\n\n /**\n * The pointerenter event. Does not bubble and fires individually on each\n * element being entered within a DOM tree.\n */\n POINTERENTER: 'pointerenter',\n\n /**\n * The pointerleave event. Does not bubble and fires individually on each\n * element being entered within a DOM tree.\n */\n POINTERLEAVE: 'pointerleave',\n\n /**\n * The pointermove event.\n */\n POINTERMOVE: 'pointermove',\n\n /**\n * The pointercancel event.\n */\n POINTERCANCEL: 'pointercancel',\n\n /**\n * The gotpointercapture event is fired when\n * Element.setPointerCapture(pointerId) is called on a mouse input, or\n * implicitly when a touch input begins.\n */\n GOTPOINTERCAPTURE: 'gotpointercapture',\n\n /**\n * The lostpointercapture event is fired when\n * Element.releasePointerCapture(pointerId) is called, or implicitly after a\n * touch input ends.\n */\n LOSTPOINTERCAPTURE: 'lostpointercapture',\n\n /**\n * The error event. The error event doesn't bubble, but you can use it in\n * addEvent() and jsaction anyway. EventContract does the right thing under\n * the hood (except in IE8 which does not use error events).\n */\n ERROR: 'error',\n\n /**\n * The load event. The load event doesn't bubble, but you can use it in\n * addEvent() and jsaction anyway. EventContract does the right thing\n * under the hood.\n */\n LOAD: 'load',\n\n /**\n * The unload event.\n */\n UNLOAD: 'unload',\n\n /**\n * The touchstart event. Bubbles, will only ever fire in browsers with\n * touch support.\n */\n TOUCHSTART: 'touchstart',\n\n /**\n * The touchend event. Bubbles, will only ever fire in browsers with\n * touch support.\n */\n TOUCHEND: 'touchend',\n\n /**\n * The touchmove event. Bubbles, will only ever fire in browsers with\n * touch support.\n */\n TOUCHMOVE: 'touchmove',\n\n /**\n * The input event.\n */\n INPUT: 'input',\n\n /**\n * The scroll event.\n */\n SCROLL: 'scroll',\n\n /**\n * The toggle event. The toggle event doesn't bubble, but you can use it in\n * addEvent() and jsaction anyway. EventContract does the right thing\n * under the hood.\n */\n TOGGLE: 'toggle',\n\n /**\n * A custom event. The actual custom event type is declared as the 'type'\n * field in the event details. Supported in Firefox 6+, IE 9+, and all Chrome\n * versions.\n *\n * This is an internal name. Users should use jsaction's fireCustomEvent to\n * fire custom events instead of relying on this type to create them.\n */\n CUSTOM: '_custom',\n};\n\n/** All event types that do not bubble or capture and need a polyfill. */\nexport const MOUSE_SPECIAL_EVENT_TYPES = [\n EventType.MOUSEENTER,\n EventType.MOUSELEAVE,\n 'pointerenter',\n 'pointerleave',\n];\n\n/** All event types that are registered in the bubble phase. */\nexport const BUBBLE_EVENT_TYPES = [\n EventType.CLICK,\n EventType.DBLCLICK,\n EventType.FOCUSIN,\n EventType.FOCUSOUT,\n EventType.KEYDOWN,\n EventType.KEYUP,\n EventType.KEYPRESS,\n EventType.MOUSEOVER,\n EventType.MOUSEOUT,\n EventType.SUBMIT,\n EventType.TOUCHSTART,\n EventType.TOUCHEND,\n EventType.TOUCHMOVE,\n 'touchcancel',\n\n 'auxclick',\n 'change',\n 'compositionstart',\n 'compositionupdate',\n 'compositionend',\n 'beforeinput',\n 'input',\n 'select',\n\n 'copy',\n 'cut',\n 'paste',\n 'mousedown',\n 'mouseup',\n 'wheel',\n 'contextmenu',\n\n 'dragover',\n 'dragenter',\n 'dragleave',\n 'drop',\n 'dragstart',\n 'dragend',\n\n 'pointerdown',\n 'pointermove',\n 'pointerup',\n 'pointercancel',\n 'pointerover',\n 'pointerout',\n 'gotpointercapture',\n 'lostpointercapture',\n\n // Video events.\n 'ended',\n 'loadedmetadata',\n\n // Page visibility events.\n 'pagehide',\n 'pageshow',\n 'visibilitychange',\n\n // Content visibility events.\n 'beforematch',\n];\n\n/** All event types that are registered in the capture phase. */\nexport const CAPTURE_EVENT_TYPES = [\n EventType.FOCUS,\n EventType.BLUR,\n EventType.ERROR,\n EventType.LOAD,\n EventType.TOGGLE,\n];\n\n/**\n * Whether or not an event type should be registered in the capture phase.\n * @param eventType\n * @returns bool\n */\nexport const isCaptureEventType = (eventType: string) =>\n CAPTURE_EVENT_TYPES.indexOf(eventType) >= 0;\n\n/** All event types that are registered early. */\nconst EARLY_EVENT_TYPES = BUBBLE_EVENT_TYPES.concat(CAPTURE_EVENT_TYPES);\n\n/**\n * Whether or not an event type is registered in the early contract.\n */\nexport const isEarlyEventType = (eventType: string) => EARLY_EVENT_TYPES.indexOf(eventType) >= 0;\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 {EventHandlerInfo} from './event_handler';\nimport {isCaptureEventType, EventType} from './event_type';\nimport {KeyCode} from './key_code';\n\n/**\n * Gets a browser event type, if it would differ from the JSAction event type.\n */\nexport function getBrowserEventType(eventType: string) {\n // Mouseenter and mouseleave events are not handled directly because they\n // are not available everywhere. In browsers where they are available, they\n // don't bubble and aren't visible at the container boundary. Instead, we\n // synthesize the mouseenter and mouseleave events from mouseover and\n // mouseout events, respectively. Cf. eventcontract.js.\n if (eventType === EventType.MOUSEENTER) {\n return EventType.MOUSEOVER;\n } else if (eventType === EventType.MOUSELEAVE) {\n return EventType.MOUSEOUT;\n } else if (eventType === EventType.POINTERENTER) {\n return EventType.POINTEROVER;\n } else if (eventType === EventType.POINTERLEAVE) {\n return EventType.POINTEROUT;\n }\n return eventType;\n}\n\n/**\n * Registers the event handler function with the given DOM element for\n * the given event type.\n *\n * @param element The element.\n * @param eventType The event type.\n * @param handler The handler function to install.\n * @param passive A boolean value that, if `true`, indicates that the function\n * specified by `handler` will never call `preventDefault()`.\n * @return Information needed to uninstall the event handler eventually.\n */\nexport function addEventListener(\n element: Element,\n eventType: string,\n handler: (event: Event) => void,\n passive?: boolean,\n): EventHandlerInfo {\n // All event handlers are registered in the bubbling\n // phase.\n //\n // All browsers support focus and blur, but these events only are propagated\n // in the capture phase. Very legacy browsers do not support focusin or\n // focusout.\n //\n // It would be a bad idea to register all event handlers in the\n // capture phase because then regular onclick handlers would not be\n // executed at all on events that trigger a jsaction. That's not\n // entirely what we want, at least for now.\n //\n // Error and load events (i.e. on images) do not bubble so they are also\n // handled in the capture phase.\n let capture = false;\n\n if (isCaptureEventType(eventType)) {\n capture = true;\n }\n\n const options = typeof passive === 'boolean' ? {capture, passive} : capture;\n element.addEventListener(eventType, handler, options);\n\n return {eventType, handler, capture, passive};\n}\n\n/**\n * Removes the event handler for the given event from the element.\n * the given event type.\n *\n * @param element The element.\n * @param info The information needed to deregister the handler, as returned by\n * addEventListener(), above.\n */\nexport function removeEventListener(element: Element, info: EventHandlerInfo) {\n if (element.removeEventListener) {\n // It's worth noting that some browser releases have been inconsistent on this, and unless\n // you have specific reasons otherwise, it's probably wise to use the same values used for\n // the call to addEventListener() when calling removeEventListener().\n const options = typeof info.passive === 'boolean' ? {capture: info.capture} : info.capture;\n element.removeEventListener(info.eventType, info.handler as EventListener, options);\n // `detachEvent` is an old DOM API.\n } else if ((element as any).detachEvent) {\n // `detachEvent` is an old DOM API.\n (element as any).detachEvent(`on${info.eventType}`, info.handler);\n }\n}\n\n/**\n * Cancels propagation of an event.\n * @param e The event to cancel propagation for.\n */\nexport function stopPropagation(e: Event) {\n e.stopPropagation ? e.stopPropagation() : (e.cancelBubble = true);\n}\n\n/**\n * Prevents the default action of an event.\n * @param e The event to prevent the default action for.\n */\nexport function preventDefault(e: Event) {\n e.preventDefault ? e.preventDefault() : (e.returnValue = false);\n}\n\n/**\n * Gets the target Element of the event. In Firefox, a text node may appear as\n * the target of the event, in which case we return the parent element of the\n * text node.\n * @param e The event to get the target of.\n * @return The target element.\n */\nexport function getTarget(e: Event): Element {\n let el = e.target as Element;\n\n // In Firefox, the event may have a text node as its target. We always\n // want the parent Element the text node belongs to, however.\n if (!el.getAttribute && el.parentNode) {\n el = el.parentNode as Element;\n }\n\n return el;\n}\n\n/**\n * Whether we are on a Mac. Not pulling in useragent just for this.\n */\nlet isMac: boolean = typeof navigator !== 'undefined' && /Macintosh/.test(navigator.userAgent);\n\n/**\n * Determines and returns whether the given event (which is assumed to be a\n * click event) is a middle click.\n * NOTE: There is not a consistent way to identify middle click\n * http://www.unixpapa.com/js/mouse.html\n */\nfunction isMiddleClick(e: Event): boolean {\n return (\n // `which` is an old DOM API.\n (e as any).which === 2 ||\n // `which` is an old DOM API.\n ((e as any).which == null &&\n // `button` is an old DOM API.\n (e as any).button === 4) // middle click for IE\n );\n}\n\n/**\n * Determines and returns whether the given event (which is assumed\n * to be a click event) is modified. A middle click is considered a modified\n * click to retain the default browser action, which opens a link in a new tab.\n * @param e The event.\n * @return Whether the given event is modified.\n */\nexport function isModifiedClickEvent(e: Event): boolean {\n return (\n // `metaKey` is an old DOM API.\n (isMac && (e as any).metaKey) ||\n // `ctrlKey` is an old DOM API.\n (!isMac && (e as any).ctrlKey) ||\n isMiddleClick(e) ||\n // `shiftKey` is an old DOM API.\n (e as any).shiftKey\n );\n}\n\n/** Whether we are on WebKit (e.g., Chrome). */\nexport const isWebKit: boolean =\n typeof navigator !== 'undefined' &&\n !/Opera/.test(navigator.userAgent) &&\n /WebKit/.test(navigator.userAgent);\n\n/** Whether we are on IE. */\nexport const isIe: boolean =\n typeof navigator !== 'undefined' &&\n (/MSIE/.test(navigator.userAgent) || /Trident/.test(navigator.userAgent));\n\n/** Whether we are on Gecko (e.g., Firefox). */\nexport const isGecko: boolean =\n typeof navigator !== 'undefined' &&\n !/Opera|WebKit/.test(navigator.userAgent) &&\n /Gecko/.test(navigator.product);\n\n/**\n * Determines and returns whether the given element is a valid target for\n * keypress/keydown DOM events that act like regular DOM clicks.\n * @param el The element.\n * @return Whether the given element is a valid action key target.\n */\nexport function isValidActionKeyTarget(el: Element): boolean {\n if (!('getAttribute' in el)) {\n return false;\n }\n if (isTextControl(el)) {\n return false;\n }\n if (isNativelyActivatable(el)) {\n return false;\n }\n // `isContentEditable` is an old DOM API.\n if ((el as any).isContentEditable) {\n return false;\n }\n\n return true;\n}\n\n/**\n * Whether an event has a modifier key activated.\n * @param e The event.\n * @return True, if a modifier key is activated.\n */\nfunction hasModifierKey(e: Event): boolean {\n return (\n // `ctrlKey` is an old DOM API.\n (e as any).ctrlKey ||\n // `shiftKey` is an old DOM API.\n (e as any).shiftKey ||\n // `altKey` is an old DOM API.\n (e as any).altKey ||\n // `metaKey` is an old DOM API.\n (e as any).metaKey\n );\n}\n\n/**\n * Determines and returns whether the given event has a target that already\n * has event handlers attached because it is a native HTML control. Used to\n * determine if preventDefault should be called when isActionKeyEvent is true.\n * @param e The event.\n * @return If preventDefault should be called.\n */\nexport function shouldCallPreventDefaultOnNativeHtmlControl(e: Event): boolean {\n const el = getTarget(e);\n const tagName = el.tagName.toUpperCase();\n const role = (el.getAttribute('role') || '').toUpperCase();\n\n if (tagName === 'BUTTON' || role === 'BUTTON') {\n return true;\n }\n if (!isNativeHTMLControl(el)) {\n return false;\n }\n if (tagName === 'A') {\n return false;\n }\n /**\n * Fix for physical d-pads on feature phone platforms; the native event\n * (ie. isTrusted: true) needs to fire to show the OPTION list. See\n * b/135288469 for more info.\n */\n if (tagName === 'SELECT') {\n return false;\n }\n if (processSpace(el)) {\n return false;\n }\n if (isTextControl(el)) {\n return false;\n }\n return true;\n}\n\n/**\n * Determines and returns whether the given event acts like a regular DOM click,\n * and should be handled instead of the click. If this returns true, the caller\n * will call preventDefault() to prevent a possible duplicate event.\n * This is represented by a keypress (keydown on Gecko browsers) on Enter or\n * Space key.\n * @param e The event.\n * @return True, if the event emulates a DOM click.\n */\nexport function isActionKeyEvent(e: Event): boolean {\n let key =\n // `which` is an old DOM API.\n (e as any).which ||\n // `keyCode` is an old DOM API.\n (e as any).keyCode;\n if (!key && (e as KeyboardEvent).key) {\n key = ACTION_KEY_TO_KEYCODE[(e as KeyboardEvent).key];\n }\n if (isWebKit && key === KeyCode.MAC_ENTER) {\n key = KeyCode.ENTER;\n }\n if (key !== KeyCode.ENTER && key !== KeyCode.SPACE) {\n return false;\n }\n const el = getTarget(e);\n if (e.type !== EventType.KEYDOWN || !isValidActionKeyTarget(el) || hasModifierKey(e)) {\n return false;\n }\n\n // For <input type=\"checkbox\">, we must only handle the browser's native click\n // event, so that the browser can toggle the checkbox.\n if (processSpace(el) && key === KeyCode.SPACE) {\n return false;\n }\n\n // If this element is non-focusable, ignore stray keystrokes (b/18337209)\n // Sscreen readers can move without tab focus, so any tabIndex is focusable.\n // See B/21809604\n if (!isFocusable(el)) {\n return false;\n }\n\n const type = (\n el.getAttribute('role') ||\n (el as HTMLInputElement).type ||\n el.tagName\n ).toUpperCase();\n const isSpecificTriggerKey = IDENTIFIER_TO_KEY_TRIGGER_MAPPING[type] % key === 0;\n const isDefaultTriggerKey = !(type in IDENTIFIER_TO_KEY_TRIGGER_MAPPING) && key === KeyCode.ENTER;\n const hasType = el.tagName.toUpperCase() !== 'INPUT' || !!(el as HTMLInputElement).type;\n return (isSpecificTriggerKey || isDefaultTriggerKey) && hasType;\n}\n\n/**\n * Checks whether a DOM element can receive keyboard focus.\n * This code is based on goog.dom.isFocusable, but simplified since we shouldn't\n * care about visibility if we're already handling a keyboard event.\n */\nfunction isFocusable(el: Element): boolean {\n return (\n (el.tagName in NATIVELY_FOCUSABLE_ELEMENTS || hasSpecifiedTabIndex(el)) &&\n !(el as HTMLInputElement).disabled\n );\n}\n\n/**\n * @param element Element to check.\n * @return Whether the element has a specified tab index.\n */\nfunction hasSpecifiedTabIndex(element: Element): boolean {\n // IE returns 0 for an unset tabIndex, so we must use getAttributeNode(),\n // which returns an object with a 'specified' property if tabIndex is\n // specified. This works on other browsers, too.\n const attrNode = element.getAttributeNode('tabindex'); // Must be lowercase!\n return attrNode != null && attrNode.specified;\n}\n\n/** Element tagnames that are focusable by default. */\nconst NATIVELY_FOCUSABLE_ELEMENTS: {[key: string]: number} = {\n 'A': 1,\n 'INPUT': 1,\n 'TEXTAREA': 1,\n 'SELECT': 1,\n 'BUTTON': 1,\n};\n\n/** @return True, if the Space key was pressed. */\nexport function isSpaceKeyEvent(e: Event): boolean {\n const key =\n // `which` is an old DOM API.\n (e as any).which ||\n // `keyCode` is an old DOM API.\n (e as any).keyCode;\n const el = getTarget(e);\n const elementName = ((el as HTMLInputElement).type || el.tagName).toUpperCase();\n return key === KeyCode.SPACE && elementName !== 'CHECKBOX';\n}\n\n/**\n * Determines whether the event corresponds to a non-bubbling mouse\n * event type (mouseenter, mouseleave, pointerenter, and pointerleave).\n *\n * During mouseover (mouseenter) and pointerover (pointerenter), the\n * relatedTarget is the element being entered from. During mouseout (mouseleave)\n * and pointerout (pointerleave), the relatedTarget is the element being exited\n * to.\n *\n * In both cases, if relatedTarget is outside target, then the corresponding\n * special event has occurred, otherwise it hasn't.\n *\n * @param e The mouseover/mouseout event.\n * @param type The type of the mouse special event.\n * @param element The element on which the jsaction for the\n * mouseenter/mouseleave event is defined.\n * @return True if the event is a mouseenter/mouseleave event.\n */\nexport function isMouseSpecialEvent(e: Event, type: string, element: Element): boolean {\n // `relatedTarget` is an old DOM API.\n const related = (e as any).relatedTarget as Node;\n\n return (\n ((e.type === EventType.MOUSEOVER && type === EventType.MOUSEENTER) ||\n (e.type === EventType.MOUSEOUT && type === EventType.MOUSELEAVE) ||\n (e.type === EventType.POINTEROVER && type === EventType.POINTERENTER) ||\n (e.type === EventType.POINTEROUT && type === EventType.POINTERLEAVE)) &&\n (!related || (related !== element && !element.contains(related)))\n );\n}\n\n/**\n * Creates a new EventLike object for a mouseenter/mouseleave event that's\n * derived from the original corresponding mouseover/mouseout event.\n * @param e The event.\n * @param target The element on which the jsaction for the mouseenter/mouseleave\n * event is defined.\n * @return A modified event-like object copied from the event object passed into\n * this function.\n */\nexport function createMouseSpecialEvent(e: Event, target: Element): Event {\n // We have to create a copy of the event object because we need to mutate\n // its fields. We do this for the special mouse events because the event\n // target needs to be retargeted to the action element rather than the real\n // element (since we are simulating the special mouse events with mouseover/\n // mouseout).\n //\n // Since we're making a copy anyways, we might as well attempt to convert\n // this event into a pseudo-real mouseenter/mouseleave event by adjusting\n // its type.\n //\n const copy: {-readonly [P in keyof Event]?: Event[P]} & {'_originalEvent'?: Event} = {};\n for (const property in e) {\n if (property === 'srcElement' || property === 'target') {\n continue;\n }\n const key = property as keyof Event;\n // Making a copy requires iterating through all properties of `Event`.\n const value = e[key];\n if (typeof value === 'function') {\n continue;\n }\n // Value should be the expected type, but the value of `key` is not known\n // statically.\n copy[key] = value as any;\n }\n if (e.type === EventType.MOUSEOVER) {\n copy['type'] = EventType.MOUSEENTER;\n } else if (e.type === EventType.MOUSEOUT) {\n copy['type'] = EventType.MOUSELEAVE;\n } else if (e.type === EventType.POINTEROVER) {\n copy['type'] = EventType.POINTERENTER;\n } else {\n copy['type'] = EventType.POINTERLEAVE;\n }\n copy['target'] = copy['srcElement'] = target;\n copy['bubbles'] = false;\n copy['_originalEvent'] = e;\n return copy as Event;\n}\n\n/**\n * Returns touch data extracted from the touch event: clientX, clientY, screenX\n * and screenY. If the event has no touch information at all, the returned\n * value is null.\n *\n * The fields of this Object are unquoted.\n *\n * @param event A touch event.\n */\nexport function getTouchData(\n event: TouchEvent,\n): {clientX: number; clientY: number; screenX: number; screenY: number} | null {\n const touch =\n (event.changedTouches && event.changedTouches[0]) || (event.touches && event.touches[0]);\n if (!touch) {\n return null;\n }\n return {\n clientX: touch.clientX,\n clientY: touch.clientY,\n screenX: touch.screenX,\n screenY: touch.screenY,\n };\n}\n\ndeclare interface SyntheticMouseEvent extends Event {\n // Redeclared from Event to indicate that it is not readonly.\n defaultPrevented: boolean;\n originalEventType: string;\n _propagationStopped?: boolean;\n}\n\n/**\n * Creates a new EventLike object for a \"click\" event that's derived from the\n * original corresponding \"touchend\" event for a fast-click implementation.\n *\n * It takes a touch event, adds common fields found in a click event and\n * changes the type to 'click', so that the resulting event looks more like\n * a real click event.\n *\n * @param event A touch event.\n * @return A modified event-like object copied from the event object passed into\n * this function.\n */\nexport function recreateTouchEventAsClick(event: TouchEvent): MouseEvent {\n const click: {-readonly [P in keyof MouseEvent]?: MouseEvent[P]} & Partial<SyntheticMouseEvent> =\n {};\n click['originalEventType'] = event.type;\n click['type'] = EventType.CLICK;\n for (const property in event) {\n if (property === 'type' || property === 'srcElement') {\n continue;\n }\n const key = property as keyof TouchEvent;\n // Making a copy requires iterating through all properties of `TouchEvent`.\n const value = event[key];\n if (typeof value === 'function') {\n continue;\n }\n // Value should be the expected type, but the value of `key` is not known\n // statically.\n click[key as keyof MouseEvent] = value as any;\n }\n\n // Ensure that the event has the most recent timestamp. This timestamp\n // may be used in the future to validate or cancel subsequent click events.\n click['timeStamp'] = Date.now();\n\n // Emulate preventDefault and stopPropagation behavior\n click['defaultPrevented'] = false;\n click['preventDefault'] = syntheticPreventDefault;\n click['_propagationStopped'] = false;\n click['stopPropagation'] = syntheticStopPropagation;\n\n // Emulate click coordinates using touch info\n const touch = getTouchData(event);\n if (touch) {\n click['clientX'] = touch.clientX;\n click['clientY'] = touch.clientY;\n click['screenX'] = touch.screenX;\n click['screenY'] = touch.screenY;\n }\n return click as MouseEvent;\n}\n\n/**\n * An implementation of \"preventDefault\" for a synthesized event. Simply\n * sets \"defaultPrevented\" property to true.\n */\nfunction syntheticPreventDefault(this: Event) {\n (this as SyntheticMouseEvent).defaultPrevented = true;\n}\n\n/**\n * An implementation of \"stopPropagation\" for a synthesized event. It simply\n * sets a synthetic non-standard \"_propagationStopped\" property to true.\n */\nfunction syntheticStopPropagation(this: Event) {\n (this as SyntheticMouseEvent)._propagationStopped = true;\n}\n\n/**\n * Mapping of KeyboardEvent.key values to\n * KeyCode values.\n */\nconst ACTION_KEY_TO_KEYCODE: {[key: string]: number} = {\n 'Enter': KeyCode.ENTER,\n ' ': KeyCode.SPACE,\n};\n\n/**\n * Mapping of HTML element identifiers (ARIA role, type, or tagName) to the\n * keys (enter and/or space) that should activate them. A value of zero means\n * that both should activate them.\n */\nexport const IDENTIFIER_TO_KEY_TRIGGER_MAPPING: {[key: string]: number} = {\n 'A': KeyCode.ENTER,\n 'BUTTON': 0,\n 'CHECKBOX': KeyCode.SPACE,\n 'COMBOBOX': KeyCode.ENTER,\n 'FILE': 0,\n 'GRIDCELL': KeyCode.ENTER,\n 'LINK': KeyCode.ENTER,\n 'LISTBOX': KeyCode.ENTER,\n 'MENU': 0,\n 'MENUBAR': 0,\n 'MENUITEM': 0,\n 'MENUITEMCHECKBOX': 0,\n 'MENUITEMRADIO': 0,\n 'OPTION': 0,\n 'RADIO': KeyCode.SPACE,\n 'RADIOGROUP': KeyCode.SPACE,\n 'RESET': 0,\n 'SUBMIT': 0,\n 'SWITCH': KeyCode.SPACE,\n 'TAB': 0,\n 'TREE': KeyCode.ENTER,\n 'TREEITEM': KeyCode.ENTER,\n};\n\n/**\n * Returns whether or not to process space based on the type of the element;\n * checks to make sure that type is not null.\n * @param element The element.\n * @return Whether or not to process space based on type.\n */\nfunction processSpace(element: Element): boolean {\n const type = (element.getAttribute('type') || element.tagName).toUpperCase();\n return type in PROCESS_SPACE;\n}\n\n/**\n * Returns whether or not the given element is a text control.\n * @param el The element.\n * @return Whether or not the given element is a text control.\n */\nfunction isTextControl(el: Element): boolean {\n const type = (el.getAttribute('type') || el.tagName).toUpperCase();\n return type in TEXT_CONTROLS;\n}\n\n/**\n * Returns if the given element is a native HTML control.\n * @param el The element.\n * @return If the given element is a native HTML control.\n */\nexport function isNativeHTMLControl(el: Element): boolean {\n return el.tagName.toUpperCase() in NATIVE_HTML_CONTROLS;\n}\n\n/**\n * Returns if the given element is natively activatable. Browsers emit click\n * events for natively activatable elements, even when activated via keyboard.\n * For these elements, we don't need to raise a11y click events.\n * @param el The element.\n * @return If the given element is a native HTML control.\n */\nfunction isNativelyActivatable(el: Element): boolean {\n return (\n el.tagName.toUpperCase() === 'BUTTON' ||\n (!!(el as HTMLInputElement).type && (el as HTMLInputElement).type.toUpperCase() === 'FILE')\n );\n}\n\n/**\n * HTML <input> types (not ARIA roles) which will auto-trigger a click event for\n * the Space key, with side-effects. We will not call preventDefault if space is\n * pressed, nor will we raise a11y click events. For all other elements, we can\n * suppress the default event (which has no desired side-effects) and handle the\n * keydown ourselves.\n */\nconst PROCESS_SPACE: {[key: string]: boolean} = {\n 'CHECKBOX': true,\n 'FILE': true,\n 'OPTION': true,\n 'RADIO': true,\n};\n\n/** TagNames and Input types for which to not process enter/space as click. */\nconst TEXT_CONTROLS: {[key: string]: boolean} = {\n 'COLOR': true,\n 'DATE': true,\n 'DATETIME': true,\n 'DATETIME-LOCAL': true,\n 'EMAIL': true,\n 'MONTH': true,\n 'NUMBER': true,\n 'PASSWORD': true,\n 'RANGE': true,\n 'SEARCH': true,\n 'TEL': true,\n 'TEXT': true,\n 'TEXTAREA': true,\n 'TIME': true,\n 'URL': true,\n 'WEEK': true,\n};\n\n/** TagNames that are native HTML controls. */\nconst NATIVE_HTML_CONTROLS: {[key: string]: boolean} = {\n 'A': true,\n 'AREA': true,\n 'BUTTON': true,\n 'DIALOG': true,\n 'IMG': true,\n 'INPUT': true,\n 'LINK': true,\n 'MENU': true,\n 'OPTGROUP': true,\n 'OPTION': true,\n 'PROGRESS': true,\n 'SELECT': true,\n 'TEXTAREA': true,\n};\n\n/** Exported for testing. */\nexport const testing = {\n setIsMac(value: boolean) {\n isMac = 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 * as eventLib from './event';\nimport {EventHandlerInfo} from './event_handler';\n\n/**\n * An `EventContractContainerManager` provides the common interface for managing\n * containers.\n */\nexport interface EventContractContainerManager {\n addEventListener(\n eventType: string,\n getHandler: (element: Element) => (event: Event) => void,\n passive?: boolean,\n ): void;\n\n cleanUp(): void;\n}\n\n/**\n * Whether the user agent is running on iOS.\n */\nconst isIos = typeof navigator !== 'undefined' && /iPhone|iPad|iPod/.test(navigator.userAgent);\n\n/**\n * A class representing a container node and all the event handlers\n * installed on it. Used so that handlers can be cleaned up if the\n * container is removed from the contract.\n */\nexport class EventContractContainer implements EventContractContainerManager {\n /**\n * Array of event handlers and their corresponding event types that are\n * installed on this container.\n *\n */\n private handlerInfos: EventHandlerInfo[] = [];\n\n /**\n * @param element The container Element.\n */\n constructor(readonly element: Element) {}\n\n /**\n * Installs the provided installer on the element owned by this container,\n * and maintains a reference to resulting handler in order to remove it\n * later if desired.\n */\n addEventListener(\n eventType: string,\n getHandler: (element: Element) => (event: Event) => void,\n passive?: boolean,\n ) {\n // In iOS, event bubbling doesn't happen automatically in any DOM element,\n // unless it has an onclick attribute or DOM event handler attached to it.\n // This breaks JsAction in some cases. See \"Making Elements Clickable\"\n // section at http://goo.gl/2VoGnB.\n //\n // A workaround for this issue is to change the CSS cursor style to 'pointer'\n // for the container element, which magically turns on event bubbling. This\n // solution is described in the comments section at http://goo.gl/6pEO1z.\n //\n // We use a navigator.userAgent check here as this problem is present both\n // on Mobile Safari and thin WebKit wrappers, such as Chrome for iOS.\n if (isIos) {\n (this.element as HTMLElement).style.cursor = 'pointer';\n }\n this.handlerInfos.push(\n eventLib.addEventListener(this.element, eventType, getHandler(this.element), passive),\n );\n }\n\n /**\n * Removes all the handlers installed on this container.\n */\n cleanUp() {\n for (let i = 0; i < this.handlerInfos.length; i++) {\n eventLib.removeEventListener(this.element, this.handlerInfos[i]);\n }\n\n this.handlerInfos = [];\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 Char = {\n /**\n * The separator between the namespace and the action name in the\n * jsaction attribute value.\n */\n NAMESPACE_ACTION_SEPARATOR: '.' as const,\n\n /**\n * The separator between the event name and action in the jsaction\n * attribute value.\n */\n EVENT_ACTION_SEPARATOR: ':' as const,\n};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * Records information about the action that should handle a given `Event`.\n */\nexport interface ActionInfo {\n name: string;\n element: Element;\n}\n\ntype ActionInfoInternal = [name: string, element: Element];\n\n/**\n * Records information for later handling of events. This type is\n * shared, and instances of it are passed, between the eventcontract\n * and the dispatcher jsbinary. Therefore, the fields of this type are\n * referenced by string literals rather than property literals\n * throughout the code.\n *\n * 'targetElement' is the element the action occurred on, 'actionElement'\n * is the element that has the jsaction handler.\n *\n * A null 'actionElement' identifies an EventInfo instance that didn't match a\n * jsaction attribute. This allows us to execute global event handlers with the\n * appropriate event type (including a11y clicks and custom events).\n * The declare portion of this interface creates a set of externs that make sure\n * renaming doesn't happen for EventInfo. This is important since EventInfo\n * is shared across multiple binaries.\n */\nexport declare interface EventInfo {\n eventType: string;\n event: Event;\n targetElement: Element;\n /** The element that is the container for this Event. */\n eic: Element;\n timeStamp: number;\n /**\n * The action parsed from the JSAction element.\n */\n eia?: ActionInfoInternal;\n /**\n * Whether this `Event` is a replay event, meaning no dispatcher was\n * installed when this `Event` was originally dispatched.\n */\n eirp?: boolean;\n /**\n * Whether this `Event` represents a `keydown` event that should be processed\n * as a `click`. Only used when a11y click events is on.\n */\n eiack?: boolean;\n /** Whether action resolution has already run on this `EventInfo`. */\n eir?: boolean;\n}\n\n/** Added for readability when accessing stable property names. */\nexport function getEventType(eventInfo: EventInfo) {\n return eventInfo.eventType;\n}\n\n/** Added for readability when accessing stable property names. */\nexport function setEventType(eventInfo: EventInfo, eventType: string) {\n eventInfo.eventType = eventType;\n}\n\n/** Added for readability when accessing stable property names. */\nexport function getEvent(eventInfo: EventInfo) {\n return eventInfo.event;\n}\n\n/** Added for readability when accessing stable property names. */\nexport function setEvent(eventInfo: EventInfo, event: Event) {\n eventInfo.event = event;\n}\n\n/** Added for readability when accessing stable property names. */\nexport function getTargetElement(eventInfo: EventInfo) {\n return eventInfo.targetElement;\n}\n\n/** Added for readability when accessing stable property names. */\nexport function setTargetElement(eventInfo: EventInfo, targetElement: Element) {\n eventInfo.targetElement = targetElement;\n}\n\n/** Added for readability when accessing stable property names. */\nexport function getContainer(eventInfo: EventInfo) {\n return eventInfo.eic;\n}\n\n/** Added for readability when accessing stable property names. */\nexport function setContainer(eventInfo: EventInfo, container: Element) {\n eventInfo.eic = container;\n}\n\n/** Added for readability when accessing stable property names. */\nexport function getTimestamp(eventInfo: EventInfo) {\n return eventInfo.timeStamp;\n}\n\n/** Added for readability when accessing stable property names. */\nexport function setTimestamp(eventInfo: EventInfo, timestamp: number) {\n eventInfo.timeStamp = timestamp;\n}\n\n/** Added for readability when accessing stable property names. */\nexport function getAction(eventInfo: EventInfo) {\n return eventInfo.eia;\n}\n\n/** Added for readability when accessing stable property names. */\nexport function setAction(eventInfo: EventInfo, actionName: string, actionElement: Element) {\n eventInfo.eia = [actionName, actionElement];\n}\n\n/** Added for readability when accessing stable property names. */\nexport function unsetAction(eventInfo: EventInfo) {\n eventInfo.eia = undefined;\n}\n\n/** Added for readability when accessing stable property names. */\nexport function getActionName(actionInfo: ActionInfoInternal) {\n return actionInfo[0];\n}\n\n/** Added for readability when accessing stable property names. */\nexport function getActionElement(actionInfo: ActionInfoInternal) {\n return actionInfo[1];\n}\n\n/** Added for readability when accessing stable property names. */\nexport function getIsReplay(eventInfo: EventInfo) {\n return eventInfo.eirp;\n}\n\n/** Added for readability when accessing stable property names. */\nexport function setIsReplay(eventInfo: EventInfo, replay: boolean) {\n eventInfo.eirp = replay;\n}\n\n/** Added for readability when accessing stable property names. */\nexport function getA11yClickKey(eventInfo: EventInfo) {\n return eventInfo.eiack;\n}\n\n/** Added for readability when accessing stable property names. */\nexport function setA11yClickKey(eventInfo: EventInfo, a11yClickKey: boolean) {\n eventInfo.eiack = a11yClickKey;\n}\n\n/** Added for readability when accessing stable property names. */\nexport function getResolved(eventInfo: EventInfo) {\n return eventInfo.eir;\n}\n\n/** Added for readability when accessing stable property names. */\nexport function setResolved(eventInfo: EventInfo, resolved: boolean) {\n eventInfo.eir = resolved;\n}\n\n/** Clones an `EventInfo` */\nexport function cloneEventInfo(eventInfo: EventInfo): EventInfo {\n return {\n eventType: eventInfo.eventType,\n event: eventInfo.event,\n targetElement: eventInfo.targetElement,\n eic: eventInfo.eic,\n eia: eventInfo.eia,\n timeStamp: eventInfo.timeStamp,\n eirp: eventInfo.eirp,\n eiack: eventInfo.eiack,\n eir: eventInfo.eir,\n };\n}\n\n/**\n * Utility function for creating an `EventInfo`.\n *\n * This can be used from code-size sensitive compilation units, as taking\n * parameters vs. an `Object` literal reduces code size.\n */\nexport function createEventInfoFromParameters(\n eventType: string,\n event: Event,\n targetElement: Element,\n container: Element,\n timestamp: number,\n action?: ActionInfoInternal,\n isReplay?: boolean,\n a11yClickKey?: boolean,\n): EventInfo {\n return {\n eventType,\n event,\n targetElement,\n eic: container,\n timeStamp: timestamp,\n eia: action,\n eirp: isReplay,\n eiack: a11yClickKey,\n };\n}\n\n/**\n * Utility function for creating an `EventInfo`.\n *\n * This should be used in compilation units that are less sensitive to code\n * size.\n */\nexport function createEventInfo({\n eventType,\n event,\n targetElement,\n container,\n timestamp,\n action,\n isReplay,\n a11yClickKey,\n}: {\n eventType: string;\n event: Event;\n targetElement: Element;\n container: Element;\n timestamp: number;\n action?: ActionInfo;\n isReplay?: boolean;\n a11yClickKey?: boolean;\n}): EventInfo {\n return {\n eventType,\n event,\n targetElement,\n eic: container,\n timeStamp: timestamp,\n eia: action ? [action.name, action.element] : undefined,\n eirp: isReplay,\n eiack: a11yClickKey,\n };\n}\n\n/**\n * Utility class around an `EventInfo`.\n *\n * This should be used in compilation units that are less sensitive to code\n * size.\n */\nexport class EventInfoWrapper {\n constructor(readonly eventInfo: EventInfo) {}\n\n getEventType() {\n return getEventType(this.eventInfo);\n }\n\n setEventType(eventType: string) {\n setEventType(this.eventInfo, eventType);\n }\n\n getEvent() {\n return getEvent(this.eventInfo);\n }\n\n setEvent(event: Event) {\n setEvent(this.eventInfo, event);\n }\n\n getTargetElement() {\n return getTargetElement(this.eventInfo);\n }\n\n setTargetElement(targetElement: Element) {\n setTargetElement(this.eventInfo, targetElement);\n }\n\n getContainer() {\n return getContainer(this.eventInfo);\n }\n\n setContainer(container: Element) {\n setContainer(this.eventInfo, container);\n }\n getTimestamp() {\n return getTimestamp(this.eventInfo);\n }\n\n setTimestamp(timestamp: number) {\n setTimestamp(this.eventInfo, timestamp);\n }\n\n getAction() {\n const action = getAction(this.eventInfo);\n if (!action) return undefined;\n return {\n name: action[0],\n element: action[1],\n };\n }\n\n setAction(action: ActionInfo | undefined) {\n if (!action) {\n unsetAction(this.eventInfo);\n return;\n }\n setAction(this.eventInfo, action.name, action.element);\n }\n\n getIsReplay() {\n return getIsReplay(this.eventInfo);\n }\n\n setIsReplay(replay: boolean) {\n setIsReplay(this.eventInfo, replay);\n }\n\n getResolved() {\n return getResolved(this.eventInfo);\n }\n\n setResolved(resolved: boolean) {\n setResolved(this.eventInfo, resolved);\n }\n\n clone() {\n return new EventInfoWrapper(cloneEventInfo(this.eventInfo));\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 {Attribute} from './attribute';\nimport {Char} from './char';\nimport {EventType} from './event_type';\nimport {Property} from './property';\nimport * as a11yClick from './a11y_click';\nimport * as cache from './cache';\nimport * as eventInfoLib from './event_info';\nimport * as eventLib from './event';\n\n/**\n * Since maps from event to action are immutable we can use a single map\n * to represent the empty map.\n */\nconst EMPTY_ACTION_MAP: {[key: string]: string} = {};\n\n/**\n * This regular expression matches a semicolon.\n */\nconst REGEXP_SEMICOLON = /\\s*;\\s*/;\n\n/** If no event type is defined, defaults to `click`. */\nconst DEFAULT_EVENT_TYPE: string = EventType.CLICK;\n\n/** Resolves actions for Events. */\nexport class ActionResolver {\n private a11yClickSupport: boolean = false;\n private clickModSupport: boolean = true;\n private readonly syntheticMouseEventSupport: boolean;\n\n private updateEventInfoForA11yClick?: (eventInfo: eventInfoLib.EventInfo) => void = undefined;\n\n private preventDefaultForA11yClick?: (eventInfo: eventInfoLib.EventInfo) => void = undefined;\n\n private populateClickOnlyAction?: (\n actionElement: Element,\n eventInfo: eventInfoLib.EventInfo,\n actionMap: {[key: string]: string | undefined},\n ) => void = undefined;\n\n constructor({\n syntheticMouseEventSupport = false,\n clickModSupport = true,\n }: {\n syntheticMouseEventSupport?: boolean;\n clickModSupport?: boolean;\n } = {}) {\n this.syntheticMouseEventSupport = syntheticMouseEventSupport;\n this.clickModSupport = clickModSupport;\n }\n\n resolveEventType(eventInfo: eventInfoLib.EventInfo) {\n // We distinguish modified and plain clicks in order to support the\n // default browser behavior of modified clicks on links; usually to\n // open the URL of the link in new tab or new window on ctrl/cmd\n // click. A DOM 'click' event is mapped to the jsaction 'click'\n // event iff there is no modifier present on the event. If there is\n // a modifier, it's mapped to 'clickmod' instead.\n //\n // It's allowed to omit the event in the jsaction attribute. In that\n // case, 'click' is assumed. Thus the following two are equivalent:\n //\n // <a href=\"someurl\" jsaction=\"gna.fu\">\n // <a href=\"someurl\" jsaction=\"click:gna.fu\">\n //\n // For unmodified clicks, EventContract invokes the jsaction\n // 'gna.fu'. For modified clicks, EventContract won't find a\n // suitable action and leave the event to be handled by the\n // browser.\n //\n // In order to also invoke a jsaction handler for a modifier click,\n // 'clickmod' needs to be used:\n //\n // <a href=\"someurl\" jsaction=\"clickmod:gna.fu\">\n //\n // EventContract invokes the jsaction 'gna.fu' for modified\n // clicks. Unmodified clicks are left to the browser.\n //\n // In order to set up the event contract to handle both clickonly and\n // clickmod, only addEvent(EventType.CLICK) is necessary.\n //\n // In order to set up the event contract to handle click,\n // addEvent() is necessary for CLICK, KEYDOWN, and KEYPRESS event types. If\n // a11y click support is enabled, addEvent() will set up the appropriate key\n // event handler automatically.\n if (\n this.clickModSupport &&\n eventInfoLib.getEventType(eventInfo) === EventType.CLICK &&\n eventLib.isModifiedClickEvent(eventInfoLib.getEvent(eventInfo))\n ) {\n eventInfoLib.setEventType(eventInfo, EventType.CLICKMOD);\n } else if (this.a11yClickSupport) {\n this.updateEventInfoForA11yClick!(eventInfo);\n }\n }\n\n resolveAction(eventInfo: eventInfoLib.EventInfo) {\n if (eventInfoLib.getResolved(eventInfo)) {\n return;\n }\n this.populateAction(eventInfo, eventInfoLib.getTargetElement(eventInfo));\n eventInfoLib.setResolved(eventInfo, true);\n }\n\n resolveParentAction(eventInfo: eventInfoLib.EventInfo) {\n const action = eventInfoLib.getAction(eventInfo);\n const actionElement = action && eventInfoLib.getActionElement(action);\n eventInfoLib.unsetAction(eventInfo);\n const parentNode = actionElement && this.getParentNode(actionElement);\n if (!parentNode) {\n return;\n }\n this.populateAction(eventInfo, parentNode);\n }\n\n /**\n * Searches for a jsaction that the DOM event maps to and creates an\n * object containing event information used for dispatching by\n * jsaction.Dispatcher. This method populates the `action` and `actionElement`\n * fields of the EventInfo object passed in by finding the first\n * jsaction attribute above the target Node of the event, and below\n * the container Node, that specifies a jsaction for the event\n * type. If no such jsaction is found, then action is undefined.\n *\n * @param eventInfo `EventInfo` to set `action` and `actionElement` if an\n * action is found on any `Element` in the path of the `Event`.\n */\n private populateAction(eventInfo: eventInfoLib.EventInfo, currentTarget: Element) {\n let actionElement: Element | null = currentTarget;\n while (actionElement && actionElement !== eventInfoLib.getContainer(eventInfo)) {\n if (actionElement.nodeType === Node.ELEMENT_NODE) {\n this.populateActionOnElement(actionElement, eventInfo);\n }\n\n if (eventInfoLib.getAction(eventInfo)) {\n // An event is handled by at most one jsaction. Thus we stop at the\n // first matching jsaction specified in a jsaction attribute up the\n // ancestor chain of the event target node.\n break;\n }\n actionElement = this.getParentNode(actionElement);\n }\n\n const action = eventInfoLib.getAction(eventInfo);\n if (!action) {\n // No action found.\n return;\n }\n\n if (this.a11yClickSupport) {\n this.preventDefaultForA11yClick!(eventInfo);\n }\n\n // We attempt to handle the mouseenter/mouseleave events here by\n // detecting whether the mouseover/mouseout events correspond to\n // entering/leaving an element.\n if (this.syntheticMouseEventSupport) {\n if (\n eventInfoLib.getEventType(eventInfo) === EventType.MOUSEENTER ||\n eventInfoLib.getEventType(eventInfo) === EventType.MOUSELEAVE ||\n eventInfoLib.getEventType(eventInfo) === EventType.POINTERENTER ||\n eventInfoLib.getEventType(eventInfo) === EventType.POINTERLEAVE\n ) {\n // We attempt to handle the mouseenter/mouseleave events here by\n // detecting whether the mouseover/mouseout events correspond to\n // entering/leaving an element.\n if (\n eventLib.isMouseSpecialEvent(\n eventInfoLib.getEvent(eventInfo),\n eventInfoLib.getEventType(eventInfo),\n eventInfoLib.getActionElement(action),\n )\n ) {\n // If both mouseover/mouseout and mouseenter/mouseleave events are\n // enabled, two separate handlers for mouseover/mouseout are\n // registered. Both handlers will see the same event instance\n // so we create a copy to avoid interfering with the dispatching of\n // the mouseover/mouseout event.\n const copiedEvent = eventLib.createMouseSpecialEvent(\n eventInfoLib.getEvent(eventInfo),\n eventInfoLib.getActionElement(action),\n );\n eventInfoLib.setEvent(eventInfo, copiedEvent);\n // Since the mouseenter/mouseleave events do not bubble, the target\n // of the event is technically the `actionElement` (the node with the\n // `jsaction` attribute)\n eventInfoLib.setTargetElement(eventInfo, eventInfoLib.getActionElement(action));\n } else {\n eventInfoLib.unsetAction(eventInfo);\n }\n }\n }\n }\n\n /**\n * Walk to the parent node, unless the node has a different owner in\n * which case we walk to the owner. Attempt to walk to host of a\n * shadow root if needed.\n */\n private getParentNode(element: Element): Element | null {\n const owner = element[Property.OWNER];\n if (owner) {\n return owner as Element;\n }\n const parentNode = element.parentNode;\n if (parentNode?.nodeName === '#document-fragment') {\n return (parentNode as ShadowRoot | null)?.host ?? null;\n }\n return parentNode as Element | null;\n }\n\n /**\n * Accesses the jsaction map on a node and retrieves the name of the\n * action the given event is mapped to, if any. It parses the\n * attribute value and stores it in a property on the node for\n * subsequent retrieval without re-parsing and re-accessing the\n * attribute.\n *\n * @param actionElement The DOM node to retrieve the jsaction map from.\n * @param eventInfo `EventInfo` to set `action` and `actionElement` if an\n * action is found on the `actionElement`.\n */\n private populateActionOnElement(actionElement: Element, eventInfo: eventInfoLib.EventInfo) {\n const actionMap = this.parseActions(actionElement);\n\n const actionName = actionMap[eventInfoLib.getEventType(eventInfo)];\n if (actionName !== undefined) {\n eventInfoLib.setAction(eventInfo, actionName, actionElement);\n }\n\n if (this.a11yClickSupport) {\n this.populateClickOnlyAction!(actionElement, eventInfo, actionMap);\n }\n }\n\n /**\n * Parses and caches an element's jsaction element into a map.\n *\n * This is primarily for internal use.\n *\n * @param actionElement The DOM node to retrieve the jsaction map from.\n * @return Map from event to qualified name of the jsaction bound to it.\n */\n private parseActions(actionElement: Element): {[key: string]: string | undefined} {\n let actionMap: {[key: string]: string | undefined} | undefined = cache.get(actionElement);\n if (!actionMap) {\n const jsactionAttribute = actionElement.getAttribute(Attribute.JSACTION);\n if (!jsactionAttribute) {\n actionMap = EMPTY_ACTION_MAP;\n cache.set(actionElement, actionMap);\n } else {\n actionMap = cache.getParsed(jsactionAttribute);\n if (!actionMap) {\n actionMap = {};\n const values = jsactionAttribute.split(REGEXP_SEMICOLON);\n for (let idx = 0; idx < values.length; idx++) {\n const value = values[idx];\n if (!value) {\n continue;\n }\n const colon = value.indexOf(Char.EVENT_ACTION_SEPARATOR);\n const hasColon = colon !== -1;\n const type = hasColon ? value.substr(0, colon).trim() : DEFAULT_EVENT_TYPE;\n const action = hasColon ? value.substr(colon + 1).trim() : value;\n actionMap[type] = action;\n }\n cache.setParsed(jsactionAttribute, actionMap);\n }\n cache.set(actionElement, actionMap);\n }\n }\n return actionMap;\n }\n\n addA11yClickSupport(\n updateEventInfoForA11yClick: typeof a11yClick.updateEventInfoForA11yClick,\n preventDefaultForA11yClick: typeof a11yClick.preventDefaultForA11yClick,\n populateClickOnlyAction: typeof a11yClick.populateClickOnlyAction,\n ) {\n this.a11yClickSupport = true;\n this.updateEventInfoForA11yClick = updateEventInfoForA11yClick;\n this.preventDefaultForA11yClick = preventDefaultForA11yClick;\n this.populateClickOnlyAction = populateClickOnlyAction;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 An enum to control who can call certain jsaction APIs.\n */\n\nexport enum Restriction {\n I_AM_THE_JSACTION_FRAMEWORK,\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 {EventInfo, EventInfoWrapper} from './event_info';\nimport {EventType} from './event_type';\nimport {Restriction} from './restriction';\nimport {UnrenamedEventContract} from './eventcontract';\nimport * as eventLib from './event';\nimport {ActionResolver} from './action_resolver';\n\n/**\n * A replayer is a function that is called when there are queued events,\n * either from the `EventContract` or when there are no detected handlers.\n */\nexport type Replayer = (eventInfoWrappers: EventInfoWrapper[]) => void;\n\n/**\n * Receives a DOM event, determines the jsaction associated with the source\n * element of the DOM event, and invokes the handler associated with the\n * jsaction.\n */\nexport class Dispatcher {\n // The ActionResolver to use to resolve actions.\n private actionResolver?: ActionResolver;\n\n /** The replayer function to be called when there are queued events. */\n private eventReplayer?: Replayer;\n\n /** Whether the event replay is scheduled. */\n private eventReplayScheduled = false;\n\n /** The queue of events. */\n private readonly replayEventInfoWrappers: EventInfoWrapper[] = [];\n\n /**\n * Options are:\n * - `eventReplayer`: When the event contract dispatches replay events\n * to the Dispatcher, the Dispatcher collects them and in the next tick\n * dispatches them to the `eventReplayer`. Defaults to dispatching to `dispatchDelegate`.\n * @param dispatchDelegate A function that should handle dispatching an `EventInfoWrapper` to handlers.\n */\n constructor(\n private readonly dispatchDelegate: (eventInfoWrapper: EventInfoWrapper) => void,\n {\n actionResolver,\n eventReplayer,\n }: {actionResolver?: ActionResolver; eventReplayer?: Replayer} = {},\n ) {\n this.actionResolver = actionResolver;\n this.eventReplayer = eventReplayer;\n }\n\n /**\n * Receives an event or the event queue from the EventContract. The event\n * queue is copied and it attempts to replay.\n * If event info is passed in it looks for an action handler that can handle\n * the given event. If there is no handler registered queues the event and\n * checks if a loader is registered for the given namespace. If so, calls it.\n *\n * Alternatively, if in global dispatch mode, calls all registered global\n * handlers for the appropriate event type.\n *\n * The three functionalities of this call are deliberately not split into\n * three methods (and then declared as an abstract interface), because the\n * interface is used by EventContract, which lives in a different jsbinary.\n * Therefore the interface between the three is defined entirely in terms that\n * are invariant under jscompiler processing (Function and Array, as opposed\n * to a custom type with method names).\n *\n * @param eventInfo The info for the event that triggered this call or the\n * queue of events from EventContract.\n */\n dispatch(eventInfo: EventInfo): void {\n const eventInfoWrapper = new EventInfoWrapper(eventInfo);\n this.actionResolver?.resolveEventType(eventInfo);\n this.actionResolver?.resolveAction(eventInfo);\n const action = eventInfoWrapper.getAction();\n if (action && shouldPreventDefaultBeforeDispatching(action.element, eventInfoWrapper)) {\n eventLib.preventDefault(eventInfoWrapper.getEvent());\n }\n if (this.eventReplayer && eventInfoWrapper.getIsReplay()) {\n this.scheduleEventInfoWrapperReplay(eventInfoWrapper);\n return;\n }\n this.dispatchDelegate(eventInfoWrapper);\n }\n\n /**\n * Schedules an `EventInfoWrapper` for replay. The replaying will happen in its own\n * stack once the current flow cedes control. This is done to mimic\n * browser event handling.\n */\n private scheduleEventInfoWrapperReplay(eventInfoWrapper: EventInfoWrapper) {\n this.replayEventInfoWrappers.push(eventInfoWrapper);\n if (this.eventReplayScheduled) {\n return;\n }\n this.eventReplayScheduled = true;\n Promise.resolve().then(() => {\n this.eventReplayScheduled = false;\n this.eventReplayer!(this.replayEventInfoWrappers);\n });\n }\n}\n\n/**\n * Creates an `EventReplayer` that calls the `replay` function for every `eventInfoWrapper` in\n * the queue.\n */\nexport function createEventReplayer(replay: (eventInfoWrapper: EventInfoWrapper) => void) {\n return (eventInfoWrappers: EventInfoWrapper[]) => {\n for (const eventInfoWrapper of eventInfoWrappers) {\n replay(eventInfoWrapper);\n }\n };\n}\n\n/**\n * Returns true if the default action of this event should be prevented before\n * this event is dispatched.\n */\nfunction shouldPreventDefaultBeforeDispatching(\n actionElement: Element,\n eventInfoWrapper: EventInfoWrapper,\n): boolean {\n // Prevent browser from following <a> node links if a jsaction is present\n // and we are dispatching the action now. Note that the targetElement may be\n // a child of an anchor that has a jsaction attached. For that reason, we\n // need to check the actionElement rather than the targetElement.\n return (\n actionElement.tagName === 'A' &&\n (eventInfoWrapper.getEventType() === EventType.CLICK ||\n eventInfoWrapper.getEventType() === EventType.CLICKMOD)\n );\n}\n\n/**\n * Registers deferred functionality for an EventContract and a Jsaction\n * Dispatcher.\n */\nexport function registerDispatcher(eventContract: UnrenamedEventContract, dispatcher: Dispatcher) {\n eventContract.ecrd((eventInfo: EventInfo) => {\n dispatcher.dispatch(eventInfo);\n }, Restriction.I_AM_THE_JSACTION_FRAMEWORK);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 {ActionResolver} from './action_resolver';\nimport {Dispatcher} from './dispatcher';\nimport {EventInfo, EventInfoWrapper} from './event_info';\nimport {isCaptureEventType} from './event_type';\nimport {UnrenamedEventContract} from './eventcontract';\nimport {Restriction} from './restriction';\n\n// Necessary to make the `ngDevMode` global types available.\nimport '../../../src/util/ng_dev_mode';\n\n/**\n * A replayer is a function that is called when there are queued events, from the `EventContract`.\n */\nexport type Replayer = (eventInfoWrappers: Event[]) => void;\n\n/** An internal symbol used to indicate whether propagation should be stopped or not. */\nexport const PROPAGATION_STOPPED_SYMBOL: unique symbol =\n /* @__PURE__ */ Symbol.for('propagationStopped');\n\n/** Extra event phases beyond what the browser provides. */\nexport const EventPhase = {\n REPLAY: 101,\n};\n\nconst PREVENT_DEFAULT_ERROR_MESSAGE_DETAILS =\n ' Because event replay occurs after browser dispatch, `preventDefault` would have no ' +\n 'effect. You can check whether an event is being replayed by accessing the event phase: ' +\n '`event.eventPhase === EventPhase.REPLAY`.';\nconst PREVENT_DEFAULT_ERROR_MESSAGE = `\\`preventDefault\\` called during event replay.`;\nconst COMPOSED_PATH_ERROR_MESSAGE_DETAILS =\n ' Because event replay occurs after browser ' +\n 'dispatch, `composedPath()` will be empty. Iterate parent nodes from `event.target` or ' +\n '`event.currentTarget` if you need to check elements in the event path.';\nconst COMPOSED_PATH_ERROR_MESSAGE = `\\`composedPath\\` called during event replay.`;\n\ndeclare global {\n interface Event {\n [PROPAGATION_STOPPED_SYMBOL]?: boolean;\n }\n}\n\n/**\n * A dispatcher that uses browser-based `Event` semantics, for example bubbling, `stopPropagation`,\n * `currentTarget`, etc.\n */\nexport class EventDispatcher {\n private readonly actionResolver: ActionResolver;\n\n private readonly dispatcher: Dispatcher;\n\n constructor(\n private readonly dispatchDelegate: (event: Event, actionName: string) => void,\n private readonly clickModSupport = true,\n ) {\n this.actionResolver = new ActionResolver({clickModSupport});\n this.dispatcher = new Dispatcher(\n (eventInfoWrapper: EventInfoWrapper) => {\n this.dispatchToDelegate(eventInfoWrapper);\n },\n {\n actionResolver: this.actionResolver,\n },\n );\n }\n\n /**\n * The entrypoint for the `EventContract` dispatch.\n */\n dispatch(eventInfo: EventInfo): void {\n this.dispatcher.dispatch(eventInfo);\n }\n\n /** Internal method that does basic disaptching. */\n private dispatchToDelegate(eventInfoWrapper: EventInfoWrapper) {\n if (eventInfoWrapper.getIsReplay()) {\n prepareEventForReplay(eventInfoWrapper);\n }\n prepareEventForBubbling(eventInfoWrapper);\n while (eventInfoWrapper.getAction()) {\n prepareEventForDispatch(eventInfoWrapper);\n // If this is a capture event, ONLY dispatch if the action element is the target.\n if (\n isCaptureEventType(eventInfoWrapper.getEventType()) &&\n eventInfoWrapper.getAction()!.element !== eventInfoWrapper.getTargetElement()\n ) {\n return;\n }\n this.dispatchDelegate(eventInfoWrapper.getEvent(), eventInfoWrapper.getAction()!.name);\n if (propagationStopped(eventInfoWrapper)) {\n return;\n }\n this.actionResolver.resolveParentAction(eventInfoWrapper.eventInfo);\n }\n }\n}\n\nfunction prepareEventForBubbling(eventInfoWrapper: EventInfoWrapper) {\n const event = eventInfoWrapper.getEvent();\n const originalStopPropagation = eventInfoWrapper.getEvent().stopPropagation.bind(event);\n const stopPropagation = () => {\n event[PROPAGATION_STOPPED_SYMBOL] = true;\n originalStopPropagation();\n };\n patchEventInstance(event, 'stopPropagation', stopPropagation);\n patchEventInstance(event, 'stopImmediatePropagation', stopPropagation);\n}\n\nfunction propagationStopped(eventInfoWrapper: EventInfoWrapper) {\n const event = eventInfoWrapper.getEvent();\n return !!event[PROPAGATION_STOPPED_SYMBOL];\n}\n\nfunction prepareEventForReplay(eventInfoWrapper: EventInfoWrapper) {\n const event = eventInfoWrapper.getEvent();\n const target = eventInfoWrapper.getTargetElement();\n const originalPreventDefault = event.preventDefault.bind(event);\n patchEventInstance(event, 'target', target);\n patchEventInstance(event, 'eventPhase', EventPhase.REPLAY);\n patchEventInstance(event, 'preventDefault', () => {\n originalPreventDefault();\n throw new Error(\n PREVENT_DEFAULT_ERROR_MESSAGE + (ngDevMode ? PREVENT_DEFAULT_ERROR_MESSAGE_DETAILS : ''),\n );\n });\n patchEventInstance(event, 'composedPath', () => {\n throw new Error(\n COMPOSED_PATH_ERROR_MESSAGE + (ngDevMode ? COMPOSED_PATH_ERROR_MESSAGE_DETAILS : ''),\n );\n });\n}\n\nfunction prepareEventForDispatch(eventInfoWrapper: EventInfoWrapper) {\n const event = eventInfoWrapper.getEvent();\n const currentTarget = eventInfoWrapper.getAction()?.element;\n if (currentTarget) {\n patchEventInstance(event, 'currentTarget', currentTarget, {\n // `currentTarget` is going to get reassigned every dispatch.\n configurable: true,\n });\n }\n}\n\n/**\n * Patch `Event` instance during non-standard `Event` dispatch. This patches just the `Event`\n * instance that the browser created, it does not patch global properties or methods.\n *\n * This is necessary because dispatching an `Event` outside of browser dispatch results in\n * incorrect properties and methods that need to be polyfilled or do not work.\n *\n * JSAction dispatch adds two extra \"phases\" to event dispatch:\n * 1. Event delegation - the event is being dispatched by a delegating event handler on a container\n * (typically `window.document.documentElement`), to a delegated event handler on some child\n * element. Certain `Event` properties will be unintuitive, such as `currentTarget`, which would\n * be the container rather than the child element. Bubbling would also not work. In order to\n * emulate the browser, these properties and methods on the `Event` are patched.\n * 2. Event replay - the event is being dispatched by the framework once the handlers have been\n * loaded (during hydration, or late-loaded). Certain `Event` properties can be unset by the\n * browser because the `Event` is no longer actively being dispatched, such as `target`. Other\n * methods have no effect because the `Event` has already been dispatched, such as\n * `preventDefault`. Bubbling would also not work. These properties and methods are patched,\n * either to fill in information that the browser may have removed, or to throw errors in methods\n * that no longer behave as expected.\n */\nfunction patchEventInstance<T>(\n event: Event,\n property: string,\n value: T,\n {configurable = false}: {configurable?: boolean} = {},\n) {\n Object.defineProperty(event, property, {value, configurable});\n}\n\n/**\n * Registers deferred functionality for an EventContract and a Jsaction\n * Dispatcher.\n */\nexport function registerDispatcher(\n eventContract: UnrenamedEventContract,\n dispatcher: EventDispatcher,\n) {\n eventContract.ecrd((eventInfo: EventInfo) => {\n dispatcher.dispatch(eventInfo);\n }, Restriction.I_AM_THE_JSACTION_FRAMEWORK);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 {createEventInfoFromParameters, EventInfo} from './event_info';\n\nexport declare interface EarlyJsactionDataContainer {\n _ejsa?: EarlyJsactionData;\n _ejsas?: {[appId: string]: EarlyJsactionData | undefined};\n}\n\ndeclare global {\n interface Window {\n _ejsa?: EarlyJsactionData;\n _ejsas?: {[appId: string]: EarlyJsactionData | undefined};\n }\n}\n\n/**\n * Defines the early jsaction data types.\n */\nexport declare interface EarlyJsactionData {\n /** List used to keep track of the early JSAction event types. */\n et: string[];\n\n /** List used to keep track of the early JSAction capture event types. */\n etc: string[];\n\n /** Early JSAction handler for all events. */\n h: (event: Event) => void;\n\n /** Dispatcher handler. Initializes to populating `q`. */\n d: (eventInfo: EventInfo) => void;\n\n /** List used to push `EventInfo` objects if the dispatcher is not registered. */\n q: EventInfo[];\n\n /** Container for listening to events. */\n c: HTMLElement;\n}\n\n/**\n * EarlyEventContract intercepts events in the bubbling phase at the\n * boundary of the document body. This mapping will be passed to the\n * late-loaded EventContract.\n */\nexport class EarlyEventContract {\n constructor(\n private readonly dataContainer: EarlyJsactionDataContainer = window,\n container = window.document.documentElement,\n ) {\n dataContainer._ejsa = createEarlyJsactionData(container);\n }\n\n /**\n * Installs a list of event types for container .\n */\n addEvents(types: string[], capture?: boolean) {\n addEvents(this.dataContainer._ejsa!, types, capture);\n }\n}\n\n/** Creates an `EarlyJsactionData` object. */\nexport function createEarlyJsactionData(container: HTMLElement) {\n const q: EventInfo[] = [];\n const d = (eventInfo: EventInfo) => {\n q.push(eventInfo);\n };\n const h = (event: Event) => {\n d(\n createEventInfoFromParameters(\n event.type,\n event,\n event.target as Element,\n container,\n Date.now(),\n ),\n );\n };\n return {\n c: container,\n q,\n et: [],\n etc: [],\n d,\n h,\n };\n}\n\n/** Add all the events to the container stored in the `EarlyJsactionData`. */\nexport function addEvents(\n earlyJsactionData: EarlyJsactionData,\n types: string[],\n capture?: boolean,\n) {\n for (let i = 0; i < types.length; i++) {\n const eventType = types[i];\n const eventTypes = capture ? earlyJsactionData.etc : earlyJsactionData.et;\n eventTypes.push(eventType);\n earlyJsactionData.c.addEventListener(eventType, earlyJsactionData.h, capture);\n }\n}\n\n/** Get the queued `EventInfo` objects that were dispatched before a dispatcher was registered. */\nexport function getQueuedEventInfos(earlyJsactionData: EarlyJsactionData | undefined) {\n return earlyJsactionData?.q ?? [];\n}\n\n/** Register a different dispatcher function on the `EarlyJsactionData`. */\nexport function registerDispatcher(\n earlyJsactionData: EarlyJsactionData | undefined,\n dispatcher: (eventInfo: EventInfo) => void,\n) {\n if (!earlyJsactionData) {\n return;\n }\n earlyJsactionData.d = dispatcher;\n}\n\n/** Removes all event listener handlers. */\nexport function removeAllEventListeners(earlyJsactionData: EarlyJsactionData | undefined) {\n if (!earlyJsactionData) {\n return;\n }\n removeEventListeners(earlyJsactionData.c, earlyJsactionData.et, earlyJsactionData.h);\n removeEventListeners(earlyJsactionData.c, earlyJsactionData.etc, earlyJsactionData.h, true);\n}\n\nfunction removeEventListeners(\n container: HTMLElement,\n eventTypes: string[],\n earlyEventHandler: (e: Event) => void,\n capture?: boolean,\n) {\n for (let i = 0; i < eventTypes.length; i++) {\n container.removeEventListener(eventTypes[i], earlyEventHandler, /* useCapture */ capture);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * @define Support for the non-bubbling mouseenter and mouseleave events. This\n * flag can be overridden in a build rule.\n */\nexport const MOUSE_SPECIAL_SUPPORT = 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\n/**\n * @fileoverview Implements the local event handling contract. This\n * allows DOM objects in a container that enters into this contract to\n * define event handlers which are executed in a local context.\n *\n * One EventContract instance can manage the contract for multiple\n * containers, which are added using the addContainer() method.\n *\n * Events can be registered using the addEvent() method.\n *\n * A Dispatcher is added using the registerDispatcher() method. Until there is\n * a dispatcher, events are queued. The idea is that the EventContract\n * class is inlined in the HTML of the top level page and instantiated\n * right after the start of <body>. The Dispatcher class is contained\n * in the external deferred js, and instantiated and registered with\n * EventContract when the external javascript in the page loads. The\n * external javascript will also register the jsaction handlers, which\n * then pick up the queued events at the time of registration.\n *\n * Since this class is meant to be inlined in the main page HTML, the\n * size of the binary compiled from this file MUST be kept as small as\n * possible and thus its dependencies to a minimum.\n */\n\nimport {\n EarlyJsactionData,\n EarlyJsactionDataContainer,\n removeAllEventListeners,\n} from './earlyeventcontract';\nimport * as eventLib from './event';\nimport {EventContractContainerManager} from './event_contract_container';\nimport {MOUSE_SPECIAL_SUPPORT} from './event_contract_defines';\nimport * as eventInfoLib from './event_info';\nimport {MOUSE_SPECIAL_EVENT_TYPES} from './event_type';\nimport {Restriction} from './restriction';\n\n/**\n * The API of an EventContract that is safe to call from any compilation unit.\n */\nexport declare interface UnrenamedEventContract {\n // Alias for Jsction EventContract registerDispatcher.\n ecrd(dispatcher: Dispatcher, restriction: Restriction): void;\n}\n\n/** A function that is called to handle events captured by the EventContract. */\nexport type Dispatcher = (eventInfo: eventInfoLib.EventInfo, globalDispatch?: boolean) => void;\n\n/**\n * A function that handles an event dispatched from the browser.\n *\n * eventType: May differ from `event.type` if JSAction uses a\n * short-hand name or is patching over an non-bubbling event with a bubbling\n * variant.\n * event: The native browser event.\n * container: The container for this dispatch.\n */\ntype EventHandler = (eventType: string, event: Event, container: Element) => void;\n\n/**\n * EventContract intercepts events in the bubbling phase at the\n * boundary of a container element, and maps them to generic actions\n * which are specified using the custom jsaction attribute in\n * HTML. Behavior of the application is then specified in terms of\n * handler for such actions, cf. jsaction.Dispatcher in dispatcher.js.\n *\n * This has several benefits: (1) No DOM event handlers need to be\n * registered on the specific elements in the UI. (2) The set of\n * events that the application has to handle can be specified in terms\n * of the semantics of the application, rather than in terms of DOM\n * events. (3) Invocation of handlers can be delayed and handlers can\n * be delay loaded in a generic way.\n */\nexport class EventContract implements UnrenamedEventContract {\n static MOUSE_SPECIAL_SUPPORT = MOUSE_SPECIAL_SUPPORT;\n\n private containerManager: EventContractContainerManager | null;\n\n /**\n * The DOM events which this contract covers. Used to prevent double\n * registration of event types. The value of the map is the\n * internally created DOM event handler function that handles the\n * DOM events. See addEvent().\n *\n */\n private eventHandlers: {[key: string]: EventHandler} = {};\n\n private browserEventTypeToExtraEventTypes: {[key: string]: string[]} = {};\n\n /**\n * The dispatcher function. Events are passed to this function for\n * handling once it was set using the registerDispatcher() method. This is\n * done because the function is passed from another jsbinary, so passing the\n * instance and invoking the method here would require to leave the method\n * unobfuscated.\n */\n private dispatcher: Dispatcher | null = null;\n\n /**\n * The list of suspended `EventInfo` that will be dispatched\n * as soon as the `Dispatcher` is registered.\n */\n private queuedEventInfos: eventInfoLib.EventInfo[] | null = [];\n\n constructor(containerManager: EventContractContainerManager) {\n this.containerManager = containerManager;\n }\n\n private handleEvent(eventType: string, event: Event, container: Element) {\n const eventInfo = eventInfoLib.createEventInfoFromParameters(\n /* eventType= */ eventType,\n /* event= */ event,\n /* targetElement= */ event.target as Element,\n /* container= */ container,\n /* timestamp= */ Date.now(),\n );\n this.handleEventInfo(eventInfo);\n }\n\n /**\n * Handle an `EventInfo`.\n */\n private handleEventInfo(eventInfo: eventInfoLib.EventInfo) {\n if (!this.dispatcher) {\n // All events are queued when the dispatcher isn't yet loaded.\n eventInfoLib.setIsReplay(eventInfo, true);\n this.queuedEventInfos?.push(eventInfo);\n return;\n }\n this.dispatcher(eventInfo);\n }\n\n /**\n * Enables jsaction handlers to be called for the event type given by\n * name.\n *\n * If the event is already registered, this does nothing.\n *\n * @param prefixedEventType If supplied, this event is used in\n * the actual browser event registration instead of the name that is\n * exposed to jsaction. Use this if you e.g. want users to be able\n * to subscribe to jsaction=\"transitionEnd:foo\" while the underlying\n * event is webkitTransitionEnd in one browser and mozTransitionEnd\n * in another.\n *\n * @param passive A boolean value that, if `true`, indicates that the event\n * handler will never call `preventDefault()`.\n */\n addEvent(eventType: string, prefixedEventType?: string, passive?: boolean) {\n if (eventType in this.eventHandlers || !this.containerManager) {\n return;\n }\n\n if (!EventContract.MOUSE_SPECIAL_SUPPORT && MOUSE_SPECIAL_EVENT_TYPES.indexOf(eventType) >= 0) {\n return;\n }\n\n const eventHandler = (eventType: string, event: Event, container: Element) => {\n this.handleEvent(eventType, event, container);\n };\n\n // Store the callback to allow us to replay events.\n this.eventHandlers[eventType] = eventHandler;\n\n const browserEventType = eventLib.getBrowserEventType(prefixedEventType || eventType);\n\n if (browserEventType !== eventType) {\n const eventTypes = this.browserEventTypeToExtraEventTypes[browserEventType] || [];\n eventTypes.push(eventType);\n this.browserEventTypeToExtraEventTypes[browserEventType] = eventTypes;\n }\n\n this.containerManager.addEventListener(\n browserEventType,\n (element: Element) => {\n return (event: Event) => {\n eventHandler(eventType, event, element);\n };\n },\n passive,\n );\n }\n\n /**\n * Gets the queued early events and replay them using the appropriate handler\n * in the provided event contract. Once all the events are replayed, it cleans\n * up the early contract.\n */\n replayEarlyEvents(earlyJsactionData: EarlyJsactionData | undefined = window._ejsa) {\n // Check if the early contract is present and prevent calling this function\n // more than once.\n if (!earlyJsactionData) {\n return;\n }\n\n // Replay the early contract events.\n this.replayEarlyEventInfos(earlyJsactionData.q);\n\n // Clean up the early contract.\n removeAllEventListeners(earlyJsactionData);\n delete window._ejsa;\n }\n\n /**\n * Replays all the early `EventInfo` objects, dispatching them through the normal\n * `EventContract` flow.\n */\n replayEarlyEventInfos(earlyEventInfos: eventInfoLib.EventInfo[]) {\n for (let i = 0; i < earlyEventInfos.length; i++) {\n const earlyEventInfo: eventInfoLib.EventInfo = earlyEventInfos[i];\n const eventTypes = this.getEventTypesForBrowserEventType(earlyEventInfo.eventType);\n for (let j = 0; j < eventTypes.length; j++) {\n const eventInfo = eventInfoLib.cloneEventInfo(earlyEventInfo);\n // EventInfo eventType maps to JSAction's internal event type,\n // rather than the browser event type.\n eventInfoLib.setEventType(eventInfo, eventTypes[j]);\n this.handleEventInfo(eventInfo);\n }\n }\n }\n\n /**\n * Returns all JSAction event types that have been registered for a given\n * browser event type.\n */\n private getEventTypesForBrowserEventType(browserEventType: string) {\n const eventTypes = [];\n if (this.eventHandlers[browserEventType]) {\n eventTypes.push(browserEventType);\n }\n if (this.browserEventTypeToExtraEventTypes[browserEventType]) {\n eventTypes.push(...this.browserEventTypeToExtraEventTypes[browserEventType]);\n }\n return eventTypes;\n }\n\n /**\n * Returns the event handler function for a given event type.\n */\n handler(eventType: string): EventHandler | undefined {\n return this.eventHandlers[eventType];\n }\n\n /**\n * Cleans up the event contract. This resets all of the `EventContract`'s\n * internal state. Users are responsible for not using this `EventContract`\n * after it has been cleaned up.\n */\n cleanUp() {\n this.containerManager?.cleanUp();\n this.containerManager = null;\n this.eventHandlers = {};\n this.browserEventTypeToExtraEventTypes = {};\n this.dispatcher = null;\n this.queuedEventInfos = [];\n }\n\n /**\n * Register a dispatcher function. Event info of each event mapped to\n * a jsaction is passed for handling to this callback. The queued\n * events are passed as well to the dispatcher for later replaying\n * once the dispatcher is registered. Clears the event queue to null.\n *\n * @param dispatcher The dispatcher function.\n * @param restriction\n */\n registerDispatcher(dispatcher: Dispatcher, restriction: Restriction) {\n this.ecrd(dispatcher, restriction);\n }\n\n /**\n * Unrenamed alias for registerDispatcher. Necessary for any codebases that\n * split the `EventContract` and `Dispatcher` code into different compilation\n * units.\n */\n ecrd(dispatcher: Dispatcher, restriction: Restriction) {\n this.dispatcher = dispatcher;\n\n if (this.queuedEventInfos?.length) {\n for (let i = 0; i < this.queuedEventInfos.length; i++) {\n this.handleEventInfo(this.queuedEventInfos[i]);\n }\n this.queuedEventInfos = null;\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Restriction} from './restriction';\nimport {\n EarlyJsactionDataContainer,\n addEvents,\n createEarlyJsactionData,\n getQueuedEventInfos,\n registerDispatcher,\n removeAllEventListeners,\n} from './earlyeventcontract';\nimport {EventInfo} from './event_info';\n\n/**\n * Creates an `EarlyJsactionData`, adds events to it, and populates it on a nested object on\n * the window.\n */\nexport function bootstrapAppScopedEarlyEventContract(\n container: HTMLElement,\n appId: string,\n bubbleEventTypes: string[],\n captureEventTypes: string[],\n dataContainer: EarlyJsactionDataContainer = window,\n) {\n const earlyJsactionData = createEarlyJsactionData(container);\n if (!dataContainer._ejsas) {\n dataContainer._ejsas = {};\n }\n dataContainer._ejsas[appId] = earlyJsactionData;\n addEvents(earlyJsactionData, bubbleEventTypes);\n addEvents(earlyJsactionData, captureEventTypes, /* capture= */ true);\n}\n\n/** Get the queued `EventInfo` objects that were dispatched before a dispatcher was registered. */\nexport function getAppScopedQueuedEventInfos(\n appId: string,\n dataContainer: EarlyJsactionDataContainer = window,\n) {\n return getQueuedEventInfos(dataContainer._ejsas?.[appId]);\n}\n\n/**\n * Registers a dispatcher function on the `EarlyJsactionData` present on the nested object on the\n * window.\n */\nexport function registerAppScopedDispatcher(\n restriction: Restriction,\n appId: string,\n dispatcher: (eventInfo: EventInfo) => void,\n dataContainer: EarlyJsactionDataContainer = window,\n) {\n registerDispatcher(dataContainer._ejsas?.[appId], dispatcher);\n}\n\n/** Removes all event listener handlers. */\nexport function removeAllAppScopedEventListeners(\n appId: string,\n dataContainer: EarlyJsactionDataContainer = window,\n) {\n removeAllEventListeners(dataContainer._ejsas?.[appId]);\n}\n\n/** Clear the early event contract. */\nexport function clearAppScopedEarlyEventContract(\n appId: string,\n dataContainer: EarlyJsactionDataContainer = window,\n) {\n if (!dataContainer._ejsas) {\n return;\n }\n dataContainer._ejsas[appId] = undefined;\n}\n"],"names":["eventLib.addEventListener","eventLib.removeEventListener","eventInfoLib.getEventType","eventLib.isModifiedClickEvent","eventInfoLib.getEvent","eventInfoLib.setEventType","eventInfoLib.getResolved","eventInfoLib.getTargetElement","eventInfoLib.setResolved","eventInfoLib.getAction","eventInfoLib.getActionElement","eventInfoLib.unsetAction","eventInfoLib.getContainer","eventLib.isMouseSpecialEvent","eventLib.createMouseSpecialEvent","eventInfoLib.setEvent","eventInfoLib.setTargetElement","eventInfoLib.setAction","cache.get","cache.set","cache.getParsed","cache.setParsed","eventLib.preventDefault","registerDispatcher","eventInfoLib.createEventInfoFromParameters","eventInfoLib.setIsReplay","eventLib.getBrowserEventType","eventInfoLib.cloneEventInfo"],"mappings":";;;;;;;;AAQA;AACO,MAAM,QAAQ,GAAG;AACtB;;;;;;;AAOG;AACH,IAAA,QAAQ,EAAE,YAAqB;AAC/B;;;;;AAKG;AACH,IAAA,KAAK,EAAE,SAAkB;CAC1B;;AChBD;;AAEG;AACH,MAAM,UAAU,GAAyD,EAAE;AAE3E;;AAEG;AACG,SAAU,GAAG,CAAC,OAAgB,EAAA;AAClC,IAAA,OAAO,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC;AAC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,CAAC,EAAE,UAAU,CAAC;AAC/D;AAEA;SACgB,gCAAgC,CAC9C,KAAa,EACb,gBAA4C,MAAM,EAAA;IAElD,uBAAuB,CAAC,aAAa,CAAC,MAAM,GAAG,KAAK,CAAC,CAAC;AACxD;AAEA;SACgB,gCAAgC,CAC9C,KAAa,EACb,gBAA4C,MAAM,EAAA;AAElD,IAAA,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE;QACzB;;AAEF,IAAA,aAAa,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,SAAS;AACzC;;;;"}
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Angular v21.0.0-next.5
|
|
3
|
-
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
4
|
-
* License: MIT
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import { consumerMarkDirty, SIGNAL, REACTIVE_NODE, consumerDestroy, isInNotificationPhase, consumerPollProducersForChange, consumerBeforeComputation, consumerAfterComputation } from '../signal.mjs';
|
|
8
|
-
export { SIGNAL_NODE, createComputed, createSignal, defaultEquals, finalizeConsumerAfterComputation, getActiveConsumer, isReactive, producerAccessed, producerIncrementEpoch, producerMarkClean, producerNotifyConsumers, producerUpdateValueVersion, producerUpdatesAllowed, resetConsumerBeforeComputation, runPostProducerCreatedFn, runPostSignalSetFn, setActiveConsumer, setPostProducerCreatedFn, setPostSignalSetFn, setThrowInvalidWriteToSignalError, signalGetFn, signalSetFn, signalUpdateFn } from '../signal.mjs';
|
|
9
|
-
export { BASE_EFFECT_NODE, createLinkedSignal, linkedSignalSetFn, linkedSignalUpdateFn, runEffect, untracked } from '../effect.mjs';
|
|
10
|
-
export { setAlternateWeakRefImpl } from '../weak_ref.mjs';
|
|
11
|
-
|
|
12
|
-
function createWatch(fn, schedule, allowSignalWrites) {
|
|
13
|
-
const node = Object.create(WATCH_NODE);
|
|
14
|
-
if (allowSignalWrites) {
|
|
15
|
-
node.consumerAllowSignalWrites = true;
|
|
16
|
-
}
|
|
17
|
-
node.fn = fn;
|
|
18
|
-
node.schedule = schedule;
|
|
19
|
-
const registerOnCleanup = (cleanupFn) => {
|
|
20
|
-
node.cleanupFn = cleanupFn;
|
|
21
|
-
};
|
|
22
|
-
function isWatchNodeDestroyed(node) {
|
|
23
|
-
return node.fn === null && node.schedule === null;
|
|
24
|
-
}
|
|
25
|
-
function destroyWatchNode(node) {
|
|
26
|
-
if (!isWatchNodeDestroyed(node)) {
|
|
27
|
-
consumerDestroy(node); // disconnect watcher from the reactive graph
|
|
28
|
-
node.cleanupFn();
|
|
29
|
-
// nullify references to the integration functions to mark node as destroyed
|
|
30
|
-
node.fn = null;
|
|
31
|
-
node.schedule = null;
|
|
32
|
-
node.cleanupFn = NOOP_CLEANUP_FN;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
const run = () => {
|
|
36
|
-
if (node.fn === null) {
|
|
37
|
-
// trying to run a destroyed watch is noop
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
if (isInNotificationPhase()) {
|
|
41
|
-
throw new Error(typeof ngDevMode !== 'undefined' && ngDevMode
|
|
42
|
-
? 'Schedulers cannot synchronously execute watches while scheduling.'
|
|
43
|
-
: '');
|
|
44
|
-
}
|
|
45
|
-
node.dirty = false;
|
|
46
|
-
if (node.version > 0 && !consumerPollProducersForChange(node)) {
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
node.version++;
|
|
50
|
-
const prevConsumer = consumerBeforeComputation(node);
|
|
51
|
-
try {
|
|
52
|
-
node.cleanupFn();
|
|
53
|
-
node.cleanupFn = NOOP_CLEANUP_FN;
|
|
54
|
-
node.fn(registerOnCleanup);
|
|
55
|
-
}
|
|
56
|
-
finally {
|
|
57
|
-
consumerAfterComputation(node, prevConsumer);
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
node.ref = {
|
|
61
|
-
notify: () => consumerMarkDirty(node),
|
|
62
|
-
run,
|
|
63
|
-
cleanup: () => node.cleanupFn(),
|
|
64
|
-
destroy: () => destroyWatchNode(node),
|
|
65
|
-
[SIGNAL]: node,
|
|
66
|
-
};
|
|
67
|
-
return node.ref;
|
|
68
|
-
}
|
|
69
|
-
const NOOP_CLEANUP_FN = () => { };
|
|
70
|
-
// Note: Using an IIFE here to ensure that the spread assignment is not considered
|
|
71
|
-
// a side-effect, ending up preserving `COMPUTED_NODE` and `REACTIVE_NODE`.
|
|
72
|
-
// TODO: remove when https://github.com/evanw/esbuild/issues/3392 is resolved.
|
|
73
|
-
const WATCH_NODE = /* @__PURE__ */ (() => {
|
|
74
|
-
return {
|
|
75
|
-
...REACTIVE_NODE,
|
|
76
|
-
consumerIsAlwaysLive: true,
|
|
77
|
-
consumerAllowSignalWrites: false,
|
|
78
|
-
consumerMarkedDirty: (node) => {
|
|
79
|
-
if (node.schedule !== null) {
|
|
80
|
-
node.schedule(node.ref);
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
cleanupFn: NOOP_CLEANUP_FN,
|
|
84
|
-
};
|
|
85
|
-
})();
|
|
86
|
-
|
|
87
|
-
export { REACTIVE_NODE, SIGNAL, consumerAfterComputation, consumerBeforeComputation, consumerDestroy, consumerMarkDirty, consumerPollProducersForChange, createWatch, isInNotificationPhase };
|
|
88
|
-
//# sourceMappingURL=signals.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"signals.mjs","sources":["../../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/core/primitives/signals/src/watch.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\nimport {\n consumerAfterComputation,\n consumerBeforeComputation,\n consumerDestroy,\n consumerMarkDirty,\n consumerPollProducersForChange,\n isInNotificationPhase,\n REACTIVE_NODE,\n ReactiveNode,\n SIGNAL,\n} from './graph';\n\n// Required as the signals library is in a separate package, so we need to explicitly ensure the\n// global `ngDevMode` type is defined.\ndeclare const ngDevMode: boolean | undefined;\n\n/**\n * A cleanup function that can be optionally registered from the watch logic. If registered, the\n * cleanup logic runs before the next watch execution.\n */\nexport type WatchCleanupFn = () => void;\n\n/**\n * A callback passed to the watch function that makes it possible to register cleanup logic.\n */\nexport type WatchCleanupRegisterFn = (cleanupFn: WatchCleanupFn) => void;\n\nexport interface Watch {\n notify(): void;\n\n /**\n * Execute the reactive expression in the context of this `Watch` consumer.\n *\n * Should be called by the user scheduling algorithm when the provided\n * `schedule` hook is called by `Watch`.\n */\n run(): void;\n\n cleanup(): void;\n\n /**\n * Destroy the watcher:\n * - disconnect it from the reactive graph;\n * - mark it as destroyed so subsequent run and notify operations are noop.\n */\n destroy(): void;\n\n [SIGNAL]: WatchNode;\n}\nexport interface WatchNode extends ReactiveNode {\n fn: ((onCleanup: WatchCleanupRegisterFn) => void) | null;\n schedule: ((watch: Watch) => void) | null;\n cleanupFn: WatchCleanupFn;\n ref: Watch;\n}\n\nexport function createWatch(\n fn: (onCleanup: WatchCleanupRegisterFn) => void,\n schedule: (watch: Watch) => void,\n allowSignalWrites: boolean,\n): Watch {\n const node: WatchNode = Object.create(WATCH_NODE);\n if (allowSignalWrites) {\n node.consumerAllowSignalWrites = true;\n }\n\n node.fn = fn;\n node.schedule = schedule;\n\n const registerOnCleanup = (cleanupFn: WatchCleanupFn) => {\n node.cleanupFn = cleanupFn;\n };\n\n function isWatchNodeDestroyed(node: WatchNode) {\n return node.fn === null && node.schedule === null;\n }\n\n function destroyWatchNode(node: WatchNode) {\n if (!isWatchNodeDestroyed(node)) {\n consumerDestroy(node); // disconnect watcher from the reactive graph\n node.cleanupFn();\n\n // nullify references to the integration functions to mark node as destroyed\n node.fn = null;\n node.schedule = null;\n node.cleanupFn = NOOP_CLEANUP_FN;\n }\n }\n\n const run = () => {\n if (node.fn === null) {\n // trying to run a destroyed watch is noop\n return;\n }\n\n if (isInNotificationPhase()) {\n throw new Error(\n typeof ngDevMode !== 'undefined' && ngDevMode\n ? 'Schedulers cannot synchronously execute watches while scheduling.'\n : '',\n );\n }\n\n node.dirty = false;\n if (node.version > 0 && !consumerPollProducersForChange(node)) {\n return;\n }\n node.version++;\n\n const prevConsumer = consumerBeforeComputation(node);\n try {\n node.cleanupFn();\n node.cleanupFn = NOOP_CLEANUP_FN;\n node.fn(registerOnCleanup);\n } finally {\n consumerAfterComputation(node, prevConsumer);\n }\n };\n\n node.ref = {\n notify: () => consumerMarkDirty(node),\n run,\n cleanup: () => node.cleanupFn(),\n destroy: () => destroyWatchNode(node),\n [SIGNAL]: node,\n };\n\n return node.ref;\n}\n\nconst NOOP_CLEANUP_FN: WatchCleanupFn = () => {};\n\n// Note: Using an IIFE here to ensure that the spread assignment is not considered\n// a side-effect, ending up preserving `COMPUTED_NODE` and `REACTIVE_NODE`.\n// TODO: remove when https://github.com/evanw/esbuild/issues/3392 is resolved.\nconst WATCH_NODE: Partial<WatchNode> = /* @__PURE__ */ (() => {\n return {\n ...REACTIVE_NODE,\n consumerIsAlwaysLive: true,\n consumerAllowSignalWrites: false,\n consumerMarkedDirty: (node: WatchNode) => {\n if (node.schedule !== null) {\n node.schedule(node.ref);\n }\n },\n cleanupFn: NOOP_CLEANUP_FN,\n };\n})();\n"],"names":[],"mappings":";;;;;;;;;;;SAgEgB,WAAW,CACzB,EAA+C,EAC/C,QAAgC,EAChC,iBAA0B,EAAA;IAE1B,MAAM,IAAI,GAAc,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC;IACjD,IAAI,iBAAiB,EAAE;AACrB,QAAA,IAAI,CAAC,yBAAyB,GAAG,IAAI;;AAGvC,IAAA,IAAI,CAAC,EAAE,GAAG,EAAE;AACZ,IAAA,IAAI,CAAC,QAAQ,GAAG,QAAQ;AAExB,IAAA,MAAM,iBAAiB,GAAG,CAAC,SAAyB,KAAI;AACtD,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS;AAC5B,KAAC;IAED,SAAS,oBAAoB,CAAC,IAAe,EAAA;QA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C,IAAI,CAAC;QACrC,CAAC,MAAM,GAAG,IAAI;KACf;IAED,OAAO,IAAI,CAAC,GAAG;AACjB;AAEA,MAAM,eAAe,GAAmB,MAAK,GAAG;AAEhD;AACA;AACA;AACA,MAAM,UAAU,mBAAuC,CAAC,MAAK;IAC3D,OAAO;AACL,QAAA,GAAG,aAAa;AAChB,QAAA,oBAAoB,EAAE,IAAI;AAC1B,QAAA,yBAAyB,EAAE,KAAK;AAChC,QAAA,mBAAmB,EAAE,CAAC,IAAe,KAAI;AACvC,YAAA,IAAI,IAAI,CAAC,QAAQ,KAAK,IAAI,EAAE;AAC1B,gBAAA,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC;;SAE1B;AACD,QAAA,SAAS,EAAE,eAAe;KAC3B;AACH,CAAC,GAAG;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resource.mjs","sources":["../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/core/src/authoring/output/output_emitter_ref.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/core/src/render3/reactivity/untracked.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/core/src/render3/reactivity/computed.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/core/src/render3/reactivity/effect.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/core/src/render3/reactivity/linked_signal.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/core/src/resource/resource.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\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 {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 {\n SIGNAL,\n consumerDestroy,\n isInNotificationPhase,\n setActiveConsumer,\n BaseEffectNode,\n BASE_EFFECT_NODE,\n runEffect,\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 {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';\n\nimport {emitEffectCreatedEvent, setInjectorProfilerContext} from '../debug/injector_profiler';\n\n/**\n * A global reactive effect, which can be manually destroyed.\n *\n * @publicApi 20.0\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 * @publicApi 20.0\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 * If this is `true` and you want to use the effect outside an injection context, you still\n * need to provide an `Injector` to the effect.\n */\n manualCleanup?: boolean;\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 * @publicApi 20.0\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 * @publicApi 20.0\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.\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 * @publicApi 20.0\n */\nexport function effect(\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 if (ngDevMode && !options?.injector) {\n assertInInjectionContext(effect);\n }\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) {\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 BaseEffectNode, SchedulableEffect {\n cleanupFns: EffectCleanupFn[] | undefined;\n injector: Injector;\n notifier: ChangeDetectionScheduler;\n\n onDestroyFn: () => 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 EFFECT_NODE: Omit<EffectNode, 'fn' | 'destroy' | 'injector' | 'notifier'> =\n /* @__PURE__ */ (() => ({\n ...BASE_EFFECT_NODE,\n cleanupFns: undefined,\n zone: null,\n onDestroyFn: noop,\n run(this: EffectNode): void {\n if (ngDevMode && isInNotificationPhase()) {\n throw new Error(`Schedulers cannot synchronously execute watches while scheduling.`);\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 runEffect(this);\n } finally {\n setIsRefreshingViews(prevRefreshingViews);\n }\n },\n\n cleanup(this: EffectNode): void {\n if (!this.cleanupFns?.length) {\n return;\n }\n const prevConsumer = setActiveConsumer(null);\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 setActiveConsumer(prevConsumer);\n }\n },\n }))();\n\nexport const ROOT_EFFECT_NODE: Omit<RootEffectNode, 'fn' | 'scheduler' | 'notifier' | 'injector'> =\n /* @__PURE__ */ (() => ({\n ...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.cleanup();\n this.scheduler.remove(this);\n },\n }))();\n\nexport const VIEW_EFFECT_NODE: Omit<ViewEffectNode, 'fn' | 'view' | 'injector' | 'notifier'> =\n /* @__PURE__ */ (() => ({\n ...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.cleanup();\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 = createEffectFn(node, 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 = createEffectFn(node, fn);\n node.scheduler = scheduler;\n node.notifier = notifier;\n node.zone = typeof Zone !== 'undefined' ? Zone.current : null;\n node.scheduler.add(node);\n node.notifier.notify(NotificationSource.RootEffect);\n return node;\n}\n\nfunction createEffectFn(node: EffectNode, fn: (onCleanup: EffectCleanupRegisterFn) => void) {\n return () => {\n fn((cleanupFn) => (node.cleanupFns ??= []).push(cleanupFn));\n };\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * @publicApi 20.0\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 * @publicApi 20.0\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 debugName?: string;\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 debugName?: string;\n }\n | (() => D),\n options?: {equal?: ValueEqualityFn<D>; debugName?: string},\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, options?.debugName);\n } else {\n const getter = createLinkedSignal<S, D>(\n optionsOrComputation.source,\n optionsOrComputation.computation,\n optionsOrComputation.equal,\n );\n return upgradeLinkedSignalGetter(getter, optionsOrComputation.debugName);\n }\n}\n\nfunction upgradeLinkedSignalGetter<S, D>(\n getter: LinkedSignalGetter<S, D>,\n debugName?: string,\n): WritableSignal<D> {\n if (ngDevMode) {\n getter.toString = () => `[LinkedSignal: ${getter()}]`;\n getter[SIGNAL].debugName = debugName;\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 ResourceLoaderParams,\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 * Whether a `Resource.value()` should throw an error when the resource is in the error state.\n *\n * This internal flag is being used to gradually roll out this behavior.\n */\nlet RESOURCE_VALUE_THROWS_ERRORS_DEFAULT = true;\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 19.0\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 19.0\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 if (ngDevMode && !options?.injector) {\n assertInInjectionContext(resource);\n }\n\n const oldNameForParams = (\n options as ResourceOptions<T, R> & {request: ResourceOptions<T, R>['params']}\n ).request;\n const params = (options.params ?? oldNameForParams ?? (() => null)) as () => R;\n return new ResourceImpl<T | undefined, R>(\n params,\n getLoader(options),\n options.defaultValue,\n options.equal ? wrapEqualityFn(options.equal) : undefined,\n options.injector ?? inject(Injector),\n RESOURCE_VALUE_THROWS_ERRORS_DEFAULT,\n );\n}\n\ntype ResourceInternalStatus = 'idle' | 'loading' | 'resolved' | '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<Error | undefined>;\n\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 private readonly isError = computed(() => this.status() === 'error');\n\n update(updateFn: (value: T) => T): void {\n this.set(updateFn(untracked(this.value)));\n }\n\n readonly isLoading = computed(() => this.status() === 'loading' || this.status() === 'reloading');\n\n // Use a computed here to avoid triggering reactive consumers if the value changes while staying\n // either defined or undefined.\n private readonly isValueDefined = computed(() => {\n // Check if it's in an error state first to prevent the error from bubbling up.\n if (this.isError()) {\n return false;\n }\n\n return this.value() !== undefined;\n });\n\n hasValue(): this is ResourceRef<Exclude<T, undefined>> {\n return this.isValueDefined();\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 private unregisterOnDestroy: () => void;\n\n constructor(\n request: () => R,\n private readonly loaderFn: ResourceStreamingLoader<T, R>,\n defaultValue: T,\n private readonly equal: ValueEqualityFn<T> | undefined,\n injector: Injector,\n throwErrorsFromValue: boolean = RESOURCE_VALUE_THROWS_ERRORS_DEFAULT,\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\n if (!streamValue) {\n return defaultValue;\n }\n\n // Prevents `hasValue()` from throwing an error when a reload happened in the error state\n if (this.state().status === 'loading' && this.error()) {\n return defaultValue;\n }\n\n if (!isResolved(streamValue)) {\n if (throwErrorsFromValue) {\n throw new ResourceValueError(this.error()!);\n } else {\n return defaultValue;\n }\n }\n\n return streamValue.value;\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 = extRequest.request === undefined ? 'idle' : 'loading';\n if (!previous) {\n return {\n extRequest,\n status,\n previousStatus: '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 this.unregisterOnDestroy = 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 error = untracked(this.error);\n const state = untracked(this.state);\n\n if (!error) {\n const current = untracked(this.value);\n if (\n state.status === 'local' &&\n (this.equal ? this.equal(current, value) : current === value)\n ) {\n return;\n }\n }\n\n // Enter Local state with the user-defined value.\n this.state.set({\n extRequest: state.extRequest,\n status: 'local',\n previousStatus: '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 === 'idle' || status === '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.unregisterOnDestroy();\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: 'idle',\n previousStatus: '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 !== '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 params: extRequest.request as Exclude<R, undefined>,\n // TODO(alxhub): cleanup after g3 removal of `request` alias.\n request: extRequest.request as Exclude<R, undefined>,\n abortSignal,\n previous: {\n status: previousStatus,\n },\n } as ResourceLoaderParams<R>);\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: 'resolved',\n previousStatus: '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: 'resolved',\n previousStatus: 'error',\n stream: signal({error: encapsulateResourceError(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: encapsulateResourceError(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 'loading':\n return state.extRequest.reload === 0 ? 'loading' : 'reloading';\n case 'resolved':\n return isResolved(state.stream!()) ? 'resolved' : '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\nexport function encapsulateResourceError(error: unknown): Error {\n if (error instanceof Error) {\n return error;\n }\n\n return new ResourceWrappedError(error);\n}\n\nclass ResourceValueError extends Error {\n constructor(error: Error) {\n super(\n ngDevMode\n ? `Resource is currently in an error state (see Error.cause for details): ${error.message}`\n : error.message,\n {cause: error},\n );\n }\n}\n\nclass ResourceWrappedError extends Error {\n constructor(error: unknown) {\n super(\n ngDevMode\n ? `Resource returned an error that's not an Error instance: ${String(error)}. Check this error's .cause for the actual error.`\n : String(error),\n {cause: error},\n );\n }\n}\n"],"names":["untrackedPrimitive"],"mappings":";;;;;;;;;;AAiBA;;;;;;;;;;;;AAYG;MACU,gBAAgB,CAAA;IACnB,SAAS,GAAG,KAAK;IACjB,SAAS,GAAqC,IAAI;IAClD,YAAY,GAAG,MAAM,CAAC,YAAY,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC;;AAG7D,IAAA,UAAU,GAAe,MAAM,CAAC,UAAU,CAAC;AAE3C,IAAA,WAAA,GAAA;;AAEE,QAAA,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,MAAK;AAC7B,YAAA,IAAI,CAAC,SAAS,GAAG,IAAI;AACrB,YAAA,IAAI,CAAC,SAAS,GAAG,IAAI;AACvB,SAAC,CAAC;;AAGJ,IAAA,SAAS,CAAC,QAA4B,EAAA;AACpC,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;YAClB,MAAM,IAAI,YAAY,CAAA,GAAA,8CAEpB,SAAS;gBACP,oDAAoD;AAClD,oBAAA,8CAA8C,CACnD;;QAGH,CAAC,IAAI,CAAC,SAAS,KAAK,EAAE,EAAE,IAAI,CAAC,QAAQ,CAAC;QAEtC,OAAO;YACL,WAAW,EAAE,MAAK;gBAChB,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,QAAQ,CAAC;gBAC7C,IAAI,GAAG,KAAK,SAA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