@angular/fire 20.1.0 → 21.0.0-canary.a2662fe

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 (146) hide show
  1. package/README.md +41 -32
  2. package/ai/package.json +2 -1
  3. package/analytics/package.json +2 -1
  4. package/app/package.json +2 -1
  5. package/app-check/package.json +2 -1
  6. package/auth/package.json +2 -1
  7. package/auth-guard/package.json +2 -1
  8. package/compat/analytics/package.json +2 -1
  9. package/compat/auth/package.json +2 -1
  10. package/compat/auth-guard/package.json +2 -1
  11. package/compat/database/package.json +2 -1
  12. package/compat/firestore/package.json +2 -1
  13. package/compat/functions/package.json +2 -1
  14. package/compat/messaging/package.json +2 -1
  15. package/compat/package.json +2 -1
  16. package/compat/performance/package.json +2 -1
  17. package/compat/remote-config/package.json +2 -1
  18. package/compat/storage/package.json +2 -1
  19. package/data-connect/package.json +2 -1
  20. package/database/package.json +2 -1
  21. package/docs/ai.md +52 -0
  22. package/docs/analytics.md +2 -5
  23. package/docs/app-check.md +6 -8
  24. package/docs/app-hosting.md +95 -0
  25. package/docs/auth.md +214 -29
  26. package/docs/compat/auth/router-guards.md +1 -1
  27. package/docs/compat.md +1 -1
  28. package/docs/data-connect.md +56 -0
  29. package/docs/database.md +14 -12
  30. package/docs/deploy/getting-started.md +2 -0
  31. package/docs/firestore.md +7 -7
  32. package/docs/functions.md +3 -5
  33. package/docs/install-and-setup.md +43 -24
  34. package/docs/install-firebase-tools.md +2 -0
  35. package/docs/messaging.md +83 -52
  36. package/docs/performance.md +3 -5
  37. package/docs/remote-config.md +3 -5
  38. package/docs/storage.md +3 -5
  39. package/docs/version-21-upgrade.md +90 -0
  40. package/docs/zones.md +45 -1
  41. package/fesm2022/angular-fire-ai.mjs +8 -8
  42. package/fesm2022/angular-fire-ai.mjs.map +1 -1
  43. package/fesm2022/angular-fire-analytics.mjs +10 -10
  44. package/fesm2022/angular-fire-analytics.mjs.map +1 -1
  45. package/fesm2022/angular-fire-app-check.mjs +4 -4
  46. package/fesm2022/angular-fire-app-check.mjs.map +1 -1
  47. package/fesm2022/angular-fire-app.mjs +5 -6
  48. package/fesm2022/angular-fire-app.mjs.map +1 -1
  49. package/fesm2022/angular-fire-auth-guard.mjs +7 -7
  50. package/fesm2022/angular-fire-auth-guard.mjs.map +1 -1
  51. package/fesm2022/angular-fire-auth.mjs +4 -4
  52. package/fesm2022/angular-fire-auth.mjs.map +1 -1
  53. package/fesm2022/angular-fire-compat-analytics.mjs +17 -21
  54. package/fesm2022/angular-fire-compat-analytics.mjs.map +1 -1
  55. package/fesm2022/angular-fire-compat-auth-guard.mjs +7 -7
  56. package/fesm2022/angular-fire-compat-auth-guard.mjs.map +1 -1
  57. package/fesm2022/angular-fire-compat-auth.mjs +9 -11
  58. package/fesm2022/angular-fire-compat-auth.mjs.map +1 -1
  59. package/fesm2022/angular-fire-compat-database.mjs +11 -13
  60. package/fesm2022/angular-fire-compat-database.mjs.map +1 -1
  61. package/fesm2022/angular-fire-compat-firestore.mjs +12 -14
  62. package/fesm2022/angular-fire-compat-firestore.mjs.map +1 -1
  63. package/fesm2022/angular-fire-compat-functions.mjs +7 -7
  64. package/fesm2022/angular-fire-compat-functions.mjs.map +1 -1
  65. package/fesm2022/angular-fire-compat-messaging.mjs +9 -11
  66. package/fesm2022/angular-fire-compat-messaging.mjs.map +1 -1
  67. package/fesm2022/angular-fire-compat-performance.mjs +13 -17
  68. package/fesm2022/angular-fire-compat-performance.mjs.map +1 -1
  69. package/fesm2022/angular-fire-compat-remote-config.mjs +11 -16
  70. package/fesm2022/angular-fire-compat-remote-config.mjs.map +1 -1
  71. package/fesm2022/angular-fire-compat-storage.mjs +16 -18
  72. package/fesm2022/angular-fire-compat-storage.mjs.map +1 -1
  73. package/fesm2022/angular-fire-compat.mjs +8 -9
  74. package/fesm2022/angular-fire-compat.mjs.map +1 -1
  75. package/fesm2022/angular-fire-data-connect.mjs +4 -4
  76. package/fesm2022/angular-fire-data-connect.mjs.map +1 -1
  77. package/fesm2022/angular-fire-database.mjs +4 -4
  78. package/fesm2022/angular-fire-database.mjs.map +1 -1
  79. package/fesm2022/angular-fire-firestore-lite.mjs +4 -4
  80. package/fesm2022/angular-fire-firestore-lite.mjs.map +1 -1
  81. package/fesm2022/angular-fire-firestore.mjs +9 -6
  82. package/fesm2022/angular-fire-firestore.mjs.map +1 -1
  83. package/fesm2022/angular-fire-functions.mjs +4 -4
  84. package/fesm2022/angular-fire-functions.mjs.map +1 -1
  85. package/fesm2022/angular-fire-messaging.mjs +10 -6
  86. package/fesm2022/angular-fire-messaging.mjs.map +1 -1
  87. package/fesm2022/angular-fire-performance.mjs +5 -8
  88. package/fesm2022/angular-fire-performance.mjs.map +1 -1
  89. package/fesm2022/angular-fire-remote-config.mjs +7 -6
  90. package/fesm2022/angular-fire-remote-config.mjs.map +1 -1
  91. package/fesm2022/angular-fire-storage.mjs +4 -4
  92. package/fesm2022/angular-fire-storage.mjs.map +1 -1
  93. package/fesm2022/angular-fire.mjs +4 -6
  94. package/fesm2022/angular-fire.mjs.map +1 -1
  95. package/firestore/lite/package.json +2 -1
  96. package/firestore/package.json +2 -1
  97. package/functions/package.json +2 -1
  98. package/messaging/package.json +2 -1
  99. package/package.json +73 -69
  100. package/performance/package.json +2 -1
  101. package/publish.sh +1 -1
  102. package/remote-config/package.json +2 -1
  103. package/schematics/add/index.js +1 -1
  104. package/schematics/deploy/actions.js +76 -85
  105. package/schematics/deploy/builder.js +161 -170
  106. package/schematics/deploy/schema.json +6 -3
  107. package/schematics/migration.json +4 -4
  108. package/schematics/setup/index.js +170 -168
  109. package/schematics/update/v21/index.js +1 -0
  110. package/schematics/update/v7/index.js +1 -1
  111. package/storage/package.json +2 -1
  112. package/{ai/index.d.ts → types/angular-fire-ai.d.ts} +4 -4
  113. package/{app/index.d.ts → types/angular-fire-app.d.ts} +1 -1
  114. package/{auth-guard/index.d.ts → types/angular-fire-auth-guard.d.ts} +2 -2
  115. package/{compat/analytics/index.d.ts → types/angular-fire-compat-analytics.d.ts} +2 -2
  116. package/{compat/auth-guard/index.d.ts → types/angular-fire-compat-auth-guard.d.ts} +2 -2
  117. package/{compat/auth/index.d.ts → types/angular-fire-compat-auth.d.ts} +1 -1
  118. package/{compat/database/index.d.ts → types/angular-fire-compat-database.d.ts} +5 -6
  119. package/{compat/firestore/index.d.ts → types/angular-fire-compat-firestore.d.ts} +5 -11
  120. package/{compat/functions/index.d.ts → types/angular-fire-compat-functions.d.ts} +1 -1
  121. package/{compat/messaging/index.d.ts → types/angular-fire-compat-messaging.d.ts} +2 -2
  122. package/{compat/performance/index.d.ts → types/angular-fire-compat-performance.d.ts} +2 -2
  123. package/{compat/remote-config/index.d.ts → types/angular-fire-compat-remote-config.d.ts} +3 -3
  124. package/{compat/storage/index.d.ts → types/angular-fire-compat-storage.d.ts} +18 -18
  125. package/{compat/index.d.ts → types/angular-fire-compat.d.ts} +2 -2
  126. package/{firestore/lite/index.d.ts → types/angular-fire-firestore-lite.d.ts} +1 -1
  127. package/{firestore/index.d.ts → types/angular-fire-firestore.d.ts} +6 -3
  128. package/{messaging/index.d.ts → types/angular-fire-messaging.d.ts} +6 -2
  129. package/{remote-config/index.d.ts → types/angular-fire-remote-config.d.ts} +3 -2
  130. package/docs/firebase.json +0 -16
  131. package/docs/install-angular-cli-windows10.md +0 -82
  132. package/docs/vertexai.md +0 -53
  133. package/fesm2022/angular-fire-vertexai.mjs +0 -102
  134. package/fesm2022/angular-fire-vertexai.mjs.map +0 -1
  135. package/schematics/update/index.js +0 -1
  136. package/vertexai/index.d.ts +0 -33
  137. package/vertexai/package.json +0 -3
  138. /package/{analytics/index.d.ts → types/angular-fire-analytics.d.ts} +0 -0
  139. /package/{app-check/index.d.ts → types/angular-fire-app-check.d.ts} +0 -0
  140. /package/{auth/index.d.ts → types/angular-fire-auth.d.ts} +0 -0
  141. /package/{data-connect/index.d.ts → types/angular-fire-data-connect.d.ts} +0 -0
  142. /package/{database/index.d.ts → types/angular-fire-database.d.ts} +0 -0
  143. /package/{functions/index.d.ts → types/angular-fire-functions.d.ts} +0 -0
  144. /package/{performance/index.d.ts → types/angular-fire-performance.d.ts} +0 -0
  145. /package/{storage/index.d.ts → types/angular-fire-storage.d.ts} +0 -0
  146. /package/{index.d.ts → types/angular-fire.d.ts} +0 -0
