Deployed the page to Github Pages.
This commit is contained in:
parent
1d79754e93
commit
2c89899458
62797 changed files with 6551425 additions and 15279 deletions
289
node_modules/@angular/fire/fesm2015/angular-fire-analytics.js
generated
vendored
Normal file
289
node_modules/@angular/fire/fesm2015/angular-fire-analytics.js
generated
vendored
Normal file
|
|
@ -0,0 +1,289 @@
|
|||
import { ɵgetAllInstancesOf, ɵisAnalyticsSupportedFactory, ɵzoneWrap, VERSION, ɵgetDefaultInstanceOf, ɵAngularFireSchedulers } from '@angular/fire';
|
||||
import { timer, from, of } from 'rxjs';
|
||||
import { concatMap, distinct, filter, switchMap, map, groupBy, mergeMap, distinctUntilChanged, startWith, pairwise } from 'rxjs/operators';
|
||||
import * as i0 from '@angular/core';
|
||||
import { Injectable, Optional, InjectionToken, APP_INITIALIZER, NgModule, NgZone, Injector } from '@angular/core';
|
||||
import { FirebaseApp, FirebaseApps } from '@angular/fire/app';
|
||||
import { registerVersion } from 'firebase/app';
|
||||
import { __awaiter } from 'tslib';
|
||||
import * as i1$1 from '@angular/router';
|
||||
import { ActivationEnd, ɵEmptyOutletComponent } from '@angular/router';
|
||||
import * as i2 from '@angular/platform-browser';
|
||||
import { getAnalytics as getAnalytics$1, initializeAnalytics as initializeAnalytics$1, logEvent as logEvent$1, setAnalyticsCollectionEnabled as setAnalyticsCollectionEnabled$1, setCurrentScreen as setCurrentScreen$1, settings as settings$1, setUserId as setUserId$1, setUserProperties as setUserProperties$1 } from 'firebase/analytics';
|
||||
export * from 'firebase/analytics';
|
||||
import * as i1 from '@angular/fire/auth';
|
||||
import { authState } from '@angular/fire/auth';
|
||||
|
||||
class Analytics {
|
||||
constructor(analytics) {
|
||||
return analytics;
|
||||
}
|
||||
}
|
||||
const ANALYTICS_PROVIDER_NAME = 'analytics';
|
||||
class AnalyticsInstances {
|
||||
constructor() {
|
||||
return ɵgetAllInstancesOf(ANALYTICS_PROVIDER_NAME);
|
||||
}
|
||||
}
|
||||
const analyticInstance$ = timer(0, 300).pipe(concatMap(() => from(ɵgetAllInstancesOf(ANALYTICS_PROVIDER_NAME))), distinct());
|
||||
|
||||
const isSupported = ɵisAnalyticsSupportedFactory.async;
|
||||
|
||||
// DO NOT MODIFY, this file is autogenerated by tools/build.ts
|
||||
const getAnalytics = ɵzoneWrap(getAnalytics$1, true);
|
||||
const initializeAnalytics = ɵzoneWrap(initializeAnalytics$1, true);
|
||||
const logEvent = ɵzoneWrap(logEvent$1, true);
|
||||
const setAnalyticsCollectionEnabled = ɵzoneWrap(setAnalyticsCollectionEnabled$1, true);
|
||||
const setCurrentScreen = ɵzoneWrap(setCurrentScreen$1, true);
|
||||
const settings = ɵzoneWrap(settings$1, true);
|
||||
const setUserId = ɵzoneWrap(setUserId$1, true);
|
||||
const setUserProperties = ɵzoneWrap(setUserProperties$1, true);
|
||||
|
||||
class UserTrackingService {
|
||||
constructor(auth, zone, injector) {
|
||||
this.disposables = [];
|
||||
registerVersion('angularfire', VERSION.full, 'user-tracking');
|
||||
let resolveInitialized;
|
||||
this.initialized = zone.runOutsideAngular(() => new Promise(resolve => { resolveInitialized = resolve; }));
|
||||
// The APP_INITIALIZER that is making isSupported() sync for the sake of convenient DI
|
||||
// may not be done when services are initialized. Guard the functionality by first ensuring
|
||||
// that the (global) promise has resolved, then get Analytics from the injector.
|
||||
isSupported().then(() => {
|
||||
const analytics = injector.get(Analytics);
|
||||
if (analytics) {
|
||||
this.disposables = [
|
||||
// TODO add credential tracking back in
|
||||
authState(auth).subscribe(user => {
|
||||
setUserId(analytics, user === null || user === void 0 ? void 0 : user.uid);
|
||||
resolveInitialized();
|
||||
}),
|
||||
];
|
||||
}
|
||||
else {
|
||||
resolveInitialized();
|
||||
}
|
||||
});
|
||||
}
|
||||
ngOnDestroy() {
|
||||
this.disposables.forEach(it => it.unsubscribe());
|
||||
}
|
||||
}
|
||||
UserTrackingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: UserTrackingService, deps: [{ token: i1.Auth }, { token: i0.NgZone }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
|
||||
UserTrackingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: UserTrackingService });
|
||||
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: UserTrackingService, decorators: [{
|
||||
type: Injectable
|
||||
}], ctorParameters: function () { return [{ type: i1.Auth }, { type: i0.NgZone }, { type: i0.Injector }]; } });
|
||||
|
||||
const FIREBASE_EVENT_ORIGIN_KEY = 'firebase_event_origin';
|
||||
const FIREBASE_PREVIOUS_SCREEN_CLASS_KEY = 'firebase_previous_class';
|
||||
const FIREBASE_PREVIOUS_SCREEN_INSTANCE_ID_KEY = 'firebase_previous_id';
|
||||
const FIREBASE_PREVIOUS_SCREEN_NAME_KEY = 'firebase_previous_screen';
|
||||
const FIREBASE_SCREEN_CLASS_KEY = 'firebase_screen_class';
|
||||
const FIREBASE_SCREEN_INSTANCE_ID_KEY = 'firebase_screen_id';
|
||||
const FIREBASE_SCREEN_NAME_KEY = 'firebase_screen';
|
||||
const OUTLET_KEY = 'outlet';
|
||||
const PAGE_PATH_KEY = 'page_path';
|
||||
const PAGE_TITLE_KEY = 'page_title';
|
||||
const SCREEN_CLASS_KEY = 'screen_class';
|
||||
const SCREEN_NAME_KEY = 'screen_name';
|
||||
const SCREEN_VIEW_EVENT = 'screen_view';
|
||||
const EVENT_ORIGIN_AUTO = 'auto';
|
||||
const SCREEN_INSTANCE_DELIMITER = '#';
|
||||
// this is an INT64 in iOS/Android but use INT32 cause javascript
|
||||
let nextScreenInstanceID = Math.floor(Math.random() * (Math.pow(2, 32) - 1)) - Math.pow(2, 31);
|
||||
const knownScreenInstanceIDs = {};
|
||||
const getScreenInstanceID = (params) => {
|
||||
// unique the screen class against the outlet name
|
||||
const screenInstanceKey = [
|
||||
params[SCREEN_CLASS_KEY],
|
||||
params[OUTLET_KEY]
|
||||
].join(SCREEN_INSTANCE_DELIMITER);
|
||||
if (knownScreenInstanceIDs.hasOwnProperty(screenInstanceKey)) {
|
||||
return knownScreenInstanceIDs[screenInstanceKey];
|
||||
}
|
||||
else {
|
||||
const ret = nextScreenInstanceID++;
|
||||
knownScreenInstanceIDs[screenInstanceKey] = ret;
|
||||
return ret;
|
||||
}
|
||||
};
|
||||
const ɵscreenViewEvent = (router, title, componentFactoryResolver) => {
|
||||
const activationEndEvents = router.events.pipe(filter(e => e instanceof ActivationEnd));
|
||||
return activationEndEvents.pipe(switchMap(activationEnd => {
|
||||
var _a;
|
||||
// router parseUrl is having trouble with outlets when they're empty
|
||||
// e.g, /asdf/1(bob://sally:asdf), so put another slash in when empty
|
||||
const urlTree = router.parseUrl(router.url.replace(/(?:\().+(?:\))/g, a => a.replace('://', ':///')));
|
||||
const pagePath = ((_a = urlTree.root.children[activationEnd.snapshot.outlet]) === null || _a === void 0 ? void 0 : _a.toString()) || '';
|
||||
const actualSnapshot = router.routerState.root.children.map(it => it).find(it => it.outlet === activationEnd.snapshot.outlet);
|
||||
if (!actualSnapshot) {
|
||||
return of(null);
|
||||
}
|
||||
let actualDeep = actualSnapshot;
|
||||
while (actualDeep.firstChild) {
|
||||
actualDeep = actualDeep.firstChild;
|
||||
}
|
||||
const screenName = actualDeep.pathFromRoot.map(s => { var _a; return (_a = s.routeConfig) === null || _a === void 0 ? void 0 : _a.path; }).filter(it => it).join('/') || '/';
|
||||
const params = {
|
||||
[SCREEN_NAME_KEY]: screenName,
|
||||
[PAGE_PATH_KEY]: `/${pagePath}`,
|
||||
[FIREBASE_EVENT_ORIGIN_KEY]: EVENT_ORIGIN_AUTO,
|
||||
[FIREBASE_SCREEN_NAME_KEY]: screenName,
|
||||
[OUTLET_KEY]: activationEnd.snapshot.outlet
|
||||
};
|
||||
if (title) {
|
||||
params[PAGE_TITLE_KEY] = title.getTitle();
|
||||
}
|
||||
let component = actualSnapshot.component;
|
||||
if (component) {
|
||||
if (component === ɵEmptyOutletComponent) {
|
||||
let deepSnapshot = activationEnd.snapshot;
|
||||
// TODO when might there be mutple children, different outlets? explore
|
||||
while (deepSnapshot.firstChild) {
|
||||
deepSnapshot = deepSnapshot.firstChild;
|
||||
}
|
||||
component = deepSnapshot.component;
|
||||
}
|
||||
}
|
||||
else {
|
||||
component = activationEnd.snapshot.component;
|
||||
}
|
||||
if (typeof component === 'string') {
|
||||
return of(Object.assign(Object.assign({}, params), { [SCREEN_CLASS_KEY]: component }));
|
||||
}
|
||||
else if (component) {
|
||||
const componentFactory = componentFactoryResolver.resolveComponentFactory(component);
|
||||
return of(Object.assign(Object.assign({}, params), { [SCREEN_CLASS_KEY]: componentFactory.selector }));
|
||||
}
|
||||
// lazy loads cause extra activations, ignore
|
||||
return of(null);
|
||||
}), filter(it => !!it), map(params => (Object.assign({ [FIREBASE_SCREEN_CLASS_KEY]: params[SCREEN_CLASS_KEY], [FIREBASE_SCREEN_INSTANCE_ID_KEY]: getScreenInstanceID(params) }, params))), groupBy(it => it[OUTLET_KEY]), mergeMap(it => it.pipe(distinctUntilChanged((a, b) => JSON.stringify(a) === JSON.stringify(b)), startWith(undefined), pairwise(), map(([prior, current]) => prior ? Object.assign({ [FIREBASE_PREVIOUS_SCREEN_CLASS_KEY]: prior[SCREEN_CLASS_KEY], [FIREBASE_PREVIOUS_SCREEN_NAME_KEY]: prior[SCREEN_NAME_KEY], [FIREBASE_PREVIOUS_SCREEN_INSTANCE_ID_KEY]: prior[FIREBASE_SCREEN_INSTANCE_ID_KEY] }, current) : current))));
|
||||
};
|
||||
class ScreenTrackingService {
|
||||
constructor(router, title, componentFactoryResolver, zone, userTrackingService, injector) {
|
||||
registerVersion('angularfire', VERSION.full, 'screen-tracking');
|
||||
// The APP_INITIALIZER that is making isSupported() sync for the sake of convenient DI
|
||||
// may not be done when services are initialized. Guard the functionality by first ensuring
|
||||
// that the (global) promise has resolved, then get Analytics from the injector.
|
||||
isSupported().then(() => {
|
||||
const analytics = injector.get(Analytics);
|
||||
if (!router || !analytics) {
|
||||
return;
|
||||
}
|
||||
zone.runOutsideAngular(() => {
|
||||
this.disposable = ɵscreenViewEvent(router, title, componentFactoryResolver).pipe(switchMap((params) => __awaiter(this, void 0, void 0, function* () {
|
||||
if (userTrackingService) {
|
||||
yield userTrackingService.initialized;
|
||||
}
|
||||
return logEvent(analytics, SCREEN_VIEW_EVENT, params);
|
||||
}))).subscribe();
|
||||
});
|
||||
});
|
||||
}
|
||||
ngOnDestroy() {
|
||||
if (this.disposable) {
|
||||
this.disposable.unsubscribe();
|
||||
}
|
||||
}
|
||||
}
|
||||
ScreenTrackingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: ScreenTrackingService, deps: [{ token: i1$1.Router, optional: true }, { token: i2.Title, optional: true }, { token: i0.ComponentFactoryResolver }, { token: i0.NgZone }, { token: UserTrackingService, optional: true }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
|
||||
ScreenTrackingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: ScreenTrackingService });
|
||||
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: ScreenTrackingService, decorators: [{
|
||||
type: Injectable
|
||||
}], ctorParameters: function () { return [{ type: i1$1.Router, decorators: [{
|
||||
type: Optional
|
||||
}] }, { type: i2.Title, decorators: [{
|
||||
type: Optional
|
||||
}] }, { type: i0.ComponentFactoryResolver }, { type: i0.NgZone }, { type: UserTrackingService, decorators: [{
|
||||
type: Optional
|
||||
}] }, { type: i0.Injector }]; } });
|
||||
|
||||
const PROVIDED_ANALYTICS_INSTANCES = new InjectionToken('angularfire2.analytics-instances');
|
||||
function defaultAnalyticsInstanceFactory(provided, defaultApp) {
|
||||
if (!ɵisAnalyticsSupportedFactory.sync()) {
|
||||
return null;
|
||||
}
|
||||
const defaultAnalytics = ɵgetDefaultInstanceOf(ANALYTICS_PROVIDER_NAME, provided, defaultApp);
|
||||
return defaultAnalytics && new Analytics(defaultAnalytics);
|
||||
}
|
||||
function analyticsInstanceFactory(fn) {
|
||||
return (zone, injector) => {
|
||||
if (!ɵisAnalyticsSupportedFactory.sync()) {
|
||||
return null;
|
||||
}
|
||||
const analytics = zone.runOutsideAngular(() => fn(injector));
|
||||
return new Analytics(analytics);
|
||||
};
|
||||
}
|
||||
const ANALYTICS_INSTANCES_PROVIDER = {
|
||||
provide: AnalyticsInstances,
|
||||
deps: [
|
||||
[new Optional(), PROVIDED_ANALYTICS_INSTANCES],
|
||||
]
|
||||
};
|
||||
const DEFAULT_ANALYTICS_INSTANCE_PROVIDER = {
|
||||
provide: Analytics,
|
||||
useFactory: defaultAnalyticsInstanceFactory,
|
||||
deps: [
|
||||
[new Optional(), PROVIDED_ANALYTICS_INSTANCES],
|
||||
FirebaseApp,
|
||||
]
|
||||
};
|
||||
class AnalyticsModule {
|
||||
constructor(_screenTrackingService, _userTrackingService) {
|
||||
registerVersion('angularfire', VERSION.full, 'analytics');
|
||||
}
|
||||
}
|
||||
AnalyticsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AnalyticsModule, deps: [{ token: ScreenTrackingService, optional: true }, { token: UserTrackingService, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });
|
||||
AnalyticsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AnalyticsModule });
|
||||
AnalyticsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AnalyticsModule, providers: [
|
||||
DEFAULT_ANALYTICS_INSTANCE_PROVIDER,
|
||||
ANALYTICS_INSTANCES_PROVIDER,
|
||||
{
|
||||
provide: APP_INITIALIZER,
|
||||
useValue: ɵisAnalyticsSupportedFactory.async,
|
||||
multi: true,
|
||||
}
|
||||
] });
|
||||
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AnalyticsModule, decorators: [{
|
||||
type: NgModule,
|
||||
args: [{
|
||||
providers: [
|
||||
DEFAULT_ANALYTICS_INSTANCE_PROVIDER,
|
||||
ANALYTICS_INSTANCES_PROVIDER,
|
||||
{
|
||||
provide: APP_INITIALIZER,
|
||||
useValue: ɵisAnalyticsSupportedFactory.async,
|
||||
multi: true,
|
||||
}
|
||||
]
|
||||
}]
|
||||
}], ctorParameters: function () { return [{ type: ScreenTrackingService, decorators: [{
|
||||
type: Optional
|
||||
}] }, { type: UserTrackingService, decorators: [{
|
||||
type: Optional
|
||||
}] }]; } });
|
||||
function provideAnalytics(fn, ...deps) {
|
||||
return {
|
||||
ngModule: AnalyticsModule,
|
||||
providers: [{
|
||||
provide: PROVIDED_ANALYTICS_INSTANCES,
|
||||
useFactory: analyticsInstanceFactory(fn),
|
||||
multi: true,
|
||||
deps: [
|
||||
NgZone,
|
||||
Injector,
|
||||
ɵAngularFireSchedulers,
|
||||
FirebaseApps,
|
||||
...deps,
|
||||
]
|
||||
}]
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated bundle index. Do not edit.
|
||||
*/
|
||||
|
||||
export { Analytics, AnalyticsInstances, AnalyticsModule, ScreenTrackingService, UserTrackingService, analyticInstance$, getAnalytics, initializeAnalytics, isSupported, logEvent, provideAnalytics, setAnalyticsCollectionEnabled, setCurrentScreen, setUserId, setUserProperties, settings, ɵscreenViewEvent };
|
||||
//# sourceMappingURL=angular-fire-analytics.js.map
|
||||
1
node_modules/@angular/fire/fesm2015/angular-fire-analytics.js.map
generated
vendored
Normal file
1
node_modules/@angular/fire/fesm2015/angular-fire-analytics.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
110
node_modules/@angular/fire/fesm2015/angular-fire-app-check.js
generated
vendored
Normal file
110
node_modules/@angular/fire/fesm2015/angular-fire-app-check.js
generated
vendored
Normal file
|
|
@ -0,0 +1,110 @@
|
|||
import { ɵgetAllInstancesOf, ɵgetDefaultInstanceOf, VERSION, ɵAngularFireSchedulers, ɵzoneWrap } from '@angular/fire';
|
||||
import { timer, from } from 'rxjs';
|
||||
import { concatMap, distinct } from 'rxjs/operators';
|
||||
import * as i0 from '@angular/core';
|
||||
import { InjectionToken, isDevMode, Optional, PLATFORM_ID, NgModule, NgZone, Injector } from '@angular/core';
|
||||
import { FirebaseApp, FirebaseApps } from '@angular/fire/app';
|
||||
import { registerVersion } from 'firebase/app';
|
||||
import { isPlatformServer } from '@angular/common';
|
||||
import { getToken as getToken$1, initializeAppCheck as initializeAppCheck$1, onTokenChanged as onTokenChanged$1, setTokenAutoRefreshEnabled as setTokenAutoRefreshEnabled$1 } from 'firebase/app-check';
|
||||
export * from 'firebase/app-check';
|
||||
|
||||
const APP_CHECK_PROVIDER_NAME = 'app-check';
|
||||
class AppCheck {
|
||||
constructor(appCheck) {
|
||||
return appCheck;
|
||||
}
|
||||
}
|
||||
class AppCheckInstances {
|
||||
constructor() {
|
||||
return ɵgetAllInstancesOf(APP_CHECK_PROVIDER_NAME);
|
||||
}
|
||||
}
|
||||
const appCheckInstance$ = timer(0, 300).pipe(concatMap(() => from(ɵgetAllInstancesOf(APP_CHECK_PROVIDER_NAME))), distinct());
|
||||
|
||||
const PROVIDED_APP_CHECK_INSTANCES = new InjectionToken('angularfire2.app-check-instances');
|
||||
const APP_CHECK_NAMESPACE_SYMBOL = Symbol('angularfire2.app-check.namespace');
|
||||
function defaultAppCheckInstanceFactory(provided, defaultApp) {
|
||||
const defaultAppCheck = ɵgetDefaultInstanceOf(APP_CHECK_PROVIDER_NAME, provided, defaultApp);
|
||||
return defaultAppCheck && new AppCheck(defaultAppCheck);
|
||||
}
|
||||
const LOCALHOSTS = ['localhost', '0.0.0.0', '127.0.0.1'];
|
||||
const isLocalhost = typeof window !== 'undefined' && LOCALHOSTS.includes(window.location.hostname);
|
||||
function appCheckInstanceFactory(fn) {
|
||||
// tslint:disable-next-line:ban-types
|
||||
return (zone, injector, platformId) => {
|
||||
var _a;
|
||||
// Node should use admin token provider, browser devmode and localhost should use debug token
|
||||
if (!isPlatformServer(platformId) && (isDevMode() || isLocalhost)) {
|
||||
(_a = globalThis.FIREBASE_APPCHECK_DEBUG_TOKEN) !== null && _a !== void 0 ? _a : (globalThis.FIREBASE_APPCHECK_DEBUG_TOKEN = true);
|
||||
}
|
||||
const appCheck = zone.runOutsideAngular(() => fn(injector));
|
||||
return new AppCheck(appCheck);
|
||||
};
|
||||
}
|
||||
const APP_CHECK_INSTANCES_PROVIDER = {
|
||||
provide: AppCheckInstances,
|
||||
deps: [
|
||||
[new Optional(), PROVIDED_APP_CHECK_INSTANCES],
|
||||
]
|
||||
};
|
||||
const DEFAULT_APP_CHECK_INSTANCE_PROVIDER = {
|
||||
provide: AppCheck,
|
||||
useFactory: defaultAppCheckInstanceFactory,
|
||||
deps: [
|
||||
[new Optional(), PROVIDED_APP_CHECK_INSTANCES],
|
||||
FirebaseApp,
|
||||
PLATFORM_ID,
|
||||
]
|
||||
};
|
||||
class AppCheckModule {
|
||||
constructor() {
|
||||
registerVersion('angularfire', VERSION.full, 'app-check');
|
||||
}
|
||||
}
|
||||
AppCheckModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AppCheckModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
||||
AppCheckModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AppCheckModule });
|
||||
AppCheckModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AppCheckModule, providers: [
|
||||
DEFAULT_APP_CHECK_INSTANCE_PROVIDER,
|
||||
APP_CHECK_INSTANCES_PROVIDER,
|
||||
] });
|
||||
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AppCheckModule, decorators: [{
|
||||
type: NgModule,
|
||||
args: [{
|
||||
providers: [
|
||||
DEFAULT_APP_CHECK_INSTANCE_PROVIDER,
|
||||
APP_CHECK_INSTANCES_PROVIDER,
|
||||
]
|
||||
}]
|
||||
}], ctorParameters: function () { return []; } });
|
||||
function provideAppCheck(fn, ...deps) {
|
||||
return {
|
||||
ngModule: AppCheckModule,
|
||||
providers: [{
|
||||
provide: PROVIDED_APP_CHECK_INSTANCES,
|
||||
useFactory: appCheckInstanceFactory(fn),
|
||||
multi: true,
|
||||
deps: [
|
||||
NgZone,
|
||||
Injector,
|
||||
PLATFORM_ID,
|
||||
ɵAngularFireSchedulers,
|
||||
FirebaseApps,
|
||||
...deps,
|
||||
]
|
||||
}]
|
||||
};
|
||||
}
|
||||
|
||||
// DO NOT MODIFY, this file is autogenerated by tools/build.ts
|
||||
const getToken = ɵzoneWrap(getToken$1, true);
|
||||
const initializeAppCheck = ɵzoneWrap(initializeAppCheck$1, true);
|
||||
const onTokenChanged = ɵzoneWrap(onTokenChanged$1, true);
|
||||
const setTokenAutoRefreshEnabled = ɵzoneWrap(setTokenAutoRefreshEnabled$1, true);
|
||||
|
||||
/**
|
||||
* Generated bundle index. Do not edit.
|
||||
*/
|
||||
|
||||
export { AppCheck, AppCheckInstances, AppCheckModule, appCheckInstance$, getToken, initializeAppCheck, onTokenChanged, provideAppCheck, setTokenAutoRefreshEnabled };
|
||||
//# sourceMappingURL=angular-fire-app-check.js.map
|
||||
1
node_modules/@angular/fire/fesm2015/angular-fire-app-check.js.map
generated
vendored
Normal file
1
node_modules/@angular/fire/fesm2015/angular-fire-app-check.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
114
node_modules/@angular/fire/fesm2015/angular-fire-app.js
generated
vendored
Normal file
114
node_modules/@angular/fire/fesm2015/angular-fire-app.js
generated
vendored
Normal file
|
|
@ -0,0 +1,114 @@
|
|||
import { getApps as getApps$1, getApp as getApp$1, registerVersion as registerVersion$1, deleteApp as deleteApp$1, initializeApp as initializeApp$1, onLog as onLog$1, setLogLevel as setLogLevel$1 } from 'firebase/app';
|
||||
export * from 'firebase/app';
|
||||
import { timer, from } from 'rxjs';
|
||||
import { concatMap, distinct } from 'rxjs/operators';
|
||||
import * as i0 from '@angular/core';
|
||||
import { InjectionToken, Optional, VERSION as VERSION$1, PLATFORM_ID, NgModule, Inject, NgZone, Injector } from '@angular/core';
|
||||
import { VERSION, ɵAngularFireSchedulers, ɵzoneWrap } from '@angular/fire';
|
||||
|
||||
class FirebaseApp {
|
||||
constructor(app) {
|
||||
return app;
|
||||
}
|
||||
}
|
||||
class FirebaseApps {
|
||||
constructor() {
|
||||
return getApps$1();
|
||||
}
|
||||
}
|
||||
const firebaseApp$ = timer(0, 300).pipe(concatMap(() => from(getApps$1())), distinct());
|
||||
|
||||
function defaultFirebaseAppFactory(provided) {
|
||||
// Use the provided app, if there is only one, otherwise fetch the default app
|
||||
if (provided && provided.length === 1) {
|
||||
return provided[0];
|
||||
}
|
||||
return new FirebaseApp(getApp$1());
|
||||
}
|
||||
// With FIREBASE_APPS I wanted to capture the default app instance, if it is initialized by
|
||||
// the reserved URL; ɵPROVIDED_FIREBASE_APPS is not for public consumption and serves to ensure that all
|
||||
// provideFirebaseApp(...) calls are satisfied before FirebaseApp$ or FirebaseApp is resolved
|
||||
const PROVIDED_FIREBASE_APPS = new InjectionToken('angularfire2._apps');
|
||||
// Injecting FirebaseApp will now only inject the default Firebase App
|
||||
// this allows allows beginners to import /__/firebase/init.js to auto initialize Firebase App
|
||||
// from the reserved URL.
|
||||
const DEFAULT_FIREBASE_APP_PROVIDER = {
|
||||
provide: FirebaseApp,
|
||||
useFactory: defaultFirebaseAppFactory,
|
||||
deps: [
|
||||
[new Optional(), PROVIDED_FIREBASE_APPS],
|
||||
],
|
||||
};
|
||||
const FIREBASE_APPS_PROVIDER = {
|
||||
provide: FirebaseApps,
|
||||
deps: [
|
||||
[new Optional(), PROVIDED_FIREBASE_APPS],
|
||||
],
|
||||
};
|
||||
function firebaseAppFactory(fn) {
|
||||
return (zone, injector) => {
|
||||
const app = zone.runOutsideAngular(() => fn(injector));
|
||||
return new FirebaseApp(app);
|
||||
};
|
||||
}
|
||||
class FirebaseAppModule {
|
||||
// tslint:disable-next-line:ban-types
|
||||
constructor(platformId) {
|
||||
registerVersion$1('angularfire', VERSION.full, 'core');
|
||||
registerVersion$1('angularfire', VERSION.full, 'app');
|
||||
registerVersion$1('angular', VERSION$1.full, platformId.toString());
|
||||
}
|
||||
}
|
||||
FirebaseAppModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: FirebaseAppModule, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.NgModule });
|
||||
FirebaseAppModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: FirebaseAppModule });
|
||||
FirebaseAppModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: FirebaseAppModule, providers: [
|
||||
DEFAULT_FIREBASE_APP_PROVIDER,
|
||||
FIREBASE_APPS_PROVIDER,
|
||||
] });
|
||||
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: FirebaseAppModule, decorators: [{
|
||||
type: NgModule,
|
||||
args: [{
|
||||
providers: [
|
||||
DEFAULT_FIREBASE_APP_PROVIDER,
|
||||
FIREBASE_APPS_PROVIDER,
|
||||
]
|
||||
}]
|
||||
}], ctorParameters: function () { return [{ type: Object, decorators: [{
|
||||
type: Inject,
|
||||
args: [PLATFORM_ID]
|
||||
}] }]; } });
|
||||
// Calling initializeApp({ ... }, 'name') multiple times will add more FirebaseApps into the FIREBASE_APPS
|
||||
// injection scope. This allows developers to more easily work with multiple Firebase Applications. Downside
|
||||
// is that DI for app name and options doesn't really make sense anymore.
|
||||
function provideFirebaseApp(fn, ...deps) {
|
||||
return {
|
||||
ngModule: FirebaseAppModule,
|
||||
providers: [{
|
||||
provide: PROVIDED_FIREBASE_APPS,
|
||||
useFactory: firebaseAppFactory(fn),
|
||||
multi: true,
|
||||
deps: [
|
||||
NgZone,
|
||||
Injector,
|
||||
ɵAngularFireSchedulers,
|
||||
...deps,
|
||||
],
|
||||
}],
|
||||
};
|
||||
}
|
||||
|
||||
// DO NOT MODIFY, this file is autogenerated by tools/build.ts
|
||||
const deleteApp = ɵzoneWrap(deleteApp$1, true);
|
||||
const getApp = ɵzoneWrap(getApp$1, true);
|
||||
const getApps = ɵzoneWrap(getApps$1, true);
|
||||
const initializeApp = ɵzoneWrap(initializeApp$1, true);
|
||||
const onLog = ɵzoneWrap(onLog$1, true);
|
||||
const registerVersion = ɵzoneWrap(registerVersion$1, true);
|
||||
const setLogLevel = ɵzoneWrap(setLogLevel$1, true);
|
||||
|
||||
/**
|
||||
* Generated bundle index. Do not edit.
|
||||
*/
|
||||
|
||||
export { FirebaseApp, FirebaseAppModule, FirebaseApps, deleteApp, firebaseApp$, getApp, getApps, initializeApp, onLog, provideFirebaseApp, registerVersion, setLogLevel };
|
||||
//# sourceMappingURL=angular-fire-app.js.map
|
||||
1
node_modules/@angular/fire/fesm2015/angular-fire-app.js.map
generated
vendored
Normal file
1
node_modules/@angular/fire/fesm2015/angular-fire-app.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
72
node_modules/@angular/fire/fesm2015/angular-fire-auth-guard.js
generated
vendored
Normal file
72
node_modules/@angular/fire/fesm2015/angular-fire-auth-guard.js
generated
vendored
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
import * as i0 from '@angular/core';
|
||||
import { Injectable, NgModule } from '@angular/core';
|
||||
import * as i1 from '@angular/router';
|
||||
import { of, pipe } from 'rxjs';
|
||||
import { map, take, switchMap } from 'rxjs/operators';
|
||||
import * as i2 from '@angular/fire/auth';
|
||||
import { user } from '@angular/fire/auth';
|
||||
import { registerVersion } from 'firebase/app';
|
||||
import { VERSION } from '@angular/fire';
|
||||
|
||||
const loggedIn = map(user => !!user);
|
||||
class AuthGuard {
|
||||
constructor(router, auth) {
|
||||
this.router = router;
|
||||
this.auth = auth;
|
||||
this.canActivate = (next, state) => {
|
||||
const authPipeFactory = next.data.authGuardPipe || (() => loggedIn);
|
||||
return user(this.auth).pipe(take(1), authPipeFactory(next, state), map(can => {
|
||||
if (typeof can === 'boolean') {
|
||||
return can;
|
||||
}
|
||||
else if (Array.isArray(can)) {
|
||||
return this.router.createUrlTree(can);
|
||||
}
|
||||
else {
|
||||
// TODO(EdricChan03): Add tests
|
||||
return this.router.parseUrl(can);
|
||||
}
|
||||
}));
|
||||
};
|
||||
}
|
||||
}
|
||||
AuthGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AuthGuard, deps: [{ token: i1.Router }, { token: i2.Auth }], target: i0.ɵɵFactoryTarget.Injectable });
|
||||
AuthGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AuthGuard, providedIn: 'any' });
|
||||
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AuthGuard, decorators: [{
|
||||
type: Injectable,
|
||||
args: [{
|
||||
providedIn: 'any'
|
||||
}]
|
||||
}], ctorParameters: function () { return [{ type: i1.Router }, { type: i2.Auth }]; } });
|
||||
const canActivate = (pipe) => ({
|
||||
canActivate: [AuthGuard], data: { authGuardPipe: pipe }
|
||||
});
|
||||
const isNotAnonymous = map(user => !!user && !user.isAnonymous);
|
||||
const idTokenResult = switchMap((user) => user ? user.getIdTokenResult() : of(null));
|
||||
const emailVerified = map(user => !!user && user.emailVerified);
|
||||
const customClaims = pipe(idTokenResult, map(idTokenResult => idTokenResult ? idTokenResult.claims : []));
|
||||
const hasCustomClaim = (claim) => pipe(customClaims, map(claims => claims.hasOwnProperty(claim)));
|
||||
const redirectUnauthorizedTo = (redirect) => pipe(loggedIn, map(loggedIn => loggedIn || redirect));
|
||||
const redirectLoggedInTo = (redirect) => pipe(loggedIn, map(loggedIn => loggedIn && redirect || true));
|
||||
|
||||
class AuthGuardModule {
|
||||
constructor() {
|
||||
registerVersion('angularfire', VERSION.full, 'auth-guard');
|
||||
}
|
||||
}
|
||||
AuthGuardModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AuthGuardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
||||
AuthGuardModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AuthGuardModule });
|
||||
AuthGuardModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AuthGuardModule, providers: [AuthGuard] });
|
||||
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AuthGuardModule, decorators: [{
|
||||
type: NgModule,
|
||||
args: [{
|
||||
providers: [AuthGuard]
|
||||
}]
|
||||
}], ctorParameters: function () { return []; } });
|
||||
|
||||
/**
|
||||
* Generated bundle index. Do not edit.
|
||||
*/
|
||||
|
||||
export { AuthGuard, AuthGuardModule, canActivate, customClaims, emailVerified, hasCustomClaim, idTokenResult, isNotAnonymous, loggedIn, redirectLoggedInTo, redirectUnauthorizedTo };
|
||||
//# sourceMappingURL=angular-fire-auth-guard.js.map
|
||||
1
node_modules/@angular/fire/fesm2015/angular-fire-auth-guard.js.map
generated
vendored
Normal file
1
node_modules/@angular/fire/fesm2015/angular-fire-auth-guard.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"angular-fire-auth-guard.js","sources":["../../../src/auth-guard/auth-guard.ts","../../../src/auth-guard/auth-guard.module.ts","../../../src/auth-guard/angular-fire-auth-guard.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot } from '@angular/router';\nimport { Observable, of, pipe, UnaryFunction } from 'rxjs';\nimport { map, switchMap, take } from 'rxjs/operators';\nimport { Auth, user } from '@angular/fire/auth';\nimport { User } from 'firebase/auth';\n\nexport type AuthPipeGenerator = (next: ActivatedRouteSnapshot, state: RouterStateSnapshot) => AuthPipe;\nexport type AuthPipe = UnaryFunction<Observable<User|null>, Observable<boolean|string|any[]>>;\n\nexport const loggedIn: AuthPipe = map(user => !!user);\n\n@Injectable({\n providedIn: 'any'\n})\nexport class AuthGuard implements CanActivate {\n\n constructor(private router: Router, private auth: Auth) {}\n\n canActivate = (next: ActivatedRouteSnapshot, state: RouterStateSnapshot) => {\n const authPipeFactory = next.data.authGuardPipe as AuthPipeGenerator || (() => loggedIn);\n return user(this.auth).pipe(\n take(1),\n authPipeFactory(next, state),\n map(can => {\n if (typeof can === 'boolean') {\n return can;\n } else if (Array.isArray(can)) {\n return this.router.createUrlTree(can);\n } else {\n // TODO(EdricChan03): Add tests\n return this.router.parseUrl(can);\n }\n })\n );\n }\n\n}\n\nexport const canActivate = (pipe: AuthPipeGenerator) => ({\n canActivate: [ AuthGuard ], data: { authGuardPipe: pipe }\n});\n\nexport const isNotAnonymous: AuthPipe = map(user => !!user && !user.isAnonymous);\nexport const idTokenResult = switchMap((user: User|null) => user ? user.getIdTokenResult() : of(null));\nexport const emailVerified: AuthPipe = map(user => !!user && user.emailVerified);\nexport const customClaims = pipe(idTokenResult, map(idTokenResult => idTokenResult ? idTokenResult.claims : []));\nexport const hasCustomClaim: (claim: string) => AuthPipe =\n (claim) => pipe(customClaims, map(claims => claims.hasOwnProperty(claim)));\nexport const redirectUnauthorizedTo: (redirect: string|any[]) => AuthPipe =\n (redirect) => pipe(loggedIn, map(loggedIn => loggedIn || redirect));\nexport const redirectLoggedInTo: (redirect: string|any[]) => AuthPipe =\n (redirect) => pipe(loggedIn, map(loggedIn => loggedIn && redirect || true));\n","import { NgModule } from '@angular/core';\nimport { AuthGuard } from './auth-guard';\nimport { registerVersion } from 'firebase/app';\nimport { VERSION } from '@angular/fire';\n\n@NgModule({\n providers: [ AuthGuard ]\n})\nexport class AuthGuardModule {\n constructor() {\n registerVersion('angularfire', VERSION.full, 'auth-guard');\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;MAUa,QAAQ,GAAa,GAAG,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,EAAE;MAKzC,SAAS;IAEpB,YAAoB,MAAc,EAAU,IAAU;QAAlC,WAAM,GAAN,MAAM,CAAQ;QAAU,SAAI,GAAJ,IAAI,CAAM;QAEtD,gBAAW,GAAG,CAAC,IAA4B,EAAE,KAA0B;YACrE,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,aAAkC,KAAK,MAAM,QAAQ,CAAC,CAAC;YACzF,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CACzB,IAAI,CAAC,CAAC,CAAC,EACP,eAAe,CAAC,IAAI,EAAE,KAAK,CAAC,EAC5B,GAAG,CAAC,GAAG;gBACL,IAAI,OAAO,GAAG,KAAK,SAAS,EAAE;oBAC5B,OAAO,GAAG,CAAC;iBACZ;qBAAM,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;oBAC7B,OAAO,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;iBACvC;qBAAM;;oBAEL,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;iBAClC;aACF,CAAC,CACH,CAAC;SACH,CAAA;KAlByD;;sGAF/C,SAAS;0GAAT,SAAS,cAFR,KAAK;2FAEN,SAAS;kBAHrB,UAAU;mBAAC;oBACV,UAAU,EAAE,KAAK;iBAClB;;MAyBY,WAAW,GAAG,CAAC,IAAuB,MAAM;IACvD,WAAW,EAAE,CAAE,SAAS,CAAE,EAAE,IAAI,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE;CAC1D,EAAE;MAEU,cAAc,GAAa,GAAG,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;MACpE,aAAa,GAAG,SAAS,CAAC,CAAC,IAAe,KAAK,IAAI,GAAG,IAAI,CAAC,gBAAgB,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE;MAC1F,aAAa,GAAa,GAAG,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,aAAa,EAAE;MACpE,YAAY,GAAG,IAAI,CAAC,aAAa,EAAE,GAAG,CAAC,aAAa,IAAI,aAAa,GAAG,aAAa,CAAC,MAAM,GAAG,EAAE,CAAC,EAAE;MACpG,cAAc,GACzB,CAAC,KAAK,KAAK,IAAI,CAAC,YAAY,EAAE,GAAG,CAAC,MAAM,IAAK,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,EAAE;MACjE,sBAAsB,GACjC,CAAC,QAAQ,KAAK,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,QAAQ,IAAI,QAAQ,IAAI,QAAQ,CAAC,EAAE;MACzD,kBAAkB,GAC7B,CAAC,QAAQ,KAAK,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,QAAQ,IAAI,QAAQ,IAAI,QAAQ,IAAI,IAAI,CAAC;;MC5C/D,eAAe;IAC1B;QACE,eAAe,CAAC,aAAa,EAAE,OAAO,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;KAC5D;;4GAHU,eAAe;6GAAf,eAAe;6GAAf,eAAe,aAFf,CAAE,SAAS,CAAE;2FAEb,eAAe;kBAH3B,QAAQ;mBAAC;oBACR,SAAS,EAAE,CAAE,SAAS,CAAE;iBACzB;;;ACPD;;;;;;"}
|
||||
153
node_modules/@angular/fire/fesm2015/angular-fire-auth.js
generated
vendored
Normal file
153
node_modules/@angular/fire/fesm2015/angular-fire-auth.js
generated
vendored
Normal file
|
|
@ -0,0 +1,153 @@
|
|||
import { ɵgetAllInstancesOf, ɵgetDefaultInstanceOf, VERSION, ɵAngularFireSchedulers, ɵzoneWrap } from '@angular/fire';
|
||||
import { timer, from } from 'rxjs';
|
||||
import { concatMap, distinct } from 'rxjs/operators';
|
||||
import * as i0 from '@angular/core';
|
||||
import { InjectionToken, Optional, NgModule, NgZone, Injector } from '@angular/core';
|
||||
import { FirebaseApp, FirebaseApps } from '@angular/fire/app';
|
||||
import { registerVersion } from 'firebase/app';
|
||||
import { AppCheckInstances } from '@angular/fire/app-check';
|
||||
import { authState as authState$1, user as user$1, idToken as idToken$1 } from 'rxfire/auth';
|
||||
import { applyActionCode as applyActionCode$1, beforeAuthStateChanged as beforeAuthStateChanged$1, checkActionCode as checkActionCode$1, confirmPasswordReset as confirmPasswordReset$1, connectAuthEmulator as connectAuthEmulator$1, createUserWithEmailAndPassword as createUserWithEmailAndPassword$1, deleteUser as deleteUser$1, fetchSignInMethodsForEmail as fetchSignInMethodsForEmail$1, getAdditionalUserInfo as getAdditionalUserInfo$1, getAuth as getAuth$1, getIdToken as getIdToken$1, getIdTokenResult as getIdTokenResult$1, getMultiFactorResolver as getMultiFactorResolver$1, getRedirectResult as getRedirectResult$1, initializeAuth as initializeAuth$1, isSignInWithEmailLink as isSignInWithEmailLink$1, linkWithCredential as linkWithCredential$1, linkWithPhoneNumber as linkWithPhoneNumber$1, linkWithPopup as linkWithPopup$1, linkWithRedirect as linkWithRedirect$1, multiFactor as multiFactor$1, onAuthStateChanged as onAuthStateChanged$1, onIdTokenChanged as onIdTokenChanged$1, parseActionCodeURL as parseActionCodeURL$1, reauthenticateWithCredential as reauthenticateWithCredential$1, reauthenticateWithPhoneNumber as reauthenticateWithPhoneNumber$1, reauthenticateWithPopup as reauthenticateWithPopup$1, reauthenticateWithRedirect as reauthenticateWithRedirect$1, reload as reload$1, sendEmailVerification as sendEmailVerification$1, sendPasswordResetEmail as sendPasswordResetEmail$1, sendSignInLinkToEmail as sendSignInLinkToEmail$1, setPersistence as setPersistence$1, signInAnonymously as signInAnonymously$1, signInWithCredential as signInWithCredential$1, signInWithCustomToken as signInWithCustomToken$1, signInWithEmailAndPassword as signInWithEmailAndPassword$1, signInWithEmailLink as signInWithEmailLink$1, signInWithPhoneNumber as signInWithPhoneNumber$1, signInWithPopup as signInWithPopup$1, signInWithRedirect as signInWithRedirect$1, signOut as signOut$1, unlink as unlink$1, updateCurrentUser as updateCurrentUser$1, updateEmail as updateEmail$1, updatePassword as updatePassword$1, updatePhoneNumber as updatePhoneNumber$1, updateProfile as updateProfile$1, useDeviceLanguage as useDeviceLanguage$1, verifyBeforeUpdateEmail as verifyBeforeUpdateEmail$1, verifyPasswordResetCode as verifyPasswordResetCode$1 } from 'firebase/auth';
|
||||
export * from 'firebase/auth';
|
||||
|
||||
const AUTH_PROVIDER_NAME = 'auth';
|
||||
class Auth {
|
||||
constructor(auth) {
|
||||
return auth;
|
||||
}
|
||||
}
|
||||
class AuthInstances {
|
||||
constructor() {
|
||||
return ɵgetAllInstancesOf(AUTH_PROVIDER_NAME);
|
||||
}
|
||||
}
|
||||
const authInstance$ = timer(0, 300).pipe(concatMap(() => from(ɵgetAllInstancesOf(AUTH_PROVIDER_NAME))), distinct());
|
||||
|
||||
const PROVIDED_AUTH_INSTANCES = new InjectionToken('angularfire2.auth-instances');
|
||||
function defaultAuthInstanceFactory(provided, defaultApp) {
|
||||
const defaultAuth = ɵgetDefaultInstanceOf(AUTH_PROVIDER_NAME, provided, defaultApp);
|
||||
return defaultAuth && new Auth(defaultAuth);
|
||||
}
|
||||
function authInstanceFactory(fn) {
|
||||
return (zone, injector) => {
|
||||
const auth = zone.runOutsideAngular(() => fn(injector));
|
||||
return new Auth(auth);
|
||||
};
|
||||
}
|
||||
const AUTH_INSTANCES_PROVIDER = {
|
||||
provide: AuthInstances,
|
||||
deps: [
|
||||
[new Optional(), PROVIDED_AUTH_INSTANCES],
|
||||
]
|
||||
};
|
||||
const DEFAULT_AUTH_INSTANCE_PROVIDER = {
|
||||
provide: Auth,
|
||||
useFactory: defaultAuthInstanceFactory,
|
||||
deps: [
|
||||
[new Optional(), PROVIDED_AUTH_INSTANCES],
|
||||
FirebaseApp,
|
||||
]
|
||||
};
|
||||
class AuthModule {
|
||||
constructor() {
|
||||
registerVersion('angularfire', VERSION.full, 'auth');
|
||||
}
|
||||
}
|
||||
AuthModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AuthModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
||||
AuthModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AuthModule });
|
||||
AuthModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AuthModule, providers: [
|
||||
DEFAULT_AUTH_INSTANCE_PROVIDER,
|
||||
AUTH_INSTANCES_PROVIDER,
|
||||
] });
|
||||
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AuthModule, decorators: [{
|
||||
type: NgModule,
|
||||
args: [{
|
||||
providers: [
|
||||
DEFAULT_AUTH_INSTANCE_PROVIDER,
|
||||
AUTH_INSTANCES_PROVIDER,
|
||||
]
|
||||
}]
|
||||
}], ctorParameters: function () { return []; } });
|
||||
function provideAuth(fn, ...deps) {
|
||||
return {
|
||||
ngModule: AuthModule,
|
||||
providers: [{
|
||||
provide: PROVIDED_AUTH_INSTANCES,
|
||||
useFactory: authInstanceFactory(fn),
|
||||
multi: true,
|
||||
deps: [
|
||||
NgZone,
|
||||
Injector,
|
||||
ɵAngularFireSchedulers,
|
||||
FirebaseApps,
|
||||
[new Optional(), AppCheckInstances],
|
||||
...deps,
|
||||
]
|
||||
}]
|
||||
};
|
||||
}
|
||||
|
||||
// DO NOT MODIFY, this file is autogenerated by tools/build.ts
|
||||
const authState = ɵzoneWrap(authState$1, true);
|
||||
const user = ɵzoneWrap(user$1, true);
|
||||
const idToken = ɵzoneWrap(idToken$1, true);
|
||||
|
||||
// DO NOT MODIFY, this file is autogenerated by tools/build.ts
|
||||
const applyActionCode = ɵzoneWrap(applyActionCode$1, true);
|
||||
const beforeAuthStateChanged = ɵzoneWrap(beforeAuthStateChanged$1, true);
|
||||
const checkActionCode = ɵzoneWrap(checkActionCode$1, true);
|
||||
const confirmPasswordReset = ɵzoneWrap(confirmPasswordReset$1, true);
|
||||
const connectAuthEmulator = ɵzoneWrap(connectAuthEmulator$1, true);
|
||||
const createUserWithEmailAndPassword = ɵzoneWrap(createUserWithEmailAndPassword$1, true);
|
||||
const deleteUser = ɵzoneWrap(deleteUser$1, true);
|
||||
const fetchSignInMethodsForEmail = ɵzoneWrap(fetchSignInMethodsForEmail$1, true);
|
||||
const getAdditionalUserInfo = ɵzoneWrap(getAdditionalUserInfo$1, true);
|
||||
const getAuth = ɵzoneWrap(getAuth$1, true);
|
||||
const getIdToken = ɵzoneWrap(getIdToken$1, true);
|
||||
const getIdTokenResult = ɵzoneWrap(getIdTokenResult$1, true);
|
||||
const getMultiFactorResolver = ɵzoneWrap(getMultiFactorResolver$1, true);
|
||||
const getRedirectResult = ɵzoneWrap(getRedirectResult$1, true);
|
||||
const initializeAuth = ɵzoneWrap(initializeAuth$1, true);
|
||||
const isSignInWithEmailLink = ɵzoneWrap(isSignInWithEmailLink$1, true);
|
||||
const linkWithCredential = ɵzoneWrap(linkWithCredential$1, true);
|
||||
const linkWithPhoneNumber = ɵzoneWrap(linkWithPhoneNumber$1, true);
|
||||
const linkWithPopup = ɵzoneWrap(linkWithPopup$1, true);
|
||||
const linkWithRedirect = ɵzoneWrap(linkWithRedirect$1, true);
|
||||
const multiFactor = ɵzoneWrap(multiFactor$1, true);
|
||||
const onAuthStateChanged = ɵzoneWrap(onAuthStateChanged$1, true);
|
||||
const onIdTokenChanged = ɵzoneWrap(onIdTokenChanged$1, true);
|
||||
const parseActionCodeURL = ɵzoneWrap(parseActionCodeURL$1, true);
|
||||
const reauthenticateWithCredential = ɵzoneWrap(reauthenticateWithCredential$1, true);
|
||||
const reauthenticateWithPhoneNumber = ɵzoneWrap(reauthenticateWithPhoneNumber$1, true);
|
||||
const reauthenticateWithPopup = ɵzoneWrap(reauthenticateWithPopup$1, true);
|
||||
const reauthenticateWithRedirect = ɵzoneWrap(reauthenticateWithRedirect$1, true);
|
||||
const reload = ɵzoneWrap(reload$1, true);
|
||||
const sendEmailVerification = ɵzoneWrap(sendEmailVerification$1, true);
|
||||
const sendPasswordResetEmail = ɵzoneWrap(sendPasswordResetEmail$1, true);
|
||||
const sendSignInLinkToEmail = ɵzoneWrap(sendSignInLinkToEmail$1, true);
|
||||
const setPersistence = ɵzoneWrap(setPersistence$1, true);
|
||||
const signInAnonymously = ɵzoneWrap(signInAnonymously$1, true);
|
||||
const signInWithCredential = ɵzoneWrap(signInWithCredential$1, true);
|
||||
const signInWithCustomToken = ɵzoneWrap(signInWithCustomToken$1, true);
|
||||
const signInWithEmailAndPassword = ɵzoneWrap(signInWithEmailAndPassword$1, true);
|
||||
const signInWithEmailLink = ɵzoneWrap(signInWithEmailLink$1, true);
|
||||
const signInWithPhoneNumber = ɵzoneWrap(signInWithPhoneNumber$1, true);
|
||||
const signInWithPopup = ɵzoneWrap(signInWithPopup$1, true);
|
||||
const signInWithRedirect = ɵzoneWrap(signInWithRedirect$1, true);
|
||||
const signOut = ɵzoneWrap(signOut$1, true);
|
||||
const unlink = ɵzoneWrap(unlink$1, true);
|
||||
const updateCurrentUser = ɵzoneWrap(updateCurrentUser$1, true);
|
||||
const updateEmail = ɵzoneWrap(updateEmail$1, true);
|
||||
const updatePassword = ɵzoneWrap(updatePassword$1, true);
|
||||
const updatePhoneNumber = ɵzoneWrap(updatePhoneNumber$1, true);
|
||||
const updateProfile = ɵzoneWrap(updateProfile$1, true);
|
||||
const useDeviceLanguage = ɵzoneWrap(useDeviceLanguage$1, true);
|
||||
const verifyBeforeUpdateEmail = ɵzoneWrap(verifyBeforeUpdateEmail$1, true);
|
||||
const verifyPasswordResetCode = ɵzoneWrap(verifyPasswordResetCode$1, true);
|
||||
|
||||
/**
|
||||
* Generated bundle index. Do not edit.
|
||||
*/
|
||||
|
||||
export { Auth, AuthInstances, AuthModule, applyActionCode, authInstance$, authState, beforeAuthStateChanged, checkActionCode, confirmPasswordReset, connectAuthEmulator, createUserWithEmailAndPassword, deleteUser, fetchSignInMethodsForEmail, getAdditionalUserInfo, getAuth, getIdToken, getIdTokenResult, getMultiFactorResolver, getRedirectResult, idToken, initializeAuth, isSignInWithEmailLink, linkWithCredential, linkWithPhoneNumber, linkWithPopup, linkWithRedirect, multiFactor, onAuthStateChanged, onIdTokenChanged, parseActionCodeURL, provideAuth, reauthenticateWithCredential, reauthenticateWithPhoneNumber, reauthenticateWithPopup, reauthenticateWithRedirect, reload, sendEmailVerification, sendPasswordResetEmail, sendSignInLinkToEmail, setPersistence, signInAnonymously, signInWithCredential, signInWithCustomToken, signInWithEmailAndPassword, signInWithEmailLink, signInWithPhoneNumber, signInWithPopup, signInWithRedirect, signOut, unlink, updateCurrentUser, updateEmail, updatePassword, updatePhoneNumber, updateProfile, useDeviceLanguage, user, verifyBeforeUpdateEmail, verifyPasswordResetCode };
|
||||
//# sourceMappingURL=angular-fire-auth.js.map
|
||||
1
node_modules/@angular/fire/fesm2015/angular-fire-auth.js.map
generated
vendored
Normal file
1
node_modules/@angular/fire/fesm2015/angular-fire-auth.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
283
node_modules/@angular/fire/fesm2015/angular-fire-compat-analytics.js
generated
vendored
Normal file
283
node_modules/@angular/fire/fesm2015/angular-fire-compat-analytics.js
generated
vendored
Normal file
|
|
@ -0,0 +1,283 @@
|
|||
import { __awaiter } from 'tslib';
|
||||
import * as i0 from '@angular/core';
|
||||
import { InjectionToken, PLATFORM_ID, Injectable, Optional, Inject, NgModule } from '@angular/core';
|
||||
import { of, EMPTY } from 'rxjs';
|
||||
import { isPlatformBrowser, isPlatformServer } from '@angular/common';
|
||||
import { observeOn, switchMap, map, shareReplay } from 'rxjs/operators';
|
||||
import * as i2 from '@angular/fire';
|
||||
import { VERSION } from '@angular/fire';
|
||||
import * as i1 from '@angular/fire/compat';
|
||||
import { ɵcacheInstance, ɵlazySDKProxy, ɵapplyMixins } from '@angular/fire/compat';
|
||||
import { isSupported } from 'firebase/analytics';
|
||||
import * as i2$2 from '@angular/router';
|
||||
import * as i3 from '@angular/platform-browser';
|
||||
import * as i2$1 from '@angular/fire/compat/auth';
|
||||
import firebase from 'firebase/compat/app';
|
||||
import { ɵscreenViewEvent } from '@angular/fire/analytics';
|
||||
|
||||
// DO NOT MODIFY, this file is autogenerated by tools/build.ts
|
||||
// Export a null object with the same keys as firebase/compat/analytics, so Proxy can work with proxy-polyfill in Internet Explorer
|
||||
const proxyPolyfillCompat = {
|
||||
app: null,
|
||||
logEvent: null,
|
||||
setCurrentScreen: null,
|
||||
setUserId: null,
|
||||
setUserProperties: null,
|
||||
setAnalyticsCollectionEnabled: null,
|
||||
};
|
||||
|
||||
const COLLECTION_ENABLED = new InjectionToken('angularfire2.analytics.analyticsCollectionEnabled');
|
||||
const APP_VERSION = new InjectionToken('angularfire2.analytics.appVersion');
|
||||
const APP_NAME = new InjectionToken('angularfire2.analytics.appName');
|
||||
const DEBUG_MODE = new InjectionToken('angularfire2.analytics.debugMode');
|
||||
const CONFIG = new InjectionToken('angularfire2.analytics.config');
|
||||
const APP_NAME_KEY = 'app_name';
|
||||
const APP_VERSION_KEY = 'app_version';
|
||||
const DEBUG_MODE_KEY = 'debug_mode';
|
||||
const GTAG_CONFIG_COMMAND = 'config';
|
||||
const GTAG_FUNCTION_NAME = 'gtag'; // TODO rename these
|
||||
const DATA_LAYER_NAME = 'dataLayer';
|
||||
const SEND_TO_KEY = 'send_to';
|
||||
class AngularFireAnalytics {
|
||||
constructor(app, analyticsCollectionEnabled, providedAppVersion, providedAppName, debugModeEnabled, providedConfig,
|
||||
// tslint:disable-next-line:ban-types
|
||||
platformId, zone, schedulers) {
|
||||
this.analyticsInitialized = new Promise(() => { });
|
||||
if (isPlatformBrowser(platformId)) {
|
||||
window[DATA_LAYER_NAME] = window[DATA_LAYER_NAME] || [];
|
||||
// It turns out we can't rely on the measurementId in the Firebase config JSON
|
||||
// this identifier is not stable. firebase/analytics does a call to get a fresh value
|
||||
// falling back on the one in the config. Rather than do that ourselves we should listen
|
||||
// on our gtag function for a analytics config command
|
||||
// e.g, ['config', measurementId, { origin: 'firebase', firebase_id }]
|
||||
const parseMeasurementId = (...args) => {
|
||||
if (args[0] === 'config' && args[2].origin === 'firebase') {
|
||||
this.measurementId = args[1];
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
const patchGtag = (fn) => {
|
||||
window[GTAG_FUNCTION_NAME] = (...args) => {
|
||||
if (fn) {
|
||||
fn(...args);
|
||||
}
|
||||
// Inject app_name and app_version into events
|
||||
// TODO(jamesdaniels): I'm doing this as documented but it's still not
|
||||
// showing up in the console. Investigate. Guessing it's just part of the
|
||||
// whole GA4 transition mess.
|
||||
if (args[0] === 'event' && args[2][SEND_TO_KEY] === this.measurementId) {
|
||||
if (providedAppName) {
|
||||
args[2][APP_NAME_KEY] = providedAppName;
|
||||
}
|
||||
if (providedAppVersion) {
|
||||
args[2][APP_VERSION_KEY] = providedAppVersion;
|
||||
}
|
||||
}
|
||||
if (debugModeEnabled && typeof console !== 'undefined') {
|
||||
// tslint:disable-next-line:no-console
|
||||
console.info(...args);
|
||||
}
|
||||
/**
|
||||
* According to the gtag documentation, this function that defines a custom data layer cannot be
|
||||
* an arrow function because 'arguments' is not an array. It is actually an object that behaves
|
||||
* like an array and contains more information then just indexes. Transforming this into arrow function
|
||||
* caused issue #2505 where analytics no longer sent any data.
|
||||
*/
|
||||
// tslint:disable-next-line: only-arrow-functions
|
||||
(function (..._args) {
|
||||
window[DATA_LAYER_NAME].push(arguments);
|
||||
})(...args);
|
||||
};
|
||||
};
|
||||
// Unclear if we still need to but I was running into config/events I passed
|
||||
// to gtag before ['js' timestamp] weren't getting parsed, so let's make a promise
|
||||
// that resolves when firebase/analytics has configured gtag.js that we wait on
|
||||
// before sending anything
|
||||
const firebaseAnalyticsAlreadyInitialized = window[DATA_LAYER_NAME].some(parseMeasurementId);
|
||||
if (firebaseAnalyticsAlreadyInitialized) {
|
||||
this.analyticsInitialized = Promise.resolve();
|
||||
patchGtag();
|
||||
}
|
||||
else {
|
||||
this.analyticsInitialized = new Promise(resolve => {
|
||||
patchGtag((...args) => {
|
||||
if (parseMeasurementId(...args)) {
|
||||
resolve();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
if (providedConfig) {
|
||||
this.updateConfig(providedConfig);
|
||||
}
|
||||
if (debugModeEnabled) {
|
||||
this.updateConfig({ [DEBUG_MODE_KEY]: 1 });
|
||||
}
|
||||
}
|
||||
else {
|
||||
this.analyticsInitialized = Promise.resolve();
|
||||
}
|
||||
const analytics = of(undefined).pipe(observeOn(schedulers.outsideAngular), switchMap(isSupported), switchMap(supported => supported ? zone.runOutsideAngular(() => import('firebase/compat/analytics')) : EMPTY), map(() => {
|
||||
return ɵcacheInstance(`analytics`, 'AngularFireAnalytics', app.name, () => {
|
||||
const analytics = app.analytics();
|
||||
if (analyticsCollectionEnabled === false) {
|
||||
analytics.setAnalyticsCollectionEnabled(false);
|
||||
}
|
||||
return analytics;
|
||||
}, [app, analyticsCollectionEnabled, providedConfig, debugModeEnabled]);
|
||||
}), shareReplay({ bufferSize: 1, refCount: false }));
|
||||
return ɵlazySDKProxy(this, analytics, zone);
|
||||
}
|
||||
updateConfig(config) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
yield this.analyticsInitialized;
|
||||
window[GTAG_FUNCTION_NAME](GTAG_CONFIG_COMMAND, this.measurementId, Object.assign(Object.assign({}, config), { update: true }));
|
||||
});
|
||||
}
|
||||
}
|
||||
AngularFireAnalytics.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireAnalytics, deps: [{ token: i1.FirebaseApp }, { token: COLLECTION_ENABLED, optional: true }, { token: APP_VERSION, optional: true }, { token: APP_NAME, optional: true }, { token: DEBUG_MODE, optional: true }, { token: CONFIG, optional: true }, { token: PLATFORM_ID }, { token: i0.NgZone }, { token: i2.ɵAngularFireSchedulers }], target: i0.ɵɵFactoryTarget.Injectable });
|
||||
AngularFireAnalytics.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireAnalytics, providedIn: 'any' });
|
||||
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireAnalytics, decorators: [{
|
||||
type: Injectable,
|
||||
args: [{
|
||||
providedIn: 'any'
|
||||
}]
|
||||
}], ctorParameters: function () { return [{ type: i1.FirebaseApp }, { type: undefined, decorators: [{
|
||||
type: Optional
|
||||
}, {
|
||||
type: Inject,
|
||||
args: [COLLECTION_ENABLED]
|
||||
}] }, { type: undefined, decorators: [{
|
||||
type: Optional
|
||||
}, {
|
||||
type: Inject,
|
||||
args: [APP_VERSION]
|
||||
}] }, { type: undefined, decorators: [{
|
||||
type: Optional
|
||||
}, {
|
||||
type: Inject,
|
||||
args: [APP_NAME]
|
||||
}] }, { type: undefined, decorators: [{
|
||||
type: Optional
|
||||
}, {
|
||||
type: Inject,
|
||||
args: [DEBUG_MODE]
|
||||
}] }, { type: undefined, decorators: [{
|
||||
type: Optional
|
||||
}, {
|
||||
type: Inject,
|
||||
args: [CONFIG]
|
||||
}] }, { type: Object, decorators: [{
|
||||
type: Inject,
|
||||
args: [PLATFORM_ID]
|
||||
}] }, { type: i0.NgZone }, { type: i2.ɵAngularFireSchedulers }]; } });
|
||||
ɵapplyMixins(AngularFireAnalytics, [proxyPolyfillCompat]);
|
||||
|
||||
class UserTrackingService {
|
||||
// TODO a user properties injector
|
||||
constructor(analytics,
|
||||
// tslint:disable-next-line:ban-types
|
||||
platformId, auth, zone) {
|
||||
this.disposables = [];
|
||||
firebase.registerVersion('angularfire', VERSION.full, 'compat-user-tracking');
|
||||
if (!isPlatformServer(platformId)) {
|
||||
let resolveInitialized;
|
||||
this.initialized = zone.runOutsideAngular(() => new Promise(resolve => resolveInitialized = resolve));
|
||||
this.disposables = [
|
||||
auth.authState.subscribe(user => {
|
||||
analytics.setUserId(user === null || user === void 0 ? void 0 : user.uid);
|
||||
resolveInitialized();
|
||||
}),
|
||||
auth.credential.subscribe(credential => {
|
||||
if (credential) {
|
||||
const method = credential.user.isAnonymous ? 'anonymous' : credential.additionalUserInfo.providerId;
|
||||
if (credential.additionalUserInfo.isNewUser) {
|
||||
analytics.logEvent('sign_up', { method });
|
||||
}
|
||||
analytics.logEvent('login', { method });
|
||||
}
|
||||
})
|
||||
];
|
||||
}
|
||||
else {
|
||||
this.initialized = Promise.resolve();
|
||||
}
|
||||
}
|
||||
ngOnDestroy() {
|
||||
this.disposables.forEach(it => it.unsubscribe());
|
||||
}
|
||||
}
|
||||
UserTrackingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: UserTrackingService, deps: [{ token: AngularFireAnalytics }, { token: PLATFORM_ID }, { token: i2$1.AngularFireAuth }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
|
||||
UserTrackingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: UserTrackingService });
|
||||
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: UserTrackingService, decorators: [{
|
||||
type: Injectable
|
||||
}], ctorParameters: function () { return [{ type: AngularFireAnalytics }, { type: Object, decorators: [{
|
||||
type: Inject,
|
||||
args: [PLATFORM_ID]
|
||||
}] }, { type: i2$1.AngularFireAuth }, { type: i0.NgZone }]; } });
|
||||
|
||||
const SCREEN_VIEW_EVENT = 'screen_view';
|
||||
class ScreenTrackingService {
|
||||
constructor(analytics, router, title, componentFactoryResolver, zone, userTrackingService) {
|
||||
firebase.registerVersion('angularfire', VERSION.full, 'compat-screen-tracking');
|
||||
if (!router || !analytics) {
|
||||
return this;
|
||||
}
|
||||
zone.runOutsideAngular(() => {
|
||||
this.disposable = ɵscreenViewEvent(router, title, componentFactoryResolver).pipe(switchMap((params) => __awaiter(this, void 0, void 0, function* () {
|
||||
if (userTrackingService) {
|
||||
yield userTrackingService.initialized;
|
||||
}
|
||||
return yield analytics.logEvent(SCREEN_VIEW_EVENT, params);
|
||||
}))).subscribe();
|
||||
});
|
||||
}
|
||||
ngOnDestroy() {
|
||||
if (this.disposable) {
|
||||
this.disposable.unsubscribe();
|
||||
}
|
||||
}
|
||||
}
|
||||
ScreenTrackingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: ScreenTrackingService, deps: [{ token: AngularFireAnalytics }, { token: i2$2.Router, optional: true }, { token: i3.Title, optional: true }, { token: i0.ComponentFactoryResolver }, { token: i0.NgZone }, { token: UserTrackingService, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
||||
ScreenTrackingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: ScreenTrackingService });
|
||||
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: ScreenTrackingService, decorators: [{
|
||||
type: Injectable
|
||||
}], ctorParameters: function () { return [{ type: AngularFireAnalytics }, { type: i2$2.Router, decorators: [{
|
||||
type: Optional
|
||||
}] }, { type: i3.Title, decorators: [{
|
||||
type: Optional
|
||||
}] }, { type: i0.ComponentFactoryResolver }, { type: i0.NgZone }, { type: UserTrackingService, decorators: [{
|
||||
type: Optional
|
||||
}] }]; } });
|
||||
|
||||
class AngularFireAnalyticsModule {
|
||||
constructor(analytics, screenTracking, userTracking) {
|
||||
firebase.registerVersion('angularfire', VERSION.full, 'analytics-compat');
|
||||
// calling anything on analytics will eagerly load the SDK
|
||||
// tslint:disable-next-line:no-unused-expression
|
||||
analytics.app.then(() => { });
|
||||
}
|
||||
}
|
||||
AngularFireAnalyticsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireAnalyticsModule, deps: [{ token: AngularFireAnalytics }, { token: ScreenTrackingService, optional: true }, { token: UserTrackingService, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });
|
||||
AngularFireAnalyticsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireAnalyticsModule });
|
||||
AngularFireAnalyticsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireAnalyticsModule, providers: [AngularFireAnalytics] });
|
||||
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireAnalyticsModule, decorators: [{
|
||||
type: NgModule,
|
||||
args: [{
|
||||
providers: [AngularFireAnalytics]
|
||||
}]
|
||||
}], ctorParameters: function () { return [{ type: AngularFireAnalytics }, { type: ScreenTrackingService, decorators: [{
|
||||
type: Optional
|
||||
}] }, { type: UserTrackingService, decorators: [{
|
||||
type: Optional
|
||||
}] }]; } });
|
||||
|
||||
/**
|
||||
* Generated bundle index. Do not edit.
|
||||
*/
|
||||
|
||||
export { APP_NAME, APP_VERSION, AngularFireAnalytics, AngularFireAnalyticsModule, COLLECTION_ENABLED, CONFIG, DEBUG_MODE, ScreenTrackingService, UserTrackingService };
|
||||
//# sourceMappingURL=angular-fire-compat-analytics.js.map
|
||||
1
node_modules/@angular/fire/fesm2015/angular-fire-compat-analytics.js.map
generated
vendored
Normal file
1
node_modules/@angular/fire/fesm2015/angular-fire-compat-analytics.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
71
node_modules/@angular/fire/fesm2015/angular-fire-compat-auth-guard.js
generated
vendored
Normal file
71
node_modules/@angular/fire/fesm2015/angular-fire-compat-auth-guard.js
generated
vendored
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
import * as i0 from '@angular/core';
|
||||
import { Injectable, NgModule } from '@angular/core';
|
||||
import * as i1 from '@angular/router';
|
||||
import { of, pipe } from 'rxjs';
|
||||
import { map, take, switchMap } from 'rxjs/operators';
|
||||
import * as i2 from '@angular/fire/compat/auth';
|
||||
import firebase from 'firebase/compat/app';
|
||||
import { VERSION } from '@angular/fire';
|
||||
|
||||
const loggedIn = map(user => !!user);
|
||||
class AngularFireAuthGuard {
|
||||
constructor(router, auth) {
|
||||
this.router = router;
|
||||
this.auth = auth;
|
||||
this.canActivate = (next, state) => {
|
||||
const authPipeFactory = next.data.authGuardPipe || (() => loggedIn);
|
||||
return this.auth.user.pipe(take(1), authPipeFactory(next, state), map(can => {
|
||||
if (typeof can === 'boolean') {
|
||||
return can;
|
||||
}
|
||||
else if (Array.isArray(can)) {
|
||||
return this.router.createUrlTree(can);
|
||||
}
|
||||
else {
|
||||
// TODO(EdricChan03): Add tests
|
||||
return this.router.parseUrl(can);
|
||||
}
|
||||
}));
|
||||
};
|
||||
}
|
||||
}
|
||||
AngularFireAuthGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireAuthGuard, deps: [{ token: i1.Router }, { token: i2.AngularFireAuth }], target: i0.ɵɵFactoryTarget.Injectable });
|
||||
AngularFireAuthGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireAuthGuard, providedIn: 'any' });
|
||||
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireAuthGuard, decorators: [{
|
||||
type: Injectable,
|
||||
args: [{
|
||||
providedIn: 'any'
|
||||
}]
|
||||
}], ctorParameters: function () { return [{ type: i1.Router }, { type: i2.AngularFireAuth }]; } });
|
||||
const canActivate = (pipe) => ({
|
||||
canActivate: [AngularFireAuthGuard], data: { authGuardPipe: pipe }
|
||||
});
|
||||
const isNotAnonymous = map(user => !!user && !user.isAnonymous);
|
||||
const idTokenResult = switchMap((user) => user ? user.getIdTokenResult() : of(null));
|
||||
const emailVerified = map(user => !!user && user.emailVerified);
|
||||
const customClaims = pipe(idTokenResult, map(idTokenResult => idTokenResult ? idTokenResult.claims : []));
|
||||
const hasCustomClaim = (claim) => pipe(customClaims, map(claims => claims.hasOwnProperty(claim)));
|
||||
const redirectUnauthorizedTo = (redirect) => pipe(loggedIn, map(loggedIn => loggedIn || redirect));
|
||||
const redirectLoggedInTo = (redirect) => pipe(loggedIn, map(loggedIn => loggedIn && redirect || true));
|
||||
|
||||
class AngularFireAuthGuardModule {
|
||||
constructor() {
|
||||
firebase.registerVersion('angularfire', VERSION.full, 'auth-guard-compat');
|
||||
}
|
||||
}
|
||||
AngularFireAuthGuardModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireAuthGuardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
||||
AngularFireAuthGuardModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireAuthGuardModule });
|
||||
AngularFireAuthGuardModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireAuthGuardModule, providers: [AngularFireAuthGuard] });
|
||||
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireAuthGuardModule, decorators: [{
|
||||
type: NgModule,
|
||||
args: [{
|
||||
providers: [AngularFireAuthGuard]
|
||||
}]
|
||||
}], ctorParameters: function () { return []; } });
|
||||
|
||||
/**
|
||||
* Generated bundle index. Do not edit.
|
||||
*/
|
||||
|
||||
export { AngularFireAuthGuard, AngularFireAuthGuardModule, canActivate, customClaims, emailVerified, hasCustomClaim, idTokenResult, isNotAnonymous, loggedIn, redirectLoggedInTo, redirectUnauthorizedTo };
|
||||
//# sourceMappingURL=angular-fire-compat-auth-guard.js.map
|
||||
1
node_modules/@angular/fire/fesm2015/angular-fire-compat-auth-guard.js.map
generated
vendored
Normal file
1
node_modules/@angular/fire/fesm2015/angular-fire-compat-auth-guard.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"angular-fire-compat-auth-guard.js","sources":["../../../src/compat/auth-guard/auth-guard.ts","../../../src/compat/auth-guard/auth-guard.module.ts","../../../src/compat/auth-guard/angular-fire-compat-auth-guard.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot } from '@angular/router';\nimport { Observable, of, pipe, UnaryFunction } from 'rxjs';\nimport { map, switchMap, take } from 'rxjs/operators';\nimport firebase from 'firebase/compat/app';\nimport { AngularFireAuth } from '@angular/fire/compat/auth';\n\nexport type AuthPipeGenerator = (next: ActivatedRouteSnapshot, state: RouterStateSnapshot) => AuthPipe;\nexport type AuthPipe = UnaryFunction<Observable<firebase.User|null>, Observable<boolean|string|any[]>>;\n\nexport const loggedIn: AuthPipe = map(user => !!user);\n\n@Injectable({\n providedIn: 'any'\n})\nexport class AngularFireAuthGuard implements CanActivate {\n\n constructor(private router: Router, private auth: AngularFireAuth) {}\n\n canActivate = (next: ActivatedRouteSnapshot, state: RouterStateSnapshot) => {\n const authPipeFactory = next.data.authGuardPipe as AuthPipeGenerator || (() => loggedIn);\n return this.auth.user.pipe(\n take(1),\n authPipeFactory(next, state),\n map(can => {\n if (typeof can === 'boolean') {\n return can;\n } else if (Array.isArray(can)) {\n return this.router.createUrlTree(can);\n } else {\n // TODO(EdricChan03): Add tests\n return this.router.parseUrl(can);\n }\n })\n );\n }\n\n}\n\nexport const canActivate = (pipe: AuthPipeGenerator) => ({\n canActivate: [ AngularFireAuthGuard ], data: { authGuardPipe: pipe }\n});\n\n\nexport const isNotAnonymous: AuthPipe = map(user => !!user && !user.isAnonymous);\nexport const idTokenResult = switchMap((user: firebase.User|null) => user ? user.getIdTokenResult() : of(null));\nexport const emailVerified: AuthPipe = map(user => !!user && user.emailVerified);\nexport const customClaims = pipe(idTokenResult, map(idTokenResult => idTokenResult ? idTokenResult.claims : []));\nexport const hasCustomClaim: (claim: string) => AuthPipe =\n (claim) => pipe(customClaims, map(claims => claims.hasOwnProperty(claim)));\nexport const redirectUnauthorizedTo: (redirect: string|any[]) => AuthPipe =\n (redirect) => pipe(loggedIn, map(loggedIn => loggedIn || redirect));\nexport const redirectLoggedInTo: (redirect: string|any[]) => AuthPipe =\n (redirect) => pipe(loggedIn, map(loggedIn => loggedIn && redirect || true));\n","import { NgModule } from '@angular/core';\nimport { AngularFireAuthGuard } from './auth-guard';\nimport firebase from 'firebase/compat/app';\nimport { VERSION } from '@angular/fire';\n\n@NgModule({\n providers: [ AngularFireAuthGuard ]\n})\nexport class AngularFireAuthGuardModule {\n constructor() {\n firebase.registerVersion('angularfire', VERSION.full, 'auth-guard-compat');\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;MAUa,QAAQ,GAAa,GAAG,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,EAAE;MAKzC,oBAAoB;IAE/B,YAAoB,MAAc,EAAU,IAAqB;QAA7C,WAAM,GAAN,MAAM,CAAQ;QAAU,SAAI,GAAJ,IAAI,CAAiB;QAEjE,gBAAW,GAAG,CAAC,IAA4B,EAAE,KAA0B;YACrE,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,aAAkC,KAAK,MAAM,QAAQ,CAAC,CAAC;YACzF,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CACxB,IAAI,CAAC,CAAC,CAAC,EACP,eAAe,CAAC,IAAI,EAAE,KAAK,CAAC,EAC5B,GAAG,CAAC,GAAG;gBACL,IAAI,OAAO,GAAG,KAAK,SAAS,EAAE;oBAC5B,OAAO,GAAG,CAAC;iBACZ;qBAAM,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;oBAC7B,OAAO,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;iBACvC;qBAAM;;oBAEL,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;iBAClC;aACF,CAAC,CACH,CAAC;SACH,CAAA;KAlBoE;;iHAF1D,oBAAoB;qHAApB,oBAAoB,cAFnB,KAAK;2FAEN,oBAAoB;kBAHhC,UAAU;mBAAC;oBACV,UAAU,EAAE,KAAK;iBAClB;;MAyBY,WAAW,GAAG,CAAC,IAAuB,MAAM;IACvD,WAAW,EAAE,CAAE,oBAAoB,CAAE,EAAE,IAAI,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE;CACrE,EAAE;MAGU,cAAc,GAAa,GAAG,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;MACpE,aAAa,GAAG,SAAS,CAAC,CAAC,IAAwB,KAAK,IAAI,GAAG,IAAI,CAAC,gBAAgB,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE;MACnG,aAAa,GAAa,GAAG,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,aAAa,EAAE;MACpE,YAAY,GAAG,IAAI,CAAC,aAAa,EAAE,GAAG,CAAC,aAAa,IAAI,aAAa,GAAG,aAAa,CAAC,MAAM,GAAG,EAAE,CAAC,EAAE;MACpG,cAAc,GACzB,CAAC,KAAK,KAAK,IAAI,CAAC,YAAY,EAAE,GAAG,CAAC,MAAM,IAAK,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,EAAE;MACjE,sBAAsB,GACjC,CAAC,QAAQ,KAAK,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,QAAQ,IAAI,QAAQ,IAAI,QAAQ,CAAC,EAAE;MACzD,kBAAkB,GAC7B,CAAC,QAAQ,KAAK,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,QAAQ,IAAI,QAAQ,IAAI,QAAQ,IAAI,IAAI,CAAC;;MC7C/D,0BAA0B;IACrC;QACE,QAAQ,CAAC,eAAe,CAAC,aAAa,EAAE,OAAO,CAAC,IAAI,EAAE,mBAAmB,CAAC,CAAC;KAC5E;;uHAHU,0BAA0B;wHAA1B,0BAA0B;wHAA1B,0BAA0B,aAF1B,CAAE,oBAAoB,CAAE;2FAExB,0BAA0B;kBAHtC,QAAQ;mBAAC;oBACR,SAAS,EAAE,CAAE,oBAAoB,CAAE;iBACpC;;;ACPD;;;;;;"}
|
||||
199
node_modules/@angular/fire/fesm2015/angular-fire-compat-auth.js
generated
vendored
Normal file
199
node_modules/@angular/fire/fesm2015/angular-fire-compat-auth.js
generated
vendored
Normal file
|
|
@ -0,0 +1,199 @@
|
|||
|
||||
import * as i0 from '@angular/core';
|
||||
import { InjectionToken, PLATFORM_ID, Injectable, Inject, Optional, NgModule } from '@angular/core';
|
||||
import { Subject, of, Observable, from, merge } from 'rxjs';
|
||||
import { observeOn, switchMap, map, shareReplay, first, switchMapTo, subscribeOn, filter } from 'rxjs/operators';
|
||||
import * as i1 from '@angular/fire';
|
||||
import { keepUnstableUntilFirst, VERSION } from '@angular/fire';
|
||||
import { ɵcacheInstance, ɵfirebaseAppFactory, ɵlazySDKProxy, FIREBASE_OPTIONS, FIREBASE_APP_NAME, ɵapplyMixins } from '@angular/fire/compat';
|
||||
import { isPlatformServer } from '@angular/common';
|
||||
import * as i2 from '@angular/fire/app-check';
|
||||
import firebase from 'firebase/compat/app';
|
||||
|
||||
// DO NOT MODIFY, this file is autogenerated by tools/build.ts
|
||||
// Export a null object with the same keys as firebase/compat/auth, so Proxy can work with proxy-polyfill in Internet Explorer
|
||||
const proxyPolyfillCompat = {
|
||||
name: null,
|
||||
config: null,
|
||||
emulatorConfig: null,
|
||||
app: null,
|
||||
applyActionCode: null,
|
||||
checkActionCode: null,
|
||||
confirmPasswordReset: null,
|
||||
createUserWithEmailAndPassword: null,
|
||||
currentUser: null,
|
||||
fetchSignInMethodsForEmail: null,
|
||||
isSignInWithEmailLink: null,
|
||||
getRedirectResult: null,
|
||||
languageCode: null,
|
||||
settings: null,
|
||||
onAuthStateChanged: null,
|
||||
onIdTokenChanged: null,
|
||||
sendSignInLinkToEmail: null,
|
||||
sendPasswordResetEmail: null,
|
||||
setPersistence: null,
|
||||
signInAndRetrieveDataWithCredential: null,
|
||||
signInAnonymously: null,
|
||||
signInWithCredential: null,
|
||||
signInWithCustomToken: null,
|
||||
signInWithEmailAndPassword: null,
|
||||
signInWithPhoneNumber: null,
|
||||
signInWithEmailLink: null,
|
||||
signInWithPopup: null,
|
||||
signInWithRedirect: null,
|
||||
signOut: null,
|
||||
tenantId: null,
|
||||
updateCurrentUser: null,
|
||||
useDeviceLanguage: null,
|
||||
useEmulator: null,
|
||||
verifyPasswordResetCode: null,
|
||||
};
|
||||
|
||||
const USE_EMULATOR = new InjectionToken('angularfire2.auth.use-emulator');
|
||||
const SETTINGS = new InjectionToken('angularfire2.auth.settings');
|
||||
const TENANT_ID = new InjectionToken('angularfire2.auth.tenant-id');
|
||||
const LANGUAGE_CODE = new InjectionToken('angularfire2.auth.langugage-code');
|
||||
const USE_DEVICE_LANGUAGE = new InjectionToken('angularfire2.auth.use-device-language');
|
||||
const PERSISTENCE = new InjectionToken('angularfire.auth.persistence');
|
||||
const ɵauthFactory = (app, zone, useEmulator, tenantId, languageCode, useDeviceLanguage, settings, persistence) => ɵcacheInstance(`${app.name}.auth`, 'AngularFireAuth', app.name, () => {
|
||||
const auth = zone.runOutsideAngular(() => app.auth());
|
||||
if (useEmulator) {
|
||||
auth.useEmulator(...useEmulator);
|
||||
}
|
||||
if (tenantId) {
|
||||
auth.tenantId = tenantId;
|
||||
}
|
||||
auth.languageCode = languageCode;
|
||||
if (useDeviceLanguage) {
|
||||
auth.useDeviceLanguage();
|
||||
}
|
||||
if (settings) {
|
||||
for (const [k, v] of Object.entries(settings)) {
|
||||
auth.settings[k] = v;
|
||||
}
|
||||
}
|
||||
if (persistence) {
|
||||
auth.setPersistence(persistence);
|
||||
}
|
||||
return auth;
|
||||
}, [useEmulator, tenantId, languageCode, useDeviceLanguage, settings, persistence]);
|
||||
class AngularFireAuth {
|
||||
constructor(options, name,
|
||||
// tslint:disable-next-line:ban-types
|
||||
platformId, zone, schedulers, useEmulator, // can't use the tuple here
|
||||
settings, // can't use firebase.auth.AuthSettings here
|
||||
tenantId, languageCode, useDeviceLanguage, persistence, _appCheckInstances) {
|
||||
const logins = new Subject();
|
||||
const auth = of(undefined).pipe(observeOn(schedulers.outsideAngular), switchMap(() => zone.runOutsideAngular(() => import('firebase/compat/auth'))), map(() => ɵfirebaseAppFactory(options, zone, name)), map(app => ɵauthFactory(app, zone, useEmulator, tenantId, languageCode, useDeviceLanguage, settings, persistence)), shareReplay({ bufferSize: 1, refCount: false }));
|
||||
if (isPlatformServer(platformId)) {
|
||||
this.authState = this.user = this.idToken = this.idTokenResult = this.credential = of(null);
|
||||
}
|
||||
else {
|
||||
// HACK, as we're exporting auth.Auth, rather than auth, developers importing firebase.auth
|
||||
// (e.g, `import { auth } from 'firebase/compat/app'`) are getting an undefined auth object unexpectedly
|
||||
// as we're completely lazy. Let's eagerly load the Auth SDK here.
|
||||
// There could potentially be race conditions still... but this greatly decreases the odds while
|
||||
// we reevaluate the API.
|
||||
const _ = auth.pipe(first()).subscribe();
|
||||
const redirectResult = auth.pipe(switchMap(auth => auth.getRedirectResult().then(it => it, () => null)), keepUnstableUntilFirst, shareReplay({ bufferSize: 1, refCount: false }));
|
||||
const authStateChanged = auth.pipe(switchMap(auth => new Observable(sub => ({ unsubscribe: zone.runOutsideAngular(() => auth.onAuthStateChanged(next => sub.next(next), err => sub.error(err), () => sub.complete())) }))));
|
||||
const idTokenChanged = auth.pipe(switchMap(auth => new Observable(sub => ({ unsubscribe: zone.runOutsideAngular(() => auth.onIdTokenChanged(next => sub.next(next), err => sub.error(err), () => sub.complete())) }))));
|
||||
this.authState = redirectResult.pipe(switchMapTo(authStateChanged), subscribeOn(schedulers.outsideAngular), observeOn(schedulers.insideAngular));
|
||||
this.user = redirectResult.pipe(switchMapTo(idTokenChanged), subscribeOn(schedulers.outsideAngular), observeOn(schedulers.insideAngular));
|
||||
this.idToken = this.user.pipe(switchMap(user => user ? from(user.getIdToken()) : of(null)));
|
||||
this.idTokenResult = this.user.pipe(switchMap(user => user ? from(user.getIdTokenResult()) : of(null)));
|
||||
this.credential = merge(redirectResult, logins,
|
||||
// pipe in null authState to make credential zipable, just a weird devexp if
|
||||
// authState and user go null to still have a credential
|
||||
this.authState.pipe(filter(it => !it))).pipe(
|
||||
// handle the { user: { } } when a user is already logged in, rather have null
|
||||
// TODO handle the type corcersion better
|
||||
map(credential => (credential === null || credential === void 0 ? void 0 : credential.user) ? credential : null), subscribeOn(schedulers.outsideAngular), observeOn(schedulers.insideAngular));
|
||||
}
|
||||
return ɵlazySDKProxy(this, auth, zone, { spy: {
|
||||
apply: (name, _, val) => {
|
||||
// If they call a signIn or createUser function listen into the promise
|
||||
// this will give us the user credential, push onto the logins Subject
|
||||
// to be consumed in .credential
|
||||
if (name.startsWith('signIn') || name.startsWith('createUser')) {
|
||||
// TODO fix the types, the trouble is UserCredential has everything optional
|
||||
val.then((user) => logins.next(user));
|
||||
}
|
||||
}
|
||||
} });
|
||||
}
|
||||
}
|
||||
AngularFireAuth.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireAuth, deps: [{ token: FIREBASE_OPTIONS }, { token: FIREBASE_APP_NAME, optional: true }, { token: PLATFORM_ID }, { token: i0.NgZone }, { token: i1.ɵAngularFireSchedulers }, { token: USE_EMULATOR, optional: true }, { token: SETTINGS, optional: true }, { token: TENANT_ID, optional: true }, { token: LANGUAGE_CODE, optional: true }, { token: USE_DEVICE_LANGUAGE, optional: true }, { token: PERSISTENCE, optional: true }, { token: i2.AppCheckInstances, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
||||
AngularFireAuth.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireAuth, providedIn: 'any' });
|
||||
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireAuth, decorators: [{
|
||||
type: Injectable,
|
||||
args: [{
|
||||
providedIn: 'any'
|
||||
}]
|
||||
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
||||
type: Inject,
|
||||
args: [FIREBASE_OPTIONS]
|
||||
}] }, { type: undefined, decorators: [{
|
||||
type: Optional
|
||||
}, {
|
||||
type: Inject,
|
||||
args: [FIREBASE_APP_NAME]
|
||||
}] }, { type: Object, decorators: [{
|
||||
type: Inject,
|
||||
args: [PLATFORM_ID]
|
||||
}] }, { type: i0.NgZone }, { type: i1.ɵAngularFireSchedulers }, { type: undefined, decorators: [{
|
||||
type: Optional
|
||||
}, {
|
||||
type: Inject,
|
||||
args: [USE_EMULATOR]
|
||||
}] }, { type: undefined, decorators: [{
|
||||
type: Optional
|
||||
}, {
|
||||
type: Inject,
|
||||
args: [SETTINGS]
|
||||
}] }, { type: undefined, decorators: [{
|
||||
type: Optional
|
||||
}, {
|
||||
type: Inject,
|
||||
args: [TENANT_ID]
|
||||
}] }, { type: undefined, decorators: [{
|
||||
type: Optional
|
||||
}, {
|
||||
type: Inject,
|
||||
args: [LANGUAGE_CODE]
|
||||
}] }, { type: undefined, decorators: [{
|
||||
type: Optional
|
||||
}, {
|
||||
type: Inject,
|
||||
args: [USE_DEVICE_LANGUAGE]
|
||||
}] }, { type: undefined, decorators: [{
|
||||
type: Optional
|
||||
}, {
|
||||
type: Inject,
|
||||
args: [PERSISTENCE]
|
||||
}] }, { type: i2.AppCheckInstances, decorators: [{
|
||||
type: Optional
|
||||
}] }]; } });
|
||||
ɵapplyMixins(AngularFireAuth, [proxyPolyfillCompat]);
|
||||
|
||||
class AngularFireAuthModule {
|
||||
constructor() {
|
||||
firebase.registerVersion('angularfire', VERSION.full, 'auth-compat');
|
||||
}
|
||||
}
|
||||
AngularFireAuthModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireAuthModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
||||
AngularFireAuthModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireAuthModule });
|
||||
AngularFireAuthModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireAuthModule, providers: [AngularFireAuth] });
|
||||
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireAuthModule, decorators: [{
|
||||
type: NgModule,
|
||||
args: [{
|
||||
providers: [AngularFireAuth]
|
||||
}]
|
||||
}], ctorParameters: function () { return []; } });
|
||||
|
||||
/**
|
||||
* Generated bundle index. Do not edit.
|
||||
*/
|
||||
|
||||
export { AngularFireAuth, AngularFireAuthModule, LANGUAGE_CODE, PERSISTENCE, SETTINGS, TENANT_ID, USE_DEVICE_LANGUAGE, USE_EMULATOR, ɵauthFactory };
|
||||
//# sourceMappingURL=angular-fire-compat-auth.js.map
|
||||
1
node_modules/@angular/fire/fesm2015/angular-fire-compat-auth.js.map
generated
vendored
Normal file
1
node_modules/@angular/fire/fesm2015/angular-fire-compat-auth.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
443
node_modules/@angular/fire/fesm2015/angular-fire-compat-database.js
generated
vendored
Normal file
443
node_modules/@angular/fire/fesm2015/angular-fire-compat-database.js
generated
vendored
Normal file
|
|
@ -0,0 +1,443 @@
|
|||
import * as i0 from '@angular/core';
|
||||
import { InjectionToken, PLATFORM_ID, Injectable, Inject, Optional, NgModule } from '@angular/core';
|
||||
import { asyncScheduler, Observable, of, merge } from 'rxjs';
|
||||
import { map, share, switchMap, scan, distinctUntilChanged, withLatestFrom, skipWhile } from 'rxjs/operators';
|
||||
import * as i1 from '@angular/fire';
|
||||
import { keepUnstableUntilFirst, VERSION } from '@angular/fire';
|
||||
import { ɵfirebaseAppFactory, ɵcacheInstance, FIREBASE_OPTIONS, FIREBASE_APP_NAME } from '@angular/fire/compat';
|
||||
import 'firebase/compat/auth';
|
||||
import 'firebase/compat/database';
|
||||
import * as i2 from '@angular/fire/compat/auth';
|
||||
import { ɵauthFactory, USE_EMULATOR as USE_EMULATOR$1, SETTINGS, TENANT_ID, LANGUAGE_CODE, USE_DEVICE_LANGUAGE, PERSISTENCE } from '@angular/fire/compat/auth';
|
||||
import * as i3 from '@angular/fire/app-check';
|
||||
import firebase from 'firebase/compat/app';
|
||||
|
||||
function isString(value) {
|
||||
return typeof value === 'string';
|
||||
}
|
||||
function isFirebaseDataSnapshot(value) {
|
||||
return typeof value.exportVal === 'function';
|
||||
}
|
||||
function isNil(obj) {
|
||||
return obj === undefined || obj === null;
|
||||
}
|
||||
function isFirebaseRef(value) {
|
||||
return typeof value.set === 'function';
|
||||
}
|
||||
/**
|
||||
* Returns a database reference given a Firebase App and an
|
||||
* absolute or relative path.
|
||||
* @param database - Firebase Database
|
||||
* @param pathRef - Database path, relative or absolute
|
||||
*/
|
||||
function getRef(database, pathRef) {
|
||||
// if a db ref was passed in, just return it
|
||||
return isFirebaseRef(pathRef) ? pathRef
|
||||
: database.ref(pathRef);
|
||||
}
|
||||
function checkOperationCases(item, cases) {
|
||||
if (isString(item)) {
|
||||
return cases.stringCase();
|
||||
}
|
||||
else if (isFirebaseRef(item)) {
|
||||
return cases.firebaseCase();
|
||||
}
|
||||
else if (isFirebaseDataSnapshot(item)) {
|
||||
return cases.snapshotCase();
|
||||
}
|
||||
throw new Error(`Expects a string, snapshot, or reference. Got: ${typeof item}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an observable from a Database Reference or Database Query.
|
||||
* @param ref Database Reference
|
||||
* @param event Listen event type ('value', 'added', 'changed', 'removed', 'moved')
|
||||
* @param listenType 'on' or 'once'
|
||||
* @param scheduler - Rxjs scheduler
|
||||
*/
|
||||
function fromRef(ref, event, listenType = 'on', scheduler = asyncScheduler) {
|
||||
return new Observable(subscriber => {
|
||||
let fn = null;
|
||||
fn = ref[listenType](event, (snapshot, prevKey) => {
|
||||
scheduler.schedule(() => {
|
||||
subscriber.next({ snapshot, prevKey });
|
||||
});
|
||||
if (listenType === 'once') {
|
||||
scheduler.schedule(() => subscriber.complete());
|
||||
}
|
||||
}, err => {
|
||||
scheduler.schedule(() => subscriber.error(err));
|
||||
});
|
||||
if (listenType === 'on') {
|
||||
return {
|
||||
unsubscribe() {
|
||||
if (fn != null) {
|
||||
ref.off(event, fn);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
else {
|
||||
return {
|
||||
unsubscribe() {
|
||||
}
|
||||
};
|
||||
}
|
||||
}).pipe(map(payload => {
|
||||
const { snapshot, prevKey } = payload;
|
||||
let key = null;
|
||||
if (snapshot.exists()) {
|
||||
key = snapshot.key;
|
||||
}
|
||||
return { type: event, payload: snapshot, prevKey, key };
|
||||
}), share());
|
||||
}
|
||||
|
||||
function listChanges(ref, events, scheduler) {
|
||||
return fromRef(ref, 'value', 'once', scheduler).pipe(switchMap(snapshotAction => {
|
||||
const childEvent$ = [of(snapshotAction)];
|
||||
events.forEach(event => childEvent$.push(fromRef(ref, event, 'on', scheduler)));
|
||||
return merge(...childEvent$).pipe(scan(buildView, []));
|
||||
}), distinctUntilChanged());
|
||||
}
|
||||
function positionFor(changes, key) {
|
||||
const len = changes.length;
|
||||
for (let i = 0; i < len; i++) {
|
||||
if (changes[i].payload.key === key) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
function positionAfter(changes, prevKey) {
|
||||
if (isNil(prevKey)) {
|
||||
return 0;
|
||||
}
|
||||
else {
|
||||
const i = positionFor(changes, prevKey);
|
||||
if (i === -1) {
|
||||
return changes.length;
|
||||
}
|
||||
else {
|
||||
return i + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
function buildView(current, action) {
|
||||
const { payload, prevKey, key } = action;
|
||||
const currentKeyPosition = positionFor(current, key);
|
||||
const afterPreviousKeyPosition = positionAfter(current, prevKey);
|
||||
switch (action.type) {
|
||||
case 'value':
|
||||
if (action.payload && action.payload.exists()) {
|
||||
let prevKey = null;
|
||||
action.payload.forEach(payload => {
|
||||
const action = { payload, type: 'value', prevKey, key: payload.key };
|
||||
prevKey = payload.key;
|
||||
current = [...current, action];
|
||||
return false;
|
||||
});
|
||||
}
|
||||
return current;
|
||||
case 'child_added':
|
||||
if (currentKeyPosition > -1) {
|
||||
// check that the previouskey is what we expect, else reorder
|
||||
const previous = current[currentKeyPosition - 1];
|
||||
if ((previous && previous.key || null) !== prevKey) {
|
||||
current = current.filter(x => x.payload.key !== payload.key);
|
||||
current.splice(afterPreviousKeyPosition, 0, action);
|
||||
}
|
||||
}
|
||||
else if (prevKey == null) {
|
||||
return [action, ...current];
|
||||
}
|
||||
else {
|
||||
current = current.slice();
|
||||
current.splice(afterPreviousKeyPosition, 0, action);
|
||||
}
|
||||
return current;
|
||||
case 'child_removed':
|
||||
return current.filter(x => x.payload.key !== payload.key);
|
||||
case 'child_changed':
|
||||
return current.map(x => x.payload.key === key ? action : x);
|
||||
case 'child_moved':
|
||||
if (currentKeyPosition > -1) {
|
||||
const data = current.splice(currentKeyPosition, 1)[0];
|
||||
current = current.slice();
|
||||
current.splice(afterPreviousKeyPosition, 0, data);
|
||||
return current;
|
||||
}
|
||||
return current;
|
||||
// default will also remove null results
|
||||
default:
|
||||
return current;
|
||||
}
|
||||
}
|
||||
|
||||
function validateEventsArray(events) {
|
||||
if (isNil(events) || events.length === 0) {
|
||||
events = ['child_added', 'child_removed', 'child_changed', 'child_moved'];
|
||||
}
|
||||
return events;
|
||||
}
|
||||
|
||||
function snapshotChanges(query, events, scheduler) {
|
||||
events = validateEventsArray(events);
|
||||
return listChanges(query, events, scheduler);
|
||||
}
|
||||
|
||||
function stateChanges(query, events, scheduler) {
|
||||
events = validateEventsArray(events);
|
||||
const childEvent$ = events.map(event => fromRef(query, event, 'on', scheduler));
|
||||
return merge(...childEvent$);
|
||||
}
|
||||
|
||||
function auditTrail(query, events, scheduler) {
|
||||
const auditTrail$ = stateChanges(query, events)
|
||||
.pipe(scan((current, action) => [...current, action], []));
|
||||
return waitForLoaded(query, auditTrail$, scheduler);
|
||||
}
|
||||
function loadedData(query, scheduler) {
|
||||
// Create an observable of loaded values to retrieve the
|
||||
// known dataset. This will allow us to know what key to
|
||||
// emit the "whole" array at when listening for child events.
|
||||
return fromRef(query, 'value', 'on', scheduler)
|
||||
.pipe(map(data => {
|
||||
// Store the last key in the data set
|
||||
let lastKeyToLoad;
|
||||
// Loop through loaded dataset to find the last key
|
||||
data.payload.forEach(child => {
|
||||
lastKeyToLoad = child.key;
|
||||
return false;
|
||||
});
|
||||
// return data set and the current last key loaded
|
||||
return { data, lastKeyToLoad };
|
||||
}));
|
||||
}
|
||||
function waitForLoaded(query, action$, scheduler) {
|
||||
const loaded$ = loadedData(query, scheduler);
|
||||
return loaded$
|
||||
.pipe(withLatestFrom(action$),
|
||||
// Get the latest values from the "loaded" and "child" datasets
|
||||
// We can use both datasets to form an array of the latest values.
|
||||
map(([loaded, actions]) => {
|
||||
// Store the last key in the data set
|
||||
const lastKeyToLoad = loaded.lastKeyToLoad;
|
||||
// Store all child keys loaded at this point
|
||||
const loadedKeys = actions.map(snap => snap.key);
|
||||
return { actions, lastKeyToLoad, loadedKeys };
|
||||
}),
|
||||
// This is the magical part, only emit when the last load key
|
||||
// in the dataset has been loaded by a child event. At this point
|
||||
// we can assume the dataset is "whole".
|
||||
skipWhile(meta => meta.loadedKeys.indexOf(meta.lastKeyToLoad) === -1),
|
||||
// Pluck off the meta data because the user only cares
|
||||
// to iterate through the snapshots
|
||||
map(meta => meta.actions));
|
||||
}
|
||||
|
||||
function createDataOperationMethod(ref, operation) {
|
||||
return function dataOperation(item, value) {
|
||||
return checkOperationCases(item, {
|
||||
stringCase: () => ref.child(item)[operation](value),
|
||||
firebaseCase: () => item[operation](value),
|
||||
snapshotCase: () => item.ref[operation](value)
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
// TODO(davideast): Find out why TS thinks this returns firebase.Primise
|
||||
// instead of Promise.
|
||||
function createRemoveMethod(ref) {
|
||||
return function remove(item) {
|
||||
if (!item) {
|
||||
return ref.remove();
|
||||
}
|
||||
return checkOperationCases(item, {
|
||||
stringCase: () => ref.child(item).remove(),
|
||||
firebaseCase: () => item.remove(),
|
||||
snapshotCase: () => item.ref.remove()
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
function createListReference(query, afDatabase) {
|
||||
const outsideAngularScheduler = afDatabase.schedulers.outsideAngular;
|
||||
const refInZone = afDatabase.schedulers.ngZone.run(() => query.ref);
|
||||
return {
|
||||
query,
|
||||
update: createDataOperationMethod(refInZone, 'update'),
|
||||
set: createDataOperationMethod(refInZone, 'set'),
|
||||
push: (data) => refInZone.push(data),
|
||||
remove: createRemoveMethod(refInZone),
|
||||
snapshotChanges(events) {
|
||||
return snapshotChanges(query, events, outsideAngularScheduler).pipe(keepUnstableUntilFirst);
|
||||
},
|
||||
stateChanges(events) {
|
||||
return stateChanges(query, events, outsideAngularScheduler).pipe(keepUnstableUntilFirst);
|
||||
},
|
||||
auditTrail(events) {
|
||||
return auditTrail(query, events, outsideAngularScheduler).pipe(keepUnstableUntilFirst);
|
||||
},
|
||||
valueChanges(events, options) {
|
||||
const snapshotChanges$ = snapshotChanges(query, events, outsideAngularScheduler);
|
||||
return snapshotChanges$.pipe(map(actions => actions.map(a => {
|
||||
if (options && options.idField) {
|
||||
return Object.assign(Object.assign({}, a.payload.val()), {
|
||||
[options.idField]: a.key
|
||||
});
|
||||
}
|
||||
else {
|
||||
return a.payload.val();
|
||||
}
|
||||
})), keepUnstableUntilFirst);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function createObjectSnapshotChanges(query, scheduler) {
|
||||
return function snapshotChanges() {
|
||||
return fromRef(query, 'value', 'on', scheduler);
|
||||
};
|
||||
}
|
||||
|
||||
function createObjectReference(query, afDatabase) {
|
||||
return {
|
||||
query,
|
||||
snapshotChanges() {
|
||||
return createObjectSnapshotChanges(query, afDatabase.schedulers.outsideAngular)().pipe(keepUnstableUntilFirst);
|
||||
},
|
||||
update(data) { return query.ref.update(data); },
|
||||
set(data) { return query.ref.set(data); },
|
||||
remove() { return query.ref.remove(); },
|
||||
valueChanges() {
|
||||
const snapshotChanges$ = createObjectSnapshotChanges(query, afDatabase.schedulers.outsideAngular)();
|
||||
return snapshotChanges$.pipe(keepUnstableUntilFirst, map(action => action.payload.exists() ? action.payload.val() : null));
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
const URL = new InjectionToken('angularfire2.realtimeDatabaseURL');
|
||||
const USE_EMULATOR = new InjectionToken('angularfire2.database.use-emulator');
|
||||
class AngularFireDatabase {
|
||||
constructor(options, name, databaseURL,
|
||||
// tslint:disable-next-line:ban-types
|
||||
platformId, zone, schedulers, _useEmulator, // tuple isn't working here
|
||||
auth, useAuthEmulator, authSettings, // can't use firebase.auth.AuthSettings here
|
||||
tenantId, languageCode, useDeviceLanguage, persistence, _appCheckInstances) {
|
||||
this.schedulers = schedulers;
|
||||
const useEmulator = _useEmulator;
|
||||
const app = ɵfirebaseAppFactory(options, zone, name);
|
||||
if (auth) {
|
||||
ɵauthFactory(app, zone, useAuthEmulator, tenantId, languageCode, useDeviceLanguage, authSettings, persistence);
|
||||
}
|
||||
this.database = ɵcacheInstance(`${app.name}.database.${databaseURL}`, 'AngularFireDatabase', app.name, () => {
|
||||
const database = zone.runOutsideAngular(() => app.database(databaseURL || undefined));
|
||||
if (useEmulator) {
|
||||
database.useEmulator(...useEmulator);
|
||||
}
|
||||
return database;
|
||||
}, [useEmulator]);
|
||||
}
|
||||
list(pathOrRef, queryFn) {
|
||||
const ref = this.schedulers.ngZone.runOutsideAngular(() => getRef(this.database, pathOrRef));
|
||||
let query = ref;
|
||||
if (queryFn) {
|
||||
query = queryFn(ref);
|
||||
}
|
||||
return createListReference(query, this);
|
||||
}
|
||||
object(pathOrRef) {
|
||||
const ref = this.schedulers.ngZone.runOutsideAngular(() => getRef(this.database, pathOrRef));
|
||||
return createObjectReference(ref, this);
|
||||
}
|
||||
createPushId() {
|
||||
const ref = this.schedulers.ngZone.runOutsideAngular(() => this.database.ref());
|
||||
return ref.push().key;
|
||||
}
|
||||
}
|
||||
AngularFireDatabase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireDatabase, deps: [{ token: FIREBASE_OPTIONS }, { token: FIREBASE_APP_NAME, optional: true }, { token: URL, optional: true }, { token: PLATFORM_ID }, { token: i0.NgZone }, { token: i1.ɵAngularFireSchedulers }, { token: USE_EMULATOR, optional: true }, { token: i2.AngularFireAuth, optional: true }, { token: USE_EMULATOR$1, optional: true }, { token: SETTINGS, optional: true }, { token: TENANT_ID, optional: true }, { token: LANGUAGE_CODE, optional: true }, { token: USE_DEVICE_LANGUAGE, optional: true }, { token: PERSISTENCE, optional: true }, { token: i3.AppCheckInstances, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
||||
AngularFireDatabase.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireDatabase, providedIn: 'any' });
|
||||
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireDatabase, decorators: [{
|
||||
type: Injectable,
|
||||
args: [{
|
||||
providedIn: 'any'
|
||||
}]
|
||||
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
||||
type: Inject,
|
||||
args: [FIREBASE_OPTIONS]
|
||||
}] }, { type: undefined, decorators: [{
|
||||
type: Optional
|
||||
}, {
|
||||
type: Inject,
|
||||
args: [FIREBASE_APP_NAME]
|
||||
}] }, { type: undefined, decorators: [{
|
||||
type: Optional
|
||||
}, {
|
||||
type: Inject,
|
||||
args: [URL]
|
||||
}] }, { type: Object, decorators: [{
|
||||
type: Inject,
|
||||
args: [PLATFORM_ID]
|
||||
}] }, { type: i0.NgZone }, { type: i1.ɵAngularFireSchedulers }, { type: undefined, decorators: [{
|
||||
type: Optional
|
||||
}, {
|
||||
type: Inject,
|
||||
args: [USE_EMULATOR]
|
||||
}] }, { type: i2.AngularFireAuth, decorators: [{
|
||||
type: Optional
|
||||
}] }, { type: undefined, decorators: [{
|
||||
type: Optional
|
||||
}, {
|
||||
type: Inject,
|
||||
args: [USE_EMULATOR$1]
|
||||
}] }, { type: undefined, decorators: [{
|
||||
type: Optional
|
||||
}, {
|
||||
type: Inject,
|
||||
args: [SETTINGS]
|
||||
}] }, { type: undefined, decorators: [{
|
||||
type: Optional
|
||||
}, {
|
||||
type: Inject,
|
||||
args: [TENANT_ID]
|
||||
}] }, { type: undefined, decorators: [{
|
||||
type: Optional
|
||||
}, {
|
||||
type: Inject,
|
||||
args: [LANGUAGE_CODE]
|
||||
}] }, { type: undefined, decorators: [{
|
||||
type: Optional
|
||||
}, {
|
||||
type: Inject,
|
||||
args: [USE_DEVICE_LANGUAGE]
|
||||
}] }, { type: undefined, decorators: [{
|
||||
type: Optional
|
||||
}, {
|
||||
type: Inject,
|
||||
args: [PERSISTENCE]
|
||||
}] }, { type: i3.AppCheckInstances, decorators: [{
|
||||
type: Optional
|
||||
}] }]; } });
|
||||
|
||||
class AngularFireDatabaseModule {
|
||||
constructor() {
|
||||
firebase.registerVersion('angularfire', VERSION.full, 'rtdb-compat');
|
||||
}
|
||||
}
|
||||
AngularFireDatabaseModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireDatabaseModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
||||
AngularFireDatabaseModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireDatabaseModule });
|
||||
AngularFireDatabaseModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireDatabaseModule, providers: [AngularFireDatabase] });
|
||||
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireDatabaseModule, decorators: [{
|
||||
type: NgModule,
|
||||
args: [{
|
||||
providers: [AngularFireDatabase]
|
||||
}]
|
||||
}], ctorParameters: function () { return []; } });
|
||||
|
||||
/**
|
||||
* Generated bundle index. Do not edit.
|
||||
*/
|
||||
|
||||
export { AngularFireDatabase, AngularFireDatabaseModule, URL, USE_EMULATOR, auditTrail, createListReference, fromRef, listChanges, snapshotChanges, stateChanges };
|
||||
//# sourceMappingURL=angular-fire-compat-database.js.map
|
||||
1
node_modules/@angular/fire/fesm2015/angular-fire-compat-database.js.map
generated
vendored
Normal file
1
node_modules/@angular/fire/fesm2015/angular-fire-compat-database.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
690
node_modules/@angular/fire/fesm2015/angular-fire-compat-firestore.js
generated
vendored
Normal file
690
node_modules/@angular/fire/fesm2015/angular-fire-compat-firestore.js
generated
vendored
Normal file
|
|
@ -0,0 +1,690 @@
|
|||
import * as i0 from '@angular/core';
|
||||
import { InjectionToken, PLATFORM_ID, Injectable, Inject, Optional, NgModule } from '@angular/core';
|
||||
import { asyncScheduler, Observable, from, of } from 'rxjs';
|
||||
import * as i1 from '@angular/fire';
|
||||
import { keepUnstableUntilFirst, VERSION } from '@angular/fire';
|
||||
import { startWith, pairwise, map, scan, distinctUntilChanged, filter } from 'rxjs/operators';
|
||||
import { ɵfirebaseAppFactory, ɵcacheInstance, FIREBASE_OPTIONS, FIREBASE_APP_NAME } from '@angular/fire/compat';
|
||||
import { isPlatformServer } from '@angular/common';
|
||||
import 'firebase/compat/auth';
|
||||
import 'firebase/compat/firestore';
|
||||
import * as i2 from '@angular/fire/compat/auth';
|
||||
import { ɵauthFactory, USE_EMULATOR as USE_EMULATOR$1, SETTINGS as SETTINGS$1, TENANT_ID, LANGUAGE_CODE, USE_DEVICE_LANGUAGE, PERSISTENCE } from '@angular/fire/compat/auth';
|
||||
import * as i3 from '@angular/fire/app-check';
|
||||
import firebase from 'firebase/compat/app';
|
||||
|
||||
function _fromRef(ref, scheduler = asyncScheduler) {
|
||||
return new Observable(subscriber => {
|
||||
let unsubscribe;
|
||||
if (scheduler != null) {
|
||||
scheduler.schedule(() => {
|
||||
unsubscribe = ref.onSnapshot({ includeMetadataChanges: true }, subscriber);
|
||||
});
|
||||
}
|
||||
else {
|
||||
unsubscribe = ref.onSnapshot({ includeMetadataChanges: true }, subscriber);
|
||||
}
|
||||
return () => {
|
||||
if (unsubscribe != null) {
|
||||
unsubscribe();
|
||||
}
|
||||
};
|
||||
});
|
||||
}
|
||||
function fromRef(ref, scheduler) {
|
||||
return _fromRef(ref, scheduler);
|
||||
}
|
||||
function fromDocRef(ref, scheduler) {
|
||||
return fromRef(ref, scheduler)
|
||||
.pipe(startWith(undefined), pairwise(), map(([priorPayload, payload]) => {
|
||||
if (!payload.exists) {
|
||||
return { payload, type: 'removed' };
|
||||
}
|
||||
if (!(priorPayload === null || priorPayload === void 0 ? void 0 : priorPayload.exists)) {
|
||||
return { payload, type: 'added' };
|
||||
}
|
||||
return { payload, type: 'modified' };
|
||||
}));
|
||||
}
|
||||
function fromCollectionRef(ref, scheduler) {
|
||||
return fromRef(ref, scheduler).pipe(map(payload => ({ payload, type: 'query' })));
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a stream of document changes on a query. These results are not in sort order but in
|
||||
* order of occurence.
|
||||
*/
|
||||
function docChanges(query, scheduler) {
|
||||
return fromCollectionRef(query, scheduler)
|
||||
.pipe(startWith(undefined), pairwise(), map(([priorAction, action]) => {
|
||||
const docChanges = action.payload.docChanges();
|
||||
const actions = docChanges.map(change => ({ type: change.type, payload: change }));
|
||||
// the metadata has changed from the prior emission
|
||||
if (priorAction && JSON.stringify(priorAction.payload.metadata) !== JSON.stringify(action.payload.metadata)) {
|
||||
// go through all the docs in payload and figure out which ones changed
|
||||
action.payload.docs.forEach((currentDoc, currentIndex) => {
|
||||
const docChange = docChanges.find(d => d.doc.ref.isEqual(currentDoc.ref));
|
||||
const priorDoc = priorAction === null || priorAction === void 0 ? void 0 : priorAction.payload.docs.find(d => d.ref.isEqual(currentDoc.ref));
|
||||
if (docChange && JSON.stringify(docChange.doc.metadata) === JSON.stringify(currentDoc.metadata) ||
|
||||
!docChange && priorDoc && JSON.stringify(priorDoc.metadata) === JSON.stringify(currentDoc.metadata)) {
|
||||
// document doesn't appear to have changed, don't log another action
|
||||
}
|
||||
else {
|
||||
// since the actions are processed in order just push onto the array
|
||||
actions.push({
|
||||
type: 'modified',
|
||||
payload: {
|
||||
oldIndex: currentIndex,
|
||||
newIndex: currentIndex,
|
||||
type: 'modified',
|
||||
doc: currentDoc
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
return actions;
|
||||
}));
|
||||
}
|
||||
/**
|
||||
* Return a stream of document changes on a query. These results are in sort order.
|
||||
*/
|
||||
function sortedChanges(query, events, scheduler) {
|
||||
return docChanges(query, scheduler)
|
||||
.pipe(scan((current, changes) => combineChanges(current, changes.map(it => it.payload), events), []), distinctUntilChanged(), // cut down on unneed change cycles
|
||||
map(changes => changes.map(c => ({ type: c.type, payload: c }))));
|
||||
}
|
||||
/**
|
||||
* Combines the total result set from the current set of changes from an incoming set
|
||||
* of changes.
|
||||
*/
|
||||
function combineChanges(current, changes, events) {
|
||||
changes.forEach(change => {
|
||||
// skip unwanted change types
|
||||
if (events.indexOf(change.type) > -1) {
|
||||
current = combineChange(current, change);
|
||||
}
|
||||
});
|
||||
return current;
|
||||
}
|
||||
/**
|
||||
* Splice arguments on top of a sliced array, to break top-level ===
|
||||
* this is useful for change-detection
|
||||
*/
|
||||
function sliceAndSplice(original, start, deleteCount, ...args) {
|
||||
const returnArray = original.slice();
|
||||
returnArray.splice(start, deleteCount, ...args);
|
||||
return returnArray;
|
||||
}
|
||||
/**
|
||||
* Creates a new sorted array from a new change.
|
||||
* Build our own because we allow filtering of action types ('added', 'removed', 'modified') before scanning
|
||||
* and so we have greater control over change detection (by breaking ===)
|
||||
*/
|
||||
function combineChange(combined, change) {
|
||||
switch (change.type) {
|
||||
case 'added':
|
||||
if (combined[change.newIndex] && combined[change.newIndex].doc.ref.isEqual(change.doc.ref)) {
|
||||
// Not sure why the duplicates are getting fired
|
||||
}
|
||||
else {
|
||||
return sliceAndSplice(combined, change.newIndex, 0, change);
|
||||
}
|
||||
break;
|
||||
case 'modified':
|
||||
if (combined[change.oldIndex] == null || combined[change.oldIndex].doc.ref.isEqual(change.doc.ref)) {
|
||||
// When an item changes position we first remove it
|
||||
// and then add it's new position
|
||||
if (change.oldIndex !== change.newIndex) {
|
||||
const copiedArray = combined.slice();
|
||||
copiedArray.splice(change.oldIndex, 1);
|
||||
copiedArray.splice(change.newIndex, 0, change);
|
||||
return copiedArray;
|
||||
}
|
||||
else {
|
||||
return sliceAndSplice(combined, change.newIndex, 1, change);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'removed':
|
||||
if (combined[change.oldIndex] && combined[change.oldIndex].doc.ref.isEqual(change.doc.ref)) {
|
||||
return sliceAndSplice(combined, change.oldIndex, 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return combined;
|
||||
}
|
||||
|
||||
function validateEventsArray(events) {
|
||||
if (!events || events.length === 0) {
|
||||
events = ['added', 'removed', 'modified'];
|
||||
}
|
||||
return events;
|
||||
}
|
||||
/**
|
||||
* AngularFirestoreCollection service
|
||||
*
|
||||
* This class creates a reference to a Firestore Collection. A reference and a query are provided in
|
||||
* in the constructor. The query can be the unqueried reference if no query is desired.The class
|
||||
* is generic which gives you type safety for data update methods and data streaming.
|
||||
*
|
||||
* This class uses Symbol.observable to transform into Observable using Observable.from().
|
||||
*
|
||||
* This class is rarely used directly and should be created from the AngularFirestore service.
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* const collectionRef = firebase.firestore.collection('stocks');
|
||||
* const query = collectionRef.where('price', '>', '0.01');
|
||||
* const fakeStock = new AngularFirestoreCollection<Stock>(collectionRef, query);
|
||||
*
|
||||
* // NOTE!: the updates are performed on the reference not the query
|
||||
* await fakeStock.add({ name: 'FAKE', price: 0.01 });
|
||||
*
|
||||
* // Subscribe to changes as snapshots. This provides you data updates as well as delta updates.
|
||||
* fakeStock.valueChanges().subscribe(value => console.log(value));
|
||||
*/
|
||||
class AngularFirestoreCollection {
|
||||
/**
|
||||
* The constructor takes in a CollectionReference and Query to provide wrapper methods
|
||||
* for data operations and data streaming.
|
||||
*
|
||||
* Note: Data operation methods are done on the reference not the query. This means
|
||||
* when you update data it is not updating data to the window of your query unless
|
||||
* the data fits the criteria of the query. See the AssociatedRefence type for details
|
||||
* on this implication.
|
||||
*/
|
||||
constructor(ref, query, afs) {
|
||||
this.ref = ref;
|
||||
this.query = query;
|
||||
this.afs = afs;
|
||||
}
|
||||
/**
|
||||
* Listen to the latest change in the stream. This method returns changes
|
||||
* as they occur and they are not sorted by query order. This allows you to construct
|
||||
* your own data structure.
|
||||
*/
|
||||
stateChanges(events) {
|
||||
let source = docChanges(this.query, this.afs.schedulers.outsideAngular);
|
||||
if (events && events.length > 0) {
|
||||
source = source.pipe(map(actions => actions.filter(change => events.indexOf(change.type) > -1)));
|
||||
}
|
||||
return source.pipe(
|
||||
// We want to filter out empty arrays, but always emit at first, so the developer knows
|
||||
// that the collection has been resolve; even if it's empty
|
||||
startWith(undefined), pairwise(), filter(([prior, current]) => current.length > 0 || !prior), map(([prior, current]) => current), keepUnstableUntilFirst);
|
||||
}
|
||||
/**
|
||||
* Create a stream of changes as they occur it time. This method is similar to stateChanges()
|
||||
* but it collects each event in an array over time.
|
||||
*/
|
||||
auditTrail(events) {
|
||||
return this.stateChanges(events).pipe(scan((current, action) => [...current, ...action], []));
|
||||
}
|
||||
/**
|
||||
* Create a stream of synchronized changes. This method keeps the local array in sorted
|
||||
* query order.
|
||||
*/
|
||||
snapshotChanges(events) {
|
||||
const validatedEvents = validateEventsArray(events);
|
||||
const scheduledSortedChanges$ = sortedChanges(this.query, validatedEvents, this.afs.schedulers.outsideAngular);
|
||||
return scheduledSortedChanges$.pipe(keepUnstableUntilFirst);
|
||||
}
|
||||
valueChanges(options = {}) {
|
||||
return fromCollectionRef(this.query, this.afs.schedulers.outsideAngular)
|
||||
.pipe(map(actions => actions.payload.docs.map(a => {
|
||||
if (options.idField) {
|
||||
return Object.assign(Object.assign({}, a.data()), { [options.idField]: a.id });
|
||||
}
|
||||
else {
|
||||
return a.data();
|
||||
}
|
||||
})), keepUnstableUntilFirst);
|
||||
}
|
||||
/**
|
||||
* Retrieve the results of the query once.
|
||||
*/
|
||||
get(options) {
|
||||
return from(this.query.get(options)).pipe(keepUnstableUntilFirst);
|
||||
}
|
||||
/**
|
||||
* Add data to a collection reference.
|
||||
*
|
||||
* Note: Data operation methods are done on the reference not the query. This means
|
||||
* when you update data it is not updating data to the window of your query unless
|
||||
* the data fits the criteria of the query.
|
||||
*/
|
||||
add(data) {
|
||||
return this.ref.add(data);
|
||||
}
|
||||
/**
|
||||
* Create a reference to a single document in a collection.
|
||||
*/
|
||||
doc(path) {
|
||||
// TODO is there a better way to solve this type issue
|
||||
return new AngularFirestoreDocument(this.ref.doc(path), this.afs);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* AngularFirestoreDocument service
|
||||
*
|
||||
* This class creates a reference to a Firestore Document. A reference is provided in
|
||||
* in the constructor. The class is generic which gives you type safety for data update
|
||||
* methods and data streaming.
|
||||
*
|
||||
* This class uses Symbol.observable to transform into Observable using Observable.from().
|
||||
*
|
||||
* This class is rarely used directly and should be created from the AngularFirestore service.
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* const fakeStock = new AngularFirestoreDocument<Stock>(doc('stocks/FAKE'));
|
||||
* await fakeStock.set({ name: 'FAKE', price: 0.01 });
|
||||
* fakeStock.valueChanges().map(snap => {
|
||||
* if(snap.exists) return snap.data();
|
||||
* return null;
|
||||
* }).subscribe(value => console.log(value));
|
||||
* // OR! Transform using Observable.from() and the data is unwrapped for you
|
||||
* Observable.from(fakeStock).subscribe(value => console.log(value));
|
||||
*/
|
||||
class AngularFirestoreDocument {
|
||||
/**
|
||||
* The constructor takes in a DocumentReference to provide wrapper methods
|
||||
* for data operations, data streaming, and Symbol.observable.
|
||||
*/
|
||||
constructor(ref, afs) {
|
||||
this.ref = ref;
|
||||
this.afs = afs;
|
||||
}
|
||||
/**
|
||||
* Create or overwrite a single document.
|
||||
*/
|
||||
set(data, options) {
|
||||
return this.ref.set(data, options);
|
||||
}
|
||||
/**
|
||||
* Update some fields of a document without overwriting the entire document.
|
||||
*/
|
||||
update(data) {
|
||||
return this.ref.update(data);
|
||||
}
|
||||
/**
|
||||
* Delete a document.
|
||||
*/
|
||||
delete() {
|
||||
return this.ref.delete();
|
||||
}
|
||||
/**
|
||||
* Create a reference to a sub-collection given a path and an optional query
|
||||
* function.
|
||||
*/
|
||||
collection(path, queryFn) {
|
||||
const collectionRef = this.ref.collection(path);
|
||||
const { ref, query } = associateQuery(collectionRef, queryFn);
|
||||
return new AngularFirestoreCollection(ref, query, this.afs);
|
||||
}
|
||||
/**
|
||||
* Listen to snapshot updates from the document.
|
||||
*/
|
||||
snapshotChanges() {
|
||||
const scheduledFromDocRef$ = fromDocRef(this.ref, this.afs.schedulers.outsideAngular);
|
||||
return scheduledFromDocRef$.pipe(keepUnstableUntilFirst);
|
||||
}
|
||||
valueChanges(options = {}) {
|
||||
return this.snapshotChanges().pipe(map(({ payload }) => options.idField ? Object.assign(Object.assign({}, payload.data()), { [options.idField]: payload.id }) : payload.data()));
|
||||
}
|
||||
/**
|
||||
* Retrieve the document once.
|
||||
*/
|
||||
get(options) {
|
||||
return from(this.ref.get(options)).pipe(keepUnstableUntilFirst);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* AngularFirestoreCollectionGroup service
|
||||
*
|
||||
* This class holds a reference to a Firestore Collection Group Query.
|
||||
*
|
||||
* This class uses Symbol.observable to transform into Observable using Observable.from().
|
||||
*
|
||||
* This class is rarely used directly and should be created from the AngularFirestore service.
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* const collectionGroup = firebase.firestore.collectionGroup('stocks');
|
||||
* const query = collectionRef.where('price', '>', '0.01');
|
||||
* const fakeStock = new AngularFirestoreCollectionGroup<Stock>(query, afs);
|
||||
*
|
||||
* // Subscribe to changes as snapshots. This provides you data updates as well as delta updates.
|
||||
* fakeStock.valueChanges().subscribe(value => console.log(value));
|
||||
*/
|
||||
class AngularFirestoreCollectionGroup {
|
||||
/**
|
||||
* The constructor takes in a CollectionGroupQuery to provide wrapper methods
|
||||
* for data operations and data streaming.
|
||||
*/
|
||||
constructor(query, afs) {
|
||||
this.query = query;
|
||||
this.afs = afs;
|
||||
}
|
||||
/**
|
||||
* Listen to the latest change in the stream. This method returns changes
|
||||
* as they occur and they are not sorted by query order. This allows you to construct
|
||||
* your own data structure.
|
||||
*/
|
||||
stateChanges(events) {
|
||||
if (!events || events.length === 0) {
|
||||
return docChanges(this.query, this.afs.schedulers.outsideAngular).pipe(keepUnstableUntilFirst);
|
||||
}
|
||||
return docChanges(this.query, this.afs.schedulers.outsideAngular)
|
||||
.pipe(map(actions => actions.filter(change => events.indexOf(change.type) > -1)), filter(changes => changes.length > 0), keepUnstableUntilFirst);
|
||||
}
|
||||
/**
|
||||
* Create a stream of changes as they occur it time. This method is similar to stateChanges()
|
||||
* but it collects each event in an array over time.
|
||||
*/
|
||||
auditTrail(events) {
|
||||
return this.stateChanges(events).pipe(scan((current, action) => [...current, ...action], []));
|
||||
}
|
||||
/**
|
||||
* Create a stream of synchronized changes. This method keeps the local array in sorted
|
||||
* query order.
|
||||
*/
|
||||
snapshotChanges(events) {
|
||||
const validatedEvents = validateEventsArray(events);
|
||||
const scheduledSortedChanges$ = sortedChanges(this.query, validatedEvents, this.afs.schedulers.outsideAngular);
|
||||
return scheduledSortedChanges$.pipe(keepUnstableUntilFirst);
|
||||
}
|
||||
valueChanges(options = {}) {
|
||||
const fromCollectionRefScheduled$ = fromCollectionRef(this.query, this.afs.schedulers.outsideAngular);
|
||||
return fromCollectionRefScheduled$
|
||||
.pipe(map(actions => actions.payload.docs.map(a => {
|
||||
if (options.idField) {
|
||||
return Object.assign({ [options.idField]: a.id }, a.data());
|
||||
}
|
||||
else {
|
||||
return a.data();
|
||||
}
|
||||
})), keepUnstableUntilFirst);
|
||||
}
|
||||
/**
|
||||
* Retrieve the results of the query once.
|
||||
*/
|
||||
get(options) {
|
||||
return from(this.query.get(options)).pipe(keepUnstableUntilFirst);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The value of this token determines whether or not the firestore will have persistance enabled
|
||||
*/
|
||||
const ENABLE_PERSISTENCE = new InjectionToken('angularfire2.enableFirestorePersistence');
|
||||
const PERSISTENCE_SETTINGS = new InjectionToken('angularfire2.firestore.persistenceSettings');
|
||||
const SETTINGS = new InjectionToken('angularfire2.firestore.settings');
|
||||
const USE_EMULATOR = new InjectionToken('angularfire2.firestore.use-emulator');
|
||||
/**
|
||||
* A utility methods for associating a collection reference with
|
||||
* a query.
|
||||
*
|
||||
* @param collectionRef - A collection reference to query
|
||||
* @param queryFn - The callback to create a query
|
||||
*
|
||||
* Example:
|
||||
* const { query, ref } = associateQuery(docRef.collection('items'), ref => {
|
||||
* return ref.where('age', '<', 200);
|
||||
* });
|
||||
*/
|
||||
function associateQuery(collectionRef, queryFn = ref => ref) {
|
||||
const query = queryFn(collectionRef);
|
||||
const ref = collectionRef;
|
||||
return { query, ref };
|
||||
}
|
||||
/**
|
||||
* AngularFirestore Service
|
||||
*
|
||||
* This service is the main entry point for this feature module. It provides
|
||||
* an API for creating Collection and Reference services. These services can
|
||||
* then be used to do data updates and observable streams of the data.
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* import { Component } from '@angular/core';
|
||||
* import { AngularFirestore, AngularFirestoreCollection, AngularFirestoreDocument } from '@angular/fire/firestore';
|
||||
* import { Observable } from 'rxjs/Observable';
|
||||
* import { from } from 'rxjs/observable';
|
||||
*
|
||||
* @Component({
|
||||
* selector: 'app-my-component',
|
||||
* template: `
|
||||
* <h2>Items for {{ (profile | async)?.name }}
|
||||
* <ul>
|
||||
* <li *ngFor="let item of items | async">{{ item.name }}</li>
|
||||
* </ul>
|
||||
* <div class="control-input">
|
||||
* <input type="text" #itemname />
|
||||
* <button (click)="addItem(itemname.value)">Add Item</button>
|
||||
* </div>
|
||||
* `
|
||||
* })
|
||||
* export class MyComponent implements OnInit {
|
||||
*
|
||||
* // services for data operations and data streaming
|
||||
* private readonly itemsRef: AngularFirestoreCollection<Item>;
|
||||
* private readonly profileRef: AngularFirestoreDocument<Profile>;
|
||||
*
|
||||
* // observables for template
|
||||
* items: Observable<Item[]>;
|
||||
* profile: Observable<Profile>;
|
||||
*
|
||||
* // inject main service
|
||||
* constructor(private readonly afs: AngularFirestore) {}
|
||||
*
|
||||
* ngOnInit() {
|
||||
* this.itemsRef = afs.collection('items', ref => ref.where('user', '==', 'davideast').limit(10));
|
||||
* this.items = this.itemsRef.valueChanges().map(snap => snap.docs.map(data => doc.data()));
|
||||
* // this.items = from(this.itemsRef); // you can also do this with no mapping
|
||||
*
|
||||
* this.profileRef = afs.doc('users/davideast');
|
||||
* this.profile = this.profileRef.valueChanges();
|
||||
* }
|
||||
*
|
||||
* addItem(name: string) {
|
||||
* const user = 'davideast';
|
||||
* this.itemsRef.add({ name, user });
|
||||
* }
|
||||
* }
|
||||
*/
|
||||
class AngularFirestore {
|
||||
/**
|
||||
* Each Feature of AngularFire has a FirebaseApp injected. This way we
|
||||
* don't rely on the main Firebase App instance and we can create named
|
||||
* apps and use multiple apps.
|
||||
*/
|
||||
constructor(options, name, shouldEnablePersistence, settings,
|
||||
// tslint:disable-next-line:ban-types
|
||||
platformId, zone, schedulers, persistenceSettings, _useEmulator, auth, useAuthEmulator, authSettings, // can't use firebase.auth.AuthSettings here
|
||||
tenantId, languageCode, useDeviceLanguage, persistence, _appCheckInstances) {
|
||||
this.schedulers = schedulers;
|
||||
const app = ɵfirebaseAppFactory(options, zone, name);
|
||||
const useEmulator = _useEmulator;
|
||||
if (auth) {
|
||||
ɵauthFactory(app, zone, useAuthEmulator, tenantId, languageCode, useDeviceLanguage, authSettings, persistence);
|
||||
}
|
||||
[this.firestore, this.persistenceEnabled$] = ɵcacheInstance(`${app.name}.firestore`, 'AngularFirestore', app.name, () => {
|
||||
const firestore = zone.runOutsideAngular(() => app.firestore());
|
||||
if (settings) {
|
||||
firestore.settings(settings);
|
||||
}
|
||||
if (useEmulator) {
|
||||
firestore.useEmulator(...useEmulator);
|
||||
}
|
||||
if (shouldEnablePersistence && !isPlatformServer(platformId)) {
|
||||
// We need to try/catch here because not all enablePersistence() failures are caught
|
||||
// https://github.com/firebase/firebase-js-sdk/issues/608
|
||||
const enablePersistence = () => {
|
||||
try {
|
||||
return from(firestore.enablePersistence(persistenceSettings || undefined).then(() => true, () => false));
|
||||
}
|
||||
catch (e) {
|
||||
if (typeof console !== 'undefined') {
|
||||
console.warn(e);
|
||||
}
|
||||
return of(false);
|
||||
}
|
||||
};
|
||||
return [firestore, zone.runOutsideAngular(enablePersistence)];
|
||||
}
|
||||
else {
|
||||
return [firestore, of(false)];
|
||||
}
|
||||
}, [settings, useEmulator, shouldEnablePersistence]);
|
||||
}
|
||||
collection(pathOrRef, queryFn) {
|
||||
let collectionRef;
|
||||
if (typeof pathOrRef === 'string') {
|
||||
collectionRef = this.firestore.collection(pathOrRef);
|
||||
}
|
||||
else {
|
||||
collectionRef = pathOrRef;
|
||||
}
|
||||
const { ref, query } = associateQuery(collectionRef, queryFn);
|
||||
const refInZone = this.schedulers.ngZone.run(() => ref);
|
||||
return new AngularFirestoreCollection(refInZone, query, this);
|
||||
}
|
||||
/**
|
||||
* Create a reference to a Firestore Collection Group based on a collectionId
|
||||
* and an optional query function to narrow the result
|
||||
* set.
|
||||
*/
|
||||
collectionGroup(collectionId, queryGroupFn) {
|
||||
const queryFn = queryGroupFn || (ref => ref);
|
||||
const collectionGroup = this.firestore.collectionGroup(collectionId);
|
||||
return new AngularFirestoreCollectionGroup(queryFn(collectionGroup), this);
|
||||
}
|
||||
doc(pathOrRef) {
|
||||
let ref;
|
||||
if (typeof pathOrRef === 'string') {
|
||||
ref = this.firestore.doc(pathOrRef);
|
||||
}
|
||||
else {
|
||||
ref = pathOrRef;
|
||||
}
|
||||
const refInZone = this.schedulers.ngZone.run(() => ref);
|
||||
return new AngularFirestoreDocument(refInZone, this);
|
||||
}
|
||||
/**
|
||||
* Returns a generated Firestore Document Id.
|
||||
*/
|
||||
createId() {
|
||||
return this.firestore.collection('_').doc().id;
|
||||
}
|
||||
}
|
||||
AngularFirestore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFirestore, deps: [{ token: FIREBASE_OPTIONS }, { token: FIREBASE_APP_NAME, optional: true }, { token: ENABLE_PERSISTENCE, optional: true }, { token: SETTINGS, optional: true }, { token: PLATFORM_ID }, { token: i0.NgZone }, { token: i1.ɵAngularFireSchedulers }, { token: PERSISTENCE_SETTINGS, optional: true }, { token: USE_EMULATOR, optional: true }, { token: i2.AngularFireAuth, optional: true }, { token: USE_EMULATOR$1, optional: true }, { token: SETTINGS$1, optional: true }, { token: TENANT_ID, optional: true }, { token: LANGUAGE_CODE, optional: true }, { token: USE_DEVICE_LANGUAGE, optional: true }, { token: PERSISTENCE, optional: true }, { token: i3.AppCheckInstances, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
||||
AngularFirestore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFirestore, providedIn: 'any' });
|
||||
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFirestore, decorators: [{
|
||||
type: Injectable,
|
||||
args: [{
|
||||
providedIn: 'any'
|
||||
}]
|
||||
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
||||
type: Inject,
|
||||
args: [FIREBASE_OPTIONS]
|
||||
}] }, { type: undefined, decorators: [{
|
||||
type: Optional
|
||||
}, {
|
||||
type: Inject,
|
||||
args: [FIREBASE_APP_NAME]
|
||||
}] }, { type: undefined, decorators: [{
|
||||
type: Optional
|
||||
}, {
|
||||
type: Inject,
|
||||
args: [ENABLE_PERSISTENCE]
|
||||
}] }, { type: undefined, decorators: [{
|
||||
type: Optional
|
||||
}, {
|
||||
type: Inject,
|
||||
args: [SETTINGS]
|
||||
}] }, { type: Object, decorators: [{
|
||||
type: Inject,
|
||||
args: [PLATFORM_ID]
|
||||
}] }, { type: i0.NgZone }, { type: i1.ɵAngularFireSchedulers }, { type: undefined, decorators: [{
|
||||
type: Optional
|
||||
}, {
|
||||
type: Inject,
|
||||
args: [PERSISTENCE_SETTINGS]
|
||||
}] }, { type: undefined, decorators: [{
|
||||
type: Optional
|
||||
}, {
|
||||
type: Inject,
|
||||
args: [USE_EMULATOR]
|
||||
}] }, { type: i2.AngularFireAuth, decorators: [{
|
||||
type: Optional
|
||||
}] }, { type: undefined, decorators: [{
|
||||
type: Optional
|
||||
}, {
|
||||
type: Inject,
|
||||
args: [USE_EMULATOR$1]
|
||||
}] }, { type: undefined, decorators: [{
|
||||
type: Optional
|
||||
}, {
|
||||
type: Inject,
|
||||
args: [SETTINGS$1]
|
||||
}] }, { type: undefined, decorators: [{
|
||||
type: Optional
|
||||
}, {
|
||||
type: Inject,
|
||||
args: [TENANT_ID]
|
||||
}] }, { type: undefined, decorators: [{
|
||||
type: Optional
|
||||
}, {
|
||||
type: Inject,
|
||||
args: [LANGUAGE_CODE]
|
||||
}] }, { type: undefined, decorators: [{
|
||||
type: Optional
|
||||
}, {
|
||||
type: Inject,
|
||||
args: [USE_DEVICE_LANGUAGE]
|
||||
}] }, { type: undefined, decorators: [{
|
||||
type: Optional
|
||||
}, {
|
||||
type: Inject,
|
||||
args: [PERSISTENCE]
|
||||
}] }, { type: i3.AppCheckInstances, decorators: [{
|
||||
type: Optional
|
||||
}] }]; } });
|
||||
|
||||
class AngularFirestoreModule {
|
||||
constructor() {
|
||||
firebase.registerVersion('angularfire', VERSION.full, 'fst-compat');
|
||||
}
|
||||
/**
|
||||
* Attempt to enable persistent storage, if possible
|
||||
*/
|
||||
static enablePersistence(persistenceSettings) {
|
||||
return {
|
||||
ngModule: AngularFirestoreModule,
|
||||
providers: [
|
||||
{ provide: ENABLE_PERSISTENCE, useValue: true },
|
||||
{ provide: PERSISTENCE_SETTINGS, useValue: persistenceSettings },
|
||||
]
|
||||
};
|
||||
}
|
||||
}
|
||||
AngularFirestoreModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFirestoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
||||
AngularFirestoreModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFirestoreModule });
|
||||
AngularFirestoreModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFirestoreModule, providers: [AngularFirestore] });
|
||||
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFirestoreModule, decorators: [{
|
||||
type: NgModule,
|
||||
args: [{
|
||||
providers: [AngularFirestore]
|
||||
}]
|
||||
}], ctorParameters: function () { return []; } });
|
||||
|
||||
/**
|
||||
* Generated bundle index. Do not edit.
|
||||
*/
|
||||
|
||||
export { AngularFirestore, AngularFirestoreCollection, AngularFirestoreCollectionGroup, AngularFirestoreDocument, AngularFirestoreModule, ENABLE_PERSISTENCE, PERSISTENCE_SETTINGS, SETTINGS, USE_EMULATOR, associateQuery, combineChange, combineChanges, docChanges, fromCollectionRef, fromDocRef, fromRef, sortedChanges, validateEventsArray };
|
||||
//# sourceMappingURL=angular-fire-compat-firestore.js.map
|
||||
1
node_modules/@angular/fire/fesm2015/angular-fire-compat-firestore.js.map
generated
vendored
Normal file
1
node_modules/@angular/fire/fesm2015/angular-fire-compat-firestore.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
97
node_modules/@angular/fire/fesm2015/angular-fire-compat-functions.js
generated
vendored
Normal file
97
node_modules/@angular/fire/fesm2015/angular-fire-compat-functions.js
generated
vendored
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
|
||||
import * as i0 from '@angular/core';
|
||||
import { InjectionToken, Injectable, Inject, Optional, NgModule } from '@angular/core';
|
||||
import { of, from } from 'rxjs';
|
||||
import { observeOn, switchMap, map, shareReplay } from 'rxjs/operators';
|
||||
import * as i1 from '@angular/fire';
|
||||
import { VERSION } from '@angular/fire';
|
||||
import { ɵfirebaseAppFactory, ɵcacheInstance, ɵlazySDKProxy, FIREBASE_OPTIONS, FIREBASE_APP_NAME, ɵapplyMixins } from '@angular/fire/compat';
|
||||
import * as i2 from '@angular/fire/app-check';
|
||||
import firebase from 'firebase/compat/app';
|
||||
|
||||
// DO NOT MODIFY, this file is autogenerated by tools/build.ts
|
||||
// Export a null object with the same keys as firebase/compat/functions, so Proxy can work with proxy-polyfill in Internet Explorer
|
||||
const proxyPolyfillCompat = {
|
||||
useEmulator: null,
|
||||
useFunctionsEmulator: null,
|
||||
httpsCallable: null,
|
||||
};
|
||||
|
||||
const ORIGIN = new InjectionToken('angularfire2.functions.origin');
|
||||
const REGION = new InjectionToken('angularfire2.functions.region');
|
||||
const USE_EMULATOR = new InjectionToken('angularfire2.functions.use-emulator');
|
||||
class AngularFireFunctions {
|
||||
constructor(options, name, zone, schedulers, region, origin, _useEmulator, // can't use the tuple here
|
||||
_appCheckInstances) {
|
||||
const useEmulator = _useEmulator;
|
||||
const functions = of(undefined).pipe(observeOn(schedulers.outsideAngular), switchMap(() => import('firebase/compat/functions')), map(() => ɵfirebaseAppFactory(options, zone, name)), map(app => ɵcacheInstance(`${app.name}.functions.${region || origin}`, 'AngularFireFunctions', app.name, () => {
|
||||
let functions;
|
||||
if (region && origin) {
|
||||
throw new Error('REGION and ORIGIN can\'t be used at the same time.');
|
||||
}
|
||||
functions = app.functions(region || origin || undefined);
|
||||
if (useEmulator) {
|
||||
functions.useEmulator(...useEmulator);
|
||||
}
|
||||
return functions;
|
||||
}, [region, origin, useEmulator])), shareReplay({ bufferSize: 1, refCount: false }));
|
||||
this.httpsCallable = (name, options) => (data) => from(functions).pipe(observeOn(schedulers.insideAngular), switchMap(functions => functions.httpsCallable(name, options)(data)), map(r => r.data));
|
||||
return ɵlazySDKProxy(this, functions, zone);
|
||||
}
|
||||
}
|
||||
AngularFireFunctions.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireFunctions, deps: [{ token: FIREBASE_OPTIONS }, { token: FIREBASE_APP_NAME, optional: true }, { token: i0.NgZone }, { token: i1.ɵAngularFireSchedulers }, { token: REGION, optional: true }, { token: ORIGIN, optional: true }, { token: USE_EMULATOR, optional: true }, { token: i2.AppCheckInstances, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
||||
AngularFireFunctions.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireFunctions, providedIn: 'any' });
|
||||
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireFunctions, decorators: [{
|
||||
type: Injectable,
|
||||
args: [{
|
||||
providedIn: 'any'
|
||||
}]
|
||||
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
||||
type: Inject,
|
||||
args: [FIREBASE_OPTIONS]
|
||||
}] }, { type: undefined, decorators: [{
|
||||
type: Optional
|
||||
}, {
|
||||
type: Inject,
|
||||
args: [FIREBASE_APP_NAME]
|
||||
}] }, { type: i0.NgZone }, { type: i1.ɵAngularFireSchedulers }, { type: undefined, decorators: [{
|
||||
type: Optional
|
||||
}, {
|
||||
type: Inject,
|
||||
args: [REGION]
|
||||
}] }, { type: undefined, decorators: [{
|
||||
type: Optional
|
||||
}, {
|
||||
type: Inject,
|
||||
args: [ORIGIN]
|
||||
}] }, { type: undefined, decorators: [{
|
||||
type: Optional
|
||||
}, {
|
||||
type: Inject,
|
||||
args: [USE_EMULATOR]
|
||||
}] }, { type: i2.AppCheckInstances, decorators: [{
|
||||
type: Optional
|
||||
}] }]; } });
|
||||
ɵapplyMixins(AngularFireFunctions, [proxyPolyfillCompat]);
|
||||
|
||||
class AngularFireFunctionsModule {
|
||||
constructor() {
|
||||
firebase.registerVersion('angularfire', VERSION.full, 'fn-compat');
|
||||
}
|
||||
}
|
||||
AngularFireFunctionsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireFunctionsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
||||
AngularFireFunctionsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireFunctionsModule });
|
||||
AngularFireFunctionsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireFunctionsModule, providers: [AngularFireFunctions] });
|
||||
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireFunctionsModule, decorators: [{
|
||||
type: NgModule,
|
||||
args: [{
|
||||
providers: [AngularFireFunctions]
|
||||
}]
|
||||
}], ctorParameters: function () { return []; } });
|
||||
|
||||
/**
|
||||
* Generated bundle index. Do not edit.
|
||||
*/
|
||||
|
||||
export { AngularFireFunctions, AngularFireFunctionsModule, ORIGIN, REGION, USE_EMULATOR };
|
||||
//# sourceMappingURL=angular-fire-compat-functions.js.map
|
||||
1
node_modules/@angular/fire/fesm2015/angular-fire-compat-functions.js.map
generated
vendored
Normal file
1
node_modules/@angular/fire/fesm2015/angular-fire-compat-functions.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
105
node_modules/@angular/fire/fesm2015/angular-fire-compat-messaging.js
generated
vendored
Normal file
105
node_modules/@angular/fire/fesm2015/angular-fire-compat-messaging.js
generated
vendored
Normal file
|
|
@ -0,0 +1,105 @@
|
|||
import { __awaiter } from 'tslib';
|
||||
import * as i0 from '@angular/core';
|
||||
import { InjectionToken, PLATFORM_ID, Injectable, Inject, Optional, NgModule } from '@angular/core';
|
||||
import { of, EMPTY, Observable, concat } from 'rxjs';
|
||||
import { subscribeOn, observeOn, switchMap, map, shareReplay, switchMapTo, catchError, mergeMap, defaultIfEmpty } from 'rxjs/operators';
|
||||
import * as i1 from '@angular/fire';
|
||||
import { VERSION } from '@angular/fire';
|
||||
import { ɵfirebaseAppFactory, ɵcacheInstance, ɵlazySDKProxy, FIREBASE_OPTIONS, FIREBASE_APP_NAME, ɵapplyMixins } from '@angular/fire/compat';
|
||||
import { isSupported } from 'firebase/messaging';
|
||||
import firebase from 'firebase/compat/app';
|
||||
|
||||
// DO NOT MODIFY, this file is autogenerated by tools/build.ts
|
||||
// Export a null object with the same keys as firebase/compat/messaging, so Proxy can work with proxy-polyfill in Internet Explorer
|
||||
const proxyPolyfillCompat = {
|
||||
deleteToken: null,
|
||||
getToken: null,
|
||||
onMessage: null,
|
||||
onBackgroundMessage: null,
|
||||
};
|
||||
|
||||
const VAPID_KEY = new InjectionToken('angularfire2.messaging.vapid-key');
|
||||
const SERVICE_WORKER = new InjectionToken('angularfire2.messaging.service-worker-registeration');
|
||||
class AngularFireMessaging {
|
||||
constructor(options, name,
|
||||
// tslint:disable-next-line:ban-types
|
||||
platformId, zone, schedulers, vapidKey, _serviceWorker) {
|
||||
const serviceWorker = _serviceWorker;
|
||||
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, () => __awaiter(this, void 0, void 0, function* () {
|
||||
return app.messaging();
|
||||
}), [])), shareReplay({ bufferSize: 1, refCount: false }));
|
||||
this.requestPermission = messaging.pipe(subscribeOn(schedulers.outsideAngular), observeOn(schedulers.insideAngular), switchMap(() => Notification.requestPermission()));
|
||||
this.getToken = messaging.pipe(subscribeOn(schedulers.outsideAngular), observeOn(schedulers.insideAngular), switchMap((messaging) => __awaiter(this, void 0, void 0, function* () {
|
||||
if (Notification.permission === 'granted') {
|
||||
const serviceWorkerRegistration = serviceWorker ? yield serviceWorker : null;
|
||||
return yield messaging.getToken({ vapidKey, serviceWorkerRegistration });
|
||||
}
|
||||
else {
|
||||
return null;
|
||||
}
|
||||
})));
|
||||
const notificationPermission$ = new Observable(emitter => {
|
||||
navigator.permissions.query({ name: 'notifications' }).then(notificationPerm => {
|
||||
notificationPerm.onchange = () => emitter.next();
|
||||
});
|
||||
});
|
||||
const tokenChange$ = messaging.pipe(subscribeOn(schedulers.outsideAngular), observeOn(schedulers.insideAngular), switchMapTo(notificationPermission$), switchMapTo(this.getToken));
|
||||
this.tokenChanges = messaging.pipe(subscribeOn(schedulers.outsideAngular), observeOn(schedulers.insideAngular), switchMap(() => concat(this.getToken, tokenChange$)));
|
||||
this.messages = messaging.pipe(subscribeOn(schedulers.outsideAngular), observeOn(schedulers.insideAngular), switchMap(messaging => new Observable(emitter => messaging.onMessage(emitter))));
|
||||
this.requestToken = messaging.pipe(subscribeOn(schedulers.outsideAngular), observeOn(schedulers.insideAngular), switchMap(() => this.requestPermission), catchError(() => of(null)), mergeMap(() => this.tokenChanges));
|
||||
this.deleteToken = () => messaging.pipe(subscribeOn(schedulers.outsideAngular), observeOn(schedulers.insideAngular), switchMap(messaging => messaging.deleteToken()), defaultIfEmpty(false));
|
||||
return ɵlazySDKProxy(this, messaging, zone);
|
||||
}
|
||||
}
|
||||
AngularFireMessaging.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireMessaging, deps: [{ token: FIREBASE_OPTIONS }, { token: FIREBASE_APP_NAME, optional: true }, { token: PLATFORM_ID }, { token: i0.NgZone }, { token: i1.ɵAngularFireSchedulers }, { token: VAPID_KEY, optional: true }, { token: SERVICE_WORKER, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
||||
AngularFireMessaging.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireMessaging, providedIn: 'any' });
|
||||
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireMessaging, decorators: [{
|
||||
type: Injectable,
|
||||
args: [{
|
||||
providedIn: 'any'
|
||||
}]
|
||||
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
||||
type: Inject,
|
||||
args: [FIREBASE_OPTIONS]
|
||||
}] }, { type: undefined, decorators: [{
|
||||
type: Optional
|
||||
}, {
|
||||
type: Inject,
|
||||
args: [FIREBASE_APP_NAME]
|
||||
}] }, { type: Object, decorators: [{
|
||||
type: Inject,
|
||||
args: [PLATFORM_ID]
|
||||
}] }, { type: i0.NgZone }, { type: i1.ɵAngularFireSchedulers }, { type: undefined, decorators: [{
|
||||
type: Optional
|
||||
}, {
|
||||
type: Inject,
|
||||
args: [VAPID_KEY]
|
||||
}] }, { type: undefined, decorators: [{
|
||||
type: Optional
|
||||
}, {
|
||||
type: Inject,
|
||||
args: [SERVICE_WORKER]
|
||||
}] }]; } });
|
||||
ɵapplyMixins(AngularFireMessaging, [proxyPolyfillCompat]);
|
||||
|
||||
class AngularFireMessagingModule {
|
||||
constructor() {
|
||||
firebase.registerVersion('angularfire', VERSION.full, 'fcm-compat');
|
||||
}
|
||||
}
|
||||
AngularFireMessagingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireMessagingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
||||
AngularFireMessagingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireMessagingModule });
|
||||
AngularFireMessagingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireMessagingModule, providers: [AngularFireMessaging] });
|
||||
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireMessagingModule, decorators: [{
|
||||
type: NgModule,
|
||||
args: [{
|
||||
providers: [AngularFireMessaging]
|
||||
}]
|
||||
}], ctorParameters: function () { return []; } });
|
||||
|
||||
/**
|
||||
* Generated bundle index. Do not edit.
|
||||
*/
|
||||
|
||||
export { AngularFireMessaging, AngularFireMessagingModule, SERVICE_WORKER, VAPID_KEY };
|
||||
//# sourceMappingURL=angular-fire-compat-messaging.js.map
|
||||
1
node_modules/@angular/fire/fesm2015/angular-fire-compat-messaging.js.map
generated
vendored
Normal file
1
node_modules/@angular/fire/fesm2015/angular-fire-compat-messaging.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
170
node_modules/@angular/fire/fesm2015/angular-fire-compat-performance.js
generated
vendored
Normal file
170
node_modules/@angular/fire/fesm2015/angular-fire-compat-performance.js
generated
vendored
Normal file
|
|
@ -0,0 +1,170 @@
|
|||
import * as i0 from '@angular/core';
|
||||
import { InjectionToken, PLATFORM_ID, Injectable, Optional, Inject, NgModule } from '@angular/core';
|
||||
import { of, EMPTY, Observable } from 'rxjs';
|
||||
import { switchMap, map, shareReplay, tap, first } from 'rxjs/operators';
|
||||
import * as i1 from '@angular/fire/compat';
|
||||
import { ɵcacheInstance, ɵlazySDKProxy, ɵapplyMixins } from '@angular/fire/compat';
|
||||
import { isPlatformBrowser } from '@angular/common';
|
||||
import firebase from 'firebase/compat/app';
|
||||
import { VERSION } from '@angular/fire';
|
||||
|
||||
// DO NOT MODIFY, this file is autogenerated by tools/build.ts
|
||||
// Export a null object with the same keys as firebase/compat/performance, so Proxy can work with proxy-polyfill in Internet Explorer
|
||||
const proxyPolyfillCompat = {
|
||||
app: null,
|
||||
trace: null,
|
||||
instrumentationEnabled: null,
|
||||
dataCollectionEnabled: null,
|
||||
};
|
||||
|
||||
const INSTRUMENTATION_ENABLED = new InjectionToken('angularfire2.performance.instrumentationEnabled');
|
||||
const DATA_COLLECTION_ENABLED = new InjectionToken('angularfire2.performance.dataCollectionEnabled');
|
||||
class AngularFirePerformance {
|
||||
constructor(app, instrumentationEnabled, dataCollectionEnabled, zone,
|
||||
// tslint:disable-next-line:ban-types
|
||||
platformId) {
|
||||
this.zone = zone;
|
||||
this.performance = of(undefined).pipe(switchMap(() => isPlatformBrowser(platformId) ? zone.runOutsideAngular(() => import('firebase/compat/performance')) : EMPTY), map(() => ɵcacheInstance(`performance`, 'AngularFirePerformance', app.name, () => {
|
||||
const performance = zone.runOutsideAngular(() => app.performance());
|
||||
if (instrumentationEnabled === false) {
|
||||
performance.instrumentationEnabled = false;
|
||||
}
|
||||
if (dataCollectionEnabled === false) {
|
||||
performance.dataCollectionEnabled = false;
|
||||
}
|
||||
return performance;
|
||||
}, [instrumentationEnabled, dataCollectionEnabled])), shareReplay({ bufferSize: 1, refCount: false }));
|
||||
return ɵlazySDKProxy(this, this.performance, zone);
|
||||
}
|
||||
}
|
||||
AngularFirePerformance.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFirePerformance, deps: [{ token: i1.FirebaseApp }, { token: INSTRUMENTATION_ENABLED, optional: true }, { token: DATA_COLLECTION_ENABLED, optional: true }, { token: i0.NgZone }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable });
|
||||
AngularFirePerformance.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFirePerformance, providedIn: 'any' });
|
||||
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFirePerformance, decorators: [{
|
||||
type: Injectable,
|
||||
args: [{
|
||||
providedIn: 'any'
|
||||
}]
|
||||
}], ctorParameters: function () { return [{ type: i1.FirebaseApp }, { type: undefined, decorators: [{
|
||||
type: Optional
|
||||
}, {
|
||||
type: Inject,
|
||||
args: [INSTRUMENTATION_ENABLED]
|
||||
}] }, { type: undefined, decorators: [{
|
||||
type: Optional
|
||||
}, {
|
||||
type: Inject,
|
||||
args: [DATA_COLLECTION_ENABLED]
|
||||
}] }, { type: i0.NgZone }, { type: Object, decorators: [{
|
||||
type: Inject,
|
||||
args: [PLATFORM_ID]
|
||||
}] }]; } });
|
||||
const trace$ = (traceId) => {
|
||||
var _a;
|
||||
if (typeof window !== 'undefined' && ((_a = window.performance) === null || _a === void 0 ? void 0 : _a.mark)) {
|
||||
const entries = window.performance.getEntriesByName(traceId, 'measure') || [];
|
||||
const startMarkName = `_${traceId}Start[${entries.length}]`;
|
||||
const endMarkName = `_${traceId}End[${entries.length}]`;
|
||||
return new Observable(emitter => {
|
||||
window.performance.mark(startMarkName);
|
||||
emitter.next();
|
||||
return {
|
||||
unsubscribe: () => {
|
||||
window.performance.mark(endMarkName);
|
||||
window.performance.measure(traceId, startMarkName, endMarkName);
|
||||
}
|
||||
};
|
||||
});
|
||||
}
|
||||
else {
|
||||
return EMPTY;
|
||||
}
|
||||
};
|
||||
const traceUntil = (name, test, options) => (source$) => new Observable(subscriber => {
|
||||
const traceSubscription = trace$(name).subscribe();
|
||||
return source$.pipe(tap(a => test(a) && traceSubscription.unsubscribe(), () => {
|
||||
}, () => options && options.orComplete && traceSubscription.unsubscribe())).subscribe(subscriber);
|
||||
});
|
||||
const traceWhile = (name, test, options) => (source$) => new Observable(subscriber => {
|
||||
let traceSubscription;
|
||||
return source$.pipe(tap(a => {
|
||||
if (test(a)) {
|
||||
traceSubscription = traceSubscription || trace$(name).subscribe();
|
||||
}
|
||||
else {
|
||||
if (traceSubscription) {
|
||||
traceSubscription.unsubscribe();
|
||||
}
|
||||
traceSubscription = undefined;
|
||||
}
|
||||
}, () => {
|
||||
}, () => options && options.orComplete && traceSubscription && traceSubscription.unsubscribe())).subscribe(subscriber);
|
||||
});
|
||||
const traceUntilComplete = (name) => (source$) => new Observable(subscriber => {
|
||||
const traceSubscription = trace$(name).subscribe();
|
||||
return source$.pipe(tap(() => {
|
||||
}, () => {
|
||||
}, () => traceSubscription.unsubscribe())).subscribe(subscriber);
|
||||
});
|
||||
const traceUntilFirst = (name) => (source$) => new Observable(subscriber => {
|
||||
const traceSubscription = trace$(name).subscribe();
|
||||
return source$.pipe(tap(() => traceSubscription.unsubscribe(), () => {
|
||||
}, () => {
|
||||
})).subscribe(subscriber);
|
||||
});
|
||||
const trace = (name) => (source$) => new Observable(subscriber => {
|
||||
const traceSubscription = trace$(name).subscribe();
|
||||
return source$.pipe(tap(() => traceSubscription.unsubscribe(), () => {
|
||||
}, () => traceSubscription.unsubscribe())).subscribe(subscriber);
|
||||
});
|
||||
ɵapplyMixins(AngularFirePerformance, [proxyPolyfillCompat]);
|
||||
|
||||
const IS_STABLE_START_MARK = 'Zone';
|
||||
const IS_STABLE_END_MARK = '_isStableEnd';
|
||||
class PerformanceMonitoringService {
|
||||
constructor(appRef) {
|
||||
var _a;
|
||||
if (typeof window !== 'undefined' && ((_a = window.performance) === null || _a === void 0 ? void 0 : _a.mark)) {
|
||||
this.disposable = appRef.isStable.pipe(first(it => it), tap(() => {
|
||||
window.performance.mark(IS_STABLE_END_MARK);
|
||||
window.performance.measure('isStable', IS_STABLE_START_MARK, IS_STABLE_END_MARK);
|
||||
})).subscribe();
|
||||
}
|
||||
}
|
||||
ngOnDestroy() {
|
||||
if (this.disposable) {
|
||||
this.disposable.unsubscribe();
|
||||
}
|
||||
}
|
||||
}
|
||||
PerformanceMonitoringService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: PerformanceMonitoringService, deps: [{ token: i0.ApplicationRef }], target: i0.ɵɵFactoryTarget.Injectable });
|
||||
PerformanceMonitoringService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: PerformanceMonitoringService });
|
||||
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: PerformanceMonitoringService, decorators: [{
|
||||
type: Injectable
|
||||
}], ctorParameters: function () { return [{ type: i0.ApplicationRef }]; } });
|
||||
|
||||
class AngularFirePerformanceModule {
|
||||
constructor(perf, _) {
|
||||
firebase.registerVersion('angularfire', VERSION.full, 'perf-compat');
|
||||
// call anything here to get perf loading
|
||||
// tslint:disable-next-line:no-unused-expression
|
||||
perf.dataCollectionEnabled.then(() => { });
|
||||
}
|
||||
}
|
||||
AngularFirePerformanceModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFirePerformanceModule, deps: [{ token: AngularFirePerformance }, { token: PerformanceMonitoringService, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });
|
||||
AngularFirePerformanceModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFirePerformanceModule });
|
||||
AngularFirePerformanceModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFirePerformanceModule, providers: [AngularFirePerformance] });
|
||||
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFirePerformanceModule, decorators: [{
|
||||
type: NgModule,
|
||||
args: [{
|
||||
providers: [AngularFirePerformance]
|
||||
}]
|
||||
}], ctorParameters: function () { return [{ type: AngularFirePerformance }, { type: PerformanceMonitoringService, decorators: [{
|
||||
type: Optional
|
||||
}] }]; } });
|
||||
|
||||
/**
|
||||
* Generated bundle index. Do not edit.
|
||||
*/
|
||||
|
||||
export { AngularFirePerformance, AngularFirePerformanceModule, DATA_COLLECTION_ENABLED, INSTRUMENTATION_ENABLED, PerformanceMonitoringService, trace, traceUntil, traceUntilComplete, traceUntilFirst, traceWhile };
|
||||
//# sourceMappingURL=angular-fire-compat-performance.js.map
|
||||
1
node_modules/@angular/fire/fesm2015/angular-fire-compat-performance.js.map
generated
vendored
Normal file
1
node_modules/@angular/fire/fesm2015/angular-fire-compat-performance.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
234
node_modules/@angular/fire/fesm2015/angular-fire-compat-remote-config.js
generated
vendored
Normal file
234
node_modules/@angular/fire/fesm2015/angular-fire-compat-remote-config.js
generated
vendored
Normal file
|
|
@ -0,0 +1,234 @@
|
|||
import * as i0 from '@angular/core';
|
||||
import { InjectionToken, PLATFORM_ID, Injectable, Inject, Optional, NgModule } from '@angular/core';
|
||||
import { pipe, of, EMPTY, concat, Observable } from 'rxjs';
|
||||
import { map, distinctUntilChanged, filter, withLatestFrom, scan, observeOn, switchMap, startWith, shareReplay, groupBy, mergeMap, debounceTime } from 'rxjs/operators';
|
||||
import * as i1 from '@angular/fire';
|
||||
import { keepUnstableUntilFirst, VERSION } from '@angular/fire';
|
||||
import { ɵfirebaseAppFactory, ɵcacheInstance, ɵlazySDKProxy, FIREBASE_OPTIONS, FIREBASE_APP_NAME, ɵapplyMixins } from '@angular/fire/compat';
|
||||
import { isSupported } from 'firebase/remote-config';
|
||||
import firebase from 'firebase/compat/app';
|
||||
|
||||
// DO NOT MODIFY, this file is autogenerated by tools/build.ts
|
||||
// Export a null object with the same keys as firebase/compat/remote-config, so Proxy can work with proxy-polyfill in Internet Explorer
|
||||
const proxyPolyfillCompat = {
|
||||
app: null,
|
||||
settings: null,
|
||||
defaultConfig: null,
|
||||
fetchTimeMillis: null,
|
||||
lastFetchStatus: null,
|
||||
activate: null,
|
||||
ensureInitialized: null,
|
||||
fetch: null,
|
||||
fetchAndActivate: null,
|
||||
getAll: null,
|
||||
getBoolean: null,
|
||||
getNumber: null,
|
||||
getString: null,
|
||||
getValue: null,
|
||||
setLogLevel: null,
|
||||
};
|
||||
|
||||
const SETTINGS = new InjectionToken('angularfire2.remoteConfig.settings');
|
||||
const DEFAULTS = new InjectionToken('angularfire2.remoteConfig.defaultConfig');
|
||||
const AS_TO_FN = { strings: 'asString', numbers: 'asNumber', booleans: 'asBoolean' };
|
||||
const STATIC_VALUES = { numbers: 0, booleans: false, strings: undefined };
|
||||
// TODO look into the types here, I don't like the anys
|
||||
const proxyAll = (observable, as) => new Proxy(observable.pipe(mapToObject(as)), {
|
||||
get: (self, name) => self[name] || observable.pipe(map(all => all.find(p => p.key === name)), map(param => param ? param[AS_TO_FN[as]]() : STATIC_VALUES[as]), distinctUntilChanged())
|
||||
});
|
||||
// TODO export as implements Partial<...> so minor doesn't break us
|
||||
class Value {
|
||||
// tslint:disable-next-line:variable-name
|
||||
constructor(_source, _value) {
|
||||
this._source = _source;
|
||||
this._value = _value;
|
||||
}
|
||||
asBoolean() {
|
||||
return ['1', 'true', 't', 'y', 'yes', 'on'].indexOf(this._value.toLowerCase()) > -1;
|
||||
}
|
||||
asString() {
|
||||
return this._value;
|
||||
}
|
||||
asNumber() {
|
||||
return Number(this._value) || 0;
|
||||
}
|
||||
getSource() {
|
||||
return this._source;
|
||||
}
|
||||
}
|
||||
// SEMVER use ConstructorParameters when we can support Typescript 3.6
|
||||
class Parameter extends Value {
|
||||
constructor(key, fetchTimeMillis, source, value) {
|
||||
super(source, value);
|
||||
this.key = key;
|
||||
this.fetchTimeMillis = fetchTimeMillis;
|
||||
}
|
||||
}
|
||||
// If it's a Parameter array, test any, else test the individual Parameter
|
||||
const filterTest = (fn) => filter(it => Array.isArray(it) ? it.some(fn) : fn(it));
|
||||
// Allow the user to bypass the default values and wait till they get something from the server, even if it's a cached copy;
|
||||
// if used in conjuntion with first() it will only fetch RC values from the server if they aren't cached locally
|
||||
const filterRemote = () => filterTest(p => p.getSource() === 'remote');
|
||||
// filterFresh allows the developer to effectively set up a maximum cache time
|
||||
const filterFresh = (howRecentInMillis) => filterTest(p => p.fetchTimeMillis + howRecentInMillis >= new Date().getTime());
|
||||
// I ditched loading the defaults into RC and a simple map for scan since we already have our own defaults implementation.
|
||||
// The idea here being that if they have a default that never loads from the server, they will be able to tell via fetchTimeMillis
|
||||
// on the Parameter. Also if it doesn't come from the server it won't emit again in .changes, due to the distinctUntilChanged,
|
||||
// which we can simplify to === rather than deep comparison
|
||||
const scanToParametersArray = (remoteConfig) => pipe(withLatestFrom(remoteConfig), scan((existing, [all, rc]) => {
|
||||
// SEMVER use "new Set" to unique once we're only targeting es6
|
||||
// at the scale we expect remote config to be at, we probably won't see a performance hit from this unoptimized uniqueness
|
||||
// implementation.
|
||||
// const allKeys = [...new Set([...existing.map(p => p.key), ...Object.keys(all)])];
|
||||
const allKeys = [...existing.map(p => p.key), ...Object.keys(all)].filter((v, i, a) => a.indexOf(v) === i);
|
||||
return allKeys.map(key => {
|
||||
const updatedValue = all[key];
|
||||
return updatedValue ? new Parameter(key, rc ? rc.fetchTimeMillis : -1, updatedValue.getSource(), updatedValue.asString())
|
||||
: existing.find(p => p.key === key);
|
||||
});
|
||||
}, []));
|
||||
class AngularFireRemoteConfig {
|
||||
constructor(options, name, settings, defaultConfig, zone, schedulers,
|
||||
// tslint:disable-next-line:ban-types
|
||||
platformId) {
|
||||
this.zone = zone;
|
||||
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, () => {
|
||||
const rc = app.remoteConfig();
|
||||
if (settings) {
|
||||
rc.settings = settings;
|
||||
}
|
||||
if (defaultConfig) {
|
||||
rc.defaultConfig = defaultConfig;
|
||||
}
|
||||
return rc;
|
||||
}, [settings, defaultConfig])), startWith(undefined), shareReplay({ bufferSize: 1, refCount: false }));
|
||||
const loadedRemoteConfig$ = remoteConfig$.pipe(filter(rc => !!rc));
|
||||
const default$ = of(Object.keys(defaultConfig || {}).reduce((c, k) => (Object.assign(Object.assign({}, c), { [k]: new Value('default', defaultConfig[k].toString()) })), {}));
|
||||
// we should filter out the defaults we provided to RC, since we have our own implementation
|
||||
// that gives us a -1 for fetchTimeMillis (so filterFresh can filter them out)
|
||||
const filterOutDefaults = map(all => Object.keys(all)
|
||||
.filter(key => all[key].getSource() !== 'default')
|
||||
.reduce((acc, key) => (Object.assign(Object.assign({}, acc), { [key]: all[key] })), {}));
|
||||
const existing$ = loadedRemoteConfig$.pipe(switchMap(rc => rc.activate()
|
||||
.then(() => rc.ensureInitialized())
|
||||
.then(() => rc.getAll())), filterOutDefaults);
|
||||
const fresh$ = loadedRemoteConfig$.pipe(switchMap(rc => zone.runOutsideAngular(() => rc.fetchAndActivate()
|
||||
.then(() => rc.ensureInitialized())
|
||||
.then(() => rc.getAll()))), filterOutDefaults);
|
||||
this.parameters = concat(default$, existing$, fresh$).pipe(scanToParametersArray(remoteConfig$), keepUnstableUntilFirst, shareReplay({ bufferSize: 1, refCount: true }));
|
||||
this.changes = this.parameters.pipe(switchMap(params => of(...params)), groupBy(param => param.key), mergeMap(group => group.pipe(distinctUntilChanged())));
|
||||
this.strings = proxyAll(this.parameters, 'strings');
|
||||
this.booleans = proxyAll(this.parameters, 'booleans');
|
||||
this.numbers = proxyAll(this.parameters, 'numbers');
|
||||
return ɵlazySDKProxy(this, loadedRemoteConfig$, zone);
|
||||
}
|
||||
}
|
||||
AngularFireRemoteConfig.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.3", 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 });
|
||||
AngularFireRemoteConfig.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireRemoteConfig, providedIn: 'any' });
|
||||
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireRemoteConfig, decorators: [{
|
||||
type: Injectable,
|
||||
args: [{
|
||||
providedIn: 'any'
|
||||
}]
|
||||
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
||||
type: Inject,
|
||||
args: [FIREBASE_OPTIONS]
|
||||
}] }, { type: undefined, decorators: [{
|
||||
type: Optional
|
||||
}, {
|
||||
type: Inject,
|
||||
args: [FIREBASE_APP_NAME]
|
||||
}] }, { type: undefined, decorators: [{
|
||||
type: Optional
|
||||
}, {
|
||||
type: Inject,
|
||||
args: [SETTINGS]
|
||||
}] }, { type: undefined, decorators: [{
|
||||
type: Optional
|
||||
}, {
|
||||
type: Inject,
|
||||
args: [DEFAULTS]
|
||||
}] }, { type: i0.NgZone }, { type: i1.ɵAngularFireSchedulers }, { type: Object, decorators: [{
|
||||
type: Inject,
|
||||
args: [PLATFORM_ID]
|
||||
}] }]; } });
|
||||
const budget = (interval) => (source) => new Observable(observer => {
|
||||
let timedOut = false;
|
||||
// TODO use scheduler task rather than settimeout
|
||||
const timeout = setTimeout(() => {
|
||||
observer.complete();
|
||||
timedOut = true;
|
||||
}, interval);
|
||||
return source.subscribe({
|
||||
next(val) {
|
||||
if (!timedOut) {
|
||||
observer.next(val);
|
||||
}
|
||||
},
|
||||
error(err) {
|
||||
if (!timedOut) {
|
||||
clearTimeout(timeout);
|
||||
observer.error(err);
|
||||
}
|
||||
},
|
||||
complete() {
|
||||
if (!timedOut) {
|
||||
clearTimeout(timeout);
|
||||
observer.complete();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
const typedMethod = (it) => {
|
||||
switch (typeof it) {
|
||||
case 'string':
|
||||
return 'asString';
|
||||
case 'boolean':
|
||||
return 'asBoolean';
|
||||
case 'number':
|
||||
return 'asNumber';
|
||||
default:
|
||||
return 'asString';
|
||||
}
|
||||
};
|
||||
function scanToObject(to = 'strings') {
|
||||
return pipe(
|
||||
// TODO cleanup
|
||||
scan((c, p) => (Object.assign(Object.assign({}, c), { [p.key]: typeof to === 'object' ?
|
||||
p[typedMethod(to[p.key])]() :
|
||||
p[AS_TO_FN[to]]() })), typeof to === 'object' ?
|
||||
to :
|
||||
{}), debounceTime(1), budget(10), distinctUntilChanged((a, b) => JSON.stringify(a) === JSON.stringify(b)));
|
||||
}
|
||||
function mapToObject(to = 'strings') {
|
||||
return pipe(
|
||||
// TODO this is getting a little long, cleanup
|
||||
map((params) => params.reduce((c, p) => (Object.assign(Object.assign({}, c), { [p.key]: typeof to === 'object' ?
|
||||
p[typedMethod(to[p.key])]() :
|
||||
p[AS_TO_FN[to]]() })), typeof to === 'object' ?
|
||||
to :
|
||||
{})), distinctUntilChanged((a, b) => JSON.stringify(a) === JSON.stringify(b)));
|
||||
}
|
||||
ɵapplyMixins(AngularFireRemoteConfig, [proxyPolyfillCompat]);
|
||||
|
||||
class AngularFireRemoteConfigModule {
|
||||
constructor() {
|
||||
firebase.registerVersion('angularfire', VERSION.full, 'rc-compat');
|
||||
}
|
||||
}
|
||||
AngularFireRemoteConfigModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireRemoteConfigModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
||||
AngularFireRemoteConfigModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireRemoteConfigModule });
|
||||
AngularFireRemoteConfigModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireRemoteConfigModule, providers: [AngularFireRemoteConfig] });
|
||||
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireRemoteConfigModule, decorators: [{
|
||||
type: NgModule,
|
||||
args: [{
|
||||
providers: [AngularFireRemoteConfig]
|
||||
}]
|
||||
}], ctorParameters: function () { return []; } });
|
||||
|
||||
/**
|
||||
* Generated bundle index. Do not edit.
|
||||
*/
|
||||
|
||||
export { AngularFireRemoteConfig, AngularFireRemoteConfigModule, DEFAULTS, Parameter, SETTINGS, Value, budget, filterFresh, filterRemote, mapToObject, scanToObject };
|
||||
//# sourceMappingURL=angular-fire-compat-remote-config.js.map
|
||||
1
node_modules/@angular/fire/fesm2015/angular-fire-compat-remote-config.js.map
generated
vendored
Normal file
1
node_modules/@angular/fire/fesm2015/angular-fire-compat-remote-config.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
241
node_modules/@angular/fire/fesm2015/angular-fire-compat-storage.js
generated
vendored
Normal file
241
node_modules/@angular/fire/fesm2015/angular-fire-compat-storage.js
generated
vendored
Normal file
|
|
@ -0,0 +1,241 @@
|
|||
import { Observable, of, from } from 'rxjs';
|
||||
import { debounceTime, map, switchMap, tap } from 'rxjs/operators';
|
||||
import * as i1 from '@angular/fire';
|
||||
import { observeOutsideAngular, keepUnstableUntilFirst, VERSION } from '@angular/fire';
|
||||
import * as i0 from '@angular/core';
|
||||
import { InjectionToken, PLATFORM_ID, Injectable, Inject, Optional, Pipe, NgModule } from '@angular/core';
|
||||
import { ɵfirebaseAppFactory, ɵcacheInstance, FIREBASE_OPTIONS, FIREBASE_APP_NAME } from '@angular/fire/compat';
|
||||
import 'firebase/compat/storage';
|
||||
import * as i2 from '@angular/fire/app-check';
|
||||
import { AsyncPipe } from '@angular/common';
|
||||
import * as i2$1 from '@angular/platform-browser';
|
||||
import { makeStateKey } from '@angular/platform-browser';
|
||||
import firebase from 'firebase/compat/app';
|
||||
|
||||
// Things aren't working great, I'm having to put in a lot of work-arounds for what
|
||||
// appear to be Firebase JS SDK bugs https://github.com/firebase/firebase-js-sdk/issues/4158
|
||||
function fromTask(task) {
|
||||
return new Observable(subscriber => {
|
||||
const progress = (snap) => subscriber.next(snap);
|
||||
const error = e => subscriber.error(e);
|
||||
const complete = () => subscriber.complete();
|
||||
// emit the current snapshot, so they don't have to wait for state_changes
|
||||
// to fire next... this is stale if the task is no longer running :(
|
||||
progress(task.snapshot);
|
||||
const unsub = task.on('state_changed', progress);
|
||||
// it turns out that neither task snapshot nor 'state_changed' fire the last
|
||||
// snapshot before completion, the one with status 'success" and 100% progress
|
||||
// so let's use the promise form of the task for that
|
||||
task.then(snapshot => {
|
||||
progress(snapshot);
|
||||
complete();
|
||||
}, e => {
|
||||
// TODO investigate, again this is stale, we never fire a canceled or error it seems
|
||||
progress(task.snapshot);
|
||||
error(e);
|
||||
});
|
||||
// on's type if Function, rather than () => void, need to wrap
|
||||
return function unsubscribe() {
|
||||
unsub();
|
||||
};
|
||||
}).pipe(
|
||||
// deal with sync emissions from first emitting `task.snapshot`, this makes sure
|
||||
// that if the task is already finished we don't emit the old running state
|
||||
debounceTime(0));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an AngularFireUploadTask from a regular UploadTask from the Storage SDK.
|
||||
* This method creates an observable of the upload and returns on object that provides
|
||||
* multiple methods for controlling and monitoring the file upload.
|
||||
*/
|
||||
function createUploadTask(task) {
|
||||
const inner$ = fromTask(task);
|
||||
return {
|
||||
task,
|
||||
then: task.then.bind(task),
|
||||
catch: task.catch.bind(task),
|
||||
pause: task.pause.bind(task),
|
||||
cancel: task.cancel.bind(task),
|
||||
resume: task.resume.bind(task),
|
||||
snapshotChanges: () => inner$,
|
||||
percentageChanges: () => inner$.pipe(map(s => s.bytesTransferred / s.totalBytes * 100))
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an AngularFire wrapped Storage Reference. This object
|
||||
* creates observable methods from promise based methods.
|
||||
*/
|
||||
function createStorageRef(ref) {
|
||||
return {
|
||||
getDownloadURL: () => of(undefined).pipe(observeOutsideAngular, switchMap(() => ref.getDownloadURL()), keepUnstableUntilFirst),
|
||||
getMetadata: () => of(undefined).pipe(observeOutsideAngular, switchMap(() => ref.getMetadata()), keepUnstableUntilFirst),
|
||||
delete: () => from(ref.delete()),
|
||||
child: (path) => createStorageRef(ref.child(path)),
|
||||
updateMetadata: (meta) => from(ref.updateMetadata(meta)),
|
||||
put: (data, metadata) => {
|
||||
const task = ref.put(data, metadata);
|
||||
return createUploadTask(task);
|
||||
},
|
||||
putString: (data, format, metadata) => {
|
||||
const task = ref.putString(data, format, metadata);
|
||||
return createUploadTask(task);
|
||||
},
|
||||
list: (options) => from(ref.list(options)),
|
||||
listAll: () => from(ref.listAll())
|
||||
};
|
||||
}
|
||||
|
||||
const BUCKET = new InjectionToken('angularfire2.storageBucket');
|
||||
const MAX_UPLOAD_RETRY_TIME = new InjectionToken('angularfire2.storage.maxUploadRetryTime');
|
||||
const MAX_OPERATION_RETRY_TIME = new InjectionToken('angularfire2.storage.maxOperationRetryTime');
|
||||
const USE_EMULATOR = new InjectionToken('angularfire2.storage.use-emulator');
|
||||
/**
|
||||
* AngularFireStorage Service
|
||||
*
|
||||
* This service is the main entry point for this feature module. It provides
|
||||
* an API for uploading and downloading binary files from Cloud Storage for
|
||||
* Firebase.
|
||||
*/
|
||||
class AngularFireStorage {
|
||||
constructor(options, name, storageBucket,
|
||||
// tslint:disable-next-line:ban-types
|
||||
platformId, zone, schedulers, maxUploadRetryTime, maxOperationRetryTime, _useEmulator, _appCheckInstances) {
|
||||
const app = ɵfirebaseAppFactory(options, zone, name);
|
||||
this.storage = ɵcacheInstance(`${app.name}.storage.${storageBucket}`, 'AngularFireStorage', app.name, () => {
|
||||
const storage = zone.runOutsideAngular(() => app.storage(storageBucket || undefined));
|
||||
const useEmulator = _useEmulator;
|
||||
if (useEmulator) {
|
||||
storage.useEmulator(...useEmulator);
|
||||
}
|
||||
if (maxUploadRetryTime) {
|
||||
storage.setMaxUploadRetryTime(maxUploadRetryTime);
|
||||
}
|
||||
if (maxOperationRetryTime) {
|
||||
storage.setMaxOperationRetryTime(maxOperationRetryTime);
|
||||
}
|
||||
return storage;
|
||||
}, [maxUploadRetryTime, maxOperationRetryTime]);
|
||||
}
|
||||
ref(path) {
|
||||
return createStorageRef(this.storage.ref(path));
|
||||
}
|
||||
refFromURL(path) {
|
||||
return createStorageRef(this.storage.refFromURL(path));
|
||||
}
|
||||
upload(path, data, metadata) {
|
||||
const storageRef = this.storage.ref(path);
|
||||
const ref = createStorageRef(storageRef);
|
||||
return ref.put(data, metadata);
|
||||
}
|
||||
}
|
||||
AngularFireStorage.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.3", 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 });
|
||||
AngularFireStorage.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireStorage, providedIn: 'any' });
|
||||
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireStorage, decorators: [{
|
||||
type: Injectable,
|
||||
args: [{
|
||||
providedIn: 'any'
|
||||
}]
|
||||
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
||||
type: Inject,
|
||||
args: [FIREBASE_OPTIONS]
|
||||
}] }, { type: undefined, decorators: [{
|
||||
type: Optional
|
||||
}, {
|
||||
type: Inject,
|
||||
args: [FIREBASE_APP_NAME]
|
||||
}] }, { type: undefined, decorators: [{
|
||||
type: Optional
|
||||
}, {
|
||||
type: Inject,
|
||||
args: [BUCKET]
|
||||
}] }, { type: Object, decorators: [{
|
||||
type: Inject,
|
||||
args: [PLATFORM_ID]
|
||||
}] }, { type: i0.NgZone }, { type: i1.ɵAngularFireSchedulers }, { type: undefined, decorators: [{
|
||||
type: Optional
|
||||
}, {
|
||||
type: Inject,
|
||||
args: [MAX_UPLOAD_RETRY_TIME]
|
||||
}] }, { type: undefined, decorators: [{
|
||||
type: Optional
|
||||
}, {
|
||||
type: Inject,
|
||||
args: [MAX_OPERATION_RETRY_TIME]
|
||||
}] }, { type: undefined, decorators: [{
|
||||
type: Optional
|
||||
}, {
|
||||
type: Inject,
|
||||
args: [USE_EMULATOR]
|
||||
}] }, { type: i2.AppCheckInstances, decorators: [{
|
||||
type: Optional
|
||||
}] }]; } });
|
||||
|
||||
/** to be used with in combination with | async */
|
||||
class GetDownloadURLPipe {
|
||||
constructor(storage, cdr, state) {
|
||||
this.storage = storage;
|
||||
this.state = state;
|
||||
this.asyncPipe = new AsyncPipe(cdr);
|
||||
}
|
||||
transform(path) {
|
||||
var _a;
|
||||
if (path !== this.path) {
|
||||
this.path = path;
|
||||
const key = makeStateKey(`|getDownloadURL|${path}`);
|
||||
const existing = (_a = this.state) === null || _a === void 0 ? void 0 : _a.get(key, undefined);
|
||||
this.downloadUrl$ = existing ? of(existing) : this.storage.ref(path).getDownloadURL().pipe(tap(it => { var _a; return (_a = this.state) === null || _a === void 0 ? void 0 : _a.set(key, it); }));
|
||||
}
|
||||
return this.asyncPipe.transform(this.downloadUrl$);
|
||||
}
|
||||
ngOnDestroy() {
|
||||
this.asyncPipe.ngOnDestroy();
|
||||
}
|
||||
}
|
||||
GetDownloadURLPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: GetDownloadURLPipe, deps: [{ token: AngularFireStorage }, { token: i0.ChangeDetectorRef }, { token: i2$1.TransferState, optional: true }], target: i0.ɵɵFactoryTarget.Pipe });
|
||||
GetDownloadURLPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: GetDownloadURLPipe, name: "getDownloadURL", pure: false });
|
||||
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: GetDownloadURLPipe, decorators: [{
|
||||
type: Pipe,
|
||||
args: [{
|
||||
name: 'getDownloadURL',
|
||||
pure: false,
|
||||
}]
|
||||
}], ctorParameters: function () { return [{ type: AngularFireStorage }, { type: i0.ChangeDetectorRef }, { type: i2$1.TransferState, decorators: [{
|
||||
type: Optional
|
||||
}] }]; } });
|
||||
class GetDownloadURLPipeModule {
|
||||
}
|
||||
GetDownloadURLPipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: GetDownloadURLPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
||||
GetDownloadURLPipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: GetDownloadURLPipeModule, declarations: [GetDownloadURLPipe], exports: [GetDownloadURLPipe] });
|
||||
GetDownloadURLPipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: GetDownloadURLPipeModule });
|
||||
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: GetDownloadURLPipeModule, decorators: [{
|
||||
type: NgModule,
|
||||
args: [{
|
||||
declarations: [GetDownloadURLPipe],
|
||||
exports: [GetDownloadURLPipe],
|
||||
}]
|
||||
}] });
|
||||
|
||||
class AngularFireStorageModule {
|
||||
constructor() {
|
||||
firebase.registerVersion('angularfire', VERSION.full, 'gcs-compat');
|
||||
}
|
||||
}
|
||||
AngularFireStorageModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireStorageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
||||
AngularFireStorageModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireStorageModule, exports: [GetDownloadURLPipeModule] });
|
||||
AngularFireStorageModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireStorageModule, providers: [AngularFireStorage], imports: [GetDownloadURLPipeModule] });
|
||||
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireStorageModule, decorators: [{
|
||||
type: NgModule,
|
||||
args: [{
|
||||
exports: [GetDownloadURLPipeModule],
|
||||
providers: [AngularFireStorage]
|
||||
}]
|
||||
}], ctorParameters: function () { return []; } });
|
||||
|
||||
/**
|
||||
* Generated bundle index. Do not edit.
|
||||
*/
|
||||
|
||||
export { AngularFireStorage, AngularFireStorageModule, BUCKET, GetDownloadURLPipe, GetDownloadURLPipeModule, MAX_OPERATION_RETRY_TIME, MAX_UPLOAD_RETRY_TIME, USE_EMULATOR, createStorageRef, createUploadTask, fromTask };
|
||||
//# sourceMappingURL=angular-fire-compat-storage.js.map
|
||||
1
node_modules/@angular/fire/fesm2015/angular-fire-compat-storage.js.map
generated
vendored
Normal file
1
node_modules/@angular/fire/fesm2015/angular-fire-compat-storage.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
173
node_modules/@angular/fire/fesm2015/angular-fire-compat.js
generated
vendored
Normal file
173
node_modules/@angular/fire/fesm2015/angular-fire-compat.js
generated
vendored
Normal file
|
|
@ -0,0 +1,173 @@
|
|||
import * as i0 from '@angular/core';
|
||||
import { InjectionToken, isDevMode, NgZone, Optional, VERSION as VERSION$1, PLATFORM_ID, NgModule, Inject } from '@angular/core';
|
||||
import firebase from 'firebase/compat/app';
|
||||
import { VERSION } from '@angular/fire';
|
||||
|
||||
// DEBUG quick debugger function for inline logging that typescript doesn't complain about
|
||||
// wrote it for debugging the ɵlazySDKProxy, commenting out for now; should consider exposing a
|
||||
// verbose mode for AngularFire in a future release that uses something like this in multiple places
|
||||
// usage: () => log('something') || returnValue
|
||||
// const log = (...args: any[]): false => { console.log(...args); return false }
|
||||
// The problem here are things like ngOnDestroy are missing, then triggering the service
|
||||
// rather than dig too far; I'm capturing these as I go.
|
||||
const noopFunctions = ['ngOnDestroy'];
|
||||
// INVESTIGATE should we make the Proxy revokable and do some cleanup?
|
||||
// right now it's fairly simple but I'm sure this will grow in complexity
|
||||
const ɵlazySDKProxy = (klass, observable, zone, options = {}) => {
|
||||
return new Proxy(klass, {
|
||||
get: (_, name) => zone.runOutsideAngular(() => {
|
||||
var _a;
|
||||
if (klass[name]) {
|
||||
if ((_a = options === null || options === void 0 ? void 0 : options.spy) === null || _a === void 0 ? void 0 : _a.get) {
|
||||
options.spy.get(name, klass[name]);
|
||||
}
|
||||
return klass[name];
|
||||
}
|
||||
if (noopFunctions.indexOf(name) > -1) {
|
||||
return () => {
|
||||
};
|
||||
}
|
||||
const promise = observable.toPromise().then(mod => {
|
||||
const ret = mod && mod[name];
|
||||
// TODO move to proper type guards
|
||||
if (typeof ret === 'function') {
|
||||
return ret.bind(mod);
|
||||
}
|
||||
else if (ret && ret.then) {
|
||||
return ret.then((res) => zone.run(() => res));
|
||||
}
|
||||
else {
|
||||
return zone.run(() => ret);
|
||||
}
|
||||
});
|
||||
// recurse the proxy
|
||||
return new Proxy(() => { }, {
|
||||
get: (_, name) => promise[name],
|
||||
// TODO handle callbacks as transparently as I can
|
||||
apply: (self, _, args) => promise.then(it => {
|
||||
var _a;
|
||||
const res = it && it(...args);
|
||||
if ((_a = options === null || options === void 0 ? void 0 : options.spy) === null || _a === void 0 ? void 0 : _a.apply) {
|
||||
options.spy.apply(name, args, res);
|
||||
}
|
||||
return res;
|
||||
})
|
||||
});
|
||||
})
|
||||
});
|
||||
};
|
||||
const ɵapplyMixins = (derivedCtor, constructors) => {
|
||||
constructors.forEach((baseCtor) => {
|
||||
Object.getOwnPropertyNames(baseCtor.prototype || baseCtor).forEach((name) => {
|
||||
Object.defineProperty(derivedCtor.prototype, name, Object.getOwnPropertyDescriptor(baseCtor.prototype || baseCtor, name));
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
class FirebaseApp {
|
||||
constructor(app) {
|
||||
return app;
|
||||
}
|
||||
}
|
||||
|
||||
const FIREBASE_OPTIONS = new InjectionToken('angularfire2.app.options');
|
||||
const FIREBASE_APP_NAME = new InjectionToken('angularfire2.app.name');
|
||||
function ɵfirebaseAppFactory(options, zone, nameOrConfig) {
|
||||
const name = typeof nameOrConfig === 'string' && nameOrConfig || '[DEFAULT]';
|
||||
const config = typeof nameOrConfig === 'object' && nameOrConfig || {};
|
||||
config.name = config.name || name;
|
||||
// Added any due to some inconsistency between @firebase/app and firebase types
|
||||
const existingApp = firebase.apps.filter(app => app && app.name === config.name)[0];
|
||||
// We support FirebaseConfig, initializeApp's public type only accepts string; need to cast as any
|
||||
// Could be solved with https://github.com/firebase/firebase-js-sdk/pull/1206
|
||||
const app = (existingApp || zone.runOutsideAngular(() => firebase.initializeApp(options, config)));
|
||||
try {
|
||||
if (JSON.stringify(options) !== JSON.stringify(app.options)) {
|
||||
const hmr = !!module.hot;
|
||||
log$1('error', `${app.name} Firebase App already initialized with different options${hmr ? ', you may need to reload as Firebase is not HMR aware.' : '.'}`);
|
||||
}
|
||||
}
|
||||
catch (e) { }
|
||||
return new FirebaseApp(app);
|
||||
}
|
||||
const log$1 = (level, ...args) => {
|
||||
if (isDevMode() && typeof console !== 'undefined') {
|
||||
console[level](...args);
|
||||
}
|
||||
};
|
||||
const FIREBASE_APP_PROVIDER = {
|
||||
provide: FirebaseApp,
|
||||
useFactory: ɵfirebaseAppFactory,
|
||||
deps: [
|
||||
FIREBASE_OPTIONS,
|
||||
NgZone,
|
||||
[new Optional(), FIREBASE_APP_NAME]
|
||||
]
|
||||
};
|
||||
class AngularFireModule {
|
||||
// tslint:disable-next-line:ban-types
|
||||
constructor(platformId) {
|
||||
firebase.registerVersion('angularfire', VERSION.full, 'core');
|
||||
firebase.registerVersion('angularfire', VERSION.full, 'app-compat');
|
||||
firebase.registerVersion('angular', VERSION$1.full, platformId.toString());
|
||||
}
|
||||
static initializeApp(options, nameOrConfig) {
|
||||
return {
|
||||
ngModule: AngularFireModule,
|
||||
providers: [
|
||||
{ provide: FIREBASE_OPTIONS, useValue: options },
|
||||
{ provide: FIREBASE_APP_NAME, useValue: nameOrConfig }
|
||||
]
|
||||
};
|
||||
}
|
||||
}
|
||||
AngularFireModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireModule, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.NgModule });
|
||||
AngularFireModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireModule });
|
||||
AngularFireModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireModule, providers: [FIREBASE_APP_PROVIDER] });
|
||||
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireModule, decorators: [{
|
||||
type: NgModule,
|
||||
args: [{
|
||||
providers: [FIREBASE_APP_PROVIDER]
|
||||
}]
|
||||
}], ctorParameters: function () { return [{ type: Object, decorators: [{
|
||||
type: Inject,
|
||||
args: [PLATFORM_ID]
|
||||
}] }]; } });
|
||||
|
||||
function ɵcacheInstance(cacheKey, moduleName, appName, fn, deps) {
|
||||
const [, instance, cachedDeps] = globalThis.ɵAngularfireInstanceCache.find((it) => it[0] === cacheKey) || [];
|
||||
if (instance) {
|
||||
if (!matchDep(deps, cachedDeps)) {
|
||||
log('error', `${moduleName} was already initialized on the ${appName} Firebase App with different settings.${IS_HMR ? ' You may need to reload as Firebase is not HMR aware.' : ''}`);
|
||||
log('warn', { is: deps, was: cachedDeps });
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
else {
|
||||
const newInstance = fn();
|
||||
globalThis.ɵAngularfireInstanceCache.push([cacheKey, newInstance, deps]);
|
||||
return newInstance;
|
||||
}
|
||||
}
|
||||
function matchDep(a, b) {
|
||||
try {
|
||||
return a.toString() === b.toString();
|
||||
}
|
||||
catch (_) {
|
||||
return a === b;
|
||||
}
|
||||
}
|
||||
const IS_HMR = !!module.hot;
|
||||
const log = (level, ...args) => {
|
||||
if (isDevMode() && typeof console !== 'undefined') {
|
||||
console[level](...args);
|
||||
}
|
||||
};
|
||||
globalThis.ɵAngularfireInstanceCache || (globalThis.ɵAngularfireInstanceCache = []);
|
||||
|
||||
/**
|
||||
* Generated bundle index. Do not edit.
|
||||
*/
|
||||
|
||||
export { AngularFireModule, FIREBASE_APP_NAME, FIREBASE_OPTIONS, FirebaseApp, ɵapplyMixins, ɵcacheInstance, ɵfirebaseAppFactory, ɵlazySDKProxy };
|
||||
//# sourceMappingURL=angular-fire-compat.js.map
|
||||
1
node_modules/@angular/fire/fesm2015/angular-fire-compat.js.map
generated
vendored
Normal file
1
node_modules/@angular/fire/fesm2015/angular-fire-compat.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
150
node_modules/@angular/fire/fesm2015/angular-fire-database.js
generated
vendored
Normal file
150
node_modules/@angular/fire/fesm2015/angular-fire-database.js
generated
vendored
Normal file
|
|
@ -0,0 +1,150 @@
|
|||
import { ɵgetAllInstancesOf, ɵgetDefaultInstanceOf, VERSION, ɵAngularFireSchedulers, ɵzoneWrap } from '@angular/fire';
|
||||
import { timer, from } from 'rxjs';
|
||||
import { concatMap, distinct } from 'rxjs/operators';
|
||||
import * as i0 from '@angular/core';
|
||||
import { InjectionToken, Optional, NgModule, NgZone, Injector } from '@angular/core';
|
||||
import { AuthInstances } from '@angular/fire/auth';
|
||||
import { FirebaseApp, FirebaseApps } from '@angular/fire/app';
|
||||
import { registerVersion } from 'firebase/app';
|
||||
import { AppCheckInstances } from '@angular/fire/app-check';
|
||||
import { fromRef as fromRef$1, stateChanges as stateChanges$1, list as list$1, listVal as listVal$1, auditTrail as auditTrail$1, object as object$1, objectVal as objectVal$1, changeToData as changeToData$1 } from 'rxfire/database';
|
||||
export { ListenEvent, ListenerMethods } from 'rxfire/database';
|
||||
import { child as child$1, connectDatabaseEmulator as connectDatabaseEmulator$1, enableLogging as enableLogging$1, endAt as endAt$1, endBefore as endBefore$1, equalTo as equalTo$1, forceLongPolling as forceLongPolling$1, forceWebSockets as forceWebSockets$1, get as get$1, getDatabase as getDatabase$1, goOffline as goOffline$1, goOnline as goOnline$1, increment as increment$1, limitToFirst as limitToFirst$1, limitToLast as limitToLast$1, off as off$1, onChildAdded as onChildAdded$1, onChildChanged as onChildChanged$1, onChildMoved as onChildMoved$1, onChildRemoved as onChildRemoved$1, onDisconnect as onDisconnect$1, onValue as onValue$1, orderByChild as orderByChild$1, orderByKey as orderByKey$1, orderByPriority as orderByPriority$1, orderByValue as orderByValue$1, push as push$1, query as query$1, ref as ref$1, refFromURL as refFromURL$1, remove as remove$1, runTransaction as runTransaction$1, serverTimestamp as serverTimestamp$1, set as set$1, setPriority as setPriority$1, setWithPriority as setWithPriority$1, startAfter as startAfter$1, startAt as startAt$1, update as update$1 } from 'firebase/database';
|
||||
export * from 'firebase/database';
|
||||
|
||||
class Database {
|
||||
constructor(database) {
|
||||
return database;
|
||||
}
|
||||
}
|
||||
const DATABASE_PROVIDER_NAME = 'database';
|
||||
class DatabaseInstances {
|
||||
constructor() {
|
||||
return ɵgetAllInstancesOf(DATABASE_PROVIDER_NAME);
|
||||
}
|
||||
}
|
||||
const databaseInstance$ = timer(0, 300).pipe(concatMap(() => from(ɵgetAllInstancesOf(DATABASE_PROVIDER_NAME))), distinct());
|
||||
|
||||
const PROVIDED_DATABASE_INSTANCES = new InjectionToken('angularfire2.database-instances');
|
||||
function defaultDatabaseInstanceFactory(provided, defaultApp) {
|
||||
const defaultDatabase = ɵgetDefaultInstanceOf(DATABASE_PROVIDER_NAME, provided, defaultApp);
|
||||
return defaultDatabase && new Database(defaultDatabase);
|
||||
}
|
||||
function databaseInstanceFactory(fn) {
|
||||
return (zone, injector) => {
|
||||
const database = zone.runOutsideAngular(() => fn(injector));
|
||||
return new Database(database);
|
||||
};
|
||||
}
|
||||
const DATABASE_INSTANCES_PROVIDER = {
|
||||
provide: DatabaseInstances,
|
||||
deps: [
|
||||
[new Optional(), PROVIDED_DATABASE_INSTANCES],
|
||||
]
|
||||
};
|
||||
const DEFAULT_DATABASE_INSTANCE_PROVIDER = {
|
||||
provide: Database,
|
||||
useFactory: defaultDatabaseInstanceFactory,
|
||||
deps: [
|
||||
[new Optional(), PROVIDED_DATABASE_INSTANCES],
|
||||
FirebaseApp,
|
||||
]
|
||||
};
|
||||
class DatabaseModule {
|
||||
constructor() {
|
||||
registerVersion('angularfire', VERSION.full, 'rtdb');
|
||||
}
|
||||
}
|
||||
DatabaseModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: DatabaseModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
||||
DatabaseModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: DatabaseModule });
|
||||
DatabaseModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: DatabaseModule, providers: [
|
||||
DEFAULT_DATABASE_INSTANCE_PROVIDER,
|
||||
DATABASE_INSTANCES_PROVIDER,
|
||||
] });
|
||||
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: DatabaseModule, decorators: [{
|
||||
type: NgModule,
|
||||
args: [{
|
||||
providers: [
|
||||
DEFAULT_DATABASE_INSTANCE_PROVIDER,
|
||||
DATABASE_INSTANCES_PROVIDER,
|
||||
]
|
||||
}]
|
||||
}], ctorParameters: function () { return []; } });
|
||||
function provideDatabase(fn, ...deps) {
|
||||
return {
|
||||
ngModule: DatabaseModule,
|
||||
providers: [{
|
||||
provide: PROVIDED_DATABASE_INSTANCES,
|
||||
useFactory: databaseInstanceFactory(fn),
|
||||
multi: true,
|
||||
deps: [
|
||||
NgZone,
|
||||
Injector,
|
||||
ɵAngularFireSchedulers,
|
||||
FirebaseApps,
|
||||
// Database+Auth work better if Auth is loaded first
|
||||
[new Optional(), AuthInstances],
|
||||
[new Optional(), AppCheckInstances],
|
||||
...deps,
|
||||
]
|
||||
}]
|
||||
};
|
||||
}
|
||||
|
||||
// DO NOT MODIFY, this file is autogenerated by tools/build.ts
|
||||
const fromRef = ɵzoneWrap(fromRef$1, true);
|
||||
const stateChanges = ɵzoneWrap(stateChanges$1, true);
|
||||
const list = ɵzoneWrap(list$1, true);
|
||||
const listVal = ɵzoneWrap(listVal$1, true);
|
||||
const auditTrail = ɵzoneWrap(auditTrail$1, true);
|
||||
const object = ɵzoneWrap(object$1, true);
|
||||
const objectVal = ɵzoneWrap(objectVal$1, true);
|
||||
const changeToData = ɵzoneWrap(changeToData$1, true);
|
||||
|
||||
// DO NOT MODIFY, this file is autogenerated by tools/build.ts
|
||||
const child = ɵzoneWrap(child$1, true);
|
||||
const connectDatabaseEmulator = ɵzoneWrap(connectDatabaseEmulator$1, true);
|
||||
const enableLogging = ɵzoneWrap(enableLogging$1, true);
|
||||
const endAt = ɵzoneWrap(endAt$1, true);
|
||||
const endBefore = ɵzoneWrap(endBefore$1, true);
|
||||
const equalTo = ɵzoneWrap(equalTo$1, true);
|
||||
const forceLongPolling = ɵzoneWrap(forceLongPolling$1, true);
|
||||
const forceWebSockets = ɵzoneWrap(forceWebSockets$1, true);
|
||||
const get = ɵzoneWrap(get$1, true);
|
||||
const getDatabase = ɵzoneWrap(getDatabase$1, true);
|
||||
const goOffline = ɵzoneWrap(goOffline$1, true);
|
||||
const goOnline = ɵzoneWrap(goOnline$1, true);
|
||||
const increment = ɵzoneWrap(increment$1, true);
|
||||
const limitToFirst = ɵzoneWrap(limitToFirst$1, true);
|
||||
const limitToLast = ɵzoneWrap(limitToLast$1, true);
|
||||
const off = ɵzoneWrap(off$1, true);
|
||||
const onChildAdded = ɵzoneWrap(onChildAdded$1, true);
|
||||
const onChildChanged = ɵzoneWrap(onChildChanged$1, true);
|
||||
const onChildMoved = ɵzoneWrap(onChildMoved$1, true);
|
||||
const onChildRemoved = ɵzoneWrap(onChildRemoved$1, true);
|
||||
const onDisconnect = ɵzoneWrap(onDisconnect$1, true);
|
||||
const onValue = ɵzoneWrap(onValue$1, true);
|
||||
const orderByChild = ɵzoneWrap(orderByChild$1, true);
|
||||
const orderByKey = ɵzoneWrap(orderByKey$1, true);
|
||||
const orderByPriority = ɵzoneWrap(orderByPriority$1, true);
|
||||
const orderByValue = ɵzoneWrap(orderByValue$1, true);
|
||||
const push = ɵzoneWrap(push$1, true);
|
||||
const query = ɵzoneWrap(query$1, true);
|
||||
const ref = ɵzoneWrap(ref$1, true);
|
||||
const refFromURL = ɵzoneWrap(refFromURL$1, true);
|
||||
const remove = ɵzoneWrap(remove$1, true);
|
||||
const runTransaction = ɵzoneWrap(runTransaction$1, true);
|
||||
const serverTimestamp = ɵzoneWrap(serverTimestamp$1, true);
|
||||
const set = ɵzoneWrap(set$1, true);
|
||||
const setPriority = ɵzoneWrap(setPriority$1, true);
|
||||
const setWithPriority = ɵzoneWrap(setWithPriority$1, true);
|
||||
const startAfter = ɵzoneWrap(startAfter$1, true);
|
||||
const startAt = ɵzoneWrap(startAt$1, true);
|
||||
const update = ɵzoneWrap(update$1, true);
|
||||
|
||||
/**
|
||||
* Generated bundle index. Do not edit.
|
||||
*/
|
||||
|
||||
export { Database, DatabaseInstances, DatabaseModule, auditTrail, changeToData, child, connectDatabaseEmulator, databaseInstance$, enableLogging, endAt, endBefore, equalTo, forceLongPolling, forceWebSockets, fromRef, get, getDatabase, goOffline, goOnline, increment, limitToFirst, limitToLast, list, listVal, object, objectVal, off, onChildAdded, onChildChanged, onChildMoved, onChildRemoved, onDisconnect, onValue, orderByChild, orderByKey, orderByPriority, orderByValue, provideDatabase, push, query, ref, refFromURL, remove, runTransaction, serverTimestamp, set, setPriority, setWithPriority, startAfter, startAt, stateChanges, update };
|
||||
//# sourceMappingURL=angular-fire-database.js.map
|
||||
1
node_modules/@angular/fire/fesm2015/angular-fire-database.js.map
generated
vendored
Normal file
1
node_modules/@angular/fire/fesm2015/angular-fire-database.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
142
node_modules/@angular/fire/fesm2015/angular-fire-firestore-lite.js
generated
vendored
Normal file
142
node_modules/@angular/fire/fesm2015/angular-fire-firestore-lite.js
generated
vendored
Normal file
|
|
@ -0,0 +1,142 @@
|
|||
import { ɵgetAllInstancesOf, ɵgetDefaultInstanceOf, VERSION, ɵAngularFireSchedulers, ɵzoneWrap } from '@angular/fire';
|
||||
import { timer, from } from 'rxjs';
|
||||
import { concatMap, distinct } from 'rxjs/operators';
|
||||
import * as i0 from '@angular/core';
|
||||
import { InjectionToken, Optional, NgModule, NgZone, Injector } from '@angular/core';
|
||||
import { AuthInstances } from '@angular/fire/auth';
|
||||
import { FirebaseApp, FirebaseApps } from '@angular/fire/app';
|
||||
import { registerVersion } from 'firebase/app';
|
||||
import { AppCheckInstances } from '@angular/fire/app-check';
|
||||
import { collection as collection$1, collectionData as collectionData$1, doc as doc$1, docData as docData$1, snapToData as snapToData$1, fromRef as fromRef$1 } from 'rxfire/firestore/lite';
|
||||
import { addDoc as addDoc$1, arrayRemove as arrayRemove$1, arrayUnion as arrayUnion$1, collection as collection$2, collectionGroup as collectionGroup$1, connectFirestoreEmulator as connectFirestoreEmulator$1, deleteDoc as deleteDoc$1, deleteField as deleteField$1, doc as doc$2, documentId as documentId$1, endAt as endAt$1, endBefore as endBefore$1, getDoc as getDoc$1, getDocs as getDocs$1, getFirestore as getFirestore$1, increment as increment$1, initializeFirestore as initializeFirestore$1, limit as limit$1, limitToLast as limitToLast$1, orderBy as orderBy$1, query as query$1, queryEqual as queryEqual$1, refEqual as refEqual$1, runTransaction as runTransaction$1, serverTimestamp as serverTimestamp$1, setDoc as setDoc$1, setLogLevel as setLogLevel$1, snapshotEqual as snapshotEqual$1, startAfter as startAfter$1, startAt as startAt$1, terminate as terminate$1, updateDoc as updateDoc$1, where as where$1, writeBatch as writeBatch$1 } from 'firebase/firestore/lite';
|
||||
export * from 'firebase/firestore/lite';
|
||||
|
||||
class Firestore {
|
||||
constructor(firestore) {
|
||||
return firestore;
|
||||
}
|
||||
}
|
||||
const FIRESTORE_PROVIDER_NAME = 'firestore/lite';
|
||||
class FirestoreInstances {
|
||||
constructor() {
|
||||
return ɵgetAllInstancesOf(FIRESTORE_PROVIDER_NAME);
|
||||
}
|
||||
}
|
||||
const firestoreInstance$ = timer(0, 300).pipe(concatMap(() => from(ɵgetAllInstancesOf(FIRESTORE_PROVIDER_NAME))), distinct());
|
||||
|
||||
const PROVIDED_FIRESTORE_INSTANCES = new InjectionToken('angularfire2.firestore-lite-instances');
|
||||
function defaultFirestoreInstanceFactory(provided, defaultApp) {
|
||||
const defaultFirestore = ɵgetDefaultInstanceOf(FIRESTORE_PROVIDER_NAME, provided, defaultApp);
|
||||
return defaultFirestore && new Firestore(defaultFirestore);
|
||||
}
|
||||
function firestoreInstanceFactory(fn) {
|
||||
return (zone, injector) => {
|
||||
const firestore = zone.runOutsideAngular(() => fn(injector));
|
||||
return new Firestore(firestore);
|
||||
};
|
||||
}
|
||||
const FIRESTORE_INSTANCES_PROVIDER = {
|
||||
provide: FirestoreInstances,
|
||||
deps: [
|
||||
[new Optional(), PROVIDED_FIRESTORE_INSTANCES],
|
||||
]
|
||||
};
|
||||
const DEFAULT_FIRESTORE_INSTANCE_PROVIDER = {
|
||||
provide: Firestore,
|
||||
useFactory: defaultFirestoreInstanceFactory,
|
||||
deps: [
|
||||
[new Optional(), PROVIDED_FIRESTORE_INSTANCES],
|
||||
FirebaseApp,
|
||||
]
|
||||
};
|
||||
class FirestoreModule {
|
||||
constructor() {
|
||||
registerVersion('angularfire', VERSION.full, 'lite');
|
||||
}
|
||||
}
|
||||
FirestoreModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: FirestoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
||||
FirestoreModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: FirestoreModule });
|
||||
FirestoreModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: FirestoreModule, providers: [
|
||||
DEFAULT_FIRESTORE_INSTANCE_PROVIDER,
|
||||
FIRESTORE_INSTANCES_PROVIDER,
|
||||
] });
|
||||
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: FirestoreModule, decorators: [{
|
||||
type: NgModule,
|
||||
args: [{
|
||||
providers: [
|
||||
DEFAULT_FIRESTORE_INSTANCE_PROVIDER,
|
||||
FIRESTORE_INSTANCES_PROVIDER,
|
||||
]
|
||||
}]
|
||||
}], ctorParameters: function () { return []; } });
|
||||
function provideFirestore(fn, ...deps) {
|
||||
return {
|
||||
ngModule: FirestoreModule,
|
||||
providers: [{
|
||||
provide: PROVIDED_FIRESTORE_INSTANCES,
|
||||
useFactory: firestoreInstanceFactory(fn),
|
||||
multi: true,
|
||||
deps: [
|
||||
NgZone,
|
||||
Injector,
|
||||
ɵAngularFireSchedulers,
|
||||
FirebaseApps,
|
||||
// Firestore+Auth work better if Auth is loaded first
|
||||
[new Optional(), AuthInstances],
|
||||
[new Optional(), AppCheckInstances],
|
||||
...deps,
|
||||
]
|
||||
}]
|
||||
};
|
||||
}
|
||||
|
||||
// DO NOT MODIFY, this file is autogenerated by tools/build.ts
|
||||
const collectionSnapshots = ɵzoneWrap(collection$1, true);
|
||||
const collectionData = ɵzoneWrap(collectionData$1, true);
|
||||
const docSnapshots = ɵzoneWrap(doc$1, true);
|
||||
const docData = ɵzoneWrap(docData$1, true);
|
||||
const snapToData = ɵzoneWrap(snapToData$1, true);
|
||||
const fromRef = ɵzoneWrap(fromRef$1, true);
|
||||
|
||||
// DO NOT MODIFY, this file is autogenerated by tools/build.ts
|
||||
const addDoc = ɵzoneWrap(addDoc$1, true);
|
||||
const arrayRemove = ɵzoneWrap(arrayRemove$1, true);
|
||||
const arrayUnion = ɵzoneWrap(arrayUnion$1, true);
|
||||
const collection = ɵzoneWrap(collection$2, true);
|
||||
const collectionGroup = ɵzoneWrap(collectionGroup$1, true);
|
||||
const connectFirestoreEmulator = ɵzoneWrap(connectFirestoreEmulator$1, true);
|
||||
const deleteDoc = ɵzoneWrap(deleteDoc$1, true);
|
||||
const deleteField = ɵzoneWrap(deleteField$1, true);
|
||||
const doc = ɵzoneWrap(doc$2, true);
|
||||
const documentId = ɵzoneWrap(documentId$1, true);
|
||||
const endAt = ɵzoneWrap(endAt$1, true);
|
||||
const endBefore = ɵzoneWrap(endBefore$1, true);
|
||||
const getDoc = ɵzoneWrap(getDoc$1, true);
|
||||
const getDocs = ɵzoneWrap(getDocs$1, true);
|
||||
const getFirestore = ɵzoneWrap(getFirestore$1, true);
|
||||
const increment = ɵzoneWrap(increment$1, true);
|
||||
const initializeFirestore = ɵzoneWrap(initializeFirestore$1, true);
|
||||
const limit = ɵzoneWrap(limit$1, true);
|
||||
const limitToLast = ɵzoneWrap(limitToLast$1, true);
|
||||
const orderBy = ɵzoneWrap(orderBy$1, true);
|
||||
const query = ɵzoneWrap(query$1, true);
|
||||
const queryEqual = ɵzoneWrap(queryEqual$1, true);
|
||||
const refEqual = ɵzoneWrap(refEqual$1, true);
|
||||
const runTransaction = ɵzoneWrap(runTransaction$1, true);
|
||||
const serverTimestamp = ɵzoneWrap(serverTimestamp$1, true);
|
||||
const setDoc = ɵzoneWrap(setDoc$1, true);
|
||||
const setLogLevel = ɵzoneWrap(setLogLevel$1, true);
|
||||
const snapshotEqual = ɵzoneWrap(snapshotEqual$1, true);
|
||||
const startAfter = ɵzoneWrap(startAfter$1, true);
|
||||
const startAt = ɵzoneWrap(startAt$1, true);
|
||||
const terminate = ɵzoneWrap(terminate$1, true);
|
||||
const updateDoc = ɵzoneWrap(updateDoc$1, true);
|
||||
const where = ɵzoneWrap(where$1, true);
|
||||
const writeBatch = ɵzoneWrap(writeBatch$1, true);
|
||||
|
||||
/**
|
||||
* Generated bundle index. Do not edit.
|
||||
*/
|
||||
|
||||
export { Firestore, FirestoreInstances, FirestoreModule, addDoc, arrayRemove, arrayUnion, collection, collectionData, collectionGroup, collectionSnapshots, connectFirestoreEmulator, deleteDoc, deleteField, doc, docData, docSnapshots, documentId, endAt, endBefore, firestoreInstance$, fromRef, getDoc, getDocs, getFirestore, increment, initializeFirestore, limit, limitToLast, orderBy, provideFirestore, query, queryEqual, refEqual, runTransaction, serverTimestamp, setDoc, setLogLevel, snapToData, snapshotEqual, startAfter, startAt, terminate, updateDoc, where, writeBatch };
|
||||
//# sourceMappingURL=angular-fire-firestore-lite.js.map
|
||||
1
node_modules/@angular/fire/fesm2015/angular-fire-firestore-lite.js.map
generated
vendored
Normal file
1
node_modules/@angular/fire/fesm2015/angular-fire-firestore-lite.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
159
node_modules/@angular/fire/fesm2015/angular-fire-firestore.js
generated
vendored
Normal file
159
node_modules/@angular/fire/fesm2015/angular-fire-firestore.js
generated
vendored
Normal file
|
|
@ -0,0 +1,159 @@
|
|||
import { ɵgetAllInstancesOf, ɵgetDefaultInstanceOf, VERSION, ɵAngularFireSchedulers, ɵzoneWrap } from '@angular/fire';
|
||||
import { timer, from } from 'rxjs';
|
||||
import { concatMap, distinct } from 'rxjs/operators';
|
||||
import * as i0 from '@angular/core';
|
||||
import { InjectionToken, Optional, NgModule, NgZone, Injector } from '@angular/core';
|
||||
import { AuthInstances } from '@angular/fire/auth';
|
||||
import { FirebaseApp, FirebaseApps } from '@angular/fire/app';
|
||||
import { registerVersion } from 'firebase/app';
|
||||
import { AppCheckInstances } from '@angular/fire/app-check';
|
||||
import { collectionChanges as collectionChanges$1, collection as collection$1, sortedChanges as sortedChanges$1, auditTrail as auditTrail$1, collectionData as collectionData$1, doc as doc$1, docData as docData$1, snapToData as snapToData$1, fromRef as fromRef$1 } from 'rxfire/firestore';
|
||||
import { addDoc as addDoc$1, arrayRemove as arrayRemove$1, arrayUnion as arrayUnion$1, clearIndexedDbPersistence as clearIndexedDbPersistence$1, collection as collection$2, collectionGroup as collectionGroup$1, connectFirestoreEmulator as connectFirestoreEmulator$1, deleteDoc as deleteDoc$1, deleteField as deleteField$1, disableNetwork as disableNetwork$1, doc as doc$2, documentId as documentId$1, enableIndexedDbPersistence as enableIndexedDbPersistence$1, enableMultiTabIndexedDbPersistence as enableMultiTabIndexedDbPersistence$1, enableNetwork as enableNetwork$1, endAt as endAt$1, endBefore as endBefore$1, getDoc as getDoc$1, getDocFromCache as getDocFromCache$1, getDocFromServer as getDocFromServer$1, getDocs as getDocs$1, getDocsFromCache as getDocsFromCache$1, getDocsFromServer as getDocsFromServer$1, getFirestore as getFirestore$1, increment as increment$1, initializeFirestore as initializeFirestore$1, limit as limit$1, limitToLast as limitToLast$1, loadBundle as loadBundle$1, namedQuery as namedQuery$1, onSnapshot as onSnapshot$1, onSnapshotsInSync as onSnapshotsInSync$1, orderBy as orderBy$1, query as query$1, queryEqual as queryEqual$1, refEqual as refEqual$1, runTransaction as runTransaction$1, serverTimestamp as serverTimestamp$1, setDoc as setDoc$1, setLogLevel as setLogLevel$1, snapshotEqual as snapshotEqual$1, startAfter as startAfter$1, startAt as startAt$1, terminate as terminate$1, updateDoc as updateDoc$1, waitForPendingWrites as waitForPendingWrites$1, where as where$1, writeBatch as writeBatch$1 } from 'firebase/firestore';
|
||||
export * from 'firebase/firestore';
|
||||
|
||||
class Firestore {
|
||||
constructor(firestore) {
|
||||
return firestore;
|
||||
}
|
||||
}
|
||||
const FIRESTORE_PROVIDER_NAME = 'firestore';
|
||||
class FirestoreInstances {
|
||||
constructor() {
|
||||
return ɵgetAllInstancesOf(FIRESTORE_PROVIDER_NAME);
|
||||
}
|
||||
}
|
||||
const firestoreInstance$ = timer(0, 300).pipe(concatMap(() => from(ɵgetAllInstancesOf(FIRESTORE_PROVIDER_NAME))), distinct());
|
||||
|
||||
const PROVIDED_FIRESTORE_INSTANCES = new InjectionToken('angularfire2.firestore-instances');
|
||||
function defaultFirestoreInstanceFactory(provided, defaultApp) {
|
||||
const defaultFirestore = ɵgetDefaultInstanceOf(FIRESTORE_PROVIDER_NAME, provided, defaultApp);
|
||||
return defaultFirestore && new Firestore(defaultFirestore);
|
||||
}
|
||||
function firestoreInstanceFactory(fn) {
|
||||
return (zone, injector) => {
|
||||
const firestore = zone.runOutsideAngular(() => fn(injector));
|
||||
return new Firestore(firestore);
|
||||
};
|
||||
}
|
||||
const FIRESTORE_INSTANCES_PROVIDER = {
|
||||
provide: FirestoreInstances,
|
||||
deps: [
|
||||
[new Optional(), PROVIDED_FIRESTORE_INSTANCES],
|
||||
]
|
||||
};
|
||||
const DEFAULT_FIRESTORE_INSTANCE_PROVIDER = {
|
||||
provide: Firestore,
|
||||
useFactory: defaultFirestoreInstanceFactory,
|
||||
deps: [
|
||||
[new Optional(), PROVIDED_FIRESTORE_INSTANCES],
|
||||
FirebaseApp,
|
||||
]
|
||||
};
|
||||
class FirestoreModule {
|
||||
constructor() {
|
||||
registerVersion('angularfire', VERSION.full, 'fst');
|
||||
}
|
||||
}
|
||||
FirestoreModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: FirestoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
||||
FirestoreModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: FirestoreModule });
|
||||
FirestoreModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: FirestoreModule, providers: [
|
||||
DEFAULT_FIRESTORE_INSTANCE_PROVIDER,
|
||||
FIRESTORE_INSTANCES_PROVIDER,
|
||||
] });
|
||||
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: FirestoreModule, decorators: [{
|
||||
type: NgModule,
|
||||
args: [{
|
||||
providers: [
|
||||
DEFAULT_FIRESTORE_INSTANCE_PROVIDER,
|
||||
FIRESTORE_INSTANCES_PROVIDER,
|
||||
]
|
||||
}]
|
||||
}], ctorParameters: function () { return []; } });
|
||||
function provideFirestore(fn, ...deps) {
|
||||
return {
|
||||
ngModule: FirestoreModule,
|
||||
providers: [{
|
||||
provide: PROVIDED_FIRESTORE_INSTANCES,
|
||||
useFactory: firestoreInstanceFactory(fn),
|
||||
multi: true,
|
||||
deps: [
|
||||
NgZone,
|
||||
Injector,
|
||||
ɵAngularFireSchedulers,
|
||||
FirebaseApps,
|
||||
// Firestore+Auth work better if Auth is loaded first
|
||||
[new Optional(), AuthInstances],
|
||||
[new Optional(), AppCheckInstances],
|
||||
...deps,
|
||||
]
|
||||
}]
|
||||
};
|
||||
}
|
||||
|
||||
// DO NOT MODIFY, this file is autogenerated by tools/build.ts
|
||||
const collectionChanges = ɵzoneWrap(collectionChanges$1, true);
|
||||
const collectionSnapshots = ɵzoneWrap(collection$1, true);
|
||||
const sortedChanges = ɵzoneWrap(sortedChanges$1, true);
|
||||
const auditTrail = ɵzoneWrap(auditTrail$1, true);
|
||||
const collectionData = ɵzoneWrap(collectionData$1, true);
|
||||
const docSnapshots = ɵzoneWrap(doc$1, true);
|
||||
const docData = ɵzoneWrap(docData$1, true);
|
||||
const snapToData = ɵzoneWrap(snapToData$1, true);
|
||||
const fromRef = ɵzoneWrap(fromRef$1, true);
|
||||
|
||||
// DO NOT MODIFY, this file is autogenerated by tools/build.ts
|
||||
const addDoc = ɵzoneWrap(addDoc$1, true);
|
||||
const arrayRemove = ɵzoneWrap(arrayRemove$1, true);
|
||||
const arrayUnion = ɵzoneWrap(arrayUnion$1, true);
|
||||
const clearIndexedDbPersistence = ɵzoneWrap(clearIndexedDbPersistence$1, true);
|
||||
const collection = ɵzoneWrap(collection$2, true);
|
||||
const collectionGroup = ɵzoneWrap(collectionGroup$1, true);
|
||||
const connectFirestoreEmulator = ɵzoneWrap(connectFirestoreEmulator$1, true);
|
||||
const deleteDoc = ɵzoneWrap(deleteDoc$1, true);
|
||||
const deleteField = ɵzoneWrap(deleteField$1, true);
|
||||
const disableNetwork = ɵzoneWrap(disableNetwork$1, true);
|
||||
const doc = ɵzoneWrap(doc$2, true);
|
||||
const documentId = ɵzoneWrap(documentId$1, true);
|
||||
const enableIndexedDbPersistence = ɵzoneWrap(enableIndexedDbPersistence$1, true);
|
||||
const enableMultiTabIndexedDbPersistence = ɵzoneWrap(enableMultiTabIndexedDbPersistence$1, true);
|
||||
const enableNetwork = ɵzoneWrap(enableNetwork$1, true);
|
||||
const endAt = ɵzoneWrap(endAt$1, true);
|
||||
const endBefore = ɵzoneWrap(endBefore$1, true);
|
||||
const getDoc = ɵzoneWrap(getDoc$1, true);
|
||||
const getDocFromCache = ɵzoneWrap(getDocFromCache$1, true);
|
||||
const getDocFromServer = ɵzoneWrap(getDocFromServer$1, true);
|
||||
const getDocs = ɵzoneWrap(getDocs$1, true);
|
||||
const getDocsFromCache = ɵzoneWrap(getDocsFromCache$1, true);
|
||||
const getDocsFromServer = ɵzoneWrap(getDocsFromServer$1, true);
|
||||
const getFirestore = ɵzoneWrap(getFirestore$1, true);
|
||||
const increment = ɵzoneWrap(increment$1, true);
|
||||
const initializeFirestore = ɵzoneWrap(initializeFirestore$1, true);
|
||||
const limit = ɵzoneWrap(limit$1, true);
|
||||
const limitToLast = ɵzoneWrap(limitToLast$1, true);
|
||||
const loadBundle = ɵzoneWrap(loadBundle$1, true);
|
||||
const namedQuery = ɵzoneWrap(namedQuery$1, true);
|
||||
const onSnapshot = ɵzoneWrap(onSnapshot$1, true);
|
||||
const onSnapshotsInSync = ɵzoneWrap(onSnapshotsInSync$1, true);
|
||||
const orderBy = ɵzoneWrap(orderBy$1, true);
|
||||
const query = ɵzoneWrap(query$1, true);
|
||||
const queryEqual = ɵzoneWrap(queryEqual$1, true);
|
||||
const refEqual = ɵzoneWrap(refEqual$1, true);
|
||||
const runTransaction = ɵzoneWrap(runTransaction$1, true);
|
||||
const serverTimestamp = ɵzoneWrap(serverTimestamp$1, true);
|
||||
const setDoc = ɵzoneWrap(setDoc$1, true);
|
||||
const setLogLevel = ɵzoneWrap(setLogLevel$1, true);
|
||||
const snapshotEqual = ɵzoneWrap(snapshotEqual$1, true);
|
||||
const startAfter = ɵzoneWrap(startAfter$1, true);
|
||||
const startAt = ɵzoneWrap(startAt$1, true);
|
||||
const terminate = ɵzoneWrap(terminate$1, true);
|
||||
const updateDoc = ɵzoneWrap(updateDoc$1, true);
|
||||
const waitForPendingWrites = ɵzoneWrap(waitForPendingWrites$1, true);
|
||||
const where = ɵzoneWrap(where$1, true);
|
||||
const writeBatch = ɵzoneWrap(writeBatch$1, true);
|
||||
|
||||
/**
|
||||
* Generated bundle index. Do not edit.
|
||||
*/
|
||||
|
||||
export { Firestore, FirestoreInstances, FirestoreModule, addDoc, arrayRemove, arrayUnion, auditTrail, clearIndexedDbPersistence, collection, collectionChanges, collectionData, collectionGroup, collectionSnapshots, connectFirestoreEmulator, deleteDoc, deleteField, disableNetwork, doc, docData, docSnapshots, documentId, enableIndexedDbPersistence, enableMultiTabIndexedDbPersistence, enableNetwork, endAt, endBefore, firestoreInstance$, fromRef, getDoc, getDocFromCache, getDocFromServer, getDocs, getDocsFromCache, getDocsFromServer, getFirestore, increment, initializeFirestore, limit, limitToLast, loadBundle, namedQuery, onSnapshot, onSnapshotsInSync, orderBy, provideFirestore, query, queryEqual, refEqual, runTransaction, serverTimestamp, setDoc, setLogLevel, snapToData, snapshotEqual, sortedChanges, startAfter, startAt, terminate, updateDoc, waitForPendingWrites, where, writeBatch };
|
||||
//# sourceMappingURL=angular-fire-firestore.js.map
|
||||
1
node_modules/@angular/fire/fesm2015/angular-fire-firestore.js.map
generated
vendored
Normal file
1
node_modules/@angular/fire/fesm2015/angular-fire-firestore.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
107
node_modules/@angular/fire/fesm2015/angular-fire-functions.js
generated
vendored
Normal file
107
node_modules/@angular/fire/fesm2015/angular-fire-functions.js
generated
vendored
Normal file
|
|
@ -0,0 +1,107 @@
|
|||
import * as i0 from '@angular/core';
|
||||
import { InjectionToken, Optional, NgModule, NgZone, Injector } from '@angular/core';
|
||||
import { ɵgetAllInstancesOf, ɵgetDefaultInstanceOf, VERSION, ɵAngularFireSchedulers, ɵzoneWrap } from '@angular/fire';
|
||||
import { timer, from } from 'rxjs';
|
||||
import { concatMap, distinct } from 'rxjs/operators';
|
||||
import { FirebaseApp, FirebaseApps } from '@angular/fire/app';
|
||||
import { AuthInstances } from '@angular/fire/auth';
|
||||
import { registerVersion } from 'firebase/app';
|
||||
import { AppCheckInstances } from '@angular/fire/app-check';
|
||||
import { httpsCallable as httpsCallable$1 } from 'rxfire/functions';
|
||||
import { connectFunctionsEmulator as connectFunctionsEmulator$1, getFunctions as getFunctions$1, httpsCallable as httpsCallable$2, httpsCallableFromURL as httpsCallableFromURL$1 } from 'firebase/functions';
|
||||
export * from 'firebase/functions';
|
||||
|
||||
class Functions {
|
||||
constructor(functions) {
|
||||
return functions;
|
||||
}
|
||||
}
|
||||
const FUNCTIONS_PROVIDER_NAME = 'functions';
|
||||
class FunctionsInstances {
|
||||
constructor() {
|
||||
return ɵgetAllInstancesOf(FUNCTIONS_PROVIDER_NAME);
|
||||
}
|
||||
}
|
||||
const functionInstance$ = timer(0, 300).pipe(concatMap(() => from(ɵgetAllInstancesOf(FUNCTIONS_PROVIDER_NAME))), distinct());
|
||||
|
||||
const PROVIDED_FUNCTIONS_INSTANCES = new InjectionToken('angularfire2.functions-instances');
|
||||
function defaultFunctionsInstanceFactory(provided, defaultApp) {
|
||||
const defaultAuth = ɵgetDefaultInstanceOf(FUNCTIONS_PROVIDER_NAME, provided, defaultApp);
|
||||
return defaultAuth && new Functions(defaultAuth);
|
||||
}
|
||||
function functionsInstanceFactory(fn) {
|
||||
return (zone, injector) => {
|
||||
const functions = zone.runOutsideAngular(() => fn(injector));
|
||||
return new Functions(functions);
|
||||
};
|
||||
}
|
||||
const FUNCTIONS_INSTANCES_PROVIDER = {
|
||||
provide: FunctionsInstances,
|
||||
deps: [
|
||||
[new Optional(), PROVIDED_FUNCTIONS_INSTANCES],
|
||||
]
|
||||
};
|
||||
const DEFAULT_FUNCTIONS_INSTANCE_PROVIDER = {
|
||||
provide: Functions,
|
||||
useFactory: defaultFunctionsInstanceFactory,
|
||||
deps: [
|
||||
[new Optional(), PROVIDED_FUNCTIONS_INSTANCES],
|
||||
FirebaseApp,
|
||||
]
|
||||
};
|
||||
class FunctionsModule {
|
||||
constructor() {
|
||||
registerVersion('angularfire', VERSION.full, 'fn');
|
||||
}
|
||||
}
|
||||
FunctionsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: FunctionsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
||||
FunctionsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: FunctionsModule });
|
||||
FunctionsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: FunctionsModule, providers: [
|
||||
DEFAULT_FUNCTIONS_INSTANCE_PROVIDER,
|
||||
FUNCTIONS_INSTANCES_PROVIDER,
|
||||
] });
|
||||
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: FunctionsModule, decorators: [{
|
||||
type: NgModule,
|
||||
args: [{
|
||||
providers: [
|
||||
DEFAULT_FUNCTIONS_INSTANCE_PROVIDER,
|
||||
FUNCTIONS_INSTANCES_PROVIDER,
|
||||
]
|
||||
}]
|
||||
}], ctorParameters: function () { return []; } });
|
||||
function provideFunctions(fn, ...deps) {
|
||||
return {
|
||||
ngModule: FunctionsModule,
|
||||
providers: [{
|
||||
provide: PROVIDED_FUNCTIONS_INSTANCES,
|
||||
useFactory: functionsInstanceFactory(fn),
|
||||
multi: true,
|
||||
deps: [
|
||||
NgZone,
|
||||
Injector,
|
||||
ɵAngularFireSchedulers,
|
||||
FirebaseApps,
|
||||
// Defensively load Auth first, if provided
|
||||
[new Optional(), AuthInstances],
|
||||
[new Optional(), AppCheckInstances],
|
||||
...deps,
|
||||
]
|
||||
}]
|
||||
};
|
||||
}
|
||||
|
||||
// DO NOT MODIFY, this file is autogenerated by tools/build.ts
|
||||
const httpsCallableData = ɵzoneWrap(httpsCallable$1, true);
|
||||
|
||||
// DO NOT MODIFY, this file is autogenerated by tools/build.ts
|
||||
const connectFunctionsEmulator = ɵzoneWrap(connectFunctionsEmulator$1, true);
|
||||
const getFunctions = ɵzoneWrap(getFunctions$1, true);
|
||||
const httpsCallable = ɵzoneWrap(httpsCallable$2, true);
|
||||
const httpsCallableFromURL = ɵzoneWrap(httpsCallableFromURL$1, true);
|
||||
|
||||
/**
|
||||
* Generated bundle index. Do not edit.
|
||||
*/
|
||||
|
||||
export { Functions, FunctionsInstances, FunctionsModule, connectFunctionsEmulator, functionInstance$, getFunctions, httpsCallable, httpsCallableData, httpsCallableFromURL, provideFunctions };
|
||||
//# sourceMappingURL=angular-fire-functions.js.map
|
||||
1
node_modules/@angular/fire/fesm2015/angular-fire-functions.js.map
generated
vendored
Normal file
1
node_modules/@angular/fire/fesm2015/angular-fire-functions.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
116
node_modules/@angular/fire/fesm2015/angular-fire-messaging.js
generated
vendored
Normal file
116
node_modules/@angular/fire/fesm2015/angular-fire-messaging.js
generated
vendored
Normal file
|
|
@ -0,0 +1,116 @@
|
|||
import { ɵgetAllInstancesOf, ɵisMessagingSupportedFactory, ɵgetDefaultInstanceOf, VERSION, ɵAngularFireSchedulers, ɵzoneWrap } from '@angular/fire';
|
||||
import { timer, from } from 'rxjs';
|
||||
import { concatMap, distinct } from 'rxjs/operators';
|
||||
import * as i0 from '@angular/core';
|
||||
import { InjectionToken, Optional, APP_INITIALIZER, NgModule, NgZone, Injector } from '@angular/core';
|
||||
import { FirebaseApp, FirebaseApps } from '@angular/fire/app';
|
||||
import { registerVersion } from 'firebase/app';
|
||||
import { deleteToken as deleteToken$1, getMessaging as getMessaging$1, getToken as getToken$1, onMessage as onMessage$1 } from 'firebase/messaging';
|
||||
export * from 'firebase/messaging';
|
||||
|
||||
class Messaging {
|
||||
constructor(messaging) {
|
||||
return messaging;
|
||||
}
|
||||
}
|
||||
const MESSAGING_PROVIDER_NAME = 'messaging';
|
||||
class MessagingInstances {
|
||||
constructor() {
|
||||
return ɵgetAllInstancesOf(MESSAGING_PROVIDER_NAME);
|
||||
}
|
||||
}
|
||||
const messagingInstance$ = timer(0, 300).pipe(concatMap(() => from(ɵgetAllInstancesOf(MESSAGING_PROVIDER_NAME))), distinct());
|
||||
|
||||
const PROVIDED_MESSAGING_INSTANCES = new InjectionToken('angularfire2.messaging-instances');
|
||||
function defaultMessagingInstanceFactory(provided, defaultApp) {
|
||||
if (!ɵisMessagingSupportedFactory.sync()) {
|
||||
return null;
|
||||
}
|
||||
const defaultMessaging = ɵgetDefaultInstanceOf(MESSAGING_PROVIDER_NAME, provided, defaultApp);
|
||||
return defaultMessaging && new Messaging(defaultMessaging);
|
||||
}
|
||||
function messagingInstanceFactory(fn) {
|
||||
return (zone, injector) => {
|
||||
if (!ɵisMessagingSupportedFactory.sync()) {
|
||||
return null;
|
||||
}
|
||||
const messaging = zone.runOutsideAngular(() => fn(injector));
|
||||
return new Messaging(messaging);
|
||||
};
|
||||
}
|
||||
const MESSAGING_INSTANCES_PROVIDER = {
|
||||
provide: MessagingInstances,
|
||||
deps: [
|
||||
[new Optional(), PROVIDED_MESSAGING_INSTANCES],
|
||||
]
|
||||
};
|
||||
const DEFAULT_MESSAGING_INSTANCE_PROVIDER = {
|
||||
provide: Messaging,
|
||||
useFactory: defaultMessagingInstanceFactory,
|
||||
deps: [
|
||||
[new Optional(), PROVIDED_MESSAGING_INSTANCES],
|
||||
FirebaseApp,
|
||||
]
|
||||
};
|
||||
class MessagingModule {
|
||||
constructor() {
|
||||
registerVersion('angularfire', VERSION.full, 'fcm');
|
||||
}
|
||||
}
|
||||
MessagingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: MessagingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
||||
MessagingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: MessagingModule });
|
||||
MessagingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: MessagingModule, providers: [
|
||||
DEFAULT_MESSAGING_INSTANCE_PROVIDER,
|
||||
MESSAGING_INSTANCES_PROVIDER,
|
||||
{
|
||||
provide: APP_INITIALIZER,
|
||||
useValue: ɵisMessagingSupportedFactory.async,
|
||||
multi: true,
|
||||
},
|
||||
] });
|
||||
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: MessagingModule, decorators: [{
|
||||
type: NgModule,
|
||||
args: [{
|
||||
providers: [
|
||||
DEFAULT_MESSAGING_INSTANCE_PROVIDER,
|
||||
MESSAGING_INSTANCES_PROVIDER,
|
||||
{
|
||||
provide: APP_INITIALIZER,
|
||||
useValue: ɵisMessagingSupportedFactory.async,
|
||||
multi: true,
|
||||
},
|
||||
]
|
||||
}]
|
||||
}], ctorParameters: function () { return []; } });
|
||||
function provideMessaging(fn, ...deps) {
|
||||
return {
|
||||
ngModule: MessagingModule,
|
||||
providers: [{
|
||||
provide: PROVIDED_MESSAGING_INSTANCES,
|
||||
useFactory: messagingInstanceFactory(fn),
|
||||
multi: true,
|
||||
deps: [
|
||||
NgZone,
|
||||
Injector,
|
||||
ɵAngularFireSchedulers,
|
||||
FirebaseApps,
|
||||
...deps,
|
||||
],
|
||||
}]
|
||||
};
|
||||
}
|
||||
|
||||
const isSupported = ɵisMessagingSupportedFactory.async;
|
||||
|
||||
// DO NOT MODIFY, this file is autogenerated by tools/build.ts
|
||||
const deleteToken = ɵzoneWrap(deleteToken$1, true);
|
||||
const getMessaging = ɵzoneWrap(getMessaging$1, true);
|
||||
const getToken = ɵzoneWrap(getToken$1, true);
|
||||
const onMessage = ɵzoneWrap(onMessage$1, false);
|
||||
|
||||
/**
|
||||
* Generated bundle index. Do not edit.
|
||||
*/
|
||||
|
||||
export { Messaging, MessagingInstances, MessagingModule, deleteToken, getMessaging, getToken, isSupported, messagingInstance$, onMessage, provideMessaging };
|
||||
//# sourceMappingURL=angular-fire-messaging.js.map
|
||||
1
node_modules/@angular/fire/fesm2015/angular-fire-messaging.js.map
generated
vendored
Normal file
1
node_modules/@angular/fire/fesm2015/angular-fire-messaging.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
116
node_modules/@angular/fire/fesm2015/angular-fire-performance.js
generated
vendored
Normal file
116
node_modules/@angular/fire/fesm2015/angular-fire-performance.js
generated
vendored
Normal file
|
|
@ -0,0 +1,116 @@
|
|||
import { ɵgetAllInstancesOf, ɵgetDefaultInstanceOf, VERSION, ɵAngularFireSchedulers, ɵzoneWrap } from '@angular/fire';
|
||||
import { timer, from } from 'rxjs';
|
||||
import { concatMap, distinct } from 'rxjs/operators';
|
||||
import * as i0 from '@angular/core';
|
||||
import { InjectionToken, Optional, PLATFORM_ID, NgModule, NgZone, Injector } from '@angular/core';
|
||||
import { FirebaseApp, FirebaseApps } from '@angular/fire/app';
|
||||
import { registerVersion } from 'firebase/app';
|
||||
import { isPlatformBrowser } from '@angular/common';
|
||||
import { traceUntil as traceUntil$1, traceWhile as traceWhile$1, traceUntilComplete as traceUntilComplete$1, traceUntilFirst as traceUntilFirst$1 } from 'rxfire/performance';
|
||||
import { getPerformance as getPerformance$1, initializePerformance as initializePerformance$1, trace as trace$1 } from 'firebase/performance';
|
||||
export * from 'firebase/performance';
|
||||
|
||||
class Performance {
|
||||
constructor(performance) {
|
||||
return performance;
|
||||
}
|
||||
}
|
||||
const PERFORMANCE_PROVIDER_NAME = 'performance';
|
||||
class PerformanceInstances {
|
||||
constructor() {
|
||||
return ɵgetAllInstancesOf(PERFORMANCE_PROVIDER_NAME);
|
||||
}
|
||||
}
|
||||
const performanceInstance$ = timer(0, 300).pipe(concatMap(() => from(ɵgetAllInstancesOf(PERFORMANCE_PROVIDER_NAME))), distinct());
|
||||
|
||||
const PROVIDED_PERFORMANCE_INSTANCES = new InjectionToken('angularfire2.performance-instances');
|
||||
function defaultPerformanceInstanceFactory(provided, defaultApp,
|
||||
// tslint:disable-next-line:ban-types
|
||||
platform) {
|
||||
if (!isPlatformBrowser(platform)) {
|
||||
return null;
|
||||
}
|
||||
const defaultPerformance = ɵgetDefaultInstanceOf(PERFORMANCE_PROVIDER_NAME, provided, defaultApp);
|
||||
return defaultPerformance && new Performance(defaultPerformance);
|
||||
}
|
||||
function performanceInstanceFactory(fn) {
|
||||
// tslint:disable-next-line:ban-types
|
||||
return (zone, platform, injector) => {
|
||||
if (!isPlatformBrowser(platform)) {
|
||||
return null;
|
||||
}
|
||||
const performance = zone.runOutsideAngular(() => fn(injector));
|
||||
return new Performance(performance);
|
||||
};
|
||||
}
|
||||
const PERFORMANCE_INSTANCES_PROVIDER = {
|
||||
provide: PerformanceInstances,
|
||||
deps: [
|
||||
[new Optional(), PROVIDED_PERFORMANCE_INSTANCES],
|
||||
]
|
||||
};
|
||||
const DEFAULT_PERFORMANCE_INSTANCE_PROVIDER = {
|
||||
provide: Performance,
|
||||
useFactory: defaultPerformanceInstanceFactory,
|
||||
deps: [
|
||||
[new Optional(), PROVIDED_PERFORMANCE_INSTANCES],
|
||||
FirebaseApp,
|
||||
PLATFORM_ID,
|
||||
]
|
||||
};
|
||||
class PerformanceModule {
|
||||
constructor() {
|
||||
registerVersion('angularfire', VERSION.full, 'perf');
|
||||
}
|
||||
}
|
||||
PerformanceModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: PerformanceModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
||||
PerformanceModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: PerformanceModule });
|
||||
PerformanceModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: PerformanceModule, providers: [
|
||||
DEFAULT_PERFORMANCE_INSTANCE_PROVIDER,
|
||||
PERFORMANCE_INSTANCES_PROVIDER,
|
||||
] });
|
||||
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: PerformanceModule, decorators: [{
|
||||
type: NgModule,
|
||||
args: [{
|
||||
providers: [
|
||||
DEFAULT_PERFORMANCE_INSTANCE_PROVIDER,
|
||||
PERFORMANCE_INSTANCES_PROVIDER,
|
||||
]
|
||||
}]
|
||||
}], ctorParameters: function () { return []; } });
|
||||
function providePerformance(fn, ...deps) {
|
||||
return {
|
||||
ngModule: PerformanceModule,
|
||||
providers: [{
|
||||
provide: PROVIDED_PERFORMANCE_INSTANCES,
|
||||
useFactory: performanceInstanceFactory(fn),
|
||||
multi: true,
|
||||
deps: [
|
||||
NgZone,
|
||||
PLATFORM_ID,
|
||||
Injector,
|
||||
ɵAngularFireSchedulers,
|
||||
FirebaseApps,
|
||||
...deps,
|
||||
]
|
||||
}]
|
||||
};
|
||||
}
|
||||
|
||||
// DO NOT MODIFY, this file is autogenerated by tools/build.ts
|
||||
const traceUntil = ɵzoneWrap(traceUntil$1, true);
|
||||
const traceWhile = ɵzoneWrap(traceWhile$1, true);
|
||||
const traceUntilComplete = ɵzoneWrap(traceUntilComplete$1, true);
|
||||
const traceUntilFirst = ɵzoneWrap(traceUntilFirst$1, true);
|
||||
|
||||
// DO NOT MODIFY, this file is autogenerated by tools/build.ts
|
||||
const getPerformance = ɵzoneWrap(getPerformance$1, true);
|
||||
const initializePerformance = ɵzoneWrap(initializePerformance$1, true);
|
||||
const trace = ɵzoneWrap(trace$1, true);
|
||||
|
||||
/**
|
||||
* Generated bundle index. Do not edit.
|
||||
*/
|
||||
|
||||
export { Performance, PerformanceInstances, PerformanceModule, getPerformance, initializePerformance, performanceInstance$, providePerformance, trace, traceUntil, traceUntilComplete, traceUntilFirst, traceWhile };
|
||||
//# sourceMappingURL=angular-fire-performance.js.map
|
||||
1
node_modules/@angular/fire/fesm2015/angular-fire-performance.js.map
generated
vendored
Normal file
1
node_modules/@angular/fire/fesm2015/angular-fire-performance.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
131
node_modules/@angular/fire/fesm2015/angular-fire-remote-config.js
generated
vendored
Normal file
131
node_modules/@angular/fire/fesm2015/angular-fire-remote-config.js
generated
vendored
Normal file
|
|
@ -0,0 +1,131 @@
|
|||
import { ɵgetAllInstancesOf, ɵisRemoteConfigSupportedFactory, ɵgetDefaultInstanceOf, VERSION, ɵAngularFireSchedulers, ɵzoneWrap } from '@angular/fire';
|
||||
import { timer, from } from 'rxjs';
|
||||
import { concatMap, distinct } from 'rxjs/operators';
|
||||
import * as i0 from '@angular/core';
|
||||
import { InjectionToken, Optional, APP_INITIALIZER, NgModule, NgZone, Injector } from '@angular/core';
|
||||
import { FirebaseApp, FirebaseApps } from '@angular/fire/app';
|
||||
import { registerVersion } from 'firebase/app';
|
||||
import { getValue as getValue$1, getString as getString$1, getNumber as getNumber$1, getBoolean as getBoolean$1, getAll as getAll$1 } from 'rxfire/remote-config';
|
||||
import { activate as activate$1, ensureInitialized as ensureInitialized$1, fetchAndActivate as fetchAndActivate$1, fetchConfig as fetchConfig$1, getAll as getAll$2, getBoolean as getBoolean$2, getNumber as getNumber$2, getRemoteConfig as getRemoteConfig$1, getString as getString$2, getValue as getValue$2, setLogLevel as setLogLevel$1 } from 'firebase/remote-config';
|
||||
export * from 'firebase/remote-config';
|
||||
|
||||
class RemoteConfig {
|
||||
constructor(remoteConfig) {
|
||||
return remoteConfig;
|
||||
}
|
||||
}
|
||||
const REMOTE_CONFIG_PROVIDER_NAME = 'remote-config';
|
||||
class RemoteConfigInstances {
|
||||
constructor() {
|
||||
return ɵgetAllInstancesOf(REMOTE_CONFIG_PROVIDER_NAME);
|
||||
}
|
||||
}
|
||||
const remoteConfigInstance$ = timer(0, 300).pipe(concatMap(() => from(ɵgetAllInstancesOf(REMOTE_CONFIG_PROVIDER_NAME))), distinct());
|
||||
|
||||
const PROVIDED_REMOTE_CONFIG_INSTANCES = new InjectionToken('angularfire2.remote-config-instances');
|
||||
function defaultRemoteConfigInstanceFactory(provided, defaultApp) {
|
||||
if (!ɵisRemoteConfigSupportedFactory.sync()) {
|
||||
return null;
|
||||
}
|
||||
const defaultRemoteConfig = ɵgetDefaultInstanceOf(REMOTE_CONFIG_PROVIDER_NAME, provided, defaultApp);
|
||||
return defaultRemoteConfig && new RemoteConfig(defaultRemoteConfig);
|
||||
}
|
||||
function remoteConfigInstanceFactory(fn) {
|
||||
return (zone, injector) => {
|
||||
if (!ɵisRemoteConfigSupportedFactory.sync()) {
|
||||
return null;
|
||||
}
|
||||
const remoteConfig = zone.runOutsideAngular(() => fn(injector));
|
||||
return new RemoteConfig(remoteConfig);
|
||||
};
|
||||
}
|
||||
const REMOTE_CONFIG_INSTANCES_PROVIDER = {
|
||||
provide: RemoteConfigInstances,
|
||||
deps: [
|
||||
[new Optional(), PROVIDED_REMOTE_CONFIG_INSTANCES],
|
||||
]
|
||||
};
|
||||
const DEFAULT_REMOTE_CONFIG_INSTANCE_PROVIDER = {
|
||||
provide: RemoteConfig,
|
||||
useFactory: defaultRemoteConfigInstanceFactory,
|
||||
deps: [
|
||||
[new Optional(), PROVIDED_REMOTE_CONFIG_INSTANCES],
|
||||
FirebaseApp,
|
||||
]
|
||||
};
|
||||
class RemoteConfigModule {
|
||||
constructor() {
|
||||
registerVersion('angularfire', VERSION.full, 'rc');
|
||||
}
|
||||
}
|
||||
RemoteConfigModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: RemoteConfigModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
||||
RemoteConfigModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: RemoteConfigModule });
|
||||
RemoteConfigModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: RemoteConfigModule, providers: [
|
||||
DEFAULT_REMOTE_CONFIG_INSTANCE_PROVIDER,
|
||||
REMOTE_CONFIG_INSTANCES_PROVIDER,
|
||||
{
|
||||
provide: APP_INITIALIZER,
|
||||
useValue: ɵisRemoteConfigSupportedFactory.async,
|
||||
multi: true,
|
||||
},
|
||||
] });
|
||||
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: RemoteConfigModule, decorators: [{
|
||||
type: NgModule,
|
||||
args: [{
|
||||
providers: [
|
||||
DEFAULT_REMOTE_CONFIG_INSTANCE_PROVIDER,
|
||||
REMOTE_CONFIG_INSTANCES_PROVIDER,
|
||||
{
|
||||
provide: APP_INITIALIZER,
|
||||
useValue: ɵisRemoteConfigSupportedFactory.async,
|
||||
multi: true,
|
||||
},
|
||||
]
|
||||
}]
|
||||
}], ctorParameters: function () { return []; } });
|
||||
function provideRemoteConfig(fn, ...deps) {
|
||||
return {
|
||||
ngModule: RemoteConfigModule,
|
||||
providers: [{
|
||||
provide: PROVIDED_REMOTE_CONFIG_INSTANCES,
|
||||
useFactory: remoteConfigInstanceFactory(fn),
|
||||
multi: true,
|
||||
deps: [
|
||||
NgZone,
|
||||
Injector,
|
||||
ɵAngularFireSchedulers,
|
||||
FirebaseApps,
|
||||
...deps,
|
||||
]
|
||||
}]
|
||||
};
|
||||
}
|
||||
|
||||
// DO NOT MODIFY, this file is autogenerated by tools/build.ts
|
||||
const getValueChanges = ɵzoneWrap(getValue$1, true);
|
||||
const getStringChanges = ɵzoneWrap(getString$1, true);
|
||||
const getNumberChanges = ɵzoneWrap(getNumber$1, true);
|
||||
const getBooleanChanges = ɵzoneWrap(getBoolean$1, true);
|
||||
const getAllChanges = ɵzoneWrap(getAll$1, true);
|
||||
|
||||
const isSupported = ɵisRemoteConfigSupportedFactory.async;
|
||||
|
||||
// DO NOT MODIFY, this file is autogenerated by tools/build.ts
|
||||
const activate = ɵzoneWrap(activate$1, true);
|
||||
const ensureInitialized = ɵzoneWrap(ensureInitialized$1, true);
|
||||
const fetchAndActivate = ɵzoneWrap(fetchAndActivate$1, true);
|
||||
const fetchConfig = ɵzoneWrap(fetchConfig$1, true);
|
||||
const getAll = ɵzoneWrap(getAll$2, true);
|
||||
const getBoolean = ɵzoneWrap(getBoolean$2, true);
|
||||
const getNumber = ɵzoneWrap(getNumber$2, true);
|
||||
const getRemoteConfig = ɵzoneWrap(getRemoteConfig$1, true);
|
||||
const getString = ɵzoneWrap(getString$2, true);
|
||||
const getValue = ɵzoneWrap(getValue$2, true);
|
||||
const setLogLevel = ɵzoneWrap(setLogLevel$1, true);
|
||||
|
||||
/**
|
||||
* Generated bundle index. Do not edit.
|
||||
*/
|
||||
|
||||
export { RemoteConfig, RemoteConfigInstances, RemoteConfigModule, activate, ensureInitialized, fetchAndActivate, fetchConfig, getAll, getAllChanges, getBoolean, getBooleanChanges, getNumber, getNumberChanges, getRemoteConfig, getString, getStringChanges, getValue, getValueChanges, isSupported, provideRemoteConfig, remoteConfigInstance$, setLogLevel };
|
||||
//# sourceMappingURL=angular-fire-remote-config.js.map
|
||||
1
node_modules/@angular/fire/fesm2015/angular-fire-remote-config.js.map
generated
vendored
Normal file
1
node_modules/@angular/fire/fesm2015/angular-fire-remote-config.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
119
node_modules/@angular/fire/fesm2015/angular-fire-storage.js
generated
vendored
Normal file
119
node_modules/@angular/fire/fesm2015/angular-fire-storage.js
generated
vendored
Normal file
|
|
@ -0,0 +1,119 @@
|
|||
import { ɵgetAllInstancesOf, ɵgetDefaultInstanceOf, VERSION, ɵAngularFireSchedulers, ɵzoneWrap } from '@angular/fire';
|
||||
import { timer, from } from 'rxjs';
|
||||
import { concatMap, distinct } from 'rxjs/operators';
|
||||
import * as i0 from '@angular/core';
|
||||
import { InjectionToken, Optional, NgModule, NgZone, Injector } from '@angular/core';
|
||||
import { FirebaseApp, FirebaseApps } from '@angular/fire/app';
|
||||
import { AuthInstances } from '@angular/fire/auth';
|
||||
import { registerVersion } from 'firebase/app';
|
||||
import { AppCheckInstances } from '@angular/fire/app-check';
|
||||
import { fromTask as fromTask$1, percentage as percentage$1 } from 'rxfire/storage';
|
||||
import { connectStorageEmulator as connectStorageEmulator$1, deleteObject as deleteObject$1, getBlob as getBlob$1, getBytes as getBytes$1, getDownloadURL as getDownloadURL$1, getMetadata as getMetadata$1, getStorage as getStorage$1, getStream as getStream$1, list as list$1, listAll as listAll$1, ref as ref$1, updateMetadata as updateMetadata$1, uploadBytes as uploadBytes$1, uploadBytesResumable as uploadBytesResumable$1, uploadString as uploadString$1 } from 'firebase/storage';
|
||||
export * from 'firebase/storage';
|
||||
|
||||
class Storage {
|
||||
constructor(auth) {
|
||||
return auth;
|
||||
}
|
||||
}
|
||||
const STORAGE_PROVIDER_NAME = 'storage';
|
||||
class StorageInstances {
|
||||
constructor() {
|
||||
return ɵgetAllInstancesOf(STORAGE_PROVIDER_NAME);
|
||||
}
|
||||
}
|
||||
const storageInstance$ = timer(0, 300).pipe(concatMap(() => from(ɵgetAllInstancesOf(STORAGE_PROVIDER_NAME))), distinct());
|
||||
|
||||
const PROVIDED_STORAGE_INSTANCES = new InjectionToken('angularfire2.storage-instances');
|
||||
function defaultStorageInstanceFactory(provided, defaultApp) {
|
||||
const defaultStorage = ɵgetDefaultInstanceOf(STORAGE_PROVIDER_NAME, provided, defaultApp);
|
||||
return defaultStorage && new Storage(defaultStorage);
|
||||
}
|
||||
function storageInstanceFactory(fn) {
|
||||
return (zone, injector) => {
|
||||
const storage = zone.runOutsideAngular(() => fn(injector));
|
||||
return new Storage(storage);
|
||||
};
|
||||
}
|
||||
const STORAGE_INSTANCES_PROVIDER = {
|
||||
provide: StorageInstances,
|
||||
deps: [
|
||||
[new Optional(), PROVIDED_STORAGE_INSTANCES],
|
||||
]
|
||||
};
|
||||
const DEFAULT_STORAGE_INSTANCE_PROVIDER = {
|
||||
provide: Storage,
|
||||
useFactory: defaultStorageInstanceFactory,
|
||||
deps: [
|
||||
[new Optional(), PROVIDED_STORAGE_INSTANCES],
|
||||
FirebaseApp,
|
||||
]
|
||||
};
|
||||
class StorageModule {
|
||||
constructor() {
|
||||
registerVersion('angularfire', VERSION.full, 'gcs');
|
||||
}
|
||||
}
|
||||
StorageModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: StorageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
||||
StorageModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: StorageModule });
|
||||
StorageModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: StorageModule, providers: [
|
||||
DEFAULT_STORAGE_INSTANCE_PROVIDER,
|
||||
STORAGE_INSTANCES_PROVIDER,
|
||||
] });
|
||||
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: StorageModule, decorators: [{
|
||||
type: NgModule,
|
||||
args: [{
|
||||
providers: [
|
||||
DEFAULT_STORAGE_INSTANCE_PROVIDER,
|
||||
STORAGE_INSTANCES_PROVIDER,
|
||||
]
|
||||
}]
|
||||
}], ctorParameters: function () { return []; } });
|
||||
function provideStorage(fn, ...deps) {
|
||||
return {
|
||||
ngModule: StorageModule,
|
||||
providers: [{
|
||||
provide: PROVIDED_STORAGE_INSTANCES,
|
||||
useFactory: storageInstanceFactory(fn),
|
||||
multi: true,
|
||||
deps: [
|
||||
NgZone,
|
||||
Injector,
|
||||
ɵAngularFireSchedulers,
|
||||
FirebaseApps,
|
||||
// Defensively load Auth first, if provided
|
||||
[new Optional(), AuthInstances],
|
||||
[new Optional(), AppCheckInstances],
|
||||
...deps,
|
||||
]
|
||||
}]
|
||||
};
|
||||
}
|
||||
|
||||
// DO NOT MODIFY, this file is autogenerated by tools/build.ts
|
||||
const fromTask = ɵzoneWrap(fromTask$1, true);
|
||||
const percentage = ɵzoneWrap(percentage$1, true);
|
||||
|
||||
// DO NOT MODIFY, this file is autogenerated by tools/build.ts
|
||||
const connectStorageEmulator = ɵzoneWrap(connectStorageEmulator$1, true);
|
||||
const deleteObject = ɵzoneWrap(deleteObject$1, true);
|
||||
const getBlob = ɵzoneWrap(getBlob$1, true);
|
||||
const getBytes = ɵzoneWrap(getBytes$1, true);
|
||||
const getDownloadURL = ɵzoneWrap(getDownloadURL$1, true);
|
||||
const getMetadata = ɵzoneWrap(getMetadata$1, true);
|
||||
const getStorage = ɵzoneWrap(getStorage$1, true);
|
||||
const getStream = ɵzoneWrap(getStream$1, true);
|
||||
const list = ɵzoneWrap(list$1, true);
|
||||
const listAll = ɵzoneWrap(listAll$1, true);
|
||||
const ref = ɵzoneWrap(ref$1, true);
|
||||
const updateMetadata = ɵzoneWrap(updateMetadata$1, true);
|
||||
const uploadBytes = ɵzoneWrap(uploadBytes$1, true);
|
||||
const uploadBytesResumable = ɵzoneWrap(uploadBytesResumable$1, true);
|
||||
const uploadString = ɵzoneWrap(uploadString$1, true);
|
||||
|
||||
/**
|
||||
* Generated bundle index. Do not edit.
|
||||
*/
|
||||
|
||||
export { Storage, StorageInstances, StorageModule, connectStorageEmulator, deleteObject, fromTask, getBlob, getBytes, getDownloadURL, getMetadata, getStorage, getStream, list, listAll, percentage, provideStorage, ref, storageInstance$, updateMetadata, uploadBytes, uploadBytesResumable, uploadString };
|
||||
//# sourceMappingURL=angular-fire-storage.js.map
|
||||
1
node_modules/@angular/fire/fesm2015/angular-fire-storage.js.map
generated
vendored
Normal file
1
node_modules/@angular/fire/fesm2015/angular-fire-storage.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
268
node_modules/@angular/fire/fesm2015/angular-fire.js
generated
vendored
Normal file
268
node_modules/@angular/fire/fesm2015/angular-fire.js
generated
vendored
Normal file
|
|
@ -0,0 +1,268 @@
|
|||
import * as i0 from '@angular/core';
|
||||
import { Version, Injectable } from '@angular/core';
|
||||
import { getApps } from 'firebase/app';
|
||||
import { isSupported as isSupported$2 } from 'firebase/remote-config';
|
||||
import { isSupported as isSupported$1 } from 'firebase/messaging';
|
||||
import { isSupported } from 'firebase/analytics';
|
||||
import { queueScheduler, asyncScheduler, Observable } from 'rxjs';
|
||||
import { tap, observeOn, subscribeOn } from 'rxjs/operators';
|
||||
|
||||
const VERSION = new Version('7.6.1');
|
||||
const isAnalyticsSupportedValueSymbol = '__angularfire_symbol__analyticsIsSupportedValue';
|
||||
const isAnalyticsSupportedPromiseSymbol = '__angularfire_symbol__analyticsIsSupported';
|
||||
const isRemoteConfigSupportedValueSymbol = '__angularfire_symbol__remoteConfigIsSupportedValue';
|
||||
const isRemoteConfigSupportedPromiseSymbol = '__angularfire_symbol__remoteConfigIsSupported';
|
||||
const isMessagingSupportedValueSymbol = '__angularfire_symbol__messagingIsSupportedValue';
|
||||
const isMessagingSupportedPromiseSymbol = '__angularfire_symbol__messagingIsSupported';
|
||||
globalThis[isAnalyticsSupportedPromiseSymbol] || (globalThis[isAnalyticsSupportedPromiseSymbol] = isSupported().then(it => globalThis[isAnalyticsSupportedValueSymbol] = it).catch(() => globalThis[isAnalyticsSupportedValueSymbol] = false));
|
||||
globalThis[isMessagingSupportedPromiseSymbol] || (globalThis[isMessagingSupportedPromiseSymbol] = isSupported$1().then(it => globalThis[isMessagingSupportedValueSymbol] = it).catch(() => globalThis[isMessagingSupportedValueSymbol] = false));
|
||||
globalThis[isRemoteConfigSupportedPromiseSymbol] || (globalThis[isRemoteConfigSupportedPromiseSymbol] = isSupported$2().then(it => globalThis[isRemoteConfigSupportedValueSymbol] = it).catch(() => globalThis[isRemoteConfigSupportedValueSymbol] = false));
|
||||
const isSupportedError = (module) => `The APP_INITIALIZER that is "making" isSupported() sync for the sake of convenient DI has not resolved in this
|
||||
context. Rather than injecting ${module} in the constructor, first ensure that ${module} is supported by calling
|
||||
\`await isSupported()\`, then retrieve the instance from the injector manually \`injector.get(${module})\`.`;
|
||||
const ɵisMessagingSupportedFactory = {
|
||||
async: () => globalThis[isMessagingSupportedPromiseSymbol],
|
||||
sync: () => {
|
||||
const ret = globalThis[isMessagingSupportedValueSymbol];
|
||||
if (ret === undefined) {
|
||||
throw new Error(isSupportedError('Messaging'));
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
};
|
||||
const ɵisRemoteConfigSupportedFactory = {
|
||||
async: () => globalThis[isRemoteConfigSupportedPromiseSymbol],
|
||||
sync: () => {
|
||||
const ret = globalThis[isRemoteConfigSupportedValueSymbol];
|
||||
if (ret === undefined) {
|
||||
throw new Error(isSupportedError('RemoteConfig'));
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
};
|
||||
const ɵisAnalyticsSupportedFactory = {
|
||||
async: () => globalThis[isAnalyticsSupportedPromiseSymbol],
|
||||
sync: () => {
|
||||
const ret = globalThis[isAnalyticsSupportedValueSymbol];
|
||||
if (ret === undefined) {
|
||||
throw new Error(isSupportedError('Analytics'));
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
};
|
||||
function ɵgetDefaultInstanceOf(identifier, provided, defaultApp) {
|
||||
if (provided) {
|
||||
// Was provide* only called once? If so grab that
|
||||
if (provided.length === 1) {
|
||||
return provided[0];
|
||||
}
|
||||
const providedUsingDefaultApp = provided.filter((it) => it.app === defaultApp);
|
||||
// Was provide* only called once, using the default app? If so use that
|
||||
if (providedUsingDefaultApp.length === 1) {
|
||||
return providedUsingDefaultApp[0];
|
||||
}
|
||||
}
|
||||
// Grab the default instance from the defaultApp
|
||||
const defaultAppWithContainer = defaultApp;
|
||||
const provider = defaultAppWithContainer.container.getProvider(identifier);
|
||||
return provider.getImmediate({ optional: true });
|
||||
}
|
||||
const ɵgetAllInstancesOf = (identifier, app) => {
|
||||
const apps = app ? [app] : getApps();
|
||||
const instances = [];
|
||||
apps.forEach((app) => {
|
||||
const provider = app.container.getProvider(identifier);
|
||||
provider.instances.forEach((instance) => {
|
||||
if (!instances.includes(instance)) {
|
||||
instances.push(instance);
|
||||
}
|
||||
});
|
||||
});
|
||||
return instances;
|
||||
};
|
||||
|
||||
function noop() {
|
||||
}
|
||||
/**
|
||||
* Schedules tasks so that they are invoked inside the Zone that is passed in the constructor.
|
||||
*/
|
||||
// tslint:disable-next-line:class-name
|
||||
class ɵZoneScheduler {
|
||||
constructor(zone, delegate = queueScheduler) {
|
||||
this.zone = zone;
|
||||
this.delegate = delegate;
|
||||
}
|
||||
now() {
|
||||
return this.delegate.now();
|
||||
}
|
||||
schedule(work, delay, state) {
|
||||
const targetZone = this.zone;
|
||||
// Wrap the specified work function to make sure that if nested scheduling takes place the
|
||||
// work is executed in the correct zone
|
||||
const workInZone = function (state) {
|
||||
targetZone.runGuarded(() => {
|
||||
work.apply(this, [state]);
|
||||
});
|
||||
};
|
||||
// Scheduling itself needs to be run in zone to ensure setInterval calls for async scheduling are done
|
||||
// inside the correct zone. This scheduler needs to schedule asynchronously always to ensure that
|
||||
// firebase emissions are never synchronous. Specifying a delay causes issues with the queueScheduler delegate.
|
||||
return this.delegate.schedule(workInZone, delay, state);
|
||||
}
|
||||
}
|
||||
class BlockUntilFirstOperator {
|
||||
constructor(zone) {
|
||||
this.zone = zone;
|
||||
this.task = null;
|
||||
}
|
||||
call(subscriber, source) {
|
||||
const unscheduleTask = this.unscheduleTask.bind(this);
|
||||
this.task = this.zone.run(() => Zone.current.scheduleMacroTask('firebaseZoneBlock', noop, {}, noop, noop));
|
||||
return source.pipe(tap({ next: unscheduleTask, complete: unscheduleTask, error: unscheduleTask })).subscribe(subscriber).add(unscheduleTask);
|
||||
}
|
||||
unscheduleTask() {
|
||||
// maybe this is a race condition, invoke in a timeout
|
||||
// hold for 10ms while I try to figure out what is going on
|
||||
setTimeout(() => {
|
||||
if (this.task != null && this.task.state === 'scheduled') {
|
||||
this.task.invoke();
|
||||
this.task = null;
|
||||
}
|
||||
}, 10);
|
||||
}
|
||||
}
|
||||
// tslint:disable-next-line:class-name
|
||||
class ɵAngularFireSchedulers {
|
||||
constructor(ngZone) {
|
||||
this.ngZone = ngZone;
|
||||
this.outsideAngular = ngZone.runOutsideAngular(() => new ɵZoneScheduler(Zone.current));
|
||||
this.insideAngular = ngZone.run(() => new ɵZoneScheduler(Zone.current, asyncScheduler));
|
||||
globalThis.ɵAngularFireScheduler || (globalThis.ɵAngularFireScheduler = this);
|
||||
}
|
||||
}
|
||||
ɵAngularFireSchedulers.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: ɵAngularFireSchedulers, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
|
||||
ɵAngularFireSchedulers.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: ɵAngularFireSchedulers, providedIn: 'root' });
|
||||
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: ɵAngularFireSchedulers, decorators: [{
|
||||
type: Injectable,
|
||||
args: [{
|
||||
providedIn: 'root',
|
||||
}]
|
||||
}], ctorParameters: function () { return [{ type: i0.NgZone }]; } });
|
||||
function getSchedulers() {
|
||||
const schedulers = globalThis.ɵAngularFireScheduler;
|
||||
if (!schedulers) {
|
||||
throw new Error(`Either AngularFireModule has not been provided in your AppModule (this can be done manually or implictly using
|
||||
provideFirebaseApp) or you're calling an AngularFire method outside of an NgModule (which is not supported).`);
|
||||
}
|
||||
return schedulers;
|
||||
}
|
||||
function runOutsideAngular(fn) {
|
||||
return getSchedulers().ngZone.runOutsideAngular(() => fn());
|
||||
}
|
||||
function run(fn) {
|
||||
return getSchedulers().ngZone.run(() => fn());
|
||||
}
|
||||
function observeOutsideAngular(obs$) {
|
||||
return obs$.pipe(observeOn(getSchedulers().outsideAngular));
|
||||
}
|
||||
function observeInsideAngular(obs$) {
|
||||
return obs$.pipe(observeOn(getSchedulers().insideAngular));
|
||||
}
|
||||
function keepUnstableUntilFirst(obs$) {
|
||||
const scheduler = getSchedulers();
|
||||
return ɵkeepUnstableUntilFirstFactory(getSchedulers())(obs$);
|
||||
}
|
||||
/**
|
||||
* Operator to block the zone until the first value has been emitted or the observable
|
||||
* has completed/errored. This is used to make sure that universal waits until the first
|
||||
* value from firebase but doesn't block the zone forever since the firebase subscription
|
||||
* is still alive.
|
||||
*/
|
||||
function ɵkeepUnstableUntilFirstFactory(schedulers) {
|
||||
return function keepUnstableUntilFirst(obs$) {
|
||||
obs$ = obs$.lift(new BlockUntilFirstOperator(schedulers.ngZone));
|
||||
return obs$.pipe(
|
||||
// Run the subscribe body outside of Angular (e.g. calling Firebase SDK to add a listener to a change event)
|
||||
subscribeOn(schedulers.outsideAngular),
|
||||
// Run operators inside the angular zone (e.g. side effects via tap())
|
||||
observeOn(schedulers.insideAngular)
|
||||
// INVESTIGATE https://github.com/angular/angularfire/pull/2315
|
||||
// share()
|
||||
);
|
||||
};
|
||||
}
|
||||
const zoneWrapFn = (it, macrotask) => {
|
||||
const _this = this;
|
||||
// function() is needed for the arguments object
|
||||
// tslint:disable-next-line:only-arrow-functions
|
||||
return function () {
|
||||
const _arguments = arguments;
|
||||
if (macrotask) {
|
||||
setTimeout(() => {
|
||||
if (macrotask.state === 'scheduled') {
|
||||
macrotask.invoke();
|
||||
}
|
||||
}, 10);
|
||||
}
|
||||
return run(() => it.apply(_this, _arguments));
|
||||
};
|
||||
};
|
||||
const ɵzoneWrap = (it, blockUntilFirst) => {
|
||||
// function() is needed for the arguments object
|
||||
// tslint:disable-next-line:only-arrow-functions
|
||||
return function () {
|
||||
let macrotask;
|
||||
const _arguments = arguments;
|
||||
// if this is a callback function, e.g, onSnapshot, we should create a microtask and invoke it
|
||||
// only once one of the callback functions is tripped.
|
||||
for (let i = 0; i < arguments.length; i++) {
|
||||
if (typeof _arguments[i] === 'function') {
|
||||
if (blockUntilFirst) {
|
||||
macrotask || (macrotask = run(() => Zone.current.scheduleMacroTask('firebaseZoneBlock', noop, {}, noop, noop)));
|
||||
}
|
||||
// TODO create a microtask to track callback functions
|
||||
_arguments[i] = zoneWrapFn(_arguments[i], macrotask);
|
||||
}
|
||||
}
|
||||
const ret = runOutsideAngular(() => it.apply(this, _arguments));
|
||||
if (!blockUntilFirst) {
|
||||
if (ret instanceof Observable) {
|
||||
const schedulers = getSchedulers();
|
||||
return ret.pipe(subscribeOn(schedulers.outsideAngular), observeOn(schedulers.insideAngular));
|
||||
}
|
||||
else {
|
||||
return run(() => ret);
|
||||
}
|
||||
}
|
||||
if (ret instanceof Observable) {
|
||||
return ret.pipe(keepUnstableUntilFirst);
|
||||
}
|
||||
else if (ret instanceof Promise) {
|
||||
return run(() => new Promise((resolve, reject) => ret.then(it => run(() => resolve(it)), reason => run(() => reject(reason)))));
|
||||
}
|
||||
else if (typeof ret === 'function' && macrotask) {
|
||||
// Handle unsubscribe
|
||||
// function() is needed for the arguments object
|
||||
// tslint:disable-next-line:only-arrow-functions
|
||||
return function () {
|
||||
setTimeout(() => {
|
||||
if (macrotask && macrotask.state === 'scheduled') {
|
||||
macrotask.invoke();
|
||||
}
|
||||
}, 10);
|
||||
return ret.apply(this, arguments);
|
||||
};
|
||||
}
|
||||
else {
|
||||
// TODO how do we handle storage uploads in Zone? and other stuff with cancel() etc?
|
||||
return run(() => ret);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* Generated bundle index. Do not edit.
|
||||
*/
|
||||
|
||||
export { VERSION, keepUnstableUntilFirst, observeInsideAngular, observeOutsideAngular, ɵAngularFireSchedulers, ɵZoneScheduler, ɵgetAllInstancesOf, ɵgetDefaultInstanceOf, ɵisAnalyticsSupportedFactory, ɵisMessagingSupportedFactory, ɵisRemoteConfigSupportedFactory, ɵkeepUnstableUntilFirstFactory, ɵzoneWrap };
|
||||
//# sourceMappingURL=angular-fire.js.map
|
||||
1
node_modules/@angular/fire/fesm2015/angular-fire.js.map
generated
vendored
Normal file
1
node_modules/@angular/fire/fesm2015/angular-fire.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue