@angular/fire 18.0.0 → 18.0.1-canary.3639e41

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.
Files changed (96) hide show
  1. package/esm2022/analytics/analytics.module.mjs +5 -5
  2. package/esm2022/analytics/screen-tracking.service.mjs +4 -4
  3. package/esm2022/analytics/user-tracking.service.mjs +4 -4
  4. package/esm2022/app/app.module.mjs +5 -5
  5. package/esm2022/app-check/app-check.module.mjs +5 -5
  6. package/esm2022/auth/auth.module.mjs +5 -5
  7. package/esm2022/auth-guard/auth-guard.mjs +4 -4
  8. package/esm2022/auth-guard/auth-guard.module.mjs +5 -5
  9. package/esm2022/compat/analytics/analytics.mjs +4 -4
  10. package/esm2022/compat/analytics/analytics.module.mjs +5 -5
  11. package/esm2022/compat/analytics/screen-tracking.service.mjs +4 -4
  12. package/esm2022/compat/analytics/user-tracking.service.mjs +4 -4
  13. package/esm2022/compat/auth/auth.mjs +4 -4
  14. package/esm2022/compat/auth/auth.module.mjs +5 -5
  15. package/esm2022/compat/auth-guard/auth-guard.mjs +4 -4
  16. package/esm2022/compat/auth-guard/auth-guard.module.mjs +5 -5
  17. package/esm2022/compat/database/database.mjs +4 -4
  18. package/esm2022/compat/database/database.module.mjs +5 -5
  19. package/esm2022/compat/firebase.app.module.mjs +5 -5
  20. package/esm2022/compat/firestore/firestore.mjs +4 -4
  21. package/esm2022/compat/firestore/firestore.module.mjs +5 -5
  22. package/esm2022/compat/functions/functions.mjs +4 -4
  23. package/esm2022/compat/functions/functions.module.mjs +5 -5
  24. package/esm2022/compat/messaging/messaging.mjs +4 -4
  25. package/esm2022/compat/messaging/messaging.module.mjs +5 -5
  26. package/esm2022/compat/performance/performance.mjs +4 -4
  27. package/esm2022/compat/performance/performance.module.mjs +5 -5
  28. package/esm2022/compat/performance/performance.service.mjs +4 -4
  29. package/esm2022/compat/remote-config/remote-config.mjs +4 -4
  30. package/esm2022/compat/remote-config/remote-config.module.mjs +5 -5
  31. package/esm2022/compat/storage/pipes/storageUrl.pipe.mjs +8 -8
  32. package/esm2022/compat/storage/storage.mjs +4 -4
  33. package/esm2022/compat/storage/storage.module.mjs +5 -5
  34. package/esm2022/database/database.module.mjs +5 -5
  35. package/esm2022/firestore/firestore.module.mjs +5 -5
  36. package/esm2022/firestore/lite/lite.module.mjs +5 -5
  37. package/esm2022/functions/functions.module.mjs +5 -5
  38. package/esm2022/messaging/messaging.module.mjs +5 -5
  39. package/esm2022/performance/performance.module.mjs +5 -5
  40. package/esm2022/remote-config/remote-config.module.mjs +5 -5
  41. package/esm2022/storage/storage.module.mjs +5 -5
  42. package/esm2022/vertexai-preview/vertexai.module.mjs +5 -5
  43. package/esm2022/zones.mjs +4 -4
  44. package/fesm2022/angular-fire-analytics.mjs +297 -410
  45. package/fesm2022/angular-fire-analytics.mjs.map +1 -7
  46. package/fesm2022/angular-fire-app-check.mjs +91 -162
  47. package/fesm2022/angular-fire-app-check.mjs.map +1 -7
  48. package/fesm2022/angular-fire-app.mjs +108 -181
  49. package/fesm2022/angular-fire-app.mjs.map +1 -7
  50. package/fesm2022/angular-fire-auth-guard.mjs +73 -83
  51. package/fesm2022/angular-fire-auth-guard.mjs.map +1 -7
  52. package/fesm2022/angular-fire-auth.mjs +142 -421
  53. package/fesm2022/angular-fire-auth.mjs.map +1 -7
  54. package/fesm2022/angular-fire-compat-analytics.mjs +271 -262
  55. package/fesm2022/angular-fire-compat-analytics.mjs.map +1 -7
  56. package/fesm2022/angular-fire-compat-auth-guard.mjs +72 -83
  57. package/fesm2022/angular-fire-compat-auth-guard.mjs.map +1 -7
  58. package/fesm2022/angular-fire-compat-auth.mjs +214 -215
  59. package/fesm2022/angular-fire-compat-auth.mjs.map +1 -7
  60. package/fesm2022/angular-fire-compat-database.mjs +378 -375
  61. package/fesm2022/angular-fire-compat-database.mjs.map +1 -7
  62. package/fesm2022/angular-fire-compat-firestore.mjs +677 -537
  63. package/fesm2022/angular-fire-compat-firestore.mjs.map +1 -7
  64. package/fesm2022/angular-fire-compat-functions.mjs +94 -98
  65. package/fesm2022/angular-fire-compat-functions.mjs.map +1 -7
  66. package/fesm2022/angular-fire-compat-messaging.mjs +107 -107
  67. package/fesm2022/angular-fire-compat-messaging.mjs.map +1 -7
  68. package/fesm2022/angular-fire-compat-performance.mjs +152 -158
  69. package/fesm2022/angular-fire-compat-performance.mjs.map +1 -7
  70. package/fesm2022/angular-fire-compat-remote-config.mjs +232 -216
  71. package/fesm2022/angular-fire-compat-remote-config.mjs.map +1 -7
  72. package/fesm2022/angular-fire-compat-storage.mjs +231 -226
  73. package/fesm2022/angular-fire-compat-storage.mjs.map +1 -7
  74. package/fesm2022/angular-fire-compat.mjs +153 -140
  75. package/fesm2022/angular-fire-compat.mjs.map +1 -7
  76. package/fesm2022/angular-fire-database.mjs +136 -376
  77. package/fesm2022/angular-fire-database.mjs.map +1 -7
  78. package/fesm2022/angular-fire-firestore-lite.mjs +139 -388
  79. package/fesm2022/angular-fire-firestore-lite.mjs.map +1 -7
  80. package/fesm2022/angular-fire-firestore.mjs +167 -526
  81. package/fesm2022/angular-fire-firestore.mjs.map +1 -7
  82. package/fesm2022/angular-fire-functions.mjs +93 -166
  83. package/fesm2022/angular-fire-functions.mjs.map +1 -7
  84. package/fesm2022/angular-fire-messaging.mjs +118 -196
  85. package/fesm2022/angular-fire-messaging.mjs.map +1 -7
  86. package/fesm2022/angular-fire-performance.mjs +104 -178
  87. package/fesm2022/angular-fire-performance.mjs.map +1 -7
  88. package/fesm2022/angular-fire-remote-config.mjs +132 -254
  89. package/fesm2022/angular-fire-remote-config.mjs.map +1 -7
  90. package/fesm2022/angular-fire-storage.mjs +105 -225
  91. package/fesm2022/angular-fire-storage.mjs.map +1 -7
  92. package/fesm2022/angular-fire-vertexai-preview.mjs +85 -146
  93. package/fesm2022/angular-fire-vertexai-preview.mjs.map +1 -7
  94. package/fesm2022/angular-fire.mjs +213 -183
  95. package/fesm2022/angular-fire.mjs.map +1 -7
  96. package/package.json +1 -1