@@ -26,9 +26,7 @@ class AngularFireMessaging {
26
26
  messages;
27
27
  requestToken;
28
28
  deleteToken;
29
- constructor(options, name,
30
- // eslint-disable-next-line @typescript-eslint/ban-types
31
- platformId, zone, schedulers, vapidKey, _serviceWorker) {
29
+ constructor(options, name, platformId, zone, schedulers, vapidKey, _serviceWorker) {
32
30
  const serviceWorker = _serviceWorker;
33
31
  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
32
  return of(app.messaging());
@@ -56,10 +54,10 @@ class AngularFireMessaging {
56
54
  this.deleteToken = () => messaging.pipe(subscribeOn(schedulers.outsideAngular), observeOn(schedulers.insideAngular), switchMap(messaging => messaging.deleteToken()), defaultIfEmpty(false));
57
55
  return _lazySDKProxy(this, messaging, zone);
58
56
  }
59
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.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: "20.0.0", ngImport: i0, type: AngularFireMessaging, providedIn: 'any' });
57
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", 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 });
58
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AngularFireMessaging, providedIn: 'any' });
61
59
  }
62
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: AngularFireMessaging, decorators: [{
60
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AngularFireMessaging, decorators: [{
63
61
  type: Injectable,
64
62
  args: [{
65
63
  providedIn: 'any'
@@ -72,7 +70,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImpor
72
70
  }, {
73
71
  type: Inject,
74
72
  args: [FIREBASE_APP_NAME]
75
- }] }, { type: Object, decorators: [{
73
+ }] }, { type: undefined, decorators: [{
76
74
  type: Inject,
77
75
  args: [PLATFORM_ID]
78
76
  }] }, { type: i0.NgZone }, { type: i1.ɵAngularFireSchedulers }, { type: undefined, decorators: [{
@@ -92,11 +90,11 @@ class AngularFireMessagingModule {
92
90
  constructor() {
93
91
  firebase.registerVersion('angularfire', VERSION.full, 'fcm-compat');
94
92
  }
95
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: AngularFireMessagingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
96
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.0", ngImport: i0, type: AngularFireMessagingModule });
97
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: AngularFireMessagingModule, providers: [AngularFireMessaging] });
93
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AngularFireMessagingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
94
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.22", ngImport: i0, type: AngularFireMessagingModule });
95
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AngularFireMessagingModule, providers: [AngularFireMessaging] });
98
96
  }
99
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: AngularFireMessagingModule, decorators: [{
97
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AngularFireMessagingModule, decorators: [{
100
98
  type: NgModule,
101
99
  args: [{
102
100
  providers: [AngularFireMessaging]
@@ -1 +1 @@
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<void>(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;MACzE,cAAc,GAAG,IAAI,cAAc,CAAqC,qDAAqD;MAS7H,oBAAoB,CAAA;AAEf,IAAA,iBAAiB;AACjB,IAAA,QAAQ;AACR,IAAA,YAAY;AACZ,IAAA,QAAQ;AACR,IAAA,YAAY;AACZ,IAAA,WAAW;IAE3B,WAC4B,CAAA,OAAwB,EACX,IAA+B;;AAEjD,IAAA,UAAkB,EACvC,IAAY,EACZ,UAAkC,EACH,QAAqB,EAChB,cAAmB,EAAA;QAEvD,MAAM,aAAa,GAA8C,cAAc;AAE/E,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,KAAK,CAAC,EAC/E,GAAG,CAAC,MAAMA,mBAAmB,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,EACnD,SAAS,CAAC,GAAG,IAAIC,cAAc,CAAC,CAAA,EAAG,GAAG,CAAC,IAAI,CAAY,UAAA,CAAA,EAAE,sBAAsB,EAAE,GAAG,CAAC,IAA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B,EAAA,UAAA,EAAA,CAAA;kBAHtC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,SAAS,EAAE,CAAE,oBAAoB;AAClC,iBAAA;;;ACPD;;AAEG;;;;"}
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 \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\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<void>(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;MACzE,cAAc,GAAG,IAAI,cAAc,CAAqC,qDAAqD;MAS7H,oBAAoB,CAAA;AAEf,IAAA,iBAAiB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,EAAA,IAAA,EAAA,oBAAoB,cAFnB,KAAK,EAAA,CAAA;;4FAEN,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAHhC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE;AACb,iBAAA;;0BAWI,MAAM;2BAAC,gBAAgB;;0BACvB;;0BAAY,MAAM;2BAAC,iBAAiB;;0BAEpC,MAAM;2BAAC,WAAW;;0BAGlB;;0BAAY,MAAM;2BAAC,SAAS;;0BAC5B;;0BAAY,MAAM;2BAAC,cAAc;;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;IACrE;wGAHW,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;yGAA1B,0BAA0B,EAAA,CAAA;yGAA1B,0BAA0B,EAAA,SAAA,EAF1B,CAAE,oBAAoB,CAAE,EAAA,CAAA;;4FAExB,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAHtC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,SAAS,EAAE,CAAE,oBAAoB;AAClC,iBAAA;;;ACPD;;AAEG;;"}
@@ -22,9 +22,7 @@ const DATA_COLLECTION_ENABLED = new InjectionToken('angularfire2.performance.dat
22
22
  class AngularFirePerformance {
23
23
  zone;
24
24
  performance;
25
- constructor(app, instrumentationEnabled, dataCollectionEnabled, zone,
26
- // eslint-disable-next-line @typescript-eslint/ban-types
27
- platformId) {
25
+ constructor(app, instrumentationEnabled, dataCollectionEnabled, zone, platformId) {
28
26
  this.zone = zone;
29
27
  this.performance = of(undefined).pipe(switchMap(() => isPlatformBrowser(platformId) ? zone.runOutsideAngular(() => import('firebase/compat/performance')) : EMPTY), map(() => _cacheInstance(`performance`, 'AngularFirePerformance', app.name, () => {
30
28
  const performance = zone.runOutsideAngular(() => app.performance());
@@ -38,10 +36,10 @@ class AngularFirePerformance {
38
36
  }, [instrumentationEnabled, dataCollectionEnabled])), shareReplay({ bufferSize: 1, refCount: false }));
39
37
  return _lazySDKProxy(this, this.performance, zone);
40
38
  }
41
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.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: "20.0.0", ngImport: i0, type: AngularFirePerformance, providedIn: 'any' });
39
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", 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 });
40
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AngularFirePerformance, providedIn: 'any' });
43
41
  }
44
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: AngularFirePerformance, decorators: [{
42
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AngularFirePerformance, decorators: [{
45
43
  type: Injectable,
46
44
  args: [{
47
45
  providedIn: 'any'
@@ -56,12 +54,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImpor
56
54
  }, {
57
55
  type: Inject,
58
56
  args: [DATA_COLLECTION_ENABLED]
59
- }] }, { type: i0.NgZone }, { type: Object, decorators: [{
57
+ }] }, { type: i0.NgZone }, { type: undefined, decorators: [{
60
58
  type: Inject,
61
59
  args: [PLATFORM_ID]
62
60
  }] }] });
63
61
  const trace$ = (traceId) => {
64
- // eslint-disable-next-line @typescript-eslint/prefer-optional-chain
65
62
  if (typeof window !== 'undefined' && window.performance?.mark) {
66
63
  const entries = window.performance.getEntriesByName(traceId, 'measure') || [];
67
64
  const startMarkName = `_${traceId}Start[${entries.length}]`;
@@ -97,7 +94,7 @@ const traceWhile = (name, test, options) => (source$) => new Observable(subscrib
97
94
  }
98
95
  traceSubscription = undefined;
99
96
  }
100
- }, () => undefined, () => options && options.orComplete && traceSubscription && traceSubscription.unsubscribe())).subscribe(subscriber);
97
+ }, () => undefined, () => options?.orComplete && traceSubscription?.unsubscribe())).subscribe(subscriber);
101
98
  });
102
99
  const traceUntilComplete = (name) => (source$) => new Observable(subscriber => {
103
100
  const traceSubscription = trace$(name).subscribe();
@@ -118,7 +115,6 @@ const IS_STABLE_END_MARK = '_isStableEnd';
118
115
  class PerformanceMonitoringService {
119
116
  disposable;
120
117
  constructor(appRef) {
121
- // eslint-disable-next-line @typescript-eslint/prefer-optional-chain
122
118
  if (typeof window !== 'undefined' && window.performance?.mark) {
123
119
  this.disposable = appRef.isStable.pipe(first(it => it), tap(() => {
124
120
  window.performance.mark(IS_STABLE_END_MARK);
@@ -131,10 +127,10 @@ class PerformanceMonitoringService {
131
127
  this.disposable.unsubscribe();
132
128
  }
133
129
  }
134
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: PerformanceMonitoringService, deps: [{ token: i0.ApplicationRef }], target: i0.ɵɵFactoryTarget.Injectable });
135
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: PerformanceMonitoringService });
130
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: PerformanceMonitoringService, deps: [{ token: i0.ApplicationRef }], target: i0.ɵɵFactoryTarget.Injectable });
131
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: PerformanceMonitoringService });
136
132
  }
137
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: PerformanceMonitoringService, decorators: [{
133
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: PerformanceMonitoringService, decorators: [{
138
134
  type: Injectable
139
135
  }], ctorParameters: () => [{ type: i0.ApplicationRef }] });
140
136
 
@@ -144,11 +140,11 @@ class AngularFirePerformanceModule {
144
140
  // call anything here to get perf loading
145
141
  perf.dataCollectionEnabled.then(() => undefined);
146
142
  }
