123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191 |
- /**
- * @license Angular v19.2.13
- * (c) 2010-2025 Google LLC. https://angular.io/
- * License: MIT
- */
- import * as i0 from '@angular/core';
- import { ANIMATION_MODULE_TYPE, NgZone, RendererFactory2, Inject, Injectable, ɵperformanceMarkFeature as _performanceMarkFeature, NgModule } from '@angular/core';
- export { ANIMATION_MODULE_TYPE } from '@angular/core';
- import * as i1 from '@angular/animations/browser';
- import { NoopAnimationDriver, AnimationDriver, ɵAnimationStyleNormalizer as _AnimationStyleNormalizer, ɵAnimationEngine as _AnimationEngine, ɵWebAnimationsDriver as _WebAnimationsDriver, ɵWebAnimationsStyleNormalizer as _WebAnimationsStyleNormalizer, ɵAnimationRendererFactory as _AnimationRendererFactory } from '@angular/animations/browser';
- import { DOCUMENT } from '@angular/common';
- import { DomRendererFactory2 } from './dom_renderer-DGKzginR.mjs';
- import { BrowserModule } from './browser-D-u-fknz.mjs';
- class InjectableAnimationEngine extends _AnimationEngine {
- // The `ApplicationRef` is injected here explicitly to force the dependency ordering.
- // Since the `ApplicationRef` should be created earlier before the `AnimationEngine`, they
- // both have `ngOnDestroy` hooks and `flush()` must be called after all views are destroyed.
- constructor(doc, driver, normalizer) {
- super(doc, driver, normalizer);
- }
- ngOnDestroy() {
- this.flush();
- }
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: InjectableAnimationEngine, deps: [{ token: DOCUMENT }, { token: i1.AnimationDriver }, { token: i1.ɵAnimationStyleNormalizer }], target: i0.ɵɵFactoryTarget.Injectable });
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: InjectableAnimationEngine });
- }
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: InjectableAnimationEngine, decorators: [{
- type: Injectable
- }], ctorParameters: () => [{ type: Document, decorators: [{
- type: Inject,
- args: [DOCUMENT]
- }] }, { type: i1.AnimationDriver }, { type: i1.ɵAnimationStyleNormalizer }] });
- function instantiateDefaultStyleNormalizer() {
- return new _WebAnimationsStyleNormalizer();
- }
- function instantiateRendererFactory(renderer, engine, zone) {
- return new _AnimationRendererFactory(renderer, engine, zone);
- }
- const SHARED_ANIMATION_PROVIDERS = [
- { provide: _AnimationStyleNormalizer, useFactory: instantiateDefaultStyleNormalizer },
- { provide: _AnimationEngine, useClass: InjectableAnimationEngine },
- {
- provide: RendererFactory2,
- useFactory: instantiateRendererFactory,
- deps: [DomRendererFactory2, _AnimationEngine, NgZone],
- },
- ];
- /**
- * Separate providers from the actual module so that we can do a local modification in Google3 to
- * include them in the BrowserTestingModule.
- */
- const BROWSER_NOOP_ANIMATIONS_PROVIDERS = [
- { provide: AnimationDriver, useClass: NoopAnimationDriver },
- { provide: ANIMATION_MODULE_TYPE, useValue: 'NoopAnimations' },
- ...SHARED_ANIMATION_PROVIDERS,
- ];
- /**
- * Separate providers from the actual module so that we can do a local modification in Google3 to
- * include them in the BrowserModule.
- */
- const BROWSER_ANIMATIONS_PROVIDERS = [
- // Note: the `ngServerMode` happen inside factories to give the variable time to initialize.
- {
- provide: AnimationDriver,
- useFactory: () => typeof ngServerMode !== 'undefined' && ngServerMode
- ? new NoopAnimationDriver()
- : new _WebAnimationsDriver(),
- },
- {
- provide: ANIMATION_MODULE_TYPE,
- useFactory: () => typeof ngServerMode !== 'undefined' && ngServerMode ? 'NoopAnimations' : 'BrowserAnimations',
- },
- ...SHARED_ANIMATION_PROVIDERS,
- ];
- /**
- * Exports `BrowserModule` with additional dependency-injection providers
- * for use with animations. See [Animations](guide/animations).
- * @publicApi
- */
- class BrowserAnimationsModule {
- /**
- * Configures the module based on the specified object.
- *
- * @param config Object used to configure the behavior of the `BrowserAnimationsModule`.
- * @see {@link BrowserAnimationsModuleConfig}
- *
- * @usageNotes
- * When registering the `BrowserAnimationsModule`, you can use the `withConfig`
- * function as follows:
- * ```ts
- * @NgModule({
- * imports: [BrowserAnimationsModule.withConfig(config)]
- * })
- * class MyNgModule {}
- * ```
- */
- static withConfig(config) {
- return {
- ngModule: BrowserAnimationsModule,
- providers: config.disableAnimations
- ? BROWSER_NOOP_ANIMATIONS_PROVIDERS
- : BROWSER_ANIMATIONS_PROVIDERS,
- };
- }
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: BrowserAnimationsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.13", ngImport: i0, type: BrowserAnimationsModule, exports: [BrowserModule] });
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: BrowserAnimationsModule, providers: BROWSER_ANIMATIONS_PROVIDERS, imports: [BrowserModule] });
- }
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: BrowserAnimationsModule, decorators: [{
- type: NgModule,
- args: [{
- exports: [BrowserModule],
- providers: BROWSER_ANIMATIONS_PROVIDERS,
- }]
- }] });
- /**
- * Returns the set of dependency-injection providers
- * to enable animations in an application. See [animations guide](guide/animations)
- * to learn more about animations in Angular.
- *
- * @usageNotes
- *
- * The function is useful when you want to enable animations in an application
- * bootstrapped using the `bootstrapApplication` function. In this scenario there
- * is no need to import the `BrowserAnimationsModule` NgModule at all, just add
- * providers returned by this function to the `providers` list as show below.
- *
- * ```ts
- * bootstrapApplication(RootComponent, {
- * providers: [
- * provideAnimations()
- * ]
- * });
- * ```
- *
- * @publicApi
- */
- function provideAnimations() {
- _performanceMarkFeature('NgEagerAnimations');
- // Return a copy to prevent changes to the original array in case any in-place
- // alterations are performed to the `provideAnimations` call results in app code.
- return [...BROWSER_ANIMATIONS_PROVIDERS];
- }
- /**
- * A null player that must be imported to allow disabling of animations.
- * @publicApi
- */
- class NoopAnimationsModule {
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: NoopAnimationsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.13", ngImport: i0, type: NoopAnimationsModule, exports: [BrowserModule] });
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: NoopAnimationsModule, providers: BROWSER_NOOP_ANIMATIONS_PROVIDERS, imports: [BrowserModule] });
- }
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: NoopAnimationsModule, decorators: [{
- type: NgModule,
- args: [{
- exports: [BrowserModule],
- providers: BROWSER_NOOP_ANIMATIONS_PROVIDERS,
- }]
- }] });
- /**
- * Returns the set of dependency-injection providers
- * to disable animations in an application. See [animations guide](guide/animations)
- * to learn more about animations in Angular.
- *
- * @usageNotes
- *
- * The function is useful when you want to bootstrap an application using
- * the `bootstrapApplication` function, but you need to disable animations
- * (for example, when running tests).
- *
- * ```ts
- * bootstrapApplication(RootComponent, {
- * providers: [
- * provideNoopAnimations()
- * ]
- * });
- * ```
- *
- * @publicApi
- */
- function provideNoopAnimations() {
- // Return a copy to prevent changes to the original array in case any in-place
- // alterations are performed to the `provideNoopAnimations` call results in app code.
- return [...BROWSER_NOOP_ANIMATIONS_PROVIDERS];
- }
- export { BrowserAnimationsModule, NoopAnimationsModule, provideAnimations, provideNoopAnimations, InjectableAnimationEngine as ɵInjectableAnimationEngine };
- //# sourceMappingURL=animations.mjs.map
|