@@ -1,111 +1,111 @@
1
- // base.mjs
2
- var proxyPolyfillCompat = {
3
- deleteToken: null,
4
- getToken: null,
5
- onMessage: null,
6
- onBackgroundMessage: null
7
- };
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, PLATFORM_ID, Injectable, Inject, Optional, NgModule } from '@angular/core';
3
+ import * as i1 from '@angular/fire';
4
+ import { VERSION } from '@angular/fire';
5
+ import { ɵfirebaseAppFactory as _firebaseAppFactory, ɵcacheInstance as _cacheInstance, ɵlazySDKProxy as _lazySDKProxy, FIREBASE_OPTIONS, FIREBASE_APP_NAME, ɵapplyMixins as _applyMixins } from '@angular/fire/compat';
6
+ import { isSupported } from 'firebase/messaging';
7
+ import { of, EMPTY, Observable, concat } from 'rxjs';
8
+ import { subscribeOn, observeOn, switchMap, map, shareReplay, switchMapTo, catchError, mergeMap, defaultIfEmpty } from 'rxjs/operators';
9
+ import firebase from 'firebase/compat/app';
8
10
 
9
- // messaging.mjs
10
- import { Inject, Injectable, InjectionToken, NgZone, Optional, PLATFORM_ID } from "@angular/core";
11
- import { ɵAngularFireSchedulers } from "@angular/fire";
12
- import { ɵapplyMixins, ɵlazySDKProxy } from "@angular/fire/compat";
13
- import { FIREBASE_APP_NAME, FIREBASE_OPTIONS, ɵcacheInstance, ɵfirebaseAppFactory } from "@angular/fire/compat";
14
- import { isSupported } from "firebase/messaging";
15
- import { EMPTY, Observable, concat, of } from "rxjs";
16
- import { catchError, defaultIfEmpty, map, mergeMap, observeOn, shareReplay, subscribeOn, switchMap, switchMapTo } from "rxjs/operators";
17
- import * as i0 from "@angular/core";
18
- import * as i1 from "@angular/fire";
19
- var VAPID_KEY = new InjectionToken("angularfire2.messaging.vapid-key");
20
- var SERVICE_WORKER = new InjectionToken("angularfire2.messaging.service-worker-registeration");
21
- var AngularFireMessaging = class _AngularFireMessaging {
22
- requestPermission;
23
- getToken;
24
- tokenChanges;
25
- messages;
26
- requestToken;
27
- deleteToken;
28
- constructor(options, name, platformId, zone, schedulers, vapidKey, _serviceWorker) {
29
- const serviceWorker = _serviceWorker;
30
- const messaging = of(void 0).pipe(subscribeOn(schedulers.outsideAngular), observeOn(schedulers.insideAngular), switchMap(isSupported), switchMap((supported) => supported ? import("firebase/compat/messaging") : EMPTY), map(() => ɵfirebaseAppFactory(options, zone, name)), switchMap((app) => ɵcacheInstance(`${app.name}.messaging`, "AngularFireMessaging", app.name, () => {
31
- return of(app.messaging());
32
- }, [])), shareReplay({ bufferSize: 1, refCount: false }));
33
- this.requestPermission = messaging.pipe(subscribeOn(schedulers.outsideAngular), observeOn(schedulers.insideAngular), switchMap(() => Notification.requestPermission()));
34
- this.getToken = messaging.pipe(subscribeOn(schedulers.outsideAngular), observeOn(schedulers.insideAngular), switchMap(async (messaging2) => {
35
- if (Notification.permission === "granted") {
36
- const serviceWorkerRegistration = serviceWorker ? await serviceWorker : null;
37
- return await messaging2.getToken({ vapidKey, serviceWorkerRegistration });
38
- } else {
39
- return null;
40
- }
41
- }));
42
- const notificationPermission$ = new Observable((emitter) => {
43
- navigator.permissions.query({ name: "notifications" }).then((notificationPerm) => {
44
- notificationPerm.onchange = () => emitter.next();
45
- });
46
- });
47
- const tokenChange$ = messaging.pipe(subscribeOn(schedulers.outsideAngular), observeOn(schedulers.insideAngular), switchMapTo(notificationPermission$), switchMapTo(this.getToken));
48
- this.tokenChanges = messaging.pipe(subscribeOn(schedulers.outsideAngular), observeOn(schedulers.insideAngular), switchMap(() => concat(this.getToken, tokenChange$)));
49
- this.messages = messaging.pipe(subscribeOn(schedulers.outsideAngular), observeOn(schedulers.insideAngular), switchMap((messaging2) => new Observable((emitter) => messaging2.onMessage(emitter))));
50
- this.requestToken = messaging.pipe(subscribeOn(schedulers.outsideAngular), observeOn(schedulers.insideAngular), switchMap(() => this.requestPermission), catchError(() => of(null)), mergeMap(() => this.tokenChanges));
51
- this.deleteToken = () => messaging.pipe(subscribeOn(schedulers.outsideAngular), observeOn(schedulers.insideAngular), switchMap((messaging2) => messaging2.deleteToken()), defaultIfEmpty(false));
52
- return ɵlazySDKProxy(this, messaging, zone);
53
- }
54
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-rc.3", ngImport: i0, type: _AngularFireMessaging, deps: [{ token: FIREBASE_OPTIONS }, { token: FIREBASE_APP_NAME, optional: true }, { token: PLATFORM_ID }, { token: i0.NgZone }, { token: i1.ɵAngularFireSchedulers }, { token: VAPID_KEY, optional: true }, { token: SERVICE_WORKER, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
55
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-rc.3", ngImport: i0, type: _AngularFireMessaging, providedIn: "any" });
11
+ // DO NOT MODIFY, this file is autogenerated by tools/build.ts
12
+ // Export a null object with the same keys as firebase/compat/messaging, so Proxy can work with proxy-polyfill in Internet Explorer
13
+ const proxyPolyfillCompat = {
14
+ deleteToken: null,
15
+ getToken: null,
16
+ onMessage: null,
17
+ onBackgroundMessage: null,
56
18
  };
57
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-rc.3", ngImport: i0, type: AngularFireMessaging, decorators: [{
58
- type: Injectable,
59
- args: [{
60
- providedIn: "any"
61
- }]
62
- }], ctorParameters: () => [{ type: void 0, decorators: [{
63
- type: Inject,
64
- args: [FIREBASE_OPTIONS]
65
- }] }, { type: void 0, decorators: [{
66
- type: Optional
67
- }, {
68
- type: Inject,
69
- args: [FIREBASE_APP_NAME]
70
- }] }, { type: Object, decorators: [{
71
- type: Inject,
72
- args: [PLATFORM_ID]
73
- }] }, { type: i0.NgZone }, { type: i1.ɵAngularFireSchedulers }, { type: void 0, decorators: [{
74
- type: Optional
75
- }, {
76
- type: Inject,
77
- args: [VAPID_KEY]
78
- }] }, { type: void 0, decorators: [{
79
- type: Optional
80
- }, {
81
- type: Inject,
82
- args: [SERVICE_WORKER]
83
- }] }] });
84
- ɵapplyMixins(AngularFireMessaging, [proxyPolyfillCompat]);
85
19
 
