1 line
No EOL
7.2 KiB
Text
1 line
No EOL
7.2 KiB
Text
{"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 _traceUntil,\n traceWhile as _traceWhile,\n traceUntilComplete as _traceUntilComplete,\n traceUntilFirst as _traceUntilFirst\n} from 'rxfire/performance';\n\nexport const traceUntil = ɵzoneWrap(_traceUntil, true);\nexport const traceWhile = ɵzoneWrap(_traceWhile, true);\nexport const traceUntilComplete = ɵzoneWrap(_traceUntilComplete, true);\nexport const traceUntilFirst = ɵzoneWrap(_traceUntilFirst, true);\n","// DO NOT MODIFY, this file is autogenerated by tools/build.ts\nexport * from 'firebase/performance';\nimport { ɵzoneWrap } from '@angular/fire';\nimport {\n getPerformance as _getPerformance,\n initializePerformance as _initializePerformance,\n trace as _trace\n} from 'firebase/performance';\n\nexport const getPerformance = ɵzoneWrap(_getPerformance, true);\nexport const initializePerformance = ɵzoneWrap(_initializePerformance, true);\nexport const trace = ɵzoneWrap(_trace, true);\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["_traceUntil","_traceWhile","_traceUntilComplete","_traceUntilFirst","_getPerformance","_initializePerformance","_trace"],"mappings":";;;;;;;;;;;;MASa,WAAW;IACtB,YAAY,WAAgC;QAC1C,OAAO,WAAW,CAAC;KACpB;CACF;AAEM,MAAM,yBAAyB,GAAG,aAAa,CAAC;MAK1C,oBAAoB;IAC/B;QACE,OAAO,kBAAkB,CAAsB,yBAAyB,CAAC,CAAC;KAC3E;CACF;MAEY,oBAAoB,GAAG,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,IAAI,CACpD,SAAS,CAAC,MAAM,IAAI,CAAC,kBAAkB,CAAsB,yBAAyB,CAAC,CAAC,CAAC,EACzF,QAAQ,EAAE;;ACpBL,MAAM,8BAA8B,GAAG,IAAI,cAAc,CAAgB,oCAAoC,CAAC,CAAC;SAEtG,iCAAiC,CAC/C,QAAyC,EACzC,UAAuB;AACvB;AACA,QAAgB;IAEhB,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,EAAE;QAAE,OAAO,IAAI,CAAC;KAAE;IAClD,MAAM,kBAAkB,GAAG,qBAAqB,CAAsB,yBAAyB,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;IACvH,OAAO,kBAAkB,IAAI,IAAI,WAAW,CAAC,kBAAkB,CAAC,CAAC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