@angular/fire 21.0.0-rc.0-canary.c4c4ad1 → 21.0.0-rc.0-canary.0b8a49d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/app-check.md +3 -2
- package/docs/auth.md +8 -4
- package/docs/database.md +13 -8
- package/docs/deploy/getting-started.md +1 -1
- package/docs/firestore.md +6 -3
- package/docs/functions.md +2 -1
- package/docs/messaging.md +30 -25
- package/docs/performance.md +2 -1
- package/docs/remote-config.md +2 -1
- package/docs/storage.md +2 -1
- package/package.json +1 -1
- package/schematics/add/index.js +1 -1
- package/schematics/deploy/actions.js +1 -1
- package/schematics/deploy/builder.js +1 -1
package/docs/app-check.md
CHANGED
|
@@ -20,7 +20,8 @@ ng add @angular/fire
|
|
|
20
20
|
Provide an App Check instance in the application's `app.config.ts`:
|
|
21
21
|
|
|
22
22
|
```ts
|
|
23
|
-
import {
|
|
23
|
+
import { ApplicationConfig } from '@angular/core';
|
|
24
|
+
import { provideFirebaseApp, initializeApp, getApp } from '@angular/fire/app';
|
|
24
25
|
import { provideAppCheck, initializeAppCheck, ReCaptchaV3Provider } from '@angular/fire/app-check';
|
|
25
26
|
|
|
26
27
|
export const appConfig: ApplicationConfig = {
|
|
@@ -32,7 +33,7 @@ export const appConfig: ApplicationConfig = {
|
|
|
32
33
|
...
|
|
33
34
|
],
|
|
34
35
|
...
|
|
35
|
-
}
|
|
36
|
+
}
|
|
36
37
|
```
|
|
37
38
|
|
|
38
39
|
Next inject `AppCheck` it into your component:
|
package/docs/auth.md
CHANGED
|
@@ -23,6 +23,7 @@ ng add @angular/fire
|
|
|
23
23
|
Provide an Auth instance in the application's `app.config.ts`:
|
|
24
24
|
|
|
25
25
|
```ts
|
|
26
|
+
import { ApplicationConfig } from '@angular/core';
|
|
26
27
|
import { provideFirebaseApp, initializeApp } from '@angular/fire/app';
|
|
27
28
|
import { provideAuth, getAuth } from '@angular/fire/auth';
|
|
28
29
|
|
|
@@ -33,7 +34,7 @@ export const appConfig: ApplicationConfig = {
|
|
|
33
34
|
...
|
|
34
35
|
],
|
|
35
36
|
...
|
|
36
|
-
}
|
|
37
|
+
}
|
|
37
38
|
```
|
|
38
39
|
|
|
39
40
|
Next inject `Auth` into your component:
|
|
@@ -186,15 +187,18 @@ export class UserComponent implements OnDestroy {
|
|
|
186
187
|
## Connecting the emulator suite
|
|
187
188
|
|
|
188
189
|
```ts
|
|
190
|
+
import { ApplicationConfig } from '@angular/core';
|
|
191
|
+
import { provideFirebaseApp, initializeApp } from '@angular/fire/app';
|
|
189
192
|
import { connectAuthEmulator, getAuth, provideAuth } from '@angular/fire/auth';
|
|
190
193
|
|
|
191
|
-
|
|
192
|
-
|
|
194
|
+
export const appConfig: ApplicationConfig = {
|
|
195
|
+
providers: [
|
|
196
|
+
provideFirebaseApp(() => initializeApp({ ... })),
|
|
193
197
|
provideAuth(() => {
|
|
194
198
|
const auth = getAuth();
|
|
195
199
|
connectAuthEmulator(auth, 'http://localhost:9099', { disableWarnings: true });
|
|
196
200
|
return auth;
|
|
197
201
|
}),
|
|
198
202
|
]
|
|
199
|
-
}
|
|
203
|
+
}
|
|
200
204
|
```
|
package/docs/database.md
CHANGED
|
@@ -20,6 +20,7 @@ ng add @angular/fire
|
|
|
20
20
|
Provide a Database instance in the application's `app.config.ts`:
|
|
21
21
|
|
|
22
22
|
```ts
|
|
23
|
+
import { ApplicationConfig } from '@angular/core';
|
|
23
24
|
import { provideFirebaseApp, initializeApp } from '@angular/fire/app';
|
|
24
25
|
import { provideDatabase, getDatabase } from '@angular/fire/database';
|
|
25
26
|
|
|
@@ -30,7 +31,7 @@ export const appConfig: ApplicationConfig = {
|
|
|
30
31
|
...
|
|
31
32
|
],
|
|
32
33
|
...
|
|
33
|
-
}
|
|
34
|
+
}
|
|
34
35
|
```
|
|
35
36
|
|
|
36
37
|
Next inject `Database` into your component:
|
|
@@ -131,22 +132,26 @@ The `fromRef()` function creates an observable that emits reference changes.
|
|
|
131
132
|
## Connecting to the emulator suite
|
|
132
133
|
|
|
133
134
|
```ts
|
|
135
|
+
import { ApplicationConfig } from '@angular/core';
|
|
136
|
+
import { provideFirebaseApp, initializeApp } from '@angular/fire/app';
|
|
134
137
|
import { connectDatabaseEmulator, getDatabase, provideDatabase } from '@angular/fire/database';
|
|
135
138
|
|
|
136
|
-
|
|
137
|
-
|
|
139
|
+
export const appConfig: ApplicationConfig = {
|
|
140
|
+
providers: [
|
|
141
|
+
provideFirebaseApp(() => initializeApp({ ... })),
|
|
138
142
|
provideDatabase(() => {
|
|
139
143
|
const database = getDatabase();
|
|
140
144
|
connectDatabaseEmulator(database, 'localhost', 9000);
|
|
141
145
|
return database;
|
|
142
146
|
}),
|
|
143
147
|
]
|
|
144
|
-
}
|
|
148
|
+
}
|
|
145
149
|
```
|
|
146
150
|
|
|
147
151
|
## Working with multiple instances
|
|
148
152
|
|
|
149
153
|
```ts
|
|
154
|
+
import { ApplicationConfig } from '@angular/core';
|
|
150
155
|
import { provideFirebaseApp, FirebaseApp, initializeApp } from '@angular/fire/app';
|
|
151
156
|
import { getDatabase, provideDatabase } from '@angular/fire/database';
|
|
152
157
|
|
|
@@ -156,14 +161,14 @@ const DATABASE_SHARD_URLS = [
|
|
|
156
161
|
'https://BAZ.firebaseio.com',
|
|
157
162
|
];
|
|
158
163
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
provideFirebaseApp(() => initializeApp(
|
|
164
|
+
export const appConfig: ApplicationConfig = {
|
|
165
|
+
providers: [
|
|
166
|
+
provideFirebaseApp(() => initializeApp({ ... })),
|
|
162
167
|
provideDatabase((app: FirebaseApp) => getDatabase(app, DATABASE_SHARD_URLS[0])),
|
|
163
168
|
provideDatabase((app: FirebaseApp) => getDatabase(app, DATABASE_SHARD_URLS[1])),
|
|
164
169
|
provideDatabase((app: FirebaseApp) => getDatabase(app, DATABASE_SHARD_URLS[2])),
|
|
165
170
|
]
|
|
166
|
-
}
|
|
171
|
+
}
|
|
167
172
|
```
|
|
168
173
|
|
|
169
174
|
```ts
|
|
@@ -97,7 +97,7 @@ Setting `functionsNodeVersion` and `functionsRuntimeOptions` in your `angular.js
|
|
|
97
97
|
"deploy": {
|
|
98
98
|
"builder": "@angular/fire:deploy",
|
|
99
99
|
"options": {
|
|
100
|
-
"functionsNodeVersion":
|
|
100
|
+
"functionsNodeVersion": 22,
|
|
101
101
|
"functionsRuntimeOptions": {
|
|
102
102
|
"memory": "2GB",
|
|
103
103
|
"timeoutSeconds": 10,
|
package/docs/firestore.md
CHANGED
|
@@ -21,6 +21,7 @@ ng add @angular/fire
|
|
|
21
21
|
Provide a Firestore instance in the application's `app.config.ts`:
|
|
22
22
|
|
|
23
23
|
```ts
|
|
24
|
+
import { ApplicationConfig } from '@angular/core';
|
|
24
25
|
import { provideFirebaseApp, initializeApp } from '@angular/fire/app';
|
|
25
26
|
import { provideFirestore, getFirestore } from '@angular/fire/firestore';
|
|
26
27
|
|
|
@@ -71,6 +72,7 @@ In `user-profile.component.ts`:
|
|
|
71
72
|
```typescript
|
|
72
73
|
import { Firestore, collection, collectionData} from '@angular/fire/firestore';
|
|
73
74
|
import { Component, inject } from '@angular/core';
|
|
75
|
+
import { Observable } from 'rxjs';
|
|
74
76
|
|
|
75
77
|
@Component ({
|
|
76
78
|
selector: 'app-user-profile',
|
|
@@ -89,7 +91,7 @@ export class UserProfileComponent {
|
|
|
89
91
|
this.users$ = collectionData(userProfileCollection) as Observable<UserProfile[]>;
|
|
90
92
|
}
|
|
91
93
|
}
|
|
92
|
-
export
|
|
94
|
+
export interface UserProfile {
|
|
93
95
|
username: string;
|
|
94
96
|
}
|
|
95
97
|
```
|
|
@@ -114,8 +116,9 @@ To write to Cloud Firestore use the `addDoc` function. It will create a new docu
|
|
|
114
116
|
|
|
115
117
|
|
|
116
118
|
```typescript
|
|
117
|
-
import { Firestore, collection, collectionData, addDoc} from '@angular/fire/firestore';
|
|
119
|
+
import { Firestore, collection, collectionData, addDoc, CollectionReference, DocumentReference } from '@angular/fire/firestore';
|
|
118
120
|
import { Component, inject } from '@angular/core';
|
|
121
|
+
import { Observable } from 'rxjs';
|
|
119
122
|
|
|
120
123
|
@Component ({
|
|
121
124
|
selector: 'app-user-profile',
|
|
@@ -137,7 +140,7 @@ export class UserProfileComponent {
|
|
|
137
140
|
});
|
|
138
141
|
}
|
|
139
142
|
}
|
|
140
|
-
export
|
|
143
|
+
export interface UserProfile {
|
|
141
144
|
username: string;
|
|
142
145
|
}
|
|
143
146
|
```
|
package/docs/functions.md
CHANGED
|
@@ -20,6 +20,7 @@ ng add @angular/fire
|
|
|
20
20
|
Provide a Cloud Functions instance in the application's `app.config.ts`:
|
|
21
21
|
|
|
22
22
|
```ts
|
|
23
|
+
import { ApplicationConfig } from '@angular/core';
|
|
23
24
|
import { provideFirebaseApp, initializeApp } from '@angular/fire/app';
|
|
24
25
|
import { provideFunctions, getFunctions } from '@angular/fire/functions';
|
|
25
26
|
|
|
@@ -30,7 +31,7 @@ export const appConfig: ApplicationConfig = {
|
|
|
30
31
|
...
|
|
31
32
|
],
|
|
32
33
|
...
|
|
33
|
-
}
|
|
34
|
+
}
|
|
34
35
|
```
|
|
35
36
|
|
|
36
37
|
Next inject `Functions` into your component:
|
package/docs/messaging.md
CHANGED
|
@@ -18,6 +18,7 @@ ng add @angular/fire
|
|
|
18
18
|
Provide a Cloud Messaging instance in the application's `app.config.ts`:
|
|
19
19
|
|
|
20
20
|
```ts
|
|
21
|
+
import { ApplicationConfig } from '@angular/core';
|
|
21
22
|
import { provideFirebaseApp, initializeApp } from '@angular/fire/app';
|
|
22
23
|
import { provideMessaging, getMessaging } from '@angular/fire/messaging';
|
|
23
24
|
|
|
@@ -28,7 +29,7 @@ export const appConfig: ApplicationConfig = {
|
|
|
28
29
|
...
|
|
29
30
|
],
|
|
30
31
|
...
|
|
31
|
-
}
|
|
32
|
+
}
|
|
32
33
|
```
|
|
33
34
|
|
|
34
35
|
Next inject `Messaging` into your component:
|
|
@@ -55,10 +56,10 @@ There are two parts to Firebase Messaging, a Service Worker and the DOM API. Ang
|
|
|
55
56
|
It may be wise to use file replacements or environments here for different environments
|
|
56
57
|
|
|
57
58
|
```
|
|
58
|
-
// This sample application is using
|
|
59
|
+
// This sample application is using 12.4.0, make sure you are importing the same version
|
|
59
60
|
|
|
60
|
-
import { initializeApp } from "https://www.gstatic.com/firebasejs/
|
|
61
|
-
import { getMessaging } from "https://www.gstatic.com/firebasejs/
|
|
61
|
+
import { initializeApp } from "https://www.gstatic.com/firebasejs/12.4.0/firebase-app.js";
|
|
62
|
+
import { getMessaging } from "https://www.gstatic.com/firebasejs/12.4.0/firebase-messaging-sw.js";
|
|
62
63
|
|
|
63
64
|
const firebaseApp = initializeApp({
|
|
64
65
|
apiKey: "",
|
|
@@ -76,23 +77,25 @@ const messaging = getMessaging(firebaseApp);
|
|
|
76
77
|
|
|
77
78
|
```
|
|
78
79
|
import { Injectable } from "@angular/core";
|
|
79
|
-
import { Messaging, getToken, onMessage, deleteToken } from "@angular/fire/messaging";
|
|
80
|
+
import { Messaging, MessagePayload, getToken, onMessage, deleteToken } from "@angular/fire/messaging";
|
|
80
81
|
import { Observable, tap } from "rxjs";
|
|
81
82
|
|
|
82
83
|
@Injectable({
|
|
83
84
|
providedIn: "root",
|
|
84
85
|
})
|
|
85
86
|
export class FcmService {
|
|
86
|
-
|
|
87
|
+
message$: Observable<MessagePayload>;
|
|
88
|
+
|
|
89
|
+
constructor(private msg: Messaging) {
|
|
87
90
|
Notification.requestPermission().then(
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
91
|
+
(notificationPermissions: NotificationPermission) => {
|
|
92
|
+
if (notificationPermissions === "granted") {
|
|
93
|
+
console.log("Granted");
|
|
94
|
+
}
|
|
95
|
+
if (notificationPermissions === "denied") {
|
|
96
|
+
console.log("Denied");
|
|
97
|
+
}
|
|
98
|
+
});
|
|
96
99
|
navigator.serviceWorker
|
|
97
100
|
.register("/assets/firebase-messaging-sw.js", {
|
|
98
101
|
type: "module",
|
|
@@ -101,23 +104,25 @@ export class FcmService {
|
|
|
101
104
|
getToken(this.msg, {
|
|
102
105
|
vapidKey: `an optional key generated on Firebase for your fcm tokens`,
|
|
103
106
|
serviceWorkerRegistration: serviceWorkerRegistration,
|
|
104
|
-
}).then((
|
|
105
|
-
console.log('my fcm token',
|
|
107
|
+
}).then((token) => {
|
|
108
|
+
console.log('my fcm token', token);
|
|
106
109
|
// This is a good place to then store it on your database for each user
|
|
107
110
|
});
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
})
|
|
111
|
+
});
|
|
112
|
+
this.message$ = new Observable<MessagePayload>((sub) =>
|
|
113
|
+
onMessage(this.msg, (msg) => sub.next(msg))).pipe(
|
|
114
|
+
tap((msg) => {
|
|
115
|
+
console.log("My Firebase Cloud Message", msg);
|
|
116
|
+
})
|
|
115
117
|
);
|
|
116
|
-
|
|
117
|
-
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
async deleteToken() {
|
|
118
121
|
// We can also delete fcm tokens, make sure to also update this on your firestore db if you are storing them as well
|
|
122
|
+
// This calls the imported deleteToken, not this method. Class methods are not in lexical scope
|
|
119
123
|
await deleteToken(this.msg);
|
|
120
124
|
}
|
|
125
|
+
}
|
|
121
126
|
```
|
|
122
127
|
|
|
123
128
|
# Testing and Sending Notifications
|
package/docs/performance.md
CHANGED
|
@@ -20,6 +20,7 @@ ng add @angular/fire
|
|
|
20
20
|
Provide a Performance instance in the application's `app.config.ts`:
|
|
21
21
|
|
|
22
22
|
```ts
|
|
23
|
+
import { ApplicationConfig } from '@angular/core';
|
|
23
24
|
import { provideFirebaseApp, initializeApp } from '@angular/fire/app';
|
|
24
25
|
import { providePerformance, getPerformance } from '@angular/fire/performance';
|
|
25
26
|
|
|
@@ -30,7 +31,7 @@ export const appConfig: ApplicationConfig = {
|
|
|
30
31
|
...
|
|
31
32
|
],
|
|
32
33
|
...
|
|
33
|
-
}
|
|
34
|
+
}
|
|
34
35
|
```
|
|
35
36
|
|
|
36
37
|
Next inject `Performance` into your component:
|
package/docs/remote-config.md
CHANGED
|
@@ -20,6 +20,7 @@ ng add @angular/fire
|
|
|
20
20
|
Provide a Remote Config instance in the application's `app.config.ts`:
|
|
21
21
|
|
|
22
22
|
```ts
|
|
23
|
+
import { ApplicationConfig } from '@angular/core';
|
|
23
24
|
import { provideFirebaseApp, initializeApp } from '@angular/fire/app';
|
|
24
25
|
import { provideRemoteConfig, getRemoteConfig } from '@angular/fire/remote-config';
|
|
25
26
|
|
|
@@ -30,7 +31,7 @@ export const appConfig: ApplicationConfig = {
|
|
|
30
31
|
...
|
|
31
32
|
],
|
|
32
33
|
...
|
|
33
|
-
}
|
|
34
|
+
}
|
|
34
35
|
```
|
|
35
36
|
|
|
36
37
|
Next inject `RemoteConfig` into your component:
|
package/docs/storage.md
CHANGED
|
@@ -22,6 +22,7 @@ ng add @angular/fire
|
|
|
22
22
|
Provide a Cloud Storage instance in the application's `app.config.ts`:
|
|
23
23
|
|
|
24
24
|
```ts
|
|
25
|
+
import { ApplicationConfig } from '@angular/core';
|
|
25
26
|
import { provideFirebaseApp, initializeApp } from '@angular/fire/app';
|
|
26
27
|
import { provideStorage, getStorage } from '@angular/fire/storage';
|
|
27
28
|
|
|
@@ -32,7 +33,7 @@ export const appConfig: ApplicationConfig = {
|
|
|
32
33
|
...
|
|
33
34
|
],
|
|
34
35
|
...
|
|
35
|
-
}
|
|
36
|
+
}
|
|
36
37
|
```
|
|
37
38
|
|
|
38
39
|
Next inject `Storage` into your component:
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "../node_modules/ng-packagr/package.schema.json",
|
|
3
3
|
"name": "@angular/fire",
|
|
4
|
-
"version": "21.0.0-rc.0-canary.
|
|
4
|
+
"version": "21.0.0-rc.0-canary.0b8a49d",
|
|
5
5
|
"description": "Angular + Firebase = ❤️",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"registry": "https://wombat-dressing-room.appspot.com",
|
package/schematics/add/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var mt=Object.create;var G=Object.defineProperty;var $t=Object.getOwnPropertyDescriptor;var Rt=Object.getOwnPropertyNames;var dt=Object.getPrototypeOf,It=Object.prototype.hasOwnProperty;var p=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),gt=(t,e)=>{for(var r in e)G(t,r,{get:e[r],enumerable:!0})},ge=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Rt(e))!It.call(t,n)&&n!==r&&G(t,n,{get:()=>e[n],enumerable:!(s=$t(e,n))||s.enumerable});return t};var Lt=(t,e,r)=>(r=t!=null?mt(dt(t)):{},ge(e||!t||!t.__esModule?G(r,"default",{value:t,enumerable:!0}):r,t)),Nt=t=>ge(G({},"__esModule",{value:!0}),t);var P=p((Oi,Le)=>{"use strict";var St="2.0.0",Ot=Number.MAX_SAFE_INTEGER||9007199254740991,Tt=16,At=250,wt=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Le.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:Tt,MAX_SAFE_BUILD_LENGTH:At,MAX_SAFE_INTEGER:Ot,RELEASE_TYPES:wt,SEMVER_SPEC_VERSION:St,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var x=p((Ti,Ne)=>{"use strict";var qt=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};Ne.exports=qt});var q=p((T,Se)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:ee,MAX_SAFE_BUILD_LENGTH:vt,MAX_LENGTH:Pt}=P(),xt=x();T=Se.exports={};var Ct=T.re=[],Dt=T.safeRe=[],c=T.src=[],yt=T.safeSrc=[],l=T.t={},jt=0,re="[a-zA-Z0-9-]",Ft=[["\\s",1],["\\d",Pt],[re,vt]],Gt=t=>{for(let[e,r]of Ft)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},m=(t,e,r)=>{let s=Gt(e),n=jt++;xt(t,n,e),l[t]=n,c[n]=e,yt[n]=s,Ct[n]=new RegExp(e,r?"g":void 0),Dt[n]=new RegExp(s,r?"g":void 0)};m("NUMERICIDENTIFIER","0|[1-9]\\d*");m("NUMERICIDENTIFIERLOOSE","\\d+");m("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${re}*`);m("MAINVERSION",`(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})`);m("MAINVERSIONLOOSE",`(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})`);m("PRERELEASEIDENTIFIER",`(?:${c[l.NONNUMERICIDENTIFIER]}|${c[l.NUMERICIDENTIFIER]})`);m("PRERELEASEIDENTIFIERLOOSE",`(?:${c[l.NONNUMERICIDENTIFIER]}|${c[l.NUMERICIDENTIFIERLOOSE]})`);m("PRERELEASE",`(?:-(${c[l.PRERELEASEIDENTIFIER]}(?:\\.${c[l.PRERELEASEIDENTIFIER]})*))`);m("PRERELEASELOOSE",`(?:-?(${c[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[l.PRERELEASEIDENTIFIERLOOSE]})*))`);m("BUILDIDENTIFIER",`${re}+`);m("BUILD",`(?:\\+(${c[l.BUILDIDENTIFIER]}(?:\\.${c[l.BUILDIDENTIFIER]})*))`);m("FULLPLAIN",`v?${c[l.MAINVERSION]}${c[l.PRERELEASE]}?${c[l.BUILD]}?`);m("FULL",`^${c[l.FULLPLAIN]}$`);m("LOOSEPLAIN",`[v=\\s]*${c[l.MAINVERSIONLOOSE]}${c[l.PRERELEASELOOSE]}?${c[l.BUILD]}?`);m("LOOSE",`^${c[l.LOOSEPLAIN]}$`);m("GTLT","((?:<|>)?=?)");m("XRANGEIDENTIFIERLOOSE",`${c[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);m("XRANGEIDENTIFIER",`${c[l.NUMERICIDENTIFIER]}|x|X|\\*`);m("XRANGEPLAIN",`[v=\\s]*(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:${c[l.PRERELEASE]})?${c[l.BUILD]}?)?)?`);m("XRANGEPLAINLOOSE",`[v=\\s]*(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:${c[l.PRERELEASELOOSE]})?${c[l.BUILD]}?)?)?`);m("XRANGE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAIN]}$`);m("XRANGELOOSE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAINLOOSE]}$`);m("COERCEPLAIN",`(^|[^\\d])(\\d{1,${ee}})(?:\\.(\\d{1,${ee}}))?(?:\\.(\\d{1,${ee}}))?`);m("COERCE",`${c[l.COERCEPLAIN]}(?:$|[^\\d])`);m("COERCEFULL",c[l.COERCEPLAIN]+`(?:${c[l.PRERELEASE]})?(?:${c[l.BUILD]})?(?:$|[^\\d])`);m("COERCERTL",c[l.COERCE],!0);m("COERCERTLFULL",c[l.COERCEFULL],!0);m("LONETILDE","(?:~>?)");m("TILDETRIM",`(\\s*)${c[l.LONETILDE]}\\s+`,!0);T.tildeTrimReplace="$1~";m("TILDE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAIN]}$`);m("TILDELOOSE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAINLOOSE]}$`);m("LONECARET","(?:\\^)");m("CARETTRIM",`(\\s*)${c[l.LONECARET]}\\s+`,!0);T.caretTrimReplace="$1^";m("CARET",`^${c[l.LONECARET]}${c[l.XRANGEPLAIN]}$`);m("CARETLOOSE",`^${c[l.LONECARET]}${c[l.XRANGEPLAINLOOSE]}$`);m("COMPARATORLOOSE",`^${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]})$|^$`);m("COMPARATOR",`^${c[l.GTLT]}\\s*(${c[l.FULLPLAIN]})$|^$`);m("COMPARATORTRIM",`(\\s*)${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]}|${c[l.XRANGEPLAIN]})`,!0);T.comparatorTrimReplace="$1$2$3";m("HYPHENRANGE",`^\\s*(${c[l.XRANGEPLAIN]})\\s+-\\s+(${c[l.XRANGEPLAIN]})\\s*$`);m("HYPHENRANGELOOSE",`^\\s*(${c[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[l.XRANGEPLAINLOOSE]})\\s*$`);m("STAR","(<|>)?=?\\s*\\*");m("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");m("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var b=p((Ai,Oe)=>{"use strict";var bt=Object.freeze({loose:!0}),Ut=Object.freeze({}),Vt=t=>t?typeof t!="object"?bt:t:Ut;Oe.exports=Vt});var te=p((wi,we)=>{"use strict";var Te=/^[0-9]+$/,Ae=(t,e)=>{if(typeof t=="number"&&typeof e=="number")return t===e?0:t<e?-1:1;let r=Te.test(t),s=Te.test(e);return r&&s&&(t=+t,e=+e),t===e?0:r&&!s?-1:s&&!r?1:t<e?-1:1},Xt=(t,e)=>Ae(e,t);we.exports={compareIdentifiers:Ae,rcompareIdentifiers:Xt}});var I=p((qi,ve)=>{"use strict";var U=x(),{MAX_LENGTH:qe,MAX_SAFE_INTEGER:V}=P(),{safeRe:X,t:k}=q(),kt=b(),{compareIdentifiers:se}=te(),ne=class t{constructor(e,r){if(r=kt(r),e instanceof t){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>qe)throw new TypeError(`version is longer than ${qe} characters`);U("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let s=e.trim().match(r.loose?X[k.LOOSE]:X[k.FULL]);if(!s)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>V||this.major<0)throw new TypeError("Invalid major version");if(this.minor>V||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>V||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map(n=>{if(/^[0-9]+$/.test(n)){let i=+n;if(i>=0&&i<V)return i}return n}):this.prerelease=[],this.build=s[5]?s[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(U("SemVer.compare",this.version,this.options,e),!(e instanceof t)){if(typeof e=="string"&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(e,this.options)),this.major<e.major?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:this.patch>e.patch?1:0}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let r=0;do{let s=this.prerelease[r],n=e.prerelease[r];if(U("prerelease compare",r,s,n),s===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(s===void 0)return-1;if(s===n)continue;return se(s,n)}while(++r)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let r=0;do{let s=this.build[r],n=e.build[r];if(U("build compare",r,s,n),s===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(s===void 0)return-1;if(s===n)continue;return se(s,n)}while(++r)}inc(e,r,s){if(e.startsWith("pre")){if(!r&&s===!1)throw new Error("invalid increment argument: identifier is empty");if(r){let n=`-${r}`.match(this.options.loose?X[k.PRERELEASELOOSE]:X[k.PRERELEASE]);if(!n||n[1]!==r)throw new Error(`invalid identifier: ${r}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,s);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,s);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,s),this.inc("pre",r,s);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,s),this.inc("pre",r,s);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let n=Number(s)?1:0;if(this.prerelease.length===0)this.prerelease=[n];else{let i=this.prerelease.length;for(;--i>=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);if(i===-1){if(r===this.prerelease.join(".")&&s===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(n)}}if(r){let i=[r,n];s===!1&&(i=[r]),se(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};ve.exports=ne});var w=p((vi,xe)=>{"use strict";var Pe=I(),_t=(t,e,r=!1)=>{if(t instanceof Pe)return t;try{return new Pe(t,e)}catch(s){if(!r)return null;throw s}};xe.exports=_t});var De=p((Pi,Ce)=>{"use strict";var Ht=w(),Wt=(t,e)=>{let r=Ht(t,e);return r?r.version:null};Ce.exports=Wt});var je=p((xi,ye)=>{"use strict";var Mt=w(),Yt=(t,e)=>{let r=Mt(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};ye.exports=Yt});var be=p((Ci,Ge)=>{"use strict";var Fe=I(),Bt=(t,e,r,s,n)=>{typeof r=="string"&&(n=s,s=r,r=void 0);try{return new Fe(t instanceof Fe?t.version:t,r).inc(e,s,n).version}catch(i){return null}};Ge.exports=Bt});var Xe=p((Di,Ve)=>{"use strict";var Ue=w(),zt=(t,e)=>{let r=Ue(t,null,!0),s=Ue(e,null,!0),n=r.compare(s);if(n===0)return null;let i=n>0,o=i?r:s,a=i?s:r,u=!!o.prerelease.length;if(!!a.prerelease.length&&!u){if(!a.patch&&!a.minor)return"major";if(a.compareMain(o)===0)return a.minor&&!a.patch?"minor":"patch"}let $=u?"pre":"";return r.major!==s.major?$+"major":r.minor!==s.minor?$+"minor":r.patch!==s.patch?$+"patch":"prerelease"};Ve.exports=zt});var _e=p((yi,ke)=>{"use strict";var Kt=I(),Zt=(t,e)=>new Kt(t,e).major;ke.exports=Zt});var We=p((ji,He)=>{"use strict";var Jt=I(),Qt=(t,e)=>new Jt(t,e).minor;He.exports=Qt});var Ye=p((Fi,Me)=>{"use strict";var es=I(),rs=(t,e)=>new es(t,e).patch;Me.exports=rs});var ze=p((Gi,Be)=>{"use strict";var ts=w(),ss=(t,e)=>{let r=ts(t,e);return r&&r.prerelease.length?r.prerelease:null};Be.exports=ss});var S=p((bi,Ze)=>{"use strict";var Ke=I(),ns=(t,e,r)=>new Ke(t,r).compare(new Ke(e,r));Ze.exports=ns});var Qe=p((Ui,Je)=>{"use strict";var is=S(),os=(t,e,r)=>is(e,t,r);Je.exports=os});var rr=p((Vi,er)=>{"use strict";var as=S(),cs=(t,e)=>as(t,e,!0);er.exports=cs});var _=p((Xi,sr)=>{"use strict";var tr=I(),ls=(t,e,r)=>{let s=new tr(t,r),n=new tr(e,r);return s.compare(n)||s.compareBuild(n)};sr.exports=ls});var ir=p((ki,nr)=>{"use strict";var us=_(),fs=(t,e)=>t.sort((r,s)=>us(r,s,e));nr.exports=fs});var ar=p((_i,or)=>{"use strict";var hs=_(),Es=(t,e)=>t.sort((r,s)=>hs(s,r,e));or.exports=Es});var C=p((Hi,cr)=>{"use strict";var ps=S(),ms=(t,e,r)=>ps(t,e,r)>0;cr.exports=ms});var H=p((Wi,lr)=>{"use strict";var $s=S(),Rs=(t,e,r)=>$s(t,e,r)<0;lr.exports=Rs});var ie=p((Mi,ur)=>{"use strict";var ds=S(),Is=(t,e,r)=>ds(t,e,r)===0;ur.exports=Is});var oe=p((Yi,fr)=>{"use strict";var gs=S(),Ls=(t,e,r)=>gs(t,e,r)!==0;fr.exports=Ls});var W=p((Bi,hr)=>{"use strict";var Ns=S(),Ss=(t,e,r)=>Ns(t,e,r)>=0;hr.exports=Ss});var M=p((zi,Er)=>{"use strict";var Os=S(),Ts=(t,e,r)=>Os(t,e,r)<=0;Er.exports=Ts});var ae=p((Ki,pr)=>{"use strict";var As=ie(),ws=oe(),qs=C(),vs=W(),Ps=H(),xs=M(),Cs=(t,e,r,s)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return As(t,r,s);case"!=":return ws(t,r,s);case">":return qs(t,r,s);case">=":return vs(t,r,s);case"<":return Ps(t,r,s);case"<=":return xs(t,r,s);default:throw new TypeError(`Invalid operator: ${e}`)}};pr.exports=Cs});var $r=p((Zi,mr)=>{"use strict";var Ds=I(),ys=w(),{safeRe:Y,t:B}=q(),js=(t,e)=>{if(t instanceof Ds)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(e.includePrerelease?Y[B.COERCEFULL]:Y[B.COERCE]);else{let u=e.includePrerelease?Y[B.COERCERTLFULL]:Y[B.COERCERTL],f;for(;(f=u.exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||f.index+f[0].length!==r.index+r[0].length)&&(r=f),u.lastIndex=f.index+f[1].length+f[2].length;u.lastIndex=-1}if(r===null)return null;let s=r[2],n=r[3]||"0",i=r[4]||"0",o=e.includePrerelease&&r[5]?`-${r[5]}`:"",a=e.includePrerelease&&r[6]?`+${r[6]}`:"";return ys(`${s}.${n}.${i}${o}${a}`,e)};mr.exports=js});var dr=p((Ji,Rr)=>{"use strict";var ce=class{constructor(){this.max=1e3,this.map=new Map}get(e){let r=this.map.get(e);if(r!==void 0)return this.map.delete(e),this.map.set(e,r),r}delete(e){return this.map.delete(e)}set(e,r){if(!this.delete(e)&&r!==void 0){if(this.map.size>=this.max){let n=this.map.keys().next().value;this.delete(n)}this.map.set(e,r)}return this}};Rr.exports=ce});var O=p((Qi,Nr)=>{"use strict";var Fs=/\s+/g,le=class t{constructor(e,r){if(r=bs(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof ue)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e.trim().replace(Fs," "),this.set=this.raw.split("||").map(s=>this.parseRange(s.trim())).filter(s=>s.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let s=this.set[0];if(this.set=this.set.filter(n=>!gr(n[0])),this.set.length===0)this.set=[s];else if(this.set.length>1){for(let n of this.set)if(n.length===1&&Ws(n[0])){this.set=[n];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let r=this.set[e];for(let s=0;s<r.length;s++)s>0&&(this.formatted+=" "),this.formatted+=r[s].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let s=((this.options.includePrerelease&&_s)|(this.options.loose&&Hs))+":"+e,n=Ir.get(s);if(n)return n;let i=this.options.loose,o=i?L[g.HYPHENRANGELOOSE]:L[g.HYPHENRANGE];e=e.replace(o,rn(this.options.includePrerelease)),R("hyphen replace",e),e=e.replace(L[g.COMPARATORTRIM],Vs),R("comparator trim",e),e=e.replace(L[g.TILDETRIM],Xs),R("tilde trim",e),e=e.replace(L[g.CARETTRIM],ks),R("caret trim",e);let a=e.split(" ").map(h=>Ms(h,this.options)).join(" ").split(/\s+/).map(h=>en(h,this.options));i&&(a=a.filter(h=>(R("loose invalid filter",h,this.options),!!h.match(L[g.COMPARATORLOOSE])))),R("range list",a);let u=new Map,f=a.map(h=>new ue(h,this.options));for(let h of f){if(gr(h))return[h];u.set(h.value,h)}u.size>1&&u.has("")&&u.delete("");let $=[...u.values()];return Ir.set(s,$),$}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(s=>Lr(s,r)&&e.set.some(n=>Lr(n,r)&&s.every(i=>n.every(o=>i.intersects(o,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new Us(e,this.options)}catch(r){return!1}for(let r=0;r<this.set.length;r++)if(tn(this.set[r],e,this.options))return!0;return!1}};Nr.exports=le;var Gs=dr(),Ir=new Gs,bs=b(),ue=D(),R=x(),Us=I(),{safeRe:L,t:g,comparatorTrimReplace:Vs,tildeTrimReplace:Xs,caretTrimReplace:ks}=q(),{FLAG_INCLUDE_PRERELEASE:_s,FLAG_LOOSE:Hs}=P(),gr=t=>t.value==="<0.0.0-0",Ws=t=>t.value==="",Lr=(t,e)=>{let r=!0,s=t.slice(),n=s.pop();for(;r&&s.length;)r=s.every(i=>n.intersects(i,e)),n=s.pop();return r},Ms=(t,e)=>(t=t.replace(L[g.BUILD],""),R("comp",t,e),t=zs(t,e),R("caret",t),t=Ys(t,e),R("tildes",t),t=Zs(t,e),R("xrange",t),t=Qs(t,e),R("stars",t),t),N=t=>!t||t.toLowerCase()==="x"||t==="*",Ys=(t,e)=>t.trim().split(/\s+/).map(r=>Bs(r,e)).join(" "),Bs=(t,e)=>{let r=e.loose?L[g.TILDELOOSE]:L[g.TILDE];return t.replace(r,(s,n,i,o,a)=>{R("tilde",t,s,n,i,o,a);let u;return N(n)?u="":N(i)?u=`>=${n}.0.0 <${+n+1}.0.0-0`:N(o)?u=`>=${n}.${i}.0 <${n}.${+i+1}.0-0`:a?(R("replaceTilde pr",a),u=`>=${n}.${i}.${o}-${a} <${n}.${+i+1}.0-0`):u=`>=${n}.${i}.${o} <${n}.${+i+1}.0-0`,R("tilde return",u),u})},zs=(t,e)=>t.trim().split(/\s+/).map(r=>Ks(r,e)).join(" "),Ks=(t,e)=>{R("caret",t,e);let r=e.loose?L[g.CARETLOOSE]:L[g.CARET],s=e.includePrerelease?"-0":"";return t.replace(r,(n,i,o,a,u)=>{R("caret",t,n,i,o,a,u);let f;return N(i)?f="":N(o)?f=`>=${i}.0.0${s} <${+i+1}.0.0-0`:N(a)?i==="0"?f=`>=${i}.${o}.0${s} <${i}.${+o+1}.0-0`:f=`>=${i}.${o}.0${s} <${+i+1}.0.0-0`:u?(R("replaceCaret pr",u),i==="0"?o==="0"?f=`>=${i}.${o}.${a}-${u} <${i}.${o}.${+a+1}-0`:f=`>=${i}.${o}.${a}-${u} <${i}.${+o+1}.0-0`:f=`>=${i}.${o}.${a}-${u} <${+i+1}.0.0-0`):(R("no pr"),i==="0"?o==="0"?f=`>=${i}.${o}.${a}${s} <${i}.${o}.${+a+1}-0`:f=`>=${i}.${o}.${a}${s} <${i}.${+o+1}.0-0`:f=`>=${i}.${o}.${a} <${+i+1}.0.0-0`),R("caret return",f),f})},Zs=(t,e)=>(R("replaceXRanges",t,e),t.split(/\s+/).map(r=>Js(r,e)).join(" ")),Js=(t,e)=>{t=t.trim();let r=e.loose?L[g.XRANGELOOSE]:L[g.XRANGE];return t.replace(r,(s,n,i,o,a,u)=>{R("xRange",t,s,n,i,o,a,u);let f=N(i),$=f||N(o),h=$||N(a),d=h;return n==="="&&d&&(n=""),u=e.includePrerelease?"-0":"",f?n===">"||n==="<"?s="<0.0.0-0":s="*":n&&d?($&&(o=0),a=0,n===">"?(n=">=",$?(i=+i+1,o=0,a=0):(o=+o+1,a=0)):n==="<="&&(n="<",$?i=+i+1:o=+o+1),n==="<"&&(u="-0"),s=`${n+i}.${o}.${a}${u}`):$?s=`>=${i}.0.0${u} <${+i+1}.0.0-0`:h&&(s=`>=${i}.${o}.0${u} <${i}.${+o+1}.0-0`),R("xRange return",s),s})},Qs=(t,e)=>(R("replaceStars",t,e),t.trim().replace(L[g.STAR],"")),en=(t,e)=>(R("replaceGTE0",t,e),t.trim().replace(L[e.includePrerelease?g.GTE0PRE:g.GTE0],"")),rn=t=>(e,r,s,n,i,o,a,u,f,$,h,d)=>(N(s)?r="":N(n)?r=`>=${s}.0.0${t?"-0":""}`:N(i)?r=`>=${s}.${n}.0${t?"-0":""}`:o?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,N(f)?u="":N($)?u=`<${+f+1}.0.0-0`:N(h)?u=`<${f}.${+$+1}.0-0`:d?u=`<=${f}.${$}.${h}-${d}`:t?u=`<${f}.${$}.${+h+1}-0`:u=`<=${u}`,`${r} ${u}`.trim()),tn=(t,e,r)=>{for(let s=0;s<t.length;s++)if(!t[s].test(e))return!1;if(e.prerelease.length&&!r.includePrerelease){for(let s=0;s<t.length;s++)if(R(t[s].semver),t[s].semver!==ue.ANY&&t[s].semver.prerelease.length>0){let n=t[s].semver;if(n.major===e.major&&n.minor===e.minor&&n.patch===e.patch)return!0}return!1}return!0}});var D=p((eo,qr)=>{"use strict";var y=Symbol("SemVer ANY"),Ee=class t{static get ANY(){return y}constructor(e,r){if(r=Sr(r),e instanceof t){if(e.loose===!!r.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),he("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===y?this.value="":this.value=this.operator+this.semver.version,he("comp",this)}parse(e){let r=this.options.loose?Or[Tr.COMPARATORLOOSE]:Or[Tr.COMPARATOR],s=e.match(r);if(!s)throw new TypeError(`Invalid comparator: ${e}`);this.operator=s[1]!==void 0?s[1]:"",this.operator==="="&&(this.operator=""),s[2]?this.semver=new Ar(s[2],this.options.loose):this.semver=y}toString(){return this.value}test(e){if(he("Comparator.test",e,this.options.loose),this.semver===y||e===y)return!0;if(typeof e=="string")try{e=new Ar(e,this.options)}catch(r){return!1}return fe(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new wr(e.value,r).test(this.value):e.operator===""?e.value===""?!0:new wr(this.value,r).test(e.semver):(r=Sr(r),r.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||fe(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||fe(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};qr.exports=Ee;var Sr=b(),{safeRe:Or,t:Tr}=q(),fe=ae(),he=x(),Ar=I(),wr=O()});var j=p((ro,vr)=>{"use strict";var sn=O(),nn=(t,e,r)=>{try{e=new sn(e,r)}catch(s){return!1}return e.test(t)};vr.exports=nn});var xr=p((to,Pr)=>{"use strict";var on=O(),an=(t,e)=>new on(t,e).set.map(r=>r.map(s=>s.value).join(" ").trim().split(" "));Pr.exports=an});var Dr=p((so,Cr)=>{"use strict";var cn=I(),ln=O(),un=(t,e,r)=>{let s=null,n=null,i=null;try{i=new ln(e,r)}catch(o){return null}return t.forEach(o=>{i.test(o)&&(!s||n.compare(o)===-1)&&(s=o,n=new cn(s,r))}),s};Cr.exports=un});var jr=p((no,yr)=>{"use strict";var fn=I(),hn=O(),En=(t,e,r)=>{let s=null,n=null,i=null;try{i=new hn(e,r)}catch(o){return null}return t.forEach(o=>{i.test(o)&&(!s||n.compare(o)===1)&&(s=o,n=new fn(s,r))}),s};yr.exports=En});var br=p((io,Gr)=>{"use strict";var pe=I(),pn=O(),Fr=C(),mn=(t,e)=>{t=new pn(t,e);let r=new pe("0.0.0");if(t.test(r)||(r=new pe("0.0.0-0"),t.test(r)))return r;r=null;for(let s=0;s<t.set.length;++s){let n=t.set[s],i=null;n.forEach(o=>{let a=new pe(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!i||Fr(a,i))&&(i=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),i&&(!r||Fr(r,i))&&(r=i)}return r&&t.test(r)?r:null};Gr.exports=mn});var Vr=p((oo,Ur)=>{"use strict";var $n=O(),Rn=(t,e)=>{try{return new $n(t,e).range||"*"}catch(r){return null}};Ur.exports=Rn});var z=p((ao,Hr)=>{"use strict";var dn=I(),_r=D(),{ANY:In}=_r,gn=O(),Ln=j(),Xr=C(),kr=H(),Nn=M(),Sn=W(),On=(t,e,r,s)=>{t=new dn(t,s),e=new gn(e,s);let n,i,o,a,u;switch(r){case">":n=Xr,i=Nn,o=kr,a=">",u=">=";break;case"<":n=kr,i=Sn,o=Xr,a="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Ln(t,e,s))return!1;for(let f=0;f<e.set.length;++f){let $=e.set[f],h=null,d=null;if($.forEach(E=>{E.semver===In&&(E=new _r(">=0.0.0")),h=h||E,d=d||E,n(E.semver,h.semver,s)?h=E:o(E.semver,d.semver,s)&&(d=E)}),h.operator===a||h.operator===u||(!d.operator||d.operator===a)&&i(t,d.semver))return!1;if(d.operator===u&&o(t,d.semver))return!1}return!0};Hr.exports=On});var Mr=p((co,Wr)=>{"use strict";var Tn=z(),An=(t,e,r)=>Tn(t,e,">",r);Wr.exports=An});var Br=p((lo,Yr)=>{"use strict";var wn=z(),qn=(t,e,r)=>wn(t,e,"<",r);Yr.exports=qn});var Zr=p((uo,Kr)=>{"use strict";var zr=O(),vn=(t,e,r)=>(t=new zr(t,r),e=new zr(e,r),t.intersects(e,r));Kr.exports=vn});var Qr=p((fo,Jr)=>{"use strict";var Pn=j(),xn=S();Jr.exports=(t,e,r)=>{let s=[],n=null,i=null,o=t.sort(($,h)=>xn($,h,r));for(let $ of o)Pn($,e,r)?(i=$,n||(n=$)):(i&&s.push([n,i]),i=null,n=null);n&&s.push([n,null]);let a=[];for(let[$,h]of s)$===h?a.push($):!h&&$===o[0]?a.push("*"):h?$===o[0]?a.push(`<=${h}`):a.push(`${$} - ${h}`):a.push(`>=${$}`);let u=a.join(" || "),f=typeof e.raw=="string"?e.raw:String(e);return u.length<f.length?u:e}});var it=p((ho,nt)=>{"use strict";var et=O(),$e=D(),{ANY:me}=$e,F=j(),Re=S(),Cn=(t,e,r={})=>{if(t===e)return!0;t=new et(t,r),e=new et(e,r);let s=!1;e:for(let n of t.set){for(let i of e.set){let o=yn(n,i,r);if(s=s||o!==null,o)continue e}if(s)return!1}return!0},Dn=[new $e(">=0.0.0-0")],rt=[new $e(">=0.0.0")],yn=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===me){if(e.length===1&&e[0].semver===me)return!0;r.includePrerelease?t=Dn:t=rt}if(e.length===1&&e[0].semver===me){if(r.includePrerelease)return!0;e=rt}let s=new Set,n,i;for(let E of t)E.operator===">"||E.operator===">="?n=tt(n,E,r):E.operator==="<"||E.operator==="<="?i=st(i,E,r):s.add(E.semver);if(s.size>1)return null;let o;if(n&&i){if(o=Re(n.semver,i.semver,r),o>0)return null;if(o===0&&(n.operator!==">="||i.operator!=="<="))return null}for(let E of s){if(n&&!F(E,String(n),r)||i&&!F(E,String(i),r))return null;for(let pt of e)if(!F(E,String(pt),r))return!1;return!0}let a,u,f,$,h=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1,d=n&&!r.includePrerelease&&n.semver.prerelease.length?n.semver:!1;h&&h.prerelease.length===1&&i.operator==="<"&&h.prerelease[0]===0&&(h=!1);for(let E of e){if($=$||E.operator===">"||E.operator===">=",f=f||E.operator==="<"||E.operator==="<=",n){if(d&&E.semver.prerelease&&E.semver.prerelease.length&&E.semver.major===d.major&&E.semver.minor===d.minor&&E.semver.patch===d.patch&&(d=!1),E.operator===">"||E.operator===">="){if(a=tt(n,E,r),a===E&&a!==n)return!1}else if(n.operator===">="&&!F(n.semver,String(E),r))return!1}if(i){if(h&&E.semver.prerelease&&E.semver.prerelease.length&&E.semver.major===h.major&&E.semver.minor===h.minor&&E.semver.patch===h.patch&&(h=!1),E.operator==="<"||E.operator==="<="){if(u=st(i,E,r),u===E&&u!==i)return!1}else if(i.operator==="<="&&!F(i.semver,String(E),r))return!1}if(!E.operator&&(i||n)&&o!==0)return!1}return!(n&&f&&!i&&o!==0||i&&$&&!n&&o!==0||d||h)},tt=(t,e,r)=>{if(!t)return e;let s=Re(t.semver,e.semver,r);return s>0?t:s<0||e.operator===">"&&t.operator===">="?e:t},st=(t,e,r)=>{if(!t)return e;let s=Re(t.semver,e.semver,r);return s<0?t:s>0||e.operator==="<"&&t.operator==="<="?e:t};nt.exports=Cn});var lt=p((Eo,ct)=>{"use strict";var de=q(),ot=P(),jn=I(),at=te(),Fn=w(),Gn=De(),bn=je(),Un=be(),Vn=Xe(),Xn=_e(),kn=We(),_n=Ye(),Hn=ze(),Wn=S(),Mn=Qe(),Yn=rr(),Bn=_(),zn=ir(),Kn=ar(),Zn=C(),Jn=H(),Qn=ie(),ei=oe(),ri=W(),ti=M(),si=ae(),ni=$r(),ii=D(),oi=O(),ai=j(),ci=xr(),li=Dr(),ui=jr(),fi=br(),hi=Vr(),Ei=z(),pi=Mr(),mi=Br(),$i=Zr(),Ri=Qr(),di=it();ct.exports={parse:Fn,valid:Gn,clean:bn,inc:Un,diff:Vn,major:Xn,minor:kn,patch:_n,prerelease:Hn,compare:Wn,rcompare:Mn,compareLoose:Yn,compareBuild:Bn,sort:zn,rsort:Kn,gt:Zn,lt:Jn,eq:Qn,neq:ei,gte:ri,lte:ti,cmp:si,coerce:ni,Comparator:ii,Range:oi,satisfies:ai,toComparators:ci,maxSatisfying:li,minSatisfying:ui,minVersion:fi,validRange:hi,outside:Ei,gtr:pi,ltr:mi,intersects:$i,simplifyRange:Ri,subset:di,SemVer:jn,re:de.re,src:de.src,tokens:de.t,SEMVER_SPEC_VERSION:ot.SEMVER_SPEC_VERSION,RELEASE_TYPES:ot.RELEASE_TYPES,compareIdentifiers:at.compareIdentifiers,rcompareIdentifiers:at.rcompareIdentifiers}});var Ni={};gt(Ni,{ngAdd:()=>Li});module.exports=Nt(Ni);var Q=require("@angular-devkit/schematics/tasks");var J=require("@angular-devkit/schematics"),A=Lt(lt());var K=t=>JSON.stringify(t,null,2),Z=(t,e,r)=>{t.exists(e)?t.overwrite(e,r):t.create(e,r)};function Ie(t,e){try{return JSON.parse(e.read(t).toString())}catch(r){throw new J.SchematicsException(`Error when parsing ${t}: ${r.message}`)}}var ut=(t,e,r)=>{var n,i;let s=t.exists("package.json")&&Ie("package.json",t);if(s===void 0)throw new J.SchematicsException("Could not locate package.json");(n=s.devDependencies)!=null||(s.devDependencies={}),(i=s.dependencies)!=null||(s.dependencies={}),Object.keys(e).forEach(o=>{let a=e[o],u=a.dev?s.devDependencies:s.dependencies,f=u[o];if(f)try{(0,A.intersects)(f,a.version)||r.logger.warn(`\u26A0\uFE0F The ${o} devDependency specified in your package.json (${f}) does not fulfill AngularFire's dependency (${a.version})`)}catch($){f!==a.version&&r.logger.warn(`\u26A0\uFE0F The ${o} devDependency specified in your package.json (${f}) does not fulfill AngularFire's dependency (${a.version})`)}else u[o]=a.version}),Z(t,"package.json",K(s))},v="^12.4.0",ft=(t,e)=>{var i;if(!t.exists("package.json"))throw new J.SchematicsException("Could not locate package.json");let r=Ie("package.json",t),s=["dependencies","devDependencies"].filter(o=>{var a;return typeof((a=r[o])==null?void 0:a.firebase)=="string"});if(s.length===0)return(i=r.dependencies)!=null||(r.dependencies={}),r.dependencies.firebase=v,e.logger.info(`Added firebase ${v} to your package.json.`),Z(t,"package.json",K(r)),!0;let n=!1;for(let o of s){let a=r[o].firebase,u;try{u=(0,A.subset)(a,v)}catch(f){e.logger.warn(`\u26A0\uFE0F The firebase version in your package.json (${a}) is not a semver range, so it was left as-is; make sure it resolves inside ${v}, the range @angular/fire requires; a version outside it can leave the install with two copies of the firebase SDK.`);continue}u||(r[o].firebase=v,e.logger.info(`Updated the firebase version in your package.json from ${a} to ${v}, the range @angular/fire requires; a workspace range outside it can leave the install with a second copy of the firebase SDK, which fails at runtime.`),n=!0)}return n&&Z(t,"package.json",K(r)),n},Ii="21.0.0-rc.0-canary.c4c4ad1",ht=(t,e,r=Ii)=>{if(!t.exists("package.json"))return;let s=Ie("package.json",t),n=["dependencies","devDependencies"].find(o=>{var a;return typeof((a=s[o])==null?void 0:a["@angular/fire"])=="string"});if(!n)return;let i=s[n]["@angular/fire"];if(i.startsWith("^")||i.startsWith("~")){if(!(0,A.valid)(r)){e.logger.warn("Could not determine the installed @angular/fire version; leaving the declared version range as-is.");return}(0,A.prerelease)(r)&&(0,A.satisfies)(r,i,{includePrerelease:!0})&&(s[n]["@angular/fire"]=r,Z(t,"package.json",K(s)),e.logger.info(`Pinned @angular/fire to the exact version ${r} \u2014 a prerelease range like ${i} also matches unreviewed canary builds, so a later install could silently change versions.`))}};var Et={};var Li=t=>(e,r)=>{ut(e,Et,r),ft(e,r),ht(e,r);let s=r.addTask(new Q.NodePackageInstallTask);return r.addTask(new Q.RunSchematicTask("ng-add-setup-project",t),[s]),e};0&&(module.exports={ngAdd});
|
|
1
|
+
var mt=Object.create;var G=Object.defineProperty;var $t=Object.getOwnPropertyDescriptor;var Rt=Object.getOwnPropertyNames;var dt=Object.getPrototypeOf,It=Object.prototype.hasOwnProperty;var p=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),gt=(t,e)=>{for(var r in e)G(t,r,{get:e[r],enumerable:!0})},ge=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Rt(e))!It.call(t,n)&&n!==r&&G(t,n,{get:()=>e[n],enumerable:!(s=$t(e,n))||s.enumerable});return t};var Lt=(t,e,r)=>(r=t!=null?mt(dt(t)):{},ge(e||!t||!t.__esModule?G(r,"default",{value:t,enumerable:!0}):r,t)),Nt=t=>ge(G({},"__esModule",{value:!0}),t);var P=p((Oi,Le)=>{"use strict";var St="2.0.0",Ot=Number.MAX_SAFE_INTEGER||9007199254740991,Tt=16,At=250,wt=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Le.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:Tt,MAX_SAFE_BUILD_LENGTH:At,MAX_SAFE_INTEGER:Ot,RELEASE_TYPES:wt,SEMVER_SPEC_VERSION:St,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var x=p((Ti,Ne)=>{"use strict";var qt=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};Ne.exports=qt});var q=p((T,Se)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:ee,MAX_SAFE_BUILD_LENGTH:vt,MAX_LENGTH:Pt}=P(),xt=x();T=Se.exports={};var Ct=T.re=[],Dt=T.safeRe=[],c=T.src=[],yt=T.safeSrc=[],l=T.t={},jt=0,re="[a-zA-Z0-9-]",Ft=[["\\s",1],["\\d",Pt],[re,vt]],Gt=t=>{for(let[e,r]of Ft)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},m=(t,e,r)=>{let s=Gt(e),n=jt++;xt(t,n,e),l[t]=n,c[n]=e,yt[n]=s,Ct[n]=new RegExp(e,r?"g":void 0),Dt[n]=new RegExp(s,r?"g":void 0)};m("NUMERICIDENTIFIER","0|[1-9]\\d*");m("NUMERICIDENTIFIERLOOSE","\\d+");m("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${re}*`);m("MAINVERSION",`(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})`);m("MAINVERSIONLOOSE",`(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})`);m("PRERELEASEIDENTIFIER",`(?:${c[l.NONNUMERICIDENTIFIER]}|${c[l.NUMERICIDENTIFIER]})`);m("PRERELEASEIDENTIFIERLOOSE",`(?:${c[l.NONNUMERICIDENTIFIER]}|${c[l.NUMERICIDENTIFIERLOOSE]})`);m("PRERELEASE",`(?:-(${c[l.PRERELEASEIDENTIFIER]}(?:\\.${c[l.PRERELEASEIDENTIFIER]})*))`);m("PRERELEASELOOSE",`(?:-?(${c[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[l.PRERELEASEIDENTIFIERLOOSE]})*))`);m("BUILDIDENTIFIER",`${re}+`);m("BUILD",`(?:\\+(${c[l.BUILDIDENTIFIER]}(?:\\.${c[l.BUILDIDENTIFIER]})*))`);m("FULLPLAIN",`v?${c[l.MAINVERSION]}${c[l.PRERELEASE]}?${c[l.BUILD]}?`);m("FULL",`^${c[l.FULLPLAIN]}$`);m("LOOSEPLAIN",`[v=\\s]*${c[l.MAINVERSIONLOOSE]}${c[l.PRERELEASELOOSE]}?${c[l.BUILD]}?`);m("LOOSE",`^${c[l.LOOSEPLAIN]}$`);m("GTLT","((?:<|>)?=?)");m("XRANGEIDENTIFIERLOOSE",`${c[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);m("XRANGEIDENTIFIER",`${c[l.NUMERICIDENTIFIER]}|x|X|\\*`);m("XRANGEPLAIN",`[v=\\s]*(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:${c[l.PRERELEASE]})?${c[l.BUILD]}?)?)?`);m("XRANGEPLAINLOOSE",`[v=\\s]*(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:${c[l.PRERELEASELOOSE]})?${c[l.BUILD]}?)?)?`);m("XRANGE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAIN]}$`);m("XRANGELOOSE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAINLOOSE]}$`);m("COERCEPLAIN",`(^|[^\\d])(\\d{1,${ee}})(?:\\.(\\d{1,${ee}}))?(?:\\.(\\d{1,${ee}}))?`);m("COERCE",`${c[l.COERCEPLAIN]}(?:$|[^\\d])`);m("COERCEFULL",c[l.COERCEPLAIN]+`(?:${c[l.PRERELEASE]})?(?:${c[l.BUILD]})?(?:$|[^\\d])`);m("COERCERTL",c[l.COERCE],!0);m("COERCERTLFULL",c[l.COERCEFULL],!0);m("LONETILDE","(?:~>?)");m("TILDETRIM",`(\\s*)${c[l.LONETILDE]}\\s+`,!0);T.tildeTrimReplace="$1~";m("TILDE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAIN]}$`);m("TILDELOOSE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAINLOOSE]}$`);m("LONECARET","(?:\\^)");m("CARETTRIM",`(\\s*)${c[l.LONECARET]}\\s+`,!0);T.caretTrimReplace="$1^";m("CARET",`^${c[l.LONECARET]}${c[l.XRANGEPLAIN]}$`);m("CARETLOOSE",`^${c[l.LONECARET]}${c[l.XRANGEPLAINLOOSE]}$`);m("COMPARATORLOOSE",`^${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]})$|^$`);m("COMPARATOR",`^${c[l.GTLT]}\\s*(${c[l.FULLPLAIN]})$|^$`);m("COMPARATORTRIM",`(\\s*)${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]}|${c[l.XRANGEPLAIN]})`,!0);T.comparatorTrimReplace="$1$2$3";m("HYPHENRANGE",`^\\s*(${c[l.XRANGEPLAIN]})\\s+-\\s+(${c[l.XRANGEPLAIN]})\\s*$`);m("HYPHENRANGELOOSE",`^\\s*(${c[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[l.XRANGEPLAINLOOSE]})\\s*$`);m("STAR","(<|>)?=?\\s*\\*");m("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");m("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var b=p((Ai,Oe)=>{"use strict";var bt=Object.freeze({loose:!0}),Ut=Object.freeze({}),Vt=t=>t?typeof t!="object"?bt:t:Ut;Oe.exports=Vt});var te=p((wi,we)=>{"use strict";var Te=/^[0-9]+$/,Ae=(t,e)=>{if(typeof t=="number"&&typeof e=="number")return t===e?0:t<e?-1:1;let r=Te.test(t),s=Te.test(e);return r&&s&&(t=+t,e=+e),t===e?0:r&&!s?-1:s&&!r?1:t<e?-1:1},Xt=(t,e)=>Ae(e,t);we.exports={compareIdentifiers:Ae,rcompareIdentifiers:Xt}});var I=p((qi,ve)=>{"use strict";var U=x(),{MAX_LENGTH:qe,MAX_SAFE_INTEGER:V}=P(),{safeRe:X,t:k}=q(),kt=b(),{compareIdentifiers:se}=te(),ne=class t{constructor(e,r){if(r=kt(r),e instanceof t){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>qe)throw new TypeError(`version is longer than ${qe} characters`);U("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let s=e.trim().match(r.loose?X[k.LOOSE]:X[k.FULL]);if(!s)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>V||this.major<0)throw new TypeError("Invalid major version");if(this.minor>V||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>V||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map(n=>{if(/^[0-9]+$/.test(n)){let i=+n;if(i>=0&&i<V)return i}return n}):this.prerelease=[],this.build=s[5]?s[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(U("SemVer.compare",this.version,this.options,e),!(e instanceof t)){if(typeof e=="string"&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(e,this.options)),this.major<e.major?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:this.patch>e.patch?1:0}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let r=0;do{let s=this.prerelease[r],n=e.prerelease[r];if(U("prerelease compare",r,s,n),s===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(s===void 0)return-1;if(s===n)continue;return se(s,n)}while(++r)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let r=0;do{let s=this.build[r],n=e.build[r];if(U("build compare",r,s,n),s===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(s===void 0)return-1;if(s===n)continue;return se(s,n)}while(++r)}inc(e,r,s){if(e.startsWith("pre")){if(!r&&s===!1)throw new Error("invalid increment argument: identifier is empty");if(r){let n=`-${r}`.match(this.options.loose?X[k.PRERELEASELOOSE]:X[k.PRERELEASE]);if(!n||n[1]!==r)throw new Error(`invalid identifier: ${r}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,s);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,s);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,s),this.inc("pre",r,s);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,s),this.inc("pre",r,s);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let n=Number(s)?1:0;if(this.prerelease.length===0)this.prerelease=[n];else{let i=this.prerelease.length;for(;--i>=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);if(i===-1){if(r===this.prerelease.join(".")&&s===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(n)}}if(r){let i=[r,n];s===!1&&(i=[r]),se(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};ve.exports=ne});var w=p((vi,xe)=>{"use strict";var Pe=I(),_t=(t,e,r=!1)=>{if(t instanceof Pe)return t;try{return new Pe(t,e)}catch(s){if(!r)return null;throw s}};xe.exports=_t});var De=p((Pi,Ce)=>{"use strict";var Ht=w(),Wt=(t,e)=>{let r=Ht(t,e);return r?r.version:null};Ce.exports=Wt});var je=p((xi,ye)=>{"use strict";var Mt=w(),Yt=(t,e)=>{let r=Mt(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};ye.exports=Yt});var be=p((Ci,Ge)=>{"use strict";var Fe=I(),Bt=(t,e,r,s,n)=>{typeof r=="string"&&(n=s,s=r,r=void 0);try{return new Fe(t instanceof Fe?t.version:t,r).inc(e,s,n).version}catch(i){return null}};Ge.exports=Bt});var Xe=p((Di,Ve)=>{"use strict";var Ue=w(),zt=(t,e)=>{let r=Ue(t,null,!0),s=Ue(e,null,!0),n=r.compare(s);if(n===0)return null;let i=n>0,o=i?r:s,a=i?s:r,u=!!o.prerelease.length;if(!!a.prerelease.length&&!u){if(!a.patch&&!a.minor)return"major";if(a.compareMain(o)===0)return a.minor&&!a.patch?"minor":"patch"}let $=u?"pre":"";return r.major!==s.major?$+"major":r.minor!==s.minor?$+"minor":r.patch!==s.patch?$+"patch":"prerelease"};Ve.exports=zt});var _e=p((yi,ke)=>{"use strict";var Kt=I(),Zt=(t,e)=>new Kt(t,e).major;ke.exports=Zt});var We=p((ji,He)=>{"use strict";var Jt=I(),Qt=(t,e)=>new Jt(t,e).minor;He.exports=Qt});var Ye=p((Fi,Me)=>{"use strict";var es=I(),rs=(t,e)=>new es(t,e).patch;Me.exports=rs});var ze=p((Gi,Be)=>{"use strict";var ts=w(),ss=(t,e)=>{let r=ts(t,e);return r&&r.prerelease.length?r.prerelease:null};Be.exports=ss});var S=p((bi,Ze)=>{"use strict";var Ke=I(),ns=(t,e,r)=>new Ke(t,r).compare(new Ke(e,r));Ze.exports=ns});var Qe=p((Ui,Je)=>{"use strict";var is=S(),os=(t,e,r)=>is(e,t,r);Je.exports=os});var rr=p((Vi,er)=>{"use strict";var as=S(),cs=(t,e)=>as(t,e,!0);er.exports=cs});var _=p((Xi,sr)=>{"use strict";var tr=I(),ls=(t,e,r)=>{let s=new tr(t,r),n=new tr(e,r);return s.compare(n)||s.compareBuild(n)};sr.exports=ls});var ir=p((ki,nr)=>{"use strict";var us=_(),fs=(t,e)=>t.sort((r,s)=>us(r,s,e));nr.exports=fs});var ar=p((_i,or)=>{"use strict";var hs=_(),Es=(t,e)=>t.sort((r,s)=>hs(s,r,e));or.exports=Es});var C=p((Hi,cr)=>{"use strict";var ps=S(),ms=(t,e,r)=>ps(t,e,r)>0;cr.exports=ms});var H=p((Wi,lr)=>{"use strict";var $s=S(),Rs=(t,e,r)=>$s(t,e,r)<0;lr.exports=Rs});var ie=p((Mi,ur)=>{"use strict";var ds=S(),Is=(t,e,r)=>ds(t,e,r)===0;ur.exports=Is});var oe=p((Yi,fr)=>{"use strict";var gs=S(),Ls=(t,e,r)=>gs(t,e,r)!==0;fr.exports=Ls});var W=p((Bi,hr)=>{"use strict";var Ns=S(),Ss=(t,e,r)=>Ns(t,e,r)>=0;hr.exports=Ss});var M=p((zi,Er)=>{"use strict";var Os=S(),Ts=(t,e,r)=>Os(t,e,r)<=0;Er.exports=Ts});var ae=p((Ki,pr)=>{"use strict";var As=ie(),ws=oe(),qs=C(),vs=W(),Ps=H(),xs=M(),Cs=(t,e,r,s)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return As(t,r,s);case"!=":return ws(t,r,s);case">":return qs(t,r,s);case">=":return vs(t,r,s);case"<":return Ps(t,r,s);case"<=":return xs(t,r,s);default:throw new TypeError(`Invalid operator: ${e}`)}};pr.exports=Cs});var $r=p((Zi,mr)=>{"use strict";var Ds=I(),ys=w(),{safeRe:Y,t:B}=q(),js=(t,e)=>{if(t instanceof Ds)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(e.includePrerelease?Y[B.COERCEFULL]:Y[B.COERCE]);else{let u=e.includePrerelease?Y[B.COERCERTLFULL]:Y[B.COERCERTL],f;for(;(f=u.exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||f.index+f[0].length!==r.index+r[0].length)&&(r=f),u.lastIndex=f.index+f[1].length+f[2].length;u.lastIndex=-1}if(r===null)return null;let s=r[2],n=r[3]||"0",i=r[4]||"0",o=e.includePrerelease&&r[5]?`-${r[5]}`:"",a=e.includePrerelease&&r[6]?`+${r[6]}`:"";return ys(`${s}.${n}.${i}${o}${a}`,e)};mr.exports=js});var dr=p((Ji,Rr)=>{"use strict";var ce=class{constructor(){this.max=1e3,this.map=new Map}get(e){let r=this.map.get(e);if(r!==void 0)return this.map.delete(e),this.map.set(e,r),r}delete(e){return this.map.delete(e)}set(e,r){if(!this.delete(e)&&r!==void 0){if(this.map.size>=this.max){let n=this.map.keys().next().value;this.delete(n)}this.map.set(e,r)}return this}};Rr.exports=ce});var O=p((Qi,Nr)=>{"use strict";var Fs=/\s+/g,le=class t{constructor(e,r){if(r=bs(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof ue)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e.trim().replace(Fs," "),this.set=this.raw.split("||").map(s=>this.parseRange(s.trim())).filter(s=>s.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let s=this.set[0];if(this.set=this.set.filter(n=>!gr(n[0])),this.set.length===0)this.set=[s];else if(this.set.length>1){for(let n of this.set)if(n.length===1&&Ws(n[0])){this.set=[n];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let r=this.set[e];for(let s=0;s<r.length;s++)s>0&&(this.formatted+=" "),this.formatted+=r[s].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let s=((this.options.includePrerelease&&_s)|(this.options.loose&&Hs))+":"+e,n=Ir.get(s);if(n)return n;let i=this.options.loose,o=i?L[g.HYPHENRANGELOOSE]:L[g.HYPHENRANGE];e=e.replace(o,rn(this.options.includePrerelease)),R("hyphen replace",e),e=e.replace(L[g.COMPARATORTRIM],Vs),R("comparator trim",e),e=e.replace(L[g.TILDETRIM],Xs),R("tilde trim",e),e=e.replace(L[g.CARETTRIM],ks),R("caret trim",e);let a=e.split(" ").map(h=>Ms(h,this.options)).join(" ").split(/\s+/).map(h=>en(h,this.options));i&&(a=a.filter(h=>(R("loose invalid filter",h,this.options),!!h.match(L[g.COMPARATORLOOSE])))),R("range list",a);let u=new Map,f=a.map(h=>new ue(h,this.options));for(let h of f){if(gr(h))return[h];u.set(h.value,h)}u.size>1&&u.has("")&&u.delete("");let $=[...u.values()];return Ir.set(s,$),$}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(s=>Lr(s,r)&&e.set.some(n=>Lr(n,r)&&s.every(i=>n.every(o=>i.intersects(o,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new Us(e,this.options)}catch(r){return!1}for(let r=0;r<this.set.length;r++)if(tn(this.set[r],e,this.options))return!0;return!1}};Nr.exports=le;var Gs=dr(),Ir=new Gs,bs=b(),ue=D(),R=x(),Us=I(),{safeRe:L,t:g,comparatorTrimReplace:Vs,tildeTrimReplace:Xs,caretTrimReplace:ks}=q(),{FLAG_INCLUDE_PRERELEASE:_s,FLAG_LOOSE:Hs}=P(),gr=t=>t.value==="<0.0.0-0",Ws=t=>t.value==="",Lr=(t,e)=>{let r=!0,s=t.slice(),n=s.pop();for(;r&&s.length;)r=s.every(i=>n.intersects(i,e)),n=s.pop();return r},Ms=(t,e)=>(t=t.replace(L[g.BUILD],""),R("comp",t,e),t=zs(t,e),R("caret",t),t=Ys(t,e),R("tildes",t),t=Zs(t,e),R("xrange",t),t=Qs(t,e),R("stars",t),t),N=t=>!t||t.toLowerCase()==="x"||t==="*",Ys=(t,e)=>t.trim().split(/\s+/).map(r=>Bs(r,e)).join(" "),Bs=(t,e)=>{let r=e.loose?L[g.TILDELOOSE]:L[g.TILDE];return t.replace(r,(s,n,i,o,a)=>{R("tilde",t,s,n,i,o,a);let u;return N(n)?u="":N(i)?u=`>=${n}.0.0 <${+n+1}.0.0-0`:N(o)?u=`>=${n}.${i}.0 <${n}.${+i+1}.0-0`:a?(R("replaceTilde pr",a),u=`>=${n}.${i}.${o}-${a} <${n}.${+i+1}.0-0`):u=`>=${n}.${i}.${o} <${n}.${+i+1}.0-0`,R("tilde return",u),u})},zs=(t,e)=>t.trim().split(/\s+/).map(r=>Ks(r,e)).join(" "),Ks=(t,e)=>{R("caret",t,e);let r=e.loose?L[g.CARETLOOSE]:L[g.CARET],s=e.includePrerelease?"-0":"";return t.replace(r,(n,i,o,a,u)=>{R("caret",t,n,i,o,a,u);let f;return N(i)?f="":N(o)?f=`>=${i}.0.0${s} <${+i+1}.0.0-0`:N(a)?i==="0"?f=`>=${i}.${o}.0${s} <${i}.${+o+1}.0-0`:f=`>=${i}.${o}.0${s} <${+i+1}.0.0-0`:u?(R("replaceCaret pr",u),i==="0"?o==="0"?f=`>=${i}.${o}.${a}-${u} <${i}.${o}.${+a+1}-0`:f=`>=${i}.${o}.${a}-${u} <${i}.${+o+1}.0-0`:f=`>=${i}.${o}.${a}-${u} <${+i+1}.0.0-0`):(R("no pr"),i==="0"?o==="0"?f=`>=${i}.${o}.${a}${s} <${i}.${o}.${+a+1}-0`:f=`>=${i}.${o}.${a}${s} <${i}.${+o+1}.0-0`:f=`>=${i}.${o}.${a} <${+i+1}.0.0-0`),R("caret return",f),f})},Zs=(t,e)=>(R("replaceXRanges",t,e),t.split(/\s+/).map(r=>Js(r,e)).join(" ")),Js=(t,e)=>{t=t.trim();let r=e.loose?L[g.XRANGELOOSE]:L[g.XRANGE];return t.replace(r,(s,n,i,o,a,u)=>{R("xRange",t,s,n,i,o,a,u);let f=N(i),$=f||N(o),h=$||N(a),d=h;return n==="="&&d&&(n=""),u=e.includePrerelease?"-0":"",f?n===">"||n==="<"?s="<0.0.0-0":s="*":n&&d?($&&(o=0),a=0,n===">"?(n=">=",$?(i=+i+1,o=0,a=0):(o=+o+1,a=0)):n==="<="&&(n="<",$?i=+i+1:o=+o+1),n==="<"&&(u="-0"),s=`${n+i}.${o}.${a}${u}`):$?s=`>=${i}.0.0${u} <${+i+1}.0.0-0`:h&&(s=`>=${i}.${o}.0${u} <${i}.${+o+1}.0-0`),R("xRange return",s),s})},Qs=(t,e)=>(R("replaceStars",t,e),t.trim().replace(L[g.STAR],"")),en=(t,e)=>(R("replaceGTE0",t,e),t.trim().replace(L[e.includePrerelease?g.GTE0PRE:g.GTE0],"")),rn=t=>(e,r,s,n,i,o,a,u,f,$,h,d)=>(N(s)?r="":N(n)?r=`>=${s}.0.0${t?"-0":""}`:N(i)?r=`>=${s}.${n}.0${t?"-0":""}`:o?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,N(f)?u="":N($)?u=`<${+f+1}.0.0-0`:N(h)?u=`<${f}.${+$+1}.0-0`:d?u=`<=${f}.${$}.${h}-${d}`:t?u=`<${f}.${$}.${+h+1}-0`:u=`<=${u}`,`${r} ${u}`.trim()),tn=(t,e,r)=>{for(let s=0;s<t.length;s++)if(!t[s].test(e))return!1;if(e.prerelease.length&&!r.includePrerelease){for(let s=0;s<t.length;s++)if(R(t[s].semver),t[s].semver!==ue.ANY&&t[s].semver.prerelease.length>0){let n=t[s].semver;if(n.major===e.major&&n.minor===e.minor&&n.patch===e.patch)return!0}return!1}return!0}});var D=p((eo,qr)=>{"use strict";var y=Symbol("SemVer ANY"),Ee=class t{static get ANY(){return y}constructor(e,r){if(r=Sr(r),e instanceof t){if(e.loose===!!r.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),he("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===y?this.value="":this.value=this.operator+this.semver.version,he("comp",this)}parse(e){let r=this.options.loose?Or[Tr.COMPARATORLOOSE]:Or[Tr.COMPARATOR],s=e.match(r);if(!s)throw new TypeError(`Invalid comparator: ${e}`);this.operator=s[1]!==void 0?s[1]:"",this.operator==="="&&(this.operator=""),s[2]?this.semver=new Ar(s[2],this.options.loose):this.semver=y}toString(){return this.value}test(e){if(he("Comparator.test",e,this.options.loose),this.semver===y||e===y)return!0;if(typeof e=="string")try{e=new Ar(e,this.options)}catch(r){return!1}return fe(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new wr(e.value,r).test(this.value):e.operator===""?e.value===""?!0:new wr(this.value,r).test(e.semver):(r=Sr(r),r.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||fe(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||fe(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};qr.exports=Ee;var Sr=b(),{safeRe:Or,t:Tr}=q(),fe=ae(),he=x(),Ar=I(),wr=O()});var j=p((ro,vr)=>{"use strict";var sn=O(),nn=(t,e,r)=>{try{e=new sn(e,r)}catch(s){return!1}return e.test(t)};vr.exports=nn});var xr=p((to,Pr)=>{"use strict";var on=O(),an=(t,e)=>new on(t,e).set.map(r=>r.map(s=>s.value).join(" ").trim().split(" "));Pr.exports=an});var Dr=p((so,Cr)=>{"use strict";var cn=I(),ln=O(),un=(t,e,r)=>{let s=null,n=null,i=null;try{i=new ln(e,r)}catch(o){return null}return t.forEach(o=>{i.test(o)&&(!s||n.compare(o)===-1)&&(s=o,n=new cn(s,r))}),s};Cr.exports=un});var jr=p((no,yr)=>{"use strict";var fn=I(),hn=O(),En=(t,e,r)=>{let s=null,n=null,i=null;try{i=new hn(e,r)}catch(o){return null}return t.forEach(o=>{i.test(o)&&(!s||n.compare(o)===1)&&(s=o,n=new fn(s,r))}),s};yr.exports=En});var br=p((io,Gr)=>{"use strict";var pe=I(),pn=O(),Fr=C(),mn=(t,e)=>{t=new pn(t,e);let r=new pe("0.0.0");if(t.test(r)||(r=new pe("0.0.0-0"),t.test(r)))return r;r=null;for(let s=0;s<t.set.length;++s){let n=t.set[s],i=null;n.forEach(o=>{let a=new pe(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!i||Fr(a,i))&&(i=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),i&&(!r||Fr(r,i))&&(r=i)}return r&&t.test(r)?r:null};Gr.exports=mn});var Vr=p((oo,Ur)=>{"use strict";var $n=O(),Rn=(t,e)=>{try{return new $n(t,e).range||"*"}catch(r){return null}};Ur.exports=Rn});var z=p((ao,Hr)=>{"use strict";var dn=I(),_r=D(),{ANY:In}=_r,gn=O(),Ln=j(),Xr=C(),kr=H(),Nn=M(),Sn=W(),On=(t,e,r,s)=>{t=new dn(t,s),e=new gn(e,s);let n,i,o,a,u;switch(r){case">":n=Xr,i=Nn,o=kr,a=">",u=">=";break;case"<":n=kr,i=Sn,o=Xr,a="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Ln(t,e,s))return!1;for(let f=0;f<e.set.length;++f){let $=e.set[f],h=null,d=null;if($.forEach(E=>{E.semver===In&&(E=new _r(">=0.0.0")),h=h||E,d=d||E,n(E.semver,h.semver,s)?h=E:o(E.semver,d.semver,s)&&(d=E)}),h.operator===a||h.operator===u||(!d.operator||d.operator===a)&&i(t,d.semver))return!1;if(d.operator===u&&o(t,d.semver))return!1}return!0};Hr.exports=On});var Mr=p((co,Wr)=>{"use strict";var Tn=z(),An=(t,e,r)=>Tn(t,e,">",r);Wr.exports=An});var Br=p((lo,Yr)=>{"use strict";var wn=z(),qn=(t,e,r)=>wn(t,e,"<",r);Yr.exports=qn});var Zr=p((uo,Kr)=>{"use strict";var zr=O(),vn=(t,e,r)=>(t=new zr(t,r),e=new zr(e,r),t.intersects(e,r));Kr.exports=vn});var Qr=p((fo,Jr)=>{"use strict";var Pn=j(),xn=S();Jr.exports=(t,e,r)=>{let s=[],n=null,i=null,o=t.sort(($,h)=>xn($,h,r));for(let $ of o)Pn($,e,r)?(i=$,n||(n=$)):(i&&s.push([n,i]),i=null,n=null);n&&s.push([n,null]);let a=[];for(let[$,h]of s)$===h?a.push($):!h&&$===o[0]?a.push("*"):h?$===o[0]?a.push(`<=${h}`):a.push(`${$} - ${h}`):a.push(`>=${$}`);let u=a.join(" || "),f=typeof e.raw=="string"?e.raw:String(e);return u.length<f.length?u:e}});var it=p((ho,nt)=>{"use strict";var et=O(),$e=D(),{ANY:me}=$e,F=j(),Re=S(),Cn=(t,e,r={})=>{if(t===e)return!0;t=new et(t,r),e=new et(e,r);let s=!1;e:for(let n of t.set){for(let i of e.set){let o=yn(n,i,r);if(s=s||o!==null,o)continue e}if(s)return!1}return!0},Dn=[new $e(">=0.0.0-0")],rt=[new $e(">=0.0.0")],yn=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===me){if(e.length===1&&e[0].semver===me)return!0;r.includePrerelease?t=Dn:t=rt}if(e.length===1&&e[0].semver===me){if(r.includePrerelease)return!0;e=rt}let s=new Set,n,i;for(let E of t)E.operator===">"||E.operator===">="?n=tt(n,E,r):E.operator==="<"||E.operator==="<="?i=st(i,E,r):s.add(E.semver);if(s.size>1)return null;let o;if(n&&i){if(o=Re(n.semver,i.semver,r),o>0)return null;if(o===0&&(n.operator!==">="||i.operator!=="<="))return null}for(let E of s){if(n&&!F(E,String(n),r)||i&&!F(E,String(i),r))return null;for(let pt of e)if(!F(E,String(pt),r))return!1;return!0}let a,u,f,$,h=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1,d=n&&!r.includePrerelease&&n.semver.prerelease.length?n.semver:!1;h&&h.prerelease.length===1&&i.operator==="<"&&h.prerelease[0]===0&&(h=!1);for(let E of e){if($=$||E.operator===">"||E.operator===">=",f=f||E.operator==="<"||E.operator==="<=",n){if(d&&E.semver.prerelease&&E.semver.prerelease.length&&E.semver.major===d.major&&E.semver.minor===d.minor&&E.semver.patch===d.patch&&(d=!1),E.operator===">"||E.operator===">="){if(a=tt(n,E,r),a===E&&a!==n)return!1}else if(n.operator===">="&&!F(n.semver,String(E),r))return!1}if(i){if(h&&E.semver.prerelease&&E.semver.prerelease.length&&E.semver.major===h.major&&E.semver.minor===h.minor&&E.semver.patch===h.patch&&(h=!1),E.operator==="<"||E.operator==="<="){if(u=st(i,E,r),u===E&&u!==i)return!1}else if(i.operator==="<="&&!F(i.semver,String(E),r))return!1}if(!E.operator&&(i||n)&&o!==0)return!1}return!(n&&f&&!i&&o!==0||i&&$&&!n&&o!==0||d||h)},tt=(t,e,r)=>{if(!t)return e;let s=Re(t.semver,e.semver,r);return s>0?t:s<0||e.operator===">"&&t.operator===">="?e:t},st=(t,e,r)=>{if(!t)return e;let s=Re(t.semver,e.semver,r);return s<0?t:s>0||e.operator==="<"&&t.operator==="<="?e:t};nt.exports=Cn});var lt=p((Eo,ct)=>{"use strict";var de=q(),ot=P(),jn=I(),at=te(),Fn=w(),Gn=De(),bn=je(),Un=be(),Vn=Xe(),Xn=_e(),kn=We(),_n=Ye(),Hn=ze(),Wn=S(),Mn=Qe(),Yn=rr(),Bn=_(),zn=ir(),Kn=ar(),Zn=C(),Jn=H(),Qn=ie(),ei=oe(),ri=W(),ti=M(),si=ae(),ni=$r(),ii=D(),oi=O(),ai=j(),ci=xr(),li=Dr(),ui=jr(),fi=br(),hi=Vr(),Ei=z(),pi=Mr(),mi=Br(),$i=Zr(),Ri=Qr(),di=it();ct.exports={parse:Fn,valid:Gn,clean:bn,inc:Un,diff:Vn,major:Xn,minor:kn,patch:_n,prerelease:Hn,compare:Wn,rcompare:Mn,compareLoose:Yn,compareBuild:Bn,sort:zn,rsort:Kn,gt:Zn,lt:Jn,eq:Qn,neq:ei,gte:ri,lte:ti,cmp:si,coerce:ni,Comparator:ii,Range:oi,satisfies:ai,toComparators:ci,maxSatisfying:li,minSatisfying:ui,minVersion:fi,validRange:hi,outside:Ei,gtr:pi,ltr:mi,intersects:$i,simplifyRange:Ri,subset:di,SemVer:jn,re:de.re,src:de.src,tokens:de.t,SEMVER_SPEC_VERSION:ot.SEMVER_SPEC_VERSION,RELEASE_TYPES:ot.RELEASE_TYPES,compareIdentifiers:at.compareIdentifiers,rcompareIdentifiers:at.rcompareIdentifiers}});var Ni={};gt(Ni,{ngAdd:()=>Li});module.exports=Nt(Ni);var Q=require("@angular-devkit/schematics/tasks");var J=require("@angular-devkit/schematics"),A=Lt(lt());var K=t=>JSON.stringify(t,null,2),Z=(t,e,r)=>{t.exists(e)?t.overwrite(e,r):t.create(e,r)};function Ie(t,e){try{return JSON.parse(e.read(t).toString())}catch(r){throw new J.SchematicsException(`Error when parsing ${t}: ${r.message}`)}}var ut=(t,e,r)=>{var n,i;let s=t.exists("package.json")&&Ie("package.json",t);if(s===void 0)throw new J.SchematicsException("Could not locate package.json");(n=s.devDependencies)!=null||(s.devDependencies={}),(i=s.dependencies)!=null||(s.dependencies={}),Object.keys(e).forEach(o=>{let a=e[o],u=a.dev?s.devDependencies:s.dependencies,f=u[o];if(f)try{(0,A.intersects)(f,a.version)||r.logger.warn(`\u26A0\uFE0F The ${o} devDependency specified in your package.json (${f}) does not fulfill AngularFire's dependency (${a.version})`)}catch($){f!==a.version&&r.logger.warn(`\u26A0\uFE0F The ${o} devDependency specified in your package.json (${f}) does not fulfill AngularFire's dependency (${a.version})`)}else u[o]=a.version}),Z(t,"package.json",K(s))},v="^12.4.0",ft=(t,e)=>{var i;if(!t.exists("package.json"))throw new J.SchematicsException("Could not locate package.json");let r=Ie("package.json",t),s=["dependencies","devDependencies"].filter(o=>{var a;return typeof((a=r[o])==null?void 0:a.firebase)=="string"});if(s.length===0)return(i=r.dependencies)!=null||(r.dependencies={}),r.dependencies.firebase=v,e.logger.info(`Added firebase ${v} to your package.json.`),Z(t,"package.json",K(r)),!0;let n=!1;for(let o of s){let a=r[o].firebase,u;try{u=(0,A.subset)(a,v)}catch(f){e.logger.warn(`\u26A0\uFE0F The firebase version in your package.json (${a}) is not a semver range, so it was left as-is; make sure it resolves inside ${v}, the range @angular/fire requires; a version outside it can leave the install with two copies of the firebase SDK.`);continue}u||(r[o].firebase=v,e.logger.info(`Updated the firebase version in your package.json from ${a} to ${v}, the range @angular/fire requires; a workspace range outside it can leave the install with a second copy of the firebase SDK, which fails at runtime.`),n=!0)}return n&&Z(t,"package.json",K(r)),n},Ii="21.0.0-rc.0-canary.0b8a49d",ht=(t,e,r=Ii)=>{if(!t.exists("package.json"))return;let s=Ie("package.json",t),n=["dependencies","devDependencies"].find(o=>{var a;return typeof((a=s[o])==null?void 0:a["@angular/fire"])=="string"});if(!n)return;let i=s[n]["@angular/fire"];if(i.startsWith("^")||i.startsWith("~")){if(!(0,A.valid)(r)){e.logger.warn("Could not determine the installed @angular/fire version; leaving the declared version range as-is.");return}(0,A.prerelease)(r)&&(0,A.satisfies)(r,i,{includePrerelease:!0})&&(s[n]["@angular/fire"]=r,Z(t,"package.json",K(s)),e.logger.info(`Pinned @angular/fire to the exact version ${r} \u2014 a prerelease range like ${i} also matches unreviewed canary builds, so a later install could silently change versions.`))}};var Et={};var Li=t=>(e,r)=>{ut(e,Et,r),ft(e,r),ht(e,r);let s=r.addTask(new Q.NodePackageInstallTask);return r.addTask(new Q.RunSchematicTask("ng-add-setup-project",t),[s]),e};0&&(module.exports={ngAdd});
|
|
@@ -84,7 +84,7 @@ ${E}`),g.pop(),`{${G}}`}case"number":return isFinite(h)?String(h):e?e(h):"null";
|
|
|
84
84
|
`),stack:e&&e.stack,exception:!0,date:new Date().toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(e)}}getProcessInfo(){return{pid:process.pid,uid:process.getuid?process.getuid():null,gid:process.getgid?process.getgid():null,cwd:process.cwd(),execPath:process.execPath,version:process.version,argv:process.argv,memoryUsage:process.memoryUsage()}}getOsInfo(){return{loadavg:Ew.loadavg(),uptime:Ew.uptime()}}getTrace(e){return(e?Sw.parse(e):Sw.get()).map(n=>({column:n.getColumnNumber(),file:n.getFileName(),function:n.getFunctionName(),line:n.getLineNumber(),method:n.getMethodName(),native:n.isNative()}))}_addHandler(e){if(!this.handlers.has(e)){e.handleExceptions=!0;let r=new bY(e);this.handlers.set(e,r),this.logger.pipe(r)}}_uncaughtException(e){let r=this.getAllInfo(e),n=this._getExceptionHandlers(),i=typeof this.logger.exitOnError=="function"?this.logger.exitOnError(e):this.logger.exitOnError,s;!n.length&&i&&(console.warn("winston: exitOnError cannot be true with no exception handlers."),console.warn("winston: not exiting process."),i=!1);function o(){Ax("doExit",i),Ax("process._exiting",process._exiting),i&&!process._exiting&&(s&&clearTimeout(s),process.exit(1))}if(!n||n.length===0)return process.nextTick(o);mY(n,(a,u)=>{let f=yY(u),l=a.transport||a;function x(d){return()=>{Ax(d),f()}}l._ending=!0,l.once("finish",x("finished")),l.once("error",x("error"))},()=>i&&o()),this.logger.log(r),i&&(s=setTimeout(o,3e3))}_getExceptionHandlers(){return this.logger.transports.filter(e=>(e.transport||e).handleExceptions)}}});var qw=c((pie,Cw)=>{"use strict";var{Writable:DY}=Ht();Cw.exports=class extends DY{constructor(e){if(super({objectMode:!0}),!e)throw new Error("RejectionStream requires a TransportStream instance.");this.handleRejections=!0,this.transport=e}_write(e,r,n){return e.rejection?this.transport.log(e,n):(n(),!0)}}});var Rx=c((mie,Tw)=>{"use strict";var Ow=require("os"),vY=zo(),Ix=Gi()("winston:rejection"),_Y=qx(),Aw=Ox(),wY=qw();Tw.exports=class{constructor(e){if(!e)throw new Error("Logger is required to handle rejections");this.logger=e,this.handlers=new Map}handle(...e){e.forEach(r=>{if(Array.isArray(r))return r.forEach(n=>this._addHandler(n));this._addHandler(r)}),this.catcher||(this.catcher=this._unhandledRejection.bind(this),process.on("unhandledRejection",this.catcher))}unhandle(){this.catcher&&(process.removeListener("unhandledRejection",this.catcher),this.catcher=!1,Array.from(this.handlers.values()).forEach(e=>this.logger.unpipe(e)))}getAllInfo(e){let r=null;return e&&(r=typeof e=="string"?e:e.message),{error:e,level:"error",message:[`unhandledRejection: ${r||"(no error message)"}`,e&&e.stack||" No stack trace"].join(`
|
|
85
85
|
`),stack:e&&e.stack,rejection:!0,date:new Date().toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(e)}}getProcessInfo(){return{pid:process.pid,uid:process.getuid?process.getuid():null,gid:process.getgid?process.getgid():null,cwd:process.cwd(),execPath:process.execPath,version:process.version,argv:process.argv,memoryUsage:process.memoryUsage()}}getOsInfo(){return{loadavg:Ow.loadavg(),uptime:Ow.uptime()}}getTrace(e){return(e?Aw.parse(e):Aw.get()).map(n=>({column:n.getColumnNumber(),file:n.getFileName(),function:n.getFunctionName(),line:n.getLineNumber(),method:n.getMethodName(),native:n.isNative()}))}_addHandler(e){if(!this.handlers.has(e)){e.handleRejections=!0;let r=new wY(e);this.handlers.set(e,r),this.logger.pipe(r)}}_unhandledRejection(e){let r=this.getAllInfo(e),n=this._getRejectionHandlers(),i=typeof this.logger.exitOnError=="function"?this.logger.exitOnError(e):this.logger.exitOnError,s;!n.length&&i&&(console.warn("winston: exitOnError cannot be true with no rejection handlers."),console.warn("winston: not exiting process."),i=!1);function o(){Ix("doExit",i),Ix("process._exiting",process._exiting),i&&!process._exiting&&(s&&clearTimeout(s),process.exit(1))}if(!n||n.length===0)return process.nextTick(o);vY(n,(a,u)=>{let f=_Y(u),l=a.transport||a;function x(d){return()=>{Ix(d),f()}}l._ending=!0,l.once("finish",x("finished")),l.once("error",x("error"))},()=>i&&o()),this.logger.log(r),i&&(s=setTimeout(o,3e3))}_getRejectionHandlers(){return this.logger.transports.filter(e=>(e.transport||e).handleRejections)}}});var Rw=c((yie,Iw)=>{"use strict";var Bx=class{constructor(e){let r=Yo();if(typeof e!="object"||Array.isArray(e)||!(e instanceof r))throw new Error("Logger is required for profiling");this.logger=e,this.start=Date.now()}done(...e){typeof e[e.length-1]=="function"&&(console.warn("Callback function no longer supported as of winston@3.0.0"),e.pop());let r=typeof e[e.length-1]=="object"?e.pop():{};return r.level=r.level||"info",r.durationMs=Date.now()-this.start,this.logger.write(r)}};Iw.exports=Bx});var Yo=c((bie,Mw)=>{"use strict";var{Stream:EY,Transform:SY}=Ht(),Bw=zo(),{LEVEL:wt,SPLAT:Lw}=fe(),Pw=Fx(),FY=Tx(),CY=Rx(),qY=ux(),OY=Rw(),{warn:AY}=sx(),TY=Go(),IY=/%[scdjifoO%]/g,Jo=class extends SY{constructor(e){super({objectMode:!0}),this.configure(e)}child(e){let r=this;return Object.create(r,{write:{value:function(n){let i=Object.assign({},e,n);n instanceof Error&&(i.stack=n.stack,i.message=n.message),r.write(i)}}})}configure({silent:e,format:r,defaultMeta:n,levels:i,level:s="info",exitOnError:o=!0,transports:a,colors:u,emitErrs:f,formatters:l,padLevels:x,rewriters:d,stripColors:p,exceptionHandlers:h,rejectionHandlers:g}={}){if(this.transports.length&&this.clear(),this.silent=e,this.format=r||this.format||Zl()(),this.defaultMeta=n||null,this.levels=i||this.levels||TY.npm.levels,this.level=s,this.exceptions&&this.exceptions.unhandle(),this.rejections&&this.rejections.unhandle(),this.exceptions=new FY(this),this.rejections=new CY(this),this.profilers={},this.exitOnError=o,a&&(a=Array.isArray(a)?a:[a],a.forEach(b=>this.add(b))),u||f||l||x||d||p)throw new Error(["{ colors, emitErrs, formatters, padLevels, rewriters, stripColors } were removed in winston@3.0.0.","Use a custom winston.format(function) instead.","See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join(`
|
|
86
86
|
`));h&&this.exceptions.handle(h),g&&this.rejections.handle(g)}getHighestLogLevel(){let e=zi(this.levels,this.level);return!this.transports||this.transports.length===0?e:this.transports.reduce((r,n)=>{let i=zi(this.levels,n.level);return i!==null&&i>r?i:r},e)}isLevelEnabled(e){let r=zi(this.levels,e);if(r===null)return!1;let n=zi(this.levels,this.level);return n===null?!1:!this.transports||this.transports.length===0?n>=r:this.transports.findIndex(s=>{let o=zi(this.levels,s.level);return o===null&&(o=n),o>=r})!==-1}log(e,r,...n){if(arguments.length===1)return e[wt]=e.level,this._addDefaultMeta(e),this.write(e),this;if(arguments.length===2)return r&&typeof r=="object"?(r[wt]=r.level=e,this._addDefaultMeta(r),this.write(r),this):(r={[wt]:e,level:e,message:r},this._addDefaultMeta(r),this.write(r),this);let[i]=n;if(typeof i=="object"&&i!==null&&!(r&&r.match&&r.match(IY))){let o=Object.assign({},this.defaultMeta,i,{[wt]:e,[Lw]:n,level:e,message:r});return i.message&&(o.message=`${o.message} ${i.message}`),i.stack&&(o.stack=i.stack),i.cause&&(o.cause=i.cause),this.write(o),this}return this.write(Object.assign({},this.defaultMeta,{[wt]:e,[Lw]:n,level:e,message:r})),this}_transform(e,r,n){if(this.silent)return n();e[wt]||(e[wt]=e.level),!this.levels[e[wt]]&&this.levels[e[wt]]!==0&&console.error("[winston] Unknown logger level: %s",e[wt]),this._readableState.pipes||console.error("[winston] Attempt to write logs with no transports, which can increase memory usage: %j",e);try{this.push(this.format.transform(e,this.format.options))}finally{this._writableState.sync=!1,n()}}_final(e){let r=this.transports.slice();Bw(r,(n,i)=>{if(!n||n.finished)return setImmediate(i);n.once("finish",i),n.end()},e)}add(e){let r=!Pw(e)||e.log.length>2?new qY({transport:e}):e;if(!r._writableState||!r._writableState.objectMode)throw new Error("Transports must WritableStreams in objectMode. Set { objectMode: true }.");return this._onEvent("error",r),this._onEvent("warn",r),this.pipe(r),e.handleExceptions&&this.exceptions.handle(),e.handleRejections&&this.rejections.handle(),this}remove(e){if(!e)return this;let r=e;return(!Pw(e)||e.log.length>2)&&(r=this.transports.filter(n=>n.transport===e)[0]),r&&this.unpipe(r),this}clear(){return this.unpipe(),this}close(){return this.exceptions.unhandle(),this.rejections.unhandle(),this.clear(),this.emit("close"),this}setLevels(){AY.deprecated("setLevels")}query(e,r){typeof e=="function"&&(r=e,e={}),e=e||{};let n={},i=Object.assign({},e.query||{});function s(a,u){e.query&&typeof a.formatQuery=="function"&&(e.query=a.formatQuery(i)),a.query(e,(f,l)=>{if(f)return u(f);typeof a.formatResults=="function"&&(l=a.formatResults(l,e.format)),u(null,l)})}function o(a,u){s(a,(f,l)=>{u&&(l=f||l,l&&(n[a.name]=l),u()),u=null})}Bw(this.transports.filter(a=>!!a.query),o,()=>r(null,n))}stream(e={}){let r=new EY,n=[];return r._streams=n,r.destroy=()=>{let i=n.length;for(;i--;)n[i].destroy()},this.transports.filter(i=>!!i.stream).forEach(i=>{let s=i.stream(e);s&&(n.push(s),s.on("log",o=>{o.transport=o.transport||[],o.transport.push(i.name),r.emit("log",o)}),s.on("error",o=>{o.transport=o.transport||[],o.transport.push(i.name),r.emit("error",o)}))}),r}startTimer(){return new OY(this)}profile(e,...r){let n=Date.now();if(this.profilers[e]){let i=this.profilers[e];delete this.profilers[e],typeof r[r.length-2]=="function"&&(console.warn("Callback function no longer supported as of winston@3.0.0"),r.pop());let s=typeof r[r.length-1]=="object"?r.pop():{};return s.level=s.level||"info",s.durationMs=n-i,s.message=s.message||e,this.write(s)}return this.profilers[e]=n,this}handleExceptions(...e){console.warn("Deprecated: .handleExceptions() will be removed in winston@4. Use .exceptions.handle()"),this.exceptions.handle(...e)}unhandleExceptions(...e){console.warn("Deprecated: .unhandleExceptions() will be removed in winston@4. Use .exceptions.unhandle()"),this.exceptions.unhandle(...e)}cli(){throw new Error(["Logger.cli() was removed in winston@3.0.0","Use a custom winston.formats.cli() instead.","See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join(`
|
|
87
|
-
`))}_onEvent(e,r){function n(i){e==="error"&&!this.transports.includes(r)&&this.add(r),this.emit(e,i,r)}r["__winston"+e]||(r["__winston"+e]=n.bind(this),r.on(e,r["__winston"+e]))}_addDefaultMeta(e){this.defaultMeta&&Object.assign(e,this.defaultMeta)}};function zi(t,e){let r=t[e];return!r&&r!==0?null:r}Object.defineProperty(Jo.prototype,"transports",{configurable:!1,enumerable:!0,get(){let{pipes:t}=this._readableState;return Array.isArray(t)?t:[t].filter(Boolean)}});Mw.exports=Jo});var Lx=c((Die,jw)=>{"use strict";var{LEVEL:RY}=fe(),BY=Go(),LY=Yo(),PY=Gi()("winston:create-logger");function MY(t){return"is"+t.charAt(0).toUpperCase()+t.slice(1)+"Enabled"}jw.exports=function(t={}){t.levels=t.levels||BY.npm.levels;class e extends LY{constructor(i){super(i)}}let r=new e(t);return Object.keys(t.levels).forEach(function(n){if(PY('Define prototype method for "%s"',n),n==="log"){console.warn('Level "log" not defined: conflicts with the method "log". Use a different level name.');return}e.prototype[n]=function(...i){let s=this||r;if(i.length===1){let[o]=i,a=o&&o.message&&o||{message:o};return a.level=a[RY]=n,s._addDefaultMeta(a),s.write(a),this||r}return i.length===0?(s.log(n,""),s):s.log(n,...i)},e.prototype[MY(n)]=function(){return(this||r).isLevelEnabled(n)}}),r}});var kw=c((_ie,Nw)=>{"use strict";var jY=Lx();Nw.exports=class{constructor(e={}){this.loggers=new Map,this.options=e}add(e,r){if(!this.loggers.has(e)){r=Object.assign({},r||this.options);let n=r.transports||this.options.transports;n?r.transports=Array.isArray(n)?n.slice():[n]:r.transports=[];let i=jY(r);i.on("close",()=>this._delete(e)),this.loggers.set(e,i)}return this.loggers.get(e)}get(e,r){return this.add(e,r)}has(e){return!!this.loggers.has(e)}close(e){if(e)return this._removeLogger(e);this.loggers.forEach((r,n)=>this._removeLogger(n))}_removeLogger(e){if(!this.loggers.has(e))return;this.loggers.get(e).close(),this._delete(e)}_delete(e){this.loggers.delete(e)}}});var Uw=c(Q=>{"use strict";var $w=ix(),{warn:Yi}=sx();Q.version=$3().version;Q.transports=hw();Q.config=Go();Q.addColors=$w.levels;Q.format=$w.format;Q.createLogger=Lx();Q.Logger=Yo();Q.ExceptionHandler=Tx();Q.RejectionHandler=Rx();Q.Container=kw();Q.Transport=pn();Q.loggers=new Q.Container;var Et=Q.createLogger();Object.keys(Q.config.npm.levels).concat(["log","query","stream","add","remove","clear","profile","startTimer","handleExceptions","unhandleExceptions","handleRejections","unhandleRejections","configure","child"]).forEach(t=>Q[t]=(...e)=>Et[t](...e));Object.defineProperty(Q,"level",{get(){return Et.level},set(t){Et.level=t}});Object.defineProperty(Q,"exceptions",{get(){return Et.exceptions}});Object.defineProperty(Q,"rejections",{get(){return Et.rejections}});["exitOnError"].forEach(t=>{Object.defineProperty(Q,t,{get(){return Et[t]},set(e){Et[t]=e}})});Object.defineProperty(Q,"default",{get(){return{exceptionHandlers:Et.exceptionHandlers,rejectionHandlers:Et.rejectionHandlers,transports:Et.transports}}});Yi.deprecated(Q,"setLevels");Yi.forFunctions(Q,"useFormat",["cli"]);Yi.forProperties(Q,"useFormat",["padLevels","stripColors"]);Yi.forFunctions(Q,"deprecated",["addRewriter","addFilter","clone","extend"]);Yi.forProperties(Q,"deprecated",["emitErrs","levelLength"])});var HY={};vE(HY,{default:()=>cE,deployToCloudRun:()=>uE,deployToFunction:()=>aE});module.exports=_E(HY);var Xi=require("child_process"),lt=require("fs"),Y=require("path"),Xw=require("url"),Xt=require("@angular-devkit/architect"),Qw=require("@angular-devkit/schematics"),Zw=Sr(o2()),Mx=Sr(g4()),eE=Sr(A4()),jx=Sr(b_()),Xo=Sr(fe()),Qo=Sr(Uw());var Gw=
|
|
87
|
+
`))}_onEvent(e,r){function n(i){e==="error"&&!this.transports.includes(r)&&this.add(r),this.emit(e,i,r)}r["__winston"+e]||(r["__winston"+e]=n.bind(this),r.on(e,r["__winston"+e]))}_addDefaultMeta(e){this.defaultMeta&&Object.assign(e,this.defaultMeta)}};function zi(t,e){let r=t[e];return!r&&r!==0?null:r}Object.defineProperty(Jo.prototype,"transports",{configurable:!1,enumerable:!0,get(){let{pipes:t}=this._readableState;return Array.isArray(t)?t:[t].filter(Boolean)}});Mw.exports=Jo});var Lx=c((Die,jw)=>{"use strict";var{LEVEL:RY}=fe(),BY=Go(),LY=Yo(),PY=Gi()("winston:create-logger");function MY(t){return"is"+t.charAt(0).toUpperCase()+t.slice(1)+"Enabled"}jw.exports=function(t={}){t.levels=t.levels||BY.npm.levels;class e extends LY{constructor(i){super(i)}}let r=new e(t);return Object.keys(t.levels).forEach(function(n){if(PY('Define prototype method for "%s"',n),n==="log"){console.warn('Level "log" not defined: conflicts with the method "log". Use a different level name.');return}e.prototype[n]=function(...i){let s=this||r;if(i.length===1){let[o]=i,a=o&&o.message&&o||{message:o};return a.level=a[RY]=n,s._addDefaultMeta(a),s.write(a),this||r}return i.length===0?(s.log(n,""),s):s.log(n,...i)},e.prototype[MY(n)]=function(){return(this||r).isLevelEnabled(n)}}),r}});var kw=c((_ie,Nw)=>{"use strict";var jY=Lx();Nw.exports=class{constructor(e={}){this.loggers=new Map,this.options=e}add(e,r){if(!this.loggers.has(e)){r=Object.assign({},r||this.options);let n=r.transports||this.options.transports;n?r.transports=Array.isArray(n)?n.slice():[n]:r.transports=[];let i=jY(r);i.on("close",()=>this._delete(e)),this.loggers.set(e,i)}return this.loggers.get(e)}get(e,r){return this.add(e,r)}has(e){return!!this.loggers.has(e)}close(e){if(e)return this._removeLogger(e);this.loggers.forEach((r,n)=>this._removeLogger(n))}_removeLogger(e){if(!this.loggers.has(e))return;this.loggers.get(e).close(),this._delete(e)}_delete(e){this.loggers.delete(e)}}});var Uw=c(Q=>{"use strict";var $w=ix(),{warn:Yi}=sx();Q.version=$3().version;Q.transports=hw();Q.config=Go();Q.addColors=$w.levels;Q.format=$w.format;Q.createLogger=Lx();Q.Logger=Yo();Q.ExceptionHandler=Tx();Q.RejectionHandler=Rx();Q.Container=kw();Q.Transport=pn();Q.loggers=new Q.Container;var Et=Q.createLogger();Object.keys(Q.config.npm.levels).concat(["log","query","stream","add","remove","clear","profile","startTimer","handleExceptions","unhandleExceptions","handleRejections","unhandleRejections","configure","child"]).forEach(t=>Q[t]=(...e)=>Et[t](...e));Object.defineProperty(Q,"level",{get(){return Et.level},set(t){Et.level=t}});Object.defineProperty(Q,"exceptions",{get(){return Et.exceptions}});Object.defineProperty(Q,"rejections",{get(){return Et.rejections}});["exitOnError"].forEach(t=>{Object.defineProperty(Q,t,{get(){return Et[t]},set(e){Et[t]=e}})});Object.defineProperty(Q,"default",{get(){return{exceptionHandlers:Et.exceptionHandlers,rejectionHandlers:Et.rejectionHandlers,transports:Et.transports}}});Yi.deprecated(Q,"setLevels");Yi.forFunctions(Q,"useFormat",["cli"]);Yi.forProperties(Q,"useFormat",["padLevels","stripColors"]);Yi.forFunctions(Q,"deprecated",["addRewriter","addFilter","clone","extend"]);Yi.forProperties(Q,"deprecated",["emitErrs","levelLength"])});var HY={};vE(HY,{default:()=>cE,deployToCloudRun:()=>uE,deployToFunction:()=>aE});module.exports=_E(HY);var Xi=require("child_process"),lt=require("fs"),Y=require("path"),Xw=require("url"),Xt=require("@angular-devkit/architect"),Qw=require("@angular-devkit/schematics"),Zw=Sr(o2()),Mx=Sr(g4()),eE=Sr(A4()),jx=Sr(b_()),Xo=Sr(fe()),Qo=Sr(Uw());var Gw=22,Ji="ssr",Ww="us-central1",Hw={timeoutSeconds:60,memory:"1GB"},Vw=(t,e,r,n)=>({name:"functions",description:"Angular Universal Application",main:n!=null?n:"index.js",scripts:{start:n?`node ${n}`:"firebase functions:shell"},engines:{node:(r.functionsNodeVersion||Gw).toString()},dependencies:t,devDependencies:e,private:!0}),Kw=(t,e,r)=>`const functions = require('firebase-functions/v1');
|
|
88
88
|
|
|
89
89
|
// Increase readability in Cloud Logging
|
|
90
90
|
require("firebase-functions/logger/compat");
|
|
@@ -222,7 +222,7 @@ ${b}`),g.pop(),`{${T}}`}case"number":return isFinite(x)?String(x):e?e(x):"null";
|
|
|
222
222
|
`),stack:e&&e.stack,exception:!0,date:new Date().toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(e)}}getProcessInfo(){return{pid:process.pid,uid:process.getuid?process.getuid():null,gid:process.getgid?process.getgid():null,cwd:process.cwd(),execPath:process.execPath,version:process.version,argv:process.argv,memoryUsage:process.memoryUsage()}}getOsInfo(){return{loadavg:bA.loadavg(),uptime:bA.uptime()}}getTrace(e){return(e?vA.parse(e):vA.get()).map(n=>({column:n.getColumnNumber(),file:n.getFileName(),function:n.getFunctionName(),line:n.getLineNumber(),method:n.getMethodName(),native:n.isNative()}))}_addHandler(e){if(!this.handlers.has(e)){e.handleExceptions=!0;let r=new Woe(e);this.handlers.set(e,r),this.logger.pipe(r)}}_uncaughtException(e){let r=this.getAllInfo(e),n=this._getExceptionHandlers(),i=typeof this.logger.exitOnError=="function"?this.logger.exitOnError(e):this.logger.exitOnError,s;!n.length&&i&&(console.warn("winston: exitOnError cannot be true with no exception handlers."),console.warn("winston: not exiting process."),i=!1);function o(){O2("doExit",i),O2("process._exiting",process._exiting),i&&!process._exiting&&(s&&clearTimeout(s),process.exit(1))}if(!n||n.length===0)return process.nextTick(o);Koe(n,(a,u)=>{let c=Voe(u),f=a.transport||a;function h(d){return()=>{O2(d),c()}}f._ending=!0,f.once("finish",h("finished")),f.once("error",h("error"))},()=>i&&o()),this.logger.log(r),i&&(s=setTimeout(o,3e3))}_getExceptionHandlers(){return this.logger.transports.filter(e=>(e.transport||e).handleExceptions)}}});var EA=l((R2e,wA)=>{"use strict";var{Writable:Yoe}=ir();wA.exports=class extends Yoe{constructor(e){if(super({objectMode:!0}),!e)throw new Error("RejectionStream requires a TransportStream instance.");this.handleRejections=!0,this.transport=e}_write(e,r,n){return e.rejection?this.transport.log(e,n):(n(),!0)}}});var L2=l((B2e,CA)=>{"use strict";var _A=require("os"),Hoe=hc(),I2=lo()("winston:rejection"),zoe=F2(),SA=A2(),Joe=EA();CA.exports=class{constructor(e){if(!e)throw new Error("Logger is required to handle rejections");this.logger=e,this.handlers=new Map}handle(...e){e.forEach(r=>{if(Array.isArray(r))return r.forEach(n=>this._addHandler(n));this._addHandler(r)}),this.catcher||(this.catcher=this._unhandledRejection.bind(this),process.on("unhandledRejection",this.catcher))}unhandle(){this.catcher&&(process.removeListener("unhandledRejection",this.catcher),this.catcher=!1,Array.from(this.handlers.values()).forEach(e=>this.logger.unpipe(e)))}getAllInfo(e){let r=null;return e&&(r=typeof e=="string"?e:e.message),{error:e,level:"error",message:[`unhandledRejection: ${r||"(no error message)"}`,e&&e.stack||" No stack trace"].join(`
|
|
223
223
|
`),stack:e&&e.stack,rejection:!0,date:new Date().toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(e)}}getProcessInfo(){return{pid:process.pid,uid:process.getuid?process.getuid():null,gid:process.getgid?process.getgid():null,cwd:process.cwd(),execPath:process.execPath,version:process.version,argv:process.argv,memoryUsage:process.memoryUsage()}}getOsInfo(){return{loadavg:_A.loadavg(),uptime:_A.uptime()}}getTrace(e){return(e?SA.parse(e):SA.get()).map(n=>({column:n.getColumnNumber(),file:n.getFileName(),function:n.getFunctionName(),line:n.getLineNumber(),method:n.getMethodName(),native:n.isNative()}))}_addHandler(e){if(!this.handlers.has(e)){e.handleRejections=!0;let r=new Joe(e);this.handlers.set(e,r),this.logger.pipe(r)}}_unhandledRejection(e){let r=this.getAllInfo(e),n=this._getRejectionHandlers(),i=typeof this.logger.exitOnError=="function"?this.logger.exitOnError(e):this.logger.exitOnError,s;!n.length&&i&&(console.warn("winston: exitOnError cannot be true with no rejection handlers."),console.warn("winston: not exiting process."),i=!1);function o(){I2("doExit",i),I2("process._exiting",process._exiting),i&&!process._exiting&&(s&&clearTimeout(s),process.exit(1))}if(!n||n.length===0)return process.nextTick(o);Hoe(n,(a,u)=>{let c=zoe(u),f=a.transport||a;function h(d){return()=>{I2(d),c()}}f._ending=!0,f.once("finish",h("finished")),f.once("error",h("error"))},()=>i&&o()),this.logger.log(r),i&&(s=setTimeout(o,3e3))}_getRejectionHandlers(){return this.logger.transports.filter(e=>(e.transport||e).handleRejections)}}});var FA=l((j2e,qA)=>{"use strict";var N2=class{constructor(e){let r=dc();if(typeof e!="object"||Array.isArray(e)||!(e instanceof r))throw new Error("Logger is required for profiling");this.logger=e,this.start=Date.now()}done(...e){typeof e[e.length-1]=="function"&&(console.warn("Callback function no longer supported as of winston@3.0.0"),e.pop());let r=typeof e[e.length-1]=="object"?e.pop():{};return r.level=r.level||"info",r.durationMs=Date.now()-this.start,this.logger.write(r)}};qA.exports=N2});var dc=l(($2e,IA)=>{"use strict";var{Stream:Xoe,Transform:Qoe}=ir(),AA=hc(),{LEVEL:Rt,SPLAT:OA}=de(),TA=C2(),Zoe=T2(),eae=L2(),tae=u2(),rae=FA(),{warn:nae}=s2(),iae=ac(),sae=/%[scdjifoO%]/g,pc=class extends Qoe{constructor(e){super({objectMode:!0}),this.configure(e)}child(e){let r=this;return Object.create(r,{write:{value:function(n){let i=Object.assign({},e,n);n instanceof Error&&(i.stack=n.stack,i.message=n.message),r.write(i)}}})}configure({silent:e,format:r,defaultMeta:n,levels:i,level:s="info",exitOnError:o=!0,transports:a,colors:u,emitErrs:c,formatters:f,padLevels:h,rewriters:d,stripColors:p,exceptionHandlers:x,rejectionHandlers:g}={}){if(this.transports.length&&this.clear(),this.silent=e,this.format=r||this.format||Zx()(),this.defaultMeta=n||null,this.levels=i||this.levels||iae.npm.levels,this.level=s,this.exceptions&&this.exceptions.unhandle(),this.rejections&&this.rejections.unhandle(),this.exceptions=new Zoe(this),this.rejections=new eae(this),this.profilers={},this.exitOnError=o,a&&(a=Array.isArray(a)?a:[a],a.forEach(m=>this.add(m))),u||c||f||h||d||p)throw new Error(["{ colors, emitErrs, formatters, padLevels, rewriters, stripColors } were removed in winston@3.0.0.","Use a custom winston.format(function) instead.","See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join(`
|
|
224
224
|
`));x&&this.exceptions.handle(x),g&&this.rejections.handle(g)}getHighestLogLevel(){let e=go(this.levels,this.level);return!this.transports||this.transports.length===0?e:this.transports.reduce((r,n)=>{let i=go(this.levels,n.level);return i!==null&&i>r?i:r},e)}isLevelEnabled(e){let r=go(this.levels,e);if(r===null)return!1;let n=go(this.levels,this.level);return n===null?!1:!this.transports||this.transports.length===0?n>=r:this.transports.findIndex(s=>{let o=go(this.levels,s.level);return o===null&&(o=n),o>=r})!==-1}log(e,r,...n){if(arguments.length===1)return e[Rt]=e.level,this._addDefaultMeta(e),this.write(e),this;if(arguments.length===2)return r&&typeof r=="object"?(r[Rt]=r.level=e,this._addDefaultMeta(r),this.write(r),this):(r={[Rt]:e,level:e,message:r},this._addDefaultMeta(r),this.write(r),this);let[i]=n;if(typeof i=="object"&&i!==null&&!(r&&r.match&&r.match(sae))){let o=Object.assign({},this.defaultMeta,i,{[Rt]:e,[OA]:n,level:e,message:r});return i.message&&(o.message=`${o.message} ${i.message}`),i.stack&&(o.stack=i.stack),i.cause&&(o.cause=i.cause),this.write(o),this}return this.write(Object.assign({},this.defaultMeta,{[Rt]:e,[OA]:n,level:e,message:r})),this}_transform(e,r,n){if(this.silent)return n();e[Rt]||(e[Rt]=e.level),!this.levels[e[Rt]]&&this.levels[e[Rt]]!==0&&console.error("[winston] Unknown logger level: %s",e[Rt]),this._readableState.pipes||console.error("[winston] Attempt to write logs with no transports, which can increase memory usage: %j",e);try{this.push(this.format.transform(e,this.format.options))}finally{this._writableState.sync=!1,n()}}_final(e){let r=this.transports.slice();AA(r,(n,i)=>{if(!n||n.finished)return setImmediate(i);n.once("finish",i),n.end()},e)}add(e){let r=!TA(e)||e.log.length>2?new tae({transport:e}):e;if(!r._writableState||!r._writableState.objectMode)throw new Error("Transports must WritableStreams in objectMode. Set { objectMode: true }.");return this._onEvent("error",r),this._onEvent("warn",r),this.pipe(r),e.handleExceptions&&this.exceptions.handle(),e.handleRejections&&this.rejections.handle(),this}remove(e){if(!e)return this;let r=e;return(!TA(e)||e.log.length>2)&&(r=this.transports.filter(n=>n.transport===e)[0]),r&&this.unpipe(r),this}clear(){return this.unpipe(),this}close(){return this.exceptions.unhandle(),this.rejections.unhandle(),this.clear(),this.emit("close"),this}setLevels(){nae.deprecated("setLevels")}query(e,r){typeof e=="function"&&(r=e,e={}),e=e||{};let n={},i=Object.assign({},e.query||{});function s(a,u){e.query&&typeof a.formatQuery=="function"&&(e.query=a.formatQuery(i)),a.query(e,(c,f)=>{if(c)return u(c);typeof a.formatResults=="function"&&(f=a.formatResults(f,e.format)),u(null,f)})}function o(a,u){s(a,(c,f)=>{u&&(f=c||f,f&&(n[a.name]=f),u()),u=null})}AA(this.transports.filter(a=>!!a.query),o,()=>r(null,n))}stream(e={}){let r=new Xoe,n=[];return r._streams=n,r.destroy=()=>{let i=n.length;for(;i--;)n[i].destroy()},this.transports.filter(i=>!!i.stream).forEach(i=>{let s=i.stream(e);s&&(n.push(s),s.on("log",o=>{o.transport=o.transport||[],o.transport.push(i.name),r.emit("log",o)}),s.on("error",o=>{o.transport=o.transport||[],o.transport.push(i.name),r.emit("error",o)}))}),r}startTimer(){return new rae(this)}profile(e,...r){let n=Date.now();if(this.profilers[e]){let i=this.profilers[e];delete this.profilers[e],typeof r[r.length-2]=="function"&&(console.warn("Callback function no longer supported as of winston@3.0.0"),r.pop());let s=typeof r[r.length-1]=="object"?r.pop():{};return s.level=s.level||"info",s.durationMs=n-i,s.message=s.message||e,this.write(s)}return this.profilers[e]=n,this}handleExceptions(...e){console.warn("Deprecated: .handleExceptions() will be removed in winston@4. Use .exceptions.handle()"),this.exceptions.handle(...e)}unhandleExceptions(...e){console.warn("Deprecated: .unhandleExceptions() will be removed in winston@4. Use .exceptions.unhandle()"),this.exceptions.unhandle(...e)}cli(){throw new Error(["Logger.cli() was removed in winston@3.0.0","Use a custom winston.formats.cli() instead.","See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join(`
|
|
225
|
-
`))}_onEvent(e,r){function n(i){e==="error"&&!this.transports.includes(r)&&this.add(r),this.emit(e,i,r)}r["__winston"+e]||(r["__winston"+e]=n.bind(this),r.on(e,r["__winston"+e]))}_addDefaultMeta(e){this.defaultMeta&&Object.assign(e,this.defaultMeta)}};function go(t,e){let r=t[e];return!r&&r!==0?null:r}Object.defineProperty(pc.prototype,"transports",{configurable:!1,enumerable:!0,get(){let{pipes:t}=this._readableState;return Array.isArray(t)?t:[t].filter(Boolean)}});IA.exports=pc});var P2=l((U2e,LA)=>{"use strict";var{LEVEL:oae}=de(),aae=ac(),uae=dc(),cae=lo()("winston:create-logger");function lae(t){return"is"+t.charAt(0).toUpperCase()+t.slice(1)+"Enabled"}LA.exports=function(t={}){t.levels=t.levels||aae.npm.levels;class e extends uae{constructor(i){super(i)}}let r=new e(t);return Object.keys(t.levels).forEach(function(n){if(cae('Define prototype method for "%s"',n),n==="log"){console.warn('Level "log" not defined: conflicts with the method "log". Use a different level name.');return}e.prototype[n]=function(...i){let s=this||r;if(i.length===1){let[o]=i,a=o&&o.message&&o||{message:o};return a.level=a[oae]=n,s._addDefaultMeta(a),s.write(a),this||r}return i.length===0?(s.log(n,""),s):s.log(n,...i)},e.prototype[lae(n)]=function(){return(this||r).isLevelEnabled(n)}}),r}});var PA=l((K2e,NA)=>{"use strict";var fae=P2();NA.exports=class{constructor(e={}){this.loggers=new Map,this.options=e}add(e,r){if(!this.loggers.has(e)){r=Object.assign({},r||this.options);let n=r.transports||this.options.transports;n?r.transports=Array.isArray(n)?n.slice():[n]:r.transports=[];let i=fae(r);i.on("close",()=>this._delete(e)),this.loggers.set(e,i)}return this.loggers.get(e)}get(e,r){return this.add(e,r)}has(e){return!!this.loggers.has(e)}close(e){if(e)return this._removeLogger(e);this.loggers.forEach((r,n)=>this._removeLogger(n))}_removeLogger(e){if(!this.loggers.has(e))return;this.loggers.get(e).close(),this._delete(e)}_delete(e){this.loggers.delete(e)}}});var RA=l(te=>{"use strict";var kA=i2(),{warn:mo}=s2();te.version=kq().version;te.transports=uA();te.config=ac();te.addColors=kA.levels;te.format=kA.format;te.createLogger=P2();te.Logger=dc();te.ExceptionHandler=T2();te.RejectionHandler=L2();te.Container=PA();te.Transport=ni();te.loggers=new te.Container;var Mt=te.createLogger();Object.keys(te.config.npm.levels).concat(["log","query","stream","add","remove","clear","profile","startTimer","handleExceptions","unhandleExceptions","handleRejections","unhandleRejections","configure","child"]).forEach(t=>te[t]=(...e)=>Mt[t](...e));Object.defineProperty(te,"level",{get(){return Mt.level},set(t){Mt.level=t}});Object.defineProperty(te,"exceptions",{get(){return Mt.exceptions}});Object.defineProperty(te,"rejections",{get(){return Mt.rejections}});["exitOnError"].forEach(t=>{Object.defineProperty(te,t,{get(){return Mt[t]},set(e){Mt[t]=e}})});Object.defineProperty(te,"default",{get(){return{exceptionHandlers:Mt.exceptionHandlers,rejectionHandlers:Mt.rejectionHandlers,transports:Mt.transports}}});mo.deprecated(te,"setLevels");mo.forFunctions(te,"useFormat",["cli"]);mo.forProperties(te,"useFormat",["padLevels","stripColors"]);mo.forFunctions(te,"deprecated",["addRewriter","addFilter","clone","extend"]);mo.forProperties(te,"deprecated",["emitErrs","levelLength"])});var wae={};xO(wae,{default:()=>Dae});module.exports=gO(wae);var rO=require("@angular-devkit/architect");var Ni=require("child_process"),n6=_t(gl()),i6=_t(ba()),r6="14.0.0",s6=()=>globalThis.firebaseTools?Promise.resolve(globalThis.firebaseTools):new Promise((t,e)=>{var r;(r=process.env).FIREBASE_CLI_EXPERIMENTS||(r.FIREBASE_CLI_EXPERIMENTS="webframeworks");try{t(require("firebase-tools"))}catch(n){try{let i=(0,Ni.execSync)("npm root --location=global").toString().trim();t(require(`${i}/firebase-tools`))}catch(i){let s=(0,n6.default)({text:"Installing firebase-tools...",discardStdin:process.platform!=="win32"}).start();(0,Ni.spawn)("npm",["i","--location=global","firebase-tools"],{stdio:"pipe",shell:!0}).on("close",o=>{if(o===0){s.succeed("firebase-tools installed globally."),s.stop();let a=(0,Ni.execSync)("npm root -g").toString().trim();t(require(`${a}/firebase-tools`))}else s.fail("Package install failed."),e()})}}}).then(t=>{globalThis.firebaseTools=t;let e=t.cli.version();return console.log(`Using firebase-tools version ${e}`),(0,i6.compare)(e,r6)===-1?(console.error(`firebase-tools version ${r6}+ is required, please upgrade and run again`),Promise.reject()):t});var Hv=require("fs"),zv=require("path"),Jv=require("@angular-devkit/schematics"),Bj=require("@angular-devkit/schematics/tasks"),jj=require("@schematics/angular/utility"),$j=_t(Yv());var Mj=require("@angular-devkit/schematics"),hs=_t(ba());function Xv(t,e){let r=(0,zv.join)(t,".firebaserc");try{let n=(0,Hv.readFileSync)(r),i=JSON.parse(n.toString());return Uj(i,e)}catch(n){return[void 0,void 0]}}var Uj=(t,e)=>{var s,o,a,u,c;let r=(s=t.projects)==null?void 0:s.default,n=Object.keys(t.targets||{}).find(f=>{var h,d,p;return!!((p=(d=(h=t.targets)==null?void 0:h[f])==null?void 0:d.hosting)!=null&&p[e])}),i=n&&((c=(u=(a=(o=t.targets)==null?void 0:o[n])==null?void 0:a.hosting)==null?void 0:u[e])==null?void 0:c[0]);return[n||r,i]};var bo=require("child_process"),wt=require("fs"),X=require("path"),WA=require("url"),Er=require("@angular-devkit/architect"),YA=require("@angular-devkit/schematics"),HA=_t(fw()),R2=_t(eC()),zA=_t(pC()),M2=_t(ba()),xc=_t(de()),gc=_t(RA());var MA=
|
|
225
|
+
`))}_onEvent(e,r){function n(i){e==="error"&&!this.transports.includes(r)&&this.add(r),this.emit(e,i,r)}r["__winston"+e]||(r["__winston"+e]=n.bind(this),r.on(e,r["__winston"+e]))}_addDefaultMeta(e){this.defaultMeta&&Object.assign(e,this.defaultMeta)}};function go(t,e){let r=t[e];return!r&&r!==0?null:r}Object.defineProperty(pc.prototype,"transports",{configurable:!1,enumerable:!0,get(){let{pipes:t}=this._readableState;return Array.isArray(t)?t:[t].filter(Boolean)}});IA.exports=pc});var P2=l((U2e,LA)=>{"use strict";var{LEVEL:oae}=de(),aae=ac(),uae=dc(),cae=lo()("winston:create-logger");function lae(t){return"is"+t.charAt(0).toUpperCase()+t.slice(1)+"Enabled"}LA.exports=function(t={}){t.levels=t.levels||aae.npm.levels;class e extends uae{constructor(i){super(i)}}let r=new e(t);return Object.keys(t.levels).forEach(function(n){if(cae('Define prototype method for "%s"',n),n==="log"){console.warn('Level "log" not defined: conflicts with the method "log". Use a different level name.');return}e.prototype[n]=function(...i){let s=this||r;if(i.length===1){let[o]=i,a=o&&o.message&&o||{message:o};return a.level=a[oae]=n,s._addDefaultMeta(a),s.write(a),this||r}return i.length===0?(s.log(n,""),s):s.log(n,...i)},e.prototype[lae(n)]=function(){return(this||r).isLevelEnabled(n)}}),r}});var PA=l((K2e,NA)=>{"use strict";var fae=P2();NA.exports=class{constructor(e={}){this.loggers=new Map,this.options=e}add(e,r){if(!this.loggers.has(e)){r=Object.assign({},r||this.options);let n=r.transports||this.options.transports;n?r.transports=Array.isArray(n)?n.slice():[n]:r.transports=[];let i=fae(r);i.on("close",()=>this._delete(e)),this.loggers.set(e,i)}return this.loggers.get(e)}get(e,r){return this.add(e,r)}has(e){return!!this.loggers.has(e)}close(e){if(e)return this._removeLogger(e);this.loggers.forEach((r,n)=>this._removeLogger(n))}_removeLogger(e){if(!this.loggers.has(e))return;this.loggers.get(e).close(),this._delete(e)}_delete(e){this.loggers.delete(e)}}});var RA=l(te=>{"use strict";var kA=i2(),{warn:mo}=s2();te.version=kq().version;te.transports=uA();te.config=ac();te.addColors=kA.levels;te.format=kA.format;te.createLogger=P2();te.Logger=dc();te.ExceptionHandler=T2();te.RejectionHandler=L2();te.Container=PA();te.Transport=ni();te.loggers=new te.Container;var Mt=te.createLogger();Object.keys(te.config.npm.levels).concat(["log","query","stream","add","remove","clear","profile","startTimer","handleExceptions","unhandleExceptions","handleRejections","unhandleRejections","configure","child"]).forEach(t=>te[t]=(...e)=>Mt[t](...e));Object.defineProperty(te,"level",{get(){return Mt.level},set(t){Mt.level=t}});Object.defineProperty(te,"exceptions",{get(){return Mt.exceptions}});Object.defineProperty(te,"rejections",{get(){return Mt.rejections}});["exitOnError"].forEach(t=>{Object.defineProperty(te,t,{get(){return Mt[t]},set(e){Mt[t]=e}})});Object.defineProperty(te,"default",{get(){return{exceptionHandlers:Mt.exceptionHandlers,rejectionHandlers:Mt.rejectionHandlers,transports:Mt.transports}}});mo.deprecated(te,"setLevels");mo.forFunctions(te,"useFormat",["cli"]);mo.forProperties(te,"useFormat",["padLevels","stripColors"]);mo.forFunctions(te,"deprecated",["addRewriter","addFilter","clone","extend"]);mo.forProperties(te,"deprecated",["emitErrs","levelLength"])});var wae={};xO(wae,{default:()=>Dae});module.exports=gO(wae);var rO=require("@angular-devkit/architect");var Ni=require("child_process"),n6=_t(gl()),i6=_t(ba()),r6="14.0.0",s6=()=>globalThis.firebaseTools?Promise.resolve(globalThis.firebaseTools):new Promise((t,e)=>{var r;(r=process.env).FIREBASE_CLI_EXPERIMENTS||(r.FIREBASE_CLI_EXPERIMENTS="webframeworks");try{t(require("firebase-tools"))}catch(n){try{let i=(0,Ni.execSync)("npm root --location=global").toString().trim();t(require(`${i}/firebase-tools`))}catch(i){let s=(0,n6.default)({text:"Installing firebase-tools...",discardStdin:process.platform!=="win32"}).start();(0,Ni.spawn)("npm",["i","--location=global","firebase-tools"],{stdio:"pipe",shell:!0}).on("close",o=>{if(o===0){s.succeed("firebase-tools installed globally."),s.stop();let a=(0,Ni.execSync)("npm root -g").toString().trim();t(require(`${a}/firebase-tools`))}else s.fail("Package install failed."),e()})}}}).then(t=>{globalThis.firebaseTools=t;let e=t.cli.version();return console.log(`Using firebase-tools version ${e}`),(0,i6.compare)(e,r6)===-1?(console.error(`firebase-tools version ${r6}+ is required, please upgrade and run again`),Promise.reject()):t});var Hv=require("fs"),zv=require("path"),Jv=require("@angular-devkit/schematics"),Bj=require("@angular-devkit/schematics/tasks"),jj=require("@schematics/angular/utility"),$j=_t(Yv());var Mj=require("@angular-devkit/schematics"),hs=_t(ba());function Xv(t,e){let r=(0,zv.join)(t,".firebaserc");try{let n=(0,Hv.readFileSync)(r),i=JSON.parse(n.toString());return Uj(i,e)}catch(n){return[void 0,void 0]}}var Uj=(t,e)=>{var s,o,a,u,c;let r=(s=t.projects)==null?void 0:s.default,n=Object.keys(t.targets||{}).find(f=>{var h,d,p;return!!((p=(d=(h=t.targets)==null?void 0:h[f])==null?void 0:d.hosting)!=null&&p[e])}),i=n&&((c=(u=(a=(o=t.targets)==null?void 0:o[n])==null?void 0:a.hosting)==null?void 0:u[e])==null?void 0:c[0]);return[n||r,i]};var bo=require("child_process"),wt=require("fs"),X=require("path"),WA=require("url"),Er=require("@angular-devkit/architect"),YA=require("@angular-devkit/schematics"),HA=_t(fw()),R2=_t(eC()),zA=_t(pC()),M2=_t(ba()),xc=_t(de()),gc=_t(RA());var MA=22,yo="ssr",BA="us-central1",jA={timeoutSeconds:60,memory:"1GB"},$A=(t,e,r,n)=>({name:"functions",description:"Angular Universal Application",main:n!=null?n:"index.js",scripts:{start:n?`node ${n}`:"firebase functions:shell"},engines:{node:(r.functionsNodeVersion||MA).toString()},dependencies:t,devDependencies:e,private:!0}),UA=(t,e,r)=>`const functions = require('firebase-functions/v1');
|
|
226
226
|
|
|
227
227
|
// Increase readability in Cloud Logging
|
|
228
228
|
require("firebase-functions/logger/compat");
|