86
- // messaging.module.mjs
87
- import { NgModule } from "@angular/core";
88
- import { VERSION } from "@angular/fire";
89
- import firebase from "firebase/compat/app";
90
- import * as i02 from "@angular/core";
91
- var AngularFireMessagingModule = class _AngularFireMessagingModule {
92
- constructor() {
93
- firebase.registerVersion("angularfire", VERSION.full, "fcm-compat");
94
- }
95
- static ɵfac = i02.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-rc.3", ngImport: i02, type: _AngularFireMessagingModule, deps: [], target: i02.ɵɵFactoryTarget.NgModule });
96
- static ɵmod = i02.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.0-rc.3", ngImport: i02, type: _AngularFireMessagingModule });
97
- static ɵinj = i02.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.0-rc.3", ngImport: i02, type: _AngularFireMessagingModule, providers: [AngularFireMessaging] });
98
- };
99
- i02.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-rc.3", ngImport: i02, type: AngularFireMessagingModule, decorators: [{
100
- type: NgModule,
101
- args: [{
102
- providers: [AngularFireMessaging]
103
- }]
104
- }], ctorParameters: () => [] });
105
- export {
106
- AngularFireMessaging,
107
- AngularFireMessagingModule,
108
- SERVICE_WORKER,
109
- VAPID_KEY
110
- };
20
+ const VAPID_KEY = new InjectionToken('angularfire2.messaging.vapid-key');
21
+ const SERVICE_WORKER = new InjectionToken('angularfire2.messaging.service-worker-registeration');
22
+ class AngularFireMessaging {
23
+ requestPermission;
24
+ getToken;
25
+ tokenChanges;
26
+ messages;
27
+ requestToken;
28
+ deleteToken;
29
+ constructor(options, name,
30
+ // eslint-disable-next-line @typescript-eslint/ban-types
31
+ platformId, zone, schedulers, vapidKey, _serviceWorker) {
32
+ const serviceWorker = _serviceWorker;
33
+ const messaging = of(undefined).pipe(subscribeOn(schedulers.outsideAngular), observeOn(schedulers.insideAngular), switchMap(isSupported), switchMap(supported => supported ? import('firebase/compat/messaging') : EMPTY), map(() => _firebaseAppFactory(options, zone, name)), switchMap(app => _cacheInstance(`${app.name}.messaging`, 'AngularFireMessaging', app.name, () => {
34
+ return of(app.messaging());
35
+ }, [])), shareReplay({ bufferSize: 1, refCount: false }));
36
+ this.requestPermission = messaging.pipe(subscribeOn(schedulers.outsideAngular), observeOn(schedulers.insideAngular), switchMap(() => Notification.requestPermission()));
37
+ this.getToken = messaging.pipe(subscribeOn(schedulers.outsideAngular), observeOn(schedulers.insideAngular), switchMap(async (messaging) => {
38
+ if (Notification.permission === 'granted') {
39
+ // eslint-disable-next-line @typescript-eslint/no-misused-promises
40
+ const serviceWorkerRegistration = serviceWorker ? await serviceWorker : null;
41
+ return await messaging.getToken({ vapidKey, serviceWorkerRegistration });
42
+ }
43
+ else {
44
+ return null;
45
+ }
46
+ }));
47
+ const notificationPermission$ = new Observable(emitter => {
48
+ navigator.permissions.query({ name: 'notifications' }).then(notificationPerm => {
49
+ notificationPerm.onchange = () => emitter.next();
50
+ });
51
+ });
52
+ const tokenChange$ = messaging.pipe(subscribeOn(schedulers.outsideAngular), observeOn(schedulers.insideAngular), switchMapTo(notificationPermission$), switchMapTo(this.getToken));
53
+ this.tokenChanges = messaging.pipe(subscribeOn(schedulers.outsideAngular), observeOn(schedulers.insideAngular), switchMap(() => concat(this.getToken, tokenChange$)));
54
+ this.messages = messaging.pipe(subscribeOn(schedulers.outsideAngular), observeOn(schedulers.insideAngular), switchMap(messaging => new Observable(emitter => messaging.onMessage(emitter))));
55
+ this.requestToken = messaging.pipe(subscribeOn(schedulers.outsideAngular), observeOn(schedulers.insideAngular), switchMap(() => this.requestPermission), catchError(() => of(null)), mergeMap(() => this.tokenChanges));
56
+ this.deleteToken = () => messaging.pipe(subscribeOn(schedulers.outsideAngular), observeOn(schedulers.insideAngular), switchMap(messaging => messaging.deleteToken()), defaultIfEmpty(false));
57
+ return _lazySDKProxy(this, messaging, zone);
58
+ }
59
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: AngularFireMessaging, deps: [{ token: FIREBASE_OPTIONS }, { token: FIREBASE_APP_NAME, optional: true }, { token: PLATFORM_ID }, { token: i0.NgZone }, { token: i1.ɵAngularFireSchedulers }, { token: VAPID_KEY, optional: true }, { token: SERVICE_WORKER, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
60
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: AngularFireMessaging, providedIn: 'any' });
61
+ }
62
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: AngularFireMessaging, decorators: [{
63
+ type: Injectable,
64
+ args: [{
65
+ providedIn: 'any'
66
+ }]
67
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
68
+ type: Inject,
69
+ args: [FIREBASE_OPTIONS]
70
+ }] }, { type: undefined, decorators: [{
71
+ type: Optional
72
+ }, {
73
+ type: Inject,
74
+ args: [FIREBASE_APP_NAME]
75
+ }] }, { type: Object, decorators: [{
76
+ type: Inject,
77
+ args: [PLATFORM_ID]
78
+ }] }, { type: i0.NgZone }, { type: i1.ɵAngularFireSchedulers }, { type: undefined, decorators: [{
79
+ type: Optional
80
+ }, {
81
+ type: Inject,
82
+ args: [VAPID_KEY]
83
+ }] }, { type: undefined, decorators: [{
84
+ type: Optional
85
+ }, {
86
+ type: Inject,
87
+ args: [SERVICE_WORKER]
88
+ }] }] });
89
+ _applyMixins(AngularFireMessaging, [proxyPolyfillCompat]);
90
+
91
+ class AngularFireMessagingModule {
92
+ constructor() {
93
+ firebase.registerVersion('angularfire', VERSION.full, 'fcm-compat');
94
+ }
95
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: AngularFireMessagingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
96
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.0", ngImport: i0, type: AngularFireMessagingModule });
97
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: AngularFireMessagingModule, providers: [AngularFireMessaging] });
98
+ }
99
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: AngularFireMessagingModule, decorators: [{
100
+ type: NgModule,
101
+ args: [{
102
+ providers: [AngularFireMessaging]
103
+ }]
104
+ }], ctorParameters: () => [] });
105
+
106
+ /**
107
+ * Generated bundle index. Do not edit.
108
+ */
109
+
110
+ export { AngularFireMessaging, AngularFireMessagingModule, SERVICE_WORKER, VAPID_KEY };
111
111
  //# sourceMappingURL=angular-fire-compat-messaging.mjs.map
