Kargi-Sitesi/node_modules/@angular/fire/fesm2015/angular-fire-performance.js.map

1 line
7.2 KiB
Text
Raw Normal View History

2024-11-04 02:30:09 +00:00
{"version":3,"file":"angular-fire-performance.js","sources":["../../../src/performance/performance.ts","../../../src/performance/performance.module.ts","../../../src/performance/rxfire.ts","../../../src/performance/firebase.ts","../../../src/performance/angular-fire-performance.ts"],"sourcesContent":["import { FirebasePerformance } from 'firebase/performance';\nimport { ɵgetAllInstancesOf } from '@angular/fire';\nimport { from, timer } from 'rxjs';\nimport { concatMap, distinct } from 'rxjs/operators';\n\n// see notes in core/firebase.app.module.ts for why we're building the class like this\n// tslint:disable-next-line:no-empty-interface\nexport interface Performance extends FirebasePerformance {}\n\nexport class Performance {\n constructor(performance: FirebasePerformance) {\n return performance;\n }\n}\n\nexport const PERFORMANCE_PROVIDER_NAME = 'performance';\n\n// tslint:disable-next-line:no-empty-interface\nexport interface PerformanceInstances extends Array<FirebasePerformance> {}\n\nexport class PerformanceInstances {\n constructor() {\n return ɵgetAllInstancesOf<FirebasePerformance>(PERFORMANCE_PROVIDER_NAME);\n }\n}\n\nexport const performanceInstance$ = timer(0, 300).pipe(\n concatMap(() => from(ɵgetAllInstancesOf<FirebasePerformance>(PERFORMANCE_PROVIDER_NAME))),\n distinct(),\n);\n","import { NgModule, Optional, NgZone, InjectionToken, ModuleWithProviders, PLATFORM_ID, Injector } from '@angular/core';\nimport { FirebasePerformance } from 'firebase/performance';\nimport { ɵgetDefaultInstanceOf, ɵAngularFireSchedulers, VERSION } from '@angular/fire';\nimport { Performance, PerformanceInstances, PERFORMANCE_PROVIDER_NAME } from './performance';\nimport { FirebaseApps, FirebaseApp } from '@angular/fire/app';\nimport { registerVersion } from 'firebase/app';\nimport { isPlatformBrowser } from '@angular/common';\n\nexport const PROVIDED_PERFORMANCE_INSTANCES = new InjectionToken<Performance[]>('angularfire2.performance-instances');\n\nexport function defaultPerformanceInstanceFactory(\n provided: FirebasePerformance[]|undefined,\n defaultApp: FirebaseApp,\n // tslint:disable-next-line:ban-types\n platform: Object\n) {\n if (!isPlatformBrowser(platform)) { return null; }\n const defaultPerformance = ɵgetDefaultInstanceOf<FirebasePerformance>(PERFORMANCE_PROVIDER_NAME, provided, defaultApp);\n return defaultPerformance && new Performance(defaultPerformance);\n}\n\nexport function performanceInstanceFactory(fn: (injector: Injector) => FirebasePerformance) {\n // tslint:disable-next-line:ban-types\n return (zone: NgZone, platform: Object, injector: Injector) => {\n if (!isPlatformBrowser(platform)) { return null; }\n const performance = zone.runOutsideAngular(() => fn(injector));\n return new Performance(performance);\n };\n}\n\nconst PERFORMANCE_INSTANCES_PROVIDER = {\n provide: PerformanceInstances,\n deps: [\n [new Optional(), PROVIDED_PERFORMANCE_INSTANCES ],\n ]\n};\n\nconst DEFAULT_PERFORMANCE_INSTANCE_PROVIDER = {\n provide: Performance,\n useFactory: defaultPerformanceInstanceFactory,\n deps: [\n [new Optional(), PROVIDED_PERFORMANCE_INSTANCES ],\n FirebaseApp,\n PLATFORM_ID,\n ]\n};\n\n@NgModule({\n providers: [\n DEFAULT_PERFORMANCE_INSTANCE_PROVIDER,\n PERFORMANCE_INSTANCES_PROVIDER,\n ]\n})\nexport class PerformanceModule {\n constructor() {\n registerVersion('angularfire', VERSION.full, 'perf');\n }\n}\n\nexport function providePerformance(\n fn: (injector: Injector) => FirebasePerformance, ...deps: any[]\n): ModuleWithProviders<PerformanceModule> {\n return {\n ngModule: PerformanceModule,\n providers: [{\n provide: PROVIDED_PERFORMANCE_INSTANCES,\n useFactory: performanceInstanceFactory(fn),\n multi: true,\n deps: [\n NgZone,\n PLATFORM_ID,\n Injector,\n ɵAngularFireSchedulers,\n FirebaseApps,\n ...deps,\n ]\n }]\n };\n}\n","// DO NOT MODIFY, this file is autogenerated by tools/build.ts\nimport { ɵzoneWrap } from '@angular/fire';\nimport {\n traceUntil as