147
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.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: "20.0.0", ngImport: i0, type: AngularFirePerformanceModule });
149
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: AngularFirePerformanceModule, providers: [AngularFirePerformance] });
143
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AngularFirePerformanceModule, deps: [{ token: AngularFirePerformance }, { token: PerformanceMonitoringService, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });
144
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.22", ngImport: i0, type: AngularFirePerformanceModule });
145
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AngularFirePerformanceModule, providers: [AngularFirePerformance] });
150
146
  }
151
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: AngularFirePerformanceModule, decorators: [{
147
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AngularFirePerformanceModule, decorators: [{
152
148
  type: NgModule,
153
149
  args: [{
154
150
  providers: [AngularFirePerformance]
@@ -1 +1 @@
1
- {"version":3,"file":"angular-fire-compat-performance.mjs","sources":["../../../src/compat/performance/base.ts","../../../src/compat/performance/performance.ts","../../../src/compat/performance/performance.service.ts","../../../src/compat/performance/performance.module.ts","../../../src/compat/performance/angular-fire-compat-performance.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/performance, so Proxy can work with proxy-polyfill in Internet Explorer\nexport const proxyPolyfillCompat = {\n app: null,\n trace: null,\n instrumentationEnabled: null,\n dataCollectionEnabled: null,\n};\n","import { isPlatformBrowser } from '@angular/common';\nimport { Inject, Injectable, InjectionToken, NgZone, Optional, PLATFORM_ID } from '@angular/core';\nimport { ɵPromiseProxy, ɵapplyMixins, ɵcacheInstance, ɵlazySDKProxy } from '@angular/fire/compat';\nimport { FirebaseApp } from '@angular/fire/compat';\nimport firebase from 'firebase/compat/app';\nimport { EMPTY, Observable, Subscription, of } from 'rxjs';\nimport { map, shareReplay, switchMap, tap } from 'rxjs/operators';\nimport { proxyPolyfillCompat } from './base';\n\nexport const INSTRUMENTATION_ENABLED = new InjectionToken<boolean>('angularfire2.performance.instrumentationEnabled');\nexport const DATA_COLLECTION_ENABLED = new InjectionToken<boolean>('angularfire2.performance.dataCollectionEnabled');\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface AngularFirePerformance extends ɵPromiseProxy<firebase.performance.Performance> {\n}\n\n@Injectable({\n providedIn: 'any'\n})\nexport class AngularFirePerformance {\n\n private readonly performance: Observable<firebase.performance.Performance>;\n\n constructor(\n app: FirebaseApp,\n @Optional() @Inject(INSTRUMENTATION_ENABLED) instrumentationEnabled: boolean | null,\n @Optional() @Inject(DATA_COLLECTION_ENABLED) dataCollectionEnabled: boolean | null,\n private zone: NgZone,\n // eslint-disable-next-line @typescript-eslint/ban-types\n @Inject(PLATFORM_ID) platformId: Object\n ) {\n\n this.performance = of(undefined).pipe(\n switchMap(() => isPlatformBrowser(platformId) ? zone.runOutsideAngular(() => import('firebase/compat/performance')) : EMPTY),\n map(() => ɵcacheInstance(`performance`, 'AngularFirePerformance', app.name, () => {\n const performance = zone.runOutsideAngular(() => app.performance());\n if (instrumentationEnabled === false) {\n performance.instrumentationEnabled = false;\n }\n if (dataCollectionEnabled === false) {\n performance.dataCollectionEnabled = false;\n }\n return performance;\n }, [instrumentationEnabled, dataCollectionEnabled])),\n shareReplay({ bufferSize: 1, refCount: false })\n );\n\n return ɵlazySDKProxy(this, this.performance, zone);\n\n }\n\n}\n\nconst trace$ = (traceId: string) => {\n // eslint-disable-next-line @typescript-eslint/prefer-optional-chain\n if (typeof window !== 'undefined' && window.performance?.mark) {\n const entries = window.performance.getEntriesByName(traceId, 'measure') || [];\n const startMarkName = `_${traceId}Start[${entries.length}]`;\n const endMarkName = `_${traceId}End[${entries.length}]`;\n return new Observable<void>(emitter => {\n window.performance.mark(startMarkName);\n emitter.next();\n return {\n unsubscribe: () => {\n window.performance.mark(endMarkName);\n window.performance.measure(traceId, startMarkName, endMarkName);\n }\n };\n });\n } else {\n return EMPTY;\n }\n};\n\nexport const traceUntil = <T = any>(\n name: string,\n test: (a: T) => boolean,\n options?: { orComplete?: boolean }\n) => (source$: Observable<T>) => new Observable<T>(subscriber => {\n const traceSubscription = trace$(name).subscribe();\n return source$.pipe(\n tap(\n a => test(a) && traceSubscription.unsubscribe(),\n () => undefined,\n () => options && options.orComplete && traceSubscription.unsubscribe()\n )\n ).subscribe(subscriber);\n});\n\nexport const traceWhile = <T = any>(\n name: string,\n test: (a: T) => boolean,\n options?: { orComplete?: boolean }\n) => (source$: Observable<T>) => new Observable<T>(subscriber => {\n let traceSubscription: Subscription | undefined;\n return source$.pipe(\n tap(\n a => {\n if (test(a)) {\n traceSubscription = traceSubscription || trace$(name).subscribe();\n } else {\n if (traceSubscription) {\n traceSubscription.unsubscribe();\n }\n\n traceSubscription = undefined;\n }\n },\n () => undefined,\n () => options && options.orComplete && traceSubscription && traceSubscription.unsubscribe()\n )\n ).subscribe(subscriber);\n});\n\nexport const traceUntilComplete = <T = any>(name: string) => (source$: Observable<T>) => new Observable<T>(subscriber => {\n const traceSubscription = trace$(name).subscribe();\n return source$.pipe(\n tap(\n () => undefined,\n () => undefined,\n () => traceSubscription.unsubscribe()\n )\n ).subscribe(subscriber);\n});\n\nexport const traceUntilFirst = <T = any>(name: string) => (source$: Observable<T>) => new Observable<T>(subscriber => {\n const traceSubscription = trace$(name).subscribe();\n return source$.pipe(\n tap(\n () => traceSubscription.unsubscribe(),\n () => undefined,\n () => undefined )\n ).subscribe(subscriber);\n});\n\nexport const trace = <T = any>(name: string) => (source$: Observable<T>) => new Observable<T>(subscriber => {\n const traceSubscription = trace$(name).subscribe();\n return source$.pipe(\n tap(\n () => traceSubscription.unsubscribe(),\n () => undefined,\n () => traceSubscription.unsubscribe()\n )\n ).subscribe(subscriber);\n});\n\nɵapplyMixins(AngularFirePerformance, [proxyPolyfillCompat]);\n","import { ApplicationRef, Injectable, OnDestroy } from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { first, tap } from 'rxjs/operators';\n\nconst IS_STABLE_START_MARK = 'Zone';\nconst IS_STABLE_END_MARK = '_isStableEnd';\n\n@Injectable()\nexport class PerformanceMonitoringService implements OnDestroy {\n\n private disposable: Subscription|undefined;\n\n constructor(appRef: ApplicationRef) {\n // eslint-disable-next-line @typescript-eslint/prefer-optional-chain\n if (typeof window !== 'undefined' && window.performance?.mark) {\n this.disposable = appRef.isStable.pipe(\n first(it => it),\n tap(() => {\n window.performance.mark(IS_STABLE_END_MARK);\n window.performance.measure('isStable', IS_STABLE_START_MARK, IS_STABLE_END_MARK);\n })\n ).subscribe();\n }\n }\n\n ngOnDestroy() {\n if (this.disposable) { this.disposable.unsubscribe(); }\n }\n\n}\n","import { NgModule, Optional } from '@angular/core';\nimport { VERSION } from '@angular/fire';\nimport firebase from 'firebase/compat/app';\nimport { AngularFirePerformance } from './performance';\nimport { PerformanceMonitoringService } from './performance.service';\n\n@NgModule({\n providers: [ AngularFirePerformance ]\n})\nexport class AngularFirePerformanceModule {\n constructor(\n perf: AngularFirePerformance,\n @Optional() _: PerformanceMonitoringService\n ) {\n firebase.registerVersion('angularfire', VERSION.full, 'perf-compat');\n // call anything here to get perf loading\n perf.dataCollectionEnabled.then(() => undefined);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["ɵcacheInstance","ɵlazySDKProxy","ɵapplyMixins","i1.AngularFirePerformance","i2.PerformanceMonitoringService"],"mappings":";;;;;;;;;;AAAA;AACA;AACO,MAAM,mBAAmB,GAAG;AACjC,IAAA,GAAG,EAAE,IAAI;AACT,IAAA,KAAK,EAAE,IAAI;AACX,IAAA,sBAAsB,EAAE,IAAI;AAC5B,IAAA,qBAAqB,EAAE,IAAI;CAC5B;;MCEY,uBAAuB,GAAG,IAAI,cAAc,CAAU,iDAAiD;MACvG,uBAAuB,GAAG,IAAI,cAAc,CAAU,gDAAgD;MAStG,sBAAsB,CAAA;AAQvB,IAAA,IAAA;AANO,IAAA,WAAW;AAE5B,IAAA,WAAA,CACE,GAAgB,EAC6B,sBAAsC,EACtC,qBAAqC,EAC1E,IAAY;;IAEC,UAAkB,EAAA;QAF/B,IAAI,CAAA,IAAA,GAAJ,IAAI;QAKZ,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC,IAAI,CACnC,SAAS,CAAC,MAAM,iBAAiB,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC,iBAAiB,CAAC,MAAM,OAAO,6BAA6B,CAAC,C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IrB,WAAW,GAAA;AACP,QAAA,IAAI,IAAI,CAAC,UAAU,EAAE;AAAE,YAAA,IAAI,CAAC,UAAU,CAAC,WAAW,EAAE;;;uGAlB/C,4BAA4B,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,cAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;2GAA5B,4BAA4B,EAAA,CAAA;;2FAA5B,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBADxC;;;MCEY,4BAA4B,CAAA;IACvC,WACE,CAAA,IAA4B,EAChB,CAA+B,EAAA;QAE3C,QAAQ,CAAC,eAAe,CAAC,aAAa,EAAE,OAAO,CAAC,IAAI,EAAE,aAAa,CAAC;;QAEpE,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,MAAM,SAAS,CAAC;;uGAPvC,4BAA4B,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAAC,sBAAA,EAAA,EAAA,EAAA,KAAA,EAAAC,4BAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;wGAA5B,4BAA4B,EAAA,CAAA;wGAA5B,4BAA4B,EAAA,SAAA,EAF5B,CAAE,sBAAsB,CAAE,EAAA,CAAA;;2FAE1B,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBAHxC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,SAAS,EAAE,CAAE,sBAAsB;AACpC,iBAAA;;0BAII;;;ACZL;;AAEG;;;;"}
1
+ {"version":3,"file":"angular-fire-compat-performance.mjs","sources":["../../../src/compat/performance/base.ts","../../../src/compat/performance/performance.ts","../../../src/compat/performance/performance.service.ts","../../../src/compat/performance/performance.module.ts","../../../src/compat/performance/angular-fire-compat-performance.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/performance, so Proxy can work with proxy-polyfill in Internet Explorer\nexport const proxyPolyfillCompat = {\n app: null,\n trace: null,\n instrumentationEnabled: null,\n dataCollectionEnabled: null,\n};\n","import { isPlatformBrowser } from '@angular/common';\nimport { Inject, Injectable, InjectionToken, NgZone, Optional, PLATFORM_ID } from '@angular/core';\nimport { ɵPromiseProxy, ɵapplyMixins, ɵcacheInstance, ɵlazySDKProxy } from '@angular/fire/compat';\nimport { FirebaseApp } from '@angular/fire/compat';\nimport firebase from 'firebase/compat/app';\nimport { EMPTY, Observable, Subscription, of } from 'rxjs';\nimport { map, shareReplay, switchMap, tap } from 'rxjs/operators';\nimport { proxyPolyfillCompat } from './base';\n\nexport const INSTRUMENTATION_ENABLED = new InjectionToken<boolean>('angularfire2.performance.instrumentationEnabled');\nexport const DATA_COLLECTION_ENABLED = new InjectionToken<boolean>('angularfire2.performance.dataCollectionEnabled');\n\n \nexport interface AngularFirePerformance extends ɵPromiseProxy<firebase.performance.Performance> {\n}\n\n@Injectable({\n providedIn: 'any'\n})\nexport class AngularFirePerformance {\n\n private readonly performance: Observable<firebase.performance.Performance>;\n\n constructor(\n app: FirebaseApp,\n @Optional() @Inject(INSTRUMENTATION_ENABLED) instrumentationEnabled: boolean | null,\n @Optional() @Inject(DATA_COLLECTION_ENABLED) dataCollectionEnabled: boolean | null,\n private zone: NgZone,\n\n @Inject(PLATFORM_ID) platformId: object\n ) {\n\n this.performance = of(undefined).pipe(\n switchMap(() => isPlatformBrowser(platformId) ? zone.runOutsideAngular(() => import('firebase/compat/performance')) : EMPTY),\n map(() => ɵcacheInstance(`performance`, 'AngularFirePerformance', app.name, () => {\n const performance = zone.runOutsideAngular(() => app.performance());\n if (instrumentationEnabled === false) {\n performance.instrumentationEnabled = false;\n }\n if (dataCollectionEnabled === false) {\n performance.dataCollectionEnabled = false;\n }\n return performance;\n }, [instrumentationEnabled, dataCollectionEnabled])),\n shareReplay({ bufferSize: 1, refCount: false })\n );\n\n return ɵlazySDKProxy(this, this.performance, zone);\n\n }\n\n}\n\nconst trace$ = (traceId: string) => {\n \n if (typeof window !== 'undefined' && window.performance?.mark) {\n const entries = window.performance.getEntriesByName(traceId, 'measure') || [];\n const startMarkName = `_${traceId}Start[${entries.length}]`;\n const endMarkName = `_${traceId}End[${entries.length}]`;\n return new Observable<void>(emitter => {\n window.performance.mark(startMarkName);\n emitter.next();\n return {\n unsubscribe: () => {\n window.performance.mark(endMarkName);\n window.performance.measure(traceId, startMarkName, endMarkName);\n }\n };\n });\n } else {\n return EMPTY;\n }\n};\n\nexport const traceUntil = <T = any>(\n name: string,\n test: (a: T) => boolean,\n options?: { orComplete?: boolean }\n) => (source$: Observable<T>) => new Observable<T>(subscriber => {\n const traceSubscription = trace$(name).subscribe();\n return source$.pipe(\n tap(\n a => test(a) && traceSubscription.unsubscribe(),\n () => undefined,\n () => options && options.orComplete && traceSubscription.unsubscribe()\n )\n ).subscribe(subscriber);\n});\n\nexport const traceWhile = <T = any>(\n name: string,\n test: (a: T) => boolean,\n options?: { orComplete?: boolean }\n) => (source$: Observable<T>) => new Observable<T>(subscriber => {\n let traceSubscription: Subscription | undefined;\n return source$.pipe(\n tap(\n a => {\n if (test(a)) {\n traceSubscription = traceSubscription || trace$(name).subscribe();\n } else {\n if (traceSubscription) {\n traceSubscription.unsubscribe();\n }\n\n traceSubscription = undefined;\n }\n },\n () => undefined,\n () => options?.orComplete && traceSubscription?.unsubscribe()\n )\n ).subscribe(subscriber);\n});\n\nexport const traceUntilComplete = <T = any>(name: string) => (source$: Observable<T>) => new Observable<T>(subscriber => {\n const traceSubscription = trace$(name).subscribe();\n return source$.pipe(\n tap(\n () => undefined,\n () => undefined,\n () => traceSubscription.unsubscribe()\n )\n ).subscribe(subscriber);\n});\n\nexport const traceUntilFirst = <T = any>(name: string) => (source$: Observable<T>) => new Observable<T>(subscriber => {\n const traceSubscription = trace$(name).subscribe();\n return source$.pipe(\n tap(\n () => traceSubscription.unsubscribe(),\n () => undefined,\n () => undefined )\n ).subscribe(subscriber);\n});\n\nexport const trace = <T = any>(name: string) => (source$: Observable<T>) => new Observable<T>(subscriber => {\n const traceSubscription = trace$(name).subscribe();\n return source$.pipe(\n tap(\n () => traceSubscription.unsubscribe(),\n () => undefined,\n () => traceSubscription.unsubscribe()\n )\n ).subscribe(subscriber);\n});\n\nɵapplyMixins(AngularFirePerformance, [proxyPolyfillCompat]);\n","import { ApplicationRef, Injectable, OnDestroy } from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { first, tap } from 'rxjs/operators';\n\nconst IS_STABLE_START_MARK = 'Zone';\nconst IS_STABLE_END_MARK = '_isStableEnd';\n\n@Injectable()\nexport class PerformanceMonitoringService implements OnDestroy {\n\n private disposable: Subscription|undefined;\n\n constructor(appRef: ApplicationRef) {\n \n if (typeof window !== 'undefined' && window.performance?.mark) {\n this.disposable = appRef.isStable.pipe(\n first(it => it),\n tap(() => {\n window.performance.mark(IS_STABLE_END_MARK);\n window.performance.measure('isStable', IS_STABLE_START_MARK, IS_STABLE_END_MARK);\n })\n ).subscribe();\n }\n }\n\n ngOnDestroy() {\n if (this.disposable) { this.disposable.unsubscribe(); }\n }\n\n}\n","import { NgModule, Optional } from '@angular/core';\nimport { VERSION } from '@angular/fire';\nimport firebase from 'firebase/compat/app';\nimport { AngularFirePerformance } from './performance';\nimport { PerformanceMonitoringService } from './performance.service';\n\n@NgModule({\n providers: [ AngularFirePerformance ]\n})\nexport class AngularFirePerformanceModule {\n constructor(\n perf: AngularFirePerformance,\n @Optional() _: PerformanceMonitoringService\n ) {\n firebase.registerVersion('angularfire', VERSION.full, 'perf-compat');\n // call anything here to get perf loading\n perf.dataCollectionEnabled.then(() => undefined);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["ɵcacheInstance","ɵlazySDKProxy","ɵapplyMixins","i1.AngularFirePerformance","i2.PerformanceMonitoringService"],"mappings":";;;;;;;;;;AAAA;AACA;AACO,MAAM,mBAAmB,GAAG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AA,EAAAC,sBAAA,EAAA,EAAA,EAAA,KAAA,EAAAC,4BAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;yGAA5B,4BAA4B,EAAA,CAAA;yGAA5B,4BAA4B,EAAA,SAAA,EAF5B,CAAE,sBAAsB,CAAE,EAAA,CAAA;;4FAE1B,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBAHxC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,SAAS,EAAE,CAAE,sBAAsB;AACpC,iBAAA;;0BAII;;;ACZL;;AAEG;;"}
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, inject, EnvironmentInjector, PLATFORM_ID, Inject, Optional, Injectable, NgModule } from '@angular/core';
2
+ import { InjectionToken, inject, EnvironmentInjector, Inject, Optional, Injectable, NgModule } from '@angular/core';
3
3
  import { pendingUntilEvent } from '@angular/core/rxjs-interop';
4
4
  import * as i1 from '@angular/fire';
5
5
  import { VERSION } from '@angular/fire';
@@ -42,7 +42,7 @@ class Value {
42
42
  _source;
43
43
  _value;
44
44
  asBoolean() {
45
- return ['1', 'true', 't', 'y', 'yes', 'on'].indexOf(this._value.toLowerCase()) > -1;
45
+ return ['1', 'true', 't', 'y', 'yes', 'on'].includes(this._value.toLowerCase());
46
46
  }
47
47
  asString() {
48
48
  return this._value;
@@ -99,9 +99,7 @@ class AngularFireRemoteConfig {
99
99
  booleans;
100
100
  strings;
101
101
  injector = inject(EnvironmentInjector);
102
- constructor(options, name, settings, defaultConfig, zone, schedulers,
103
- // eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-types
104
- platformId) {
102
+ constructor(options, name, settings, defaultConfig, zone, schedulers) {
105
103
  this.zone = zone;
106
104
  const remoteConfig$ = of(undefined).pipe(observeOn(schedulers.outsideAngular), switchMap(() => isSupported()), switchMap(isSupported => isSupported ? import('firebase/compat/remote-config') : EMPTY), map(() => _firebaseAppFactory(options, zone, name)), map(app => _cacheInstance(`${app.name}.remote-config`, 'AngularFireRemoteConfig', app.name, () => {
107
105
  const rc = app.remoteConfig();
@@ -133,10 +131,10 @@ class AngularFireRemoteConfig {
133
131
  this.numbers = proxyAll(this.parameters, 'numbers');
134
132
  return _lazySDKProxy(this, loadedRemoteConfig$, zone);
135
133
  }
136
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: AngularFireRemoteConfig, deps: [{ token: FIREBASE_OPTIONS }, { token: FIREBASE_APP_NAME, optional: true }, { token: SETTINGS, optional: true }, { token: DEFAULTS, optional: true }, { token: i0.NgZone }, { token: i1.ɵAngularFireSchedulers }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable });
137
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: AngularFireRemoteConfig, providedIn: 'any' });
134
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AngularFireRemoteConfig, deps: [{ token: FIREBASE_OPTIONS }, { token: FIREBASE_APP_NAME, optional: true }, { token: SETTINGS, optional: true }, { token: DEFAULTS, optional: true }, { token: i0.NgZone }, { token: i1.ɵAngularFireSchedulers }], target: i0.ɵɵFactoryTarget.Injectable });
135
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AngularFireRemoteConfig, providedIn: 'any' });
138
136
  }
139
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: AngularFireRemoteConfig, decorators: [{
137
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AngularFireRemoteConfig, decorators: [{
140
138
  type: Injectable,
141
139
  args: [{
142
140
  providedIn: 'any'
@@ -159,10 +157,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImpor
159
157
  }, {
160
158
  type: Inject,
161
159
  args: [DEFAULTS]
162
- }] }, { type: i0.NgZone }, { type: i1.ɵAngularFireSchedulers }, { type: Object, decorators: [{
163
- type: Inject,
164
- args: [PLATFORM_ID]
165
- }] }] });
160
+ }] }, { type: i0.NgZone }, { type: i1.ɵAngularFireSchedulers }] });
166
161
  const budget = (interval) => (source) => new Observable(observer => {
167
162
  let timedOut = false;
168
163
  // TODO use scheduler task rather than settimeout
@@ -230,11 +225,11 @@ class AngularFireRemoteConfigModule {
230
225
  constructor() {
231
226
  firebase.registerVersion('angularfire', VERSION.full, 'rc-compat');
232
227
  }
233
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: AngularFireRemoteConfigModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
234
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.0", ngImport: i0, type: AngularFireRemoteConfigModule });
235
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: AngularFireRemoteConfigModule, providers: [AngularFireRemoteConfig] });
228
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AngularFireRemoteConfigModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
229
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.22", ngImport: i0, type: AngularFireRemoteConfigModule });
230
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AngularFireRemoteConfigModule, providers: [AngularFireRemoteConfig] });
236
231
  }
237
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: AngularFireRemoteConfigModule, decorators: [{
232
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AngularFireRemoteConfigModule, decorators: [{
238
233
  type: NgModule,
239
234
  args: [{
240
235
  providers: [AngularFireRemoteConfig]
@@ -1 +1 @@
1
- {"version":3,"file":"angular-fire-compat-remote-config.mjs","sources":["../../../src/compat/remote-config/base.ts","../../../src/compat/remote-config/remote-config.ts","../../../src/compat/remote-config/remote-config.module.ts","../../../src/compat/remote-config/angular-fire-compat-remote-config.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/remote-config, so Proxy can work with proxy-polyfill in Internet Explorer\nexport const proxyPolyfillCompat = {\n app: null,\n settings: null,\n defaultConfig: null,\n fetchTimeMillis: null,\n lastFetchStatus: null,\n activate: null,\n ensureInitialized: null,\n fetch: null,\n fetchAndActivate: null,\n getAll: null,\n getBoolean: null,\n getNumber: null,\n getString: null,\n getValue: null,\n setLogLevel: null,\n};\n","import { EnvironmentInjector, Inject, Injectable, InjectionToken, NgZone, Optional, PLATFORM_ID, inject } from '@angular/core';\nimport { pendingUntilEvent } from '@angular/core/rxjs-interop';\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/remote-config';\nimport { EMPTY, MonoTypeOperatorFunction, Observable, OperatorFunction, concat, of, pipe } from 'rxjs';\nimport {\n debounceTime,\n distinctUntilChanged,\n filter,\n groupBy,\n map,\n mergeMap,\n observeOn,\n scan,\n shareReplay,\n startWith,\n switchMap,\n withLatestFrom\n} from 'rxjs/operators';\nimport { proxyPolyfillCompat } from './base';\nimport { Settings } from './interfaces';\n\nexport type ConfigTemplate = Record<string, string | number | boolean>;\n\nexport const SETTINGS = new InjectionToken<Settings>('angularfire2.remoteConfig.settings');\nexport const DEFAULTS = new InjectionToken<ConfigTemplate>('angularfire2.remoteConfig.defaultConfig');\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface AngularFireRemoteConfig extends ɵPromiseProxy<firebase.remoteConfig.RemoteConfig> {\n}\n\nconst AS_TO_FN = { strings: 'asString', numbers: 'asNumber', booleans: 'asBoolean' };\nconst STATIC_VALUES = { numbers: 0, booleans: false, strings: undefined };\n\n// TODO look into the types here, I don't like the anys\nconst proxyAll = (observable: Observable<Parameter[]>, as: 'numbers' | 'booleans' | 'strings') => new Proxy(\n observable.pipe(mapToObject(as as any)), {\n get: (self, name: string) => self[name] || observable.pipe(\n map(all => all.find(p => p.key === name)),\n map(param => param ? param[AS_TO_FN[as]]() : STATIC_VALUES[as]),\n distinctUntilChanged()\n )\n }\n) as any;\n\n// TODO export as implements Partial<...> so minor doesn't break us\nexport class Value implements firebase.remoteConfig.Value {\n asBoolean() {\n return ['1', 'true', 't', 'y', 'yes', 'on'].indexOf(this._value.toLowerCase()) > -1;\n }\n\n asString() {\n return this._value;\n }\n\n asNumber() {\n return Number(this._value) || 0;\n }\n\n getSource() {\n return this._source;\n }\n\n constructor(public _source: firebase.remoteConfig.ValueSource, public _value: string) {\n }\n}\n\n// SEMVER use ConstructorParameters when we can support Typescript 3.6\nexport class Parameter extends Value {\n constructor(public key: string, public fetchTimeMillis: number, source: firebase.remoteConfig.ValueSource, value: string) {\n super(source, value);\n }\n}\n\n// If it's a Parameter array, test any, else test the individual Parameter\nconst filterTest = (fn: (param: Parameter) => boolean) => filter<Parameter | Parameter[]>(it => Array.isArray(it) ? it.some(fn) : fn(it));\n\n// Allow the user to bypass the default values and wait till they get something from the server, even if it's a cached copy;\n// if used in conjuntion with first() it will only fetch RC values from the server if they aren't cached locally\nexport const filterRemote = () => filterTest(p => p.getSource() === 'remote');\n\n// filterFresh allows the developer to effectively set up a maximum cache time\nexport const filterFresh = (howRecentInMillis: number) => filterTest(p => p.fetchTimeMillis + howRecentInMillis >= new Date().getTime());\n\n\n// I ditched loading the defaults into RC and a simple map for scan since we already have our own defaults implementation.\n// The idea here being that if they have a default that never loads from the server, they will be able to tell via fetchTimeMillis\n// on the Parameter. Also if it doesn't come from the server it won't emit again in .changes, due to the distinctUntilChanged,\n// which we can simplify to === rather than deep comparison\nconst scanToParametersArray = (\n remoteConfig: Observable<firebase.remoteConfig.RemoteConfig | undefined>\n): OperatorFunction<Record<string, firebase.remoteConfig.Value>, Parameter[]> => pipe(\n withLatestFrom(remoteConfig),\n scan((existing, [all, rc]) => {\n // SEMVER use \"new Set\" to unique once we're only targeting es6\n // at the scale we expect remote config to be at, we probably won't see a performance hit from this unoptimized uniqueness\n // implementation.\n // const allKeys = [...new Set([...existing.map(p => p.key), ...Object.keys(all)])];\n const allKeys = [...existing.map(p => p.key), ...Object.keys(all)].filter((v, i, a) => a.indexOf(v) === i);\n return allKeys.map(key => {\n const updatedValue = all[key];\n return updatedValue ? new Parameter(key, rc ? rc.fetchTimeMillis : -1, updatedValue.getSource(), updatedValue.asString())\n : existing.find(p => p.key === key);\n });\n }, [] as Parameter[])\n);\n\n\n@Injectable({\n providedIn: 'any'\n})\nexport class AngularFireRemoteConfig {\n\n readonly changes: Observable<Parameter>;\n readonly parameters: Observable<Parameter[]>;\n readonly numbers: Observable<Record<string, number | undefined>> & Record<string, Observable<number>>;\n readonly booleans: Observable<Record<string, boolean | undefined>> & Record<string, Observable<boolean>>;\n readonly strings: Observable<Record<string, string | undefined>> & Record<string, Observable<string | undefined>>;\n\n private readonly injector = inject(EnvironmentInjector);\n\n constructor(\n @Inject(FIREBASE_OPTIONS) options: FirebaseOptions,\n @Optional() @Inject(FIREBASE_APP_NAME) name: string | null | undefined,\n @Optional() @Inject(SETTINGS) settings: Settings | null,\n @Optional() @Inject(DEFAULTS) defaultConfig: ConfigTemplate | null,\n private zone: NgZone,\n schedulers: ɵAngularFireSchedulers,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-types\n @Inject(PLATFORM_ID) platformId: Object\n ) {\n const remoteConfig$ = of(undefined).pipe(\n observeOn(schedulers.outsideAngular),\n switchMap(() => isSupported()),\n switchMap(isSupported => isSupported ? import('firebase/compat/remote-config') : EMPTY),\n map(() => ɵfirebaseAppFactory(options, zone, name)),\n map(app => ɵcacheInstance(`${app.name}.remote-config`, 'AngularFireRemoteConfig', app.name, () => {\n const rc = app.remoteConfig();\n if (settings) {\n rc.settings = settings;\n }\n if (defaultConfig) {\n rc.defaultConfig = defaultConfig;\n }\n return rc;\n }, [settings, defaultConfig])),\n startWith<firebase.remoteConfig.RemoteConfig, undefined>(undefined),\n shareReplay({ bufferSize: 1, refCount: false })\n ) as Observable<any>;\n\n const loadedRemoteConfig$ = remoteConfig$.pipe(\n filter<firebase.remoteConfig.RemoteConfig>(rc => !!rc)\n );\n\n const default$: Observable<Record<string, firebase.remoteConfig.Value>> = of(Object.keys(defaultConfig || {}).reduce(\n (c, k) => ({ ...c, [k]: new Value('default', defaultConfig[k].toString()) }), {}\n ));\n\n // we should filter out the defaults we provided to RC, since we have our own implementation\n // that gives us a -1 for fetchTimeMillis (so filterFresh can filter them out)\n const filterOutDefaults = map<Record<string, firebase.remoteConfig.Value>, Record<string, firebase.remoteConfig.Value>>(all =>\n Object.keys(all)\n .filter(key => all[key].getSource() !== 'default')\n .reduce((acc, key) => ({ ...acc, [key]: all[key] }), {})\n );\n\n const existing$ = loadedRemoteConfig$.pipe(\n switchMap(rc =>\n rc.activate()\n .then(() => rc.ensureInitialized())\n .then(() => rc.getAll())\n ),\n filterOutDefaults\n );\n\n const fresh$ = loadedRemoteConfig$.pipe(\n switchMap(rc => zone.runOutsideAngular(() =>\n rc.fetchAndActivate()\n .then(() => rc.ensureInitialized())\n .then(() => rc.getAll())\n )),\n filterOutDefaults\n );\n\n this.parameters = concat(default$, existing$, fresh$).pipe(\n scanToParametersArray(remoteConfig$),\n pendingUntilEvent(this.injector),\n shareReplay({ bufferSize: 1, refCount: true })\n );\n\n this.changes = this.parameters.pipe(\n switchMap(params => of(...params)),\n groupBy(param => param.key),\n mergeMap(group => group.pipe(\n distinctUntilChanged()\n ))\n );\n\n this.strings = proxyAll(this.parameters, 'strings');\n this.booleans = proxyAll(this.parameters, 'booleans');\n this.numbers = proxyAll(this.parameters, 'numbers');\n\n return ɵlazySDKProxy(this, loadedRemoteConfig$, zone);\n }\n\n}\n\n\nexport const budget = <T>(interval: number): MonoTypeOperatorFunction<T> => (source: Observable<T>) => new Observable<T>(observer => {\n let timedOut = false;\n // TODO use scheduler task rather than settimeout\n const timeout = setTimeout(() => {\n observer.complete();\n timedOut = true;\n }, interval);\n return source.subscribe({\n next(val) {\n if (!timedOut) {\n observer.next(val);\n }\n },\n error(err) {\n if (!timedOut) {\n clearTimeout(timeout);\n observer.error(err);\n }\n },\n complete() {\n if (!timedOut) {\n clearTimeout(timeout);\n observer.complete();\n }\n }\n });\n});\n\nconst typedMethod = (it: any) => {\n switch (typeof it) {\n case 'string':\n return 'asString';\n case 'boolean':\n return 'asBoolean';\n case 'number':\n return 'asNumber';\n default:\n return 'asString';\n }\n};\n\n\nexport function scanToObject(): OperatorFunction<Parameter, Record<string, string | undefined>>;\nexport function scanToObject(to: 'numbers'): OperatorFunction<Parameter, Record<string, number | undefined>>;\nexport function scanToObject(to: 'booleans'): OperatorFunction<Parameter, Record<string, boolean | undefined>>;\n// eslint-disable-next-line @typescript-eslint/unified-signatures\nexport function scanToObject(to: 'strings'): OperatorFunction<Parameter, Record<string, string | undefined>>;\nexport function scanToObject<T extends ConfigTemplate>(template: T): OperatorFunction<Parameter, T & Record<string, string | undefined>>;\nexport function scanToObject<T extends ConfigTemplate>(to: 'numbers' | 'booleans' | 'strings' | T = 'strings') {\n return pipe(\n // TODO cleanup\n scan(\n (c, p: Parameter) => ({\n ...c, [p.key]: typeof to === 'object' ?\n p[typedMethod(to[p.key])]() :\n p[AS_TO_FN[to]]()\n }),\n typeof to === 'object' ?\n to as T & Record<string, string | undefined> :\n {} as Record<string, number | boolean | string>\n ),\n debounceTime(1),\n budget(10),\n distinctUntilChanged((a, b) => JSON.stringify(a) === JSON.stringify(b))\n );\n}\n\nexport function mapToObject(): OperatorFunction<Parameter[], Record<string, string | undefined>>;\nexport function mapToObject(to: 'numbers'): OperatorFunction<Parameter[], Record<string, number | undefined>>;\nexport function mapToObject(to: 'booleans'): OperatorFunction<Parameter[], Record<string, boolean | undefined>>;\n// eslint-disable-next-line @typescript-eslint/unified-signatures\nexport function mapToObject(to: 'strings'): OperatorFunction<Parameter[], Record<string, string | undefined>>;\nexport function mapToObject<T extends ConfigTemplate>(template: T):\n OperatorFunction<Parameter[], T & Record<string, string | undefined>>;\nexport function mapToObject<T extends ConfigTemplate>(to: 'numbers' | 'booleans' | 'strings' | T = 'strings') {\n return pipe(\n // TODO this is getting a little long, cleanup\n map((params: Parameter[]) => params.reduce(\n (c, p) => ({\n ...c, [p.key]: typeof to === 'object' ?\n p[typedMethod(to[p.key])]() :\n p[AS_TO_FN[to]]()\n }),\n typeof to === 'object' ?\n to as T & Record<string, string | undefined> :\n {} as Record<string, number | boolean | string>\n )),\n distinctUntilChanged((a, b) => JSON.stringify(a) === JSON.stringify(b))\n );\n}\n\nɵapplyMixins(AngularFireRemoteConfig, [proxyPolyfillCompat]);\n","import { NgModule } from '@angular/core';\nimport { VERSION } from '@angular/fire';\nimport firebase from 'firebase/compat/app';\nimport { AngularFireRemoteConfig } from './remote-config';\n\n@NgModule({\n providers: [ AngularFireRemoteConfig ]\n})\nexport class AngularFireRemoteConfigModule {\n constructor() {\n firebase.registerVersion('angularfire', VERSION.full, 'rc-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,GAAG,E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,CAAC,mBAAmB,CAAC,CAAC;;MCvS/C,6BAA6B,CAAA;AACtC,IAAA,WAAA,GAAA;QACI,QAAQ,CAAC,eAAe,CAAC,aAAa,EAAE,OAAO,CAAC,IAAI,EAAE,WAAW,CAAC;;uGAF7D,6BAA6B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;wGAA7B,6BAA6B,EAAA,CAAA;wGAA7B,6BAA6B,EAAA,SAAA,EAF7B,CAAE,uBAAuB,CAAE,EAAA,CAAA;;2FAE3B,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBAHzC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,SAAS,EAAE,CAAE,uBAAuB;AACrC,iBAAA;;;ACPD;;AAEG;;;;"}
1
+ {"version":3,"file":"angular-fire-compat-remote-config.mjs","sources":["../../../src/compat/remote-config/base.ts","../../../src/compat/remote-config/remote-config.ts","../../../src/compat/remote-config/remote-config.module.ts","../../../src/compat/remote-config/angular-fire-compat-remote-config.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/remote-config, so Proxy can work with proxy-polyfill in Internet Explorer\nexport const proxyPolyfillCompat = {\n app: null,\n settings: null,\n defaultConfig: null,\n fetchTimeMillis: null,\n lastFetchStatus: null,\n activate: null,\n ensureInitialized: null,\n fetch: null,\n fetchAndActivate: null,\n getAll: null,\n getBoolean: null,\n getNumber: null,\n getString: null,\n getValue: null,\n setLogLevel: null,\n};\n","import { EnvironmentInjector, Inject, Injectable, InjectionToken, NgZone, Optional, inject } from '@angular/core';\nimport { pendingUntilEvent } from '@angular/core/rxjs-interop';\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/remote-config';\nimport { EMPTY, MonoTypeOperatorFunction, Observable, OperatorFunction, concat, of, pipe } from 'rxjs';\nimport {\n debounceTime,\n distinctUntilChanged,\n filter,\n groupBy,\n map,\n mergeMap,\n observeOn,\n scan,\n shareReplay,\n startWith,\n switchMap,\n withLatestFrom\n} from 'rxjs/operators';\nimport { proxyPolyfillCompat } from './base';\nimport { Settings } from './interfaces';\n\nexport type ConfigTemplate = Record<string, string | number | boolean>;\n\nexport const SETTINGS = new InjectionToken<Settings>('angularfire2.remoteConfig.settings');\nexport const DEFAULTS = new InjectionToken<ConfigTemplate>('angularfire2.remoteConfig.defaultConfig');\n\n \nexport interface AngularFireRemoteConfig extends ɵPromiseProxy<firebase.remoteConfig.RemoteConfig> {\n}\n\nconst AS_TO_FN = { strings: 'asString', numbers: 'asNumber', booleans: 'asBoolean' };\nconst STATIC_VALUES = { numbers: 0, booleans: false, strings: undefined };\n\n// TODO look into the types here, I don't like the anys\nconst proxyAll = (observable: Observable<Parameter[]>, as: 'numbers' | 'booleans' | 'strings') => new Proxy(\n observable.pipe(mapToObject(as as any)), {\n get: (self, name: string) => self[name] || observable.pipe(\n map(all => all.find(p => p.key === name)),\n map(param => param ? param[AS_TO_FN[as]]() : STATIC_VALUES[as]),\n distinctUntilChanged()\n )\n }\n) as any;\n\n// TODO export as implements Partial<...> so minor doesn't break us\nexport class Value implements firebase.remoteConfig.Value {\n asBoolean() {\n return ['1', 'true', 't', 'y', 'yes', 'on'].includes(this._value.toLowerCase());\n }\n\n asString() {\n return this._value;\n }\n\n asNumber() {\n return Number(this._value) || 0;\n }\n\n getSource() {\n return this._source;\n }\n\n constructor(public _source: firebase.remoteConfig.ValueSource, public _value: string) {\n }\n}\n\n// SEMVER use ConstructorParameters when we can support Typescript 3.6\nexport class Parameter extends Value {\n constructor(public key: string, public fetchTimeMillis: number, source: firebase.remoteConfig.ValueSource, value: string) {\n super(source, value);\n }\n}\n\n// If it's a Parameter array, test any, else test the individual Parameter\nconst filterTest = (fn: (param: Parameter) => boolean) => filter<Parameter | Parameter[]>(it => Array.isArray(it) ? it.some(fn) : fn(it));\n\n// Allow the user to bypass the default values and wait till they get something from the server, even if it's a cached copy;\n// if used in conjuntion with first() it will only fetch RC values from the server if they aren't cached locally\nexport const filterRemote = () => filterTest(p => p.getSource() === 'remote');\n\n// filterFresh allows the developer to effectively set up a maximum cache time\nexport const filterFresh = (howRecentInMillis: number) => filterTest(p => p.fetchTimeMillis + howRecentInMillis >= new Date().getTime());\n\n\n// I ditched loading the defaults into RC and a simple map for scan since we already have our own defaults implementation.\n// The idea here being that if they have a default that never loads from the server, they will be able to tell via fetchTimeMillis\n// on the Parameter. Also if it doesn't come from the server it won't emit again in .changes, due to the distinctUntilChanged,\n// which we can simplify to === rather than deep comparison\nconst scanToParametersArray = (\n remoteConfig: Observable<firebase.remoteConfig.RemoteConfig | undefined>\n): OperatorFunction<Record<string, firebase.remoteConfig.Value>, Parameter[]> => pipe(\n withLatestFrom(remoteConfig),\n scan((existing, [all, rc]) => {\n // SEMVER use \"new Set\" to unique once we're only targeting es6\n // at the scale we expect remote config to be at, we probably won't see a performance hit from this unoptimized uniqueness\n // implementation.\n // const allKeys = [...new Set([...existing.map(p => p.key), ...Object.keys(all)])];\n const allKeys = [...existing.map(p => p.key), ...Object.keys(all)].filter((v, i, a) => a.indexOf(v) === i);\n return allKeys.map(key => {\n const updatedValue = all[key];\n return updatedValue ? new Parameter(key, rc ? rc.fetchTimeMillis : -1, updatedValue.getSource(), updatedValue.asString())\n : existing.find(p => p.key === key);\n });\n }, [] as Parameter[])\n);\n\n\n@Injectable({\n providedIn: 'any'\n})\nexport class AngularFireRemoteConfig {\n\n readonly changes: Observable<Parameter>;\n readonly parameters: Observable<Parameter[]>;\n readonly numbers: Observable<Record<string, number | undefined>> & Record<string, Observable<number>>;\n readonly booleans: Observable<Record<string, boolean | undefined>> & Record<string, Observable<boolean>>;\n readonly strings: Observable<Record<string, string | undefined>> & Record<string, Observable<string | undefined>>;\n\n private readonly injector = inject(EnvironmentInjector);\n\n constructor(\n @Inject(FIREBASE_OPTIONS) options: FirebaseOptions,\n @Optional() @Inject(FIREBASE_APP_NAME) name: string | null | undefined,\n @Optional() @Inject(SETTINGS) settings: Settings | null,\n @Optional() @Inject(DEFAULTS) defaultConfig: ConfigTemplate | null,\n private zone: NgZone,\n schedulers: ɵAngularFireSchedulers,\n ) {\n const remoteConfig$ = of(undefined).pipe(\n observeOn(schedulers.outsideAngular),\n switchMap(() => isSupported()),\n switchMap(isSupported => isSupported ? import('firebase/compat/remote-config') : EMPTY),\n map(() => ɵfirebaseAppFactory(options, zone, name)),\n map(app => ɵcacheInstance(`${app.name}.remote-config`, 'AngularFireRemoteConfig', app.name, () => {\n const rc = app.remoteConfig();\n if (settings) {\n rc.settings = settings;\n }\n if (defaultConfig) {\n rc.defaultConfig = defaultConfig;\n }\n return rc;\n }, [settings, defaultConfig])),\n startWith<firebase.remoteConfig.RemoteConfig, undefined>(undefined),\n shareReplay({ bufferSize: 1, refCount: false })\n ) as Observable<any>;\n\n const loadedRemoteConfig$ = remoteConfig$.pipe(\n filter<firebase.remoteConfig.RemoteConfig>(rc => !!rc)\n );\n\n const default$: Observable<Record<string, firebase.remoteConfig.Value>> = of(Object.keys(defaultConfig || {}).reduce(\n (c, k) => ({ ...c, [k]: new Value('default', defaultConfig[k].toString()) }), {}\n ));\n\n // we should filter out the defaults we provided to RC, since we have our own implementation\n // that gives us a -1 for fetchTimeMillis (so filterFresh can filter them out)\n const filterOutDefaults = map<Record<string, firebase.remoteConfig.Value>, Record<string, firebase.remoteConfig.Value>>(all =>\n Object.keys(all)\n .filter(key => all[key].getSource() !== 'default')\n .reduce((acc, key) => ({ ...acc, [key]: all[key] }), {})\n );\n\n const existing$ = loadedRemoteConfig$.pipe(\n switchMap(rc =>\n rc.activate()\n .then(() => rc.ensureInitialized())\n .then(() => rc.getAll())\n ),\n filterOutDefaults\n );\n\n const fresh$ = loadedRemoteConfig$.pipe(\n switchMap(rc => zone.runOutsideAngular(() =>\n rc.fetchAndActivate()\n .then(() => rc.ensureInitialized())\n .then(() => rc.getAll())\n )),\n filterOutDefaults\n );\n\n this.parameters = concat(default$, existing$, fresh$).pipe(\n scanToParametersArray(remoteConfig$),\n pendingUntilEvent(this.injector),\n shareReplay({ bufferSize: 1, refCount: true })\n );\n\n this.changes = this.parameters.pipe(\n switchMap(params => of(...params)),\n groupBy(param => param.key),\n mergeMap(group => group.pipe(\n distinctUntilChanged()\n ))\n );\n\n this.strings = proxyAll(this.parameters, 'strings');\n this.booleans = proxyAll(this.parameters, 'booleans');\n this.numbers = proxyAll(this.parameters, 'numbers');\n\n return ɵlazySDKProxy(this, loadedRemoteConfig$, zone);\n }\n\n}\n\n\nexport const budget = <T>(interval: number): MonoTypeOperatorFunction<T> => (source: Observable<T>) => new Observable<T>(observer => {\n let timedOut = false;\n // TODO use scheduler task rather than settimeout\n const timeout = setTimeout(() => {\n observer.complete();\n timedOut = true;\n }, interval);\n return source.subscribe({\n next(val) {\n if (!timedOut) {\n observer.next(val);\n }\n },\n error(err) {\n if (!timedOut) {\n clearTimeout(timeout);\n observer.error(err);\n }\n },\n complete() {\n if (!timedOut) {\n clearTimeout(timeout);\n observer.complete();\n }\n }\n });\n});\n\nconst typedMethod = (it: any) => {\n switch (typeof it) {\n case 'string':\n return 'asString';\n case 'boolean':\n return 'asBoolean';\n case 'number':\n return 'asNumber';\n default:\n return 'asString';\n }\n};\n\n\nexport function scanToObject(): OperatorFunction<Parameter, Record<string, string | undefined>>;\nexport function scanToObject(to: 'numbers'): OperatorFunction<Parameter, Record<string, number | undefined>>;\nexport function scanToObject(to: 'booleans'): OperatorFunction<Parameter, Record<string, boolean | undefined>>;\n \nexport function scanToObject(to: 'strings'): OperatorFunction<Parameter, Record<string, string | undefined>>;\nexport function scanToObject<T extends ConfigTemplate>(template: T): OperatorFunction<Parameter, T & Record<string, string | undefined>>;\nexport function scanToObject<T extends ConfigTemplate>(to: 'numbers' | 'booleans' | 'strings' | T = 'strings') {\n return pipe(\n // TODO cleanup\n scan(\n (c, p: Parameter) => ({\n ...c, [p.key]: typeof to === 'object' ?\n p[typedMethod(to[p.key])]() :\n p[AS_TO_FN[to]]()\n }),\n typeof to === 'object' ?\n to as T & Record<string, string | undefined> :\n {} as Record<string, number | boolean | string>\n ),\n debounceTime(1),\n budget(10),\n distinctUntilChanged((a, b) => JSON.stringify(a) === JSON.stringify(b))\n );\n}\n\nexport function mapToObject(): OperatorFunction<Parameter[], Record<string, string | undefined>>;\nexport function mapToObject(to: 'numbers'): OperatorFunction<Parameter[], Record<string, number | undefined>>;\nexport function mapToObject(to: 'booleans'): OperatorFunction<Parameter[], Record<string, boolean | undefined>>;\n \nexport function mapToObject(to: 'strings'): OperatorFunction<Parameter[], Record<string, string | undefined>>;\nexport function mapToObject<T extends ConfigTemplate>(template: T):\n OperatorFunction<Parameter[], T & Record<string, string | undefined>>;\nexport function mapToObject<T extends ConfigTemplate>(to: 'numbers' | 'booleans' | 'strings' | T = 'strings') {\n return pipe(\n // TODO this is getting a little long, cleanup\n map((params: Parameter[]) => params.reduce(\n (c, p) => ({\n ...c, [p.key]: typeof to === 'object' ?\n p[typedMethod(to[p.key])]() :\n p[AS_TO_FN[to]]()\n }),\n typeof to === 'object' ?\n to as T & Record<string, string | undefined> :\n {} as Record<string, number | boolean | string>\n )),\n distinctUntilChanged((a, b) => JSON.stringify(a) === JSON.stringify(b))\n );\n}\n\nɵapplyMixins(AngularFireRemoteConfig, [proxyPolyfillCompat]);\n","import { NgModule } from '@angular/core';\nimport { VERSION } from '@angular/fire';\nimport firebase from 'firebase/compat/app';\nimport { AngularFireRemoteConfig } from './remote-config';\n\n@NgModule({\n providers: [ AngularFireRemoteConfig ]\n})\nexport class AngularFireRemoteConfigModule {\n constructor() {\n firebase.registerVersion('angularfire', VERSION.full, 'rc-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,GAAG,EAAE,IAAI;AACT,IAAA,QAAQ,EAAE,IAAI;AACd,IAAA,aAAa,EAAE,IAAI;AACnB,IAAA,eAAe,EAAE,IAAI;AACrB,IAAA,eAAe,EAAE,IAAI;AACrB,IAAA,QAAQ,EAAE,IAAI;AACd,IAAA,iBAAiB,EAAE,IAAI;AACvB,IAAA,KAAK,EAAE,IAAI;AACX,IAAA,gBAAgB,EAAE,IAAI;AACtB,IAAA,MAAM,EAAE,IAAI;AACZ,IAAA,UAAU,EAAE,IAAI;AAChB,IAAA,SAAS,EAAE,IAAI;AACf,IAAA,SAAS,EAAE,IAAI;AACf,IAAA,QAAQ,EAAE,IAAI;AACd,IAAA,WAAW,EAAE,IAAI;CAClB;;MCUY,QAAQ,GAAG,IAAI,cAAc,CAAW,oCAAoC;MAC5E,QAAQ,GAAG,IAAI,cAAc,CAAiB,yCAAyC;AAMpG,MAAM,QAAQ,GAAG,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE;AACpF,MAAM,aAAa,GAAG,EAAE,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE;AAEzE;AACA,MAAM,QAAQ,GAAG,CAAC,UAAmC,EAAE,EAAsC,KAAK,IAAI,KAAK,CACzG,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,EAAS,CAAC,CAAC,EAAE;AACvC,IAAA,GAAG,EAAE,CAAC,IAAI,EAAE,IAAY,KAAK,IAAI,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,IAAI,CACxD,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC,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,KAAA,CAAC,EACF,OAAO,EAAE,KAAK,QAAQ;AACpB,QAAA,EAA4C;QAC5C,EAA+C,CAClD,CAAC,EACF,oBAAoB,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CACxE;AACH;AAEAC,YAAY,CAAC,uBAAuB,EAAE,CAAC,mBAAmB,CAAC,CAAC;;MCrS/C,6BAA6B,CAAA;AACtC,IAAA,WAAA,GAAA;QACI,QAAQ,CAAC,eAAe,CAAC,aAAa,EAAE,OAAO,CAAC,IAAI,EAAE,WAAW,CAAC;IACtE;wGAHS,6BAA6B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;yGAA7B,6BAA6B,EAAA,CAAA;yGAA7B,6BAA6B,EAAA,SAAA,EAF7B,CAAE,uBAAuB,CAAE,EAAA,CAAA;;4FAE3B,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBAHzC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,SAAS,EAAE,CAAE,uBAAuB;AACrC,iBAAA;;;ACPD;;AAEG;;"}
@@ -102,9 +102,7 @@ const USE_EMULATOR = new InjectionToken('angularfire2.storage.use-emulator');
102
102
  class AngularFireStorage {
103
103
  storage;
104
104
  injector = inject(EnvironmentInjector);
105
- constructor(options, name, storageBucket,
106
- // eslint-disable-next-line @typescript-eslint/ban-types
107
- platformId, zone, schedulers, maxUploadRetryTime, maxOperationRetryTime, _useEmulator, _appCheckInstances) {
105
+ constructor(options, name, storageBucket, platformId, zone, schedulers, maxUploadRetryTime, maxOperationRetryTime, _useEmulator, _appCheckInstances) {
108
106
  const app = _firebaseAppFactory(options, zone, name);
109
107
  this.storage = _cacheInstance(`${app.name}.storage.${storageBucket}`, 'AngularFireStorage', app.name, () => {
110
108
  const storage = zone.runOutsideAngular(() => app.storage(storageBucket || undefined));
@@ -132,10 +130,10 @@ class AngularFireStorage {
132
130
  const ref = createStorageRef(storageRef, this.injector);
133
131
  return ref.put(data, metadata);
134
132
  }
135
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: AngularFireStorage, deps: [{ token: FIREBASE_OPTIONS }, { token: FIREBASE_APP_NAME, optional: true }, { token: BUCKET, optional: true }, { token: PLATFORM_ID }, { token: i0.NgZone }, { token: i1.ɵAngularFireSchedulers }, { token: MAX_UPLOAD_RETRY_TIME, optional: true }, { token: MAX_OPERATION_RETRY_TIME, optional: true }, { token: USE_EMULATOR, optional: true }, { token: i2.AppCheckInstances, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
136
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: AngularFireStorage, providedIn: 'any' });
133
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AngularFireStorage, deps: [{ token: FIREBASE_OPTIONS }, { token: FIREBASE_APP_NAME, optional: true }, { token: BUCKET, optional: true }, { token: PLATFORM_ID }, { token: i0.NgZone }, { token: i1.ɵAngularFireSchedulers }, { token: MAX_UPLOAD_RETRY_TIME, optional: true }, { token: MAX_OPERATION_RETRY_TIME, optional: true }, { token: USE_EMULATOR, optional: true }, { token: i2.AppCheckInstances, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
134
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AngularFireStorage, providedIn: 'any' });
137
135
  }
138
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: AngularFireStorage, decorators: [{
136
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AngularFireStorage, decorators: [{
139
137
  type: Injectable,
140
138
  args: [{
141
139
  providedIn: 'any'
@@ -153,7 +151,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImpor
153
151
  }, {
154
152
  type: Inject,
155
153
  args: [BUCKET]
156
- }] }, { type: Object, decorators: [{
154
+ }] }, { type: undefined, decorators: [{
157
155
  type: Inject,
158
156
  args: [PLATFORM_ID]
159
157
  }] }, { type: i0.NgZone }, { type: i1.ɵAngularFireSchedulers }, { type: undefined, decorators: [{
@@ -199,10 +197,10 @@ class GetDownloadURLPipe {
199
197
  ngOnDestroy() {
200
198
  this.asyncPipe.ngOnDestroy();
201
199
  }
202
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: GetDownloadURLPipe, deps: [{ token: AngularFireStorage }, { token: i0.ChangeDetectorRef }, { token: i0.TransferState, optional: true }], target: i0.ɵɵFactoryTarget.Pipe });
203
- static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.0.0", ngImport: i0, type: GetDownloadURLPipe, isStandalone: true, name: "getDownloadURL", pure: false });
200
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: GetDownloadURLPipe, deps: [{ token: AngularFireStorage }, { token: i0.ChangeDetectorRef }, { token: i0.TransferState, optional: true }], target: i0.ɵɵFactoryTarget.Pipe });
201
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.22", ngImport: i0, type: GetDownloadURLPipe, isStandalone: true, name: "getDownloadURL", pure: false });
204
202
  }
205
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: GetDownloadURLPipe, decorators: [{
203
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: GetDownloadURLPipe, decorators: [{
206
204
  type: Pipe,
207
205
  args: [{
208
206
  name: 'getDownloadURL',
@@ -212,11 +210,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImpor
212
210
  type: Optional
213
211
  }] }] });
214
212
  class GetDownloadURLPipeModule {
215
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: GetDownloadURLPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
216
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.0", ngImport: i0, type: GetDownloadURLPipeModule, imports: [GetDownloadURLPipe], exports: [GetDownloadURLPipe] });
217
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: GetDownloadURLPipeModule });
213
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: GetDownloadURLPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
214
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.22", ngImport: i0, type: GetDownloadURLPipeModule, imports: [GetDownloadURLPipe], exports: [GetDownloadURLPipe] });
215
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: GetDownloadURLPipeModule });
218
216
  }
219
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: GetDownloadURLPipeModule, decorators: [{
217
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: GetDownloadURLPipeModule, decorators: [{
220
218
  type: NgModule,
221
219
  args: [{
222
220
  imports: [GetDownloadURLPipe],
@@ -228,11 +226,11 @@ class AngularFireStorageModule {
228
226
  constructor() {
229
227
  firebase.registerVersion('angularfire', VERSION.full, 'gcs-compat');
230
228
  }
231
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: AngularFireStorageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
232
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.0", ngImport: i0, type: AngularFireStorageModule, imports: [GetDownloadURLPipeModule], exports: [GetDownloadURLPipeModule] });
233
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: AngularFireStorageModule, providers: [AngularFireStorage], imports: [GetDownloadURLPipeModule, GetDownloadURLPipeModule] });
229
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AngularFireStorageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
230
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.22", ngImport: i0, type: AngularFireStorageModule, imports: [GetDownloadURLPipeModule], exports: [GetDownloadURLPipeModule] });
231
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AngularFireStorageModule, providers: [AngularFireStorage], imports: [GetDownloadURLPipeModule, GetDownloadURLPipeModule] });
234
232
  }
235
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: AngularFireStorageModule, decorators: [{
233
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AngularFireStorageModule, decorators: [{
236
234
  type: NgModule,
237
235
  args: [{
238
236
  imports: [GetDownloadURLPipeModule],