@@ -1,7 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/compat/messaging/base.ts", "../../../src/compat/messaging/messaging.ts", "../../../src/compat/messaging/messaging.module.ts"],
4
- "sourcesContent": ["// DO NOT MODIFY, this file is autogenerated by tools/build.ts\n// Export a null object with the same keys as firebase/compat/messaging, so Proxy can work with proxy-polyfill in Internet Explorer\nexport const proxyPolyfillCompat = {\n deleteToken: null,\n getToken: null,\n onMessage: null,\n onBackgroundMessage: null,\n};\n", "import { Inject, Injectable, InjectionToken, NgZone, Optional, PLATFORM_ID } from '@angular/core';\nimport { ɵAngularFireSchedulers } from '@angular/fire';\nimport { ɵPromiseProxy, ɵapplyMixins, ɵlazySDKProxy } from '@angular/fire/compat';\nimport { FIREBASE_APP_NAME, FIREBASE_OPTIONS, ɵcacheInstance, ɵfirebaseAppFactory } from '@angular/fire/compat';\nimport { FirebaseOptions } from 'firebase/app';\nimport firebase from 'firebase/compat/app';\nimport { isSupported } from 'firebase/messaging';\nimport { EMPTY, Observable, concat, of } from 'rxjs';\nimport { catchError, defaultIfEmpty, map, mergeMap, observeOn, shareReplay, subscribeOn, switchMap, switchMapTo } from 'rxjs/operators';\nimport { proxyPolyfillCompat } from './base';\n\nexport const VAPID_KEY = new InjectionToken<string>('angularfire2.messaging.vapid-key');\nexport const SERVICE_WORKER = new InjectionToken<Promise<ServiceWorkerRegistration>>('angularfire2.messaging.service-worker-registeration');\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface AngularFireMessaging extends Omit<ɵPromiseProxy<firebase.messaging.Messaging>, 'deleteToken' | 'getToken' | 'requestPermission'> {\n}\n\n@Injectable({\n providedIn: 'any'\n})\nexport class AngularFireMessaging {\n\n public readonly requestPermission: Observable<NotificationPermission>;\n public readonly getToken: Observable<string | null>;\n public readonly tokenChanges: Observable<string | null>;\n public readonly messages: Observable<firebase.messaging.MessagePayload>;\n public readonly requestToken: Observable<string | null>;\n public readonly deleteToken: (token: string) => Observable<boolean>;\n\n constructor(\n @Inject(FIREBASE_OPTIONS) options: FirebaseOptions,\n @Optional() @Inject(FIREBASE_APP_NAME) name: string | null | undefined,\n // eslint-disable-next-line @typescript-eslint/ban-types\n @Inject(PLATFORM_ID) platformId: Object,\n zone: NgZone,\n schedulers: ɵAngularFireSchedulers,\n @Optional() @Inject(VAPID_KEY) vapidKey: string|null,\n @Optional() @Inject(SERVICE_WORKER) _serviceWorker: any,\n ) {\n const serviceWorker: Promise<ServiceWorkerRegistration> | null = _serviceWorker;\n\n const messaging = of(undefined).pipe(\n subscribeOn(schedulers.outsideAngular),\n observeOn(schedulers.insideAngular),\n switchMap(isSupported),\n switchMap(supported => supported ? import('firebase/compat/messaging') : EMPTY),\n map(() => ɵfirebaseAppFactory(options, zone, name)),\n switchMap(app => ɵcacheInstance(`${app.name}.messaging`, 'AngularFireMessaging', app.name, () => {\n return of(app.messaging());\n }, [])),\n shareReplay({ bufferSize: 1, refCount: false })\n );\n\n\n this.requestPermission = messaging.pipe(\n subscribeOn(schedulers.outsideAngular),\n observeOn(schedulers.insideAngular),\n switchMap(() => Notification.requestPermission())\n );\n\n this.getToken = messaging.pipe(\n subscribeOn(schedulers.outsideAngular),\n observeOn(schedulers.insideAngular),\n switchMap(async messaging => {\n if (Notification.permission === 'granted') {\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n const serviceWorkerRegistration = serviceWorker ? await serviceWorker : null;\n return await messaging.getToken({ vapidKey, serviceWorkerRegistration });\n } else {\n return null;\n }\n })\n );\n\n const notificationPermission$ = new Observable<string>(emitter => {\n navigator.permissions.query({ name: 'notifications' }).then(notificationPerm => {\n notificationPerm.onchange = () => emitter.next();\n });\n });\n\n\n const tokenChange$ = messaging.pipe(\n subscribeOn(schedulers.outsideAngular),\n observeOn(schedulers.insideAngular),\n switchMapTo(notificationPermission$),\n switchMapTo(this.getToken)\n );\n\n this.tokenChanges = messaging.pipe(\n subscribeOn(schedulers.outsideAngular),\n observeOn(schedulers.insideAngular),\n switchMap(() => concat(this.getToken, tokenChange$))\n );\n\n\n this.messages = messaging.pipe(\n subscribeOn(schedulers.outsideAngular),\n observeOn(schedulers.insideAngular),\n switchMap(messaging => new Observable<firebase.messaging.MessagePayload>(emitter =>\n messaging.onMessage(emitter)\n )),\n );\n\n this.requestToken = messaging.pipe(\n subscribeOn(schedulers.outsideAngular),\n observeOn(schedulers.insideAngular),\n switchMap(() => this.requestPermission),\n catchError(() => of(null)),\n mergeMap(() => this.tokenChanges)\n );\n\n this.deleteToken = () => messaging.pipe(\n subscribeOn(schedulers.outsideAngular),\n observeOn(schedulers.insideAngular),\n switchMap(messaging => messaging.deleteToken()),\n defaultIfEmpty(false)\n );\n\n return ɵlazySDKProxy(this, messaging, zone);\n }\n\n}\n\nɵapplyMixins(AngularFireMessaging, [proxyPolyfillCompat]);\n", "import { NgModule } from '@angular/core';\nimport { VERSION } from '@angular/fire';\nimport firebase from 'firebase/compat/app';\nimport { AngularFireMessaging } from './messaging';\n\n@NgModule({\n providers: [ AngularFireMessaging ]\n})\nexport class AngularFireMessagingModule {\n constructor() {\n firebase.registerVersion('angularfire', VERSION.full, 'fcm-compat');\n }\n}\n"],
5
- "mappings": ";AAEO,IAAM,sBAAsB;EACjC,aAAa;EACb,UAAU;EACV,WAAW;EAC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GC,WAAS,UAAA,KAAA,GAAA,EAAA,OACT,gBAAc,UAAA,KAAA,CAAA,GAAA,QAAA,mBAAA,WAAA,CAAA;8GAjBzB,uBAAoB,YAFnB,MAAK,CAAA;;gGAEN,sBAAoB,YAAA,CAAA;QAHhC;SAAW;IACV,YAAY;GACb;;QAWI;SAAO,gBAAgB;;QACvB;;QAAY;SAAO,iBAAiB;;QAEpC;SAAO,WAAW;;QAGlB;;QAAY;SAAO,SAAS;;QAC5B;;QAAY;SAAO,cAAc;;AAsFtC,aAAa,sBAAsB,CAAC,mBAAmB,CAAC;;;AC5HxD,SAAS,gBAAgB;AACzB,SAAS,eAAe;AACxB,OAAO,cAAc;;AAMf,IAAO,6BAAP,MAAO,4BAA0B;EACrC,cAAA;AACE,aAAS,gBAAgB,eAAe,QAAQ,MAAM,YAAY;EACpE;4GAHW,6BAA0B,MAAA,CAAA,GAAA,QAAA,oBAAA,SAAA,CAAA;6GAA1B,4BAA0B,CAAA;6GAA1B,6BAA0B,WAF1B,CAAE,oBAAoB,EAAE,CAAA;;kGAExB,4BAA0B,YAAA,CAAA;QAHtC;SAAS;IACR,WAAW,CAAE,oBAAoB;GAClC;;",
6
- "names": ["messaging"]
7
- }
1
+ {"version":3,"file":"angular-fire-compat-messaging.mjs","sources":["../../../src/compat/messaging/base.ts","../../../src/compat/messaging/messaging.ts","../../../src/compat/messaging/messaging.module.ts","../../../src/compat/messaging/angular-fire-compat-messaging.ts"],"sourcesContent":["// DO NOT MODIFY, this file is autogenerated by tools/build.ts\n// Export a null object with the same keys as firebase/compat/messaging, so Proxy can work with proxy-polyfill in Internet Explorer\nexport const proxyPolyfillCompat = {\n deleteToken: null,\n getToken: null,\n onMessage: null,\n onBackgroundMessage: null,\n};\n","import { Inject, Injectable, InjectionToken, NgZone, Optional, PLATFORM_ID } from '@angular/core';\nimport { ɵAngularFireSchedulers } from '@angular/fire';\nimport { ɵPromiseProxy, ɵapplyMixins, ɵlazySDKProxy } from '@angular/fire/compat';\nimport { FIREBASE_APP_NAME, FIREBASE_OPTIONS, ɵcacheInstance, ɵfirebaseAppFactory } from '@angular/fire/compat';\nimport { FirebaseOptions } from 'firebase/app';\nimport firebase from 'firebase/compat/app';\nimport { isSupported } from 'firebase/messaging';\nimport { EMPTY, Observable, concat, of } from 'rxjs';\nimport { catchError, defaultIfEmpty, map, mergeMap, observeOn, shareReplay, subscribeOn, switchMap, switchMapTo } from 'rxjs/operators';\nimport { proxyPolyfillCompat } from './base';\n\nexport const VAPID_KEY = new InjectionToken<string>('angularfire2.messaging.vapid-key');\nexport const SERVICE_WORKER = new InjectionToken<Promise<ServiceWorkerRegistration>>('angularfire2.messaging.service-worker-registeration');\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface AngularFireMessaging extends Omit<ɵPromiseProxy<firebase.messaging.Messaging>, 'deleteToken' | 'getToken' | 'requestPermission'> {\n}\n\n@Injectable({\n providedIn: 'any'\n})\nexport class AngularFireMessaging {\n\n public readonly requestPermission: Observable<NotificationPermission>;\n public readonly getToken: Observable<string | null>;\n public readonly tokenChanges: Observable<string | null>;\n public readonly messages: Observable<firebase.messaging.MessagePayload>;\n public readonly requestToken: Observable<string | null>;\n public readonly deleteToken: (token: string) => Observable<boolean>;\n\n constructor(\n @Inject(FIREBASE_OPTIONS) options: FirebaseOptions,\n @Optional() @Inject(FIREBASE_APP_NAME) name: string | null | undefined,\n // eslint-disable-next-line @typescript-eslint/ban-types\n @Inject(PLATFORM_ID) platformId: Object,\n zone: NgZone,\n schedulers: ɵAngularFireSchedulers,\n @Optional() @Inject(VAPID_KEY) vapidKey: string|null,\n @Optional() @Inject(SERVICE_WORKER) _serviceWorker: any,\n ) {\n const serviceWorker: Promise<ServiceWorkerRegistration> | null = _serviceWorker;\n\n const messaging = of(undefined).pipe(\n subscribeOn(schedulers.outsideAngular),\n observeOn(schedulers.insideAngular),\n switchMap(isSupported),\n switchMap(supported => supported ? import('firebase/compat/messaging') : EMPTY),\n map(() => ɵfirebaseAppFactory(options, zone, name)),\n switchMap(app => ɵcacheInstance(`${app.name}.messaging`, 'AngularFireMessaging', app.name, () => {\n return of(app.messaging());\n }, [])),\n shareReplay({ bufferSize: 1, refCount: false })\n );\n\n\n this.requestPermission = messaging.pipe(\n subscribeOn(schedulers.outsideAngular),\n observeOn(schedulers.insideAngular),\n switchMap(() => Notification.requestPermission())\n );\n\n this.getToken = messaging.pipe(\n subscribeOn(schedulers.outsideAngular),\n observeOn(schedulers.insideAngular),\n switchMap(async messaging => {\n if (Notification.permission === 'granted') {\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n const serviceWorkerRegistration = serviceWorker ? await serviceWorker : null;\n return await messaging.getToken({ vapidKey, serviceWorkerRegistration });\n } else {\n return null;\n }\n })\n );\n\n const notificationPermission$ = new Observable<string>(emitter => {\n navigator.permissions.query({ name: 'notifications' }).then(notificationPerm => {\n notificationPerm.onchange = () => emitter.next();\n });\n });\n\n\n const tokenChange$ = messaging.pipe(\n subscribeOn(schedulers.outsideAngular),\n observeOn(schedulers.insideAngular),\n switchMapTo(notificationPermission$),\n switchMapTo(this.getToken)\n );\n\n this.tokenChanges = messaging.pipe(\n subscribeOn(schedulers.outsideAngular),\n observeOn(schedulers.insideAngular),\n switchMap(() => concat(this.getToken, tokenChange$))\n );\n\n\n this.messages = messaging.pipe(\n subscribeOn(schedulers.outsideAngular),\n observeOn(schedulers.insideAngular),\n switchMap(messaging => new Observable<firebase.messaging.MessagePayload>(emitter =>\n messaging.onMessage(emitter)\n )),\n );\n\n this.requestToken = messaging.pipe(\n subscribeOn(schedulers.outsideAngular),\n observeOn(schedulers.insideAngular),\n switchMap(() => this.requestPermission),\n catchError(() => of(null)),\n mergeMap(() => this.tokenChanges)\n );\n\n this.deleteToken = () => messaging.pipe(\n subscribeOn(schedulers.outsideAngular),\n observeOn(schedulers.insideAngular),\n switchMap(messaging => messaging.deleteToken()),\n defaultIfEmpty(false)\n );\n\n return ɵlazySDKProxy(this, messaging, zone);\n }\n\n}\n\nɵapplyMixins(AngularFireMessaging, [proxyPolyfillCompat]);\n","import { NgModule } from '@angular/core';\nimport { VERSION } from '@angular/fire';\nimport firebase from 'firebase/compat/app';\nimport { AngularFireMessaging } from './messaging';\n\n@NgModule({\n providers: [ AngularFireMessaging ]\n})\nexport class AngularFireMessagingModule {\n constructor() {\n firebase.registerVersion('angularfire', VERSION.full, 'fcm-compat');\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["ɵfirebaseAppFactory","ɵcacheInstance","ɵlazySDKProxy","ɵapplyMixins"],"mappings":";;;;;;;;;;AAAA;AACA;AACO,MAAM,mBAAmB,GAAG;AACjC,IAAA,WAAW,EAAE,IAAI;AACjB,IAAA,QAAQ,EAAE,IAAI;AACd,IAAA,SAAS,EAAE,IAAI;AACf,IAAA,mBAAmB,EAAE,IAAI;CAC1B;;MCIY,SAAS,GAAG,IAAI,cAAc,CAAS,kCAAkC,EAAE;MAC3E,cAAc,GAAG,IAAI,cAAc,CAAqC,qDAAqD,EAAE;MAS/H,oBAAoB,CAAA;AAEf,IAAA,iBAAiB,CAAqC;AACtD,IAAA,QAAQ,CAA4B;AACpC,IAAA,YAAY,CAA4B;AACxC,IAAA,QAAQ,CAAgD;AACxD,IAAA,YAAY,CAA4B;AACxC,IAAA,WAAW,CAAyC;IAEpE,WAC4B,CAAA,OAAwB,EACX,IAA+B;;AAEjD,IAAA,UAAkB,EACvC,IAAY,EACZ,UAAkC,EACH,QAAqB,EAChB,cAAmB,EAAA;QAEvD,MAAM,aAAa,GAA8C,cAAc,CAAC;AAEhF,QAAA,MAAM,SAAS,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC,IAAI,CAClC,WAAW,CAAC,UAAU,CAAC,cAAc,CAAC,EACtC,SAAS,CAAC,UAAU,CAAC,aAAa,CAAC,EACnC,SAAS,CAAC,WAAW,CAAC,EACtB,SAAS,CAAC,SAAS,IAAI,SAAS,GAAG,OAAO,2BAA2B,CAAC,GAAG,K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Ac,CAAA;;AAsFtCC,YAAY,CAAC,oBAAoB,EAAE,CAAC,mBAAmB,CAAC,CAAC;;MCpH5C,0BAA0B,CAAA;AACrC,IAAA,WAAA,GAAA;QACE,QAAQ,CAAC,eAAe,CAAC,aAAa,EAAE,OAAO,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;KACrE;uGAHU,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;wGAA1B,0BAA0B,EAAA,CAAA,CAAA;wGAA1B,0BAA0B,EAAA,SAAA,EAF1B,CAAE,oBAAoB,CAAE,EAAA,CAAA,CAAA;;2FAExB,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAHtC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,SAAS,EAAE,CAAE,oBAAoB,CAAE;AACpC,iBAAA,CAAA;;;ACPD;;AAEG;;;;"}
@@ -1,171 +1,165 @@
1
- // base.mjs
2
- var proxyPolyfillCompat = {
3
- app: null,
4
- trace: null,
5
- instrumentationEnabled: null,
6
- dataCollectionEnabled: null
7
- };
1
+ import { isPlatformBrowser } from '@angular/common';
2
+ import * as i0 from '@angular/core';
3
+ import { InjectionToken, PLATFORM_ID, Injectable, Optional, Inject, NgModule } from '@angular/core';
4
+ import * as i1 from '@angular/fire/compat';
5
+ import { ɵcacheInstance as _cacheInstance, ɵlazySDKProxy as _lazySDKProxy, ɵapplyMixins as _applyMixins } from '@angular/fire/compat';
6
+ import { of, EMPTY, Observable } from 'rxjs';
7
+ import { switchMap, map, shareReplay, tap, first } from 'rxjs/operators';
8
+ import { VERSION } from '@angular/fire';
9
+ import firebase from 'firebase/compat/app';
8
10
 
9
- // performance.mjs
10
- import { isPlatformBrowser } from "@angular/common";
11
- import { Inject, Injectable, InjectionToken, NgZone, Optional, PLATFORM_ID } from "@angular/core";
12
- import { ɵapplyMixins, ɵcacheInstance, ɵlazySDKProxy } from "@angular/fire/compat";
13
- import { FirebaseApp } from "@angular/fire/compat";
14
- import { EMPTY, Observable, of } from "rxjs";
15
- import { map, shareReplay, switchMap, tap } from "rxjs/operators";
16
- import * as i0 from "@angular/core";
17
- import * as i1 from "@angular/fire/compat";
18
- var INSTRUMENTATION_ENABLED = new InjectionToken("angularfire2.performance.instrumentationEnabled");
19
- var DATA_COLLECTION_ENABLED = new InjectionToken("angularfire2.performance.dataCollectionEnabled");
20
- var AngularFirePerformance = class _AngularFirePerformance {
21
- zone;
22
- performance;
23
- constructor(app, instrumentationEnabled, dataCollectionEnabled, zone, platformId) {
24
- this.zone = zone;
25
- this.performance = of(void 0).pipe(switchMap(() => isPlatformBrowser(platformId) ? zone.runOutsideAngular(() => import("firebase/compat/performance")) : EMPTY), map(() => ɵcacheInstance(`performance`, "AngularFirePerformance", app.name, () => {
26
- const performance = zone.runOutsideAngular(() => app.performance());
27
- if (instrumentationEnabled === false) {
28
- performance.instrumentationEnabled = false;
29
- }
30
- if (dataCollectionEnabled === false) {
31
- performance.dataCollectionEnabled = false;
32
- }
33
- return performance;
34
- }, [instrumentationEnabled, dataCollectionEnabled])), shareReplay({ bufferSize: 1, refCount: false }));
35
- return ɵlazySDKProxy(this, this.performance, zone);
36
- }
37
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-rc.3", ngImport: i0, type: _AngularFirePerformance, deps: [{ token: i1.FirebaseApp }, { token: INSTRUMENTATION_ENABLED, optional: true }, { token: DATA_COLLECTION_ENABLED, optional: true }, { token: i0.NgZone }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable });
38
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-rc.3", ngImport: i0, type: _AngularFirePerformance, providedIn: "any" });
11
+ // DO NOT MODIFY, this file is autogenerated by tools/build.ts
12
+ // Export a null object with the same keys as firebase/compat/performance, so Proxy can work with proxy-polyfill in Internet Explorer
13
+ const proxyPolyfillCompat = {
14
+ app: null,
15
+ trace: null,
16
+ instrumentationEnabled: null,
17
+ dataCollectionEnabled: null,
39
18
  };
40
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-rc.3", ngImport: i0, type: AngularFirePerformance, decorators: [{
41
- type: Injectable,
42
- args: [{
43
- providedIn: "any"
44
- }]
45
- }], ctorParameters: () => [{ type: i1.FirebaseApp }, { type: void 0, decorators: [{
46
- type: Optional
47
- }, {
48
- type: Inject,
49
- args: [INSTRUMENTATION_ENABLED]
50
- }] }, { type: void 0, decorators: [{
51
- type: Optional
52
- }, {
53
- type: Inject,
54
- args: [DATA_COLLECTION_ENABLED]
55
- }] }, { type: i0.NgZone }, { type: Object, decorators: [{
56
- type: Inject,
57
- args: [PLATFORM_ID]
58
- }] }] });
59
- var trace$ = (traceId) => {
60
- if (typeof window !== "undefined" && window.performance?.mark) {
61
- const entries = window.performance.getEntriesByName(traceId, "measure") || [];
62
- const startMarkName = `_${traceId}Start[${entries.length}]`;
63
- const endMarkName = `_${traceId}End[${entries.length}]`;
64
- return new Observable((emitter) => {
65
- window.performance.mark(startMarkName);
66
- emitter.next();
67
- return {
68
- unsubscribe: () => {
69
- window.performance.mark(endMarkName);
70
- window.performance.measure(traceId, startMarkName, endMarkName);
71
- }
72
- };
73
- });
74
- } else {
75
- return EMPTY;
76
- }
19
+
20
+ const INSTRUMENTATION_ENABLED = new InjectionToken('angularfire2.performance.instrumentationEnabled');
21
+ const DATA_COLLECTION_ENABLED = new InjectionToken('angularfire2.performance.dataCollectionEnabled');
22
+ class AngularFirePerformance {
23
+ zone;
24
+ performance;
25
+ constructor(app, instrumentationEnabled, dataCollectionEnabled, zone,
26
+ // eslint-disable-next-line @typescript-eslint/ban-types
27
+ platformId) {
28
+ this.zone = zone;
29
+ this.performance = of(undefined).pipe(switchMap(() => isPlatformBrowser(platformId) ? zone.runOutsideAngular(() => import('firebase/compat/performance')) : EMPTY), map(() => _cacheInstance(`performance`, 'AngularFirePerformance', app.name, () => {
30
+ const performance = zone.runOutsideAngular(() => app.performance());
31
+ if (instrumentationEnabled === false) {
32
+ performance.instrumentationEnabled = false;
33
+ }
34
+ if (dataCollectionEnabled === false) {
35
+ performance.dataCollectionEnabled = false;
36
+ }
37
+ return performance;
38
+ }, [instrumentationEnabled, dataCollectionEnabled])), shareReplay({ bufferSize: 1, refCount: false }));
39
+ return _lazySDKProxy(this, this.performance, zone);
40
+ }
41
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: AngularFirePerformance, deps: [{ token: i1.FirebaseApp }, { token: INSTRUMENTATION_ENABLED, optional: true }, { token: DATA_COLLECTION_ENABLED, optional: true }, { token: i0.NgZone }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable });
42
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: AngularFirePerformance, providedIn: 'any' });
43
+ }
44
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: AngularFirePerformance, decorators: [{
45
+ type: Injectable,
46
+ args: [{
47
+ providedIn: 'any'
48
+ }]
49
+ }], ctorParameters: () => [{ type: i1.FirebaseApp }, { type: undefined, decorators: [{
50
+ type: Optional
51
+ }, {
52
+ type: Inject,
53
+ args: [INSTRUMENTATION_ENABLED]
54
+ }] }, { type: undefined, decorators: [{
55
+ type: Optional
56
+ }, {
57
+ type: Inject,
58
+ args: [DATA_COLLECTION_ENABLED]
59
+ }] }, { type: i0.NgZone }, { type: Object, decorators: [{
60
+ type: Inject,
61
+ args: [PLATFORM_ID]
62
+ }] }] });
63
+ const trace$ = (traceId) => {
64
+ // eslint-disable-next-line @typescript-eslint/prefer-optional-chain
65
+ if (typeof window !== 'undefined' && window.performance?.mark) {
66
+ const entries = window.performance.getEntriesByName(traceId, 'measure') || [];
67
+ const startMarkName = `_${traceId}Start[${entries.length}]`;
68
+ const endMarkName = `_${traceId}End[${entries.length}]`;
69
+ return new Observable(emitter => {
70
+ window.performance.mark(startMarkName);
71
+ emitter.next();
72
+ return {
73
+ unsubscribe: () => {
74
+ window.performance.mark(endMarkName);
75
+ window.performance.measure(traceId, startMarkName, endMarkName);
76
+ }
77
+ };
78
+ });
79
+ }
80
+ else {
81
+ return EMPTY;
82
+ }
77
83
  };
