/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ import { AnimationBuilder } from '@angular/animations'; import { AnimationDriver, ɵAnimationEngine as AnimationEngine, ɵAnimationStyleNormalizer as AnimationStyleNormalizer, ɵNoopAnimationDriver as NoopAnimationDriver, ɵWebAnimationsDriver as WebAnimationsDriver, ɵWebAnimationsStyleNormalizer as WebAnimationsStyleNormalizer } from '@angular/animations/browser'; import { DOCUMENT } from '@angular/common'; import { ANIMATION_MODULE_TYPE, ApplicationRef, Inject, Injectable, NgZone, RendererFactory2 } from '@angular/core'; import { ɵDomRendererFactory2 as DomRendererFactory2 } from '@angular/platform-browser'; import { BrowserAnimationBuilder } from './animation_builder'; import { AnimationRendererFactory } from './animation_renderer'; import * as i0 from "@angular/core"; import * as i1 from "@angular/animations/browser"; export 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, appRef) { super(doc.body, driver, normalizer); } ngOnDestroy() { this.flush(); } static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InjectableAnimationEngine, deps: [{ token: DOCUMENT }, { token: i1.AnimationDriver }, { token: i1.ɵAnimationStyleNormalizer }, { token: i0.ApplicationRef }], target: i0.ɵɵFactoryTarget.Injectable }); } static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InjectableAnimationEngine }); } } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InjectableAnimationEngine, decorators: [{ type: Injectable }], ctorParameters: function () { return [{ type: undefined, decorators: [{ type: Inject, args: [DOCUMENT] }] }, { type: i1.AnimationDriver }, { type: i1.ɵAnimationStyleNormalizer }, { type: i0.ApplicationRef }]; } }); export function instantiateDefaultStyleNormalizer() { return new WebAnimationsStyleNormalizer(); } export function instantiateRendererFactory(renderer, engine, zone) { return new AnimationRendererFactory(renderer, engine, zone); } const SHARED_ANIMATION_PROVIDERS = [ { provide: AnimationBuilder, useClass: BrowserAnimationBuilder }, { 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 BrowserModule. */ export const BROWSER_ANIMATIONS_PROVIDERS = [ { provide: AnimationDriver, useFactory: () => new WebAnimationsDriver() }, { provide: ANIMATION_MODULE_TYPE, useValue: 'BrowserAnimations' }, ...SHARED_ANIMATION_PROVIDERS ]; /** * Separate providers from the actual module so that we can do a local modification in Google3 to * include them in the BrowserTestingModule. */ export const BROWSER_NOOP_ANIMATIONS_PROVIDERS = [ { provide: AnimationDriver, useClass: NoopAnimationDriver }, { provide: ANIMATION_MODULE_TYPE, useValue: 'NoopAnimations' }, ...SHARED_ANIMATION_PROVIDERS ]; //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvdmlkZXJzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvcGxhdGZvcm0tYnJvd3Nlci9hbmltYXRpb25zL3NyYy9wcm92aWRlcnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7OztHQU1HO0FBRUgsT0FBTyxFQUFDLGdCQUFnQixFQUFDLE1BQU0scUJBQXFCLENBQUM7QUFDckQsT0FBTyxFQUFDLGVBQWUsRUFBRSxnQkFBZ0IsSUFBSSxlQUFlLEVBQUUseUJBQXlCLElBQUksd0JBQXdCLEVBQUUsb0JBQW9CLElBQUks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