78
- var traceUntil = (name, test, options) => (source$) => new Observable((subscriber) => {
79
- const traceSubscription = trace$(name).subscribe();
80
- return source$.pipe(tap((a) => test(a) && traceSubscription.unsubscribe(), () => void 0, () => options && options.orComplete && traceSubscription.unsubscribe())).subscribe(subscriber);
84
+ const traceUntil = (name, test, options) => (source$) => new Observable(subscriber => {
85
+ const traceSubscription = trace$(name).subscribe();
86
+ return source$.pipe(tap(a => test(a) && traceSubscription.unsubscribe(), () => undefined, () => options && options.orComplete && traceSubscription.unsubscribe())).subscribe(subscriber);
81
87
  });
82
- var traceWhile = (name, test, options) => (source$) => new Observable((subscriber) => {
83
- let traceSubscription;
84
- return source$.pipe(tap((a) => {
85
- if (test(a)) {
86
- traceSubscription = traceSubscription || trace$(name).subscribe();
87
- } else {
88
- if (traceSubscription) {
89
- traceSubscription.unsubscribe();
90
- }
91
- traceSubscription = void 0;
92
- }
93
- }, () => void 0, () => options && options.orComplete && traceSubscription && traceSubscription.unsubscribe())).subscribe(subscriber);
88
+ const traceWhile = (name, test, options) => (source$) => new Observable(subscriber => {
89
+ let traceSubscription;
90
+ return source$.pipe(tap(a => {
91
+ if (test(a)) {
92
+ traceSubscription = traceSubscription || trace$(name).subscribe();
93
+ }
94
+ else {
95
+ if (traceSubscription) {
96
+ traceSubscription.unsubscribe();
97
+ }
98
+ traceSubscription = undefined;
99
+ }
100
+ }, () => undefined, () => options && options.orComplete && traceSubscription && traceSubscription.unsubscribe())).subscribe(subscriber);
94
101
  });
95
- var traceUntilComplete = (name) => (source$) => new Observable((subscriber) => {
96
- const traceSubscription = trace$(name).subscribe();
97
- return source$.pipe(tap(() => void 0, () => void 0, () => traceSubscription.unsubscribe())).subscribe(subscriber);
102
+ const traceUntilComplete = (name) => (source$) => new Observable(subscriber => {
103
+ const traceSubscription = trace$(name).subscribe();
104
+ return source$.pipe(tap(() => undefined, () => undefined, () => traceSubscription.unsubscribe())).subscribe(subscriber);
98
105
  });
99
- var traceUntilFirst = (name) => (source$) => new Observable((subscriber) => {
100
- const traceSubscription = trace$(name).subscribe();
101
- return source$.pipe(tap(() => traceSubscription.unsubscribe(), () => void 0, () => void 0)).subscribe(subscriber);
106
+ const traceUntilFirst = (name) => (source$) => new Observable(subscriber => {
107
+ const traceSubscription = trace$(name).subscribe();
108
+ return source$.pipe(tap(() => traceSubscription.unsubscribe(), () => undefined, () => undefined)).subscribe(subscriber);
102
109
  });
103
- var trace = (name) => (source$) => new Observable((subscriber) => {
104
- const traceSubscription = trace$(name).subscribe();
105
- return source$.pipe(tap(() => traceSubscription.unsubscribe(), () => void 0, () => traceSubscription.unsubscribe())).subscribe(subscriber);
110
+ const trace = (name) => (source$) => new Observable(subscriber => {
111
+ const traceSubscription = trace$(name).subscribe();
112
+ return source$.pipe(tap(() => traceSubscription.unsubscribe(), () => undefined, () => traceSubscription.unsubscribe())).subscribe(subscriber);
106
113
  });
107
- ɵapplyMixins(AngularFirePerformance, [proxyPolyfillCompat]);
114
+ _applyMixins(AngularFirePerformance, [proxyPolyfillCompat]);
108
115
 
109
- // performance.service.mjs
110
- import { ApplicationRef, Injectable as Injectable2 } from "@angular/core";
111
- import { first, tap as tap2 } from "rxjs/operators";
112
- import * as i02 from "@angular/core";
113
- var IS_STABLE_START_MARK = "Zone";
114
- var IS_STABLE_END_MARK = "_isStableEnd";
115
- var PerformanceMonitoringService = class _PerformanceMonitoringService {
116
- disposable;
117
- constructor(appRef) {
118
- if (typeof window !== "undefined" && window.performance?.mark) {
119
- this.disposable = appRef.isStable.pipe(first((it) => it), tap2(() => {
120
- window.performance.mark(IS_STABLE_END_MARK);
121
- window.performance.measure("isStable", IS_STABLE_START_MARK, IS_STABLE_END_MARK);
122
- })).subscribe();
116
+ const IS_STABLE_START_MARK = 'Zone';
117
+ const IS_STABLE_END_MARK = '_isStableEnd';
118
+ class PerformanceMonitoringService {
119
+ disposable;
120
+ constructor(appRef) {
121
+ // eslint-disable-next-line @typescript-eslint/prefer-optional-chain
122
+ if (typeof window !== 'undefined' && window.performance?.mark) {
123
+ this.disposable = appRef.isStable.pipe(first(it => it), tap(() => {
124
+ window.performance.mark(IS_STABLE_END_MARK);
125
+ window.performance.measure('isStable', IS_STABLE_START_MARK, IS_STABLE_END_MARK);
126
+ })).subscribe();
127
+ }
123
128
  }
124
- }
125
- ngOnDestroy() {
126
- if (this.disposable) {
127
- this.disposable.unsubscribe();
129
+ ngOnDestroy() {
130
+ if (this.disposable) {
131
+ this.disposable.unsubscribe();
132
+ }
128
133
  }
129
- }
130
- static ɵfac = i02.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-rc.3", ngImport: i02, type: _PerformanceMonitoringService, deps: [{ token: i02.ApplicationRef }], target: i02.ɵɵFactoryTarget.Injectable });
131
- static ɵprov = i02.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-rc.3", ngImport: i02, type: _PerformanceMonitoringService });
132
- };
133
- i02.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-rc.3", ngImport: i02, type: PerformanceMonitoringService, decorators: [{
134
- type: Injectable2
135
- }], ctorParameters: () => [{ type: i02.ApplicationRef }] });
134
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: PerformanceMonitoringService, deps: [{ token: i0.ApplicationRef }], target: i0.ɵɵFactoryTarget.Injectable });
135
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: PerformanceMonitoringService });
136
+ }
137
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: PerformanceMonitoringService, decorators: [{
138
+ type: Injectable
139
+ }], ctorParameters: () => [{ type: i0.ApplicationRef }] });
136
140
 
137
- // performance.module.mjs
138
- import { NgModule, Optional as Optional2 } from "@angular/core";
139
- import { VERSION } from "@angular/fire";
140
- import firebase from "firebase/compat/app";
141
- import * as i03 from "@angular/core";
142
- var AngularFirePerformanceModule = class _AngularFirePerformanceModule {
143
- constructor(perf, _) {
144
- firebase.registerVersion("angularfire", VERSION.full, "perf-compat");
145
- perf.dataCollectionEnabled.then(() => void 0);
146
- }
147
- static ɵfac = i03.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-rc.3", ngImport: i03, type: _AngularFirePerformanceModule, deps: [{ token: AngularFirePerformance }, { token: PerformanceMonitoringService, optional: true }], target: i03.ɵɵFactoryTarget.NgModule });
148
- static ɵmod = i03.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.0-rc.3", ngImport: i03, type: _AngularFirePerformanceModule });
149
- static ɵinj = i03.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.0-rc.3", ngImport: i03, type: _AngularFirePerformanceModule, providers: [AngularFirePerformance] });
150
- };
151
- i03.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-rc.3", ngImport: i03, type: AngularFirePerformanceModule, decorators: [{
152
- type: NgModule,
153
- args: [{
154
- providers: [AngularFirePerformance]
155
- }]
156
- }], ctorParameters: () => [{ type: AngularFirePerformance }, { type: PerformanceMonitoringService, decorators: [{
157
- type: Optional2
158
- }] }] });
159
- export {
160
- AngularFirePerformance,
161
- AngularFirePerformanceModule,
162
- DATA_COLLECTION_ENABLED,
163
- INSTRUMENTATION_ENABLED,
164
- PerformanceMonitoringService,
165
- trace,
166
- traceUntil,
167
- traceUntilComplete,
168
- traceUntilFirst,
169
- traceWhile
170
- };
141
+ class AngularFirePerformanceModule {
142
+ constructor(perf, _) {
143
+ firebase.registerVersion('angularfire', VERSION.full, 'perf-compat');
144
+ // call anything here to get perf loading
145
+ perf.dataCollectionEnabled.then(() => undefined);
146
+ }
147
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: AngularFirePerformanceModule, deps: [{ token: AngularFirePerformance }, { token: PerformanceMonitoringService, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });
148
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.0", ngImport: i0, type: AngularFirePerformanceModule });
149
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: AngularFirePerformanceModule, providers: [AngularFirePerformance] });
150
+ }
151
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: AngularFirePerformanceModule, decorators: [{
152
+ type: NgModule,
153
+ args: [{
154
+ providers: [AngularFirePerformance]
155
+ }]
156
+ }], ctorParameters: () => [{ type: AngularFirePerformance }, { type: PerformanceMonitoringService, decorators: [{
157
+ type: Optional
158
+ }] }] });
159
+
160
+ /**
161
+ * Generated bundle index. Do not edit.
162
+ */
163
+
164
+ export { AngularFirePerformance, AngularFirePerformanceModule, DATA_COLLECTION_ENABLED, INSTRUMENTATION_ENABLED, PerformanceMonitoringService, trace, traceUntil, traceUntilComplete, traceUntilFirst, traceWhile };
171
165
  //# sourceMappingURL=angular-fire-compat-performance.mjs.map